dsh-plugin-guide 0.3.21 → 0.3.23
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 +15 -12
- package/README-hi.md +15 -12
- package/README-pt.md +15 -12
- package/README-zh.md +15 -12
- package/README.md +290 -280
- package/SKILL.md +36 -19
- package/dist/dsh-plugin-dev.js +113 -9
- package/guide/choosing-a-plugin.md +412 -0
- package/guide/choosing-a-plugin.zh-CN.md +414 -0
- package/guide/links.md +20 -2
- package/guide/migration-0.2.md +219 -0
- package/guide/plugin-dev-guide.md +99 -24
- package/guide/quick-reference.es.md +14 -8
- package/guide/quick-reference.hi.md +15 -9
- package/guide/quick-reference.md +18 -10
- package/guide/quick-reference.pt.md +15 -9
- package/guide/quick-reference.zh-CN.md +19 -11
- package/guide/release-engineering.md +2 -2
- package/guide/release-engineering.zh-CN.md +2 -2
- package/guide/unfixed-issues.md +117 -82
- package/guide/when-to-retire-a-plugin.md +127 -0
- package/guide/when-to-retire-a-plugin.zh-CN.md +127 -0
- package/icon.svg +5 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +8 -4
- package/references/official-docs/AGENTS.md +8 -5
- package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -5
- package/references/official-docs/README.i18n.yaml +33 -5
- package/references/official-docs/README.zh.md +3 -3
- package/references/official-docs/SNAPSHOT.md +3 -3
- package/references/official-docs/THIRD_PARTY_NOTICES.md +34 -6
- package/references/official-docs/docs/AGENTS.md +4 -4
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +9 -5
- package/references/official-docs/docs/api-gateway.i18n.yaml +27 -5
- package/references/official-docs/docs/api-gateway.md +10 -9
- package/references/official-docs/docs/api-gateway.zh.md +10 -9
- package/references/official-docs/docs/architecture.i18n.yaml +36 -5
- package/references/official-docs/docs/architecture.md +10 -8
- package/references/official-docs/docs/architecture.zh.md +10 -8
- package/references/official-docs/docs/capability-seams.i18n.yaml +9 -5
- package/references/official-docs/docs/capability-seams.md +76 -32
- package/references/official-docs/docs/capability-seams.zh.md +76 -32
- package/references/official-docs/docs/config-catalog.i18n.yaml +18 -5
- package/references/official-docs/docs/config-catalog.md +1360 -765
- package/references/official-docs/docs/config-catalog.zh.md +1363 -767
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +27 -5
- package/references/official-docs/docs/cookbook/adding-a-package.md +56 -3
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +54 -3
- package/references/official-docs/docs/cookbook/adding-a-remote-api.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/adding-a-remote-api.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +39 -5
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/adding-a-settings-card.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +3 -3
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +15 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +13 -1
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +13 -1
- package/references/official-docs/docs/cordis-api/context.i18n.yaml +72 -5
- package/references/official-docs/docs/cordis-api/events.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +75 -5
- package/references/official-docs/docs/cordis-api/inherited.md +15 -13
- package/references/official-docs/docs/cordis-api/registry.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-api/service.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-primer.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +15 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +33 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +7 -7
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +7 -7
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +27 -5
- package/references/official-docs/docs/dependency-catalog.json +2 -2
- package/references/official-docs/docs/development.i18n.yaml +48 -5
- package/references/official-docs/docs/development.md +27 -10
- package/references/official-docs/docs/development.zh.md +27 -10
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +12 -5
- package/references/official-docs/docs/event-producer-consumer.md +78 -66
- package/references/official-docs/docs/event-producer-consumer.zh.md +78 -66
- package/references/official-docs/docs/glossary.i18n.yaml +24 -5
- package/references/official-docs/docs/graph-atlas.i18n.yaml +9 -5
- package/references/official-docs/docs/i18n/README.i18n.yaml +18 -5
- package/references/official-docs/docs/i18n/README.md +12 -8
- package/references/official-docs/docs/i18n/README.zh.md +12 -8
- package/references/official-docs/docs/i18n/terminology.md +4 -4
- package/references/official-docs/docs/i18n/translation-prompt.md +2 -2
- package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +27 -5
- package/references/official-docs/docs/module-graph.i18n.yaml +9 -5
- package/references/official-docs/docs/module-graph.md +348 -245
- package/references/official-docs/docs/module-graph.zh.md +348 -245
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2064 -5
- package/references/official-docs/docs/persistence-catalog.md +5275 -3205
- package/references/official-docs/docs/persistence-catalog.zh.md +5275 -3205
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +16212 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.schema.json +302 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.schema.json +250 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.schema.json +11405 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/references/official-docs/docs/persistence-changes/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/README.md +17 -3
- package/references/official-docs/docs/persistence-changes/README.zh.md +17 -3
- package/references/official-docs/docs/persistence-changes/finalized/v4.json +379 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/README.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +1344 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.i18n.yaml +1441 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.md +5634 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.schema.json +61307 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-schema.json +12692 -48753
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +33 -5
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -5
- package/references/official-docs/docs/rescope.i18n.yaml +18 -5
- package/references/official-docs/docs/rescope.md +1 -1
- package/references/official-docs/docs/rescope.zh.md +1 -1
- package/references/official-docs/docs/session-format-status.i18n.yaml +27 -5
- package/references/official-docs/docs/session-format-status.md +17 -3
- package/references/official-docs/docs/session-format-status.zh.md +17 -3
- package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/README.md +6 -3
- package/references/official-docs/docs/subsystems/README.zh.md +6 -3
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/agent-team.md +52 -28
- package/references/official-docs/docs/subsystems/agent-team.zh.md +52 -28
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/approval.md +1 -1
- package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/attachment.md +2 -2
- package/references/official-docs/docs/subsystems/attachment.zh.md +2 -2
- package/references/official-docs/docs/subsystems/boot.i18n.yaml +9 -5
- package/references/official-docs/docs/subsystems/boot.md +117 -17
- package/references/official-docs/docs/subsystems/boot.zh.md +117 -17
- package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +28 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.md +146 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +146 -0
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/client-modules.md +13 -7
- package/references/official-docs/docs/subsystems/client-modules.zh.md +13 -7
- package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/commands.md +1 -1
- package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/compaction.md +2 -2
- package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
- package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/conversation.md +35 -6
- package/references/official-docs/docs/subsystems/conversation.zh.md +34 -5
- package/references/official-docs/docs/subsystems/core.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/core.md +70 -214
- package/references/official-docs/docs/subsystems/core.zh.md +70 -214
- package/references/official-docs/docs/subsystems/credentials.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/credentials.md +168 -5
- package/references/official-docs/docs/subsystems/credentials.zh.md +168 -5
- package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/extensions.md +6 -4
- package/references/official-docs/docs/subsystems/extensions.zh.md +6 -4
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/filesystem.md +10 -0
- package/references/official-docs/docs/subsystems/filesystem.zh.md +10 -0
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/goal.md +1 -1
- package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/jobs.md +335 -126
- package/references/official-docs/docs/subsystems/jobs.zh.md +335 -126
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +48 -5
- package/references/official-docs/docs/subsystems/llm-streaming.md +60 -31
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +60 -31
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/mcp.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/mcp.md +2 -2
- package/references/official-docs/docs/subsystems/mcp.zh.md +2 -2
- package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/office-to-pdf.md +4 -4
- package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +4 -4
- package/references/official-docs/docs/subsystems/otel.i18n.yaml +7 -0
- package/references/official-docs/docs/subsystems/otel.md +44 -0
- package/references/official-docs/docs/subsystems/otel.zh.md +44 -0
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/permission-presets.md +7 -6
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +7 -6
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/persistence.md +3 -3
- package/references/official-docs/docs/subsystems/persistence.zh.md +3 -3
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/plan.md +1 -1
- package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
- package/references/official-docs/docs/subsystems/product-telemetry.i18n.yaml +10 -0
- package/references/official-docs/docs/subsystems/product-telemetry.md +79 -0
- package/references/official-docs/docs/subsystems/product-telemetry.zh.md +79 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.md +1 -1
- package/references/official-docs/docs/subsystems/sandbox.zh.md +1 -1
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +39 -5
- package/references/official-docs/docs/subsystems/schedule.md +391 -33
- package/references/official-docs/docs/subsystems/schedule.zh.md +391 -33
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/scope.md +1 -1
- package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/session-projection.md +20 -18
- package/references/official-docs/docs/subsystems/session-projection.zh.md +20 -18
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/session-telemetry.md +6 -4
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -4
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +66 -5
- package/references/official-docs/docs/subsystems/session.md +113 -62
- package/references/official-docs/docs/subsystems/session.zh.md +113 -62
- package/references/official-docs/docs/subsystems/settings.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/settings.md +42 -292
- package/references/official-docs/docs/subsystems/settings.zh.md +42 -292
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/shell.md +29 -22
- package/references/official-docs/docs/subsystems/shell.zh.md +29 -22
- package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/sidebar-right.md +14 -9
- package/references/official-docs/docs/subsystems/sidebar-right.zh.md +14 -9
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/skills.md +2 -2
- package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/slots.md +21 -7
- package/references/official-docs/docs/subsystems/slots.zh.md +21 -7
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/spill.md +1 -1
- package/references/official-docs/docs/subsystems/spill.zh.md +1 -1
- package/references/official-docs/docs/subsystems/ssh.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/storage.md +1 -2
- package/references/official-docs/docs/subsystems/storage.zh.md +1 -2
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/subagent.md +35 -60
- package/references/official-docs/docs/subsystems/subagent.zh.md +35 -60
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/terminal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/todo.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/todo.md +3 -3
- package/references/official-docs/docs/subsystems/todo.zh.md +3 -3
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/tools.md +15 -4
- package/references/official-docs/docs/subsystems/tools.zh.md +15 -4
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/typert.md +147 -6
- package/references/official-docs/docs/subsystems/typert.zh.md +147 -6
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/user-questions.md +128 -1
- package/references/official-docs/docs/subsystems/user-questions.zh.md +129 -2
- package/references/official-docs/docs/subsystems/voice-input.i18n.yaml +19 -0
- package/references/official-docs/docs/subsystems/voice-input.md +164 -0
- package/references/official-docs/docs/subsystems/voice-input.zh.md +164 -0
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/web-client.md +10 -5
- package/references/official-docs/docs/subsystems/web-client.zh.md +10 -5
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/web-server.md +12 -4
- package/references/official-docs/docs/subsystems/web-server.zh.md +12 -4
- package/references/official-docs/docs/subsystems/web.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/webhook.md +1 -1
- package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workflow.md +2 -2
- package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workspace.md +175 -35
- package/references/official-docs/docs/subsystems/workspace.zh.md +175 -35
- package/references/official-docs/docs/testing.i18n.yaml +33 -5
- package/references/official-docs/docs/testing.md +2 -2
- package/references/official-docs/docs/testing.zh.md +2 -2
- package/references/official-docs/docs/tool-catalog.i18n.yaml +312 -5
- package/references/official-docs/docs/tool-catalog.md +321 -92
- package/references/official-docs/docs/tool-catalog.zh.md +321 -92
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +9 -5
- package/references/official-docs/docs/tool-execution-pipeline.md +6 -3
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +6 -3
- package/references/official-docs/docs/ui-radius.i18n.yaml +31 -0
- package/references/official-docs/docs/ui-radius.md +115 -0
- package/references/official-docs/docs/ui-radius.zh.md +115 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +27 -5
- package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +36 -5
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/basic/publish.md +7 -1
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -1
- package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +15 -5
- package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +39 -5
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +9 -5
- package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +33 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.md +1 -1
- package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +1 -1
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/index.i18n.yaml +18 -5
- package/references/official-docs/docs/user/guide/index.md +1 -0
- package/references/official-docs/docs/user/guide/index.zh.md +1 -0
- package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
- package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/providers.md +88 -78
- package/references/official-docs/docs/user/guide/providers.zh.md +102 -92
- package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +19 -0
- package/references/official-docs/docs/user/guide/public-deployments.md +33 -0
- package/references/official-docs/docs/user/guide/public-deployments.zh.md +33 -0
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +27 -5
- package/references/official-docs/docs/user/guide/python-sdk.md +1 -1
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
- package/references/official-docs/docs/user/guide/schedule.i18n.yaml +30 -5
- package/references/official-docs/docs/user/guide/schedule.md +69 -11
- package/references/official-docs/docs/user/guide/schedule.zh.md +69 -11
- package/references/official-docs/docs/user/index.i18n.yaml +9 -5
- package/references/official-docs/docs/web-styling.i18n.yaml +18 -5
- package/references/official-docs/docs/web-styling.md +12 -3
- package/references/official-docs/docs/web-styling.zh.md +12 -3
- package/references/official-docs/packages/AGENTS.md +1 -2
- package/references/official-docs/packages/README.md +5 -5
- package/references/official-docs/vendor/README.md +6 -2
- package/references/official-docs/website-docs.ts +10 -3
- package/references/official-plugin-dev-skill.md +124 -0
- package/references/sources.md +10 -5
- package/scripts/archive-discussions.ps1 +9 -1
- package/scripts/build-llms-full.mjs +64 -0
- package/scripts/check-docs-drift.ps1 +1 -1
- package/scripts/sync-official-docs.ps1 +1 -1
- package/templates/js/icon.svg +4 -0
- package/templates/js/locale/en.json +6 -0
- package/templates/js/locale/zh.json +6 -0
- package/templates/js/package.json +9 -1
- package/templates/ts/icon.svg +4 -0
- package/templates/ts/locale/en.json +6 -0
- package/templates/ts/locale/zh.json +6 -0
- package/templates/ts/package.json +9 -1
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +0 -6
- package/references/official-docs/docs/subsystems/invariants.md +0 -88
- package/references/official-docs/docs/subsystems/invariants.zh.md +0 -88
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](jobs.zh.md)
|
|
4
4
|
|
|
5
|
-
Types shared by long-running producers, `ctx.jobs`, and job controls. The [
|
|
5
|
+
Types shared by long-running producers, `ctx.jobs`, and job controls. The [seam consolidation Agent Note](../../.agents/notes/implemented/architecture/2026-09-03-jobs-seam-consolidation.md) owns the current design and the [runtime reference](../../packages/jobs/jobs/README.md) its origin; this page records the exact fields and variants from [`packages/jobs/jobs/src/types.ts`](../../packages/jobs/jobs/src/types.ts) and the client-safe [`view.ts`](../../packages/jobs/jobs/src/view.ts) leaf.
|
|
6
6
|
|
|
7
7
|
## Ids and status
|
|
8
8
|
|
|
@@ -19,45 +19,83 @@ interface JobKindMap {
|
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
`JobStatus` is `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`; producer-specific facts belong in `
|
|
22
|
+
`JobStatus` is `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`; producer-specific facts belong in `JobView.progress` while the job runs and in `JobView.detail` once it settled.
|
|
23
23
|
|
|
24
24
|
## Producer contract
|
|
25
25
|
|
|
26
|
-
`
|
|
26
|
+
A `JobSpec` declares identity, the owning session, optional pull `output` sources, and a starter. The runtime finishes preflight before calling `run()` with the job's `JobHandle` and commits without a later failable step. Producers own execution resources; the runtime owns identity, access, lifecycle state, and the output ring.
|
|
27
27
|
|
|
28
28
|
```ts type-equiv
|
|
29
29
|
/**
|
|
30
30
|
* Producer declaration passed to {@link JobRegistry.start}. The runtime
|
|
31
31
|
* preflights access and cleanup before invoking {@link run}; the producer owns
|
|
32
|
-
* execution resources while the runtime owns identity
|
|
32
|
+
* execution resources while the runtime owns identity, lifecycle state, and
|
|
33
|
+
* the output ring.
|
|
33
34
|
*/
|
|
34
|
-
interface
|
|
35
|
+
interface JobSpec {
|
|
35
36
|
/** Producer kind — also the id prefix (`bash`, `subagent`, …). */
|
|
36
37
|
kind: JobKind
|
|
37
38
|
/** One-line model-facing label (the command; the delegation description). */
|
|
38
39
|
label: string
|
|
40
|
+
/**
|
|
41
|
+
* Owning session. Access is fenced by it, and the owner's live Agent must be
|
|
42
|
+
* the one currently registered under that id: its disposal cancels and
|
|
43
|
+
* awaits the job. Omitting the owner creates an unowned job, open to any
|
|
44
|
+
* caller until service disposal.
|
|
45
|
+
*/
|
|
46
|
+
owner?: SessionId
|
|
39
47
|
/**
|
|
40
48
|
* Optional UTF-8 byte cap for each complete model-facing completion notice or
|
|
41
|
-
* output read, including controller status metadata.
|
|
49
|
+
* output read, including controller status metadata. Independent of ring
|
|
50
|
+
* retention: it bounds the consuming model surface, never observers.
|
|
42
51
|
*/
|
|
43
52
|
outputLimitBytes?: number
|
|
44
53
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* open to any caller until service disposal.
|
|
54
|
+
* Pull sources the registry pumps into the ring at its own cadence.
|
|
55
|
+
* Producers that narrate their own progress use {@link JobHandle.append}
|
|
56
|
+
* instead; a job may use both.
|
|
49
57
|
*/
|
|
50
|
-
|
|
58
|
+
output?: readonly JobOutputSource[]
|
|
51
59
|
/**
|
|
52
60
|
* Start the work after preflight and synchronously return its hooks. Called
|
|
53
|
-
* once; a throw leaves nothing registered
|
|
54
|
-
*
|
|
61
|
+
* once with the job's producer face; a throw leaves nothing registered (the
|
|
62
|
+
* spent ordinal is skipped), and the producer must clean up any partially
|
|
63
|
+
* started resources.
|
|
64
|
+
* @param job - the issued id plus the ring append and progress writers.
|
|
65
|
+
*/
|
|
66
|
+
run(job: JobHandle): JobHooks
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```ts type-equiv
|
|
71
|
+
/**
|
|
72
|
+
* Producer face of one registered job, handed to {@link JobSpec.run} and
|
|
73
|
+
* valid for the job's whole life. All methods are synchronous. Writes staged
|
|
74
|
+
* inside the starter call are retained and become visible with the
|
|
75
|
+
* registration commit; after settlement — the producer's own outcome, a kill,
|
|
76
|
+
* or a registry-forced teardown end — writes log and drop instead of
|
|
77
|
+
* throwing, so a producer's trailing flush cannot break its own teardown path.
|
|
78
|
+
*/
|
|
79
|
+
interface JobHandle {
|
|
80
|
+
/** The registry-issued id (`<kind>-N`). */
|
|
81
|
+
readonly id: JobId
|
|
82
|
+
/**
|
|
83
|
+
* Append one chunk to the output ring. Offsets advance by the chunk's UTF-8
|
|
84
|
+
* byte length; an empty chunk is dropped without waking observers.
|
|
85
|
+
* @param text - the chunk text, exactly as produced.
|
|
86
|
+
* @param options - stream label and gap marker.
|
|
87
|
+
*/
|
|
88
|
+
append(text: string, options?: JobAppendOptions): void
|
|
89
|
+
/**
|
|
90
|
+
* Replace the live progress line (`3/10`, the current phase). Settlement
|
|
91
|
+
* clears it; the terminal reason travels in {@link JobOutcome.detail}.
|
|
92
|
+
* @param line - the new progress line.
|
|
55
93
|
*/
|
|
56
|
-
|
|
94
|
+
updateProgress(line: string): void
|
|
57
95
|
}
|
|
58
96
|
```
|
|
59
97
|
|
|
60
|
-
`JobHooks.done` resolves after the producer releases its resources, not merely when work finishes.
|
|
98
|
+
`JobHooks.done` resolves after the producer releases its resources, not merely when work finishes. A job whose result is a value rather than a stream — a subagent's report, a workflow's rendered result — returns it as `JobOutcome.result`; the model's first read after settlement carries it once.
|
|
61
99
|
|
|
62
100
|
```ts type-equiv
|
|
63
101
|
/** Hooks through which the runtime controls and observes producer work. */
|
|
@@ -74,12 +112,6 @@ interface JobHooks {
|
|
|
74
112
|
* registry record without claiming that the work stopped.
|
|
75
113
|
*/
|
|
76
114
|
done: Promise<JobOutcome>
|
|
77
|
-
/**
|
|
78
|
-
* Consume output produced since the previous call. The producer formats
|
|
79
|
-
* truncation and spill notices. Absence marks a final-output-only job; each
|
|
80
|
-
* job has one consuming cursor.
|
|
81
|
-
*/
|
|
82
|
-
readOutput?(): string
|
|
83
115
|
}
|
|
84
116
|
```
|
|
85
117
|
|
|
@@ -88,73 +120,215 @@ interface JobHooks {
|
|
|
88
120
|
interface JobOutcome {
|
|
89
121
|
/** How the job ended: finished (`completed`), cancelled (`killed`), or broke (`failed`). */
|
|
90
122
|
status: 'completed' | 'killed' | 'failed'
|
|
91
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Terminal reason rendered into status lines (`exit code: 3`, `max-tokens`).
|
|
125
|
+
* When the job settles `killed` after a {@link JobRegistry.kill} with a
|
|
126
|
+
* reason, the registry appends that reason.
|
|
127
|
+
*/
|
|
92
128
|
detail?: string
|
|
93
|
-
/**
|
|
94
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Return value for jobs whose result is a value rather than a stream (a
|
|
131
|
+
* workflow's rendered result, a subagent's report). The output ring carries
|
|
132
|
+
* the stream; this is handed out once by the model's next {@link JobRegistry.read}.
|
|
133
|
+
*/
|
|
134
|
+
result?: string
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
A pull source hands the registry a non-consuming offset reader — the subprocess `readFrom` family. The registry pumps every source at its own cadence (`pumpPollMs` on `dsh-jobs-local`) and drains it once more before settlement closes the ring, so producers fold nothing into `done`.
|
|
139
|
+
|
|
140
|
+
```ts type-equiv
|
|
141
|
+
/**
|
|
142
|
+
* A pull source the registry pumps into the job's output ring — the subprocess
|
|
143
|
+
* `readFrom` family. The registry owns the cadence and drains every source one
|
|
144
|
+
* last time before settlement closes the ring, so a producer folds nothing
|
|
145
|
+
* into its `done`.
|
|
146
|
+
*/
|
|
147
|
+
interface JobOutputSource {
|
|
148
|
+
/** Stream label attached to every chunk this source yields. */
|
|
149
|
+
channel?: JobChannel
|
|
150
|
+
/**
|
|
151
|
+
* Read everything captured since `fromByte` without consuming it.
|
|
152
|
+
* @param fromByte - whole-stream offset to resume from (a prior read's `nextOffset`; 0 first).
|
|
153
|
+
* @returns the delta text, the next offset, the lossy flag, and the spill path the source currently keeps.
|
|
154
|
+
*/
|
|
155
|
+
read(fromByte: number): JobSourceRead
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
```ts type-equiv
|
|
160
|
+
/** One incremental read from a {@link JobOutputSource}. */
|
|
161
|
+
interface JobSourceRead {
|
|
162
|
+
/** Text captured since the requested offset (the whole retained tail when lossy). */
|
|
163
|
+
text: string
|
|
164
|
+
/** Whole-stream offset to resume from on the next read. */
|
|
165
|
+
nextOffset: number
|
|
166
|
+
/** True when the requested offset slid out of the source's retained window. */
|
|
167
|
+
lossy: boolean
|
|
168
|
+
/**
|
|
169
|
+
* Host path of a file holding the complete stream, when the source
|
|
170
|
+
* currently keeps an intact one. Reported on every read, so the registry
|
|
171
|
+
* tracks it as source metadata: a later read without it withdraws the file.
|
|
172
|
+
*/
|
|
173
|
+
spillPath?: string
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## The output ring
|
|
178
|
+
|
|
179
|
+
Every job owns one bounded ring. Pull sources are pumped into it and `JobHandle.append` pushes land whole; the model consumes the ring through a registry-kept cursor (`JobRegistry.read`), any number of observers read it at absolute byte offsets (`JobRegistry.readAt`), and neither disturbs the other. `JobChannel` labels `stdout`, `stderr`, and `log`; `log` is producer narration that reaches observers only, never the model's consuming read. Settlement ends the stream and trims retention to the settled cap — the ring has no separate lifecycle. The spill file a pull source keeps is job metadata (`JobView.output.spillPaths`, refreshed by every pump read), not per-chunk metadata, so the model's dropped-output notice names it after the ring evicted the bytes and even after the gap chunk itself is gone. Browsers reach the roster and the ring through `job.list` and `job.follow`, the Remote streams of [`dsh-api-job-controller`](../../packages/api/job-controller/README.md), whose frames are listed under its Cordis API section below.
|
|
180
|
+
|
|
181
|
+
```ts type-equiv
|
|
182
|
+
/** One chunk of a job's output ring: absolute offset, text, channel, and loss marker. */
|
|
183
|
+
interface JobChunk {
|
|
184
|
+
/** Absolute offset of the chunk's first byte; offsets never move once assigned. */
|
|
185
|
+
readonly at: number
|
|
186
|
+
/** Chunk text exactly as appended (possibly tail-trimmed by retention). */
|
|
187
|
+
readonly text: string
|
|
188
|
+
/** Stream label, when the producer supplied one. */
|
|
189
|
+
readonly channel?: JobChannel
|
|
190
|
+
/** Bytes immediately before this chunk were lost, at the producer or to retention. */
|
|
191
|
+
readonly gapBefore?: true
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```ts type-equiv
|
|
196
|
+
/** Result of one non-consuming {@link JobRegistry.readAt}. */
|
|
197
|
+
interface JobOutputRead {
|
|
198
|
+
/** Retained chunks overlapping `[from, total)`, in offset order. */
|
|
199
|
+
chunks: readonly JobChunk[]
|
|
200
|
+
/**
|
|
201
|
+
* Offset to resume from — the ring's current `total`. Always a chunk
|
|
202
|
+
* boundary: appends land whole and trimming only advances chunk starts, and
|
|
203
|
+
* consumers concatenate `chunks` under that assumption, so a provider
|
|
204
|
+
* serving partial chunks would silently duplicate text.
|
|
205
|
+
*/
|
|
206
|
+
next: number
|
|
207
|
+
/** True when `from` fell below the oldest retained byte, so bytes are missing before `chunks`. */
|
|
208
|
+
lossy: boolean
|
|
95
209
|
}
|
|
96
210
|
```
|
|
97
211
|
|
|
98
212
|
## Consumer views
|
|
99
213
|
|
|
100
|
-
|
|
214
|
+
`JobView` is the one projection every reader consumes: the model tools, the browser roster, and the observation stream. `owner` carries the session id that fences access; the registry resolves the live `Agent` behind it for lifecycle cleanup and never hands the object out. `progress` is the producer's live line and is cleared at settlement; `detail` is the terminal reason, with a recorded kill reason merged in.
|
|
101
215
|
|
|
102
216
|
```ts type-equiv
|
|
103
217
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
218
|
+
* Read-only projection of one job — a fresh object per call, never live
|
|
219
|
+
* registry state. The model tools, the browser roster, and the observation
|
|
220
|
+
* stream all consume this one shape.
|
|
106
221
|
*/
|
|
107
|
-
interface
|
|
222
|
+
interface JobView {
|
|
108
223
|
/** The registry-issued id (`<kind>-N`). */
|
|
109
|
-
id: JobId
|
|
110
|
-
/** The producer kind the job was registered with. */
|
|
111
|
-
kind: JobKind
|
|
112
|
-
/** The producer-supplied one-line label. */
|
|
113
|
-
label: string
|
|
114
|
-
/** Producer-owned cap for complete model-facing notices and output reads. */
|
|
115
|
-
outputLimitBytes?: number
|
|
224
|
+
readonly id: JobId
|
|
116
225
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
226
|
+
* The producer kind the job was registered with: a Host-registered
|
|
227
|
+
* `JobKind`, carried as an open string because a browser bundle or a Remote
|
|
228
|
+
* codec sees only the `JobKindMap` merges its own program compiles.
|
|
120
229
|
*/
|
|
121
|
-
|
|
230
|
+
readonly kind: string
|
|
231
|
+
/** The producer-supplied one-line label. */
|
|
232
|
+
readonly label: string
|
|
233
|
+
/** Owning session; absent for an unowned job, which every caller can see. */
|
|
234
|
+
readonly owner?: SessionId
|
|
235
|
+
/** Producer-owned cap for complete model-facing notices and reads, in UTF-8 bytes. */
|
|
236
|
+
readonly outputLimitBytes?: number
|
|
122
237
|
/** Current lifecycle state. */
|
|
123
|
-
status: JobStatus
|
|
124
|
-
/**
|
|
125
|
-
|
|
238
|
+
readonly status: JobStatus
|
|
239
|
+
/** The producer's live progress line (`3/10`, the current phase); cleared at settlement. */
|
|
240
|
+
readonly progress?: string
|
|
241
|
+
/** Terminal reason (`exit code: 3`); a recorded kill reason is merged in. */
|
|
242
|
+
readonly detail?: string
|
|
126
243
|
/** Epoch ms when the job was registered. */
|
|
127
|
-
startedAt: number
|
|
128
|
-
/** Epoch ms when the job settled; absent while
|
|
129
|
-
finishedAt?: number
|
|
244
|
+
readonly startedAt: number
|
|
245
|
+
/** Epoch ms when the job settled; absent while live. */
|
|
246
|
+
readonly finishedAt?: number
|
|
130
247
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
248
|
+
* The output ring's absolute coordinates and the complete-stream files
|
|
249
|
+
* behind it. `total` is the offset the next chunk starts at (0 while
|
|
250
|
+
* nothing was written); `earliest` is the oldest retained byte, greater
|
|
251
|
+
* than zero exactly when retention dropped the head. `spillPaths` lists the
|
|
252
|
+
* spill files the job's pull sources currently keep, in source order and
|
|
253
|
+
* deduplicated, and is absent while no source keeps one: it outlives any
|
|
254
|
+
* chunk, so a reader below `earliest` can still name where the bytes went.
|
|
136
255
|
*/
|
|
137
|
-
|
|
256
|
+
readonly output: { readonly total: number; readonly earliest: number; readonly spillPaths?: readonly string[] }
|
|
138
257
|
}
|
|
139
258
|
```
|
|
140
259
|
|
|
260
|
+
`JobRegistry.list`, `get`, `read`, `readAt`, `kill`, and `wait` each accept the caller’s `SessionId`; omitting it permits only unowned jobs, while a session may also access its own jobs.
|
|
261
|
+
|
|
141
262
|
```ts type-equiv
|
|
142
|
-
/** Output and post-read state returned by {@link JobRegistry.read}. */
|
|
263
|
+
/** Output and post-read state returned by the consuming {@link JobRegistry.read}. */
|
|
143
264
|
interface JobRead {
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
265
|
+
/** Ring chunks appended since the model cursor, in offset order; every channel included. */
|
|
266
|
+
chunks: readonly JobChunk[]
|
|
267
|
+
/** True when the cursor fell below the oldest retained byte, so bytes are missing before `chunks`. */
|
|
268
|
+
lossy: boolean
|
|
269
|
+
/** The producer's {@link JobOutcome.result}, handed out by the first read after settlement only. */
|
|
270
|
+
result?: string
|
|
150
271
|
/** The job's state at read time. */
|
|
151
|
-
|
|
272
|
+
job: JobView
|
|
152
273
|
}
|
|
153
274
|
```
|
|
154
275
|
|
|
276
|
+
## Events
|
|
277
|
+
|
|
278
|
+
The registry announces every commit through one filtered stream. Lifecycle events carry the projection after the commit they announce; `settled` names its cause so a completion reporter can skip a teardown; `output` carries only the id and the new total, so observers read from their own cursor and the registry never pushes payloads.
|
|
279
|
+
|
|
280
|
+
```ts type-equiv
|
|
281
|
+
/**
|
|
282
|
+
* One lifecycle or output event. Lifecycle events carry the job's projection
|
|
283
|
+
* after the commit they announce; `output` carries only the id and the new
|
|
284
|
+
* total, so an observer schedules a {@link JobRegistry.readAt} from its own
|
|
285
|
+
* cursor and the registry never pushes payloads.
|
|
286
|
+
*/
|
|
287
|
+
type JobEvent =
|
|
288
|
+
| {
|
|
289
|
+
/** Registration commit, progress line change, stopping transition, or removal from the visible set. */
|
|
290
|
+
readonly type: 'registered' | 'progress' | 'stopping' | 'removed'
|
|
291
|
+
readonly job: JobView
|
|
292
|
+
}
|
|
293
|
+
| {
|
|
294
|
+
readonly type: 'settled'
|
|
295
|
+
readonly job: JobView
|
|
296
|
+
readonly cause: JobSettleCause
|
|
297
|
+
/**
|
|
298
|
+
* Whether this settlement released a live {@link JobRegistry.wait}. That
|
|
299
|
+
* waiter's caller receives the terminal projection as its own result, so
|
|
300
|
+
* a completion reporter treats an awaited settlement as already delivered
|
|
301
|
+
* and reports only the unawaited ones. A wait that timed out or was
|
|
302
|
+
* aborted before the settlement does not count.
|
|
303
|
+
*/
|
|
304
|
+
readonly awaited: boolean
|
|
305
|
+
}
|
|
306
|
+
| {
|
|
307
|
+
readonly type: 'output'
|
|
308
|
+
readonly id: JobId
|
|
309
|
+
/** Owning session, absent for an unowned job. */
|
|
310
|
+
readonly owner?: SessionId
|
|
311
|
+
/** The ring's total after the append (or at settlement, which ends the stream). */
|
|
312
|
+
readonly total: number
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
```ts type-equiv
|
|
317
|
+
/**
|
|
318
|
+
* Who a subscription hears about. `{ owner }` delivers that session's jobs
|
|
319
|
+
* plus every unowned job (the set that session can see). `{ owners: 'scope' }`
|
|
320
|
+
* delivers the owners composed under the subscribing context — one registry
|
|
321
|
+
* serves every composition in the process, and a mount under one preset must
|
|
322
|
+
* not hear another preset's agents. `{ owners: 'all' }` delivers everything.
|
|
323
|
+
*/
|
|
324
|
+
type JobEventFilter =
|
|
325
|
+
| { readonly owner: SessionId }
|
|
326
|
+
| { readonly owners: 'all' | 'scope' }
|
|
327
|
+
```
|
|
328
|
+
|
|
155
329
|
## Service behavior
|
|
156
330
|
|
|
157
|
-
The abstract [`JobRegistry`](../../packages/jobs/jobs/src/index.ts) Service Definition specifies atomic `start`, caller-scoped `get
|
|
331
|
+
The abstract [`JobRegistry`](../../packages/jobs/jobs/src/index.ts) Service Definition specifies atomic `start`, caller-scoped `list`, `get`, consuming `read`, non-consuming `readAt`, `kill`, and bounded `wait`, the filtered `events` stream, and `attachController`; [`LocalJobRegistry`](../../packages/jobs/jobs-local/src/index.ts) is the process-local Service Provider. Authorization compares owner sessions; owner cleanup and admission use the live `Agent` registered under the owner session when the job starts. The local provider's positive-safe-integer `maxConcurrentJobsPerOwner` config defaults to `10` and counts `running` plus `stopping` records per exact owner, with one shared bucket for unowned jobs; terminal producer settlement releases capacity; `retainBytes` (default 262144) and `settledRetainBytes` (default 16384) bound each ring's live and settled retention, and `pumpPollMs` (default 150) is the pull cadence. See [`dsh-jobs`](../../packages/jobs/jobs/README.md) for the Service Definition contract, [`dsh-jobs-local`](../../packages/jobs/jobs-local/README.md) for the registry lifecycle and admission policy, and [`dsh-tool-jobs`](../../packages/jobs/tool-jobs/README.md) for the model-facing Consumer.
|
|
158
332
|
|
|
159
333
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
160
334
|
|
|
@@ -164,18 +338,66 @@ The abstract [`JobRegistry`](../../packages/jobs/jobs/src/index.ts) Service Defi
|
|
|
164
338
|
|
|
165
339
|
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).
|
|
166
340
|
|
|
341
|
+
<a id="ctxjobcontroller--jobcontroller"></a>
|
|
342
|
+
|
|
343
|
+
### `ctx.jobController` — `JobController`
|
|
344
|
+
|
|
345
|
+
Host service backing the generated `ctx.remote.job` namespace.
|
|
346
|
+
|
|
347
|
+
```ts cordis-catalog
|
|
348
|
+
/**
|
|
349
|
+
* Stream the jobs one session can see — its own plus every unowned job —
|
|
350
|
+
* as whole-set frames: one on open, then one after each coalesced burst of
|
|
351
|
+
* lifecycle commits. The stream has no natural end; the carrier closes it.
|
|
352
|
+
* @param request - the session whose visible set to mirror.
|
|
353
|
+
* @param signal - cancellation owned by the Remote stream carrier.
|
|
354
|
+
* @returns the roster frames.
|
|
355
|
+
*/
|
|
356
|
+
@Remote({ mode: 'stream' }) list(request: JobListRequest, signal: AbortSignal): AsyncIterable<JobListFrame>
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Stream one job's retained output from an absolute byte offset, then its
|
|
360
|
+
* terminal projection once settled and drained. Non-consuming: the
|
|
361
|
+
* model-facing cursor and notice state never observe these reads. The
|
|
362
|
+
* request's session is the fenced read's caller; the registry rejects a
|
|
363
|
+
* job the session cannot see and an unknown job.
|
|
364
|
+
* @param request - target job, owning session, and optional resume offset.
|
|
365
|
+
* @param signal - cancellation owned by the Remote stream carrier.
|
|
366
|
+
* @returns anchor, coalesced output frames, and the terminal status.
|
|
367
|
+
*/
|
|
368
|
+
@Remote({ mode: 'stream' }) follow(request: JobFollowRequest, signal: AbortSignal): AsyncIterable<JobFollowFrame>
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Kill one background job on a human's behalf. The request's session is
|
|
372
|
+
* the fenced read's caller, so the job must be one that session can see:
|
|
373
|
+
* the registry's owner fence is the only access rule, and a child session's
|
|
374
|
+
* own jobs are killable from its list like any other. The kill records
|
|
375
|
+
* `cancelled by the user` as its reason; it is not one the model requested,
|
|
376
|
+
* so the owning agent still receives the completion notice, and a shell
|
|
377
|
+
* tool waiting on that job reads the reason in its own result.
|
|
378
|
+
* @param request - Session whose job list carries the job, and the job id.
|
|
379
|
+
* @returns the registry's admission of the kill request.
|
|
380
|
+
*/
|
|
381
|
+
@Remote('kill') kill(request: JobKillRequest): JobKillValue
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Source: [`packages/api/job-controller/src/index.ts`](../../packages/api/job-controller/src/index.ts)
|
|
385
|
+
|
|
167
386
|
<a id="ctxjobs--jobregistry-abstract-seam"></a>
|
|
168
387
|
|
|
169
388
|
### `ctx.jobs` — `JobRegistry` (abstract seam)
|
|
170
389
|
|
|
171
|
-
Abstract background job registry. Subclass, implement the abstract
|
|
390
|
+
Abstract background job registry. Subclass, implement the abstract members, and load the subclass as a plugin — it registers as `ctx.jobs` (one implementation per context; loading a second throws, which is cordis' standard duplicate-service behavior).
|
|
172
391
|
|
|
173
392
|
Implementations must honor these semantics:
|
|
174
393
|
|
|
175
|
-
- Registrations outlive producer and controller fibers. Owner and service disposal cancel live work and await compliant producers; a throwing teardown cancel force-fails only the record.
|
|
394
|
+
- Registrations outlive producer and controller fibers. Owner and service disposal cancel live work and await compliant producers; a throwing teardown cancel force-fails only the record. Such settlements announce `cause: 'teardown'`, because a job whose owner is being destroyed has no reader left.
|
|
176
395
|
- Owned-job access is fenced by the owner's session id. Ids are predictable, so authorization — not secrecy — is the boundary.
|
|
177
|
-
- Settlement is first-wins: one terminal record, released waiters,
|
|
178
|
-
-
|
|
396
|
+
- Settlement is first-wins: one terminal record, released waiters, then one round of contained event delivery, even against a late producer outcome. The `settled` event follows every released waiter and reports whether it released one (`awaited`), so a completion reporter can skip settlements a waiting caller already collected.
|
|
397
|
+
- A settled record stays listed until its owner's disposal, service disposal, or an explicit remove by a caller that collected the terminal state itself and never handed the id out.
|
|
398
|
+
- start refuses work while no attached job controller serves the spec's owner, so a producer cannot start work that owner cannot collect or stop. One registry serves every composition in the process, so this question — and event delivery under `{ owners: 'scope' }` — is owner-relative rather than process-wide: registrations made from an unscoped context serve every owner, and registrations made under an agent composition's scope serve exactly the agents composed under it.
|
|
399
|
+
- Every job owns one output ring. Pull sources named by the spec are pumped by the registry and drained once more before settlement; pushed appends land whole. The model's consuming cursor and observers' absolute offsets read the same bytes and never disturb each other.
|
|
400
|
+
- Ring retention is bounded. Appends past the live cap drop the oldest retained bytes; a reader below the retained window gets a lossy read, never an error. Settlement trims retention to the settled cap and ends the stream; the ring has no separate lifecycle.
|
|
179
401
|
|
|
180
402
|
```ts cordis-catalog
|
|
181
403
|
/**
|
|
@@ -183,96 +405,83 @@ Implementations must honor these semantics:
|
|
|
183
405
|
* admission before starting and atomically registering work. Any preflight
|
|
184
406
|
* rejection leaves no job id or execution resource. A throwing starter
|
|
185
407
|
* leaves nothing registered; after it returns, registration cannot fail.
|
|
186
|
-
*
|
|
187
|
-
* @param spec - job identity, owner, and synchronous starter.
|
|
408
|
+
* @param spec - job identity, owner, output sources, and synchronous starter.
|
|
188
409
|
* @returns the registry-issued `<kind>-N` id.
|
|
189
410
|
*/
|
|
190
|
-
abstract start(spec:
|
|
411
|
+
abstract start(spec: JobSpec): JobId
|
|
191
412
|
|
|
192
413
|
/**
|
|
193
|
-
* List caller-owned and unowned jobs in registration order
|
|
194
|
-
*
|
|
195
|
-
* @
|
|
196
|
-
* @returns fresh snapshots.
|
|
414
|
+
* List caller-owned and unowned jobs in registration order.
|
|
415
|
+
* @param caller - reading session; omission sees only unowned jobs.
|
|
416
|
+
* @returns fresh projections.
|
|
197
417
|
*/
|
|
198
|
-
abstract list(caller?:
|
|
418
|
+
abstract list(caller?: SessionId): JobView[]
|
|
199
419
|
|
|
200
420
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
421
|
+
* Project one job without changing its cursor. Throws for an unknown or
|
|
422
|
+
* foreign job.
|
|
203
423
|
* @param id - job to look up.
|
|
204
|
-
* @param caller - reading
|
|
205
|
-
* @returns a fresh
|
|
424
|
+
* @param caller - reading session checked against the owner.
|
|
425
|
+
* @returns a fresh projection.
|
|
206
426
|
*/
|
|
207
|
-
abstract get(id: JobId, caller?:
|
|
427
|
+
abstract get(id: JobId, caller?: SessionId): JobView
|
|
208
428
|
|
|
209
429
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* job.
|
|
430
|
+
* Consume the ring from the model cursor and advance it to the current
|
|
431
|
+
* total. After settlement the first read also carries the producer's
|
|
432
|
+
* result. Throws for an unknown or foreign job.
|
|
213
433
|
* @param id - job to read.
|
|
214
|
-
* @param caller - reading
|
|
215
|
-
* @returns
|
|
434
|
+
* @param caller - reading session checked against the owner.
|
|
435
|
+
* @returns the chunks since the cursor, the lossy flag, the result once, and the post-read projection.
|
|
216
436
|
*/
|
|
217
|
-
abstract read(id: JobId, caller?:
|
|
437
|
+
abstract read(id: JobId, caller?: SessionId): JobRead
|
|
218
438
|
|
|
219
439
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
440
|
+
* Read retained ring output without moving the model cursor. Resume with
|
|
441
|
+
* a previous read's `next`; an offset inside a retained chunk returns the
|
|
442
|
+
* whole chunk (its `at` may precede `from`). Throws for a negative or
|
|
443
|
+
* non-integer offset, or an unknown or foreign job.
|
|
444
|
+
* @param id - job to read.
|
|
445
|
+
* @param from - absolute byte offset to read from (0 for the retained head).
|
|
446
|
+
* @param caller - reading session checked against the owner.
|
|
447
|
+
* @returns retained chunks overlapping `[from, total)`, the resume offset, and the lossy flag.
|
|
448
|
+
*/
|
|
449
|
+
abstract readAt(id: JobId, from: number, caller?: SessionId): JobOutputRead
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Request cancellation, then mark the job stopping. A producer throw
|
|
453
|
+
* propagates without changing job state. A supplied reason is merged into
|
|
454
|
+
* terminal `detail` when the job settles `killed`. Throws for an unknown
|
|
455
|
+
* or foreign job.
|
|
223
456
|
* @param id - job to cancel.
|
|
224
|
-
* @param caller - killing
|
|
225
|
-
* @param reason -
|
|
457
|
+
* @param caller - killing session checked against the owner.
|
|
458
|
+
* @param reason - cancellation reason forwarded verbatim to the producer.
|
|
226
459
|
* @returns `requested` for live work, otherwise `already-finished`.
|
|
227
460
|
*/
|
|
228
|
-
abstract kill(id: JobId, caller?:
|
|
461
|
+
abstract kill(id: JobId, caller?: SessionId, reason?: string): 'requested' | 'already-finished'
|
|
229
462
|
|
|
230
463
|
/**
|
|
231
464
|
* Wait for settlement or timeout without cancelling the job. Caller abort
|
|
232
465
|
* rejects only while the job is live; after settlement the terminal
|
|
233
|
-
*
|
|
234
|
-
*
|
|
466
|
+
* projection wins. Rejects for an invalid timeout or an unknown or foreign
|
|
467
|
+
* job.
|
|
235
468
|
* @param id - job to wait for.
|
|
236
469
|
* @param timeoutMs - positive finite wait bound in milliseconds.
|
|
237
|
-
* @param caller - waiting
|
|
470
|
+
* @param caller - waiting session checked against the owner.
|
|
238
471
|
* @param signal - optional cancellation of the wait itself.
|
|
239
|
-
* @returns
|
|
240
|
-
*/
|
|
241
|
-
abstract wait(id: JobId, timeoutMs: number, caller?: Agent, signal?: AbortSignal): Promise<JobSnapshot>
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Register an effect-scoped completion listener. It receives the settlements
|
|
245
|
-
* of the owners its registering context's scope covers; each listener is
|
|
246
|
-
* contained; returned promises are observed but not awaited. No listener runs
|
|
247
|
-
* after service disposal.
|
|
248
|
-
* @param listener - receives each terminal snapshot and its exact owner.
|
|
249
|
-
* @returns disposer that unregisters the listener.
|
|
472
|
+
* @returns projection at settlement or timeout.
|
|
250
473
|
*/
|
|
251
|
-
abstract
|
|
474
|
+
abstract wait(id: JobId, timeoutMs: number, caller?: SessionId, signal?: AbortSignal): Promise<JobView>
|
|
252
475
|
|
|
253
476
|
/**
|
|
254
|
-
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* re-reads rather than accumulating deltas.
|
|
261
|
-
*
|
|
262
|
-
* Delivery is owner-relative on the same terms as {@link onJobDone}: an
|
|
263
|
-
* observer registered from an unscoped context — a host composition's own
|
|
264
|
-
* carrier — sees every owner, while one registered under an agent
|
|
265
|
-
* composition's scope sees exactly the agents composed under it.
|
|
266
|
-
*
|
|
267
|
-
* This is not a superset of {@link onJobDone}: that one delivers the terminal
|
|
268
|
-
* record under first-wins semantics a job controller couples to notice
|
|
269
|
-
* delivery, while this one carries no delivery meaning and marks nothing
|
|
270
|
-
* reported. Listeners are contained and never awaited.
|
|
271
|
-
* @param listener - receives the owner whose visible set changed, or
|
|
272
|
-
* `undefined` when an unowned job changed and every caller's set did.
|
|
273
|
-
* @returns disposer that unregisters the listener.
|
|
477
|
+
* Drop one settled job's record from the visible set and announce
|
|
478
|
+
* `removed`. For a caller that collected the terminal state through its own
|
|
479
|
+
* {@link wait} and never handed the id to the model, such as a shell tool's
|
|
480
|
+
* foreground call. Throws for a job that is still live, unknown, or foreign.
|
|
481
|
+
* @param id - settled job to drop.
|
|
482
|
+
* @param caller - removing session checked against the owner.
|
|
274
483
|
*/
|
|
275
|
-
abstract
|
|
484
|
+
abstract remove(id: JobId, caller?: SessionId): void
|
|
276
485
|
|
|
277
486
|
/**
|
|
278
487
|
* Attach an effect-scoped controller that can read and stop jobs. It serves the
|
|
@@ -284,7 +493,7 @@ abstract onJobsChanged(listener: JobsChangedListener): () => void
|
|
|
284
493
|
abstract attachController(name: string): () => void
|
|
285
494
|
```
|
|
286
495
|
|
|
287
|
-
Types: [
|
|
496
|
+
Types: [SessionId](core.md)
|
|
288
497
|
|
|
289
498
|
Source: [`packages/jobs/jobs/src/index.ts`](../../packages/jobs/jobs/src/index.ts)
|
|
290
499
|
<!-- END GENERATED cordis-surface -->
|