@integrity-labs/agt-cli 0.28.1137 → 0.28.1139

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 (30) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-LQCWKNFX.js → chunk-7U4VSBOE.js} +2 -2
  3. package/dist/{chunk-WIU4HUHD.js → chunk-DYFE224A.js} +33 -1
  4. package/dist/{chunk-WIU4HUHD.js.map → chunk-DYFE224A.js.map} +1 -1
  5. package/dist/{chunk-HZFUOGUV.js → chunk-PI2WUKWD.js} +4 -4
  6. package/dist/{claude-pair-runtime-OZLZFJZR.js → claude-pair-runtime-BOTE3DRW.js} +2 -2
  7. package/dist/lib/manager-worker.js +261 -16
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/augmented-admin.js +164 -54
  10. package/dist/mcp/augmented-help-kb.js +164 -54
  11. package/dist/mcp/augmented-support.js +164 -54
  12. package/dist/mcp/direct-chat-channel.js +121 -41
  13. package/dist/mcp/index.js +243 -59
  14. package/dist/mcp/origami.js +121 -41
  15. package/dist/mcp/slack-channel.js +121 -41
  16. package/dist/mcp/teams-channel.js +89 -41
  17. package/dist/mcp/telegram-channel.js +121 -41
  18. package/dist/mcp/whatsapp-channel.js +5447 -4340
  19. package/dist/mcp/whatsapp-link.js +5442 -4383
  20. package/dist/mcp/xero.js +6048 -2067
  21. package/dist/{persistent-session-2X3BCGV5.js → persistent-session-6O66QEI4.js} +3 -3
  22. package/dist/{responsiveness-probe-QFLFS5QX.js → responsiveness-probe-WGD3NDWG.js} +3 -3
  23. package/dist/{session-auth-dead-QE7GT5Y5.js → session-auth-dead-6N2AEFKX.js} +2 -2
  24. package/package.json +2 -2
  25. /package/dist/{chunk-LQCWKNFX.js.map → chunk-7U4VSBOE.js.map} +0 -0
  26. /package/dist/{chunk-HZFUOGUV.js.map → chunk-PI2WUKWD.js.map} +0 -0
  27. /package/dist/{claude-pair-runtime-OZLZFJZR.js.map → claude-pair-runtime-BOTE3DRW.js.map} +0 -0
  28. /package/dist/{persistent-session-2X3BCGV5.js.map → persistent-session-6O66QEI4.js.map} +0 -0
  29. /package/dist/{responsiveness-probe-QFLFS5QX.js.map → responsiveness-probe-WGD3NDWG.js.map} +0 -0
  30. /package/dist/{session-auth-dead-QE7GT5Y5.js.map → session-auth-dead-6N2AEFKX.js.map} +0 -0
@@ -31878,7 +31878,7 @@ function _refine(Class2, fn, _params) {
31878
31878
  return schema;
31879
31879
  }
31880
31880
 
31881
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
31881
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
31882
31882
  function isZ4Schema(s) {
31883
31883
  const schema = s;
31884
31884
  return !!schema._zod;
@@ -32636,7 +32636,7 @@ function preprocess(fn, schema) {
32636
32636
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
32637
32637
  config(en_default());
32638
32638
 
32639
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32639
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32640
32640
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
32641
32641
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
32642
32642
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -32646,10 +32646,9 @@ var ProgressTokenSchema = union([string2(), number2().int()]);
32646
32646
  var CursorSchema = string2();
32647
32647
  var TaskCreationParamsSchema = looseObject({
32648
32648
  /**
32649
- * Time in milliseconds to keep task results available after completion.
32650
- * If null, the task has unlimited lifetime until manually cleaned up.
32649
+ * Requested duration in milliseconds to retain task from creation.
32651
32650
  */
32652
- ttl: union([number2(), _null3()]).optional(),
32651
+ ttl: number2().optional(),
32653
32652
  /**
32654
32653
  * Time in milliseconds to wait between task status requests.
32655
32654
  */
@@ -32949,7 +32948,11 @@ var ClientCapabilitiesSchema = object2({
32949
32948
  /**
32950
32949
  * Present if the client supports task creation.
32951
32950
  */
32952
- tasks: ClientTasksCapabilitySchema.optional()
32951
+ tasks: ClientTasksCapabilitySchema.optional(),
32952
+ /**
32953
+ * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
32954
+ */
32955
+ extensions: record(string2(), AssertObjectSchema).optional()
32953
32956
  });
32954
32957
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
32955
32958
  /**
@@ -33010,7 +33013,11 @@ var ServerCapabilitiesSchema = object2({
33010
33013
  /**
33011
33014
  * Present if the server supports task creation.
33012
33015
  */
33013
- tasks: ServerTasksCapabilitySchema.optional()
33016
+ tasks: ServerTasksCapabilitySchema.optional(),
33017
+ /**
33018
+ * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
33019
+ */
33020
+ extensions: record(string2(), AssertObjectSchema).optional()
33014
33021
  });
33015
33022
  var InitializeResultSchema = ResultSchema.extend({
33016
33023
  /**
@@ -33202,6 +33209,12 @@ var ResourceSchema = object2({
33202
33209
  * The MIME type of this resource, if known.
33203
33210
  */
33204
33211
  mimeType: optional(string2()),
33212
+ /**
33213
+ * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
33214
+ *
33215
+ * This can be used by Hosts to display file sizes and estimate context window usage.
33216
+ */
33217
+ size: optional(number2()),
33205
33218
  /**
33206
33219
  * Optional annotations for the client.
33207
33220
  */
@@ -34142,7 +34155,7 @@ var UrlElicitationRequiredError = class extends McpError {
34142
34155
  }
34143
34156
  };
34144
34157
 
34145
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34158
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34146
34159
  function isTerminal(status) {
34147
34160
  return status === "completed" || status === "failed" || status === "cancelled";
34148
34161
  }
@@ -34150,7 +34163,7 @@ function isTerminal(status) {
34150
34163
  // ../../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
34151
34164
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
34152
34165
 
34153
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34166
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34154
34167
  function getMethodLiteral(schema) {
34155
34168
  const shape = getObjectShape(schema);
34156
34169
  const methodSchema = shape?.method;
@@ -34171,7 +34184,7 @@ function parseWithCompat(schema, data) {
34171
34184
  return result.data;
34172
34185
  }
34173
34186
 
34174
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
34187
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
34175
34188
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
34176
34189
  var Protocol = class {
34177
34190
  constructor(_options) {
@@ -34212,6 +34225,9 @@ var Protocol = class {
34212
34225
  this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
34213
34226
  const handleTaskResult = async () => {
34214
34227
  const taskId = request.params.taskId;
34228
+ if (!await this._taskStore.getTask(taskId, extra.sessionId)) {
34229
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
34230
+ }
34215
34231
  if (this._taskMessageQueue) {
34216
34232
  let queuedMessage;
34217
34233
  while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
@@ -34242,12 +34258,12 @@ var Protocol = class {
34242
34258
  throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
34243
34259
  }
34244
34260
  if (!isTerminal(task.status)) {
34245
- await this._waitForTaskUpdate(taskId, extra.signal);
34261
+ await this._waitForTaskUpdate(taskId, extra.signal, extra.sessionId);
34246
34262
  return await handleTaskResult();
34247
34263
  }
34248
34264
  if (isTerminal(task.status)) {
34249
34265
  const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
34250
- this._clearTaskQueue(taskId);
34266
+ this._clearTaskQueue(taskId, extra.sessionId);
34251
34267
  return {
34252
34268
  ...result,
34253
34269
  _meta: {
@@ -34284,7 +34300,7 @@ var Protocol = class {
34284
34300
  throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
34285
34301
  }
34286
34302
  await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
34287
- this._clearTaskQueue(request.params.taskId);
34303
+ this._clearTaskQueue(request.params.taskId, extra.sessionId);
34288
34304
  const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
34289
34305
  if (!cancelledTask) {
34290
34306
  throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
@@ -34383,6 +34399,10 @@ var Protocol = class {
34383
34399
  this._progressHandlers.clear();
34384
34400
  this._taskProgressTokens.clear();
34385
34401
  this._pendingDebouncedNotifications.clear();
34402
+ for (const info of this._timeoutInfo.values()) {
34403
+ clearTimeout(info.timeoutId);
34404
+ }
34405
+ this._timeoutInfo.clear();
34386
34406
  for (const controller of this._requestHandlerAbortControllers.values()) {
34387
34407
  controller.abort();
34388
34408
  }
@@ -34408,6 +34428,19 @@ var Protocol = class {
34408
34428
  const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
34409
34429
  const capturedTransport = this._transport;
34410
34430
  const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
34431
+ const sessionId = capturedTransport?.sessionId;
34432
+ const store = this._taskStore;
34433
+ let relatedTaskFound = true;
34434
+ let relatedTaskLookup;
34435
+ if (relatedTaskId && store && this._taskMessageQueue && sessionId !== void 0) {
34436
+ relatedTaskFound = false;
34437
+ relatedTaskLookup = (async () => {
34438
+ if (!await store.getTask(relatedTaskId, sessionId)) {
34439
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
34440
+ }
34441
+ relatedTaskFound = true;
34442
+ })();
34443
+ }
34411
34444
  if (handler === void 0) {
34412
34445
  const errorResponse = {
34413
34446
  jsonrpc: "2.0",
@@ -34417,7 +34450,10 @@ var Protocol = class {
34417
34450
  message: "Method not found"
34418
34451
  }
34419
34452
  };
34420
- if (relatedTaskId && this._taskMessageQueue) {
34453
+ if (relatedTaskId && relatedTaskLookup) {
34454
+ const queuedError = { type: "error", message: errorResponse, timestamp: Date.now() };
34455
+ relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error2) => this._onerror(new Error(`Failed to send an error response: ${error2}`)));
34456
+ } else if (relatedTaskId && this._taskMessageQueue) {
34421
34457
  this._enqueueTaskMessage(relatedTaskId, {
34422
34458
  type: "error",
34423
34459
  message: errorResponse,
@@ -34468,7 +34504,10 @@ var Protocol = class {
34468
34504
  closeSSEStream: extra?.closeSSEStream,
34469
34505
  closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
34470
34506
  };
34471
- Promise.resolve().then(() => {
34507
+ (relatedTaskLookup ?? Promise.resolve()).then(() => {
34508
+ if (relatedTaskLookup && abortController.signal.aborted) {
34509
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
34510
+ }
34472
34511
  if (taskCreationParams) {
34473
34512
  this.assertTaskHandlerCapability(request.method);
34474
34513
  }
@@ -34503,7 +34542,7 @@ var Protocol = class {
34503
34542
  ...error2["data"] !== void 0 && { data: error2["data"] }
34504
34543
  }
34505
34544
  };
34506
- if (relatedTaskId && this._taskMessageQueue) {
34545
+ if (relatedTaskId && this._taskMessageQueue && relatedTaskFound) {
34507
34546
  await this._enqueueTaskMessage(relatedTaskId, {
34508
34547
  type: "error",
34509
34548
  message: errorResponse,
@@ -34513,7 +34552,9 @@ var Protocol = class {
34513
34552
  await capturedTransport?.send(errorResponse);
34514
34553
  }
34515
34554
  }).catch((error2) => this._onerror(new Error(`Failed to send response: ${error2}`))).finally(() => {
34516
- this._requestHandlerAbortControllers.delete(request.id);
34555
+ if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
34556
+ this._requestHandlerAbortControllers.delete(request.id);
34557
+ }
34517
34558
  });
34518
34559
  }
34519
34560
  _onprogress(notification) {
@@ -34981,7 +35022,7 @@ var Protocol = class {
34981
35022
  throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
34982
35023
  }
34983
35024
  const maxQueueSize = this._options?.maxTaskQueueSize;
34984
- await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
35025
+ await this._taskMessageQueue.enqueue(taskId, message, sessionId ?? this._transport?.sessionId, maxQueueSize);
34985
35026
  }
34986
35027
  /**
34987
35028
  * Clears the message queue for a task and rejects any pending request resolvers.
@@ -35010,12 +35051,13 @@ var Protocol = class {
35010
35051
  * Uses polling to check for updates at the task's configured poll interval.
35011
35052
  * @param taskId The task ID to wait for
35012
35053
  * @param signal Abort signal to cancel the wait
35054
+ * @param sessionId Session of the request that waits, passed to the task store
35013
35055
  * @returns Promise that resolves when an update occurs or rejects if aborted
35014
35056
  */
35015
- async _waitForTaskUpdate(taskId, signal) {
35057
+ async _waitForTaskUpdate(taskId, signal, sessionId) {
35016
35058
  let interval = this._options?.defaultTaskPollInterval ?? 1e3;
35017
35059
  try {
35018
- const task = await this._taskStore?.getTask(taskId);
35060
+ const task = await this._taskStore?.getTask(taskId, sessionId);
35019
35061
  if (task?.pollInterval) {
35020
35062
  interval = task.pollInterval;
35021
35063
  }
@@ -35119,7 +35161,7 @@ function mergeCapabilities(base, additional) {
35119
35161
  return result;
35120
35162
  }
35121
35163
 
35122
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
35164
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
35123
35165
  var import_ajv = __toESM(require_ajv(), 1);
35124
35166
  var import_ajv_formats = __toESM(require_dist(), 1);
35125
35167
  function createDefaultAjvInstance() {
@@ -35187,7 +35229,7 @@ var AjvJsonSchemaValidator = class {
35187
35229
  }
35188
35230
  };
35189
35231
 
35190
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
35232
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
35191
35233
  var ExperimentalServerTasks = class {
35192
35234
  constructor(_server) {
35193
35235
  this._server = _server;
@@ -35400,7 +35442,7 @@ var ExperimentalServerTasks = class {
35400
35442
  }
35401
35443
  };
35402
35444
 
35403
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
35445
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
35404
35446
  function assertToolsCallTaskCapability(requests, method, entityName) {
35405
35447
  if (!requests) {
35406
35448
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -35435,7 +35477,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
35435
35477
  }
35436
35478
  }
35437
35479
 
35438
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
35480
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
35439
35481
  var Server = class extends Protocol {
35440
35482
  /**
35441
35483
  * Initializes this server with the given name and version information.
@@ -35501,16 +35543,7 @@ var Server = class extends Protocol {
35501
35543
  if (!methodSchema) {
35502
35544
  throw new Error("Schema is missing a method literal");
35503
35545
  }
35504
- let methodValue;
35505
- if (isZ4Schema(methodSchema)) {
35506
- const v4Schema = methodSchema;
35507
- const v4Def = v4Schema._zod?.def;
35508
- methodValue = v4Def?.value ?? v4Schema.value;
35509
- } else {
35510
- const v3Schema = methodSchema;
35511
- const legacyDef = v3Schema._def;
35512
- methodValue = legacyDef?.value ?? v3Schema.value;
35513
- }
35546
+ const methodValue = getLiteralValue(methodSchema);
35514
35547
  if (typeof methodValue !== "string") {
35515
35548
  throw new Error("Schema method literal must be a string");
35516
35549
  }
@@ -35815,12 +35848,21 @@ var Server = class extends Protocol {
35815
35848
  }
35816
35849
  };
35817
35850
 
35818
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
35851
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
35819
35852
  import process2 from "process";
35820
35853
 
35821
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
35854
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
35855
+ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
35822
35856
  var ReadBuffer = class {
35857
+ constructor(options) {
35858
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
35859
+ }
35823
35860
  append(chunk) {
35861
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
35862
+ if (newSize > this._maxBufferSize) {
35863
+ this.clear();
35864
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
35865
+ }
35824
35866
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
35825
35867
  }
35826
35868
  readMessage() {
@@ -35846,20 +35888,26 @@ function serializeMessage(message) {
35846
35888
  return JSON.stringify(message) + "\n";
35847
35889
  }
35848
35890
 
35849
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
35891
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
35850
35892
  var StdioServerTransport = class {
35851
- constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
35893
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
35852
35894
  this._stdin = _stdin;
35853
35895
  this._stdout = _stdout;
35854
- this._readBuffer = new ReadBuffer();
35855
35896
  this._started = false;
35856
35897
  this._ondata = (chunk) => {
35857
- this._readBuffer.append(chunk);
35858
- this.processReadBuffer();
35898
+ try {
35899
+ this._readBuffer.append(chunk);
35900
+ this.processReadBuffer();
35901
+ } catch (error2) {
35902
+ this.onerror?.(error2);
35903
+ this.close().catch(() => {
35904
+ });
35905
+ }
35859
35906
  };
35860
35907
  this._onerror = (error2) => {
35861
35908
  this.onerror?.(error2);
35862
35909
  };
35910
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
35863
35911
  }
35864
35912
  /**
35865
35913
  * Starts listening for messages on stdin.
@@ -45454,6 +45502,38 @@ var FLAG_REGISTRY = [
45454
45502
  // it back on for their own org.
45455
45503
  platformAdminOnly: true
45456
45504
  },
45505
+ {
45506
+ key: "two-factor-settings",
45507
+ 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.",
45508
+ flagType: "boolean",
45509
+ // PUBLIC (ADR-0022 §2): the nav reads it via usePublicBooleanFlag and the
45510
+ // page via getPublicBooleanFlagServer, so it is in the GET /flags map. No
45511
+ // env override (UI rollout, not an operator gate). Ships dark (default
45512
+ // false). The staff factor reset on the admin organization page is in
45513
+ // place, so a lost phone is recoverable.
45514
+ public: true,
45515
+ defaultValue: false,
45516
+ // Platform admin only until ENG-11619 phase 2. Phase 1 gates console PAGE
45517
+ // LOADS: an enrolled user's password-only (aal1) session is still accepted
45518
+ // by the Hono API and the webapp's /api/* handlers. An org admin switching
45519
+ // this on would reasonably believe a stolen password is now useless, and
45520
+ // it is not yet (Obi Wan be8af20e689c on #7092). Drop this once phase 2
45521
+ // refuses aal1 there too.
45522
+ platformAdminOnly: true
45523
+ },
45524
+ {
45525
+ key: "two-factor-reminder-banner",
45526
+ description: "Show a banner across the console asking every user without an authenticator app to set one up before two-factor becomes required (ENG-11619). Also makes Settings > Two-factor authentication reachable, as `two-factor-settings` does, because the banner links there. Closing it hides it for a day in that browser.",
45527
+ flagType: "boolean",
45528
+ // PUBLIC: the nav reads it client-side; the layout and the settings page read
45529
+ // it server-side. Ships dark (default false): turn it on for one org first.
45530
+ public: true,
45531
+ defaultValue: false,
45532
+ // Staff only, for the same reason as `two-factor-settings` above: it opens
45533
+ // the settings page, and phase 1 still accepts an aal1 session outside page
45534
+ // loads, so an org admin must not be the one deciding they are covered.
45535
+ platformAdminOnly: true
45536
+ },
45457
45537
  {
45458
45538
  key: "platform-maintenance-mode",
45459
45539
  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.)',