dsh-plugin-guide 0.3.1 → 0.3.3
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.es.md +1 -1
- package/README.hi.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.zh.md +1 -1
- package/SKILL.md +1 -1
- package/dist/dsh-plugin-dev.js +5 -5
- package/guide/links.md +1 -1
- package/guide/plugin-dev-guide.md +1 -1
- package/guide/quick-reference.es.md +2 -2
- package/guide/quick-reference.hi.md +1 -1
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +2 -2
- package/package.json +3 -3
- package/references/cordis-paper-and-community.md +1 -1
- package/references/official-docs/AGENTS.md +28 -23
- package/references/official-docs/README.i18n.yaml +2 -2
- package/references/official-docs/README.md +1 -1
- package/references/official-docs/README.zh.md +19 -9
- package/references/official-docs/SNAPSHOT.md +5 -5
- package/references/official-docs/THIRD_PARTY_NOTICES.md +36 -13
- package/references/official-docs/docs/AGENTS.md +4 -4
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
- package/references/official-docs/docs/agent-lifecycle.md +1 -1
- package/references/official-docs/docs/agent-lifecycle.zh.md +2 -2
- package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
- package/references/official-docs/docs/api-gateway.md +8 -8
- package/references/official-docs/docs/api-gateway.zh.md +8 -8
- package/references/official-docs/docs/architecture.i18n.yaml +2 -2
- package/references/official-docs/docs/architecture.md +25 -8
- package/references/official-docs/docs/architecture.zh.md +38 -21
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +134 -67
- package/references/official-docs/docs/capability-seams.zh.md +134 -67
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +731 -403
- package/references/official-docs/docs/config-catalog.zh.md +747 -419
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +3 -4
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +9 -8
- package/references/official-docs/docs/cookbook/{adding-a-conversation-node.i18n.yaml → adding-a-remote-api.i18n.yaml} +3 -3
- package/references/official-docs/docs/cookbook/adding-a-remote-api.md +197 -0
- package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +197 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +6 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.md +102 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +102 -0
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.md +11 -4
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +16 -9
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +4 -4
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +1 -1
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/extension-cookbook.md +9 -8
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +17 -14
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +1 -1
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +1 -1
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +1 -1
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/context.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-api/context.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/events.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-api/events.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/inherited.md +1 -1
- package/references/official-docs/docs/cordis-primer.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-primer.md +2 -1
- package/references/official-docs/docs/cordis-primer.zh.md +3 -2
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +2 -2
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +3 -3
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +5 -4
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +11 -10
- package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/index.zh.md +10 -10
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +6 -0
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +159 -0
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +159 -0
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +1 -1
- package/references/official-docs/docs/defensive-patterns.zh.md +3 -1
- package/references/official-docs/docs/development.i18n.yaml +2 -2
- package/references/official-docs/docs/development.md +9 -13
- package/references/official-docs/docs/development.zh.md +23 -21
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
- package/references/official-docs/docs/event-producer-consumer.md +55 -46
- package/references/official-docs/docs/event-producer-consumer.zh.md +55 -46
- package/references/official-docs/docs/glossary.i18n.yaml +2 -2
- package/references/official-docs/docs/glossary.md +1 -1
- package/references/official-docs/docs/glossary.zh.md +1 -1
- package/references/official-docs/docs/graph-atlas.i18n.yaml +2 -2
- package/references/official-docs/docs/graph-atlas.md +0 -2
- package/references/official-docs/docs/graph-atlas.zh.md +7 -9
- package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
- package/references/official-docs/docs/i18n/README.md +7 -7
- package/references/official-docs/docs/i18n/README.zh.md +11 -9
- package/references/official-docs/docs/i18n/style-samples.md +3 -3
- package/references/official-docs/docs/i18n/translation-prompt.md +3 -3
- package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +2 -2
- package/references/official-docs/docs/i18n/translation-rules.md +2 -2
- package/references/official-docs/docs/i18n/translation-rules.zh.md +3 -3
- package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
- package/references/official-docs/docs/module-graph.md +660 -909
- package/references/official-docs/docs/module-graph.zh.md +662 -911
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +185 -53
- package/references/official-docs/docs/persistence-catalog.zh.md +193 -61
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +2 -2
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +3 -3
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +2 -2
- package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
- package/references/official-docs/docs/postmortem/README.zh.md +5 -5
- package/references/official-docs/docs/rescope.i18n.yaml +2 -2
- package/references/official-docs/docs/rescope.md +2 -2
- package/references/official-docs/docs/rescope.zh.md +3 -3
- package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/README.md +8 -2
- package/references/official-docs/docs/subsystems/README.zh.md +53 -47
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/agent-team.md +207 -0
- package/references/official-docs/docs/subsystems/agent-team.zh.md +207 -0
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/approval.md +12 -12
- package/references/official-docs/docs/subsystems/approval.zh.md +13 -13
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/attachment.md +90 -7
- package/references/official-docs/docs/subsystems/attachment.zh.md +90 -7
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/client-modules.md +69 -19
- package/references/official-docs/docs/subsystems/client-modules.zh.md +69 -19
- package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/code-runtime.md +12 -8
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +13 -9
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +30 -7
- package/references/official-docs/docs/subsystems/commands.zh.md +31 -8
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +14 -14
- package/references/official-docs/docs/subsystems/compaction.zh.md +19 -19
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +6 -0
- package/references/official-docs/docs/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +49 -24
- package/references/official-docs/docs/{cookbook/adding-a-conversation-node.zh.md → subsystems/conversation.zh.md} +49 -24
- package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/core.md +114 -36
- package/references/official-docs/docs/subsystems/core.zh.md +145 -65
- package/references/official-docs/docs/subsystems/credentials.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/credentials.md +207 -11
- package/references/official-docs/docs/subsystems/credentials.zh.md +207 -11
- package/references/official-docs/docs/subsystems/extensions.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/extensions.md +27 -9
- package/references/official-docs/docs/subsystems/extensions.zh.md +30 -12
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/feedback.md +6 -6
- package/references/official-docs/docs/subsystems/feedback.zh.md +6 -6
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/filesystem.md +17 -7
- package/references/official-docs/docs/subsystems/filesystem.zh.md +19 -9
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/goal.md +4 -4
- package/references/official-docs/docs/subsystems/goal.zh.md +8 -8
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/invariants.md +2 -2
- package/references/official-docs/docs/subsystems/invariants.zh.md +5 -5
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/jobs.md +3 -3
- package/references/official-docs/docs/subsystems/jobs.zh.md +6 -6
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.md +193 -22
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +199 -28
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/lsp.md +2 -2
- package/references/official-docs/docs/subsystems/lsp.zh.md +3 -3
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/permission-presets.md +8 -8
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +8 -8
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/persistence.md +183 -173
- package/references/official-docs/docs/subsystems/persistence.zh.md +182 -172
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/plan.md +4 -4
- package/references/official-docs/docs/subsystems/plan.zh.md +10 -10
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/sandbox.md +5 -3
- package/references/official-docs/docs/subsystems/sandbox.zh.md +8 -6
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/schedule.md +9 -3
- package/references/official-docs/docs/subsystems/schedule.zh.md +11 -5
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +1 -1
- package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-projection.md +148 -75
- package/references/official-docs/docs/subsystems/session-projection.zh.md +148 -75
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +30 -16
- package/references/official-docs/docs/subsystems/session-query.zh.md +31 -17
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-reference.md +94 -7
- package/references/official-docs/docs/subsystems/session-reference.zh.md +95 -8
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-telemetry.md +5 -6
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +9 -10
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-title.md +8 -8
- package/references/official-docs/docs/subsystems/session-title.zh.md +10 -10
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +376 -71
- package/references/official-docs/docs/subsystems/session.zh.md +392 -85
- package/references/official-docs/docs/subsystems/settings.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/settings.md +105 -10
- package/references/official-docs/docs/subsystems/settings.zh.md +105 -10
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/shell.md +3 -3
- package/references/official-docs/docs/subsystems/shell.zh.md +11 -11
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/skills.md +26 -3
- package/references/official-docs/docs/subsystems/skills.zh.md +29 -6
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/slots.md +175 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +175 -0
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/spill.md +4 -4
- package/references/official-docs/docs/subsystems/spill.zh.md +6 -6
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/storage.md +38 -7
- package/references/official-docs/docs/subsystems/storage.zh.md +41 -10
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +148 -116
- package/references/official-docs/docs/subsystems/subagent.zh.md +158 -124
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subprocess.md +3 -3
- package/references/official-docs/docs/subsystems/subprocess.zh.md +5 -5
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/system-prompt.md +21 -8
- package/references/official-docs/docs/subsystems/system-prompt.zh.md +23 -10
- package/references/official-docs/docs/subsystems/terminal.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/terminal.md +2 -2
- package/references/official-docs/docs/subsystems/terminal.zh.md +4 -4
- package/references/official-docs/docs/subsystems/todo.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/todo.md +32 -0
- package/references/official-docs/docs/subsystems/todo.zh.md +32 -0
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/token-meter.md +29 -14
- package/references/official-docs/docs/subsystems/token-meter.zh.md +30 -15
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/tools.md +46 -46
- package/references/official-docs/docs/subsystems/tools.zh.md +54 -54
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/typert.md +65 -58
- package/references/official-docs/docs/subsystems/typert.zh.md +67 -60
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/user-questions.md +35 -35
- package/references/official-docs/docs/subsystems/user-questions.zh.md +35 -35
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/web-client.md +95 -0
- package/references/official-docs/docs/subsystems/web-client.zh.md +95 -0
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-server.md +55 -9
- package/references/official-docs/docs/subsystems/web-server.zh.md +56 -10
- package/references/official-docs/docs/subsystems/web.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web.md +14 -7
- package/references/official-docs/docs/subsystems/web.zh.md +16 -9
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/webhook.md +70 -0
- package/references/official-docs/docs/subsystems/webhook.zh.md +70 -0
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workflow.md +8 -8
- package/references/official-docs/docs/subsystems/workflow.zh.md +13 -13
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workspace.md +98 -5
- package/references/official-docs/docs/subsystems/workspace.zh.md +102 -9
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +15 -10
- package/references/official-docs/docs/testing.zh.md +15 -10
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +413 -61
- package/references/official-docs/docs/tool-catalog.zh.md +418 -63
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-execution-pipeline.md +1 -1
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +1 -1
- package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/config.md +1 -1
- package/references/official-docs/docs/user/develop/basic/config.zh.md +4 -4
- package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +1 -1
- package/references/official-docs/docs/user/develop/basic/index.zh.md +5 -5
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/publish.md +3 -3
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -7
- package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/tool.md +3 -3
- package/references/official-docs/docs/user/develop/basic/tool.zh.md +4 -4
- package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/framework/events.md +2 -2
- package/references/official-docs/docs/user/develop/framework/events.zh.md +3 -3
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +1 -1
- package/references/official-docs/docs/user/develop/framework/index.zh.md +3 -3
- package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/framework/service.md +1 -1
- package/references/official-docs/docs/user/develop/framework/service.zh.md +3 -3
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +6 -0
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +15 -0
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
- package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/practice/index.md +1 -1
- package/references/official-docs/docs/user/develop/practice/index.zh.md +3 -3
- package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/practice/llm-adapter.md +4 -3
- package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +4 -3
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/github-review.md +102 -0
- package/references/official-docs/docs/user/guide/github-review.zh.md +102 -0
- package/references/official-docs/docs/user/guide/index.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/index.md +2 -2
- package/references/official-docs/docs/user/guide/index.zh.md +8 -8
- package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/mcp-memory.md +101 -0
- package/references/official-docs/docs/user/guide/mcp-memory.zh.md +101 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/providers.md +40 -1
- package/references/official-docs/docs/user/guide/providers.zh.md +41 -2
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/python-sdk.md +80 -34
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +87 -41
- package/references/official-docs/docs/user/guide/schedule.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/schedule.md +21 -0
- package/references/official-docs/docs/user/guide/schedule.zh.md +21 -0
- package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
- package/references/official-docs/docs/web-styling.md +3 -0
- package/references/official-docs/docs/web-styling.zh.md +5 -2
- package/references/official-docs/packages/AGENTS.md +4 -3
- package/references/official-docs/packages/README.md +104 -59
- package/references/official-docs/vendor/README.md +1 -0
- package/references/official-docs/website-docs.ts +52 -11
- package/references/sources.md +2 -2
- package/references/website-pages.md +3 -3
- package/scripts/download-sources.ps1 +1 -1
- package/scripts/sync-official-docs.ps1 +19 -11
- package/scripts/verify-kit.ps1 +0 -4
- package/templates/js/README.es.md +1 -1
- package/templates/js/README.hi.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/js/README.pt.md +1 -1
- package/templates/js/README.zh.md +1 -1
- package/templates/js/package.json +4 -4
- package/templates/ts/README.es.md +1 -1
- package/templates/ts/README.hi.md +1 -1
- package/templates/ts/README.md +1 -1
- package/templates/ts/README.pt.md +1 -1
- package/templates/ts/README.zh.md +1 -1
- package/templates/ts/package.json +4 -4
- package/references/official-docs/examples/AGENTS.md +0 -20
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Agent Teams
|
|
2
|
+
|
|
3
|
+
[English](agent-team.md) | 中文
|
|
4
|
+
|
|
5
|
+
实验性隐式 Root Team 领域、模型工具与宿主适配器共享的类型。[Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、task 与共享 checkout 决策;[Team Steer 消息 Agent Note](../../.agents/notes/implemented/simplification/2026-08-30-team-send-message-steer.zh.md)负责消息调度;本页记录 [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts) 中的字面持久形式。
|
|
6
|
+
|
|
7
|
+
## 身份与 roster
|
|
8
|
+
|
|
9
|
+
`TeamId` 是具有独立[品牌](core.zh.md#branded-ids)的 Root `SessionId`。`TeamTaskId` 在 Team 内按 `task-<n>` 单调分配;`TeamMessageId` 是全局随机值。teammate 的 Session id 始终是持久身份,而 `name` 是不可变的模型/UI 标签。
|
|
10
|
+
|
|
11
|
+
```ts type-equiv
|
|
12
|
+
/** Whole durable value written on every teammate lifecycle change. */
|
|
13
|
+
interface TeamMemberSnapshot {
|
|
14
|
+
readonly id: SessionId
|
|
15
|
+
readonly name: string
|
|
16
|
+
readonly description: string
|
|
17
|
+
readonly provider: string
|
|
18
|
+
readonly context: 'fresh' | 'fork'
|
|
19
|
+
readonly phase: TeamMemberPhase
|
|
20
|
+
readonly error?: string
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
每个 member 都从 `provisioning` 开始,并且只到达一个终态 roster phase:`active` 或 `failed`。运行时 `running`/`idle`/`inactive` 状态单独派生,绝不会重写该记录。
|
|
25
|
+
|
|
26
|
+
## 持久 mailbox
|
|
27
|
+
|
|
28
|
+
Lead Session 首先存储完整 queued message。只有 target 的 pending inbox 条目或已记录用户消息完成持久化,才会写入独立 acknowledgement event,queued-minus-delivered 因而构成恢复 mailbox。
|
|
29
|
+
|
|
30
|
+
```ts type-equiv
|
|
31
|
+
/** One peer message retained until its target Session records it. */
|
|
32
|
+
interface TeamMessageSnapshot {
|
|
33
|
+
readonly id: TeamMessageId
|
|
34
|
+
readonly senderId: SessionId
|
|
35
|
+
readonly senderName: string
|
|
36
|
+
readonly targetId: SessionId
|
|
37
|
+
readonly content: ContentBlock[]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
每条消息都会尝试 Steer 投递。running target 在最近的步骤边界收到消息,idle target 启动一个轮次,inactive teammate 则冷恢复。调用方不能选择其他模式,因此持久记录不存储调度方式。
|
|
42
|
+
|
|
43
|
+
target Session 会在 pending inbox 条目和最终用户消息上保留消息身份与发送者归因。跨 inbox 与历史折叠该 source 构成 target 侧去重键;模型可见的 framing 会重复 id 和发送者。
|
|
44
|
+
|
|
45
|
+
```ts type-equiv
|
|
46
|
+
/** Source retained by the target Session for durable mailbox de-duplication. */
|
|
47
|
+
interface TeamMessageSource {
|
|
48
|
+
readonly kind: 'team-message'
|
|
49
|
+
readonly teamId: TeamId
|
|
50
|
+
readonly messageId: TeamMessageId
|
|
51
|
+
readonly senderId: SessionId
|
|
52
|
+
readonly senderName: string
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 共享任务 DAG
|
|
57
|
+
|
|
58
|
+
每条 task event 都存储完整快照。`revision` 是 compare-and-set 值,每次变更递增 1。`blockedBy` edge 必须指向未删除任务,并维持无环图。`writeScopes` 是规范化的提示性路径前缀,不是锁。
|
|
59
|
+
|
|
60
|
+
```ts type-equiv
|
|
61
|
+
/** Whole durable task snapshot; every mutation increments {@link revision}. */
|
|
62
|
+
interface TeamTaskSnapshot {
|
|
63
|
+
readonly id: TeamTaskId
|
|
64
|
+
readonly revision: number
|
|
65
|
+
readonly subject: string
|
|
66
|
+
readonly description: string
|
|
67
|
+
readonly status: TeamTaskStatus
|
|
68
|
+
readonly ownerId?: SessionId
|
|
69
|
+
readonly blockedBy: TeamTaskId[]
|
|
70
|
+
readonly writeScopes: string[]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`pending` 表示尚未开始或已经释放,`in_progress` 携带 owner,`completed` 满足 blocker,`deleted` 是保留的 tombstone。view 会添加 owner name、readiness 和 write-scope 重叠警告,但不会改变持久快照。
|
|
75
|
+
|
|
76
|
+
## 回放
|
|
77
|
+
|
|
78
|
+
`foldTeam()` 把一个 Root Session 回放成每个 Team 操作所读取的 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
|
+
|
|
80
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
81
|
+
|
|
82
|
+
<a id="cordis-surface"></a>
|
|
83
|
+
|
|
84
|
+
## Cordis API
|
|
85
|
+
|
|
86
|
+
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).
|
|
87
|
+
|
|
88
|
+
<a id="ctxagentteams--teamservice"></a>
|
|
89
|
+
|
|
90
|
+
### `ctx.agentTeams` — `TeamService`
|
|
91
|
+
|
|
92
|
+
Agent Teams service backed by the exact live Lead Session log.
|
|
93
|
+
|
|
94
|
+
```ts cordis-catalog
|
|
95
|
+
/**
|
|
96
|
+
* Resolve one exact live Agent's Team role.
|
|
97
|
+
* @param agent - exact live Agent used as the authority credential.
|
|
98
|
+
* @returns its root, Team identity, role, and model-facing name.
|
|
99
|
+
*/
|
|
100
|
+
membership(agent: Agent): TeamMembership
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* List the runtime-enriched roster visible to one Team member.
|
|
104
|
+
* @param agent - exact live Team member.
|
|
105
|
+
* @returns Lead and teammate rows in creation order.
|
|
106
|
+
*/
|
|
107
|
+
listMembers(agent: Agent): TeamMemberView[]
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Create one named, continuable direct child of the Team Lead.
|
|
111
|
+
* @param caller - exact live Lead Agent.
|
|
112
|
+
* @param request - immutable name, description, prompt, context mode, provider, and cancellation.
|
|
113
|
+
* @returns the active roster row.
|
|
114
|
+
*/
|
|
115
|
+
async spawnTeammate(caller: Agent, request: SpawnTeammateRequest): Promise<SpawnTeammateResult>
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Queue one durable peer message, then attempt immediate delivery.
|
|
119
|
+
* @param caller - exact live sending Team member.
|
|
120
|
+
* @param request - target name, content, and pre-queue cancellation.
|
|
121
|
+
* @returns durable message identity and immediate-delivery observation.
|
|
122
|
+
*/
|
|
123
|
+
async sendMessage(caller: Agent, request: SendTeamMessageRequest): Promise<SendTeamMessageResult>
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Create one unowned pending task in the Team Lead log.
|
|
127
|
+
* @param caller - exact live Team member creating the task.
|
|
128
|
+
* @param request - task text, blockers, and advisory write scopes.
|
|
129
|
+
* @returns the revision-one task view.
|
|
130
|
+
*/
|
|
131
|
+
async createTask(caller: Agent, request: CreateTeamTaskRequest): Promise<TeamTaskView>
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Return one task, including a deleted tombstone.
|
|
135
|
+
* @param caller - exact live Team member reading the task.
|
|
136
|
+
* @param id - Team-local task identity.
|
|
137
|
+
* @returns the latest task value and derived readiness diagnostics.
|
|
138
|
+
*/
|
|
139
|
+
getTask(caller: Agent, id: TeamTaskId): TeamTaskView
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* List current non-deleted tasks in numeric creation order.
|
|
143
|
+
* @param caller - exact live Team member reading the board.
|
|
144
|
+
* @returns detached current task views.
|
|
145
|
+
*/
|
|
146
|
+
listTasks(caller: Agent): TeamTaskView[]
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Compare-and-set one authorized task transition.
|
|
150
|
+
* @param caller - exact live Team member authorizing the mutation.
|
|
151
|
+
* @param request - task identity, expected revision, action, and action fields.
|
|
152
|
+
* @returns the committed next task revision.
|
|
153
|
+
*/
|
|
154
|
+
async updateTask(caller: Agent, request: UpdateTeamTaskRequest): Promise<TeamTaskView>
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Wait for the next Team-domain or member-status change.
|
|
158
|
+
* @param caller - exact live Team member waiting for activity.
|
|
159
|
+
* @param timeoutMs - bounded wait duration from ten seconds through one hour.
|
|
160
|
+
* @param signal - caller cancellation for the wait only.
|
|
161
|
+
* @returns one observed change or a timeout result.
|
|
162
|
+
*/
|
|
163
|
+
async waitForChange(caller: Agent, timeoutMs: number, signal: AbortSignal): Promise<TeamWaitResult>
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Interrupt one live teammate turn without clearing its pending inbox.
|
|
167
|
+
* @param caller - exact live Lead Agent.
|
|
168
|
+
* @param targetName - durable teammate name.
|
|
169
|
+
* @returns the target status sampled before cancellation.
|
|
170
|
+
*/
|
|
171
|
+
interrupt(caller: Agent, targetName: string): { previousStatus: 'running' | 'idle' | 'inactive' }
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Resolve a caller without throwing, used by scoped-tool installation and observers.
|
|
175
|
+
* @param agent - candidate exact live Agent.
|
|
176
|
+
* @returns Team membership, or undefined for non-Team subagents and stale identities.
|
|
177
|
+
*/
|
|
178
|
+
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
|
+
```
|
|
203
|
+
|
|
204
|
+
Types: [Agent](core.zh.md)
|
|
205
|
+
|
|
206
|
+
Source: [`packages/experimental/agent-team/src/index.ts`](../../packages/experimental/agent-team/src/index.ts)
|
|
207
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/approval.md
|
|
5
|
-
approval.md:
|
|
6
|
-
approval.zh.md:
|
|
5
|
+
approval.md: 89130232b45da2982d0da40c8fad217b364758b2
|
|
6
|
+
approval.zh.md: e8047cd5a8bf8dfa23b9e80ad97db00d0e25a061
|
|
@@ -30,7 +30,7 @@ type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable'
|
|
|
30
30
|
|
|
31
31
|
## Per-session policy
|
|
32
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. `setApprovalPolicy(session, policy)` is the single write path, so replay reconstructs the override.
|
|
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
34
|
|
|
35
35
|
```ts type-equiv
|
|
36
36
|
/**
|
|
@@ -57,7 +57,7 @@ Both policies contribute their complete current meaning to the cache-safe runtim
|
|
|
57
57
|
* Readonly same-process permission question. `callId` links to an already
|
|
58
58
|
* presented tool call, so arguments are not duplicated here.
|
|
59
59
|
*/
|
|
60
|
-
interface ApprovalRequest {
|
|
60
|
+
interface ApprovalRequest extends ApprovalRequestEvent {
|
|
61
61
|
/**
|
|
62
62
|
* The agent on whose behalf the question is asked. Routes the question (a
|
|
63
63
|
* UI answerer only answers for agents it owns) and receives the audit
|
|
@@ -70,7 +70,7 @@ interface ApprovalRequest {
|
|
|
70
70
|
* The exact tool call being decided, when the asker has one — lets a UI
|
|
71
71
|
* attach the prompt to the tool call it already streamed.
|
|
72
72
|
*/
|
|
73
|
-
readonly callId?:
|
|
73
|
+
readonly callId?: ToolCallId
|
|
74
74
|
/** The asker's human-readable explanation of WHY it is asking. */
|
|
75
75
|
readonly reason?: string
|
|
76
76
|
/**
|
|
@@ -93,7 +93,7 @@ The audit events are log-only and do not enter the model transcript. Model-visib
|
|
|
93
93
|
|
|
94
94
|
## Cordis API
|
|
95
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`) —
|
|
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
97
|
|
|
98
98
|
<a id="ctxapproval--approvalservice"></a>
|
|
99
99
|
|
|
@@ -141,7 +141,7 @@ overrideOf(session: Session): ApprovalPolicy | undefined
|
|
|
141
141
|
|
|
142
142
|
Types: [Agent](core.md) · [Session](session.md)
|
|
143
143
|
|
|
144
|
-
Source: [`packages/interaction/user-approval/src/index.ts
|
|
144
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
145
145
|
|
|
146
146
|
<a id="approval-events"></a>
|
|
147
147
|
|
|
@@ -151,20 +151,20 @@ Source: [`packages/interaction/user-approval/src/index.ts:192`](../../packages/i
|
|
|
151
151
|
|
|
152
152
|
#### `approval/request` — waterfall
|
|
153
153
|
|
|
154
|
-
Ask composed answerers for one decision. Return an outcome to claim the request or call `next()
|
|
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
155
|
|
|
156
156
|
```ts cordis-catalog
|
|
157
157
|
/**
|
|
158
158
|
* Ask composed answerers for one decision. Return an outcome to claim the
|
|
159
|
-
* request or call `next()
|
|
160
|
-
*
|
|
161
|
-
* @param req -
|
|
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
162
|
* @mode waterfall
|
|
163
163
|
*/
|
|
164
|
-
'approval/request'(this: Scoped<
|
|
164
|
+
'approval/request'( this: Scoped<Agent>, req: ApprovalRequestEvent, next: () => Promise<ApprovalOutcome>, ): Promise<ApprovalOutcome>
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
Types: [Scoped](scope.md)
|
|
167
|
+
Types: [Agent](core.md) · [Scoped](scope.md)
|
|
168
168
|
|
|
169
|
-
Source: [`packages/interaction/user-approval/src/
|
|
169
|
+
Source: [`packages/interaction/user-approval/src/types.ts`](../../packages/interaction/user-approval/src/types.ts)
|
|
170
170
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -30,7 +30,7 @@ type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable'
|
|
|
30
30
|
|
|
31
31
|
## 按会话策略
|
|
32
32
|
|
|
33
|
-
`ApprovalPolicy` 决定在交互式应答者运行之前发生什么。`ask` 委托给组合的应答者链,链的无应答默认值为 `unavailable`;`never` 确定性地返回 `rejected`,不分发任何应答者。生效值为会话日志中最后一条 `approval/policy`
|
|
33
|
+
`ApprovalPolicy` 决定在交互式应答者运行之前发生什么。`ask` 委托给组合的应答者链,链的无应答默认值为 `unavailable`;`never` 确定性地返回 `rejected`,不分发任何应答者。生效值为会话日志中最后一条 `approval/policy` 事件,回退到服务配置。消费方通过 `ctx.approval.effectivePolicy(session)` 读取;`setApprovalPolicy(session, policy)` 是唯一的写入路径,因此回放能重建覆盖值。
|
|
34
34
|
|
|
35
35
|
```ts type-equiv
|
|
36
36
|
/**
|
|
@@ -57,7 +57,7 @@ type ApprovalPolicy = 'ask' | 'never'
|
|
|
57
57
|
* Readonly same-process permission question. `callId` links to an already
|
|
58
58
|
* presented tool call, so arguments are not duplicated here.
|
|
59
59
|
*/
|
|
60
|
-
interface ApprovalRequest {
|
|
60
|
+
interface ApprovalRequest extends ApprovalRequestEvent {
|
|
61
61
|
/**
|
|
62
62
|
* The agent on whose behalf the question is asked. Routes the question (a
|
|
63
63
|
* UI answerer only answers for agents it owns) and receives the audit
|
|
@@ -70,7 +70,7 @@ interface ApprovalRequest {
|
|
|
70
70
|
* The exact tool call being decided, when the asker has one — lets a UI
|
|
71
71
|
* attach the prompt to the tool call it already streamed.
|
|
72
72
|
*/
|
|
73
|
-
readonly callId?:
|
|
73
|
+
readonly callId?: ToolCallId
|
|
74
74
|
/** The asker's human-readable explanation of WHY it is asking. */
|
|
75
75
|
readonly reason?: string
|
|
76
76
|
/**
|
|
@@ -93,7 +93,7 @@ interface ApprovalRequest {
|
|
|
93
93
|
|
|
94
94
|
## Cordis API
|
|
95
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`) —
|
|
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
97
|
|
|
98
98
|
<a id="ctxapproval--approvalservice"></a>
|
|
99
99
|
|
|
@@ -139,9 +139,9 @@ async request(req: ApprovalRequest): Promise<ApprovalOutcome>
|
|
|
139
139
|
overrideOf(session: Session): ApprovalPolicy | undefined
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
Types: [Agent](core.md) · [Session](session.md)
|
|
142
|
+
Types: [Agent](core.zh.md) · [Session](session.zh.md)
|
|
143
143
|
|
|
144
|
-
Source: [`packages/interaction/user-approval/src/index.ts
|
|
144
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
145
145
|
|
|
146
146
|
<a id="approval-events"></a>
|
|
147
147
|
|
|
@@ -151,20 +151,20 @@ Source: [`packages/interaction/user-approval/src/index.ts:192`](../../packages/i
|
|
|
151
151
|
|
|
152
152
|
#### `approval/request` — waterfall
|
|
153
153
|
|
|
154
|
-
Ask composed answerers for one decision. Return an outcome to claim the request or call `next()
|
|
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
155
|
|
|
156
156
|
```ts cordis-catalog
|
|
157
157
|
/**
|
|
158
158
|
* Ask composed answerers for one decision. Return an outcome to claim the
|
|
159
|
-
* request or call `next()
|
|
160
|
-
*
|
|
161
|
-
* @param req -
|
|
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
162
|
* @mode waterfall
|
|
163
163
|
*/
|
|
164
|
-
'approval/request'(this: Scoped<
|
|
164
|
+
'approval/request'( this: Scoped<Agent>, req: ApprovalRequestEvent, next: () => Promise<ApprovalOutcome>, ): Promise<ApprovalOutcome>
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
Types: [Scoped](scope.md)
|
|
167
|
+
Types: [Agent](core.zh.md) · [Scoped](scope.zh.md)
|
|
168
168
|
|
|
169
|
-
Source: [`packages/interaction/user-approval/src/
|
|
169
|
+
Source: [`packages/interaction/user-approval/src/types.ts`](../../packages/interaction/user-approval/src/types.ts)
|
|
170
170
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/attachment.md
|
|
5
|
-
attachment.md:
|
|
6
|
-
attachment.zh.md:
|
|
5
|
+
attachment.md: 15daa2b8d541ba847d48f5c43a06c1c537df6d11
|
|
6
|
+
attachment.zh.md: c74a18f6bec63e117afcdb141512be04f8d75f9a
|
|
@@ -10,7 +10,7 @@ Source: [`packages/attachment/attachment/src/types.ts`](../../packages/attachmen
|
|
|
10
10
|
|
|
11
11
|
## Identity and verified metadata
|
|
12
12
|
|
|
13
|
-
`AttachmentId` is a branded opaque string. The local backend currently emits `sha256:<digest>`, but consumers must neither parse that representation nor derive a filesystem path from it.
|
|
13
|
+
`AttachmentId` is a branded opaque string. The local backend currently emits `sha256:<digest>`, but consumers must neither parse that representation nor derive a filesystem path from it. A consumer may ask the attachment provider for its object location through `imageHostPath()`, then must use the current execution filesystem to decide whether model tools can read that host path.
|
|
14
14
|
|
|
15
15
|
```ts type-equiv
|
|
16
16
|
/** Raster image formats accepted by the version-one attachment path. */
|
|
@@ -18,7 +18,7 @@ type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif'
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```ts type-equiv
|
|
21
|
-
/** Durable, serializable
|
|
21
|
+
/** Durable, serializable reference to one immutable normalized image. */
|
|
22
22
|
interface ImageAttachmentRef {
|
|
23
23
|
/** Opaque storage identifier; never a filesystem path or bearer URL. */
|
|
24
24
|
attachmentId: AttachmentId
|
|
@@ -32,6 +32,14 @@ interface ImageAttachmentRef {
|
|
|
32
32
|
height: number
|
|
33
33
|
/** Optional display name stripped of local path information. */
|
|
34
34
|
name?: string
|
|
35
|
+
/**
|
|
36
|
+
* Input dimensions after applying EXIF orientation and before normalization
|
|
37
|
+
* scaling. Present only when normalization reduced the image.
|
|
38
|
+
*/
|
|
39
|
+
originalDimensions?: {
|
|
40
|
+
width: number
|
|
41
|
+
height: number
|
|
42
|
+
}
|
|
35
43
|
}
|
|
36
44
|
```
|
|
37
45
|
|
|
@@ -42,14 +50,30 @@ interface ImageAttachmentLimits {
|
|
|
42
50
|
maxImagesPerMessage: number
|
|
43
51
|
maxMessageImageBytes: number
|
|
44
52
|
maxImagePixels: number
|
|
53
|
+
/** Maximum intrinsic width and maximum intrinsic height in pixels for one image. */
|
|
54
|
+
maxImageDimension: number
|
|
45
55
|
mediaTypes: readonly ImageMediaType[]
|
|
46
56
|
}
|
|
47
57
|
```
|
|
48
58
|
|
|
59
|
+
The local backend admits at most 20 images and 200 MiB of encoded source data per message. One source may use up to 20 MiB, 64,000,000 pixels, and 8192 pixels on either side. These source limits precede the independent normalization stage, which limits the long edge to 2048 pixels and encoded data to 4 MiB by default.
|
|
60
|
+
|
|
49
61
|
The reference records intrinsic dimensions and encoded length so clients can lay out history without decoding first, while every authoritative read still re-checks digest, media signature, dimensions, and metadata against the object.
|
|
50
62
|
|
|
51
63
|
## Commit and verified-read payloads
|
|
52
64
|
|
|
65
|
+
```ts type-equiv
|
|
66
|
+
/** Base64-encoded image upload accompanying one wire request. */
|
|
67
|
+
interface EncodedImageAttachment {
|
|
68
|
+
/** Declared media type, verified against the decoded bytes during admission. */
|
|
69
|
+
mediaType: ImageMediaType
|
|
70
|
+
/** Canonical base64 encoding of the image bytes. */
|
|
71
|
+
data: string
|
|
72
|
+
/** Optional display name; it is never interpreted as a path. */
|
|
73
|
+
name?: string
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
53
77
|
```ts type-equiv
|
|
54
78
|
/** Request to validate and durably commit one image. */
|
|
55
79
|
interface SaveImageAttachment {
|
|
@@ -69,7 +93,39 @@ interface StoredImageAttachment {
|
|
|
69
93
|
}
|
|
70
94
|
```
|
|
71
95
|
|
|
72
|
-
|
|
96
|
+
```ts type-equiv
|
|
97
|
+
/** Deterministic request-image policy selected by one exact model route. */
|
|
98
|
+
interface ImageRequestPolicy {
|
|
99
|
+
/** Maximum width multiplied by height after aspect-preserving projection. */
|
|
100
|
+
maxPixels: number
|
|
101
|
+
/** Encoded-byte target before base64 expansion or Files API upload; the smallest quality-ladder output is kept when no quality fits. */
|
|
102
|
+
maxBytes: number
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```ts type-equiv
|
|
107
|
+
/** Cached request version derived from one provider-independent normalized attachment. */
|
|
108
|
+
interface RequestImageAttachment {
|
|
109
|
+
/** Cache and upload-index key over the attachment id, policy, and fixed encoder parameters. */
|
|
110
|
+
variantId: ImageVariantId
|
|
111
|
+
/** Durable normalized attachment from which this request version was derived. */
|
|
112
|
+
attachment: ImageAttachmentRef
|
|
113
|
+
/** Encoded request bytes. */
|
|
114
|
+
data: Uint8Array
|
|
115
|
+
mediaType: ImageMediaType
|
|
116
|
+
bytes: number
|
|
117
|
+
width: number
|
|
118
|
+
height: number
|
|
119
|
+
/** Provider-compatible sample depth proven after request encoding. */
|
|
120
|
+
depth: 'uchar'
|
|
121
|
+
/** Provider-compatible color space proven after request encoding. */
|
|
122
|
+
space: 'srgb'
|
|
123
|
+
/** Whether the encoded request version retains an alpha channel. */
|
|
124
|
+
hasAlpha: boolean
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`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. `admitEncodedImages()` is the wire entry for base64 uploads and delegates count, aggregate-byte, and ordered batch admission to `saveImages()`. `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 under an exact route pixel and byte budget. 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.
|
|
73
129
|
|
|
74
130
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
75
131
|
|
|
@@ -77,7 +133,7 @@ interface StoredImageAttachment {
|
|
|
77
133
|
|
|
78
134
|
## Cordis API
|
|
79
135
|
|
|
80
|
-
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`) —
|
|
136
|
+
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).
|
|
81
137
|
|
|
82
138
|
<a id="ctxattachments--attachmentstore-abstract-seam"></a>
|
|
83
139
|
|
|
@@ -94,10 +150,20 @@ Immutable binary attachment service. Implementations validate bytes before publi
|
|
|
94
150
|
*/
|
|
95
151
|
abstract validateImage(input: SaveImageAttachment): Promise<void>
|
|
96
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Validate and durably commit one ordered image batch.
|
|
155
|
+
* @param inputs - encoded images in owning-message order.
|
|
156
|
+
* @returns durable normalized attachment references in the same order after every member succeeds.
|
|
157
|
+
*/
|
|
158
|
+
async saveImages(inputs: readonly SaveImageAttachment[]): Promise<readonly ImageAttachmentRef[]>
|
|
159
|
+
|
|
97
160
|
/**
|
|
98
161
|
* Validate and durably commit one image before its owning session event is appended.
|
|
162
|
+
* The returned reference describes the persisted normalized image. When
|
|
163
|
+
* normalization reduces the raster, its `originalDimensions` records the
|
|
164
|
+
* orientation-applied input dimensions.
|
|
99
165
|
* @param input - encoded bytes, declared media type, and optional display name.
|
|
100
|
-
* @returns
|
|
166
|
+
* @returns the durable content-addressed normalized image reference.
|
|
101
167
|
*/
|
|
102
168
|
abstract saveImage(input: SaveImageAttachment): Promise<ImageAttachmentRef>
|
|
103
169
|
|
|
@@ -105,11 +171,28 @@ abstract saveImage(input: SaveImageAttachment): Promise<ImageAttachmentRef>
|
|
|
105
171
|
* Read one image and verify that bytes still match the recorded reference.
|
|
106
172
|
* @param ref - durable reference from the session log.
|
|
107
173
|
* @param signal - optional cancellation for backend read and verification work.
|
|
108
|
-
* @returns the verified bytes and
|
|
174
|
+
* @returns the verified bytes and normalized attachment reference.
|
|
109
175
|
* @throws the signal reason when aborted, or a storage error when verification fails.
|
|
110
176
|
*/
|
|
111
177
|
abstract readImage(ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Locate the provider-owned normalized object in the harness host filesystem.
|
|
181
|
+
* @param ref - durable normalized attachment reference.
|
|
182
|
+
* @returns an absolute host path, or undefined when this backend is not host-file-backed.
|
|
183
|
+
* @throws an AttachmentError when the durable reference is invalid.
|
|
184
|
+
*/
|
|
185
|
+
imageHostPath(ref: ImageAttachmentRef): string | undefined
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Generate or read one deterministic model-request version from the stored normalized image.
|
|
189
|
+
* @param ref - durable provider-independent normalized attachment reference.
|
|
190
|
+
* @param policy - exact route pixel budget and encoded-byte target; a target no ladder quality meets yields the smallest ladder output.
|
|
191
|
+
* @param signal - optional cancellation.
|
|
192
|
+
* @returns request bytes and the cache/upload identity covering every transform input.
|
|
193
|
+
*/
|
|
194
|
+
readImageRequest( ref: ImageAttachmentRef, policy: ImageRequestPolicy, signal?: AbortSignal, ): Promise<RequestImageAttachment>
|
|
112
195
|
```
|
|
113
196
|
|
|
114
|
-
Source: [`packages/attachment/attachment/src/index.ts
|
|
197
|
+
Source: [`packages/attachment/attachment/src/index.ts`](../../packages/attachment/attachment/src/index.ts)
|
|
115
198
|
<!-- END GENERATED cordis-surface -->
|