dsh-plugin-guide 0.3.1 → 0.3.2
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 +27 -22
- 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 +23 -7
- package/references/official-docs/docs/architecture.zh.md +36 -20
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +132 -67
- package/references/official-docs/docs/capability-seams.zh.md +132 -67
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +659 -373
- package/references/official-docs/docs/config-catalog.zh.md +677 -391
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +2 -3
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +8 -7
- 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 +666 -747
- package/references/official-docs/docs/module-graph.zh.md +668 -749
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +172 -40
- package/references/official-docs/docs/persistence-catalog.zh.md +180 -48
- 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 +206 -0
- package/references/official-docs/docs/subsystems/agent-team.zh.md +206 -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 +5 -5
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +6 -6
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +29 -6
- package/references/official-docs/docs/subsystems/commands.zh.md +30 -7
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +5 -5
- package/references/official-docs/docs/subsystems/compaction.zh.md +11 -11
- 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 +110 -33
- package/references/official-docs/docs/subsystems/core.zh.md +141 -62
- 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 +4 -4
- package/references/official-docs/docs/subsystems/feedback.zh.md +4 -4
- 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 +35 -17
- package/references/official-docs/docs/subsystems/persistence.zh.md +38 -20
- 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 +136 -67
- package/references/official-docs/docs/subsystems/session-projection.zh.md +136 -67
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +11 -3
- package/references/official-docs/docs/subsystems/session-query.zh.md +12 -4
- 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 +3 -3
- package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +284 -39
- package/references/official-docs/docs/subsystems/session.zh.md +301 -54
- 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 +174 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +174 -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 +13 -5
- package/references/official-docs/docs/subsystems/storage.zh.md +16 -8
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +120 -32
- package/references/official-docs/docs/subsystems/subagent.zh.md +131 -41
- 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 +27 -12
- package/references/official-docs/docs/subsystems/token-meter.zh.md +28 -13
- 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 +433 -27
- package/references/official-docs/docs/tool-catalog.zh.md +438 -29
- 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 +1 -1
- package/references/official-docs/docs/web-styling.zh.md +2 -2
- package/references/official-docs/packages/AGENTS.md +3 -2
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](system-prompt.md) | 中文
|
|
4
4
|
|
|
5
|
-
[system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README.md) 记录注册、排序、作用域与渲染行为;本页记录各插件实现或传递的确切跨包类型。
|
|
5
|
+
[system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README.zh.md) 记录注册、排序、作用域与渲染行为;本页记录各插件实现或传递的确切跨包类型。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)。
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ interface ToolProviderResult {
|
|
|
39
39
|
|
|
40
40
|
## 提示词段落
|
|
41
41
|
|
|
42
|
-
`PromptSection`
|
|
42
|
+
`PromptSection` 是一份只读的同进程注册约定。其文本可以是静态的,也可以从当前组装上下文动态解析。各段先按 order 升序排列,再按名称的代码单元顺序排列;仓库贡献方通过 `getSectionOrder()` 解析服务持有的具名分配。Runtime-context 贡献方通过 `getContextOrder()` 解析独立分配。协作式组装完成后,一个有效的 `complete` 段会成为唯一的提示词段落。
|
|
43
43
|
|
|
44
44
|
```ts type-equiv
|
|
45
45
|
/** One contributed section of the system prompt (registry input). */
|
|
@@ -47,9 +47,8 @@ interface PromptSection {
|
|
|
47
47
|
/** Unique name — a duplicate registration throws (see {@link SystemPrompt.section}). */
|
|
48
48
|
readonly name: string
|
|
49
49
|
/**
|
|
50
|
-
* Sections are concatenated in ascending order.
|
|
51
|
-
*
|
|
52
|
-
* other negative orders also render before the persona.
|
|
50
|
+
* Sections are concatenated in ascending order. Equal orders use code-unit
|
|
51
|
+
* name order.
|
|
53
52
|
*/
|
|
54
53
|
readonly order: number
|
|
55
54
|
/**
|
|
@@ -90,7 +89,7 @@ interface PromptContext {
|
|
|
90
89
|
|
|
91
90
|
## Cordis API
|
|
92
91
|
|
|
93
|
-
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`) —
|
|
92
|
+
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).
|
|
94
93
|
|
|
95
94
|
<a id="ctxsystemprompt--systemprompt"></a>
|
|
96
95
|
|
|
@@ -109,6 +108,20 @@ Registry service for the prompt inputs assembled before each model step.
|
|
|
109
108
|
*/
|
|
110
109
|
section(section: PromptSection): () => void
|
|
111
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Resolve the centrally owned placement of a repository prompt section.
|
|
113
|
+
* @param name - stable section placement name.
|
|
114
|
+
* @returns the section's numeric sort order.
|
|
115
|
+
*/
|
|
116
|
+
getSectionOrder(name: PromptSectionOrderName): number
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the centrally owned placement of a repository runtime context.
|
|
120
|
+
* @param name - stable context placement name.
|
|
121
|
+
* @returns the context's numeric sort order.
|
|
122
|
+
*/
|
|
123
|
+
getContextOrder(name: PromptContextOrderName): number
|
|
124
|
+
|
|
112
125
|
/**
|
|
113
126
|
* Register ordered dynamic context in the calling context's scope. Scoped
|
|
114
127
|
* entries shadow global entries with the same name.
|
|
@@ -156,7 +169,7 @@ variable(name: string, provider: (context: AssembleContext) => string | undefine
|
|
|
156
169
|
async assemble(context: AssembleContext = {}): Promise<PromptAssembly>
|
|
157
170
|
```
|
|
158
171
|
|
|
159
|
-
Source: [`packages/core/system-prompt/src/index.ts
|
|
172
|
+
Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
|
|
160
173
|
|
|
161
174
|
<a id="system-prompt-events"></a>
|
|
162
175
|
|
|
@@ -184,9 +197,9 @@ Expert waterfall over the assembled sections, contexts, tools, and variables. Sc
|
|
|
184
197
|
'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly: PromptAssembly, context: AssembleContext, next: () => Promise<PromptAssembly>): Promise<PromptAssembly>
|
|
185
198
|
```
|
|
186
199
|
|
|
187
|
-
Types: [Scoped](scope.md)
|
|
200
|
+
Types: [Scoped](scope.zh.md)
|
|
188
201
|
|
|
189
|
-
Source: [`packages/core/system-prompt/src/index.ts
|
|
202
|
+
Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
|
|
190
203
|
|
|
191
204
|
<a id="system-promptchange--emit"></a>
|
|
192
205
|
|
|
@@ -203,5 +216,5 @@ Emitted when any prompt provider changes. This registry notification is unfilter
|
|
|
203
216
|
'system-prompt/change'(): void
|
|
204
217
|
```
|
|
205
218
|
|
|
206
|
-
Source: [`packages/core/system-prompt/src/index.ts
|
|
219
|
+
Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)
|
|
207
220
|
<!-- 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/terminal.md
|
|
5
|
-
terminal.md:
|
|
6
|
-
terminal.zh.md:
|
|
5
|
+
terminal.md: c1c78963e48f51014678e778bbdc5da530f453c6
|
|
6
|
+
terminal.zh.md: e97e5771f5681ce98024394752405dca012b0a5e
|
|
@@ -96,7 +96,7 @@ interface TerminalSendResult {
|
|
|
96
96
|
|
|
97
97
|
## Cordis API
|
|
98
98
|
|
|
99
|
-
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`) —
|
|
99
|
+
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).
|
|
100
100
|
|
|
101
101
|
<a id="ctxterminals--terminalsessionservice"></a>
|
|
102
102
|
|
|
@@ -180,5 +180,5 @@ list(owner: Agent): TerminalSessionSnapshot[]
|
|
|
180
180
|
|
|
181
181
|
Types: [Agent](core.md)
|
|
182
182
|
|
|
183
|
-
Source: [`packages/terminal/terminal/src/index.ts
|
|
183
|
+
Source: [`packages/terminal/terminal/src/index.ts`](../../packages/terminal/terminal/src/index.ts)
|
|
184
184
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](terminal.md) | 中文
|
|
4
4
|
|
|
5
|
-
PTY 后端、`ctx.terminals` 与面向模型的消费方共享的类型。[持久 PTY Agent Note](../../.agents/notes/implemented/feature/2026-07-16-persistent-pty-sessions.md) 负责记录决策依据;本页记录来自 [`packages/terminal/terminal/src/types.ts`](../../packages/terminal/terminal/src/types.ts) 的跨包词汇。
|
|
5
|
+
PTY 后端、`ctx.terminals` 与面向模型的消费方共享的类型。[持久 PTY Agent Note](../../.agents/notes/implemented/feature/2026-07-16-persistent-pty-sessions.zh.md) 负责记录决策依据;本页记录来自 [`packages/terminal/terminal/src/types.ts`](../../packages/terminal/terminal/src/types.ts) 的跨包词汇。
|
|
6
6
|
|
|
7
7
|
## 标识与就绪
|
|
8
8
|
|
|
@@ -96,7 +96,7 @@ interface TerminalSendResult {
|
|
|
96
96
|
|
|
97
97
|
## Cordis API
|
|
98
98
|
|
|
99
|
-
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`) —
|
|
99
|
+
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).
|
|
100
100
|
|
|
101
101
|
<a id="ctxterminals--terminalsessionservice"></a>
|
|
102
102
|
|
|
@@ -178,7 +178,7 @@ async kill(owner: Agent, id: TerminalSessionId, reason: string = 'model request'
|
|
|
178
178
|
list(owner: Agent): TerminalSessionSnapshot[]
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
Types: [Agent](core.md)
|
|
181
|
+
Types: [Agent](core.zh.md)
|
|
182
182
|
|
|
183
|
-
Source: [`packages/terminal/terminal/src/index.ts
|
|
183
|
+
Source: [`packages/terminal/terminal/src/index.ts`](../../packages/terminal/terminal/src/index.ts)
|
|
184
184
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write docs/subsystems/todo.md
|
|
5
|
+
todo.md: 70eca60ff484572b6c1a62737816504830623726
|
|
6
|
+
todo.zh.md: 74f76f59b6cd132bb1c3722c7fef7f554554b242
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Todo
|
|
2
|
+
|
|
3
|
+
English | [中文](todo.zh.md)
|
|
4
|
+
|
|
5
|
+
The durable todo vocabulary owned by [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README.md). The model-facing tool replaces one agent session's whole list; the package also owns the event declaration, replay projection, and invariant companion. Tool behavior and configuration are on the [package README](../../packages/todo/tool-todo/README.md).
|
|
6
|
+
|
|
7
|
+
Source: [`packages/todo/tool-todo/src/types.ts`](../../packages/todo/tool-todo/src/types.ts)
|
|
8
|
+
|
|
9
|
+
## `TodoItem` — one list entry
|
|
10
|
+
|
|
11
|
+
```ts type-equiv
|
|
12
|
+
/**
|
|
13
|
+
* One entry in an agent's todo list — the unit of the `todo/write`
|
|
14
|
+
* whole-list snapshot declared by this package.
|
|
15
|
+
*
|
|
16
|
+
* Deliberately minimal: a human-readable `content` line and a three-state
|
|
17
|
+
* `status`. No id, priority, or `activeForm` — the list is replaced wholesale
|
|
18
|
+
* on every write (last-write-wins), so entries need no stable identity. The
|
|
19
|
+
* three statuses describe the complete portable lifecycle needed by model and
|
|
20
|
+
* UI consumers.
|
|
21
|
+
*/
|
|
22
|
+
interface TodoItem {
|
|
23
|
+
/** What this task is — a short imperative line shown in the UI. */
|
|
24
|
+
content: string
|
|
25
|
+
/** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
|
|
26
|
+
status: 'pending' | 'in_progress' | 'completed'
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Durable event and invariant
|
|
31
|
+
|
|
32
|
+
The package declaration-merges `todo/write: { todos: TodoItem[] }` into `SessionEventMap`. The event is log-only and carries the complete replacement list; the generated [persistence catalog](../persistence-catalog.md#todowrite--log-only) records its declaration site. The package's invariant companion validates existing and newly announced sessions in one pass, then tracks committed turn boundaries incrementally so every live `todo/write` is checked before append without rescanning the log.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Todo
|
|
2
|
+
|
|
3
|
+
[English](todo.md) | 中文
|
|
4
|
+
|
|
5
|
+
本页记录 [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README.zh.md) 拥有的持久 todo 词汇。面向模型的工具会整体替换一个 agent(智能体)会话的列表;该包还拥有事件声明、回放投影和不变量配套插件。工具行为与配置见[包 README](../../packages/todo/tool-todo/README.zh.md)。
|
|
6
|
+
|
|
7
|
+
源码:[`packages/todo/tool-todo/src/types.ts`](../../packages/todo/tool-todo/src/types.ts)
|
|
8
|
+
|
|
9
|
+
## `TodoItem`:一条列表项
|
|
10
|
+
|
|
11
|
+
```ts type-equiv
|
|
12
|
+
/**
|
|
13
|
+
* One entry in an agent's todo list — the unit of the `todo/write`
|
|
14
|
+
* whole-list snapshot declared by this package.
|
|
15
|
+
*
|
|
16
|
+
* Deliberately minimal: a human-readable `content` line and a three-state
|
|
17
|
+
* `status`. No id, priority, or `activeForm` — the list is replaced wholesale
|
|
18
|
+
* on every write (last-write-wins), so entries need no stable identity. The
|
|
19
|
+
* three statuses describe the complete portable lifecycle needed by model and
|
|
20
|
+
* UI consumers.
|
|
21
|
+
*/
|
|
22
|
+
interface TodoItem {
|
|
23
|
+
/** What this task is — a short imperative line shown in the UI. */
|
|
24
|
+
content: string
|
|
25
|
+
/** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
|
|
26
|
+
status: 'pending' | 'in_progress' | 'completed'
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 持久事件与不变量
|
|
31
|
+
|
|
32
|
+
该包通过声明合并把 `todo/write: { todos: TodoItem[] }` 加入 `SessionEventMap`。此事件仅写入日志,并携带完整替换列表;生成的[持久化目录](../persistence-catalog.zh.md#todowrite--log-only)会记录其声明位置。该包的不变量配套插件会单次遍历校验现有会话和新发布的会话,随后增量追踪已提交的轮次边界,使每个实时 `todo/write` 都能在追加前得到校验,而无需重新扫描日志。
|
|
@@ -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/token-meter.md
|
|
5
|
-
token-meter.md:
|
|
6
|
-
token-meter.zh.md:
|
|
5
|
+
token-meter.md: 9c4a1e4b95ffd84f65f7a73e208be245378a3301
|
|
6
|
+
token-meter.zh.md: d9e2e7f773041ccb6d1e4c3cc4d81a342db0cc01
|
|
@@ -19,14 +19,14 @@ interface TokenMeasurement {
|
|
|
19
19
|
readonly surfaceDeltaTokens: number
|
|
20
20
|
/** Non-negative current request-and-response pressure. */
|
|
21
21
|
readonly totalTokens: number
|
|
22
|
-
/** Total
|
|
22
|
+
/** Total route-priced request tokens across the current surface; equals the sum of the node prices. */
|
|
23
23
|
readonly surfaceTokens: number
|
|
24
24
|
/** Current surface nodes in positional head-to-tail order. */
|
|
25
25
|
readonly nodes: readonly TokenSurfaceNode[]
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
`baseline.kind === 'usage'` means the latest successful provider call has the same canonical request envelope and its total is no lower than that call's full
|
|
29
|
+
Every measurement resolves the effective envelope's routed provider/model to that route's declared request-image pricing through `ctx.llm`, so image occurrences are priced as the visual tokens plus model-visible text the request actually sends; routes and compositions without declared pricing keep the fixed heuristic. `baseline.kind === 'usage'` means the latest successful provider call has the same canonical request envelope and its total is no lower than that call's full route-priced anchor. `estimated` means no reusable conservative usage anchor exists, so the service priced the complete envelope and surface itself. A later successful request replaces the earlier anchor; signed `surfaceDeltaTokens` preserves growth and shrinkage relative to a matching anchor, repricing both sides under the same route. `totalTokens` remains request-and-response pressure, while `surfaceTokens` is the surface-only route-priced total and equals the sum of the node prices.
|
|
30
30
|
|
|
31
31
|
## `TokenSurfaceNode`
|
|
32
32
|
|
|
@@ -35,8 +35,19 @@ interface TokenMeasurement {
|
|
|
35
35
|
interface TokenSurfaceNode {
|
|
36
36
|
/** Durable sequence number of the surface event. */
|
|
37
37
|
readonly seq: number
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Request-pressure tokens for the exact message projected by this node under
|
|
40
|
+
* the measured route: image occurrences carry the route's declared visual
|
|
41
|
+
* price when the routed adapter declares one, and the fixed heuristic
|
|
42
|
+
* otherwise. Trigger, retention, and range selection all read this price.
|
|
43
|
+
*/
|
|
39
44
|
readonly tokens: number
|
|
45
|
+
/**
|
|
46
|
+
* Fixed-heuristic tokens for the same message, independent of any route.
|
|
47
|
+
* The shadow-price protocol prices replacements with this value so the O(1)
|
|
48
|
+
* projection fold stays in agreement with its own appends.
|
|
49
|
+
*/
|
|
50
|
+
readonly heuristicTokens: number
|
|
40
51
|
}
|
|
41
52
|
```
|
|
42
53
|
|
|
@@ -48,7 +59,7 @@ Surface order is authoritative; replacement nodes can have higher durable seqs t
|
|
|
48
59
|
|
|
49
60
|
## Cordis API
|
|
50
61
|
|
|
51
|
-
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`) —
|
|
62
|
+
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).
|
|
52
63
|
|
|
53
64
|
<a id="ctxtokenmeter--tokenmeter"></a>
|
|
54
65
|
|
|
@@ -60,14 +71,18 @@ Replay owner for one service-wide estimator and isolated per-session folds.
|
|
|
60
71
|
/**
|
|
61
72
|
* Measure current request pressure and surface through the durable tail.
|
|
62
73
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
74
|
+
* The effective envelope's routed provider/model selects the request-image
|
|
75
|
+
* pricing every node is priced under: a route whose adapter declares image
|
|
76
|
+
* pricing charges each retained image its visual tokens plus its
|
|
77
|
+
* model-visible text, while other routes keep the fixed heuristic. Provider
|
|
78
|
+
* usage is reused only when the latest successful call's canonical request
|
|
79
|
+
* envelope matches `requestHeader` and its total is no lower than that
|
|
80
|
+
* call's full route-priced anchor; otherwise the complete envelope and
|
|
81
|
+
* surface are repriced.
|
|
67
82
|
*
|
|
68
|
-
* `requestHeader`
|
|
69
|
-
*
|
|
70
|
-
* nodes, so measurement is O(surface).
|
|
83
|
+
* `requestHeader` replaces the latest logged envelope for pressure and node
|
|
84
|
+
* pricing; the node set always describes the current session surface. Every
|
|
85
|
+
* call clones those positional nodes, so measurement is O(surface).
|
|
71
86
|
*
|
|
72
87
|
* @param session - session to replay through its current durable tail.
|
|
73
88
|
* @param requestHeader - optional effective request envelope replacing the latest logged header.
|
|
@@ -86,5 +101,5 @@ estimateMessage(message: Message): number
|
|
|
86
101
|
|
|
87
102
|
Types: [EpochHeader](session.md) · [Message](llm-streaming.md) · [Session](session.md)
|
|
88
103
|
|
|
89
|
-
Source: [`packages/llm/token-meter/src/index.ts
|
|
104
|
+
Source: [`packages/llm/token-meter/src/index.ts`](../../packages/llm/token-meter/src/index.ts)
|
|
90
105
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -19,14 +19,14 @@ interface TokenMeasurement {
|
|
|
19
19
|
readonly surfaceDeltaTokens: number
|
|
20
20
|
/** Non-negative current request-and-response pressure. */
|
|
21
21
|
readonly totalTokens: number
|
|
22
|
-
/** Total
|
|
22
|
+
/** Total route-priced request tokens across the current surface; equals the sum of the node prices. */
|
|
23
23
|
readonly surfaceTokens: number
|
|
24
24
|
/** Current surface nodes in positional head-to-tail order. */
|
|
25
25
|
readonly nodes: readonly TokenSurfaceNode[]
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
`baseline.kind === 'usage'` 表示最近一次成功的提供方调用具有相同的规范请求 envelope
|
|
29
|
+
每次计量都会通过 `ctx.llm` 把生效信封的路由 provider/model 解析为该路由声明的请求图片定价,因此图片出现处按请求实际发送的视觉 token 加模型可见文本计价;未声明定价的路由与组合保持固定启发式规则。`baseline.kind === 'usage'` 表示最近一次成功的提供方调用具有相同的规范请求 envelope,且该调用的总量不低于其完整路由定价锚点。`estimated` 表示不存在可复用的保守 usage 锚点,因此服务自行对完整信封和表层定价。后续成功请求会替换早先的锚点;有符号的 `surfaceDeltaTokens` 会保留相对于匹配锚点的增长与缩减,且两侧按同一路由重新定价。`totalTokens` 仍表示请求与响应压力,`surfaceTokens` 则是表层的路由定价总量,等于所有节点价格之和。
|
|
30
30
|
|
|
31
31
|
## `TokenSurfaceNode`
|
|
32
32
|
|
|
@@ -35,8 +35,19 @@ interface TokenMeasurement {
|
|
|
35
35
|
interface TokenSurfaceNode {
|
|
36
36
|
/** Durable sequence number of the surface event. */
|
|
37
37
|
readonly seq: number
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Request-pressure tokens for the exact message projected by this node under
|
|
40
|
+
* the measured route: image occurrences carry the route's declared visual
|
|
41
|
+
* price when the routed adapter declares one, and the fixed heuristic
|
|
42
|
+
* otherwise. Trigger, retention, and range selection all read this price.
|
|
43
|
+
*/
|
|
39
44
|
readonly tokens: number
|
|
45
|
+
/**
|
|
46
|
+
* Fixed-heuristic tokens for the same message, independent of any route.
|
|
47
|
+
* The shadow-price protocol prices replacements with this value so the O(1)
|
|
48
|
+
* projection fold stays in agreement with its own appends.
|
|
49
|
+
*/
|
|
50
|
+
readonly heuristicTokens: number
|
|
40
51
|
}
|
|
41
52
|
```
|
|
42
53
|
|
|
@@ -48,7 +59,7 @@ interface TokenSurfaceNode {
|
|
|
48
59
|
|
|
49
60
|
## Cordis API
|
|
50
61
|
|
|
51
|
-
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`) —
|
|
62
|
+
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).
|
|
52
63
|
|
|
53
64
|
<a id="ctxtokenmeter--tokenmeter"></a>
|
|
54
65
|
|
|
@@ -60,14 +71,18 @@ Replay owner for one service-wide estimator and isolated per-session folds.
|
|
|
60
71
|
/**
|
|
61
72
|
* Measure current request pressure and surface through the durable tail.
|
|
62
73
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
74
|
+
* The effective envelope's routed provider/model selects the request-image
|
|
75
|
+
* pricing every node is priced under: a route whose adapter declares image
|
|
76
|
+
* pricing charges each retained image its visual tokens plus its
|
|
77
|
+
* model-visible text, while other routes keep the fixed heuristic. Provider
|
|
78
|
+
* usage is reused only when the latest successful call's canonical request
|
|
79
|
+
* envelope matches `requestHeader` and its total is no lower than that
|
|
80
|
+
* call's full route-priced anchor; otherwise the complete envelope and
|
|
81
|
+
* surface are repriced.
|
|
67
82
|
*
|
|
68
|
-
* `requestHeader`
|
|
69
|
-
*
|
|
70
|
-
* nodes, so measurement is O(surface).
|
|
83
|
+
* `requestHeader` replaces the latest logged envelope for pressure and node
|
|
84
|
+
* pricing; the node set always describes the current session surface. Every
|
|
85
|
+
* call clones those positional nodes, so measurement is O(surface).
|
|
71
86
|
*
|
|
72
87
|
* @param session - session to replay through its current durable tail.
|
|
73
88
|
* @param requestHeader - optional effective request envelope replacing the latest logged header.
|
|
@@ -84,7 +99,7 @@ measure(session: Session, requestHeader?: EpochHeader): TokenMeasurement
|
|
|
84
99
|
estimateMessage(message: Message): number
|
|
85
100
|
```
|
|
86
101
|
|
|
87
|
-
Types: [EpochHeader](session.md) · [Message](llm-streaming.md) · [Session](session.md)
|
|
102
|
+
Types: [EpochHeader](session.zh.md) · [Message](llm-streaming.zh.md) · [Session](session.zh.md)
|
|
88
103
|
|
|
89
|
-
Source: [`packages/llm/token-meter/src/index.ts
|
|
104
|
+
Source: [`packages/llm/token-meter/src/index.ts`](../../packages/llm/token-meter/src/index.ts)
|
|
90
105
|
<!-- 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/tools.md
|
|
5
|
-
tools.md:
|
|
6
|
-
tools.zh.md:
|
|
5
|
+
tools.md: 9939e8ab9fff9fa5bd23fd370e07f6296a608824
|
|
6
|
+
tools.zh.md: 52e812a35d6932a5ed00a86a3d3fe71460b26cd4
|
|
@@ -157,7 +157,7 @@ Registration is a trusted same-process contract. The registry borrows the typed
|
|
|
157
157
|
```ts type-equiv
|
|
158
158
|
/**
|
|
159
159
|
* Per-scope filter over global tools. Restrictions intersect and do not affect
|
|
160
|
-
* scoped registrations or the reserved
|
|
160
|
+
* scoped registrations or the reserved PTC mode transport.
|
|
161
161
|
*/
|
|
162
162
|
interface ToolRestriction {
|
|
163
163
|
/** Global tool names that stay visible; everything else is removed. */
|
|
@@ -183,23 +183,23 @@ type ToolExecutionToken = symbol & { readonly [toolExecutionTokenBrand]: true }
|
|
|
183
183
|
* callers do not choose that token.
|
|
184
184
|
*/
|
|
185
185
|
interface ToolExecutionInput {
|
|
186
|
-
readonly callId:
|
|
186
|
+
readonly callId: ToolCallId
|
|
187
187
|
/**
|
|
188
188
|
* Root model-requested call owning this execution tree. Callers omit it for
|
|
189
189
|
* a root execution; nested dispatchers propagate the enclosing value.
|
|
190
190
|
*/
|
|
191
|
-
readonly rootCallId?:
|
|
191
|
+
readonly rootCallId?: ToolCallId
|
|
192
192
|
readonly name: string
|
|
193
193
|
/** Losslessly JSON-serializable parsed arguments (tools validate their own schema). */
|
|
194
194
|
readonly arguments: unknown
|
|
195
195
|
/** The agent on whose behalf the call runs (set by the agent loop). */
|
|
196
196
|
readonly agent?: Agent
|
|
197
197
|
/**
|
|
198
|
-
* Opaque token of the enclosing transport execution, when one exists.
|
|
199
|
-
*
|
|
198
|
+
* Opaque token of the enclosing transport execution, when one exists. PTC
|
|
199
|
+
* mode sets this on SDK sub-dispatches so commit-style observers can wait for
|
|
200
200
|
* the outer `run_code` outcome without receiving its live mutable execution.
|
|
201
201
|
* The token also marks the call as a transport sub-dispatch rather than a
|
|
202
|
-
* model-direct call: under `mode: '
|
|
202
|
+
* model-direct call: under `mode: 'ptc'`, only calls WITH a parent may
|
|
203
203
|
* execute a native tool name — a model-direct call (no parent) is denied as
|
|
204
204
|
* `UNKNOWN_TOOL` before the policy pipeline. See {@link ToolRuntime.execute}.
|
|
205
205
|
*/
|
|
@@ -252,25 +252,25 @@ type ToolExecutionMode =
|
|
|
252
252
|
| { kind: 'exclusive' }
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
PTC mode's bridge additionally exposes each settled sub-dispatch to the `tools/ptc-dispatch-log` waterfall, which may change the durable event's copy of the content (the program's value and model-visible result remain untouched):
|
|
256
256
|
|
|
257
257
|
```ts type-equiv
|
|
258
258
|
/**
|
|
259
259
|
* One settled `run_code` sub-dispatch about to be logged, as seen by the
|
|
260
|
-
* `tools/
|
|
260
|
+
* `tools/ptc-dispatch-log` waterfall: the parent execution (session owner,
|
|
261
261
|
* outer call identity), the sub-call identity, and the outcome whose durable
|
|
262
262
|
* copy a listener may reshape. `content` is the RENDERED result projection
|
|
263
263
|
* (what a native `tool/result` would carry) — the program itself received
|
|
264
264
|
* the structured `value` (or just the error message on failure); only the
|
|
265
265
|
* `tool/code-dispatch` event's copy changes.
|
|
266
266
|
*/
|
|
267
|
-
interface
|
|
267
|
+
interface PtcDispatchLog {
|
|
268
268
|
/** The outer `run_code` execution. */
|
|
269
269
|
readonly exec: ToolExecution
|
|
270
270
|
/** The calling agent (the scope routing key and the spill owner), when the outer call has one. */
|
|
271
271
|
readonly agent?: Agent
|
|
272
272
|
/** Deterministic sub-call id (`<parent>:code:<n>`). */
|
|
273
|
-
readonly subCallId:
|
|
273
|
+
readonly subCallId: ToolCallId
|
|
274
274
|
/** The dispatched sub-tool name. */
|
|
275
275
|
readonly name: string
|
|
276
276
|
/** Whether the sub-call settled as an error. */
|
|
@@ -290,7 +290,7 @@ interface CodeDispatchLog {
|
|
|
290
290
|
*/
|
|
291
291
|
interface ToolExecution extends ToolExecutionInput {
|
|
292
292
|
/** Root model-requested call, resolved for every root and nested execution. */
|
|
293
|
-
readonly rootCallId:
|
|
293
|
+
readonly rootCallId: ToolCallId
|
|
294
294
|
/** Registry-assigned identity shared with nested calls only as their opaque `parent` token. */
|
|
295
295
|
readonly token: ToolExecutionToken
|
|
296
296
|
}
|
|
@@ -473,7 +473,7 @@ The full presentation field docs live in [`packages/core/tools/src/presentation.
|
|
|
473
473
|
|
|
474
474
|
## Cordis API
|
|
475
475
|
|
|
476
|
-
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`) —
|
|
476
|
+
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).
|
|
477
477
|
|
|
478
478
|
<a id="ctxtools--toolruntime"></a>
|
|
479
479
|
|
|
@@ -488,7 +488,7 @@ Tool registry and execution pipeline. Scoped registrations shadow globals; one v
|
|
|
488
488
|
* declaration covers every agent joined under it.
|
|
489
489
|
*
|
|
490
490
|
* Scoped only, and one declaration per scope: this is how an agent preset
|
|
491
|
-
* composes
|
|
491
|
+
* composes PTC mode agents beside native ones in the same process, and a
|
|
492
492
|
* process-global override would be the `mode` config field instead.
|
|
493
493
|
* @param mode - the presentation the covered agents' models see.
|
|
494
494
|
* @returns the exact disposer that restores the deployment default.
|
|
@@ -571,7 +571,7 @@ async execute(exec: ToolExecutionInput): Promise<ToolExecutionResult>
|
|
|
571
571
|
|
|
572
572
|
Types: [ScopeKey](scope.md)
|
|
573
573
|
|
|
574
|
-
Source: [`packages/core/tools/src/index.ts
|
|
574
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
575
575
|
|
|
576
576
|
<a id="tools-events"></a>
|
|
577
577
|
|
|
@@ -596,34 +596,7 @@ A tool was registered or unregistered, or a scoped restriction changed (the avai
|
|
|
596
596
|
'tools/change'(): void
|
|
597
597
|
```
|
|
598
598
|
|
|
599
|
-
Source: [`packages/core/tools/src/index.ts
|
|
600
|
-
|
|
601
|
-
<a id="toolscode-dispatch-log--waterfall"></a>
|
|
602
|
-
|
|
603
|
-
#### `tools/code-dispatch-log` — waterfall
|
|
604
|
-
|
|
605
|
-
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/code-dispatch` event. `next()` keeps the content unchanged; a listener may return replacement blocks (e.g. the spill policy's preview + locator for an oversized text result). Only the logged copy is affected — the program already received the complete value, and the model sees neither. A throwing listener is contained: the bridge falls back to logging the original settled content. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
606
|
-
|
|
607
|
-
```ts cordis-catalog
|
|
608
|
-
/**
|
|
609
|
-
* Allow a listener to replace content in the DURABLE LOG COPY of one
|
|
610
|
-
* `run_code` sub-dispatch outcome before the bridge appends its
|
|
611
|
-
* `tool/code-dispatch` event. `next()` keeps the
|
|
612
|
-
* content unchanged; a listener may return replacement blocks (e.g. the
|
|
613
|
-
* spill policy's preview + locator for an oversized text result). Only the
|
|
614
|
-
* logged copy is affected — the program already received the complete
|
|
615
|
-
* value, and the model sees neither. A throwing listener is contained:
|
|
616
|
-
* the bridge falls back to logging the original settled content.
|
|
617
|
-
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
618
|
-
* @param dispatch - the parent execution, sub-call identity, and the settled content to log.
|
|
619
|
-
* @mode waterfall
|
|
620
|
-
*/
|
|
621
|
-
'tools/code-dispatch-log'(this: Scoped<ToolRuntime>, dispatch: CodeDispatchLog, next: () => Promise<ContentBlock[]>): Promise<ContentBlock[]>
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
Types: [ContentBlock](llm-streaming.md) · [Scoped](scope.md)
|
|
625
|
-
|
|
626
|
-
Source: [`packages/core/tools/src/index.ts:189`](../../packages/core/tools/src/index.ts)
|
|
599
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
627
600
|
|
|
628
601
|
<a id="toolsexecute--waterfall"></a>
|
|
629
602
|
|
|
@@ -647,7 +620,7 @@ Around-dispatch waterfall for timeout, retry, or metrics. `next()` returns a nor
|
|
|
647
620
|
|
|
648
621
|
Types: [Scoped](scope.md)
|
|
649
622
|
|
|
650
|
-
Source: [`packages/core/tools/src/index.ts
|
|
623
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
651
624
|
|
|
652
625
|
<a id="toolspost-execute--waterfall"></a>
|
|
653
626
|
|
|
@@ -672,7 +645,7 @@ Accept, replace, enrich, or block a normalized dispatch result. `next()` accepts
|
|
|
672
645
|
|
|
673
646
|
Types: [Scoped](scope.md)
|
|
674
647
|
|
|
675
|
-
Source: [`packages/core/tools/src/index.ts
|
|
648
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
676
649
|
|
|
677
650
|
<a id="toolspre-execute--waterfall"></a>
|
|
678
651
|
|
|
@@ -695,7 +668,34 @@ Allow, deny, or ask before dispatch. `next()` delegates to allow; missing approv
|
|
|
695
668
|
|
|
696
669
|
Types: [Scoped](scope.md)
|
|
697
670
|
|
|
698
|
-
Source: [`packages/core/tools/src/index.ts
|
|
671
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
672
|
+
|
|
673
|
+
<a id="toolsptc-dispatch-log--waterfall"></a>
|
|
674
|
+
|
|
675
|
+
#### `tools/ptc-dispatch-log` — waterfall
|
|
676
|
+
|
|
677
|
+
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/code-dispatch` event. `next()` keeps the content unchanged; a listener may return replacement blocks (e.g. the spill policy's preview + locator for an oversized text result). Only the logged copy is affected — the program already received the complete value, and the model sees neither. A throwing listener is contained: the bridge falls back to logging the original settled content. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
678
|
+
|
|
679
|
+
```ts cordis-catalog
|
|
680
|
+
/**
|
|
681
|
+
* Allow a listener to replace content in the DURABLE LOG COPY of one
|
|
682
|
+
* `run_code` sub-dispatch outcome before the bridge appends its
|
|
683
|
+
* `tool/code-dispatch` event. `next()` keeps the
|
|
684
|
+
* content unchanged; a listener may return replacement blocks (e.g. the
|
|
685
|
+
* spill policy's preview + locator for an oversized text result). Only the
|
|
686
|
+
* logged copy is affected — the program already received the complete
|
|
687
|
+
* value, and the model sees neither. A throwing listener is contained:
|
|
688
|
+
* the bridge falls back to logging the original settled content.
|
|
689
|
+
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
690
|
+
* @param dispatch - the parent execution, sub-call identity, and the settled content to log.
|
|
691
|
+
* @mode waterfall
|
|
692
|
+
*/
|
|
693
|
+
'tools/ptc-dispatch-log'(this: Scoped<ToolRuntime>, dispatch: PtcDispatchLog, next: () => Promise<ContentBlock[]>): Promise<ContentBlock[]>
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
Types: [ContentBlock](llm-streaming.md) · [Scoped](scope.md)
|
|
697
|
+
|
|
698
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
699
699
|
|
|
700
700
|
<a id="toolsresult--emit"></a>
|
|
701
701
|
|
|
@@ -716,5 +716,5 @@ Observe the frozen, lossless-JSON final outcome. Listener failures are contained
|
|
|
716
716
|
|
|
717
717
|
Types: [Scoped](scope.md)
|
|
718
718
|
|
|
719
|
-
Source: [`packages/core/tools/src/index.ts
|
|
719
|
+
Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index.ts)
|
|
720
720
|
<!-- END GENERATED cordis-surface -->
|