dsh-plugin-dev-kb 1.0.3 → 1.0.4
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 +31 -0
- package/kb/README.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +3 -3
- package/kb/extra/cookbook/maintaining-dsh-code-review.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/defensive-patterns.zh.md +3 -1
- package/kb/extra/development.zh.md +15 -9
- package/kb/extra/event-producer-consumer.md +5 -2
- package/kb/extra/event-producer-consumer.zh.md +5 -2
- package/kb/extra/graph-atlas.zh.md +7 -7
- package/kb/extra/i18n/README.md +3 -3
- package/kb/extra/i18n/README.zh.md +9 -7
- package/kb/extra/i18n/style-samples.md +1 -1
- package/kb/extra/i18n/translation-prompt.md +3 -3
- package/kb/extra/i18n/translation-rules.md +2 -2
- package/kb/extra/i18n/translation-rules.zh.md +3 -3
- package/kb/extra/module-graph.md +18 -9
- package/kb/extra/module-graph.zh.md +18 -9
- package/kb/extra/postmortem/0001-acp-default-export-drops-inject.zh.md +1 -1
- package/kb/extra/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +1 -1
- package/kb/extra/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +1 -1
- package/kb/extra/postmortem/README.zh.md +5 -5
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/subsystems/agent-team.md +2 -2
- package/kb/extra/subsystems/agent-team.zh.md +6 -6
- package/kb/extra/subsystems/attachment.md +63 -12
- package/kb/extra/subsystems/attachment.zh.md +63 -12
- package/kb/extra/subsystems/extensions.md +9 -9
- package/kb/extra/subsystems/extensions.zh.md +12 -12
- package/kb/extra/subsystems/feedback.md +2 -2
- package/kb/extra/subsystems/feedback.zh.md +2 -2
- package/kb/extra/testing.md +1 -1
- package/kb/extra/testing.zh.md +7 -7
- package/kb/extra/web-styling.zh.md +2 -2
- package/kb/meta/search-index.json +132 -132
- package/kb/meta/source.json +2 -2
- package/kb/site/develop/basic/index.md +1 -1
- package/kb/site/develop/basic/publish.md +3 -3
- package/kb/site/develop/cordis-tutorial/index.md +1 -1
- package/kb/site/en/reference/capability-seams.md +5 -0
- package/kb/site/en/reference/config-catalog.md +52 -17
- package/kb/site/en/reference/persistence-catalog.md +1 -1
- package/kb/site/en/reference/subsystems/approval.md +3 -3
- package/kb/site/en/reference/subsystems/client-modules.md +7 -7
- package/kb/site/en/reference/subsystems/code-runtime.md +2 -2
- package/kb/site/en/reference/subsystems/commands.md +3 -3
- package/kb/site/en/reference/subsystems/compaction.md +3 -3
- package/kb/site/en/reference/subsystems/core.md +19 -19
- package/kb/site/en/reference/subsystems/credentials.md +163 -8
- package/kb/site/en/reference/subsystems/filesystem.md +5 -5
- package/kb/site/en/reference/subsystems/goal.md +3 -3
- package/kb/site/en/reference/subsystems/invariants.md +2 -2
- package/kb/site/en/reference/subsystems/jobs.md +2 -2
- package/kb/site/en/reference/subsystems/llm-streaming.md +16 -4
- package/kb/site/en/reference/subsystems/lsp.md +2 -2
- package/kb/site/en/reference/subsystems/permission-presets.md +2 -2
- package/kb/site/en/reference/subsystems/persistence.md +2 -2
- package/kb/site/en/reference/subsystems/plan.md +2 -2
- package/kb/site/en/reference/subsystems/sandbox.md +3 -3
- package/kb/site/en/reference/subsystems/session-projection.md +60 -35
- package/kb/site/en/reference/subsystems/session-query.md +2 -2
- package/kb/site/en/reference/subsystems/session-reference.md +3 -3
- package/kb/site/en/reference/subsystems/session-telemetry.md +3 -3
- package/kb/site/en/reference/subsystems/session-title.md +2 -2
- package/kb/site/en/reference/subsystems/session.md +6 -6
- package/kb/site/en/reference/subsystems/settings.md +4 -4
- package/kb/site/en/reference/subsystems/shell.md +3 -3
- package/kb/site/en/reference/subsystems/skills.md +3 -3
- package/kb/site/en/reference/subsystems/spill.md +2 -2
- package/kb/site/en/reference/subsystems/storage.md +4 -4
- package/kb/site/en/reference/subsystems/subagent.md +6 -6
- package/kb/site/en/reference/subsystems/subprocess.md +3 -3
- package/kb/site/en/reference/subsystems/system-prompt.md +4 -4
- package/kb/site/en/reference/subsystems/terminal.md +2 -2
- package/kb/site/en/reference/subsystems/token-meter.md +2 -2
- package/kb/site/en/reference/subsystems/tools.md +8 -8
- package/kb/site/en/reference/subsystems/typert.md +4 -4
- package/kb/site/en/reference/subsystems/user-questions.md +2 -2
- package/kb/site/en/reference/subsystems/web-server.md +46 -6
- package/kb/site/en/reference/subsystems/web.md +2 -2
- package/kb/site/en/reference/subsystems/workflow.md +8 -8
- package/kb/site/en/reference/subsystems/workspace.md +3 -3
- package/kb/site/en/reference/tool-catalog.md +3 -3
- package/kb/site/guide/providers.md +2 -2
- package/kb/site/guide/python-sdk.md +2 -2
- package/kb/site/guide/quickstart.md +2 -2
- package/kb/site/reference/capability-seams.md +5 -0
- package/kb/site/reference/config-catalog.md +53 -18
- package/kb/site/reference/cookbook/adding-a-conversation-node.md +1 -1
- package/kb/site/reference/cookbook/adding-a-package.md +5 -3
- package/kb/site/reference/cookbook/adding-a-settings-card.md +1 -1
- package/kb/site/reference/cookbook/adding-a-tool.md +6 -6
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +2 -2
- package/kb/site/reference/cookbook/extension-cookbook.md +6 -4
- package/kb/site/reference/index.md +4 -4
- package/kb/site/reference/persistence-catalog.md +5 -5
- package/kb/site/reference/subsystems/approval.md +3 -3
- package/kb/site/reference/subsystems/client-modules.md +8 -8
- package/kb/site/reference/subsystems/code-runtime.md +4 -4
- package/kb/site/reference/subsystems/commands.md +5 -5
- package/kb/site/reference/subsystems/compaction.md +7 -7
- package/kb/site/reference/subsystems/core.md +26 -24
- package/kb/site/reference/subsystems/credentials.md +163 -8
- package/kb/site/reference/subsystems/filesystem.md +6 -6
- package/kb/site/reference/subsystems/goal.md +5 -5
- package/kb/site/reference/subsystems/index.md +5 -5
- package/kb/site/reference/subsystems/invariants.md +5 -5
- package/kb/site/reference/subsystems/jobs.md +4 -4
- package/kb/site/reference/subsystems/llm-streaming.md +21 -9
- package/kb/site/reference/subsystems/lsp.md +3 -3
- package/kb/site/reference/subsystems/permission-presets.md +3 -3
- package/kb/site/reference/subsystems/persistence.md +6 -6
- package/kb/site/reference/subsystems/plan.md +4 -4
- package/kb/site/reference/subsystems/sandbox.md +7 -5
- package/kb/site/reference/subsystems/schedule.md +1 -1
- package/kb/site/reference/subsystems/scope.md +1 -1
- package/kb/site/reference/subsystems/session-projection.md +61 -36
- package/kb/site/reference/subsystems/session-query.md +2 -2
- package/kb/site/reference/subsystems/session-reference.md +3 -3
- package/kb/site/reference/subsystems/session-telemetry.md +5 -5
- package/kb/site/reference/subsystems/session-title.md +2 -2
- package/kb/site/reference/subsystems/session.md +13 -11
- package/kb/site/reference/subsystems/settings.md +4 -4
- package/kb/site/reference/subsystems/shell.md +6 -6
- package/kb/site/reference/subsystems/skills.md +3 -3
- package/kb/site/reference/subsystems/spill.md +3 -3
- package/kb/site/reference/subsystems/storage.md +7 -7
- package/kb/site/reference/subsystems/subagent.md +11 -9
- package/kb/site/reference/subsystems/subprocess.md +4 -4
- package/kb/site/reference/subsystems/system-prompt.md +5 -5
- package/kb/site/reference/subsystems/terminal.md +3 -3
- package/kb/site/reference/subsystems/token-meter.md +2 -2
- package/kb/site/reference/subsystems/tools.md +9 -9
- package/kb/site/reference/subsystems/typert.md +5 -5
- package/kb/site/reference/subsystems/user-questions.md +2 -2
- package/kb/site/reference/subsystems/web-server.md +48 -8
- package/kb/site/reference/subsystems/web.md +3 -3
- package/kb/site/reference/subsystems/workflow.md +11 -11
- package/kb/site/reference/subsystems/workspace.md +5 -5
- package/kb/site/reference/tool-catalog.md +9 -5
- package/package.json +2 -1
|
@@ -50,7 +50,7 @@ interface CredentialInfo {
|
|
|
50
50
|
|
|
51
51
|
## Change commits
|
|
52
52
|
|
|
53
|
-
`credentials/updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
|
|
53
|
+
`credentials/reference-updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
|
|
54
54
|
|
|
55
55
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
56
56
|
|
|
@@ -58,13 +58,78 @@ interface CredentialInfo {
|
|
|
58
58
|
|
|
59
59
|
## Cordis API
|
|
60
60
|
|
|
61
|
-
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`) —
|
|
61
|
+
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).
|
|
62
|
+
|
|
63
|
+
<a id="ctxauthorization--authorizationservice"></a>
|
|
64
|
+
|
|
65
|
+
### `ctx.authorization` — `AuthorizationService`
|
|
66
|
+
|
|
67
|
+
`ctx.authorization`: a registry of credential-obtaining flows, one attempt at a time per key.
|
|
68
|
+
|
|
69
|
+
```ts cordis-catalog
|
|
70
|
+
/**
|
|
71
|
+
* Offer a way to obtain one credential. One flow per key: two plugins
|
|
72
|
+
* claiming the same key would each write a record in their own format, and
|
|
73
|
+
* whichever ran last would leave the other reading a payload it cannot parse.
|
|
74
|
+
*
|
|
75
|
+
* @param flow - the key it writes, its label, its methods, and its runner.
|
|
76
|
+
* @returns Disposer that withdraws this flow.
|
|
77
|
+
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
|
|
78
|
+
*/
|
|
79
|
+
registerFlow(flow: AuthorizationFlow): () => void
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Every registered flow, for a surface listing what can be authorized.
|
|
83
|
+
* @returns one entry per flow, in registration order.
|
|
84
|
+
*/
|
|
85
|
+
list(): readonly AuthorizationEntry[]
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* One registered flow.
|
|
89
|
+
* @param key - the credential record to ask about.
|
|
90
|
+
* @returns the entry, or undefined when no flow claims that key.
|
|
91
|
+
*/
|
|
92
|
+
describe(key: CredentialKey): AuthorizationEntry | undefined
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Withdraw the attempt running for a key, if any. Separate from the
|
|
96
|
+
* request's own signal because a request/response transport answers a Cancel
|
|
97
|
+
* button on a second call, with no handle on the first one's signal.
|
|
98
|
+
* @param key - the credential record whose attempt should stop.
|
|
99
|
+
*/
|
|
100
|
+
cancel(key: CredentialKey): void
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Run one attempt to authorize a key, and report how it ended.
|
|
104
|
+
*
|
|
105
|
+
* One attempt per key at a time. A second caller is refused rather than
|
|
106
|
+
* joined: the two would be prompting different humans through the same flow,
|
|
107
|
+
* and the second would answer questions the first was asked.
|
|
108
|
+
*
|
|
109
|
+
* @param request - the key, the method, the surface, and the cancel signal.
|
|
110
|
+
* @returns `authorized` once the flow's record is committed during this
|
|
111
|
+
* attempt and observed, or `cancelled` when the human declined or the
|
|
112
|
+
* caller withdrew.
|
|
113
|
+
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
|
|
114
|
+
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
|
|
115
|
+
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
|
|
116
|
+
* `NOT_COMMITTED` when the flow resolved without committing a record
|
|
117
|
+
* during the attempt.
|
|
118
|
+
*/
|
|
119
|
+
async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Source: [`packages/credentials/authorization/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/authorization/src/index.ts)
|
|
62
123
|
|
|
63
124
|
<a id="ctxcredentials--credentialprovider-abstract-seam"></a>
|
|
64
125
|
|
|
65
126
|
### `ctx.credentials` — `CredentialProvider` (abstract seam)
|
|
66
127
|
|
|
67
|
-
Abstract credential service
|
|
128
|
+
Abstract credential service over two key spaces that answer two questions.
|
|
129
|
+
|
|
130
|
+
A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
|
|
131
|
+
|
|
132
|
+
A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
|
|
68
133
|
|
|
69
134
|
```ts cordis-catalog
|
|
70
135
|
/**
|
|
@@ -102,17 +167,107 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
|
|
|
102
167
|
* @param ref - the reference to remove.
|
|
103
168
|
*/
|
|
104
169
|
abstract unset(ref: CredentialRef): Promise<void>
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Read one stored record. The value is returned as its owner wrote it; a
|
|
173
|
+
* {@link GrantRecord} payload is not interpreted on the way out.
|
|
174
|
+
* @param key - the record to read.
|
|
175
|
+
* @returns the record, or `undefined` while none is stored.
|
|
176
|
+
*/
|
|
177
|
+
abstract readRecord(key: CredentialKey): Promise<CredentialRecord | undefined>
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Describe one record for configuration surfaces without exposing its value.
|
|
181
|
+
* @param key - the record to describe.
|
|
182
|
+
* @returns presence, discriminant, and writability.
|
|
183
|
+
*/
|
|
184
|
+
abstract describeRecord(key: CredentialKey): Promise<CredentialRecordInfo>
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Enumerate every stored record's address and tag. Unlike the reference
|
|
188
|
+
* half, which has no enumeration because configuration surfaces learn which
|
|
189
|
+
* references exist from settings schemas, records have no such discovery
|
|
190
|
+
* path: a surface that cannot list them cannot show what a user is
|
|
191
|
+
* authorized for, nor find an orphan left by an uninstalled plugin.
|
|
192
|
+
* @returns every stored record, values excluded.
|
|
193
|
+
*/
|
|
194
|
+
abstract listRecords(): Promise<readonly CredentialRecordEntry[]>
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Serialized read-modify-write over one record — the only write path.
|
|
198
|
+
* `mutate` sees the record as it stands at the moment the write is
|
|
199
|
+
* exclusive, and returning `undefined` leaves the entry untouched. Exclusion
|
|
200
|
+
* holds across processes where the backing store supports it, which is what
|
|
201
|
+
* makes a token refresh safe: two processes rotating one refresh token
|
|
202
|
+
* concurrently would otherwise lose whichever wrote first.
|
|
203
|
+
* @param key - the record to modify.
|
|
204
|
+
* @param mutate - receives the current record and returns its replacement, or `undefined` to leave it.
|
|
205
|
+
* @returns the record after the write, or the current one when `mutate` declined.
|
|
206
|
+
*/
|
|
207
|
+
abstract modifyRecord( key: CredentialKey, mutate: (current: CredentialRecord | undefined) => Promise<CredentialRecord | undefined>, ): Promise<CredentialRecord | undefined>
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Remove one record; removing an absent record is a no-op.
|
|
211
|
+
* @param key - the record to remove.
|
|
212
|
+
*/
|
|
213
|
+
abstract deleteRecord(key: CredentialKey): Promise<void>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Source: [`packages/credentials/credentials/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials/src/index.ts)
|
|
217
|
+
|
|
218
|
+
<a id="authorization-events"></a>
|
|
219
|
+
|
|
220
|
+
### `authorization/*` events
|
|
221
|
+
|
|
222
|
+
<a id="authorizationsettled--emit"></a>
|
|
223
|
+
|
|
224
|
+
#### `authorization/settled` — emit
|
|
225
|
+
|
|
226
|
+
One authorization attempt has finished and released its key. Fires for every terminal outcome, failures included, so a surface watching a key it did not start (a second browser tab) learns the attempt is over.
|
|
227
|
+
|
|
228
|
+
```ts cordis-catalog
|
|
229
|
+
/**
|
|
230
|
+
* One authorization attempt has finished and released its key. Fires for
|
|
231
|
+
* every terminal outcome, failures included, so a surface watching a key it
|
|
232
|
+
* did not start (a second browser tab) learns the attempt is over.
|
|
233
|
+
* @mode emit
|
|
234
|
+
* @param key - the credential record the finished attempt was authorizing.
|
|
235
|
+
* @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
|
|
236
|
+
*/
|
|
237
|
+
'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void
|
|
105
238
|
```
|
|
106
239
|
|
|
107
|
-
Source: [`packages/credentials/
|
|
240
|
+
Source: [`packages/credentials/authorization/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/authorization/src/index.ts)
|
|
108
241
|
|
|
109
242
|
<a id="credentials-events"></a>
|
|
110
243
|
|
|
111
244
|
### `credentials/*` events
|
|
112
245
|
|
|
113
|
-
<a id="
|
|
246
|
+
<a id="credentialsrecord-updated--emit"></a>
|
|
247
|
+
|
|
248
|
+
#### `credentials/record-updated` — emit
|
|
249
|
+
|
|
250
|
+
Committed change to a stored credential record: a `modifyRecord` that wrote, a `deleteRecord` that removed, or an external edit observed in storage. Separate from `credentials/reference-updated` because the two key grammars are disjoint — a listener that received both on one event could not tell which space a subject belongs to. Listener failures are contained on the same terms as `credentials/reference-updated`.
|
|
251
|
+
|
|
252
|
+
```ts cordis-catalog
|
|
253
|
+
/**
|
|
254
|
+
* Committed change to a stored credential record: a `modifyRecord` that
|
|
255
|
+
* wrote, a `deleteRecord` that removed, or an external edit observed in
|
|
256
|
+
* storage. Separate from `credentials/reference-updated` because the two key
|
|
257
|
+
* grammars are disjoint — a listener that received both on one event could
|
|
258
|
+
* not tell which space a subject belongs to. Listener failures are
|
|
259
|
+
* contained on the same terms as `credentials/reference-updated`.
|
|
260
|
+
* @param key - the record whose stored value changed.
|
|
261
|
+
* @mode emit
|
|
262
|
+
*/
|
|
263
|
+
'credentials/record-updated'(key: CredentialKey): void
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Source: [`packages/credentials/credentials/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials/src/types.ts)
|
|
267
|
+
|
|
268
|
+
<a id="credentialsreference-updated--emit"></a>
|
|
114
269
|
|
|
115
|
-
#### `credentials/updated` — emit
|
|
270
|
+
#### `credentials/reference-updated` — emit
|
|
116
271
|
|
|
117
272
|
Committed change to a provider-managed credential source: a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Listener failures are contained and logged — a sync throw and an async rejection alike — without changing the committed operation's outcome, except `INVARIANT`-coded failures, which rethrow after every listener ran; that rethrow reaches the emitter only from synchronous listeners, so invariant checks on this event must not be async functions.
|
|
118
273
|
|
|
@@ -129,8 +284,8 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
|
|
|
129
284
|
* @param ref - the reference whose stored value changed.
|
|
130
285
|
* @mode emit
|
|
131
286
|
*/
|
|
132
|
-
'credentials/updated'(ref: CredentialRef): void
|
|
287
|
+
'credentials/reference-updated'(ref: CredentialRef): void
|
|
133
288
|
```
|
|
134
289
|
|
|
135
|
-
Source: [`packages/credentials/credentials/src/types.ts
|
|
290
|
+
Source: [`packages/credentials/credentials/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials/src/types.ts)
|
|
136
291
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -286,7 +286,7 @@ type FsErrorCode =
|
|
|
286
286
|
|
|
287
287
|
## Cordis API
|
|
288
288
|
|
|
289
|
-
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`) —
|
|
289
|
+
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).
|
|
290
290
|
|
|
291
291
|
<a id="ctxfs--filesystem-abstract-seam"></a>
|
|
292
292
|
|
|
@@ -430,7 +430,7 @@ abstract editText( target: FsTarget, edit: FsEditRequest, expected?: { version:
|
|
|
430
430
|
|
|
431
431
|
Types: [SandboxExecutionPolicy](./sandbox.md)
|
|
432
432
|
|
|
433
|
-
Source: [`packages/fs/fs/src/index.ts
|
|
433
|
+
Source: [`packages/fs/fs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/fs/src/index.ts)
|
|
434
434
|
|
|
435
435
|
<a id="fs-events"></a>
|
|
436
436
|
|
|
@@ -453,7 +453,7 @@ Single-slot decision for the next FileSystem.editText. Calling `next()` yields a
|
|
|
453
453
|
'fs/edit-intent'(target: FsTarget, actor: object | undefined, next: () => { version: FsVersion } | undefined | Promise<{ version: FsVersion } | undefined>): Promise<{ version: FsVersion } | undefined>
|
|
454
454
|
```
|
|
455
455
|
|
|
456
|
-
Source: [`packages/fs/fs/src/index.ts
|
|
456
|
+
Source: [`packages/fs/fs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/fs/src/index.ts)
|
|
457
457
|
|
|
458
458
|
<a id="fsobserved--emit"></a>
|
|
459
459
|
|
|
@@ -474,7 +474,7 @@ Record an authoritative positive or negative observation. Listeners must be sync
|
|
|
474
474
|
'fs/observed'(target: FsTarget, observation: FsObservation, actor: object | undefined): void
|
|
475
475
|
```
|
|
476
476
|
|
|
477
|
-
Source: [`packages/fs/fs/src/index.ts
|
|
477
|
+
Source: [`packages/fs/fs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/fs/src/index.ts)
|
|
478
478
|
|
|
479
479
|
<a id="fswrite-intent--waterfall"></a>
|
|
480
480
|
|
|
@@ -494,5 +494,5 @@ Single-slot decision for the next FileSystem.writeText. Calling `next()` yields
|
|
|
494
494
|
'fs/write-intent'(target: FsTarget, actor: object | undefined, next: () => FsWriteIntent | undefined | Promise<FsWriteIntent | undefined>): Promise<FsWriteIntent | undefined>
|
|
495
495
|
```
|
|
496
496
|
|
|
497
|
-
Source: [`packages/fs/fs/src/index.ts
|
|
497
|
+
Source: [`packages/fs/fs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/fs/src/index.ts)
|
|
498
498
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -153,7 +153,7 @@ interface GoalChanged {
|
|
|
153
153
|
|
|
154
154
|
## Cordis API
|
|
155
155
|
|
|
156
|
-
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`) —
|
|
156
|
+
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).
|
|
157
157
|
|
|
158
158
|
<a id="ctxgoals--goalservice"></a>
|
|
159
159
|
|
|
@@ -250,7 +250,7 @@ block(agent: Agent, ref: GoalRef, reason: GoalBlockReason): GoalView
|
|
|
250
250
|
|
|
251
251
|
Types: [Agent](./core.md)
|
|
252
252
|
|
|
253
|
-
Source: [`packages/goal/goal/src/index.ts
|
|
253
|
+
Source: [`packages/goal/goal/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/goal/goal/src/index.ts)
|
|
254
254
|
|
|
255
255
|
<a id="goal-events"></a>
|
|
256
256
|
|
|
@@ -276,5 +276,5 @@ Goal mutation accepted by one live agent. The matching `goal/change` session eve
|
|
|
276
276
|
|
|
277
277
|
Types: [Agent](./core.md) · [Scoped](./scope.md)
|
|
278
278
|
|
|
279
|
-
Source: [`packages/goal/goal/src/domain.ts
|
|
279
|
+
Source: [`packages/goal/goal/src/domain.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/goal/goal/src/domain.ts)
|
|
280
280
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -67,7 +67,7 @@ Every workspace package owns a `./invariant` companion ([package contract](https
|
|
|
67
67
|
|
|
68
68
|
## Cordis API
|
|
69
69
|
|
|
70
|
-
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`) —
|
|
70
|
+
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).
|
|
71
71
|
|
|
72
72
|
<a id="ctxinvariants--invariantregistry"></a>
|
|
73
73
|
|
|
@@ -87,5 +87,5 @@ Package-owned invariant registry with global and regex-based selection.
|
|
|
87
87
|
register(packageName: string, installer: InvariantInstaller): () => void
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Source: [`packages/runtime-diagnostics/invariants/src/index.ts
|
|
90
|
+
Source: [`packages/runtime-diagnostics/invariants/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/runtime-diagnostics/invariants/src/index.ts)
|
|
91
91
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -165,7 +165,7 @@ The abstract [`JobRegistry`](https://github.com/deepseek-ai/deepseek-harness/blo
|
|
|
165
165
|
|
|
166
166
|
## Cordis API
|
|
167
167
|
|
|
168
|
-
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`) —
|
|
168
|
+
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).
|
|
169
169
|
|
|
170
170
|
<a id="ctxjobs--jobregistry-abstract-seam"></a>
|
|
171
171
|
|
|
@@ -289,5 +289,5 @@ abstract attachController(name: string): () => void
|
|
|
289
289
|
|
|
290
290
|
Types: [Agent](./core.md)
|
|
291
291
|
|
|
292
|
-
Source: [`packages/jobs/jobs/src/index.ts
|
|
292
|
+
Source: [`packages/jobs/jobs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/index.ts)
|
|
293
293
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -678,6 +678,8 @@ interface PreparedLlmCall {
|
|
|
678
678
|
readonly retryPolicy: ResolvedRetryPolicy
|
|
679
679
|
/** Detached context metadata resolved with the registration-bound call. */
|
|
680
680
|
readonly context?: LlmModelContext
|
|
681
|
+
/** Exact model modalities captured with the adapter dispatch generation. */
|
|
682
|
+
readonly inputModalities?: readonly ModelModality[]
|
|
681
683
|
/** Config fields materialized by the captured adapter rather than proposed by the caller. */
|
|
682
684
|
readonly adapterDefaults: LlmCallConfigAdapterDefaults
|
|
683
685
|
/**
|
|
@@ -733,6 +735,16 @@ declare abstract class LlmAdapter {
|
|
|
733
735
|
model: string,
|
|
734
736
|
_signal?: AbortSignal,
|
|
735
737
|
): Promise<LlmResolvedModelInfo>;
|
|
738
|
+
/**
|
|
739
|
+
* Bind exact model metadata and the eventual request dispatch to one adapter generation.
|
|
740
|
+
* Dynamic adapters override this so settings changes between preparation and
|
|
741
|
+
* dispatch cannot combine one generation's capabilities with another's endpoint.
|
|
742
|
+
* @param provider - registered provider route.
|
|
743
|
+
* @param model - exact model id.
|
|
744
|
+
* @param signal - cancellation for model resolution.
|
|
745
|
+
* @returns model metadata and a one-generation stream entry point.
|
|
746
|
+
*/
|
|
747
|
+
async prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
736
748
|
/**
|
|
737
749
|
* Stream one model call as raw chunks. The only required method.
|
|
738
750
|
* @param options - the fully-assembled request; implementations must honor `options.signal`.
|
|
@@ -750,7 +762,7 @@ declare abstract class LlmAdapter {
|
|
|
750
762
|
|
|
751
763
|
## Cordis API
|
|
752
764
|
|
|
753
|
-
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`) —
|
|
765
|
+
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).
|
|
754
766
|
|
|
755
767
|
<a id="ctxllm--llmruntime"></a>
|
|
756
768
|
|
|
@@ -876,7 +888,7 @@ async prepareCall(config: LlmCallConfig, signal?: AbortSignal): Promise<Prepared
|
|
|
876
888
|
stream(options: GenerateOptions): AsyncIterable<StreamChunk>
|
|
877
889
|
```
|
|
878
890
|
|
|
879
|
-
Source: [`packages/llm/llm/src/index.ts
|
|
891
|
+
Source: [`packages/llm/llm/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/index.ts)
|
|
880
892
|
|
|
881
893
|
<a id="llm-events"></a>
|
|
882
894
|
|
|
@@ -901,7 +913,7 @@ The provider topology changed: an adapter registered or unregistered routes, or
|
|
|
901
913
|
'llm/adapters-updated'(): void
|
|
902
914
|
```
|
|
903
915
|
|
|
904
|
-
Source: [`packages/llm/llm/src/types.ts
|
|
916
|
+
Source: [`packages/llm/llm/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/types.ts)
|
|
905
917
|
|
|
906
918
|
<a id="llmstream--waterfall"></a>
|
|
907
919
|
|
|
@@ -925,5 +937,5 @@ Waterfall around every streaming model call (retry, replay, routing). Bound to t
|
|
|
925
937
|
'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable<StreamChunk>): AsyncIterable<StreamChunk>
|
|
926
938
|
```
|
|
927
939
|
|
|
928
|
-
Source: [`packages/llm/llm/src/index.ts
|
|
940
|
+
Source: [`packages/llm/llm/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/index.ts)
|
|
929
941
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -173,7 +173,7 @@ interface LspService {
|
|
|
173
173
|
|
|
174
174
|
## Cordis API
|
|
175
175
|
|
|
176
|
-
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`) —
|
|
176
|
+
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).
|
|
177
177
|
|
|
178
178
|
<a id="ctxlsp--lspservice"></a>
|
|
179
179
|
|
|
@@ -201,5 +201,5 @@ registerProvider(provider: LspProvider): () => void
|
|
|
201
201
|
query(request: LspQueryRequest, signal?: AbortSignal): Promise<LspQueryResult>
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
Source: [`packages/lsp/lsp/src/types.ts
|
|
204
|
+
Source: [`packages/lsp/lsp/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/lsp/lsp/src/types.ts)
|
|
205
205
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -76,7 +76,7 @@ interface PresetOption {
|
|
|
76
76
|
|
|
77
77
|
## Cordis API
|
|
78
78
|
|
|
79
|
-
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`) —
|
|
79
|
+
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).
|
|
80
80
|
|
|
81
81
|
<a id="ctxpermissionpresets--permissionpresetservice"></a>
|
|
82
82
|
|
|
@@ -130,5 +130,5 @@ set(session: Session, name: string): void
|
|
|
130
130
|
|
|
131
131
|
Types: [Session](./session.md) · [SessionEvent](./session.md)
|
|
132
132
|
|
|
133
|
-
Source: [`packages/interaction/permission-presets/src/index.ts
|
|
133
|
+
Source: [`packages/interaction/permission-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
|
|
134
134
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -244,7 +244,7 @@ All implement the same abstract `SessionPersistence` (locate/create/append/prepa
|
|
|
244
244
|
|
|
245
245
|
## Cordis API
|
|
246
246
|
|
|
247
|
-
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`) —
|
|
247
|
+
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).
|
|
248
248
|
|
|
249
249
|
<a id="ctxsessionpersistence--sessionpersistence-abstract-seam"></a>
|
|
250
250
|
|
|
@@ -384,5 +384,5 @@ abstract listSnapshots(signal?: AbortSignal): Promise<SessionPersistenceSnapshot
|
|
|
384
384
|
|
|
385
385
|
Types: [SessionEvent](./session.md) · [SessionId](./core.md)
|
|
386
386
|
|
|
387
|
-
Source: [`packages/session/session-persistence/src/index.ts
|
|
387
|
+
Source: [`packages/session/session-persistence/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-persistence/src/index.ts)
|
|
388
388
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -47,7 +47,7 @@ When [`ctx.commands`](./commands.md) is composed, the plugin registers `/plan [o
|
|
|
47
47
|
|
|
48
48
|
## Cordis API
|
|
49
49
|
|
|
50
|
-
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`) —
|
|
50
|
+
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).
|
|
51
51
|
|
|
52
52
|
<a id="ctxplanmode--planmodecontroller"></a>
|
|
53
53
|
|
|
@@ -86,5 +86,5 @@ set(agent: Agent, active: boolean): 'committed' | 'queued' | 'cancelled' | 'noop
|
|
|
86
86
|
|
|
87
87
|
Types: [Agent](./core.md)
|
|
88
88
|
|
|
89
|
-
Source: [`packages/plan/plan-mode/src/index.ts
|
|
89
|
+
Source: [`packages/plan/plan-mode/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/src/index.ts)
|
|
90
90
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -164,7 +164,7 @@ Provider selection, probing, caching, and backend-specific enforcement reports b
|
|
|
164
164
|
|
|
165
165
|
## Cordis API
|
|
166
166
|
|
|
167
|
-
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`) —
|
|
167
|
+
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).
|
|
168
168
|
|
|
169
169
|
<a id="ctxsandbox--sandboxprovider-abstract-seam"></a>
|
|
170
170
|
|
|
@@ -187,7 +187,7 @@ Abstract process-sandbox service. confine must return enforcing argv or fail clo
|
|
|
187
187
|
abstract confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
Source: [`packages/sandbox/sandbox/src/index.ts
|
|
190
|
+
Source: [`packages/sandbox/sandbox/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/sandbox/sandbox/src/index.ts)
|
|
191
191
|
|
|
192
192
|
<a id="ctxsandboxpolicy--sandboxpolicyservice"></a>
|
|
193
193
|
|
|
@@ -217,5 +217,5 @@ overrideOf(session: Session): SandboxMode | undefined
|
|
|
217
217
|
|
|
218
218
|
Types: [Session](./session.md)
|
|
219
219
|
|
|
220
|
-
Source: [`packages/sandbox/sandbox-policy/src/index.ts
|
|
220
|
+
Source: [`packages/sandbox/sandbox-policy/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/sandbox/sandbox-policy/src/index.ts)
|
|
221
221
|
<!-- END GENERATED cordis-surface -->
|