@integrity-labs/agt-cli 0.28.1136 → 0.28.1138

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 (29) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-AMW44JCN.js → chunk-3INFJV37.js} +4 -4
  3. package/dist/{chunk-773ZNDNR.js → chunk-EIXOI2ZB.js} +20 -1
  4. package/dist/{chunk-773ZNDNR.js.map → chunk-EIXOI2ZB.js.map} +1 -1
  5. package/dist/{chunk-PGTZFME3.js → chunk-J6ORWGUB.js} +2 -2
  6. package/dist/{claude-pair-runtime-6SJHKHRE.js → claude-pair-runtime-VQGEM5AY.js} +2 -2
  7. package/dist/lib/manager-worker.js +16 -16
  8. package/dist/mcp/augmented-admin.js +164 -54
  9. package/dist/mcp/augmented-help-kb.js +164 -54
  10. package/dist/mcp/augmented-support.js +164 -54
  11. package/dist/mcp/direct-chat-channel.js +108 -41
  12. package/dist/mcp/index.js +270 -64
  13. package/dist/mcp/origami.js +108 -41
  14. package/dist/mcp/slack-channel.js +108 -41
  15. package/dist/mcp/teams-channel.js +89 -41
  16. package/dist/mcp/telegram-channel.js +108 -41
  17. package/dist/mcp/whatsapp-channel.js +5447 -4340
  18. package/dist/mcp/whatsapp-link.js +5442 -4383
  19. package/dist/mcp/xero.js +6048 -2067
  20. package/dist/{persistent-session-6W6PZGNB.js → persistent-session-ZBKLEYUQ.js} +3 -3
  21. package/dist/{responsiveness-probe-LLYHYZR7.js → responsiveness-probe-FXDO35IT.js} +3 -3
  22. package/dist/{session-auth-dead-QZET5C3W.js → session-auth-dead-OGNOSJIB.js} +2 -2
  23. package/package.json +2 -2
  24. /package/dist/{chunk-AMW44JCN.js.map → chunk-3INFJV37.js.map} +0 -0
  25. /package/dist/{chunk-PGTZFME3.js.map → chunk-J6ORWGUB.js.map} +0 -0
  26. /package/dist/{claude-pair-runtime-6SJHKHRE.js.map → claude-pair-runtime-VQGEM5AY.js.map} +0 -0
  27. /package/dist/{persistent-session-6W6PZGNB.js.map → persistent-session-ZBKLEYUQ.js.map} +0 -0
  28. /package/dist/{responsiveness-probe-LLYHYZR7.js.map → responsiveness-probe-FXDO35IT.js.map} +0 -0
  29. /package/dist/{session-auth-dead-QZET5C3W.js.map → session-auth-dead-OGNOSJIB.js.map} +0 -0
@@ -26040,7 +26040,7 @@ function _refine(Class2, fn, _params) {
26040
26040
  return schema;
26041
26041
  }
26042
26042
 
26043
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
26043
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
26044
26044
  function isZ4Schema(s) {
26045
26045
  const schema = s;
26046
26046
  return !!schema._zod;
@@ -26798,7 +26798,7 @@ function preprocess(fn, schema) {
26798
26798
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
26799
26799
  config(en_default());
26800
26800
 
26801
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
26801
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
26802
26802
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
26803
26803
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
26804
26804
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -26808,10 +26808,9 @@ var ProgressTokenSchema = union([string2(), number2().int()]);
26808
26808
  var CursorSchema = string2();
26809
26809
  var TaskCreationParamsSchema = looseObject({
26810
26810
  /**
26811
- * Time in milliseconds to keep task results available after completion.
26812
- * If null, the task has unlimited lifetime until manually cleaned up.
26811
+ * Requested duration in milliseconds to retain task from creation.
26813
26812
  */
26814
- ttl: union([number2(), _null3()]).optional(),
26813
+ ttl: number2().optional(),
26815
26814
  /**
26816
26815
  * Time in milliseconds to wait between task status requests.
26817
26816
  */
@@ -27111,7 +27110,11 @@ var ClientCapabilitiesSchema = object2({
27111
27110
  /**
27112
27111
  * Present if the client supports task creation.
27113
27112
  */
27114
- tasks: ClientTasksCapabilitySchema.optional()
27113
+ tasks: ClientTasksCapabilitySchema.optional(),
27114
+ /**
27115
+ * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
27116
+ */
27117
+ extensions: record(string2(), AssertObjectSchema).optional()
27115
27118
  });
27116
27119
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
27117
27120
  /**
@@ -27172,7 +27175,11 @@ var ServerCapabilitiesSchema = object2({
27172
27175
  /**
27173
27176
  * Present if the server supports task creation.
27174
27177
  */
27175
- tasks: ServerTasksCapabilitySchema.optional()
27178
+ tasks: ServerTasksCapabilitySchema.optional(),
27179
+ /**
27180
+ * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
27181
+ */
27182
+ extensions: record(string2(), AssertObjectSchema).optional()
27176
27183
  });
27177
27184
  var InitializeResultSchema = ResultSchema.extend({
27178
27185
  /**
@@ -27364,6 +27371,12 @@ var ResourceSchema = object2({
27364
27371
  * The MIME type of this resource, if known.
27365
27372
  */
27366
27373
  mimeType: optional(string2()),
27374
+ /**
27375
+ * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
27376
+ *
27377
+ * This can be used by Hosts to display file sizes and estimate context window usage.
27378
+ */
27379
+ size: optional(number2()),
27367
27380
  /**
27368
27381
  * Optional annotations for the client.
27369
27382
  */
@@ -28304,7 +28317,7 @@ var UrlElicitationRequiredError = class extends McpError {
28304
28317
  }
28305
28318
  };
28306
28319
 
28307
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
28320
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
28308
28321
  function isTerminal(status) {
28309
28322
  return status === "completed" || status === "failed" || status === "cancelled";
28310
28323
  }
@@ -28312,7 +28325,7 @@ function isTerminal(status) {
28312
28325
  // ../../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
28313
28326
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
28314
28327
 
28315
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
28328
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
28316
28329
  function getMethodLiteral(schema) {
28317
28330
  const shape = getObjectShape(schema);
28318
28331
  const methodSchema = shape?.method;
@@ -28333,7 +28346,7 @@ function parseWithCompat(schema, data) {
28333
28346
  return result.data;
28334
28347
  }
28335
28348
 
28336
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
28349
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
28337
28350
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
28338
28351
  var Protocol = class {
28339
28352
  constructor(_options) {
@@ -28374,6 +28387,9 @@ var Protocol = class {
28374
28387
  this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
28375
28388
  const handleTaskResult = async () => {
28376
28389
  const taskId = request.params.taskId;
28390
+ if (!await this._taskStore.getTask(taskId, extra.sessionId)) {
28391
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
28392
+ }
28377
28393
  if (this._taskMessageQueue) {
28378
28394
  let queuedMessage;
28379
28395
  while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
@@ -28404,12 +28420,12 @@ var Protocol = class {
28404
28420
  throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
28405
28421
  }
28406
28422
  if (!isTerminal(task.status)) {
28407
- await this._waitForTaskUpdate(taskId, extra.signal);
28423
+ await this._waitForTaskUpdate(taskId, extra.signal, extra.sessionId);
28408
28424
  return await handleTaskResult();
28409
28425
  }
28410
28426
  if (isTerminal(task.status)) {
28411
28427
  const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
28412
- this._clearTaskQueue(taskId);
28428
+ this._clearTaskQueue(taskId, extra.sessionId);
28413
28429
  return {
28414
28430
  ...result,
28415
28431
  _meta: {
@@ -28446,7 +28462,7 @@ var Protocol = class {
28446
28462
  throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
28447
28463
  }
28448
28464
  await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
28449
- this._clearTaskQueue(request.params.taskId);
28465
+ this._clearTaskQueue(request.params.taskId, extra.sessionId);
28450
28466
  const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
28451
28467
  if (!cancelledTask) {
28452
28468
  throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
@@ -28545,6 +28561,10 @@ var Protocol = class {
28545
28561
  this._progressHandlers.clear();
28546
28562
  this._taskProgressTokens.clear();
28547
28563
  this._pendingDebouncedNotifications.clear();
28564
+ for (const info of this._timeoutInfo.values()) {
28565
+ clearTimeout(info.timeoutId);
28566
+ }
28567
+ this._timeoutInfo.clear();
28548
28568
  for (const controller of this._requestHandlerAbortControllers.values()) {
28549
28569
  controller.abort();
28550
28570
  }
@@ -28570,6 +28590,19 @@ var Protocol = class {
28570
28590
  const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
28571
28591
  const capturedTransport = this._transport;
28572
28592
  const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
28593
+ const sessionId = capturedTransport?.sessionId;
28594
+ const store = this._taskStore;
28595
+ let relatedTaskFound = true;
28596
+ let relatedTaskLookup;
28597
+ if (relatedTaskId && store && this._taskMessageQueue && sessionId !== void 0) {
28598
+ relatedTaskFound = false;
28599
+ relatedTaskLookup = (async () => {
28600
+ if (!await store.getTask(relatedTaskId, sessionId)) {
28601
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
28602
+ }
28603
+ relatedTaskFound = true;
28604
+ })();
28605
+ }
28573
28606
  if (handler === void 0) {
28574
28607
  const errorResponse = {
28575
28608
  jsonrpc: "2.0",
@@ -28579,7 +28612,10 @@ var Protocol = class {
28579
28612
  message: "Method not found"
28580
28613
  }
28581
28614
  };
28582
- if (relatedTaskId && this._taskMessageQueue) {
28615
+ if (relatedTaskId && relatedTaskLookup) {
28616
+ const queuedError = { type: "error", message: errorResponse, timestamp: Date.now() };
28617
+ relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error2) => this._onerror(new Error(`Failed to send an error response: ${error2}`)));
28618
+ } else if (relatedTaskId && this._taskMessageQueue) {
28583
28619
  this._enqueueTaskMessage(relatedTaskId, {
28584
28620
  type: "error",
28585
28621
  message: errorResponse,
@@ -28630,7 +28666,10 @@ var Protocol = class {
28630
28666
  closeSSEStream: extra?.closeSSEStream,
28631
28667
  closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
28632
28668
  };
28633
- Promise.resolve().then(() => {
28669
+ (relatedTaskLookup ?? Promise.resolve()).then(() => {
28670
+ if (relatedTaskLookup && abortController.signal.aborted) {
28671
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
28672
+ }
28634
28673
  if (taskCreationParams) {
28635
28674
  this.assertTaskHandlerCapability(request.method);
28636
28675
  }
@@ -28665,7 +28704,7 @@ var Protocol = class {
28665
28704
  ...error2["data"] !== void 0 && { data: error2["data"] }
28666
28705
  }
28667
28706
  };
28668
- if (relatedTaskId && this._taskMessageQueue) {
28707
+ if (relatedTaskId && this._taskMessageQueue && relatedTaskFound) {
28669
28708
  await this._enqueueTaskMessage(relatedTaskId, {
28670
28709
  type: "error",
28671
28710
  message: errorResponse,
@@ -28675,7 +28714,9 @@ var Protocol = class {
28675
28714
  await capturedTransport?.send(errorResponse);
28676
28715
  }
28677
28716
  }).catch((error2) => this._onerror(new Error(`Failed to send response: ${error2}`))).finally(() => {
28678
- this._requestHandlerAbortControllers.delete(request.id);
28717
+ if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
28718
+ this._requestHandlerAbortControllers.delete(request.id);
28719
+ }
28679
28720
  });
28680
28721
  }
28681
28722
  _onprogress(notification) {
@@ -29143,7 +29184,7 @@ var Protocol = class {
29143
29184
  throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
29144
29185
  }
29145
29186
  const maxQueueSize = this._options?.maxTaskQueueSize;
29146
- await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
29187
+ await this._taskMessageQueue.enqueue(taskId, message, sessionId ?? this._transport?.sessionId, maxQueueSize);
29147
29188
  }
29148
29189
  /**
29149
29190
  * Clears the message queue for a task and rejects any pending request resolvers.
@@ -29172,12 +29213,13 @@ var Protocol = class {
29172
29213
  * Uses polling to check for updates at the task's configured poll interval.
29173
29214
  * @param taskId The task ID to wait for
29174
29215
  * @param signal Abort signal to cancel the wait
29216
+ * @param sessionId Session of the request that waits, passed to the task store
29175
29217
  * @returns Promise that resolves when an update occurs or rejects if aborted
29176
29218
  */
29177
- async _waitForTaskUpdate(taskId, signal) {
29219
+ async _waitForTaskUpdate(taskId, signal, sessionId) {
29178
29220
  let interval = this._options?.defaultTaskPollInterval ?? 1e3;
29179
29221
  try {
29180
- const task = await this._taskStore?.getTask(taskId);
29222
+ const task = await this._taskStore?.getTask(taskId, sessionId);
29181
29223
  if (task?.pollInterval) {
29182
29224
  interval = task.pollInterval;
29183
29225
  }
@@ -29281,7 +29323,7 @@ function mergeCapabilities(base, additional) {
29281
29323
  return result;
29282
29324
  }
29283
29325
 
29284
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
29326
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
29285
29327
  var import_ajv = __toESM(require_ajv(), 1);
29286
29328
  var import_ajv_formats = __toESM(require_dist(), 1);
29287
29329
  function createDefaultAjvInstance() {
@@ -29349,7 +29391,7 @@ var AjvJsonSchemaValidator = class {
29349
29391
  }
29350
29392
  };
29351
29393
 
29352
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
29394
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
29353
29395
  var ExperimentalServerTasks = class {
29354
29396
  constructor(_server) {
29355
29397
  this._server = _server;
@@ -29562,7 +29604,7 @@ var ExperimentalServerTasks = class {
29562
29604
  }
29563
29605
  };
29564
29606
 
29565
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
29607
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
29566
29608
  function assertToolsCallTaskCapability(requests, method, entityName) {
29567
29609
  if (!requests) {
29568
29610
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -29597,7 +29639,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
29597
29639
  }
29598
29640
  }
29599
29641
 
29600
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
29642
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
29601
29643
  var Server = class extends Protocol {
29602
29644
  /**
29603
29645
  * Initializes this server with the given name and version information.
@@ -29663,16 +29705,7 @@ var Server = class extends Protocol {
29663
29705
  if (!methodSchema) {
29664
29706
  throw new Error("Schema is missing a method literal");
29665
29707
  }
29666
- let methodValue;
29667
- if (isZ4Schema(methodSchema)) {
29668
- const v4Schema = methodSchema;
29669
- const v4Def = v4Schema._zod?.def;
29670
- methodValue = v4Def?.value ?? v4Schema.value;
29671
- } else {
29672
- const v3Schema = methodSchema;
29673
- const legacyDef = v3Schema._def;
29674
- methodValue = legacyDef?.value ?? v3Schema.value;
29675
- }
29708
+ const methodValue = getLiteralValue(methodSchema);
29676
29709
  if (typeof methodValue !== "string") {
29677
29710
  throw new Error("Schema method literal must be a string");
29678
29711
  }
@@ -30168,12 +30201,21 @@ function buildChannelAddNoticeText(added) {
30168
30201
  return `Quick heads-up \u2014 I briefly restarted to update my configuration. I'm back now; please re-send anything I might have missed.`;
30169
30202
  }
30170
30203
 
30171
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30204
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30172
30205
  import process2 from "process";
30173
30206
 
30174
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30207
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30208
+ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
30175
30209
  var ReadBuffer = class {
30210
+ constructor(options) {
30211
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
30212
+ }
30176
30213
  append(chunk) {
30214
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
30215
+ if (newSize > this._maxBufferSize) {
30216
+ this.clear();
30217
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
30218
+ }
30177
30219
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
30178
30220
  }
30179
30221
  readMessage() {
@@ -30199,20 +30241,26 @@ function serializeMessage(message) {
30199
30241
  return JSON.stringify(message) + "\n";
30200
30242
  }
30201
30243
 
30202
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30244
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30203
30245
  var StdioServerTransport = class {
30204
- constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
30246
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
30205
30247
  this._stdin = _stdin;
30206
30248
  this._stdout = _stdout;
30207
- this._readBuffer = new ReadBuffer();
30208
30249
  this._started = false;
30209
30250
  this._ondata = (chunk) => {
30210
- this._readBuffer.append(chunk);
30211
- this.processReadBuffer();
30251
+ try {
30252
+ this._readBuffer.append(chunk);
30253
+ this.processReadBuffer();
30254
+ } catch (error2) {
30255
+ this.onerror?.(error2);
30256
+ this.close().catch(() => {
30257
+ });
30258
+ }
30212
30259
  };
30213
30260
  this._onerror = (error2) => {
30214
30261
  this.onerror?.(error2);
30215
30262
  };
30263
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
30216
30264
  }
30217
30265
  /**
30218
30266
  * Starts listening for messages on stdin.
@@ -39997,6 +40045,25 @@ var FLAG_REGISTRY = [
39997
40045
  // it back on for their own org.
39998
40046
  platformAdminOnly: true
39999
40047
  },
40048
+ {
40049
+ key: "two-factor-settings",
40050
+ description: "Show Settings > Two-factor authentication, where a console user sets up or removes an authenticator app (ENG-11619). Gates SETTING UP only: anyone who already has an authenticator is asked for a code before a console page loads whatever this flag says, so switching it off never turns an existing user's two-factor off. Phase 1: console pages only, not the API.",
40051
+ flagType: "boolean",
40052
+ // PUBLIC (ADR-0022 §2): the nav reads it via usePublicBooleanFlag and the
40053
+ // page via getPublicBooleanFlagServer, so it is in the GET /flags map. No
40054
+ // env override (UI rollout, not an operator gate). Ships dark (default
40055
+ // false). The staff factor reset on the admin organization page is in
40056
+ // place, so a lost phone is recoverable.
40057
+ public: true,
40058
+ defaultValue: false,
40059
+ // Platform admin only until ENG-11619 phase 2. Phase 1 gates console PAGE
40060
+ // LOADS: an enrolled user's password-only (aal1) session is still accepted
40061
+ // by the Hono API and the webapp's /api/* handlers. An org admin switching
40062
+ // this on would reasonably believe a stolen password is now useless, and
40063
+ // it is not yet (Obi Wan be8af20e689c on #7092). Drop this once phase 2
40064
+ // refuses aal1 there too.
40065
+ platformAdminOnly: true
40066
+ },
40000
40067
  {
40001
40068
  key: "platform-maintenance-mode",
40002
40069
  description: 'Platform-wide maintenance mode (ENG-6506; widened to modes by ENG-11436). off = normal operation (ships dark; channels behave exactly as today). tools-offline = every agent KEEPS conversing but every Augmented tool that WRITES to the control plane refuses with a reason, so nothing is created during a window whose database restore would discard it; reads are untouched. fleet-offline = the previous boolean-true behaviour AND the write gate: admitted human inbound gets a "we are offline for maintenance" notice instead of being dispatched, for whole-platform downtime such as DB upgrades. The modes are CUMULATIVE \u2014 fleet-offline gates writes too, because silencing channel inbound does not stop a /loop or a scheduled task filing work. Read host-side per inbound and per tool call from the flags cache (no MCP restart). (Proactive "back online" follow-up is the ENG-6508 fast-follow, not this flag.)',