dsh-plugin-dev-kb 1.4.0 → 1.5.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/CHANGELOG.md +25 -0
- package/README.en.md +6 -6
- package/README.md +10 -5
- package/kb/INDEX.md +8 -4
- package/kb/extra/AGENTS.md +4 -3
- package/kb/extra/agent-lifecycle.md +91 -0
- package/kb/extra/agent-lifecycle.zh.md +93 -0
- package/kb/extra/api-gateway.md +172 -0
- package/kb/extra/api-gateway.zh.md +178 -0
- package/kb/extra/architecture.md +165 -0
- package/kb/extra/architecture.zh.md +169 -0
- package/kb/extra/capability-seams.md +714 -0
- package/kb/extra/capability-seams.zh.md +716 -0
- package/kb/extra/cli-help.md +203 -0
- package/kb/extra/cli-help.zh.md +205 -0
- package/kb/extra/config-catalog.md +4801 -0
- package/kb/extra/config-catalog.zh.md +4803 -0
- package/kb/extra/cookbook/adding-a-package.md +170 -0
- package/kb/extra/cookbook/adding-a-package.zh.md +170 -0
- package/kb/extra/cookbook/adding-a-plugin-preview.md +52 -0
- package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +52 -0
- package/kb/extra/cookbook/adding-a-session-format-version.md +7 -5
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +7 -5
- package/kb/extra/cookbook/adding-a-settings-card.md +72 -0
- package/kb/extra/cookbook/adding-a-settings-card.zh.md +72 -0
- package/kb/extra/cookbook/adding-a-tool.md +101 -0
- package/kb/extra/cookbook/adding-a-tool.zh.md +103 -0
- package/kb/extra/cookbook/adding-an-llm-adapter.md +43 -0
- package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +43 -0
- package/kb/extra/cookbook/extension-cookbook.md +132 -0
- package/kb/extra/cookbook/extension-cookbook.zh.md +136 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +11 -9
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +11 -9
- package/kb/extra/cordis-api/context.md +364 -0
- package/kb/extra/cordis-api/context.zh.md +366 -0
- package/kb/extra/cordis-api/events.md +207 -0
- package/kb/extra/cordis-api/events.zh.md +209 -0
- package/kb/extra/cordis-api/fiber.md +375 -0
- package/kb/extra/cordis-api/fiber.zh.md +377 -0
- package/kb/extra/cordis-api/inherited.md +38 -0
- package/kb/extra/cordis-api/registry.md +152 -0
- package/kb/extra/cordis-api/registry.zh.md +154 -0
- package/kb/extra/cordis-api/service.md +102 -0
- package/kb/extra/cordis-api/service.zh.md +104 -0
- package/kb/extra/cordis-tutorial/01-first-plugin.md +95 -0
- package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +95 -0
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
- package/kb/extra/cordis-tutorial/03-services.md +98 -0
- package/kb/extra/cordis-tutorial/03-services.zh.md +98 -0
- package/kb/extra/cordis-tutorial/04-events.md +144 -0
- package/kb/extra/cordis-tutorial/04-events.zh.md +144 -0
- package/kb/extra/cordis-tutorial/05-config.md +111 -0
- package/kb/extra/cordis-tutorial/05-config.zh.md +111 -0
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
- package/kb/extra/cordis-tutorial/07-into-the-harness.md +108 -0
- package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +108 -0
- package/kb/extra/cordis-tutorial/index.md +60 -0
- package/kb/extra/cordis-tutorial/index.zh.md +62 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +5 -5
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +5 -5
- package/kb/extra/defensive-patterns/README.md +25 -0
- package/kb/extra/defensive-patterns/README.zh.md +27 -0
- package/kb/extra/defensive-patterns/client-components.md +493 -0
- package/kb/extra/defensive-patterns/client-components.zh.md +495 -0
- package/kb/extra/defensive-patterns/conversation-and-session.md +316 -0
- package/kb/extra/defensive-patterns/conversation-and-session.zh.md +316 -0
- package/kb/extra/defensive-patterns/general.md +222 -0
- package/kb/extra/defensive-patterns/general.zh.md +252 -0
- package/kb/extra/defensive-patterns/package-surface.md +231 -0
- package/kb/extra/defensive-patterns/package-surface.zh.md +231 -0
- package/kb/extra/defensive-patterns/remote-and-api.md +115 -0
- package/kb/extra/defensive-patterns/remote-and-api.zh.md +115 -0
- package/kb/extra/development.md +31 -11
- package/kb/extra/development.zh.md +32 -11
- package/kb/extra/event-producer-consumer.md +40 -39
- package/kb/extra/event-producer-consumer.zh.md +40 -39
- package/kb/extra/experimental-persistence-catalog.md +17 -0
- package/kb/extra/experimental-persistence-catalog.zh.md +17 -0
- package/kb/extra/glossary.md +1 -0
- package/kb/extra/glossary.zh.md +1 -0
- package/kb/extra/i18n/style-samples.md +2 -2
- package/kb/extra/i18n/terminology.md +1 -0
- package/kb/extra/module-graph.md +274 -195
- package/kb/extra/module-graph.zh.md +274 -195
- package/kb/extra/persistence-catalog.md +9140 -0
- package/kb/extra/persistence-catalog.zh.md +9142 -0
- package/kb/extra/persistence-changes/2026-09-13-working-directory.md +48 -0
- package/kb/extra/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +2 -2
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +2 -2
- package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.md +52 -0
- package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
- package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
- package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
- package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.md +60 -0
- package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +12 -10
- package/kb/extra/persistence-changes/README.zh.md +12 -10
- package/kb/extra/persistence-changes/historical-formats/README.md +1 -1
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +1 -1
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +50 -50
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +50 -50
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +14 -14
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +14 -14
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +3 -3
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +3 -3
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +10 -10
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +10 -10
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +3 -3
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +3 -3
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +13 -13
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +13 -13
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +63 -63
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +63 -63
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +54 -54
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +54 -54
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +7 -7
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +7 -7
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +27 -27
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +27 -27
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +4 -4
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +4 -4
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +27 -27
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +27 -27
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +7 -7
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +7 -7
- package/kb/extra/session-format-status.md +6 -6
- package/kb/extra/session-format-status.zh.md +6 -6
- package/kb/extra/subsystems/README.md +76 -0
- package/kb/extra/subsystems/README.zh.md +76 -0
- package/kb/extra/subsystems/agent-team.md +10 -10
- package/kb/extra/subsystems/agent-team.zh.md +10 -10
- package/kb/extra/subsystems/approval.md +170 -0
- package/kb/extra/subsystems/approval.zh.md +170 -0
- package/kb/extra/subsystems/boot.md +128 -4
- package/kb/extra/subsystems/boot.zh.md +128 -4
- package/kb/extra/subsystems/claude-code-mods.md +1 -1
- package/kb/extra/subsystems/claude-code-mods.zh.md +1 -1
- package/kb/extra/subsystems/client-modules.md +198 -0
- package/kb/extra/subsystems/client-modules.zh.md +198 -0
- package/kb/extra/subsystems/client-resources.md +92 -0
- package/kb/extra/subsystems/client-resources.zh.md +92 -0
- package/kb/extra/subsystems/commands.md +223 -0
- package/kb/extra/subsystems/commands.zh.md +223 -0
- package/kb/extra/subsystems/compaction.md +284 -0
- package/kb/extra/subsystems/compaction.zh.md +284 -0
- package/kb/extra/subsystems/computer-use.md +3 -0
- package/kb/extra/subsystems/computer-use.zh.md +3 -0
- package/kb/extra/subsystems/conversation.md +301 -0
- package/kb/extra/subsystems/conversation.zh.md +303 -0
- package/kb/extra/subsystems/core.md +1113 -0
- package/kb/extra/subsystems/core.zh.md +1125 -0
- package/kb/extra/subsystems/credentials.md +493 -0
- package/kb/extra/subsystems/credentials.zh.md +493 -0
- package/kb/extra/subsystems/filesystem.md +530 -0
- package/kb/extra/subsystems/filesystem.zh.md +530 -0
- package/kb/extra/subsystems/goal.md +313 -0
- package/kb/extra/subsystems/goal.zh.md +313 -0
- package/kb/extra/subsystems/jobs.md +554 -0
- package/kb/extra/subsystems/jobs.zh.md +554 -0
- package/kb/extra/subsystems/llm-streaming.md +1196 -0
- package/kb/extra/subsystems/llm-streaming.zh.md +1202 -0
- package/kb/extra/subsystems/lsp.md +202 -0
- package/kb/extra/subsystems/lsp.zh.md +202 -0
- package/kb/extra/subsystems/permission-presets.md +167 -0
- package/kb/extra/subsystems/permission-presets.zh.md +167 -0
- package/kb/extra/subsystems/persistence.md +418 -0
- package/kb/extra/subsystems/persistence.zh.md +418 -0
- package/kb/extra/subsystems/plan.md +87 -0
- package/kb/extra/subsystems/plan.zh.md +87 -0
- package/kb/extra/subsystems/product-telemetry.md +4 -2
- package/kb/extra/subsystems/product-telemetry.zh.md +4 -2
- package/kb/extra/subsystems/ptc-runtime.md +250 -0
- package/kb/extra/subsystems/ptc-runtime.zh.md +250 -0
- package/kb/extra/subsystems/sandbox.md +221 -0
- package/kb/extra/subsystems/sandbox.zh.md +221 -0
- package/kb/extra/subsystems/schedule.md +550 -0
- package/kb/extra/subsystems/schedule.zh.md +550 -0
- package/kb/extra/subsystems/scope.md +59 -0
- package/kb/extra/subsystems/scope.zh.md +61 -0
- package/kb/extra/subsystems/session-projection.md +356 -0
- package/kb/extra/subsystems/session-projection.zh.md +356 -0
- package/kb/extra/subsystems/session-query.md +511 -0
- package/kb/extra/subsystems/session-query.zh.md +511 -0
- package/kb/extra/subsystems/session-reference.md +224 -0
- package/kb/extra/subsystems/session-reference.zh.md +224 -0
- package/kb/extra/subsystems/session-telemetry.md +212 -0
- package/kb/extra/subsystems/session-telemetry.zh.md +212 -0
- package/kb/extra/subsystems/session-title.md +213 -0
- package/kb/extra/subsystems/session-title.zh.md +213 -0
- package/kb/extra/subsystems/session.md +1339 -0
- package/kb/extra/subsystems/session.zh.md +1343 -0
- package/kb/extra/subsystems/settings.md +155 -0
- package/kb/extra/subsystems/settings.zh.md +155 -0
- package/kb/extra/subsystems/shell.md +314 -0
- package/kb/extra/subsystems/shell.zh.md +314 -0
- package/kb/extra/subsystems/sidebar-right.md +160 -0
- package/kb/extra/subsystems/sidebar-right.zh.md +160 -0
- package/kb/extra/subsystems/skills.md +352 -0
- package/kb/extra/subsystems/skills.zh.md +352 -0
- package/kb/extra/subsystems/slots.md +200 -0
- package/kb/extra/subsystems/slots.zh.md +204 -0
- package/kb/extra/subsystems/spill.md +124 -0
- package/kb/extra/subsystems/spill.zh.md +124 -0
- package/kb/extra/subsystems/ssh.md +22 -11
- package/kb/extra/subsystems/ssh.zh.md +22 -11
- package/kb/extra/subsystems/storage.md +259 -0
- package/kb/extra/subsystems/storage.zh.md +259 -0
- package/kb/extra/subsystems/subagent.md +686 -0
- package/kb/extra/subsystems/subagent.zh.md +688 -0
- package/kb/extra/subsystems/subprocess.md +321 -0
- package/kb/extra/subsystems/subprocess.zh.md +321 -0
- package/kb/extra/subsystems/system-prompt.md +254 -0
- package/kb/extra/subsystems/system-prompt.zh.md +254 -0
- package/kb/extra/subsystems/terminal.md +184 -0
- package/kb/extra/subsystems/terminal.zh.md +184 -0
- package/kb/extra/subsystems/token-meter.md +106 -0
- package/kb/extra/subsystems/token-meter.zh.md +106 -0
- package/kb/extra/subsystems/tools.md +747 -0
- package/kb/extra/subsystems/tools.zh.md +747 -0
- package/kb/extra/subsystems/translation.md +103 -0
- package/kb/extra/subsystems/translation.zh.md +103 -0
- package/kb/extra/subsystems/typert.md +690 -0
- package/kb/extra/subsystems/typert.zh.md +690 -0
- package/kb/extra/subsystems/user-questions.md +307 -0
- package/kb/extra/subsystems/user-questions.zh.md +307 -0
- package/kb/extra/subsystems/web-client.md +100 -0
- package/kb/extra/subsystems/web-client.zh.md +100 -0
- package/kb/extra/subsystems/web-server.md +302 -0
- package/kb/extra/subsystems/web-server.zh.md +302 -0
- package/kb/extra/subsystems/web.md +206 -0
- package/kb/extra/subsystems/web.zh.md +206 -0
- package/kb/extra/subsystems/webhook.md +1 -1
- package/kb/extra/subsystems/webhook.zh.md +1 -1
- package/kb/extra/subsystems/workflow.md +278 -0
- package/kb/extra/subsystems/workflow.zh.md +278 -0
- package/kb/extra/subsystems/working-directory.md +64 -0
- package/kb/extra/subsystems/working-directory.zh.md +64 -0
- package/kb/extra/subsystems/workspace.md +647 -0
- package/kb/extra/subsystems/workspace.zh.md +647 -0
- package/kb/extra/subsystems/worktrees.md +76 -0
- package/kb/extra/subsystems/worktrees.zh.md +76 -0
- package/kb/extra/testing.md +1 -1
- package/kb/extra/testing.zh.md +1 -1
- package/kb/extra/tool-catalog.md +2824 -0
- package/kb/extra/tool-catalog.zh.md +2832 -0
- package/kb/extra/tool-execution-pipeline.md +65 -0
- package/kb/extra/tool-execution-pipeline.zh.md +67 -0
- package/kb/extra/ui-radius.md +6 -4
- package/kb/extra/ui-radius.zh.md +6 -4
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.zh.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.zh.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.zh.md +18 -0
- package/kb/meta/search-index.json +1932 -366
- package/kb/meta/source.json +9 -8
- package/kb/site/develop/basic/publish.md +3 -1
- package/kb/site/en/develop/basic/publish.md +3 -1
- package/kb/site/en/guide/github-review.md +7 -10
- package/kb/site/en/guide/plugin-market.md +151 -0
- package/kb/site/en/guide/providers.md +27 -4
- package/kb/site/en/guide/public-deployments.md +10 -6
- package/kb/site/en/guide/python-sdk.md +8 -9
- package/kb/site/en/reference/api-gateway.md +10 -3
- package/kb/site/en/reference/capability-seams.md +71 -24
- package/kb/site/en/reference/config-catalog.md +452 -191
- package/kb/site/en/reference/experimental-persistence-catalog.md +20 -0
- package/kb/site/en/reference/index.md +11 -12
- package/kb/site/en/reference/persistence-catalog.md +552 -192
- package/kb/site/en/reference/subsystems/client-modules.md +14 -0
- package/kb/site/en/reference/subsystems/conversation.md +14 -0
- package/kb/site/en/reference/subsystems/core.md +3 -1
- package/kb/site/en/reference/subsystems/credentials.md +13 -12
- package/kb/site/en/reference/subsystems/index.md +4 -1
- package/kb/site/en/reference/subsystems/jobs.md +62 -7
- package/kb/site/en/reference/subsystems/llm-streaming.md +82 -15
- package/kb/site/en/reference/subsystems/persistence.md +2 -0
- package/kb/site/en/reference/subsystems/plan.md +1 -1
- package/kb/site/en/reference/subsystems/ptc-runtime.md +24 -6
- package/kb/site/en/reference/subsystems/session-query.md +2 -0
- package/kb/site/en/reference/subsystems/session-title.md +14 -5
- package/kb/site/en/reference/subsystems/session.md +59 -14
- package/kb/site/en/reference/subsystems/sidebar-right.md +2 -0
- package/kb/site/en/reference/subsystems/skills.md +2 -2
- package/kb/site/en/reference/subsystems/slots.md +80 -83
- package/kb/site/en/reference/subsystems/subagent.md +175 -247
- package/kb/site/en/reference/subsystems/system-prompt.md +32 -2
- package/kb/site/en/reference/subsystems/tools.md +3 -3
- package/kb/site/en/reference/subsystems/typert.md +222 -17
- package/kb/site/en/reference/subsystems/web-client.md +1 -1
- package/kb/site/en/reference/subsystems/web-server.md +87 -11
- package/kb/site/en/reference/subsystems/web.md +2 -2
- package/kb/site/en/reference/subsystems/workflow.md +1 -1
- package/kb/site/en/reference/subsystems/workspace.md +25 -37
- package/kb/site/en/reference/tool-catalog.md +156 -51
- package/kb/site/guide/github-review.md +7 -10
- package/kb/site/guide/plugin-market.md +151 -0
- package/kb/site/guide/providers.md +27 -4
- package/kb/site/guide/public-deployments.md +10 -6
- package/kb/site/guide/python-sdk.md +8 -9
- package/kb/site/reference/api-gateway.md +16 -3
- package/kb/site/reference/capability-seams.md +71 -24
- package/kb/site/reference/config-catalog.md +452 -191
- package/kb/site/reference/experimental-persistence-catalog.md +20 -0
- package/kb/site/reference/index.md +11 -12
- package/kb/site/reference/persistence-catalog.md +552 -192
- package/kb/site/reference/subsystems/client-modules.md +14 -0
- package/kb/site/reference/subsystems/conversation.md +16 -0
- package/kb/site/reference/subsystems/core.md +5 -1
- package/kb/site/reference/subsystems/credentials.md +13 -12
- package/kb/site/reference/subsystems/index.md +4 -1
- package/kb/site/reference/subsystems/jobs.md +62 -7
- package/kb/site/reference/subsystems/llm-streaming.md +82 -15
- package/kb/site/reference/subsystems/persistence.md +2 -0
- package/kb/site/reference/subsystems/plan.md +1 -1
- package/kb/site/reference/subsystems/ptc-runtime.md +24 -6
- package/kb/site/reference/subsystems/scope.md +2 -0
- package/kb/site/reference/subsystems/session-query.md +2 -0
- package/kb/site/reference/subsystems/session-title.md +14 -5
- package/kb/site/reference/subsystems/session.md +59 -14
- package/kb/site/reference/subsystems/sidebar-right.md +2 -0
- package/kb/site/reference/subsystems/skills.md +2 -2
- package/kb/site/reference/subsystems/slots.md +84 -83
- package/kb/site/reference/subsystems/subagent.md +177 -251
- package/kb/site/reference/subsystems/system-prompt.md +32 -2
- package/kb/site/reference/subsystems/tools.md +3 -3
- package/kb/site/reference/subsystems/typert.md +222 -17
- package/kb/site/reference/subsystems/web-client.md +1 -1
- package/kb/site/reference/subsystems/web-server.md +87 -11
- package/kb/site/reference/subsystems/web.md +2 -2
- package/kb/site/reference/subsystems/workflow.md +1 -1
- package/kb/site/reference/subsystems/workspace.md +25 -37
- package/kb/site/reference/tool-catalog.md +160 -55
- package/package.json +2 -2
- package/skills/dsh-dev-sandbox.md +70 -0
- package/kb/extra/defensive-patterns.md +0 -33
- package/kb/extra/defensive-patterns.zh.md +0 -35
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# 用户审批
|
|
2
|
+
|
|
3
|
+
[English](approval.md) | 中文
|
|
4
|
+
|
|
5
|
+
[dsh-user-approval](../../packages/interaction/user-approval) 的用户审批 seam 回答一个问题:这个具体操作是否可以继续?它拥有共享的请求/结果词汇、`ctx.approval` 分发服务、`approval/request` 应答者 waterfall(瀑布式事件)、仅记录日志的审计事件对,以及按会话的 `ask`/`never` 策略。UI 通道可以提供人类应答者;[ACP(Agent Client Protocol)自动化桥接层](../../packages/acp/acp)为其拥有的 agent(智能体)提供一次性机器决策。调用方如 [dsh-tools](../../packages/core/tools) 和 [dsh-tool-bash](../../packages/shell/tool-bash) 消费闭合的结果,除非结果为 `allowed-once`,否则一律拒绝。
|
|
6
|
+
|
|
7
|
+
源码:[`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
8
|
+
|
|
9
|
+
## 标识与结果
|
|
10
|
+
|
|
11
|
+
每个请求都会获得一个全新的 `ApprovalRequestId`。该品牌类型将 `approval/asked` 与 `approval/decided` 审计事件配对,同时不会让审批 id 与工具调用 id 或 agent/会话 id 互换。
|
|
12
|
+
|
|
13
|
+
```ts type-equiv
|
|
14
|
+
/**
|
|
15
|
+
* Pairs one `approval/asked` audit event with its `approval/decided`.
|
|
16
|
+
* Service-issued (one fresh id per {@link ApprovalService.request} call).
|
|
17
|
+
*/
|
|
18
|
+
type ApprovalRequestId = Branded<'ApprovalRequestId'>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`ApprovalOutcome` 是闭合的,且失败时拒绝。`allowed-once` 仅授权所询问的那一个操作;调用方对 `rejected`、`cancelled` 和 `unavailable` 均执行拒绝。缺失、不负责该请求、抛异常或不合规的应答者会产生 `unavailable`,而非放行。
|
|
22
|
+
|
|
23
|
+
```ts type-equiv
|
|
24
|
+
/**
|
|
25
|
+
* Closed approval outcomes: a one-shot grant, explicit rejection, withdrawn
|
|
26
|
+
* request, or unavailable answerer. Callers fail closed on `unavailable`.
|
|
27
|
+
*/
|
|
28
|
+
type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 按会话策略
|
|
32
|
+
|
|
33
|
+
`ApprovalPolicy` 决定在交互式应答者运行之前发生什么。`ask` 委托给组合的应答者链,链的无应答默认值为 `unavailable`;`never` 确定性地返回 `rejected`,不分发任何应答者。生效值为会话日志中最后一条 `approval/policy` 事件,回退到服务配置。消费方通过 `ctx.approval.effectivePolicy(session)` 读取;`setApprovalPolicy(session, policy)` 是唯一的写入路径,因此回放能重建覆盖值。
|
|
34
|
+
|
|
35
|
+
```ts type-equiv
|
|
36
|
+
/**
|
|
37
|
+
* A session's approval policy — what happens to an {@link ApprovalService}
|
|
38
|
+
* ask BEFORE any interactive answerer sees it:
|
|
39
|
+
*
|
|
40
|
+
* - `'ask'` (the default) — delegate to the composed answerers; with none
|
|
41
|
+
* composed the chain falls through to the fail-closed `'unavailable'`.
|
|
42
|
+
* - `'never'` — never prompt anyone: every ask resolves `'rejected'`
|
|
43
|
+
* deterministically. The strict headless stance (CI, unattended runs) and
|
|
44
|
+
* the policy whose outcome is knowable without asking.
|
|
45
|
+
*/
|
|
46
|
+
type ApprovalPolicy = 'ask' | 'never'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
两种策略都会将各自完整的当前含义贡献给缓存安全的运行时上下文快照。带来源的 `user/message` 是持久化且模型可见的输入;审批状态变化时,会在保留的历史后追加一份新的完整快照,而不触碰承载渲染后系统提示词的 `system/message` 节点。
|
|
50
|
+
|
|
51
|
+
## 审批请求
|
|
52
|
+
|
|
53
|
+
`ApprovalRequest` 以足够精确的方式标识 agent 和工具操作,以便路由和审计该问题。它有意省略工具参数:应答者通过 `callId` 将提示附加到已流式输出的工具调用上,而非渲染另一份可能漂移的副本。可选的 `displayReason` 向界面传递请求方提供的本地化字符串;`reason` 仍是审计文本。
|
|
54
|
+
|
|
55
|
+
```ts type-equiv
|
|
56
|
+
/**
|
|
57
|
+
* Readonly same-process permission question. `callId` links to an already
|
|
58
|
+
* presented tool call, so arguments are not duplicated here.
|
|
59
|
+
*/
|
|
60
|
+
interface ApprovalRequest extends ApprovalRequestEvent {
|
|
61
|
+
/**
|
|
62
|
+
* The agent on whose behalf the question is asked. Routes the question (a
|
|
63
|
+
* UI answerer only answers for agents it owns) and receives the audit
|
|
64
|
+
* events on its session log.
|
|
65
|
+
*/
|
|
66
|
+
readonly agent: Agent
|
|
67
|
+
/** The tool the question is about (presentation and audit). */
|
|
68
|
+
readonly toolName: string
|
|
69
|
+
/**
|
|
70
|
+
* The exact tool call being decided, when the asker has one — lets a UI
|
|
71
|
+
* attach the prompt to the tool call it already streamed.
|
|
72
|
+
*/
|
|
73
|
+
readonly callId?: ToolCallId
|
|
74
|
+
/** The asker's human-readable explanation of WHY it is asking. */
|
|
75
|
+
readonly reason?: string
|
|
76
|
+
/**
|
|
77
|
+
* Aborting withdraws the question: the request settles `'cancelled'`
|
|
78
|
+
* immediately and a late answer from a still-pending answerer is discarded.
|
|
79
|
+
*/
|
|
80
|
+
readonly signal?: AbortSignal
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 分发与审计
|
|
85
|
+
|
|
86
|
+
`ctx.approval.request(req)` 要求发起请求的会话处于一个尚未结束的轮次内。它追加 `approval/asked`,获取一个结果,追加对应的 `approval/decided`,然后以该结果完成。`never` 策略在服务内部、waterfall 分发之前强制执行,因此即使后来以 `prepend` 注册的应答者也无法绕过它。应答者在负责处理该请求时返回结果,否则调用 `next()` 委托;第一个应答占据唯一的决策槽位。
|
|
87
|
+
|
|
88
|
+
审计事件仅写入日志,不进入模型 transcript(文本记录)。模型可见的行为是调用方派生的工具结果与当前运行时上下文快照。服务 dispose(资源释放)时会移除其上下文贡献;应答者监听器独立地通过 effect 绑定到其所属插件。
|
|
89
|
+
|
|
90
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
91
|
+
|
|
92
|
+
<a id="cordis-surface"></a>
|
|
93
|
+
|
|
94
|
+
## Cordis API
|
|
95
|
+
|
|
96
|
+
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
97
|
+
|
|
98
|
+
<a id="ctxapproval--approvalservice"></a>
|
|
99
|
+
|
|
100
|
+
### `ctx.approval` — `ApprovalService`
|
|
101
|
+
|
|
102
|
+
Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session. It exposes deterministic policy changes to the model through the runtime-context snapshot and switch notices.
|
|
103
|
+
|
|
104
|
+
```ts cordis-catalog
|
|
105
|
+
/**
|
|
106
|
+
* Switch one live agent's policy and queue the transition for its next model
|
|
107
|
+
* step. Session initialization uses {@link setApprovalPolicy} directly
|
|
108
|
+
* because there is no previously visible policy to change.
|
|
109
|
+
* @param agent - the live agent whose policy is changing.
|
|
110
|
+
* @param policy - the new effective policy.
|
|
111
|
+
*/
|
|
112
|
+
setPolicy(agent: Agent, policy: ApprovalPolicy): void
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Ask the composed answerers to decide one readonly same-process request.
|
|
116
|
+
* The service borrows the request, agent, session, and live signal directly.
|
|
117
|
+
* The request requires an open turn because the audit pair must be enclosed
|
|
118
|
+
* by the durable log's commit/replay boundary; an idle ask rejects before
|
|
119
|
+
* appending anything. The answerer phase always produces an outcome: an
|
|
120
|
+
* aborted signal yields `'cancelled'`, a missing or throwing answerer yields
|
|
121
|
+
* `'unavailable'` (fail closed), and a rogue non-vocabulary return value is
|
|
122
|
+
* normalized to `'unavailable'`. A failure that prevents either audit append
|
|
123
|
+
* from committing still rejects because returning an unlogged decision would
|
|
124
|
+
* violate the pair. Session contains post-commit observer failures, so an
|
|
125
|
+
* authoritative append cannot reject the request or suppress its matching
|
|
126
|
+
* audit event.
|
|
127
|
+
* @param req - the pending decision (agent, tool identity, reason, signal).
|
|
128
|
+
* @returns the closed outcome; `'allowed-once'` is the only grant.
|
|
129
|
+
* @throws when no turn is open or either audit event fails before the session
|
|
130
|
+
* append commit point.
|
|
131
|
+
*/
|
|
132
|
+
async request(req: ApprovalRequest): Promise<ApprovalOutcome>
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Read the session override without applying the configured default.
|
|
136
|
+
* @param session - session whose log supplies the override.
|
|
137
|
+
* @returns the last logged policy, or `undefined` without one.
|
|
138
|
+
*/
|
|
139
|
+
overrideOf(session: Session): ApprovalPolicy | undefined
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Types: [Agent](core.zh.md) · [Session](session.zh.md)
|
|
143
|
+
|
|
144
|
+
Source: [`packages/interaction/user-approval/src/index.ts`](../../packages/interaction/user-approval/src/index.ts)
|
|
145
|
+
|
|
146
|
+
<a id="approval-events"></a>
|
|
147
|
+
|
|
148
|
+
### `approval/*` events
|
|
149
|
+
|
|
150
|
+
<a id="approvalrequest--waterfall"></a>
|
|
151
|
+
|
|
152
|
+
#### `approval/request` — waterfall
|
|
153
|
+
|
|
154
|
+
Ask composed answerers for one decision. Return an outcome to claim the request or call `next()` to delegate. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
155
|
+
|
|
156
|
+
```ts cordis-catalog
|
|
157
|
+
/**
|
|
158
|
+
* Ask composed answerers for one decision. Return an outcome to claim the
|
|
159
|
+
* request or call `next()` to delegate. Scope-filtered dispatch
|
|
160
|
+
* (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
161
|
+
* @param req - pending approval request.
|
|
162
|
+
* @mode waterfall
|
|
163
|
+
*/
|
|
164
|
+
'approval/request'( this: Scoped<Agent>, req: ApprovalRequestEvent, next: () => Promise<ApprovalOutcome>, ): Promise<ApprovalOutcome>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Types: [Agent](core.zh.md) · [Scoped](scope.zh.md)
|
|
168
|
+
|
|
169
|
+
Source: [`packages/interaction/user-approval/src/types.ts`](../../packages/interaction/user-approval/src/types.ts)
|
|
170
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -10,14 +10,53 @@ The [boot package group](../../packages/boot/README.md) owns launcher-provided p
|
|
|
10
10
|
|
|
11
11
|
`PluginInfo` carries module identity, effective enablement, fiber phase and optional display `meta`, plus a unique `patchId` or a `readOnlyReason`.
|
|
12
12
|
|
|
13
|
-
`BundleInfo` carries the package name, optional installed version, selected enablement, removal availability, optional resolution error, and, for a bundle the profile's own dependency supplies and the installation does not, `source`: that dependency as a spec `pnpm add` accepts. Its optional `meta` and each `BundleRowInfo.meta` contain display text or a metadata diagnostic; Clients select a language at render time.
|
|
13
|
+
`BundleInfo.official` identifies project-maintained shipped optional bundles and on-demand catalog entries independently of installation. `availability` identifies a readable installation-provided or profile package, or `missing`; on-demand catalog entries exclude undeclared transitive copies. `installed` records the profile dependency declaration. An on-demand `installTarget` carries the host-derived exact spec and version. `BundleInfo` also carries the package name, optional installed version, selected enablement, removal availability, optional resolution error, and, for a bundle the profile's own dependency supplies and the installation does not, `source`: that dependency as a spec `pnpm add` accepts. Its optional `meta` and each `BundleRowInfo.meta` contain display text or a metadata diagnostic; Clients select a language at render time.
|
|
14
14
|
|
|
15
|
-
`InstallBundleOptions.enabled` defaults to true. False installs without selecting the bundle layer. `approvedBuilds` grants persistent script permission to the supplied pending package names before installation. `registry` names the registry asked first; absent, the configured one.
|
|
15
|
+
`InstallBundleOptions.saveExact` passes `--save-exact` to the shared package installer. `InstallBundleOptions.enabled` defaults to true. False installs without selecting the bundle layer. `approvedBuilds` grants persistent script permission to the supplied pending package names before installation. `registry` names the registry asked first; absent, the configured one.
|
|
16
16
|
|
|
17
17
|
`PluginRegistries` carries the configured first registry, `null` for the one pnpm's own configuration names, the fallbacks asked after it, and `resolved`, the URL pnpm's own configuration names or `null` while unread. `InspectOptions.registry` names the registry a lookup asks first.
|
|
18
18
|
|
|
19
19
|
`ChangeResult.changed` reports a disk edit independently of `application`: `applied`, `restart-required`, `overridden` or `failed`. Optional `error` carries a localizable code and external diagnostic. `packageResult` records the pnpm exit code, bounded output, truncation flag and complete diagnostic log path, plus `timedOut` when the manager terminated a run that stopped printing. A terminated run is classified `timeout` whatever exit status the signal left behind, so installation and removal report failure instead of success and no further registry is asked. `pendingBuilds` lists undecided packages across the profile; `approvedBuilds` records the names granted permission by this operation; `registries` lists the registries an installation asked, in order; `bundle` and `version` name the package a finished installation added and its manifest version; `failedAt` says whether the last failed run could not reach the registry it asked or the host a git or tarball spec is fetched from.
|
|
20
20
|
|
|
21
|
+
## Market records
|
|
22
|
+
|
|
23
|
+
[Plugin Market](../../packages/boot/plugin-market/README.md) reads index format 1, validated by [`dsh-plugin-market-index`](../../packages/util/plugin-market-index/README.md).
|
|
24
|
+
|
|
25
|
+
`MarketIndexSummary` carries one configured index URL with the `title` and `description` of its last successful read and, when the last read failed, its `error`.
|
|
26
|
+
|
|
27
|
+
`MarketQuery` selects one page of an index: fuzzy `text`, a `category`, `labels` that must all be present, a `MarketSort`, `offset`, `limit` up to 100, `refresh` to fetch again instead of using a cached document, and `fetchedAt` to continue the pages of one document. `MarketSearchResult` carries the index URL, `title`, optional `description`, market `metadata`, the document's `fetchedAt`, the page's `entries`, the `total` number of matches, and the `nextOffset`. Each `MarketListingEntry` adds `defaultVersion`, the version installed by default, and `installation`, the profile's status for the package name; each of its `versions` adds `install`, the exact spec and optional first registry for `installBundle`, and `compatibility`, the evaluation of its `engines.dsh` including a version exemption.
|
|
28
|
+
|
|
29
|
+
## Profile reconciliation
|
|
30
|
+
|
|
31
|
+
<a id="profile-reconciliation"></a>
|
|
32
|
+
|
|
33
|
+
```ts type-equiv
|
|
34
|
+
/** Outcome of {@link Hmr.reconcileProfile}. */
|
|
35
|
+
interface ProfileReconciliation {
|
|
36
|
+
/** Diagnostics for Loader entries left inactive. */
|
|
37
|
+
warnings: string[]
|
|
38
|
+
/** Loaded modules whose files changed on disk and whose previous code keeps running until a restart. */
|
|
39
|
+
pending: PendingModule[]
|
|
40
|
+
/**
|
|
41
|
+
* Why every change waits for a restart: `module-comparison` when module caches cannot be inspected or their files
|
|
42
|
+
* compared, even when no URLs are known; `package-moved` when the runtime resolution cannot publish a moved package.
|
|
43
|
+
*/
|
|
44
|
+
restartReason?: 'module-comparison' | 'package-moved'
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```ts type-equiv
|
|
49
|
+
/** A changed module that loads only after a restart. */
|
|
50
|
+
interface PendingModule {
|
|
51
|
+
url: string
|
|
52
|
+
/**
|
|
53
|
+
* `host-module`: the process entry point's static graph imports it. `unmanaged-plugin`: it is imported by a plugin
|
|
54
|
+
* that runs outside a traversable Loader entry. `module-comparison`: loaded modules could not be compared with disk.
|
|
55
|
+
*/
|
|
56
|
+
reason: 'host-module' | 'unmanaged-plugin' | 'module-comparison'
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
21
60
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
22
61
|
|
|
23
62
|
<a id="cordis-surface"></a>
|
|
@@ -78,6 +117,21 @@ async watchConfig(filename: string, refresh: () => Promise<void>): Promise<() =>
|
|
|
78
117
|
* @returns Linked module URLs, or an empty list for an uncached module.
|
|
79
118
|
*/
|
|
80
119
|
async getLinked(url: string): Promise<string[]>
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Recompose the profile from its manifest and patch files, replacing running plugins whose loaded files below the
|
|
123
|
+
* profile directory or its linked package targets changed on disk, and publishing its runtime resolution. Changed
|
|
124
|
+
* modules are evicted and the Loader entries running them stop; app-boot's {@link recomposeProfile} then publishes the
|
|
125
|
+
* resolution, applies the generation, starts the stopped entries with the current files and configuration,
|
|
126
|
+
* imports entries whose import failed again, and judges activation. Afterwards the modules below the mappings the
|
|
127
|
+
* recomposition dropped are evicted, so a removed or deselected package is imported afresh when it returns. Callers run
|
|
128
|
+
* inside {@link runExclusive}.
|
|
129
|
+
* @param requiredIds Entry ids whose inactive state is reported as a failure even when it predates this call.
|
|
130
|
+
* @returns Inactive-entry diagnostics, the changed modules that load after a restart, and a profile-wide restart reason.
|
|
131
|
+
* @throws The patch read, publication, preparation, apply, or activation failure of the recomposition, including a
|
|
132
|
+
* replacement plugin that fails to load or start, whose previous code no longer runs.
|
|
133
|
+
*/
|
|
134
|
+
async reconcileProfile(requiredIds: readonly string[] = []): Promise<ProfileReconciliation>
|
|
81
135
|
```
|
|
82
136
|
|
|
83
137
|
Source: [`packages/boot/hmr/src/index.ts`](../../packages/boot/hmr/src/index.ts)
|
|
@@ -109,7 +163,7 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
109
163
|
*/
|
|
110
164
|
@Remote async listPlugins(): Promise<PluginInfo[]>
|
|
111
165
|
|
|
112
|
-
/** Read
|
|
166
|
+
/** Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.
|
|
113
167
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
114
168
|
* @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
|
|
115
169
|
* display metadata, activation selections, whether the installation offers the bundle, and removal availability.
|
|
@@ -151,7 +205,7 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
151
205
|
* `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.
|
|
152
206
|
* @param spec One package spec, including local paths relative to the invocation directory.
|
|
153
207
|
* @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
|
|
154
|
-
* the pending build scripts to allow
|
|
208
|
+
* the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.
|
|
155
209
|
* @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.
|
|
156
210
|
*/
|
|
157
211
|
@Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>
|
|
@@ -180,6 +234,56 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
180
234
|
|
|
181
235
|
Source: [`packages/boot/plugin-manager/src/index.ts`](../../packages/boot/plugin-manager/src/index.ts)
|
|
182
236
|
|
|
237
|
+
<a id="ctxpluginmarket--pluginmarket"></a>
|
|
238
|
+
|
|
239
|
+
### `ctx.pluginMarket` — `PluginMarket`
|
|
240
|
+
|
|
241
|
+
Fetches, validates, and caches configured market indexes; annotates entries with the profile's installation facts.
|
|
242
|
+
|
|
243
|
+
```ts cordis-catalog
|
|
244
|
+
/**
|
|
245
|
+
* List the configured index sources without fetching them.
|
|
246
|
+
* @returns every source in order, with the title of its last successful read and, when the last read failed, its error.
|
|
247
|
+
*/
|
|
248
|
+
@Remote listIndexes(): MarketIndexSummary[]
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Replace the configured index sources through Settings, without remounting this service.
|
|
252
|
+
* `plugin-market/changed` announces the committed list. A URL already configured is kept as written, so a client can
|
|
253
|
+
* add or remove sources beside one that `listIndexes` reports as unusable.
|
|
254
|
+
* @param urls - index URLs in display order.
|
|
255
|
+
* @throws {RemoteError} `plugin-market/invalid-index-url` for an invalid new URL or a repeated URL;
|
|
256
|
+
* `plugin-market/settings-unavailable` without Settings or a profile entry.
|
|
257
|
+
*/
|
|
258
|
+
@Remote async setIndexes(urls: string[]): Promise<void>
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Return one page of the plugins of a configured index that match a query. Concurrent reads of a URL share one
|
|
262
|
+
* fetch; a successful document is reused for `cacheTtlMs` unless `refresh` is set. Matching and ordering read only
|
|
263
|
+
* the document; installation status and compatibility are computed for the returned page on every call.
|
|
264
|
+
* @param url - a configured index URL.
|
|
265
|
+
* @param query - text, filters, order, page, and whether to bypass the cached document.
|
|
266
|
+
* @returns the index header, the page's plugins with each plugin's default version and installation status and each
|
|
267
|
+
* version's compatibility and install arguments, the number of matches, and the next page's offset.
|
|
268
|
+
* @throws {RemoteError} `plugin-market/invalid-query`, `plugin-market/unknown-index`, `plugin-market/invalid-index-url`,
|
|
269
|
+
* `plugin-market/fetch-failed`, or `plugin-market/invalid-index`.
|
|
270
|
+
*/
|
|
271
|
+
@Remote async search(url: string, query: MarketQuery): Promise<MarketSearchResult>
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Read one plugin of a configured index, using the cached document as `search` does.
|
|
275
|
+
* @param url - a configured index URL.
|
|
276
|
+
* @param name - the plugin's package name.
|
|
277
|
+
* @returns the plugin with its default version, installation status, and annotated versions; undefined when the
|
|
278
|
+
* index does not list it.
|
|
279
|
+
* @throws {RemoteError} `plugin-market/unknown-index`, `plugin-market/invalid-index-url`, `plugin-market/fetch-failed`,
|
|
280
|
+
* or `plugin-market/invalid-index`.
|
|
281
|
+
*/
|
|
282
|
+
async entry(url: string, name: string): Promise<MarketListingEntry | undefined>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Source: [`packages/boot/plugin-market/src/index.ts`](../../packages/boot/plugin-market/src/index.ts)
|
|
286
|
+
|
|
183
287
|
<a id="ctxpluginregistryprobe--pluginregistryprobe"></a>
|
|
184
288
|
|
|
185
289
|
### `ctx.pluginRegistryProbe` — `PluginRegistryProbe`
|
|
@@ -320,4 +424,24 @@ An installation moved between its Host phases. `installing` is announced once pe
|
|
|
320
424
|
```
|
|
321
425
|
|
|
322
426
|
Source: [`packages/boot/plugin-manager/src/types.ts`](../../packages/boot/plugin-manager/src/types.ts)
|
|
427
|
+
|
|
428
|
+
<a id="plugin-market-events"></a>
|
|
429
|
+
|
|
430
|
+
### `plugin-market/*` events
|
|
431
|
+
|
|
432
|
+
<a id="plugin-marketchanged--emit"></a>
|
|
433
|
+
|
|
434
|
+
#### `plugin-market/changed` — emit
|
|
435
|
+
|
|
436
|
+
The configured index sources changed.
|
|
437
|
+
|
|
438
|
+
```ts cordis-catalog
|
|
439
|
+
/**
|
|
440
|
+
* The configured index sources changed.
|
|
441
|
+
* @mode emit
|
|
442
|
+
*/
|
|
443
|
+
'plugin-market/changed'(): void
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Source: [`packages/boot/plugin-market/src/types.ts`](../../packages/boot/plugin-market/src/types.ts)
|
|
323
447
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -10,14 +10,53 @@
|
|
|
10
10
|
|
|
11
11
|
`PluginInfo` 包含模块标识、实际启停状态、fiber 阶段和可选的展示 `meta`,以及唯一的 `patchId` 或 `readOnlyReason`。
|
|
12
12
|
|
|
13
|
-
`BundleInfo`
|
|
13
|
+
`BundleInfo.official` 标识项目维护的随附可选组合包和按需目录项,独立于安装状态。`availability` 表示可读取的安装随附包、profile 包或 `missing`;按需目录项不计入未声明的传递依赖副本。`installed` 记录 profile 的依赖声明。按需条目的 `installTarget` 包含 Host 生成的精确 spec 和版本。`BundleInfo` 还包含包名、可选的安装版本、组合层选择状态、删除可用性、可选的解析错误;由 profile 自身依赖提供、且安装不提供的组合包还带有 `source`,即该依赖在 `pnpm add` 中可用的 spec。它的可选 `meta` 与各行的 `BundleRowInfo.meta` 包含展示文本或元信息诊断;Client 在渲染时选择语言。
|
|
14
14
|
|
|
15
|
-
`InstallBundleOptions.enabled` 默认为 true,false 表示安装但不选择组合包层。`approvedBuilds` 在安装前向指定的待审批包名授予持久脚本权限。`registry` 指定首先询问的注册表;缺省为配置的那个。
|
|
15
|
+
`InstallBundleOptions.saveExact` 向共享包安装器传入 `--save-exact`。`InstallBundleOptions.enabled` 默认为 true,false 表示安装但不选择组合包层。`approvedBuilds` 在安装前向指定的待审批包名授予持久脚本权限。`registry` 指定首先询问的注册表;缺省为配置的那个。
|
|
16
16
|
|
|
17
17
|
`PluginRegistries` 携带配置的第一个注册表(`null` 即 pnpm 自身配置指定的那个)、随后依次询问的备选注册表,以及 `resolved`——pnpm 自身配置指向的 URL,未读到时为 `null`。`InspectOptions.registry` 指定一次查询首先询问的注册表。
|
|
18
18
|
|
|
19
19
|
`ChangeResult.changed` 报告磁盘修改,独立于 `application`:`applied`、`restart-required`、`overridden` 或 `failed`。可选的 `error` 包含可本地化的错误码和外部诊断。`packageResult` 记录 pnpm 退出码、有界输出、截断标志及完整诊断日志路径;当管理器终止了一个停止打印的运行,还记录 `timedOut`。被终止的运行不论信号留下什么退出状态都归类为 `timeout`,因此安装与删除都报告失败而非成功,也不会再询问下一个注册表。`pendingBuilds` 列出整个 profile 尚未决定的包;`approvedBuilds` 记录本次操作授予权限的包名;`registries` 按顺序列出一次安装问过的注册表;`bundle` 与 `version` 给出完成的安装新增的包及其清单版本;`failedAt` 说明最后一次失败的运行连不上的是所问的注册表,还是 git 或 tarball spec 自身拉取的主机。
|
|
20
20
|
|
|
21
|
+
## 市场记录
|
|
22
|
+
|
|
23
|
+
[Plugin Market](../../packages/boot/plugin-market/README.zh.md) 读取第 1 版索引格式,校验由 [`dsh-plugin-market-index`](../../packages/util/plugin-market-index/README.zh.md) 完成。
|
|
24
|
+
|
|
25
|
+
`MarketIndexSummary` 携带一个已配置的索引 URL,以及最近一次成功读取得到的 `title` 和 `description`;最近一次读取失败时,还携带其 `error`。
|
|
26
|
+
|
|
27
|
+
`MarketQuery` 选择索引的一页:模糊匹配的 `text`、一个 `category`、必须全部具备的 `labels`、一个 `MarketSort`、`offset`、不超过 100 的 `limit`、表示重新获取而不使用缓存文档的 `refresh`,以及用于继续读取同一文档后续页的 `fetchedAt`。`MarketSearchResult` 携带索引 URL、`title`、可选的 `description`、市场 `metadata`、该文档的 `fetchedAt`、本页的 `entries`、匹配总数 `total` 和 `nextOffset`。每个 `MarketListingEntry` 额外携带 `defaultVersion`,即默认安装的版本,以及 `installation`,即该包名在当前 profile 中的状态;其 `versions` 中的每个版本额外携带 `install`,即交给 `installBundle` 的精确 spec 和可选的首选 registry,以及 `compatibility`,即包含版本豁免在内的 `engines.dsh` 评估结果。
|
|
28
|
+
|
|
29
|
+
## Profile 重新组合
|
|
30
|
+
|
|
31
|
+
<a id="profile-reconciliation"></a>
|
|
32
|
+
|
|
33
|
+
```ts type-equiv
|
|
34
|
+
/** Outcome of {@link Hmr.reconcileProfile}. */
|
|
35
|
+
interface ProfileReconciliation {
|
|
36
|
+
/** Diagnostics for Loader entries left inactive. */
|
|
37
|
+
warnings: string[]
|
|
38
|
+
/** Loaded modules whose files changed on disk and whose previous code keeps running until a restart. */
|
|
39
|
+
pending: PendingModule[]
|
|
40
|
+
/**
|
|
41
|
+
* Why every change waits for a restart: `module-comparison` when module caches cannot be inspected or their files
|
|
42
|
+
* compared, even when no URLs are known; `package-moved` when the runtime resolution cannot publish a moved package.
|
|
43
|
+
*/
|
|
44
|
+
restartReason?: 'module-comparison' | 'package-moved'
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```ts type-equiv
|
|
49
|
+
/** A changed module that loads only after a restart. */
|
|
50
|
+
interface PendingModule {
|
|
51
|
+
url: string
|
|
52
|
+
/**
|
|
53
|
+
* `host-module`: the process entry point's static graph imports it. `unmanaged-plugin`: it is imported by a plugin
|
|
54
|
+
* that runs outside a traversable Loader entry. `module-comparison`: loaded modules could not be compared with disk.
|
|
55
|
+
*/
|
|
56
|
+
reason: 'host-module' | 'unmanaged-plugin' | 'module-comparison'
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
21
60
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
22
61
|
|
|
23
62
|
<a id="cordis-surface"></a>
|
|
@@ -78,6 +117,21 @@ async watchConfig(filename: string, refresh: () => Promise<void>): Promise<() =>
|
|
|
78
117
|
* @returns Linked module URLs, or an empty list for an uncached module.
|
|
79
118
|
*/
|
|
80
119
|
async getLinked(url: string): Promise<string[]>
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Recompose the profile from its manifest and patch files, replacing running plugins whose loaded files below the
|
|
123
|
+
* profile directory or its linked package targets changed on disk, and publishing its runtime resolution. Changed
|
|
124
|
+
* modules are evicted and the Loader entries running them stop; app-boot's {@link recomposeProfile} then publishes the
|
|
125
|
+
* resolution, applies the generation, starts the stopped entries with the current files and configuration,
|
|
126
|
+
* imports entries whose import failed again, and judges activation. Afterwards the modules below the mappings the
|
|
127
|
+
* recomposition dropped are evicted, so a removed or deselected package is imported afresh when it returns. Callers run
|
|
128
|
+
* inside {@link runExclusive}.
|
|
129
|
+
* @param requiredIds Entry ids whose inactive state is reported as a failure even when it predates this call.
|
|
130
|
+
* @returns Inactive-entry diagnostics, the changed modules that load after a restart, and a profile-wide restart reason.
|
|
131
|
+
* @throws The patch read, publication, preparation, apply, or activation failure of the recomposition, including a
|
|
132
|
+
* replacement plugin that fails to load or start, whose previous code no longer runs.
|
|
133
|
+
*/
|
|
134
|
+
async reconcileProfile(requiredIds: readonly string[] = []): Promise<ProfileReconciliation>
|
|
81
135
|
```
|
|
82
136
|
|
|
83
137
|
Source: [`packages/boot/hmr/src/index.ts`](../../packages/boot/hmr/src/index.ts)
|
|
@@ -109,7 +163,7 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
109
163
|
*/
|
|
110
164
|
@Remote async listPlugins(): Promise<PluginInfo[]>
|
|
111
165
|
|
|
112
|
-
/** Read
|
|
166
|
+
/** Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.
|
|
113
167
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
114
168
|
* @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
|
|
115
169
|
* display metadata, activation selections, whether the installation offers the bundle, and removal availability.
|
|
@@ -151,7 +205,7 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
151
205
|
* `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.
|
|
152
206
|
* @param spec One package spec, including local paths relative to the invocation directory.
|
|
153
207
|
* @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
|
|
154
|
-
* the pending build scripts to allow
|
|
208
|
+
* the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.
|
|
155
209
|
* @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.
|
|
156
210
|
*/
|
|
157
211
|
@Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>
|
|
@@ -180,6 +234,56 @@ Manage profile files and apply their declared reload lifecycle.
|
|
|
180
234
|
|
|
181
235
|
Source: [`packages/boot/plugin-manager/src/index.ts`](../../packages/boot/plugin-manager/src/index.ts)
|
|
182
236
|
|
|
237
|
+
<a id="ctxpluginmarket--pluginmarket"></a>
|
|
238
|
+
|
|
239
|
+
### `ctx.pluginMarket` — `PluginMarket`
|
|
240
|
+
|
|
241
|
+
Fetches, validates, and caches configured market indexes; annotates entries with the profile's installation facts.
|
|
242
|
+
|
|
243
|
+
```ts cordis-catalog
|
|
244
|
+
/**
|
|
245
|
+
* List the configured index sources without fetching them.
|
|
246
|
+
* @returns every source in order, with the title of its last successful read and, when the last read failed, its error.
|
|
247
|
+
*/
|
|
248
|
+
@Remote listIndexes(): MarketIndexSummary[]
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Replace the configured index sources through Settings, without remounting this service.
|
|
252
|
+
* `plugin-market/changed` announces the committed list. A URL already configured is kept as written, so a client can
|
|
253
|
+
* add or remove sources beside one that `listIndexes` reports as unusable.
|
|
254
|
+
* @param urls - index URLs in display order.
|
|
255
|
+
* @throws {RemoteError} `plugin-market/invalid-index-url` for an invalid new URL or a repeated URL;
|
|
256
|
+
* `plugin-market/settings-unavailable` without Settings or a profile entry.
|
|
257
|
+
*/
|
|
258
|
+
@Remote async setIndexes(urls: string[]): Promise<void>
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Return one page of the plugins of a configured index that match a query. Concurrent reads of a URL share one
|
|
262
|
+
* fetch; a successful document is reused for `cacheTtlMs` unless `refresh` is set. Matching and ordering read only
|
|
263
|
+
* the document; installation status and compatibility are computed for the returned page on every call.
|
|
264
|
+
* @param url - a configured index URL.
|
|
265
|
+
* @param query - text, filters, order, page, and whether to bypass the cached document.
|
|
266
|
+
* @returns the index header, the page's plugins with each plugin's default version and installation status and each
|
|
267
|
+
* version's compatibility and install arguments, the number of matches, and the next page's offset.
|
|
268
|
+
* @throws {RemoteError} `plugin-market/invalid-query`, `plugin-market/unknown-index`, `plugin-market/invalid-index-url`,
|
|
269
|
+
* `plugin-market/fetch-failed`, or `plugin-market/invalid-index`.
|
|
270
|
+
*/
|
|
271
|
+
@Remote async search(url: string, query: MarketQuery): Promise<MarketSearchResult>
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Read one plugin of a configured index, using the cached document as `search` does.
|
|
275
|
+
* @param url - a configured index URL.
|
|
276
|
+
* @param name - the plugin's package name.
|
|
277
|
+
* @returns the plugin with its default version, installation status, and annotated versions; undefined when the
|
|
278
|
+
* index does not list it.
|
|
279
|
+
* @throws {RemoteError} `plugin-market/unknown-index`, `plugin-market/invalid-index-url`, `plugin-market/fetch-failed`,
|
|
280
|
+
* or `plugin-market/invalid-index`.
|
|
281
|
+
*/
|
|
282
|
+
async entry(url: string, name: string): Promise<MarketListingEntry | undefined>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Source: [`packages/boot/plugin-market/src/index.ts`](../../packages/boot/plugin-market/src/index.ts)
|
|
286
|
+
|
|
183
287
|
<a id="ctxpluginregistryprobe--pluginregistryprobe"></a>
|
|
184
288
|
|
|
185
289
|
### `ctx.pluginRegistryProbe` — `PluginRegistryProbe`
|
|
@@ -320,4 +424,24 @@ An installation moved between its Host phases. `installing` is announced once pe
|
|
|
320
424
|
```
|
|
321
425
|
|
|
322
426
|
Source: [`packages/boot/plugin-manager/src/types.ts`](../../packages/boot/plugin-manager/src/types.ts)
|
|
427
|
+
|
|
428
|
+
<a id="plugin-market-events"></a>
|
|
429
|
+
|
|
430
|
+
### `plugin-market/*` events
|
|
431
|
+
|
|
432
|
+
<a id="plugin-marketchanged--emit"></a>
|
|
433
|
+
|
|
434
|
+
#### `plugin-market/changed` — emit
|
|
435
|
+
|
|
436
|
+
The configured index sources changed.
|
|
437
|
+
|
|
438
|
+
```ts cordis-catalog
|
|
439
|
+
/**
|
|
440
|
+
* The configured index sources changed.
|
|
441
|
+
* @mode emit
|
|
442
|
+
*/
|
|
443
|
+
'plugin-market/changed'(): void
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Source: [`packages/boot/plugin-market/src/types.ts`](../../packages/boot/plugin-market/src/types.ts)
|
|
323
447
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -53,7 +53,7 @@ Every way a mod behaves differently through this bridge than under Claude Code,
|
|
|
53
53
|
| `$.command` | `register`, `run`, `list` | Same; `run` of a command nobody answers rejects with the registering mod named |
|
|
54
54
|
| `$.tool` | `register`, `call`, `list` | Same; a registered tool is `mcp__<plugin>__<tool>`; `call` runs the harness pipeline and injects a tool's deferred contexts into the session |
|
|
55
55
|
| `$.prompt` | `submit`, `compose` | `submit`; the message is `user`-sourced, framed `Message from the "<plugin>" mod:` unless `asUser`, and the `prompt.submit` it raises names the mod as origin |
|
|
56
|
-
| `$.session` | `id`, `cwd`, `root`, `repo`, `model`, `turns`, `messages`, `usage`, `version`, `send`, `append`, `authorize`, `compact`, `surfaces` | `id`, `cwd`, `root`, `model`, `turns`, `messages`, `usage`, `version`; `cwd`
|
|
56
|
+
| `$.session` | `id`, `cwd`, `root`, `repo`, `model`, `turns`, `messages`, `usage`, `version`, `send`, `append`, `authorize`, `compact`, `surfaces` | `id`, `cwd`, `root`, `model`, `turns`, `messages`, `usage`, `version`; `cwd` reports the committed current directory; `root` retains the original project; `usage.context.window` is `0` and `percent` absent until the token meter knows the route's window; `rateLimits` is empty; `version` names this bridge |
|
|
57
57
|
| `$.state` | Per session, survives hot reload | Per session, in memory; a read during `ui.render` subscribes the band to the slot |
|
|
58
58
|
| `$.store` | Per plugin, durable | Same, in the `claude_code_mods` storage domain, 4 MiB per plugin |
|
|
59
59
|
| `$.clock` | `now`, `sleep`, `after`, `every`; timers die with the plugin | Same; a timer also dies with the session whose event scheduled it, and `sleep` rejects when the event is cancelled |
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
| `$.command` | `register`、`run`、`list` | 相同;`run` 一个无人回答的命令时拒绝,并点名注册它的模组 |
|
|
54
54
|
| `$.tool` | `register`、`call`、`list` | 相同;注册的工具为 `mcp__<plugin>__<tool>`;`call` 运行 harness 流水线,并把工具推迟的上下文注入会话 |
|
|
55
55
|
| `$.prompt` | `submit`、`compose` | `submit`;消息为 `user` 来源,除非 `asUser` 否则套上 `Message from the "<plugin>" mod:` 框架,它触发的 `prompt.submit` 以该模组为来源 |
|
|
56
|
-
| `$.session` | `id`、`cwd`、`root`、`repo`、`model`、`turns`、`messages`、`usage`、`version`、`send`、`append`、`authorize`、`compact`、`surfaces` | `id`、`cwd`、`root`、`model`、`turns`、`messages`、`usage`、`version`;`cwd`
|
|
56
|
+
| `$.session` | `id`、`cwd`、`root`、`repo`、`model`、`turns`、`messages`、`usage`、`version`、`send`、`append`、`authorize`、`compact`、`surfaces` | `id`、`cwd`、`root`、`model`、`turns`、`messages`、`usage`、`version`;`cwd` 报告已提交的当前目录;`root` 保留原始项目;在 token 计量器得知路由窗口前 `usage.context.window` 为 `0` 且无 `percent`;`rateLimits` 为空;`version` 指明本桥接 |
|
|
57
57
|
| `$.state` | 按会话,热重载后保留 | 按会话,内存中;`ui.render` 期间的读取让横幅订阅该槽位 |
|
|
58
58
|
| `$.store` | 按插件,持久 | 相同,在 `claude_code_mods` 存储域中,每插件 4 MiB |
|
|
59
59
|
| `$.clock` | `now`、`sleep`、`after`、`every`;定时器随插件消亡 | 相同;定时器还随安排它的事件所属会话消亡,事件取消时 `sleep` 拒绝 |
|