@borgee/agents-host 0.2.2 → 0.2.28

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 (84) hide show
  1. package/README.md +184 -21
  2. package/dist/agents-host-supervisor.d.ts +7 -5
  3. package/dist/agents-host-supervisor.js +24 -4
  4. package/dist/agents-host.d.ts +114 -15
  5. package/dist/agents-host.js +2712 -141
  6. package/dist/chat/chat-control-plane.d.ts +13 -2
  7. package/dist/chat/sdk-chat-control-plane.d.ts +14 -3
  8. package/dist/chat/sdk-chat-control-plane.js +54 -2
  9. package/dist/cli-args.d.ts +46 -5
  10. package/dist/cli-args.js +313 -32
  11. package/dist/cli.d.ts +9 -0
  12. package/dist/cli.js +112 -5
  13. package/dist/compatibility-gates.d.ts +39 -0
  14. package/dist/compatibility-gates.js +131 -0
  15. package/dist/config.d.ts +1 -0
  16. package/dist/config.js +23 -5
  17. package/dist/connections-state-store.d.ts +81 -0
  18. package/dist/connections-state-store.js +228 -0
  19. package/dist/context/attention.d.ts +12 -0
  20. package/dist/context/attention.js +137 -0
  21. package/dist/context/collaboration-capabilities-diagnostics.d.ts +3 -0
  22. package/dist/context/collaboration-capabilities-diagnostics.js +18 -0
  23. package/dist/context/collaboration-outcome.d.ts +2 -0
  24. package/dist/context/collaboration-outcome.js +26 -0
  25. package/dist/context/injection.d.ts +134 -0
  26. package/dist/context/injection.js +355 -0
  27. package/dist/context/prompt.d.ts +4 -1
  28. package/dist/context/prompt.js +231 -1
  29. package/dist/context/task-thread-collaboration.d.ts +6 -0
  30. package/dist/context/task-thread-collaboration.js +31 -0
  31. package/dist/context/turn-preparation.d.ts +9 -0
  32. package/dist/context/turn-preparation.js +135 -0
  33. package/dist/debug.d.ts +44 -0
  34. package/dist/debug.js +135 -0
  35. package/dist/gateway/localhost-gateway.d.ts +52 -0
  36. package/dist/gateway/localhost-gateway.js +857 -0
  37. package/dist/index.js +7 -5
  38. package/dist/local-config.d.ts +4 -1
  39. package/dist/local-config.js +24 -7
  40. package/dist/managed-daemon-log.d.ts +34 -0
  41. package/dist/managed-daemon-log.js +261 -0
  42. package/dist/managed-daemon.d.ts +220 -0
  43. package/dist/managed-daemon.js +1601 -0
  44. package/dist/policy/authorization-audit.d.ts +63 -0
  45. package/dist/policy/authorization-audit.js +94 -0
  46. package/dist/policy/copilot-permission.d.ts +15 -0
  47. package/dist/policy/copilot-permission.js +193 -0
  48. package/dist/policy/gateway-authorization.d.ts +42 -0
  49. package/dist/policy/gateway-authorization.js +162 -0
  50. package/dist/providers/awaiting-user.d.ts +12 -0
  51. package/dist/providers/awaiting-user.js +192 -0
  52. package/dist/providers/claude/adapter.d.ts +3 -1
  53. package/dist/providers/claude/adapter.js +8 -12
  54. package/dist/providers/claude/cli-client.d.ts +12 -5
  55. package/dist/providers/claude/cli-client.js +184 -37
  56. package/dist/providers/claude/session-store.d.ts +1 -0
  57. package/dist/providers/codex/adapter.d.ts +11 -0
  58. package/dist/providers/codex/adapter.js +19 -0
  59. package/dist/providers/codex/cli-client.d.ts +103 -0
  60. package/dist/providers/codex/cli-client.js +1133 -0
  61. package/dist/providers/codex/project-doc.d.ts +3 -0
  62. package/dist/providers/codex/project-doc.js +90 -0
  63. package/dist/providers/codex/session-store.d.ts +38 -0
  64. package/dist/providers/codex/session-store.js +150 -0
  65. package/dist/providers/copilot/adapter.d.ts +3 -1
  66. package/dist/providers/copilot/adapter.js +8 -12
  67. package/dist/providers/copilot/cli-client.d.ts +20 -2
  68. package/dist/providers/copilot/cli-client.js +251 -71
  69. package/dist/providers/copilot/session-store.d.ts +1 -0
  70. package/dist/providers/create-provider.d.ts +11 -2
  71. package/dist/providers/create-provider.js +131 -12
  72. package/dist/run.d.ts +1 -0
  73. package/dist/run.js +5 -2
  74. package/dist/state-paths.d.ts +14 -1
  75. package/dist/state-paths.js +87 -3
  76. package/dist/task-thread-resolution.d.ts +10 -0
  77. package/dist/task-thread-resolution.js +48 -0
  78. package/dist/types.d.ts +267 -1
  79. package/dist/visible-mentions.d.ts +3 -0
  80. package/dist/visible-mentions.js +15 -0
  81. package/package.json +19 -17
  82. package/skills/borgee-agent/SKILL.md +33 -0
  83. package/skills/borgee-agent/borgee-agent.mjs +473 -0
  84. package/skills/borgee-agent/borgee-agent.py +409 -0
package/dist/types.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- export type ProviderKind = 'claude' | 'copilot';
1
+ export type ProviderKind = 'claude' | 'codex' | 'copilot';
2
2
  export interface ProviderCommandConfig {
3
3
  claudeCommand: string;
4
4
  claudeArgs: string[];
5
+ codexCommand: string;
6
+ codexArgs: string[];
5
7
  copilotCommand: string;
6
8
  copilotArgs: string[];
7
9
  copilotSessionTtlMinutes: number;
@@ -83,6 +85,7 @@ export interface LocalConfigGenerateResult {
83
85
  }
84
86
  export interface ChannelMessageEvent {
85
87
  type?: string;
88
+ message_type?: string;
86
89
  channel_id: string;
87
90
  channel_type?: string;
88
91
  message_id?: string;
@@ -99,19 +102,282 @@ export interface MeResponseUser {
99
102
  display_name?: string;
100
103
  role?: string;
101
104
  }
105
+ export interface DirectoryUser {
106
+ id: string;
107
+ display_name?: string;
108
+ kind: 'user' | 'agent';
109
+ }
110
+ export interface ChannelHistoryEntry {
111
+ id: string;
112
+ channelId: string;
113
+ authorId: string;
114
+ body: string;
115
+ contentType?: string;
116
+ type?: string;
117
+ replyToId?: string;
118
+ createdAt: number;
119
+ editedAt?: number;
120
+ }
121
+ export interface ReadChannelHistoryInput {
122
+ channelId: string;
123
+ before?: number;
124
+ after?: number;
125
+ limit: number;
126
+ }
127
+ export interface ChannelSummary {
128
+ id: string;
129
+ name: string;
130
+ kind?: string;
131
+ }
132
+ export interface CollaborationDraftSnapshot {
133
+ draftId: string;
134
+ channelId: string;
135
+ turnExecutionId: string;
136
+ replyToId?: string;
137
+ body: string;
138
+ status: 'streaming' | 'finalized';
139
+ updatedAt: number;
140
+ finalMessageId?: string;
141
+ }
142
+ export type ProviderCollaborationTurnMode = 'ordinary' | 'silent-kickoff' | 'protocol-managed';
143
+ export type CollaborationOutcomeResponseState = 'responded' | 'blocked' | 'superseded' | 'failed';
144
+ export type CollaborationOutcomeDeliveryState = 'posted' | 'draft-finalized' | 'not-delivered' | 'delivery-failed';
145
+ export type CollaborationOutcomeWakeState = 'waiting' | 'suppressed-agent' | 'resumed-human';
146
+ export interface CollaborationOutcomeBlockedDetails {
147
+ question: string;
148
+ reason?: string;
149
+ }
150
+ /**
151
+ * Shared host-side projection only. This is the latest host-observed snapshot
152
+ * that adapters may surface back to providers; it is not provider-authoritative
153
+ * truth about collaboration state or recovery.
154
+ */
155
+ export interface CollaborationOutcomeSnapshot {
156
+ source: 'host-observed';
157
+ responseState: CollaborationOutcomeResponseState;
158
+ deliveryState: CollaborationOutcomeDeliveryState;
159
+ wakeState?: CollaborationOutcomeWakeState;
160
+ blockedDetails?: CollaborationOutcomeBlockedDetails;
161
+ observedAt: number;
162
+ turnExecutionId?: string;
163
+ }
164
+ export type AttentionDeliveryMode = 'default' | 'follow' | 'muted';
165
+ export type AttentionClaimState = 'unclaimed' | 'claimed';
166
+ export type AttentionClaimActivation = 'inactive' | 'active' | 'dormant';
167
+ export type AttentionWakeMode = 'current-policy' | 'follow-visible-human' | 'mute-non-mention';
168
+ export type ProviderAttentionUpdate = 'follow-channel' | 'unfollow-channel' | 'mute-channel' | 'claim-channel' | 'claim-task-thread' | 'unclaim-channel' | 'unclaim-task-thread';
169
+ export interface AttentionClaimContext {
170
+ scope: 'channel' | 'task-thread';
171
+ taskId: string;
172
+ }
173
+ /**
174
+ * Shared host-side projection only. This is the latest host-observed snapshot
175
+ * that adapters may surface back to providers; it is not server-authoritative
176
+ * truth about delivery policy, fanout, or ownership.
177
+ */
178
+ export interface AttentionSnapshot {
179
+ source: 'host-observed';
180
+ deliveryMode: AttentionDeliveryMode;
181
+ claimState: AttentionClaimState;
182
+ claimActivation: AttentionClaimActivation;
183
+ wakeMode: AttentionWakeMode;
184
+ observedAt: number;
185
+ turnExecutionId?: string;
186
+ claimContext?: AttentionClaimContext;
187
+ }
188
+ export type TaskThreadCollaborationTurnRole = 'assignment' | 'continuation';
189
+ export type TaskThreadMainResultContract = 'ordinary-final-reply-in-thread';
190
+ export type TaskThreadAuxiliaryRouteContract = 'optional-auxiliary-send-or-escalation-only';
191
+ export type TaskThreadCheckInContract = 'status-update-intent-only';
192
+ export type TaskThreadBlockedWorkContract = 'in-thread-disclosure-only';
193
+ /**
194
+ * Shared host-side projection only. This is a narrow adapter-facing summary of
195
+ * task-thread collaboration meaning; it is not runtime-authoritative truth
196
+ * about task ownership, task routes, heartbeat execution, or blocked state.
197
+ */
198
+ export interface TaskThreadCollaborationContract {
199
+ source: 'host-projected';
200
+ turnRole: TaskThreadCollaborationTurnRole;
201
+ taskThreadContextActive: true;
202
+ mainResult: TaskThreadMainResultContract;
203
+ auxiliaryRoute: TaskThreadAuxiliaryRouteContract;
204
+ checkIn: TaskThreadCheckInContract;
205
+ blockedWork: TaskThreadBlockedWorkContract;
206
+ }
207
+ export interface CollaborationCapabilityDeclaration {
208
+ collaborationOutcome?: true;
209
+ attentionSnapshot?: true;
210
+ taskThreadCollaborationContract?: true;
211
+ missedCollaborationDiagnostic?: true;
212
+ recoveryExplanation?: 'runtime-local-only';
213
+ }
214
+ export type MissedCollaborationDiagnosticStage = 'delivery' | 'wake' | 'response';
215
+ export type MissedCollaborationDiagnosticReason = 'delivery-failed' | 'not-delivered' | 'wake-suppressed-attention-policy' | 'blocked-awaiting-user';
216
+ export interface MissedCollaborationDiagnostic {
217
+ stage: MissedCollaborationDiagnosticStage;
218
+ reason: MissedCollaborationDiagnosticReason;
219
+ }
220
+ export interface ProviderCollaborationContext {
221
+ enabled: boolean;
222
+ turnExecutionId?: string;
223
+ sendRoutesAllowed?: boolean;
224
+ turnMode?: ProviderCollaborationTurnMode;
225
+ kickoff?: ProviderProtocolKickoffContext;
226
+ protocol?: ProviderProtocolContext;
227
+ grounding?: ProviderTurnGroundingContext;
228
+ }
102
229
  export interface ProviderInput {
103
230
  agentName: string;
104
231
  provider: ProviderKind;
105
232
  channelId: string;
106
233
  incomingAuthorId: string;
107
234
  incomingContent: string;
235
+ incomingEventKind?: string;
236
+ incomingMessageType?: string;
237
+ collaboration?: ProviderCollaborationContext;
238
+ collaborationOutcome?: CollaborationOutcomeSnapshot;
239
+ attentionSnapshot?: AttentionSnapshot;
240
+ taskThreadCollaborationContract?: TaskThreadCollaborationContract;
241
+ collaborationCapabilities?: CollaborationCapabilityDeclaration;
242
+ missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
243
+ }
244
+ export interface ProviderProtocolContext {
245
+ anchorMessageId: string;
246
+ anchorSummary: string;
247
+ issuerId: string;
248
+ role: 'issuer' | 'intermediate' | 'final';
249
+ targetPeerId: string;
250
+ turnIndex: number;
251
+ maxTurnCount: number;
108
252
  }
253
+ export interface ProviderProtocolKickoffContext {
254
+ anchorMessageId: string;
255
+ participantIds: [string, string];
256
+ issuerId: string;
257
+ }
258
+ export interface ProviderTurnIdentity {
259
+ id: string;
260
+ displayName?: string;
261
+ kind: 'human' | 'agent' | 'unknown';
262
+ }
263
+ export interface ProviderTurnGroundingContext {
264
+ self: ProviderTurnIdentity;
265
+ incomingAuthor: ProviderTurnIdentity;
266
+ peer?: ProviderTurnIdentity;
267
+ participants?: ProviderTurnIdentity[];
268
+ hostRecognizedKickoffCandidate?: boolean;
269
+ }
270
+ export interface SkillRuntimeBootstrapMetadata {
271
+ skillDirectoryPath: string;
272
+ skillMarkdownPath: string;
273
+ nodeCliPath: string;
274
+ pythonCliPath: string;
275
+ }
276
+ export interface LocalhostGatewayBootstrapMetadata {
277
+ baseUrl: string;
278
+ collaboration?: {
279
+ enabled: true;
280
+ };
281
+ }
282
+ export interface TaskAssignmentThreadContext {
283
+ active: true;
284
+ currentTaskId?: string;
285
+ }
286
+ export interface TaskWorkspaceContext {
287
+ currentTaskId: string;
288
+ rootPath: string;
289
+ }
290
+ export interface PreparedPromptContext {
291
+ channelContextPayloadPath?: string;
292
+ gatewayAuthPath?: string;
293
+ collaborationTurnExecutionId?: string;
294
+ collaborationTurnMode?: ProviderCollaborationTurnMode;
295
+ collaborationOutcome?: CollaborationOutcomeSnapshot;
296
+ attentionSnapshot?: AttentionSnapshot;
297
+ taskThreadCollaborationContract?: TaskThreadCollaborationContract;
298
+ collaborationCapabilities?: CollaborationCapabilityDeclaration;
299
+ missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
300
+ kickoff?: ProviderProtocolKickoffContext;
301
+ protocol?: ProviderProtocolContext;
302
+ grounding?: ProviderTurnGroundingContext;
303
+ skillRuntime?: SkillRuntimeBootstrapMetadata;
304
+ localhostGateway?: LocalhostGatewayBootstrapMetadata;
305
+ taskAssignmentContext?: TaskAssignmentThreadContext;
306
+ taskWorkspace?: TaskWorkspaceContext;
307
+ }
308
+ export interface PreparedProviderSessionRouting {
309
+ key: string;
310
+ persistence: 'persistent' | 'ephemeral';
311
+ }
312
+ export interface PreparedProviderTurnInput {
313
+ channelId: string;
314
+ incomingEventKind?: string;
315
+ incomingMessageType?: string;
316
+ prompt: string;
317
+ promptContext?: PreparedPromptContext;
318
+ providerSessionRouting?: PreparedProviderSessionRouting;
319
+ }
320
+ export interface ProviderAwaitingUser {
321
+ question: string;
322
+ reason?: string;
323
+ }
324
+ export interface ProviderTurnControlBase {
325
+ attentionUpdate?: ProviderAttentionUpdate;
326
+ }
327
+ export type ProviderTurnControl = ({
328
+ kind: 'continue-to-peer';
329
+ } & ProviderTurnControlBase) | ({
330
+ kind: 'conclude-locally';
331
+ } & ProviderTurnControlBase) | {
332
+ kind: 'start-protocol';
333
+ rounds: number;
334
+ } | ({
335
+ kind: 'awaiting-user';
336
+ } & ProviderAwaitingUser & ProviderTurnControlBase) | ({
337
+ kind: 'attention-only';
338
+ attentionUpdate: ProviderAttentionUpdate;
339
+ } & ProviderTurnControlBase);
109
340
  export interface ProviderReply {
110
341
  text: string;
342
+ awaitingUser?: ProviderAwaitingUser;
343
+ control?: ProviderTurnControl;
344
+ controlMalformed?: boolean;
111
345
  }
112
346
  export interface PostedMessage {
113
347
  messageId: string;
114
348
  }
349
+ export interface PostMessageInput {
350
+ channelId: string;
351
+ body: string;
352
+ replyToId?: string;
353
+ }
354
+ export interface Task {
355
+ id: string;
356
+ channelId: string;
357
+ guildId: string;
358
+ seq?: number;
359
+ title: string;
360
+ description: string;
361
+ status: string;
362
+ assigneeId: string | null;
363
+ createdBy: string;
364
+ messageId: string | null;
365
+ threadId: string | null;
366
+ createdAt: number;
367
+ updatedAt: number;
368
+ }
369
+ export interface CreateTaskInput {
370
+ channelId: string;
371
+ title: string;
372
+ description?: string;
373
+ assigneeId?: string;
374
+ }
375
+ export interface UpdateTaskInput {
376
+ taskId: string;
377
+ status?: string;
378
+ assigneeId?: string;
379
+ title?: string;
380
+ }
115
381
  export interface ProviderProgressUpdate {
116
382
  text: string;
117
383
  }
@@ -0,0 +1,3 @@
1
+ export declare function extractVisibleMentionIds(content: string): string[];
2
+ export declare function hasVisibleMention(content: string, participantId: string): boolean;
3
+ export declare function appendVisibleMention(content: string, participantId: string): string;
@@ -0,0 +1,15 @@
1
+ export function extractVisibleMentionIds(content) {
2
+ return [...content.matchAll(/<@([^>\s]+)>/gu)]
3
+ .map((match) => match[1]?.trim())
4
+ .filter((value) => Boolean(value));
5
+ }
6
+ export function hasVisibleMention(content, participantId) {
7
+ return extractVisibleMentionIds(content).includes(participantId);
8
+ }
9
+ export function appendVisibleMention(content, participantId) {
10
+ if (hasVisibleMention(content, participantId)) {
11
+ return content;
12
+ }
13
+ const separator = /\s$/u.test(content) ? '' : ' ';
14
+ return `${content}${separator}<@${participantId}>`;
15
+ }
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@borgee/agents-host",
3
- "version": "0.2.2",
3
+ "version": "0.2.28",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "type": "module",
9
- "description": "Minimal local agents host: connects a local Claude/Copilot CLI to a Borgee agent over @borgee/plugin-sdk",
9
+ "description": "Minimal local agents host: connects local Claude/Codex/Copilot runtimes to a Borgee agent over @borgee/plugin-sdk",
10
10
  "bin": {
11
- "agents-host": "dist/cli.js"
11
+ "agents-host": "./dist/cli.js"
12
12
  },
13
13
  "files": [
14
14
  "dist",
15
+ "skills",
15
16
  "README.md"
16
17
  ],
17
18
  "repository": {
@@ -20,6 +21,20 @@
20
21
  "directory": "packages/agents-host"
21
22
  },
22
23
  "license": "MIT",
24
+ "dependencies": {
25
+ "@agentclientprotocol/codex-acp": "1.1.7",
26
+ "@agentclientprotocol/sdk": "1.3.0",
27
+ "cross-spawn": "^7.0.6",
28
+ "yaml": "^2.8.1",
29
+ "@borgee/plugin-sdk": "0.2.4"
30
+ },
31
+ "devDependencies": {
32
+ "@types/cross-spawn": "^6.0.6",
33
+ "@types/node": "^24.3.0",
34
+ "tsx": "^4.20.5",
35
+ "typescript": "^5.9.3",
36
+ "vitest": "^4.1.5"
37
+ },
23
38
  "scripts": {
24
39
  "predev": "pnpm --filter @borgee/plugin-sdk build",
25
40
  "dev": "tsx src/index.ts",
@@ -33,18 +48,5 @@
33
48
  "pretest": "pnpm --filter @borgee/plugin-sdk build",
34
49
  "test": "vitest run --testTimeout=10000",
35
50
  "pretypecheck": "pnpm --filter @borgee/plugin-sdk build"
36
- },
37
- "dependencies": {
38
- "@agentclientprotocol/sdk": "^1.2.1",
39
- "@borgee/plugin-sdk": "0.1.5",
40
- "cross-spawn": "^7.0.6",
41
- "yaml": "^2.8.1"
42
- },
43
- "devDependencies": {
44
- "@types/cross-spawn": "^6.0.6",
45
- "@types/node": "^24.3.0",
46
- "tsx": "^4.20.5",
47
- "typescript": "^5.9.3",
48
- "vitest": "^4.1.5"
49
51
  }
50
- }
52
+ }
@@ -0,0 +1,33 @@
1
+ # Borgee Agent Skill Bootstrap
2
+
3
+ This skill runtime surface stays read-only for final visible replies in this slice.
4
+
5
+ Use one of the packaged local CLIs to inspect the current channel bootstrap payload. When `localhost-gateway` is enabled together with `context-injection` and `skill-runtime`, the same CLIs can also call the loopback gateway using the persisted context payload.
6
+
7
+ - Node: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --print-bootstrap`
8
+ - Python: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --print-bootstrap`
9
+ - Node health: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --health`
10
+ - Node bootstrap: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --read-bootstrap`
11
+ - Node identity: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --get-me`
12
+ - Node history: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --read-history --limit 20`
13
+ - Node private draft snapshot: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --read-draft`
14
+ - Node users: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --list-users`
15
+ - Node auxiliary mention: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --send-mention user-id --body "Need review from <@user-id>"`
16
+ - Node auxiliary reply: `node ./borgee-agent.mjs --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --send-message --body "Following up here" --reply-to message-id`
17
+ - Python health: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --health`
18
+ - Python bootstrap: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --read-bootstrap`
19
+ - Python identity: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --get-me`
20
+ - Python history: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --read-history --limit 20`
21
+ - Python private draft snapshot: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --read-draft`
22
+ - Python users: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --list-users`
23
+ - Python auxiliary mention: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --send-mention user-id --body "Need review from <@user-id>"`
24
+ - Python auxiliary reply: `python3 ./borgee-agent.py --context /absolute/path/to/context.json --auth-path /absolute/path/to/.localhost-gateway-auth.json --turn-execution-id turn-id --send-message --body "Following up here" --reply-to message-id`
25
+
26
+ When the injected `context.json` includes `taskAssignmentContext.active: true`, the same CLIs also expose the task-thread compatibility surface:
27
+
28
+ - In ordinary parent channels: `--create-task`, `--list-tasks`, `--get-task --task-id ...`, `--update-task --task-id ...`
29
+ - In task-assignment threads: `--get-task` and `--update-task` may omit `--task-id` and resolve the current thread task through the persisted `currentTaskId` or an agents-host local fallback; `--create-task` and `--list-tasks` stay disabled there and must be run from the parent channel
30
+
31
+ The private draft snapshot is read-only, collaboration-scoped, and separate from ordinary public channel messages.
32
+ Auxiliary sends are only for short targeted escalation, reply-thread nudges, or mentions. They must not be used for the main final answer body, which still belongs to AgentsHost.
33
+ Both CLIs are local-only, may only access the loopback gateway described above, and must not mutate files.