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
|
@@ -34,20 +34,24 @@ interface ResolvedCredential {
|
|
|
34
34
|
`describe(ref)` answers configuration surfaces without ever exposing a value: whether the reference resolves, from which layer, and whether `set` would currently succeed. The local provider reports a reference supplied by the live process environment as `writable: false` — a write would appear to succeed while resolution kept returning the shadowing value, so the seam rejects it and the UI can render the reference read-only up front.
|
|
35
35
|
|
|
36
36
|
```ts type-equiv
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Source and writability facts for one reference, safe for configuration UIs —
|
|
39
|
+
* never the value. The view has no slot a value could ride in, which is what
|
|
40
|
+
* lets the whole read half cross the Remote wire.
|
|
41
|
+
*/
|
|
38
42
|
interface CredentialInfo {
|
|
39
|
-
/** Whether
|
|
43
|
+
/** Whether resolving the reference would currently return a value. */
|
|
40
44
|
configured: boolean
|
|
41
45
|
/** Source layer currently supplying the value; absent while unconfigured. */
|
|
42
46
|
source?: string
|
|
43
|
-
/** Whether
|
|
47
|
+
/** Whether the active provider can write this reference. */
|
|
44
48
|
writable: boolean
|
|
45
49
|
}
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
## Change commits
|
|
49
53
|
|
|
50
|
-
`credentials/updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
|
|
54
|
+
`credentials/reference-updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
|
|
51
55
|
|
|
52
56
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
53
57
|
|
|
@@ -55,13 +59,78 @@ interface CredentialInfo {
|
|
|
55
59
|
|
|
56
60
|
## Cordis API
|
|
57
61
|
|
|
58
|
-
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).
|
|
63
|
+
|
|
64
|
+
<a id="ctxauthorization--authorizationservice"></a>
|
|
65
|
+
|
|
66
|
+
### `ctx.authorization` — `AuthorizationService`
|
|
67
|
+
|
|
68
|
+
`ctx.authorization`: a registry of credential-obtaining flows, one attempt at a time per key.
|
|
69
|
+
|
|
70
|
+
```ts cordis-catalog
|
|
71
|
+
/**
|
|
72
|
+
* Offer a way to obtain one credential. One flow per key: two plugins
|
|
73
|
+
* claiming the same key would each write a record in their own format, and
|
|
74
|
+
* whichever ran last would leave the other reading a payload it cannot parse.
|
|
75
|
+
*
|
|
76
|
+
* @param flow - the key it writes, its label, its methods, and its runner.
|
|
77
|
+
* @returns Disposer that withdraws this flow.
|
|
78
|
+
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
|
|
79
|
+
*/
|
|
80
|
+
registerFlow(flow: AuthorizationFlow): () => void
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Every registered flow, for a surface listing what can be authorized.
|
|
84
|
+
* @returns one entry per flow, in registration order.
|
|
85
|
+
*/
|
|
86
|
+
list(): readonly AuthorizationEntry[]
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* One registered flow.
|
|
90
|
+
* @param key - the credential record to ask about.
|
|
91
|
+
* @returns the entry, or undefined when no flow claims that key.
|
|
92
|
+
*/
|
|
93
|
+
describe(key: CredentialKey): AuthorizationEntry | undefined
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Withdraw the attempt running for a key, if any. Separate from the
|
|
97
|
+
* request's own signal because a request/response transport answers a Cancel
|
|
98
|
+
* button on a second call, with no handle on the first one's signal.
|
|
99
|
+
* @param key - the credential record whose attempt should stop.
|
|
100
|
+
*/
|
|
101
|
+
cancel(key: CredentialKey): void
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Run one attempt to authorize a key, and report how it ended.
|
|
105
|
+
*
|
|
106
|
+
* One attempt per key at a time. A second caller is refused rather than
|
|
107
|
+
* joined: the two would be prompting different humans through the same flow,
|
|
108
|
+
* and the second would answer questions the first was asked.
|
|
109
|
+
*
|
|
110
|
+
* @param request - the key, the method, the surface, and the cancel signal.
|
|
111
|
+
* @returns `authorized` once the flow's record is committed during this
|
|
112
|
+
* attempt and observed, or `cancelled` when the human declined or the
|
|
113
|
+
* caller withdrew.
|
|
114
|
+
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
|
|
115
|
+
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
|
|
116
|
+
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
|
|
117
|
+
* `NOT_COMMITTED` when the flow resolved without committing a record
|
|
118
|
+
* during the attempt.
|
|
119
|
+
*/
|
|
120
|
+
async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
|
|
59
124
|
|
|
60
125
|
<a id="ctxcredentials--credentialprovider-abstract-seam"></a>
|
|
61
126
|
|
|
62
127
|
### `ctx.credentials` — `CredentialProvider` (abstract seam)
|
|
63
128
|
|
|
64
|
-
Abstract credential service
|
|
129
|
+
Abstract credential service over two key spaces that answer two questions.
|
|
130
|
+
|
|
131
|
+
A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
|
|
132
|
+
|
|
133
|
+
A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
|
|
65
134
|
|
|
66
135
|
```ts cordis-catalog
|
|
67
136
|
/**
|
|
@@ -99,17 +168,144 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
|
|
|
99
168
|
* @param ref - the reference to remove.
|
|
100
169
|
*/
|
|
101
170
|
abstract unset(ref: CredentialRef): Promise<void>
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Read one stored record. The value is returned as its owner wrote it; a
|
|
174
|
+
* {@link GrantRecord} payload is not interpreted on the way out.
|
|
175
|
+
* @param key - the record to read.
|
|
176
|
+
* @returns the record, or `undefined` while none is stored.
|
|
177
|
+
*/
|
|
178
|
+
abstract readRecord(key: CredentialKey): Promise<CredentialRecord | undefined>
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Describe one record for configuration surfaces without exposing its value.
|
|
182
|
+
* @param key - the record to describe.
|
|
183
|
+
* @returns presence, discriminant, and writability.
|
|
184
|
+
*/
|
|
185
|
+
abstract describeRecord(key: CredentialKey): Promise<CredentialRecordInfo>
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Enumerate every stored record's address and tag. Unlike the reference
|
|
189
|
+
* half, which has no enumeration because configuration surfaces learn which
|
|
190
|
+
* references exist from settings schemas, records have no such discovery
|
|
191
|
+
* path: a surface that cannot list them cannot show what a user is
|
|
192
|
+
* authorized for, nor find an orphan left by an uninstalled plugin.
|
|
193
|
+
* @returns every stored record, values excluded.
|
|
194
|
+
*/
|
|
195
|
+
abstract listRecords(): Promise<readonly CredentialRecordEntry[]>
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Serialized read-modify-write over one record — the only write path.
|
|
199
|
+
* `mutate` sees the record as it stands at the moment the write is
|
|
200
|
+
* exclusive, and returning `undefined` leaves the entry untouched. Exclusion
|
|
201
|
+
* holds across processes where the backing store supports it, which is what
|
|
202
|
+
* makes a token refresh safe: two processes rotating one refresh token
|
|
203
|
+
* concurrently would otherwise lose whichever wrote first.
|
|
204
|
+
* @param key - the record to modify.
|
|
205
|
+
* @param mutate - receives the current record and returns its replacement, or `undefined` to leave it.
|
|
206
|
+
* @returns the record after the write, or the current one when `mutate` declined.
|
|
207
|
+
*/
|
|
208
|
+
abstract modifyRecord( key: CredentialKey, mutate: (current: CredentialRecord | undefined) => Promise<CredentialRecord | undefined>, ): Promise<CredentialRecord | undefined>
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Remove one record; removing an absent record is a no-op.
|
|
212
|
+
* @param key - the record to remove.
|
|
213
|
+
*/
|
|
214
|
+
abstract deleteRecord(key: CredentialKey): Promise<void>
|
|
102
215
|
```
|
|
103
216
|
|
|
104
|
-
Source: [`packages/credentials/credentials/src/index.ts
|
|
217
|
+
Source: [`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
|
|
218
|
+
|
|
219
|
+
<a id="ctxcredentialscontroller--credentialscontroller"></a>
|
|
220
|
+
|
|
221
|
+
### `ctx.credentialsController` — `CredentialsController`
|
|
222
|
+
|
|
223
|
+
Host service backing the generated `ctx.remote.credentials` namespace. It carries every wire obligation the credential seam itself does not: the batch fan-out bound, the field-by-field view projection, the reference-grammar guard, and the refusal mapping. Secret values cross in one direction only — no method here returns one.
|
|
224
|
+
|
|
225
|
+
```ts cordis-catalog
|
|
226
|
+
/**
|
|
227
|
+
* Describe several references for one configuration surface. Batched because
|
|
228
|
+
* a settings page describes every reference its rows name at once, and one
|
|
229
|
+
* round trip keeps those rows from settling separately.
|
|
230
|
+
* @param refs - reference names, at most {@link MAX_DESCRIBE_REFS}; a name outside the grammar
|
|
231
|
+
* rejects the whole call as `gateway/bad-request`.
|
|
232
|
+
* @returns one view per requested name, keyed by that name.
|
|
233
|
+
* @throws RemoteError when the request is invalid or no credential provider is mounted.
|
|
234
|
+
*/
|
|
235
|
+
@Remote async describe(refs: string[]): Promise<Record<string, CredentialInfo>>
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Store one value from a configuration surface. The value crosses the wire in
|
|
239
|
+
* this direction only: no read path returns it.
|
|
240
|
+
* @param ref - reference name to store under.
|
|
241
|
+
* @param value - the non-empty secret value.
|
|
242
|
+
* @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
|
|
243
|
+
*/
|
|
244
|
+
@Remote async set(ref: string, value: string): Promise<void>
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Remove one reference from a configuration surface.
|
|
248
|
+
* @param ref - reference name to remove.
|
|
249
|
+
* @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
|
|
250
|
+
*/
|
|
251
|
+
@Remote async unset(ref: string): Promise<void>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
|
|
255
|
+
|
|
256
|
+
<a id="authorization-events"></a>
|
|
257
|
+
|
|
258
|
+
### `authorization/*` events
|
|
259
|
+
|
|
260
|
+
<a id="authorizationsettled--emit"></a>
|
|
261
|
+
|
|
262
|
+
#### `authorization/settled` — emit
|
|
263
|
+
|
|
264
|
+
One authorization attempt has finished and released its key. Fires for every terminal outcome, failures included, so a surface watching a key it did not start (a second browser tab) learns the attempt is over.
|
|
265
|
+
|
|
266
|
+
```ts cordis-catalog
|
|
267
|
+
/**
|
|
268
|
+
* One authorization attempt has finished and released its key. Fires for
|
|
269
|
+
* every terminal outcome, failures included, so a surface watching a key it
|
|
270
|
+
* did not start (a second browser tab) learns the attempt is over.
|
|
271
|
+
* @mode emit
|
|
272
|
+
* @param key - the credential record the finished attempt was authorizing.
|
|
273
|
+
* @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
|
|
274
|
+
*/
|
|
275
|
+
'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
|
|
105
279
|
|
|
106
280
|
<a id="credentials-events"></a>
|
|
107
281
|
|
|
108
282
|
### `credentials/*` events
|
|
109
283
|
|
|
110
|
-
<a id="
|
|
284
|
+
<a id="credentialsrecord-updated--emit"></a>
|
|
285
|
+
|
|
286
|
+
#### `credentials/record-updated` — emit
|
|
287
|
+
|
|
288
|
+
Committed change to a stored credential record: a `modifyRecord` that wrote, a `deleteRecord` that removed, or an external edit observed in storage. Separate from `credentials/reference-updated` because the two key grammars are disjoint — a listener that received both on one event could not tell which space a subject belongs to. Listener failures are contained on the same terms as `credentials/reference-updated`.
|
|
289
|
+
|
|
290
|
+
```ts cordis-catalog
|
|
291
|
+
/**
|
|
292
|
+
* Committed change to a stored credential record: a `modifyRecord` that
|
|
293
|
+
* wrote, a `deleteRecord` that removed, or an external edit observed in
|
|
294
|
+
* storage. Separate from `credentials/reference-updated` because the two key
|
|
295
|
+
* grammars are disjoint — a listener that received both on one event could
|
|
296
|
+
* not tell which space a subject belongs to. Listener failures are
|
|
297
|
+
* contained on the same terms as `credentials/reference-updated`.
|
|
298
|
+
* @param key - the record whose stored value changed.
|
|
299
|
+
* @mode emit
|
|
300
|
+
*/
|
|
301
|
+
'credentials/record-updated'(key: CredentialKey): void
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
|
|
305
|
+
|
|
306
|
+
<a id="credentialsreference-updated--emit"></a>
|
|
111
307
|
|
|
112
|
-
#### `credentials/updated` — emit
|
|
308
|
+
#### `credentials/reference-updated` — emit
|
|
113
309
|
|
|
114
310
|
Committed change to a provider-managed credential source: a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Listener failures are contained and logged — a sync throw and an async rejection alike — without changing the committed operation's outcome, except `INVARIANT`-coded failures, which rethrow after every listener ran; that rethrow reaches the emitter only from synchronous listeners, so invariant checks on this event must not be async functions.
|
|
115
311
|
|
|
@@ -126,8 +322,8 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
|
|
|
126
322
|
* @param ref - the reference whose stored value changed.
|
|
127
323
|
* @mode emit
|
|
128
324
|
*/
|
|
129
|
-
'credentials/updated'(ref: CredentialRef): void
|
|
325
|
+
'credentials/reference-updated'(ref: CredentialRef): void
|
|
130
326
|
```
|
|
131
327
|
|
|
132
|
-
Source: [`packages/credentials/credentials/src/types.ts
|
|
328
|
+
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
|
|
133
329
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -34,20 +34,24 @@ interface ResolvedCredential {
|
|
|
34
34
|
`describe(ref)` 在绝不暴露值的前提下回应配置界面:引用当前是否可解析、来自哪一层、`set` 当前能否成功。本地提供方把由当前进程环境供值的引用报告为 `writable: false`——那样的写入会表面成功而解析持续返回遮蔽值,因此 seam 直接拒绝,界面也得以提前把该引用渲染为只读。
|
|
35
35
|
|
|
36
36
|
```ts type-equiv
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Source and writability facts for one reference, safe for configuration UIs —
|
|
39
|
+
* never the value. The view has no slot a value could ride in, which is what
|
|
40
|
+
* lets the whole read half cross the Remote wire.
|
|
41
|
+
*/
|
|
38
42
|
interface CredentialInfo {
|
|
39
|
-
/** Whether
|
|
43
|
+
/** Whether resolving the reference would currently return a value. */
|
|
40
44
|
configured: boolean
|
|
41
45
|
/** Source layer currently supplying the value; absent while unconfigured. */
|
|
42
46
|
source?: string
|
|
43
|
-
/** Whether
|
|
47
|
+
/** Whether the active provider can write this reference. */
|
|
44
48
|
writable: boolean
|
|
45
49
|
}
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
## 已提交的变更
|
|
49
53
|
|
|
50
|
-
`credentials/updated (ref)` 在提供方管理的来源发生已提交变更后发出——`set`、`unset` 或在存储中观察到的外部编辑。进程环境自身的变化不可观测,永不发出事件。消费方不需要该事件(它们按操作重新解析);它服务于配置界面刷新「已配置」徽标。
|
|
54
|
+
`credentials/reference-updated (ref)` 在提供方管理的来源发生已提交变更后发出——`set`、`unset` 或在存储中观察到的外部编辑。进程环境自身的变化不可观测,永不发出事件。消费方不需要该事件(它们按操作重新解析);它服务于配置界面刷新「已配置」徽标。
|
|
51
55
|
|
|
52
56
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
53
57
|
|
|
@@ -55,13 +59,78 @@ interface CredentialInfo {
|
|
|
55
59
|
|
|
56
60
|
## Cordis API
|
|
57
61
|
|
|
58
|
-
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).
|
|
63
|
+
|
|
64
|
+
<a id="ctxauthorization--authorizationservice"></a>
|
|
65
|
+
|
|
66
|
+
### `ctx.authorization` — `AuthorizationService`
|
|
67
|
+
|
|
68
|
+
`ctx.authorization`: a registry of credential-obtaining flows, one attempt at a time per key.
|
|
69
|
+
|
|
70
|
+
```ts cordis-catalog
|
|
71
|
+
/**
|
|
72
|
+
* Offer a way to obtain one credential. One flow per key: two plugins
|
|
73
|
+
* claiming the same key would each write a record in their own format, and
|
|
74
|
+
* whichever ran last would leave the other reading a payload it cannot parse.
|
|
75
|
+
*
|
|
76
|
+
* @param flow - the key it writes, its label, its methods, and its runner.
|
|
77
|
+
* @returns Disposer that withdraws this flow.
|
|
78
|
+
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
|
|
79
|
+
*/
|
|
80
|
+
registerFlow(flow: AuthorizationFlow): () => void
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Every registered flow, for a surface listing what can be authorized.
|
|
84
|
+
* @returns one entry per flow, in registration order.
|
|
85
|
+
*/
|
|
86
|
+
list(): readonly AuthorizationEntry[]
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* One registered flow.
|
|
90
|
+
* @param key - the credential record to ask about.
|
|
91
|
+
* @returns the entry, or undefined when no flow claims that key.
|
|
92
|
+
*/
|
|
93
|
+
describe(key: CredentialKey): AuthorizationEntry | undefined
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Withdraw the attempt running for a key, if any. Separate from the
|
|
97
|
+
* request's own signal because a request/response transport answers a Cancel
|
|
98
|
+
* button on a second call, with no handle on the first one's signal.
|
|
99
|
+
* @param key - the credential record whose attempt should stop.
|
|
100
|
+
*/
|
|
101
|
+
cancel(key: CredentialKey): void
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Run one attempt to authorize a key, and report how it ended.
|
|
105
|
+
*
|
|
106
|
+
* One attempt per key at a time. A second caller is refused rather than
|
|
107
|
+
* joined: the two would be prompting different humans through the same flow,
|
|
108
|
+
* and the second would answer questions the first was asked.
|
|
109
|
+
*
|
|
110
|
+
* @param request - the key, the method, the surface, and the cancel signal.
|
|
111
|
+
* @returns `authorized` once the flow's record is committed during this
|
|
112
|
+
* attempt and observed, or `cancelled` when the human declined or the
|
|
113
|
+
* caller withdrew.
|
|
114
|
+
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
|
|
115
|
+
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
|
|
116
|
+
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
|
|
117
|
+
* `NOT_COMMITTED` when the flow resolved without committing a record
|
|
118
|
+
* during the attempt.
|
|
119
|
+
*/
|
|
120
|
+
async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
|
|
59
124
|
|
|
60
125
|
<a id="ctxcredentials--credentialprovider-abstract-seam"></a>
|
|
61
126
|
|
|
62
127
|
### `ctx.credentials` — `CredentialProvider` (abstract seam)
|
|
63
128
|
|
|
64
|
-
Abstract credential service
|
|
129
|
+
Abstract credential service over two key spaces that answer two questions.
|
|
130
|
+
|
|
131
|
+
A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
|
|
132
|
+
|
|
133
|
+
A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
|
|
65
134
|
|
|
66
135
|
```ts cordis-catalog
|
|
67
136
|
/**
|
|
@@ -99,17 +168,144 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
|
|
|
99
168
|
* @param ref - the reference to remove.
|
|
100
169
|
*/
|
|
101
170
|
abstract unset(ref: CredentialRef): Promise<void>
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Read one stored record. The value is returned as its owner wrote it; a
|
|
174
|
+
* {@link GrantRecord} payload is not interpreted on the way out.
|
|
175
|
+
* @param key - the record to read.
|
|
176
|
+
* @returns the record, or `undefined` while none is stored.
|
|
177
|
+
*/
|
|
178
|
+
abstract readRecord(key: CredentialKey): Promise<CredentialRecord | undefined>
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Describe one record for configuration surfaces without exposing its value.
|
|
182
|
+
* @param key - the record to describe.
|
|
183
|
+
* @returns presence, discriminant, and writability.
|
|
184
|
+
*/
|
|
185
|
+
abstract describeRecord(key: CredentialKey): Promise<CredentialRecordInfo>
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Enumerate every stored record's address and tag. Unlike the reference
|
|
189
|
+
* half, which has no enumeration because configuration surfaces learn which
|
|
190
|
+
* references exist from settings schemas, records have no such discovery
|
|
191
|
+
* path: a surface that cannot list them cannot show what a user is
|
|
192
|
+
* authorized for, nor find an orphan left by an uninstalled plugin.
|
|
193
|
+
* @returns every stored record, values excluded.
|
|
194
|
+
*/
|
|
195
|
+
abstract listRecords(): Promise<readonly CredentialRecordEntry[]>
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Serialized read-modify-write over one record — the only write path.
|
|
199
|
+
* `mutate` sees the record as it stands at the moment the write is
|
|
200
|
+
* exclusive, and returning `undefined` leaves the entry untouched. Exclusion
|
|
201
|
+
* holds across processes where the backing store supports it, which is what
|
|
202
|
+
* makes a token refresh safe: two processes rotating one refresh token
|
|
203
|
+
* concurrently would otherwise lose whichever wrote first.
|
|
204
|
+
* @param key - the record to modify.
|
|
205
|
+
* @param mutate - receives the current record and returns its replacement, or `undefined` to leave it.
|
|
206
|
+
* @returns the record after the write, or the current one when `mutate` declined.
|
|
207
|
+
*/
|
|
208
|
+
abstract modifyRecord( key: CredentialKey, mutate: (current: CredentialRecord | undefined) => Promise<CredentialRecord | undefined>, ): Promise<CredentialRecord | undefined>
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Remove one record; removing an absent record is a no-op.
|
|
212
|
+
* @param key - the record to remove.
|
|
213
|
+
*/
|
|
214
|
+
abstract deleteRecord(key: CredentialKey): Promise<void>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Source: [`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
|
|
218
|
+
|
|
219
|
+
<a id="ctxcredentialscontroller--credentialscontroller"></a>
|
|
220
|
+
|
|
221
|
+
### `ctx.credentialsController` — `CredentialsController`
|
|
222
|
+
|
|
223
|
+
Host service backing the generated `ctx.remote.credentials` namespace. It carries every wire obligation the credential seam itself does not: the batch fan-out bound, the field-by-field view projection, the reference-grammar guard, and the refusal mapping. Secret values cross in one direction only — no method here returns one.
|
|
224
|
+
|
|
225
|
+
```ts cordis-catalog
|
|
226
|
+
/**
|
|
227
|
+
* Describe several references for one configuration surface. Batched because
|
|
228
|
+
* a settings page describes every reference its rows name at once, and one
|
|
229
|
+
* round trip keeps those rows from settling separately.
|
|
230
|
+
* @param refs - reference names, at most {@link MAX_DESCRIBE_REFS}; a name outside the grammar
|
|
231
|
+
* rejects the whole call as `gateway/bad-request`.
|
|
232
|
+
* @returns one view per requested name, keyed by that name.
|
|
233
|
+
* @throws RemoteError when the request is invalid or no credential provider is mounted.
|
|
234
|
+
*/
|
|
235
|
+
@Remote async describe(refs: string[]): Promise<Record<string, CredentialInfo>>
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Store one value from a configuration surface. The value crosses the wire in
|
|
239
|
+
* this direction only: no read path returns it.
|
|
240
|
+
* @param ref - reference name to store under.
|
|
241
|
+
* @param value - the non-empty secret value.
|
|
242
|
+
* @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
|
|
243
|
+
*/
|
|
244
|
+
@Remote async set(ref: string, value: string): Promise<void>
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Remove one reference from a configuration surface.
|
|
248
|
+
* @param ref - reference name to remove.
|
|
249
|
+
* @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
|
|
250
|
+
*/
|
|
251
|
+
@Remote async unset(ref: string): Promise<void>
|
|
102
252
|
```
|
|
103
253
|
|
|
104
|
-
Source: [`packages/
|
|
254
|
+
Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
|
|
255
|
+
|
|
256
|
+
<a id="authorization-events"></a>
|
|
257
|
+
|
|
258
|
+
### `authorization/*` events
|
|
259
|
+
|
|
260
|
+
<a id="authorizationsettled--emit"></a>
|
|
261
|
+
|
|
262
|
+
#### `authorization/settled` — emit
|
|
263
|
+
|
|
264
|
+
One authorization attempt has finished and released its key. Fires for every terminal outcome, failures included, so a surface watching a key it did not start (a second browser tab) learns the attempt is over.
|
|
265
|
+
|
|
266
|
+
```ts cordis-catalog
|
|
267
|
+
/**
|
|
268
|
+
* One authorization attempt has finished and released its key. Fires for
|
|
269
|
+
* every terminal outcome, failures included, so a surface watching a key it
|
|
270
|
+
* did not start (a second browser tab) learns the attempt is over.
|
|
271
|
+
* @mode emit
|
|
272
|
+
* @param key - the credential record the finished attempt was authorizing.
|
|
273
|
+
* @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
|
|
274
|
+
*/
|
|
275
|
+
'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
|
|
105
279
|
|
|
106
280
|
<a id="credentials-events"></a>
|
|
107
281
|
|
|
108
282
|
### `credentials/*` events
|
|
109
283
|
|
|
110
|
-
<a id="
|
|
284
|
+
<a id="credentialsrecord-updated--emit"></a>
|
|
285
|
+
|
|
286
|
+
#### `credentials/record-updated` — emit
|
|
287
|
+
|
|
288
|
+
Committed change to a stored credential record: a `modifyRecord` that wrote, a `deleteRecord` that removed, or an external edit observed in storage. Separate from `credentials/reference-updated` because the two key grammars are disjoint — a listener that received both on one event could not tell which space a subject belongs to. Listener failures are contained on the same terms as `credentials/reference-updated`.
|
|
289
|
+
|
|
290
|
+
```ts cordis-catalog
|
|
291
|
+
/**
|
|
292
|
+
* Committed change to a stored credential record: a `modifyRecord` that
|
|
293
|
+
* wrote, a `deleteRecord` that removed, or an external edit observed in
|
|
294
|
+
* storage. Separate from `credentials/reference-updated` because the two key
|
|
295
|
+
* grammars are disjoint — a listener that received both on one event could
|
|
296
|
+
* not tell which space a subject belongs to. Listener failures are
|
|
297
|
+
* contained on the same terms as `credentials/reference-updated`.
|
|
298
|
+
* @param key - the record whose stored value changed.
|
|
299
|
+
* @mode emit
|
|
300
|
+
*/
|
|
301
|
+
'credentials/record-updated'(key: CredentialKey): void
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
|
|
305
|
+
|
|
306
|
+
<a id="credentialsreference-updated--emit"></a>
|
|
111
307
|
|
|
112
|
-
#### `credentials/updated` — emit
|
|
308
|
+
#### `credentials/reference-updated` — emit
|
|
113
309
|
|
|
114
310
|
Committed change to a provider-managed credential source: a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Listener failures are contained and logged — a sync throw and an async rejection alike — without changing the committed operation's outcome, except `INVARIANT`-coded failures, which rethrow after every listener ran; that rethrow reaches the emitter only from synchronous listeners, so invariant checks on this event must not be async functions.
|
|
115
311
|
|
|
@@ -126,8 +322,8 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
|
|
|
126
322
|
* @param ref - the reference whose stored value changed.
|
|
127
323
|
* @mode emit
|
|
128
324
|
*/
|
|
129
|
-
'credentials/updated'(ref: CredentialRef): void
|
|
325
|
+
'credentials/reference-updated'(ref: CredentialRef): void
|
|
130
326
|
```
|
|
131
327
|
|
|
132
|
-
Source: [`packages/credentials/credentials/src/types.ts
|
|
328
|
+
Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
|
|
133
329
|
<!-- 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/extensions.md
|
|
5
|
-
extensions.md:
|
|
6
|
-
extensions.zh.md:
|
|
5
|
+
extensions.md: 540f3c477b4e128b0c1062192185e6276c9e9263
|
|
6
|
+
extensions.zh.md: ebfe7827484cea2cf8c6d77ca26796f7751d203a
|
|
@@ -10,7 +10,7 @@ The extensions subsystem lets an agent define versioned Cordis packages, run the
|
|
|
10
10
|
|
|
11
11
|
## Cordis API
|
|
12
12
|
|
|
13
|
-
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`) —
|
|
13
|
+
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).
|
|
14
14
|
|
|
15
15
|
<a id="ctxcordisinspect--cordisinspectregistryservice"></a>
|
|
16
16
|
|
|
@@ -62,7 +62,7 @@ resolveClientQuery( agent: Agent, requestId: CordisInspectRequestId, resolution:
|
|
|
62
62
|
|
|
63
63
|
Types: [Agent](core.md)
|
|
64
64
|
|
|
65
|
-
Source: [`packages/extensions/cordis-host-runner/src/inspect-registry.ts
|
|
65
|
+
Source: [`packages/extensions/cordis-host-runner/src/inspect-registry.ts`](../../packages/extensions/cordis-host-runner/src/inspect-registry.ts)
|
|
66
66
|
|
|
67
67
|
<a id="ctxdynamiccordisrunner--dynamiccordisrunnerservice"></a>
|
|
68
68
|
|
|
@@ -254,7 +254,25 @@ inspectPackage( agent: Agent, pluginId: CordisDynamicPluginId, packageId: Cordis
|
|
|
254
254
|
|
|
255
255
|
Types: [Agent](core.md)
|
|
256
256
|
|
|
257
|
-
Source: [`packages/extensions/cordis-host-runner/src/index.ts
|
|
257
|
+
Source: [`packages/extensions/cordis-host-runner/src/index.ts`](../../packages/extensions/cordis-host-runner/src/index.ts)
|
|
258
|
+
|
|
259
|
+
<a id="ctxinspector--inspectorservice"></a>
|
|
260
|
+
|
|
261
|
+
### `ctx.inspector` — `InspectorService`
|
|
262
|
+
|
|
263
|
+
Shared Host/Client service façade over the realm's source publisher.
|
|
264
|
+
|
|
265
|
+
```ts cordis-catalog
|
|
266
|
+
/**
|
|
267
|
+
* Publish one JSON observation without waiting for Worker delivery.
|
|
268
|
+
* @param topic - Domain-owned topic name.
|
|
269
|
+
* @param payload - JSON value validated before it reaches the carrier.
|
|
270
|
+
* @param monotonicMs - Source-clock timestamp; defaults to `performance.now()`.
|
|
271
|
+
*/
|
|
272
|
+
publish(topic: string, payload: InspectorJsonValue, monotonicMs?: number): void
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Source: [`packages/experimental/inspector/src/index.ts`](../../packages/experimental/inspector/src/index.ts)
|
|
258
276
|
|
|
259
277
|
<a id="cordis-events"></a>
|
|
260
278
|
|
|
@@ -275,7 +293,7 @@ One exact Plugin/Package activation is now live in the Host.
|
|
|
275
293
|
'cordis/dynamic-package'(pkg: DynamicCordisPackage): void
|
|
276
294
|
```
|
|
277
295
|
|
|
278
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
296
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
279
297
|
|
|
280
298
|
<a id="cordisdynamic-retract--emit"></a>
|
|
281
299
|
|
|
@@ -292,7 +310,7 @@ One exact activation was withdrawn.
|
|
|
292
310
|
'cordis/dynamic-retract'(retracted: DynamicCordisRetracted): void
|
|
293
311
|
```
|
|
294
312
|
|
|
295
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
313
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
296
314
|
|
|
297
315
|
<a id="cordisinspect-query--emit"></a>
|
|
298
316
|
|
|
@@ -309,7 +327,7 @@ Request a live read-only query from the Client inspect registry.
|
|
|
309
327
|
'cordis/inspect-query'(request: CordisInspectQueryRequest): void
|
|
310
328
|
```
|
|
311
329
|
|
|
312
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
330
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
313
331
|
|
|
314
332
|
<a id="cordisinspect-query-resolved--emit"></a>
|
|
315
333
|
|
|
@@ -326,7 +344,7 @@ Notify every Client that an inspect query has settled or been cancelled.
|
|
|
326
344
|
'cordis/inspect-query-resolved'(resolved: CordisInspectQueryResolved): void
|
|
327
345
|
```
|
|
328
346
|
|
|
329
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
347
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
330
348
|
|
|
331
349
|
<a id="cordisrequest-run--emit"></a>
|
|
332
350
|
|
|
@@ -343,7 +361,7 @@ A Client-bearing activation needs a browser page, and may require a user decisio
|
|
|
343
361
|
'cordis/request-run'(request: DynamicCordisRunRequest): void
|
|
344
362
|
```
|
|
345
363
|
|
|
346
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
364
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
347
365
|
|
|
348
366
|
<a id="cordisrequest-run-resolved--emit"></a>
|
|
349
367
|
|
|
@@ -360,5 +378,5 @@ A pending Client activation request left the answerable state.
|
|
|
360
378
|
'cordis/request-run-resolved'(resolved: DynamicCordisRequestResolved): void
|
|
361
379
|
```
|
|
362
380
|
|
|
363
|
-
Source: [`packages/extensions/cordis-host-runner/src/types.ts
|
|
381
|
+
Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
|
|
364
382
|
<!-- END GENERATED cordis-surface -->
|