@borgee/agents-host 0.2.44 → 0.2.62

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.
Files changed (65) hide show
  1. package/README.md +24 -27
  2. package/dist/agents-host.d.ts +27 -5
  3. package/dist/agents-host.js +266 -201
  4. package/dist/chat/chat-control-plane.d.ts +3 -0
  5. package/dist/chat/sdk-chat-control-plane.d.ts +4 -3
  6. package/dist/chat/sdk-chat-control-plane.js +3 -0
  7. package/dist/cli.js +1 -5
  8. package/dist/compatibility-gates.d.ts +4 -0
  9. package/dist/compatibility-gates.js +20 -1
  10. package/dist/config.d.ts +2 -0
  11. package/dist/config.js +21 -0
  12. package/dist/context/claude-file-brief.d.ts +2 -0
  13. package/dist/context/claude-file-brief.js +83 -0
  14. package/dist/context/compaction.d.ts +20 -0
  15. package/dist/context/compaction.js +59 -0
  16. package/dist/context/injection.d.ts +58 -7
  17. package/dist/context/injection.js +370 -36
  18. package/dist/context/main-session-delegation.d.ts +1 -1
  19. package/dist/context/projection-strategy.d.ts +24 -0
  20. package/dist/context/projection-strategy.js +90 -0
  21. package/dist/context/prompt.d.ts +16 -1
  22. package/dist/context/prompt.js +464 -26
  23. package/dist/context/resolved-workspace.d.ts +3 -0
  24. package/dist/context/resolved-workspace.js +106 -0
  25. package/dist/context/skill-manual.d.ts +1 -0
  26. package/dist/context/skill-manual.js +4 -1
  27. package/dist/context/turn-preparation.d.ts +8 -2
  28. package/dist/context/turn-preparation.js +64 -14
  29. package/dist/gateway/localhost-gateway.js +4 -5
  30. package/dist/local-config.js +11 -1
  31. package/dist/managed-daemon.js +127 -9
  32. package/dist/plugin-sdk.js +264 -364
  33. package/dist/plugin-sdk.js.map +4 -4
  34. package/dist/policy/copilot-permission.d.ts +1 -0
  35. package/dist/policy/copilot-permission.js +18 -0
  36. package/dist/policy/gateway-authorization.js +2 -2
  37. package/dist/progress-to-activity.d.ts +16 -0
  38. package/dist/progress-to-activity.js +24 -0
  39. package/dist/projection-strategy-values.d.ts +4 -0
  40. package/dist/projection-strategy-values.js +28 -0
  41. package/dist/providers/acp-progress-collector.d.ts +44 -0
  42. package/dist/providers/acp-progress-collector.js +130 -0
  43. package/dist/providers/awaiting-user.d.ts +2 -3
  44. package/dist/providers/awaiting-user.js +5 -7
  45. package/dist/providers/claude/activity-metadata.d.ts +14 -0
  46. package/dist/providers/claude/activity-metadata.js +81 -0
  47. package/dist/providers/claude/cli-client.d.ts +2 -3
  48. package/dist/providers/claude/cli-client.js +220 -120
  49. package/dist/providers/codex/cli-client.d.ts +2 -0
  50. package/dist/providers/codex/cli-client.js +28 -104
  51. package/dist/providers/codex/project-doc.js +12 -11
  52. package/dist/providers/copilot/cli-client.d.ts +1 -1
  53. package/dist/providers/copilot/cli-client.js +12 -86
  54. package/dist/providers/create-provider.d.ts +2 -0
  55. package/dist/providers/create-provider.js +22 -4
  56. package/dist/state-paths.d.ts +1 -1
  57. package/dist/state-paths.js +3 -3
  58. package/dist/task-thread-resolution.d.ts +3 -2
  59. package/dist/types.d.ts +143 -6
  60. package/package.json +2 -2
  61. package/skills/borgee-agent/SKILL.md +12 -4
  62. package/skills/borgee-agent/references/errors.md +2 -2
  63. package/skills/borgee-agent/references/task-properties.md +6 -2
  64. package/dist/durable-cursor-store.d.ts +0 -5
  65. package/dist/durable-cursor-store.js +0 -7
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type ProviderKind = 'claude' | 'codex' | 'copilot';
2
+ export type ProjectionStrategy = 'session-brief' | 'turn-full' | 'message-only' | 'turn-thin' | 'file-brief';
2
3
  export interface ProviderCommandConfig {
3
4
  claudeCommand: string;
4
5
  claudeArgs: string[];
@@ -9,6 +10,12 @@ export interface ProviderCommandConfig {
9
10
  copilotSessionTtlMinutes: number;
10
11
  /** Minutes a provider's shared ACP adapter process may stay idle before it is shut down; `0` keeps it resident. */
11
12
  providerIdleShutdownMinutes: number;
13
+ /**
14
+ * Whether this agents-host may let a hosted agent enter an independent
15
+ * execution.local_directory workspace for a task thread created by another
16
+ * agent. Undefined keeps the default allow behavior.
17
+ */
18
+ allowCrossAgentIndependentWorkspaceHandoff?: boolean;
12
19
  }
13
20
  export interface ProviderRuntimeConfig extends ProviderCommandConfig {
14
21
  provider: ProviderKind;
@@ -167,7 +174,7 @@ export interface CollaborationDraftSnapshot {
167
174
  }
168
175
  export type ProviderCollaborationTurnMode = 'ordinary' | 'silent-kickoff' | 'protocol-managed';
169
176
  export type CollaborationOutcomeResponseState = 'responded' | 'blocked' | 'superseded' | 'failed';
170
- export type CollaborationOutcomeDeliveryState = 'posted' | 'draft-finalized' | 'not-delivered' | 'delivery-failed';
177
+ export type CollaborationOutcomeDeliveryState = 'posted' | 'not-delivered' | 'delivery-failed';
171
178
  export type CollaborationOutcomeWakeState = 'waiting' | 'suppressed-agent' | 'resumed-human';
172
179
  export interface CollaborationOutcomeBlockedDetails {
173
180
  question: string;
@@ -211,6 +218,22 @@ export interface AttentionSnapshot {
211
218
  turnExecutionId?: string;
212
219
  claimContext?: AttentionClaimContext;
213
220
  }
221
+ export type ProviderCompactionStage = 'started' | 'completed' | 'failed';
222
+ /**
223
+ * Shared host-side projection only. This is the latest host-observed compaction
224
+ * lifecycle snapshot surfaced by a provider adapter; it is not provider- or
225
+ * model-authoritative truth about retained prompt content.
226
+ */
227
+ export interface CompactionSnapshot {
228
+ source: 'host-observed';
229
+ provider: ProviderKind;
230
+ stage: ProviderCompactionStage;
231
+ observedAt: number;
232
+ turnExecutionId?: string;
233
+ usedTokens?: number;
234
+ contextWindowTokens?: number;
235
+ failureReason?: string;
236
+ }
214
237
  export type TaskThreadCollaborationTurnRole = 'assignment' | 'continuation';
215
238
  export type TaskThreadMainResultContract = 'ordinary-final-reply-in-thread';
216
239
  export type TaskThreadAuxiliaryRouteContract = 'optional-auxiliary-send-or-escalation-only';
@@ -233,6 +256,7 @@ export interface TaskThreadCollaborationContract {
233
256
  export interface CollaborationCapabilityDeclaration {
234
257
  collaborationOutcome?: true;
235
258
  attentionSnapshot?: true;
259
+ compactionSnapshot?: true;
236
260
  taskThreadCollaborationContract?: true;
237
261
  missedCollaborationDiagnostic?: true;
238
262
  recoveryExplanation?: 'runtime-local-only';
@@ -264,9 +288,12 @@ export interface ProviderInput {
264
288
  collaboration?: ProviderCollaborationContext;
265
289
  collaborationOutcome?: CollaborationOutcomeSnapshot;
266
290
  attentionSnapshot?: AttentionSnapshot;
291
+ compactionSnapshot?: CompactionSnapshot;
267
292
  taskThreadCollaborationContract?: TaskThreadCollaborationContract;
268
293
  collaborationCapabilities?: CollaborationCapabilityDeclaration;
269
294
  missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
295
+ taskAssignmentContextOverride?: TaskAssignmentThreadContext;
296
+ taskAssignmentContextOverridePersistence?: 'persist' | 'ephemeral';
270
297
  }
271
298
  export interface ProviderProtocolContext {
272
299
  anchorMessageId: string;
@@ -310,17 +337,57 @@ export interface TaskAssignmentThreadContext {
310
337
  active: true;
311
338
  currentTaskId?: string;
312
339
  }
313
- export interface TaskWorkspaceContext {
314
- currentTaskId: string;
340
+ export interface ChannelResolvedWorkspaceContext {
341
+ authority: 'channel';
342
+ owningChannelId: string;
315
343
  rootPath: string;
316
344
  }
345
+ export interface TaskThreadScratchWorkspaceContext {
346
+ authority: 'task-thread-scratch';
347
+ rootPath: string;
348
+ reason?: 'missing-or-invalid-execution-target' | 'cross-agent-independent-workspace-disabled';
349
+ }
350
+ export interface TaskExecutionTargetResolvedWorkspaceContext {
351
+ authority: 'task-execution-target';
352
+ taskId: string;
353
+ rootPath: string;
354
+ }
355
+ export type ResolvedWorkspaceContext = ChannelResolvedWorkspaceContext | TaskThreadScratchWorkspaceContext | TaskExecutionTargetResolvedWorkspaceContext;
356
+ export interface RuntimeSurface {
357
+ schemaVersion: 1;
358
+ turnMode: ProviderCollaborationTurnMode;
359
+ gateway: {
360
+ available: boolean;
361
+ readOnlyRoutesAuthorized: boolean;
362
+ inspectBeforeAnswer: boolean;
363
+ };
364
+ task: {
365
+ currentThread: 'parent-channel' | 'task-assignment-thread';
366
+ parentChannelTaskCollection: 'available' | 'parent-channel-only';
367
+ currentTaskShorthand: 'requires-task-id' | 'persisted-current-task' | 'fallback-current-task';
368
+ currentTaskIdPersisted: boolean;
369
+ currentTaskFallback: 'disallowed' | 'visible-parent-channel-thread-scan';
370
+ };
371
+ collaboration: {
372
+ participantLookup: 'unavailable' | 'available';
373
+ draftRead: 'unavailable' | 'available';
374
+ auxiliarySend: 'unavailable' | 'available';
375
+ };
376
+ response: {
377
+ mainVisibleReply: 'model-visible-reply' | 'host-visible-protocol-reply' | 'no-visible-reply';
378
+ auxiliaryMessageUsage: 'unavailable' | 'targeted-escalation-only';
379
+ };
380
+ }
317
381
  export interface PreparedPromptContext {
318
382
  channelContextPayloadPath?: string;
383
+ claudeProjectedBriefPath?: string;
384
+ claudeProjectedBriefHash?: string;
319
385
  gatewayCredentialPath?: string;
320
386
  collaborationTurnExecutionId?: string;
321
387
  collaborationTurnMode?: ProviderCollaborationTurnMode;
322
388
  collaborationOutcome?: CollaborationOutcomeSnapshot;
323
389
  attentionSnapshot?: AttentionSnapshot;
390
+ compactionSnapshot?: CompactionSnapshot;
324
391
  taskThreadCollaborationContract?: TaskThreadCollaborationContract;
325
392
  collaborationCapabilities?: CollaborationCapabilityDeclaration;
326
393
  missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
@@ -330,19 +397,25 @@ export interface PreparedPromptContext {
330
397
  skillRuntime?: SkillRuntimeBootstrapMetadata;
331
398
  localhostGateway?: LocalhostGatewayBootstrapMetadata;
332
399
  taskAssignmentContext?: TaskAssignmentThreadContext;
333
- taskWorkspace?: TaskWorkspaceContext;
400
+ resolvedWorkspace?: ResolvedWorkspaceContext;
401
+ runtimeSurface?: RuntimeSurface;
334
402
  }
335
403
  export interface PreparedProviderSessionRouting {
336
404
  key: string;
337
405
  persistence: 'persistent' | 'ephemeral';
338
406
  }
339
407
  export interface PreparedProviderTurnInput {
408
+ agentName?: string;
340
409
  channelId: string;
341
410
  incomingContent: string;
342
411
  incomingParts: HostedTurnContentPart[];
343
412
  incomingEventKind?: string;
344
413
  incomingMessageType?: string;
345
414
  prompt: string;
415
+ /** Claude-only session append content for ACP systemPrompt.append. */
416
+ claudeSessionPromptAppend?: string;
417
+ /** Shared projection-strategy selector used for provider prompt/session experiments. */
418
+ projectionStrategy?: ProjectionStrategy;
346
419
  promptContext?: PreparedPromptContext;
347
420
  providerSessionRouting?: PreparedProviderSessionRouting;
348
421
  }
@@ -417,9 +490,73 @@ export interface UpdateTaskInput {
417
490
  title?: string;
418
491
  description?: string;
419
492
  }
420
- export interface ProviderProgressUpdate {
421
- text: string;
493
+ /** The protocol's ten tool kinds, treated as open: an unknown value is not an error. */
494
+ export type ProgressActivityKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'switch_mode' | 'other';
495
+ /** The protocol's four statuses, plus the one it lacks: stopped, waiting on a human. */
496
+ export type ProgressActivityStatus = 'pending' | 'in_progress' | 'waiting' | 'completed' | 'failed';
497
+ /**
498
+ * One entry in an agent's timeline of work. Identity is minted by the producer:
499
+ * a producer that can correlate later progress to an earlier event reuses the
500
+ * id and the entry is patched in place; one that cannot mints a fresh id and
501
+ * entries accumulate. An absent field means unchanged; `paths` replaces.
502
+ */
503
+ export interface ProgressActivity {
504
+ id: string;
505
+ /** The protocol's title. For a shell tool this is the raw command line. */
506
+ label?: string;
507
+ /** The provider's human-readable phrasing, when it offers one. */
508
+ description?: string;
509
+ kind?: ProgressActivityKind;
510
+ status?: ProgressActivityStatus;
511
+ /** Bounded one-line detail: the command, the file, the query. Never raw output. */
512
+ detail?: string;
513
+ /** Files this activity touched. Replaces the previous list. */
514
+ paths?: string[];
515
+ /** The activity that spawned this one. */
516
+ parentId?: string;
517
+ /**
518
+ * Whether this activity is a container for other work rather than work of its
519
+ * own. A reader nests under it, and cannot arrive at that by noticing it has
520
+ * children: a sub-agent's children can be reported before it is, and a
521
+ * sub-agent that has spawned nothing yet is still a sub-agent.
522
+ */
523
+ subagent?: boolean;
524
+ /** Why a terminal activity ended as it did. An open set upstream, so never an enum. */
525
+ reason?: string;
526
+ }
527
+ /** Plan entries have no identity: the whole list is replaced on every update. */
528
+ export interface ProgressPlanItem {
529
+ label: string;
530
+ status: 'pending' | 'in_progress' | 'completed';
531
+ }
532
+ export interface ProviderCompactionProgress {
533
+ provider: ProviderKind;
534
+ stage: ProviderCompactionStage;
535
+ usedTokens?: number;
536
+ contextWindowTokens?: number;
537
+ failureReason?: string;
422
538
  }
539
+ /**
540
+ * A plan, a tool call and a stream of text are three meanings with three
541
+ * cardinalities and three update rules, so they travel as three shapes rather
542
+ * than as one entry with a category field. Text is cumulative rather than a
543
+ * delta, so a consumer that misses one update recovers on the next.
544
+ */
545
+ export type ProviderProgressUpdate = {
546
+ type: 'text';
547
+ stream: 'answer' | 'reasoning';
548
+ text: string;
549
+ messageId?: string;
550
+ } | {
551
+ type: 'activity';
552
+ activity: ProgressActivity;
553
+ } | {
554
+ type: 'plan';
555
+ items: ProgressPlanItem[];
556
+ } | {
557
+ type: 'compaction';
558
+ compaction: ProviderCompactionProgress;
559
+ };
423
560
  export interface ProviderGenerateOptions {
424
561
  onProgress?: (update: ProviderProgressUpdate) => void;
425
562
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borgee/agents-host",
3
- "version": "0.2.44",
3
+ "version": "0.2.62",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,7 +35,7 @@
35
35
  "tsx": "^4.20.5",
36
36
  "typescript": "^5.9.3",
37
37
  "vitest": "^4.1.5",
38
- "@borgee/plugin-sdk": "0.4.0"
38
+ "@borgee/plugin-sdk": "0.12.0"
39
39
  },
40
40
  "scripts": {
41
41
  "predev": "pnpm --filter @borgee/plugin-sdk build",
@@ -11,6 +11,14 @@ This turn is running as an agent inside a Borgee channel. The packaged CLI is th
11
11
 
12
12
  Every command below is already authorized on a turn whose prompt names a gateway credential file. Run it directly. Never ask the user for permission first, and never end a turn having asked to read instead of reading.
13
13
 
14
+ ## Session contract
15
+
16
+ This session is the coordination surface for the work that belongs to this Borgee thread: read the channel, answer the human here, break the work down, and keep task state current here.
17
+
18
+ Delegate the heavy execution to workers rather than running everything inline in this session. Research, code edits, long builds and test runs, and broad repository sweeps belong in delegated workers so a newly arriving message can still be handled promptly here.
19
+
20
+ Delegation changes who executes, not who owns. The work still belongs to this thread, and this session still reports the result here itself.
21
+
14
22
  ## When to use it
15
23
 
16
24
  - You are asked what was said here, who is here, or what you are supposed to be working on: read it, do not guess.
@@ -56,15 +64,15 @@ Everything below writes that leading interpreter and script path as `borgee-agen
56
64
 
57
65
  On `task get`, `task update`, `task set-property` and `task delete-property` the task id is an optional leading positional. Inside a task thread, omitting it addresses this thread's own task: the host's published binding names it, and where the host published none the gateway scans the parent channel's visible tasks for this thread instead — so pass the id explicitly when that scan cannot land on a single task. `task list` and `task create` are refused inside a task thread; they belong to the parent channel. In a parent channel every one of those ids is required, and omitting it answers `not_found`.
58
66
 
59
- The keys `task set-property` and `task delete-property` accept are a closed set, and a value has a size limit: see `references/task-properties.md`.
67
+ The keys `task set-property` and `task delete-property` accept are a closed set, and a value has a size limit: see `references/task-properties.md`. In this slice, `workspace.mode` still records the host-managed scratch isolation hint, while `execution.local_directory` is a human-owned execution target that hosted agents may read but must not retarget through the generic task-property rail.
60
68
 
61
69
  ## What is available on a turn
62
70
 
63
- `health`, `bootstrap`, `whoami`, `history` and the task commands are live on every turn whose prompt names a gateway credential file.
71
+ `health`, `bootstrap`, `whoami`, `history`, `users` and the task commands are live on every turn whose prompt names a gateway credential file.
64
72
 
65
- `users`, `draft`, `send` and `mention` are live only where collaboration is enabled; the prompt says when it is not, and the gateway answers `not_found` for all four. `draft`, `send` and `mention` additionally need the turn execution id the prompt carries: no command returns that id and the gateway credential file does not hold it.
73
+ `draft`, `send` and `mention` are live only where collaboration is enabled; the prompt says when they are not, and the gateway answers `not_found` for all three. They additionally need the turn execution id the prompt carries: no command returns that id and the gateway credential file does not hold it.
66
74
 
67
- A `not_found` from `draft` therefore has two readings — collaboration is off, or the host holds no draft for this turn yet — so take it as an answer about the draft, not as evidence that `users`, `send` and `mention` have gone.
75
+ A `not_found` from `draft` therefore has two readings — collaboration is off, or the host holds no draft for this turn yet — so take it as an answer about the draft, not as evidence that `users`, `send` and `mention` have all gone.
68
76
 
69
77
  Whether you are in a parent channel or inside a task assignment thread is in the prompt too, and it decides which task grammar above applies.
70
78
 
@@ -22,8 +22,8 @@
22
22
  | 429 `collaboration_target_cooldown` | The same reply target or mention set was addressed moments ago. | Do not repeat it. |
23
23
  | 404 `not_found` on `task get` / `task update` / a property command with no task id | You are not inside a task thread, so there is no current task to resolve. | Pass the task id. |
24
24
  | 404 `not_found` on a task command with a task id | The task does not exist, or belongs to another channel. | Check the id with `task list`. |
25
- | 404 `not_found` on `users`, `send`, `mention` | Collaboration is not enabled for this turn, so those commands do not exist. | Do not use them; the turn prompt says when they are live. |
26
- | 404 `not_found` on `draft` | Either collaboration is not enabled for this turn, or the host holds no draft for it yet — a draft exists only once the turn has produced visible reply text. | Not a verdict on the other collaboration commands: `users`, `send` and `mention` may well answer on this same turn. Carry on and read the draft later if you still need it. |
25
+ | 404 `not_found` on `send`, `mention` | Collaboration is not enabled for this turn, so those commands do not exist. | Do not use them; the turn prompt says when they are live. |
26
+ | 404 `not_found` on `draft` | Either collaboration is not enabled for this turn, or the host holds no draft for it yet — a draft exists only once the turn has produced visible reply text. | Not a verdict on the other collaboration commands: `users` may still answer on this same turn, and `send` / `mention` may answer once collaboration is live. Carry on and read the draft later if you still need it. |
27
27
  | 404 `bootstrap_unavailable` | The host has not published this turn's channel payload yet. | Retry the read once; if it persists, continue without it. |
28
28
  | 400 `task_thread_collection_not_allowed` | `task list` or `task create` inside a task thread. | Those belong to the parent channel. |
29
29
  | 400 `multiline_message_body_not_allowed`, `message_body_too_verbose` | An auxiliary send must be one line of at most 12 words, and the `<@id>` the CLI appends counts as one of them — each extra `--mention` costs another. | Shorten it to a single-line notice. |
@@ -1,12 +1,14 @@
1
1
  # Task properties
2
2
 
3
- A task property associates a task with something that lives outside it. Use one to record what a reader would otherwise have to hunt for in the thread — the pull request that implements the task, the issue it came from.
3
+ A task property associates a task with something that lives outside it, or with a closed task-level runtime choice. Use one to record what a reader would otherwise have to hunt for in the thread — the pull request that implements the task, the issue it came from, or the execution metadata a human attached to it.
4
4
 
5
5
  Read them back with `task get`: every task response carries a `properties` object, `{}` when the task has none.
6
6
 
7
7
  ```
8
8
  borgee-agent --gateway <path> task set-property <task-id> --key link.pr --value https://github.com/org/repo/pull/12
9
9
  borgee-agent --gateway <path> task delete-property <task-id> --key link.pr
10
+ borgee-agent --gateway <path> task set-property <task-id> --key workspace.mode --value isolated
11
+ borgee-agent --gateway <path> task delete-property <task-id> --key workspace.mode
10
12
  ```
11
13
 
12
14
  The task id is omitted only inside that task's own thread, where the request resolves to the thread's task.
@@ -19,6 +21,8 @@ The key set is closed; writing an unregistered key is rejected with `unknown_pro
19
21
  | --- | --- |
20
22
  | `link.pr` | The pull request that implements this task. Set it as soon as the PR exists, not at the end. |
21
23
  | `link.issue` | The issue or ticket the task originates from. |
24
+ | `execution.local_directory` | The explicit local directory a human selected as this task thread's execution target. New tasks default it from the immediately previous task thread in the same channel: if that previous task carried a value, the new task inherits it; if the previous task left it unset, the new task also starts unset. Hosted agents can read it, but the generic agent task-property rail must not write it. Humans set it through the existing user rail. The extra single-human-user guard applies when a task thread is about to switch into somebody's own local workspace/project directory, not as a blanket rule on every property write. A separate agents-host local policy switch governs whether a hosted agent may enter an independent workspace for a task thread that originated from another agent's task. |
25
+ | `workspace.mode` | The host-managed scratch-workspace isolation hint for task threads. `inherit` keeps the scratch workspace on the shared host-managed path, while `isolated` reserves the task's own host-managed scratch workspace shape. Deleting the key returns to the default `inherit` behavior. |
22
26
  | `agent.session_id` | Do not write this. It is registered, so a write is accepted and lands — overwriting the host's record of which provider session worked this task. The host writes it itself after each turn. |
23
27
 
24
28
  ## One key per call
@@ -27,4 +31,4 @@ Each call writes exactly one key, and that is what makes it safe to write a prop
27
31
 
28
32
  ## Value
29
33
 
30
- A value is a plain string of at most 8 KiB; a longer one is rejected with `property_value_too_long`. It is a reference — a URL, an identifier — never a document.
34
+ A value is a plain string of at most 8 KiB; a longer one is rejected with `property_value_too_long`. It is a reference — a URL, an identifier — never a document. `execution.local_directory` must be a non-empty absolute path string. Before a human lets a task thread switch into their own local workspace/project directory, first verify that the task's parent channel has exactly one human user; otherwise keep the thread discussion-only. If a hosted agent is trying to enter an independent workspace for a task thread that originated from another agent's task, this agents-host's local handoff policy must also allow it. Some registered keys are closed enums: `workspace.mode` accepts only `inherit` or `isolated`.
@@ -1,5 +0,0 @@
1
- import { type CursorStore } from './plugin-sdk.js';
2
- export interface DurableCursorStoreOptions {
3
- stateRootDir: string;
4
- }
5
- export declare function createDurableCursorStore(options: DurableCursorStoreOptions): CursorStore;
@@ -1,7 +0,0 @@
1
- import { FileCursorStore } from './plugin-sdk.js';
2
- import { resolveAgentCursorPath } from './state-paths.js';
3
- export function createDurableCursorStore(options) {
4
- return new FileCursorStore({
5
- resolvePath: (agentId) => resolveAgentCursorPath(options.stateRootDir, agentId),
6
- });
7
- }