dsh-plugin-guide 0.2.0 → 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 +36 -18
- package/README.hi.md +36 -18
- package/README.md +38 -18
- package/README.pt.md +36 -18
- package/README.zh.md +38 -18
- 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 +2 -2
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +3 -3
- package/package.json +13 -4
- package/references/cordis-paper-and-community.md +1 -1
- package/references/harness-repo.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 +160 -39
- package/references/official-docs/docs/persistence-catalog.zh.md +169 -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 +273 -39
- package/references/official-docs/docs/subsystems/session.zh.md +290 -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/check-docs-drift.ps1 +55 -0
- package/scripts/check-readme-sync.mjs +91 -0
- 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
|
@@ -1,69 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "The DeepSeek Harness package workspace: how the npm packages under packages/ are grouped, what each group owns, and the conventions that bind them."
|
|
3
|
+
kind: "package-group"
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Packages
|
|
2
7
|
|
|
3
8
|
English | [中文](README.zh.md)
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
| [`
|
|
27
|
-
| [`
|
|
28
|
-
| [`
|
|
29
|
-
| [`
|
|
30
|
-
| [`
|
|
31
|
-
| [`
|
|
32
|
-
| [`
|
|
33
|
-
| [`
|
|
34
|
-
| [`
|
|
35
|
-
| [`
|
|
36
|
-
| [`
|
|
37
|
-
| [`
|
|
38
|
-
| [`
|
|
39
|
-
| [`
|
|
40
|
-
| [`
|
|
41
|
-
| [`
|
|
42
|
-
| [`
|
|
43
|
-
| [`
|
|
44
|
-
| [`
|
|
45
|
-
| [`
|
|
46
|
-
| [`
|
|
47
|
-
| [`
|
|
48
|
-
| [`
|
|
49
|
-
| [`
|
|
50
|
-
| [`
|
|
51
|
-
| [`
|
|
52
|
-
| [`
|
|
53
|
-
| [`
|
|
54
|
-
| [`
|
|
55
|
-
| [`
|
|
56
|
-
| [`
|
|
57
|
-
| [`
|
|
58
|
-
| [`
|
|
59
|
-
| [`
|
|
60
|
-
|
|
61
|
-
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
The harness is assembled from npm packages under `packages/`, grouped by capability family: sessions and the agent loop, model-facing tools, shell and filesystem execution, web access, subagents, and the rest. Use this page as the top-level map: find the owning group, then open its README for the package list. Every package is scoped `@deepseek-ai/dsh-*` and lives in exactly one group; each group README is the authoritative package map for its family.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Package groups](#package-groups)
|
|
17
|
+
- [Release expectations](#release-expectations)
|
|
18
|
+
- [Dependencies](#dependencies)
|
|
19
|
+
- [Package README contracts](#package-readme-contracts)
|
|
20
|
+
- [Dev Note](#dev-note)
|
|
21
|
+
|
|
22
|
+
-----
|
|
23
|
+
|
|
24
|
+
<a id="package-groups"></a>
|
|
25
|
+
## Package groups
|
|
26
|
+
|
|
27
|
+
Every package lives in exactly one group; new packages join existing groups, and a new group updates its own README and this table.
|
|
28
|
+
|
|
29
|
+
| Group | Role |
|
|
30
|
+
|---|---|
|
|
31
|
+
| [`core/`](core/README.md) | Product API spine: sessions, prompts, tools, agent services, and the concrete loop |
|
|
32
|
+
| [`api/`](api/README.md) | Remote BFF assembly and Typert RPC gateway |
|
|
33
|
+
| [`typert/`](typert/README.md) | Type graph generation, artifact loading, and runtime registry |
|
|
34
|
+
| [`goal/`](goal/README.md) | Same-session goal persistence and lifecycle |
|
|
35
|
+
| [`schedule/`](schedule/README.md) | Session-local scheduled follow-ups |
|
|
36
|
+
| [`feedback/`](feedback/README.md) | Human feedback capture and command |
|
|
37
|
+
| [`identity/`](identity/README.md) | Shared anonymous identity |
|
|
38
|
+
| [`llm/`](llm/README.md) | LLM capability family: abstract service + provider adapters |
|
|
39
|
+
| [`e2b/`](e2b/README.md) | E2B remote-runtime providers |
|
|
40
|
+
| [`subprocess/`](subprocess/README.md) | Subprocess capability family: Service Definition + local process-tree provider |
|
|
41
|
+
| [`shell/`](shell/README.md) | Bash capability family: executor seam, local impl, model-facing tools |
|
|
42
|
+
| [`terminal/`](terminal/README.md) | Persistent PTY capability family: owner-scoped sessions, local implementation, model-facing tools |
|
|
43
|
+
| [`code-runtime/`](code-runtime/README.md) | Code-execution capability family: Service Definition + worker-thread provider + PTC mode Consumer |
|
|
44
|
+
| [`sandbox/`](sandbox/README.md) | Process-confinement seam; bwrap/Landlock/Seatbelt backends |
|
|
45
|
+
| [`fs/`](fs/README.md) | Filesystem capability family: seam, local impl, model-facing file tools, discovery tools |
|
|
46
|
+
| [`lsp/`](lsp/README.md) | LSP capability family: seam, generic stdio provider, and the `lsp` tool |
|
|
47
|
+
| [`skill/`](skill/README.md) | Skill capability family: provider registry, local provider, model-facing catalog/loader |
|
|
48
|
+
| [`compaction/`](compaction/README.md) | Compaction capability family: Service Definition + basic provider + command Consumer |
|
|
49
|
+
| [`context/`](context/README.md) | Model-visible request context: workspace instructions, time context, references |
|
|
50
|
+
| [`subagent/`](subagent/README.md) | Subagent capability family: provider-registry contract and model-facing delegation tools |
|
|
51
|
+
| [`jobs/`](jobs/README.md) | Generic background-job runtime and model-facing job control tools |
|
|
52
|
+
| [`experimental/`](experimental/README.md) | Private prototypes and internal-only plugins |
|
|
53
|
+
| [`workflow/`](workflow/README.md) | Workflow seam, worker-thread engine, and model-facing `workflow`/`ralph` tools |
|
|
54
|
+
| [`webhook/`](webhook/README.md) | Verified external events, trusted rules, and fire-and-forget Workspace Sessions |
|
|
55
|
+
| [`web/`](web/README.md) | Web capability family: seam, search/fetch providers, model-facing web tools |
|
|
56
|
+
| [`attachment/`](attachment/README.md) | Durable attachment identity, validation, local content-addressed storage |
|
|
57
|
+
| [`spill/`](spill/README.md) | Spill capability family: storage seam, local impl, tool-result spill policy |
|
|
58
|
+
| [`todo/`](todo/README.md) | The model-facing `todo_write` tool |
|
|
59
|
+
| [`plan/`](plan/README.md) | Plan collaboration state with a direct entry command and reviewed exit |
|
|
60
|
+
| [`preset/`](preset/README.md) | Per-session agent composition from preset `cordis.yml` files |
|
|
61
|
+
| [`guard/`](guard/README.md) | Loop-hygiene guards: advisory repeat-call reminders + the `tools/execute` deadline enforcer |
|
|
62
|
+
| [`bundle/`](bundle/README.md) | Installable `dsh --profile` patch layers |
|
|
63
|
+
| [`extensions/`](extensions/README.md) | Agent runtime self-modification: live plugin/service inspection and model-written mount/unmount |
|
|
64
|
+
| [`hooks/`](hooks/README.md) | Hook bridges + the shared Claude Code / Codex wire-protocol library |
|
|
65
|
+
| [`session/`](session/README.md) | Durable session data plane: persistence seam + backends, projection seam, log-backed titles, session reporting |
|
|
66
|
+
| [`session-query/`](session-query/README.md) | Session retrieval family: logical corpus, bounded reads, lineage, semantic filtering, SQLite full-text search |
|
|
67
|
+
| [`settings/`](settings/README.md) | User-settings seam + file-backed provider |
|
|
68
|
+
| [`credentials/`](credentials/README.md) | Credential-reference and credential-record seam + env-over-`.env` provider + authorization flows that ask a human |
|
|
69
|
+
| [`storage/`](storage/README.md) | Non-session storage hub + backends + domain form |
|
|
70
|
+
| [`workspace/`](workspace/README.md) | Workspace entity |
|
|
71
|
+
| [`sdk/`](sdk/README.md) | Out-of-process SDK: JSON-RPC protocol and TypeScript client/server |
|
|
72
|
+
| [`acp/`](acp/README.md) | Automation-only Agent Client Protocol server |
|
|
73
|
+
| [`interaction/`](interaction/README.md) | Human-collaboration plane: approval/interaction seams, permission preset, commands, ask-user tool |
|
|
74
|
+
| [`boot/`](boot/README.md) | Shared app-bin boot glue |
|
|
75
|
+
| [`host/`](host/README.md) | Web-GUI host half: API gateway + HTTP route server |
|
|
76
|
+
| [`client/`](client/README.md) | Web-GUI browser half: shell, wire, object services, slots, `ui-*` plugins |
|
|
77
|
+
| [`test-support/`](test-support/README.md) | Support infrastructure (testkits, invariants, replay, Loader smokes) |
|
|
78
|
+
| [`runtime-diagnostics/`](runtime-diagnostics/README.md) | Runtime diagnostics: package-owned invariant checks and reports |
|
|
79
|
+
| [`util/`](util/README.md) | Low-level zero-dependency utilities shared across groups (`Branded<B>`, home/path helpers, timeout, retention) |
|
|
80
|
+
|
|
81
|
+
-----
|
|
82
|
+
|
|
83
|
+
<a id="release-expectations"></a>
|
|
84
|
+
## Release expectations
|
|
62
85
|
|
|
86
|
+
Most groups are product — stable API. The exceptions: `e2b/` is a POC, `experimental/` is unreleased, and `test-support/`, `runtime-diagnostics/`, and `util/` are support with lower compatibility expectations.
|
|
87
|
+
|
|
88
|
+
-----
|
|
89
|
+
|
|
90
|
+
<a id="dependencies"></a>
|
|
63
91
|
## Dependencies
|
|
64
92
|
|
|
65
93
|
The dependency graph is generated: [docs/module-graph.md](../docs/module-graph.md) (`pnpm run gen-module-graph`, freshness-gated in CI).
|
|
66
94
|
|
|
67
|
-
**Extension plugins depend on Service Definitions, never concrete providers.** `dsh-agent-loop` is swappable; UI, hook, and tool plugins use `dsh-agent`. Composition bundles
|
|
95
|
+
**Extension plugins depend on Service Definitions, never concrete providers.** `dsh-agent-loop` is swappable; UI, hook, and tool plugins use `dsh-agent`. Composition bundles may depend on spine plugins. Capabilities separate Service Definition / Service Provider / Consumer roles when they evolve independently; see [capability seams](../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md).
|
|
96
|
+
|
|
97
|
+
-----
|
|
98
|
+
|
|
99
|
+
<a id="package-readme-contracts"></a>
|
|
100
|
+
## Package README contracts
|
|
101
|
+
|
|
102
|
+
Every package README covers purpose, configuration, extension points, and [Model Experience](../docs/cookbook/adding-a-package.md#4-write-the-package-readme) unless the model-agnostic [omission allowlist](../scripts/verify-package-readme-model-experience.ts) exempts it. It also carries `## Known Limitations and Deferred Work` or uses its [allowlist](../scripts/verify-package-readme-limitations.ts). Package conventions — exports, service access, invariants, tests — live in [packages/AGENTS.md](AGENTS.md).
|
|
103
|
+
|
|
104
|
+
-----
|
|
105
|
+
|
|
106
|
+
<a id="dev-note"></a>
|
|
107
|
+
## Dev Note
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
111
|
+
|
|
112
|
+
None.
|
|
68
113
|
|
|
69
|
-
|
|
114
|
+
</details>
|
|
@@ -48,6 +48,7 @@ Keep this log exhaustive — every divergence from upstream must be listed.
|
|
|
48
48
|
16. **`cordis/package.json` publishes `src`**: added `src` to the `files` list, joining the other eight vendored packages. Cordis declares `"./src/*": "./src/*"` in its exports, so a tarball without `src` publishes an export map pointing at absent files; the release change judgement also reads `files` to decide whether a diff reaches the payload, and a package whose only published paths are build output has no tracked path to match.
|
|
49
49
|
17. **`@deepseek-ai` rescope**: every vendored manifest `name`, every internal dependency entry among the vendored set, and every module specifier that reaches them use the scoped names in the manifest table's `npm name` column. Directory names, version numbers, and dependency ranges are unchanged, and no upstream runtime identifier is renamed — `Symbol.for('schemastery')` and Schemastery's `vendor:` metadata field keep their upstream values. Re-apply with `pnpm run rescope-vendor --apply` after a sync; the table's two name columns are the mapping, restated for consumers in [docs/rescope.md](../docs/rescope.md).
|
|
50
50
|
18. **Entry `disabled` interpolation in `loader/src/config/entry.ts`**: a `disabled: !!js` expression evaluates against the loader context at every mount decision; the raw node stays in the options, so write-back keeps the `!!js` form. `disabled` is the only interpolated metadata field. Covered by `packages/boot/app-boot/tests/user-patches.spec.ts` and `apps/cli/tests/windows-shell.spec.ts`.
|
|
51
|
+
19. **`loader/src/internal.ts` runtime shape detection**: `ModuleLoader.fromInternal()` classifies the internal loader by which module-job API it owns — `getOrCreateModuleJob` for v2, `getModuleJobForImport` for v1 — instead of by Node major version. Upstream tags every major `>= 24` as v2, but the v2 interface arrived in Node 24.12.0, so 24.0–24.11.1 report major 24 while still carrying the v1 loader; consumers then called `resolveSync` with reversed parameters and every call threw. `dsh web` served an empty client graph (`__DSH_BOOT__.entries: []`) and HMR partial reload resolved no entry URL, both behind swallowed or warn-level errors. Arity cannot discriminate the two shapes, because each reports `resolveSync.length === 2`. A loader owning neither API is left unclassified rather than guessed, so consumers take their documented no-internals path. Covered on the `node-compat` Node version matrix, which pins 24.9 for the mistagged range.
|
|
51
52
|
|
|
52
53
|
## Sync procedure
|
|
53
54
|
|
|
@@ -138,6 +138,30 @@ const homeAndGuide = pairedPages([
|
|
|
138
138
|
section: { root: 'SDK', en: 'SDK' },
|
|
139
139
|
order: 1,
|
|
140
140
|
},
|
|
141
|
+
{
|
|
142
|
+
source: 'docs/user/guide/github-review.md',
|
|
143
|
+
route: 'guide/github-review.md',
|
|
144
|
+
label: { root: 'GitHub 评审会话', en: 'GitHub review sessions' },
|
|
145
|
+
sidebar: { root: 'zh-guide', en: 'en-guide' },
|
|
146
|
+
section: { root: '自动化', en: 'Automation' },
|
|
147
|
+
order: 1,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
source: 'docs/user/guide/schedule.md',
|
|
151
|
+
route: 'guide/schedule.md',
|
|
152
|
+
label: { root: '会话内提醒', en: 'Session reminders' },
|
|
153
|
+
sidebar: { root: 'zh-guide', en: 'en-guide' },
|
|
154
|
+
section: { root: '自动化', en: 'Automation' },
|
|
155
|
+
order: 2,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
source: 'docs/user/guide/mcp-memory.md',
|
|
159
|
+
route: 'guide/mcp-memory.md',
|
|
160
|
+
label: { root: '记忆 MCP', en: 'Memory MCP' },
|
|
161
|
+
sidebar: { root: 'zh-guide', en: 'en-guide' },
|
|
162
|
+
section: { root: '集成', en: 'Integrations' },
|
|
163
|
+
order: 1,
|
|
164
|
+
},
|
|
141
165
|
])
|
|
142
166
|
|
|
143
167
|
const develop = pairedPages([
|
|
@@ -216,6 +240,14 @@ const develop = pairedPages([
|
|
|
216
240
|
section: { root: '实战', en: 'Practice' },
|
|
217
241
|
order: 2,
|
|
218
242
|
},
|
|
243
|
+
{
|
|
244
|
+
source: 'docs/user/develop/practice/dynamic-cordis.md',
|
|
245
|
+
route: 'develop/practice/dynamic-cordis.md',
|
|
246
|
+
label: { root: '运行时 Cordis 工具', en: 'Runtime Cordis tools' },
|
|
247
|
+
sidebar: { root: 'zh-develop', en: 'en-develop' },
|
|
248
|
+
section: { root: '实战', en: 'Practice' },
|
|
249
|
+
order: 3,
|
|
250
|
+
},
|
|
219
251
|
])
|
|
220
252
|
|
|
221
253
|
const cordisTutorial = pairedPages(([
|
|
@@ -304,8 +336,11 @@ const subsystemGroups = [
|
|
|
304
336
|
]],
|
|
305
337
|
['平台与接入', 'Platform and access', [
|
|
306
338
|
['web-server.md', 'HTTP 服务器', 'HTTP server'],
|
|
307
|
-
['
|
|
339
|
+
['web-client.md', 'Web Client 架构', 'Web Client architecture'],
|
|
308
340
|
['client-modules.md', '客户端模块', 'Client modules'],
|
|
341
|
+
['slots.md', '客户端 Slots', 'Client slots'],
|
|
342
|
+
['conversation.md', 'Conversation 组装', 'Conversation assembly'],
|
|
343
|
+
['typert.md', 'Typert', 'Typert'],
|
|
309
344
|
['storage.md', '存储', 'Storage'],
|
|
310
345
|
['workspace.md', '工作区', 'Workspaces'],
|
|
311
346
|
['settings.md', '用户设置', 'User settings'],
|
|
@@ -328,6 +363,8 @@ const subsystemsReference = subsystemGroups.flatMap(([rootSection, enSection, fi
|
|
|
328
363
|
))
|
|
329
364
|
|
|
330
365
|
const reference = [
|
|
366
|
+
// `docs/deepseek-llm-api-wire-extensions.md` is a repository-only provider protocol reference.
|
|
367
|
+
// Projected links intentionally resolve to its GitHub source instead of a public site route.
|
|
331
368
|
...pairedPages(([
|
|
332
369
|
['docs/architecture.md', 'reference/index.md', '架构', 'Architecture', 0],
|
|
333
370
|
] as const).map(([source, route, rootLabel, enLabel, order]): PairedPage => ({
|
|
@@ -342,6 +379,7 @@ const reference = [
|
|
|
342
379
|
['docs/capability-seams.md', 'reference/capability-seams.md', '能力服务', 'Capability services', 2],
|
|
343
380
|
['docs/agent-lifecycle.md', 'reference/agent-lifecycle.md', 'Agent 生命周期', 'Agent lifecycle', 3],
|
|
344
381
|
['docs/tool-execution-pipeline.md', 'reference/tool-execution-pipeline.md', 'Tool 执行', 'Tool execution', 4],
|
|
382
|
+
['docs/api-gateway.md', 'reference/api-gateway.md', 'API Gateway', 'API Gateway', 5],
|
|
345
383
|
] as const).map(([source, route, rootLabel, enLabel, order]): PairedPage => ({
|
|
346
384
|
source,
|
|
347
385
|
route,
|
|
@@ -392,6 +430,7 @@ const reference = [
|
|
|
392
430
|
['adding-a-package.md', '新增 Package', 'Adding a package'],
|
|
393
431
|
['adding-a-tool.md', '新增 Tool', 'Adding a tool'],
|
|
394
432
|
['adding-an-llm-adapter.md', '新增 LLM Adapter', 'Adding an LLM adapter'],
|
|
433
|
+
['adding-a-settings-card.md', '新增设置卡片', 'Adding a settings card'],
|
|
395
434
|
['extension-cookbook.md', '扩展模式', 'Extension patterns'],
|
|
396
435
|
] as const).map(([file, rootLabel, enLabel], order): PairedPage => ({
|
|
397
436
|
source: `docs/cookbook/${file}`,
|
|
@@ -401,16 +440,18 @@ const reference = [
|
|
|
401
440
|
section: { root: '开发手册', en: 'Cookbook' },
|
|
402
441
|
order,
|
|
403
442
|
}))),
|
|
404
|
-
...pairedPages([{
|
|
405
|
-
source: 'docs/cookbook/adding-a-conversation-node.md',
|
|
406
|
-
route: 'reference/cookbook/adding-a-conversation-node.md',
|
|
407
|
-
label: { root: '新增 Conversation Node', en: 'Adding a Conversation Node' },
|
|
408
|
-
sidebar: { root: 'zh-reference', en: 'en-reference' },
|
|
409
|
-
section: { root: '开发手册', en: 'Cookbook' },
|
|
410
|
-
order: 4,
|
|
411
|
-
}]),
|
|
412
443
|
]
|
|
413
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Sidebar collections of each locale, in the order the site's navigation
|
|
447
|
+
* presents them. The navigation bar and the llms.txt index both read this
|
|
448
|
+
* sequence, so a new collection lands in both surfaces together.
|
|
449
|
+
*/
|
|
450
|
+
export const localeCollections = {
|
|
451
|
+
root: ['zh-guide', 'zh-develop', 'zh-reference'],
|
|
452
|
+
en: ['en-guide', 'en-develop', 'en-reference'],
|
|
453
|
+
} as const satisfies Record<DocsLocale, readonly DocsSidebar[]>
|
|
454
|
+
|
|
414
455
|
/** A sidebar group, matched to pages by `label`. */
|
|
415
456
|
export interface DocsSection {
|
|
416
457
|
/** Group heading, equal to the `section` field of every page it holds. */
|
|
@@ -427,7 +468,7 @@ export interface DocsSection {
|
|
|
427
468
|
*/
|
|
428
469
|
const sections: Record<DocsLocale, readonly DocsSection[]> = {
|
|
429
470
|
root: [
|
|
430
|
-
{ label: '入门' }, { label: 'SDK' },
|
|
471
|
+
{ label: '入门' }, { label: 'SDK' }, { label: '自动化' }, { label: '集成' },
|
|
431
472
|
{ label: '基础' }, { label: '框架能力' }, { label: '实战' }, { label: 'Cordis 框架教程' },
|
|
432
473
|
{ label: '概念' }, { label: '生成参考' }, { label: 'Cordis API' }, { label: '开发手册' },
|
|
433
474
|
{ label: '总览' },
|
|
@@ -439,7 +480,7 @@ const sections: Record<DocsLocale, readonly DocsSection[]> = {
|
|
|
439
480
|
{ label: '平台与接入', collapsed: true },
|
|
440
481
|
],
|
|
441
482
|
en: [
|
|
442
|
-
{ label: 'Guide' }, { label: 'SDK' },
|
|
483
|
+
{ label: 'Guide' }, { label: 'SDK' }, { label: 'Automation' }, { label: 'Integrations' },
|
|
443
484
|
{ label: 'Basics' }, { label: 'Framework' }, { label: 'Practice' }, { label: 'Cordis framework tutorial' },
|
|
444
485
|
{ label: 'Concepts' }, { label: 'Generated reference' }, { label: 'Cordis Core API' }, { label: 'Cookbook' },
|
|
445
486
|
{ label: 'Overview' },
|
package/references/sources.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
- `/reference/`(架构)、`/reference/cordis-primer`、`/reference/capability-seams`、`/reference/agent-lifecycle`、`/reference/tool-execution-pipeline`
|
|
27
27
|
- `/reference/config-catalog`、`/reference/tool-catalog`、`/reference/persistence-catalog`
|
|
28
28
|
- `/reference/cordis-api/context|events|fiber|registry|service|inherited`
|
|
29
|
-
- `/reference/cookbook/adding-a-package|adding-a-tool|adding-an-llm-adapter|extension-cookbook
|
|
29
|
+
- `/reference/cookbook/adding-a-package|adding-a-tool|adding-an-llm-adapter|extension-cookbook`
|
|
30
30
|
- `/reference/subsystems/` + 全部子系统页(core、llm-streaming、token-meter、scope、typert、goal、schedule、commands、session、persistence、settings、credentials、session-query、feedback、session-title、session-reference、system-prompt、tools、user-questions、approval、attachment、shell、subprocess、terminal、sandbox、code-runtime、extensions、filesystem、lsp、skills、compaction、subagent、web、spill、workflow、jobs、permission-presets、plan、invariants、web-server、storage、workspace、client-modules、session-projection、session-telemetry)
|
|
31
31
|
- 站点投影清单源文件:`references/official-docs/website-docs.ts`(= 仓库 `website/docs.ts`)
|
|
32
32
|
- **08-14 晚复核**:上游 master 仍为 47f9438(站点随仓库构建,无新增路由);此前 404 的 `/reference/subsystems/{attachment,extensions,feedback}` 仍为 404(已确认),sitemap.xml 仍不存在。
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
- `docs/**`(215 个 md,含全部 `.zh.md` 双语对)— 教程/架构/子系统/API/cookbook 全量
|
|
37
37
|
- 仓库根文件(**2026-08-14 晚新增**):`AGENTS.md`、`CLAUDE.md`(上游为 symlink→AGENTS.md,副本存其目标文本)、`BENCHMARK.md`、`CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`、`README.zh.md`/`.i18n.yaml`、`THIRD_PARTY_NOTICES.md`、`LICENSE`
|
|
38
|
-
- `packages/AGENTS.md` · `
|
|
38
|
+
- `packages/AGENTS.md` · `packages/README.md` · `vendor/README.md`
|
|
39
39
|
- `website-docs.ts`(站点投影清单)
|
|
40
40
|
- 上游英文 `README.md` 不进入本目录(与 KB 索引同名),线上快照在 `downloads/github/harness/README.md`
|
|
41
41
|
- 同步脚本本次加固:pathspec 全部 `:(top)` 锚定(避免 basename 全局匹配误收仓库深处 symlink);Windows 下无法解出的 symlink 按其 blob 目标文本落地;目的目录只保留范围内条目(曾因一次失败抽取残留污染,已由脚本自动修剪 107 项)。
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
| `/reference/cookbook/adding-a-tool` | 新增 Tool | `docs/cookbook/adding-a-tool.md` |
|
|
122
122
|
| `/reference/cookbook/adding-an-llm-adapter` | 新增 LLM Adapter | `docs/cookbook/adding-an-llm-adapter.md` |
|
|
123
123
|
| `/reference/cookbook/extension-cookbook` | 扩展模式 | `docs/cookbook/extension-cookbook.md` |
|
|
124
|
-
|
|
|
124
|
+
| ~~`/reference/cookbook/adding-a-conversation-node`~~ | (alpha.3 上游已移除该页) | 原 `docs/cookbook/adding-a-conversation-node.md` 已删除 |
|
|
125
125
|
| `/reference/subsystems/` | 子系统 / Subsystems | `docs/subsystems/README.md` |
|
|
126
126
|
|
|
127
127
|
**子系统页**(`/reference/subsystems/<name>`,共约 40 页,按侧栏分组):
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
#### `/reference/capability-seams` —— 能力服务(生成,`docs/capability-seams.md`)
|
|
490
490
|
|
|
491
491
|
- 一份 **Mermaid 图 + 表格**,列出全部 `ctx.*` 服务:Role(`core` / `seam` / `bundle`)、Owner 包、实现包、直接消费者、companion 插件与说明。
|
|
492
|
-
- 关键 seam 举例(表格行):`ctx.llm`(seam;`llm-deepseek`/`llm-pi-ai`/`llm-replay` 实现)、`ctx.shell`(seam;`bash-local`/`bash-sandbox`/`pwsh-local`)、`ctx.fs`(seam;`fs-local`/`fs-sandbox`/`fs-e2b`)、`ctx.subprocess`、`ctx.sandbox`、`ctx.terminals`、`ctx.web`(`web-search-exa/perplexity/deepseek` + `web-fetch-http`)、`ctx.compaction`、`ctx.subagents`、`ctx.skills`、`ctx.sessionPersistence`(`jsonl
|
|
492
|
+
- 关键 seam 举例(表格行):`ctx.llm`(seam;`llm-deepseek`/`llm-pi-ai`/`llm-replay` 实现)、`ctx.shell`(seam;`bash-local`/`bash-sandbox`/`pwsh-local`)、`ctx.fs`(seam;`fs-local`/`fs-sandbox`/`fs-e2b`)、`ctx.subprocess`、`ctx.sandbox`、`ctx.terminals`、`ctx.web`(`web-search-exa/perplexity/deepseek` + `web-fetch-http`)、`ctx.compaction`、`ctx.subagents`、`ctx.skills`、`ctx.sessionPersistence`(`jsonl`)、`ctx.sessionQuery`、`ctx.storage`、`ctx.settings`、`ctx.credentials`、`ctx.workflowEngine`、`ctx.lsp`、`ctx.jobs` 等。core 服务如 `ctx.tools`、`ctx.sessions`、`ctx.systemPrompt`、`ctx.agents`、`ctx.agentLoop`(bundle)。
|
|
493
493
|
- 完整消费者/实现关系图可作插件开发者的"服务地图"。
|
|
494
494
|
|
|
495
495
|
#### `/reference/config-catalog` —— 插件配置目录(生成,`docs/config-catalog.md`,约 3151 行)
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
- `/develop/cordis-tutorial/`、`/develop/cordis-tutorial/01-first-plugin`、`/develop/cordis-tutorial/02-lifecycle-and-effects`、`/develop/cordis-tutorial/03-services`、`/develop/cordis-tutorial/04-events`、`/develop/cordis-tutorial/05-config`、`/develop/cordis-tutorial/06-composition-and-hmr`、`/develop/cordis-tutorial/07-into-the-harness`
|
|
618
618
|
- `/reference/`、`/reference/cordis-primer`、`/reference/capability-seams`、`/reference/agent-lifecycle`、`/reference/tool-execution-pipeline`、`/reference/config-catalog`、`/reference/tool-catalog`、`/reference/persistence-catalog`
|
|
619
619
|
- `/reference/cordis-api/context`、`/reference/cordis-api/events`、`/reference/cordis-api/fiber`、`/reference/cordis-api/registry`、`/reference/cordis-api/service`、`/reference/cordis-api/inherited`
|
|
620
|
-
- `/reference/cookbook/adding-a-package`、`/reference/cookbook/adding-a-tool`、`/reference/cookbook/adding-an-llm-adapter`、`/reference/cookbook/extension-cookbook
|
|
620
|
+
- `/reference/cookbook/adding-a-package`、`/reference/cookbook/adding-a-tool`、`/reference/cookbook/adding-an-llm-adapter`、`/reference/cookbook/extension-cookbook`
|
|
621
621
|
- `/reference/subsystems/` + 子系统(core, scope, invariants, session, session-query, session-reference, session-title, session-projection, persistence, spill, session-telemetry, llm-streaming, token-meter, system-prompt, compaction, tools, shell, subprocess, terminal, jobs, filesystem, lsp, code-runtime, web, skills, workflow, subagent, approval, permission-presets, sandbox, plan, user-questions, commands, goal, schedule, web-server, typert, client-modules, storage, workspace, settings, credentials)
|
|
622
622
|
|
|
623
623
|
### 5.3 GitHub 仓库文档源文件(web_search 命中,均在 `github.com/deepseek-ai/deepseek-harness`)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# dsh-plugin-guide official-docs freshness probe.
|
|
2
|
+
# Purpose: detect drift between the KB mirror (references/official-docs) and the
|
|
3
|
+
# upstream deepseek-harness repository WITHOUT a local checkout. It compares the
|
|
4
|
+
# upstream branch tip SHA (git ls-remote) against the pinned "Source commit" SHA
|
|
5
|
+
# recorded in references/official-docs/SNAPSHOT.md — the SHA-locked authority the
|
|
6
|
+
# mirror was synced from. It never edits the mirror; drift is only reported.
|
|
7
|
+
# Usage: pwsh -File scripts/check-docs-drift.ps1 [-Repo <url>] [-Branch <name>] [-Snapshot <path>] [-FailOnDrift]
|
|
8
|
+
# Exit codes: 0 = FRESH, 1 = DRIFT (with -FailOnDrift), 2 = probe could not run (snapshot/parse/fetch failure).
|
|
9
|
+
# In CI it also writes `drift=yes|no|error` to $env:GITHUB_OUTPUT when that variable is set.
|
|
10
|
+
param(
|
|
11
|
+
[string]$Repo = 'https://github.com/deepseek-ai/deepseek-harness.git',
|
|
12
|
+
[string]$Branch = 'master',
|
|
13
|
+
[string]$Snapshot = 'references/official-docs/SNAPSHOT.md',
|
|
14
|
+
[switch]$FailOnDrift
|
|
15
|
+
)
|
|
16
|
+
$ErrorActionPreference = 'Stop'
|
|
17
|
+
$kit = Split-Path $PSScriptRoot -Parent
|
|
18
|
+
$snapshotPath = Join-Path $kit $Snapshot
|
|
19
|
+
|
|
20
|
+
# ---- 1) Read the pinned source commit SHA from SNAPSHOT.md ----
|
|
21
|
+
$pinned = $null
|
|
22
|
+
if (-not (Test-Path $snapshotPath)) { Write-Error "snapshot not found: $snapshotPath"; exit 2 }
|
|
23
|
+
foreach ($line in Get-Content $snapshotPath -Encoding UTF8) {
|
|
24
|
+
if ($line -match '^\|\s*Source commit\s*\|\s*`([0-9a-f]{40})`\s*\|') {
|
|
25
|
+
$pinned = $Matches[1]
|
|
26
|
+
break
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (-not $pinned) { Write-Error "cannot parse the pinned 'Source commit' SHA from $Snapshot"; exit 2 }
|
|
30
|
+
|
|
31
|
+
# ---- 2) Fetch the upstream branch tip SHA (no clone required) ----
|
|
32
|
+
$remoteLine = (& git ls-remote $Repo "refs/heads/$Branch" 2>$null | Select-Object -First 1)
|
|
33
|
+
if (-not $remoteLine -or $remoteLine -notmatch '^([0-9a-f]{40})\s') {
|
|
34
|
+
$message = "cannot reach upstream $Repo (branch $Branch)"
|
|
35
|
+
Write-Output "ERROR: $message"
|
|
36
|
+
if ($env:GITHUB_OUTPUT) { Add-Content -Path $env:GITHUB_OUTPUT -Value 'drift=error' }
|
|
37
|
+
exit 2
|
|
38
|
+
}
|
|
39
|
+
$upstream = $Matches[1]
|
|
40
|
+
|
|
41
|
+
# ---- 3) Compare and report ----
|
|
42
|
+
$fresh = ($upstream -eq $pinned)
|
|
43
|
+
Write-Output "pinned (SNAPSHOT.md): $pinned"
|
|
44
|
+
Write-Output "upstream ($Branch): $upstream"
|
|
45
|
+
if ($fresh) {
|
|
46
|
+
Write-Output 'FRESH: references/official-docs matches the upstream branch tip'
|
|
47
|
+
} else {
|
|
48
|
+
Write-Output "DRIFT: references/official-docs is pinned to $pinned but upstream is at $upstream"
|
|
49
|
+
Write-Output 'Action: run pwsh -File scripts/sync-official-docs.ps1 to refresh the mirror (do not hand-edit the mirror).'
|
|
50
|
+
}
|
|
51
|
+
if ($env:GITHUB_OUTPUT) {
|
|
52
|
+
Add-Content -Path $env:GITHUB_OUTPUT -Value ($(if ($fresh) { 'drift=no' } else { 'drift=yes' }))
|
|
53
|
+
}
|
|
54
|
+
if (-not $fresh -and $FailOnDrift) { exit 1 }
|
|
55
|
+
exit 0
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Five-language README sync gate: the English file is the source of truth.
|
|
3
|
+
// Every translation must carry the same `## ` section headings in the same
|
|
4
|
+
// order and the same configuration-table keys, so a config change cannot
|
|
5
|
+
// ship without its translations.
|
|
6
|
+
import { readFileSync, existsSync } from 'node:fs'
|
|
7
|
+
import path from 'node:path'
|
|
8
|
+
import { fileURLToPath } from 'node:url'
|
|
9
|
+
|
|
10
|
+
const root = path.dirname(path.dirname(fileURLToPath(import.meta.url)))
|
|
11
|
+
const LANGUAGES = [
|
|
12
|
+
['README.md', 'en'],
|
|
13
|
+
['README.zh.md', 'zh'],
|
|
14
|
+
['README.es.md', 'es'],
|
|
15
|
+
['README.pt.md', 'pt'],
|
|
16
|
+
['README.hi.md', 'hi'],
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
const headingsOf = (text) => text.split(/\r?\n/u)
|
|
20
|
+
.map(line => /^##\s+(.+)$/u.exec(line)?.[1]?.trim())
|
|
21
|
+
.filter((heading) => heading !== undefined)
|
|
22
|
+
|
|
23
|
+
// Configuration-table keys: the first cell of every row under the
|
|
24
|
+
// "Configuration" section (until the next `## ` heading).
|
|
25
|
+
const configKeysOf = (text) => {
|
|
26
|
+
const lines = text.split(/\r?\n/u)
|
|
27
|
+
const start = lines.findIndex(line => /^##\s+Configuration\s*$/u.test(line))
|
|
28
|
+
if (start === -1) return []
|
|
29
|
+
const end = lines.findIndex((line, index) => index > start && line.startsWith('## '))
|
|
30
|
+
const section = lines.slice(start, end === -1 ? undefined : end)
|
|
31
|
+
const keys = []
|
|
32
|
+
let headerSkipped = false
|
|
33
|
+
for (const line of section) {
|
|
34
|
+
if (!line.startsWith('|')) continue
|
|
35
|
+
if (!headerSkipped) { headerSkipped = true; continue }
|
|
36
|
+
const cells = line.split('|').map(cell => cell.trim())
|
|
37
|
+
if (cells.length < 2) continue
|
|
38
|
+
const key = cells[1]
|
|
39
|
+
if (key === '' || key === 'Key') continue
|
|
40
|
+
if (/^-+$/u.test(key)) continue
|
|
41
|
+
keys.push(key)
|
|
42
|
+
}
|
|
43
|
+
return keys
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const failures = []
|
|
47
|
+
const reference = LANGUAGES[0]
|
|
48
|
+
if (reference === undefined) process.exit(1)
|
|
49
|
+
const refPath = path.join(root, reference[0])
|
|
50
|
+
if (!existsSync(refPath)) {
|
|
51
|
+
console.error(`${reference[0]} is missing`)
|
|
52
|
+
process.exit(1)
|
|
53
|
+
}
|
|
54
|
+
const refText = readFileSync(refPath, 'utf8')
|
|
55
|
+
const refHeadings = headingsOf(refText)
|
|
56
|
+
const refKeys = configKeysOf(refText)
|
|
57
|
+
|
|
58
|
+
for (const [file, label] of LANGUAGES.slice(1)) {
|
|
59
|
+
const filePath = path.join(root, file)
|
|
60
|
+
if (!existsSync(filePath)) {
|
|
61
|
+
failures.push(`${file}: missing (${label})`)
|
|
62
|
+
continue
|
|
63
|
+
}
|
|
64
|
+
const text = readFileSync(filePath, 'utf8')
|
|
65
|
+
const headings = headingsOf(text)
|
|
66
|
+
for (let index = 0; index < refHeadings.length; index++) {
|
|
67
|
+
if (headings[index] !== refHeadings[index]) {
|
|
68
|
+
failures.push(`${file}: heading ${index + 1} is ${JSON.stringify(headings[index])}, expected ${JSON.stringify(refHeadings[index])}`)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (headings.length !== refHeadings.length) {
|
|
72
|
+
failures.push(`${file}: ${headings.length} headings, expected ${refHeadings.length}`)
|
|
73
|
+
}
|
|
74
|
+
const keys = configKeysOf(text)
|
|
75
|
+
if (keys.length !== refKeys.length) {
|
|
76
|
+
failures.push(`${file}: ${keys.length} config keys, expected ${refKeys.length}`)
|
|
77
|
+
continue
|
|
78
|
+
}
|
|
79
|
+
for (let index = 0; index < refKeys.length; index++) {
|
|
80
|
+
if (keys[index] !== refKeys[index]) {
|
|
81
|
+
failures.push(`${file}: config key ${index + 1} is ${JSON.stringify(keys[index])}, expected ${JSON.stringify(refKeys[index])}`)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (failures.length > 0) {
|
|
87
|
+
console.error('readme-sync failed:')
|
|
88
|
+
for (const failure of failures) console.error(` - ${failure}`)
|
|
89
|
+
process.exit(1)
|
|
90
|
+
}
|
|
91
|
+
console.log(`readme-sync: all ${LANGUAGES.length} READMEs share section structure and config keys`)
|
|
@@ -146,7 +146,7 @@ Get-ChildItem (Join-Path $docRoot 'subsystems') -Filter *.md | ForEach-Object {
|
|
|
146
146
|
Get-ChildItem (Join-Path $docRoot 'cordis-api') -Filter *.md | ForEach-Object {
|
|
147
147
|
[void]$routes.Add('reference/cordis-api/' + (SitePath $_.Name))
|
|
148
148
|
}
|
|
149
|
-
@('adding-a-package','adding-a-tool','adding-an-llm-adapter','extension-cookbook'
|
|
149
|
+
@('adding-a-package','adding-a-tool','adding-an-llm-adapter','extension-cookbook') | ForEach-Object {
|
|
150
150
|
[void]$routes.Add("reference/cookbook/$_")
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -25,10 +25,10 @@ $pruned = 0
|
|
|
25
25
|
$mdCount = 0
|
|
26
26
|
$zhCount = 0
|
|
27
27
|
|
|
28
|
-
# Sync scope: docs/, root AGENTS.md/BENCHMARK.md/CLAUDE.md/CONTRIBUTING.*/README.zh.md/README.i18n.yaml/THIRD_PARTY_NOTICES.md/LICENSE, packages/AGENTS.md,
|
|
29
|
-
#
|
|
30
|
-
# pathspec
|
|
31
|
-
$paths = @(':(top)docs', ':(top)AGENTS.md', ':(top)BENCHMARK.md', ':(top)CONTRIBUTING.md', ':(top)CONTRIBUTING.zh.md', ':(top)CONTRIBUTING.i18n.yaml', ':(top)README.zh.md', ':(top)README.i18n.yaml', ':(top)THIRD_PARTY_NOTICES.md', ':(top)LICENSE', ':(top)packages/AGENTS.md', ':(top)
|
|
28
|
+
# Sync scope: docs/, root AGENTS.md/BENCHMARK.md/CLAUDE.md/CONTRIBUTING.*/README.zh.md/README.i18n.yaml/THIRD_PARTY_NOTICES.md/LICENSE, packages/AGENTS.md, packages/README.md, vendor/README.md, website/docs.ts
|
|
29
|
+
# Upstream root README.md is out of scope: official-docs/README.md is the KB-owned index (the upstream English README snapshot lives in downloads/github/harness/README.md).
|
|
30
|
+
# Every pathspec uses the :(top) anchor so git's basename-wide matching cannot sweep in same-named symlinks (e.g. the various CLAUDE.md files).
|
|
31
|
+
$paths = @(':(top)docs', ':(top)AGENTS.md', ':(top)BENCHMARK.md', ':(top)CONTRIBUTING.md', ':(top)CONTRIBUTING.zh.md', ':(top)CONTRIBUTING.i18n.yaml', ':(top)README.zh.md', ':(top)README.i18n.yaml', ':(top)THIRD_PARTY_NOTICES.md', ':(top)LICENSE', ':(top)packages/AGENTS.md', ':(top)packages/README.md', ':(top)vendor/README.md', ':(top)website/docs.ts')
|
|
32
32
|
|
|
33
33
|
if ($gitOk) {
|
|
34
34
|
# Prefer origin/master, fall back to HEAD - never the working tree (may contain untracked/unpushed content).
|
|
@@ -41,13 +41,20 @@ if ($gitOk) {
|
|
|
41
41
|
if ($LASTEXITCODE -ne 0) { Write-Error "git archive failed (ref=$ref)"; exit 1 }
|
|
42
42
|
|
|
43
43
|
New-Item -ItemType Directory -Force -Path $dest | Out-Null
|
|
44
|
+
# Verbatim copy: clear the destination before extracting (keep only the KB-owned index README.md,
|
|
45
|
+
# which is unrelated to upstream), so structural residue from older snapshots (e.g. a top-level
|
|
46
|
+
# .agents/ directory from a previous tree) cannot interfere with the extraction.
|
|
47
|
+
Get-ChildItem -Force $dest | Where-Object { $_.Name -ne 'README.md' } | ForEach-Object {
|
|
48
|
+
Remove-Item $_.FullName -Recurse -Force; $pruned++
|
|
49
|
+
}
|
|
44
50
|
& tar -xf $tmp -C $dest
|
|
45
51
|
if ($LASTEXITCODE -ne 0) { Write-Error 'tar extraction failed'; exit 1 }
|
|
46
52
|
Remove-Item $tmp -Force
|
|
47
53
|
|
|
48
|
-
# CLAUDE.md
|
|
49
|
-
#
|
|
50
|
-
#
|
|
54
|
+
# CLAUDE.md is a symlink upstream (target AGENTS.md, mode 120000); Windows tar cannot extract
|
|
55
|
+
# symlinks, and the 'CLAUDE.md' pathspec would basename-match same-named symlinks deeper in the
|
|
56
|
+
# repo, so it stays out of $paths - after extraction its target text lands as a plain file
|
|
57
|
+
# (content = the upstream blob text).
|
|
51
58
|
$claudeTarget = (& git -C $Checkout cat-file -p "${ref}:CLAUDE.md" 2>$null | Select-Object -First 1)
|
|
52
59
|
if (-not $claudeTarget) { $claudeTarget = 'AGENTS.md' }
|
|
53
60
|
Set-Content -Path (Join-Path $dest 'CLAUDE.md') -Value $claudeTarget -Encoding UTF8
|
|
@@ -59,7 +66,8 @@ if ($gitOk) {
|
|
|
59
66
|
Remove-Item (Join-Path $dest 'website') -Force -Recurse -ErrorAction SilentlyContinue
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
#
|
|
69
|
+
# Keep only in-scope entries at the destination root (drops stale extraction residue and
|
|
70
|
+
# upstream-deleted root files so the copy stays verbatim).
|
|
63
71
|
$rootKeep = @('docs','examples','packages','vendor','AGENTS.md','BENCHMARK.md','CLAUDE.md','CONTRIBUTING.md','CONTRIBUTING.zh.md','CONTRIBUTING.i18n.yaml','LICENSE','README.zh.md','README.i18n.yaml','THIRD_PARTY_NOTICES.md','SNAPSHOT.md','README.md','website-docs.ts')
|
|
64
72
|
Get-ChildItem -Force $dest | Where-Object { $rootKeep -notcontains $_.Name } | ForEach-Object {
|
|
65
73
|
Remove-Item $_.FullName -Recurse -Force; $pruned++
|
|
@@ -94,7 +102,7 @@ if ($gitOk) {
|
|
|
94
102
|
} else {
|
|
95
103
|
Write-Output 'WARN: checkout is not a git repo (or -SkipGit) - copying the filesystem as-is; untracked files are not filtered and no pruning runs.'
|
|
96
104
|
foreach ($p in $paths) {
|
|
97
|
-
$rel = $p -replace '^:\(top\)','' #
|
|
105
|
+
$rel = $p -replace '^:\(top\)','' # strip the pathspec anchor to get the in-repo relative path
|
|
98
106
|
$srcFull = Join-Path $Checkout ($rel -replace '/','\')
|
|
99
107
|
if (-not (Test-Path $srcFull)) { Write-Output "SKIP(source missing): $rel"; continue }
|
|
100
108
|
$target = Join-Path $dest ($rel -replace '/','\')
|
|
@@ -119,9 +127,9 @@ $L = @(
|
|
|
119
127
|
"| Source ref | ``$ref`` |",
|
|
120
128
|
"| Source commit | ``$sha`` |",
|
|
121
129
|
"| Synced at (UTC) | $utc |",
|
|
122
|
-
'| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md`(symlink
|
|
130
|
+
'| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md` (symlink target text), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README.zh.md`/`.i18n.yaml` (the upstream English `README.md` is not in this dir; its snapshot lives in `downloads/github/harness/README.md`), `THIRD_PARTY_NOTICES.md`, `LICENSE`, `packages/AGENTS.md`, `packages/README.md`, `vendor/README.md`, `website/docs.ts` |',
|
|
123
131
|
"| File counts | docs/: $mdCount md files ($zhCount .zh.md pairs) |",
|
|
124
|
-
"| Pruned this run | $pruned
|
|
132
|
+
"| Pruned this run | $pruned out-of-scope/upstream-deleted entries |",
|
|
125
133
|
'',
|
|
126
134
|
'Drift check: `pwsh -File scripts/verify-kit.ps1 -Checkout <checkout>` (tracked files only).'
|
|
127
135
|
)
|