بنقرة واحدة
stella-runtime-extension
Extend Stella's Pi-shaped runtime with agents, tools, hooks, providers, and prompt templates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Extend Stella's Pi-shaped runtime with agents, tools, hooks, providers, and prompt templates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | stella-runtime-extension |
| description | Extend Stella's Pi-shaped runtime with agents, tools, hooks, providers, and prompt templates. |
Use this skill when modifying Stella's runtime extension surface: adding or changing agents, tools, lifecycle hooks, providers, prompt templates, or the built-in stella-runtime extension.
Stella's runtime extension system is Pi-shaped. The extension loader discovers files under runtime/extensions/ and registers them through ExtensionFactory.
Do not restart Stella or launch its dev servers to test runtime changes unless the user explicitly asks. Stella is already running for the user; use focused tests, typecheck, lint, and code inspection instead.
runtime/kernel/extensions/types.tsruntime/kernel/extensions/loader.tsruntime/extensions/stella-runtime/runtime/extensions/stella-runtime/agent-metadata/*.mdstella-backend/prompts/stella-runtime/runtime/extensions/stella-runtime/hooks/*.hook.tsruntime/extensions/examples/subagent-reference/runtime/kernel/agents/markdown-agent-loader.tsruntime/kernel/tools/defs/runtime/kernel/tools/defs/index.ts and runtime/kernel/tools/host.tsUse a folder under runtime/extensions/<extension-id>/.
For an extension that registers agents:
runtime/extensions/<extension-id>/
├── index.ts
└── agents/
└── <agent-id>.md
For file-discovered extension parts:
runtime/extensions/
├── tools/*.tool.ts
├── hooks/*.hook.ts
├── providers/*.provider.ts
└── prompts/*.prompt.md
The loader also imports extension folders that have index.ts. Those factories receive an API with:
registerAgent(agent)registerTool(tool)registerProvider(provider)registerPrompt(prompt)on(event, handler, filter?)The factory's second argument is ExtensionServices. Use it for runtime-owned services such as stellaDataDir, stellaAppDir, store, and selfModMonitor instead of reaching through runner internals.
Stella-specific behavior should live in runtime/extensions/stella-runtime/, not as hardcoded branches in the kernel. Existing hooks there cover:
When moving behavior out of the kernel, preserve capability gates through AgentCapabilities in runtime/contracts/agent-runtime.ts and register the hook from runtime/extensions/stella-runtime/index.ts.
Prefer markdown agents for Stella runtime agents.
runtime/extensions/<extension-id>/agents/<agent-id>.md.name, description, tools, and maxAgentDepth.index.ts:import { loadParsedAgentsFromDir } from "../../kernel/agents/markdown-agent-loader.js";
import type { ExtensionFactory } from "../../kernel/extensions/types.js";
const AGENTS_DIR = new URL("./agents/", import.meta.url);
const extension: ExtensionFactory = (pi) => {
for (const agent of loadParsedAgentsFromDir(AGENTS_DIR)) {
pi.registerAgent(agent);
}
};
export default extension;
Use the built-in runtime/extensions/stella-runtime/index.ts and runtime/extensions/examples/subagent-reference/ as the reference pattern.
For core Stella tools, prefer the built-in tool path:
runtime/kernel/tools/defs/<name>.ts.ToolDefinition or factory with name, description, parameters, and execute.runtime/kernel/tools/defs/index.ts.tools: frontmatter.For extension-owned tools, create runtime/extensions/tools/<name>.tool.ts or register a tool from an extension index.ts.
Tool definitions return ToolResult and receive ToolContext. Keep schemas narrow and descriptions concise; put larger operating guidance into a skill under runtime/home-seed/skills/.
Hook events are typed in runtime/kernel/extensions/types.ts. Available hook points include:
before_toolafter_toolbefore_agent_startbefore_user_messageagent_startagent_endturn_startturn_endmessage_startmessage_updatemessage_endtool_execution_starttool_execution_updatetool_execution_endbefore_compactsession_compactbefore_provider_requestafter_provider_responsesession_startsession_shutdownUse before_agent_start for system-prompt changes and before_user_message for hidden prompt messages around the user turn. Hooks may be filtered by agent type; prefer capability checks for behavioral gates that should follow an agent definition.
Providers implement ProviderDefinition from runtime/kernel/extensions/types.ts. Use providers only when adding a real model backend or compatibility layer; routine model defaults usually belong in backend model config instead.
Agent prompt bodies live in the sibling backend repo at stella-backend/prompts/stella-runtime/agents/*.md. Never edit runtime metadata to change a prompt. Keep prompt changes small and outcome-first. Do not add tool schema reference sections; tool schemas are already attached by the runtime.
General-agent prompts should stay lean. Move detailed reusable procedure into runtime/home-seed/skills/<skill-id>/SKILL.md and have the prompt point to the skill by name.
Run the narrowest relevant checks:
bun run test:run -- tests/runtime/kernel/tools/codex-tools.test.ts
bun run electron:typecheck
For lifecycle hook changes, add focused tests under desktop/tests/runtime/extensions/ or desktop/tests/runtime/kernel/extensions/ and run:
bun run test:run -- runtime/extensions/<extension-or-hook>.test.ts
bun run check:boundary
For loader or agent prompt changes, also search for direct factory references:
rg -n "loadExtensions|registerAgent|registerTool|registerProvider|registerPrompt|create[A-Za-z]+Tool" runtime desktop backend
Do not add compatibility shims unless the user explicitly asks for them. Stella has no live production users yet.
Control Stella-owned browser tabs through the persistent node_repl runtime and its frozen browser API. Use for navigation, page interaction, semantic locators, state inspection, new-tab flows, and browser screenshots.
Generate images, video, audio, and 3D through Stella's managed media gateway. Use when the user asks for any generated media. Don't call provider APIs directly — the gateway handles auth, billing, and persistence centrally.
Control macOS desktop apps through Stella's persistent Computer Use runtime.
Control Windows desktop apps through Stella's persistent Computer Use runtime.
Control Stella-owned browser tabs through the persistent node_repl runtime and its frozen browser API. Use for navigation, page interaction, semantic locators, state inspection, new-tab flows, and browser screenshots.
Use Store integrations and imported MCP/API connectors through the stella-connect CLI.