@xopcai/xopc 0.0.102 → 0.0.104
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/README.md +8 -5
- package/README.zh-CN.md +8 -5
- package/dist/_virtual/_rolldown/runtime.js +2 -3
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.d.ts +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js.map +1 -1
- package/dist/extensions/feishu/src/adapters/gateway-setup.d.ts +2 -0
- package/dist/extensions/feishu/src/adapters/gateway-setup.js +225 -0
- package/dist/extensions/feishu/src/adapters/gateway-setup.js.map +1 -0
- package/dist/extensions/feishu/src/index.d.ts +8 -1
- package/dist/extensions/feishu/src/index.js +14 -1
- package/dist/extensions/feishu/src/index.js.map +1 -0
- package/dist/extensions/feishu/src/outbound/outbound-adapter.js +1 -1
- package/dist/extensions/feishu/src/plugin.d.ts +2 -1
- package/dist/extensions/feishu/src/plugin.js +2 -0
- package/dist/extensions/feishu/src/plugin.js.map +1 -1
- package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -1
- package/dist/extensions/feishu/src/transport/webhook/monitor.js +2 -2
- package/dist/extensions/feishu/src/transport/webhook/monitor.js.map +1 -1
- package/dist/extensions/feishu/xopc.extension.json +66 -1
- package/dist/extensions/telegram/src/adapters/gateway-setup.d.ts +2 -0
- package/dist/extensions/telegram/src/adapters/gateway-setup.js +146 -0
- package/dist/extensions/telegram/src/adapters/gateway-setup.js.map +1 -0
- package/dist/extensions/telegram/src/adapters/security-adapter.js +1 -1
- package/dist/extensions/telegram/src/command-handler.js +1 -2
- package/dist/extensions/telegram/src/command-handler.js.map +1 -1
- package/dist/extensions/telegram/src/config-schema.js +2 -2
- package/dist/extensions/telegram/src/config-schema.js.map +1 -1
- package/dist/extensions/telegram/src/doctor.d.ts +1 -0
- package/dist/extensions/telegram/src/doctor.js +68 -0
- package/dist/extensions/telegram/src/doctor.js.map +1 -1
- package/dist/extensions/telegram/src/index.d.ts +8 -1
- package/dist/extensions/telegram/src/index.js +15 -2
- package/dist/extensions/telegram/src/index.js.map +1 -0
- package/dist/extensions/telegram/src/plugin.d.ts +13 -5
- package/dist/extensions/telegram/src/plugin.js +32 -12
- package/dist/extensions/telegram/src/plugin.js.map +1 -1
- package/dist/extensions/telegram/src/proxy-fetch.js +22 -5
- package/dist/extensions/telegram/src/proxy-fetch.js.map +1 -1
- package/dist/extensions/telegram/src/send-options.js +8 -5
- package/dist/extensions/telegram/src/send-options.js.map +1 -1
- package/dist/extensions/telegram/xopc.extension.json +412 -5
- package/dist/extensions/weixin/src/adapters/onboard-cli.js +2 -2
- package/dist/extensions/weixin/src/adapters/onboard-cli.js.map +1 -1
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/index.d.ts +8 -0
- package/dist/extensions/weixin/src/index.js +12 -1
- package/dist/extensions/weixin/src/index.js.map +1 -0
- package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
- package/dist/extensions/weixin/src/plugin.d.ts +2 -1
- package/dist/extensions/weixin/src/plugin.js +77 -2
- package/dist/extensions/weixin/src/plugin.js.map +1 -1
- package/dist/extensions/weixin/xopc.extension.json +52 -0
- package/dist/gateway/static/root/assets/agents-CvsBrBfi.js +396 -0
- package/dist/gateway/static/root/assets/{apps-page-Uv4kOmDE.js → apps-page-L-IwQTe0.js} +1 -1
- package/dist/gateway/static/root/assets/browser-BLJWD7WI.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-D95KuPeP.js +1 -0
- package/dist/gateway/static/root/assets/cron-page-CfkWXDAI.js +1 -0
- package/dist/gateway/static/root/assets/{dist-DH4IuRV0.js → dist-C6vclgEL.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BNkhvRQW.js → extension-debug-page-D4JYAbsX.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CcIGQah2.js → extension-page-_T62gi6e.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CkJbjyM-.js +1 -0
- package/dist/gateway/static/root/assets/{fetch-drJUxxKP.js → fetch-B5aiIguv.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-startup-retry-DqmLXhs6.js +1 -0
- package/dist/gateway/static/root/assets/heartbeat-config-api-HwJV1K_Y.js +1 -0
- package/dist/gateway/static/root/assets/index-BPYKW7FB.css +1 -0
- package/dist/gateway/static/root/assets/index-DvTb6wNR.js +4845 -0
- package/dist/gateway/static/root/assets/{logs-page-CiG0m81R.js → logs-page-DsjtTjBy.js} +2 -2
- package/dist/gateway/static/root/assets/{note-detail-page-DG3DVFTf.js → note-detail-page-B2V7RhgD.js} +43 -43
- package/dist/gateway/static/root/assets/{note-time-DjlllCF3.js → note-time-BG8GCTr4.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-xrcVBQ6Z.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-S-QUvhul.js +1 -0
- package/dist/gateway/static/root/assets/sessions-page-CrQer6Au.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DujQl9c7.js +2 -0
- package/dist/gateway/static/root/assets/{settings-form-section-C3_sEFfD.js → settings-form-section-r1V7dRV6.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-C9nrONQ2.js +3 -0
- package/dist/gateway/static/root/assets/share-preview-page-DOFy0FNt.js +2 -0
- package/dist/gateway/static/root/assets/skills-page-DmTsrs_a.js +2 -0
- package/dist/gateway/static/root/assets/{theme-store-B6KXPHgK.js → theme-store-Bo3j5Ovv.js} +1 -1
- package/dist/gateway/static/root/assets/url-WgQIjFZu.js +3 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-AjmUAlEQ.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-page.utils-g57BRfEd.js → workflow-page.utils-DLEJ92gK.js} +1 -1
- package/dist/gateway/static/root/assets/workflows-page-BnjjKrM1.js +27 -0
- package/dist/gateway/static/root/index.html +6 -5
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +18 -6
- package/dist/src/agent/agent-manager.js +60 -35
- package/dist/src/agent/agent-manager.js.map +1 -1
- package/dist/src/agent/builtin-agent-ids.d.ts +2 -0
- package/dist/src/agent/builtin-agent-ids.js +17 -0
- package/dist/src/agent/builtin-agent-ids.js.map +1 -0
- package/dist/src/agent/child-agent-factory.d.ts +4 -0
- package/dist/src/agent/child-agent-factory.js +28 -8
- package/dist/src/agent/child-agent-factory.js.map +1 -1
- package/dist/src/agent/context/workspace-seed.js +1 -1
- package/dist/src/agent/context/workspace-templates/AGENTS.md +23 -184
- package/dist/src/agent/embedded/run-turn.js +8 -2
- package/dist/src/agent/embedded/run-turn.js.map +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
- package/dist/src/agent/embedded/subscribe-session.js +33 -51
- package/dist/src/agent/embedded/subscribe-session.js.map +1 -1
- package/dist/src/agent/embedded/types.d.ts +36 -35
- package/dist/src/agent/fallback/candidates.js +1 -1
- package/dist/src/agent/fallback/candidates.js.map +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +2 -2
- package/dist/src/agent/inbound/attachment-pipeline.js.map +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +24 -5
- package/dist/src/agent/inbound/turn-dispatcher.js.map +1 -1
- package/dist/src/agent/models/manager.d.ts +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/models/manager.js.map +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.d.ts +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.js +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.js.map +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +4 -0
- package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js.map +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +35 -18
- package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
- package/dist/src/agent/service-inbound-utils.d.ts +0 -1
- package/dist/src/agent/service-inbound-utils.js +1 -17
- package/dist/src/agent/service-inbound-utils.js.map +1 -1
- package/dist/src/agent/service.d.ts +4 -4
- package/dist/src/agent/service.js +27 -15
- package/dist/src/agent/service.js.map +1 -1
- package/dist/src/agent/session/session-config-service.d.ts +1 -0
- package/dist/src/agent/session/session-config-service.js +9 -1
- package/dist/src/agent/session/session-config-service.js.map +1 -1
- package/dist/src/agent/session/session-inspector.d.ts +2 -1
- package/dist/src/agent/session/session-inspector.js +4 -0
- package/dist/src/agent/session/session-inspector.js.map +1 -1
- package/dist/src/agent/skills/config.js +1 -3
- package/dist/src/agent/skills/config.js.map +1 -1
- package/dist/src/agent/skills/format-skills-prompt.d.ts +1 -0
- package/dist/src/agent/skills/format-skills-prompt.js +3 -2
- package/dist/src/agent/skills/format-skills-prompt.js.map +1 -1
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/skills/index.js +20 -5
- package/dist/src/agent/skills/index.js.map +1 -1
- package/dist/src/agent/skills/installer.js +14 -27
- package/dist/src/agent/skills/installer.js.map +1 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +11 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js.map +1 -1
- package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js +18 -4
- package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js.map +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +11 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js.map +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js.map +1 -1
- package/dist/src/agent/skills/skill-manager.d.ts +4 -1
- package/dist/src/agent/skills/skill-manager.js +3 -3
- package/dist/src/agent/skills/skill-manager.js.map +1 -1
- package/dist/src/agent/skills/skill-view-path.d.ts +1 -17
- package/dist/src/agent/skills/skill-view-path.js +3 -66
- package/dist/src/agent/skills/skill-view-path.js.map +1 -1
- package/dist/src/agent/skills/test-framework.js +2 -3
- package/dist/src/agent/skills/test-framework.js.map +1 -1
- package/dist/src/agent/streaming/reasoning-visibility-sse.js +1 -0
- package/dist/src/agent/streaming/reasoning-visibility-sse.js.map +1 -1
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -0
- package/{skills/browser/SKILL.md → dist/src/agent/tool-manuals/browser.js} +51 -54
- package/dist/src/agent/tool-manuals/browser.js.map +1 -0
- package/dist/src/agent/tool-manuals/index.d.ts +10 -0
- package/dist/src/agent/tool-manuals/index.js +28 -0
- package/dist/src/agent/tool-manuals/index.js.map +1 -0
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +1 -1
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js.map +1 -1
- package/dist/src/agent/tools/factory.js +7 -5
- package/dist/src/agent/tools/factory.js.map +1 -1
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +5 -4
- package/dist/src/agent/tools/send-media.js +1 -2
- package/dist/src/agent/tools/send-media.js.map +1 -1
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/shell.js +1 -1
- package/dist/src/agent/tools/skills-tools.js +37 -8
- package/dist/src/agent/tools/skills-tools.js.map +1 -1
- package/dist/src/agent/tools/tool-manual-tool.d.ts +6 -0
- package/dist/src/agent/tools/tool-manual-tool.js +34 -0
- package/dist/src/agent/tools/tool-manual-tool.js.map +1 -0
- package/dist/src/agent/tools/web-extract.js +2 -2
- package/dist/src/agent/tools/web.js +1 -1
- package/dist/src/agent/workflow/catalog.d.ts +7 -2
- package/dist/src/agent/workflow/catalog.js +66 -25
- package/dist/src/agent/workflow/catalog.js.map +1 -1
- package/dist/src/agent/workflow/subagent-runner.d.ts +3 -0
- package/dist/src/agent/workflow/subagent-runner.js +50 -4
- package/dist/src/agent/workflow/subagent-runner.js.map +1 -1
- package/dist/src/agent/workflow/types.d.ts +10 -0
- package/dist/src/auth/credentials.d.ts +7 -0
- package/dist/src/auth/credentials.js +45 -7
- package/dist/src/auth/credentials.js.map +1 -1
- package/dist/src/auth/index.d.ts +1 -1
- package/dist/src/auth/index.js.map +1 -1
- package/dist/src/auth/oauth/github-copilot.d.ts +1 -1
- package/dist/src/auth/oauth/google-antigravity.d.ts +1 -3
- package/dist/src/auth/oauth/google-antigravity.js +1 -1
- package/dist/src/auth/oauth/google-gemini-cli.d.ts +1 -3
- package/dist/src/auth/oauth/google-gemini-cli.js +1 -1
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-antigravity.js +3 -5
- package/dist/src/auth/oauth/google-oauth/google-antigravity.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-gemini-cli.js +4 -5
- package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/oauth-page.js +12 -4
- package/dist/src/auth/oauth/google-oauth/oauth-page.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/pkce.d.ts +1 -1
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/pkce.js +2 -2
- package/dist/src/auth/oauth/google-oauth/pkce.js.map +1 -0
- package/dist/src/auth/oauth/index.js +2 -2
- package/dist/src/auth/oauth/kimi-coding.d.ts +1 -1
- package/dist/src/auth/oauth/kimi-coding.js +1 -1
- package/dist/src/auth/oauth/kimi-coding.js.map +1 -1
- package/dist/src/auth/oauth/minimax-cn.js +1 -1
- package/dist/src/auth/oauth/minimax-cn.js.map +1 -1
- package/dist/src/auth/oauth/minimax.js +1 -1
- package/dist/src/auth/oauth/minimax.js.map +1 -1
- package/dist/src/auth/oauth/openai-codex.d.ts +7 -2
- package/dist/src/auth/oauth/openai-codex.js +318 -1
- package/dist/src/auth/oauth/openai-codex.js.map +1 -0
- package/dist/src/auth/profiles/store.js +3 -2
- package/dist/src/auth/profiles/store.js.map +1 -1
- package/dist/src/browser/actions/extension-registry-bridge.js +1 -1
- package/dist/src/browser/actions/registry.js +2 -2
- package/dist/src/browser/cdp-local-launcher.js +1 -1
- package/dist/src/browser/index.js +3 -3
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/browser/providers/cloakbrowser.js +1 -1
- package/dist/src/channels/attachments/attachment-classifiers.d.ts +1 -0
- package/dist/src/channels/attachments/attachment-classifiers.js +13 -2
- package/dist/src/channels/attachments/attachment-classifiers.js.map +1 -1
- package/dist/src/channels/catalog/channel-catalog-service.d.ts +11 -0
- package/dist/src/channels/catalog/channel-catalog-service.js +168 -0
- package/dist/src/channels/catalog/channel-catalog-service.js.map +1 -0
- package/dist/src/channels/catalog/channel-catalog-types.d.ts +22 -0
- package/dist/src/channels/catalog/channel-catalog-types.js +1 -0
- package/dist/src/channels/dock.d.ts +0 -7
- package/dist/src/channels/dock.js +1 -21
- package/dist/src/channels/index.d.ts +1 -3
- package/dist/src/channels/index.js +1 -5
- package/dist/src/channels/lifecycle-supervisor.d.ts +1 -0
- package/dist/src/channels/lifecycle-supervisor.js +11 -0
- package/dist/src/channels/lifecycle-supervisor.js.map +1 -1
- package/dist/src/channels/manager.d.ts +1 -0
- package/dist/src/channels/manager.js +3 -0
- package/dist/src/channels/manager.js.map +1 -1
- package/dist/src/channels/pairing/pairing-channel.d.ts +2 -3
- package/dist/src/channels/pairing/pairing-messages.js +1 -1
- package/dist/src/channels/pairing/pairing-messages.js.map +1 -1
- package/dist/src/channels/pairing/pairing-service.d.ts +1 -1
- package/dist/src/channels/pairing/pairing-service.js +8 -27
- package/dist/src/channels/pairing/pairing-service.js.map +1 -1
- package/dist/src/channels/plugin-types.d.ts +3 -1
- package/dist/src/channels/plugins/types.adapters.d.ts +55 -2
- package/dist/src/channels/telegram/index.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +4 -4
- package/dist/src/chat-commands/builtins/config.js.map +1 -1
- package/dist/src/chat-commands/builtins/model.js +2 -2
- package/dist/src/chat-commands/builtins/model.js.map +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- package/dist/src/chat-commands/config-paths.js.map +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/chat-commands/context.js.map +1 -1
- package/dist/src/cli/bin.js +1 -1
- package/dist/src/cli/command-manifest.js +2 -2
- package/dist/src/cli/command-manifest.js.map +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/agent.js.map +1 -1
- package/dist/src/cli/commands/agents.js +2 -4
- package/dist/src/cli/commands/agents.js.map +1 -1
- package/dist/src/cli/commands/auth.js +40 -52
- package/dist/src/cli/commands/auth.js.map +1 -1
- package/dist/src/cli/commands/browser-cli-helpers.js +1 -1
- package/dist/src/cli/commands/channels.d.ts +1 -5
- package/dist/src/cli/commands/channels.js +115 -281
- package/dist/src/cli/commands/channels.js.map +1 -1
- package/dist/src/cli/commands/config.js +2 -2
- package/dist/src/cli/commands/config.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-config.js +16 -69
- package/dist/src/cli/commands/doctor/checks/channel-config.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +6 -4
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +13 -9
- package/dist/src/cli/commands/doctor/checks/provider-auth.js.map +1 -1
- package/dist/src/cli/commands/extension-dev.js +2 -1
- package/dist/src/cli/commands/extension-dev.js.map +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -1
- package/dist/src/cli/commands/extension-marketplace.js.map +1 -1
- package/dist/src/cli/commands/extension-pack.js +2 -1
- package/dist/src/cli/commands/extension-pack.js.map +1 -1
- package/dist/src/cli/commands/models.js +192 -54
- package/dist/src/cli/commands/models.js.map +1 -1
- package/dist/src/cli/commands/onboard/channels/index.js +1 -1
- package/dist/src/cli/commands/onboard/channels/index.js.map +1 -1
- package/dist/src/cli/commands/onboard/channels/registry.d.ts +2 -1
- package/dist/src/cli/commands/onboard/channels/registry.js +32 -8
- package/dist/src/cli/commands/onboard/channels/registry.js.map +1 -1
- package/dist/src/cli/commands/onboard/model.d.ts +1 -4
- package/dist/src/cli/commands/onboard/model.js +257 -184
- package/dist/src/cli/commands/onboard/model.js.map +1 -1
- package/dist/src/cli/commands/onboard.js +4 -6
- package/dist/src/cli/commands/onboard.js.map +1 -1
- package/dist/src/cli/commands/setup-shared/runner.d.ts +1 -1
- package/dist/src/cli/commands/setup-shared/runner.js.map +1 -1
- package/dist/src/cli/commands/setup-shared/types.d.ts +1 -1
- package/dist/src/cli/commands/setup-shared/types.js.map +1 -1
- package/dist/src/cli/commands/tui.js +13 -5
- package/dist/src/cli/commands/tui.js.map +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/utils/oauth-login.d.ts +17 -0
- package/dist/src/cli/utils/oauth-login.js +93 -0
- package/dist/src/cli/utils/oauth-login.js.map +1 -0
- package/dist/src/cli/utils/oauth-providers.js +2 -2
- package/dist/src/commands/agents.config.d.ts +3 -3
- package/dist/src/commands/agents.config.js +7 -7
- package/dist/src/commands/agents.config.js.map +1 -1
- package/dist/src/config/agent-profile.d.ts +1 -1
- package/dist/src/config/agent-profile.js +6 -2
- package/dist/src/config/agent-profile.js.map +1 -1
- package/dist/src/config/agent-typed-models.d.ts +2 -2
- package/dist/src/config/agent-typed-models.js +13 -2
- package/dist/src/config/agent-typed-models.js.map +1 -1
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/integration.d.ts +1 -1
- package/dist/src/config/loader.d.ts +0 -1
- package/dist/src/config/loader.js +4 -9
- package/dist/src/config/loader.js.map +1 -1
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/rules.js +2 -12
- package/dist/src/config/rules.js.map +1 -1
- package/dist/src/config/schema.d.ts +74 -47
- package/dist/src/config/schema.js +28 -66
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/config/validate-channel-configs.d.ts +0 -3
- package/dist/src/config/validate-channel-configs.js +29 -10
- package/dist/src/config/validate-channel-configs.js.map +1 -1
- package/dist/src/cron/executor.js +1 -4
- package/dist/src/cron/executor.js.map +1 -1
- package/dist/src/extensions/activation-context.js +3 -1
- package/dist/src/extensions/activation-context.js.map +1 -1
- package/dist/src/extensions/activation-planner.js +12 -0
- package/dist/src/extensions/activation-planner.js.map +1 -1
- package/dist/src/extensions/api.d.ts +5 -1
- package/dist/src/extensions/api.js +12 -0
- package/dist/src/extensions/api.js.map +1 -1
- package/dist/src/extensions/discover-extensions.js +17 -13
- package/dist/src/extensions/discover-extensions.js.map +1 -1
- package/dist/src/extensions/extension-metadata-snapshot.js +11 -5
- package/dist/src/extensions/extension-metadata-snapshot.js.map +1 -1
- package/dist/src/extensions/index.js +12 -4
- package/dist/src/extensions/index.js.map +1 -0
- package/dist/src/extensions/loader.d.ts +5 -1
- package/dist/src/extensions/loader.js +12 -11
- package/dist/src/extensions/loader.js.map +1 -1
- package/dist/src/extensions/manifest-registry.js +98 -93
- package/dist/src/extensions/manifest-registry.js.map +1 -1
- package/dist/src/extensions/normalize-manifest.js +91 -15
- package/dist/src/extensions/normalize-manifest.js.map +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/testing.js +4 -0
- package/dist/src/extensions/sdk/testing.js.map +1 -1
- package/dist/src/extensions/types/core.d.ts +32 -1
- package/dist/src/extensions/types/manifest.d.ts +60 -0
- package/dist/src/extensions/types/tui.d.ts +414 -5
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +16 -0
- package/dist/src/gateway/agent-builtin-tools.js.map +1 -1
- package/dist/src/gateway/agent-run-relay.d.ts +2 -3
- package/dist/src/gateway/agent-run-relay.js +10 -3
- package/dist/src/gateway/agent-run-relay.js.map +1 -1
- package/dist/src/gateway/agents-admin.d.ts +32 -19
- package/dist/src/gateway/agents-admin.js +113 -93
- package/dist/src/gateway/agents-admin.js.map +1 -1
- package/dist/src/gateway/chat-stream/mapper.d.ts +34 -0
- package/dist/src/gateway/chat-stream/mapper.js +244 -0
- package/dist/src/gateway/chat-stream/mapper.js.map +1 -0
- package/dist/src/gateway/chat-stream/protocol.d.ts +100 -0
- package/dist/src/gateway/chat-stream/protocol.js +1 -0
- package/dist/src/gateway/hono/lib/agent-model.d.ts +4 -4
- package/dist/src/gateway/hono/lib/agent-model.js +13 -11
- package/dist/src/gateway/hono/lib/agent-model.js.map +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +19 -7
- package/dist/src/gateway/hono/lib/config-payload.js +16 -15
- package/dist/src/gateway/hono/lib/config-payload.js.map +1 -1
- package/dist/src/gateway/hono/oauth-async.js +2 -2
- package/dist/src/gateway/hono/oauth.js +2 -2
- package/dist/src/gateway/hono/routes/agents.js +83 -48
- package/dist/src/gateway/hono/routes/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/channels.js +134 -214
- package/dist/src/gateway/hono/routes/channels.js.map +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +10 -4
- package/dist/src/gateway/hono/routes/commands-skills.js.map +1 -1
- package/dist/src/gateway/hono/routes/config-patch/agents.js +26 -13
- package/dist/src/gateway/hono/routes/config-patch/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/config-patch/channels.d.ts +1 -11
- package/dist/src/gateway/hono/routes/config-patch/channels.js +18 -165
- package/dist/src/gateway/hono/routes/config-patch/channels.js.map +1 -1
- package/dist/src/gateway/hono/routes/config.js +5 -2
- package/dist/src/gateway/hono/routes/config.js.map +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +13 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
- package/dist/src/gateway/hono/routes/models.js +25 -5
- package/dist/src/gateway/hono/routes/models.js.map +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -4
- package/dist/src/gateway/hono/routes/public-gateway.js.map +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +179 -0
- package/dist/src/gateway/hono/routes/sessions.js.map +1 -1
- package/dist/src/gateway/hono/routes/tui.d.ts +3 -0
- package/dist/src/gateway/hono/routes/tui.js +16 -0
- package/dist/src/gateway/hono/routes/tui.js.map +1 -0
- package/dist/src/gateway/hono/routes/workflows.js +25 -1
- package/dist/src/gateway/hono/routes/workflows.js.map +1 -1
- package/dist/src/gateway/hono/sse.d.ts +5 -7
- package/dist/src/gateway/hono/sse.js +21 -38
- package/dist/src/gateway/hono/sse.js.map +1 -1
- package/dist/src/gateway/protocol.js.map +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +2 -4
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/agent-runner.js.map +1 -1
- package/dist/src/gateway/service/marketplace-service.d.ts +4 -3
- package/dist/src/gateway/service/marketplace-service.js +7 -4
- package/dist/src/gateway/service/marketplace-service.js.map +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -6
- package/dist/src/gateway/service/run-gateway-agent.js +63 -36
- package/dist/src/gateway/service/run-gateway-agent.js.map +1 -1
- package/dist/src/gateway/service/sessions-api.d.ts +19 -0
- package/dist/src/gateway/service/sessions-api.js +12 -0
- package/dist/src/gateway/service/sessions-api.js.map +1 -1
- package/dist/src/gateway/service.d.ts +6 -0
- package/dist/src/gateway/service.js +73 -57
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/media/store.js +3 -0
- package/dist/src/media/store.js.map +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/notes/service.js.map +1 -1
- package/dist/src/project-trust/trust-store.d.ts +30 -0
- package/dist/src/project-trust/trust-store.js +194 -0
- package/dist/src/project-trust/trust-store.js.map +1 -0
- package/dist/src/providers/index.d.ts +4 -4
- package/dist/src/providers/index.js +41 -22
- package/dist/src/providers/index.js.map +1 -1
- package/dist/src/providers/presentation.d.ts +34 -0
- package/dist/src/providers/presentation.js +162 -0
- package/dist/src/providers/presentation.js.map +1 -0
- package/dist/src/routing/resolve-route.d.ts +0 -3
- package/dist/src/routing/resolve-route.js.map +1 -1
- package/dist/src/routing/resolve-tui-session-key.d.ts +2 -0
- package/dist/src/routing/resolve-tui-session-key.js +8 -3
- package/dist/src/routing/resolve-tui-session-key.js.map +1 -1
- package/dist/src/session/client-history.d.ts +32 -0
- package/dist/src/session/client-history.js +232 -1
- package/dist/src/session/client-history.js.map +1 -1
- package/dist/src/session/manager.d.ts +37 -4
- package/dist/src/session/manager.js +39 -15
- package/dist/src/session/manager.js.map +1 -1
- package/dist/src/session/session-context-for-llm.d.ts +93 -1
- package/dist/src/session/session-context-for-llm.js +105 -2
- package/dist/src/session/session-context-for-llm.js.map +1 -1
- package/dist/src/session/store.d.ts +37 -0
- package/dist/src/session/store.js +127 -2
- package/dist/src/session/store.js.map +1 -1
- package/dist/src/session/stored-rows-to-file-entries.js +37 -1
- package/dist/src/session/stored-rows-to-file-entries.js.map +1 -1
- package/dist/src/session/types.d.ts +14 -1
- package/dist/src/session/types.js.map +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/storage/sqlite/migrations/004_add_session_type_metadata.sql +15 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/row-mappers.d.ts +14 -1
- package/dist/src/storage/sqlite/row-mappers.js +14 -1
- package/dist/src/storage/sqlite/row-mappers.js.map +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-metadata.js +1 -0
- package/dist/src/storage/sqlite/session-metadata.js.map +1 -1
- package/dist/src/storage/sqlite/session-repository.js +52 -25
- package/dist/src/storage/sqlite/session-repository.js.map +1 -1
- package/dist/src/tui/backends/embedded-backend.d.ts +53 -4
- package/dist/src/tui/backends/embedded-backend.js +227 -39
- package/dist/src/tui/backends/embedded-backend.js.map +1 -1
- package/dist/src/tui/backends/gateway-sse-backend.d.ts +59 -3
- package/dist/src/tui/backends/gateway-sse-backend.js +416 -26
- package/dist/src/tui/backends/gateway-sse-backend.js.map +1 -1
- package/dist/src/tui/chat-history.d.ts +5 -1
- package/dist/src/tui/chat-history.js +78 -8
- package/dist/src/tui/chat-history.js.map +1 -1
- package/dist/src/tui/clipboard-text.d.ts +5 -0
- package/dist/src/tui/clipboard-text.js +46 -0
- package/dist/src/tui/clipboard-text.js.map +1 -0
- package/dist/src/tui/components/assistant-message.d.ts +19 -3
- package/dist/src/tui/components/assistant-message.js +115 -9
- package/dist/src/tui/components/assistant-message.js.map +1 -1
- package/dist/src/tui/components/bash-execution.d.ts +3 -2
- package/dist/src/tui/components/bash-execution.js +31 -3
- package/dist/src/tui/components/bash-execution.js.map +1 -1
- package/dist/src/tui/components/bash-summary.d.ts +23 -0
- package/dist/src/tui/components/bash-summary.js +87 -0
- package/dist/src/tui/components/bash-summary.js.map +1 -0
- package/dist/src/tui/components/branch-message-summary.d.ts +17 -0
- package/dist/src/tui/components/branch-message-summary.js +43 -0
- package/dist/src/tui/components/branch-message-summary.js.map +1 -0
- package/dist/src/tui/components/branch-summary.d.ts +13 -0
- package/dist/src/tui/components/branch-summary.js +51 -0
- package/dist/src/tui/components/branch-summary.js.map +1 -0
- package/dist/src/tui/components/chat-log.d.ts +46 -6
- package/dist/src/tui/components/chat-log.js +183 -21
- package/dist/src/tui/components/chat-log.js.map +1 -1
- package/dist/src/tui/components/compaction-summary.d.ts +13 -0
- package/dist/src/tui/components/compaction-summary.js +46 -0
- package/dist/src/tui/components/compaction-summary.js.map +1 -0
- package/dist/src/tui/components/custom-editor.d.ts +1 -0
- package/dist/src/tui/components/custom-editor.js +2 -0
- package/dist/src/tui/components/custom-editor.js.map +1 -1
- package/dist/src/tui/components/custom-message.d.ts +23 -0
- package/dist/src/tui/components/custom-message.js +65 -0
- package/dist/src/tui/components/custom-message.js.map +1 -0
- package/dist/src/tui/components/extension-dialog.d.ts +42 -0
- package/dist/src/tui/components/extension-dialog.js +127 -0
- package/dist/src/tui/components/extension-dialog.js.map +1 -0
- package/dist/src/tui/components/scoped-models-selector.d.ts +7 -2
- package/dist/src/tui/components/scoped-models-selector.js +89 -16
- package/dist/src/tui/components/scoped-models-selector.js.map +1 -1
- package/dist/src/tui/components/searchable-select-list.d.ts +30 -3
- package/dist/src/tui/components/searchable-select-list.js +82 -10
- package/dist/src/tui/components/searchable-select-list.js.map +1 -1
- package/dist/src/tui/components/session-selector.d.ts +18 -4
- package/dist/src/tui/components/session-selector.js +207 -40
- package/dist/src/tui/components/session-selector.js.map +1 -1
- package/dist/src/tui/components/settings-selector.d.ts +6 -2
- package/dist/src/tui/components/settings-selector.js +126 -7
- package/dist/src/tui/components/settings-selector.js.map +1 -1
- package/dist/src/tui/components/thinking-selector.d.ts +12 -0
- package/dist/src/tui/components/thinking-selector.js +48 -0
- package/dist/src/tui/components/thinking-selector.js.map +1 -0
- package/dist/src/tui/components/tool-execution.d.ts +57 -3
- package/dist/src/tui/components/tool-execution.js +378 -28
- package/dist/src/tui/components/tool-execution.js.map +1 -1
- package/dist/src/tui/components/tui-bottom-bar.d.ts +9 -1
- package/dist/src/tui/components/tui-bottom-bar.js +56 -11
- package/dist/src/tui/components/tui-bottom-bar.js.map +1 -1
- package/dist/src/tui/components/tui-header.d.ts +9 -2
- package/dist/src/tui/components/tui-header.js +25 -5
- package/dist/src/tui/components/tui-header.js.map +1 -1
- package/dist/src/tui/components/user-message.d.ts +4 -2
- package/dist/src/tui/components/user-message.js +42 -9
- package/dist/src/tui/components/user-message.js.map +1 -1
- package/dist/src/tui/components/visual-truncate.d.ts +11 -0
- package/dist/src/tui/components/visual-truncate.js +27 -0
- package/dist/src/tui/components/visual-truncate.js.map +1 -0
- package/dist/src/tui/extension-host/autocomplete.d.ts +43 -0
- package/dist/src/tui/extension-host/autocomplete.js +116 -0
- package/dist/src/tui/extension-host/autocomplete.js.map +1 -0
- package/dist/src/tui/extension-host/host.d.ts +31 -1
- package/dist/src/tui/extension-host/host.js +123 -6
- package/dist/src/tui/extension-host/host.js.map +1 -1
- package/dist/src/tui/extension-host/load-extensions.d.ts +6 -1
- package/dist/src/tui/extension-host/load-extensions.js +4 -3
- package/dist/src/tui/extension-host/load-extensions.js.map +1 -1
- package/dist/src/tui/extension-host/runtime-context.d.ts +21 -0
- package/dist/src/tui/extension-host/runtime-context.js +152 -0
- package/dist/src/tui/extension-host/runtime-context.js.map +1 -0
- package/dist/src/tui/extension-host/runtime.d.ts +52 -4
- package/dist/src/tui/extension-host/runtime.js +547 -85
- package/dist/src/tui/extension-host/runtime.js.map +1 -1
- package/dist/src/tui/extension-host/surface.d.ts +20 -0
- package/dist/src/tui/extension-host/surface.js +30 -6
- package/dist/src/tui/extension-host/surface.js.map +1 -1
- package/dist/src/tui/extension-host/tool-renderers.d.ts +6 -3
- package/dist/src/tui/extension-host/tool-renderers.js +43 -5
- package/dist/src/tui/extension-host/tool-renderers.js.map +1 -1
- package/dist/src/tui/format-tui-hotkeys.d.ts +12 -2
- package/dist/src/tui/format-tui-hotkeys.js +22 -5
- package/dist/src/tui/format-tui-hotkeys.js.map +1 -1
- package/dist/src/tui/tui-agent-events.d.ts +8 -6
- package/dist/src/tui/tui-agent-events.js +200 -59
- package/dist/src/tui/tui-agent-events.js.map +1 -1
- package/dist/src/tui/tui-backend.d.ts +169 -3
- package/dist/src/tui/tui-command-formatters.d.ts +76 -0
- package/dist/src/tui/tui-command-formatters.js +594 -0
- package/dist/src/tui/tui-command-formatters.js.map +1 -0
- package/dist/src/tui/tui-commands.d.ts +57 -7
- package/dist/src/tui/tui-commands.js +639 -43
- package/dist/src/tui/tui-commands.js.map +1 -1
- package/dist/src/tui/tui-context-usage.d.ts +1 -1
- package/dist/src/tui/tui-context-usage.js +9 -1
- package/dist/src/tui/tui-context-usage.js.map +1 -1
- package/dist/src/tui/tui-extension-user-message.d.ts +8 -0
- package/dist/src/tui/tui-extension-user-message.js +32 -0
- package/dist/src/tui/tui-extension-user-message.js.map +1 -0
- package/dist/src/tui/tui-follow-up-queue.d.ts +9 -0
- package/dist/src/tui/tui-follow-up-queue.js +18 -0
- package/dist/src/tui/tui-follow-up-queue.js.map +1 -0
- package/dist/src/tui/tui-local-shell.d.ts +11 -1
- package/dist/src/tui/tui-local-shell.js +50 -8
- package/dist/src/tui/tui-local-shell.js.map +1 -1
- package/dist/src/tui/tui-model-picker.d.ts +26 -0
- package/dist/src/tui/tui-model-picker.js +152 -0
- package/dist/src/tui/tui-model-picker.js.map +1 -0
- package/dist/src/tui/tui-oauth-login.d.ts +16 -0
- package/dist/src/tui/tui-oauth-login.js +189 -0
- package/dist/src/tui/tui-oauth-login.js.map +1 -0
- package/dist/src/tui/tui-overlays.d.ts +3 -3
- package/dist/src/tui/tui-overlays.js +6 -7
- package/dist/src/tui/tui-overlays.js.map +1 -1
- package/dist/src/tui/tui-picker-overlay.d.ts +27 -32
- package/dist/src/tui/tui-picker-overlay.js +340 -30
- package/dist/src/tui/tui-picker-overlay.js.map +1 -1
- package/dist/src/tui/tui-picker-services.d.ts +41 -0
- package/dist/src/tui/tui-picker-services.js +1 -0
- package/dist/src/tui/tui-run-state.d.ts +11 -0
- package/dist/src/tui/tui-run-state.js +114 -0
- package/dist/src/tui/tui-run-state.js.map +1 -0
- package/dist/src/tui/tui-runtime-hints.d.ts +4 -0
- package/dist/src/tui/tui-runtime-hints.js +18 -0
- package/dist/src/tui/tui-runtime-hints.js.map +1 -0
- package/dist/src/tui/tui-scoped-models.d.ts +1 -1
- package/dist/src/tui/tui-scoped-models.js +2 -2
- package/dist/src/tui/tui-scoped-models.js.map +1 -1
- package/dist/src/tui/tui-session-actions.d.ts +5 -3
- package/dist/src/tui/tui-session-actions.js +21 -9
- package/dist/src/tui/tui-session-actions.js.map +1 -1
- package/dist/src/tui/tui-session-format.d.ts +4 -1
- package/dist/src/tui/tui-session-format.js +17 -3
- package/dist/src/tui/tui-session-format.js.map +1 -1
- package/dist/src/tui/tui-session-snapshot.d.ts +82 -0
- package/dist/src/tui/tui-session-snapshot.js +184 -0
- package/dist/src/tui/tui-session-snapshot.js.map +1 -0
- package/dist/src/tui/tui-session-stats.d.ts +3 -0
- package/dist/src/tui/tui-session-stats.js +59 -0
- package/dist/src/tui/tui-session-stats.js.map +1 -0
- package/dist/src/tui/tui-settings.d.ts +21 -0
- package/dist/src/tui/tui-settings.js +28 -1
- package/dist/src/tui/tui-settings.js.map +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js.map +1 -1
- package/dist/src/tui/tui-startup-resources.d.ts +3 -0
- package/dist/src/tui/tui-startup-resources.js +39 -0
- package/dist/src/tui/tui-startup-resources.js.map +1 -0
- package/dist/src/tui/tui-startup-text.d.ts +10 -0
- package/dist/src/tui/tui-startup-text.js +58 -0
- package/dist/src/tui/tui-startup-text.js.map +1 -0
- package/dist/src/tui/tui-stdio-filter.d.ts +1 -0
- package/dist/src/tui/tui-stdio-filter.js +11 -7
- package/dist/src/tui/tui-stdio-filter.js.map +1 -1
- package/dist/src/tui/tui-submit.d.ts +2 -0
- package/dist/src/tui/tui-submit.js +2 -1
- package/dist/src/tui/tui-submit.js.map +1 -1
- package/dist/src/tui/tui-tool-diff.js +61 -7
- package/dist/src/tui/tui-tool-diff.js.map +1 -1
- package/dist/src/tui/tui-tool-result.d.ts +17 -0
- package/dist/src/tui/tui-tool-result.js +74 -0
- package/dist/src/tui/tui-tool-result.js.map +1 -0
- package/dist/src/tui/tui-transcript-tree-picker.d.ts +57 -0
- package/dist/src/tui/tui-transcript-tree-picker.js +604 -0
- package/dist/src/tui/tui-transcript-tree-picker.js.map +1 -0
- package/dist/src/tui/tui-transcript-tree.d.ts +7 -0
- package/dist/src/tui/tui-transcript-tree.js +316 -0
- package/dist/src/tui/tui-transcript-tree.js.map +1 -0
- package/dist/src/tui/tui-types.d.ts +25 -34
- package/dist/src/tui/tui-types.js +12 -0
- package/dist/src/tui/tui-types.js.map +1 -1
- package/dist/src/tui/tui.js +1288 -112
- package/dist/src/tui/tui.js.map +1 -1
- package/dist/src/tui/xopc-tui-keybindings.d.ts +127 -2
- package/dist/src/tui/xopc-tui-keybindings.js +127 -2
- package/dist/src/tui/xopc-tui-keybindings.js.map +1 -1
- package/dist/src/workflows/domain/definition-utils.d.ts +2 -1
- package/dist/src/workflows/domain/definition-utils.js +18 -8
- package/dist/src/workflows/domain/definition-utils.js.map +1 -1
- package/dist/src/workflows/domain/definition.d.ts +25 -0
- package/dist/src/workflows/domain/event.d.ts +1 -0
- package/dist/src/workflows/domain/result.d.ts +15 -0
- package/dist/src/workflows/domain/run.d.ts +2 -0
- package/dist/src/workflows/domain/run.js.map +1 -1
- package/dist/src/workflows/engine/projector.js +4 -0
- package/dist/src/workflows/engine/projector.js.map +1 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +37 -1
- package/dist/src/workflows/engine/workflow-engine.js +75 -11
- package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
- package/dist/src/workflows/index.d.ts +1 -0
- package/dist/src/workflows/index.js +4 -1
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.d.ts +9 -0
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +40 -0
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +1 -0
- package/dist/src/workflows/registry/index.d.ts +2 -0
- package/dist/src/workflows/registry/index.js +2 -0
- package/dist/src/workflows/registry/workflow-definition-registry.d.ts +15 -0
- package/dist/src/workflows/registry/workflow-definition-registry.js +1 -0
- package/dist/src/workflows/runtime/index.d.ts +2 -0
- package/dist/src/workflows/runtime/index.js +2 -1
- package/dist/src/workflows/runtime/script-workflow-runtime.d.ts +5 -0
- package/dist/src/workflows/runtime/script-workflow-runtime.js +15 -0
- package/dist/src/workflows/runtime/script-workflow-runtime.js.map +1 -0
- package/dist/src/workflows/runtime/workflow-runtime-port.d.ts +16 -0
- package/dist/src/workflows/runtime/workflow-runtime-port.js +1 -0
- package/dist/src/workflows/service/run-view-to-snapshot.js +3 -0
- package/dist/src/workflows/service/run-view-to-snapshot.js.map +1 -1
- package/dist/src/workflows/service/workflow-run-service.d.ts +3 -0
- package/dist/src/workflows/service/workflow-run-service.js +10 -15
- package/dist/src/workflows/service/workflow-run-service.js.map +1 -1
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +1 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +4 -1
- package/dist/src/workflows/service/workflow-session-bridge.js.map +1 -1
- package/package.json +21 -15
- package/skills/creative/frontend-design/SKILL.md +1 -1
- package/skills/creative/theme-factory/SKILL.md +1 -1
- package/skills/documents/xlsx/SKILL.md +1 -1
- package/skills/engineering/diagnose/SKILL.md +2 -2
- package/skills/engineering/tdd/SKILL.md +1 -1
- package/skills/tools/github/SKILL.md +6 -1
- package/skills/tools/webapp-testing/SKILL.md +4 -1
- package/dist/extensions/telegram/src/adapters/config-surface.d.ts +0 -2
- package/dist/extensions/telegram/src/adapters/config-surface.js +0 -26
- package/dist/extensions/telegram/src/adapters/config-surface.js.map +0 -1
- package/dist/extensions/weixin/src/__tests__/workflow-progress.test.js +0 -158
- package/dist/extensions/weixin/src/__tests__/workflow-progress.test.js.map +0 -1
- package/dist/gateway/static/root/assets/agents-DQ0mQxIA.js +0 -222
- package/dist/gateway/static/root/assets/channels-settings-BEtP53V6.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-CxTtS1hI.js +0 -8
- package/dist/gateway/static/root/assets/cron-api-CznlPIZT.js +0 -1
- package/dist/gateway/static/root/assets/cron-page-Dx6dE3eD.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-DuDCSb3J.js +0 -1
- package/dist/gateway/static/root/assets/field-primitives-BUwUiDf5.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-config-api-BjFW1cl-.js +0 -1
- package/dist/gateway/static/root/assets/index-DKgHC1Ta.js +0 -4840
- package/dist/gateway/static/root/assets/index-DjNDHzwG.css +0 -1
- package/dist/gateway/static/root/assets/notes-page-D40ZpS0Y.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BvtdbmW8.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BQamRjkV.js +0 -2
- package/dist/gateway/static/root/assets/settings-page-D972_jaS.js +0 -3
- package/dist/gateway/static/root/assets/share-preview-page-CKCTMo0_.js +0 -2
- package/dist/gateway/static/root/assets/skills-page-QwFCB4yV.js +0 -2
- package/dist/gateway/static/root/assets/url-q28QhI7l.js +0 -3
- package/dist/gateway/static/root/assets/utils-DCm11_KW.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-CywiB7Dw.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Be7l_SWw.js +0 -27
- package/dist/src/agent/embedded/map-stream-events.d.ts +0 -9
- package/dist/src/agent/embedded/map-stream-events.js +0 -63
- package/dist/src/agent/embedded/map-stream-events.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/google-antigravity.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/google-gemini-cli.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/oauth-page.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/pkce.js.map +0 -1
- package/dist/src/channels/dock.js.map +0 -1
- package/dist/src/channels/plugins/bundled.d.ts +0 -11
- package/dist/src/channels/plugins/bundled.js +0 -10
- package/dist/src/channels/plugins/bundled.js.map +0 -1
- package/dist/src/channels/registry.d.ts +0 -25
- package/dist/src/channels/registry.js +0 -82
- package/dist/src/channels/registry.js.map +0 -1
- package/dist/src/config/localized-text.d.ts +0 -6
- package/dist/src/config/localized-text.js +0 -42
- package/dist/src/config/localized-text.js.map +0 -1
- package/dist/src/generated/bundled-channel-plugins.d.ts +0 -10
- package/dist/src/generated/bundled-channel-plugins.js +0 -16
- package/dist/src/generated/bundled-channel-plugins.js.map +0 -1
- package/dist/src/tui/stream-assembler.d.ts +0 -22
- package/dist/src/tui/stream-assembler.js +0 -63
- package/dist/src/tui/stream-assembler.js.map +0 -1
- package/skills/browser/SKILL-zh.md +0 -188
- package/skills/business/company-values/SKILL-zh.md +0 -80
- package/skills/business/company-values/SKILL.md +0 -80
- package/skills/business/find-community/SKILL-zh.md +0 -50
- package/skills/business/find-community/SKILL.md +0 -50
- package/skills/business/first-customers/SKILL-zh.md +0 -76
- package/skills/business/first-customers/SKILL.md +0 -76
- package/skills/business/grow-sustainably/SKILL-zh.md +0 -92
- package/skills/business/grow-sustainably/SKILL.md +0 -92
- package/skills/business/marketing-plan/SKILL-zh.md +0 -100
- package/skills/business/marketing-plan/SKILL.md +0 -100
- package/skills/business/minimalist-review/SKILL-zh.md +0 -82
- package/skills/business/minimalist-review/SKILL.md +0 -82
- package/skills/business/mvp/SKILL-zh.md +0 -81
- package/skills/business/mvp/SKILL.md +0 -81
- package/skills/business/pricing/SKILL-zh.md +0 -64
- package/skills/business/pricing/SKILL.md +0 -64
- package/skills/business/processize/SKILL-zh.md +0 -91
- package/skills/business/processize/SKILL.md +0 -91
- package/skills/business/validate-idea/SKILL-zh.md +0 -68
- package/skills/business/validate-idea/SKILL.md +0 -68
- package/skills/creative/algorithmic-art/LICENSE.txt +0 -202
- package/skills/creative/algorithmic-art/SKILL-zh.md +0 -405
- package/skills/creative/algorithmic-art/SKILL.md +0 -405
- package/skills/creative/algorithmic-art/templates/generator_template.js +0 -223
- package/skills/creative/algorithmic-art/templates/viewer.html +0 -599
- package/skills/creative/frontend-design/SKILL-zh.md +0 -42
- package/skills/creative/theme-factory/SKILL-zh.md +0 -59
- package/skills/creative/web-artifacts-builder/LICENSE.txt +0 -202
- package/skills/creative/web-artifacts-builder/SKILL-zh.md +0 -74
- package/skills/creative/web-artifacts-builder/SKILL.md +0 -74
- package/skills/creative/web-artifacts-builder/scripts/bundle-artifact.sh +0 -54
- package/skills/creative/web-artifacts-builder/scripts/init-artifact.sh +0 -322
- package/skills/creative/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/documents/doc-coauthoring/SKILL-zh.md +0 -375
- package/skills/documents/doc-coauthoring/SKILL.md +0 -375
- package/skills/documents/docx/LICENSE.txt +0 -30
- package/skills/documents/docx/SKILL-zh.md +0 -590
- package/skills/documents/docx/SKILL.md +0 -590
- package/skills/documents/docx/scripts/__init__.py +0 -1
- package/skills/documents/docx/scripts/accept_changes.py +0 -135
- package/skills/documents/docx/scripts/comment.py +0 -318
- package/skills/documents/docx/scripts/office/helpers/__init__.py +0 -0
- package/skills/documents/docx/scripts/office/helpers/merge_runs.py +0 -199
- package/skills/documents/docx/scripts/office/helpers/simplify_redlines.py +0 -197
- package/skills/documents/docx/scripts/office/pack.py +0 -159
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/documents/docx/scripts/office/schemas/mce/mc.xsd +0 -75
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/documents/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/documents/docx/scripts/office/soffice.py +0 -183
- package/skills/documents/docx/scripts/office/unpack.py +0 -132
- package/skills/documents/docx/scripts/office/validate.py +0 -111
- package/skills/documents/docx/scripts/office/validators/__init__.py +0 -15
- package/skills/documents/docx/scripts/office/validators/base.py +0 -847
- package/skills/documents/docx/scripts/office/validators/docx.py +0 -446
- package/skills/documents/docx/scripts/office/validators/pptx.py +0 -275
- package/skills/documents/docx/scripts/office/validators/redlining.py +0 -247
- package/skills/documents/docx/scripts/templates/comments.xml +0 -3
- package/skills/documents/docx/scripts/templates/commentsExtended.xml +0 -3
- package/skills/documents/docx/scripts/templates/commentsExtensible.xml +0 -3
- package/skills/documents/docx/scripts/templates/commentsIds.xml +0 -3
- package/skills/documents/docx/scripts/templates/people.xml +0 -3
- package/skills/documents/pdf/LICENSE.txt +0 -30
- package/skills/documents/pdf/SKILL-zh.md +0 -314
- package/skills/documents/pdf/SKILL.md +0 -314
- package/skills/documents/pdf/forms.md +0 -294
- package/skills/documents/pdf/reference.md +0 -612
- package/skills/documents/pdf/scripts/check_bounding_boxes.py +0 -65
- package/skills/documents/pdf/scripts/check_fillable_fields.py +0 -11
- package/skills/documents/pdf/scripts/convert_pdf_to_images.py +0 -33
- package/skills/documents/pdf/scripts/create_validation_image.py +0 -37
- package/skills/documents/pdf/scripts/extract_form_field_info.py +0 -122
- package/skills/documents/pdf/scripts/extract_form_structure.py +0 -115
- package/skills/documents/pdf/scripts/fill_fillable_fields.py +0 -98
- package/skills/documents/pdf/scripts/fill_pdf_form_with_annotations.py +0 -107
- package/skills/documents/pptx/LICENSE.txt +0 -30
- package/skills/documents/pptx/SKILL-zh.md +0 -232
- package/skills/documents/pptx/SKILL.md +0 -232
- package/skills/documents/pptx/editing.md +0 -205
- package/skills/documents/pptx/pptxgenjs.md +0 -420
- package/skills/documents/pptx/scripts/__init__.py +0 -0
- package/skills/documents/pptx/scripts/add_slide.py +0 -195
- package/skills/documents/pptx/scripts/clean.py +0 -286
- package/skills/documents/pptx/scripts/office/helpers/__init__.py +0 -0
- package/skills/documents/pptx/scripts/office/helpers/merge_runs.py +0 -199
- package/skills/documents/pptx/scripts/office/helpers/simplify_redlines.py +0 -197
- package/skills/documents/pptx/scripts/office/pack.py +0 -159
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/documents/pptx/scripts/office/schemas/mce/mc.xsd +0 -75
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/documents/pptx/scripts/office/soffice.py +0 -183
- package/skills/documents/pptx/scripts/office/unpack.py +0 -132
- package/skills/documents/pptx/scripts/office/validate.py +0 -111
- package/skills/documents/pptx/scripts/office/validators/__init__.py +0 -15
- package/skills/documents/pptx/scripts/office/validators/base.py +0 -847
- package/skills/documents/pptx/scripts/office/validators/docx.py +0 -446
- package/skills/documents/pptx/scripts/office/validators/pptx.py +0 -275
- package/skills/documents/pptx/scripts/office/validators/redlining.py +0 -247
- package/skills/documents/pptx/scripts/thumbnail.py +0 -289
- package/skills/documents/xlsx/SKILL-zh.md +0 -292
- package/skills/engineering/diagnose/SKILL-zh.md +0 -117
- package/skills/engineering/grill-with-docs/ADR-FORMAT.md +0 -47
- package/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +0 -77
- package/skills/engineering/grill-with-docs/SKILL-zh.md +0 -88
- package/skills/engineering/grill-with-docs/SKILL.md +0 -88
- package/skills/engineering/improve-codebase-architecture/DEEPENING.md +0 -37
- package/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +0 -44
- package/skills/engineering/improve-codebase-architecture/LANGUAGE.md +0 -53
- package/skills/engineering/improve-codebase-architecture/SKILL-zh.md +0 -71
- package/skills/engineering/improve-codebase-architecture/SKILL.md +0 -71
- package/skills/engineering/tdd/SKILL-zh.md +0 -109
- package/skills/engineering/to-issues/SKILL-zh.md +0 -81
- package/skills/engineering/to-issues/SKILL.md +0 -81
- package/skills/engineering/to-prd/SKILL-zh.md +0 -76
- package/skills/engineering/to-prd/SKILL.md +0 -74
- package/skills/engineering/zoom-out/SKILL-zh.md +0 -7
- package/skills/engineering/zoom-out/SKILL.md +0 -7
- package/skills/tools/find-skills/SKILL-zh.md +0 -440
- package/skills/tools/github/SKILL-zh.md +0 -48
- package/skills/tools/internal-comms/LICENSE.txt +0 -202
- package/skills/tools/internal-comms/SKILL-zh.md +0 -32
- package/skills/tools/internal-comms/SKILL.md +0 -32
- package/skills/tools/internal-comms/examples/3p-updates.md +0 -47
- package/skills/tools/internal-comms/examples/company-newsletter.md +0 -65
- package/skills/tools/internal-comms/examples/faq-answers.md +0 -30
- package/skills/tools/internal-comms/examples/general-comms.md +0 -16
- package/skills/tools/skill-creator/LICENSE.txt +0 -202
- package/skills/tools/skill-creator/SKILL-zh.md +0 -483
- package/skills/tools/skill-creator/SKILL.md +0 -485
- package/skills/tools/skill-creator/agents/analyzer.md +0 -274
- package/skills/tools/skill-creator/agents/comparator.md +0 -202
- package/skills/tools/skill-creator/agents/grader.md +0 -223
- package/skills/tools/skill-creator/assets/eval_review.html +0 -146
- package/skills/tools/skill-creator/eval-viewer/generate_review.py +0 -471
- package/skills/tools/skill-creator/eval-viewer/viewer.html +0 -1325
- package/skills/tools/skill-creator/references/schemas.md +0 -430
- package/skills/tools/skill-creator/scripts/__init__.py +0 -0
- package/skills/tools/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/tools/skill-creator/scripts/generate_report.py +0 -326
- package/skills/tools/skill-creator/scripts/improve_description.py +0 -247
- package/skills/tools/skill-creator/scripts/package_skill.py +0 -136
- package/skills/tools/skill-creator/scripts/quick_validate.py +0 -103
- package/skills/tools/skill-creator/scripts/run_eval.py +0 -310
- package/skills/tools/skill-creator/scripts/run_loop.py +0 -328
- package/skills/tools/skill-creator/scripts/utils.py +0 -47
- package/skills/tools/summarize/SKILL-zh.md +0 -47
- package/skills/tools/weather/SKILL-zh.md +0 -46
- package/skills/tools/weather/SKILL.md +0 -46
- package/skills/tools/webapp-testing/SKILL-zh.md +0 -96
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-antigravity.d.ts +0 -0
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-gemini-cli.d.ts +0 -0
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/oauth-page.d.ts +0 -0
|
@@ -1,87 +1,437 @@
|
|
|
1
1
|
import { theme } from "../theme.js";
|
|
2
|
+
import { formatKeyIds } from "../format-tui-hotkeys.js";
|
|
2
3
|
import { isDiffFriendlyTool, looksLikeUnifiedDiff, renderUnifiedDiff } from "../tui-tool-diff.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { parseTuiToolResult } from "../tui-tool-result.js";
|
|
5
|
+
import { truncateToVisualLines } from "./visual-truncate.js";
|
|
6
|
+
import { hasStructuredTuiToolRenderer, renderToolCallWithExtensions, renderToolResultWithExtensions, renderToolWithExtensions } from "../extension-host/tool-renderers.js";
|
|
7
|
+
import { basename, dirname } from "node:path";
|
|
8
|
+
import { Container, Image, Spacer, Text, getCapabilities } from "@earendil-works/pi-tui";
|
|
5
9
|
//#region src/tui/components/tool-execution.ts
|
|
6
10
|
const MAX_ARG_VALUE_LENGTH = 120;
|
|
11
|
+
const COLLAPSED_RESULT_VISUAL_LINES = 4;
|
|
7
12
|
function sanitize(text) {
|
|
8
13
|
return text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, "");
|
|
9
14
|
}
|
|
10
|
-
function
|
|
15
|
+
function trimTrailingBlankDisplayLines(text) {
|
|
16
|
+
return text.replace(/(?:\r?\n[ \t]*)+$/g, "");
|
|
17
|
+
}
|
|
18
|
+
function getToolResultDisplayText(content, options) {
|
|
19
|
+
const parts = [];
|
|
20
|
+
for (const block of content) {
|
|
21
|
+
if (block.type === "text") {
|
|
22
|
+
if (block.text) parts.push(sanitize(block.text));
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (block.type === "image" && (!options.supportsInlineImages || !options.showImages)) {
|
|
26
|
+
parts.push(block.mimeType ? `[image:${block.mimeType}]` : "[image]");
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (block.type !== "image") parts.push(block.text ? sanitize(block.text) : `[${block.type}]`);
|
|
30
|
+
}
|
|
31
|
+
return trimTrailingBlankDisplayLines(parts.filter(Boolean).join("\n"));
|
|
32
|
+
}
|
|
33
|
+
function formatArgsSummary(args, toolName) {
|
|
11
34
|
if (!args || typeof args !== "object") return "";
|
|
35
|
+
const compactRead = isReadStyleTool(toolName) ? formatCompactReadArgs(args) : null;
|
|
36
|
+
if (compactRead) return compactRead;
|
|
12
37
|
const entries = Object.entries(args);
|
|
13
38
|
if (entries.length === 0) return "";
|
|
14
39
|
return entries.map(([key, value]) => {
|
|
15
|
-
const stringValue =
|
|
40
|
+
const stringValue = formatArgValue(value);
|
|
16
41
|
return `${key}=${stringValue.length > MAX_ARG_VALUE_LENGTH ? `${stringValue.slice(0, MAX_ARG_VALUE_LENGTH - 3)}...` : stringValue}`;
|
|
17
42
|
}).join(", ");
|
|
18
43
|
}
|
|
44
|
+
function isReadStyleTool(toolName) {
|
|
45
|
+
return [
|
|
46
|
+
"read",
|
|
47
|
+
"read_file",
|
|
48
|
+
"memory_get"
|
|
49
|
+
].includes(toolName);
|
|
50
|
+
}
|
|
51
|
+
function formatCompactReadArgs(args) {
|
|
52
|
+
if (!args || typeof args !== "object") return null;
|
|
53
|
+
const record = args;
|
|
54
|
+
const rawPath = typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : void 0;
|
|
55
|
+
if (!rawPath) return null;
|
|
56
|
+
const normalized = rawPath.replace(/\\/g, "/");
|
|
57
|
+
const base = basename(normalized);
|
|
58
|
+
let label = null;
|
|
59
|
+
if (base === "SKILL.md") {
|
|
60
|
+
const parent = basename(dirname(normalized));
|
|
61
|
+
label = parent ? `[skill] ${parent}` : "[skill]";
|
|
62
|
+
} else if (base === "AGENTS.md") label = `read resource ${normalized}`;
|
|
63
|
+
if (!label) return null;
|
|
64
|
+
const start = firstFiniteNumber(record.offset, record.from, record.start, record.line);
|
|
65
|
+
const count = firstFiniteNumber(record.limit, record.lines, record.count);
|
|
66
|
+
if (start != null && count != null && count > 0) label += `:${start}-${start + count - 1}`;
|
|
67
|
+
return label;
|
|
68
|
+
}
|
|
69
|
+
function firstFiniteNumber(...values) {
|
|
70
|
+
for (const value of values) {
|
|
71
|
+
if (typeof value === "number" && Number.isFinite(value)) return Math.floor(value);
|
|
72
|
+
if (typeof value === "string" && value.trim()) {
|
|
73
|
+
const parsed = Number(value);
|
|
74
|
+
if (Number.isFinite(parsed)) return Math.floor(parsed);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
function formatArgValue(value) {
|
|
80
|
+
if (typeof value === "string") return value;
|
|
81
|
+
if (typeof value === "bigint") return `${value.toString()}n`;
|
|
82
|
+
if (typeof value === "function") return "[function]";
|
|
83
|
+
if (typeof value === "symbol") return String(value);
|
|
84
|
+
if (value instanceof Error) return value.message || value.name;
|
|
85
|
+
try {
|
|
86
|
+
const json = JSON.stringify(value);
|
|
87
|
+
return json === void 0 ? String(value) : json;
|
|
88
|
+
} catch {
|
|
89
|
+
return String(value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function isTuiComponent(value) {
|
|
93
|
+
return Boolean(value && typeof value === "object" && typeof value.render === "function");
|
|
94
|
+
}
|
|
19
95
|
var ToolExecutionComponent = class extends Container {
|
|
96
|
+
contentContainer;
|
|
20
97
|
contentText;
|
|
98
|
+
collapsedOutputComponent = null;
|
|
99
|
+
collapsedReadSummaryComponent = null;
|
|
21
100
|
toolName;
|
|
101
|
+
toolCallId;
|
|
22
102
|
args;
|
|
103
|
+
argsComplete = true;
|
|
23
104
|
resultText = "";
|
|
105
|
+
resultContent;
|
|
106
|
+
resultDetails;
|
|
107
|
+
rendererState = {};
|
|
108
|
+
lastRendererOutput;
|
|
109
|
+
lastCallRendererOutput;
|
|
110
|
+
lastResultRendererOutput;
|
|
111
|
+
customRendererComponent;
|
|
112
|
+
structuredRendererComponents = [];
|
|
113
|
+
contentTextAttached = true;
|
|
114
|
+
rendererInvalidationQueued = false;
|
|
115
|
+
imageComponents = [];
|
|
116
|
+
imageSpacers = [];
|
|
117
|
+
showImages;
|
|
118
|
+
imageWidthCells;
|
|
119
|
+
keybindings;
|
|
120
|
+
cwd;
|
|
24
121
|
expanded = false;
|
|
25
122
|
isError = false;
|
|
26
123
|
isPartial = true;
|
|
27
|
-
|
|
124
|
+
executionStarted = false;
|
|
125
|
+
constructor(toolName, toolCallId, args, options = {}) {
|
|
28
126
|
super();
|
|
29
127
|
this.toolName = toolName;
|
|
128
|
+
this.toolCallId = toolCallId;
|
|
30
129
|
this.args = args;
|
|
130
|
+
this.showImages = options.showImages ?? true;
|
|
131
|
+
this.imageWidthCells = Math.max(1, Math.floor(options.imageWidthCells ?? 60));
|
|
132
|
+
this.keybindings = options.keybindings;
|
|
133
|
+
this.cwd = options.cwd ?? process.cwd();
|
|
31
134
|
this.addChild(new Spacer(1));
|
|
32
135
|
const bgFn = (text) => theme.toolPendingBg(text);
|
|
136
|
+
this.contentContainer = new Container();
|
|
33
137
|
this.contentText = new Text("", 1, 1, bgFn);
|
|
34
|
-
this.addChild(this.contentText);
|
|
138
|
+
this.contentContainer.addChild(this.contentText);
|
|
139
|
+
this.addChild(this.contentContainer);
|
|
35
140
|
this.refresh();
|
|
36
141
|
}
|
|
37
142
|
setArgs(args) {
|
|
38
143
|
this.args = args;
|
|
39
144
|
this.refresh();
|
|
40
145
|
}
|
|
146
|
+
markExecutionStarted() {
|
|
147
|
+
this.executionStarted = true;
|
|
148
|
+
this.refresh();
|
|
149
|
+
}
|
|
150
|
+
setArgsComplete() {
|
|
151
|
+
this.argsComplete = true;
|
|
152
|
+
this.refresh();
|
|
153
|
+
}
|
|
41
154
|
setExpanded(expanded) {
|
|
42
155
|
this.expanded = expanded;
|
|
43
156
|
this.refresh();
|
|
44
157
|
}
|
|
45
|
-
|
|
46
|
-
|
|
158
|
+
updateResult(result, isPartial = false, isError = false) {
|
|
159
|
+
const parsed = parseTuiToolResult(result);
|
|
160
|
+
this.resultText = sanitize(parsed.text);
|
|
161
|
+
this.resultContent = parsed.envelope?.content;
|
|
162
|
+
this.resultDetails = parsed.envelope?.details;
|
|
47
163
|
this.isError = isError;
|
|
48
|
-
this.isPartial =
|
|
164
|
+
this.isPartial = isPartial;
|
|
165
|
+
this.refresh();
|
|
166
|
+
}
|
|
167
|
+
setImageOptions(options) {
|
|
168
|
+
if (options.showImages !== void 0) this.showImages = options.showImages;
|
|
169
|
+
if (options.imageWidthCells !== void 0) this.imageWidthCells = Math.max(1, Math.floor(options.imageWidthCells));
|
|
170
|
+
if (options.keybindings !== void 0) this.keybindings = options.keybindings;
|
|
171
|
+
if (options.cwd !== void 0) this.cwd = options.cwd;
|
|
172
|
+
this.refresh();
|
|
173
|
+
}
|
|
174
|
+
setPartialDetails(details) {
|
|
175
|
+
this.resultDetails = details;
|
|
176
|
+
this.isPartial = true;
|
|
49
177
|
this.refresh();
|
|
50
178
|
}
|
|
51
179
|
refresh() {
|
|
52
180
|
const bgFn = this.isPartial ? (text) => theme.toolPendingBg(text) : this.isError ? (text) => theme.toolErrorBg(text) : (text) => theme.toolSuccessBg(text);
|
|
181
|
+
this.refreshCollapsedOutput(null);
|
|
182
|
+
this.refreshCollapsedReadSummary(null);
|
|
183
|
+
if (this.customRendererComponent) {
|
|
184
|
+
this.contentContainer.removeChild(this.customRendererComponent);
|
|
185
|
+
this.customRendererComponent = void 0;
|
|
186
|
+
}
|
|
187
|
+
for (const component of this.structuredRendererComponents) this.contentContainer.removeChild(component);
|
|
188
|
+
this.structuredRendererComponents = [];
|
|
53
189
|
this.contentText.setCustomBgFn(bgFn);
|
|
54
|
-
|
|
190
|
+
if (hasStructuredTuiToolRenderer(this.toolName)) {
|
|
191
|
+
this.detachContentText();
|
|
192
|
+
this.renderStructuredExtensionTool();
|
|
193
|
+
} else {
|
|
194
|
+
const custom = this.renderExtensionTool();
|
|
195
|
+
if (Array.isArray(custom) && custom.length > 0) {
|
|
196
|
+
this.ensureContentTextAttached();
|
|
197
|
+
this.lastRendererOutput = custom;
|
|
198
|
+
this.contentText.setText(custom.join("\n"));
|
|
199
|
+
} else if (isTuiComponent(custom)) {
|
|
200
|
+
this.detachContentText();
|
|
201
|
+
this.customRendererComponent = custom;
|
|
202
|
+
this.lastRendererOutput = custom;
|
|
203
|
+
this.contentContainer.addChild(custom);
|
|
204
|
+
} else {
|
|
205
|
+
this.ensureContentTextAttached();
|
|
206
|
+
this.lastRendererOutput = void 0;
|
|
207
|
+
this.contentText.setText(this.formatToolExecution());
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
this.refreshImages();
|
|
55
211
|
}
|
|
56
|
-
|
|
57
|
-
|
|
212
|
+
appendRendererResult(result) {
|
|
213
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
214
|
+
const component = new Text(result.join("\n"), 1, 1);
|
|
215
|
+
this.structuredRendererComponents.push(component);
|
|
216
|
+
this.contentContainer.addChild(component);
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
if (isTuiComponent(result)) {
|
|
220
|
+
this.structuredRendererComponents.push(result);
|
|
221
|
+
this.contentContainer.addChild(result);
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
renderStructuredExtensionTool() {
|
|
227
|
+
const call = this.renderExtensionToolCall();
|
|
228
|
+
if (this.appendRendererResult(call)) this.lastCallRendererOutput = call;
|
|
229
|
+
else {
|
|
230
|
+
this.lastCallRendererOutput = void 0;
|
|
231
|
+
this.ensureContentTextAttached();
|
|
232
|
+
this.contentText.setText(this.formatToolCallFallback());
|
|
233
|
+
}
|
|
234
|
+
if (!this.isPartial || this.resultDetails !== void 0 || this.resultText || this.resultContent) {
|
|
235
|
+
const result = this.renderExtensionToolResult();
|
|
236
|
+
if (this.appendRendererResult(result)) this.lastResultRendererOutput = result;
|
|
237
|
+
else {
|
|
238
|
+
this.appendRendererResult([this.formatToolResultFallback()].filter(Boolean));
|
|
239
|
+
this.lastResultRendererOutput = void 0;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
ensureContentTextAttached() {
|
|
244
|
+
if (this.contentTextAttached) return;
|
|
245
|
+
this.contentContainer.addChild(this.contentText);
|
|
246
|
+
this.contentTextAttached = true;
|
|
247
|
+
}
|
|
248
|
+
detachContentText() {
|
|
249
|
+
if (!this.contentTextAttached) return;
|
|
250
|
+
this.contentContainer.removeChild(this.contentText);
|
|
251
|
+
this.contentTextAttached = false;
|
|
252
|
+
}
|
|
253
|
+
requestRendererInvalidate() {
|
|
254
|
+
if (this.rendererInvalidationQueued) return;
|
|
255
|
+
this.rendererInvalidationQueued = true;
|
|
256
|
+
queueMicrotask(() => {
|
|
257
|
+
this.rendererInvalidationQueued = false;
|
|
258
|
+
this.refresh();
|
|
259
|
+
this.invalidate();
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
renderExtensionTool() {
|
|
263
|
+
return renderToolWithExtensions(this.createRenderContext(this.lastRendererOutput));
|
|
264
|
+
}
|
|
265
|
+
renderExtensionToolCall() {
|
|
266
|
+
return renderToolCallWithExtensions(this.createRenderContext(this.lastCallRendererOutput), theme);
|
|
267
|
+
}
|
|
268
|
+
renderExtensionToolResult() {
|
|
269
|
+
return renderToolResultWithExtensions(this.createRenderContext(this.lastResultRendererOutput), theme);
|
|
270
|
+
}
|
|
271
|
+
createRenderContext(lastComponent) {
|
|
272
|
+
return {
|
|
58
273
|
toolName: this.toolName,
|
|
274
|
+
toolCallId: this.toolCallId,
|
|
59
275
|
args: this.args,
|
|
60
|
-
resultText: this.
|
|
276
|
+
resultText: this.getDisplayResultText(),
|
|
277
|
+
content: this.resultContent,
|
|
278
|
+
details: this.resultDetails,
|
|
279
|
+
invalidate: () => this.requestRendererInvalidate(),
|
|
280
|
+
lastComponent,
|
|
281
|
+
state: this.rendererState,
|
|
282
|
+
cwd: this.cwd,
|
|
283
|
+
executionStarted: this.executionStarted,
|
|
284
|
+
argsComplete: this.argsComplete,
|
|
61
285
|
isError: this.isError,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
286
|
+
isPartial: this.isPartial,
|
|
287
|
+
expanded: this.expanded,
|
|
288
|
+
showImages: this.showImages
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
formatToolCallFallback() {
|
|
292
|
+
const argsStr = formatArgsSummary(this.args, this.toolName);
|
|
293
|
+
const titleParts = [theme.toolTitle(theme.bold(this.toolName))];
|
|
294
|
+
if (argsStr) titleParts.push(theme.dim(`(${argsStr})`));
|
|
295
|
+
if (this.isPartial && !this.resultText && !this.resultContent && this.resultDetails === void 0) titleParts.push(theme.dim("…"));
|
|
296
|
+
return titleParts.join(" ");
|
|
297
|
+
}
|
|
298
|
+
formatToolResultFallback() {
|
|
299
|
+
const output = this.getDisplayResultText();
|
|
300
|
+
let text = "";
|
|
301
|
+
if (output) {
|
|
302
|
+
const expandKey = this.keybindings ? formatKeyIds(this.keybindings, "app.tools.expand", { capitalize: true }) : "Ctrl+O";
|
|
303
|
+
const lineCount = output.split("\n").length;
|
|
304
|
+
if (this.expanded && isDiffFriendlyTool(this.toolName) && looksLikeUnifiedDiff(output)) text += renderUnifiedDiff(output);
|
|
305
|
+
else if (this.expanded) text += theme.toolOutput(output);
|
|
306
|
+
else if (isReadStyleTool(this.toolName)) {
|
|
307
|
+
const rows = new Text(output, 1, 0).render(80).length;
|
|
308
|
+
const plural = rows === 1 ? "row" : "rows";
|
|
309
|
+
text += theme.dim(` ${rows} ${plural}; ${expandKey} to expand`);
|
|
310
|
+
} else {
|
|
311
|
+
const suffix = lineCount > COLLAPSED_RESULT_VISUAL_LINES ? theme.dim(` (${lineCount} lines; ${expandKey} to expand)`) : "";
|
|
312
|
+
text += theme.dim(`preview${suffix}`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (this.expanded && this.resultDetails !== void 0) {
|
|
316
|
+
const detailsText = formatDetailsPreview(this.resultDetails);
|
|
317
|
+
if (detailsText) text = [text, theme.dim(detailsText)].filter(Boolean).join("\n");
|
|
318
|
+
}
|
|
319
|
+
return text;
|
|
320
|
+
}
|
|
321
|
+
formatToolExecution() {
|
|
322
|
+
const argsStr = formatArgsSummary(this.args, this.toolName);
|
|
66
323
|
const titleParts = [theme.toolTitle(theme.bold(this.toolName))];
|
|
67
324
|
if (argsStr) titleParts.push(theme.dim(`(${argsStr})`));
|
|
68
325
|
let text = titleParts.join(" ");
|
|
69
|
-
const output = this.
|
|
70
|
-
if (output)
|
|
71
|
-
|
|
72
|
-
else {
|
|
73
|
-
const oneLine = output.replace(/\n/g, " ").replace(/\s+/g, " ").trim();
|
|
326
|
+
const output = this.getDisplayResultText();
|
|
327
|
+
if (output) {
|
|
328
|
+
const expandKey = this.keybindings ? formatKeyIds(this.keybindings, "app.tools.expand", { capitalize: true }) : "Ctrl+O";
|
|
74
329
|
const lineCount = output.split("\n").length;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
330
|
+
if (this.expanded && isDiffFriendlyTool(this.toolName) && looksLikeUnifiedDiff(output)) text += `\n${renderUnifiedDiff(output)}`;
|
|
331
|
+
else if (this.expanded) text += `\n${theme.toolOutput(output)}`;
|
|
332
|
+
else if (isReadStyleTool(this.toolName)) this.refreshCollapsedReadSummary(output, expandKey);
|
|
333
|
+
else {
|
|
334
|
+
const suffix = lineCount > COLLAPSED_RESULT_VISUAL_LINES ? theme.dim(` (${lineCount} lines; ${expandKey} to expand)`) : "";
|
|
335
|
+
text += `\n${theme.dim(`preview${suffix}`)}`;
|
|
336
|
+
this.refreshCollapsedOutput(theme.toolOutput(output), lineCount > COLLAPSED_RESULT_VISUAL_LINES ? void 0 : `${expandKey} to expand`);
|
|
337
|
+
}
|
|
338
|
+
} else if (this.isPartial) text += `\n${theme.dim("…")}`;
|
|
339
|
+
if (this.expanded && this.resultDetails !== void 0) {
|
|
340
|
+
const detailsText = formatDetailsPreview(this.resultDetails);
|
|
341
|
+
if (detailsText) text += `\n${theme.dim(detailsText)}`;
|
|
79
342
|
}
|
|
80
|
-
else if (this.isPartial) text += `\n${theme.dim("…")}`;
|
|
81
343
|
return text;
|
|
82
344
|
}
|
|
345
|
+
getDisplayResultText() {
|
|
346
|
+
if (!this.resultContent) return trimTrailingBlankDisplayLines(this.resultText);
|
|
347
|
+
return getToolResultDisplayText(this.resultContent, {
|
|
348
|
+
showImages: this.showImages,
|
|
349
|
+
supportsInlineImages: Boolean(getCapabilities().images)
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
refreshImages() {
|
|
353
|
+
for (const image of this.imageComponents) this.removeChild(image);
|
|
354
|
+
this.imageComponents = [];
|
|
355
|
+
for (const spacer of this.imageSpacers) this.removeChild(spacer);
|
|
356
|
+
this.imageSpacers = [];
|
|
357
|
+
const imageBlocks = this.resultContent?.filter((block) => block.type === "image" && block.data && block.mimeType) ?? [];
|
|
358
|
+
if (imageBlocks.length === 0) return;
|
|
359
|
+
if (!getCapabilities().images || !this.showImages) return;
|
|
360
|
+
for (const block of imageBlocks) {
|
|
361
|
+
const spacer = new Spacer(1);
|
|
362
|
+
const image = new Image(block.data, block.mimeType, { fallbackColor: (text) => theme.toolOutput(text) }, { maxWidthCells: this.imageWidthCells });
|
|
363
|
+
this.imageSpacers.push(spacer);
|
|
364
|
+
this.imageComponents.push(image);
|
|
365
|
+
this.addChild(spacer);
|
|
366
|
+
this.addChild(image);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
refreshCollapsedOutput(text, truncationHint) {
|
|
370
|
+
if (this.collapsedOutputComponent) {
|
|
371
|
+
this.contentContainer.removeChild(this.collapsedOutputComponent);
|
|
372
|
+
this.collapsedOutputComponent = null;
|
|
373
|
+
}
|
|
374
|
+
if (!text) return;
|
|
375
|
+
this.collapsedOutputComponent = createVisualTailComponent(text, COLLAPSED_RESULT_VISUAL_LINES, 1, truncationHint);
|
|
376
|
+
this.contentContainer.addChild(this.collapsedOutputComponent);
|
|
377
|
+
}
|
|
378
|
+
refreshCollapsedReadSummary(text, expandKey) {
|
|
379
|
+
if (this.collapsedReadSummaryComponent) {
|
|
380
|
+
this.contentContainer.removeChild(this.collapsedReadSummaryComponent);
|
|
381
|
+
this.collapsedReadSummaryComponent = null;
|
|
382
|
+
}
|
|
383
|
+
if (!text || !expandKey) return;
|
|
384
|
+
this.collapsedReadSummaryComponent = createCollapsedReadSummaryComponent(text, expandKey, 1);
|
|
385
|
+
this.contentContainer.addChild(this.collapsedReadSummaryComponent);
|
|
386
|
+
}
|
|
83
387
|
};
|
|
388
|
+
function formatDetailsPreview(details) {
|
|
389
|
+
if (details === null) return "";
|
|
390
|
+
if (typeof details === "string") return details;
|
|
391
|
+
try {
|
|
392
|
+
return JSON.stringify(details, null, 2);
|
|
393
|
+
} catch {
|
|
394
|
+
return String(details);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function createVisualTailComponent(text, maxVisualLines, paddingX, truncationHint) {
|
|
398
|
+
let cachedWidth;
|
|
399
|
+
let cachedLines;
|
|
400
|
+
return {
|
|
401
|
+
render(width) {
|
|
402
|
+
if (cachedWidth !== width || cachedLines === void 0) {
|
|
403
|
+
const result = truncateToVisualLines(text, maxVisualLines, width, paddingX);
|
|
404
|
+
cachedWidth = width;
|
|
405
|
+
cachedLines = result.skippedCount > 0 && truncationHint ? [theme.dim(` (${result.skippedCount} rows hidden; ${truncationHint})`), ...result.visualLines] : result.visualLines;
|
|
406
|
+
}
|
|
407
|
+
return cachedLines;
|
|
408
|
+
},
|
|
409
|
+
invalidate() {
|
|
410
|
+
cachedWidth = void 0;
|
|
411
|
+
cachedLines = void 0;
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function createCollapsedReadSummaryComponent(text, expandKey, paddingX) {
|
|
416
|
+
let cachedWidth;
|
|
417
|
+
let cachedLine;
|
|
418
|
+
return {
|
|
419
|
+
render(width) {
|
|
420
|
+
if (cachedWidth !== width || cachedLine === void 0) {
|
|
421
|
+
const rows = new Text(text, paddingX, 0).render(width).length;
|
|
422
|
+
const plural = rows === 1 ? "row" : "rows";
|
|
423
|
+
cachedWidth = width;
|
|
424
|
+
cachedLine = theme.dim(` ${rows} ${plural}; ${expandKey} to expand`);
|
|
425
|
+
}
|
|
426
|
+
return [cachedLine];
|
|
427
|
+
},
|
|
428
|
+
invalidate() {
|
|
429
|
+
cachedWidth = void 0;
|
|
430
|
+
cachedLine = void 0;
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}
|
|
84
434
|
//#endregion
|
|
85
|
-
export { ToolExecutionComponent };
|
|
435
|
+
export { ToolExecutionComponent, getToolResultDisplayText };
|
|
86
436
|
|
|
87
437
|
//# sourceMappingURL=tool-execution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution.js","names":[],"sources":["../../../../src/tui/components/tool-execution.ts"],"sourcesContent":["import { Container, Spacer, Text } from '@earendil-works/pi-tui';\n\nimport { theme } from '../theme.js';\nimport { isDiffFriendlyTool, looksLikeUnifiedDiff, renderUnifiedDiff } from '../tui-tool-diff.js';\nimport { renderToolWithExtensions } from '../extension-host/tool-renderers.js';\n\nconst MAX_ARG_VALUE_LENGTH = 120;\n\nfunction sanitize(text: string): string {\n return text.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/g, '');\n}\n\nfunction formatArgsSummary(args: unknown): string {\n if (!args || typeof args !== 'object') return '';\n const entries = Object.entries(args as Record<string, unknown>);\n if (entries.length === 0) return '';\n return entries\n .map(([key, value]) => {\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n const truncated =\n stringValue.length > MAX_ARG_VALUE_LENGTH\n ? `${stringValue.slice(0, MAX_ARG_VALUE_LENGTH - 3)}...`\n : stringValue;\n return `${key}=${truncated}`;\n })\n .join(', ');\n}\n\nexport class ToolExecutionComponent extends Container {\n private contentText: Text;\n private toolName: string;\n private args: unknown;\n private resultText = '';\n private expanded = false;\n private isError = false;\n private isPartial = true;\n\n constructor(toolName: string, args: unknown) {\n super();\n this.toolName = toolName;\n this.args = args;\n\n this.addChild(new Spacer(1));\n\n const bgFn = (text: string) => theme.toolPendingBg(text);\n this.contentText = new Text('', 1, 1, bgFn);\n this.addChild(this.contentText);\n\n this.refresh();\n }\n\n setArgs(args: unknown): void {\n this.args = args;\n this.refresh();\n }\n\n setExpanded(expanded: boolean): void {\n this.expanded = expanded;\n this.refresh();\n }\n\n setResult(result: string, isError: boolean): void {\n this.resultText = sanitize(result);\n this.isError = isError;\n this.isPartial = false;\n this.refresh();\n }\n\n private refresh(): void {\n const bgFn = this.isPartial\n ? (text: string) => theme.toolPendingBg(text)\n : this.isError\n ? (text: string) => theme.toolErrorBg(text)\n : (text: string) => theme.toolSuccessBg(text);\n this.contentText.setCustomBgFn(bgFn);\n this.contentText.setText(this.formatToolExecution());\n }\n\n private formatToolExecution(): string {\n const custom = renderToolWithExtensions({\n toolName: this.toolName,\n args: this.args,\n resultText: this.resultText,\n isError: this.isError,\n expanded: this.expanded,\n });\n if (custom && custom.length > 0) {\n return custom.join('\\n');\n }\n\n // Title line: 🔧 tool_name (args_summary)\n const argsStr = formatArgsSummary(this.args);\n const titleParts = [theme.toolTitle(theme.bold(this.toolName))];\n if (argsStr) {\n titleParts.push(theme.dim(`(${argsStr})`));\n }\n let text = titleParts.join(' ');\n\n // Output / result — collapsed: single-line summary; expanded: full output\n const output = this.resultText;\n if (output) {\n const useDiff =\n this.expanded &&\n isDiffFriendlyTool(this.toolName) &&\n looksLikeUnifiedDiff(output);\n if (useDiff) {\n text += `\\n${renderUnifiedDiff(output)}`;\n } else if (this.expanded) {\n text += `\\n${theme.toolOutput(output)}`;\n } else {\n // Compact single-line preview: flatten to one line and truncate\n const oneLine = output.replace(/\\n/g, ' ').replace(/\\s+/g, ' ').trim();\n const lineCount = output.split('\\n').length;\n const maxPreviewLength = 200;\n const preview = oneLine.length > maxPreviewLength\n ? `${oneLine.slice(0, maxPreviewLength)}…`\n : oneLine;\n const suffix = lineCount > 1 ? theme.dim(` (${lineCount} lines)`) : '';\n text += `\\n${theme.toolOutput(preview)}${suffix}`;\n }\n } else if (this.isPartial) {\n text += `\\n${theme.dim('…')}`;\n }\n\n return text;\n }\n}\n"],"mappings":";;;;;AAMA,MAAM,uBAAuB;AAE7B,SAAS,SAAS,MAAsB;AACtC,QAAO,KAAK,QAAQ,iCAAiC,GAAG;;AAG1D,SAAS,kBAAkB,MAAuB;AAChD,KAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;CAC9C,MAAM,UAAU,OAAO,QAAQ,KA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;AACF,MAAI,UAAU,OAAO,SAAS,EAC5B,QAAO,OAAO,KAAK,KAAK;EAI1B,MAAM,UAAU,kBAAkB,KAAK,KAAK;EAC5C,MAAM,aAAa,CAAC,MAAM,UAAU,MAAM,KAAK,KAAK,SAAS,CAAC,CAAC;AAC/D,MAAI,QACF,YAAW,KAAK,MAAM,IAAI,IAAI,QAAQ,GAAG,CAAC;EAE5C,IAAI,OAAO,WAAW,KAAK,IAAI;EAG/B,MAAM,SAAS,KAAK;AACpB,MAAI,OAKF,KAHE,KAAK,YACL,mBAAmB,KAAK,SAAS,IACjC,qBAAqB,OAAO,CAE5B,SAAQ,KAAK,kBAAkB,OAAO;WAC7B,KAAK,SACd,SAAQ,KAAK,MAAM,WAAW,OAAO;OAChC;GAEL,MAAM,UAAU,OAAO,QAAQ,OAAO,IAAI,CAAC,QAAQ,QAAQ,IAAI,CAAC,MAAM;GACtE,MAAM,YAAY,OAAO,MAAM,KAAK,CAAC;GACrC,MAAM,mBAAmB;GACzB,MAAM,UAAU,QAAQ,SAAS,mBAC7B,GAAG,QAAQ,MAAM,GAAG,iBAAiB,CAAC,KACtC;GACJ,MAAM,SAAS,YAAY,IAAI,MAAM,IAAI,KAAK,UAAU,SAAS,GAAG;AACpE,WAAQ,KAAK,MAAM,WAAW,QAAQ,GAAG;;WAElC,KAAK,UACd,SAAQ,KAAK,MAAM,IAAI,IAAI;AAG7B,SAAO"}
|
|
1
|
+
{"version":3,"file":"tool-execution.js","names":[],"sources":["../../../../src/tui/components/tool-execution.ts"],"sourcesContent":["import {\n Container,\n type Component,\n getCapabilities,\n Image,\n type KeybindingsManager,\n Spacer,\n Text,\n} from '@earendil-works/pi-tui';\nimport { basename, dirname } from 'node:path';\nimport type { AgentToolResult } from '@earendil-works/pi-agent-core';\n\nimport { theme } from '../theme.js';\nimport { formatKeyIds } from '../format-tui-hotkeys.js';\nimport { isDiffFriendlyTool, looksLikeUnifiedDiff, renderUnifiedDiff } from '../tui-tool-diff.js';\nimport {\n hasStructuredTuiToolRenderer,\n renderToolCallWithExtensions,\n renderToolResultWithExtensions,\n renderToolWithExtensions,\n} from '../extension-host/tool-renderers.js';\nimport {\n parseTuiToolResult,\n type TuiToolContentBlock,\n} from '../tui-tool-result.js';\nimport { truncateToVisualLines } from './visual-truncate.js';\n\nconst MAX_ARG_VALUE_LENGTH = 120;\nconst COLLAPSED_RESULT_VISUAL_LINES = 4;\n\nexport interface ToolExecutionOptions {\n showImages?: boolean;\n imageWidthCells?: number;\n keybindings?: KeybindingsManager;\n toolCallId?: string;\n cwd?: string;\n}\n\nfunction sanitize(text: string): string {\n return text.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/g, '');\n}\n\nfunction trimTrailingBlankDisplayLines(text: string): string {\n return text.replace(/(?:\\r?\\n[ \\t]*)+$/g, '');\n}\n\nexport function getToolResultDisplayText(\n content: TuiToolContentBlock[],\n options: { showImages: boolean; supportsInlineImages: boolean },\n): string {\n const parts: string[] = [];\n for (const block of content) {\n if (block.type === 'text') {\n if (block.text) parts.push(sanitize(block.text));\n continue;\n }\n if (block.type === 'image' && (!options.supportsInlineImages || !options.showImages)) {\n parts.push(block.mimeType ? `[image:${block.mimeType}]` : '[image]');\n continue;\n }\n if (block.type !== 'image') {\n parts.push(block.text ? sanitize(block.text) : `[${block.type}]`);\n }\n }\n return trimTrailingBlankDisplayLines(parts.filter(Boolean).join('\\n'));\n}\n\nfunction formatArgsSummary(args: unknown, toolName: string): string {\n if (!args || typeof args !== 'object') return '';\n const compactRead = isReadStyleTool(toolName) ? formatCompactReadArgs(args) : null;\n if (compactRead) return compactRead;\n const entries = Object.entries(args as Record<string, unknown>);\n if (entries.length === 0) return '';\n return entries\n .map(([key, value]) => {\n const stringValue = formatArgValue(value);\n const truncated =\n stringValue.length > MAX_ARG_VALUE_LENGTH\n ? `${stringValue.slice(0, MAX_ARG_VALUE_LENGTH - 3)}...`\n : stringValue;\n return `${key}=${truncated}`;\n })\n .join(', ');\n}\n\nfunction isReadStyleTool(toolName: string): boolean {\n return ['read', 'read_file', 'memory_get'].includes(toolName);\n}\n\nfunction formatCompactReadArgs(args: unknown): string | null {\n if (!args || typeof args !== 'object') return null;\n const record = args as Record<string, unknown>;\n const rawPath = typeof record.path === 'string'\n ? record.path\n : typeof record.file_path === 'string'\n ? record.file_path\n : undefined;\n if (!rawPath) return null;\n\n const normalized = rawPath.replace(/\\\\/g, '/');\n const base = basename(normalized);\n let label: string | null = null;\n if (base === 'SKILL.md') {\n const parent = basename(dirname(normalized));\n label = parent ? `[skill] ${parent}` : '[skill]';\n } else if (base === 'AGENTS.md') {\n label = `read resource ${normalized}`;\n }\n if (!label) return null;\n\n const start = firstFiniteNumber(record.offset, record.from, record.start, record.line);\n const count = firstFiniteNumber(record.limit, record.lines, record.count);\n if (start != null && count != null && count > 0) {\n label += `:${start}-${start + count - 1}`;\n }\n return label;\n}\n\nfunction firstFiniteNumber(...values: unknown[]): number | null {\n for (const value of values) {\n if (typeof value === 'number' && Number.isFinite(value)) return Math.floor(value);\n if (typeof value === 'string' && value.trim()) {\n const parsed = Number(value);\n if (Number.isFinite(parsed)) return Math.floor(parsed);\n }\n }\n return null;\n}\n\nfunction formatArgValue(value: unknown): string {\n if (typeof value === 'string') return value;\n if (typeof value === 'bigint') return `${value.toString()}n`;\n if (typeof value === 'function') return '[function]';\n if (typeof value === 'symbol') return String(value);\n if (value instanceof Error) return value.message || value.name;\n try {\n const json = JSON.stringify(value);\n return json === undefined ? String(value) : json;\n } catch {\n return String(value);\n }\n}\n\nfunction isTuiComponent(value: unknown): value is Component {\n return Boolean(\n value &&\n typeof value === 'object' &&\n typeof (value as { render?: unknown }).render === 'function',\n );\n}\n\nexport class ToolExecutionComponent extends Container {\n private contentContainer: Container;\n private contentText: Text;\n private collapsedOutputComponent: ReturnType<typeof createVisualTailComponent> | null = null;\n private collapsedReadSummaryComponent: ReturnType<typeof createCollapsedReadSummaryComponent> | null = null;\n private toolName: string;\n private toolCallId: string;\n private args: unknown;\n private argsComplete = true;\n private resultText = '';\n private resultContent: TuiToolContentBlock[] | undefined;\n private resultDetails: unknown;\n private rendererState: Record<string, unknown> = {};\n private lastRendererOutput: string[] | Component | undefined;\n private lastCallRendererOutput: string[] | Component | undefined;\n private lastResultRendererOutput: string[] | Component | undefined;\n private customRendererComponent: Component | undefined;\n private structuredRendererComponents: Component[] = [];\n private contentTextAttached = true;\n private rendererInvalidationQueued = false;\n private imageComponents: Image[] = [];\n private imageSpacers: Spacer[] = [];\n private showImages: boolean;\n private imageWidthCells: number;\n private keybindings: KeybindingsManager | undefined;\n private cwd: string;\n private expanded = false;\n private isError = false;\n private isPartial = true;\n private executionStarted = false;\n\n constructor(toolName: string, toolCallId: string, args: unknown, options: ToolExecutionOptions = {}) {\n super();\n this.toolName = toolName;\n this.toolCallId = toolCallId;\n this.args = args;\n this.showImages = options.showImages ?? true;\n this.imageWidthCells = Math.max(1, Math.floor(options.imageWidthCells ?? 60));\n this.keybindings = options.keybindings;\n this.cwd = options.cwd ?? process.cwd();\n\n this.addChild(new Spacer(1));\n\n const bgFn = (text: string) => theme.toolPendingBg(text);\n this.contentContainer = new Container();\n this.contentText = new Text('', 1, 1, bgFn);\n this.contentContainer.addChild(this.contentText);\n this.addChild(this.contentContainer);\n\n this.refresh();\n }\n\n setArgs(args: unknown): void {\n this.args = args;\n this.refresh();\n }\n\n markExecutionStarted(): void {\n this.executionStarted = true;\n this.refresh();\n }\n\n setArgsComplete(): void {\n this.argsComplete = true;\n this.refresh();\n }\n\n setExpanded(expanded: boolean): void {\n this.expanded = expanded;\n this.refresh();\n }\n\n updateResult(result: AgentToolResult<any> | unknown, isPartial = false, isError = false): void {\n const parsed = parseTuiToolResult(result);\n this.resultText = sanitize(parsed.text);\n this.resultContent = parsed.envelope?.content;\n this.resultDetails = parsed.envelope?.details;\n this.isError = isError;\n this.isPartial = isPartial;\n this.refresh();\n }\n\n setImageOptions(options: ToolExecutionOptions): void {\n if (options.showImages !== undefined) {\n this.showImages = options.showImages;\n }\n if (options.imageWidthCells !== undefined) {\n this.imageWidthCells = Math.max(1, Math.floor(options.imageWidthCells));\n }\n if (options.keybindings !== undefined) {\n this.keybindings = options.keybindings;\n }\n if (options.cwd !== undefined) {\n this.cwd = options.cwd;\n }\n this.refresh();\n }\n\n setPartialDetails(details: unknown): void {\n this.resultDetails = details;\n this.isPartial = true;\n this.refresh();\n }\n\n private refresh(): void {\n const bgFn = this.isPartial\n ? (text: string) => theme.toolPendingBg(text)\n : this.isError\n ? (text: string) => theme.toolErrorBg(text)\n : (text: string) => theme.toolSuccessBg(text);\n this.refreshCollapsedOutput(null);\n this.refreshCollapsedReadSummary(null);\n if (this.customRendererComponent) {\n this.contentContainer.removeChild(this.customRendererComponent);\n this.customRendererComponent = undefined;\n }\n for (const component of this.structuredRendererComponents) {\n this.contentContainer.removeChild(component);\n }\n this.structuredRendererComponents = [];\n this.contentText.setCustomBgFn(bgFn);\n\n if (hasStructuredTuiToolRenderer(this.toolName)) {\n this.detachContentText();\n this.renderStructuredExtensionTool();\n } else {\n const custom = this.renderExtensionTool();\n if (Array.isArray(custom) && custom.length > 0) {\n this.ensureContentTextAttached();\n this.lastRendererOutput = custom;\n this.contentText.setText(custom.join('\\n'));\n } else if (isTuiComponent(custom)) {\n this.detachContentText();\n this.customRendererComponent = custom;\n this.lastRendererOutput = custom;\n this.contentContainer.addChild(custom);\n } else {\n this.ensureContentTextAttached();\n this.lastRendererOutput = undefined;\n this.contentText.setText(this.formatToolExecution());\n }\n }\n this.refreshImages();\n }\n\n private appendRendererResult(result: ReturnType<typeof renderToolWithExtensions>): boolean {\n if (Array.isArray(result) && result.length > 0) {\n const component = new Text(result.join('\\n'), 1, 1);\n this.structuredRendererComponents.push(component);\n this.contentContainer.addChild(component);\n return true;\n }\n if (isTuiComponent(result)) {\n this.structuredRendererComponents.push(result);\n this.contentContainer.addChild(result);\n return true;\n }\n return false;\n }\n\n private renderStructuredExtensionTool(): void {\n const call = this.renderExtensionToolCall();\n if (this.appendRendererResult(call)) {\n this.lastCallRendererOutput = call as string[] | Component;\n } else {\n this.lastCallRendererOutput = undefined;\n this.ensureContentTextAttached();\n this.contentText.setText(this.formatToolCallFallback());\n }\n\n if (!this.isPartial || this.resultDetails !== undefined || this.resultText || this.resultContent) {\n const result = this.renderExtensionToolResult();\n if (this.appendRendererResult(result)) {\n this.lastResultRendererOutput = result as string[] | Component;\n } else {\n this.appendRendererResult([this.formatToolResultFallback()].filter(Boolean));\n this.lastResultRendererOutput = undefined;\n }\n }\n }\n\n private ensureContentTextAttached(): void {\n if (this.contentTextAttached) return;\n this.contentContainer.addChild(this.contentText);\n this.contentTextAttached = true;\n }\n\n private detachContentText(): void {\n if (!this.contentTextAttached) return;\n this.contentContainer.removeChild(this.contentText);\n this.contentTextAttached = false;\n }\n\n private requestRendererInvalidate(): void {\n if (this.rendererInvalidationQueued) return;\n this.rendererInvalidationQueued = true;\n queueMicrotask(() => {\n this.rendererInvalidationQueued = false;\n this.refresh();\n this.invalidate();\n });\n }\n\n private renderExtensionTool(): ReturnType<typeof renderToolWithExtensions> {\n return renderToolWithExtensions(this.createRenderContext(this.lastRendererOutput));\n }\n\n private renderExtensionToolCall(): ReturnType<typeof renderToolWithExtensions> {\n return renderToolCallWithExtensions(\n this.createRenderContext(this.lastCallRendererOutput),\n theme,\n );\n }\n\n private renderExtensionToolResult(): ReturnType<typeof renderToolWithExtensions> {\n return renderToolResultWithExtensions(\n this.createRenderContext(this.lastResultRendererOutput),\n theme,\n );\n }\n\n private createRenderContext(lastComponent: string[] | Component | undefined) {\n return {\n toolName: this.toolName,\n toolCallId: this.toolCallId,\n args: this.args,\n resultText: this.getDisplayResultText(),\n content: this.resultContent,\n details: this.resultDetails,\n invalidate: () => this.requestRendererInvalidate(),\n lastComponent,\n state: this.rendererState,\n cwd: this.cwd,\n executionStarted: this.executionStarted,\n argsComplete: this.argsComplete,\n isError: this.isError,\n isPartial: this.isPartial,\n expanded: this.expanded,\n showImages: this.showImages,\n };\n }\n\n private formatToolCallFallback(): string {\n const argsStr = formatArgsSummary(this.args, this.toolName);\n const titleParts = [theme.toolTitle(theme.bold(this.toolName))];\n if (argsStr) {\n titleParts.push(theme.dim(`(${argsStr})`));\n }\n if (this.isPartial && !this.resultText && !this.resultContent && this.resultDetails === undefined) {\n titleParts.push(theme.dim('…'));\n }\n return titleParts.join(' ');\n }\n\n private formatToolResultFallback(): string {\n const output = this.getDisplayResultText();\n let text = '';\n if (output) {\n const expandKey = this.keybindings\n ? formatKeyIds(this.keybindings, 'app.tools.expand', { capitalize: true })\n : 'Ctrl+O';\n const lineCount = output.split('\\n').length;\n const useDiff =\n this.expanded &&\n isDiffFriendlyTool(this.toolName) &&\n looksLikeUnifiedDiff(output);\n if (useDiff) {\n text += renderUnifiedDiff(output);\n } else if (this.expanded) {\n text += theme.toolOutput(output);\n } else if (isReadStyleTool(this.toolName)) {\n const rows = new Text(output, 1, 0).render(80).length;\n const plural = rows === 1 ? 'row' : 'rows';\n text += theme.dim(` ${rows} ${plural}; ${expandKey} to expand`);\n } else {\n const suffix = lineCount > COLLAPSED_RESULT_VISUAL_LINES\n ? theme.dim(` (${lineCount} lines; ${expandKey} to expand)`)\n : '';\n text += theme.dim(`preview${suffix}`);\n }\n }\n if (this.expanded && this.resultDetails !== undefined) {\n const detailsText = formatDetailsPreview(this.resultDetails);\n if (detailsText) {\n text = [text, theme.dim(detailsText)].filter(Boolean).join('\\n');\n }\n }\n return text;\n }\n\n private formatToolExecution(): string {\n // Title line: 🔧 tool_name (args_summary)\n const argsStr = formatArgsSummary(this.args, this.toolName);\n const titleParts = [theme.toolTitle(theme.bold(this.toolName))];\n if (argsStr) {\n titleParts.push(theme.dim(`(${argsStr})`));\n }\n let text = titleParts.join(' ');\n\n // Output / result — collapsed: single-line summary; expanded: full output\n const output = this.getDisplayResultText();\n if (output) {\n const expandKey = this.keybindings\n ? formatKeyIds(this.keybindings, 'app.tools.expand', { capitalize: true })\n : 'Ctrl+O';\n const lineCount = output.split('\\n').length;\n const useDiff =\n this.expanded &&\n isDiffFriendlyTool(this.toolName) &&\n looksLikeUnifiedDiff(output);\n if (useDiff) {\n text += `\\n${renderUnifiedDiff(output)}`;\n } else if (this.expanded) {\n text += `\\n${theme.toolOutput(output)}`;\n } else if (isReadStyleTool(this.toolName)) {\n this.refreshCollapsedReadSummary(output, expandKey);\n } else {\n const suffix = lineCount > COLLAPSED_RESULT_VISUAL_LINES\n ? theme.dim(` (${lineCount} lines; ${expandKey} to expand)`)\n : '';\n text += `\\n${theme.dim(`preview${suffix}`)}`;\n this.refreshCollapsedOutput(\n theme.toolOutput(output),\n lineCount > COLLAPSED_RESULT_VISUAL_LINES ? undefined : `${expandKey} to expand`,\n );\n }\n } else if (this.isPartial) {\n text += `\\n${theme.dim('…')}`;\n }\n\n if (this.expanded && this.resultDetails !== undefined) {\n const detailsText = formatDetailsPreview(this.resultDetails);\n if (detailsText) {\n text += `\\n${theme.dim(detailsText)}`;\n }\n }\n\n return text;\n }\n\n private getDisplayResultText(): string {\n if (!this.resultContent) {\n return trimTrailingBlankDisplayLines(this.resultText);\n }\n return getToolResultDisplayText(this.resultContent, {\n showImages: this.showImages,\n supportsInlineImages: Boolean(getCapabilities().images),\n });\n }\n\n private refreshImages(): void {\n for (const image of this.imageComponents) {\n this.removeChild(image);\n }\n this.imageComponents = [];\n for (const spacer of this.imageSpacers) {\n this.removeChild(spacer);\n }\n this.imageSpacers = [];\n\n const imageBlocks = this.resultContent?.filter(\n (block) => block.type === 'image' && block.data && block.mimeType,\n ) ?? [];\n if (imageBlocks.length === 0) return;\n\n const capabilities = getCapabilities();\n if (!capabilities.images || !this.showImages) return;\n\n for (const block of imageBlocks) {\n const spacer = new Spacer(1);\n const image = new Image(\n block.data!,\n block.mimeType!,\n { fallbackColor: (text: string) => theme.toolOutput(text) },\n { maxWidthCells: this.imageWidthCells },\n );\n this.imageSpacers.push(spacer);\n this.imageComponents.push(image);\n this.addChild(spacer);\n this.addChild(image);\n }\n }\n\n private refreshCollapsedOutput(text: string | null, truncationHint?: string): void {\n if (this.collapsedOutputComponent) {\n this.contentContainer.removeChild(this.collapsedOutputComponent);\n this.collapsedOutputComponent = null;\n }\n if (!text) return;\n this.collapsedOutputComponent = createVisualTailComponent(\n text,\n COLLAPSED_RESULT_VISUAL_LINES,\n 1,\n truncationHint,\n );\n this.contentContainer.addChild(this.collapsedOutputComponent);\n }\n\n private refreshCollapsedReadSummary(text: string | null, expandKey?: string): void {\n if (this.collapsedReadSummaryComponent) {\n this.contentContainer.removeChild(this.collapsedReadSummaryComponent);\n this.collapsedReadSummaryComponent = null;\n }\n if (!text || !expandKey) return;\n this.collapsedReadSummaryComponent = createCollapsedReadSummaryComponent(text, expandKey, 1);\n this.contentContainer.addChild(this.collapsedReadSummaryComponent);\n }\n}\n\nfunction formatDetailsPreview(details: unknown): string {\n if (details === null) return '';\n if (typeof details === 'string') return details;\n try {\n return JSON.stringify(details, null, 2);\n } catch {\n return String(details);\n }\n}\n\nfunction createVisualTailComponent(\n text: string,\n maxVisualLines: number,\n paddingX: number,\n truncationHint?: string,\n) {\n let cachedWidth: number | undefined;\n let cachedLines: string[] | undefined;\n return {\n render(width: number): string[] {\n if (cachedWidth !== width || cachedLines === undefined) {\n const result = truncateToVisualLines(text, maxVisualLines, width, paddingX);\n cachedWidth = width;\n cachedLines =\n result.skippedCount > 0 && truncationHint\n ? [theme.dim(` (${result.skippedCount} rows hidden; ${truncationHint})`), ...result.visualLines]\n : result.visualLines;\n }\n return cachedLines;\n },\n invalidate(): void {\n cachedWidth = undefined;\n cachedLines = undefined;\n },\n };\n}\n\nfunction createCollapsedReadSummaryComponent(text: string, expandKey: string, paddingX: number) {\n let cachedWidth: number | undefined;\n let cachedLine: string | undefined;\n return {\n render(width: number): string[] {\n if (cachedWidth !== width || cachedLine === undefined) {\n const rows = new Text(text, paddingX, 0).render(width).length;\n const plural = rows === 1 ? 'row' : 'rows';\n cachedWidth = width;\n cachedLine = theme.dim(` ${rows} ${plural}; ${expandKey} to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,0BACP,MACA,gBACA,UACA,gBACA;CACA,IAAI;CACJ,IAAI;AACJ,QAAO;EACL,OAAO,OAAyB;AAC9B,OAAI,gBAAgB,SAAS,gBAAgB,KAAA,GAAW;IACtD,MAAM,SAAS,sBAAsB,MAAM,gBAAgB,OAAO,SAAS;AAC3E,kBAAc;AACd,kBACE,OAAO,eAAe,KAAK,iBACvB,CAAC,MAAM,IAAI,MAAM,OAAO,aAAa,gBAAgB,eAAe,GAAG,EAAE,GAAG,OAAO,YAAY,GAC/F,OAAO;;AAEf,UAAO;;EAET,aAAmB;AACjB,iBAAc,KAAA;AACd,iBAAc,KAAA;;EAEjB;;AAGH,SAAS,oCAAoC,MAAc,WAAmB,UAAkB;CAC9F,IAAI;CACJ,IAAI;AACJ,QAAO;EACL,OAAO,OAAyB;AAC9B,OAAI,gBAAgB,SAAS,eAAe,KAAA,GAAW;IACrD,MAAM,OAAO,IAAI,KAAK,MAAM,UAAU,EAAE,CAAC,OAAO,MAAM,CAAC;IACvD,MAAM,SAAS,SAAS,IAAI,QAAQ;AACpC,kBAAc;AACd,iBAAa,MAAM,IAAI,KAAK,KAAK,GAAG,OAAO,IAAI,UAAU,YAAY;;AAEvE,UAAO,CAAC,WAAW;;EAErB,aAAmB;AACjB,iBAAc,KAAA;AACd,gBAAa,KAAA;;EAEhB"}
|
|
@@ -2,6 +2,9 @@ import type { Component } from '@earendil-works/pi-tui';
|
|
|
2
2
|
import type { TuiState } from '../tui-types.js';
|
|
3
3
|
/** Compact token counts (aligned with pi coding-agent footer). */
|
|
4
4
|
export declare function formatTokens(count: number): string;
|
|
5
|
+
export declare function sanitizeStatusText(text: string): string;
|
|
6
|
+
export declare function formatQueuedMessageLines(state: TuiState, width: number, dequeueHint: string): string[];
|
|
7
|
+
export declare function formatCwdForFooter(cwd: string, home: string | undefined): string;
|
|
5
8
|
/**
|
|
6
9
|
* Multi-line footer below the input editor (pi coding-agent style):
|
|
7
10
|
* cwd · session, then a single padded row: status/tokens on the left, model on the right.
|
|
@@ -9,11 +12,16 @@ export declare function formatTokens(count: number): string;
|
|
|
9
12
|
export declare class TuiBottomBar implements Component {
|
|
10
13
|
private readonly getState;
|
|
11
14
|
private readonly getThinkingDefault;
|
|
15
|
+
private readonly getDequeueHint;
|
|
12
16
|
private extensionLines;
|
|
17
|
+
private extensionComponents;
|
|
13
18
|
private extensionStatusParts;
|
|
14
|
-
|
|
19
|
+
private customComponent;
|
|
20
|
+
constructor(getState: () => TuiState, getThinkingDefault: () => string | undefined, getDequeueHint?: () => string);
|
|
15
21
|
setExtensionLines(lines: string[]): void;
|
|
22
|
+
setExtensionComponents(components: Component[]): void;
|
|
16
23
|
setExtensionStatusParts(parts: string[]): void;
|
|
24
|
+
setCustomComponent(component: Component | undefined): void;
|
|
17
25
|
invalidate(): void;
|
|
18
26
|
render(width: number): string[];
|
|
19
27
|
}
|