@borgee/agents-host 0.2.56 → 0.2.65

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 (44) hide show
  1. package/README.md +11 -10
  2. package/dist/agents-host.d.ts +4 -1
  3. package/dist/agents-host.js +229 -20
  4. package/dist/chat/chat-control-plane.d.ts +2 -1
  5. package/dist/chat/sdk-chat-control-plane.d.ts +3 -2
  6. package/dist/chat/sdk-chat-control-plane.js +4 -0
  7. package/dist/compatibility-gates.js +2 -0
  8. package/dist/config.d.ts +2 -0
  9. package/dist/config.js +21 -0
  10. package/dist/context/injection.d.ts +20 -2
  11. package/dist/context/injection.js +146 -103
  12. package/dist/context/prompt.js +11 -7
  13. package/dist/context/resolved-workspace.d.ts +1 -0
  14. package/dist/context/resolved-workspace.js +50 -8
  15. package/dist/context/turn-preparation.js +8 -0
  16. package/dist/gateway/localhost-gateway.js +2 -5
  17. package/dist/local-config.js +11 -1
  18. package/dist/managed-daemon.js +18 -13
  19. package/dist/plugin-sdk.js +0 -17
  20. package/dist/plugin-sdk.js.map +2 -2
  21. package/dist/policy/copilot-permission.d.ts +1 -0
  22. package/dist/policy/copilot-permission.js +18 -0
  23. package/dist/policy/gateway-authorization.js +2 -2
  24. package/dist/providers/claude/adapter.d.ts +1 -0
  25. package/dist/providers/claude/adapter.js +3 -0
  26. package/dist/providers/claude/cli-client.d.ts +2 -1
  27. package/dist/providers/claude/cli-client.js +53 -3
  28. package/dist/providers/codex/adapter.d.ts +1 -0
  29. package/dist/providers/codex/adapter.js +3 -0
  30. package/dist/providers/codex/cli-client.d.ts +3 -0
  31. package/dist/providers/codex/cli-client.js +50 -22
  32. package/dist/providers/copilot/adapter.d.ts +1 -0
  33. package/dist/providers/copilot/adapter.js +3 -0
  34. package/dist/providers/copilot/cli-client.d.ts +2 -1
  35. package/dist/providers/copilot/cli-client.js +30 -3
  36. package/dist/providers/create-provider.d.ts +1 -1
  37. package/dist/providers/create-provider.js +8 -0
  38. package/dist/providers/provider-adapter.d.ts +7 -0
  39. package/dist/providers/provider-adapter.js +8 -0
  40. package/dist/types.d.ts +16 -3
  41. package/package.json +2 -2
  42. package/skills/borgee-agent/SKILL.md +4 -4
  43. package/skills/borgee-agent/references/errors.md +2 -2
  44. package/skills/borgee-agent/references/task-properties.md +4 -3
@@ -64,15 +64,15 @@ Everything below writes that leading interpreter and script path as `borgee-agen
64
64
 
65
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`.
66
66
 
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` is the formal task-workspace switch: `inherit` keeps a task thread on its channel workspace, while `isolated` moves that task thread onto its own task workspace.
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.
68
68
 
69
69
  ## What is available on a turn
70
70
 
71
- `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.
72
72
 
73
- `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.
74
74
 
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 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.
76
76
 
77
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.
78
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,6 +1,6 @@
1
1
  # Task properties
2
2
 
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 task workspace mode it should run with.
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
 
@@ -21,7 +21,8 @@ The key set is closed; writing an unregistered key is rejected with `unknown_pro
21
21
  | --- | --- |
22
22
  | `link.pr` | The pull request that implements this task. Set it as soon as the PR exists, not at the end. |
23
23
  | `link.issue` | The issue or ticket the task originates from. |
24
- | `workspace.mode` | The task workspace binding for task threads. `inherit` keeps the task on its channel workspace. `isolated` switches it to its task-isolated workspace. Deleting the key returns to the default `inherit` behavior. |
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. |
25
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. |
26
27
 
27
28
  ## One key per call
@@ -30,4 +31,4 @@ Each call writes exactly one key, and that is what makes it safe to write a prop
30
31
 
31
32
  ## Value
32
33
 
33
- 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. Some registered keys are closed enums: `workspace.mode` accepts only `inherit` or `isolated`.
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`.