@borgee/agents-host 0.2.28 → 0.2.31

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.
@@ -1,7 +1,7 @@
1
1
  import { FileChannelContextStore } from '../context/injection.js';
2
2
  import { createProviderConnectionsSessionStore } from '../connections-state-store.js';
3
3
  import { ProviderTurnPreparer } from '../context/turn-preparation.js';
4
- import { CLAUDE_PROVIDER_V2_COMPATIBILITY_GATE, CONNECTIONS_STATE_LAYER_COMPATIBILITY_GATE, CONTEXT_INJECTION_COMPATIBILITY_GATE, CODEX_PROVIDER_COMPATIBILITY_GATE, COPILOT_PROVIDER_V2_COMPATIBILITY_GATE, INTERNAL_PROVIDER_IMPLEMENTATIONS_ENV, LOCALHOST_GATEWAY_COMPATIBILITY_GATE, parseInternalProviderImplementationOverrides, POLICY_AUDIT_ENFORCEMENT_COMPATIBILITY_GATE, resolveInternalPolicyMode, resolveInternalCompatibilityGates, SKILL_RUNTIME_COMPATIBILITY_GATE, } from '../compatibility-gates.js';
4
+ import { CONNECTIONS_STATE_LAYER_COMPATIBILITY_GATE, CONTEXT_INJECTION_COMPATIBILITY_GATE, CODEX_PROVIDER_COMPATIBILITY_GATE, COPILOT_PROVIDER_V2_COMPATIBILITY_GATE, INTERNAL_PROVIDER_IMPLEMENTATIONS_ENV, LOCALHOST_GATEWAY_COMPATIBILITY_GATE, parseInternalProviderImplementationOverrides, POLICY_AUDIT_ENFORCEMENT_COMPATIBILITY_GATE, resolveInternalPolicyMode, resolveInternalCompatibilityGates, SKILL_RUNTIME_COMPATIBILITY_GATE, } from '../compatibility-gates.js';
5
5
  import { ClaudeCliClient } from './claude/cli-client.js';
6
6
  import { ClaudeProviderAdapter } from './claude/adapter.js';
7
7
  import { FileClaudeChannelSessionStore } from './claude/session-store.js';
@@ -45,22 +45,19 @@ class CliBackedProviderV2 {
45
45
  await this.cli.dispose();
46
46
  }
47
47
  }
48
- class ClaudeProviderV2 extends CliBackedProviderV2 {
49
- }
50
48
  class CopilotProviderV2 extends CliBackedProviderV2 {
51
49
  }
52
50
  const TASK_WORKSPACE_ROOT_DIR_ENV = 'AGENTS_HOST_INTERNAL_TASK_WORKSPACE_ROOT_DIR';
53
51
  const PROVIDER_V2_COMPATIBILITY_GATES = {
54
- claude: CLAUDE_PROVIDER_V2_COMPATIBILITY_GATE,
55
52
  copilot: COPILOT_PROVIDER_V2_COMPATIBILITY_GATE,
56
53
  };
57
- function resolveProviderImplementation(provider, routingConfig) {
58
- if (!routingConfig.compatibilityGates.has(PROVIDER_V2_COMPATIBILITY_GATES[provider])) {
54
+ function resolveCopilotImplementation(routingConfig) {
55
+ if (!routingConfig.compatibilityGates.has(PROVIDER_V2_COMPATIBILITY_GATES.copilot)) {
59
56
  return 'v1';
60
57
  }
61
- return routingConfig.implementationOverrides[provider] ?? 'v2';
58
+ return routingConfig.implementationOverrides.copilot ?? 'v2';
62
59
  }
63
- function createClaudeProvider(config, debugLogger, connectionsStateGateEnabled, implementation, turnPreparer) {
60
+ function createClaudeProvider(config, debugLogger, connectionsStateGateEnabled, turnPreparer) {
64
61
  const cli = new ClaudeCliClient(config.claudeCommand, config.claudeArgs, {}, createProviderConnectionsSessionStore({
65
62
  provider: 'claude',
66
63
  legacyStore: new FileClaudeChannelSessionStore({
@@ -70,9 +67,7 @@ function createClaudeProvider(config, debugLogger, connectionsStateGateEnabled,
70
67
  gateEnabled: connectionsStateGateEnabled,
71
68
  logger: debugLogger,
72
69
  }), config.resolveStableAgentId, debugLogger);
73
- return implementation === 'v2'
74
- ? new ProviderV2CompatibilityAdapter(new ClaudeProviderV2(cli), turnPreparer)
75
- : new ClaudeProviderAdapter(cli, turnPreparer);
70
+ return new ClaudeProviderAdapter(cli, turnPreparer);
76
71
  }
77
72
  function createCopilotProvider(config, debugLogger, connectionsStateGateEnabled, implementation, turnPreparer, policyAuditGateEnabled, authorizationAuditSink) {
78
73
  const policyMode = resolveInternalPolicyMode(policyAuditGateEnabled);
@@ -129,7 +124,7 @@ export function createProvider(config, debugLogger, options = {}) {
129
124
  const turnPreparer = new ProviderTurnPreparer(channelContextStore, debugLogger);
130
125
  switch (config.provider) {
131
126
  case 'claude': {
132
- return createClaudeProvider(config, debugLogger, connectionsStateGateEnabled, resolveProviderImplementation('claude', routingConfig), turnPreparer);
127
+ return createClaudeProvider(config, debugLogger, connectionsStateGateEnabled, turnPreparer);
133
128
  }
134
129
  case 'codex': {
135
130
  if (!routingConfig.compatibilityGates.has(CODEX_PROVIDER_COMPATIBILITY_GATE)) {
@@ -138,7 +133,7 @@ export function createProvider(config, debugLogger, options = {}) {
138
133
  return createCodexProvider(config, debugLogger, connectionsStateGateEnabled, turnPreparer);
139
134
  }
140
135
  case 'copilot': {
141
- return createCopilotProvider(config, debugLogger, connectionsStateGateEnabled, resolveProviderImplementation('copilot', routingConfig), turnPreparer, policyAuditGateEnabled, options.authorizationAuditSink);
136
+ return createCopilotProvider(config, debugLogger, connectionsStateGateEnabled, resolveCopilotImplementation(routingConfig), turnPreparer, policyAuditGateEnabled, options.authorizationAuditSink);
142
137
  }
143
138
  default:
144
139
  throw new Error(`Unsupported provider: ${String(config.provider)}`);
package/dist/types.d.ts CHANGED
@@ -377,6 +377,7 @@ export interface UpdateTaskInput {
377
377
  status?: string;
378
378
  assigneeId?: string;
379
379
  title?: string;
380
+ description?: string;
380
381
  }
381
382
  export interface ProviderProgressUpdate {
382
383
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borgee/agents-host",
3
- "version": "0.2.28",
3
+ "version": "0.2.31",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,11 +22,12 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
+ "@agentclientprotocol/claude-agent-acp": "0.64.0",
25
26
  "@agentclientprotocol/codex-acp": "1.1.7",
26
27
  "@agentclientprotocol/sdk": "1.3.0",
27
28
  "cross-spawn": "^7.0.6",
28
29
  "yaml": "^2.8.1",
29
- "@borgee/plugin-sdk": "0.2.4"
30
+ "@borgee/plugin-sdk": "0.2.5"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@types/cross-spawn": "^6.0.6",
@@ -317,9 +317,10 @@ function resolveGatewayRequest(payload, action, options) {
317
317
  ...(options.status != null ? { status: options.status } : {}),
318
318
  ...(options.assigneeId != null ? { assigneeId: options.assigneeId } : {}),
319
319
  ...(options.title != null ? { title: options.title } : {}),
320
+ ...(options.description != null ? { description: options.description } : {}),
320
321
  };
321
322
  if (Object.keys(requestBody).length === 0) {
322
- throw new Error('At least one of --status, --assignee-id, or --title is required for --update-task');
323
+ throw new Error('At least one of --status, --assignee-id, --title, or --description is required for --update-task');
323
324
  }
324
325
  if (payload.taskAssignmentContext?.active === true && !explicitTaskIdProvided(options)) {
325
326
  return {
@@ -270,8 +270,10 @@ def resolve_gateway_request(
270
270
  request_body["assigneeId"] = options["assignee_id"]
271
271
  if options.get("title") is not None:
272
272
  request_body["title"] = options["title"]
273
+ if options.get("description") is not None:
274
+ request_body["description"] = options["description"]
273
275
  if not request_body:
274
- raise ValueError("At least one of --status, --assignee-id, or --title is required for --update-task")
276
+ raise ValueError("At least one of --status, --assignee-id, --title, or --description is required for --update-task")
275
277
  if isinstance(task_assignment_context, dict) and task_assignment_context.get("active") is True and not explicit_task_id_provided(options):
276
278
  return f"{base_url}/v1/channels/{channel_id}/current-task", "PATCH", request_body, True
277
279
  return f"{base_url}/v1/tasks/{quote(str(task_id), safe='')}", "PATCH", request_body, False