@code-yeongyu/senpi 2026.8.30 → 2026.8.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +142 -2
- package/README.md +3 -0
- package/dist/core/agent-session.d.ts +28 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +161 -14
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction-execution.d.ts +14 -0
- package/dist/core/compaction/compaction-execution.d.ts.map +1 -0
- package/dist/core/compaction/compaction-execution.js +121 -0
- package/dist/core/compaction/compaction-execution.js.map +1 -0
- package/dist/core/compaction/compaction-settings.d.ts +17 -0
- package/dist/core/compaction/compaction-settings.d.ts.map +1 -0
- package/dist/core/compaction/compaction-settings.js +17 -0
- package/dist/core/compaction/compaction-settings.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +13 -26
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +7 -136
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/ideal-compaction-settings.d.ts +9 -0
- package/dist/core/compaction/ideal-compaction-settings.d.ts.map +1 -0
- package/dist/core/compaction/ideal-compaction-settings.js +7 -0
- package/dist/core/compaction/ideal-compaction-settings.js.map +1 -0
- package/dist/core/compaction-settings-access.d.ts +19 -0
- package/dist/core/compaction-settings-access.d.ts.map +1 -0
- package/dist/core/compaction-settings-access.js +10 -0
- package/dist/core/compaction-settings-access.js.map +1 -0
- package/dist/core/compaction-settings-resolver.d.ts +22 -0
- package/dist/core/compaction-settings-resolver.d.ts.map +1 -0
- package/dist/core/compaction-settings-resolver.js +46 -0
- package/dist/core/compaction-settings-resolver.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +9 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +10 -3
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-pipeline.d.ts +18 -0
- package/dist/core/extensions/builtin/compaction/context-pipeline.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/context-pipeline.js +32 -0
- package/dist/core/extensions/builtin/compaction/context-pipeline.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +8 -2
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/emergency-prune.d.ts +17 -0
- package/dist/core/extensions/builtin/compaction/emergency-prune.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/emergency-prune.js +64 -0
- package/dist/core/extensions/builtin/compaction/emergency-prune.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/extension-wiring.d.ts +27 -0
- package/dist/core/extensions/builtin/compaction/extension-wiring.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/extension-wiring.js +84 -0
- package/dist/core/extensions/builtin/compaction/extension-wiring.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/idle-retry.js +1 -1
- package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/idle.d.ts +1 -0
- package/dist/core/extensions/builtin/compaction/idle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/idle.js +13 -2
- package/dist/core/extensions/builtin/compaction/idle.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +148 -150
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +2 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/model-selection.d.ts +14 -0
- package/dist/core/extensions/builtin/compaction/model-selection.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/model-selection.js +37 -0
- package/dist/core/extensions/builtin/compaction/model-selection.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/model-usability-budget.d.ts +30 -0
- package/dist/core/extensions/builtin/compaction/model-usability-budget.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/model-usability-budget.js +74 -0
- package/dist/core/extensions/builtin/compaction/model-usability-budget.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/openai-remote-dependencies.d.ts +9 -0
- package/dist/core/extensions/builtin/compaction/openai-remote-dependencies.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/openai-remote-dependencies.js +2 -0
- package/dist/core/extensions/builtin/compaction/openai-remote-dependencies.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts +3 -6
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/orchestration.d.ts +46 -0
- package/dist/core/extensions/builtin/compaction/orchestration.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/orchestration.js +103 -0
- package/dist/core/extensions/builtin/compaction/orchestration.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/policy.d.ts +12 -2
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js +52 -26
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculation-lead.d.ts +8 -0
- package/dist/core/extensions/builtin/compaction/speculation-lead.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculation-lead.js +17 -0
- package/dist/core/extensions/builtin/compaction/speculation-lead.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative-job.d.ts +22 -0
- package/dist/core/extensions/builtin/compaction/speculative-job.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative-job.js +16 -0
- package/dist/core/extensions/builtin/compaction/speculative-job.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative-summary.d.ts +23 -0
- package/dist/core/extensions/builtin/compaction/speculative-summary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative-summary.js +132 -0
- package/dist/core/extensions/builtin/compaction/speculative-summary.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +8 -13
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +21 -197
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/token-budget-reminder.d.ts +24 -0
- package/dist/core/extensions/builtin/compaction/token-budget-reminder.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/token-budget-reminder.js +25 -0
- package/dist/core/extensions/builtin/compaction/token-budget-reminder.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/tool-admission.d.ts +27 -0
- package/dist/core/extensions/builtin/compaction/tool-admission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/tool-admission.js +56 -0
- package/dist/core/extensions/builtin/compaction/tool-admission.js.map +1 -0
- package/dist/core/extensions/builtin/hooks/trust-state-json.d.ts +5 -0
- package/dist/core/extensions/builtin/hooks/trust-state-json.d.ts.map +1 -0
- package/dist/core/extensions/builtin/hooks/trust-state-json.js +76 -0
- package/dist/core/extensions/builtin/hooks/trust-state-json.js.map +1 -0
- package/dist/core/extensions/builtin/hooks/trust-storage.d.ts +7 -1
- package/dist/core/extensions/builtin/hooks/trust-storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/hooks/trust-storage.js +60 -8
- package/dist/core/extensions/builtin/hooks/trust-storage.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/trust.d.ts +1 -2
- package/dist/core/extensions/builtin/hooks/trust.d.ts.map +1 -1
- package/dist/core/extensions/builtin/hooks/trust.js +1 -72
- package/dist/core/extensions/builtin/hooks/trust.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts +11 -0
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.js +18 -2
- package/dist/core/extensions/builtin/terminal/runtime-session.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.js +4 -0
- package/dist/core/extensions/builtin/ttsr/index.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.d.ts +2 -0
- package/dist/core/extensions/builtin/ttsr/manager.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.js +28 -1
- package/dist/core/extensions/builtin/ttsr/manager.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +7 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/retry-fallback/controller.d.ts +14 -0
- package/dist/core/retry-fallback/controller.d.ts.map +1 -1
- package/dist/core/retry-fallback/controller.js +33 -3
- package/dist/core/retry-fallback/controller.js.map +1 -1
- package/dist/core/retry-fallback/log.js +1 -1
- package/dist/core/retry-fallback/log.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-activity.d.ts +47 -0
- package/dist/core/session-activity.d.ts.map +1 -0
- package/dist/core/session-activity.js +58 -0
- package/dist/core/session-activity.js.map +1 -0
- package/dist/core/session-manager.d.ts +8 -12
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +118 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts +8 -1
- package/dist/core/session-resident-store.d.ts.map +1 -1
- package/dist/core/session-resident-store.js +12 -5
- package/dist/core/session-resident-store.js.map +1 -1
- package/dist/core/settings-manager.d.ts +8 -85
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +9 -17
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-public-types.d.ts +11 -0
- package/dist/core/settings-public-types.d.ts.map +1 -0
- package/dist/core/settings-public-types.js +2 -0
- package/dist/core/settings-public-types.js.map +1 -0
- package/dist/core/settings-shapes.d.ts +36 -0
- package/dist/core/settings-shapes.d.ts.map +1 -0
- package/dist/core/settings-shapes.js +2 -0
- package/dist/core/settings-shapes.js.map +1 -0
- package/dist/core/shared-host-policy.d.ts +6 -0
- package/dist/core/shared-host-policy.d.ts.map +1 -0
- package/dist/core/shared-host-policy.js +7 -0
- package/dist/core/shared-host-policy.js.map +1 -0
- package/dist/core/terminal-settings.d.ts +22 -0
- package/dist/core/terminal-settings.d.ts.map +1 -0
- package/dist/core/terminal-settings.js +2 -0
- package/dist/core/terminal-settings.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +17 -5
- package/dist/main.js.map +1 -1
- package/dist/modes/app-server/daemon.js +3 -3
- package/dist/modes/app-server/daemon.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/interactive-host-runtime.d.ts +84 -1
- package/dist/modes/interactive/interactive-host-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-host-runtime.js +435 -112
- package/dist/modes/interactive/interactive-host-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +24 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts +12 -5
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +173 -23
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/custom-capability.d.ts +1 -0
- package/dist/modes/rpc/custom-capability.d.ts.map +1 -1
- package/dist/modes/rpc/custom-capability.js +1 -0
- package/dist/modes/rpc/custom-capability.js.map +1 -1
- package/dist/modes/rpc/host-ensure.d.ts +17 -0
- package/dist/modes/rpc/host-ensure.d.ts.map +1 -1
- package/dist/modes/rpc/host-ensure.js +67 -16
- package/dist/modes/rpc/host-ensure.js.map +1 -1
- package/dist/modes/rpc/host-lifecycle.d.ts +39 -0
- package/dist/modes/rpc/host-lifecycle.d.ts.map +1 -1
- package/dist/modes/rpc/host-lifecycle.js +80 -15
- package/dist/modes/rpc/host-lifecycle.js.map +1 -1
- package/dist/modes/rpc/multi-session-host.d.ts +38 -0
- package/dist/modes/rpc/multi-session-host.d.ts.map +1 -1
- package/dist/modes/rpc/multi-session-host.js +55 -5
- package/dist/modes/rpc/multi-session-host.js.map +1 -1
- package/dist/modes/rpc/ownership-safe-lock.d.ts +14 -0
- package/dist/modes/rpc/ownership-safe-lock.d.ts.map +1 -0
- package/dist/modes/rpc/ownership-safe-lock.js +87 -0
- package/dist/modes/rpc/ownership-safe-lock.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +13 -2
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +38 -11
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +21 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +1 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-binding.d.ts +2 -1
- package/dist/modes/rpc/session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/session-binding.js +1 -0
- package/dist/modes/rpc/session-binding.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts +54 -1
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +174 -2
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-event-writer.d.ts +18 -0
- package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-writer.js +88 -8
- package/dist/modes/rpc/session-event-writer.js.map +1 -1
- package/dist/modes/rpc/session-registry.d.ts +11 -1
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js +25 -0
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/widget-line-renderer.d.ts +17 -0
- package/dist/modes/rpc/widget-line-renderer.d.ts.map +1 -0
- package/dist/modes/rpc/widget-line-renderer.js +73 -0
- package/dist/modes/rpc/widget-line-renderer.js.map +1 -0
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js +11 -2
- package/dist/utils/fs-watch.js.map +1 -1
- package/docs/app-server.md +2 -2
- package/docs/containerization.md +2 -2
- package/docs/development.md +7 -7
- package/docs/extensions.md +4 -4
- package/docs/grok-neo.md +1 -1
- package/docs/index.md +1 -1
- package/docs/packages.md +2 -2
- package/docs/quickstart.md +4 -4
- package/docs/release-guide.md +21 -21
- package/docs/rpc.md +78 -5
- package/docs/sdk.md +1 -1
- package/docs/skills.md +2 -2
- package/docs/terminal-tools.md +1 -1
- package/docs/termux.md +1 -1
- package/docs/tui.md +1 -1
- package/examples/AGENTS.md +1 -1
- package/examples/sdk/README.md +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +2 -2
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/skill-contribution.ts +71 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +3 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/SKILL.md +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/breaking-changes.md +75 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/build.md +114 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/dev-tooling.md +34 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/http-networking.md +113 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/install.md +93 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/node-compat-platforms.md +36 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/performance.md +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/runtime-apis.md +156 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/security.md +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/skill/bun-1-4/references/test.md +103 -0
- package/node_modules/@earendil-works/pi-agent-core/README.md +3 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +24 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +316 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +20 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/dist/screen-operations.d.ts +42 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-operations.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-operations.js +34 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-operations.js.map +1 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-text.d.ts +8 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-text.js +51 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen-text.js.map +1 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen.d.ts +45 -0
- package/node_modules/@earendil-works/pi-pty/dist/screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/screen.js +178 -55
- package/node_modules/@earendil-works/pi-pty/dist/screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/README.md +6 -3
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +5 -4
- package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +2 -2
- package/node_modules/@earendil-works/pi-tui/native/win32/README.md +2 -2
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
package/docs/development.md
CHANGED
|
@@ -7,8 +7,8 @@ See [AGENTS.md](../../../AGENTS.md) at the monorepo root for fork-specific guide
|
|
|
7
7
|
```bash
|
|
8
8
|
git clone https://github.com/code-yeongyu/senpi
|
|
9
9
|
cd senpi
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
bun install
|
|
11
|
+
bun run build
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Run from source:
|
|
@@ -36,7 +36,7 @@ Change `name`, `configDir`, and `bin` field for your fork. Affects CLI banner, c
|
|
|
36
36
|
|
|
37
37
|
## Path Resolution
|
|
38
38
|
|
|
39
|
-
Three execution modes:
|
|
39
|
+
Three execution modes: bun install, standalone binary (`bun build --compile`), tsx from source.
|
|
40
40
|
|
|
41
41
|
**Always use `src/config.ts`** for package assets:
|
|
42
42
|
|
|
@@ -55,17 +55,17 @@ Never use `__dirname` directly for package assets.
|
|
|
55
55
|
## Testing
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
|
|
58
|
+
bun run test # Vitest across workspaces (skips live-API; default test runner)
|
|
59
59
|
./pi-test.sh # Launch the CLI from source via tsx for manual testing (--no-env unsets API keys)
|
|
60
|
-
|
|
60
|
+
bun run check # Biome + tsc + browser-smoke check (pre-commit equivalent)
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Live-API tests are env-gated vitest tests. Set `PI_ENABLE_LIVE_API_TESTS=1` (or a per-provider flag from `packages/ai/test/live-api-gates.ts`) plus the provider API keys, then run `
|
|
63
|
+
Live-API tests are env-gated vitest tests. Set `PI_ENABLE_LIVE_API_TESTS=1` (or a per-provider flag from `packages/ai/test/live-api-gates.ts`) plus the provider API keys, then run `bun run test`.
|
|
64
64
|
|
|
65
65
|
Run a specific test:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
|
|
68
|
+
bun run test --workspace @code-yeongyu/senpi -- test/specific.test.ts
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
## Project Structure
|
package/docs/extensions.md
CHANGED
|
@@ -184,9 +184,9 @@ To share extensions via npm or git as senpi packages, see [packages.md](packages
|
|
|
184
184
|
| `@earendil-works/pi-ai` | AI utilities (`StringEnum` for Google-compatible enums) |
|
|
185
185
|
| `@earendil-works/pi-tui` | TUI components for custom rendering |
|
|
186
186
|
|
|
187
|
-
npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), run `
|
|
187
|
+
npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), run `bun install`, and imports from `node_modules/` are resolved automatically.
|
|
188
188
|
|
|
189
|
-
For distributed senpi packages installed with `senpi install` (npm or git), runtime deps must be in `dependencies`. Package installation uses production installs (`
|
|
189
|
+
For distributed senpi packages installed with `senpi install` (npm or git), runtime deps must be in `dependencies`. Package installation uses production installs (`bun add --omit=dev`) by default, so `devDependencies` are not available at runtime; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers.
|
|
190
190
|
|
|
191
191
|
Node.js built-ins (`node:fs`, `node:path`, etc.) are also available.
|
|
192
192
|
|
|
@@ -288,7 +288,7 @@ Defer background resource startup until `session_start` or the command/tool/even
|
|
|
288
288
|
└── my-extension/
|
|
289
289
|
├── package.json # Declares dependencies and entry points
|
|
290
290
|
├── package-lock.json
|
|
291
|
-
├── node_modules/ # After
|
|
291
|
+
├── node_modules/ # After bun install
|
|
292
292
|
└── src/
|
|
293
293
|
└── index.ts
|
|
294
294
|
```
|
|
@@ -307,7 +307,7 @@ Defer background resource startup until `session_start` or the command/tool/even
|
|
|
307
307
|
}
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
-
Run `
|
|
310
|
+
Run `bun install` in the extension directory, then imports from `node_modules/` work automatically.
|
|
311
311
|
|
|
312
312
|
## Events
|
|
313
313
|
|
package/docs/grok-neo.md
CHANGED
|
@@ -64,7 +64,7 @@ Senpi is a rebranded distribution, so its first-time setup is intentionally unav
|
|
|
64
64
|
|
|
65
65
|
`--grok-neo` runs **in-process**: the chrome is a presentation strategy inside the ordinary interactive mode, in the same senpi process. There is no separate binary and no daemon — unlike the retired `--neo`, which launched a Go TUI binary talking to senpi over a JSONL RPC daemon.
|
|
66
66
|
|
|
67
|
-
For the Bun-compiled binary (`
|
|
67
|
+
For the Bun-compiled binary (`bun run build:binary`) this means one process and one deployable directory. `bun build --compile` produces a single `dist/pi` executable, and its runtime assets ship alongside it in `dist/`: theme JSON files, image assets, the photon WASM module, and the pty native addon. Native `.node` addons are **not** embedded by `bun build --compile`; the pty addon is resolved as a sidecar relative to the executable (`dist/native/prebuilds/<platform-arch>/`). So the honest claim is "one process, one deployable directory" — not one file.
|
|
68
68
|
|
|
69
69
|
## Experimental Status
|
|
70
70
|
|
package/docs/index.md
CHANGED
|
@@ -7,7 +7,7 @@ Senpi is a minimal terminal coding harness. It is designed to stay small at the
|
|
|
7
7
|
Install with npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
bun add -g @code-yeongyu/senpi
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
To uninstall senpi itself, use the package manager that installed it:
|
package/docs/packages.md
CHANGED
|
@@ -90,7 +90,7 @@ ssh://git@github.com/user/repo@v1
|
|
|
90
90
|
- Refs are pinned tags or commits. `pi update --extensions` and `pi update --all` do not move them to newer refs, but they do reconcile an existing clone to the configured ref.
|
|
91
91
|
- Use `pi install git:host/user/repo@new-ref` to update settings and move an existing package to a new pinned ref.
|
|
92
92
|
- Cloned to `~/.pi/agent/git/<host>/<path>` (global) or `.pi/git/<host>/<path>` (project).
|
|
93
|
-
- When reconciliation changes the checkout, pi resets and cleans the clone, then runs `
|
|
93
|
+
- When reconciliation changes the checkout, pi resets and cleans the clone, then runs `bun install` if `package.json` exists.
|
|
94
94
|
|
|
95
95
|
**SSH examples:**
|
|
96
96
|
```bash
|
|
@@ -166,7 +166,7 @@ If no `pi` manifest is present, pi auto-discovers resources from these directori
|
|
|
166
166
|
|
|
167
167
|
## Dependencies
|
|
168
168
|
|
|
169
|
-
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When pi installs a package from npm or git, it runs `
|
|
169
|
+
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When pi installs a package from npm or git, it runs `bun install`, so those dependencies are installed automatically.
|
|
170
170
|
|
|
171
171
|
Pi bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@earendil-works/pi-ai`, `@earendil-works/pi-agent-core`, `@earendil-works/pi-coding-agent`, `@earendil-works/pi-tui`, `typebox`.
|
|
172
172
|
|
package/docs/quickstart.md
CHANGED
|
@@ -10,7 +10,7 @@ procedure, see the [release and installation guide](release-guide.md).
|
|
|
10
10
|
Senpi is distributed as an npm package:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
bun add -g @code-yeongyu/senpi
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
### Uninstall
|
|
@@ -18,7 +18,7 @@ npm install -g @code-yeongyu/senpi
|
|
|
18
18
|
Use the package manager that installed senpi:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
#
|
|
21
|
+
# bun add -g
|
|
22
22
|
npm uninstall -g @code-yeongyu/senpi
|
|
23
23
|
|
|
24
24
|
# pnpm
|
|
@@ -91,7 +91,7 @@ Senpi loads context files at startup. Add an `AGENTS.md` file to tell it how to
|
|
|
91
91
|
```markdown
|
|
92
92
|
# Project Instructions
|
|
93
93
|
|
|
94
|
-
- Run `
|
|
94
|
+
- Run `bun run check` after code changes.
|
|
95
95
|
- Do not run production migrations locally.
|
|
96
96
|
- Keep responses concise.
|
|
97
97
|
```
|
|
@@ -123,7 +123,7 @@ Images or text can be pasted with Ctrl+V (Alt+V on Windows); images can also be
|
|
|
123
123
|
In interactive mode:
|
|
124
124
|
|
|
125
125
|
```text
|
|
126
|
-
!
|
|
126
|
+
!bun run lint
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
The command output is sent to the model. Use `!!command` to run a command without adding its output to the model context.
|
package/docs/release-guide.md
CHANGED
|
@@ -216,7 +216,7 @@ change the supported Node/npm installation path or require a configuration migra
|
|
|
216
216
|
`release:local` stages the publish manifest and bundled package tree inside the source checkout
|
|
217
217
|
while packing. Run it from a clean, dedicated release checkout rather than a shared dirty
|
|
218
218
|
worktree. After packing, verify `packages/coding-agent/package.json` still has only the five
|
|
219
|
-
intentional internal bundle entries and run `
|
|
219
|
+
intentional internal bundle entries and run `bun install --ignore-scripts` before resuming
|
|
220
220
|
development so workspace dependency resolution is restored. Do not use destructive Git cleanup
|
|
221
221
|
when other work is present.
|
|
222
222
|
|
|
@@ -225,25 +225,25 @@ when other work is present.
|
|
|
225
225
|
Run from the repository root:
|
|
226
226
|
|
|
227
227
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
CI=1
|
|
228
|
+
bun run check
|
|
229
|
+
bun run build
|
|
230
|
+
CI=1 bun run test
|
|
231
231
|
npm audit --omit=dev
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
The release-script checks are:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
bun scripts/generate-coding-agent-shrinkwrap.mjs --check
|
|
238
|
+
bun scripts/generate-coding-agent-install-lock.mjs --check
|
|
239
|
+
bun scripts/upstream-release-worthy.mjs
|
|
240
|
+
bun run release --dry-run
|
|
241
|
+
bun scripts/release-notes.mjs extract \
|
|
242
242
|
--version 2026.7.30-2 \
|
|
243
243
|
--tag v2026.7.30-2
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
-
`
|
|
246
|
+
`bun run release --dry-run` is safe for this workflow. Do not run the live release command:
|
|
247
247
|
the live path commits, tags, and pushes.
|
|
248
248
|
|
|
249
249
|
## Plugin verification
|
|
@@ -251,7 +251,7 @@ the live path commits, tags, and pushes.
|
|
|
251
251
|
Run the focused extension suites:
|
|
252
252
|
|
|
253
253
|
```bash
|
|
254
|
-
|
|
254
|
+
bunx --cwd packages/coding-agent vitest \
|
|
255
255
|
--run \
|
|
256
256
|
test/suite/builtin-extension-sync.test.ts \
|
|
257
257
|
test/suite/vendored-builtins.test.ts \
|
|
@@ -304,7 +304,7 @@ Choose one durable output directory outside the repository:
|
|
|
304
304
|
```bash
|
|
305
305
|
cd /Users/yeongyu/local-workspaces/senpi
|
|
306
306
|
ARTIFACT_ROOT="$HOME/.local/share/senpi-releases/2026.7.30-2"
|
|
307
|
-
|
|
307
|
+
bun run release:local --force --out "$ARTIFACT_ROOT"
|
|
308
308
|
```
|
|
309
309
|
|
|
310
310
|
The canonical npm tarball is:
|
|
@@ -341,7 +341,7 @@ Install the verified tarball through npm without lifecycle scripts, then refresh
|
|
|
341
341
|
command cache:
|
|
342
342
|
|
|
343
343
|
```bash
|
|
344
|
-
|
|
344
|
+
bun add -g --ignore-scripts "$TARBALL"
|
|
345
345
|
hash -r
|
|
346
346
|
command -v senpi
|
|
347
347
|
senpi --version
|
|
@@ -358,7 +358,7 @@ upgrade.
|
|
|
358
358
|
Install the verified tarball:
|
|
359
359
|
|
|
360
360
|
```bash
|
|
361
|
-
|
|
361
|
+
bun add -g --ignore-scripts "$TARBALL"
|
|
362
362
|
```
|
|
363
363
|
|
|
364
364
|
Create an isolated runtime home:
|
|
@@ -437,7 +437,7 @@ Install the transferred artifact:
|
|
|
437
437
|
|
|
438
438
|
```bash
|
|
439
439
|
ssh mengmotaHost \
|
|
440
|
-
'
|
|
440
|
+
'bun add -g --ignore-scripts \
|
|
441
441
|
/tmp/senpi-2026.7.30-2/code-yeongyu-senpi-2026.7.30-2.tgz'
|
|
442
442
|
```
|
|
443
443
|
|
|
@@ -516,10 +516,10 @@ counts must match exactly on each machine.
|
|
|
516
516
|
Re-run version synchronization and lock generation:
|
|
517
517
|
|
|
518
518
|
```bash
|
|
519
|
-
|
|
520
|
-
PI_ALLOW_LOCKFILE_CHANGE=1
|
|
521
|
-
|
|
522
|
-
|
|
519
|
+
bun scripts/sync-versions.js
|
|
520
|
+
PI_ALLOW_LOCKFILE_CHANGE=1 bun install --lockfile-only --ignore-scripts
|
|
521
|
+
bun scripts/generate-coding-agent-shrinkwrap.mjs
|
|
522
|
+
bun scripts/generate-coding-agent-install-lock.mjs
|
|
523
523
|
```
|
|
524
524
|
|
|
525
525
|
Then rebuild before packaging.
|
|
@@ -567,7 +567,7 @@ configuration paths.
|
|
|
567
567
|
Run the MCP suite directly:
|
|
568
568
|
|
|
569
569
|
```bash
|
|
570
|
-
|
|
570
|
+
bunx --cwd packages/coding-agent vitest --run test/mcp/
|
|
571
571
|
```
|
|
572
572
|
|
|
573
573
|
Make only compatibility changes required by a reproduced failure. Do not add fallback logic
|
|
@@ -581,7 +581,7 @@ Rollback changes the executable package only. It does not remove or modify
|
|
|
581
581
|
Reinstall the prior published version:
|
|
582
582
|
|
|
583
583
|
```bash
|
|
584
|
-
|
|
584
|
+
bun add -g @code-yeongyu/senpi@2026.7.30
|
|
585
585
|
```
|
|
586
586
|
|
|
587
587
|
Verify rollback from an isolated home:
|
package/docs/rpc.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# RPC Mode
|
|
2
2
|
|
|
3
|
+
Shared-host clients may advertise the `rendered_components` capability to receive factory-rendered widget, header, and footer records. In a shared session, component rendering uses the minimum width reported by currently attached connections, defaulting to 80 when none report a width; disconnected connections no longer contribute.
|
|
4
|
+
|
|
3
5
|
The shared Unix socket host uses `<agentDir>/rpc-host-daemon/host.pid` and `settings.json` as its ownership state. Clients attach to a compatible existing host regardless of which client surface started it; only incompatible unmanaged owners are refused.
|
|
4
6
|
|
|
5
7
|
RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs.
|
|
@@ -8,6 +10,10 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
|
|
|
8
10
|
|
|
9
11
|
## Starting RPC Mode
|
|
10
12
|
|
|
13
|
+
### RPC client lifecycle
|
|
14
|
+
|
|
15
|
+
`RpcClient` accepts an `onDisconnect` callback for an established socket and rejects subsequent transport operations with the typed `RpcTransportGoneError` (also detectable with `isTransportGoneError`). Callers should use the callback to begin recovery and keep the error text out of user-facing output.
|
|
16
|
+
|
|
11
17
|
```bash
|
|
12
18
|
senpi --mode rpc [options]
|
|
13
19
|
```
|
|
@@ -57,6 +63,18 @@ every open session, each tagged with its routing `sessionId`. Correlated respons
|
|
|
57
63
|
only to the connection that issued the command. This lets a non-owner observe a foreign turn without requiring a
|
|
58
64
|
separate subscription protocol.
|
|
59
65
|
|
|
66
|
+
### Client information and rendered components
|
|
67
|
+
|
|
68
|
+
Clients may send `set_client_info` with `{ sessionId, width, capabilities? }`. Advertising `rendered_components` registers
|
|
69
|
+
that connection to receive factory-rendered `setWidget`, `setHeader`, and `setFooter` records. Those records are filtered
|
|
70
|
+
per connection; array/undefined widget records and dialog requests retain their existing delivery semantics. Width is
|
|
71
|
+
shared per session using the minimum of attached clients, and a closed or dropped connection no longer contributes its
|
|
72
|
+
width or capability registration. Snapshot replay preserves rendered-component provenance and applies the same capability
|
|
73
|
+
filter to late joiners; a client that registers `rendered_components` while a snapshot is active receives its retained
|
|
74
|
+
factory-rendered records. On a shared socket host, `rendered_components` is registration-only: it is never inherited from the host environment and must be sent in `set_client_info` for each client connection. Registration applies to the sessions attached by that connection; closing one session removes only that session's width and capability association, while socket disposal removes all associations. Clients must re-register `width` and `capabilities` after every reconnect. When the last
|
|
75
|
+
capable connection leaves a still-attached binding, live component renderers and footer data providers are disposed but
|
|
76
|
+
their factories are retained; a later capable connection recreates and re-renders them.
|
|
77
|
+
|
|
60
78
|
### Session auto-titling
|
|
61
79
|
|
|
62
80
|
Auto-generated session titles are on by default only for interactive launches. RPC hosts opt in with
|
|
@@ -76,9 +94,23 @@ Startup: `senpi --mode rpc --multi-session` → NO default session is constructe
|
|
|
76
94
|
|
|
77
95
|
Interactive launches use the shared RPC host by default when a persisted session is available. A cold start takes approximately 1.3 seconds on the first launch; warm attachment to an existing compatible host is fast. To use the local runtime directly for a launch, set `SENPI_DISABLE_SHARED_HOST=1`. This uses the same local fallback runtime and does not change RPC socket behavior for other clients.
|
|
78
96
|
|
|
97
|
+
### Session replacement
|
|
98
|
+
|
|
99
|
+
A replacement (`new_session`, `switch_session`, `fork`) responds as soon as the swap is committed; the derived-surface refresh that rebinds extensions continues afterwards. That refresh does not disturb work the client starts against the committed session: tool activation performed while extensions are still binding no longer cancels an in-flight compaction or invalidates its context. `loaded_surfaces_changed` is emitted only when the surface digest actually changes, so it is NOT a settle barrier clients can wait on.
|
|
100
|
+
|
|
101
|
+
#### Replacement identity event
|
|
102
|
+
|
|
103
|
+
When `new_session`, `switch_session`, or `fork` swaps the live session - including replacements an extension drives, which a client never issued - every attached connection receives:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{ "type": "session_replaced", "durableSessionId": "…", "sessionFile": "…", "cwd": "…", "sessionName": "…" }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The command response reports only `{ cancelled }`, so this event is the only push channel carrying the new identity. The identity is `durableSessionId`, never `sessionId`: top-level `sessionId` is reserved for the per-connection routing handle that multi-session hosts tag every record with, and that tag is applied last, so reusing the key would overwrite the identity the event exists to deliver. Classic mode emits the event untagged.
|
|
110
|
+
|
|
79
111
|
### Shared host lifecycle (cold start + idle exit)
|
|
80
112
|
|
|
81
|
-
The lifecycle supervisor is also available to bundled/rebranded runtimes through the hidden internal launch route `--internal-rpc-host-supervisor`. This route is wire-invisible and intended only for desktop launchers: it receives the public socket, ownership directory, and the runtime command/arguments to wrap, then runs the same `host-lifecycle.ts` implementation used by `ensureHost()`. Normal CLI modes do not use or advertise this route.
|
|
113
|
+
The lifecycle supervisor is also available to bundled/rebranded runtimes through the hidden internal launch route `--internal-rpc-host-supervisor`. This route is wire-invisible and intended only for desktop launchers: it receives the public socket, ownership directory, and the runtime command/arguments to wrap, then runs the same `host-lifecycle.ts` implementation used by `ensureHost()`. Normal CLI modes do not use or advertise this route. Compiled standalone binaries also re-enter themselves through this route automatically: a bun executable always boots its embedded entrypoint, so the script-path re-entry used under a JS runtime would be parsed as CLI arguments (`Unknown option: --socket`) and the host could never start.
|
|
82
114
|
|
|
83
115
|
Hosts started through `ensureHost()` are wrapped by a lifecycle supervisor that owns the public socket and spawns the
|
|
84
116
|
real RPC host on a private internal hop. The policy lives in `<agentDir>/rpc-host-daemon/settings.json`:
|
|
@@ -108,12 +140,37 @@ internal directory. The supervisor also exports `SENPI_RPC_HOST_WATCH_PPID` as a
|
|
|
108
140
|
set only by the supervisor: a host started any other way (plain `senpi --mode rpc --listen …`, embedders, hand-started
|
|
109
141
|
hosts) sees neither variable and is unaffected. A host whose supervisor is alive is never touched by this binding.
|
|
110
142
|
|
|
143
|
+
### Shared host occupancy (idle eviction, session cap, empty-host exit)
|
|
144
|
+
|
|
145
|
+
Every open session owns a complete runtime (a lone idle session measures 340-510 MB RSS), so the host enforces three
|
|
146
|
+
occupancy bounds itself, independent of the supervisor and of client cooperation:
|
|
147
|
+
|
|
148
|
+
- **Idle eviction**: a session with no routed command and no session-owned work for
|
|
149
|
+
`SENPI_RPC_SESSION_IDLE_EVICTION_MS` (default 30 minutes) is closed through the exact `close_session` sequence
|
|
150
|
+
(abort → waitForIdle → dispose, all attachments drained, path reservation released) and every attached connection
|
|
151
|
+
receives that handle's `session_closed` broadcast plus a final `close_session` response record. "Session-owned
|
|
152
|
+
work" is the complete activity contract, not just a streaming turn: an agent run, a running bash command,
|
|
153
|
+
background terminal jobs and any other published wake source (terminal monitors, loop-guard holds), compaction,
|
|
154
|
+
and barrier-held session work all defer eviction, and the idle clock restarts when that work settles. An evicted
|
|
155
|
+
session resumes like any other: the next `open_session` with the same `sessionPath` reopens it.
|
|
156
|
+
- **Session cap**: `open_session` beyond `SENPI_RPC_MAX_SESSIONS` concurrently opening/open sessions (default 8)
|
|
157
|
+
fails with `too_many_sessions`. Attaching to an already-hosted session (`attached: true`) adds no runtime and never
|
|
158
|
+
counts against the cap, so resume and second-surface flows keep working while at it.
|
|
159
|
+
- **Empty-host exit**: when the registry holds zero sessions AND no client is connected, continuously for
|
|
160
|
+
`SENPI_RPC_HOST_EMPTY_EXIT_MS` (default 15 minutes), the host exits through its clean shutdown path (flush, socket
|
|
161
|
+
removal), for stdio and `--listen` hosts alike. A connected client counts as occupancy even with no session open,
|
|
162
|
+
so the host never drops a live socket under itself. Supervised hosts stay clean either way: a supervisor reads a
|
|
163
|
+
child exit of 0 without a signal as an intentional idle stop and exits 0 with the same cleanup, not as a crash.
|
|
164
|
+
|
|
165
|
+
Values are positive integers; invalid values fall through to the defaults. These bounds run inside the host process,
|
|
166
|
+
so they hold even for embedders and hand-started hosts that have no supervisor.
|
|
167
|
+
|
|
111
168
|
### D1 normative table (multi-session mode)
|
|
112
169
|
|
|
113
170
|
| Command | Params | Success data | Notes |
|
|
114
171
|
| --- | --- | --- | --- |
|
|
115
172
|
| `get_protocol_info` | - | `{ protocolVersion: 1, serverVersion: string, capabilities: string[], mode: "classic"\|"multi" }` | Answered in BOTH modes; side-effect-free; the capability probe. Multi-session hosts include `multi_session` plus the negotiated launch capabilities. |
|
|
116
|
-
| `open_session` | `sessionPath?`, `cwd?`, `provider?`, `modelId?`, `thinkingLevel?`, `permissionPreset?` (all optional; paths MUST be absolute) | `{ sessionId, state: RpcSessionState, attached?: true }` | `sessionPath` = today's `--session` semantics (open-if-exists else create persisting there, `session-manager.ts:926-940`); `provider`/`modelId` applied only on create (resume restores the session's model — mirrors `SenpiSessionRuntime.ts:198-200`); params form the immutable launch profile (D8). When the path is already held by a fully-open session, the open ATTACHES to it: same routing handle, `attached: true`, one more attachment counted; the runtime is torn down only when the last attachment closes. |
|
|
173
|
+
| `open_session` | `sessionPath?`, `cwd?`, `provider?`, `modelId?`, `thinkingLevel?`, `permissionPreset?` (all optional; paths MUST be absolute) | `{ sessionId, state: RpcSessionState, attached?: true }` | `sessionPath` = today's `--session` semantics (open-if-exists else create persisting there, `session-manager.ts:926-940`); `provider`/`modelId` applied only on create (resume restores the session's model — mirrors `SenpiSessionRuntime.ts:198-200`); params form the immutable launch profile (D8). When the path is already held by a fully-open session, the open ATTACHES to it: same routing handle, `attached: true`, one more attachment counted; the runtime is torn down only when the last attachment closes. Fails with `too_many_sessions` at the occupancy cap (see [Shared host occupancy](#shared-host-occupancy-idle-eviction-session-cap-empty-host-exit)); idle sessions past the eviction window are closed by the host itself. |
|
|
117
174
|
| `close_session` | `sessionId` | `{}` | Aborts active work, awaits agent idle + settled persistence, flushes queued events, detaches subscriptions; its response is the LAST record tagged with that handle — no events after (test-pinned). |
|
|
118
175
|
| `list_sessions` | - | `{ sessions: [{ sessionId, durableSessionId, sessionPath, cwd, name, status }] }` | Includes `opening`/`closing` entries with their status. |
|
|
119
176
|
| every existing command | + `sessionId` (REQUIRED in multi mode) | unchanged | Routed to that session. |
|
|
@@ -132,6 +189,7 @@ In the response `error` field, machine-matchable:
|
|
|
132
189
|
- `missing_session_id` (session-scoped command without `sessionId` in multi mode)
|
|
133
190
|
- `multi_session_disabled` (`open_session` in classic mode)
|
|
134
191
|
- `invalid_path` (relative `sessionPath`/`cwd`)
|
|
192
|
+
- `too_many_sessions` (`open_session` while `SENPI_RPC_MAX_SESSIONS` sessions are already opening/open; attaching to a live session never fails this way)
|
|
135
193
|
- `open_failed: <detail>`
|
|
136
194
|
|
|
137
195
|
### Tagging
|
|
@@ -1650,13 +1708,13 @@ Extensions can request user interaction via `ctx.ui.select()`, `ctx.ui.confirm()
|
|
|
1650
1708
|
There are two categories of extension UI methods:
|
|
1651
1709
|
|
|
1652
1710
|
- **Dialog methods** (`select`, `confirm`, `input`, `editor`): emit an `extension_ui_request` on stdout and block until the client sends back an `extension_ui_response` on stdin with the matching `id`.
|
|
1653
|
-
- **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
|
|
1711
|
+
- **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setHeader`, `setFooter`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
|
|
1654
1712
|
|
|
1655
1713
|
If a dialog method includes a `timeout` field, the agent-side will auto-resolve with a default value when the timeout expires. The client does not need to track timeouts.
|
|
1656
1714
|
|
|
1657
1715
|
Some `ExtensionUIContext` methods are not supported or degraded in RPC mode because they require direct TUI access:
|
|
1658
1716
|
- `custom()` returns `undefined`
|
|
1659
|
-
- `setWorkingMessage()`, `setWorkingIndicator()`, `
|
|
1717
|
+
- `setWorkingMessage()`, `setWorkingIndicator()`, `setEditorComponent()`, `setToolsExpanded()` are no-ops. `setFooter()` and `setHeader()` render factory components for clients advertising `rendered_components`.
|
|
1660
1718
|
- `getEditorText()` returns `""`
|
|
1661
1719
|
- `getToolsExpanded()` returns `false`
|
|
1662
1720
|
- `pasteToEditor()` delegates to `setEditorText()` (no paste/collapse handling)
|
|
@@ -1783,7 +1841,22 @@ Set or clear a widget (block of text lines) displayed above or below the editor.
|
|
|
1783
1841
|
}
|
|
1784
1842
|
```
|
|
1785
1843
|
|
|
1786
|
-
Send `widgetLines: undefined` (or omit it) to clear the widget. The `widgetPlacement` field is `"aboveEditor"` (default) or `"belowEditor"`.
|
|
1844
|
+
Send `widgetLines: undefined` (or omit it) to clear the widget. The `widgetPlacement` field is `"aboveEditor"` (default) or `"belowEditor"`. Component factories are rendered by the host using the attached client's terminal width.
|
|
1845
|
+
|
|
1846
|
+
#### setHeader / setFooter
|
|
1847
|
+
|
|
1848
|
+
Set or clear the extension header or footer using rendered text lines. Clients that do not understand these additive methods ignore them.
|
|
1849
|
+
|
|
1850
|
+
```json
|
|
1851
|
+
{
|
|
1852
|
+
"type": "extension_ui_request",
|
|
1853
|
+
"id": "uuid-10",
|
|
1854
|
+
"method": "setHeader",
|
|
1855
|
+
"widgetLines": ["Header line"]
|
|
1856
|
+
}
|
|
1857
|
+
```
|
|
1858
|
+
|
|
1859
|
+
Omit `widgetLines` to restore the built-in surface. Attached clients send `set_client_info` with their terminal width after attach and on resize; hosts default to width 80 when no width is supplied.
|
|
1787
1860
|
|
|
1788
1861
|
#### setTitle
|
|
1789
1862
|
|
package/docs/sdk.md
CHANGED
|
@@ -36,7 +36,7 @@ await session.prompt("What files are in the current directory?");
|
|
|
36
36
|
## Installation
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
bun add @earendil-works/pi-coding-agent
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
The SDK is included in the main package. No separate installation needed.
|
package/docs/skills.md
CHANGED
|
@@ -132,7 +132,7 @@ description: What this skill does and when to use it. Be specific.
|
|
|
132
132
|
|
|
133
133
|
Run once before first use:
|
|
134
134
|
```bash
|
|
135
|
-
cd /path/to/skill &&
|
|
135
|
+
cd /path/to/skill && bun install
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
## Usage
|
|
@@ -249,7 +249,7 @@ description: Web search and content extraction via Brave Search API. Use for sea
|
|
|
249
249
|
## Setup
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
|
-
cd /path/to/brave-search &&
|
|
252
|
+
cd /path/to/brave-search && bun install
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
## Search
|
package/docs/terminal-tools.md
CHANGED
|
@@ -50,7 +50,7 @@ server. Nothing outlives the watch, so no cleanup.
|
|
|
50
50
|
|
|
51
51
|
```js
|
|
52
52
|
monitor({ description: "full test suite",
|
|
53
|
-
command: "if
|
|
53
|
+
command: "if bunx vitest run; then printf 'OK\n'; else code=$?; printf 'FAILED_%s\n' \"$code\"; exit \"$code\"; fi",
|
|
54
54
|
filter: "^(OK|FAILED_)" })
|
|
55
55
|
```
|
|
56
56
|
|
package/docs/termux.md
CHANGED
package/docs/tui.md
CHANGED
|
@@ -472,7 +472,7 @@ interface MyTheme {
|
|
|
472
472
|
Set `PI_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout.
|
|
473
473
|
|
|
474
474
|
```bash
|
|
475
|
-
PI_TUI_WRITE_LOG=/tmp/tui-ansi.log
|
|
475
|
+
PI_TUI_WRITE_LOG=/tmp/tui-ansi.log bunx tsx packages/tui/test/chat-simple.ts
|
|
476
476
|
```
|
|
477
477
|
|
|
478
478
|
## Performance
|
package/examples/AGENTS.md
CHANGED
|
@@ -48,5 +48,5 @@ Largest examples carry real complexity, not toy scope: `extensions/overlay-qa-te
|
|
|
48
48
|
## VALIDATION
|
|
49
49
|
|
|
50
50
|
- Run the focused tests for the public API demonstrated by the example.
|
|
51
|
-
- Typecheck examples through root `
|
|
51
|
+
- Typecheck examples through root `bun run check`.
|
|
52
52
|
- Interactive examples require real CLI or visual QA when their behavior changes.
|
package/examples/sdk/README.md
CHANGED
|
@@ -12,6 +12,46 @@
|
|
|
12
12
|
|
|
13
13
|
### Removed
|
|
14
14
|
|
|
15
|
+
## [2026.8.31] - 2026-08-31
|
|
16
|
+
|
|
17
|
+
### Breaking Changes
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- The codemode extension now bundles the `bun-1-4` skill and contributes it via `resources_discover` only
|
|
22
|
+
when the js eval kernel itself runs bun >= 1.4 (`process.versions.bun`); node-kernel sessions never
|
|
23
|
+
receive the skill, regardless of any bun binary on PATH.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
### Removed
|
|
30
|
+
|
|
31
|
+
## [2026.8.30-3] - 2026-08-30
|
|
32
|
+
|
|
33
|
+
### Breaking Changes
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
### Removed
|
|
42
|
+
|
|
43
|
+
## [2026.8.30-2] - 2026-08-30
|
|
44
|
+
|
|
45
|
+
### Breaking Changes
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
### Removed
|
|
54
|
+
|
|
15
55
|
## [2026.8.30] - 2026-08-30
|
|
16
56
|
|
|
17
57
|
### Breaking Changes
|
|
@@ -202,10 +202,10 @@ namespace to prevent recursive execution.
|
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
204
|
cd packages/senpi-codemode
|
|
205
|
-
|
|
205
|
+
bun run test
|
|
206
206
|
|
|
207
207
|
cd ../..
|
|
208
|
-
|
|
208
|
+
bun run check
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
Direct real-surface QA drivers live in `scripts/qa-*.ts`: kernel cells
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/senpi-codemode",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.31",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Source-only senpi extension package for codemode evaluation tools",
|
|
6
6
|
"type": "module",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/parser": "8.0.4",
|
|
34
|
-
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.8.
|
|
34
|
+
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.8.31",
|
|
35
35
|
"typebox": "1.3.18"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
38
|
+
"@code-yeongyu/senpi": "2026.8.31"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
41
|
+
"@code-yeongyu/senpi": "2026.8.31"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
44
44
|
"senpi",
|