@integrity-labs/agt-cli 0.28.1137 → 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-HZFUOGUV.js → chunk-3INFJV37.js} +4 -4
  3. package/dist/{chunk-WIU4HUHD.js → chunk-EIXOI2ZB.js} +20 -1
  4. package/dist/{chunk-WIU4HUHD.js.map → chunk-EIXOI2ZB.js.map} +1 -1
  5. package/dist/{chunk-LQCWKNFX.js → chunk-J6ORWGUB.js} +2 -2
  6. package/dist/{claude-pair-runtime-OZLZFJZR.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 +230 -59
  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-2X3BCGV5.js → persistent-session-ZBKLEYUQ.js} +3 -3
  21. package/dist/{responsiveness-probe-QFLFS5QX.js → responsiveness-probe-FXDO35IT.js} +3 -3
  22. package/dist/{session-auth-dead-QE7GT5Y5.js → session-auth-dead-OGNOSJIB.js} +2 -2
  23. package/package.json +2 -2
  24. /package/dist/{chunk-HZFUOGUV.js.map → chunk-3INFJV37.js.map} +0 -0
  25. /package/dist/{chunk-LQCWKNFX.js.map → chunk-J6ORWGUB.js.map} +0 -0
  26. /package/dist/{claude-pair-runtime-OZLZFJZR.js.map → claude-pair-runtime-VQGEM5AY.js.map} +0 -0
  27. /package/dist/{persistent-session-2X3BCGV5.js.map → persistent-session-ZBKLEYUQ.js.map} +0 -0
  28. /package/dist/{responsiveness-probe-QFLFS5QX.js.map → responsiveness-probe-FXDO35IT.js.map} +0 -0
  29. /package/dist/{session-auth-dead-QE7GT5Y5.js.map → session-auth-dead-OGNOSJIB.js.map} +0 -0
@@ -22367,7 +22367,7 @@ var require_nunjucks = __commonJS({
22367
22367
  }
22368
22368
  });
22369
22369
 
22370
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
22370
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
22371
22371
  import process3 from "process";
22372
22372
 
22373
22373
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
@@ -29169,7 +29169,7 @@ var z = {
29169
29169
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
29170
29170
  config(en_default());
29171
29171
 
29172
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
29172
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
29173
29173
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
29174
29174
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
29175
29175
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -29179,10 +29179,9 @@ var ProgressTokenSchema = union([string2(), number2().int()]);
29179
29179
  var CursorSchema = string2();
29180
29180
  var TaskCreationParamsSchema = looseObject({
29181
29181
  /**
29182
- * Time in milliseconds to keep task results available after completion.
29183
- * If null, the task has unlimited lifetime until manually cleaned up.
29182
+ * Requested duration in milliseconds to retain task from creation.
29184
29183
  */
29185
- ttl: union([number2(), _null3()]).optional(),
29184
+ ttl: number2().optional(),
29186
29185
  /**
29187
29186
  * Time in milliseconds to wait between task status requests.
29188
29187
  */
@@ -29482,7 +29481,11 @@ var ClientCapabilitiesSchema = object({
29482
29481
  /**
29483
29482
  * Present if the client supports task creation.
29484
29483
  */
29485
- tasks: ClientTasksCapabilitySchema.optional()
29484
+ tasks: ClientTasksCapabilitySchema.optional(),
29485
+ /**
29486
+ * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
29487
+ */
29488
+ extensions: record(string2(), AssertObjectSchema).optional()
29486
29489
  });
29487
29490
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
29488
29491
  /**
@@ -29543,7 +29546,11 @@ var ServerCapabilitiesSchema = object({
29543
29546
  /**
29544
29547
  * Present if the server supports task creation.
29545
29548
  */
29546
- tasks: ServerTasksCapabilitySchema.optional()
29549
+ tasks: ServerTasksCapabilitySchema.optional(),
29550
+ /**
29551
+ * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
29552
+ */
29553
+ extensions: record(string2(), AssertObjectSchema).optional()
29547
29554
  });
29548
29555
  var InitializeResultSchema = ResultSchema.extend({
29549
29556
  /**
@@ -29735,6 +29742,12 @@ var ResourceSchema = object({
29735
29742
  * The MIME type of this resource, if known.
29736
29743
  */
29737
29744
  mimeType: optional(string2()),
29745
+ /**
29746
+ * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
29747
+ *
29748
+ * This can be used by Hosts to display file sizes and estimate context window usage.
29749
+ */
29750
+ size: optional(number2()),
29738
29751
  /**
29739
29752
  * Optional annotations for the client.
29740
29753
  */
@@ -30675,9 +30688,18 @@ var UrlElicitationRequiredError = class extends McpError {
30675
30688
  }
30676
30689
  };
30677
30690
 
30678
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30691
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30692
+ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
30679
30693
  var ReadBuffer = class {
30694
+ constructor(options) {
30695
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
30696
+ }
30680
30697
  append(chunk) {
30698
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
30699
+ if (newSize > this._maxBufferSize) {
30700
+ this.clear();
30701
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
30702
+ }
30681
30703
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
30682
30704
  }
30683
30705
  readMessage() {
@@ -30703,20 +30725,26 @@ function serializeMessage(message) {
30703
30725
  return JSON.stringify(message) + "\n";
30704
30726
  }
30705
30727
 
30706
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30728
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
30707
30729
  var StdioServerTransport = class {
30708
- constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
30730
+ constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) {
30709
30731
  this._stdin = _stdin;
30710
30732
  this._stdout = _stdout;
30711
- this._readBuffer = new ReadBuffer();
30712
30733
  this._started = false;
30713
30734
  this._ondata = (chunk) => {
30714
- this._readBuffer.append(chunk);
30715
- this.processReadBuffer();
30735
+ try {
30736
+ this._readBuffer.append(chunk);
30737
+ this.processReadBuffer();
30738
+ } catch (error2) {
30739
+ this.onerror?.(error2);
30740
+ this.close().catch(() => {
30741
+ });
30742
+ }
30716
30743
  };
30717
30744
  this._onerror = (error2) => {
30718
30745
  this.onerror?.(error2);
30719
30746
  };
30747
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
30720
30748
  }
30721
30749
  /**
30722
30750
  * Starts listening for messages on stdin.
@@ -34640,7 +34668,7 @@ var nullableType = ZodNullable2.create;
34640
34668
  var preprocessType = ZodEffects.createWithPreprocess;
34641
34669
  var pipelineType = ZodPipeline.create;
34642
34670
 
34643
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
34671
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
34644
34672
  function isZ4Schema(s) {
34645
34673
  const schema = s;
34646
34674
  return !!schema._zod;
@@ -34703,7 +34731,7 @@ function getLiteralValue(schema) {
34703
34731
  return void 0;
34704
34732
  }
34705
34733
 
34706
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34734
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34707
34735
  function isTerminal(status) {
34708
34736
  return status === "completed" || status === "failed" || status === "cancelled";
34709
34737
  }
@@ -34711,7 +34739,7 @@ function isTerminal(status) {
34711
34739
  // ../../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
34712
34740
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
34713
34741
 
34714
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34742
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34715
34743
  function getMethodLiteral(schema) {
34716
34744
  const shape = getObjectShape(schema);
34717
34745
  const methodSchema = shape?.method;
@@ -34732,7 +34760,7 @@ function parseWithCompat(schema, data) {
34732
34760
  return result.data;
34733
34761
  }
34734
34762
 
34735
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
34763
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
34736
34764
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
34737
34765
  var Protocol = class {
34738
34766
  constructor(_options) {
@@ -34773,6 +34801,9 @@ var Protocol = class {
34773
34801
  this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
34774
34802
  const handleTaskResult = async () => {
34775
34803
  const taskId = request.params.taskId;
34804
+ if (!await this._taskStore.getTask(taskId, extra.sessionId)) {
34805
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
34806
+ }
34776
34807
  if (this._taskMessageQueue) {
34777
34808
  let queuedMessage;
34778
34809
  while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
@@ -34803,12 +34834,12 @@ var Protocol = class {
34803
34834
  throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
34804
34835
  }
34805
34836
  if (!isTerminal(task.status)) {
34806
- await this._waitForTaskUpdate(taskId, extra.signal);
34837
+ await this._waitForTaskUpdate(taskId, extra.signal, extra.sessionId);
34807
34838
  return await handleTaskResult();
34808
34839
  }
34809
34840
  if (isTerminal(task.status)) {
34810
34841
  const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
34811
- this._clearTaskQueue(taskId);
34842
+ this._clearTaskQueue(taskId, extra.sessionId);
34812
34843
  return {
34813
34844
  ...result,
34814
34845
  _meta: {
@@ -34845,7 +34876,7 @@ var Protocol = class {
34845
34876
  throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
34846
34877
  }
34847
34878
  await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
34848
- this._clearTaskQueue(request.params.taskId);
34879
+ this._clearTaskQueue(request.params.taskId, extra.sessionId);
34849
34880
  const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
34850
34881
  if (!cancelledTask) {
34851
34882
  throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
@@ -34944,6 +34975,10 @@ var Protocol = class {
34944
34975
  this._progressHandlers.clear();
34945
34976
  this._taskProgressTokens.clear();
34946
34977
  this._pendingDebouncedNotifications.clear();
34978
+ for (const info of this._timeoutInfo.values()) {
34979
+ clearTimeout(info.timeoutId);
34980
+ }
34981
+ this._timeoutInfo.clear();
34947
34982
  for (const controller of this._requestHandlerAbortControllers.values()) {
34948
34983
  controller.abort();
34949
34984
  }
@@ -34969,6 +35004,19 @@ var Protocol = class {
34969
35004
  const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
34970
35005
  const capturedTransport = this._transport;
34971
35006
  const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
35007
+ const sessionId = capturedTransport?.sessionId;
35008
+ const store = this._taskStore;
35009
+ let relatedTaskFound = true;
35010
+ let relatedTaskLookup;
35011
+ if (relatedTaskId && store && this._taskMessageQueue && sessionId !== void 0) {
35012
+ relatedTaskFound = false;
35013
+ relatedTaskLookup = (async () => {
35014
+ if (!await store.getTask(relatedTaskId, sessionId)) {
35015
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
35016
+ }
35017
+ relatedTaskFound = true;
35018
+ })();
35019
+ }
34972
35020
  if (handler === void 0) {
34973
35021
  const errorResponse = {
34974
35022
  jsonrpc: "2.0",
@@ -34978,7 +35026,10 @@ var Protocol = class {
34978
35026
  message: "Method not found"
34979
35027
  }
34980
35028
  };
34981
- if (relatedTaskId && this._taskMessageQueue) {
35029
+ if (relatedTaskId && relatedTaskLookup) {
35030
+ const queuedError = { type: "error", message: errorResponse, timestamp: Date.now() };
35031
+ relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error2) => this._onerror(new Error(`Failed to send an error response: ${error2}`)));
35032
+ } else if (relatedTaskId && this._taskMessageQueue) {
34982
35033
  this._enqueueTaskMessage(relatedTaskId, {
34983
35034
  type: "error",
34984
35035
  message: errorResponse,
@@ -35029,7 +35080,10 @@ var Protocol = class {
35029
35080
  closeSSEStream: extra?.closeSSEStream,
35030
35081
  closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
35031
35082
  };
35032
- Promise.resolve().then(() => {
35083
+ (relatedTaskLookup ?? Promise.resolve()).then(() => {
35084
+ if (relatedTaskLookup && abortController.signal.aborted) {
35085
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
35086
+ }
35033
35087
  if (taskCreationParams) {
35034
35088
  this.assertTaskHandlerCapability(request.method);
35035
35089
  }
@@ -35064,7 +35118,7 @@ var Protocol = class {
35064
35118
  ...error2["data"] !== void 0 && { data: error2["data"] }
35065
35119
  }
35066
35120
  };
35067
- if (relatedTaskId && this._taskMessageQueue) {
35121
+ if (relatedTaskId && this._taskMessageQueue && relatedTaskFound) {
35068
35122
  await this._enqueueTaskMessage(relatedTaskId, {
35069
35123
  type: "error",
35070
35124
  message: errorResponse,
@@ -35074,7 +35128,9 @@ var Protocol = class {
35074
35128
  await capturedTransport?.send(errorResponse);
35075
35129
  }
35076
35130
  }).catch((error2) => this._onerror(new Error(`Failed to send response: ${error2}`))).finally(() => {
35077
- this._requestHandlerAbortControllers.delete(request.id);
35131
+ if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
35132
+ this._requestHandlerAbortControllers.delete(request.id);
35133
+ }
35078
35134
  });
35079
35135
  }
35080
35136
  _onprogress(notification) {
@@ -35542,7 +35598,7 @@ var Protocol = class {
35542
35598
  throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
35543
35599
  }
35544
35600
  const maxQueueSize = this._options?.maxTaskQueueSize;
35545
- await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
35601
+ await this._taskMessageQueue.enqueue(taskId, message, sessionId ?? this._transport?.sessionId, maxQueueSize);
35546
35602
  }
35547
35603
  /**
35548
35604
  * Clears the message queue for a task and rejects any pending request resolvers.
@@ -35571,12 +35627,13 @@ var Protocol = class {
35571
35627
  * Uses polling to check for updates at the task's configured poll interval.
35572
35628
  * @param taskId The task ID to wait for
35573
35629
  * @param signal Abort signal to cancel the wait
35630
+ * @param sessionId Session of the request that waits, passed to the task store
35574
35631
  * @returns Promise that resolves when an update occurs or rejects if aborted
35575
35632
  */
35576
- async _waitForTaskUpdate(taskId, signal) {
35633
+ async _waitForTaskUpdate(taskId, signal, sessionId) {
35577
35634
  let interval = this._options?.defaultTaskPollInterval ?? 1e3;
35578
35635
  try {
35579
- const task = await this._taskStore?.getTask(taskId);
35636
+ const task = await this._taskStore?.getTask(taskId, sessionId);
35580
35637
  if (task?.pollInterval) {
35581
35638
  interval = task.pollInterval;
35582
35639
  }
@@ -35680,7 +35737,7 @@ function mergeCapabilities(base, additional) {
35680
35737
  return result;
35681
35738
  }
35682
35739
 
35683
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
35740
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
35684
35741
  var import_ajv = __toESM(require_ajv(), 1);
35685
35742
  var import_ajv_formats = __toESM(require_dist(), 1);
35686
35743
  function createDefaultAjvInstance() {
@@ -35748,7 +35805,7 @@ var AjvJsonSchemaValidator = class {
35748
35805
  }
35749
35806
  };
35750
35807
 
35751
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
35808
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
35752
35809
  var ExperimentalServerTasks = class {
35753
35810
  constructor(_server) {
35754
35811
  this._server = _server;
@@ -35961,7 +36018,7 @@ var ExperimentalServerTasks = class {
35961
36018
  }
35962
36019
  };
35963
36020
 
35964
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
36021
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
35965
36022
  function assertToolsCallTaskCapability(requests, method, entityName) {
35966
36023
  if (!requests) {
35967
36024
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -35996,7 +36053,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
35996
36053
  }
35997
36054
  }
35998
36055
 
35999
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
36056
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
36000
36057
  var Server = class extends Protocol {
36001
36058
  /**
36002
36059
  * Initializes this server with the given name and version information.
@@ -36062,16 +36119,7 @@ var Server = class extends Protocol {
36062
36119
  if (!methodSchema) {
36063
36120
  throw new Error("Schema is missing a method literal");
36064
36121
  }
36065
- let methodValue;
36066
- if (isZ4Schema(methodSchema)) {
36067
- const v4Schema = methodSchema;
36068
- const v4Def = v4Schema._zod?.def;
36069
- methodValue = v4Def?.value ?? v4Schema.value;
36070
- } else {
36071
- const v3Schema = methodSchema;
36072
- const legacyDef = v3Schema._def;
36073
- methodValue = legacyDef?.value ?? v3Schema.value;
36074
- }
36122
+ const methodValue = getLiteralValue(methodSchema);
36075
36123
  if (typeof methodValue !== "string") {
36076
36124
  throw new Error("Schema method literal must be a string");
36077
36125
  }
@@ -44960,6 +45008,25 @@ var FLAG_REGISTRY = [
44960
45008
  // it back on for their own org.
44961
45009
  platformAdminOnly: true
44962
45010
  },
45011
+ {
45012
+ key: "two-factor-settings",
45013
+ 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.",
45014
+ flagType: "boolean",
45015
+ // PUBLIC (ADR-0022 §2): the nav reads it via usePublicBooleanFlag and the
45016
+ // page via getPublicBooleanFlagServer, so it is in the GET /flags map. No
45017
+ // env override (UI rollout, not an operator gate). Ships dark (default
45018
+ // false). The staff factor reset on the admin organization page is in
45019
+ // place, so a lost phone is recoverable.
45020
+ public: true,
45021
+ defaultValue: false,
45022
+ // Platform admin only until ENG-11619 phase 2. Phase 1 gates console PAGE
45023
+ // LOADS: an enrolled user's password-only (aal1) session is still accepted
45024
+ // by the Hono API and the webapp's /api/* handlers. An org admin switching
45025
+ // this on would reasonably believe a stolen password is now useless, and
45026
+ // it is not yet (Obi Wan be8af20e689c on #7092). Drop this once phase 2
45027
+ // refuses aal1 there too.
45028
+ platformAdminOnly: true
45029
+ },
44963
45030
  {
44964
45031
  key: "platform-maintenance-mode",
44965
45032
  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.)',