UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

141 lines • 8.93 kB
import accountExtension from "./account/index.js"; import anthropicBashExtension from "./anthropic-bash/index.js"; import anthropicSubscriptionExtension from "./anthropic-subscription/index.js"; import anthropicWebSearchExtension from "./anthropic-web-search/index.js"; import askUserExtension from "./ask-user/index.js"; import bashTimeoutExtension from "./bash-timeout/index.js"; import btwExtension from "./btw/index.js"; import cacheKeepAliveExtension from "./cache-keepalive/index.js"; import chatReplyScrubExtension from "./chat-reply-scrub/index.js"; import compactionExtension from "./compaction/index.js"; import configReloadExtension from "./config-reload/index.js"; import cursorCliOauthExtension from "./cursor-cli-oauth/index.js"; import diffExtension from "./diff.js"; import filesExtension from "./files.js"; import goalExtension from "./goal/index.js"; import gptAccountExtension from "./gpt-account.js"; import gptApplyPatchExtension from "./gpt-apply-patch/index.js"; import handoffHintExtension from "./handoff-hint/index.js"; import helpExtension from "./help/index.js"; import herdrExtension from "./herdr/index.js"; import historySearchExtension from "./history-search/index.js"; import hooksExtension from "./hooks/index.js"; import imageGenExtension from "./imagegen/index.js"; import killGuardExtension from "./kill-guard/index.js"; import credentialProxyExtension from "./credential-proxy/index.js"; import importReproExtension from "./import-repro.js"; import jobWidgetsExtension from "./job-widgets/extension.js"; import lookAtExtension from "./look-at/index.js"; import loopExtension from "./loop/index.js"; import loopGuardExtension from "./loop-guard/index.js"; import mcpExtension from "./mcp/index.js"; import modelFallbackExtension from "./model-fallback/index.js"; import movedPathGuardExtension from "./moved-path-guard/index.js"; import nestedAgentsMdExtension from "./nested-agents-md/index.js"; import openaiImageGenExtension from "./openai-image-gen/index.js"; import openaiWebSearchExtension from "./openai-web-search/index.js"; import permissionSystemExtension from "./permission-system/index.js"; import promptPresetExtension from "./prompt-preset/index.js"; import promptUrlWidgetExtension from "./prompt-url-widget.js"; import reasoningExtension from "./reasoning/index.js"; import recommendedModelsExtension from "./recommended-models/index.js"; import redrawsExtension from "./redraws.js"; import relocateSessionExtension from "./relocate-session/index.js"; import repositoryIdentityExtension from "./repository-identity.js"; import piRulesExtension from "./rules/index.js"; import scheduleExtension from "./schedule/index.js"; import serviceTierExtension from "./service-tier.js"; import terminalExtension from "./terminal/index.js"; import todowriteExtension from "./todotools/index.js"; import toolPairGuardExtension from "./tool-pair-guard/index.js"; import toolSearchExtension from "./tool-search/index.js"; import tpsExtension from "./tps.js"; import ttsrExtension from "./ttsr/index.js"; import vertexModelGardenExtension from "./vertex-model-garden/index.js"; import videoInExtension from "./video-in/index.js"; import webfetchExtension from "./webfetch/index.js"; import websearchExtension from "./websearch/index.js"; export const globalDefaultExtensionIds = ["diff", "files", "prompt-url-widget", "tps"]; export const globalDefaultExtensionFactories = { diff: diffExtension, files: filesExtension, "prompt-url-widget": promptUrlWidgetExtension, tps: tpsExtension, }; export const builtinExtensions = [ // Loop guard owns the first veto opportunity so repeated calls never re-run hooks or permission prompts. { id: "loop-guard", factory: loopGuardExtension }, // Ahead of hooks and permission-system: a path the desktop moved is refused before any hook runs or prompt asks. { id: "moved-path-guard", factory: movedPathGuardExtension }, // Beside moved-path-guard for the same reason: a signal it refuses never reaches a hook or a permission prompt. { id: "kill-guard", factory: killGuardExtension }, // Withholds declared credentials before any tool can spawn a child; the proxy starts at session start. { id: "credential-proxy", factory: credentialProxyExtension }, { id: "hooks", factory: hooksExtension }, { id: "permission-system", factory: permissionSystemExtension }, { id: "gpt-apply-patch", factory: gptApplyPatchExtension }, { id: "ask-user", factory: askUserExtension }, { id: "herdr", factory: herdrExtension }, { id: "imagegen", factory: imageGenExtension }, // Follows imagegen so the native injector's bypass wiring observes the registered client tool. { id: "openai-image-gen", factory: openaiImageGenExtension }, { id: "prompt-preset", factory: promptPresetExtension }, // Follows prompt-preset (both key on the prompt surface) so later message_end handlers see the scrubbed reply. { id: "chat-reply-scrub", factory: chatReplyScrubExtension }, { id: "todowrite", factory: todowriteExtension }, { id: "redraws", factory: redrawsExtension }, { id: "anthropic-web-search", factory: anthropicWebSearchExtension }, { id: "anthropic-bash", factory: anthropicBashExtension }, { id: "openai-web-search", factory: openaiWebSearchExtension }, { id: "service-tier", factory: serviceTierExtension }, // Sits beside service-tier: both are capability-aware model-control commands that only read // the active model and notify; neither mutates payloads, so relative order is not load-bearing. { id: "reasoning", factory: reasoningExtension }, { id: "model-fallback", factory: modelFallbackExtension }, { id: "recommended-models", factory: recommendedModelsExtension }, { id: "bash-timeout", factory: bashTimeoutExtension }, // Terminal follows bash-timeout so its injected default reaches the PTY bash, and follows // anthropic-bash so mutual-exclusion (companion step-aside) is evaluated after it registers. { id: "terminal", factory: terminalExtension }, // Beside terminal, the main host of its jobs; terminal reaches it only through the session registry, so order is not load-bearing. { id: "job-widgets", factory: jobWidgetsExtension }, { id: "tool-pair-guard", factory: toolPairGuardExtension }, { id: "compaction", factory: compactionExtension }, { id: "history-search", factory: historySearchExtension }, { id: "help", factory: helpExtension }, { id: "import-repro", factory: importReproExtension }, { id: "repository-identity", factory: repositoryIdentityExtension }, { id: "websearch", factory: websearchExtension }, { id: "webfetch", factory: webfetchExtension }, { id: "video-in", factory: videoInExtension }, { id: "look-at", factory: lookAtExtension }, { id: "nested-agents-md", factory: nestedAgentsMdExtension }, { id: "rules", factory: piRulesExtension }, { id: "goal", factory: goalExtension }, { id: "loop", factory: loopExtension }, // Durable counterpart of `loop`: writes job files a separate `senpi schedule run` fires later. { id: "schedule", factory: scheduleExtension }, { id: "cache-keepalive", factory: cacheKeepAliveExtension }, // After cache-keepalive: its warm pings move the cache expiry the hint waits for. { id: "handoff-hint", factory: handoffHintExtension }, // Asks the session's host to continue it on another computer; without a host it only answers "stay here". { id: "relocate-session", factory: relocateSessionExtension }, { id: "ttsr", factory: ttsrExtension }, { id: "btw", factory: btwExtension }, // Provider-neutral account listing; sits before the provider lanes so their // dedicated commands (claude-account, cursor accounts) keep their own names. { id: "account", factory: accountExtension }, { id: "gpt-account", factory: gptAccountExtension }, { id: "claude-sdk-oauth", factory: anthropicSubscriptionExtension }, // Registers unconditionally and reports executable/auth state through its oauth check, so it stays beside the other provider lane. { id: "cursor-cli-oauth", factory: cursorCliOauthExtension }, // Provider-only lane beside the other provider registrations; no hooks, so order is not load-bearing. { id: "vertex-model-garden", factory: vertexModelGardenExtension }, // Config reload follows settings-dependent builtins so reloads rebuild their resolved settings before catalog feeders observe them. { id: "config-reload", factory: configReloadExtension }, // Shared catalog wiring loads before MCP, which feeds its tools into the shared catalog as the final builtin. { id: "tool-search", factory: toolSearchExtension }, // Keep MCP last so its eventual provider-payload tap observes all co-resident builtin mutations. { id: "mcp", factory: mcpExtension }, ]; //# sourceMappingURL=index.js.map