@agent-vm/agent-portal-sdk 0.0.141 → 0.0.143

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 (120) hide show
  1. package/contract-fixtures/portable-contracts/approval/decision-request-approved.fixture.json +18 -0
  2. package/contract-fixtures/portable-contracts/approval/decision-result-recorded.fixture.json +18 -0
  3. package/contract-fixtures/portable-contracts/approval/presentation-outcome-approved.fixture.json +16 -0
  4. package/contract-fixtures/portable-contracts/approval/presentation-request.fixture.json +32 -0
  5. package/contract-fixtures/portable-contracts/discovery/describe-result.fixture.json +7 -3
  6. package/contract-fixtures/portable-contracts/discovery/list-result.fixture.json +15 -3
  7. package/contract-fixtures/portable-contracts/discovery/search-result.fixture.json +7 -3
  8. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-hermes-valid.fixture.json +7 -4
  9. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-long-namespace-name.fixture.json +13 -6
  10. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-namespace-names-code-point-order.fixture.json +7 -4
  11. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-namespace-names-code-point-reverse.fixture.json +6 -3
  12. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-namespace-names-duplicate.fixture.json +6 -3
  13. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-namespace-names-unsorted.fixture.json +6 -3
  14. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-old-authority-rejected.fixture.json +5 -2
  15. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-openclaw-valid.fixture.json +7 -4
  16. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-self-root-rejected.fixture.json +5 -2
  17. package/contract-fixtures/portable-contracts/gateway/managed-agent-projection-work-root-rejected.fixture.json +5 -2
  18. package/dist/adapter-boundary/index.d.ts +1 -1
  19. package/dist/approval-surface/index.d.ts +2 -2
  20. package/dist/approval-surface/index.js +2 -2
  21. package/dist/approval-surface-Cqk_hAtN.js +132 -0
  22. package/dist/approval-surface-Cqk_hAtN.js.map +1 -0
  23. package/dist/artifact-surface/index.d.ts +1 -1
  24. package/dist/artifact-surface/index.js +1 -1
  25. package/dist/{artifact-surface-BIDasG5x.js → artifact-surface-CHEu4tDd.js} +2 -2
  26. package/dist/{artifact-surface-BIDasG5x.js.map → artifact-surface-CHEu4tDd.js.map} +1 -1
  27. package/dist/capability-description-surface/index.d.ts +1 -1
  28. package/dist/capability-description-surface/index.js +2 -2
  29. package/dist/capability-description-surface-CplIb93y.js +2 -0
  30. package/dist/{capability-descriptor-schema-DmzUtpji.js → capability-descriptor-schema-v9tj7yKr.js} +2 -2
  31. package/dist/{capability-descriptor-schema-DmzUtpji.js.map → capability-descriptor-schema-v9tj7yKr.js.map} +1 -1
  32. package/dist/cli/tool-portal.js +6 -6
  33. package/dist/contracts/index.d.ts +1 -1
  34. package/dist/contracts/index.js +1 -1
  35. package/dist/{contracts-3pjrcMjD.js → contracts-mBPxCxoG.js} +15 -14
  36. package/dist/{contracts-3pjrcMjD.js.map → contracts-mBPxCxoG.js.map} +1 -1
  37. package/dist/gateway-runtime-client/index.d.ts +11 -4
  38. package/dist/gateway-runtime-client/index.d.ts.map +1 -1
  39. package/dist/gateway-runtime-client/index.js +22 -5
  40. package/dist/gateway-runtime-client/index.js.map +1 -1
  41. package/dist/gateway-runtime-local-exec/gateway-runtime-local-exec-helper.js +1 -1
  42. package/dist/gateway-runtime-local-exec/index.js +1 -1
  43. package/dist/{gateway-runtime-local-exec-transport-DjxMXdT9.js → gateway-runtime-local-exec-transport-CO2bQ3wz.js} +1 -1
  44. package/dist/{gateway-runtime-local-exec-transport-DjxMXdT9.js.map → gateway-runtime-local-exec-transport-CO2bQ3wz.js.map} +1 -1
  45. package/dist/{index-D8uVfMBv.d.ts → index-BIvLq827.d.ts} +2 -2
  46. package/dist/{index-D8uVfMBv.d.ts.map → index-BIvLq827.d.ts.map} +1 -1
  47. package/dist/{index-BgKPbuap.d.ts → index-Badq9e6i.d.ts} +1 -1
  48. package/dist/{index-BgKPbuap.d.ts.map → index-Badq9e6i.d.ts.map} +1 -1
  49. package/dist/{index-DqMFYBbN.d.ts → index-C-QFWaH5.d.ts} +39 -6
  50. package/dist/index-C-QFWaH5.d.ts.map +1 -0
  51. package/dist/{index-B_xYdo3v.d.ts → index-DDLN0DE_.d.ts} +2 -2
  52. package/dist/{index-B_xYdo3v.d.ts.map → index-DDLN0DE_.d.ts.map} +1 -1
  53. package/dist/{index-B_FqoejO.d.ts → index-DTTEu7ZT.d.ts} +1 -1
  54. package/dist/{index-B_FqoejO.d.ts.map → index-DTTEu7ZT.d.ts.map} +1 -1
  55. package/dist/{index-BQ12JshX.d.ts → index-DZJH4Rau.d.ts} +1 -1
  56. package/dist/{index-BQ12JshX.d.ts.map → index-DZJH4Rau.d.ts.map} +1 -1
  57. package/dist/index-D_69tlLY.d.ts +29 -0
  58. package/dist/index-D_69tlLY.d.ts.map +1 -0
  59. package/dist/{index-yuB9HEo-.d.ts → index-S5RZg56U.d.ts} +4 -4
  60. package/dist/{index-yuB9HEo-.d.ts.map → index-S5RZg56U.d.ts.map} +1 -1
  61. package/dist/index-ex2lEawY.d.ts +124 -0
  62. package/dist/index-ex2lEawY.d.ts.map +1 -0
  63. package/dist/{index-C5NhyO2R.d.ts → index-tmZkznV6.d.ts} +5 -2
  64. package/dist/{index-C5NhyO2R.d.ts.map → index-tmZkznV6.d.ts.map} +1 -1
  65. package/dist/index.d.ts +12 -12
  66. package/dist/index.js +16 -15
  67. package/dist/{json-value-schema-BGfMDOGA.js → json-value-schema-Br5M7d7X.js} +2 -2
  68. package/dist/{json-value-schema-BGfMDOGA.js.map → json-value-schema-Br5M7d7X.js.map} +1 -1
  69. package/dist/{json-value-schema-C-87ATB3.d.ts → json-value-schema-CwDmttWU.d.ts} +1 -1
  70. package/dist/{json-value-schema-C-87ATB3.d.ts.map → json-value-schema-CwDmttWU.d.ts.map} +1 -1
  71. package/dist/namespace-discovery-schema-DwbJHVLu.js +21 -0
  72. package/dist/namespace-discovery-schema-DwbJHVLu.js.map +1 -0
  73. package/dist/{node-tool-portal-mcp-transport-CnB8MCW2.js → node-tool-portal-mcp-transport-xFo0i37Q.js} +1 -1
  74. package/dist/{node-tool-portal-mcp-transport-CnB8MCW2.js.map → node-tool-portal-mcp-transport-xFo0i37Q.js.map} +1 -1
  75. package/dist/portable-contracts/index.d.ts +1 -1
  76. package/dist/portable-contracts/index.js +2 -2
  77. package/dist/{portable-contracts-C5rtqe-H.js → portable-contracts-CKeFnjAA.js} +28 -11
  78. package/dist/portable-contracts-CKeFnjAA.js.map +1 -0
  79. package/dist/{portable-refinement-authoring-CvlKRs_Z.js → portable-refinement-authoring-C1Q92x2G.js} +29 -6
  80. package/dist/portable-refinement-authoring-C1Q92x2G.js.map +1 -0
  81. package/dist/{portal-call-request-schema-DYxcWijW.js → portal-call-request-schema-Cl0kTLaX.js} +4 -4
  82. package/dist/{portal-call-request-schema-DYxcWijW.js.map → portal-call-request-schema-Cl0kTLaX.js.map} +1 -1
  83. package/dist/{portal-call-result-schema-CVWMGu2y.js → portal-call-result-schema-B25_rzZZ.js} +20 -10
  84. package/dist/portal-call-result-schema-B25_rzZZ.js.map +1 -0
  85. package/dist/{portal-call-result-schema-DalyNrfW.d.ts → portal-call-result-schema-DIg2ERl4.d.ts} +1025 -59
  86. package/dist/portal-call-result-schema-DIg2ERl4.d.ts.map +1 -0
  87. package/dist/portal-call-surface/index.d.ts +3 -3
  88. package/dist/portal-call-surface/index.js +5 -5
  89. package/dist/{portal-call-surface-B_oQxm5X.js → portal-call-surface-qykVz_8k.js} +6 -6
  90. package/dist/{portal-call-surface-B_oQxm5X.js.map → portal-call-surface-qykVz_8k.js.map} +1 -1
  91. package/dist/{portal-error-schema-BCALC7xt.js → portal-error-schema-TSNrpQSy.js} +1 -1
  92. package/dist/{portal-error-schema-BCALC7xt.js.map → portal-error-schema-TSNrpQSy.js.map} +1 -1
  93. package/dist/portal-event-surface/index.d.ts +1 -1
  94. package/dist/portal-event-surface/index.js +2 -2
  95. package/dist/{portal-event-surface-DSWv7Kgi.js → portal-event-surface-Bp3rXsBz.js} +3 -3
  96. package/dist/{portal-event-surface-DSWv7Kgi.js.map → portal-event-surface-Bp3rXsBz.js.map} +1 -1
  97. package/dist/{request-id-schema-DGLLX-tp.js → request-id-schema-Hq_6lSFV.js} +2 -2
  98. package/dist/{request-id-schema-DGLLX-tp.js.map → request-id-schema-Hq_6lSFV.js.map} +1 -1
  99. package/dist/testing/index.d.ts +2 -2
  100. package/dist/testing/index.js +2 -2
  101. package/dist/tool-portal-mcp-client/index.d.ts +1 -1
  102. package/dist/tool-portal-mcp-client/index.js +1 -1
  103. package/dist/tool-portal-mcp-client/node-tool-portal-mcp-transport.d.ts +1 -1
  104. package/dist/tool-portal-mcp-client/node-tool-portal-mcp-transport.js +1 -1
  105. package/dist/{tool-portal-mcp-client-nMGxqQ-A.js → tool-portal-mcp-client-DZoloMod.js} +5 -5
  106. package/dist/{tool-portal-mcp-client-nMGxqQ-A.js.map → tool-portal-mcp-client-DZoloMod.js.map} +1 -1
  107. package/package.json +1 -1
  108. package/portable-contract-schema-manifest.json +275 -9
  109. package/dist/approval-surface-z5JUqa0K.js +0 -20
  110. package/dist/approval-surface-z5JUqa0K.js.map +0 -1
  111. package/dist/capability-description-surface-CyPgad9d.js +0 -2
  112. package/dist/index-BqWw914Z.d.ts +0 -64
  113. package/dist/index-BqWw914Z.d.ts.map +0 -1
  114. package/dist/index-DqMFYBbN.d.ts.map +0 -1
  115. package/dist/index-dKXgrOwm.d.ts +0 -17
  116. package/dist/index-dKXgrOwm.d.ts.map +0 -1
  117. package/dist/portable-contracts-C5rtqe-H.js.map +0 -1
  118. package/dist/portable-refinement-authoring-CvlKRs_Z.js.map +0 -1
  119. package/dist/portal-call-result-schema-CVWMGu2y.js.map +0 -1
  120. package/dist/portal-call-result-schema-DalyNrfW.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as encodeGatewayRuntimeLocalExecFrame, i as GatewayRuntimeLocalExecLineDecoder, n as GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV, o as parseGatewayRuntimeLocalExecServerFrame, t as GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV } from "../gateway-runtime-local-exec-transport-DjxMXdT9.js";
2
+ import { a as encodeGatewayRuntimeLocalExecFrame, i as GatewayRuntimeLocalExecLineDecoder, n as GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV, o as parseGatewayRuntimeLocalExecServerFrame, t as GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV } from "../gateway-runtime-local-exec-transport-CO2bQ3wz.js";
3
3
  import { createConnection } from "node:net";
4
4
  //#region src/gateway-runtime-local-exec/gateway-runtime-local-exec-helper.ts
5
5
  const CONNECTION_DEADLINE_MS = 1e4;
@@ -1,2 +1,2 @@
1
- import { n as GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV, r as GatewayRuntimeLocalExecTransport, t as GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV } from "../gateway-runtime-local-exec-transport-DjxMXdT9.js";
1
+ import { n as GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV, r as GatewayRuntimeLocalExecTransport, t as GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV } from "../gateway-runtime-local-exec-transport-CO2bQ3wz.js";
2
2
  export { GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV, GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV, GatewayRuntimeLocalExecTransport };
@@ -424,4 +424,4 @@ var GatewayRuntimeLocalExecTransport = class {
424
424
  //#endregion
425
425
  export { encodeGatewayRuntimeLocalExecFrame as a, GatewayRuntimeLocalExecLineDecoder as i, GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV as n, parseGatewayRuntimeLocalExecServerFrame as o, GatewayRuntimeLocalExecTransport as r, GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV as t };
426
426
 
427
- //# sourceMappingURL=gateway-runtime-local-exec-transport-DjxMXdT9.js.map
427
+ //# sourceMappingURL=gateway-runtime-local-exec-transport-CO2bQ3wz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-runtime-local-exec-transport-DjxMXdT9.js","names":["#buffer","#socket","#pendingWrite","#helperArgv","#reservationScheduler","#reservationTimeoutMs","#reservations","#temporaryDirectory","#expireReservation","#acceptConnection","#disposeReservation","#processClientFrames","#runAuthenticatedOperation","#disposeReservationOnce"],"sources":["../src/gateway-runtime-local-exec/gateway-runtime-local-exec-protocol.ts","../src/gateway-runtime-local-exec/gateway-runtime-local-exec-transport.ts"],"sourcesContent":["const MAXIMUM_LOCAL_EXEC_FRAME_BYTES = 128 * 1024;\nconst MAXIMUM_LOCAL_EXEC_STREAM_CHUNK_BYTES = 64 * 1024;\nconst MAXIMUM_LOCAL_EXEC_TOKEN_BYTES = 256;\n\nexport type GatewayRuntimeLocalExecClientFrame =\n\t| { readonly kind: 'authenticate'; readonly token: string }\n\t| { readonly kind: 'cancel' }\n\t| { readonly contentBase64: string; readonly kind: 'stdin-chunk' }\n\t| { readonly kind: 'stdin-end' }\n\t| { readonly columns: number; readonly kind: 'terminal-resize'; readonly rows: number };\n\nexport type GatewayRuntimeLocalExecServerFrame =\n\t| { readonly kind: 'accepted' }\n\t| { readonly contentBase64: string; readonly kind: 'stderr-chunk' }\n\t| { readonly kind: 'stderr-end' }\n\t| { readonly exitCode: number | null; readonly kind: 'exited' }\n\t| { readonly message: string; readonly kind: 'rejected' }\n\t| { readonly contentBase64: string; readonly kind: 'stdout-chunk' }\n\t| { readonly kind: 'stdout-end' };\n\nexport class GatewayRuntimeLocalExecProtocolError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = 'GatewayRuntimeLocalExecProtocolError';\n\t}\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n\treturn typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction requireExactKeys(value: Readonly<Record<string, unknown>>, keys: readonly string[]): void {\n\tconst actualKeys = Object.keys(value).toSorted();\n\tconst expectedKeys = keys.toSorted();\n\tif (\n\t\tactualKeys.length !== expectedKeys.length ||\n\t\tactualKeys.some((key, index) => key !== expectedKeys[index])\n\t) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame contains unexpected fields.');\n\t}\n}\n\nfunction requireString(value: unknown, fieldName: string): string {\n\tif (typeof value !== 'string' || value.length === 0) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t`Local exec frame field '${fieldName}' must be a non-empty string.`,\n\t\t);\n\t}\n\treturn value;\n}\n\nfunction requireBoundedToken(value: unknown): string {\n\tconst token = requireString(value, 'token');\n\tif (Buffer.byteLength(token, 'utf8') > MAXIMUM_LOCAL_EXEC_TOKEN_BYTES) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t'Local exec reservation token exceeds the byte limit.',\n\t\t);\n\t}\n\treturn token;\n}\n\nfunction requireCanonicalBase64(value: unknown): string {\n\tconst encoded = requireString(value, 'contentBase64');\n\tconst decoded = Buffer.from(encoded, 'base64');\n\tif (\n\t\tdecoded.byteLength > MAXIMUM_LOCAL_EXEC_STREAM_CHUNK_BYTES ||\n\t\tdecoded.toString('base64') !== encoded\n\t) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t'Local exec stream content must be canonical bounded base64.',\n\t\t);\n\t}\n\treturn encoded;\n}\n\nfunction requireTerminalDimension(value: unknown, fieldName: string): number {\n\tif (!Number.isSafeInteger(value) || (value as number) <= 0 || (value as number) > 1_000) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t`Local exec frame field '${fieldName}' must be a bounded positive integer.`,\n\t\t);\n\t}\n\treturn value as number;\n}\n\nfunction parseJsonObject(line: string): Readonly<Record<string, unknown>> {\n\tif (Buffer.byteLength(line, 'utf8') > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t}\n\tlet value: unknown;\n\ttry {\n\t\tvalue = JSON.parse(line);\n\t} catch (error: unknown) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\terror instanceof Error\n\t\t\t\t? `Local exec frame is not valid JSON: ${error.message}`\n\t\t\t\t: 'Local exec frame is not valid JSON.',\n\t\t);\n\t}\n\tif (!isRecord(value)) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame must be an object.');\n\t}\n\treturn value;\n}\n\nexport function encodeGatewayRuntimeLocalExecFrame(\n\tframe: GatewayRuntimeLocalExecClientFrame | GatewayRuntimeLocalExecServerFrame,\n): string {\n\treturn `${JSON.stringify(frame)}\\n`;\n}\n\nexport function parseGatewayRuntimeLocalExecClientFrame(\n\tline: string,\n): GatewayRuntimeLocalExecClientFrame {\n\tconst value = parseJsonObject(line);\n\tconst kind = requireString(value.kind, 'kind');\n\tswitch (kind) {\n\t\tcase 'authenticate':\n\t\t\trequireExactKeys(value, ['kind', 'token']);\n\t\t\treturn { kind, token: requireBoundedToken(value.token) };\n\t\tcase 'cancel':\n\t\tcase 'stdin-end':\n\t\t\trequireExactKeys(value, ['kind']);\n\t\t\treturn { kind };\n\t\tcase 'stdin-chunk':\n\t\t\trequireExactKeys(value, ['contentBase64', 'kind']);\n\t\t\treturn { contentBase64: requireCanonicalBase64(value.contentBase64), kind };\n\t\tcase 'terminal-resize':\n\t\t\trequireExactKeys(value, ['columns', 'kind', 'rows']);\n\t\t\treturn {\n\t\t\t\tcolumns: requireTerminalDimension(value.columns, 'columns'),\n\t\t\t\tkind,\n\t\t\t\trows: requireTerminalDimension(value.rows, 'rows'),\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(`Unknown local exec client frame '${kind}'.`);\n\t}\n}\n\nexport function parseGatewayRuntimeLocalExecServerFrame(\n\tline: string,\n): GatewayRuntimeLocalExecServerFrame {\n\tconst value = parseJsonObject(line);\n\tconst kind = requireString(value.kind, 'kind');\n\tswitch (kind) {\n\t\tcase 'accepted':\n\t\tcase 'stderr-end':\n\t\tcase 'stdout-end':\n\t\t\trequireExactKeys(value, ['kind']);\n\t\t\treturn { kind };\n\t\tcase 'stderr-chunk':\n\t\tcase 'stdout-chunk':\n\t\t\trequireExactKeys(value, ['contentBase64', 'kind']);\n\t\t\treturn { contentBase64: requireCanonicalBase64(value.contentBase64), kind };\n\t\tcase 'exited':\n\t\t\trequireExactKeys(value, ['exitCode', 'kind']);\n\t\t\tif (\n\t\t\t\tvalue.exitCode !== null &&\n\t\t\t\t(!Number.isSafeInteger(value.exitCode) ||\n\t\t\t\t\t(value.exitCode as number) < 0 ||\n\t\t\t\t\t(value.exitCode as number) > 255)\n\t\t\t) {\n\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t\t\t\"Local exec frame field 'exitCode' must be null or an integer from 0 through 255.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { exitCode: value.exitCode as number | null, kind };\n\t\tcase 'rejected':\n\t\t\trequireExactKeys(value, ['kind', 'message']);\n\t\t\treturn { kind, message: requireString(value.message, 'message') };\n\t\tdefault:\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(`Unknown local exec server frame '${kind}'.`);\n\t}\n}\n\nexport class GatewayRuntimeLocalExecLineDecoder {\n\t#buffer = Buffer.alloc(0);\n\n\tpush(chunk: Uint8Array): readonly string[] {\n\t\tif (chunk.byteLength + this.#buffer.byteLength > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t\t'Local exec frame batch exceeds the byte limit.',\n\t\t\t);\n\t\t}\n\t\tthis.#buffer = Buffer.concat([this.#buffer, chunk]);\n\t\tconst lines: string[] = [];\n\t\tlet newlineIndex = this.#buffer.indexOf(0x0a);\n\t\twhile (newlineIndex >= 0) {\n\t\t\tconst line = this.#buffer.subarray(0, newlineIndex).toString('utf8');\n\t\t\tthis.#buffer = this.#buffer.subarray(newlineIndex + 1);\n\t\t\tif (Buffer.byteLength(line, 'utf8') > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t\t\t}\n\t\t\tif (line.length > 0) lines.push(line);\n\t\t\tnewlineIndex = this.#buffer.indexOf(0x0a);\n\t\t}\n\t\tif (this.#buffer.byteLength > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t\t}\n\t\treturn lines;\n\t}\n}\n","import { randomBytes } from 'node:crypto';\nimport { chmod, mkdtemp, rm } from 'node:fs/promises';\nimport { createServer, type Server, type Socket } from 'node:net';\nimport { join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport {\n\tGatewayRuntimeLocalExecLineDecoder,\n\tGatewayRuntimeLocalExecProtocolError,\n\tencodeGatewayRuntimeLocalExecFrame,\n\tparseGatewayRuntimeLocalExecClientFrame,\n\ttype GatewayRuntimeLocalExecServerFrame,\n} from './gateway-runtime-local-exec-protocol.js';\n\nexport const GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV = 'AGENT_VM_LOCAL_EXEC_SOCKET';\nexport const GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV = 'AGENT_VM_LOCAL_EXEC_TOKEN';\n\nconst DEFAULT_RESERVATION_TIMEOUT_MS = 15_000;\nconst DEFAULT_TEMPORARY_DIRECTORY = '/tmp';\nconst MAXIMUM_STREAM_CHUNK_BYTES = 64 * 1024;\n\nexport type GatewayRuntimeLocalExecReadResult =\n\t| { readonly content: Uint8Array; readonly kind: 'chunk' }\n\t| { readonly kind: 'end' };\n\nexport interface GatewayRuntimeLocalExecOperation {\n\treadonly cancel: () => Promise<void>;\n\treadonly closeStdin: () => Promise<void>;\n\treadonly readStderr: (maximumBytes: number) => Promise<GatewayRuntimeLocalExecReadResult>;\n\treadonly readStdout: (maximumBytes: number) => Promise<GatewayRuntimeLocalExecReadResult>;\n\treadonly resizeTerminal?: (size: {\n\t\treadonly columns: number;\n\t\treadonly rows: number;\n\t}) => Promise<void>;\n\treadonly wait: () => Promise<{ readonly exitCode: number | null }>;\n\treadonly writeStdin: (content: Uint8Array) => Promise<void>;\n}\n\nexport interface GatewayRuntimeLocalExecReservationScheduler {\n\treadonly schedule: (callback: () => void, delayMs: number) => { readonly cancel: () => void };\n}\n\nexport interface GatewayRuntimeLocalExecFinalizeToken {\n\treadonly kind: 'gateway-runtime-local-exec';\n\treadonly reservationId: string;\n}\n\nexport interface GatewayRuntimeLocalExecSpec {\n\treadonly argv: readonly string[];\n\treadonly env: Readonly<Record<string, string>>;\n\treadonly finalizeToken: GatewayRuntimeLocalExecFinalizeToken;\n\treadonly stdinMode: 'pipe-open';\n}\n\nexport interface GatewayRuntimeLocalExecTransportOptions {\n\treadonly helperArgv?: readonly string[];\n\treadonly reservationScheduler?: GatewayRuntimeLocalExecReservationScheduler;\n\treadonly reservationTimeoutMs?: number;\n\treadonly temporaryDirectory?: string;\n}\n\ninterface ReservationRecord {\n\treadonly cancelExpiry: () => void;\n\treadonly operation: GatewayRuntimeLocalExecOperation;\n\treadonly reservationDirectory: string;\n\treadonly reservationId: string;\n\treadonly server: Server;\n\treadonly socketPath: string;\n\treadonly token: string;\n\tconsumed: boolean;\n\tdisposal?: Promise<void>;\n\tfinalized: boolean;\n\tsocket?: Socket;\n}\n\nconst defaultReservationScheduler: GatewayRuntimeLocalExecReservationScheduler = {\n\tschedule(callback, delayMs) {\n\t\tconst timeout = setTimeout(callback, delayMs);\n\t\treturn { cancel: () => clearTimeout(timeout) };\n\t},\n};\n\nfunction validateReservationTimeout(timeoutMs: number): number {\n\tif (!Number.isSafeInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > 60_000) {\n\t\tthrow new RangeError('Local exec reservation timeout must be an integer from 1 through 60000.');\n\t}\n\treturn timeoutMs;\n}\n\nasync function closeServer(server: Server): Promise<void> {\n\tif (!server.listening) return;\n\tawait new Promise<void>((resolve, reject) => {\n\t\tserver.close((error?: Error) => (error === undefined ? resolve() : reject(error)));\n\t});\n}\n\nasync function writeFrame(\n\tsocket: Socket,\n\tframe: GatewayRuntimeLocalExecServerFrame,\n): Promise<void> {\n\tconst encodedFrame = encodeGatewayRuntimeLocalExecFrame(frame);\n\tif (socket.write(encodedFrame)) return;\n\tawait new Promise<void>((resolve, reject) => {\n\t\tconst cleanup = (): void => {\n\t\t\tsocket.off('drain', handleDrain);\n\t\t\tsocket.off('error', handleError);\n\t\t};\n\t\tconst handleDrain = (): void => {\n\t\t\tcleanup();\n\t\t\tresolve();\n\t\t};\n\t\tconst handleError = (error: Error): void => {\n\t\t\tcleanup();\n\t\t\treject(error);\n\t\t};\n\t\tsocket.once('drain', handleDrain);\n\t\tsocket.once('error', handleError);\n\t});\n}\n\nclass GatewayRuntimeLocalExecFrameWriter {\n\t#pendingWrite = Promise.resolve();\n\treadonly #socket: Socket;\n\n\tconstructor(socket: Socket) {\n\t\tthis.#socket = socket;\n\t}\n\n\tasync write(frame: GatewayRuntimeLocalExecServerFrame): Promise<void> {\n\t\tconst write = this.#pendingWrite.then(async () => await writeFrame(this.#socket, frame));\n\t\tthis.#pendingWrite = write.catch(() => undefined);\n\t\tawait write;\n\t}\n}\n\nasync function endSocket(socket: Socket): Promise<void> {\n\tif (socket.destroyed) return;\n\tawait new Promise<void>((resolve) => socket.end(resolve));\n}\n\nasync function pumpOutput(props: {\n\treadonly frameWriter: GatewayRuntimeLocalExecFrameWriter;\n\treadonly kind: 'stderr' | 'stdout';\n\treadonly operation: GatewayRuntimeLocalExecOperation;\n\treadonly socket: Socket;\n}): Promise<void> {\n\tconst read =\n\t\tprops.kind === 'stdout'\n\t\t\t? props.operation.readStdout.bind(props.operation)\n\t\t\t: props.operation.readStderr.bind(props.operation);\n\tif (props.socket.destroyed) return;\n\tconst result = await read(MAXIMUM_STREAM_CHUNK_BYTES);\n\tif (result.kind === 'end') {\n\t\tawait props.frameWriter.write({ kind: `${props.kind}-end` });\n\t\treturn;\n\t}\n\tawait props.frameWriter.write({\n\t\tcontentBase64: Buffer.from(result.content).toString('base64'),\n\t\tkind: `${props.kind}-chunk`,\n\t});\n\tawait pumpOutput(props);\n}\n\nexport class GatewayRuntimeLocalExecTransport {\n\treadonly #helperArgv: readonly string[];\n\treadonly #reservationScheduler: GatewayRuntimeLocalExecReservationScheduler;\n\treadonly #reservationTimeoutMs: number;\n\treadonly #reservations = new Map<string, ReservationRecord>();\n\treadonly #temporaryDirectory: string;\n\n\tconstructor(options: GatewayRuntimeLocalExecTransportOptions = {}) {\n\t\tthis.#helperArgv =\n\t\t\toptions.helperArgv ??\n\t\t\tObject.freeze([\n\t\t\t\tprocess.execPath,\n\t\t\t\tfileURLToPath(\n\t\t\t\t\tnew URL(\n\t\t\t\t\t\t'./gateway-runtime-local-exec/gateway-runtime-local-exec-helper.js',\n\t\t\t\t\t\timport.meta.url,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t]);\n\t\tif (this.#helperArgv.length === 0)\n\t\t\tthrow new TypeError('Local exec helper argv cannot be empty.');\n\t\tthis.#reservationScheduler = options.reservationScheduler ?? defaultReservationScheduler;\n\t\tthis.#reservationTimeoutMs = validateReservationTimeout(\n\t\t\toptions.reservationTimeoutMs ?? DEFAULT_RESERVATION_TIMEOUT_MS,\n\t\t);\n\t\tthis.#temporaryDirectory = options.temporaryDirectory ?? DEFAULT_TEMPORARY_DIRECTORY;\n\t}\n\n\tasync reserve(operation: GatewayRuntimeLocalExecOperation): Promise<GatewayRuntimeLocalExecSpec> {\n\t\tconst reservationId = randomBytes(16).toString('hex');\n\t\tconst token = randomBytes(32).toString('base64url');\n\t\tconst reservationDirectory = await mkdtemp(\n\t\t\tjoin(this.#temporaryDirectory, 'agent-vm-local-exec-'),\n\t\t);\n\t\tawait chmod(reservationDirectory, 0o700);\n\t\tconst socketPath = join(reservationDirectory, 'relay.sock');\n\t\tconst server = createServer();\n\t\tconst expiry = this.#reservationScheduler.schedule(() => {\n\t\t\tvoid this.#expireReservation(reservationId).catch(() => undefined);\n\t\t}, this.#reservationTimeoutMs);\n\t\tconst reservation: ReservationRecord = {\n\t\t\tcancelExpiry: expiry.cancel,\n\t\t\tconsumed: false,\n\t\t\tfinalized: false,\n\t\t\toperation,\n\t\t\treservationDirectory,\n\t\t\treservationId,\n\t\t\tserver,\n\t\t\tsocketPath,\n\t\t\ttoken,\n\t\t};\n\t\tthis.#reservations.set(reservationId, reservation);\n\t\tserver.on('connection', (socket) => this.#acceptConnection(reservation, socket));\n\t\ttry {\n\t\t\tawait new Promise<void>((resolve, reject) => {\n\t\t\t\tserver.once('error', reject);\n\t\t\t\tserver.listen(socketPath, () => {\n\t\t\t\t\tserver.off('error', reject);\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t\tawait chmod(socketPath, 0o600);\n\t\t} catch (error: unknown) {\n\t\t\tawait this.#disposeReservation(reservation, true);\n\t\t\tthrow error;\n\t\t}\n\t\treturn {\n\t\t\targv: [...this.#helperArgv],\n\t\t\tenv: {\n\t\t\t\t[GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV]: socketPath,\n\t\t\t\t[GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV]: token,\n\t\t\t},\n\t\t\tfinalizeToken: { kind: 'gateway-runtime-local-exec', reservationId },\n\t\t\tstdinMode: 'pipe-open',\n\t\t};\n\t}\n\n\tasync finalize(token: unknown): Promise<void> {\n\t\tconst reservationId =\n\t\t\ttypeof token === 'object' && token !== null ? Reflect.get(token, 'reservationId') : undefined;\n\t\tif (\n\t\t\ttypeof token !== 'object' ||\n\t\t\ttoken === null ||\n\t\t\tReflect.get(token, 'kind') !== 'gateway-runtime-local-exec' ||\n\t\t\ttypeof reservationId !== 'string'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst reservation = this.#reservations.get(reservationId);\n\t\tif (reservation === undefined) return;\n\t\tawait this.#disposeReservation(reservation, !reservation.consumed);\n\t}\n\n\tasync close(): Promise<void> {\n\t\tawait Promise.all(\n\t\t\t[...this.#reservations.values()].map(\n\t\t\t\tasync (reservation) => await this.#disposeReservation(reservation, true),\n\t\t\t),\n\t\t);\n\t}\n\n\tasync #expireReservation(reservationId: string): Promise<void> {\n\t\tconst reservation = this.#reservations.get(reservationId);\n\t\tif (reservation === undefined || reservation.consumed) return;\n\t\tawait this.#disposeReservation(reservation, true);\n\t}\n\n\t#acceptConnection(reservation: ReservationRecord, socket: Socket): void {\n\t\tif (reservation.finalized || reservation.consumed) {\n\t\t\tvoid writeFrame(socket, {\n\t\t\t\tkind: 'rejected',\n\t\t\t\tmessage: 'Reservation already consumed.',\n\t\t\t})\n\t\t\t\t.catch(() => undefined)\n\t\t\t\t.finally(() => socket.destroy());\n\t\t\treturn;\n\t\t}\n\t\tconst decoder = new GatewayRuntimeLocalExecLineDecoder();\n\t\tconst connectionState = { authenticated: false };\n\t\tsocket.once('close', () => {\n\t\t\tif (connectionState.authenticated && !reservation.finalized) {\n\t\t\t\tvoid this.#disposeReservation(reservation, true).catch(() => undefined);\n\t\t\t}\n\t\t});\n\t\tsocket.on('data', (chunk: Buffer) => {\n\t\t\tsocket.pause();\n\t\t\tvoid this.#processClientFrames({\n\t\t\t\tchunk,\n\t\t\t\tconnectionState,\n\t\t\t\tdecoder,\n\t\t\t\treservation,\n\t\t\t\tsocket,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (!socket.destroyed) socket.resume();\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\tvoid writeFrame(socket, {\n\t\t\t\t\t\tkind: 'rejected',\n\t\t\t\t\t\tmessage: error instanceof Error ? error.message : 'Invalid local exec frame.',\n\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => undefined)\n\t\t\t\t\t\t.finally(() => socket.destroy());\n\t\t\t\t});\n\t\t});\n\t}\n\n\tasync #processClientFrames(props: {\n\t\treadonly chunk: Buffer;\n\t\treadonly connectionState: { authenticated: boolean };\n\t\treadonly decoder: GatewayRuntimeLocalExecLineDecoder;\n\t\treadonly reservation: ReservationRecord;\n\t\treadonly socket: Socket;\n\t}): Promise<void> {\n\t\t// oxlint-disable no-await-in-loop -- input frames must preserve order and backpressure.\n\t\tfor (const line of props.decoder.push(props.chunk)) {\n\t\t\tconst frame = parseGatewayRuntimeLocalExecClientFrame(line);\n\t\t\tif (!props.connectionState.authenticated) {\n\t\t\t\tif (\n\t\t\t\t\tframe.kind !== 'authenticate' ||\n\t\t\t\t\tframe.token !== props.reservation.token ||\n\t\t\t\t\tprops.reservation.consumed\n\t\t\t\t) {\n\t\t\t\t\tawait writeFrame(props.socket, {\n\t\t\t\t\t\tkind: 'rejected',\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\tframe.kind === 'authenticate' && frame.token === props.reservation.token\n\t\t\t\t\t\t\t\t? 'Reservation already consumed.'\n\t\t\t\t\t\t\t\t: 'Invalid reservation token.',\n\t\t\t\t\t});\n\t\t\t\t\tprops.socket.destroy();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tprops.connectionState.authenticated = true;\n\t\t\t\tprops.reservation.consumed = true;\n\t\t\t\tprops.reservation.cancelExpiry();\n\t\t\t\tprops.reservation.socket = props.socket;\n\t\t\t\tprops.reservation.server.close();\n\t\t\t\tawait writeFrame(props.socket, { kind: 'accepted' });\n\t\t\t\tvoid this.#runAuthenticatedOperation(props.reservation, props.socket).catch(\n\t\t\t\t\t() => undefined,\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (frame.kind) {\n\t\t\t\tcase 'authenticate':\n\t\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Duplicate authentication frame.');\n\t\t\t\tcase 'cancel':\n\t\t\t\t\tawait props.reservation.operation.cancel();\n\t\t\t\t\treturn;\n\t\t\t\tcase 'stdin-chunk':\n\t\t\t\t\tawait props.reservation.operation.writeStdin(Buffer.from(frame.contentBase64, 'base64'));\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 'stdin-end':\n\t\t\t\t\tawait props.reservation.operation.closeStdin();\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 'terminal-resize':\n\t\t\t\t\tif (props.reservation.operation.resizeTerminal === undefined) {\n\t\t\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Terminal resize is unavailable.');\n\t\t\t\t\t}\n\t\t\t\t\tawait props.reservation.operation.resizeTerminal({\n\t\t\t\t\t\tcolumns: frame.columns,\n\t\t\t\t\t\trows: frame.rows,\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// oxlint-enable no-await-in-loop\n\t}\n\n\tasync #runAuthenticatedOperation(reservation: ReservationRecord, socket: Socket): Promise<void> {\n\t\ttry {\n\t\t\tconst frameWriter = new GatewayRuntimeLocalExecFrameWriter(socket);\n\t\t\tconst [waitResult] = await Promise.all([\n\t\t\t\treservation.operation.wait(),\n\t\t\t\tpumpOutput({ frameWriter, kind: 'stdout', operation: reservation.operation, socket }),\n\t\t\t\tpumpOutput({ frameWriter, kind: 'stderr', operation: reservation.operation, socket }),\n\t\t\t]);\n\t\t\tif (!socket.destroyed) {\n\t\t\t\tawait frameWriter.write({ exitCode: waitResult.exitCode, kind: 'exited' });\n\t\t\t\tawait endSocket(socket);\n\t\t\t}\n\t\t} catch {\n\t\t\tsocket.destroy();\n\t\t} finally {\n\t\t\tawait this.#disposeReservation(reservation, false);\n\t\t}\n\t}\n\n\tasync #disposeReservation(reservation: ReservationRecord, cancel: boolean): Promise<void> {\n\t\tif (reservation.disposal !== undefined) return await reservation.disposal;\n\t\treservation.disposal = this.#disposeReservationOnce(reservation, cancel);\n\t\tawait reservation.disposal;\n\t}\n\n\tasync #disposeReservationOnce(reservation: ReservationRecord, cancel: boolean): Promise<void> {\n\t\tif (reservation.finalized) return;\n\t\treservation.finalized = true;\n\t\treservation.cancelExpiry();\n\t\tlet cancellationError: unknown;\n\t\tif (cancel) {\n\t\t\ttry {\n\t\t\t\tawait reservation.operation.cancel();\n\t\t\t} catch (error: unknown) {\n\t\t\t\tcancellationError = error;\n\t\t\t}\n\t\t}\n\t\tlet cleanupError: unknown;\n\t\ttry {\n\t\t\treservation.socket?.destroy();\n\t\t\tawait closeServer(reservation.server).catch(() => undefined);\n\t\t\tawait rm(reservation.reservationDirectory, { force: true, recursive: true });\n\t\t} catch (error: unknown) {\n\t\t\tcleanupError = error;\n\t\t} finally {\n\t\t\tthis.#reservations.delete(reservation.reservationId);\n\t\t}\n\t\tif (cancellationError !== undefined && cleanupError !== undefined) {\n\t\t\tthrow new AggregateError(\n\t\t\t\t[cancellationError, cleanupError],\n\t\t\t\t'Local exec cancellation and cleanup both failed.',\n\t\t\t);\n\t\t}\n\t\tif (cancellationError !== undefined) throw cancellationError;\n\t\tif (cleanupError !== undefined) throw cleanupError;\n\t}\n}\n"],"mappings":";;;;;;AAAA,MAAM,iCAAiC,MAAM;AAC7C,MAAM,wCAAwC,KAAK;AACnD,MAAM,iCAAiC;AAkBvC,IAAa,uCAAb,cAA0D,MAAM;CAC/D,YAAY,SAAiB;EAC5B,MAAM,QAAQ;EACd,KAAK,OAAO;;;AAId,SAAS,SAAS,OAA4D;CAC7E,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM;;AAG5E,SAAS,iBAAiB,OAA0C,MAA+B;CAClG,MAAM,aAAa,OAAO,KAAK,MAAM,CAAC,UAAU;CAChD,MAAM,eAAe,KAAK,UAAU;CACpC,IACC,WAAW,WAAW,aAAa,UACnC,WAAW,MAAM,KAAK,UAAU,QAAQ,aAAa,OAAO,EAE5D,MAAM,IAAI,qCAAqC,+CAA+C;;AAIhG,SAAS,cAAc,OAAgB,WAA2B;CACjE,IAAI,OA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Y,cAAc;;EAErD,IAAI,sBAAsB,KAAA,KAAa,iBAAiB,KAAA,GACvD,MAAM,IAAI,eACT,CAAC,mBAAmB,aAAa,EACjC,mDACA;EAEF,IAAI,sBAAsB,KAAA,GAAW,MAAM;EAC3C,IAAI,iBAAiB,KAAA,GAAW,MAAM"}
1
+ {"version":3,"file":"gateway-runtime-local-exec-transport-CO2bQ3wz.js","names":["#buffer","#socket","#pendingWrite","#helperArgv","#reservationScheduler","#reservationTimeoutMs","#reservations","#temporaryDirectory","#expireReservation","#acceptConnection","#disposeReservation","#processClientFrames","#runAuthenticatedOperation","#disposeReservationOnce"],"sources":["../src/gateway-runtime-local-exec/gateway-runtime-local-exec-protocol.ts","../src/gateway-runtime-local-exec/gateway-runtime-local-exec-transport.ts"],"sourcesContent":["const MAXIMUM_LOCAL_EXEC_FRAME_BYTES = 128 * 1024;\nconst MAXIMUM_LOCAL_EXEC_STREAM_CHUNK_BYTES = 64 * 1024;\nconst MAXIMUM_LOCAL_EXEC_TOKEN_BYTES = 256;\n\nexport type GatewayRuntimeLocalExecClientFrame =\n\t| { readonly kind: 'authenticate'; readonly token: string }\n\t| { readonly kind: 'cancel' }\n\t| { readonly contentBase64: string; readonly kind: 'stdin-chunk' }\n\t| { readonly kind: 'stdin-end' }\n\t| { readonly columns: number; readonly kind: 'terminal-resize'; readonly rows: number };\n\nexport type GatewayRuntimeLocalExecServerFrame =\n\t| { readonly kind: 'accepted' }\n\t| { readonly contentBase64: string; readonly kind: 'stderr-chunk' }\n\t| { readonly kind: 'stderr-end' }\n\t| { readonly exitCode: number | null; readonly kind: 'exited' }\n\t| { readonly message: string; readonly kind: 'rejected' }\n\t| { readonly contentBase64: string; readonly kind: 'stdout-chunk' }\n\t| { readonly kind: 'stdout-end' };\n\nexport class GatewayRuntimeLocalExecProtocolError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = 'GatewayRuntimeLocalExecProtocolError';\n\t}\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n\treturn typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction requireExactKeys(value: Readonly<Record<string, unknown>>, keys: readonly string[]): void {\n\tconst actualKeys = Object.keys(value).toSorted();\n\tconst expectedKeys = keys.toSorted();\n\tif (\n\t\tactualKeys.length !== expectedKeys.length ||\n\t\tactualKeys.some((key, index) => key !== expectedKeys[index])\n\t) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame contains unexpected fields.');\n\t}\n}\n\nfunction requireString(value: unknown, fieldName: string): string {\n\tif (typeof value !== 'string' || value.length === 0) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t`Local exec frame field '${fieldName}' must be a non-empty string.`,\n\t\t);\n\t}\n\treturn value;\n}\n\nfunction requireBoundedToken(value: unknown): string {\n\tconst token = requireString(value, 'token');\n\tif (Buffer.byteLength(token, 'utf8') > MAXIMUM_LOCAL_EXEC_TOKEN_BYTES) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t'Local exec reservation token exceeds the byte limit.',\n\t\t);\n\t}\n\treturn token;\n}\n\nfunction requireCanonicalBase64(value: unknown): string {\n\tconst encoded = requireString(value, 'contentBase64');\n\tconst decoded = Buffer.from(encoded, 'base64');\n\tif (\n\t\tdecoded.byteLength > MAXIMUM_LOCAL_EXEC_STREAM_CHUNK_BYTES ||\n\t\tdecoded.toString('base64') !== encoded\n\t) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t'Local exec stream content must be canonical bounded base64.',\n\t\t);\n\t}\n\treturn encoded;\n}\n\nfunction requireTerminalDimension(value: unknown, fieldName: string): number {\n\tif (!Number.isSafeInteger(value) || (value as number) <= 0 || (value as number) > 1_000) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t`Local exec frame field '${fieldName}' must be a bounded positive integer.`,\n\t\t);\n\t}\n\treturn value as number;\n}\n\nfunction parseJsonObject(line: string): Readonly<Record<string, unknown>> {\n\tif (Buffer.byteLength(line, 'utf8') > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t}\n\tlet value: unknown;\n\ttry {\n\t\tvalue = JSON.parse(line);\n\t} catch (error: unknown) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\terror instanceof Error\n\t\t\t\t? `Local exec frame is not valid JSON: ${error.message}`\n\t\t\t\t: 'Local exec frame is not valid JSON.',\n\t\t);\n\t}\n\tif (!isRecord(value)) {\n\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame must be an object.');\n\t}\n\treturn value;\n}\n\nexport function encodeGatewayRuntimeLocalExecFrame(\n\tframe: GatewayRuntimeLocalExecClientFrame | GatewayRuntimeLocalExecServerFrame,\n): string {\n\treturn `${JSON.stringify(frame)}\\n`;\n}\n\nexport function parseGatewayRuntimeLocalExecClientFrame(\n\tline: string,\n): GatewayRuntimeLocalExecClientFrame {\n\tconst value = parseJsonObject(line);\n\tconst kind = requireString(value.kind, 'kind');\n\tswitch (kind) {\n\t\tcase 'authenticate':\n\t\t\trequireExactKeys(value, ['kind', 'token']);\n\t\t\treturn { kind, token: requireBoundedToken(value.token) };\n\t\tcase 'cancel':\n\t\tcase 'stdin-end':\n\t\t\trequireExactKeys(value, ['kind']);\n\t\t\treturn { kind };\n\t\tcase 'stdin-chunk':\n\t\t\trequireExactKeys(value, ['contentBase64', 'kind']);\n\t\t\treturn { contentBase64: requireCanonicalBase64(value.contentBase64), kind };\n\t\tcase 'terminal-resize':\n\t\t\trequireExactKeys(value, ['columns', 'kind', 'rows']);\n\t\t\treturn {\n\t\t\t\tcolumns: requireTerminalDimension(value.columns, 'columns'),\n\t\t\t\tkind,\n\t\t\t\trows: requireTerminalDimension(value.rows, 'rows'),\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(`Unknown local exec client frame '${kind}'.`);\n\t}\n}\n\nexport function parseGatewayRuntimeLocalExecServerFrame(\n\tline: string,\n): GatewayRuntimeLocalExecServerFrame {\n\tconst value = parseJsonObject(line);\n\tconst kind = requireString(value.kind, 'kind');\n\tswitch (kind) {\n\t\tcase 'accepted':\n\t\tcase 'stderr-end':\n\t\tcase 'stdout-end':\n\t\t\trequireExactKeys(value, ['kind']);\n\t\t\treturn { kind };\n\t\tcase 'stderr-chunk':\n\t\tcase 'stdout-chunk':\n\t\t\trequireExactKeys(value, ['contentBase64', 'kind']);\n\t\t\treturn { contentBase64: requireCanonicalBase64(value.contentBase64), kind };\n\t\tcase 'exited':\n\t\t\trequireExactKeys(value, ['exitCode', 'kind']);\n\t\t\tif (\n\t\t\t\tvalue.exitCode !== null &&\n\t\t\t\t(!Number.isSafeInteger(value.exitCode) ||\n\t\t\t\t\t(value.exitCode as number) < 0 ||\n\t\t\t\t\t(value.exitCode as number) > 255)\n\t\t\t) {\n\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t\t\t\"Local exec frame field 'exitCode' must be null or an integer from 0 through 255.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn { exitCode: value.exitCode as number | null, kind };\n\t\tcase 'rejected':\n\t\t\trequireExactKeys(value, ['kind', 'message']);\n\t\t\treturn { kind, message: requireString(value.message, 'message') };\n\t\tdefault:\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(`Unknown local exec server frame '${kind}'.`);\n\t}\n}\n\nexport class GatewayRuntimeLocalExecLineDecoder {\n\t#buffer = Buffer.alloc(0);\n\n\tpush(chunk: Uint8Array): readonly string[] {\n\t\tif (chunk.byteLength + this.#buffer.byteLength > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError(\n\t\t\t\t'Local exec frame batch exceeds the byte limit.',\n\t\t\t);\n\t\t}\n\t\tthis.#buffer = Buffer.concat([this.#buffer, chunk]);\n\t\tconst lines: string[] = [];\n\t\tlet newlineIndex = this.#buffer.indexOf(0x0a);\n\t\twhile (newlineIndex >= 0) {\n\t\t\tconst line = this.#buffer.subarray(0, newlineIndex).toString('utf8');\n\t\t\tthis.#buffer = this.#buffer.subarray(newlineIndex + 1);\n\t\t\tif (Buffer.byteLength(line, 'utf8') > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t\t\t}\n\t\t\tif (line.length > 0) lines.push(line);\n\t\t\tnewlineIndex = this.#buffer.indexOf(0x0a);\n\t\t}\n\t\tif (this.#buffer.byteLength > MAXIMUM_LOCAL_EXEC_FRAME_BYTES) {\n\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Local exec frame exceeds the byte limit.');\n\t\t}\n\t\treturn lines;\n\t}\n}\n","import { randomBytes } from 'node:crypto';\nimport { chmod, mkdtemp, rm } from 'node:fs/promises';\nimport { createServer, type Server, type Socket } from 'node:net';\nimport { join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport {\n\tGatewayRuntimeLocalExecLineDecoder,\n\tGatewayRuntimeLocalExecProtocolError,\n\tencodeGatewayRuntimeLocalExecFrame,\n\tparseGatewayRuntimeLocalExecClientFrame,\n\ttype GatewayRuntimeLocalExecServerFrame,\n} from './gateway-runtime-local-exec-protocol.js';\n\nexport const GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV = 'AGENT_VM_LOCAL_EXEC_SOCKET';\nexport const GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV = 'AGENT_VM_LOCAL_EXEC_TOKEN';\n\nconst DEFAULT_RESERVATION_TIMEOUT_MS = 15_000;\nconst DEFAULT_TEMPORARY_DIRECTORY = '/tmp';\nconst MAXIMUM_STREAM_CHUNK_BYTES = 64 * 1024;\n\nexport type GatewayRuntimeLocalExecReadResult =\n\t| { readonly content: Uint8Array; readonly kind: 'chunk' }\n\t| { readonly kind: 'end' };\n\nexport interface GatewayRuntimeLocalExecOperation {\n\treadonly cancel: () => Promise<void>;\n\treadonly closeStdin: () => Promise<void>;\n\treadonly readStderr: (maximumBytes: number) => Promise<GatewayRuntimeLocalExecReadResult>;\n\treadonly readStdout: (maximumBytes: number) => Promise<GatewayRuntimeLocalExecReadResult>;\n\treadonly resizeTerminal?: (size: {\n\t\treadonly columns: number;\n\t\treadonly rows: number;\n\t}) => Promise<void>;\n\treadonly wait: () => Promise<{ readonly exitCode: number | null }>;\n\treadonly writeStdin: (content: Uint8Array) => Promise<void>;\n}\n\nexport interface GatewayRuntimeLocalExecReservationScheduler {\n\treadonly schedule: (callback: () => void, delayMs: number) => { readonly cancel: () => void };\n}\n\nexport interface GatewayRuntimeLocalExecFinalizeToken {\n\treadonly kind: 'gateway-runtime-local-exec';\n\treadonly reservationId: string;\n}\n\nexport interface GatewayRuntimeLocalExecSpec {\n\treadonly argv: readonly string[];\n\treadonly env: Readonly<Record<string, string>>;\n\treadonly finalizeToken: GatewayRuntimeLocalExecFinalizeToken;\n\treadonly stdinMode: 'pipe-open';\n}\n\nexport interface GatewayRuntimeLocalExecTransportOptions {\n\treadonly helperArgv?: readonly string[];\n\treadonly reservationScheduler?: GatewayRuntimeLocalExecReservationScheduler;\n\treadonly reservationTimeoutMs?: number;\n\treadonly temporaryDirectory?: string;\n}\n\ninterface ReservationRecord {\n\treadonly cancelExpiry: () => void;\n\treadonly operation: GatewayRuntimeLocalExecOperation;\n\treadonly reservationDirectory: string;\n\treadonly reservationId: string;\n\treadonly server: Server;\n\treadonly socketPath: string;\n\treadonly token: string;\n\tconsumed: boolean;\n\tdisposal?: Promise<void>;\n\tfinalized: boolean;\n\tsocket?: Socket;\n}\n\nconst defaultReservationScheduler: GatewayRuntimeLocalExecReservationScheduler = {\n\tschedule(callback, delayMs) {\n\t\tconst timeout = setTimeout(callback, delayMs);\n\t\treturn { cancel: () => clearTimeout(timeout) };\n\t},\n};\n\nfunction validateReservationTimeout(timeoutMs: number): number {\n\tif (!Number.isSafeInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > 60_000) {\n\t\tthrow new RangeError('Local exec reservation timeout must be an integer from 1 through 60000.');\n\t}\n\treturn timeoutMs;\n}\n\nasync function closeServer(server: Server): Promise<void> {\n\tif (!server.listening) return;\n\tawait new Promise<void>((resolve, reject) => {\n\t\tserver.close((error?: Error) => (error === undefined ? resolve() : reject(error)));\n\t});\n}\n\nasync function writeFrame(\n\tsocket: Socket,\n\tframe: GatewayRuntimeLocalExecServerFrame,\n): Promise<void> {\n\tconst encodedFrame = encodeGatewayRuntimeLocalExecFrame(frame);\n\tif (socket.write(encodedFrame)) return;\n\tawait new Promise<void>((resolve, reject) => {\n\t\tconst cleanup = (): void => {\n\t\t\tsocket.off('drain', handleDrain);\n\t\t\tsocket.off('error', handleError);\n\t\t};\n\t\tconst handleDrain = (): void => {\n\t\t\tcleanup();\n\t\t\tresolve();\n\t\t};\n\t\tconst handleError = (error: Error): void => {\n\t\t\tcleanup();\n\t\t\treject(error);\n\t\t};\n\t\tsocket.once('drain', handleDrain);\n\t\tsocket.once('error', handleError);\n\t});\n}\n\nclass GatewayRuntimeLocalExecFrameWriter {\n\t#pendingWrite = Promise.resolve();\n\treadonly #socket: Socket;\n\n\tconstructor(socket: Socket) {\n\t\tthis.#socket = socket;\n\t}\n\n\tasync write(frame: GatewayRuntimeLocalExecServerFrame): Promise<void> {\n\t\tconst write = this.#pendingWrite.then(async () => await writeFrame(this.#socket, frame));\n\t\tthis.#pendingWrite = write.catch(() => undefined);\n\t\tawait write;\n\t}\n}\n\nasync function endSocket(socket: Socket): Promise<void> {\n\tif (socket.destroyed) return;\n\tawait new Promise<void>((resolve) => socket.end(resolve));\n}\n\nasync function pumpOutput(props: {\n\treadonly frameWriter: GatewayRuntimeLocalExecFrameWriter;\n\treadonly kind: 'stderr' | 'stdout';\n\treadonly operation: GatewayRuntimeLocalExecOperation;\n\treadonly socket: Socket;\n}): Promise<void> {\n\tconst read =\n\t\tprops.kind === 'stdout'\n\t\t\t? props.operation.readStdout.bind(props.operation)\n\t\t\t: props.operation.readStderr.bind(props.operation);\n\tif (props.socket.destroyed) return;\n\tconst result = await read(MAXIMUM_STREAM_CHUNK_BYTES);\n\tif (result.kind === 'end') {\n\t\tawait props.frameWriter.write({ kind: `${props.kind}-end` });\n\t\treturn;\n\t}\n\tawait props.frameWriter.write({\n\t\tcontentBase64: Buffer.from(result.content).toString('base64'),\n\t\tkind: `${props.kind}-chunk`,\n\t});\n\tawait pumpOutput(props);\n}\n\nexport class GatewayRuntimeLocalExecTransport {\n\treadonly #helperArgv: readonly string[];\n\treadonly #reservationScheduler: GatewayRuntimeLocalExecReservationScheduler;\n\treadonly #reservationTimeoutMs: number;\n\treadonly #reservations = new Map<string, ReservationRecord>();\n\treadonly #temporaryDirectory: string;\n\n\tconstructor(options: GatewayRuntimeLocalExecTransportOptions = {}) {\n\t\tthis.#helperArgv =\n\t\t\toptions.helperArgv ??\n\t\t\tObject.freeze([\n\t\t\t\tprocess.execPath,\n\t\t\t\tfileURLToPath(\n\t\t\t\t\tnew URL(\n\t\t\t\t\t\t'./gateway-runtime-local-exec/gateway-runtime-local-exec-helper.js',\n\t\t\t\t\t\timport.meta.url,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t]);\n\t\tif (this.#helperArgv.length === 0)\n\t\t\tthrow new TypeError('Local exec helper argv cannot be empty.');\n\t\tthis.#reservationScheduler = options.reservationScheduler ?? defaultReservationScheduler;\n\t\tthis.#reservationTimeoutMs = validateReservationTimeout(\n\t\t\toptions.reservationTimeoutMs ?? DEFAULT_RESERVATION_TIMEOUT_MS,\n\t\t);\n\t\tthis.#temporaryDirectory = options.temporaryDirectory ?? DEFAULT_TEMPORARY_DIRECTORY;\n\t}\n\n\tasync reserve(operation: GatewayRuntimeLocalExecOperation): Promise<GatewayRuntimeLocalExecSpec> {\n\t\tconst reservationId = randomBytes(16).toString('hex');\n\t\tconst token = randomBytes(32).toString('base64url');\n\t\tconst reservationDirectory = await mkdtemp(\n\t\t\tjoin(this.#temporaryDirectory, 'agent-vm-local-exec-'),\n\t\t);\n\t\tawait chmod(reservationDirectory, 0o700);\n\t\tconst socketPath = join(reservationDirectory, 'relay.sock');\n\t\tconst server = createServer();\n\t\tconst expiry = this.#reservationScheduler.schedule(() => {\n\t\t\tvoid this.#expireReservation(reservationId).catch(() => undefined);\n\t\t}, this.#reservationTimeoutMs);\n\t\tconst reservation: ReservationRecord = {\n\t\t\tcancelExpiry: expiry.cancel,\n\t\t\tconsumed: false,\n\t\t\tfinalized: false,\n\t\t\toperation,\n\t\t\treservationDirectory,\n\t\t\treservationId,\n\t\t\tserver,\n\t\t\tsocketPath,\n\t\t\ttoken,\n\t\t};\n\t\tthis.#reservations.set(reservationId, reservation);\n\t\tserver.on('connection', (socket) => this.#acceptConnection(reservation, socket));\n\t\ttry {\n\t\t\tawait new Promise<void>((resolve, reject) => {\n\t\t\t\tserver.once('error', reject);\n\t\t\t\tserver.listen(socketPath, () => {\n\t\t\t\t\tserver.off('error', reject);\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t\tawait chmod(socketPath, 0o600);\n\t\t} catch (error: unknown) {\n\t\t\tawait this.#disposeReservation(reservation, true);\n\t\t\tthrow error;\n\t\t}\n\t\treturn {\n\t\t\targv: [...this.#helperArgv],\n\t\t\tenv: {\n\t\t\t\t[GATEWAY_RUNTIME_LOCAL_EXEC_SOCKET_ENV]: socketPath,\n\t\t\t\t[GATEWAY_RUNTIME_LOCAL_EXEC_TOKEN_ENV]: token,\n\t\t\t},\n\t\t\tfinalizeToken: { kind: 'gateway-runtime-local-exec', reservationId },\n\t\t\tstdinMode: 'pipe-open',\n\t\t};\n\t}\n\n\tasync finalize(token: unknown): Promise<void> {\n\t\tconst reservationId =\n\t\t\ttypeof token === 'object' && token !== null ? Reflect.get(token, 'reservationId') : undefined;\n\t\tif (\n\t\t\ttypeof token !== 'object' ||\n\t\t\ttoken === null ||\n\t\t\tReflect.get(token, 'kind') !== 'gateway-runtime-local-exec' ||\n\t\t\ttypeof reservationId !== 'string'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst reservation = this.#reservations.get(reservationId);\n\t\tif (reservation === undefined) return;\n\t\tawait this.#disposeReservation(reservation, !reservation.consumed);\n\t}\n\n\tasync close(): Promise<void> {\n\t\tawait Promise.all(\n\t\t\t[...this.#reservations.values()].map(\n\t\t\t\tasync (reservation) => await this.#disposeReservation(reservation, true),\n\t\t\t),\n\t\t);\n\t}\n\n\tasync #expireReservation(reservationId: string): Promise<void> {\n\t\tconst reservation = this.#reservations.get(reservationId);\n\t\tif (reservation === undefined || reservation.consumed) return;\n\t\tawait this.#disposeReservation(reservation, true);\n\t}\n\n\t#acceptConnection(reservation: ReservationRecord, socket: Socket): void {\n\t\tif (reservation.finalized || reservation.consumed) {\n\t\t\tvoid writeFrame(socket, {\n\t\t\t\tkind: 'rejected',\n\t\t\t\tmessage: 'Reservation already consumed.',\n\t\t\t})\n\t\t\t\t.catch(() => undefined)\n\t\t\t\t.finally(() => socket.destroy());\n\t\t\treturn;\n\t\t}\n\t\tconst decoder = new GatewayRuntimeLocalExecLineDecoder();\n\t\tconst connectionState = { authenticated: false };\n\t\tsocket.once('close', () => {\n\t\t\tif (connectionState.authenticated && !reservation.finalized) {\n\t\t\t\tvoid this.#disposeReservation(reservation, true).catch(() => undefined);\n\t\t\t}\n\t\t});\n\t\tsocket.on('data', (chunk: Buffer) => {\n\t\t\tsocket.pause();\n\t\t\tvoid this.#processClientFrames({\n\t\t\t\tchunk,\n\t\t\t\tconnectionState,\n\t\t\t\tdecoder,\n\t\t\t\treservation,\n\t\t\t\tsocket,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (!socket.destroyed) socket.resume();\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\tvoid writeFrame(socket, {\n\t\t\t\t\t\tkind: 'rejected',\n\t\t\t\t\t\tmessage: error instanceof Error ? error.message : 'Invalid local exec frame.',\n\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => undefined)\n\t\t\t\t\t\t.finally(() => socket.destroy());\n\t\t\t\t});\n\t\t});\n\t}\n\n\tasync #processClientFrames(props: {\n\t\treadonly chunk: Buffer;\n\t\treadonly connectionState: { authenticated: boolean };\n\t\treadonly decoder: GatewayRuntimeLocalExecLineDecoder;\n\t\treadonly reservation: ReservationRecord;\n\t\treadonly socket: Socket;\n\t}): Promise<void> {\n\t\t// oxlint-disable no-await-in-loop -- input frames must preserve order and backpressure.\n\t\tfor (const line of props.decoder.push(props.chunk)) {\n\t\t\tconst frame = parseGatewayRuntimeLocalExecClientFrame(line);\n\t\t\tif (!props.connectionState.authenticated) {\n\t\t\t\tif (\n\t\t\t\t\tframe.kind !== 'authenticate' ||\n\t\t\t\t\tframe.token !== props.reservation.token ||\n\t\t\t\t\tprops.reservation.consumed\n\t\t\t\t) {\n\t\t\t\t\tawait writeFrame(props.socket, {\n\t\t\t\t\t\tkind: 'rejected',\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\tframe.kind === 'authenticate' && frame.token === props.reservation.token\n\t\t\t\t\t\t\t\t? 'Reservation already consumed.'\n\t\t\t\t\t\t\t\t: 'Invalid reservation token.',\n\t\t\t\t\t});\n\t\t\t\t\tprops.socket.destroy();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tprops.connectionState.authenticated = true;\n\t\t\t\tprops.reservation.consumed = true;\n\t\t\t\tprops.reservation.cancelExpiry();\n\t\t\t\tprops.reservation.socket = props.socket;\n\t\t\t\tprops.reservation.server.close();\n\t\t\t\tawait writeFrame(props.socket, { kind: 'accepted' });\n\t\t\t\tvoid this.#runAuthenticatedOperation(props.reservation, props.socket).catch(\n\t\t\t\t\t() => undefined,\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (frame.kind) {\n\t\t\t\tcase 'authenticate':\n\t\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Duplicate authentication frame.');\n\t\t\t\tcase 'cancel':\n\t\t\t\t\tawait props.reservation.operation.cancel();\n\t\t\t\t\treturn;\n\t\t\t\tcase 'stdin-chunk':\n\t\t\t\t\tawait props.reservation.operation.writeStdin(Buffer.from(frame.contentBase64, 'base64'));\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 'stdin-end':\n\t\t\t\t\tawait props.reservation.operation.closeStdin();\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 'terminal-resize':\n\t\t\t\t\tif (props.reservation.operation.resizeTerminal === undefined) {\n\t\t\t\t\t\tthrow new GatewayRuntimeLocalExecProtocolError('Terminal resize is unavailable.');\n\t\t\t\t\t}\n\t\t\t\t\tawait props.reservation.operation.resizeTerminal({\n\t\t\t\t\t\tcolumns: frame.columns,\n\t\t\t\t\t\trows: frame.rows,\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// oxlint-enable no-await-in-loop\n\t}\n\n\tasync #runAuthenticatedOperation(reservation: ReservationRecord, socket: Socket): Promise<void> {\n\t\ttry {\n\t\t\tconst frameWriter = new GatewayRuntimeLocalExecFrameWriter(socket);\n\t\t\tconst [waitResult] = await Promise.all([\n\t\t\t\treservation.operation.wait(),\n\t\t\t\tpumpOutput({ frameWriter, kind: 'stdout', operation: reservation.operation, socket }),\n\t\t\t\tpumpOutput({ frameWriter, kind: 'stderr', operation: reservation.operation, socket }),\n\t\t\t]);\n\t\t\tif (!socket.destroyed) {\n\t\t\t\tawait frameWriter.write({ exitCode: waitResult.exitCode, kind: 'exited' });\n\t\t\t\tawait endSocket(socket);\n\t\t\t}\n\t\t} catch {\n\t\t\tsocket.destroy();\n\t\t} finally {\n\t\t\tawait this.#disposeReservation(reservation, false);\n\t\t}\n\t}\n\n\tasync #disposeReservation(reservation: ReservationRecord, cancel: boolean): Promise<void> {\n\t\tif (reservation.disposal !== undefined) return await reservation.disposal;\n\t\treservation.disposal = this.#disposeReservationOnce(reservation, cancel);\n\t\tawait reservation.disposal;\n\t}\n\n\tasync #disposeReservationOnce(reservation: ReservationRecord, cancel: boolean): Promise<void> {\n\t\tif (reservation.finalized) return;\n\t\treservation.finalized = true;\n\t\treservation.cancelExpiry();\n\t\tlet cancellationError: unknown;\n\t\tif (cancel) {\n\t\t\ttry {\n\t\t\t\tawait reservation.operation.cancel();\n\t\t\t} catch (error: unknown) {\n\t\t\t\tcancellationError = error;\n\t\t\t}\n\t\t}\n\t\tlet cleanupError: unknown;\n\t\ttry {\n\t\t\treservation.socket?.destroy();\n\t\t\tawait closeServer(reservation.server).catch(() => undefined);\n\t\t\tawait rm(reservation.reservationDirectory, { force: true, recursive: true });\n\t\t} catch (error: unknown) {\n\t\t\tcleanupError = error;\n\t\t} finally {\n\t\t\tthis.#reservations.delete(reservation.reservationId);\n\t\t}\n\t\tif (cancellationError !== undefined && cleanupError !== undefined) {\n\t\t\tthrow new AggregateError(\n\t\t\t\t[cancellationError, cleanupError],\n\t\t\t\t'Local exec cancellation and cleanup both failed.',\n\t\t\t);\n\t\t}\n\t\tif (cancellationError !== undefined) throw cancellationError;\n\t\tif (cleanupError !== undefined) throw cleanupError;\n\t}\n}\n"],"mappings":";;;;;;AAAA,MAAM,iCAAiC,MAAM;AAC7C,MAAM,wCAAwC,KAAK;AACnD,MAAM,iCAAiC;AAkBvC,IAAa,uCAAb,cAA0D,MAAM;CAC/D,YAAY,SAAiB;EAC5B,MAAM,QAAQ;EACd,KAAK,OAAO;;;AAId,SAAS,SAAS,OAA4D;CAC7E,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM;;AAG5E,SAAS,iBAAiB,OAA0C,MAA+B;CAClG,MAAM,aAAa,OAAO,KAAK,MAAM,CAAC,UAAU;CAChD,MAAM,eAAe,KAAK,UAAU;CACpC,IACC,WAAW,WAAW,aAAa,UACnC,WAAW,MAAM,KAAK,UAAU,QAAQ,aAAa,OAAO,EAE5D,MAAM,IAAI,qCAAqC,+CAA+C;;AAIhG,SAAS,cAAc,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;GACT,KAAKP,cAAc,OAAO,YAAY,cAAc;;EAErD,IAAI,sBAAsB,KAAA,KAAa,iBAAiB,KAAA,GACvD,MAAM,IAAI,eACT,CAAC,mBAAmB,aAAa,EACjC,mDACA;EAEF,IAAI,sBAAsB,KAAA,GAAW,MAAM;EAC3C,IAAI,iBAAiB,KAAA,GAAW,MAAM"}
@@ -1,4 +1,4 @@
1
- import { l as JsonValue } from "./json-value-schema-C-87ATB3.js";
1
+ import { l as JsonValue } from "./json-value-schema-CwDmttWU.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/capability-description-surface/models/capability-descriptor-schema.d.ts
@@ -139,4 +139,4 @@ declare const CapabilityDescriptorSchema: z.ZodObject<{
139
139
  type CapabilityDescriptor = z.infer<typeof CapabilityDescriptorSchema>;
140
140
  //#endregion
141
141
  export { ToolSchemaSummarySchema as _, CapabilitySummary as a, ResultExpectation as c, SafeCallingHintSchema as d, ToolSafetySummary as f, ToolSchemaSummary as g, ToolSchemaHintSchema as h, CapabilitySearchMatchSchema as i, ResultExpectationSchema as l, ToolSchemaHint as m, CapabilityDescriptorSchema as n, CapabilitySummarySchema as o, ToolSafetySummarySchema as p, CapabilitySearchMatch as r, JsonSchemaDocumentSchema as s, CapabilityDescriptor as t, SafeCallingHint as u };
142
- //# sourceMappingURL=index-D8uVfMBv.d.ts.map
142
+ //# sourceMappingURL=index-BIvLq827.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D8uVfMBv.d.ts","names":[],"sources":["../src/capability-description-surface/models/capability-descriptor-schema.ts"],"mappings":";;;;cAQa,wBAAA,EAAwB,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,OAAA,CAAA,SAAA,WAAA,CAAA,CAAA,IAAA,CAAA,iBAAA,CAAA,SAAA;AAAA,cAExB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA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AE,KAAA,QAAa,uBAAA;AAAA,cAElC,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;KAOrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAE/B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAUxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;KActB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAEhC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,cAEtC,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;KAe3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA"}
@@ -38,4 +38,4 @@ declare const PortalAdapterEnvelopeSchema: z.ZodObject<{
38
38
  type PortalAdapterEnvelope = z.infer<typeof PortalAdapterEnvelopeSchema>;
39
39
  //#endregion
40
40
  export { TrustedAgentScopeSchema as i, PortalAdapterEnvelopeSchema as n, TrustedAgentScope as r, PortalAdapterEnvelope as t };
41
- //# sourceMappingURL=index-BgKPbuap.d.ts.map
41
+ //# sourceMappingURL=index-Badq9e6i.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BgKPbuap.d.ts","names":[],"sources":["../src/adapter-boundary/models/portal-adapter-envelope-schema.ts"],"mappings":";;;cAEa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA"}
1
+ {"version":3,"file":"index-Badq9e6i.d.ts","names":[],"sources":["../src/adapter-boundary/models/portal-adapter-envelope-schema.ts"],"mappings":";;;cAEa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA"}
@@ -24,6 +24,14 @@ type PortableRefinementOperation = {
24
24
  } | {
25
25
  readonly kind: 'maximum-object-entries';
26
26
  readonly maximum: number;
27
+ } | {
28
+ readonly fieldNames: readonly string[];
29
+ readonly kind: 'maximum-code-points';
30
+ readonly maximum: number;
31
+ } | {
32
+ readonly fieldNames: readonly string[];
33
+ readonly kind: 'maximum-utf8-bytes';
34
+ readonly maximum: number;
27
35
  } | {
28
36
  readonly fieldNames: readonly string[];
29
37
  readonly kind: 'reject-reserved-values';
@@ -32,6 +40,10 @@ type PortableRefinementOperation = {
32
40
  readonly kind: 'safe-integer';
33
41
  readonly maximum: number;
34
42
  readonly minimum: number;
43
+ } | {
44
+ readonly fieldName: string;
45
+ readonly kind: 'sorted-unique-object-field-items';
46
+ readonly path: string;
35
47
  } | {
36
48
  readonly kind: 'sorted-unique-string-items';
37
49
  readonly path: string;
@@ -172,6 +184,26 @@ declare const PORTABLE_REFINEMENT_DESCRIPTORS: readonly [{
172
184
  readonly '/requests/*/schemaDetail': "summary";
173
185
  };
174
186
  };
187
+ }, {
188
+ readonly description: "Gateway approval argument previews remain inside the portable UTF-8 byte bound.";
189
+ readonly errorCode: "gateway.approval.arguments-preview.above-maximum";
190
+ readonly identity: "gateway.approval.arguments-preview.utf8-bytes";
191
+ readonly kind: "structural-validation";
192
+ readonly operation: {
193
+ readonly fieldNames: readonly ["argumentsPreview"];
194
+ readonly kind: "maximum-utf8-bytes";
195
+ readonly maximum: 4096;
196
+ };
197
+ }, {
198
+ readonly description: "Namespace discovery summaries remain inside the portable Unicode code-point bound.";
199
+ readonly errorCode: "portal.namespace-discovery.summary-above-maximum";
200
+ readonly identity: "portal.namespace-discovery.summary-code-points";
201
+ readonly kind: "structural-validation";
202
+ readonly operation: {
203
+ readonly fieldNames: readonly ["summary"];
204
+ readonly kind: "maximum-code-points";
205
+ readonly maximum: 500;
206
+ };
175
207
  }, {
176
208
  readonly description: "Gateway attachment metadata cannot repeat an admitted agent identity.";
177
209
  readonly errorCode: "gateway.attachment.duplicate-agent-id";
@@ -182,13 +214,14 @@ declare const PORTABLE_REFINEMENT_DESCRIPTORS: readonly [{
182
214
  readonly path: "configuredAgentIds";
183
215
  };
184
216
  }, {
185
- readonly description: "Managed Agent Projection namespace names must be sorted and unique.";
186
- readonly errorCode: "gateway.managed-agent-projection.namespace-names";
187
- readonly identity: "gateway.managed-agent-projection.namespace-names";
217
+ readonly description: "Managed Agent Projection namespaces must be sorted and unique by namespace.";
218
+ readonly errorCode: "gateway.managed-agent-projection.namespaces";
219
+ readonly identity: "gateway.managed-agent-projection.namespaces";
188
220
  readonly kind: "cross-field-validation";
189
221
  readonly operation: {
190
- readonly kind: "sorted-unique-string-items";
191
- readonly path: "toolPortalNamespaceNames";
222
+ readonly fieldName: "namespace";
223
+ readonly kind: "sorted-unique-object-field-items";
224
+ readonly path: "toolPortalNamespaces";
192
225
  };
193
226
  }, {
194
227
  readonly description: "Binary chunk byte length equals the decoded canonical base64 payload length.";
@@ -248,4 +281,4 @@ declare const PORTABLE_CONTRACT_ADAPTERS: {
248
281
  };
249
282
  //#endregion
250
283
  export { assertPortableContractSchemaIsExportable as a, PORTABLE_REFINEMENT_DESCRIPTORS as c, PortableRefinementKind as d, PortableRefinementOperation as f, PortableContractParseResult as i, PORTABLE_REFINEMENT_IDENTITIES as l, PORTABLE_CONTRACT_PROTOCOL_VERSION as n, createPortableContractSchemaManifest as o, PortableContractAdapter as r, encodeCanonicalJson as s, PORTABLE_CONTRACT_ADAPTERS as t, PortableRefinementDescriptor as u };
251
- //# sourceMappingURL=index-DqMFYBbN.d.ts.map
284
+ //# sourceMappingURL=index-C-QFWaH5.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C-QFWaH5.d.ts","names":[],"sources":["../src/portable-contracts/portable-refinement-descriptors.ts","../src/portable-contracts/portable-contract-runtime.ts"],"mappings":";;;KAAY,sBAAA;AAAA,KAMA,2BAAA;EAAA,SAEA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAEE,IAAA;AAAA;EAAA,SAEF,eAAA;EAAA,SACA,SAAA;EAAA,SACA,IAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,MAAA,EAAQ,QAAA,CAAS,MAAA;AAAA;EAAA,SAGjB,IAAA;EAAA,SACA,iBAAA;EAAA,SACA,oBAAA;EAAA,SACA,0BAAA;EAAA,SACA,uBAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAGA,UAAA;EAAA,SACA,IAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAGA,UAAA;EAAA,SACA,IAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAGA,UAAA;EAAA,SACA,IAAA;EAAA,SACA,MAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,OAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAGA,SAAA;EAAA,SACA,IAAA;EAAA,SACA,IAAA;AAAA;EAAA,SAEE,IAAA;EAAA,SAA6C,IAAA;AAAA;EAAA,SAC7C,IAAA;AAAA;EAAA,SACA,IAAA;EAAA,SAAsC,IAAA;AAAA;EAAA,SACtC,UAAA;EAAA,SAAwC,IAAA;AAAA;AAAA,UAErC,4BAAA;EAAA,SACP,WAAA;EAAA,SACA,SAAA;EAAA,SACA,QAAA;EAAA,SACA,IAAA,EAAM,sBAAA;EAAA,SACN,SAAA,EAAW,2BAAA;AAAA;AAAA,cAGR,+BAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuKA,8BAAA;;;UCnMH,mCAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,oBAAA;AAAA;AAAA,UAGA,mCAAA;EAAA,SACA,UAAA;EAAA,SACA,IAAA;EAAA,SACA,oBAAA;AAAA;AAAA,KAGE,2BAAA,GACT,mCAAA,GACA,mCAAA;AAAA,UAEc,uBAAA;EAAA,SACP,KAAA,GAAQ,KAAA,cAAmB,2BAAA;AAAA;AAAA,cAGxB,kCAAA;AAAA,UAWH,gCAAA;EAAA,SACA,MAAA,EAAQ,CAAA,CAAE,OAAA;EAAA,SACV,QAAA;AAAA;AAAA,iBA8EM,wCAAA,CACf,KAAA,EAAO,gCAAA;AAAA,iBAsBQ,mBAAA,CAAoB,KAAA;AAAA,iBA0XpB,oCAAA,CAAA,GAAwC,QAAA,CAAS,MAAA;AAAA,cAqBpD,0BAAA;EAAA,aAKgD,uBAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { l as JsonValue } from "./json-value-schema-C-87ATB3.js";
1
+ import { l as JsonValue } from "./json-value-schema-CwDmttWU.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/artifact-surface/models/portal-artifact-contract-schema.d.ts
@@ -81,4 +81,4 @@ declare const ArtifactReferenceSchema: z.ZodObject<{
81
81
  type ArtifactReference = z.infer<typeof ArtifactReferenceSchema>;
82
82
  //#endregion
83
83
  export { PortalArtifactReadResourceRequestSchema as a, PortalArtifactReadRequest as c, PortalArtifactReadResultSchema as d, PortalArtifactRecord as f, PortalArtifactRedactorSchema as h, PortalArtifactReadResourceRequest as i, PortalArtifactReadRequestSchema as l, PortalArtifactRedactor as m, ArtifactReferenceSchema as n, createPortalArtifactReadResourceRequest as o, PortalArtifactRecordSchema as p, PORTAL_ARTIFACT_READ_REQUEST_META_KEY as r, parsePortalArtifactReadResourceRequest as s, ArtifactReference as t, PortalArtifactReadResult as u };
84
- //# sourceMappingURL=index-B_xYdo3v.d.ts.map
84
+ //# sourceMappingURL=index-DDLN0DE_.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B_xYdo3v.d.ts","names":[],"sources":["../src/artifact-surface/models/portal-artifact-contract-schema.ts","../src/artifact-surface/artifact-read-resource-uri.ts","../src/artifact-surface/models/artifact-reference-schema.ts"],"mappings":";;;;cAKa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;KAQ3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,cAErC,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;KAYhC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEzC,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;KAO7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;;;cCzCvC,qCAAA;AAAA,cAKA,uCAAA,EAAuC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAWxC,iCAAA,GAAoC,CAAA,CAAE,KAAA,QAC1C,uCAAA;;iBA+BQ,uCAAA,CACf,OAAA,EAAS,yBAAA,GACP,iCAAA;;iBASa,sCAAA,CACf,eAAA,YACE,yBAAA;;;cClEU,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;KAUxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA"}
1
+ {"version":3,"file":"index-DDLN0DE_.d.ts","names":[],"sources":["../src/artifact-surface/models/portal-artifact-contract-schema.ts","../src/artifact-surface/artifact-read-resource-uri.ts","../src/artifact-surface/models/artifact-reference-schema.ts"],"mappings":";;;;cAKa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;KAQ3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,cAErC,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;KAYhC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEzC,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;KAO7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;;;cCzCvC,qCAAA;AAAA,cAKA,uCAAA,EAAuC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAWxC,iCAAA,GAAoC,CAAA,CAAE,KAAA,QAC1C,uCAAA;;iBA+BQ,uCAAA,CACf,OAAA,EAAS,yBAAA,GACP,iCAAA;;iBASa,sCAAA,CACf,eAAA,YACE,yBAAA;;;cClEU,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;KAUxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA"}
@@ -149,4 +149,4 @@ interface PortalCallSurfaceJsonSchemas {
149
149
  declare function createPortalCallSurfaceJsonSchemas(): PortalCallSurfaceJsonSchemas;
150
150
  //#endregion
151
151
  export { PortalSearchRequestSchema as a, PortalListRequestSchema as c, PortalErrorCodeSchema as d, PortalErrorSchema as f, PortalDescribeRequestSchema as h, PortalSearchRequest as i, PortalError as l, PortalDescribeRequest as m, createPortalCallSurfaceJsonSchemas as n, PortalListItemRequestSchema as o, PortalDescribeItemRequestSchema as p, PortalSearchItemRequestSchema as r, PortalListRequest as s, PortalCallSurfaceJsonSchemas as t, PortalErrorCode as u };
152
- //# sourceMappingURL=index-B_FqoejO.d.ts.map
152
+ //# sourceMappingURL=index-DTTEu7ZT.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B_FqoejO.d.ts","names":[],"sources":["../src/portal-call-surface/models/portal-describe-request-schema.ts","../src/portal-call-surface/models/portal-error-schema.ts","../src/portal-call-surface/models/portal-list-request-schema.ts","../src/portal-call-surface/models/portal-search-request-schema.ts","../src/portal-call-surface/portal-call-json-schema-exporter.ts"],"mappings":";;;cAQa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;cAY/B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;KAa5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;;;cC7BtC,qBAAA,EAAqB,CAAA,CAAA,OAAA;;;;;;;;;;;;KAatB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAEhC,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KASlB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cCpB5B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;cAW3B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAaxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;cCzBlC,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;cAU7B,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAa1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;;;UCvBhC,4BAAA;EAAA,SACP,IAAA,EAAM,MAAA;EAAA,SACN,QAAA,EAAU,MAAA;EAAA,SACV,IAAA,EAAM,MAAA;EAAA,SACN,MAAA,EAAQ,MAAA;AAAA;AAAA,iBAGF,kCAAA,CAAA,GAAsC,4BAAA"}
1
+ {"version":3,"file":"index-DTTEu7ZT.d.ts","names":[],"sources":["../src/portal-call-surface/models/portal-describe-request-schema.ts","../src/portal-call-surface/models/portal-error-schema.ts","../src/portal-call-surface/models/portal-list-request-schema.ts","../src/portal-call-surface/models/portal-search-request-schema.ts","../src/portal-call-surface/portal-call-json-schema-exporter.ts"],"mappings":";;;cAQa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;cAY/B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;KAa5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;;;cC7BtC,qBAAA,EAAqB,CAAA,CAAA,OAAA;;;;;;;;;;;;KAatB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAEhC,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KASlB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cCpB5B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;cAW3B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAaxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;cCzBlC,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;cAU7B,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAa1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;;;UCvBhC,4BAAA;EAAA,SACP,IAAA,EAAM,MAAA;EAAA,SACN,QAAA,EAAU,MAAA;EAAA,SACV,IAAA,EAAM,MAAA;EAAA,SACN,MAAA,EAAQ,MAAA;AAAA;AAAA,iBAGF,kCAAA,CAAA,GAAsC,4BAAA"}
@@ -226,4 +226,4 @@ declare const SafeDiagnosticSchema: z.ZodObject<{
226
226
  type SafeDiagnostic = z.infer<typeof SafeDiagnosticSchema>;
227
227
  //#endregion
228
228
  export { PortalCancellationRequestEventSchema as a, PortalDiagnosticEvent as c, PortalEventSchema as d, PortalPartialOutputEvent as f, PortalProgressEventSchema as h, PortalCancellationRequestEvent as i, PortalDiagnosticEventSchema as l, PortalProgressEvent as m, SafeDiagnosticCodeSchema as n, PortalCancellationResultEvent as o, PortalPartialOutputEventSchema as p, SafeDiagnosticSchema as r, PortalCancellationResultEventSchema as s, SafeDiagnostic as t, PortalEvent as u };
229
- //# sourceMappingURL=index-BQ12JshX.d.ts.map
229
+ //# sourceMappingURL=index-DZJH4Rau.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BQ12JshX.d.ts","names":[],"sources":["../src/portal-event-surface/models/portal-event-schema.ts","../src/portal-event-surface/models/safe-diagnostic-schema.ts"],"mappings":";;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;KAS1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,cAEpC,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEzC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,cAEtC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;KAQrC,8BAAA,GAAiC,CAAA,CAAE,KAAA,QAAa,oCAAA;AAAA,cAE/C,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KASpC,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,mCAAA;AAAA,cAE9C,iBAAA,EAAiB,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQlB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cClE5B,wBAAA,EAAwB,CAAA,CAAA,OAAA;;;;;;;;;;;cAYxB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;KASrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
1
+ {"version":3,"file":"index-DZJH4Rau.d.ts","names":[],"sources":["../src/portal-event-surface/models/portal-event-schema.ts","../src/portal-event-surface/models/safe-diagnostic-schema.ts"],"mappings":";;;cAMa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;KAS1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,cAEpC,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEzC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,cAEtC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;KAQrC,8BAAA,GAAiC,CAAA,CAAE,KAAA,QAAa,oCAAA;AAAA,cAE/C,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KASpC,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,mCAAA;AAAA,cAE9C,iBAAA,EAAiB,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQlB,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cClE5B,wBAAA,EAAwB,CAAA,CAAA,OAAA;;;;;;;;;;;cAYxB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;KASrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/contract-primitives/models/capability-reference-schema.d.ts
4
+ declare const NamespaceNameSchema: z.ZodString;
5
+ declare const CapabilityNameSchema: z.ZodString;
6
+ declare const CapabilityReferenceSchema: z.ZodObject<{
7
+ namespace: z.ZodString;
8
+ name: z.ZodString;
9
+ }, z.core.$strict>;
10
+ type CapabilityReference = z.infer<typeof CapabilityReferenceSchema>;
11
+ //#endregion
12
+ //#region src/contract-primitives/models/namespace-discovery-schema.d.ts
13
+ declare const NamespaceDiscoverySummaryMaxLength = 500;
14
+ declare const NamespaceDiscoverySchema: z.ZodObject<{
15
+ summary: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strict>;
17
+ declare const EffectiveNamespaceDiscoverySchema: z.ZodObject<{
18
+ summary: z.ZodOptional<z.ZodString>;
19
+ namespace: z.ZodString;
20
+ }, z.core.$strict>;
21
+ type NamespaceDiscovery = z.infer<typeof NamespaceDiscoverySchema>;
22
+ type EffectiveNamespaceDiscovery = z.infer<typeof EffectiveNamespaceDiscoverySchema>;
23
+ //#endregion
24
+ //#region src/contract-primitives/models/request-id-schema.d.ts
25
+ declare const RequestIdSchema: z.ZodString;
26
+ declare const ItemIdSchema: z.ZodString;
27
+ //#endregion
28
+ export { NamespaceDiscovery as a, CapabilityNameSchema as c, NamespaceNameSchema as d, EffectiveNamespaceDiscoverySchema as i, CapabilityReference as l, RequestIdSchema as n, NamespaceDiscoverySchema as o, EffectiveNamespaceDiscovery as r, NamespaceDiscoverySummaryMaxLength as s, ItemIdSchema as t, CapabilityReferenceSchema as u };
29
+ //# sourceMappingURL=index-D_69tlLY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D_69tlLY.d.ts","names":[],"sources":["../src/contract-primitives/models/capability-reference-schema.ts","../src/contract-primitives/models/namespace-discovery-schema.ts","../src/contract-primitives/models/request-id-schema.ts"],"mappings":";;;cAEa,mBAAA,EAAmB,CAAA,CAAA,SAAA;AAAA,cACnB,oBAAA,EAAoB,CAAA,CAAA,SAAA;AAAA,cAEpB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;KAO1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;;;cCPpC,kCAAA;AAAA,cAcA,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;cAMxB,iCAAA,EAAiC,CAAA,CAAA,SAAA;;;;KAIlC,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KACpC,2BAAA,GAA8B,CAAA,CAAE,KAAA,QAAa,iCAAA;;;cCxB5C,eAAA,EAAe,CAAA,CAAA,SAAA;AAAA,cAaf,YAAA,EAAY,CAAA,CAAA,SAAA"}
@@ -1,6 +1,6 @@
1
- import { c as PortalArtifactReadRequest, i as PortalArtifactReadResourceRequest, u as PortalArtifactReadResult } from "./index-B_xYdo3v.js";
2
- import { S as PortalCallRequest, _ as PortalSearchResult, c as PortalDescribeResult, i as PortalCallResult, p as PortalListResult } from "./portal-call-result-schema-DalyNrfW.js";
3
- import { i as PortalSearchRequest, m as PortalDescribeRequest, s as PortalListRequest } from "./index-B_FqoejO.js";
1
+ import { c as PortalArtifactReadRequest, i as PortalArtifactReadResourceRequest, u as PortalArtifactReadResult } from "./index-DDLN0DE_.js";
2
+ import { P as PortalCallRequest, T as PortalListResult, b as PortalDescribeResult, g as PortalCallResult, k as PortalSearchResult } from "./portal-call-result-schema-DIg2ERl4.js";
3
+ import { i as PortalSearchRequest, m as PortalDescribeRequest, s as PortalListRequest } from "./index-DTTEu7ZT.js";
4
4
 
5
5
  //#region src/tool-portal-mcp-client/index.d.ts
6
6
  type ToolPortalMcpResourceContent = {
@@ -66,4 +66,4 @@ declare class ToolPortalMcpClient {
66
66
  }
67
67
  //#endregion
68
68
  export { ToolPortalMcpTransport as a, ToolPortalMcpResourceContent as i, ToolPortalMcpClient as n, ToolPortalMcpClientOptions as r, ToolPortalClientRequestOptions as t };
69
- //# sourceMappingURL=index-yuB9HEo-.d.ts.map
69
+ //# sourceMappingURL=index-S5RZg56U.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-yuB9HEo-.d.ts","names":[],"sources":["../src/tool-portal-mcp-client/index.ts"],"mappings":";;;;;KA2BY,4BAAA;EAAA,SAEA,IAAA;EAAA,SACA,IAAA;EAAA,SACA,SAAA;EAAA,SACA,GAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,SAAA;EAAA,SACA,IAAA;EAAA,SACA,GAAA;AAAA;AAAA,UAGK,sBAAA;EAAA,SACP,QAAA,GACR,IAAA;IAAA,SACU,aAAA;IAAA,SACA,SAAA;IAAA,SACA,IAAA;EAAA,GAEV,OAAA;IAAA,SACU,uBAAA;IAAA,SACA,MAAA,GAAS,WAAA;EAAA,MAEf,OAAA;IAAA,SAAmB,iBAAA;EAAA;EAAA,SACf,KAAA,QAAa,OAAA;EAAA,SACb,OAAA,QAAe,OAAA;EAAA,SACf,YAAA,GACR,OAAA,EAAS,iCAAA,EACT,OAAA;IAAA,SACU,uBAAA;IAAA,SACA,MAAA,GAAS,WAAA;EAAA,MAEf,OAAA;IAAA,SAAmB,QAAA,WAAmB,4BAAA;EAAA;AAAA;AAAA,UAG3B,0BAAA;EAAA,SACP,SAAA,EAAW,sBAAA;AAAA;AAAA,UAGJ,8BAAA;EAAA,SACP,aAAA;EAAA,SACA,uBAAA;EAAA,SACA,MAAA,GAAS,WAAA;AAAA;AAAA,cAab,+BAAA;EAAA;cAGO,SAAA,EAAW,sBAAA;EAIjB,IAAA,CACL,OAAA,EAAS,yBAAA,EACT,OAA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A,SACP,SAAA,EAAW,sBAAA;AAAA;AAAA,UAGJ,8BAAA;EAAA,SACP,aAAA;EAAA,SACA,uBAAA;EAAA,SACA,MAAA,GAAS,WAAA;AAAA;AAAA,cAab,+BAAA;EAAA;cAGO,SAAA,EAAW,sBAAA;EAIjB,IAAA,CACL,OAAA,EAAS,yBAAA,EACT,OAAA,GAAS,8BAAA,GACP,OAAA,CAAQ,wBAAA;AAAA;;;;;;;cAkCC,mBAAA;EAAA;WAEH,SAAA,EAAW,+BAAA;cAER,OAAA,EAAS,0BAAA;EAKf,OAAA,CAAA,GAAW,OAAA;EAIX,KAAA,CAAA,GAAS,OAAA;EAIT,IAAA,CACL,OAAA,EAAS,iBAAA,EACT,OAAA,GAAS,8BAAA,GACP,OAAA,CAAQ,gBAAA;EAYL,MAAA,CACL,OAAA,EAAS,mBAAA,EACT,OAAA,GAAS,8BAAA,GACP,OAAA,CAAQ,kBAAA;EAYL,QAAA,CACL,OAAA,EAAS,qBAAA,EACT,OAAA,GAAS,8BAAA,GACP,OAAA,CAAQ,oBAAA;EAYL,IAAA,CACL,OAAA,EAAS,iBAAA,EACT,OAAA,GAAS,8BAAA,GACP,OAAA,CAAQ,gBAAA;AAAA"}
@@ -0,0 +1,124 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/approval-surface/models/approval-decision-reference-schema.d.ts
4
+ declare const ApprovalDecisionReferenceSchema: z.ZodObject<{
5
+ approvalId: z.ZodString;
6
+ callId: z.ZodString;
7
+ expiresAt: z.ZodString;
8
+ status: z.ZodEnum<{
9
+ approved: "approved";
10
+ denied: "denied";
11
+ expired: "expired";
12
+ }>;
13
+ }, z.core.$strict>;
14
+ type ApprovalDecisionReference = z.infer<typeof ApprovalDecisionReferenceSchema>;
15
+ declare const ApprovalRequiredResultSchema: z.ZodObject<{
16
+ approvalChallenge: z.ZodObject<{
17
+ challengeId: z.ZodString;
18
+ expiresAt: z.ZodString;
19
+ }, z.core.$strict>;
20
+ error: z.ZodObject<{
21
+ message: z.ZodString;
22
+ retryable: z.ZodOptional<z.ZodBoolean>;
23
+ safeDiagnostic: z.ZodOptional<z.ZodObject<{
24
+ code: z.ZodEnum<{
25
+ approval_required: "approval_required";
26
+ capability_denied: "capability_denied";
27
+ validation_failed: "validation_failed";
28
+ provider_unavailable: "provider_unavailable";
29
+ execution_failed: "execution_failed";
30
+ cancelled: "cancelled";
31
+ timeout: "timeout";
32
+ output_truncated: "output_truncated";
33
+ artifact_unavailable: "artifact_unavailable";
34
+ }>;
35
+ level: z.ZodEnum<{
36
+ error: "error";
37
+ debug: "debug";
38
+ info: "info";
39
+ warn: "warn";
40
+ }>;
41
+ safeMessage: z.ZodString;
42
+ safeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
43
+ }, z.core.$strict>>;
44
+ code: z.ZodLiteral<"approval_required">;
45
+ }, z.core.$strict>;
46
+ id: z.ZodString;
47
+ operationId: z.ZodString;
48
+ outcome: z.ZodObject<{
49
+ certainty: z.ZodLiteral<"proven">;
50
+ kind: z.ZodLiteral<"not-dispatched">;
51
+ retryClass: z.ZodLiteral<"safe-before-dispatch">;
52
+ }, z.core.$strict>;
53
+ owningGeneration: z.ZodString;
54
+ status: z.ZodLiteral<"approval_required">;
55
+ }, z.core.$strict>;
56
+ declare const ApprovalChallengeReferenceSchema: z.ZodObject<{
57
+ challengeId: z.ZodString;
58
+ expiresAt: z.ZodString;
59
+ }, z.core.$strict>;
60
+ type ApprovalRequiredResult = z.infer<typeof ApprovalRequiredResultSchema>;
61
+ type ApprovalChallengeReference = z.infer<typeof ApprovalChallengeReferenceSchema>;
62
+ //#endregion
63
+ //#region src/approval-surface/models/gateway-approval-presentation-schema.d.ts
64
+ declare const GatewayApprovalPresentationRequestSchema: z.ZodObject<{
65
+ allowedDecisions: z.ZodTuple<[z.ZodLiteral<"approve">, z.ZodLiteral<"deny">], null>;
66
+ challengeId: z.ZodString;
67
+ display: z.ZodObject<{
68
+ argumentsPreview: z.ZodString;
69
+ }, z.core.$strict>;
70
+ expiresAt: z.ZodString;
71
+ itemId: z.ZodString;
72
+ name: z.ZodString;
73
+ namespace: z.ZodString;
74
+ }, z.core.$strict>;
75
+ declare const ApprovalPresentationOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
+ kind: z.ZodLiteral<"approved">;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ kind: z.ZodLiteral<"denied">;
79
+ }, z.core.$strict>, z.ZodObject<{
80
+ kind: z.ZodLiteral<"cancelled">;
81
+ reason: z.ZodEnum<{
82
+ "challenge-expired": "challenge-expired";
83
+ "session-ended": "session-ended";
84
+ "user-cancelled": "user-cancelled";
85
+ }>;
86
+ }, z.core.$strict>, z.ZodObject<{
87
+ kind: z.ZodLiteral<"unavailable">;
88
+ reason: z.ZodEnum<{
89
+ "presenter-missing": "presenter-missing";
90
+ "presentation-failed": "presentation-failed";
91
+ }>;
92
+ }, z.core.$strict>], "kind">;
93
+ declare const GatewayApprovalDecisionRequestSchema: z.ZodObject<{
94
+ challengeId: z.ZodString;
95
+ decision: z.ZodEnum<{
96
+ approve: "approve";
97
+ deny: "deny";
98
+ }>;
99
+ }, z.core.$strict>;
100
+ declare const GatewayApprovalDecisionResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ kind: z.ZodLiteral<"recorded">;
102
+ state: z.ZodEnum<{
103
+ approved: "approved";
104
+ denied: "denied";
105
+ }>;
106
+ }, z.core.$strict>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"rejected">;
108
+ reason: z.ZodEnum<{
109
+ "not-found": "not-found";
110
+ expired: "expired";
111
+ "stale-authority": "stale-authority";
112
+ "principal-mismatch": "principal-mismatch";
113
+ "already-decided": "already-decided";
114
+ "presenter-not-authorized": "presenter-not-authorized";
115
+ }>;
116
+ }, z.core.$strict>], "kind">;
117
+ type GatewayApprovalPresentationRequest = z.infer<typeof GatewayApprovalPresentationRequestSchema>;
118
+ type ApprovalPresentationOutcome = z.infer<typeof ApprovalPresentationOutcomeSchema>;
119
+ type GatewayApprovalDecisionRequest = z.infer<typeof GatewayApprovalDecisionRequestSchema>;
120
+ type GatewayApprovalDecisionResult = z.infer<typeof GatewayApprovalDecisionResultSchema>;
121
+ declare function sanitizeGatewayApprovalArguments(argumentsValue: unknown): string;
122
+ //#endregion
123
+ export { GatewayApprovalDecisionResult as a, GatewayApprovalPresentationRequestSchema as c, ApprovalChallengeReferenceSchema as d, ApprovalDecisionReference as f, ApprovalRequiredResultSchema as h, GatewayApprovalDecisionRequestSchema as i, sanitizeGatewayApprovalArguments as l, ApprovalRequiredResult as m, ApprovalPresentationOutcomeSchema as n, GatewayApprovalDecisionResultSchema as o, ApprovalDecisionReferenceSchema as p, GatewayApprovalDecisionRequest as r, GatewayApprovalPresentationRequest as s, ApprovalPresentationOutcome as t, ApprovalChallengeReference as u };
124
+ //# sourceMappingURL=index-ex2lEawY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ex2lEawY.d.ts","names":[],"sources":["../src/approval-surface/models/approval-decision-reference-schema.ts","../src/approval-surface/models/gateway-approval-presentation-schema.ts"],"mappings":";;;cAQa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;KAShC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAE5B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;KAEjC,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA;AAAA,KACxC,0BAAA,GAA6B,CAAA,CAAE,KAAA,QAAa,gCAAA;;;cCN3C,wCAAA,EAAwC,CAAA,CAAA,SAAA;;;;;;;;;;;cA+BxC,iCAAA,EAAiC,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAiBjC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;cAOpC,mCAAA,EAAmC,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;KAsBpC,kCAAA,GAAqC,CAAA,CAAE,KAAA,QAC3C,wCAAA;AAAA,KAEI,2BAAA,GAA8B,CAAA,CAAE,KAAA,QAAa,iCAAA;AAAA,KAC7C,8BAAA,GAAiC,CAAA,CAAE,KAAA,QAAa,oCAAA;AAAA,KAChD,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,mCAAA;AAAA,iBA+E3C,gCAAA,CAAiC,cAAA"}
@@ -1322,7 +1322,10 @@ declare const ManagedAgentProjectionSchema: z.ZodReadonly<z.ZodObject<{
1322
1322
  profileName: z.ZodString;
1323
1323
  }, z.core.$strict>], "kind">>;
1324
1324
  profileAssignmentRevision: z.ZodString;
1325
- toolPortalNamespaceNames: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1325
+ toolPortalNamespaces: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1326
+ summary: z.ZodOptional<z.ZodString>;
1327
+ namespace: z.ZodString;
1328
+ }, z.core.$strict>>>;
1326
1329
  toolPortalProfileId: z.ZodString;
1327
1330
  }, z.core.$strict>>;
1328
1331
  declare const GatewayRuntimeAttachmentMetadataSchema: z.ZodObject<{
@@ -2395,4 +2398,4 @@ declare const SANDBOX_METHOD_CONTRACTS: {
2395
2398
  };
2396
2399
  //#endregion
2397
2400
  export { SandboxProcessLogsResultSchema as $, SandboxProcessHandleSchema as $n, SandboxTerminalSizeSchema as $t, SandboxTerminalResizeResult as A, PositiveSafeIntegerSchema as An, SandboxFsRenameResult as At, SandboxStreamWriteRequest as B, SandboxBoundHandleSchema as Bn, SandboxExecCancelRequest as Bt, compareUnicodeCodePointStrings as C, BoundedByteCountSchema as Cn, SandboxFsReadResultSchema as Ct, SandboxTerminalAttachResultSchema as D, CanonicalBase64Schema as Dn, SandboxFsRemoveResultSchema as Dt, SandboxTerminalAttachResult as E, BoundedTextSchema as En, SandboxFsRemoveResult as Et, SandboxStreamCloseResultSchema as F, SANDBOX_MAXIMUM_OPERATION_MILLISECONDS as Fn, SandboxFsStatResultSchema as Ft, SandboxProcessCancelRequestSchema as G, SandboxEnvironmentVariable as Gn, SandboxExecStartRequest as Gt, SandboxStreamWriteResult as H, SandboxDirectShellStartRequestSchema as Hn, SandboxExecCancelResult as Ht, SandboxStreamReadRequest as I, SANDBOX_MAXIMUM_PATH_CHARACTERS as In, SandboxFsWriteRequest as It, SandboxProcessHandleRequestSchema as J, SandboxEnvironmentVariableValueSchema as Jn, SandboxExecStartResultSchema as Jt, SandboxProcessCancelResult as K, SandboxEnvironmentVariableNameSchema as Kn, SandboxExecStartRequestSchema as Kt, SandboxStreamReadRequestSchema as L, SANDBOX_MAXIMUM_TEXT_CHARACTERS as Ln, SandboxFsWriteRequestSchema as Lt, SandboxStreamCloseRequest as M, SANDBOX_MAXIMUM_ENVIRONMENT_VARIABLES as Mn, SandboxFsStatRequest as Mt, SandboxStreamCloseRequestSchema as N, SANDBOX_MAXIMUM_IDENTIFIER_CHARACTERS as Nn, SandboxFsStatRequestSchema as Nt, SandboxTerminalResizeRequest as O, NonnegativeSafeIntegerSchema as On, SandboxFsRenameRequest as Ot, SandboxStreamCloseResult as P, SANDBOX_MAXIMUM_LIST_ITEMS as Pn, SandboxFsStatResult as Pt, SandboxProcessLogsResult as Q, SandboxProcessHandle as Qn, SandboxExecWaitResultSchema as Qt, SandboxStreamReadResult as R, SandboxBinaryChunkSchema as Rn, SandboxFsWriteResult as Rt, ManagedAgentProjectionSchema as S, SandboxTerminalOutcomeSchema as Sn, SandboxFsReadResult as St, SandboxTerminalAttachRequestSchema as T, BoundedOperationMillisecondsSchema as Tn, SandboxFsRemoveRequestSchema as Tt, SandboxStreamWriteResultSchema as U, SandboxEnvironmentHandle as Un, SandboxExecCancelResultSchema as Ut, SandboxStreamWriteRequestSchema as V, SandboxDirectShellStartRequest as Vn, SandboxExecCancelRequestSchema as Vt, SandboxProcessCancelRequest as W, SandboxEnvironmentHandleSchema as Wn, SandboxExecStartModeSchema as Wt, SandboxProcessLogsRequest as X, SandboxGuestPathSchema as Xn, SandboxExecWaitRequestSchema as Xt, SandboxProcessLogChunkSchema as Y, SandboxGuestAbsolutePathSchema as Yn, SandboxExecWaitRequest as Yt, SandboxProcessLogsRequestSchema as Z, SandboxHandleKindSchema as Zn, SandboxExecWaitResult as Zt, GatewayRuntimeTrustedInvocationRequester as _, SandboxRetainedResultLookupRequest as _n, SandboxFsMkdirRequestSchema as _t, GatewayRuntimeFrameworkIdentitySchema as a, SandboxEnvironmentOpenRequestSchema as an, SandboxTerminalHandleSchema as ar, SandboxProcessStatusResult as at, GatewayStablePrincipalDigestSchema as b, SandboxRetainedResultLookupResultSchema as bn, SandboxFsReadRequest as bt, GatewayRuntimeManagedPluginClientKind as c, SandboxEnvironmentStatusRequest as cn, createSandboxBoundHandleSchema as cr, SandboxProcessWaitRequestSchema as ct, GatewayRuntimeTrustedInvocationContext as d, SandboxAmbiguousOutcomeSchema as dn, SandboxFilesystemEntrySchema as dt, SandboxEnvironmentCloseRequest as en, SandboxShellCommandSchema as er, SandboxProcessStartRequest as et, GatewayRuntimeTrustedInvocationContextSchema as f, SandboxOperationControlResult as fn, SandboxFsListRequest as ft, GatewayRuntimeTrustedInvocationPrincipalSchema as g, SandboxProvenTerminationOutcomeSchema as gn, SandboxFsMkdirRequest as gt, GatewayRuntimeTrustedInvocationPrincipal as h, SandboxOperationIdentitySchema as hn, SandboxFsListResultSchema as ht, GatewayRuntimeFrameworkIdentity as i, SandboxEnvironmentOpenRequest as in, SandboxTerminalHandle as ir, SandboxProcessStatusRequest as it, SandboxTerminalResizeResultSchema as j, SANDBOX_MAXIMUM_BINARY_BYTES as jn, SandboxFsRenameResultSchema as jt, SandboxTerminalResizeRequestSchema as k, PORTABLE_MAXIMUM_SAFE_INTEGER as kn, SandboxFsRenameRequestSchema as kt, GatewayRuntimeManagedPluginClientKindSchema as l, SandboxEnvironmentStatusResult as ln, SandboxProcessWaitResult as lt, GatewayRuntimeTrustedInvocationCorrelationSchema as m, SandboxOperationIdentity as mn, SandboxFsListResult as mt, GatewayRuntimeAttachmentMetadata as n, SandboxEnvironmentCloseResultSchema as nn, SandboxStreamHandle as nr, SandboxProcessStartResult as nt, GatewayRuntimeFrameworkKind as o, SandboxEnvironmentOpenResult as on, SandboxWorkRelativePathSchema as or, SandboxProcessStatusResultSchema as ot, GatewayRuntimeTrustedInvocationCorrelation as p, SandboxOperationControlResultSchema as pn, SandboxFsListRequestSchema as pt, SandboxProcessCancelResultSchema as q, SandboxEnvironmentVariableSchema as qn, SandboxExecStartResult as qt, GatewayRuntimeAttachmentMetadataSchema as r, SandboxEnvironmentHandleRequestSchema as rn, SandboxStreamHandleSchema as rr, SandboxProcessStartResultSchema as rt, GatewayRuntimeFrameworkKindSchema as s, SandboxEnvironmentOpenResultSchema as sn, Sha256DigestSchema as sr, SandboxProcessWaitRequest as st, SANDBOX_METHOD_CONTRACTS as t, SandboxEnvironmentCloseResult as tn, SandboxStreamChannelSchema as tr, SandboxProcessStartRequestSchema as tt, GatewayRuntimeProjectionCohortDigestSchema as u, SandboxEnvironmentStatusResultSchema as un, SandboxProcessWaitResultSchema as ut, GatewayRuntimeTrustedInvocationRequesterSchema as v, SandboxRetainedResultLookupRequestSchema as vn, SandboxFsMkdirResult as vt, SandboxTerminalAttachRequest as w, BoundedOpaqueIdentifierSchema as wn, SandboxFsRemoveRequest as wt, ManagedAgentProjection as x, SandboxTerminalOutcome as xn, SandboxFsReadRequestSchema as xt, GatewayStablePrincipalDigest as y, SandboxRetainedResultLookupResult as yn, SandboxFsMkdirResultSchema as yt, SandboxStreamReadResultSchema as z, SandboxBoundHandle as zn, SandboxFsWriteResultSchema as zt };
2398
- //# sourceMappingURL=index-C5NhyO2R.d.ts.map
2401
+ //# sourceMappingURL=index-tmZkznV6.d.ts.map