dsh-plugin-dev-kb 1.3.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.en.md +6 -6
- package/README.md +13 -8
- package/kb/INDEX.md +25 -21
- package/kb/README.md +6 -4
- package/kb/extra/AGENTS.md +14 -12
- package/kb/extra/agent-lifecycle.md +91 -0
- package/kb/extra/agent-lifecycle.zh.md +93 -0
- package/kb/extra/api-gateway.md +172 -0
- package/kb/extra/api-gateway.zh.md +178 -0
- package/kb/extra/architecture.md +165 -0
- package/kb/extra/architecture.zh.md +169 -0
- package/kb/extra/capability-seams.md +714 -0
- package/kb/extra/capability-seams.zh.md +716 -0
- package/kb/extra/cli-help.md +203 -0
- package/kb/extra/cli-help.zh.md +205 -0
- package/kb/extra/config-catalog.md +4801 -0
- package/kb/extra/config-catalog.zh.md +4803 -0
- package/kb/extra/cookbook/adding-a-package.md +170 -0
- package/kb/extra/cookbook/adding-a-package.zh.md +170 -0
- package/kb/extra/cookbook/adding-a-plugin-preview.md +52 -0
- package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +52 -0
- package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
- package/kb/extra/cookbook/adding-a-session-format-version.md +51 -7
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +51 -7
- package/kb/extra/cookbook/adding-a-settings-card.md +72 -0
- package/kb/extra/cookbook/adding-a-settings-card.zh.md +72 -0
- package/kb/extra/cookbook/adding-a-tool.md +101 -0
- package/kb/extra/cookbook/adding-a-tool.zh.md +103 -0
- package/kb/extra/cookbook/adding-an-llm-adapter.md +43 -0
- package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +43 -0
- package/kb/extra/cookbook/extension-cookbook.md +132 -0
- package/kb/extra/cookbook/extension-cookbook.zh.md +136 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +122 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +122 -0
- package/kb/extra/cordis-api/context.md +364 -0
- package/kb/extra/cordis-api/context.zh.md +366 -0
- package/kb/extra/cordis-api/events.md +207 -0
- package/kb/extra/cordis-api/events.zh.md +209 -0
- package/kb/extra/cordis-api/fiber.md +375 -0
- package/kb/extra/cordis-api/fiber.zh.md +377 -0
- package/kb/extra/cordis-api/inherited.md +38 -0
- package/kb/extra/cordis-api/registry.md +152 -0
- package/kb/extra/cordis-api/registry.zh.md +154 -0
- package/kb/extra/cordis-api/service.md +102 -0
- package/kb/extra/cordis-api/service.zh.md +104 -0
- package/kb/extra/cordis-tutorial/01-first-plugin.md +95 -0
- package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +95 -0
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
- package/kb/extra/cordis-tutorial/03-services.md +98 -0
- package/kb/extra/cordis-tutorial/03-services.zh.md +98 -0
- package/kb/extra/cordis-tutorial/04-events.md +144 -0
- package/kb/extra/cordis-tutorial/04-events.zh.md +144 -0
- package/kb/extra/cordis-tutorial/05-config.md +111 -0
- package/kb/extra/cordis-tutorial/05-config.zh.md +111 -0
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
- package/kb/extra/cordis-tutorial/07-into-the-harness.md +108 -0
- package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +108 -0
- package/kb/extra/cordis-tutorial/index.md +60 -0
- package/kb/extra/cordis-tutorial/index.zh.md +62 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +22 -23
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +21 -22
- package/kb/extra/defensive-patterns/README.md +25 -0
- package/kb/extra/defensive-patterns/README.zh.md +27 -0
- package/kb/extra/defensive-patterns/client-components.md +493 -0
- package/kb/extra/defensive-patterns/client-components.zh.md +495 -0
- package/kb/extra/defensive-patterns/conversation-and-session.md +316 -0
- package/kb/extra/defensive-patterns/conversation-and-session.zh.md +316 -0
- package/kb/extra/defensive-patterns/general.md +222 -0
- package/kb/extra/defensive-patterns/general.zh.md +252 -0
- package/kb/extra/defensive-patterns/package-surface.md +231 -0
- package/kb/extra/defensive-patterns/package-surface.zh.md +231 -0
- package/kb/extra/defensive-patterns/remote-and-api.md +115 -0
- package/kb/extra/defensive-patterns/remote-and-api.zh.md +115 -0
- package/kb/extra/development.md +55 -18
- package/kb/extra/development.zh.md +56 -18
- package/kb/extra/event-producer-consumer.md +90 -68
- package/kb/extra/event-producer-consumer.zh.md +91 -69
- package/kb/extra/experimental-persistence-catalog.md +17 -0
- package/kb/extra/experimental-persistence-catalog.zh.md +17 -0
- package/kb/extra/glossary.md +2 -1
- package/kb/extra/glossary.zh.md +2 -1
- package/kb/extra/i18n/README.md +15 -7
- package/kb/extra/i18n/README.zh.md +15 -7
- package/kb/extra/i18n/style-samples.md +2 -2
- package/kb/extra/i18n/terminology.md +5 -4
- package/kb/extra/i18n/translation-prompt.md +2 -2
- package/kb/extra/module-graph.md +759 -432
- package/kb/extra/module-graph.zh.md +759 -432
- package/kb/extra/persistence-catalog.md +9140 -0
- package/kb/extra/persistence-catalog.zh.md +9142 -0
- package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
- package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-09-13-working-directory.md +48 -0
- package/kb/extra/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.md +52 -0
- package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
- package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
- package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
- package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.md +60 -0
- package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +90 -0
- package/kb/extra/persistence-changes/README.zh.md +90 -0
- package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
- package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/kb/extra/persistence-changes/releases/README.md +103 -0
- package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
- package/kb/extra/rescope.md +1 -1
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/session-format-status.md +24 -8
- package/kb/extra/session-format-status.zh.md +24 -8
- package/kb/extra/subsystems/README.md +76 -0
- package/kb/extra/subsystems/README.zh.md +76 -0
- package/kb/extra/subsystems/agent-team.md +61 -37
- package/kb/extra/subsystems/agent-team.zh.md +61 -37
- package/kb/extra/subsystems/approval.md +170 -0
- package/kb/extra/subsystems/approval.zh.md +170 -0
- package/kb/extra/subsystems/attachment.md +19 -9
- package/kb/extra/subsystems/attachment.zh.md +19 -9
- package/kb/extra/subsystems/boot.md +447 -0
- package/kb/extra/subsystems/boot.zh.md +447 -0
- package/kb/extra/subsystems/browser-use.md +67 -0
- package/kb/extra/subsystems/browser-use.zh.md +67 -0
- package/kb/extra/subsystems/claude-code-mods.md +146 -0
- package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
- package/kb/extra/subsystems/client-modules.md +198 -0
- package/kb/extra/subsystems/client-modules.zh.md +198 -0
- package/kb/extra/subsystems/client-resources.md +92 -0
- package/kb/extra/subsystems/client-resources.zh.md +92 -0
- package/kb/extra/subsystems/commands.md +223 -0
- package/kb/extra/subsystems/commands.zh.md +223 -0
- package/kb/extra/subsystems/compaction.md +284 -0
- package/kb/extra/subsystems/compaction.zh.md +284 -0
- package/kb/extra/subsystems/computer-use.md +59 -0
- package/kb/extra/subsystems/computer-use.zh.md +59 -0
- package/kb/extra/subsystems/conversation.md +301 -0
- package/kb/extra/subsystems/conversation.zh.md +303 -0
- package/kb/extra/subsystems/core.md +1113 -0
- package/kb/extra/subsystems/core.zh.md +1125 -0
- package/kb/extra/subsystems/credentials.md +493 -0
- package/kb/extra/subsystems/credentials.zh.md +493 -0
- package/kb/extra/subsystems/deliverables.md +178 -0
- package/kb/extra/subsystems/deliverables.zh.md +178 -0
- package/kb/extra/subsystems/extensions.md +6 -4
- package/kb/extra/subsystems/extensions.zh.md +6 -4
- package/kb/extra/subsystems/feedback.md +4 -4
- package/kb/extra/subsystems/feedback.zh.md +4 -4
- package/kb/extra/subsystems/filesystem.md +530 -0
- package/kb/extra/subsystems/filesystem.zh.md +530 -0
- package/kb/extra/subsystems/goal.md +313 -0
- package/kb/extra/subsystems/goal.zh.md +313 -0
- package/kb/extra/subsystems/jobs.md +554 -0
- package/kb/extra/subsystems/jobs.zh.md +554 -0
- package/kb/extra/subsystems/llm-streaming.md +1196 -0
- package/kb/extra/subsystems/llm-streaming.zh.md +1202 -0
- package/kb/extra/subsystems/lsp.md +202 -0
- package/kb/extra/subsystems/lsp.zh.md +202 -0
- package/kb/extra/subsystems/mcp.md +139 -0
- package/kb/extra/subsystems/mcp.zh.md +139 -0
- package/kb/extra/subsystems/office-to-pdf.md +87 -0
- package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
- package/kb/extra/subsystems/otel.md +44 -0
- package/kb/extra/subsystems/otel.zh.md +44 -0
- package/kb/extra/subsystems/permission-presets.md +167 -0
- package/kb/extra/subsystems/permission-presets.zh.md +167 -0
- package/kb/extra/subsystems/persistence.md +418 -0
- package/kb/extra/subsystems/persistence.zh.md +418 -0
- package/kb/extra/subsystems/plan.md +87 -0
- package/kb/extra/subsystems/plan.zh.md +87 -0
- package/kb/extra/subsystems/product-telemetry.md +81 -0
- package/kb/extra/subsystems/product-telemetry.zh.md +81 -0
- package/kb/extra/subsystems/ptc-runtime.md +250 -0
- package/kb/extra/subsystems/ptc-runtime.zh.md +250 -0
- package/kb/extra/subsystems/sandbox.md +221 -0
- package/kb/extra/subsystems/sandbox.zh.md +221 -0
- package/kb/extra/subsystems/schedule.md +550 -0
- package/kb/extra/subsystems/schedule.zh.md +550 -0
- package/kb/extra/subsystems/scope.md +59 -0
- package/kb/extra/subsystems/scope.zh.md +61 -0
- package/kb/extra/subsystems/session-projection.md +356 -0
- package/kb/extra/subsystems/session-projection.zh.md +356 -0
- package/kb/extra/subsystems/session-query.md +511 -0
- package/kb/extra/subsystems/session-query.zh.md +511 -0
- package/kb/extra/subsystems/session-reference.md +224 -0
- package/kb/extra/subsystems/session-reference.zh.md +224 -0
- package/kb/extra/subsystems/session-telemetry.md +212 -0
- package/kb/extra/subsystems/session-telemetry.zh.md +212 -0
- package/kb/extra/subsystems/session-title.md +213 -0
- package/kb/extra/subsystems/session-title.zh.md +213 -0
- package/kb/extra/subsystems/session.md +1339 -0
- package/kb/extra/subsystems/session.zh.md +1343 -0
- package/kb/extra/subsystems/settings.md +155 -0
- package/kb/extra/subsystems/settings.zh.md +155 -0
- package/kb/extra/subsystems/shell.md +314 -0
- package/kb/extra/subsystems/shell.zh.md +314 -0
- package/kb/extra/subsystems/sidebar-right.md +160 -0
- package/kb/extra/subsystems/sidebar-right.zh.md +160 -0
- package/kb/extra/subsystems/skills.md +352 -0
- package/kb/extra/subsystems/skills.zh.md +352 -0
- package/kb/extra/subsystems/slots.md +200 -0
- package/kb/extra/subsystems/slots.zh.md +204 -0
- package/kb/extra/subsystems/spill.md +124 -0
- package/kb/extra/subsystems/spill.zh.md +124 -0
- package/kb/extra/subsystems/ssh.md +146 -0
- package/kb/extra/subsystems/ssh.zh.md +146 -0
- package/kb/extra/subsystems/storage.md +259 -0
- package/kb/extra/subsystems/storage.zh.md +259 -0
- package/kb/extra/subsystems/subagent.md +686 -0
- package/kb/extra/subsystems/subagent.zh.md +688 -0
- package/kb/extra/subsystems/subprocess.md +321 -0
- package/kb/extra/subsystems/subprocess.zh.md +321 -0
- package/kb/extra/subsystems/system-prompt.md +254 -0
- package/kb/extra/subsystems/system-prompt.zh.md +254 -0
- package/kb/extra/subsystems/terminal.md +184 -0
- package/kb/extra/subsystems/terminal.zh.md +184 -0
- package/kb/extra/subsystems/todo.md +3 -3
- package/kb/extra/subsystems/todo.zh.md +3 -3
- package/kb/extra/subsystems/token-meter.md +106 -0
- package/kb/extra/subsystems/token-meter.zh.md +106 -0
- package/kb/extra/subsystems/tools.md +747 -0
- package/kb/extra/subsystems/tools.zh.md +747 -0
- package/kb/extra/subsystems/translation.md +103 -0
- package/kb/extra/subsystems/translation.zh.md +103 -0
- package/kb/extra/subsystems/typert.md +690 -0
- package/kb/extra/subsystems/typert.zh.md +690 -0
- package/kb/extra/subsystems/user-questions.md +307 -0
- package/kb/extra/subsystems/user-questions.zh.md +307 -0
- package/kb/extra/subsystems/voice-input.md +164 -0
- package/kb/extra/subsystems/voice-input.zh.md +164 -0
- package/kb/extra/subsystems/web-client.md +100 -0
- package/kb/extra/subsystems/web-client.zh.md +100 -0
- package/kb/extra/subsystems/web-server.md +302 -0
- package/kb/extra/subsystems/web-server.zh.md +302 -0
- package/kb/extra/subsystems/web.md +206 -0
- package/kb/extra/subsystems/web.zh.md +206 -0
- package/kb/extra/subsystems/webhook.md +4 -4
- package/kb/extra/subsystems/webhook.zh.md +2 -2
- package/kb/extra/subsystems/workflow.md +278 -0
- package/kb/extra/subsystems/workflow.zh.md +278 -0
- package/kb/extra/subsystems/working-directory.md +64 -0
- package/kb/extra/subsystems/working-directory.zh.md +64 -0
- package/kb/extra/subsystems/workspace.md +647 -0
- package/kb/extra/subsystems/workspace.zh.md +647 -0
- package/kb/extra/subsystems/worktrees.md +76 -0
- package/kb/extra/subsystems/worktrees.zh.md +76 -0
- package/kb/extra/testing.md +4 -4
- package/kb/extra/testing.zh.md +4 -4
- package/kb/extra/tool-catalog.md +2824 -0
- package/kb/extra/tool-catalog.zh.md +2832 -0
- package/kb/extra/tool-execution-pipeline.md +65 -0
- package/kb/extra/tool-execution-pipeline.zh.md +67 -0
- package/kb/extra/ui-radius.md +117 -0
- package/kb/extra/ui-radius.zh.md +117 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.zh.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.zh.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.zh.md +18 -0
- package/kb/extra/web-styling.md +12 -3
- package/kb/extra/web-styling.zh.md +12 -3
- package/kb/meta/search-index.json +2690 -404
- package/kb/meta/site-pages.txt +188 -188
- package/kb/meta/source.json +7 -6
- package/kb/meta/topics.md +10 -6
- package/kb/site/develop/basic/config.md +1 -0
- package/kb/site/develop/basic/index.md +1 -0
- package/kb/site/develop/basic/publish.md +12 -3
- package/kb/site/develop/basic/tool.md +1 -0
- package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/develop/framework/events.md +1 -0
- package/kb/site/develop/framework/index.md +2 -1
- package/kb/site/develop/framework/service.md +1 -0
- package/kb/site/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/develop/practice/index.md +1 -0
- package/kb/site/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/develop/basic/config.md +1 -0
- package/kb/site/en/develop/basic/index.md +1 -0
- package/kb/site/en/develop/basic/publish.md +12 -3
- package/kb/site/en/develop/basic/tool.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/en/develop/framework/events.md +1 -0
- package/kb/site/en/develop/framework/index.md +2 -1
- package/kb/site/en/develop/framework/service.md +1 -0
- package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/en/develop/practice/index.md +1 -0
- package/kb/site/en/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/guide/github-review.md +8 -10
- package/kb/site/en/guide/mcp-memory.md +1 -0
- package/kb/site/en/guide/network-proxy.md +2 -1
- package/kb/site/en/guide/plugin-market.md +151 -0
- package/kb/site/en/guide/providers-custom-form.png +0 -0
- package/kb/site/en/guide/providers-models-page.png +0 -0
- package/kb/site/en/guide/providers.md +121 -83
- package/kb/site/en/guide/public-deployments.md +40 -0
- package/kb/site/en/guide/python-sdk.md +49 -29
- package/kb/site/en/guide/quickstart.md +2 -0
- package/kb/site/en/guide/schedule.md +70 -11
- package/kb/site/en/reference/agent-lifecycle.md +1 -0
- package/kb/site/en/reference/api-gateway.md +22 -13
- package/kb/site/en/reference/capability-seams.md +242 -77
- package/kb/site/en/reference/config-catalog.md +2102 -904
- package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/en/reference/cookbook/adding-a-tool.md +4 -3
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
- package/kb/site/en/reference/cordis-api/context.md +1 -0
- package/kb/site/en/reference/cordis-api/events.md +1 -0
- package/kb/site/en/reference/cordis-api/fiber.md +4 -3
- package/kb/site/en/reference/cordis-api/inherited.md +16 -16
- package/kb/site/en/reference/cordis-api/registry.md +1 -0
- package/kb/site/en/reference/cordis-api/service.md +1 -0
- package/kb/site/en/reference/cordis-primer.md +1 -0
- package/kb/site/en/reference/experimental-persistence-catalog.md +20 -0
- package/kb/site/en/reference/index.md +27 -21
- package/kb/site/en/reference/persistence-catalog.md +8055 -62
- package/kb/site/en/reference/subsystems/approval.md +2 -1
- package/kb/site/en/reference/subsystems/client-modules.md +37 -15
- package/kb/site/en/reference/subsystems/client-resources.md +3 -1
- package/kb/site/en/reference/subsystems/commands.md +6 -1
- package/kb/site/en/reference/subsystems/compaction.md +50 -3
- package/kb/site/en/reference/subsystems/conversation.md +50 -6
- package/kb/site/en/reference/subsystems/core.md +100 -258
- package/kb/site/en/reference/subsystems/credentials.md +178 -13
- package/kb/site/en/reference/subsystems/filesystem.md +11 -0
- package/kb/site/en/reference/subsystems/goal.md +2 -1
- package/kb/site/en/reference/subsystems/index.md +20 -6
- package/kb/site/en/reference/subsystems/jobs.md +397 -132
- package/kb/site/en/reference/subsystems/llm-streaming.md +157 -50
- package/kb/site/en/reference/subsystems/lsp.md +1 -0
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +6 -3
- package/kb/site/en/reference/subsystems/plan.md +3 -2
- package/kb/site/en/reference/subsystems/ptc-runtime.md +254 -0
- package/kb/site/en/reference/subsystems/sandbox.md +7 -5
- package/kb/site/en/reference/subsystems/schedule.md +392 -33
- package/kb/site/en/reference/subsystems/scope.md +2 -1
- package/kb/site/en/reference/subsystems/session-projection.md +22 -19
- package/kb/site/en/reference/subsystems/session-query.md +3 -0
- package/kb/site/en/reference/subsystems/session-reference.md +8 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/en/reference/subsystems/session-title.md +20 -10
- package/kb/site/en/reference/subsystems/session.md +254 -91
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +37 -28
- package/kb/site/en/reference/subsystems/sidebar-right.md +25 -12
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +88 -70
- package/kb/site/en/reference/subsystems/spill.md +4 -3
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +207 -293
- package/kb/site/en/reference/subsystems/subprocess.md +17 -18
- package/kb/site/en/reference/subsystems/system-prompt.md +36 -3
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +1 -0
- package/kb/site/en/reference/subsystems/tools.md +42 -14
- package/kb/site/en/reference/subsystems/typert.md +362 -14
- package/kb/site/en/reference/subsystems/user-questions.md +131 -1
- package/kb/site/en/reference/subsystems/web-client.md +15 -9
- package/kb/site/en/reference/subsystems/web-server.md +157 -8
- package/kb/site/en/reference/subsystems/web.md +3 -2
- package/kb/site/en/reference/subsystems/workflow.md +10 -9
- package/kb/site/en/reference/subsystems/workspace.md +290 -42
- package/kb/site/en/reference/tool-catalog.md +908 -352
- package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
- package/kb/site/guide/github-review.md +8 -10
- package/kb/site/guide/mcp-memory.md +1 -0
- package/kb/site/guide/network-proxy.md +2 -1
- package/kb/site/guide/plugin-market.md +151 -0
- package/kb/site/guide/providers-custom-form.zh.png +0 -0
- package/kb/site/guide/providers-models-page.zh.png +0 -0
- package/kb/site/guide/providers.md +132 -94
- package/kb/site/guide/public-deployments.md +40 -0
- package/kb/site/guide/python-sdk.md +49 -29
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +1 -0
- package/kb/site/reference/api-gateway.md +28 -13
- package/kb/site/reference/capability-seams.md +242 -77
- package/kb/site/reference/config-catalog.md +2105 -906
- package/kb/site/reference/cookbook/adding-a-package.md +55 -3
- package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/reference/cookbook/adding-a-tool.md +4 -3
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
- package/kb/site/reference/cordis-api/context.md +1 -0
- package/kb/site/reference/cordis-api/events.md +1 -0
- package/kb/site/reference/cordis-api/fiber.md +4 -3
- package/kb/site/reference/cordis-api/inherited.md +16 -16
- package/kb/site/reference/cordis-api/registry.md +1 -0
- package/kb/site/reference/cordis-api/service.md +1 -0
- package/kb/site/reference/cordis-primer.md +1 -0
- package/kb/site/reference/experimental-persistence-catalog.md +20 -0
- package/kb/site/reference/index.md +27 -21
- package/kb/site/reference/persistence-catalog.md +8061 -68
- package/kb/site/reference/subsystems/approval.md +2 -1
- package/kb/site/reference/subsystems/client-modules.md +37 -15
- package/kb/site/reference/subsystems/client-resources.md +3 -1
- package/kb/site/reference/subsystems/commands.md +6 -1
- package/kb/site/reference/subsystems/compaction.md +50 -3
- package/kb/site/reference/subsystems/conversation.md +51 -5
- package/kb/site/reference/subsystems/core.md +102 -258
- package/kb/site/reference/subsystems/credentials.md +178 -13
- package/kb/site/reference/subsystems/filesystem.md +11 -0
- package/kb/site/reference/subsystems/goal.md +2 -1
- package/kb/site/reference/subsystems/index.md +20 -6
- package/kb/site/reference/subsystems/jobs.md +396 -131
- package/kb/site/reference/subsystems/llm-streaming.md +157 -50
- package/kb/site/reference/subsystems/lsp.md +1 -0
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +6 -3
- package/kb/site/reference/subsystems/plan.md +3 -2
- package/kb/site/reference/subsystems/ptc-runtime.md +254 -0
- package/kb/site/reference/subsystems/sandbox.md +7 -5
- package/kb/site/reference/subsystems/schedule.md +392 -33
- package/kb/site/reference/subsystems/scope.md +4 -1
- package/kb/site/reference/subsystems/session-projection.md +22 -19
- package/kb/site/reference/subsystems/session-query.md +3 -0
- package/kb/site/reference/subsystems/session-reference.md +8 -6
- package/kb/site/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/reference/subsystems/session-title.md +20 -10
- package/kb/site/reference/subsystems/session.md +254 -91
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +37 -28
- package/kb/site/reference/subsystems/sidebar-right.md +25 -12
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +92 -70
- package/kb/site/reference/subsystems/spill.md +3 -2
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +208 -296
- package/kb/site/reference/subsystems/subprocess.md +17 -18
- package/kb/site/reference/subsystems/system-prompt.md +36 -3
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +1 -0
- package/kb/site/reference/subsystems/tools.md +42 -14
- package/kb/site/reference/subsystems/typert.md +362 -14
- package/kb/site/reference/subsystems/user-questions.md +132 -2
- package/kb/site/reference/subsystems/web-client.md +15 -9
- package/kb/site/reference/subsystems/web-server.md +157 -8
- package/kb/site/reference/subsystems/web.md +3 -2
- package/kb/site/reference/subsystems/workflow.md +10 -9
- package/kb/site/reference/subsystems/workspace.md +290 -42
- package/kb/site/reference/tool-catalog.md +862 -306
- package/kb/site/reference/tool-execution-pipeline.md +7 -3
- package/package.json +2 -2
- package/skills/dsh-dev-sandbox.md +67 -0
- package/skills/dsh-plugin-dev-kb.md +5 -4
- package/kb/extra/defensive-patterns.md +0 -33
- package/kb/extra/defensive-patterns.zh.md +0 -35
- package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/en/reference/subsystems/invariants.md +0 -91
- package/kb/site/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/reference/subsystems/invariants.md +0 -91
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](agent-team.md) | 中文
|
|
4
4
|
|
|
5
|
-
实验性隐式 Root Team 领域、模型工具与宿主适配器共享的类型。[Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、task 与共享 checkout 决策;本页记录 [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts)
|
|
5
|
+
实验性隐式 Root Team 领域、模型工具与宿主适配器共享的类型。[Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、task 与共享 checkout 决策;本页记录 [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts) 中的持久与客户端可见形式。
|
|
6
6
|
|
|
7
7
|
## 身份与 roster
|
|
8
8
|
|
|
9
|
-
`TeamId`
|
|
9
|
+
`TeamId` 是使用独立[品牌类型](core.zh.md#branded-ids)的 root `SessionId`。`TeamTaskId` 按 `task-<n>` 分配。新发送返回目标 inbox 的 `MessageId`;`TeamMessageId` 仅供历史 mailbox 记录保留。teammate 名称是不可变标签。
|
|
10
10
|
|
|
11
11
|
```ts type-equiv
|
|
12
12
|
/** Whole durable value written on every teammate lifecycle change. */
|
|
@@ -21,14 +21,14 @@ interface TeamMemberSnapshot {
|
|
|
21
21
|
}
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
每个 member 都从 `provisioning` 开始,并且只到达一个终态 roster phase:`active` 或 `failed
|
|
24
|
+
每个 member 都从 `provisioning` 开始,并且只到达一个终态 roster phase:`active` 或 `failed`。roster 的 `running`/`inactive` 状态单独派生,绝不会重写该记录。
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## 消息与历史 mailbox
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
新发送返回 inbox 接收结果或拒绝。目标保存现有 `agent-message` source,包含真实发送者 Session id 和发送者名称正文前缀。Team 不为新消息提供 outbox 或重发去重。[包约定](../../packages/experimental/agent-team/README.zh.md#understand-the-implementation)定义持久化。以下 mailbox 类型继续可读,以便历史 Lead 日志仍能回放;Team 不投递其中的 pending 记录。
|
|
29
29
|
|
|
30
30
|
```ts type-equiv
|
|
31
|
-
/** One peer message
|
|
31
|
+
/** One peer message recorded by the historical Team mailbox. */
|
|
32
32
|
interface TeamMessageSnapshot {
|
|
33
33
|
readonly id: TeamMessageId
|
|
34
34
|
readonly senderId: SessionId
|
|
@@ -38,12 +38,12 @@ interface TeamMessageSnapshot {
|
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
每条消息都会尝试 Steer 投递。running target 在最近的步骤边界收到消息,
|
|
41
|
+
每条消息都会尝试 Steer 投递。running target 在最近的步骤边界收到消息,inactive target 在已加载时启动一个轮次,否则冷恢复。调用方不能选择其他模式,因此持久记录不存储调度方式。
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
历史 `team-message` source 保留旧消息 id 与发送者归属;客户端用它们展示消息标题和图标。
|
|
44
44
|
|
|
45
45
|
```ts type-equiv
|
|
46
|
-
/** Source
|
|
46
|
+
/** Source recorded by a target Session for one historical Team mailbox delivery. */
|
|
47
47
|
interface TeamMessageSource {
|
|
48
48
|
readonly kind: 'team-message'
|
|
49
49
|
readonly teamId: TeamId
|
|
@@ -73,9 +73,56 @@ interface TeamTaskSnapshot {
|
|
|
73
73
|
|
|
74
74
|
`pending` 表示尚未开始或已经释放,`in_progress` 携带 owner,`completed` 满足 blocker,`deleted` 是保留的 tombstone。view 会添加 owner name、readiness 和 write-scope 重叠警告,但不会改变持久快照。
|
|
75
75
|
|
|
76
|
+
<a id="web-projection"></a>
|
|
77
|
+
|
|
78
|
+
## Web 投影
|
|
79
|
+
|
|
80
|
+
Lead Session 通过 `SessionProjectionMap.agentTeam` 发布持久 roster 行与未删除任务视图。`failure` 在最后有效状态旁报告被拒绝的持久记录。成员活动来自 Session 状态;模型标签来自各成员的 `modelSelection` 投影。
|
|
81
|
+
|
|
82
|
+
```ts type-equiv
|
|
83
|
+
/** One durable roster row published through the `agentTeam` Session projection. */
|
|
84
|
+
interface TeamMemberProjection {
|
|
85
|
+
readonly id: SessionId
|
|
86
|
+
readonly name: string
|
|
87
|
+
readonly role: 'lead' | 'teammate'
|
|
88
|
+
/** Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status. */
|
|
89
|
+
readonly phase: TeamMemberPhase
|
|
90
|
+
readonly error?: string
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```ts type-equiv
|
|
95
|
+
/** Runtime-enriched task view returned to tools and hosts. */
|
|
96
|
+
interface TeamTaskView {
|
|
97
|
+
readonly id: TeamTaskId
|
|
98
|
+
readonly revision: number
|
|
99
|
+
readonly subject: string
|
|
100
|
+
readonly description: string
|
|
101
|
+
readonly status: TeamTaskStatus
|
|
102
|
+
readonly blockedBy: TeamTaskId[]
|
|
103
|
+
readonly writeScopes: string[]
|
|
104
|
+
readonly ownerName?: string
|
|
105
|
+
readonly ready: boolean
|
|
106
|
+
readonly writeScopeWarnings: string[]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```ts type-equiv
|
|
111
|
+
/**
|
|
112
|
+
* Durable Team state published to browser clients through the Lead Session's
|
|
113
|
+
* `agentTeam` projection. `failure` names the first rejected persisted Team
|
|
114
|
+
* record; members and tasks then stay at the last valid state.
|
|
115
|
+
*/
|
|
116
|
+
interface TeamProjection {
|
|
117
|
+
readonly members: TeamMemberProjection[]
|
|
118
|
+
readonly tasks: TeamTaskView[]
|
|
119
|
+
readonly failure?: string
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
76
123
|
## 回放
|
|
77
124
|
|
|
78
|
-
`
|
|
125
|
+
`agentTeam` Session 投影把一个 Root Session 回放成roster、任务板与历史 queued-minus-delivered mailbox。它按 `TeamId` 选取记录,因此普通 fork 继承的 event 保留 ancestor id,绝不会进入新 Root 的状态。Session event 的 `seq` 与 `time` 继续负责顺序和时间记录,Team snapshot 不再重复保存它们。roster 与 task 读取以 view 形式到达调用方,而 pending 邮件不对调用方公开。包 [README](../../packages/experimental/agent-team/README.zh.md)负责 operation、authorization、recovery 和限制行为。
|
|
79
126
|
|
|
80
127
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
81
128
|
|
|
@@ -115,10 +162,10 @@ listMembers(agent: Agent): TeamMemberView[]
|
|
|
115
162
|
async spawnTeammate(caller: Agent, request: SpawnTeammateRequest): Promise<SpawnTeammateResult>
|
|
116
163
|
|
|
117
164
|
/**
|
|
118
|
-
*
|
|
165
|
+
* Steer one peer message into the target inbox or reject the attempt.
|
|
119
166
|
* @param caller - exact live sending Team member.
|
|
120
|
-
* @param request - target name, content, and
|
|
121
|
-
* @returns
|
|
167
|
+
* @param request - target name, content, and cancellation before acceptance.
|
|
168
|
+
* @returns accepted inbox identity; acceptance follows normal Agent persistence and does not await model processing.
|
|
122
169
|
*/
|
|
123
170
|
async sendMessage(caller: Agent, request: SendTeamMessageRequest): Promise<SendTeamMessageResult>
|
|
124
171
|
|
|
@@ -168,7 +215,7 @@ async waitForChange(caller: Agent, timeoutMs: number, signal: AbortSignal): Prom
|
|
|
168
215
|
* @param targetName - durable teammate name.
|
|
169
216
|
* @returns the target status sampled before cancellation.
|
|
170
217
|
*/
|
|
171
|
-
interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | '
|
|
218
|
+
interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | 'inactive' }
|
|
172
219
|
|
|
173
220
|
/**
|
|
174
221
|
* Resolve a caller without throwing, used by scoped-tool installation and observers.
|
|
@@ -176,29 +223,6 @@ interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | 'idl
|
|
|
176
223
|
* @returns Team membership, or undefined for non-Team subagents and stale identities.
|
|
177
224
|
*/
|
|
178
225
|
tryMembership(agent: Agent): TeamMembership | undefined
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Read the current roster and non-deleted task board through the generated Remote API.
|
|
182
|
-
* @param agent - exact live Team member used as the authority credential.
|
|
183
|
-
* @returns detached current roster and task views.
|
|
184
|
-
*/
|
|
185
|
-
@Remote('view') remoteView(agent: Agent): TeamView
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Create one shared task through the generated Remote API.
|
|
189
|
-
* @param agent - exact live Team member creating the task.
|
|
190
|
-
* @param request - task text, blockers, and advisory write scopes.
|
|
191
|
-
* @returns the revision-one task or a typed Team rejection.
|
|
192
|
-
*/
|
|
193
|
-
@Remote('createTask') remoteCreateTask(agent: Agent, request: CreateTeamTaskRequest): Promise<TeamTaskMutationResult>
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Apply one task mutation and preserve Team rejections as business results.
|
|
197
|
-
* @param agent - exact live Team member authorizing the mutation.
|
|
198
|
-
* @param request - task identity, expected revision, action, and action fields.
|
|
199
|
-
* @returns the committed task or a typed Team rejection.
|
|
200
|
-
*/
|
|
201
|
-
@Remote('updateTask') remoteUpdateTask(agent: Agent, request: UpdateTeamTaskRequest): Promise<TeamTaskMutationResult>
|
|
202
226
|
```
|
|
203
227
|
|
|
204
228
|
Types: [Agent](core.zh.md)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# User Approval
|
|
2
|
+
|
|
3
|
+
English | [中文](approval.zh.md)
|
|
4
|
+
|
|
5
|
+
The user-approval seam of [dsh-user-approval](../../packages/interaction/user-approval) answers one question: may this specific action proceed? It owns the shared request/outcome vocabulary, the `ctx.approval` dispatch service, the `approval/request` answerer waterfall, the log-only audit pair, and the per-session `ask`/`never` policy. UI channels may provide human answerers; the [ACP automation bridge](../../packages/acp/acp) provides one-shot machine decisions for its own agents. Callers such as [dsh-tools](../../packages/core/tools) and [dsh-tool-bash](../../packages/shell/tool-bash) consume the closed outcome and fail closed unless it is `allowed-once`.
|
|
6
|
+
|
|
7
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
8
|
+
|
|
9
|
+
## Identity and outcome
|
|
10
|
+
|
|
11
|
+
Every request receives a fresh `ApprovalRequestId`. The brand pairs the `approval/asked` and `approval/decided` audit events without making approval ids interchangeable with tool-call or agent/session ids.
|
|
12
|
+
|
|
13
|
+
```ts type-equiv
|
|
14
|
+
/**
|
|
15
|
+
* Pairs one `approval/asked` audit event with its `approval/decided`.
|
|
16
|
+
* Service-issued (one fresh id per {@link ApprovalService.request} call).
|
|
17
|
+
*/
|
|
18
|
+
type ApprovalRequestId = Branded<'ApprovalRequestId'>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`ApprovalOutcome` is closed and fail-closed. `allowed-once` grants only the asked-about action; callers deny on `rejected`, `cancelled`, and `unavailable`. A missing, non-owning, throwing, or non-conforming answerer becomes `unavailable` rather than opening the gate.
|
|
22
|
+
|
|
23
|
+
```ts type-equiv
|
|
24
|
+
/**
|
|
25
|
+
* Closed approval outcomes: a one-shot grant, explicit rejection, withdrawn
|
|
26
|
+
* request, or unavailable answerer. Callers fail closed on `unavailable`.
|
|
27
|
+
*/
|
|
28
|
+
type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Per-session policy
|
|
32
|
+
|
|
33
|
+
`ApprovalPolicy` determines what happens before interactive answerers run. `ask` delegates to the composed answerer chain, whose no-answer default is `unavailable`; `never` deterministically returns `rejected` without dispatching any answerer. The effective value is the last `approval/policy` event in the session log, falling back to the service config. Consumers read it with `ctx.approval.effectivePolicy(session)`; `setApprovalPolicy(session, policy)` is the single write path, so replay reconstructs the override.
|
|
34
|
+
|
|
35
|
+
```ts type-equiv
|
|
36
|
+
/**
|
|
37
|
+
* A session's approval policy — what happens to an {@link ApprovalService}
|
|
38
|
+
* ask BEFORE any interactive answerer sees it:
|
|
39
|
+
*
|
|
40
|
+
* - `'ask'` (the default) — delegate to the composed answerers; with none
|
|
41
|
+
* composed the chain falls through to the fail-closed `'unavailable'`.
|
|
42
|
+
* - `'never'` — never prompt anyone: every ask resolves `'rejected'`
|
|
43
|
+
* deterministically. The strict headless stance (CI, unattended runs) and
|
|
44
|
+
* the policy whose outcome is knowable without asking.
|
|
45
|
+
*/
|
|
46
|
+
type ApprovalPolicy = 'ask' | 'never'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Both policies contribute their complete current meaning to the cache-safe runtime-context snapshot. The sourced `user/message` is the durable model-visible input; changing approval state appends a new full snapshot after retained history without touching the `system/message` nodes that hold the rendered system prompt.
|
|
50
|
+
|
|
51
|
+
## Approval request
|
|
52
|
+
|
|
53
|
+
`ApprovalRequest` identifies the agent and tool action closely enough to route and audit the question. It deliberately omits tool arguments: an answerer attaches the prompt to the already-streamed tool call through `callId` instead of rendering a second copy that could drift. Optional `displayReason` carries requester-owned locale strings to presentation; `reason` remains the audit text.
|
|
54
|
+
|
|
55
|
+
```ts type-equiv
|
|
56
|
+
/**
|
|
57
|
+
* Readonly same-process permission question. `callId` links to an already
|
|
58
|
+
* presented tool call, so arguments are not duplicated here.
|
|
59
|
+
*/
|
|
60
|
+
interface ApprovalRequest extends ApprovalRequestEvent {
|
|
61
|
+
/**
|
|
62
|
+
* The agent on whose behalf the question is asked. Routes the question (a
|
|
63
|
+
* UI answerer only answers for agents it owns) and receives the audit
|
|
64
|
+
* events on its session log.
|
|
65
|
+
*/
|
|
66
|
+
readonly agent: Agent
|
|
67
|
+
/** The tool the question is about (presentation and audit). */
|
|
68
|
+
readonly toolName: string
|
|
69
|
+
/**
|
|
70
|
+
* The exact tool call being decided, when the asker has one — lets a UI
|
|
71
|
+
* attach the prompt to the tool call it already streamed.
|
|
72
|
+
*/
|
|
73
|
+
readonly callId?: ToolCallId
|
|
74
|
+
/** The asker's human-readable explanation of WHY it is asking. */
|
|
75
|
+
readonly reason?: string
|
|
76
|
+
/**
|
|
77
|
+
* Aborting withdraws the question: the request settles `'cancelled'`
|
|
78
|
+
* immediately and a late answer from a still-pending answerer is discarded.
|
|
79
|
+
*/
|
|
80
|
+
readonly signal?: AbortSignal
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Dispatch and audit
|
|
85
|
+
|
|
86
|
+
`ctx.approval.request(req)` requires the requesting session to be inside an open turn. It appends `approval/asked`, obtains one outcome, appends the matching `approval/decided`, and resolves with that outcome. The `never` policy is enforced inside the service before waterfall dispatch, so even an answerer registered later with `prepend` cannot bypass it. Answerers return an outcome when they own the request or call `next()` to delegate; the first answer occupies the single decision slot.
|
|
87
|
+
|
|
88
|
+
The audit events are log-only and do not enter the model transcript. Model-visible behavior is the caller's derived tool result plus the current runtime-context snapshot. Service disposal removes its context contribution; answerer listeners are independently effect-bound to their owning plugins.
|
|
89
|
+
|
|
90
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
91
|
+
|
|
92
|
+
<a id="cordis-surface"></a>
|
|
93
|
+
|
|
94
|
+
## Cordis API
|
|
95
|
+
|
|
96
|
+
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
97
|
+
|
|
98
|
+
<a id="ctxapproval--approvalservice"></a>
|
|
99
|
+
|
|
100
|
+
### `ctx.approval` — `ApprovalService`
|
|
101
|
+
|
|
102
|
+
Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session. It exposes deterministic policy changes to the model through the runtime-context snapshot and switch notices.
|
|
103
|
+
|
|
104
|
+
```ts cordis-catalog
|
|
105
|
+
/**
|
|
106
|
+
* Switch one live agent's policy and queue the transition for its next model
|
|
107
|
+
* step. Session initialization uses {@link setApprovalPolicy} directly
|
|
108
|
+
* because there is no previously visible policy to change.
|
|
109
|
+
* @param agent - the live agent whose policy is changing.
|
|
110
|
+
* @param policy - the new effective policy.
|
|
111
|
+
*/
|
|
112
|
+
setPolicy(agent: Agent, policy: ApprovalPolicy): void
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Ask the composed answerers to decide one readonly same-process request.
|
|
116
|
+
* The service borrows the request, agent, session, and live signal directly.
|
|
117
|
+
* The request requires an open turn because the audit pair must be enclosed
|
|
118
|
+
* by the durable log's commit/replay boundary; an idle ask rejects before
|
|
119
|
+
* appending anything. The answerer phase always produces an outcome: an
|
|
120
|
+
* aborted signal yields `'cancelled'`, a missing or throwing answerer yields
|
|
121
|
+
* `'unavailable'` (fail closed), and a rogue non-vocabulary return value is
|
|
122
|
+
* normalized to `'unavailable'`. A failure that prevents either audit append
|
|
123
|
+
* from committing still rejects because returning an unlogged decision would
|
|
124
|
+
* violate the pair. Session contains post-commit observer failures, so an
|
|
125
|
+
* authoritative append cannot reject the request or suppress its matching
|
|
126
|
+
* audit event.
|
|
127
|
+
* @param req - the pending decision (agent, tool identity, reason, signal).
|
|
128
|
+
* @returns the closed outcome; `'allowed-once'` is the only grant.
|
|
129
|
+
* @throws when no turn is open or either audit event fails before the session
|
|
130
|
+
* append commit point.
|
|
131
|
+
*/
|
|
132
|
+
async request(req: ApprovalRequest): Promise<ApprovalOutcome>
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Read the session override without applying the configured default.
|
|
136
|
+
* @param session - session whose log supplies the override.
|
|
137
|
+
* @returns the last logged policy, or `undefined` without one.
|
|
138
|
+
*/
|
|
139
|
+
overrideOf(session: Session): ApprovalPolicy | undefined
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Types: [Agent](core.md) · [Session](session.md)
|
|
143
|
+
|
|
144
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
145
|
+
|
|
146
|
+
<a id="approval-events"></a>
|
|
147
|
+
|
|
148
|
+
### `approval/*` events
|
|
149
|
+
|
|
150
|
+
<a id="approvalrequest--waterfall"></a>
|
|
151
|
+
|
|
152
|
+
#### `approval/request` — waterfall
|
|
153
|
+
|
|
154
|
+
Ask composed answerers for one decision. Return an outcome to claim the request or call `next()` to delegate. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
155
|
+
|
|
156
|
+
```ts cordis-catalog
|
|
157
|
+
/**
|
|
158
|
+
* Ask composed answerers for one decision. Return an outcome to claim the
|
|
159
|
+
* request or call `next()` to delegate. Scope-filtered dispatch
|
|
160
|
+
* (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
161
|
+
* @param req - pending approval request.
|
|
162
|
+
* @mode waterfall
|
|
163
|
+
*/
|
|
164
|
+
'approval/request'( this: Scoped<Agent>, req: ApprovalRequestEvent, next: () => Promise<ApprovalOutcome>, ): Promise<ApprovalOutcome>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Types: [Agent](core.md) · [Scoped](scope.md)
|
|
168
|
+
|
|
169
|
+
Source: [`packages/interaction/user-approval/src/types.ts`](../../packages/interaction/user-approval/src/types.ts)
|
|
170
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# 用户审批
|
|
2
|
+
|
|
3
|
+
[English](approval.md) | 中文
|
|
4
|
+
|
|
5
|
+
[dsh-user-approval](../../packages/interaction/user-approval) 的用户审批 seam 回答一个问题:这个具体操作是否可以继续?它拥有共享的请求/结果词汇、`ctx.approval` 分发服务、`approval/request` 应答者 waterfall(瀑布式事件)、仅记录日志的审计事件对,以及按会话的 `ask`/`never` 策略。UI 通道可以提供人类应答者;[ACP(Agent Client Protocol)自动化桥接层](../../packages/acp/acp)为其拥有的 agent(智能体)提供一次性机器决策。调用方如 [dsh-tools](../../packages/core/tools) 和 [dsh-tool-bash](../../packages/shell/tool-bash) 消费闭合的结果,除非结果为 `allowed-once`,否则一律拒绝。
|
|
6
|
+
|
|
7
|
+
源码:[`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
8
|
+
|
|
9
|
+
## 标识与结果
|
|
10
|
+
|
|
11
|
+
每个请求都会获得一个全新的 `ApprovalRequestId`。该品牌类型将 `approval/asked` 与 `approval/decided` 审计事件配对,同时不会让审批 id 与工具调用 id 或 agent/会话 id 互换。
|
|
12
|
+
|
|
13
|
+
```ts type-equiv
|
|
14
|
+
/**
|
|
15
|
+
* Pairs one `approval/asked` audit event with its `approval/decided`.
|
|
16
|
+
* Service-issued (one fresh id per {@link ApprovalService.request} call).
|
|
17
|
+
*/
|
|
18
|
+
type ApprovalRequestId = Branded<'ApprovalRequestId'>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`ApprovalOutcome` 是闭合的,且失败时拒绝。`allowed-once` 仅授权所询问的那一个操作;调用方对 `rejected`、`cancelled` 和 `unavailable` 均执行拒绝。缺失、不负责该请求、抛异常或不合规的应答者会产生 `unavailable`,而非放行。
|
|
22
|
+
|
|
23
|
+
```ts type-equiv
|
|
24
|
+
/**
|
|
25
|
+
* Closed approval outcomes: a one-shot grant, explicit rejection, withdrawn
|
|
26
|
+
* request, or unavailable answerer. Callers fail closed on `unavailable`.
|
|
27
|
+
*/
|
|
28
|
+
type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 按会话策略
|
|
32
|
+
|
|
33
|
+
`ApprovalPolicy` 决定在交互式应答者运行之前发生什么。`ask` 委托给组合的应答者链,链的无应答默认值为 `unavailable`;`never` 确定性地返回 `rejected`,不分发任何应答者。生效值为会话日志中最后一条 `approval/policy` 事件,回退到服务配置。消费方通过 `ctx.approval.effectivePolicy(session)` 读取;`setApprovalPolicy(session, policy)` 是唯一的写入路径,因此回放能重建覆盖值。
|
|
34
|
+
|
|
35
|
+
```ts type-equiv
|
|
36
|
+
/**
|
|
37
|
+
* A session's approval policy — what happens to an {@link ApprovalService}
|
|
38
|
+
* ask BEFORE any interactive answerer sees it:
|
|
39
|
+
*
|
|
40
|
+
* - `'ask'` (the default) — delegate to the composed answerers; with none
|
|
41
|
+
* composed the chain falls through to the fail-closed `'unavailable'`.
|
|
42
|
+
* - `'never'` — never prompt anyone: every ask resolves `'rejected'`
|
|
43
|
+
* deterministically. The strict headless stance (CI, unattended runs) and
|
|
44
|
+
* the policy whose outcome is knowable without asking.
|
|
45
|
+
*/
|
|
46
|
+
type ApprovalPolicy = 'ask' | 'never'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
两种策略都会将各自完整的当前含义贡献给缓存安全的运行时上下文快照。带来源的 `user/message` 是持久化且模型可见的输入;审批状态变化时,会在保留的历史后追加一份新的完整快照,而不触碰承载渲染后系统提示词的 `system/message` 节点。
|
|
50
|
+
|
|
51
|
+
## 审批请求
|
|
52
|
+
|
|
53
|
+
`ApprovalRequest` 以足够精确的方式标识 agent 和工具操作,以便路由和审计该问题。它有意省略工具参数:应答者通过 `callId` 将提示附加到已流式输出的工具调用上,而非渲染另一份可能漂移的副本。可选的 `displayReason` 向界面传递请求方提供的本地化字符串;`reason` 仍是审计文本。
|
|
54
|
+
|
|
55
|
+
```ts type-equiv
|
|
56
|
+
/**
|
|
57
|
+
* Readonly same-process permission question. `callId` links to an already
|
|
58
|
+
* presented tool call, so arguments are not duplicated here.
|
|
59
|
+
*/
|
|
60
|
+
interface ApprovalRequest extends ApprovalRequestEvent {
|
|
61
|
+
/**
|
|
62
|
+
* The agent on whose behalf the question is asked. Routes the question (a
|
|
63
|
+
* UI answerer only answers for agents it owns) and receives the audit
|
|
64
|
+
* events on its session log.
|
|
65
|
+
*/
|
|
66
|
+
readonly agent: Agent
|
|
67
|
+
/** The tool the question is about (presentation and audit). */
|
|
68
|
+
readonly toolName: string
|
|
69
|
+
/**
|
|
70
|
+
* The exact tool call being decided, when the asker has one — lets a UI
|
|
71
|
+
* attach the prompt to the tool call it already streamed.
|
|
72
|
+
*/
|
|
73
|
+
readonly callId?: ToolCallId
|
|
74
|
+
/** The asker's human-readable explanation of WHY it is asking. */
|
|
75
|
+
readonly reason?: string
|
|
76
|
+
/**
|
|
77
|
+
* Aborting withdraws the question: the request settles `'cancelled'`
|
|
78
|
+
* immediately and a late answer from a still-pending answerer is discarded.
|
|
79
|
+
*/
|
|
80
|
+
readonly signal?: AbortSignal
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 分发与审计
|
|
85
|
+
|
|
86
|
+
`ctx.approval.request(req)` 要求发起请求的会话处于一个尚未结束的轮次内。它追加 `approval/asked`,获取一个结果,追加对应的 `approval/decided`,然后以该结果完成。`never` 策略在服务内部、waterfall 分发之前强制执行,因此即使后来以 `prepend` 注册的应答者也无法绕过它。应答者在负责处理该请求时返回结果,否则调用 `next()` 委托;第一个应答占据唯一的决策槽位。
|
|
87
|
+
|
|
88
|
+
审计事件仅写入日志,不进入模型 transcript(文本记录)。模型可见的行为是调用方派生的工具结果与当前运行时上下文快照。服务 dispose(资源释放)时会移除其上下文贡献;应答者监听器独立地通过 effect 绑定到其所属插件。
|
|
89
|
+
|
|
90
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
91
|
+
|
|
92
|
+
<a id="cordis-surface"></a>
|
|
93
|
+
|
|
94
|
+
## Cordis API
|
|
95
|
+
|
|
96
|
+
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
97
|
+
|
|
98
|
+
<a id="ctxapproval--approvalservice"></a>
|
|
99
|
+
|
|
100
|
+
### `ctx.approval` — `ApprovalService`
|
|
101
|
+
|
|
102
|
+
Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session. It exposes deterministic policy changes to the model through the runtime-context snapshot and switch notices.
|
|
103
|
+
|
|
104
|
+
```ts cordis-catalog
|
|
105
|
+
/**
|
|
106
|
+
* Switch one live agent's policy and queue the transition for its next model
|
|
107
|
+
* step. Session initialization uses {@link setApprovalPolicy} directly
|
|
108
|
+
* because there is no previously visible policy to change.
|
|
109
|
+
* @param agent - the live agent whose policy is changing.
|
|
110
|
+
* @param policy - the new effective policy.
|
|
111
|
+
*/
|
|
112
|
+
setPolicy(agent: Agent, policy: ApprovalPolicy): void
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Ask the composed answerers to decide one readonly same-process request.
|
|
116
|
+
* The service borrows the request, agent, session, and live signal directly.
|
|
117
|
+
* The request requires an open turn because the audit pair must be enclosed
|
|
118
|
+
* by the durable log's commit/replay boundary; an idle ask rejects before
|
|
119
|
+
* appending anything. The answerer phase always produces an outcome: an
|
|
120
|
+
* aborted signal yields `'cancelled'`, a missing or throwing answerer yields
|
|
121
|
+
* `'unavailable'` (fail closed), and a rogue non-vocabulary return value is
|
|
122
|
+
* normalized to `'unavailable'`. A failure that prevents either audit append
|
|
123
|
+
* from committing still rejects because returning an unlogged decision would
|
|
124
|
+
* violate the pair. Session contains post-commit observer failures, so an
|
|
125
|
+
* authoritative append cannot reject the request or suppress its matching
|
|
126
|
+
* audit event.
|
|
127
|
+
* @param req - the pending decision (agent, tool identity, reason, signal).
|
|
128
|
+
* @returns the closed outcome; `'allowed-once'` is the only grant.
|
|
129
|
+
* @throws when no turn is open or either audit event fails before the session
|
|
130
|
+
* append commit point.
|
|
131
|
+
*/
|
|
132
|
+
async request(req: ApprovalRequest): Promise<ApprovalOutcome>
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Read the session override without applying the configured default.
|
|
136
|
+
* @param session - session whose log supplies the override.
|
|
137
|
+
* @returns the last logged policy, or `undefined` without one.
|
|
138
|
+
*/
|
|
139
|
+
overrideOf(session: Session): ApprovalPolicy | undefined
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Types: [Agent](core.zh.md) · [Session](session.zh.md)
|
|
143
|
+
|
|
144
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
145
|
+
|
|
146
|
+
<a id="approval-events"></a>
|
|
147
|
+
|
|
148
|
+
### `approval/*` events
|
|
149
|
+
|
|
150
|
+
<a id="approvalrequest--waterfall"></a>
|
|
151
|
+
|
|
152
|
+
#### `approval/request` — waterfall
|
|
153
|
+
|
|
154
|
+
Ask composed answerers for one decision. Return an outcome to claim the request or call `next()` to delegate. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
155
|
+
|
|
156
|
+
```ts cordis-catalog
|
|
157
|
+
/**
|
|
158
|
+
* Ask composed answerers for one decision. Return an outcome to claim the
|
|
159
|
+
* request or call `next()` to delegate. Scope-filtered dispatch
|
|
160
|
+
* (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
161
|
+
* @param req - pending approval request.
|
|
162
|
+
* @mode waterfall
|
|
163
|
+
*/
|
|
164
|
+
'approval/request'( this: Scoped<Agent>, req: ApprovalRequestEvent, next: () => Promise<ApprovalOutcome>, ): Promise<ApprovalOutcome>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Types: [Agent](core.zh.md) · [Scoped](scope.zh.md)
|
|
168
|
+
|
|
169
|
+
Source: [`packages/interaction/user-approval/src/types.ts`](../../packages/interaction/user-approval/src/types.ts)
|
|
170
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -126,15 +126,25 @@ interface StoredImageAttachment {
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
```ts type-equiv
|
|
129
|
-
/** Deterministic request-image
|
|
130
|
-
interface
|
|
131
|
-
/**
|
|
132
|
-
|
|
129
|
+
/** Deterministic request-image target selected by one exact model route for one attachment. */
|
|
130
|
+
interface ImageRequestTarget {
|
|
131
|
+
/** Target width in pixels; a target above the source keeps the source width. */
|
|
132
|
+
width: number
|
|
133
|
+
/** Target height in pixels; a target above the source keeps the source height. */
|
|
134
|
+
height: number
|
|
133
135
|
/** Encoded-byte target before base64 expansion or Files API upload; the smallest quality-ladder output is kept when no quality fits. */
|
|
134
136
|
maxBytes: number
|
|
135
137
|
}
|
|
136
138
|
```
|
|
137
139
|
|
|
140
|
+
```ts type-equiv
|
|
141
|
+
/** Integer width and height of one projected image. */
|
|
142
|
+
interface ProjectedDimensions {
|
|
143
|
+
width: number
|
|
144
|
+
height: number
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
138
148
|
```ts type-equiv
|
|
139
149
|
/** Cached request version derived from one provider-independent normalized attachment. */
|
|
140
150
|
interface RequestImageAttachment {
|
|
@@ -157,7 +167,7 @@ interface RequestImageAttachment {
|
|
|
157
167
|
}
|
|
158
168
|
```
|
|
159
169
|
|
|
160
|
-
`saveImage()` prepares and atomically commits a provider-independent normalized attachment before returning its `ImageAttachmentRef`. `saveImages()` prepares every validated attachment once before publishing the batch, so validation rejection leaves no partial objects and publication does not repeat decoding or quality selection. `admitPromptContent()` accepts the complete ordered Host prompt after file receipt resolution, replaces base64 image uploads with durable references, and passes durable file references unchanged. `admitEncodedImages()` supports other wire entries and delegates count, aggregate-byte, and ordered batch admission to `saveImages()`. `admitEncodedFile()` gives encoded protocol adapters the same service-owned canonical-base64 admission, and `isAttachmentError()` lets those adapters recognize stable attachment failures without importing implementation helpers. `readImage()` verifies a normalized attachment from an authorized session path. `imageHostPath()` exposes only the provider-owned host object location; it does not decide whether the current tool execution world can read it. `readImageRequest()` derives and caches one deterministic request version
|
|
170
|
+
`saveImage()` prepares and atomically commits a provider-independent normalized attachment before returning its `ImageAttachmentRef`. `saveImages()` prepares every validated attachment once before publishing the batch, so validation rejection leaves no partial objects and publication does not repeat decoding or quality selection. `admitPromptContent()` accepts the complete ordered Host prompt after file receipt resolution, replaces base64 image uploads with durable references, and passes durable file references unchanged. `admitEncodedImages()` supports other wire entries and delegates count, aggregate-byte, and ordered batch admission to `saveImages()`. `admitEncodedFile()` gives encoded protocol adapters the same service-owned canonical-base64 admission, and `isAttachmentError()` lets those adapters recognize stable attachment failures without importing implementation helpers. `readImage()` verifies a normalized attachment from an authorized session path. `imageHostPath()` exposes only the provider-owned host object location; it does not decide whether the current tool execution world can read it. `readImageRequest()` derives and caches one deterministic request version at an exact route-chosen target size and encoded-byte target. That version contains encoded bytes and metadata but no execution-world path. New entries are fully decoded before publication, while cache hits use a bounded metadata probe. Callers use `Promise.all` over the singular method when they need an ordered batch. The local implementation lazily encodes preferred candidates, singleflights equal request identities, lets each waiter cancel independently, stops shared work when no waiter remains, and bounds all transforms with its instance-level limiter, which defaults to two simultaneous transformations. The service is retention-neutral: resumed and forked sessions may share objects, so reference-aware garbage collection is deferred rather than tied to one session's deletion.
|
|
161
171
|
|
|
162
172
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
163
173
|
|
|
@@ -280,11 +290,11 @@ fileHostPath(ref: FileAttachmentRef): string | undefined
|
|
|
280
290
|
/**
|
|
281
291
|
* Generate or read one deterministic model-request version from the stored normalized image.
|
|
282
292
|
* @param ref - durable provider-independent normalized attachment reference.
|
|
283
|
-
* @param
|
|
293
|
+
* @param target - route-chosen dimensions and byte target; an unmet byte target yields the smallest ladder output.
|
|
284
294
|
* @param signal - optional cancellation.
|
|
285
295
|
* @returns request bytes and the cache/upload identity covering every transform input.
|
|
286
296
|
*/
|
|
287
|
-
readImageRequest( ref: ImageAttachmentRef,
|
|
297
|
+
readImageRequest( ref: ImageAttachmentRef, target: ImageRequestTarget, signal?: AbortSignal, ): Promise<RequestImageAttachment>
|
|
288
298
|
```
|
|
289
299
|
|
|
290
300
|
Source: [`packages/attachment/attachment/src/index.ts`](../../packages/attachment/attachment/src/index.ts)
|
|
@@ -293,7 +303,7 @@ Source: [`packages/attachment/attachment/src/index.ts`](../../packages/attachmen
|
|
|
293
303
|
|
|
294
304
|
### `ctx.fileUploads` — `FileUploads`
|
|
295
305
|
|
|
296
|
-
Host service owning upload storage and Agent
|
|
306
|
+
Host service owning upload storage and receipts keyed by each receiving Agent's exact Session.
|
|
297
307
|
|
|
298
308
|
```ts cordis-catalog
|
|
299
309
|
/**
|
|
@@ -320,7 +330,7 @@ registerAgentResolver(resolve: AgentResolver): () => void
|
|
|
320
330
|
async uploadStream(request: { readonly sessionId: SessionId readonly data: AsyncIterable<Uint8Array> readonly signal?: AbortSignal readonly name?: string }): Promise<FileUploadValue>
|
|
321
331
|
|
|
322
332
|
/**
|
|
323
|
-
* Resolve one staged receipt
|
|
333
|
+
* Resolve one staged receipt for the receiving Agent's exact Session.
|
|
324
334
|
* @param agent - receiving Agent.
|
|
325
335
|
* @param receiptId - opaque receipt minted for one completed upload.
|
|
326
336
|
* @returns durable file reference, or `undefined` for an unknown or foreign receipt.
|