@integrity-labs/agt-cli 0.28.492 → 0.28.494

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.
@@ -34365,6 +34365,18 @@ var FLAG_REGISTRY = [
34365
34365
  flagType: "boolean",
34366
34366
  defaultValue: false
34367
34367
  },
34368
+ {
34369
+ key: "id-keyed-layout-migration",
34370
+ description: "Dark migration engine (ENG-7891 / ADR-0049 slice 3): convert an EXISTING legacy codename-keyed agent host dir to the agent_id-keyed layout (real ~/.augmented/{agent_id} dir + codename compatibility symlink) at the next pre-spawn tick, moving the Claude transcript store so the agent keeps its history. Resolved PER-AGENT (getBooleanForAgent) so a one-way-door migration can be armed one agent at a time. Ships dark; NOT armed until a test-host rehearsal passes (the last ENG-7891 acceptance gate). Crash recovery + the per-agent preconditions (session-down, WhatsApp-writer quiesce, id-aware hook regen by the spawn funnel) are always-on and flag-independent; this flag only gates INITIATING a fresh conversion. Deliberately no host-wide env override - arming is per-agent to avoid flipping every legacy agent on a host at once.",
34371
+ flagType: "boolean",
34372
+ // Declared safe value is `false` = no migration. A flag-DB read error must
34373
+ // never move a customer agent's on-disk state on its own (fail-safe = leave
34374
+ // the legacy layout untouched).
34375
+ defaultValue: false,
34376
+ // One-way-door filesystem migration of a live agent's durable state: arming
34377
+ // it MOVES data, so mutations require explicit confirmation (ADR-0022 §4).
34378
+ sensitive: true
34379
+ },
34368
34380
  {
34369
34381
  key: "agent-hours-billing-enabled",
34370
34382
  description: "Agent-hours (utilisation) billing (ENG-7910). Per-org gate; ships dark. When on for an org, its closed billing periods are settled into org_agent_hours_settlements from the plan/override agent-hours terms, and the customer billing surface shows used-vs-included hours + projected overage. Off = no settlement written, no charge, surface hidden. Launch prices are seeded in plan_billing_terms; flip on per-org for a controlled rollout.",
@@ -40312,6 +40312,18 @@ var FLAG_REGISTRY = [
40312
40312
  flagType: "boolean",
40313
40313
  defaultValue: false
40314
40314
  },
40315
+ {
40316
+ key: "id-keyed-layout-migration",
40317
+ description: "Dark migration engine (ENG-7891 / ADR-0049 slice 3): convert an EXISTING legacy codename-keyed agent host dir to the agent_id-keyed layout (real ~/.augmented/{agent_id} dir + codename compatibility symlink) at the next pre-spawn tick, moving the Claude transcript store so the agent keeps its history. Resolved PER-AGENT (getBooleanForAgent) so a one-way-door migration can be armed one agent at a time. Ships dark; NOT armed until a test-host rehearsal passes (the last ENG-7891 acceptance gate). Crash recovery + the per-agent preconditions (session-down, WhatsApp-writer quiesce, id-aware hook regen by the spawn funnel) are always-on and flag-independent; this flag only gates INITIATING a fresh conversion. Deliberately no host-wide env override - arming is per-agent to avoid flipping every legacy agent on a host at once.",
40318
+ flagType: "boolean",
40319
+ // Declared safe value is `false` = no migration. A flag-DB read error must
40320
+ // never move a customer agent's on-disk state on its own (fail-safe = leave
40321
+ // the legacy layout untouched).
40322
+ defaultValue: false,
40323
+ // One-way-door filesystem migration of a live agent's durable state: arming
40324
+ // it MOVES data, so mutations require explicit confirmation (ADR-0022 §4).
40325
+ sensitive: true
40326
+ },
40315
40327
  {
40316
40328
  key: "agent-hours-billing-enabled",
40317
40329
  description: "Agent-hours (utilisation) billing (ENG-7910). Per-org gate; ships dark. When on for an org, its closed billing periods are settled into org_agent_hours_settlements from the plan/override agent-hours terms, and the customer billing surface shows used-vs-included hours + projected overage. Off = no settlement written, no charge, surface hidden. Launch prices are seeded in plan_billing_terms; flip on per-org for a controlled rollout.",
@@ -234,33 +234,60 @@ function mergeToolsListInto(ct, text) {
234
234
  }
235
235
  function ensureUnionManifest(token) {
236
236
  if (unionOnce) return unionOnce;
237
- unionOnce = (async () => {
237
+ const build = (async () => {
238
+ let reached = false;
239
+ let clean = true;
238
240
  try {
239
241
  const seed = await postRpc(token, buildToolsListRequest());
240
- mergeToolsListInto(seed.ct, seed.text);
242
+ if (seed.ok) {
243
+ reached = true;
244
+ mergeToolsListInto(seed.ct, seed.text);
245
+ } else {
246
+ clean = false;
247
+ logErr(`union: seed tools/list HTTP ${seed.status}`);
248
+ }
241
249
  } catch (err) {
250
+ clean = false;
242
251
  logErr(`union: seed tools/list failed: ${err.message}`);
243
252
  }
244
253
  for (const group of preEnableToolsets) {
245
254
  try {
246
255
  const en = await postRpc(token, buildEnableToolsetRequest(group));
247
256
  if (!en.ok) {
257
+ clean = false;
248
258
  logErr(`union: enable "${group}" HTTP ${en.status}`);
249
259
  continue;
250
260
  }
261
+ reached = true;
251
262
  for (const m of extractJsonRpcMessages(en.ct, en.text)) {
252
263
  for (const nm of parseEnableToolsetResponse(m).newlyAvailable) toolGroupByName.set(nm, group);
253
264
  }
254
265
  for (const nm of parseEnableToolsetResponse(en.text).newlyAvailable) toolGroupByName.set(nm, group);
255
266
  const li = await postRpc(token, buildToolsListRequest());
256
- mergeToolsListInto(li.ct, li.text);
267
+ if (li.ok) {
268
+ mergeToolsListInto(li.ct, li.text);
269
+ } else {
270
+ clean = false;
271
+ logErr(`union: post-enable tools/list "${group}" HTTP ${li.status}`);
272
+ }
257
273
  logErr(`union: enabled "${group}" (union now ${unionToolByName.size} tools, ${toolGroupByName.size} mapped)`);
258
274
  } catch (err) {
275
+ clean = false;
259
276
  logErr(`union: enable "${group}" failed: ${err.message}`);
260
277
  }
261
278
  }
279
+ return { reached, clean };
262
280
  })();
263
- return unionOnce;
281
+ unionOnce = build;
282
+ void build.then(
283
+ (r) => {
284
+ if (!r.reached) unionOnce = null;
285
+ },
286
+ () => {
287
+ unionOnce = null;
288
+ }
289
+ );
290
+ return build;
264
291
  }
265
292
  async function forward(line, id, isNotification, method, params) {
266
293
  if (preEnableToolsets.length > 0 && isManagedActivationCall(method, params)) {
@@ -273,10 +300,15 @@ async function forward(line, id, isNotification, method, params) {
273
300
  return isNotification ? [] : [jsonRpcError(id, -32e3, `${label}: no current access token available (reconnect the integration)`)];
274
301
  }
275
302
  if (method === "tools/list" && preEnableToolsets.length > 0) {
276
- await ensureUnionManifest(token);
303
+ const build = await ensureUnionManifest(token);
277
304
  let tools = [...unionToolByName.values()];
278
305
  if (toolAllowlist.size > 0) tools = tools.filter((t) => toolAllowlist.has(toolName(t)));
279
306
  tools = stripActivationTool(tools);
307
+ if (tools.length === 0 && !build.clean) {
308
+ const why = build.reached ? "upstream calls failed while building it" : "upstream unreachable or token rejected";
309
+ logErr(`tools/list: refusing empty manifest (${why})`);
310
+ return isNotification ? [] : [jsonRpcError(id, -32003, `${label}: could not build the tool manifest (${why}) - reconnect the integration or retry`)];
311
+ }
280
312
  return [JSON.stringify({ jsonrpc: "2.0", id: id ?? null, result: { tools } })];
281
313
  }
282
314
  if (method === "tools/call" && preEnableToolsets.length > 0) {
@@ -34590,6 +34590,18 @@ var FLAG_REGISTRY = [
34590
34590
  flagType: "boolean",
34591
34591
  defaultValue: false
34592
34592
  },
34593
+ {
34594
+ key: "id-keyed-layout-migration",
34595
+ description: "Dark migration engine (ENG-7891 / ADR-0049 slice 3): convert an EXISTING legacy codename-keyed agent host dir to the agent_id-keyed layout (real ~/.augmented/{agent_id} dir + codename compatibility symlink) at the next pre-spawn tick, moving the Claude transcript store so the agent keeps its history. Resolved PER-AGENT (getBooleanForAgent) so a one-way-door migration can be armed one agent at a time. Ships dark; NOT armed until a test-host rehearsal passes (the last ENG-7891 acceptance gate). Crash recovery + the per-agent preconditions (session-down, WhatsApp-writer quiesce, id-aware hook regen by the spawn funnel) are always-on and flag-independent; this flag only gates INITIATING a fresh conversion. Deliberately no host-wide env override - arming is per-agent to avoid flipping every legacy agent on a host at once.",
34596
+ flagType: "boolean",
34597
+ // Declared safe value is `false` = no migration. A flag-DB read error must
34598
+ // never move a customer agent's on-disk state on its own (fail-safe = leave
34599
+ // the legacy layout untouched).
34600
+ defaultValue: false,
34601
+ // One-way-door filesystem migration of a live agent's durable state: arming
34602
+ // it MOVES data, so mutations require explicit confirmation (ADR-0022 §4).
34603
+ sensitive: true
34604
+ },
34593
34605
  {
34594
34606
  key: "agent-hours-billing-enabled",
34595
34607
  description: "Agent-hours (utilisation) billing (ENG-7910). Per-org gate; ships dark. When on for an org, its closed billing periods are settled into org_agent_hours_settlements from the plan/override agent-hours terms, and the customer billing surface shows used-vs-included hours + projected overage. Off = no settlement written, no charge, surface hidden. Launch prices are seeded in plan_billing_terms; flip on per-org for a controlled rollout.",
@@ -34916,6 +34916,18 @@ var FLAG_REGISTRY = [
34916
34916
  flagType: "boolean",
34917
34917
  defaultValue: false
34918
34918
  },
34919
+ {
34920
+ key: "id-keyed-layout-migration",
34921
+ description: "Dark migration engine (ENG-7891 / ADR-0049 slice 3): convert an EXISTING legacy codename-keyed agent host dir to the agent_id-keyed layout (real ~/.augmented/{agent_id} dir + codename compatibility symlink) at the next pre-spawn tick, moving the Claude transcript store so the agent keeps its history. Resolved PER-AGENT (getBooleanForAgent) so a one-way-door migration can be armed one agent at a time. Ships dark; NOT armed until a test-host rehearsal passes (the last ENG-7891 acceptance gate). Crash recovery + the per-agent preconditions (session-down, WhatsApp-writer quiesce, id-aware hook regen by the spawn funnel) are always-on and flag-independent; this flag only gates INITIATING a fresh conversion. Deliberately no host-wide env override - arming is per-agent to avoid flipping every legacy agent on a host at once.",
34922
+ flagType: "boolean",
34923
+ // Declared safe value is `false` = no migration. A flag-DB read error must
34924
+ // never move a customer agent's on-disk state on its own (fail-safe = leave
34925
+ // the legacy layout untouched).
34926
+ defaultValue: false,
34927
+ // One-way-door filesystem migration of a live agent's durable state: arming
34928
+ // it MOVES data, so mutations require explicit confirmation (ADR-0022 §4).
34929
+ sensitive: true
34930
+ },
34919
34931
  {
34920
34932
  key: "agent-hours-billing-enabled",
34921
34933
  description: "Agent-hours (utilisation) billing (ENG-7910). Per-org gate; ships dark. When on for an org, its closed billing periods are settled into org_agent_hours_settlements from the plan/override agent-hours terms, and the customer billing surface shows used-vs-included hours + projected overage. Off = no settlement written, no charge, surface hidden. Launch prices are seeded in plan_billing_terms; flip on per-org for a controlled rollout.",
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-34E3FHOS.js";
39
+ } from "./chunk-JHEJP3KC.js";
40
40
  import "./chunk-XWVM4KPK.js";
41
41
  export {
42
42
  EGRESS_BASELINE_DOMAINS,
@@ -77,4 +77,4 @@ export {
77
77
  writeEgressAllowlist,
78
78
  writePersistentClaudeWrapper
79
79
  };
80
- //# sourceMappingURL=persistent-session-Y3WIXJPW.js.map
80
+ //# sourceMappingURL=persistent-session-JEN37LZS.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-34E3FHOS.js";
3
+ } from "./chunk-JHEJP3KC.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -596,4 +596,4 @@ export {
596
596
  readAndResetSlackReplyBindingClassifications,
597
597
  readAndResetSlackReplyTargetClassifications
598
598
  };
599
- //# sourceMappingURL=responsiveness-probe-AEFEFKOQ.js.map
599
+ //# sourceMappingURL=responsiveness-probe-MSXL7NVR.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.492",
3
+ "version": "0.28.494",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {