@borgee/agents-host 0.2.26 → 0.2.29

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.md CHANGED
@@ -54,6 +54,7 @@ agents-host start-managed <serverUrl> <apiKey> [agent-options]
54
54
  agents-host describe-managed <serverUrl>
55
55
  agents-host apply-managed <serverUrl> --stdin
56
56
  agents-host apply-managed <serverUrl> --spec-json <json>
57
+ agents-host cleanup-managed <serverUrl> [--purge]
57
58
  agents-host log <serverUrl> [--lines <n>] [--follow]
58
59
  agents-host log <serverUrl> --path
59
60
  agents-host start --config <path-to-host-config> [--debug]
@@ -77,7 +78,28 @@ RUNTIME_PROVIDER=claude \
77
78
  pnpm --filter @borgee/agents-host dev
78
79
  ```
79
80
 
80
- Codex remains opt-in. Select `RUNTIME_PROVIDER=codex` only when `AGENTS_HOST_INTERNAL_COMPATIBILITY_GATES` includes `codex-provider`.
81
+ Codex now ships on the same default hosted-provider surface as Claude and Copilot. Select `RUNTIME_PROVIDER=codex` directly unless you are explicitly rolling that path back with `AGENTS_HOST_INTERNAL_DISABLED_COMPATIBILITY_GATES=codex-provider`.
82
+
83
+ ### Shipped internal compatibility defaults and rollback controls
84
+
85
+ The current shipped internal compatibility surface resolves gates in this order:
86
+
87
+ 1. start from the shipped defaults: `claude-provider-v2`, `copilot-provider-v2`, `codex-provider`, `managed-runtime-convergence`, and `policy-audit-enforcement`
88
+ 2. add any explicit entries from `AGENTS_HOST_INTERNAL_COMPATIBILITY_GATES`
89
+ 3. subtract any explicit entries from `AGENTS_HOST_INTERNAL_DISABLED_COMPATIBILITY_GATES`
90
+
91
+ The shipped default set now also includes `connections-state-layer`, `context-injection`, `skill-runtime`, `localhost-gateway`, `token-binding`, `collaboration-outcome-model`, `task-thread-collaboration-contract`, and `collaboration-capabilities-diagnostics`. `attention-follow-semantics`, `collaboration-skill-first`, and hosted `praestoclaw-provider` still remain opt-in.
92
+
93
+ Managed-runtime settings still preserve the managed rollback rule for `connections-state-layer` plus `token-binding`: when `managed-runtime-convergence` remains enabled, the managed surface forces that pair on; explicitly disabling `managed-runtime-convergence` removes that pair from the managed surface again unless you also explicitly re-enable them.
94
+
95
+ Managed runtime precedence stays intentional: detached daemon respawns always reuse the persisted `managed-runtime-settings.json` snapshot, bare `start-managed <serverUrl>` and `apply-managed` treat the caller's current env as an explicit request to update that managed runtime surface, and full `start-managed <serverUrl> <apiKey> ...` validates the agent upsert against the existing managed-root snapshot before ambient rollback env can reject an otherwise valid existing surface.
96
+ Legacy managed roots created before `managed-runtime-settings.json` existed need one bare `agents-host start-managed <serverUrl>` migration pass before full per-agent updates can rely on that snapshot-backed precedence.
97
+
98
+ Rollback and hardening controls stay explicit:
99
+
100
+ - `AGENTS_HOST_INTERNAL_DISABLED_COMPATIBILITY_GATES=<comma-list>` disables shipped gates for rollback
101
+ - `AGENTS_HOST_INTERNAL_PROVIDER_IMPLEMENTATIONS=claude:v1,copilot:v1` forces Claude and/or Copilot back to the v1 adapters while their v2 gates stay enabled
102
+ - `AGENTS_HOST_INTERNAL_POLICY_MODE=enforce` hardens the shipped `policy-audit-enforcement` gate beyond its default `audit-only` mode
81
103
 
82
104
  Or with the CLI:
83
105
 
@@ -117,6 +139,7 @@ and resumable in that case.
117
139
  Each managed runtime root keeps:
118
140
 
119
141
  - `agents-host.yaml` and `agents/` as the stable generated local-config entrypoints
142
+ - `managed-runtime-settings.json` as the persisted managed runtime surface snapshot
120
143
  - `daemon.log` as the detached managed daemon stdout/stderr log file
121
144
  - `.state/` as the per-agent runtime state base
122
145
  - `ctl.sock` as the local control socket
@@ -210,8 +233,8 @@ Notes:
210
233
  | `BORGEE_AGENT_API_KEY` | positional `<apiKey>` | yes | — | Agent API key from the web UI |
211
234
  | `AGENTS_HOST_DEBUG` | `--debug` | no | off | Extra host/provider lifecycle logs. Set `AGENTS_HOST_DEBUG=1` to enable without the CLI flag. |
212
235
  | `BORGEE_AGENT_NAME` | `--name` | no | `Assistant` | Display name used in prompts |
213
- | `RUNTIME_PROVIDER` | `--provider` | no | `claude` | `claude`, `copilot`, or `codex` when `codex-provider` is enabled |
214
- | `CLAUDE_COMMAND` / `CLAUDE_ARGS` | `--claude-command` / `--claude-args` | no | `claude` / `--print` | Local Claude CLI command + args |
236
+ | `RUNTIME_PROVIDER` | `--provider` | no | `claude` | `claude`, `copilot`, or `codex` |
237
+ | `CLAUDE_COMMAND` / `CLAUDE_ARGS` | `--claude-command` / `--claude-args` | no | `claude` / `--print --permission-mode bypassPermissions` | Local Claude CLI command + args |
215
238
  | `CODEX_COMMAND` / `CODEX_ARGS` | `--codex-command` / `--codex-args` | no | `codex-acp` / empty | Local Codex ACP adapter command + args. The default launch resolves the bundled `@agentclientprotocol/codex-acp` entrypoint. |
216
239
  | `COPILOT_COMMAND` / `COPILOT_ARGS` | `--copilot-command` / `--copilot-args` | no | `copilot` / parsed but ignored by ACP runtime | Local Copilot CLI command. The persistent Copilot ACP prototype always launches `copilot --acp`. |
217
240
  | `COPILOT_SESSION_TTL_MINUTES` | `--copilot-session-ttl-minutes` | no | `2880` | Idle TTL for per-channel Copilot ACP sessions |
@@ -414,7 +437,7 @@ Agent config fields:
414
437
  - `key` (**required**): stable identity used for diffing and reload decisions
415
438
  - `name` (**required**)
416
439
  - `apiKey` (**required**)
417
- - `provider` (**required**): `claude`, `copilot`, or gated `codex`
440
+ - `provider` (**required**): `claude`, `copilot`, or `codex` (roll back Codex only with `AGENTS_HOST_INTERNAL_DISABLED_COMPATIBILITY_GATES=codex-provider`)
418
441
  - `enabled` (optional, default `true`)
419
442
  - optional overrides for `claudeCommand`, `claudeArgs`, `codexCommand`,
420
443
  `codexArgs`, `copilotCommand`, `copilotArgs`, and
@@ -12,9 +12,17 @@ export declare class AgentsHost {
12
12
  private readonly provider;
13
13
  private readonly borgee;
14
14
  private readonly logger;
15
+ private readonly contextInjectionEnabled;
15
16
  private readonly collaborationEnabled;
17
+ private readonly collaborationOutcomeModelEnabled;
18
+ private readonly attentionFollowSemanticsEnabled;
19
+ private readonly taskThreadCollaborationContractEnabled;
20
+ private readonly collaborationCapabilitiesDiagnosticsEnabled;
16
21
  private readonly activeTurns;
17
22
  private readonly awaitingUserByChannel;
23
+ private readonly collaborationOutcomeByChannel;
24
+ private readonly attentionSnapshotByChannel;
25
+ private readonly missedCollaborationDiagnosticByChannel;
18
26
  private readonly progressChannelQueues;
19
27
  private readonly progressDrafts;
20
28
  private readonly collaborationDrafts;
@@ -83,6 +91,20 @@ export declare class AgentsHost {
83
91
  private finishProtocolState;
84
92
  private cancelProtocolState;
85
93
  private confirmProtocolMessage;
94
+ private resolveAttentionStatePath;
95
+ private buildDefaultAttentionSnapshot;
96
+ private buildTurnTaskThreadContext;
97
+ private ensureAttentionSnapshotLoaded;
98
+ private revalidateAttentionSnapshotForTurn;
99
+ private getAttentionSnapshotForTurn;
100
+ private isHumanWakeFiltered;
101
+ private applyAttentionUpdate;
102
+ private commitAttentionSnapshot;
103
+ private resolveTaskThreadCollaborationContractForTurn;
104
+ private resolveCollaborationCapabilityDeclarationForTurn;
105
+ private resolveMissedCollaborationDiagnosticForTurn;
106
+ private updateMissedCollaborationDiagnostic;
107
+ private noteWakeSuppressedAttentionPolicy;
86
108
  private runUngatedTurn;
87
109
  private executeTurn;
88
110
  private canAcceptTurnOutput;
@@ -100,6 +122,9 @@ export declare class AgentsHost {
100
122
  private rememberRecentTurn;
101
123
  private resolveAuthorizedCollaborationTurn;
102
124
  private updateAwaitingUserState;
125
+ private recordBlockedSuppressionOutcome;
126
+ private recordCollaborationOutcome;
127
+ private syncMissedCollaborationDiagnosticFromOutcome;
103
128
  private resolveVisibleTurnBody;
104
129
  private shouldRelayProtocolReply;
105
130
  private normalizeMessage;