@code-yeongyu/senpi 2026.9.9 → 2026.9.10
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 +82 -1
- package/README.md +2 -0
- package/dist/beta/omo-local-update-worker.js.map +1 -1
- package/dist/beta/omo-local-update.d.ts.map +1 -1
- package/dist/brand-dir-migration.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/experimental/command.d.ts.map +1 -1
- package/dist/cli/grok-neo-gate.js.map +1 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/remote-session.d.ts.map +1 -1
- package/dist/client/remote-session.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +43 -19
- package/dist/config.js.map +1 -1
- package/dist/core/agent-abort-provenance.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +46 -7
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +109 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agent-settled-delivery.d.ts.map +1 -1
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/brand.js.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/lifecycle.d.ts.map +1 -1
- package/dist/core/compaction/stream-watchdog.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/credential-accounts.js.map +1 -1
- package/dist/core/credential-pool/classify.js.map +1 -1
- package/dist/core/credential-pool/failover.d.ts.map +1 -1
- package/dist/core/credential-pool/rotation-stream.js.map +1 -1
- package/dist/core/credential-pool/state-store.d.ts +2 -2
- package/dist/core/credential-pool/state-store.d.ts.map +1 -1
- package/dist/core/credential-pool/state-store.js.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/edited-assistant-message.d.ts +24 -0
- package/dist/core/edited-assistant-message.d.ts.map +1 -0
- package/dist/core/edited-assistant-message.js +57 -0
- package/dist/core/edited-assistant-message.js.map +1 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.d.ts +3 -0
- package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/extension.js +47 -0
- package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/family.d.ts +8 -0
- package/dist/core/extensions/builtin/ask-user/family.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/family.js +6 -0
- package/dist/core/extensions/builtin/ask-user/family.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/format.d.ts +22 -0
- package/dist/core/extensions/builtin/ask-user/format.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/format.js +109 -0
- package/dist/core/extensions/builtin/ask-user/format.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/index.d.ts +4 -0
- package/dist/core/extensions/builtin/ask-user/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/index.js +4 -0
- package/dist/core/extensions/builtin/ask-user/index.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/params.d.ts +27 -0
- package/dist/core/extensions/builtin/ask-user/params.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/params.js +78 -0
- package/dist/core/extensions/builtin/ask-user/params.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/pending.d.ts +58 -0
- package/dist/core/extensions/builtin/ask-user/pending.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/pending.js +130 -0
- package/dist/core/extensions/builtin/ask-user/pending.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/registry.d.ts +21 -0
- package/dist/core/extensions/builtin/ask-user/registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/registry.js +20 -0
- package/dist/core/extensions/builtin/ask-user/registry.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/render.d.ts +4 -0
- package/dist/core/extensions/builtin/ask-user/render.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/render.js +25 -0
- package/dist/core/extensions/builtin/ask-user/render.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/resume.d.ts +4 -0
- package/dist/core/extensions/builtin/ask-user/resume.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/resume.js +85 -0
- package/dist/core/extensions/builtin/ask-user/resume.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/schema.d.ts +40 -0
- package/dist/core/extensions/builtin/ask-user/schema.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/schema.js +102 -0
- package/dist/core/extensions/builtin/ask-user/schema.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/tool.d.ts +8 -0
- package/dist/core/extensions/builtin/ask-user/tool.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ask-user/tool.js +195 -0
- package/dist/core/extensions/builtin/ask-user/tool.js.map +1 -0
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/btw/panel.d.ts.map +1 -1
- package/dist/core/extensions/builtin/btw/side-query.js.map +1 -1
- package/dist/core/extensions/builtin/cache-keepalive/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cache-keepalive/index.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-command.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-management.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/accounts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/accounts.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/affinity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/affinity.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts +11 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js +12 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.d.ts +14 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.js +42 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.d.ts +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.js +105 -36
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/failover.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/refusal.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts.map +1 -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-stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +4 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-protocol.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tool-watch.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/model-usability-budget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote-convert.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/resume-admission.d.ts +7 -0
- package/dist/core/extensions/builtin/compaction/resume-admission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/resume-admission.js +7 -0
- package/dist/core/extensions/builtin/compaction/resume-admission.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/resume-slice.d.ts +23 -0
- package/dist/core/extensions/builtin/compaction/resume-slice.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/resume-slice.js +99 -0
- package/dist/core/extensions/builtin/compaction/resume-slice.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/summarization-retry.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/log.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/protocol.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/reload-deferral.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-engine.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-event-source.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/goal/command-registration.js.map +1 -1
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/elapsed-ticker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +57 -4
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/persistence.js.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.js +9 -6
- package/dist/core/extensions/builtin/goal/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/goal/store.js.map +1 -1
- package/dist/core/extensions/builtin/goal/tool-registration.js +1 -1
- package/dist/core/extensions/builtin/goal/tool-registration.js.map +1 -1
- package/dist/core/extensions/builtin/goal/turn-usage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
- package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -1
- package/dist/core/extensions/builtin/goal/wait-ticker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-account.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-account.js +1 -0
- package/dist/core/extensions/builtin/gpt-account.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/help/panel.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/hooks/command-runner.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/dispatcher.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/plugin-loader.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/tool-adapter.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/trust-storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/hooks/trust.js.map +1 -1
- package/dist/core/extensions/builtin/hooks/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/imagegen/index.js.map +1 -1
- package/dist/core/extensions/builtin/imagegen/params.d.ts +45 -0
- package/dist/core/extensions/builtin/imagegen/params.d.ts.map +1 -0
- package/dist/core/extensions/builtin/imagegen/params.js +81 -0
- package/dist/core/extensions/builtin/imagegen/params.js.map +1 -0
- package/dist/core/extensions/builtin/imagegen/paths.d.ts +10 -4
- package/dist/core/extensions/builtin/imagegen/paths.d.ts.map +1 -1
- package/dist/core/extensions/builtin/imagegen/paths.js +43 -10
- package/dist/core/extensions/builtin/imagegen/paths.js.map +1 -1
- package/dist/core/extensions/builtin/imagegen/reference-images.d.ts +20 -0
- package/dist/core/extensions/builtin/imagegen/reference-images.d.ts.map +1 -0
- package/dist/core/extensions/builtin/imagegen/reference-images.js +70 -0
- package/dist/core/extensions/builtin/imagegen/reference-images.js.map +1 -0
- package/dist/core/extensions/builtin/imagegen/skill/SKILL.md +58 -33
- package/dist/core/extensions/builtin/imagegen/tool.d.ts +15 -19
- package/dist/core/extensions/builtin/imagegen/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/imagegen/tool.js +74 -52
- package/dist/core/extensions/builtin/imagegen/tool.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/look-at/model-selector.d.ts.map +1 -1
- package/dist/core/extensions/builtin/look-at/runner.js.map +1 -1
- package/dist/core/extensions/builtin/loop/command.js.map +1 -1
- package/dist/core/extensions/builtin/loop/cron-planner.js.map +1 -1
- package/dist/core/extensions/builtin/loop/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop/loopfile.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop/scheduler.js.map +1 -1
- package/dist/core/extensions/builtin/loop/status.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop/store.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/escalation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/escalation.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/active-set.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/callback.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth-errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth-errors.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth-provider.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth-refresh.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth-refresh.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/oauth.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/auth/token-store.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/catalog.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/config-schema.d.ts +28 -28
- package/dist/core/extensions/builtin/mcp/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/connection.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/elicitation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/elicitation.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/errors.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/expose/register.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/expose/session.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/guard/output-guard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/guard/output-guard.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/log.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/reconnect.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/service-register.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/service.js.map +1 -1
- package/dist/core/extensions/builtin/nested-agents-md/core/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/nested-agents-md/core/injection-cache.d.ts.map +1 -1
- package/dist/core/extensions/builtin/nested-agents-md/core/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/oauth-login-interaction.d.ts +13 -6
- package/dist/core/extensions/builtin/oauth-login-interaction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/oauth-login-interaction.js +43 -19
- package/dist/core/extensions/builtin/oauth-login-interaction.js.map +1 -1
- package/dist/core/extensions/builtin/openai-image-gen/inject.d.ts +5 -3
- package/dist/core/extensions/builtin/openai-image-gen/inject.d.ts.map +1 -1
- package/dist/core/extensions/builtin/openai-image-gen/inject.js +7 -4
- package/dist/core/extensions/builtin/openai-image-gen/inject.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5-1.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5-1.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/execution-tooling.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.d.ts +4 -4
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js +4 -4
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/rule-activation/renderer.js.map +1 -1
- package/dist/core/extensions/builtin/rules/commands.js.map +1 -1
- package/dist/core/extensions/builtin/rules/config.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/project-root.js.map +1 -1
- package/dist/core/extensions/builtin/rules/ui/dynamic-border.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/ui/rules-banner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/manager.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/manager.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/restore.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/session-bundle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/terminal-manifest.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/normalize.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-operations.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget-component.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js.map +1 -1
- package/dist/core/extensions/builtin/tool-search/native-search.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-search/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-search/service.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/detectors/leak-context.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/detectors/token-grammar.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/message-update.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/repetitive-turns-lane.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/stream-utils.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/watch.d.ts.map +1 -1
- package/dist/core/extensions/builtin/webfetch/webfetch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.d.ts +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/native.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +2 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +17 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/notice/box.d.ts.map +1 -1
- package/dist/core/extensions/notice/box.js +13 -5
- package/dist/core/extensions/notice/box.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +11 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +23 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +76 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +182 -177
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +5 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/lockfile-policy.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config-schema.d.ts +150 -150
- package/dist/core/model-config-schema.d.ts.map +1 -1
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +11 -7
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/retry-fallback/controller.d.ts.map +1 -1
- package/dist/core/retry-fallback/cooldown.d.ts.map +1 -1
- package/dist/core/retry-fallback/cooldown.js.map +1 -1
- package/dist/core/retry-fallback/expansion.js.map +1 -1
- package/dist/core/retry-fallback/log.js.map +1 -1
- package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -1
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +24 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-activity.d.ts.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-log.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts.map +1 -1
- package/dist/core/session-sidecar-store.d.ts.map +1 -1
- package/dist/core/session-summary-lru.d.ts.map +1 -1
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +14 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-shapes.d.ts +7 -0
- package/dist/core/settings-shapes.d.ts.map +1 -1
- package/dist/core/settings-shapes.js +3 -1
- package/dist/core/settings-shapes.js.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bounded-realpath.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/read-classifiers.d.ts +17 -0
- package/dist/core/tools/read-classifiers.d.ts.map +1 -0
- package/dist/core/tools/read-classifiers.js +26 -0
- package/dist/core/tools/read-classifiers.js.map +1 -0
- package/dist/core/tools/read.d.ts +5 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +21 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/tail-window.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write-result.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.d.ts.map +1 -1
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/from-source-config-guard.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/app-server/daemon/occupancy.d.ts.map +1 -1
- package/dist/modes/app-server/daemon/process.d.ts.map +1 -1
- package/dist/modes/app-server/daemon/process.js.map +1 -1
- package/dist/modes/app-server/daemon.js.map +1 -1
- package/dist/modes/app-server/protocol/collaboration-mode.d.ts.map +1 -1
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputAnswer.d.ts +7 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputAnswer.d.ts.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputAnswer.js +4 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputAnswer.js.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputOption.d.ts +8 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputOption.d.ts.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputOption.js +4 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputOption.js.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputParams.d.ts +12 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputParams.d.ts.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputParams.js +4 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputParams.js.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputQuestion.d.ts +13 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputQuestion.d.ts.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputQuestion.js +4 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputQuestion.js.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputResponse.d.ts +10 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputResponse.d.ts.map +1 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputResponse.js +4 -0
- package/dist/modes/app-server/protocol/generated/v2/ToolRequestUserInputResponse.js.map +1 -0
- package/dist/modes/app-server/protocol/index.d.ts +2 -0
- package/dist/modes/app-server/protocol/index.d.ts.map +1 -1
- package/dist/modes/app-server/protocol/index.js.map +1 -1
- package/dist/modes/app-server/protocol/methods.d.ts +1 -0
- package/dist/modes/app-server/protocol/methods.d.ts.map +1 -1
- package/dist/modes/app-server/protocol/methods.js +1 -0
- package/dist/modes/app-server/protocol/methods.js.map +1 -1
- package/dist/modes/app-server/rpc/errors.d.ts.map +1 -1
- package/dist/modes/app-server/runtime.d.ts.map +1 -1
- package/dist/modes/app-server/runtime.js +22 -6
- package/dist/modes/app-server/runtime.js.map +1 -1
- package/dist/modes/app-server/search/fuzzy-files.js.map +1 -1
- package/dist/modes/app-server/search/fuzzy-search-service.d.ts.map +1 -1
- package/dist/modes/app-server/server/account.js.map +1 -1
- package/dist/modes/app-server/server/approval-bridge.d.ts.map +1 -1
- package/dist/modes/app-server/server/approval-types.d.ts.map +1 -1
- package/dist/modes/app-server/server/approval-ui-context.d.ts +2 -1
- package/dist/modes/app-server/server/approval-ui-context.d.ts.map +1 -1
- package/dist/modes/app-server/server/approval-ui-context.js +9 -1
- package/dist/modes/app-server/server/approval-ui-context.js.map +1 -1
- package/dist/modes/app-server/server/catalogs.js.map +1 -1
- package/dist/modes/app-server/server/config.js.map +1 -1
- package/dist/modes/app-server/server/connection.d.ts.map +1 -1
- package/dist/modes/app-server/server/models.js.map +1 -1
- package/dist/modes/app-server/server/notifications.d.ts.map +1 -1
- package/dist/modes/app-server/server/notifications.js.map +1 -1
- package/dist/modes/app-server/server/server-core.d.ts.map +1 -1
- package/dist/modes/app-server/server/server-core.js.map +1 -1
- package/dist/modes/app-server/server/skills.js.map +1 -1
- package/dist/modes/app-server/server/user-input-bridge.d.ts +16 -0
- package/dist/modes/app-server/server/user-input-bridge.d.ts.map +1 -0
- package/dist/modes/app-server/server/user-input-bridge.js +142 -0
- package/dist/modes/app-server/server/user-input-bridge.js.map +1 -0
- package/dist/modes/app-server/server/user-input-types.d.ts +43 -0
- package/dist/modes/app-server/server/user-input-types.d.ts.map +1 -0
- package/dist/modes/app-server/server/user-input-types.js +51 -0
- package/dist/modes/app-server/server/user-input-types.js.map +1 -0
- package/dist/modes/app-server/threads/archive-state.d.ts.map +1 -1
- package/dist/modes/app-server/threads/handlers.js.map +1 -1
- package/dist/modes/app-server/threads/mcp-wire-status.d.ts.map +1 -1
- package/dist/modes/app-server/threads/metadata-state.d.ts.map +1 -1
- package/dist/modes/app-server/threads/projection-file-changes.js.map +1 -1
- package/dist/modes/app-server/threads/projection-message-items.d.ts.map +1 -1
- package/dist/modes/app-server/threads/projection-turn-diff.d.ts.map +1 -1
- package/dist/modes/app-server/threads/projection-web-search.js.map +1 -1
- package/dist/modes/app-server/threads/projection.d.ts.map +1 -1
- package/dist/modes/app-server/threads/registry.d.ts.map +1 -1
- package/dist/modes/app-server/threads/registry.js.map +1 -1
- package/dist/modes/app-server/threads/search-cache.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-log.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
- package/dist/modes/app-server/threads/turns.js.map +1 -1
- package/dist/modes/app-server/threads/wire-thread.js.map +1 -1
- package/dist/modes/app-server/transports/unix-socket.d.ts.map +1 -1
- package/dist/modes/app-server/transports/unix-socket.js.map +1 -1
- package/dist/modes/app-server/transports/websocket.d.ts.map +1 -1
- package/dist/modes/app-server/turn-adapter.d.ts +3 -3
- package/dist/modes/app-server/turn-adapter.d.ts.map +1 -1
- package/dist/modes/app-server/turn-adapter.js +36 -5
- package/dist/modes/app-server/turn-adapter.js.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts +39 -0
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-async-widget.js +82 -0
- package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-keys.d.ts +21 -0
- package/dist/modes/interactive/components/ask-user-question-keys.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-keys.js +115 -0
- package/dist/modes/interactive/components/ask-user-question-keys.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-render.d.ts +17 -0
- package/dist/modes/interactive/components/ask-user-question-render.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-render.js +75 -0
- package/dist/modes/interactive/components/ask-user-question-render.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-state.d.ts +52 -0
- package/dist/modes/interactive/components/ask-user-question-state.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-question-state.js +134 -0
- package/dist/modes/interactive/components/ask-user-question-state.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-question.d.ts +50 -0
- package/dist/modes/interactive/components/ask-user-question.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-question.js +148 -0
- package/dist/modes/interactive/components/ask-user-question.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/progressive-transcript-container.d.ts.map +1 -1
- package/dist/modes/interactive/components/render-signature.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/shortcut-overlay.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-images.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-renderer-boundary.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +4 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +17 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/grok/chrome.d.ts.map +1 -1
- package/dist/modes/interactive/grok/footer.d.ts.map +1 -1
- package/dist/modes/interactive/grok/input-card.d.ts.map +1 -1
- package/dist/modes/interactive/grok/palette.d.ts.map +1 -1
- package/dist/modes/interactive/grok/tool-row.d.ts.map +1 -1
- package/dist/modes/interactive/grok/welcome-card.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-host-runtime.d.ts +6 -0
- package/dist/modes/interactive/interactive-host-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-host-runtime.js +32 -3
- package/dist/modes/interactive/interactive-host-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +35 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +413 -100
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/login-outcome.d.ts +20 -0
- package/dist/modes/interactive/login-outcome.d.ts.map +1 -0
- package/dist/modes/interactive/login-outcome.js +35 -0
- package/dist/modes/interactive/login-outcome.js.map +1 -0
- package/dist/modes/interactive/startup-tools.js.map +1 -1
- package/dist/modes/interactive/streaming-reveal-content.d.ts.map +1 -1
- package/dist/modes/interactive/streaming-reveal-content.js.map +1 -1
- package/dist/modes/interactive/streaming-reveal.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts +7 -7
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.js +5 -0
- package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/model-tips.d.ts +1 -1
- package/dist/modes/interactive/tips/catalog/workspace-tips.d.ts +1 -1
- package/dist/modes/interactive/tips/scheduler.js.map +1 -1
- package/dist/modes/interactive/tips/working-tip.d.ts.map +1 -1
- package/dist/modes/interactive/tool-args-reveal.d.ts.map +1 -1
- package/dist/modes/interactive/tool-result-reveal.d.ts.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +8 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/provider-native-rendering.d.ts.map +1 -1
- package/dist/modes/provider-native-rendering.js +35 -0
- package/dist/modes/provider-native-rendering.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +72 -1
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/connection-question-bridge.d.ts +18 -0
- package/dist/modes/rpc/connection-question-bridge.d.ts.map +1 -0
- package/dist/modes/rpc/connection-question-bridge.js +156 -0
- package/dist/modes/rpc/connection-question-bridge.js.map +1 -0
- package/dist/modes/rpc/custom-capability.d.ts +2 -0
- package/dist/modes/rpc/custom-capability.d.ts.map +1 -1
- package/dist/modes/rpc/custom-capability.js +2 -0
- package/dist/modes/rpc/custom-capability.js.map +1 -1
- package/dist/modes/rpc/event-output-buffer.js.map +1 -1
- package/dist/modes/rpc/host-ensure.js.map +1 -1
- package/dist/modes/rpc/host-lifecycle.d.ts.map +1 -1
- package/dist/modes/rpc/host-lifecycle.js.map +1 -1
- package/dist/modes/rpc/host-watchdog.js.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/multi-session-host.js.map +1 -1
- package/dist/modes/rpc/ownership-safe-lock.d.ts.map +1 -1
- package/dist/modes/rpc/ownership-safe-lock.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +20 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +35 -3
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-input-validation.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +103 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +6 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-binding.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts +4 -4
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +14 -8
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-event-fanout.d.ts +2 -0
- package/dist/modes/rpc/session-event-fanout.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-fanout.js +25 -1
- package/dist/modes/rpc/session-event-fanout.js.map +1 -1
- package/dist/modes/rpc/session-event-writer.d.ts +7 -1
- package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-writer.js +17 -4
- package/dist/modes/rpc/session-event-writer.js.map +1 -1
- package/dist/modes/rpc/session-extension-ui-requests.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js +11 -1
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-client.js.map +1 -1
- package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-requests.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-requests.js +1 -1
- package/dist/modes/rpc/session-worker-requests.js.map +1 -1
- package/dist/modes/rpc/session-worker.js +10 -2
- package/dist/modes/rpc/session-worker.js.map +1 -1
- package/dist/modes/rpc/socket-event-fanout.d.ts +14 -1
- package/dist/modes/rpc/socket-event-fanout.d.ts.map +1 -1
- package/dist/modes/rpc/socket-event-fanout.js +48 -2
- package/dist/modes/rpc/socket-event-fanout.js.map +1 -1
- package/dist/modes/rpc/socket-ownership.js.map +1 -1
- package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/worker-session-registry.js +2 -1
- package/dist/modes/rpc/worker-session-registry.js.map +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/docs/app-server.md +14 -0
- package/docs/extensions.md +28 -1
- package/docs/keybindings.md +1 -0
- package/docs/providers.md +1 -0
- package/docs/rpc.md +95 -3
- package/docs/settings.md +18 -0
- package/docs/skills.md +1 -1
- package/docs/tui.md +6 -0
- package/docs/usage.md +2 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +17 -2
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/config/settings.ts +35 -15
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +13 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt-template.ts +76 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +6 -77
- package/node_modules/@code-yeongyu/senpi-codemode/src/timeouts/run-budget.ts +107 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-deadlines.ts +76 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-execution.ts +25 -14
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-contract.ts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +47 -40
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-notification.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-snapshot.ts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +8 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +17 -187
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/run-eval-cell.ts +189 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +66 -56
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +36 -36
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
- package/node_modules/@earendil-works/pi-ai/README.md +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +3 -1
- 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 +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/context-room.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/stream-retry.d.ts.map +1 -1
- 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-agent.lazy.js.map +1 -1
- 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/google-generative-ai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-edit.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-edit.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-edit.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-edit.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-params.d.ts +60 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-params.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-params.js +93 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-params.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-result.d.ts +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-result.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-result.js +96 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images-result.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images.d.ts +3 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images.js +26 -119
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth-refresh.d.ts +47 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth-refresh.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth-refresh.js +126 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth-refresh.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/failover.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/select.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/refresh-credential.d.ts +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/refresh-credential.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/refresh-credential.js +44 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/refresh-credential.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +26 -35
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/model-capabilities.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +99 -66
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +34 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models-store.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +3 -28
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/node/provider-scope.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.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/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.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/venice.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.models.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.models.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/venice.models.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/recovery-wrapper-state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/parse.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-content-lifecycle.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-native-projection.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-native-projection.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-stream-terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-text-projection.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-text-projection.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-thinking-projection.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +20 -3
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/node_modules/@earendil-works/pi-pty/dist/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/quarantine.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/registry-types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/session-bun.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/package.json +2 -2
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/image-markers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/mux.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/paste-markers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-capabilities.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tmux-image-probe.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/css-tree/cjs/data-patch.cjs +853 -5
- package/node_modules/css-tree/cjs/data.cjs +13598 -3
- package/node_modules/css-tree/cjs/version.cjs +1 -3
- package/node_modules/css-tree/lib/data-patch.js +853 -4
- package/node_modules/css-tree/lib/data.js +13598 -5
- package/node_modules/css-tree/lib/version.js +1 -5
- package/package.json +8 -8
- package/vendor/pi-client/client.d.ts.map +1 -1
- package/vendor/pi-client/client.js.map +1 -1
- package/vendor/pi-client/connection.d.ts.map +1 -1
- package/vendor/pi-client/connection.js.map +1 -1
- package/vendor/pi-client/errors.d.ts.map +1 -1
- package/vendor/pi-client/session-handle.d.ts.map +1 -1
- package/vendor/pi-client/state.d.ts.map +1 -1
- package/vendor/pi-protocol/cbor/decoder.js.map +1 -1
- package/vendor/pi-protocol/cbor/options.d.ts.map +1 -1
- package/vendor/pi-protocol/codec.d.ts.map +1 -1
- package/vendor/pi-protocol/codec.js.map +1 -1
- package/vendor/pi-protocol/framing.d.ts.map +1 -1
- package/vendor/pi-protocol/schemas.d.ts +678 -678
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export const EVAL_PROMPT_TEMPLATE = `Run one step of code in a persistent kernel.
|
|
2
|
+
|
|
3
|
+
<instruction>
|
|
4
|
+
**One eval call = one cell = one logical step.** Top-level names persist per language across eval calls{{#if spawns}}, tool calls and \`task\` subagents{{else}} and tool calls{{/if}}: define helpers and clients once and reuse them instead of re-importing or re-reading. Rebuild state only after \`reset\`, a kernel restart, or a \`NameError\`/\`ReferenceError\`, and check a sentinel variable first so a re-run cannot duplicate side effects.
|
|
5
|
+
|
|
6
|
+
{{#if styleClaude}}<eval_first_batching>
|
|
7
|
+
Batch a step's independent calls in one cell with \`parallel(thunks)\`; write real code around them - loops, branches, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
8
|
+
{{#if monitor}}- Start long-running work (build, test run, deploy, or watch) through \`tool.monitor({ command, filter })\`, putting the decisive-line filter inside the same cell, then keep working until its event wakes the turn.{{/if}}
|
|
9
|
+
</eval_first_batching>{{/if}}{{#if styleGpt}}<gpt_eval_dialect>
|
|
10
|
+
GPT eval: batch a step's independent tool calls in one cell with \`tool.<name>(args)\` and \`parallel(thunks)\` and inspect every result.
|
|
11
|
+
{{#if monitor}}- A wait or a long run (build, test run, deploy, watch) starts through \`tool.monitor({ command, filter })\` in that same cell with the decisive-line filter; its event wakes the turn, so no cell sits on the wait and no child is spawned for it.
|
|
12
|
+
{{/if}}- Long cells detach on their own and notify on completion; do not poll or re-run them.
|
|
13
|
+
- Keep every failed or missing item in the result verbatim and re-read truncated output before deciding.
|
|
14
|
+
</gpt_eval_dialect>{{/if}}{{#if styleCodex}}Route a step's independent lookups through one eval cell via \`parallel(thunks)\` and inspect every result.
|
|
15
|
+
- Loop or comprehend over file sets with \`read()\`/stdlib instead of reading files one call at a time; post-process \`tool.<name>()\` results programmatically.
|
|
16
|
+
- Wrap failable calls in try/except inside the cell and keep every failed item in the result verbatim; after two distinct failed strategies for the same fact, fall back to direct tool calls.
|
|
17
|
+
- Re-read truncated output before deciding on it.
|
|
18
|
+
{{#if monitor}}- Long-running build/test/deploy/watch work: start \`tool.monitor({ command, filter })\` with the decisive-line filter inside the same cell, then continue working until its event wakes the turn.{{/if}}{{/if}}{{#if styleKimi}}Put a step's independent calls into one cell with \`parallel(thunks)\`.
|
|
19
|
+
- Write real code around the calls - loops, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
20
|
+
{{#if monitor}}- Start long-running build, test run, deploy, or watch work with \`tool.monitor({ command, filter })\`, put the decisive-line filter inside the same cell, and keep working until its event wakes the turn.{{/if}}{{/if}}{{#if styleDefault}}Batch a step's independent calls in one cell with \`parallel(thunks)\`.
|
|
21
|
+
- Write real code around the calls - loops, branches, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
22
|
+
{{#if monitor}}- Long-running build, test run, deploy, or watch work starts with \`tool.monitor({ command, filter })\`, with the decisive-line filter inside the same cell; keep working until its event wakes the turn.{{/if}}{{/if}}
|
|
23
|
+
{{#if hostLine}}
|
|
24
|
+
Host: {{hostLine}} — cells execute here. Size \`parallel(thunks)\` pools to its cores; \`tool.<name>()\` shell commands must fit this platform, even when the code you are writing targets another machine.
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
\`language\`: {{#if py}}\`"py"\` IPython kernel{{/if}}{{#ifAll py js}}, {{/ifAll}}{{#if js}}\`"js"\` persistent JavaScript VM{{/if}}{{#if rb}}{{#ifAny py js}}, {{/ifAny}}\`"rb"\` persistent Ruby kernel{{/if}}{{#if jl}}{{#ifAny py js rb}}, {{/ifAny}}\`"jl"\` persistent Julia kernel{{/if}}.
|
|
28
|
+
|
|
29
|
+
A cell that outlives the foreground window detaches: it keeps its language kernel busy (another language can continue) and completes as one notification with its value or error and buffered output. Its own execution time is capped at {{runBudgetSeconds}}s — time inside host tool calls is not charged; raise \`timeout\` only for a declared long run — and a killed js cell that cannot settle restarts its kernel with every global lost. Do not re-run a detached cell; read or cancel it with \`eval({ action: "peek", cell_id })\` / \`eval({ action: "stop", cell_id })\`.
|
|
30
|
+
|
|
31
|
+
{{#if py}}Python runs on a live event loop: use top-level \`await\`; \`asyncio.run(…)\` raises.{{/if}}
|
|
32
|
+
{{#if js}}{{#if jsBun}}JS runs in-process on Bun {{jsVersion}}: top-level \`await\`/\`return\` work; \`Bun.*\` builtins available, including \`new Bun.WebView()\` — a headless browser (navigate/click/evaluate/screenshot) to reach for before \`curl\` or a browser CLI when a page needs JS, a login, or a screenshot. Shell out through \`Bun.$\` or \`Bun.spawn\`, never \`Bun.spawnSync\`: a synchronous child blocks the worker and cannot be interrupted.{{#if bunSkillPath}} MUST READ the bun-1-4 skill at {{bunSkillPath}} before your first js cell — its builtins replace the npm packages you would otherwise install.{{/if}}{{else}}JS runs under Node.js worker: top-level \`await\`/\`return\` work; \`fetch\`/\`Buffer\` available.{{/if}}{{/if}}
|
|
33
|
+
{{#if rb}}Ruby: synchronous; helper options are keyword args{{#if spawns}} (e.g. \`output("id", limit: 2)\`){{/if}}; the last expression auto-displays unless it is \`nil\`, an assignment, or a definition (like IRB).{{/if}}
|
|
34
|
+
{{#if jl}}Julia: synchronous; helper options are standard keyword args{{#if spawns}} (e.g. \`output("id", limit=2)\`){{/if}}; the last expression auto-displays unless it is an assignment or a definition (like the Julia REPL).{{/if}}
|
|
35
|
+
On error, fix and re-run only the failing step; a normal error keeps state, while a timeout or stop message says whether the kernel restarted.
|
|
36
|
+
</instruction>
|
|
37
|
+
|
|
38
|
+
<prelude>
|
|
39
|
+
{{#ifAll py js}}Same helpers + arg order, both runtimes. Python: sync, options = trailing kwargs. JS: async/\`await\`able, options = ONE trailing object literal, never positional (extras throw).{{else}}{{#if py}}Sync; options = trailing kwargs.{{/if}}{{#if js}}Async/\`await\`able; options = ONE trailing object literal, never positional (extras throw).{{/if}}{{/ifAll}}{{#if rb}} Ruby: sync, options = trailing keyword args.{{/if}}{{#if jl}} Julia: sync, options = trailing keyword args.{{/if}}
|
|
40
|
+
\`\`\`
|
|
41
|
+
display(value) → None
|
|
42
|
+
Cell output. Images reach you only through display: pass a figure, image bytes, a tool result, or its \`images[i]\`.
|
|
43
|
+
print(value, ...) → None
|
|
44
|
+
Text output.
|
|
45
|
+
read(path, offset?=1, limit?=None) → str
|
|
46
|
+
File as text; offset/limit are 1-indexed lines. Accepts \`local://…\`.
|
|
47
|
+
write(path, content) → str
|
|
48
|
+
Write file (creates parents) → resolved path. \`local://…\` persists across turns/subagents.
|
|
49
|
+
env(key?=None, value?=None) → str | None | dict
|
|
50
|
+
No args → full env dict; one → value; two → set \`key=value\`.
|
|
51
|
+
{{#if spawns}}output(*ids, format?="raw", offset?=None, limit?=None) → str | dict | list[dict]
|
|
52
|
+
Task/agent output by id. Reads immediately: running tasks return their status; \`format\` \`"raw"\` = full, \`"tail"\` = trailing.
|
|
53
|
+
{{/if}}tool.<name>(args) → { text, images?, details?, hasError? }
|
|
54
|
+
Invoke any session tool; image results (e.g. \`tool.read\` on a png) arrive in \`images[i]\` as { mimeType, dataBase64 }.
|
|
55
|
+
tool_schema(name?) → dict
|
|
56
|
+
Parameter schema of a tool (omit \`name\` to list tool names); a failed \`tool.<name>()\` call also returns the expected parameters.
|
|
57
|
+
completion(prompt, model?="default", system?=None, schema?=None) → str | dict
|
|
58
|
+
Oneshot, stateless. \`model\`: \`"smol"\` fast | \`"default"\` session | \`"slow"\` most capable. \`schema\` (JSON-Schema) → parsed structured output.
|
|
59
|
+
{{#if spawns}}agent(prompt, agent?="{{spawnDefaultAgent}}", model?=None, label?=None, schema?=None, handle?=False) → str | dict
|
|
60
|
+
Run a subagent → final output. \`agent\` picks a discovered agent. \`schema\` as in completion(). \`handle\` → workflow node { text, output, handle: \`agent://<id>\`, id, agent } (parsed under \`data\` with \`schema\`).
|
|
61
|
+
{{/if}}parallel(thunks) → list
|
|
62
|
+
Thunks through a bounded pool (as wide as a \`task\` batch), input order kept; a throwing thunk propagates.
|
|
63
|
+
pipeline(items, ...stages) → list
|
|
64
|
+
Map items through one-arg stages with a barrier between stages; each stage receives the previous stage's result.
|
|
65
|
+
log(message) → None
|
|
66
|
+
Progress line above the status tree.
|
|
67
|
+
phase(title) → None
|
|
68
|
+
Phase grouping subsequent status lines.
|
|
69
|
+
\`\`\`
|
|
70
|
+
</prelude>
|
|
71
|
+
{{#if spawns}}
|
|
72
|
+
<workflow>
|
|
73
|
+
Multi-agent work is an acyclic graph in code: one \`agent(…)\` node per step with its handle option ({{#if py}}\`handle=True\`{{/if}}{{#ifAll py js}} / {{/ifAll}}{{#if js}}\`{ handle: true }\`{{/if}}{{#if jl}}{{#ifAny py js}} / {{/ifAny}}\`handle=true\`{{/if}}), \`parallel(thunks)\` for independent nodes, \`pipeline(items, *stages)\` for staged waves. Pass an upstream node's \`handle\` or \`output\` (or a \`write("local://…")\` URI for bulk text) into dependents instead of re-inlining transcripts, and wrap risky nodes in try/except so a failure aborts only its subtree.
|
|
74
|
+
</workflow>
|
|
75
|
+
{{/if}}
|
|
76
|
+
`;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_RUN_BUDGET_SECONDS } from "../config/settings.ts";
|
|
1
2
|
import type { EvalRuntimeInfo } from "../tool/types.ts";
|
|
3
|
+
import { EVAL_PROMPT_TEMPLATE } from "./eval-prompt-template.ts";
|
|
2
4
|
|
|
3
5
|
export interface EnabledLanguages {
|
|
4
6
|
readonly py: boolean;
|
|
@@ -26,6 +28,8 @@ export interface EvalPromptOptions {
|
|
|
26
28
|
readonly jsRuntime?: EvalRuntimeInfo;
|
|
27
29
|
/** Absolute path of the active bun-1-4 skill; rendered as a MUST READ pointer only on a bun kernel. */
|
|
28
30
|
readonly bunSkillPath?: string;
|
|
31
|
+
/** Kill deadline for a cell's own execution time, as configured; the description states it. */
|
|
32
|
+
readonly runBudgetSeconds?: number;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
/** Prompt dialect for the eval-first batching emphasis. */
|
|
@@ -64,82 +68,6 @@ export function evalEmphasisStyle(modelId: string | undefined): EvalEmphasisStyl
|
|
|
64
68
|
|
|
65
69
|
type ContextValue = string | boolean;
|
|
66
70
|
type Context = Readonly<Record<string, ContextValue>>;
|
|
67
|
-
const EVAL_PROMPT_TEMPLATE = `Run one step of code in a persistent kernel.
|
|
68
|
-
|
|
69
|
-
<instruction>
|
|
70
|
-
**One eval call = one cell = one logical step.** Top-level names persist per language across eval calls{{#if spawns}}, tool calls and \`task\` subagents{{else}} and tool calls{{/if}}: define helpers and clients once and reuse them instead of re-importing or re-reading. Rebuild state only after \`reset\`, a kernel restart, or a \`NameError\`/\`ReferenceError\`, and check a sentinel variable first so a re-run cannot duplicate side effects.
|
|
71
|
-
|
|
72
|
-
{{#if styleClaude}}<eval_first_batching>
|
|
73
|
-
Batch a step's independent calls in one cell with \`parallel(thunks)\`; write real code around them - loops, branches, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
74
|
-
{{#if monitor}}- Start long-running work (build, test run, deploy, or watch) through \`tool.monitor({ command, filter })\`, putting the decisive-line filter inside the same cell, then keep working until its event wakes the turn.{{/if}}
|
|
75
|
-
</eval_first_batching>{{/if}}{{#if styleGpt}}<gpt_eval_dialect>
|
|
76
|
-
GPT eval: batch a step's independent tool calls in one cell with \`tool.<name>(args)\` and \`parallel(thunks)\` and inspect every result.
|
|
77
|
-
{{#if monitor}}- A wait or a long run (build, test run, deploy, watch) starts through \`tool.monitor({ command, filter })\` in that same cell with the decisive-line filter; its event wakes the turn, so no cell sits on the wait and no child is spawned for it.
|
|
78
|
-
{{/if}}- Long cells detach on timeout and notify on completion; do not poll or re-run them.
|
|
79
|
-
- Keep every failed or missing item in the result verbatim and re-read truncated output before deciding.
|
|
80
|
-
</gpt_eval_dialect>{{/if}}{{#if styleCodex}}Route a step's independent lookups through one eval cell via \`parallel(thunks)\` and inspect every result.
|
|
81
|
-
- Loop or comprehend over file sets with \`read()\`/stdlib instead of reading files one call at a time; post-process \`tool.<name>()\` results programmatically.
|
|
82
|
-
- Wrap failable calls in try/except inside the cell and keep every failed item in the result verbatim; after two distinct failed strategies for the same fact, fall back to direct tool calls.
|
|
83
|
-
- Re-read truncated output before deciding on it.
|
|
84
|
-
{{#if monitor}}- Long-running build/test/deploy/watch work: start \`tool.monitor({ command, filter })\` with the decisive-line filter inside the same cell, then continue working until its event wakes the turn.{{/if}}{{/if}}{{#if styleKimi}}Put a step's independent calls into one cell with \`parallel(thunks)\`.
|
|
85
|
-
- Write real code around the calls - loops, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
86
|
-
{{#if monitor}}- Start long-running build, test run, deploy, or watch work with \`tool.monitor({ command, filter })\`, put the decisive-line filter inside the same cell, and keep working until its event wakes the turn.{{/if}}{{/if}}{{#if styleDefault}}Batch a step's independent calls in one cell with \`parallel(thunks)\`.
|
|
87
|
-
- Write real code around the calls - loops, branches, joins, a try/except per risky item - and keep every failed or missing item in the result verbatim; re-read truncated output before deciding.
|
|
88
|
-
{{#if monitor}}- Long-running build, test run, deploy, or watch work starts with \`tool.monitor({ command, filter })\`, with the decisive-line filter inside the same cell; keep working until its event wakes the turn.{{/if}}{{/if}}
|
|
89
|
-
{{#if hostLine}}
|
|
90
|
-
Host: {{hostLine}} — cells execute here. Size \`parallel(thunks)\` pools to its cores; \`tool.<name>()\` shell commands must fit this platform, even when the code you are writing targets another machine.
|
|
91
|
-
{{/if}}
|
|
92
|
-
|
|
93
|
-
\`language\`: {{#if py}}\`"py"\` IPython kernel{{/if}}{{#ifAll py js}}, {{/ifAll}}{{#if js}}\`"js"\` persistent JavaScript VM{{/if}}{{#if rb}}{{#ifAny py js}}, {{/ifAny}}\`"rb"\` persistent Ruby kernel{{/if}}{{#if jl}}{{#ifAny py js rb}}, {{/ifAny}}\`"jl"\` persistent Julia kernel{{/if}}.
|
|
94
|
-
|
|
95
|
-
A cell that outlives the foreground window detaches: it keeps its language kernel busy (another language can continue) and completes as one notification with its value or error and buffered output. Do not re-run a detached cell; read or cancel it with \`eval({ action: "peek", cell_id })\` / \`eval({ action: "stop", cell_id })\`.
|
|
96
|
-
|
|
97
|
-
{{#if py}}Python runs on a live event loop: use top-level \`await\`; \`asyncio.run(…)\` raises.{{/if}}
|
|
98
|
-
{{#if js}}{{#if jsBun}}JS runs in-process on Bun {{jsVersion}}: top-level \`await\`/\`return\` work; \`Bun.*\` builtins available, including \`new Bun.WebView()\` — a headless browser (navigate/click/evaluate/screenshot) to reach for before \`curl\` or a browser CLI when a page needs JS, a login, or a screenshot. Shell out through \`Bun.$\` or \`Bun.spawn\`, never \`Bun.spawnSync\`: a synchronous child blocks the worker, so a stop or timeout then loses every variable.{{#if bunSkillPath}} MUST READ the bun-1-4 skill at {{bunSkillPath}} before your first js cell — its builtins replace the npm packages you would otherwise install.{{/if}}{{else}}JS runs under Node.js worker: top-level \`await\`/\`return\` work; \`fetch\`/\`Buffer\` available.{{/if}}{{/if}}
|
|
99
|
-
{{#if rb}}Ruby: synchronous; helper options are keyword args{{#if spawns}} (e.g. \`output("id", limit: 2)\`){{/if}}; the last expression auto-displays unless it is \`nil\`, an assignment, or a definition (like IRB).{{/if}}
|
|
100
|
-
{{#if jl}}Julia: synchronous; helper options are standard keyword args{{#if spawns}} (e.g. \`output("id", limit=2)\`){{/if}}; the last expression auto-displays unless it is an assignment or a definition (like the Julia REPL).{{/if}}
|
|
101
|
-
On error, fix and re-run only the failing step; a normal error keeps state, while a timeout or stop message says whether the kernel restarted.
|
|
102
|
-
</instruction>
|
|
103
|
-
|
|
104
|
-
<prelude>
|
|
105
|
-
{{#ifAll py js}}Same helpers + arg order, both runtimes. Python: sync, options = trailing kwargs. JS: async/\`await\`able, options = ONE trailing object literal, never positional (extras throw).{{else}}{{#if py}}Sync; options = trailing kwargs.{{/if}}{{#if js}}Async/\`await\`able; options = ONE trailing object literal, never positional (extras throw).{{/if}}{{/ifAll}}{{#if rb}} Ruby: sync, options = trailing keyword args.{{/if}}{{#if jl}} Julia: sync, options = trailing keyword args.{{/if}}
|
|
106
|
-
\`\`\`
|
|
107
|
-
display(value) → None
|
|
108
|
-
Cell output. Images reach you only through display: pass a figure, image bytes, a tool result, or its \`images[i]\`.
|
|
109
|
-
print(value, ...) → None
|
|
110
|
-
Text output.
|
|
111
|
-
read(path, offset?=1, limit?=None) → str
|
|
112
|
-
File as text; offset/limit are 1-indexed lines. Accepts \`local://…\`.
|
|
113
|
-
write(path, content) → str
|
|
114
|
-
Write file (creates parents) → resolved path. \`local://…\` persists across turns/subagents.
|
|
115
|
-
env(key?=None, value?=None) → str | None | dict
|
|
116
|
-
No args → full env dict; one → value; two → set \`key=value\`.
|
|
117
|
-
{{#if spawns}}output(*ids, format?="raw", offset?=None, limit?=None) → str | dict | list[dict]
|
|
118
|
-
Task/agent output by id. Reads immediately: running tasks return their status; \`format\` \`"raw"\` = full, \`"tail"\` = trailing.
|
|
119
|
-
{{/if}}tool.<name>(args) → { text, images?, details?, hasError? }
|
|
120
|
-
Invoke any session tool; image results (e.g. \`tool.read\` on a png) arrive in \`images[i]\` as { mimeType, dataBase64 }.
|
|
121
|
-
tool_schema(name?) → dict
|
|
122
|
-
Parameter schema of a tool (omit \`name\` to list tool names); a failed \`tool.<name>()\` call also returns the expected parameters.
|
|
123
|
-
completion(prompt, model?="default", system?=None, schema?=None) → str | dict
|
|
124
|
-
Oneshot, stateless. \`model\`: \`"smol"\` fast | \`"default"\` session | \`"slow"\` most capable. \`schema\` (JSON-Schema) → parsed structured output.
|
|
125
|
-
{{#if spawns}}agent(prompt, agent?="{{spawnDefaultAgent}}", model?=None, label?=None, schema?=None, handle?=False) → str | dict
|
|
126
|
-
Run a subagent → final output. \`agent\` picks a discovered agent. \`schema\` as in completion(). \`handle\` → workflow node { text, output, handle: \`agent://<id>\`, id, agent } (parsed under \`data\` with \`schema\`).
|
|
127
|
-
{{/if}}parallel(thunks) → list
|
|
128
|
-
Thunks through a bounded pool (as wide as a \`task\` batch), input order kept; a throwing thunk propagates.
|
|
129
|
-
pipeline(items, ...stages) → list
|
|
130
|
-
Map items through one-arg stages with a barrier between stages; each stage receives the previous stage's result.
|
|
131
|
-
log(message) → None
|
|
132
|
-
Progress line above the status tree.
|
|
133
|
-
phase(title) → None
|
|
134
|
-
Phase grouping subsequent status lines.
|
|
135
|
-
\`\`\`
|
|
136
|
-
</prelude>
|
|
137
|
-
{{#if spawns}}
|
|
138
|
-
<workflow>
|
|
139
|
-
Multi-agent work is an acyclic graph in code: one \`agent(…)\` node per step with its handle option ({{#if py}}\`handle=True\`{{/if}}{{#ifAll py js}} / {{/ifAll}}{{#if js}}\`{ handle: true }\`{{/if}}{{#if jl}}{{#ifAny py js}} / {{/ifAny}}\`handle=true\`{{/if}}), \`parallel(thunks)\` for independent nodes, \`pipeline(items, *stages)\` for staged waves. Pass an upstream node's \`handle\` or \`output\` (or a \`write("local://…")\` URI for bulk text) into dependents instead of re-inlining transcripts, and wrap risky nodes in try/except so a failure aborts only its subtree.
|
|
140
|
-
</workflow>
|
|
141
|
-
{{/if}}
|
|
142
|
-
`;
|
|
143
71
|
|
|
144
72
|
export function buildEvalPrompt(
|
|
145
73
|
enabled: EnabledLanguages,
|
|
@@ -167,6 +95,7 @@ export function buildEvalPrompt(
|
|
|
167
95
|
jsBun: options.jsRuntime?.name === "bun",
|
|
168
96
|
jsVersion: options.jsRuntime?.version ?? "",
|
|
169
97
|
bunSkillPath: options.bunSkillPath ?? "",
|
|
98
|
+
runBudgetSeconds: String(options.runBudgetSeconds ?? DEFAULT_RUN_BUDGET_SECONDS),
|
|
170
99
|
};
|
|
171
100
|
const description = renderTemplate(EVAL_PROMPT_TEMPLATE, context)
|
|
172
101
|
.replace(/\n{3,}/g, "\n\n")
|
|
@@ -197,7 +126,7 @@ const BATCHING_GUIDELINES: Record<EvalEmphasisStyle, string> = {
|
|
|
197
126
|
claude:
|
|
198
127
|
"Prefer eval for a step's independent calls: one cell runs them together and keeps every failure in its result.",
|
|
199
128
|
codex: "Route a step's independent calls through one eval cell and inspect every result; a direct tool call is right when one call is sufficient.",
|
|
200
|
-
gpt: "Use eval to batch a step's independent tool calls in one cell and inspect every result; long cells detach on
|
|
129
|
+
gpt: "Use eval to batch a step's independent tool calls in one cell and inspect every result; long cells detach on their own and notify on completion, so do not poll.",
|
|
201
130
|
kimi: "Put a step's independent calls into one eval cell with parallel(thunks) and keep every failed item in the result.",
|
|
202
131
|
};
|
|
203
132
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { TimeoutPauseHandle } from "./idle-timeout.ts";
|
|
2
|
+
|
|
3
|
+
export interface RunBudgetEvent {
|
|
4
|
+
readonly cellId: string;
|
|
5
|
+
readonly budgetMs: number;
|
|
6
|
+
readonly error: Error;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface RunBudgetOptions {
|
|
10
|
+
readonly cellId: string;
|
|
11
|
+
readonly budgetMs: number;
|
|
12
|
+
readonly onExhausted: (event: RunBudgetEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function runBudgetError(cellId: string, budgetSeconds: number): Error {
|
|
16
|
+
const error = new Error(
|
|
17
|
+
`Eval cell ${cellId} exhausted its ${budgetSeconds}s run budget (own execution time; host tool calls excluded) and was killed.`,
|
|
18
|
+
);
|
|
19
|
+
error.name = "TimeoutError";
|
|
20
|
+
return error;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Bounds a cell's own execution time. Unlike the idle watchdog it accumulates across host tool
|
|
25
|
+
* calls instead of restarting after each one, and time spent parked on a bridge call is never
|
|
26
|
+
* charged, so a long `agent()` wait survives while a runaway loop or child process does not.
|
|
27
|
+
*/
|
|
28
|
+
export class RunBudget implements TimeoutPauseHandle {
|
|
29
|
+
readonly budgetMs: number;
|
|
30
|
+
readonly #cellId: string;
|
|
31
|
+
readonly #onExhausted: (event: RunBudgetEvent) => void;
|
|
32
|
+
#chargedMs = 0;
|
|
33
|
+
#runningSinceMs: number | undefined;
|
|
34
|
+
#pauseDepth = 0;
|
|
35
|
+
#timer: ReturnType<typeof setTimeout> | undefined;
|
|
36
|
+
#settled = false;
|
|
37
|
+
|
|
38
|
+
constructor(options: RunBudgetOptions) {
|
|
39
|
+
this.#cellId = options.cellId;
|
|
40
|
+
this.budgetMs = Math.max(1, Math.floor(options.budgetMs));
|
|
41
|
+
this.#onExhausted = options.onExhausted;
|
|
42
|
+
this.#start();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get consumedMs(): number {
|
|
46
|
+
const running = this.#runningSinceMs === undefined ? 0 : Date.now() - this.#runningSinceMs;
|
|
47
|
+
return this.#chargedMs + running;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
pause(): void {
|
|
51
|
+
if (this.#settled) return;
|
|
52
|
+
this.#pauseDepth++;
|
|
53
|
+
if (this.#pauseDepth !== 1) return;
|
|
54
|
+
this.#chargedMs = this.consumedMs;
|
|
55
|
+
this.#runningSinceMs = undefined;
|
|
56
|
+
this.#clearTimer();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
resume(): void {
|
|
60
|
+
if (this.#settled || this.#pauseDepth === 0) return;
|
|
61
|
+
this.#pauseDepth--;
|
|
62
|
+
if (this.#pauseDepth > 0) return;
|
|
63
|
+
this.#start();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
dispose(): void {
|
|
67
|
+
if (this.#settled) return;
|
|
68
|
+
this.#settled = true;
|
|
69
|
+
this.#clearTimer();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#start(): void {
|
|
73
|
+
this.#runningSinceMs = Date.now();
|
|
74
|
+
this.#arm(this.budgetMs - this.#chargedMs);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#arm(delayMs: number): void {
|
|
78
|
+
this.#clearTimer();
|
|
79
|
+
const timer = setTimeout(() => this.#expire(), Math.max(0, delayMs));
|
|
80
|
+
timer.unref?.();
|
|
81
|
+
this.#timer = timer;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#clearTimer(): void {
|
|
85
|
+
if (this.#timer === undefined) return;
|
|
86
|
+
clearTimeout(this.#timer);
|
|
87
|
+
this.#timer = undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
#expire(): void {
|
|
91
|
+
this.#timer = undefined;
|
|
92
|
+
if (this.#settled || this.#pauseDepth > 0) return;
|
|
93
|
+
const remainingMs = this.budgetMs - this.consumedMs;
|
|
94
|
+
if (remainingMs > 0) {
|
|
95
|
+
this.#arm(remainingMs);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.#settled = true;
|
|
99
|
+
this.#chargedMs = this.consumedMs;
|
|
100
|
+
this.#runningSinceMs = undefined;
|
|
101
|
+
this.#onExhausted({
|
|
102
|
+
cellId: this.#cellId,
|
|
103
|
+
budgetMs: this.budgetMs,
|
|
104
|
+
error: runBudgetError(this.#cellId, this.budgetMs / 1_000),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { TimeoutPauseHandle } from "../timeouts/idle-timeout.ts";
|
|
2
|
+
import { RunBudget } from "../timeouts/run-budget.ts";
|
|
3
|
+
|
|
4
|
+
export type CellDeadlineKind = "hard-limit" | "run-budget";
|
|
5
|
+
|
|
6
|
+
export interface CellDeadlineExpiry {
|
|
7
|
+
readonly kind: CellDeadlineKind;
|
|
8
|
+
readonly error: Error;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CellDeadlinesOptions {
|
|
12
|
+
readonly cellId: string;
|
|
13
|
+
readonly hardLimitSeconds: number;
|
|
14
|
+
readonly runBudgetSeconds: number;
|
|
15
|
+
readonly onExpire: (expiry: CellDeadlineExpiry) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function hardLimitError(cellId: string, hardLimitSeconds: number): Error {
|
|
19
|
+
const error = new Error(`Eval cell ${cellId} was killed at the ${hardLimitSeconds}s hard limit.`);
|
|
20
|
+
error.name = "TimeoutError";
|
|
21
|
+
return error;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The two kill deadlines every cell carries from creation to settlement, detached or not: the
|
|
26
|
+
* wall-clock hard limit, which nothing pauses, and the run budget, which charges only the cell's
|
|
27
|
+
* own execution time and is paused while a host bridge call is in flight. Whichever expires first
|
|
28
|
+
* ends the cell; the other is disarmed with it.
|
|
29
|
+
*/
|
|
30
|
+
export class CellDeadlines implements TimeoutPauseHandle {
|
|
31
|
+
readonly hardLimitSeconds: number;
|
|
32
|
+
readonly runBudgetSeconds: number;
|
|
33
|
+
readonly #onExpire: (expiry: CellDeadlineExpiry) => void;
|
|
34
|
+
readonly #runBudget: RunBudget;
|
|
35
|
+
#hardLimitTimer: ReturnType<typeof setTimeout> | undefined;
|
|
36
|
+
#settled = false;
|
|
37
|
+
|
|
38
|
+
constructor(options: CellDeadlinesOptions) {
|
|
39
|
+
this.hardLimitSeconds = options.hardLimitSeconds;
|
|
40
|
+
this.runBudgetSeconds = options.runBudgetSeconds;
|
|
41
|
+
this.#onExpire = options.onExpire;
|
|
42
|
+
const hardLimitTimer = setTimeout(
|
|
43
|
+
() => this.#expire({ kind: "hard-limit", error: hardLimitError(options.cellId, options.hardLimitSeconds) }),
|
|
44
|
+
options.hardLimitSeconds * 1_000,
|
|
45
|
+
);
|
|
46
|
+
hardLimitTimer.unref?.();
|
|
47
|
+
this.#hardLimitTimer = hardLimitTimer;
|
|
48
|
+
this.#runBudget = new RunBudget({
|
|
49
|
+
cellId: options.cellId,
|
|
50
|
+
budgetMs: options.runBudgetSeconds * 1_000,
|
|
51
|
+
onExhausted: ({ error }) => this.#expire({ kind: "run-budget", error }),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
pause(): void {
|
|
56
|
+
this.#runBudget.pause();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
resume(): void {
|
|
60
|
+
this.#runBudget.resume();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
clear(): void {
|
|
64
|
+
if (this.#settled) return;
|
|
65
|
+
this.#settled = true;
|
|
66
|
+
if (this.#hardLimitTimer !== undefined) clearTimeout(this.#hardLimitTimer);
|
|
67
|
+
this.#hardLimitTimer = undefined;
|
|
68
|
+
this.#runBudget.dispose();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#expire(expiry: CellDeadlineExpiry): void {
|
|
72
|
+
if (this.#settled) return;
|
|
73
|
+
this.clear();
|
|
74
|
+
this.#onExpire(expiry);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -13,21 +13,28 @@ export const defaultTimeoutFactory: EvalTimeoutFactory = {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
export interface CellIdleWatchdogOptions {
|
|
17
|
+
readonly timeoutMs: number;
|
|
18
|
+
/** Caps how long a host-bridge pause may suspend the idle watchdog (the foreground window for a detaching cell). */
|
|
19
|
+
readonly maxPauseGraceMs: number;
|
|
20
|
+
readonly onTimeout: (error: Error) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
export interface CellExecutionOptions {
|
|
17
24
|
readonly callerSignal: AbortSignal;
|
|
18
25
|
readonly cellId: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* Caps how long a host-bridge pause may suspend the idle watchdog. When the cell will detach on
|
|
22
|
-
* timeout this is set to the foreground window so a bridge-parked cell still frees the turn at the
|
|
23
|
-
* window; left undefined (error mode) it keeps the idle-timeout default grace.
|
|
24
|
-
*/
|
|
25
|
-
readonly maxPauseGraceMs?: number;
|
|
26
|
+
/** Interactive calls detach at this idle watchdog; a call that never detaches is bounded by its deadlines alone. */
|
|
27
|
+
readonly idle?: CellIdleWatchdogOptions;
|
|
26
28
|
readonly timeoutFactory: EvalTimeoutFactory;
|
|
27
|
-
readonly onTimeout: (error: Error) => void;
|
|
28
29
|
readonly onAbort: (error: Error) => void;
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
const NO_WATCHDOG: TimeoutPauseHandle & { dispose(): void } = {
|
|
33
|
+
pause(): void {},
|
|
34
|
+
resume(): void {},
|
|
35
|
+
dispose(): void {},
|
|
36
|
+
};
|
|
37
|
+
|
|
31
38
|
export class CellExecution {
|
|
32
39
|
readonly #callerSignal: AbortSignal;
|
|
33
40
|
readonly #onAbort: (error: Error) => void;
|
|
@@ -49,12 +56,16 @@ export class CellExecution {
|
|
|
49
56
|
this.#detachedPromise = new Promise<void>((resolve) => {
|
|
50
57
|
this.#resolveDetached = resolve;
|
|
51
58
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
const idle = options.idle;
|
|
60
|
+
this.#watchdog =
|
|
61
|
+
idle === undefined
|
|
62
|
+
? NO_WATCHDOG
|
|
63
|
+
: options.timeoutFactory.create({
|
|
64
|
+
cellId: options.cellId,
|
|
65
|
+
timeoutMs: idle.timeoutMs,
|
|
66
|
+
maxPauseGraceMs: idle.maxPauseGraceMs,
|
|
67
|
+
onTimeout: ({ error }) => idle.onTimeout(error),
|
|
68
|
+
});
|
|
58
69
|
this.#callerSignal.addEventListener("abort", this.#handleCallerAbort, {
|
|
59
70
|
once: true,
|
|
60
71
|
});
|
|
@@ -15,6 +15,8 @@ export interface EvalDetachedCellSnapshot {
|
|
|
15
15
|
readonly interruptNote?: string;
|
|
16
16
|
/** Set only when the wall-clock kill deadline ended this cell. */
|
|
17
17
|
readonly hardLimitSeconds?: number;
|
|
18
|
+
/** Set only when the cell's own execution time exhausted its run budget. */
|
|
19
|
+
readonly runBudgetSeconds?: number;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export interface EvalDetachedCellNotification {
|
|
@@ -38,6 +40,8 @@ export interface EvalDetachedCellManagerOptions {
|
|
|
38
40
|
readonly notifier?: EvalDetachedCellNotifier;
|
|
39
41
|
/** Wall-clock kill deadline in seconds; defaults to the bash-parity 1800s. */
|
|
40
42
|
readonly hardLimitSeconds?: number;
|
|
43
|
+
/** Kill deadline for a cell's own execution time in seconds; a per-call `timeout` replaces it. Defaults to 300s. */
|
|
44
|
+
readonly runBudgetSeconds?: number;
|
|
41
45
|
readonly onStatusChange?: (entries: readonly EvalDetachedCellStatusEntry[]) => void;
|
|
42
46
|
/** Receives a full per-source liveness snapshot on every detached-cell transition; used by the goal builtin. */
|
|
43
47
|
readonly onWakeSourceState?: (state: WakeSourceState) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentToolResult } from "@code-yeongyu/senpi";
|
|
2
|
-
import { DEFAULT_HARD_LIMIT_SECONDS } from "../config/settings.ts";
|
|
2
|
+
import { DEFAULT_HARD_LIMIT_SECONDS, DEFAULT_RUN_BUDGET_SECONDS } from "../config/settings.ts";
|
|
3
3
|
import type { WakeSourceState } from "../extension/wake-source-state.ts";
|
|
4
|
+
import { type CellDeadlineExpiry, CellDeadlines } from "./cell-deadlines.ts";
|
|
4
5
|
import type {
|
|
5
6
|
EvalDetachedCellManagerOptions,
|
|
6
7
|
EvalDetachedCellSnapshot,
|
|
@@ -46,18 +47,15 @@ type ManagedCell = {
|
|
|
46
47
|
liveResult: LiveResultProvider | undefined;
|
|
47
48
|
terminalResult: AgentToolResult<EvalToolDetails> | undefined;
|
|
48
49
|
notificationQueued: boolean;
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
readonly deadlines: CellDeadlines;
|
|
51
|
+
readonly hardLimitSeconds: number;
|
|
52
|
+
readonly runBudgetSeconds: number;
|
|
51
53
|
hardLimited: boolean;
|
|
52
|
-
|
|
54
|
+
runBudgetExhausted: boolean;
|
|
55
|
+
/** Foreground killer: the still-awaited CellExecution owns interrupting and rejecting its own call; bound from creation so a deadline firing during kernel boot still ends it. */
|
|
56
|
+
onKill: ((error: Error) => void) | undefined;
|
|
53
57
|
};
|
|
54
58
|
|
|
55
|
-
export function hardLimitError(cellId: string, hardLimitSeconds: number): Error {
|
|
56
|
-
const error = new Error(`Eval cell ${cellId} was killed at the ${hardLimitSeconds}s hard limit.`);
|
|
57
|
-
error.name = "TimeoutError";
|
|
58
|
-
return error;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
59
|
export class EvalDetachedCellManager {
|
|
62
60
|
readonly #artifactsDir: string | undefined;
|
|
63
61
|
readonly #onStatusChange: ((entries: readonly EvalDetachedCellStatusEntry[]) => void) | undefined;
|
|
@@ -67,6 +65,7 @@ export class EvalDetachedCellManager {
|
|
|
67
65
|
readonly #notificationQueue: DetachedNotificationQueue;
|
|
68
66
|
readonly #now: () => number;
|
|
69
67
|
readonly #hardLimitSeconds: number;
|
|
68
|
+
readonly #runBudgetSeconds: number;
|
|
70
69
|
|
|
71
70
|
constructor(options: EvalDetachedCellManagerOptions = {}) {
|
|
72
71
|
this.#artifactsDir = options.artifactsDir;
|
|
@@ -75,14 +74,18 @@ export class EvalDetachedCellManager {
|
|
|
75
74
|
this.#notificationQueue = new DetachedNotificationQueue(options.notifier);
|
|
76
75
|
this.#now = options.now ?? Date.now;
|
|
77
76
|
this.#hardLimitSeconds = options.hardLimitSeconds ?? DEFAULT_HARD_LIMIT_SECONDS;
|
|
77
|
+
this.#runBudgetSeconds = options.runBudgetSeconds ?? DEFAULT_RUN_BUDGET_SECONDS;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
create(cellId: string, input: EvalToolInput): ManagedCell {
|
|
80
|
+
create(cellId: string, input: EvalToolInput, onKill?: (error: Error) => void): ManagedCell {
|
|
81
81
|
const existing = this.#cells.get(cellId);
|
|
82
82
|
if (existing !== undefined) {
|
|
83
83
|
if (detachedCellIsActive(existing.state)) throw activeDetachedCellReuseError(existing);
|
|
84
84
|
this.#cells.delete(cellId);
|
|
85
85
|
}
|
|
86
|
+
// An explicit longer per-call timeout raises the deadline, mirroring bash keeping explicit timeouts.
|
|
87
|
+
const hardLimitSeconds = Math.max(this.#hardLimitSeconds, input.timeout ?? 0);
|
|
88
|
+
const runBudgetSeconds = input.timeout ?? this.#runBudgetSeconds;
|
|
86
89
|
const cell: ManagedCell = {
|
|
87
90
|
cellId,
|
|
88
91
|
input,
|
|
@@ -98,15 +101,23 @@ export class EvalDetachedCellManager {
|
|
|
98
101
|
liveResult: undefined,
|
|
99
102
|
terminalResult: undefined,
|
|
100
103
|
notificationQueued: false,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
deadlines: new CellDeadlines({
|
|
105
|
+
cellId,
|
|
106
|
+
hardLimitSeconds,
|
|
107
|
+
runBudgetSeconds,
|
|
108
|
+
onExpire: (expiry) => {
|
|
109
|
+
const managed = this.#cells.get(cellId);
|
|
110
|
+
if (managed !== undefined) void this.#expireDeadline(managed, expiry);
|
|
111
|
+
},
|
|
112
|
+
}),
|
|
113
|
+
hardLimitSeconds,
|
|
114
|
+
runBudgetSeconds,
|
|
104
115
|
hardLimited: false,
|
|
105
|
-
|
|
116
|
+
runBudgetExhausted: false,
|
|
117
|
+
onKill,
|
|
106
118
|
terminal: Promise.withResolvers<EvalDetachedCellSnapshot>(),
|
|
107
119
|
};
|
|
108
120
|
this.#cells.set(cellId, cell);
|
|
109
|
-
this.#armHardLimit(cell);
|
|
110
121
|
return cell;
|
|
111
122
|
}
|
|
112
123
|
|
|
@@ -114,16 +125,24 @@ export class EvalDetachedCellManager {
|
|
|
114
125
|
cell: ManagedCell,
|
|
115
126
|
kernel: EvalKernel,
|
|
116
127
|
liveResult: LiveResultProvider,
|
|
117
|
-
|
|
118
|
-
onHardLimit?: (error: Error) => void,
|
|
128
|
+
onKill?: (error: Error) => void,
|
|
119
129
|
): void {
|
|
120
130
|
if (cell.state !== "running") return;
|
|
121
|
-
cell.
|
|
131
|
+
cell.onKill = onKill ?? cell.onKill;
|
|
122
132
|
cell.kernel = kernel;
|
|
123
133
|
cell.liveResult = liveResult;
|
|
124
134
|
cell.canDetach = true;
|
|
125
135
|
}
|
|
126
136
|
|
|
137
|
+
/** A host bridge call is in flight for this cell; its run budget stops charging until {@link resume}. */
|
|
138
|
+
pause(cell: ManagedCell): void {
|
|
139
|
+
cell.deadlines.pause();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
resume(cell: ManagedCell): void {
|
|
143
|
+
cell.deadlines.resume();
|
|
144
|
+
}
|
|
145
|
+
|
|
127
146
|
detach(cell: ManagedCell): boolean {
|
|
128
147
|
if (!cell.canDetach || !allowsDetachedCellTransition(cell.state, "detached")) return false;
|
|
129
148
|
cell.state = "detached";
|
|
@@ -184,7 +203,7 @@ export class EvalDetachedCellManager {
|
|
|
184
203
|
result: AgentToolResult<EvalToolDetails>,
|
|
185
204
|
): boolean {
|
|
186
205
|
if (!allowsDetachedCellTransition(cell.state, state)) return false;
|
|
187
|
-
|
|
206
|
+
cell.deadlines.clear();
|
|
188
207
|
cell.state = state;
|
|
189
208
|
cell.terminalResult = result;
|
|
190
209
|
cell.liveResult = undefined;
|
|
@@ -207,32 +226,20 @@ export class EvalDetachedCellManager {
|
|
|
207
226
|
return true;
|
|
208
227
|
}
|
|
209
228
|
|
|
210
|
-
#armHardLimit(cell: ManagedCell): void {
|
|
211
|
-
const timer = setTimeout(() => void this.#expireHardLimit(cell), cell.hardLimitSeconds * 1_000);
|
|
212
|
-
timer.unref?.();
|
|
213
|
-
cell.hardLimitTimer = timer;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
#clearHardLimit(cell: ManagedCell): void {
|
|
217
|
-
if (cell.hardLimitTimer === undefined) return;
|
|
218
|
-
clearTimeout(cell.hardLimitTimer);
|
|
219
|
-
cell.hardLimitTimer = undefined;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
229
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
230
|
+
* A kill deadline fired (see {@link CellDeadlines}). A foreground cell is killed through the
|
|
231
|
+
* CellExecution that still awaits it; a detached cell is cancelled here, which interrupts its kernel.
|
|
225
232
|
*/
|
|
226
|
-
async #
|
|
233
|
+
async #expireDeadline(cell: ManagedCell, expiry: CellDeadlineExpiry): Promise<void> {
|
|
227
234
|
if (!detachedCellIsActive(cell.state)) return;
|
|
228
|
-
const foreground = cell.state === "running" && cell.
|
|
229
|
-
cell.hardLimited =
|
|
230
|
-
|
|
235
|
+
const foreground = cell.state === "running" && cell.onKill !== undefined;
|
|
236
|
+
cell.hardLimited = expiry.kind === "hard-limit";
|
|
237
|
+
cell.runBudgetExhausted = expiry.kind === "run-budget";
|
|
231
238
|
if (foreground) {
|
|
232
|
-
if (this.#settle(cell, "cancelled", currentDetachedResult(cell))) cell.
|
|
239
|
+
if (this.#settle(cell, "cancelled", currentDetachedResult(cell))) cell.onKill?.(expiry.error);
|
|
233
240
|
return;
|
|
234
241
|
}
|
|
235
|
-
await this.#cancel(cell, error.message);
|
|
242
|
+
await this.#cancel(cell, expiry.error.message);
|
|
236
243
|
}
|
|
237
244
|
|
|
238
245
|
async #cancel(cell: ManagedCell, reason: string): Promise<void> {
|
|
@@ -69,6 +69,8 @@ function textContent(cell: EvalDetachedCellSnapshot): string {
|
|
|
69
69
|
|
|
70
70
|
function outcomeOf(cell: EvalDetachedCellSnapshot): string {
|
|
71
71
|
if (cell.hardLimitSeconds !== undefined) return `was killed at the ${cell.hardLimitSeconds}s hard limit`;
|
|
72
|
+
if (cell.runBudgetSeconds !== undefined)
|
|
73
|
+
return `was killed after exhausting its ${cell.runBudgetSeconds}s run budget (own execution time; host tool calls excluded)`;
|
|
72
74
|
if (cell.state === "completed") return "completed";
|
|
73
75
|
if (cell.state === "cancelled") return "cancelled";
|
|
74
76
|
return "failed";
|