@moxt-ai/mobius 0.0.70 → 0.0.72
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.
- package/dist/acp/acp-error.d.ts +17 -0
- package/dist/acp/acp-error.d.ts.map +1 -0
- package/dist/acp/acp-error.js +28 -0
- package/dist/acp/acp-error.js.map +1 -0
- package/dist/acp/codex/agent.d.ts +26 -0
- package/dist/acp/codex/agent.d.ts.map +1 -0
- package/dist/acp/codex/agent.js +397 -0
- package/dist/acp/codex/agent.js.map +1 -0
- package/dist/acp/codex/app-server-client.d.ts +45 -0
- package/dist/acp/codex/app-server-client.d.ts.map +1 -0
- package/dist/acp/codex/app-server-client.js +195 -0
- package/dist/acp/codex/app-server-client.js.map +1 -0
- package/dist/acp/codex/app-server-protocol.d.ts +191 -0
- package/dist/acp/codex/app-server-protocol.d.ts.map +1 -0
- package/dist/acp/codex/app-server-protocol.js +172 -0
- package/dist/acp/codex/app-server-protocol.js.map +1 -0
- package/dist/acp/codex/items.d.ts +17 -0
- package/dist/acp/codex/items.d.ts.map +1 -0
- package/dist/acp/codex/items.js +141 -0
- package/dist/acp/codex/items.js.map +1 -0
- package/dist/acp/in-process/acp-endpoint.d.ts +33 -0
- package/dist/acp/in-process/acp-endpoint.d.ts.map +1 -0
- package/dist/acp/in-process/acp-endpoint.js +2 -0
- package/dist/acp/in-process/acp-endpoint.js.map +1 -0
- package/dist/acp/session-manager.d.ts +4 -15
- package/dist/acp/session-manager.d.ts.map +1 -1
- package/dist/acp/session-manager.js +49 -35
- package/dist/acp/session-manager.js.map +1 -1
- package/dist/agent-catalog/acp-readiness-probe.d.ts +2 -2
- package/dist/agent-catalog/acp-readiness-probe.d.ts.map +1 -1
- package/dist/agent-catalog/acp-readiness-probe.js +55 -0
- package/dist/agent-catalog/acp-readiness-probe.js.map +1 -1
- package/dist/agent-catalog/agent-diagnostics.d.ts.map +1 -1
- package/dist/agent-catalog/agent-diagnostics.js +4 -1
- package/dist/agent-catalog/agent-diagnostics.js.map +1 -1
- package/dist/agent-catalog/agent-discovery.d.ts +4 -4
- package/dist/agent-catalog/agent-discovery.d.ts.map +1 -1
- package/dist/agent-catalog/agent-discovery.js.map +1 -1
- package/dist/agent-catalog/agent-settings-adapter.d.ts +8 -8
- package/dist/agent-catalog/agent-settings-adapter.d.ts.map +1 -1
- package/dist/agent-catalog/agent-settings-adapter.js.map +1 -1
- package/dist/agent-catalog/agent-specification.d.ts +21 -0
- package/dist/agent-catalog/agent-specification.d.ts.map +1 -1
- package/dist/agent-catalog/agent-specification.js +25 -0
- package/dist/agent-catalog/agent-specification.js.map +1 -1
- package/dist/agent-catalog/agents/codex-agent.d.ts +5 -9
- package/dist/agent-catalog/agents/codex-agent.d.ts.map +1 -1
- package/dist/agent-catalog/agents/codex-agent.js +9 -18
- package/dist/agent-catalog/agents/codex-agent.js.map +1 -1
- package/dist/agent-catalog/agents/oh-my-pi-agent.d.ts +14 -0
- package/dist/agent-catalog/agents/oh-my-pi-agent.d.ts.map +1 -0
- package/dist/agent-catalog/agents/oh-my-pi-agent.js +32 -0
- package/dist/agent-catalog/agents/oh-my-pi-agent.js.map +1 -0
- package/dist/agent-catalog/agents/supported-agent-specifications.d.ts.map +1 -1
- package/dist/agent-catalog/agents/supported-agent-specifications.js +2 -0
- package/dist/agent-catalog/agents/supported-agent-specifications.js.map +1 -1
- package/dist/agent-catalog/discover-agent.d.ts.map +1 -1
- package/dist/agent-catalog/discover-agent.js +11 -6
- package/dist/agent-catalog/discover-agent.js.map +1 -1
- package/dist/agent-catalog/discover-local-agents.d.ts +1 -0
- package/dist/agent-catalog/discover-local-agents.d.ts.map +1 -1
- package/dist/agent-catalog/discover-local-agents.js +1 -0
- package/dist/agent-catalog/discover-local-agents.js.map +1 -1
- package/dist/agent-catalog/executable-discovery.d.ts.map +1 -1
- package/dist/agent-catalog/executable-discovery.js +2 -2
- package/dist/agent-catalog/executable-discovery.js.map +1 -1
- package/dist/agent-catalog/local-agent.d.ts +25 -11
- package/dist/agent-catalog/local-agent.d.ts.map +1 -1
- package/dist/agent-catalog/local-agent.js +32 -12
- package/dist/agent-catalog/local-agent.js.map +1 -1
- package/dist/agent-installation/fixed-installation-executor.d.ts.map +1 -1
- package/dist/agent-installation/fixed-installation-executor.js +3 -1
- package/dist/agent-installation/fixed-installation-executor.js.map +1 -1
- package/dist/cli.js +6676 -5637
- package/dist/cli.js.map +4 -4
- package/dist/config.d.ts +5 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +1419 -380
- package/dist/index.js.map +4 -4
- package/dist/native-sessions/codex-history.d.ts +3 -3
- package/dist/native-sessions/codex-history.d.ts.map +1 -1
- package/dist/native-sessions/codex-history.js +1 -1
- package/dist/native-sessions/codex-history.js.map +1 -1
- package/dist/pairing/pair-local-machine.d.ts.map +1 -1
- package/dist/pairing/pair-local-machine.js.map +1 -1
- package/dist/run-daemon.js +1 -1
- package/dist/run-daemon.js.map +1 -1
- package/dist/runtime.js +5143 -4104
- package/dist/runtime.js.map +4 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var createAcpClient = (handler) => client({ name: "mobius" }).onRequest(
|
|
|
35
35
|
import { join as join3, resolve as resolve3 } from "node:path";
|
|
36
36
|
import { fileURLToPath } from "node:url";
|
|
37
37
|
|
|
38
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
38
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/external.js
|
|
39
39
|
var external_exports = {};
|
|
40
40
|
__export(external_exports, {
|
|
41
41
|
$brand: () => $brand,
|
|
@@ -105,7 +105,6 @@ __export(external_exports, {
|
|
|
105
105
|
ZodPrefault: () => ZodPrefault,
|
|
106
106
|
ZodPreprocess: () => ZodPreprocess,
|
|
107
107
|
ZodPromise: () => ZodPromise,
|
|
108
|
-
ZodProperties: () => ZodProperties,
|
|
109
108
|
ZodReadonly: () => ZodReadonly,
|
|
110
109
|
ZodRealError: () => ZodRealError,
|
|
111
110
|
ZodRecord: () => ZodRecord,
|
|
@@ -149,6 +148,7 @@ __export(external_exports, {
|
|
|
149
148
|
creditCard: () => creditCard2,
|
|
150
149
|
cuid: () => cuid3,
|
|
151
150
|
cuid2: () => cuid22,
|
|
151
|
+
currencyCode: () => currencyCode2,
|
|
152
152
|
custom: () => custom,
|
|
153
153
|
date: () => date2,
|
|
154
154
|
decode: () => decode2,
|
|
@@ -242,7 +242,7 @@ __export(external_exports, {
|
|
|
242
242
|
preprocess: () => preprocess,
|
|
243
243
|
prettifyError: () => prettifyError,
|
|
244
244
|
promise: () => promise,
|
|
245
|
-
properties: () =>
|
|
245
|
+
properties: () => _properties,
|
|
246
246
|
property: () => _property,
|
|
247
247
|
readonly: () => readonly,
|
|
248
248
|
record: () => record,
|
|
@@ -298,7 +298,7 @@ __export(external_exports, {
|
|
|
298
298
|
xor: () => xor
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
301
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/index.js
|
|
302
302
|
var core_exports2 = {};
|
|
303
303
|
__export(core_exports2, {
|
|
304
304
|
$ZodAny: () => $ZodAny,
|
|
@@ -330,6 +330,7 @@ __export(core_exports2, {
|
|
|
330
330
|
$ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
|
|
331
331
|
$ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
|
|
332
332
|
$ZodCheckOverwrite: () => $ZodCheckOverwrite,
|
|
333
|
+
$ZodCheckProperties: () => $ZodCheckProperties,
|
|
333
334
|
$ZodCheckProperty: () => $ZodCheckProperty,
|
|
334
335
|
$ZodCheckRegex: () => $ZodCheckRegex,
|
|
335
336
|
$ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
|
|
@@ -383,7 +384,6 @@ __export(core_exports2, {
|
|
|
383
384
|
$ZodPrefault: () => $ZodPrefault,
|
|
384
385
|
$ZodPreprocess: () => $ZodPreprocess,
|
|
385
386
|
$ZodPromise: () => $ZodPromise,
|
|
386
|
-
$ZodProperties: () => $ZodProperties,
|
|
387
387
|
$ZodReadonly: () => $ZodReadonly,
|
|
388
388
|
$ZodRealError: () => $ZodRealError,
|
|
389
389
|
$ZodRecord: () => $ZodRecord,
|
|
@@ -551,6 +551,7 @@ __export(core_exports2, {
|
|
|
551
551
|
_xor: () => _xor,
|
|
552
552
|
base64Charset: () => base64Charset,
|
|
553
553
|
base64urlCharset: () => base64urlCharset,
|
|
554
|
+
canParseURL: () => canParseURL,
|
|
554
555
|
clone: () => clone,
|
|
555
556
|
compile: () => compile,
|
|
556
557
|
compileFn: () => compileFn,
|
|
@@ -573,7 +574,6 @@ __export(core_exports2, {
|
|
|
573
574
|
initializeContext: () => initializeContext,
|
|
574
575
|
isBackEdge: () => isBackEdge,
|
|
575
576
|
isRecursiveSchema: () => isRecursiveSchema,
|
|
576
|
-
isTransforming: () => isTransforming,
|
|
577
577
|
isValidBase64: () => isValidBase64,
|
|
578
578
|
isValidBase64URL: () => isValidBase64URL,
|
|
579
579
|
isValidCIDRv6: () => isValidCIDRv6,
|
|
@@ -610,11 +610,12 @@ __export(core_exports2, {
|
|
|
610
610
|
util: () => util_exports,
|
|
611
611
|
validate: () => validate,
|
|
612
612
|
validateAsync: () => validateAsync,
|
|
613
|
+
validateURL: () => validateURL,
|
|
613
614
|
version: () => version,
|
|
614
615
|
withParser: () => withParser
|
|
615
616
|
});
|
|
616
617
|
|
|
617
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
618
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
618
619
|
var util_exports = {};
|
|
619
620
|
__export(util_exports, {
|
|
620
621
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -1351,9 +1352,6 @@ function members(proto, table) {
|
|
|
1351
1352
|
else
|
|
1352
1353
|
defineBound(proto, key, desc.value);
|
|
1353
1354
|
}
|
|
1354
|
-
for (const sym of Object.getOwnPropertySymbols(table)) {
|
|
1355
|
-
defineBound(proto, sym, table[sym]);
|
|
1356
|
-
}
|
|
1357
1355
|
}
|
|
1358
1356
|
function own(inst, key, value, enumerable = true) {
|
|
1359
1357
|
Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
|
|
@@ -1460,7 +1458,7 @@ function constantCatch(value) {
|
|
|
1460
1458
|
return fn;
|
|
1461
1459
|
}
|
|
1462
1460
|
|
|
1463
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1461
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
|
|
1464
1462
|
var _a;
|
|
1465
1463
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1466
1464
|
status: "aborted"
|
|
@@ -1506,8 +1504,7 @@ function $constructor(name, initializer3, proto, params) {
|
|
|
1506
1504
|
} finally {
|
|
1507
1505
|
_zodDesc.value = void 0;
|
|
1508
1506
|
}
|
|
1509
|
-
}
|
|
1510
|
-
if (inst._zod.traits.has(name)) {
|
|
1507
|
+
} else if (inst._zod.traits.has(name)) {
|
|
1511
1508
|
return;
|
|
1512
1509
|
}
|
|
1513
1510
|
inst._zod.traits.add(name);
|
|
@@ -1583,7 +1580,7 @@ function config(newConfig) {
|
|
|
1583
1580
|
return globalConfig;
|
|
1584
1581
|
}
|
|
1585
1582
|
|
|
1586
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1583
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
|
|
1587
1584
|
function _getMessage() {
|
|
1588
1585
|
const internals = this._zod;
|
|
1589
1586
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -1775,7 +1772,7 @@ function prettifyError(error62) {
|
|
|
1775
1772
|
return lines.join("\n");
|
|
1776
1773
|
}
|
|
1777
1774
|
|
|
1778
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1775
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
|
|
1779
1776
|
function finalizeParams(callee, params) {
|
|
1780
1777
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
1781
1778
|
}
|
|
@@ -1935,7 +1932,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1935
1932
|
};
|
|
1936
1933
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1937
1934
|
|
|
1938
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1935
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
|
|
1939
1936
|
var regexes_exports = {};
|
|
1940
1937
|
__export(regexes_exports, {
|
|
1941
1938
|
anyString: () => anyString,
|
|
@@ -1949,6 +1946,7 @@ __export(regexes_exports, {
|
|
|
1949
1946
|
creditCard: () => creditCard,
|
|
1950
1947
|
cuid: () => cuid,
|
|
1951
1948
|
cuid2: () => cuid2,
|
|
1949
|
+
currencyCode: () => currencyCode,
|
|
1952
1950
|
date: () => date,
|
|
1953
1951
|
datetime: () => datetime,
|
|
1954
1952
|
domain: () => domain,
|
|
@@ -2047,6 +2045,7 @@ var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a
|
|
|
2047
2045
|
var httpProtocol = /^https?$/;
|
|
2048
2046
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2049
2047
|
var creditCard = /^\d(?:[ -]?\d){11,18}$/;
|
|
2048
|
+
var currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
|
|
2050
2049
|
var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
|
|
2051
2050
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
2052
2051
|
function anchor(source) {
|
|
@@ -2105,7 +2104,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
2105
2104
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
2106
2105
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
2107
2106
|
|
|
2108
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2107
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
|
|
2109
2108
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2110
2109
|
var _a3;
|
|
2111
2110
|
inst._zod ?? (inst._zod = {});
|
|
@@ -2531,6 +2530,34 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
|
|
|
2531
2530
|
return;
|
|
2532
2531
|
};
|
|
2533
2532
|
});
|
|
2533
|
+
var $ZodCheckProperties = /* @__PURE__ */ $constructor("$ZodCheckProperties", (inst, def) => {
|
|
2534
|
+
$ZodCheck.init(inst, def);
|
|
2535
|
+
hide(inst, Symbol.iterator, function* () {
|
|
2536
|
+
yield inst;
|
|
2537
|
+
});
|
|
2538
|
+
let entries;
|
|
2539
|
+
inst._zod.check = (payload) => {
|
|
2540
|
+
if (payload.value == null) {
|
|
2541
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
2542
|
+
return void 0;
|
|
2543
|
+
}
|
|
2544
|
+
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
2545
|
+
const input2 = payload.value;
|
|
2546
|
+
let proms;
|
|
2547
|
+
for (const [key, schema] of entries) {
|
|
2548
|
+
const result = schema._zod.run({ value: input2[key], issues: [] }, {});
|
|
2549
|
+
if (result instanceof Promise) {
|
|
2550
|
+
proms ?? (proms = []);
|
|
2551
|
+
proms.push(result.then((result2) => handleCheckPropertyResult(result2, payload, key)));
|
|
2552
|
+
} else {
|
|
2553
|
+
handleCheckPropertyResult(result, payload, key);
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
if (proms)
|
|
2557
|
+
return Promise.all(proms).then(() => void 0);
|
|
2558
|
+
return void 0;
|
|
2559
|
+
};
|
|
2560
|
+
});
|
|
2534
2561
|
var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
|
|
2535
2562
|
$ZodCheck.init(inst, def);
|
|
2536
2563
|
const mimeSet = new Set(def.mime);
|
|
@@ -2553,7 +2580,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2553
2580
|
};
|
|
2554
2581
|
});
|
|
2555
2582
|
|
|
2556
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2583
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
|
|
2557
2584
|
var Doc = class {
|
|
2558
2585
|
constructor(args = [], closed = {}) {
|
|
2559
2586
|
this.content = [];
|
|
@@ -2594,14 +2621,14 @@ ${content3.join("\n")}
|
|
|
2594
2621
|
}
|
|
2595
2622
|
};
|
|
2596
2623
|
|
|
2597
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2624
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
|
|
2598
2625
|
var version = {
|
|
2599
2626
|
major: 4,
|
|
2600
2627
|
minor: 6,
|
|
2601
|
-
patch:
|
|
2628
|
+
patch: 5
|
|
2602
2629
|
};
|
|
2603
2630
|
|
|
2604
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2631
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
|
|
2605
2632
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2606
2633
|
var _a3;
|
|
2607
2634
|
inst ?? (inst = {});
|
|
@@ -2786,11 +2813,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
|
2786
2813
|
});
|
|
2787
2814
|
var URL_BAD_FORMAT = 1;
|
|
2788
2815
|
var URL_UNPARSEABLE = 2;
|
|
2816
|
+
function canParseURL(input2) {
|
|
2817
|
+
try {
|
|
2818
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function")
|
|
2819
|
+
return URL.canParse(input2);
|
|
2820
|
+
new URL(input2);
|
|
2821
|
+
return true;
|
|
2822
|
+
} catch {
|
|
2823
|
+
return false;
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
function validateURL(trimmed, def) {
|
|
2827
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
2828
|
+
return canParseURL(trimmed) || URL_UNPARSEABLE;
|
|
2829
|
+
}
|
|
2830
|
+
return parseURLObject(trimmed, def);
|
|
2831
|
+
}
|
|
2789
2832
|
function parseURLObject(trimmed, def) {
|
|
2790
2833
|
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
|
|
2791
2834
|
return URL_BAD_FORMAT;
|
|
2792
2835
|
}
|
|
2793
2836
|
try {
|
|
2837
|
+
if (typeof URL !== "undefined") {
|
|
2838
|
+
const URLStatic = URL;
|
|
2839
|
+
if (typeof URLStatic.parse === "function")
|
|
2840
|
+
return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
|
|
2841
|
+
}
|
|
2794
2842
|
return new URL(trimmed);
|
|
2795
2843
|
} catch {
|
|
2796
2844
|
return URL_UNPARSEABLE;
|
|
@@ -2813,7 +2861,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2813
2861
|
inst._zod.check = (payload) => {
|
|
2814
2862
|
try {
|
|
2815
2863
|
const trimmed = payload.value.trim();
|
|
2816
|
-
const url2 =
|
|
2864
|
+
const url2 = validateURL(trimmed, def);
|
|
2817
2865
|
if (url2 === URL_BAD_FORMAT) {
|
|
2818
2866
|
payload.issues.push({
|
|
2819
2867
|
code: "invalid_format",
|
|
@@ -2835,6 +2883,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2835
2883
|
});
|
|
2836
2884
|
return;
|
|
2837
2885
|
}
|
|
2886
|
+
if (url2 === true) {
|
|
2887
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
2888
|
+
return;
|
|
2889
|
+
}
|
|
2838
2890
|
if (def.hostname && !urlHostnameOk(url2, def.hostname)) {
|
|
2839
2891
|
payload.issues.push({
|
|
2840
2892
|
code: "invalid_format",
|
|
@@ -2924,12 +2976,7 @@ var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
|
2924
2976
|
function isValidIPv6(value) {
|
|
2925
2977
|
if (!ipv6Alphabet.test(value))
|
|
2926
2978
|
return false;
|
|
2927
|
-
|
|
2928
|
-
new URL(`http://[${value}]`);
|
|
2929
|
-
return true;
|
|
2930
|
-
} catch {
|
|
2931
|
-
return false;
|
|
2932
|
-
}
|
|
2979
|
+
return canParseURL(`http://[${value}]`);
|
|
2933
2980
|
}
|
|
2934
2981
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
2935
2982
|
def.pattern ?? (def.pattern = ipv6);
|
|
@@ -4994,61 +5041,8 @@ function handleRefineResult(result, payload, input2, inst) {
|
|
|
4994
5041
|
payload.issues.push(issue(_iss));
|
|
4995
5042
|
}
|
|
4996
5043
|
}
|
|
4997
|
-
function handlePropertiesResult(result, payload, key) {
|
|
4998
|
-
if (result.issues.length) {
|
|
4999
|
-
payload.issues.push(...prefixIssues(key, result.issues));
|
|
5000
|
-
}
|
|
5001
|
-
}
|
|
5002
|
-
var $ZodProperties = /* @__PURE__ */ $constructor("$ZodProperties", (inst, def) => {
|
|
5003
|
-
$ZodType.init(inst, def);
|
|
5004
|
-
$ZodCheck.init(inst, def);
|
|
5005
|
-
const memo2 = globalConfig.memoizer;
|
|
5006
|
-
memo2?.attach(inst);
|
|
5007
|
-
let entries;
|
|
5008
|
-
const runShape = (payload, ctx) => {
|
|
5009
|
-
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
5010
|
-
const input2 = payload.value;
|
|
5011
|
-
let proms;
|
|
5012
|
-
for (const [key, schema] of entries) {
|
|
5013
|
-
const result = schema._zod.run({ value: input2[key], issues: [] }, ctx);
|
|
5014
|
-
if (result instanceof Promise) {
|
|
5015
|
-
proms ?? (proms = []);
|
|
5016
|
-
proms.push(result.then((result2) => handlePropertiesResult(result2, payload, key)));
|
|
5017
|
-
} else {
|
|
5018
|
-
handlePropertiesResult(result, payload, key);
|
|
5019
|
-
}
|
|
5020
|
-
}
|
|
5021
|
-
if (proms)
|
|
5022
|
-
return Promise.all(proms).then(() => void 0);
|
|
5023
|
-
return void 0;
|
|
5024
|
-
};
|
|
5025
|
-
inst._zod.parse = (payload, ctx) => {
|
|
5026
|
-
const input2 = payload.value;
|
|
5027
|
-
if (input2 === null || typeof input2 !== "object" && typeof input2 !== "function") {
|
|
5028
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input: input2, inst });
|
|
5029
|
-
return payload;
|
|
5030
|
-
}
|
|
5031
|
-
if (ctx.direction === "backward")
|
|
5032
|
-
ctx = { ...ctx, direction: "forward" };
|
|
5033
|
-
if (memo2)
|
|
5034
|
-
memo2.alloc(inst, payload, input2, ctx);
|
|
5035
|
-
const result = runShape(payload, ctx);
|
|
5036
|
-
return result instanceof Promise ? result.then(() => payload) : payload;
|
|
5037
|
-
};
|
|
5038
|
-
inst._zod.check = (payload) => {
|
|
5039
|
-
if (payload.value == null) {
|
|
5040
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
5041
|
-
return void 0;
|
|
5042
|
-
}
|
|
5043
|
-
return runShape(payload, {});
|
|
5044
|
-
};
|
|
5045
|
-
}, {
|
|
5046
|
-
*[Symbol.iterator]() {
|
|
5047
|
-
yield this;
|
|
5048
|
-
}
|
|
5049
|
-
});
|
|
5050
5044
|
|
|
5051
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5045
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
|
|
5052
5046
|
var $ZodCyclicError = class extends Error {
|
|
5053
5047
|
constructor() {
|
|
5054
5048
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -5058,7 +5052,7 @@ var $ZodCyclicError = class extends Error {
|
|
|
5058
5052
|
var STATE = "~memo";
|
|
5059
5053
|
var NO_ISSUES = [];
|
|
5060
5054
|
function isRef(value) {
|
|
5061
|
-
return value !== null &&
|
|
5055
|
+
return value !== null && typeof value === "object";
|
|
5062
5056
|
}
|
|
5063
5057
|
function cloneIssues(issues) {
|
|
5064
5058
|
return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
|
|
@@ -5107,9 +5101,6 @@ function isRecursive(inst, stack, resolve8) {
|
|
|
5107
5101
|
check2(def.catchall);
|
|
5108
5102
|
break;
|
|
5109
5103
|
}
|
|
5110
|
-
case "properties":
|
|
5111
|
-
merge2(shape(def.shape, false));
|
|
5112
|
-
break;
|
|
5113
5104
|
case "array":
|
|
5114
5105
|
check2(def.element);
|
|
5115
5106
|
break;
|
|
@@ -5328,7 +5319,7 @@ function isBackEdge(ctx, value) {
|
|
|
5328
5319
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
5329
5320
|
}
|
|
5330
5321
|
|
|
5331
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5322
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/index.js
|
|
5332
5323
|
var locales_exports = {};
|
|
5333
5324
|
__export(locales_exports, {
|
|
5334
5325
|
ar: () => ar_default,
|
|
@@ -5396,7 +5387,7 @@ __export(locales_exports, {
|
|
|
5396
5387
|
zhTW: () => zh_TW_default
|
|
5397
5388
|
});
|
|
5398
5389
|
|
|
5399
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5390
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ar.js
|
|
5400
5391
|
var error = () => {
|
|
5401
5392
|
const Sizable = {
|
|
5402
5393
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -5437,6 +5428,7 @@ var error = () => {
|
|
|
5437
5428
|
json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
|
|
5438
5429
|
e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
|
|
5439
5430
|
credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
|
|
5431
|
+
currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
|
|
5440
5432
|
iban: "IBAN",
|
|
5441
5433
|
jwt: "JWT",
|
|
5442
5434
|
template_literal: "\u0645\u062F\u062E\u0644"
|
|
@@ -5507,7 +5499,7 @@ function ar_default() {
|
|
|
5507
5499
|
};
|
|
5508
5500
|
}
|
|
5509
5501
|
|
|
5510
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5502
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/az.js
|
|
5511
5503
|
var error2 = () => {
|
|
5512
5504
|
const Sizable = {
|
|
5513
5505
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -5548,6 +5540,7 @@ var error2 = () => {
|
|
|
5548
5540
|
json_string: "JSON string",
|
|
5549
5541
|
e164: "E.164 number",
|
|
5550
5542
|
credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
|
|
5543
|
+
currency_code: "valyuta kodu",
|
|
5551
5544
|
iban: "IBAN",
|
|
5552
5545
|
jwt: "JWT",
|
|
5553
5546
|
template_literal: "input"
|
|
@@ -5617,7 +5610,7 @@ function az_default() {
|
|
|
5617
5610
|
};
|
|
5618
5611
|
}
|
|
5619
5612
|
|
|
5620
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5613
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
|
|
5621
5614
|
function getBelarusianPlural(count, one2, few, many) {
|
|
5622
5615
|
const absCount = Math.abs(count);
|
|
5623
5616
|
const lastDigit = absCount % 10;
|
|
@@ -5708,6 +5701,7 @@ var error3 = () => {
|
|
|
5708
5701
|
json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
|
|
5709
5702
|
e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
|
|
5710
5703
|
credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
5704
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
5711
5705
|
iban: "IBAN",
|
|
5712
5706
|
jwt: "JWT",
|
|
5713
5707
|
template_literal: "\u0443\u0432\u043E\u0434"
|
|
@@ -5785,7 +5779,7 @@ function be_default() {
|
|
|
5785
5779
|
};
|
|
5786
5780
|
}
|
|
5787
5781
|
|
|
5788
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5782
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bg.js
|
|
5789
5783
|
var error4 = () => {
|
|
5790
5784
|
const Sizable = {
|
|
5791
5785
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -5826,6 +5820,7 @@ var error4 = () => {
|
|
|
5826
5820
|
json_string: "JSON \u043D\u0438\u0437",
|
|
5827
5821
|
e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
|
|
5828
5822
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
|
|
5823
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
5829
5824
|
iban: "IBAN",
|
|
5830
5825
|
jwt: "JWT",
|
|
5831
5826
|
template_literal: "\u0432\u0445\u043E\u0434"
|
|
@@ -5910,7 +5905,7 @@ function bg_default() {
|
|
|
5910
5905
|
};
|
|
5911
5906
|
}
|
|
5912
5907
|
|
|
5913
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
5908
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bn.js
|
|
5914
5909
|
var error5 = () => {
|
|
5915
5910
|
const Sizable = {
|
|
5916
5911
|
string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
|
|
@@ -5951,6 +5946,7 @@ var error5 = () => {
|
|
|
5951
5946
|
json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
|
|
5952
5947
|
e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
5953
5948
|
credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
5949
|
+
currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
|
|
5954
5950
|
iban: "IBAN",
|
|
5955
5951
|
jwt: "JWT",
|
|
5956
5952
|
template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
|
|
@@ -6023,7 +6019,7 @@ function bn_default() {
|
|
|
6023
6019
|
};
|
|
6024
6020
|
}
|
|
6025
6021
|
|
|
6026
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6022
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ca.js
|
|
6027
6023
|
var error6 = () => {
|
|
6028
6024
|
const Sizable = {
|
|
6029
6025
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -6064,6 +6060,7 @@ var error6 = () => {
|
|
|
6064
6060
|
json_string: "cadena JSON",
|
|
6065
6061
|
e164: "n\xFAmero E.164",
|
|
6066
6062
|
credit_card: "n\xFAmero de targeta de cr\xE8dit",
|
|
6063
|
+
currency_code: "codi de moneda",
|
|
6067
6064
|
iban: "IBAN",
|
|
6068
6065
|
jwt: "JWT",
|
|
6069
6066
|
template_literal: "entrada"
|
|
@@ -6136,7 +6133,7 @@ function ca_default() {
|
|
|
6136
6133
|
};
|
|
6137
6134
|
}
|
|
6138
6135
|
|
|
6139
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6136
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ckb.js
|
|
6140
6137
|
var error7 = () => {
|
|
6141
6138
|
const Sizable = {
|
|
6142
6139
|
string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
|
|
@@ -6177,6 +6174,7 @@ var error7 = () => {
|
|
|
6177
6174
|
json_string: "\u062F\u06D5\u0642\u06CC JSON",
|
|
6178
6175
|
e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
|
|
6179
6176
|
credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
|
|
6177
|
+
currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
|
|
6180
6178
|
iban: "IBAN",
|
|
6181
6179
|
jwt: "JWT",
|
|
6182
6180
|
template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
|
|
@@ -6268,7 +6266,7 @@ function ckb_default() {
|
|
|
6268
6266
|
};
|
|
6269
6267
|
}
|
|
6270
6268
|
|
|
6271
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6269
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/cs.js
|
|
6272
6270
|
var error8 = () => {
|
|
6273
6271
|
const Sizable = {
|
|
6274
6272
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -6309,6 +6307,7 @@ var error8 = () => {
|
|
|
6309
6307
|
json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
|
|
6310
6308
|
e164: "\u010D\xEDslo E.164",
|
|
6311
6309
|
credit_card: "\u010D\xEDslo kreditn\xED karty",
|
|
6310
|
+
currency_code: "k\xF3d m\u011Bny",
|
|
6312
6311
|
iban: "IBAN",
|
|
6313
6312
|
jwt: "JWT",
|
|
6314
6313
|
template_literal: "vstup"
|
|
@@ -6384,7 +6383,7 @@ function cs_default() {
|
|
|
6384
6383
|
};
|
|
6385
6384
|
}
|
|
6386
6385
|
|
|
6387
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6386
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/da.js
|
|
6388
6387
|
var error9 = () => {
|
|
6389
6388
|
const Sizable = {
|
|
6390
6389
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -6425,6 +6424,7 @@ var error9 = () => {
|
|
|
6425
6424
|
json_string: "JSON-streng",
|
|
6426
6425
|
e164: "E.164-nummer",
|
|
6427
6426
|
credit_card: "kreditkortnummer",
|
|
6427
|
+
currency_code: "valutakode",
|
|
6428
6428
|
iban: "IBAN",
|
|
6429
6429
|
jwt: "JWT",
|
|
6430
6430
|
template_literal: "input"
|
|
@@ -6504,7 +6504,7 @@ function da_default() {
|
|
|
6504
6504
|
};
|
|
6505
6505
|
}
|
|
6506
6506
|
|
|
6507
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6507
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/de.js
|
|
6508
6508
|
var error10 = () => {
|
|
6509
6509
|
const Sizable = {
|
|
6510
6510
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -6545,6 +6545,7 @@ var error10 = () => {
|
|
|
6545
6545
|
json_string: "JSON-String",
|
|
6546
6546
|
e164: "E.164-Nummer",
|
|
6547
6547
|
credit_card: "Kreditkartennummer",
|
|
6548
|
+
currency_code: "W\xE4hrungscode",
|
|
6548
6549
|
iban: "IBAN",
|
|
6549
6550
|
jwt: "JWT",
|
|
6550
6551
|
template_literal: "Eingabe"
|
|
@@ -6617,7 +6618,7 @@ function de_default() {
|
|
|
6617
6618
|
};
|
|
6618
6619
|
}
|
|
6619
6620
|
|
|
6620
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6621
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/el.js
|
|
6621
6622
|
var error11 = () => {
|
|
6622
6623
|
const Sizable = {
|
|
6623
6624
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -6658,6 +6659,7 @@ var error11 = () => {
|
|
|
6658
6659
|
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
6659
6660
|
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
6660
6661
|
credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
|
|
6662
|
+
currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
|
|
6661
6663
|
iban: "IBAN",
|
|
6662
6664
|
jwt: "JWT",
|
|
6663
6665
|
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
@@ -6729,7 +6731,7 @@ function el_default() {
|
|
|
6729
6731
|
};
|
|
6730
6732
|
}
|
|
6731
6733
|
|
|
6732
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6734
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
|
|
6733
6735
|
var error12 = () => {
|
|
6734
6736
|
const Sizable = {
|
|
6735
6737
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -6769,6 +6771,7 @@ var error12 = () => {
|
|
|
6769
6771
|
base64url: "base64url-encoded string",
|
|
6770
6772
|
json_string: "JSON string",
|
|
6771
6773
|
e164: "E.164 number",
|
|
6774
|
+
currency_code: "currency code",
|
|
6772
6775
|
credit_card: "credit card number",
|
|
6773
6776
|
iban: "IBAN",
|
|
6774
6777
|
jwt: "JWT",
|
|
@@ -6853,7 +6856,7 @@ function en_default() {
|
|
|
6853
6856
|
};
|
|
6854
6857
|
}
|
|
6855
6858
|
|
|
6856
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6859
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/eo.js
|
|
6857
6860
|
var error13 = () => {
|
|
6858
6861
|
const Sizable = {
|
|
6859
6862
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -6894,6 +6897,7 @@ var error13 = () => {
|
|
|
6894
6897
|
json_string: "JSON-karaktraro",
|
|
6895
6898
|
e164: "E.164-nombro",
|
|
6896
6899
|
credit_card: "kreditkarta numero",
|
|
6900
|
+
currency_code: "valuta kodo",
|
|
6897
6901
|
iban: "IBAN",
|
|
6898
6902
|
jwt: "JWT",
|
|
6899
6903
|
template_literal: "enigo"
|
|
@@ -6967,7 +6971,7 @@ function eo_default() {
|
|
|
6967
6971
|
};
|
|
6968
6972
|
}
|
|
6969
6973
|
|
|
6970
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6974
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/es.js
|
|
6971
6975
|
var error14 = () => {
|
|
6972
6976
|
const Sizable = {
|
|
6973
6977
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -7007,6 +7011,7 @@ var error14 = () => {
|
|
|
7007
7011
|
json_string: "cadena JSON",
|
|
7008
7012
|
e164: "n\xFAmero E.164",
|
|
7009
7013
|
credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
|
|
7014
|
+
currency_code: "c\xF3digo de moneda",
|
|
7010
7015
|
iban: "IBAN",
|
|
7011
7016
|
jwt: "JWT",
|
|
7012
7017
|
template_literal: "entrada"
|
|
@@ -7103,7 +7108,7 @@ function es_default() {
|
|
|
7103
7108
|
};
|
|
7104
7109
|
}
|
|
7105
7110
|
|
|
7106
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7111
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fa.js
|
|
7107
7112
|
var error15 = () => {
|
|
7108
7113
|
const Sizable = {
|
|
7109
7114
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -7144,6 +7149,7 @@ var error15 = () => {
|
|
|
7144
7149
|
json_string: "JSON \u0631\u0634\u062A\u0647",
|
|
7145
7150
|
e164: "E.164 \u0639\u062F\u062F",
|
|
7146
7151
|
credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
|
|
7152
|
+
currency_code: "\u06A9\u062F \u0627\u0631\u0632",
|
|
7147
7153
|
iban: "IBAN",
|
|
7148
7154
|
jwt: "JWT",
|
|
7149
7155
|
template_literal: "\u0648\u0631\u0648\u062F\u06CC"
|
|
@@ -7222,7 +7228,7 @@ function fa_default() {
|
|
|
7222
7228
|
};
|
|
7223
7229
|
}
|
|
7224
7230
|
|
|
7225
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7231
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fi.js
|
|
7226
7232
|
var error16 = () => {
|
|
7227
7233
|
const Sizable = {
|
|
7228
7234
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -7267,6 +7273,7 @@ var error16 = () => {
|
|
|
7267
7273
|
json_string: "JSON-merkkijono",
|
|
7268
7274
|
e164: "E.164-luku",
|
|
7269
7275
|
credit_card: "luottokortin numero",
|
|
7276
|
+
currency_code: "valuuttakoodi",
|
|
7270
7277
|
iban: "IBAN",
|
|
7271
7278
|
jwt: "JWT",
|
|
7272
7279
|
template_literal: "templaattimerkkijono"
|
|
@@ -7339,7 +7346,7 @@ function fi_default() {
|
|
|
7339
7346
|
};
|
|
7340
7347
|
}
|
|
7341
7348
|
|
|
7342
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7349
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr.js
|
|
7343
7350
|
var error17 = () => {
|
|
7344
7351
|
const Sizable = {
|
|
7345
7352
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7379,6 +7386,7 @@ var error17 = () => {
|
|
|
7379
7386
|
json_string: "cha\xEEne de caract\xE8res JSON",
|
|
7380
7387
|
e164: "num\xE9ro au format E.164",
|
|
7381
7388
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7389
|
+
currency_code: "code de devise",
|
|
7382
7390
|
iban: "IBAN",
|
|
7383
7391
|
jwt: "JWT",
|
|
7384
7392
|
template_literal: "entr\xE9e"
|
|
@@ -7468,7 +7476,7 @@ function fr_default() {
|
|
|
7468
7476
|
};
|
|
7469
7477
|
}
|
|
7470
7478
|
|
|
7471
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7479
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr-CA.js
|
|
7472
7480
|
var error18 = () => {
|
|
7473
7481
|
const Sizable = {
|
|
7474
7482
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7509,6 +7517,7 @@ var error18 = () => {
|
|
|
7509
7517
|
json_string: "cha\xEEne JSON",
|
|
7510
7518
|
e164: "num\xE9ro E.164",
|
|
7511
7519
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7520
|
+
currency_code: "code de devise",
|
|
7512
7521
|
iban: "IBAN",
|
|
7513
7522
|
jwt: "JWT",
|
|
7514
7523
|
template_literal: "entr\xE9e"
|
|
@@ -7580,7 +7589,7 @@ function fr_CA_default() {
|
|
|
7580
7589
|
};
|
|
7581
7590
|
}
|
|
7582
7591
|
|
|
7583
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7592
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/gu.js
|
|
7584
7593
|
var error19 = () => {
|
|
7585
7594
|
const Sizable = {
|
|
7586
7595
|
string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
|
|
@@ -7621,6 +7630,7 @@ var error19 = () => {
|
|
|
7621
7630
|
json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
|
|
7622
7631
|
e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7623
7632
|
credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7633
|
+
currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
|
|
7624
7634
|
iban: "IBAN",
|
|
7625
7635
|
jwt: "JWT",
|
|
7626
7636
|
template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
|
|
@@ -7693,7 +7703,7 @@ function gu_default() {
|
|
|
7693
7703
|
};
|
|
7694
7704
|
}
|
|
7695
7705
|
|
|
7696
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7706
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/he.js
|
|
7697
7707
|
var error20 = () => {
|
|
7698
7708
|
const TypeNames = {
|
|
7699
7709
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -7770,6 +7780,7 @@ var error20 = () => {
|
|
|
7770
7780
|
json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
|
|
7771
7781
|
e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
|
|
7772
7782
|
credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
|
|
7783
|
+
currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
|
|
7773
7784
|
iban: { label: "IBAN", gender: "m" },
|
|
7774
7785
|
jwt: { label: "JWT", gender: "m" },
|
|
7775
7786
|
template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
@@ -7894,7 +7905,7 @@ function he_default() {
|
|
|
7894
7905
|
};
|
|
7895
7906
|
}
|
|
7896
7907
|
|
|
7897
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7908
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hi.js
|
|
7898
7909
|
var error21 = () => {
|
|
7899
7910
|
const Sizable = {
|
|
7900
7911
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
|
|
@@ -7935,6 +7946,7 @@ var error21 = () => {
|
|
|
7935
7946
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
|
|
7936
7947
|
e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
7937
7948
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
7949
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
7938
7950
|
iban: "IBAN",
|
|
7939
7951
|
jwt: "JWT",
|
|
7940
7952
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
@@ -8005,7 +8017,7 @@ function hi_default() {
|
|
|
8005
8017
|
};
|
|
8006
8018
|
}
|
|
8007
8019
|
|
|
8008
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8020
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hr.js
|
|
8009
8021
|
var error22 = () => {
|
|
8010
8022
|
const Sizable = {
|
|
8011
8023
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -8045,6 +8057,7 @@ var error22 = () => {
|
|
|
8045
8057
|
json_string: "JSON tekst",
|
|
8046
8058
|
e164: "E.164 broj",
|
|
8047
8059
|
credit_card: "broj kreditne kartice",
|
|
8060
|
+
currency_code: "kod valute",
|
|
8048
8061
|
iban: "IBAN",
|
|
8049
8062
|
jwt: "JWT",
|
|
8050
8063
|
template_literal: "unos"
|
|
@@ -8131,7 +8144,7 @@ function hr_default() {
|
|
|
8131
8144
|
};
|
|
8132
8145
|
}
|
|
8133
8146
|
|
|
8134
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8147
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hu.js
|
|
8135
8148
|
var error23 = () => {
|
|
8136
8149
|
const Sizable = {
|
|
8137
8150
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -8172,6 +8185,7 @@ var error23 = () => {
|
|
|
8172
8185
|
json_string: "JSON string",
|
|
8173
8186
|
e164: "E.164 sz\xE1m",
|
|
8174
8187
|
credit_card: "hitelk\xE1rtyasz\xE1m",
|
|
8188
|
+
currency_code: "p\xE9nznemk\xF3d",
|
|
8175
8189
|
iban: "IBAN",
|
|
8176
8190
|
jwt: "JWT",
|
|
8177
8191
|
template_literal: "bemenet"
|
|
@@ -8244,7 +8258,7 @@ function hu_default() {
|
|
|
8244
8258
|
};
|
|
8245
8259
|
}
|
|
8246
8260
|
|
|
8247
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8261
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
|
|
8248
8262
|
function getArmenianPlural(count, one2, many) {
|
|
8249
8263
|
return Math.abs(count) === 1 ? one2 : many;
|
|
8250
8264
|
}
|
|
@@ -8325,6 +8339,7 @@ var error24 = () => {
|
|
|
8325
8339
|
json_string: "JSON \u057F\u0578\u0572",
|
|
8326
8340
|
e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
|
|
8327
8341
|
credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
|
|
8342
|
+
currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
|
|
8328
8343
|
iban: "IBAN",
|
|
8329
8344
|
jwt: "JWT",
|
|
8330
8345
|
template_literal: "\u0574\u0578\u0582\u057F\u0584"
|
|
@@ -8402,7 +8417,7 @@ function hy_default() {
|
|
|
8402
8417
|
};
|
|
8403
8418
|
}
|
|
8404
8419
|
|
|
8405
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8420
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/id.js
|
|
8406
8421
|
var error25 = () => {
|
|
8407
8422
|
const Sizable = {
|
|
8408
8423
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -8443,6 +8458,7 @@ var error25 = () => {
|
|
|
8443
8458
|
json_string: "string JSON",
|
|
8444
8459
|
e164: "angka E.164",
|
|
8445
8460
|
credit_card: "nomor kartu kredit",
|
|
8461
|
+
currency_code: "kode mata uang",
|
|
8446
8462
|
iban: "IBAN",
|
|
8447
8463
|
jwt: "JWT",
|
|
8448
8464
|
template_literal: "input"
|
|
@@ -8513,7 +8529,7 @@ function id_default() {
|
|
|
8513
8529
|
};
|
|
8514
8530
|
}
|
|
8515
8531
|
|
|
8516
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8532
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/is.js
|
|
8517
8533
|
var error26 = () => {
|
|
8518
8534
|
const Sizable = {
|
|
8519
8535
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -8554,6 +8570,7 @@ var error26 = () => {
|
|
|
8554
8570
|
json_string: "JSON strengur",
|
|
8555
8571
|
e164: "E.164 t\xF6lugildi",
|
|
8556
8572
|
credit_card: "kreditkortan\xFAmer",
|
|
8573
|
+
currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
|
|
8557
8574
|
iban: "IBAN",
|
|
8558
8575
|
jwt: "JWT",
|
|
8559
8576
|
template_literal: "gildi"
|
|
@@ -8627,7 +8644,7 @@ function is_default() {
|
|
|
8627
8644
|
};
|
|
8628
8645
|
}
|
|
8629
8646
|
|
|
8630
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8647
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/it.js
|
|
8631
8648
|
var error27 = () => {
|
|
8632
8649
|
const Sizable = {
|
|
8633
8650
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -8668,6 +8685,7 @@ var error27 = () => {
|
|
|
8668
8685
|
json_string: "stringa JSON",
|
|
8669
8686
|
e164: "numero E.164",
|
|
8670
8687
|
credit_card: "numero di carta di credito",
|
|
8688
|
+
currency_code: "codice valuta",
|
|
8671
8689
|
iban: "IBAN",
|
|
8672
8690
|
jwt: "JWT",
|
|
8673
8691
|
template_literal: "input"
|
|
@@ -8740,7 +8758,7 @@ function it_default() {
|
|
|
8740
8758
|
};
|
|
8741
8759
|
}
|
|
8742
8760
|
|
|
8743
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8761
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ja.js
|
|
8744
8762
|
var error28 = () => {
|
|
8745
8763
|
const Sizable = {
|
|
8746
8764
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -8781,6 +8799,7 @@ var error28 = () => {
|
|
|
8781
8799
|
json_string: "JSON\u6587\u5B57\u5217",
|
|
8782
8800
|
e164: "E.164\u756A\u53F7",
|
|
8783
8801
|
credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
|
|
8802
|
+
currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
|
|
8784
8803
|
iban: "IBAN",
|
|
8785
8804
|
jwt: "JWT",
|
|
8786
8805
|
template_literal: "\u5165\u529B\u5024"
|
|
@@ -8852,7 +8871,7 @@ function ja_default() {
|
|
|
8852
8871
|
};
|
|
8853
8872
|
}
|
|
8854
8873
|
|
|
8855
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8874
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ka.js
|
|
8856
8875
|
var error29 = () => {
|
|
8857
8876
|
const Sizable = {
|
|
8858
8877
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -8893,6 +8912,7 @@ var error29 = () => {
|
|
|
8893
8912
|
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
8894
8913
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
8895
8914
|
credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
8915
|
+
currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
|
|
8896
8916
|
iban: "IBAN",
|
|
8897
8917
|
jwt: "JWT",
|
|
8898
8918
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -8969,7 +8989,7 @@ function ka_default() {
|
|
|
8969
8989
|
};
|
|
8970
8990
|
}
|
|
8971
8991
|
|
|
8972
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8992
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/km.js
|
|
8973
8993
|
var error30 = () => {
|
|
8974
8994
|
const Sizable = {
|
|
8975
8995
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -9010,6 +9030,7 @@ var error30 = () => {
|
|
|
9010
9030
|
json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
|
|
9011
9031
|
e164: "\u179B\u17C1\u1781 E.164",
|
|
9012
9032
|
credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
|
|
9033
|
+
currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
|
|
9013
9034
|
iban: "IBAN",
|
|
9014
9035
|
jwt: "JWT",
|
|
9015
9036
|
template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
|
|
@@ -9084,12 +9105,12 @@ function km_default() {
|
|
|
9084
9105
|
};
|
|
9085
9106
|
}
|
|
9086
9107
|
|
|
9087
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9108
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kh.js
|
|
9088
9109
|
function kh_default() {
|
|
9089
9110
|
return km_default();
|
|
9090
9111
|
}
|
|
9091
9112
|
|
|
9092
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9113
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kn.js
|
|
9093
9114
|
var error31 = () => {
|
|
9094
9115
|
const Sizable = {
|
|
9095
9116
|
string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
|
|
@@ -9130,6 +9151,7 @@ var error31 = () => {
|
|
|
9130
9151
|
json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
|
|
9131
9152
|
e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9132
9153
|
credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9154
|
+
currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
|
|
9133
9155
|
iban: "IBAN",
|
|
9134
9156
|
jwt: "JWT",
|
|
9135
9157
|
template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
|
|
@@ -9204,7 +9226,7 @@ function kn_default() {
|
|
|
9204
9226
|
};
|
|
9205
9227
|
}
|
|
9206
9228
|
|
|
9207
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9229
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ko.js
|
|
9208
9230
|
var error32 = () => {
|
|
9209
9231
|
const Sizable = {
|
|
9210
9232
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -9245,6 +9267,7 @@ var error32 = () => {
|
|
|
9245
9267
|
json_string: "JSON \uBB38\uC790\uC5F4",
|
|
9246
9268
|
e164: "E.164 \uBC88\uD638",
|
|
9247
9269
|
credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
|
|
9270
|
+
currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
|
|
9248
9271
|
iban: "IBAN",
|
|
9249
9272
|
jwt: "JWT",
|
|
9250
9273
|
template_literal: "\uC785\uB825"
|
|
@@ -9320,7 +9343,7 @@ function ko_default() {
|
|
|
9320
9343
|
};
|
|
9321
9344
|
}
|
|
9322
9345
|
|
|
9323
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9346
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/lt.js
|
|
9324
9347
|
var capitalizeFirstCharacter = (text3) => {
|
|
9325
9348
|
return text3.charAt(0).toUpperCase() + text3.slice(1);
|
|
9326
9349
|
};
|
|
@@ -9443,6 +9466,7 @@ var error33 = () => {
|
|
|
9443
9466
|
json_string: "JSON eilut\u0117",
|
|
9444
9467
|
e164: "E.164 numeris",
|
|
9445
9468
|
credit_card: "kredito kortel\u0117s numeris",
|
|
9469
|
+
currency_code: "valiutos kodas",
|
|
9446
9470
|
iban: "IBAN",
|
|
9447
9471
|
jwt: "JWT",
|
|
9448
9472
|
template_literal: "\u012Fvestis"
|
|
@@ -9527,7 +9551,7 @@ function lt_default() {
|
|
|
9527
9551
|
};
|
|
9528
9552
|
}
|
|
9529
9553
|
|
|
9530
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9554
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/mk.js
|
|
9531
9555
|
var error34 = () => {
|
|
9532
9556
|
const Sizable = {
|
|
9533
9557
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -9568,6 +9592,7 @@ var error34 = () => {
|
|
|
9568
9592
|
json_string: "JSON \u043D\u0438\u0437\u0430",
|
|
9569
9593
|
e164: "E.164 \u0431\u0440\u043E\u0458",
|
|
9570
9594
|
credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
|
|
9595
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
9571
9596
|
iban: "IBAN",
|
|
9572
9597
|
jwt: "JWT",
|
|
9573
9598
|
template_literal: "\u0432\u043D\u0435\u0441"
|
|
@@ -9641,7 +9666,7 @@ function mk_default() {
|
|
|
9641
9666
|
};
|
|
9642
9667
|
}
|
|
9643
9668
|
|
|
9644
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9669
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ms.js
|
|
9645
9670
|
var error35 = () => {
|
|
9646
9671
|
const Sizable = {
|
|
9647
9672
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -9682,6 +9707,7 @@ var error35 = () => {
|
|
|
9682
9707
|
json_string: "string JSON",
|
|
9683
9708
|
e164: "nombor E.164",
|
|
9684
9709
|
credit_card: "nombor kad kredit",
|
|
9710
|
+
currency_code: "kod mata wang",
|
|
9685
9711
|
iban: "IBAN",
|
|
9686
9712
|
jwt: "JWT",
|
|
9687
9713
|
template_literal: "input"
|
|
@@ -9753,7 +9779,7 @@ function ms_default() {
|
|
|
9753
9779
|
};
|
|
9754
9780
|
}
|
|
9755
9781
|
|
|
9756
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9782
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ne.js
|
|
9757
9783
|
var error36 = () => {
|
|
9758
9784
|
const Sizable = {
|
|
9759
9785
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
|
|
@@ -9794,6 +9820,7 @@ var error36 = () => {
|
|
|
9794
9820
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
|
|
9795
9821
|
e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
|
|
9796
9822
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
|
|
9823
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
9797
9824
|
iban: "IBAN",
|
|
9798
9825
|
jwt: "JWT",
|
|
9799
9826
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
@@ -9864,7 +9891,7 @@ function ne_default() {
|
|
|
9864
9891
|
};
|
|
9865
9892
|
}
|
|
9866
9893
|
|
|
9867
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9894
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nl.js
|
|
9868
9895
|
var error37 = () => {
|
|
9869
9896
|
const Sizable = {
|
|
9870
9897
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -9905,6 +9932,7 @@ var error37 = () => {
|
|
|
9905
9932
|
json_string: "JSON string",
|
|
9906
9933
|
e164: "E.164-nummer",
|
|
9907
9934
|
credit_card: "creditcardnummer",
|
|
9935
|
+
currency_code: "valutacode",
|
|
9908
9936
|
iban: "IBAN",
|
|
9909
9937
|
jwt: "JWT",
|
|
9910
9938
|
template_literal: "invoer"
|
|
@@ -9979,7 +10007,7 @@ function nl_default() {
|
|
|
9979
10007
|
};
|
|
9980
10008
|
}
|
|
9981
10009
|
|
|
9982
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10010
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nn.js
|
|
9983
10011
|
var error38 = () => {
|
|
9984
10012
|
const Sizable = {
|
|
9985
10013
|
string: { unit: "teikn", verb: "\xE5 ha" },
|
|
@@ -10020,6 +10048,7 @@ var error38 = () => {
|
|
|
10020
10048
|
json_string: "JSON-streng",
|
|
10021
10049
|
e164: "E.164-nummer",
|
|
10022
10050
|
credit_card: "kredittkortnummer",
|
|
10051
|
+
currency_code: "valutakode",
|
|
10023
10052
|
iban: "IBAN",
|
|
10024
10053
|
jwt: "JWT",
|
|
10025
10054
|
template_literal: "input"
|
|
@@ -10092,7 +10121,7 @@ function nn_default() {
|
|
|
10092
10121
|
};
|
|
10093
10122
|
}
|
|
10094
10123
|
|
|
10095
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10124
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/no.js
|
|
10096
10125
|
var error39 = () => {
|
|
10097
10126
|
const Sizable = {
|
|
10098
10127
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -10133,6 +10162,7 @@ var error39 = () => {
|
|
|
10133
10162
|
json_string: "JSON-streng",
|
|
10134
10163
|
e164: "E.164-nummer",
|
|
10135
10164
|
credit_card: "kredittkortnummer",
|
|
10165
|
+
currency_code: "valutakode",
|
|
10136
10166
|
iban: "IBAN",
|
|
10137
10167
|
jwt: "JWT",
|
|
10138
10168
|
template_literal: "input"
|
|
@@ -10205,7 +10235,7 @@ function no_default() {
|
|
|
10205
10235
|
};
|
|
10206
10236
|
}
|
|
10207
10237
|
|
|
10208
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10238
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ota.js
|
|
10209
10239
|
var error40 = () => {
|
|
10210
10240
|
const Sizable = {
|
|
10211
10241
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -10246,6 +10276,7 @@ var error40 = () => {
|
|
|
10246
10276
|
json_string: "JSON metin",
|
|
10247
10277
|
e164: "E.164 say\u0131s\u0131",
|
|
10248
10278
|
credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
|
|
10279
|
+
currency_code: "para birimi kodu",
|
|
10249
10280
|
iban: "IBAN",
|
|
10250
10281
|
jwt: "JWT",
|
|
10251
10282
|
template_literal: "giren"
|
|
@@ -10319,7 +10350,7 @@ function ota_default() {
|
|
|
10319
10350
|
};
|
|
10320
10351
|
}
|
|
10321
10352
|
|
|
10322
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10353
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ps.js
|
|
10323
10354
|
var error41 = () => {
|
|
10324
10355
|
const Sizable = {
|
|
10325
10356
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -10360,6 +10391,7 @@ var error41 = () => {
|
|
|
10360
10391
|
json_string: "JSON \u0645\u062A\u0646",
|
|
10361
10392
|
e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
|
|
10362
10393
|
credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
|
|
10394
|
+
currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
|
|
10363
10395
|
iban: "IBAN",
|
|
10364
10396
|
jwt: "JWT",
|
|
10365
10397
|
template_literal: "\u0648\u0631\u0648\u062F\u064A"
|
|
@@ -10438,7 +10470,7 @@ function ps_default() {
|
|
|
10438
10470
|
};
|
|
10439
10471
|
}
|
|
10440
10472
|
|
|
10441
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10473
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pl.js
|
|
10442
10474
|
var error42 = () => {
|
|
10443
10475
|
const Sizable = {
|
|
10444
10476
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -10479,6 +10511,7 @@ var error42 = () => {
|
|
|
10479
10511
|
json_string: "ci\u0105g znak\xF3w w formacie JSON",
|
|
10480
10512
|
e164: "liczba E.164",
|
|
10481
10513
|
credit_card: "numer karty kredytowej",
|
|
10514
|
+
currency_code: "kod waluty",
|
|
10482
10515
|
iban: "IBAN",
|
|
10483
10516
|
jwt: "JWT",
|
|
10484
10517
|
template_literal: "wej\u015Bcie"
|
|
@@ -10552,7 +10585,7 @@ function pl_default() {
|
|
|
10552
10585
|
};
|
|
10553
10586
|
}
|
|
10554
10587
|
|
|
10555
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10588
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt.js
|
|
10556
10589
|
var error43 = () => {
|
|
10557
10590
|
const Sizable = {
|
|
10558
10591
|
string: { unit: "caracteres" },
|
|
@@ -10593,6 +10626,7 @@ var error43 = () => {
|
|
|
10593
10626
|
json_string: "o texto JSON",
|
|
10594
10627
|
e164: "o n\xFAmero E.164",
|
|
10595
10628
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
10629
|
+
currency_code: "o c\xF3digo de moeda",
|
|
10596
10630
|
iban: "o IBAN",
|
|
10597
10631
|
jwt: "o JWT",
|
|
10598
10632
|
template_literal: "a entrada"
|
|
@@ -10695,7 +10729,7 @@ function pt_default() {
|
|
|
10695
10729
|
};
|
|
10696
10730
|
}
|
|
10697
10731
|
|
|
10698
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10732
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt-BR.js
|
|
10699
10733
|
var error44 = () => {
|
|
10700
10734
|
const Sizable = {
|
|
10701
10735
|
string: { unit: "caracteres" },
|
|
@@ -10736,6 +10770,7 @@ var error44 = () => {
|
|
|
10736
10770
|
json_string: "o texto JSON",
|
|
10737
10771
|
e164: "o n\xFAmero E.164",
|
|
10738
10772
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
10773
|
+
currency_code: "o c\xF3digo de moeda",
|
|
10739
10774
|
iban: "o IBAN",
|
|
10740
10775
|
jwt: "o JWT",
|
|
10741
10776
|
template_literal: "a entrada"
|
|
@@ -10839,7 +10874,7 @@ function pt_BR_default() {
|
|
|
10839
10874
|
};
|
|
10840
10875
|
}
|
|
10841
10876
|
|
|
10842
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10877
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ro.js
|
|
10843
10878
|
var error45 = () => {
|
|
10844
10879
|
const Sizable = {
|
|
10845
10880
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -10880,6 +10915,7 @@ var error45 = () => {
|
|
|
10880
10915
|
json_string: "\u0219ir JSON",
|
|
10881
10916
|
e164: "num\u0103r E.164",
|
|
10882
10917
|
credit_card: "num\u0103r de card de credit",
|
|
10918
|
+
currency_code: "cod valutar",
|
|
10883
10919
|
iban: "IBAN",
|
|
10884
10920
|
jwt: "JWT",
|
|
10885
10921
|
template_literal: "intrare"
|
|
@@ -10961,7 +10997,7 @@ function ro_default() {
|
|
|
10961
10997
|
};
|
|
10962
10998
|
}
|
|
10963
10999
|
|
|
10964
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11000
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
|
|
10965
11001
|
function getRussianPlural(count, one2, few, many) {
|
|
10966
11002
|
const absCount = Math.abs(count);
|
|
10967
11003
|
const lastDigit = absCount % 10;
|
|
@@ -11052,6 +11088,7 @@ var error46 = () => {
|
|
|
11052
11088
|
json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
|
|
11053
11089
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
11054
11090
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
11091
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
11055
11092
|
iban: "IBAN",
|
|
11056
11093
|
jwt: "JWT",
|
|
11057
11094
|
template_literal: "\u0432\u0432\u043E\u0434"
|
|
@@ -11129,7 +11166,7 @@ function ru_default() {
|
|
|
11129
11166
|
};
|
|
11130
11167
|
}
|
|
11131
11168
|
|
|
11132
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11169
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sk.js
|
|
11133
11170
|
var error47 = () => {
|
|
11134
11171
|
const Sizable = {
|
|
11135
11172
|
string: { unit: "znakov", verb: "ma\u0165" },
|
|
@@ -11170,6 +11207,7 @@ var error47 = () => {
|
|
|
11170
11207
|
json_string: "re\u0165azec vo form\xE1te JSON",
|
|
11171
11208
|
e164: "\u010D\xEDslo E.164",
|
|
11172
11209
|
credit_card: "\u010D\xEDslo kreditnej karty",
|
|
11210
|
+
currency_code: "k\xF3d meny",
|
|
11173
11211
|
iban: "IBAN",
|
|
11174
11212
|
jwt: "JWT",
|
|
11175
11213
|
template_literal: "vstup"
|
|
@@ -11245,7 +11283,7 @@ function sk_default() {
|
|
|
11245
11283
|
};
|
|
11246
11284
|
}
|
|
11247
11285
|
|
|
11248
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11286
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sl.js
|
|
11249
11287
|
var error48 = () => {
|
|
11250
11288
|
const Sizable = {
|
|
11251
11289
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -11286,6 +11324,7 @@ var error48 = () => {
|
|
|
11286
11324
|
json_string: "JSON niz",
|
|
11287
11325
|
e164: "E.164 \u0161tevilka",
|
|
11288
11326
|
credit_card: "\u0161tevilka kreditne kartice",
|
|
11327
|
+
currency_code: "koda valute",
|
|
11289
11328
|
iban: "IBAN",
|
|
11290
11329
|
jwt: "JWT",
|
|
11291
11330
|
template_literal: "vnos"
|
|
@@ -11359,7 +11398,7 @@ function sl_default() {
|
|
|
11359
11398
|
};
|
|
11360
11399
|
}
|
|
11361
11400
|
|
|
11362
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11401
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sv.js
|
|
11363
11402
|
var error49 = () => {
|
|
11364
11403
|
const Sizable = {
|
|
11365
11404
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -11400,6 +11439,7 @@ var error49 = () => {
|
|
|
11400
11439
|
json_string: "JSON-str\xE4ng",
|
|
11401
11440
|
e164: "E.164-nummer",
|
|
11402
11441
|
credit_card: "kreditkortsnummer",
|
|
11442
|
+
currency_code: "valutakod",
|
|
11403
11443
|
iban: "IBAN",
|
|
11404
11444
|
jwt: "JWT",
|
|
11405
11445
|
template_literal: "mall-literal"
|
|
@@ -11474,7 +11514,7 @@ function sv_default() {
|
|
|
11474
11514
|
};
|
|
11475
11515
|
}
|
|
11476
11516
|
|
|
11477
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11517
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ta.js
|
|
11478
11518
|
var error50 = () => {
|
|
11479
11519
|
const Sizable = {
|
|
11480
11520
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -11515,6 +11555,7 @@ var error50 = () => {
|
|
|
11515
11555
|
json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
|
|
11516
11556
|
e164: "E.164 \u0B8E\u0BA3\u0BCD",
|
|
11517
11557
|
credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
|
|
11558
|
+
currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
|
|
11518
11559
|
iban: "IBAN",
|
|
11519
11560
|
jwt: "JWT",
|
|
11520
11561
|
template_literal: "input"
|
|
@@ -11589,7 +11630,7 @@ function ta_default() {
|
|
|
11589
11630
|
};
|
|
11590
11631
|
}
|
|
11591
11632
|
|
|
11592
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11633
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tg.js
|
|
11593
11634
|
var error51 = () => {
|
|
11594
11635
|
const Sizable = {
|
|
11595
11636
|
string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
@@ -11630,6 +11671,7 @@ var error51 = () => {
|
|
|
11630
11671
|
json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
|
|
11631
11672
|
e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
|
|
11632
11673
|
credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
|
|
11674
|
+
currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
|
|
11633
11675
|
iban: "IBAN",
|
|
11634
11676
|
jwt: "JWT",
|
|
11635
11677
|
template_literal: "\u0432\u0443\u0440\u0443\u0434"
|
|
@@ -11705,7 +11747,7 @@ function tg_default() {
|
|
|
11705
11747
|
};
|
|
11706
11748
|
}
|
|
11707
11749
|
|
|
11708
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11750
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/th.js
|
|
11709
11751
|
var error52 = () => {
|
|
11710
11752
|
const Sizable = {
|
|
11711
11753
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -11746,6 +11788,7 @@ var error52 = () => {
|
|
|
11746
11788
|
json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
|
|
11747
11789
|
e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
|
|
11748
11790
|
credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
|
|
11791
|
+
currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
|
|
11749
11792
|
iban: "IBAN",
|
|
11750
11793
|
jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
|
|
11751
11794
|
template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
|
|
@@ -11820,7 +11863,7 @@ function th_default() {
|
|
|
11820
11863
|
};
|
|
11821
11864
|
}
|
|
11822
11865
|
|
|
11823
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11866
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tk.js
|
|
11824
11867
|
var error53 = () => {
|
|
11825
11868
|
const Sizable = {
|
|
11826
11869
|
string: { unit: "simwol", verb: "bolmaly" },
|
|
@@ -11861,6 +11904,7 @@ var error53 = () => {
|
|
|
11861
11904
|
json_string: "JSON setiri",
|
|
11862
11905
|
e164: "E.164 nomeri",
|
|
11863
11906
|
credit_card: "kredit kartyny\u0148 nomeri",
|
|
11907
|
+
currency_code: "wal\xFDuta kody",
|
|
11864
11908
|
iban: "IBAN",
|
|
11865
11909
|
jwt: "JWT",
|
|
11866
11910
|
template_literal: "\u015Fablon"
|
|
@@ -11927,7 +11971,7 @@ function tk_default() {
|
|
|
11927
11971
|
};
|
|
11928
11972
|
}
|
|
11929
11973
|
|
|
11930
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11974
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tr.js
|
|
11931
11975
|
var error54 = () => {
|
|
11932
11976
|
const Sizable = {
|
|
11933
11977
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -11968,6 +12012,7 @@ var error54 = () => {
|
|
|
11968
12012
|
json_string: "JSON dizesi",
|
|
11969
12013
|
e164: "E.164 say\u0131s\u0131",
|
|
11970
12014
|
credit_card: "kredi kart\u0131 numaras\u0131",
|
|
12015
|
+
currency_code: "para birimi kodu",
|
|
11971
12016
|
iban: "IBAN",
|
|
11972
12017
|
jwt: "JWT",
|
|
11973
12018
|
template_literal: "\u015Eablon dizesi"
|
|
@@ -12037,7 +12082,7 @@ function tr_default() {
|
|
|
12037
12082
|
};
|
|
12038
12083
|
}
|
|
12039
12084
|
|
|
12040
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12085
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uk.js
|
|
12041
12086
|
var error55 = () => {
|
|
12042
12087
|
const Sizable = {
|
|
12043
12088
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -12078,6 +12123,7 @@ var error55 = () => {
|
|
|
12078
12123
|
json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
|
|
12079
12124
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
12080
12125
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
|
|
12126
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
|
|
12081
12127
|
iban: "IBAN",
|
|
12082
12128
|
jwt: "JWT",
|
|
12083
12129
|
template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
|
|
@@ -12150,12 +12196,12 @@ function uk_default() {
|
|
|
12150
12196
|
};
|
|
12151
12197
|
}
|
|
12152
12198
|
|
|
12153
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12199
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ua.js
|
|
12154
12200
|
function ua_default() {
|
|
12155
12201
|
return uk_default();
|
|
12156
12202
|
}
|
|
12157
12203
|
|
|
12158
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12204
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ur.js
|
|
12159
12205
|
var error56 = () => {
|
|
12160
12206
|
const Sizable = {
|
|
12161
12207
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -12196,6 +12242,7 @@ var error56 = () => {
|
|
|
12196
12242
|
json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
|
|
12197
12243
|
e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
|
|
12198
12244
|
credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
|
|
12245
|
+
currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
|
|
12199
12246
|
iban: "IBAN",
|
|
12200
12247
|
jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
|
|
12201
12248
|
template_literal: "\u0627\u0646 \u067E\u0679"
|
|
@@ -12270,7 +12317,7 @@ function ur_default() {
|
|
|
12270
12317
|
};
|
|
12271
12318
|
}
|
|
12272
12319
|
|
|
12273
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12320
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uz.js
|
|
12274
12321
|
var error57 = () => {
|
|
12275
12322
|
const Sizable = {
|
|
12276
12323
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -12311,6 +12358,7 @@ var error57 = () => {
|
|
|
12311
12358
|
json_string: "JSON satr",
|
|
12312
12359
|
e164: "E.164 raqam",
|
|
12313
12360
|
credit_card: "kredit karta raqami",
|
|
12361
|
+
currency_code: "valyuta kodi",
|
|
12314
12362
|
iban: "IBAN",
|
|
12315
12363
|
jwt: "JWT",
|
|
12316
12364
|
template_literal: "kirish"
|
|
@@ -12383,7 +12431,7 @@ function uz_default() {
|
|
|
12383
12431
|
};
|
|
12384
12432
|
}
|
|
12385
12433
|
|
|
12386
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12434
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/vi.js
|
|
12387
12435
|
var error58 = () => {
|
|
12388
12436
|
const Sizable = {
|
|
12389
12437
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -12424,6 +12472,7 @@ var error58 = () => {
|
|
|
12424
12472
|
json_string: "chu\u1ED7i JSON",
|
|
12425
12473
|
e164: "s\u1ED1 E.164",
|
|
12426
12474
|
credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
|
|
12475
|
+
currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
|
|
12427
12476
|
iban: "IBAN",
|
|
12428
12477
|
jwt: "JWT",
|
|
12429
12478
|
template_literal: "\u0111\u1EA7u v\xE0o"
|
|
@@ -12496,7 +12545,7 @@ function vi_default() {
|
|
|
12496
12545
|
};
|
|
12497
12546
|
}
|
|
12498
12547
|
|
|
12499
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12548
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-CN.js
|
|
12500
12549
|
var error59 = () => {
|
|
12501
12550
|
const Sizable = {
|
|
12502
12551
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -12537,6 +12586,7 @@ var error59 = () => {
|
|
|
12537
12586
|
json_string: "JSON\u5B57\u7B26\u4E32",
|
|
12538
12587
|
e164: "E.164\u53F7\u7801",
|
|
12539
12588
|
credit_card: "\u4FE1\u7528\u5361\u53F7",
|
|
12589
|
+
currency_code: "\u8D27\u5E01\u4EE3\u7801",
|
|
12540
12590
|
iban: "IBAN",
|
|
12541
12591
|
jwt: "JWT",
|
|
12542
12592
|
template_literal: "\u8F93\u5165"
|
|
@@ -12610,7 +12660,7 @@ function zh_CN_default() {
|
|
|
12610
12660
|
};
|
|
12611
12661
|
}
|
|
12612
12662
|
|
|
12613
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12663
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-TW.js
|
|
12614
12664
|
var error60 = () => {
|
|
12615
12665
|
const Sizable = {
|
|
12616
12666
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -12651,6 +12701,7 @@ var error60 = () => {
|
|
|
12651
12701
|
json_string: "JSON \u5B57\u4E32",
|
|
12652
12702
|
e164: "E.164 \u6578\u503C",
|
|
12653
12703
|
credit_card: "\u4FE1\u7528\u5361\u865F",
|
|
12704
|
+
currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
|
|
12654
12705
|
iban: "IBAN",
|
|
12655
12706
|
jwt: "JWT",
|
|
12656
12707
|
template_literal: "\u8F38\u5165"
|
|
@@ -12722,7 +12773,7 @@ function zh_TW_default() {
|
|
|
12722
12773
|
};
|
|
12723
12774
|
}
|
|
12724
12775
|
|
|
12725
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12776
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/yo.js
|
|
12726
12777
|
var error61 = () => {
|
|
12727
12778
|
const Sizable = {
|
|
12728
12779
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -12763,6 +12814,7 @@ var error61 = () => {
|
|
|
12763
12814
|
json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
|
|
12764
12815
|
e164: "n\u1ECD\u0301mb\xE0 E.164",
|
|
12765
12816
|
credit_card: "n\u1ECDmba kaadi gbese",
|
|
12817
|
+
currency_code: "koodu ow\xF3",
|
|
12766
12818
|
iban: "IBAN",
|
|
12767
12819
|
jwt: "JWT",
|
|
12768
12820
|
template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
|
|
@@ -12834,7 +12886,7 @@ function yo_default() {
|
|
|
12834
12886
|
};
|
|
12835
12887
|
}
|
|
12836
12888
|
|
|
12837
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12889
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
|
|
12838
12890
|
var _a2;
|
|
12839
12891
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
12840
12892
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -12884,7 +12936,7 @@ function registry() {
|
|
|
12884
12936
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
12885
12937
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
12886
12938
|
|
|
12887
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12939
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/compile.js
|
|
12888
12940
|
var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
12889
12941
|
var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
12890
12942
|
var ZodCompileAsyncError = class extends Error {
|
|
@@ -13141,7 +13193,7 @@ function generateChecks(doc, ctx, schema, accessor) {
|
|
|
13141
13193
|
generatePropertyCheck(doc, ctx, def, currentAccessor);
|
|
13142
13194
|
break;
|
|
13143
13195
|
case "properties":
|
|
13144
|
-
generatePropertiesChecks(doc, ctx, def, currentAccessor
|
|
13196
|
+
generatePropertiesChecks(doc, ctx, def, currentAccessor);
|
|
13145
13197
|
break;
|
|
13146
13198
|
case "overwrite": {
|
|
13147
13199
|
const newAccessor = newVar(ctx);
|
|
@@ -13251,11 +13303,11 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
|
|
|
13251
13303
|
doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
|
|
13252
13304
|
}
|
|
13253
13305
|
}
|
|
13254
|
-
function generatePropertiesChecks(doc, ctx, def, accessor
|
|
13306
|
+
function generatePropertiesChecks(doc, ctx, def, accessor) {
|
|
13255
13307
|
if (def.when) {
|
|
13256
13308
|
throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
|
|
13257
13309
|
}
|
|
13258
|
-
doc.write(
|
|
13310
|
+
doc.write(`if (${accessor} == null) return INVALID;`);
|
|
13259
13311
|
const shape = def.shape;
|
|
13260
13312
|
for (const key of Reflect.ownKeys(shape)) {
|
|
13261
13313
|
const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
|
|
@@ -13345,7 +13397,7 @@ var PATTERN_IS_COMPLETE = /* @__PURE__ */ new Set([
|
|
|
13345
13397
|
"uuid",
|
|
13346
13398
|
"xid"
|
|
13347
13399
|
]);
|
|
13348
|
-
function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
13400
|
+
function generateStringFormatCheck(doc, ctx, def, accessor, needsValue = true) {
|
|
13349
13401
|
const fmt = def.format;
|
|
13350
13402
|
if (fmt === "base64") {
|
|
13351
13403
|
const validator = addConstant(ctx, isValidBase64);
|
|
@@ -13385,7 +13437,7 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13385
13437
|
}
|
|
13386
13438
|
const formatDef = def;
|
|
13387
13439
|
if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
|
|
13388
|
-
const parseConst = addConstant(ctx,
|
|
13440
|
+
const parseConst = addConstant(ctx, validateURL);
|
|
13389
13441
|
const defConst = addConstant(ctx, def);
|
|
13390
13442
|
const trimVar = newVar(ctx);
|
|
13391
13443
|
const urlVar = newVar(ctx);
|
|
@@ -13400,6 +13452,8 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13400
13452
|
const protocolConst = addConstant(ctx, urlProtocolOk);
|
|
13401
13453
|
doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
|
|
13402
13454
|
}
|
|
13455
|
+
if (!needsValue)
|
|
13456
|
+
return null;
|
|
13403
13457
|
const outputVar = newVar(ctx);
|
|
13404
13458
|
const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
|
|
13405
13459
|
doc.write(`const ${outputVar} = ${outputExpr};`);
|
|
@@ -13459,7 +13513,7 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13459
13513
|
let typeAccessor;
|
|
13460
13514
|
switch (type) {
|
|
13461
13515
|
case "string":
|
|
13462
|
-
typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
|
|
13516
|
+
typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
|
|
13463
13517
|
break;
|
|
13464
13518
|
case "number":
|
|
13465
13519
|
typeAccessor = generateNumberCheck(doc, schema, accessor);
|
|
@@ -13565,10 +13619,6 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13565
13619
|
case "custom":
|
|
13566
13620
|
typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);
|
|
13567
13621
|
break;
|
|
13568
|
-
case "properties":
|
|
13569
|
-
generatePropertiesChecks(doc, ctx, schema._zod.def, accessor, true);
|
|
13570
|
-
typeAccessor = accessor;
|
|
13571
|
-
break;
|
|
13572
13622
|
case "transform":
|
|
13573
13623
|
typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);
|
|
13574
13624
|
break;
|
|
@@ -13584,12 +13634,12 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13584
13634
|
return null;
|
|
13585
13635
|
return generateChecks(doc, ctx, schema, typeAccessor);
|
|
13586
13636
|
}
|
|
13587
|
-
function generateStringCheck(doc, ctx, schema, accessor) {
|
|
13637
|
+
function generateStringCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
13588
13638
|
doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
|
|
13589
13639
|
const def = schema._zod.def;
|
|
13590
13640
|
if (def.format === void 0)
|
|
13591
13641
|
return accessor;
|
|
13592
|
-
return generateStringFormatCheck(doc, ctx, def, accessor);
|
|
13642
|
+
return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
|
|
13593
13643
|
}
|
|
13594
13644
|
function generateNumberCheck(doc, schema, accessor) {
|
|
13595
13645
|
doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
|
|
@@ -14488,21 +14538,19 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14488
14538
|
return accessor;
|
|
14489
14539
|
}
|
|
14490
14540
|
|
|
14491
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
14541
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
|
|
14542
|
+
function snapshotChecks(def) {
|
|
14543
|
+
if (def.checks)
|
|
14544
|
+
def.checks = [...def.checks];
|
|
14545
|
+
return def;
|
|
14546
|
+
}
|
|
14492
14547
|
// @__NO_SIDE_EFFECTS__
|
|
14493
14548
|
function _string(Class2, params) {
|
|
14494
|
-
return new Class2({
|
|
14495
|
-
type: "string",
|
|
14496
|
-
...normalizeParams(params)
|
|
14497
|
-
});
|
|
14549
|
+
return new Class2(snapshotChecks({ type: "string", ...normalizeParams(params) }));
|
|
14498
14550
|
}
|
|
14499
14551
|
// @__NO_SIDE_EFFECTS__
|
|
14500
14552
|
function _coercedString(Class2, params) {
|
|
14501
|
-
return new Class2({
|
|
14502
|
-
type: "string",
|
|
14503
|
-
coerce: true,
|
|
14504
|
-
...normalizeParams(params)
|
|
14505
|
-
});
|
|
14553
|
+
return new Class2(snapshotChecks({ type: "string", coerce: true, ...normalizeParams(params) }));
|
|
14506
14554
|
}
|
|
14507
14555
|
// @__NO_SIDE_EFFECTS__
|
|
14508
14556
|
function _email(Class2, params) {
|
|
@@ -14806,20 +14854,11 @@ function _isoDuration(Class2, params) {
|
|
|
14806
14854
|
}
|
|
14807
14855
|
// @__NO_SIDE_EFFECTS__
|
|
14808
14856
|
function _number(Class2, params) {
|
|
14809
|
-
return new Class2({
|
|
14810
|
-
type: "number",
|
|
14811
|
-
checks: [],
|
|
14812
|
-
...normalizeParams(params)
|
|
14813
|
-
});
|
|
14857
|
+
return new Class2(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
|
|
14814
14858
|
}
|
|
14815
14859
|
// @__NO_SIDE_EFFECTS__
|
|
14816
14860
|
function _coercedNumber(Class2, params) {
|
|
14817
|
-
return new Class2({
|
|
14818
|
-
type: "number",
|
|
14819
|
-
coerce: true,
|
|
14820
|
-
checks: [],
|
|
14821
|
-
...normalizeParams(params)
|
|
14822
|
-
});
|
|
14861
|
+
return new Class2(snapshotChecks({ type: "number", coerce: true, checks: [], ...normalizeParams(params) }));
|
|
14823
14862
|
}
|
|
14824
14863
|
// @__NO_SIDE_EFFECTS__
|
|
14825
14864
|
function _int(Class2, params) {
|
|
@@ -15161,9 +15200,8 @@ function _property(property, schema, params) {
|
|
|
15161
15200
|
});
|
|
15162
15201
|
}
|
|
15163
15202
|
// @__NO_SIDE_EFFECTS__
|
|
15164
|
-
function _properties(
|
|
15165
|
-
return new
|
|
15166
|
-
type: "properties",
|
|
15203
|
+
function _properties(shape, params) {
|
|
15204
|
+
return new $ZodCheckProperties({
|
|
15167
15205
|
check: "properties",
|
|
15168
15206
|
shape,
|
|
15169
15207
|
...normalizeParams(params)
|
|
@@ -15559,7 +15597,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15559
15597
|
return inst;
|
|
15560
15598
|
}
|
|
15561
15599
|
|
|
15562
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
15600
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
|
|
15563
15601
|
function assignProps(target, ...sources) {
|
|
15564
15602
|
for (const source of sources) {
|
|
15565
15603
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -15798,11 +15836,11 @@ function foldObjects(members2) {
|
|
|
15798
15836
|
}
|
|
15799
15837
|
objects.push(member);
|
|
15800
15838
|
}
|
|
15801
|
-
const
|
|
15839
|
+
const properties = {};
|
|
15802
15840
|
const required2 = /* @__PURE__ */ new Set();
|
|
15803
15841
|
for (const object2 of objects) {
|
|
15804
15842
|
for (const key in object2.properties) {
|
|
15805
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
15843
|
+
if (Object.prototype.hasOwnProperty.call(properties, key))
|
|
15806
15844
|
continue;
|
|
15807
15845
|
const parts = [];
|
|
15808
15846
|
for (const other of objects) {
|
|
@@ -15813,12 +15851,12 @@ function foldObjects(members2) {
|
|
|
15813
15851
|
parts.push(part);
|
|
15814
15852
|
}
|
|
15815
15853
|
const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
|
|
15816
|
-
assignProp(
|
|
15854
|
+
assignProp(properties, key, merged);
|
|
15817
15855
|
}
|
|
15818
15856
|
for (const key of object2.required ?? [])
|
|
15819
15857
|
required2.add(key);
|
|
15820
15858
|
}
|
|
15821
|
-
const folded = { type: "object", properties
|
|
15859
|
+
const folded = { type: "object", properties };
|
|
15822
15860
|
if (required2.size)
|
|
15823
15861
|
folded.required = [...required2];
|
|
15824
15862
|
if (objects.every((object2) => object2.additionalProperties === false)) {
|
|
@@ -16089,7 +16127,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
16089
16127
|
return finalize(ctx, schema);
|
|
16090
16128
|
};
|
|
16091
16129
|
|
|
16092
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
16130
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
|
|
16093
16131
|
var narrowMin = (agg, key, value) => {
|
|
16094
16132
|
if (agg[key] === void 0 || value > agg[key])
|
|
16095
16133
|
agg[key] = value;
|
|
@@ -16440,17 +16478,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16440
16478
|
path: [...params.path, "properties", key]
|
|
16441
16479
|
}));
|
|
16442
16480
|
}
|
|
16443
|
-
const
|
|
16444
|
-
const
|
|
16481
|
+
const requiredKeys = [];
|
|
16482
|
+
for (const key of Object.keys(shape)) {
|
|
16445
16483
|
const field = def.shape[key];
|
|
16446
|
-
if (ctx.io === "input") {
|
|
16447
|
-
|
|
16448
|
-
} else {
|
|
16449
|
-
return field._zod.optout === void 0;
|
|
16484
|
+
if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) {
|
|
16485
|
+
requiredKeys.push(key);
|
|
16450
16486
|
}
|
|
16451
|
-
}
|
|
16452
|
-
if (requiredKeys.
|
|
16453
|
-
json2.required =
|
|
16487
|
+
}
|
|
16488
|
+
if (requiredKeys.length > 0) {
|
|
16489
|
+
json2.required = requiredKeys;
|
|
16454
16490
|
}
|
|
16455
16491
|
if (def.catchall?._zod.def.type === "never") {
|
|
16456
16492
|
json2.additionalProperties = false;
|
|
@@ -16464,31 +16500,6 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16464
16500
|
});
|
|
16465
16501
|
}
|
|
16466
16502
|
};
|
|
16467
|
-
var propertiesProcessor = (schema, ctx, _json, params) => {
|
|
16468
|
-
const json2 = _json;
|
|
16469
|
-
const def = schema._zod.def;
|
|
16470
|
-
if (Object.getOwnPropertySymbols(def.shape).length && handleUnrepresentable(schema, ctx, json2, params, "Symbol keys cannot be represented in JSON Schema")) {
|
|
16471
|
-
return;
|
|
16472
|
-
}
|
|
16473
|
-
if (ctx.io === "output") {
|
|
16474
|
-
for (const key in def.shape) {
|
|
16475
|
-
if (isTransforming(def.shape[key]) && handleUnrepresentable(schema, ctx, json2, params, `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`)) {
|
|
16476
|
-
return;
|
|
16477
|
-
}
|
|
16478
|
-
}
|
|
16479
|
-
}
|
|
16480
|
-
json2.type = "object";
|
|
16481
|
-
json2.properties = {};
|
|
16482
|
-
for (const key in def.shape) {
|
|
16483
|
-
assignProp(json2.properties, key, processSchema(def.shape[key], ctx, {
|
|
16484
|
-
...params,
|
|
16485
|
-
path: [...params.path, "properties", key]
|
|
16486
|
-
}));
|
|
16487
|
-
}
|
|
16488
|
-
const required2 = Object.keys(def.shape).filter((key) => inputOptin(def.shape[key]) === void 0);
|
|
16489
|
-
if (required2.length > 0)
|
|
16490
|
-
json2.required = required2;
|
|
16491
|
-
};
|
|
16492
16503
|
var unionProcessor = (schema, ctx, json2, params) => {
|
|
16493
16504
|
const def = schema._zod.def;
|
|
16494
16505
|
const isExclusive = def.inclusive === false;
|
|
@@ -16808,7 +16819,6 @@ var allProcessors = {
|
|
|
16808
16819
|
file: fileProcessor,
|
|
16809
16820
|
success: successProcessor,
|
|
16810
16821
|
custom: customProcessor,
|
|
16811
|
-
properties: propertiesProcessor,
|
|
16812
16822
|
function: functionProcessor,
|
|
16813
16823
|
transform: transformProcessor,
|
|
16814
16824
|
map: mapProcessor,
|
|
@@ -16865,7 +16875,7 @@ function toJSONSchema(input2, params) {
|
|
|
16865
16875
|
return finalize(ctx, input2);
|
|
16866
16876
|
}
|
|
16867
16877
|
|
|
16868
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
16878
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-generator.js
|
|
16869
16879
|
var JSONSchemaGenerator = class {
|
|
16870
16880
|
/** @deprecated Access via ctx instead */
|
|
16871
16881
|
get metadataRegistry() {
|
|
@@ -16943,10 +16953,10 @@ var JSONSchemaGenerator = class {
|
|
|
16943
16953
|
}
|
|
16944
16954
|
};
|
|
16945
16955
|
|
|
16946
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
16956
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema.js
|
|
16947
16957
|
var json_schema_exports = {};
|
|
16948
16958
|
|
|
16949
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
16959
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
16950
16960
|
var schemas_exports2 = {};
|
|
16951
16961
|
__export(schemas_exports2, {
|
|
16952
16962
|
ZodAny: () => ZodAny,
|
|
@@ -17005,7 +17015,6 @@ __export(schemas_exports2, {
|
|
|
17005
17015
|
ZodPrefault: () => ZodPrefault,
|
|
17006
17016
|
ZodPreprocess: () => ZodPreprocess,
|
|
17007
17017
|
ZodPromise: () => ZodPromise,
|
|
17008
|
-
ZodProperties: () => ZodProperties,
|
|
17009
17018
|
ZodReadonly: () => ZodReadonly,
|
|
17010
17019
|
ZodRecord: () => ZodRecord,
|
|
17011
17020
|
ZodSet: () => ZodSet,
|
|
@@ -17043,6 +17052,7 @@ __export(schemas_exports2, {
|
|
|
17043
17052
|
creditCard: () => creditCard2,
|
|
17044
17053
|
cuid: () => cuid3,
|
|
17045
17054
|
cuid2: () => cuid22,
|
|
17055
|
+
currencyCode: () => currencyCode2,
|
|
17046
17056
|
custom: () => custom,
|
|
17047
17057
|
date: () => date2,
|
|
17048
17058
|
describe: () => describe2,
|
|
@@ -17097,7 +17107,6 @@ __export(schemas_exports2, {
|
|
|
17097
17107
|
prefault: () => prefault,
|
|
17098
17108
|
preprocess: () => preprocess,
|
|
17099
17109
|
promise: () => promise,
|
|
17100
|
-
properties: () => properties,
|
|
17101
17110
|
readonly: () => readonly,
|
|
17102
17111
|
record: () => record,
|
|
17103
17112
|
refine: () => refine,
|
|
@@ -17128,7 +17137,7 @@ __export(schemas_exports2, {
|
|
|
17128
17137
|
xor: () => xor
|
|
17129
17138
|
});
|
|
17130
17139
|
|
|
17131
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
17140
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/checks.js
|
|
17132
17141
|
var checks_exports2 = {};
|
|
17133
17142
|
__export(checks_exports2, {
|
|
17134
17143
|
endsWith: () => _endsWith,
|
|
@@ -17151,6 +17160,7 @@ __export(checks_exports2, {
|
|
|
17151
17160
|
normalize: () => _normalize,
|
|
17152
17161
|
overwrite: () => _overwrite,
|
|
17153
17162
|
positive: () => _positive,
|
|
17163
|
+
properties: () => _properties,
|
|
17154
17164
|
property: () => _property,
|
|
17155
17165
|
regex: () => _regex,
|
|
17156
17166
|
size: () => _size,
|
|
@@ -17162,7 +17172,7 @@ __export(checks_exports2, {
|
|
|
17162
17172
|
uppercase: () => _uppercase
|
|
17163
17173
|
});
|
|
17164
17174
|
|
|
17165
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
17175
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
17166
17176
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
17167
17177
|
function _lazyMethod(proto, key, make) {
|
|
17168
17178
|
Object.defineProperty(proto, key, {
|
|
@@ -17208,7 +17218,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
|
|
|
17208
17218
|
Parent: Error
|
|
17209
17219
|
});
|
|
17210
17220
|
|
|
17211
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
17221
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
17212
17222
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
17213
17223
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
17214
17224
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -17222,7 +17232,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
17222
17232
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
17223
17233
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17224
17234
|
|
|
17225
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
17235
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
17226
17236
|
function _ensureDefaultLocale() {
|
|
17227
17237
|
if (!globalConfig.localeError)
|
|
17228
17238
|
config(en_default());
|
|
@@ -17610,8 +17620,8 @@ function url(params) {
|
|
|
17610
17620
|
}
|
|
17611
17621
|
function httpUrl(params) {
|
|
17612
17622
|
return _url(ZodURL, {
|
|
17613
|
-
protocol:
|
|
17614
|
-
hostname:
|
|
17623
|
+
protocol: httpProtocol,
|
|
17624
|
+
hostname: domain,
|
|
17615
17625
|
...util_exports.normalizeParams(params)
|
|
17616
17626
|
});
|
|
17617
17627
|
}
|
|
@@ -17749,10 +17759,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
|
|
|
17749
17759
|
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
17750
17760
|
}
|
|
17751
17761
|
function hostname2(_params) {
|
|
17752
|
-
return _stringFormat(ZodCustomStringFormat, "hostname",
|
|
17762
|
+
return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
|
|
17753
17763
|
}
|
|
17754
17764
|
function hex2(_params) {
|
|
17755
|
-
return _stringFormat(ZodCustomStringFormat, "hex",
|
|
17765
|
+
return _stringFormat(ZodCustomStringFormat, "hex", hex, _params);
|
|
17766
|
+
}
|
|
17767
|
+
function currencyCode2(_params) {
|
|
17768
|
+
return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
|
|
17756
17769
|
}
|
|
17757
17770
|
function hash(alg, params) {
|
|
17758
17771
|
const enc = params?.enc ?? "hex";
|
|
@@ -18617,14 +18630,6 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
18617
18630
|
ZodType.init(inst, def);
|
|
18618
18631
|
inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
|
|
18619
18632
|
});
|
|
18620
|
-
var ZodProperties = /* @__PURE__ */ $constructor("ZodProperties", (inst, def) => {
|
|
18621
|
-
_ensureDefaultMemoizer();
|
|
18622
|
-
$ZodProperties.init(inst, def);
|
|
18623
|
-
ZodType.init(inst, def);
|
|
18624
|
-
});
|
|
18625
|
-
function properties(shape, params) {
|
|
18626
|
-
return _properties(ZodProperties, shape, params);
|
|
18627
|
-
}
|
|
18628
18633
|
function check(fn) {
|
|
18629
18634
|
const ch = new $ZodCheck({
|
|
18630
18635
|
check: "custom"
|
|
@@ -18648,7 +18653,7 @@ var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) =>
|
|
|
18648
18653
|
ZodCustom.init(inst, def);
|
|
18649
18654
|
}, {
|
|
18650
18655
|
properties(shape, params) {
|
|
18651
|
-
return this.check(
|
|
18656
|
+
return this.check(_properties(shape, params));
|
|
18652
18657
|
}
|
|
18653
18658
|
});
|
|
18654
18659
|
function _instanceof(cls, params = {}) {
|
|
@@ -18692,7 +18697,7 @@ function preprocess(fn, schema) {
|
|
|
18692
18697
|
});
|
|
18693
18698
|
}
|
|
18694
18699
|
|
|
18695
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18700
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/compat.js
|
|
18696
18701
|
var ZodIssueCode = {
|
|
18697
18702
|
invalid_type: "invalid_type",
|
|
18698
18703
|
too_big: "too_big",
|
|
@@ -18718,7 +18723,7 @@ var ZodFirstPartyTypeKind;
|
|
|
18718
18723
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18719
18724
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18720
18725
|
|
|
18721
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18726
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
18722
18727
|
var iso_exports = {};
|
|
18723
18728
|
__export(iso_exports, {
|
|
18724
18729
|
ZodISODate: () => ZodISODate,
|
|
@@ -18743,7 +18748,7 @@ function duration2(params) {
|
|
|
18743
18748
|
return _isoDuration(ZodISODuration, params);
|
|
18744
18749
|
}
|
|
18745
18750
|
|
|
18746
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18751
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/from-json-schema.js
|
|
18747
18752
|
var z = {
|
|
18748
18753
|
...schemas_exports2,
|
|
18749
18754
|
...checks_exports2,
|
|
@@ -19235,10 +19240,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
19235
19240
|
}
|
|
19236
19241
|
case "object": {
|
|
19237
19242
|
const shape = {};
|
|
19238
|
-
const
|
|
19243
|
+
const properties = schema.properties || {};
|
|
19239
19244
|
const requiredSet = new Set(schema.required || []);
|
|
19240
19245
|
const additionalSchema = typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : void 0;
|
|
19241
|
-
for (const [key, propSchema] of Object.entries(
|
|
19246
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
19242
19247
|
const propZodSchema = convertSchema(propSchema, ctx);
|
|
19243
19248
|
assignProp(shape, key, requiredSet.has(key) ? propZodSchema : propZodSchema.optional());
|
|
19244
19249
|
}
|
|
@@ -19476,7 +19481,7 @@ function fromJSONSchema(schema, params) {
|
|
|
19476
19481
|
return convertSchema(normalized, ctx);
|
|
19477
19482
|
}
|
|
19478
19483
|
|
|
19479
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19484
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/visit.js
|
|
19480
19485
|
var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
|
|
19481
19486
|
function visit(schema, fnOrHandlers) {
|
|
19482
19487
|
const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node3, rewritten) => {
|
|
@@ -19599,18 +19604,6 @@ function visit(schema, fnOrHandlers) {
|
|
|
19599
19604
|
const { _cachedInner, ...rest } = def;
|
|
19600
19605
|
return clone(s, { ...rest, getter: () => run(original()) });
|
|
19601
19606
|
}
|
|
19602
|
-
case "properties": {
|
|
19603
|
-
const oldShape = def.shape;
|
|
19604
|
-
let changed = false;
|
|
19605
|
-
const newShape = {};
|
|
19606
|
-
for (const k of Reflect.ownKeys(oldShape)) {
|
|
19607
|
-
const mapped = run(oldShape[k]);
|
|
19608
|
-
if (mapped !== oldShape[k])
|
|
19609
|
-
changed = true;
|
|
19610
|
-
newShape[k] = mapped;
|
|
19611
|
-
}
|
|
19612
|
-
return changed ? clone(s, { ...def, shape: newShape }) : s;
|
|
19613
|
-
}
|
|
19614
19607
|
// A leaf by choice: `parts` are regex fragments, not data positions.
|
|
19615
19608
|
case "template_literal":
|
|
19616
19609
|
// Leaves.
|
|
@@ -19643,7 +19636,7 @@ function visit(schema, fnOrHandlers) {
|
|
|
19643
19636
|
return run(schema);
|
|
19644
19637
|
}
|
|
19645
19638
|
|
|
19646
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19639
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/deep-partial.js
|
|
19647
19640
|
function deepPartial(schema) {
|
|
19648
19641
|
return visit(schema, {
|
|
19649
19642
|
object: (s) => s.partial(),
|
|
@@ -19655,7 +19648,7 @@ function deepPartial(schema) {
|
|
|
19655
19648
|
});
|
|
19656
19649
|
}
|
|
19657
19650
|
|
|
19658
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19651
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/in-out.js
|
|
19659
19652
|
function withChecks(side, checks) {
|
|
19660
19653
|
if (!checks?.length)
|
|
19661
19654
|
return side;
|
|
@@ -19685,7 +19678,7 @@ function output(schema) {
|
|
|
19685
19678
|
});
|
|
19686
19679
|
}
|
|
19687
19680
|
|
|
19688
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19681
|
+
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/coerce.js
|
|
19689
19682
|
var coerce_exports = {};
|
|
19690
19683
|
__export(coerce_exports, {
|
|
19691
19684
|
bigint: () => bigint3,
|
|
@@ -22092,30 +22085,36 @@ function readTrustedIdentity(path2) {
|
|
|
22092
22085
|
metadata.ctimeMs
|
|
22093
22086
|
);
|
|
22094
22087
|
}
|
|
22095
|
-
var
|
|
22096
|
-
adapterIdentity;
|
|
22097
|
-
adapterPath;
|
|
22098
|
-
adapterVersion;
|
|
22088
|
+
var AgentDefinition = class {
|
|
22099
22089
|
agentIdentity;
|
|
22100
22090
|
agentVersion;
|
|
22101
|
-
arguments;
|
|
22102
|
-
command;
|
|
22103
22091
|
capabilities;
|
|
22092
|
+
command;
|
|
22104
22093
|
environment;
|
|
22105
22094
|
id;
|
|
22106
22095
|
label;
|
|
22107
|
-
constructor(id, label,
|
|
22108
|
-
this.adapterIdentity = adapterIdentity;
|
|
22109
|
-
this.adapterPath = adapterIdentity.realPath;
|
|
22110
|
-
this.adapterVersion = adapterVersion;
|
|
22096
|
+
constructor(id, label, _command, environment, agentVersion, agentIdentity, capabilities) {
|
|
22111
22097
|
this.agentIdentity = agentIdentity;
|
|
22112
22098
|
this.agentVersion = agentVersion;
|
|
22113
22099
|
this.capabilities = Object.freeze({ ...capabilities });
|
|
22100
|
+
this.command = agentIdentity.realPath;
|
|
22101
|
+
this.environment = Object.freeze({ ...environment });
|
|
22114
22102
|
this.id = id;
|
|
22115
22103
|
this.label = label;
|
|
22116
|
-
|
|
22104
|
+
}
|
|
22105
|
+
};
|
|
22106
|
+
var LocalAgentDefinition = class _LocalAgentDefinition extends AgentDefinition {
|
|
22107
|
+
kind = "acp-adapter-process";
|
|
22108
|
+
adapterIdentity;
|
|
22109
|
+
adapterPath;
|
|
22110
|
+
adapterVersion;
|
|
22111
|
+
arguments;
|
|
22112
|
+
constructor(id, label, command, arguments_, environment = {}, adapterVersion = "", agentVersion = "", adapterIdentity = readTrustedIdentity(command), agentIdentity = adapterIdentity, capabilities = unsupportedSessionCapabilities()) {
|
|
22113
|
+
super(id, label, command, environment, agentVersion, agentIdentity, capabilities);
|
|
22114
|
+
this.adapterIdentity = adapterIdentity;
|
|
22115
|
+
this.adapterPath = adapterIdentity.realPath;
|
|
22116
|
+
this.adapterVersion = adapterVersion;
|
|
22117
22117
|
this.arguments = Object.freeze([...arguments_]);
|
|
22118
|
-
this.environment = Object.freeze({ ...environment });
|
|
22119
22118
|
}
|
|
22120
22119
|
withEnvironment = (environment) => new _LocalAgentDefinition(
|
|
22121
22120
|
this.id,
|
|
@@ -22130,6 +22129,24 @@ var LocalAgentDefinition = class _LocalAgentDefinition {
|
|
|
22130
22129
|
this.capabilities
|
|
22131
22130
|
);
|
|
22132
22131
|
};
|
|
22132
|
+
var InProcessAcpAgentDefinition = class _InProcessAcpAgentDefinition extends AgentDefinition {
|
|
22133
|
+
kind = "in-process-acp";
|
|
22134
|
+
createEndpoint;
|
|
22135
|
+
constructor(id, label, command, createEndpoint, environment = {}, agentVersion = "", agentIdentity = readTrustedIdentity(command), capabilities = unsupportedSessionCapabilities()) {
|
|
22136
|
+
super(id, label, command, environment, agentVersion, agentIdentity, capabilities);
|
|
22137
|
+
this.createEndpoint = createEndpoint;
|
|
22138
|
+
}
|
|
22139
|
+
withEnvironment = (environment) => new _InProcessAcpAgentDefinition(
|
|
22140
|
+
this.id,
|
|
22141
|
+
this.label,
|
|
22142
|
+
this.command,
|
|
22143
|
+
this.createEndpoint,
|
|
22144
|
+
environment,
|
|
22145
|
+
this.agentVersion,
|
|
22146
|
+
this.agentIdentity,
|
|
22147
|
+
this.capabilities
|
|
22148
|
+
);
|
|
22149
|
+
};
|
|
22133
22150
|
var InstallableAgentDefinition = class {
|
|
22134
22151
|
id;
|
|
22135
22152
|
label;
|
|
@@ -22600,6 +22617,30 @@ async function replaceImageMarkers(text3, replace) {
|
|
|
22600
22617
|
return `${rewritten}${text3.slice(cursor)}`;
|
|
22601
22618
|
}
|
|
22602
22619
|
|
|
22620
|
+
// src/acp/acp-error.ts
|
|
22621
|
+
var AcpExecutionError = class extends Error {
|
|
22622
|
+
code;
|
|
22623
|
+
constructor(message, options = {}, code = "acp_execution_failed") {
|
|
22624
|
+
super(message, options);
|
|
22625
|
+
this.code = code;
|
|
22626
|
+
this.name = "AcpExecutionError";
|
|
22627
|
+
}
|
|
22628
|
+
};
|
|
22629
|
+
var AcpConfigurationValueUnavailableError = class extends AcpExecutionError {
|
|
22630
|
+
configId;
|
|
22631
|
+
offeredValueCount;
|
|
22632
|
+
offeredValues;
|
|
22633
|
+
requestedValue;
|
|
22634
|
+
constructor(configId, requestedValue, offeredValues) {
|
|
22635
|
+
super("The requested ACP configuration value is unavailable", {}, "invalid_session_configuration");
|
|
22636
|
+
this.name = "AcpConfigurationValueUnavailableError";
|
|
22637
|
+
this.configId = configId.slice(0, 128);
|
|
22638
|
+
this.requestedValue = requestedValue.slice(0, 128);
|
|
22639
|
+
this.offeredValueCount = offeredValues.length;
|
|
22640
|
+
this.offeredValues = Object.freeze(offeredValues.slice(0, 32).map((value) => value.slice(0, 128)));
|
|
22641
|
+
}
|
|
22642
|
+
};
|
|
22643
|
+
|
|
22603
22644
|
// src/acp/activity.ts
|
|
22604
22645
|
var TRUNCATION_MARKER = "\n\u2026 output truncated by Mobius";
|
|
22605
22646
|
function isRecord3(value) {
|
|
@@ -31155,28 +31196,6 @@ var AcpAgentSettingsSnapshot = class {
|
|
|
31155
31196
|
this.configOptions = configOptions;
|
|
31156
31197
|
}
|
|
31157
31198
|
};
|
|
31158
|
-
var AcpExecutionError = class extends Error {
|
|
31159
|
-
code;
|
|
31160
|
-
constructor(message, options = {}, code = "acp_execution_failed") {
|
|
31161
|
-
super(message, options);
|
|
31162
|
-
this.code = code;
|
|
31163
|
-
this.name = "AcpExecutionError";
|
|
31164
|
-
}
|
|
31165
|
-
};
|
|
31166
|
-
var AcpConfigurationValueUnavailableError = class extends AcpExecutionError {
|
|
31167
|
-
configId;
|
|
31168
|
-
offeredValueCount;
|
|
31169
|
-
offeredValues;
|
|
31170
|
-
requestedValue;
|
|
31171
|
-
constructor(configId, requestedValue, offeredValues) {
|
|
31172
|
-
super("The requested ACP configuration value is unavailable", {}, "invalid_session_configuration");
|
|
31173
|
-
this.name = "AcpConfigurationValueUnavailableError";
|
|
31174
|
-
this.configId = configId.slice(0, 128);
|
|
31175
|
-
this.requestedValue = requestedValue.slice(0, 128);
|
|
31176
|
-
this.offeredValueCount = offeredValues.length;
|
|
31177
|
-
this.offeredValues = Object.freeze(offeredValues.slice(0, 32).map((value) => value.slice(0, 128)));
|
|
31178
|
-
}
|
|
31179
|
-
};
|
|
31180
31199
|
var RetryableAcpInitializationError = class extends AcpExecutionError {
|
|
31181
31200
|
constructor(cause) {
|
|
31182
31201
|
super("ACP agent initialization failed", { cause });
|
|
@@ -31416,13 +31435,13 @@ function normalizeElicitationFields(requestedSchema) {
|
|
|
31416
31435
|
if (!isRecord5(requestedSchema) || !isRecord5(requestedSchema["properties"])) {
|
|
31417
31436
|
return [];
|
|
31418
31437
|
}
|
|
31419
|
-
const
|
|
31438
|
+
const properties = requestedSchema["properties"];
|
|
31420
31439
|
const requiredValues = requestedSchema["required"];
|
|
31421
31440
|
const required2 = new Set(
|
|
31422
31441
|
Array.isArray(requiredValues) ? requiredValues.filter((entry) => typeof entry === "string") : []
|
|
31423
31442
|
);
|
|
31424
31443
|
const normalized = [];
|
|
31425
|
-
for (const [name, property] of Object.entries(
|
|
31444
|
+
for (const [name, property] of Object.entries(properties)) {
|
|
31426
31445
|
if (!isRecord5(property)) {
|
|
31427
31446
|
continue;
|
|
31428
31447
|
}
|
|
@@ -31521,7 +31540,7 @@ function validateElicitationContent(encoded, requestedSchema) {
|
|
|
31521
31540
|
"invalid_elicitation_response"
|
|
31522
31541
|
);
|
|
31523
31542
|
}
|
|
31524
|
-
const
|
|
31543
|
+
const properties = requestedSchema["properties"];
|
|
31525
31544
|
const requiredValue = requestedSchema["required"];
|
|
31526
31545
|
const required2 = new Set(
|
|
31527
31546
|
Array.isArray(requiredValue) ? requiredValue.filter((entry) => typeof entry === "string") : []
|
|
@@ -31533,7 +31552,7 @@ function validateElicitationContent(encoded, requestedSchema) {
|
|
|
31533
31552
|
}
|
|
31534
31553
|
const validated = {};
|
|
31535
31554
|
for (const [name, value] of Object.entries(decoded)) {
|
|
31536
|
-
const property =
|
|
31555
|
+
const property = properties[name];
|
|
31537
31556
|
if (!isRecord5(property)) {
|
|
31538
31557
|
throw new AcpExecutionError(
|
|
31539
31558
|
`Elicitation field ${name} was not requested`,
|
|
@@ -31673,16 +31692,18 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
31673
31692
|
#additionalDirectories;
|
|
31674
31693
|
#acceptedUrlElicitations = /* @__PURE__ */ new Map();
|
|
31675
31694
|
#agentId;
|
|
31676
|
-
#child;
|
|
31677
31695
|
#connection;
|
|
31678
31696
|
#cwd;
|
|
31679
31697
|
#environment;
|
|
31680
31698
|
#getObserver;
|
|
31699
|
+
#inProcessAgent;
|
|
31681
31700
|
#mobiusSessionId;
|
|
31682
31701
|
#pendingElicitations = /* @__PURE__ */ new Map();
|
|
31683
31702
|
#pendingPermissions = /* @__PURE__ */ new Map();
|
|
31684
31703
|
#preSessionUpdates = [];
|
|
31704
|
+
// The adapter-process topology only. An in-process agent owns the app-server child itself.
|
|
31685
31705
|
#processExit;
|
|
31706
|
+
#runtimeChild;
|
|
31686
31707
|
#metrics;
|
|
31687
31708
|
#sessionConfigProtocol;
|
|
31688
31709
|
#store;
|
|
@@ -31717,18 +31738,33 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
31717
31738
|
this.#sessionConfigProtocol = sessionConfigProtocolForAgent(agent.id);
|
|
31718
31739
|
this.#store = store;
|
|
31719
31740
|
this.#verifiedAgentVersion = agent.agentVersion;
|
|
31720
|
-
|
|
31741
|
+
if (agent.kind === "in-process-acp") {
|
|
31742
|
+
const inProcess = agent.createEndpoint({
|
|
31743
|
+
command: agent.command,
|
|
31744
|
+
cwd,
|
|
31745
|
+
environment: agent.environment
|
|
31746
|
+
});
|
|
31747
|
+
this.#inProcessAgent = inProcess;
|
|
31748
|
+
this.#runtimeChild = null;
|
|
31749
|
+
this.#processExit = new Promise(() => {
|
|
31750
|
+
});
|
|
31751
|
+
this.#connection = createAcpClient(this).connect(inProcess.app());
|
|
31752
|
+
return;
|
|
31753
|
+
}
|
|
31754
|
+
this.#inProcessAgent = null;
|
|
31755
|
+
const child = spawn2(agent.adapterPath, [...agent.arguments], {
|
|
31721
31756
|
cwd,
|
|
31722
31757
|
detached: process.platform !== "win32",
|
|
31723
31758
|
env: { ...process.env, ...agent.environment },
|
|
31724
31759
|
shell: false,
|
|
31725
31760
|
stdio: ["pipe", "pipe", "pipe"]
|
|
31726
31761
|
});
|
|
31727
|
-
|
|
31728
|
-
const
|
|
31729
|
-
const
|
|
31762
|
+
this.#runtimeChild = child;
|
|
31763
|
+
const stdin = child.stdin;
|
|
31764
|
+
const stdout = child.stdout;
|
|
31765
|
+
const stderr = child.stderr;
|
|
31730
31766
|
if (stdin === null || stdout === null || stderr === null) {
|
|
31731
|
-
|
|
31767
|
+
child.kill("SIGKILL");
|
|
31732
31768
|
throw new AcpExecutionError("ACP process streams are unavailable");
|
|
31733
31769
|
}
|
|
31734
31770
|
stderr.setEncoding("utf8");
|
|
@@ -31736,8 +31772,8 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
31736
31772
|
process.stderr.write(`[${agent.id}-acp] ${chunk}`);
|
|
31737
31773
|
});
|
|
31738
31774
|
this.#processExit = new Promise((resolve8) => {
|
|
31739
|
-
|
|
31740
|
-
|
|
31775
|
+
child.once("error", resolve8);
|
|
31776
|
+
child.once("exit", resolve8);
|
|
31741
31777
|
});
|
|
31742
31778
|
const stream = ndJsonStream(createWritableAcpStream(stdin), readableWebStream(stdout));
|
|
31743
31779
|
this.#connection = createAcpClient(this).connect(stream);
|
|
@@ -31745,15 +31781,16 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
31745
31781
|
static async #start(options, getObserver, store, initialize, metrics) {
|
|
31746
31782
|
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
31747
31783
|
options.signal.throwIfAborted();
|
|
31748
|
-
const
|
|
31784
|
+
const unchanged = await metrics.measure(
|
|
31749
31785
|
"executable-validation",
|
|
31750
31786
|
async () => await Promise.all([
|
|
31751
|
-
|
|
31787
|
+
// Only the adapter topology has an adapter executable to revalidate.
|
|
31788
|
+
options.agent.kind === "acp-adapter-process" ? revalidateExecutable(options.agent.adapterIdentity) : Promise.resolve(true),
|
|
31752
31789
|
revalidateExecutable(options.agent.agentIdentity)
|
|
31753
31790
|
])
|
|
31754
31791
|
);
|
|
31755
31792
|
options.signal.throwIfAborted();
|
|
31756
|
-
if (
|
|
31793
|
+
if (unchanged.some((result) => !result)) {
|
|
31757
31794
|
throw new AcpExecutionError(
|
|
31758
31795
|
"The local Agent runtime changed; restart Mobius before starting a new conversation",
|
|
31759
31796
|
{},
|
|
@@ -31986,6 +32023,16 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
31986
32023
|
await this.#metrics.measure("agent-initialize", async () => await this.#initializeAgentOperation(signal));
|
|
31987
32024
|
}
|
|
31988
32025
|
async #initializeAgentOperation(signal) {
|
|
32026
|
+
if (this.#inProcessAgent !== null) {
|
|
32027
|
+
await this.race(
|
|
32028
|
+
this.#inProcessAgent.initialize(signal),
|
|
32029
|
+
"The Codex app-server exited during initialization",
|
|
32030
|
+
signal
|
|
32031
|
+
).catch((cause) => {
|
|
32032
|
+
signal.throwIfAborted();
|
|
32033
|
+
throw new RetryableAcpInitializationError(cause);
|
|
32034
|
+
});
|
|
32035
|
+
}
|
|
31989
32036
|
const initialized = await this.race(
|
|
31990
32037
|
this.#connection.agent.request(
|
|
31991
32038
|
methods3.agent.initialize,
|
|
@@ -32478,7 +32525,7 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
32478
32525
|
);
|
|
32479
32526
|
};
|
|
32480
32527
|
cancel = async () => {
|
|
32481
|
-
const capturedProcesses = await captureProcessTree(this.#
|
|
32528
|
+
const capturedProcesses = this.#runtimeChild === null ? [] : await captureProcessTree(this.#runtimeChild);
|
|
32482
32529
|
try {
|
|
32483
32530
|
await this.cancelPendingInteractions();
|
|
32484
32531
|
if (this.#turn.running) {
|
|
@@ -32841,7 +32888,11 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
32841
32888
|
};
|
|
32842
32889
|
closeProcess = async (capturedProcesses = []) => {
|
|
32843
32890
|
try {
|
|
32844
|
-
|
|
32891
|
+
if (this.#runtimeChild === null) {
|
|
32892
|
+
await this.#inProcessAgent?.close();
|
|
32893
|
+
return;
|
|
32894
|
+
}
|
|
32895
|
+
await stopProcessTree(this.#runtimeChild, capturedProcesses);
|
|
32845
32896
|
} finally {
|
|
32846
32897
|
this.#connection.close();
|
|
32847
32898
|
}
|
|
@@ -34530,6 +34581,21 @@ var DirectAcpAgentDefinition = class extends LocalAgentSpecification {
|
|
|
34530
34581
|
this.managedAgentExecutablePath = this.managedAdapterExecutablePath;
|
|
34531
34582
|
}
|
|
34532
34583
|
};
|
|
34584
|
+
var InProcessAcpAgentDefinition2 = class extends LocalAgentSpecification {
|
|
34585
|
+
launchArguments = Object.freeze([]);
|
|
34586
|
+
adapterOverrideVariable;
|
|
34587
|
+
adapterVersion = "in-process";
|
|
34588
|
+
agentOverrideVariable;
|
|
34589
|
+
managedAdapterExecutablePath;
|
|
34590
|
+
managedAgentExecutablePath;
|
|
34591
|
+
constructor(executableOverrideVariable, managedExecutablePath) {
|
|
34592
|
+
super();
|
|
34593
|
+
this.adapterOverrideVariable = executableOverrideVariable;
|
|
34594
|
+
this.agentOverrideVariable = executableOverrideVariable;
|
|
34595
|
+
this.managedAdapterExecutablePath = Object.freeze([...managedExecutablePath]);
|
|
34596
|
+
this.managedAgentExecutablePath = this.managedAdapterExecutablePath;
|
|
34597
|
+
}
|
|
34598
|
+
};
|
|
34533
34599
|
var BridgedAcpAgentDefinition = class extends LocalAgentSpecification {
|
|
34534
34600
|
launchArguments = Object.freeze([]);
|
|
34535
34601
|
get adapterExecutable() {
|
|
@@ -34571,31 +34637,909 @@ var ClaudeCodeAgentSpecification = class extends BridgedAcpAgentDefinition {
|
|
|
34571
34637
|
managedAgentExecutablePath = ["agents", "claude", "home", ".local", "bin", "claude"];
|
|
34572
34638
|
};
|
|
34573
34639
|
|
|
34640
|
+
// src/acp/codex/agent.ts
|
|
34641
|
+
import {
|
|
34642
|
+
agent as createAgentApp,
|
|
34643
|
+
methods as methods4,
|
|
34644
|
+
PROTOCOL_VERSION as PROTOCOL_VERSION2
|
|
34645
|
+
} from "@agentclientprotocol/sdk";
|
|
34646
|
+
|
|
34647
|
+
// src/acp/codex/app-server-client.ts
|
|
34648
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
34649
|
+
|
|
34650
|
+
// src/acp/codex/app-server-protocol.ts
|
|
34651
|
+
var boundedText = (maximum) => external_exports.string().max(maximum);
|
|
34652
|
+
var jsonValue = external_exports.lazy(() => external_exports.unknown());
|
|
34653
|
+
var requestIdSchema = external_exports.union([external_exports.number(), external_exports.string()]).refine((value) => typeof value === "number" || value.length <= 256);
|
|
34654
|
+
var errorResponseSchema = external_exports.object({
|
|
34655
|
+
error: external_exports.object({ code: external_exports.number(), message: boundedText(4096) }),
|
|
34656
|
+
id: requestIdSchema
|
|
34657
|
+
});
|
|
34658
|
+
var resultResponseSchema = external_exports.object({ id: requestIdSchema, result: external_exports.unknown() });
|
|
34659
|
+
var serverRequestSchema = external_exports.object({
|
|
34660
|
+
id: requestIdSchema,
|
|
34661
|
+
method: external_exports.string(),
|
|
34662
|
+
params: external_exports.unknown().optional()
|
|
34663
|
+
});
|
|
34664
|
+
var serverNotificationSchema = external_exports.object({
|
|
34665
|
+
method: external_exports.string(),
|
|
34666
|
+
params: external_exports.unknown().optional()
|
|
34667
|
+
});
|
|
34668
|
+
function decodeAppServerMessage(value) {
|
|
34669
|
+
const record2 = external_exports.record(external_exports.string(), external_exports.unknown()).parse(value);
|
|
34670
|
+
const error62 = errorResponseSchema.safeParse(record2);
|
|
34671
|
+
if (error62.success) {
|
|
34672
|
+
return {
|
|
34673
|
+
code: error62.data.error.code,
|
|
34674
|
+
id: error62.data.id,
|
|
34675
|
+
kind: "error-response",
|
|
34676
|
+
message: error62.data.error.message
|
|
34677
|
+
};
|
|
34678
|
+
}
|
|
34679
|
+
const result = resultResponseSchema.safeParse(record2);
|
|
34680
|
+
if (result.success) {
|
|
34681
|
+
return { id: result.data.id, kind: "result-response", result: result.data.result };
|
|
34682
|
+
}
|
|
34683
|
+
const request = serverRequestSchema.safeParse(record2);
|
|
34684
|
+
if (request.success) {
|
|
34685
|
+
return {
|
|
34686
|
+
id: request.data.id,
|
|
34687
|
+
kind: "server-request",
|
|
34688
|
+
method: request.data.method,
|
|
34689
|
+
params: request.data.params ?? {}
|
|
34690
|
+
};
|
|
34691
|
+
}
|
|
34692
|
+
const notification = serverNotificationSchema.parse(record2);
|
|
34693
|
+
return { kind: "notification", method: notification.method, params: notification.params ?? {} };
|
|
34694
|
+
}
|
|
34695
|
+
var turnStatusSchema = external_exports.enum(["inProgress", "completed", "interrupted", "failed"]);
|
|
34696
|
+
var messagePhaseSchema = external_exports.enum(["commentary", "final_answer"]);
|
|
34697
|
+
var commandExecutionStatusSchema = external_exports.enum(["inProgress", "completed", "failed", "declined"]);
|
|
34698
|
+
var patchApplyStatusSchema = external_exports.enum(["inProgress", "completed", "failed", "declined"]);
|
|
34699
|
+
var mcpToolCallStatusSchema = external_exports.enum(["inProgress", "completed", "failed"]);
|
|
34700
|
+
var dynamicToolCallStatusSchema = external_exports.enum(["inProgress", "completed", "failed"]);
|
|
34701
|
+
var fileUpdateChangeSchema = external_exports.object({
|
|
34702
|
+
diff: boundedText(1e6),
|
|
34703
|
+
kind: external_exports.unknown(),
|
|
34704
|
+
path: boundedText(4096)
|
|
34705
|
+
});
|
|
34706
|
+
var threadItemSchema = external_exports.discriminatedUnion("type", [
|
|
34707
|
+
external_exports.object({
|
|
34708
|
+
id: boundedText(256),
|
|
34709
|
+
text: boundedText(1e6),
|
|
34710
|
+
type: external_exports.literal("agentMessage"),
|
|
34711
|
+
phase: messagePhaseSchema.nullish()
|
|
34712
|
+
}),
|
|
34713
|
+
external_exports.object({ content: external_exports.array(external_exports.unknown()).max(1e4), id: boundedText(256), type: external_exports.literal("userMessage") }),
|
|
34714
|
+
external_exports.object({
|
|
34715
|
+
aggregatedOutput: boundedText(4e6).nullish(),
|
|
34716
|
+
command: boundedText(32768),
|
|
34717
|
+
cwd: boundedText(4096),
|
|
34718
|
+
durationMs: external_exports.number().nullish(),
|
|
34719
|
+
exitCode: external_exports.number().nullish(),
|
|
34720
|
+
id: boundedText(256),
|
|
34721
|
+
processId: external_exports.string().nullish(),
|
|
34722
|
+
status: commandExecutionStatusSchema,
|
|
34723
|
+
type: external_exports.literal("commandExecution")
|
|
34724
|
+
}),
|
|
34725
|
+
external_exports.object({
|
|
34726
|
+
changes: external_exports.array(fileUpdateChangeSchema).max(1e4),
|
|
34727
|
+
id: boundedText(256),
|
|
34728
|
+
status: patchApplyStatusSchema,
|
|
34729
|
+
type: external_exports.literal("fileChange")
|
|
34730
|
+
}),
|
|
34731
|
+
external_exports.object({
|
|
34732
|
+
arguments: jsonValue.optional(),
|
|
34733
|
+
error: external_exports.unknown().nullish(),
|
|
34734
|
+
id: boundedText(256),
|
|
34735
|
+
result: external_exports.unknown().nullish(),
|
|
34736
|
+
server: boundedText(256),
|
|
34737
|
+
status: mcpToolCallStatusSchema,
|
|
34738
|
+
tool: boundedText(256),
|
|
34739
|
+
type: external_exports.literal("mcpToolCall")
|
|
34740
|
+
}),
|
|
34741
|
+
external_exports.object({
|
|
34742
|
+
arguments: jsonValue.optional(),
|
|
34743
|
+
contentItems: external_exports.array(external_exports.unknown()).max(1e4).nullish(),
|
|
34744
|
+
id: boundedText(256),
|
|
34745
|
+
namespace: external_exports.string().nullish(),
|
|
34746
|
+
status: dynamicToolCallStatusSchema,
|
|
34747
|
+
success: external_exports.boolean().nullish(),
|
|
34748
|
+
tool: boundedText(256),
|
|
34749
|
+
type: external_exports.literal("dynamicToolCall")
|
|
34750
|
+
}),
|
|
34751
|
+
external_exports.object({
|
|
34752
|
+
content: external_exports.array(boundedText(1e6)).max(1e3),
|
|
34753
|
+
id: boundedText(256),
|
|
34754
|
+
summary: external_exports.array(boundedText(1e6)).max(1e3),
|
|
34755
|
+
type: external_exports.literal("reasoning")
|
|
34756
|
+
}),
|
|
34757
|
+
external_exports.object({ id: boundedText(256), text: boundedText(1e6), type: external_exports.literal("plan") })
|
|
34758
|
+
]);
|
|
34759
|
+
var turnSchema = external_exports.object({
|
|
34760
|
+
durationMs: external_exports.number().nullish(),
|
|
34761
|
+
error: external_exports.object({ message: boundedText(4096) }).nullish(),
|
|
34762
|
+
id: boundedText(256),
|
|
34763
|
+
status: turnStatusSchema
|
|
34764
|
+
});
|
|
34765
|
+
var turnNotificationSchema = external_exports.object({
|
|
34766
|
+
thread: external_exports.object({ id: boundedText(256) }).nullish(),
|
|
34767
|
+
threadId: boundedText(256),
|
|
34768
|
+
turn: turnSchema
|
|
34769
|
+
});
|
|
34770
|
+
var commandApprovalParamsSchema = external_exports.object({
|
|
34771
|
+
command: external_exports.string().nullish(),
|
|
34772
|
+
commandActions: external_exports.array(external_exports.unknown()).max(1e3).nullish(),
|
|
34773
|
+
cwd: external_exports.string().nullish(),
|
|
34774
|
+
itemId: boundedText(256),
|
|
34775
|
+
reason: external_exports.string().nullish(),
|
|
34776
|
+
threadId: boundedText(256),
|
|
34777
|
+
turnId: boundedText(256)
|
|
34778
|
+
});
|
|
34779
|
+
var fileChangeApprovalParamsSchema = external_exports.object({
|
|
34780
|
+
grantRoot: external_exports.string().nullish(),
|
|
34781
|
+
itemId: boundedText(256),
|
|
34782
|
+
reason: external_exports.string().nullish(),
|
|
34783
|
+
threadId: boundedText(256),
|
|
34784
|
+
turnId: boundedText(256)
|
|
34785
|
+
});
|
|
34786
|
+
var userInputOptionSchema = external_exports.object({
|
|
34787
|
+
description: boundedText(4096),
|
|
34788
|
+
label: boundedText(1024)
|
|
34789
|
+
});
|
|
34790
|
+
var userInputQuestionSchema = external_exports.object({
|
|
34791
|
+
header: boundedText(1024),
|
|
34792
|
+
id: boundedText(256),
|
|
34793
|
+
options: external_exports.array(userInputOptionSchema).max(1e3).nullish(),
|
|
34794
|
+
question: boundedText(4096)
|
|
34795
|
+
});
|
|
34796
|
+
var requestUserInputParamsSchema = external_exports.object({
|
|
34797
|
+
itemId: boundedText(256).nullish(),
|
|
34798
|
+
questions: external_exports.array(userInputQuestionSchema).max(1e3),
|
|
34799
|
+
threadId: boundedText(256),
|
|
34800
|
+
turnId: boundedText(256)
|
|
34801
|
+
});
|
|
34802
|
+
var mcpElicitationParamsSchema = external_exports.object({
|
|
34803
|
+
message: boundedText(4096),
|
|
34804
|
+
mode: external_exports.enum(["form", "url"]).or(external_exports.string()),
|
|
34805
|
+
requestedSchema: external_exports.unknown().optional(),
|
|
34806
|
+
serverName: boundedText(256),
|
|
34807
|
+
threadId: boundedText(256).nullish(),
|
|
34808
|
+
turnId: boundedText(256).nullish(),
|
|
34809
|
+
url: external_exports.string().optional()
|
|
34810
|
+
});
|
|
34811
|
+
var threadStartResponseSchema = external_exports.object({
|
|
34812
|
+
thread: external_exports.object({ id: boundedText(256) })
|
|
34813
|
+
});
|
|
34814
|
+
|
|
34815
|
+
// src/acp/codex/app-server-client.ts
|
|
34816
|
+
var INITIALIZE_TIMEOUT_MILLISECONDS = 3e4;
|
|
34817
|
+
var OUTPUT_LIMIT_BYTES = 32 * 1024 * 1024;
|
|
34818
|
+
var CodexAppServerError = class extends Error {
|
|
34819
|
+
code;
|
|
34820
|
+
constructor(code, message, options = {}) {
|
|
34821
|
+
super(message, options);
|
|
34822
|
+
this.code = code;
|
|
34823
|
+
this.name = "CodexAppServerError";
|
|
34824
|
+
}
|
|
34825
|
+
};
|
|
34826
|
+
var CodexAppServerClient = class {
|
|
34827
|
+
#child;
|
|
34828
|
+
#handlers;
|
|
34829
|
+
#pending = /* @__PURE__ */ new Map();
|
|
34830
|
+
#processExit;
|
|
34831
|
+
#failure = null;
|
|
34832
|
+
#nextRequestId = 1;
|
|
34833
|
+
#pendingBuffer = "";
|
|
34834
|
+
#receivedBytes = 0;
|
|
34835
|
+
#closed = false;
|
|
34836
|
+
constructor(options) {
|
|
34837
|
+
this.#handlers = options.handlers;
|
|
34838
|
+
this.#child = spawn3(options.command, ["app-server"], {
|
|
34839
|
+
cwd: options.cwd,
|
|
34840
|
+
detached: process.platform !== "win32",
|
|
34841
|
+
env: { ...process.env, ...options.environment },
|
|
34842
|
+
shell: false,
|
|
34843
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
34844
|
+
});
|
|
34845
|
+
const stdin = this.#child.stdin;
|
|
34846
|
+
const stdout = this.#child.stdout;
|
|
34847
|
+
const stderr = this.#child.stderr;
|
|
34848
|
+
if (stdin === null || stdout === null || stderr === null) {
|
|
34849
|
+
this.#child.kill("SIGKILL");
|
|
34850
|
+
throw new CodexAppServerError("codex_app_server_unavailable", "The Codex app-server is unavailable");
|
|
34851
|
+
}
|
|
34852
|
+
stdout.setEncoding("utf8");
|
|
34853
|
+
stdout.on("data", (chunk) => {
|
|
34854
|
+
this.#consume(chunk);
|
|
34855
|
+
});
|
|
34856
|
+
stderr.setEncoding("utf8");
|
|
34857
|
+
stderr.on("data", (chunk) => {
|
|
34858
|
+
process.stderr.write(`[codex-app-server] ${chunk}`);
|
|
34859
|
+
});
|
|
34860
|
+
this.#processExit = new Promise((resolve8) => {
|
|
34861
|
+
this.#child.once("error", resolve8);
|
|
34862
|
+
this.#child.once("exit", resolve8);
|
|
34863
|
+
});
|
|
34864
|
+
}
|
|
34865
|
+
child = () => this.#child;
|
|
34866
|
+
#fail = (error62) => {
|
|
34867
|
+
this.#failure ??= error62;
|
|
34868
|
+
for (const [id, pending] of this.#pending) {
|
|
34869
|
+
this.#pending.delete(id);
|
|
34870
|
+
pending.completion.reject(error62);
|
|
34871
|
+
}
|
|
34872
|
+
};
|
|
34873
|
+
#exitedFailure = (method) => this.#failure ?? new CodexAppServerError("codex_app_server_exited", `The Codex app-server stopped during ${method}`);
|
|
34874
|
+
#consume = (chunk) => {
|
|
34875
|
+
try {
|
|
34876
|
+
this.#receivedBytes += Buffer.byteLength(chunk);
|
|
34877
|
+
if (this.#receivedBytes > OUTPUT_LIMIT_BYTES) {
|
|
34878
|
+
throw new CodexAppServerError(
|
|
34879
|
+
"codex_app_server_output_limit",
|
|
34880
|
+
"The Codex app-server produced too much output"
|
|
34881
|
+
);
|
|
34882
|
+
}
|
|
34883
|
+
this.#pendingBuffer += chunk;
|
|
34884
|
+
let newline = this.#pendingBuffer.indexOf("\n");
|
|
34885
|
+
while (newline >= 0) {
|
|
34886
|
+
const line = this.#pendingBuffer.slice(0, newline);
|
|
34887
|
+
this.#pendingBuffer = this.#pendingBuffer.slice(newline + 1);
|
|
34888
|
+
newline = this.#pendingBuffer.indexOf("\n");
|
|
34889
|
+
if (line.trim().length === 0) {
|
|
34890
|
+
continue;
|
|
34891
|
+
}
|
|
34892
|
+
const value = JSON.parse(line);
|
|
34893
|
+
this.#dispatch(decodeAppServerMessage(value));
|
|
34894
|
+
}
|
|
34895
|
+
} catch (error62) {
|
|
34896
|
+
this.#fail(
|
|
34897
|
+
error62 instanceof CodexAppServerError ? error62 : new CodexAppServerError(
|
|
34898
|
+
"codex_app_server_protocol_error",
|
|
34899
|
+
"The Codex app-server sent an unreadable message",
|
|
34900
|
+
{ cause: error62 }
|
|
34901
|
+
)
|
|
34902
|
+
);
|
|
34903
|
+
this.#child.kill("SIGKILL");
|
|
34904
|
+
}
|
|
34905
|
+
};
|
|
34906
|
+
// Handler failures are recorded as the app-server's terminal failure: an ACP client that cannot
|
|
34907
|
+
// accept an update or answer an approval has no way to resume the conversation.
|
|
34908
|
+
#runHandler = (operation) => {
|
|
34909
|
+
void operation.catch((error62) => {
|
|
34910
|
+
this.#fail(
|
|
34911
|
+
error62 instanceof CodexAppServerError ? error62 : new CodexAppServerError(
|
|
34912
|
+
"codex_app_server_client_error",
|
|
34913
|
+
"Mobius could not process a Codex app-server message",
|
|
34914
|
+
{ cause: error62 }
|
|
34915
|
+
)
|
|
34916
|
+
);
|
|
34917
|
+
});
|
|
34918
|
+
};
|
|
34919
|
+
#dispatch = (message) => {
|
|
34920
|
+
if (message.kind === "result-response") {
|
|
34921
|
+
const pending = this.#pending.get(message.id);
|
|
34922
|
+
if (pending === void 0) {
|
|
34923
|
+
return;
|
|
34924
|
+
}
|
|
34925
|
+
this.#pending.delete(message.id);
|
|
34926
|
+
pending.completion.resolve(message.result);
|
|
34927
|
+
return;
|
|
34928
|
+
}
|
|
34929
|
+
if (message.kind === "error-response") {
|
|
34930
|
+
const pending = this.#pending.get(message.id);
|
|
34931
|
+
if (pending === void 0) {
|
|
34932
|
+
return;
|
|
34933
|
+
}
|
|
34934
|
+
this.#pending.delete(message.id);
|
|
34935
|
+
pending.completion.reject(
|
|
34936
|
+
new CodexAppServerError("codex_app_server_request_failed", message.message, {
|
|
34937
|
+
cause: { code: message.code }
|
|
34938
|
+
})
|
|
34939
|
+
);
|
|
34940
|
+
return;
|
|
34941
|
+
}
|
|
34942
|
+
if (message.kind === "server-request") {
|
|
34943
|
+
this.#runHandler(
|
|
34944
|
+
this.#handlers.onServerRequest({ id: message.id, method: message.method, params: message.params })
|
|
34945
|
+
);
|
|
34946
|
+
return;
|
|
34947
|
+
}
|
|
34948
|
+
this.#runHandler(this.#handlers.onNotification(message.method, message.params));
|
|
34949
|
+
};
|
|
34950
|
+
/** Sends a request and waits for its response, bounded by the caller's cancellation signal. */
|
|
34951
|
+
request = async (method, params, signal) => {
|
|
34952
|
+
signal.throwIfAborted();
|
|
34953
|
+
if (this.#closed) {
|
|
34954
|
+
throw new CodexAppServerError("codex_app_server_closed", "The Codex app-server is closed");
|
|
34955
|
+
}
|
|
34956
|
+
const id = this.#nextRequestId;
|
|
34957
|
+
this.#nextRequestId += 1;
|
|
34958
|
+
const completion = Promise.withResolvers();
|
|
34959
|
+
this.#pending.set(id, { completion });
|
|
34960
|
+
const abort = () => {
|
|
34961
|
+
if (this.#pending.delete(id)) {
|
|
34962
|
+
completion.reject(signal.reason ?? new Error("Codex app-server request was cancelled"));
|
|
34963
|
+
}
|
|
34964
|
+
};
|
|
34965
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
34966
|
+
try {
|
|
34967
|
+
this.#write({ id, method, params });
|
|
34968
|
+
return await Promise.race([completion.promise, this.#processExit.then(() => this.#exitedFailure(method))]);
|
|
34969
|
+
} finally {
|
|
34970
|
+
signal.removeEventListener("abort", abort);
|
|
34971
|
+
this.#pending.delete(id);
|
|
34972
|
+
}
|
|
34973
|
+
};
|
|
34974
|
+
notify = (method, params) => {
|
|
34975
|
+
this.#write({ method, params });
|
|
34976
|
+
};
|
|
34977
|
+
respond = (id, result) => {
|
|
34978
|
+
this.#write({ id, result });
|
|
34979
|
+
};
|
|
34980
|
+
respondWithError = (id, code, message) => {
|
|
34981
|
+
this.#write({ error: { code, message }, id });
|
|
34982
|
+
};
|
|
34983
|
+
#write = (message) => {
|
|
34984
|
+
if (this.#closed) {
|
|
34985
|
+
return;
|
|
34986
|
+
}
|
|
34987
|
+
const stdin = this.#child.stdin;
|
|
34988
|
+
if (stdin === null || stdin.destroyed) {
|
|
34989
|
+
throw new CodexAppServerError("codex_app_server_closed", "The Codex app-server input is closed");
|
|
34990
|
+
}
|
|
34991
|
+
stdin.write(`${JSON.stringify(message)}
|
|
34992
|
+
`);
|
|
34993
|
+
};
|
|
34994
|
+
/** Performs the `initialize` / `initialized` handshake. */
|
|
34995
|
+
initialize = async (signal) => {
|
|
34996
|
+
await this.request(
|
|
34997
|
+
"initialize",
|
|
34998
|
+
{ clientInfo: { name: "mobius", version: "1.0.0" } },
|
|
34999
|
+
AbortSignal.any([signal, AbortSignal.timeout(INITIALIZE_TIMEOUT_MILLISECONDS)])
|
|
35000
|
+
);
|
|
35001
|
+
this.notify("initialized", void 0);
|
|
35002
|
+
};
|
|
35003
|
+
/**
|
|
35004
|
+
* Rejects every in-flight request and marks the conversation closed without waiting on the
|
|
35005
|
+
* process. Process teardown stays with the caller, which owns the process tree: it stops the
|
|
35006
|
+
* app-server and every tool subprocess it started.
|
|
35007
|
+
*/
|
|
35008
|
+
detach = () => {
|
|
35009
|
+
if (this.#closed) {
|
|
35010
|
+
return;
|
|
35011
|
+
}
|
|
35012
|
+
this.#closed = true;
|
|
35013
|
+
this.#fail(new CodexAppServerError("codex_app_server_closed", "The Codex app-server is closed"));
|
|
35014
|
+
const stdin = this.#child.stdin;
|
|
35015
|
+
if (stdin !== null && !stdin.destroyed) {
|
|
35016
|
+
stdin.end();
|
|
35017
|
+
}
|
|
35018
|
+
};
|
|
35019
|
+
};
|
|
35020
|
+
|
|
35021
|
+
// src/acp/codex/items.ts
|
|
35022
|
+
var TOOL_OUTPUT_CHARACTER_LIMIT = 32768;
|
|
35023
|
+
var TITLE_CHARACTER_LIMIT = 500;
|
|
35024
|
+
var CODEX_META_KEY = "codex";
|
|
35025
|
+
function truncate4(value, limit) {
|
|
35026
|
+
return value.length <= limit ? value : value.slice(0, limit);
|
|
35027
|
+
}
|
|
35028
|
+
function textContent(text3) {
|
|
35029
|
+
const block = { text: truncate4(text3, TOOL_OUTPUT_CHARACTER_LIMIT), type: "text" };
|
|
35030
|
+
return { content: block, type: "content" };
|
|
35031
|
+
}
|
|
35032
|
+
function firstLine(value) {
|
|
35033
|
+
const line = value.split("\n", 1)[0] ?? "";
|
|
35034
|
+
return line.trim().length > 0 ? line.trim() : value.trim();
|
|
35035
|
+
}
|
|
35036
|
+
function commandStatus(status) {
|
|
35037
|
+
if (status === "inProgress") {
|
|
35038
|
+
return "in_progress";
|
|
35039
|
+
}
|
|
35040
|
+
return status === "completed" ? "completed" : "failed";
|
|
35041
|
+
}
|
|
35042
|
+
function patchStatus(status) {
|
|
35043
|
+
if (status === "inProgress") {
|
|
35044
|
+
return "in_progress";
|
|
35045
|
+
}
|
|
35046
|
+
return status === "completed" ? "completed" : "failed";
|
|
35047
|
+
}
|
|
35048
|
+
function mcpStatus(status) {
|
|
35049
|
+
return status === "inProgress" ? "in_progress" : status === "completed" ? "completed" : "failed";
|
|
35050
|
+
}
|
|
35051
|
+
function presentToolItem(item) {
|
|
35052
|
+
if (item.type === "commandExecution") {
|
|
35053
|
+
const output2 = item.aggregatedOutput ?? "";
|
|
35054
|
+
const content3 = [];
|
|
35055
|
+
if (output2.length > 0) {
|
|
35056
|
+
content3.push(textContent(output2));
|
|
35057
|
+
}
|
|
35058
|
+
if (item.exitCode != null && item.exitCode !== 0) {
|
|
35059
|
+
content3.push(textContent(`Exit code ${item.exitCode}`));
|
|
35060
|
+
}
|
|
35061
|
+
return {
|
|
35062
|
+
content: content3,
|
|
35063
|
+
kind: "execute",
|
|
35064
|
+
locations: [],
|
|
35065
|
+
rawInput: { command: item.command, cwd: item.cwd },
|
|
35066
|
+
rawOutput: { exitCode: item.exitCode, output: truncate4(output2, TOOL_OUTPUT_CHARACTER_LIMIT) },
|
|
35067
|
+
status: commandStatus(item.status),
|
|
35068
|
+
title: truncate4(firstLine(item.command), TITLE_CHARACTER_LIMIT)
|
|
35069
|
+
};
|
|
35070
|
+
}
|
|
35071
|
+
if (item.type === "fileChange") {
|
|
35072
|
+
const paths = item.changes.map((change) => change.path);
|
|
35073
|
+
const content3 = item.changes.map((change) => ({
|
|
35074
|
+
newText: truncate4(change.diff, TOOL_OUTPUT_CHARACTER_LIMIT),
|
|
35075
|
+
path: change.path,
|
|
35076
|
+
type: "diff"
|
|
35077
|
+
}));
|
|
35078
|
+
return {
|
|
35079
|
+
content: content3,
|
|
35080
|
+
kind: "edit",
|
|
35081
|
+
locations: paths.map((path2) => ({ path: path2 })),
|
|
35082
|
+
rawInput: { changes: item.changes.map((change) => change.path) },
|
|
35083
|
+
rawOutput: null,
|
|
35084
|
+
status: patchStatus(item.status),
|
|
35085
|
+
title: truncate4(paths.join(", "), TITLE_CHARACTER_LIMIT)
|
|
35086
|
+
};
|
|
35087
|
+
}
|
|
35088
|
+
if (item.type === "mcpToolCall") {
|
|
35089
|
+
const label = `${item.server}/${item.tool}`;
|
|
35090
|
+
const content3 = [];
|
|
35091
|
+
if (item.result != null) {
|
|
35092
|
+
content3.push(textContent(JSON.stringify(item.result)));
|
|
35093
|
+
}
|
|
35094
|
+
if (item.error != null) {
|
|
35095
|
+
content3.push(textContent(JSON.stringify(item.error)));
|
|
35096
|
+
}
|
|
35097
|
+
return {
|
|
35098
|
+
content: content3,
|
|
35099
|
+
kind: "other",
|
|
35100
|
+
locations: [],
|
|
35101
|
+
rawInput: item.arguments ?? null,
|
|
35102
|
+
rawOutput: item.error ?? item.result ?? null,
|
|
35103
|
+
status: mcpStatus(item.status),
|
|
35104
|
+
title: truncate4(label, TITLE_CHARACTER_LIMIT)
|
|
35105
|
+
};
|
|
35106
|
+
}
|
|
35107
|
+
if (item.type === "dynamicToolCall") {
|
|
35108
|
+
const label = item.namespace == null ? item.tool : `${item.namespace}/${item.tool}`;
|
|
35109
|
+
const content3 = (item.contentItems ?? []).map((entry) => textContent(JSON.stringify(entry)));
|
|
35110
|
+
return {
|
|
35111
|
+
content: content3,
|
|
35112
|
+
kind: "other",
|
|
35113
|
+
locations: [],
|
|
35114
|
+
rawInput: item.arguments ?? null,
|
|
35115
|
+
rawOutput: item.success === true ? null : item.contentItems ?? null,
|
|
35116
|
+
status: mcpStatus(item.status),
|
|
35117
|
+
title: truncate4(label, TITLE_CHARACTER_LIMIT)
|
|
35118
|
+
};
|
|
35119
|
+
}
|
|
35120
|
+
return null;
|
|
35121
|
+
}
|
|
35122
|
+
function toolCallUpdate(item) {
|
|
35123
|
+
const presentation = presentToolItem(item);
|
|
35124
|
+
if (presentation === null) {
|
|
35125
|
+
return null;
|
|
35126
|
+
}
|
|
35127
|
+
return {
|
|
35128
|
+
content: [...presentation.content],
|
|
35129
|
+
kind: presentation.kind,
|
|
35130
|
+
locations: [...presentation.locations],
|
|
35131
|
+
rawInput: presentation.rawInput,
|
|
35132
|
+
rawOutput: presentation.rawOutput,
|
|
35133
|
+
status: presentation.status,
|
|
35134
|
+
title: presentation.title,
|
|
35135
|
+
toolCallId: item.id
|
|
35136
|
+
};
|
|
35137
|
+
}
|
|
35138
|
+
function decodeThreadItem(value) {
|
|
35139
|
+
const decoded = threadItemSchema.safeParse(value);
|
|
35140
|
+
return decoded.success ? decoded.data : null;
|
|
35141
|
+
}
|
|
35142
|
+
function agentMessageMeta(phase) {
|
|
35143
|
+
if (phase == null) {
|
|
35144
|
+
return null;
|
|
35145
|
+
}
|
|
35146
|
+
return { [CODEX_META_KEY]: { phase } };
|
|
35147
|
+
}
|
|
35148
|
+
|
|
35149
|
+
// src/acp/codex/agent.ts
|
|
35150
|
+
var APPROVAL_REASON_CHARACTER_LIMIT = 500;
|
|
35151
|
+
var APPROVAL_TIMEOUT_MILLISECONDS = 36e5;
|
|
35152
|
+
var CODEX_AGENT_VERSION = "0.154.0";
|
|
35153
|
+
var APPROVAL_OPTIONS = Object.freeze([
|
|
35154
|
+
{ kind: "allow_once", name: "Allow once", optionId: "accept" },
|
|
35155
|
+
{ kind: "allow_always", name: "Allow for this session", optionId: "acceptForSession" },
|
|
35156
|
+
{ kind: "reject_once", name: "Deny", optionId: "decline" }
|
|
35157
|
+
]);
|
|
35158
|
+
function permissionDecision(optionId) {
|
|
35159
|
+
if (optionId === "accept" || optionId === "acceptForSession" || optionId === "decline") {
|
|
35160
|
+
return optionId;
|
|
35161
|
+
}
|
|
35162
|
+
return "cancel";
|
|
35163
|
+
}
|
|
35164
|
+
function promptInput(prompt) {
|
|
35165
|
+
const input2 = [];
|
|
35166
|
+
for (const block of prompt) {
|
|
35167
|
+
if (block.type === "text") {
|
|
35168
|
+
input2.push({ text: block.text, text_elements: [], type: "text" });
|
|
35169
|
+
continue;
|
|
35170
|
+
}
|
|
35171
|
+
if (block.type === "image") {
|
|
35172
|
+
input2.push({ type: "image", url: `data:${block.mimeType};base64,${block.data}` });
|
|
35173
|
+
continue;
|
|
35174
|
+
}
|
|
35175
|
+
if (block.type === "resource") {
|
|
35176
|
+
const resource = block.resource;
|
|
35177
|
+
input2.push({
|
|
35178
|
+
text: "text" in resource ? resource.text ?? "" : "",
|
|
35179
|
+
text_elements: [],
|
|
35180
|
+
type: "text"
|
|
35181
|
+
});
|
|
35182
|
+
continue;
|
|
35183
|
+
}
|
|
35184
|
+
if (block.type === "resource_link") {
|
|
35185
|
+
input2.push({ text: `Resource: ${block.uri}`, text_elements: [], type: "text" });
|
|
35186
|
+
}
|
|
35187
|
+
}
|
|
35188
|
+
return input2;
|
|
35189
|
+
}
|
|
35190
|
+
function userInputSchema(questions) {
|
|
35191
|
+
const properties = {};
|
|
35192
|
+
const required2 = [];
|
|
35193
|
+
for (const question of questions) {
|
|
35194
|
+
required2.push(question.id);
|
|
35195
|
+
properties[question.id] = {
|
|
35196
|
+
description: question.question,
|
|
35197
|
+
title: question.header,
|
|
35198
|
+
type: "string",
|
|
35199
|
+
...question.options == null || question.options.length === 0 ? {} : {
|
|
35200
|
+
oneOf: question.options.map((option) => ({
|
|
35201
|
+
const: option.label,
|
|
35202
|
+
description: option.description,
|
|
35203
|
+
title: option.label
|
|
35204
|
+
}))
|
|
35205
|
+
}
|
|
35206
|
+
};
|
|
35207
|
+
}
|
|
35208
|
+
return { properties, required: required2, type: "object" };
|
|
35209
|
+
}
|
|
35210
|
+
var CodexAcpAgent = class {
|
|
35211
|
+
#app;
|
|
35212
|
+
#appServer;
|
|
35213
|
+
#connection = null;
|
|
35214
|
+
#nativeSessionId = "";
|
|
35215
|
+
#turn = null;
|
|
35216
|
+
#updateTail = Promise.resolve();
|
|
35217
|
+
constructor(options) {
|
|
35218
|
+
this.#appServer = new CodexAppServerClient({
|
|
35219
|
+
command: options.command,
|
|
35220
|
+
cwd: options.cwd,
|
|
35221
|
+
environment: options.environment,
|
|
35222
|
+
handlers: {
|
|
35223
|
+
onNotification: async (method, params) => {
|
|
35224
|
+
await this.#onNotification(method, params);
|
|
35225
|
+
},
|
|
35226
|
+
onServerRequest: async (request) => {
|
|
35227
|
+
await this.#onServerRequest(request);
|
|
35228
|
+
}
|
|
35229
|
+
}
|
|
35230
|
+
});
|
|
35231
|
+
this.#app = createAgentApp({ name: "mobius-codex" }).onConnect((connection) => {
|
|
35232
|
+
this.#connection = connection;
|
|
35233
|
+
}).onRequest(methods4.agent.initialize, async () => ({
|
|
35234
|
+
agentCapabilities: {
|
|
35235
|
+
loadSession: false,
|
|
35236
|
+
promptCapabilities: { embeddedContext: true, image: true },
|
|
35237
|
+
sessionCapabilities: { close: {} }
|
|
35238
|
+
},
|
|
35239
|
+
agentInfo: { name: "Codex", version: CODEX_AGENT_VERSION },
|
|
35240
|
+
authMethods: [],
|
|
35241
|
+
protocolVersion: PROTOCOL_VERSION2
|
|
35242
|
+
})).onRequest(methods4.agent.session.new, async (context) => {
|
|
35243
|
+
const created = threadStartResponseSchema.parse(
|
|
35244
|
+
await this.#appServer.request(
|
|
35245
|
+
"thread/start",
|
|
35246
|
+
{ cwd: context.params.cwd },
|
|
35247
|
+
AbortSignal.any([context.signal, AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS)])
|
|
35248
|
+
)
|
|
35249
|
+
);
|
|
35250
|
+
this.#nativeSessionId = created.thread.id;
|
|
35251
|
+
return { sessionId: created.thread.id };
|
|
35252
|
+
}).onRequest(methods4.agent.session.prompt, async (context) => {
|
|
35253
|
+
return await this.#runTurn(promptInput(context.params.prompt), context.signal);
|
|
35254
|
+
}).onRequest(methods4.agent.session.close, async () => {
|
|
35255
|
+
await this.#interruptTurn();
|
|
35256
|
+
}).onNotification(methods4.agent.session.cancel, async () => {
|
|
35257
|
+
await this.#interruptTurn();
|
|
35258
|
+
});
|
|
35259
|
+
}
|
|
35260
|
+
/** The ACP agent app Mobius connects its own ACP client to, in-process. */
|
|
35261
|
+
app = () => this.#app;
|
|
35262
|
+
/** Starts the app-server and performs its handshake. */
|
|
35263
|
+
initialize = async (signal) => {
|
|
35264
|
+
await this.#appServer.initialize(signal);
|
|
35265
|
+
};
|
|
35266
|
+
/**
|
|
35267
|
+
* Releases the app-server and every process it started. Mirrors the adapter path's teardown so a
|
|
35268
|
+
* cancelled or closed session cannot leak the tool subprocesses running under the app-server.
|
|
35269
|
+
*/
|
|
35270
|
+
close = async () => {
|
|
35271
|
+
const child = this.#appServer.child();
|
|
35272
|
+
const captured = await captureProcessTree(child);
|
|
35273
|
+
this.#appServer.detach();
|
|
35274
|
+
await stopProcessTree(child, captured);
|
|
35275
|
+
};
|
|
35276
|
+
#emit = async (update) => {
|
|
35277
|
+
const connection = this.#connection;
|
|
35278
|
+
if (connection === null || this.#nativeSessionId.length === 0) {
|
|
35279
|
+
return;
|
|
35280
|
+
}
|
|
35281
|
+
await connection.client.notify(methods4.client.session.update, {
|
|
35282
|
+
sessionId: this.#nativeSessionId,
|
|
35283
|
+
update
|
|
35284
|
+
});
|
|
35285
|
+
};
|
|
35286
|
+
// Notifications are serialized so two app-server items cannot interleave into one ACP update
|
|
35287
|
+
// stream, and the caller awaits the result: `turn/completed` must not resolve the prompt before
|
|
35288
|
+
// the updates it precedes have reached the client.
|
|
35289
|
+
#enqueue = async (operation) => {
|
|
35290
|
+
const pending = this.#updateTail.then(operation, operation);
|
|
35291
|
+
this.#updateTail = pending;
|
|
35292
|
+
await pending;
|
|
35293
|
+
};
|
|
35294
|
+
#onNotification = async (method, params) => {
|
|
35295
|
+
if (method === "turn/started") {
|
|
35296
|
+
const decoded = turnNotificationSchema.safeParse(params);
|
|
35297
|
+
if (decoded.success && decoded.data.threadId === this.#nativeSessionId && this.#turn !== null) {
|
|
35298
|
+
this.#turn = { completion: this.#turn.completion, turn: { id: decoded.data.turn.id } };
|
|
35299
|
+
}
|
|
35300
|
+
return;
|
|
35301
|
+
}
|
|
35302
|
+
if (method === "turn/completed") {
|
|
35303
|
+
const decoded = turnNotificationSchema.safeParse(params);
|
|
35304
|
+
if (decoded.success && decoded.data.threadId === this.#nativeSessionId) {
|
|
35305
|
+
await this.#completeTurn(decoded.data.turn);
|
|
35306
|
+
}
|
|
35307
|
+
return;
|
|
35308
|
+
}
|
|
35309
|
+
if (method === "thread/name/updated") {
|
|
35310
|
+
const threadName = params.threadName;
|
|
35311
|
+
if (typeof threadName === "string" && threadName.length > 0) {
|
|
35312
|
+
await this.#enqueue(async () => {
|
|
35313
|
+
await this.#emit({ sessionUpdate: "session_info_update", title: threadName });
|
|
35314
|
+
});
|
|
35315
|
+
}
|
|
35316
|
+
return;
|
|
35317
|
+
}
|
|
35318
|
+
if (method === "turn/plan/updated") {
|
|
35319
|
+
const plan = params.plan;
|
|
35320
|
+
if (Array.isArray(plan) && params.threadId === this.#nativeSessionId) {
|
|
35321
|
+
const entries = plan.map((step) => ({
|
|
35322
|
+
content: typeof step === "object" && step !== null && "step" in step ? String(Reflect.get(step, "step")) : "",
|
|
35323
|
+
priority: "medium",
|
|
35324
|
+
status: "in_progress"
|
|
35325
|
+
}));
|
|
35326
|
+
await this.#enqueue(async () => {
|
|
35327
|
+
await this.#emit({ entries, sessionUpdate: "plan" });
|
|
35328
|
+
});
|
|
35329
|
+
}
|
|
35330
|
+
return;
|
|
35331
|
+
}
|
|
35332
|
+
if (method !== "item/started" && method !== "item/completed") {
|
|
35333
|
+
return;
|
|
35334
|
+
}
|
|
35335
|
+
const item = decodeThreadItem(params.item);
|
|
35336
|
+
if (item === null) {
|
|
35337
|
+
return;
|
|
35338
|
+
}
|
|
35339
|
+
if (item.type === "agentMessage") {
|
|
35340
|
+
if (method === "item/started") {
|
|
35341
|
+
return;
|
|
35342
|
+
}
|
|
35343
|
+
await this.#enqueue(async () => {
|
|
35344
|
+
await this.#emit({
|
|
35345
|
+
_meta: agentMessageMeta(item.phase),
|
|
35346
|
+
content: { text: item.text, type: "text" },
|
|
35347
|
+
messageId: item.id,
|
|
35348
|
+
sessionUpdate: "agent_message_chunk"
|
|
35349
|
+
});
|
|
35350
|
+
});
|
|
35351
|
+
return;
|
|
35352
|
+
}
|
|
35353
|
+
const update = toolCallUpdate(item);
|
|
35354
|
+
if (update !== null) {
|
|
35355
|
+
await this.#enqueue(async () => {
|
|
35356
|
+
await this.#emit({ ...update, sessionUpdate: "tool_call_update" });
|
|
35357
|
+
});
|
|
35358
|
+
}
|
|
35359
|
+
};
|
|
35360
|
+
#onServerRequest = async (request) => {
|
|
35361
|
+
if (request.method === "item/commandExecution/requestApproval" || request.method === "item/fileChange/requestApproval") {
|
|
35362
|
+
await this.#requestApproval(request);
|
|
35363
|
+
return;
|
|
35364
|
+
}
|
|
35365
|
+
if (request.method === "item/tool/requestUserInput") {
|
|
35366
|
+
await this.#requestUserInput(request);
|
|
35367
|
+
return;
|
|
35368
|
+
}
|
|
35369
|
+
if (request.method === "mcpServer/elicitation/request") {
|
|
35370
|
+
await this.#requestMcpElicitation(request);
|
|
35371
|
+
return;
|
|
35372
|
+
}
|
|
35373
|
+
this.#appServer.respondWithError(request.id, -32601, `Mobius does not support ${request.method}`);
|
|
35374
|
+
};
|
|
35375
|
+
#askPermission = async (title2, toolCallId, signal) => {
|
|
35376
|
+
const connection = this.#connection;
|
|
35377
|
+
if (connection === null) {
|
|
35378
|
+
return "cancel";
|
|
35379
|
+
}
|
|
35380
|
+
const response = await connection.client.request(
|
|
35381
|
+
methods4.client.session.requestPermission,
|
|
35382
|
+
{
|
|
35383
|
+
options: [...APPROVAL_OPTIONS],
|
|
35384
|
+
sessionId: this.#nativeSessionId,
|
|
35385
|
+
toolCall: { title: title2, toolCallId }
|
|
35386
|
+
},
|
|
35387
|
+
{ cancellationSignal: signal }
|
|
35388
|
+
);
|
|
35389
|
+
return response.outcome.outcome === "selected" ? permissionDecision(response.outcome.optionId) : "cancel";
|
|
35390
|
+
};
|
|
35391
|
+
#requestApproval = async (request) => {
|
|
35392
|
+
const decoded = request.method === "item/commandExecution/requestApproval" ? commandApprovalParamsSchema.safeParse(request.params) : fileChangeApprovalParamsSchema.safeParse(request.params);
|
|
35393
|
+
if (!decoded.success) {
|
|
35394
|
+
this.#appServer.respondWithError(request.id, -32602, "Mobius could not read the approval request");
|
|
35395
|
+
return;
|
|
35396
|
+
}
|
|
35397
|
+
const params = decoded.data;
|
|
35398
|
+
const command = "command" in params ? params.command : void 0;
|
|
35399
|
+
const title2 = (command ?? params.reason ?? "Approve a local change").slice(0, APPROVAL_REASON_CHARACTER_LIMIT);
|
|
35400
|
+
const turn = this.#turn;
|
|
35401
|
+
const decision = await this.#askPermission(
|
|
35402
|
+
title2,
|
|
35403
|
+
params.itemId,
|
|
35404
|
+
AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS)
|
|
35405
|
+
);
|
|
35406
|
+
void turn;
|
|
35407
|
+
this.#appServer.respond(request.id, { decision });
|
|
35408
|
+
};
|
|
35409
|
+
#requestUserInput = async (request) => {
|
|
35410
|
+
const decoded = requestUserInputParamsSchema.safeParse(request.params);
|
|
35411
|
+
const connection = this.#connection;
|
|
35412
|
+
if (!decoded.success || connection === null) {
|
|
35413
|
+
this.#appServer.respond(request.id, { answers: {} });
|
|
35414
|
+
return;
|
|
35415
|
+
}
|
|
35416
|
+
const questions = decoded.data.questions;
|
|
35417
|
+
const response = await connection.client.request(
|
|
35418
|
+
methods4.client.elicitation.create,
|
|
35419
|
+
{
|
|
35420
|
+
message: questions.map((question) => question.question).join("\n\n").slice(0, 2e3),
|
|
35421
|
+
mode: "form",
|
|
35422
|
+
requestedSchema: userInputSchema(questions),
|
|
35423
|
+
sessionId: this.#nativeSessionId,
|
|
35424
|
+
...decoded.data.itemId == null ? {} : { toolCallId: decoded.data.itemId }
|
|
35425
|
+
},
|
|
35426
|
+
{ cancellationSignal: AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS) }
|
|
35427
|
+
);
|
|
35428
|
+
const content3 = response.action === "accept" ? Reflect.get(response, "content") : void 0;
|
|
35429
|
+
const answers = {};
|
|
35430
|
+
for (const question of questions) {
|
|
35431
|
+
const value = typeof content3 === "object" && content3 !== null ? Reflect.get(content3, question.id) : void 0;
|
|
35432
|
+
answers[question.id] = { answers: typeof value === "string" && value.length > 0 ? [value] : [] };
|
|
35433
|
+
}
|
|
35434
|
+
this.#appServer.respond(request.id, { answers });
|
|
35435
|
+
};
|
|
35436
|
+
#requestMcpElicitation = async (request) => {
|
|
35437
|
+
const decoded = mcpElicitationParamsSchema.safeParse(request.params);
|
|
35438
|
+
const connection = this.#connection;
|
|
35439
|
+
if (!decoded.success || connection === null) {
|
|
35440
|
+
this.#appServer.respondWithError(request.id, -32602, "Mobius could not read the elicitation request");
|
|
35441
|
+
return;
|
|
35442
|
+
}
|
|
35443
|
+
const params = decoded.data;
|
|
35444
|
+
const signal = AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS);
|
|
35445
|
+
if (params.mode === "url" && params.url !== void 0) {
|
|
35446
|
+
const response2 = await connection.client.request(
|
|
35447
|
+
methods4.client.elicitation.create,
|
|
35448
|
+
{
|
|
35449
|
+
elicitationId: `${this.#nativeSessionId}-${String(request.id)}`,
|
|
35450
|
+
message: params.message,
|
|
35451
|
+
mode: "url",
|
|
35452
|
+
sessionId: this.#nativeSessionId,
|
|
35453
|
+
url: params.url
|
|
35454
|
+
},
|
|
35455
|
+
{ cancellationSignal: signal }
|
|
35456
|
+
);
|
|
35457
|
+
this.#appServer.respond(request.id, { action: response2.action });
|
|
35458
|
+
return;
|
|
35459
|
+
}
|
|
35460
|
+
const response = await connection.client.request(
|
|
35461
|
+
methods4.client.elicitation.create,
|
|
35462
|
+
{
|
|
35463
|
+
message: params.message,
|
|
35464
|
+
mode: "form",
|
|
35465
|
+
requestedSchema: params.requestedSchema ?? { properties: {}, required: [], type: "object" },
|
|
35466
|
+
sessionId: this.#nativeSessionId
|
|
35467
|
+
},
|
|
35468
|
+
{ cancellationSignal: signal }
|
|
35469
|
+
);
|
|
35470
|
+
const content3 = response.action === "accept" ? Reflect.get(response, "content") ?? null : null;
|
|
35471
|
+
this.#appServer.respond(request.id, { action: response.action, content: content3 });
|
|
35472
|
+
};
|
|
35473
|
+
#runTurn = async (input2, signal) => {
|
|
35474
|
+
if (this.#turn !== null) {
|
|
35475
|
+
throw new AcpExecutionError("Another prompt is already running in this conversation", {}, "session_busy");
|
|
35476
|
+
}
|
|
35477
|
+
const completion = Promise.withResolvers();
|
|
35478
|
+
const turn = { completion, turn: { id: "" } };
|
|
35479
|
+
this.#turn = turn;
|
|
35480
|
+
try {
|
|
35481
|
+
const started = turnSchema.parse(
|
|
35482
|
+
(await this.#appServer.request(
|
|
35483
|
+
"turn/start",
|
|
35484
|
+
{ input: input2, threadId: this.#nativeSessionId },
|
|
35485
|
+
signal
|
|
35486
|
+
)).turn
|
|
35487
|
+
);
|
|
35488
|
+
if (this.#turn === turn) {
|
|
35489
|
+
turn.turn.id = started.id;
|
|
35490
|
+
}
|
|
35491
|
+
return await completion.promise;
|
|
35492
|
+
} finally {
|
|
35493
|
+
if (this.#turn === turn) {
|
|
35494
|
+
this.#turn = null;
|
|
35495
|
+
}
|
|
35496
|
+
}
|
|
35497
|
+
};
|
|
35498
|
+
#interruptTurn = async () => {
|
|
35499
|
+
const turn = this.#turn;
|
|
35500
|
+
if (turn === null) {
|
|
35501
|
+
return;
|
|
35502
|
+
}
|
|
35503
|
+
this.#turn = null;
|
|
35504
|
+
if (turn.turn.id.length > 0) {
|
|
35505
|
+
try {
|
|
35506
|
+
await this.#appServer.request(
|
|
35507
|
+
"turn/interrupt",
|
|
35508
|
+
{ threadId: this.#nativeSessionId, turnId: turn.turn.id },
|
|
35509
|
+
AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS)
|
|
35510
|
+
);
|
|
35511
|
+
} catch {
|
|
35512
|
+
}
|
|
35513
|
+
}
|
|
35514
|
+
turn.completion.resolve({ stopReason: "cancelled" });
|
|
35515
|
+
};
|
|
35516
|
+
#completeTurn = async (turn) => {
|
|
35517
|
+
const active = this.#turn;
|
|
35518
|
+
if (active === null) {
|
|
35519
|
+
return;
|
|
35520
|
+
}
|
|
35521
|
+
this.#turn = null;
|
|
35522
|
+
await this.#updateTail;
|
|
35523
|
+
if (turn.status === "failed") {
|
|
35524
|
+
active.completion.reject(
|
|
35525
|
+
new AcpExecutionError(turn.error?.message ?? "The Codex turn failed", {}, "codex_turn_failed")
|
|
35526
|
+
);
|
|
35527
|
+
return;
|
|
35528
|
+
}
|
|
35529
|
+
active.completion.resolve({ stopReason: turn.status === "interrupted" ? "cancelled" : "end_turn" });
|
|
35530
|
+
};
|
|
35531
|
+
};
|
|
35532
|
+
|
|
34574
35533
|
// src/agent-catalog/agents/codex-agent.ts
|
|
34575
|
-
var CodexAgentSpecification = class extends
|
|
35534
|
+
var CodexAgentSpecification = class extends InProcessAcpAgentDefinition2 {
|
|
34576
35535
|
versionProbeTimeoutMilliseconds = 1e4;
|
|
34577
|
-
adapterEnvironmentVariable = "CODEX_PATH";
|
|
34578
|
-
adapterOverrideVariable = "MOBIUS_CODEX_ACP_PATH";
|
|
34579
|
-
adapterPackageDefinition = new ManagedNpmPackageDefinition(
|
|
34580
|
-
"@agentclientprotocol/codex-acp",
|
|
34581
|
-
"1.8.0",
|
|
34582
|
-
"codex-acp"
|
|
34583
|
-
);
|
|
34584
35536
|
agentExecutable = "codex";
|
|
34585
|
-
|
|
35537
|
+
createEndpoint = (options) => new CodexAcpAgent(options);
|
|
34586
35538
|
id = "codex";
|
|
34587
35539
|
label = "Codex";
|
|
34588
|
-
|
|
34589
|
-
"
|
|
34590
|
-
|
|
34591
|
-
"1.8.0",
|
|
34592
|
-
"node_modules",
|
|
34593
|
-
"@agentclientprotocol",
|
|
34594
|
-
"codex-acp",
|
|
34595
|
-
"dist",
|
|
34596
|
-
"index.js"
|
|
34597
|
-
];
|
|
34598
|
-
managedAgentExecutablePath = ["agents", "codex", "bin", "codex"];
|
|
35540
|
+
constructor() {
|
|
35541
|
+
super("MOBIUS_CODEX_PATH", ["agents", "codex", "bin", "codex"]);
|
|
35542
|
+
}
|
|
34599
35543
|
};
|
|
34600
35544
|
|
|
34601
35545
|
// src/agent-catalog/agent-probe-error.ts
|
|
@@ -34623,10 +35567,10 @@ async function resolveUserLocalExecutable(executableName, context) {
|
|
|
34623
35567
|
}
|
|
34624
35568
|
|
|
34625
35569
|
// src/agent-catalog/agents/verify-session-creation.ts
|
|
34626
|
-
import { methods as
|
|
35570
|
+
import { methods as methods5 } from "@agentclientprotocol/sdk";
|
|
34627
35571
|
async function verifySessionCreation(connection, capabilities, defaultWorkspace, signal, label) {
|
|
34628
35572
|
const session = await connection.agent.request(
|
|
34629
|
-
|
|
35573
|
+
methods5.agent.session.new,
|
|
34630
35574
|
{
|
|
34631
35575
|
additionalDirectories: [],
|
|
34632
35576
|
cwd: defaultWorkspace,
|
|
@@ -34639,7 +35583,7 @@ async function verifySessionCreation(connection, capabilities, defaultWorkspace,
|
|
|
34639
35583
|
}
|
|
34640
35584
|
if (capabilities.sessionCapabilities?.close != null) {
|
|
34641
35585
|
await connection.agent.request(
|
|
34642
|
-
|
|
35586
|
+
methods5.agent.session.close,
|
|
34643
35587
|
{ sessionId: session.sessionId },
|
|
34644
35588
|
{ cancellationSignal: signal }
|
|
34645
35589
|
);
|
|
@@ -35016,6 +35960,47 @@ var HermesAgentSpecification = class extends DirectAcpAgentDefinition {
|
|
|
35016
35960
|
};
|
|
35017
35961
|
};
|
|
35018
35962
|
|
|
35963
|
+
// src/agent-catalog/agents/oh-my-pi-agent.ts
|
|
35964
|
+
import {
|
|
35965
|
+
methods as methods6
|
|
35966
|
+
} from "@agentclientprotocol/sdk";
|
|
35967
|
+
var ACP_PROBE_TIMEOUT_MILLISECONDS2 = 3e4;
|
|
35968
|
+
var OH_MY_PI_TESTED_VERSION = "18.2.7";
|
|
35969
|
+
var OhMyPiAgentSpecification = class extends DirectAcpAgentDefinition {
|
|
35970
|
+
acpProbeTimeoutMilliseconds = ACP_PROBE_TIMEOUT_MILLISECONDS2;
|
|
35971
|
+
adapterVersion = OH_MY_PI_TESTED_VERSION;
|
|
35972
|
+
authenticationCommand = () => "omp";
|
|
35973
|
+
agentExecutable = "omp";
|
|
35974
|
+
agentOverrideVariable = "MOBIUS_OH_MY_PI_PATH";
|
|
35975
|
+
id = "oh-my-pi";
|
|
35976
|
+
label = "Oh My Pi";
|
|
35977
|
+
constructor() {
|
|
35978
|
+
super("MOBIUS_OH_MY_PI_PATH", ["acp"], ["agents", "oh-my-pi", OH_MY_PI_TESTED_VERSION, "bin", "omp"]);
|
|
35979
|
+
}
|
|
35980
|
+
verifyAcp = async (connection, initialized, defaultWorkspace, signal) => {
|
|
35981
|
+
const capabilities = initialized.agentCapabilities ?? {};
|
|
35982
|
+
if (capabilities.loadSession !== true) {
|
|
35983
|
+
throw new AgentProbeError("acp_incompatible", "Oh My Pi does not support ACP session recovery");
|
|
35984
|
+
}
|
|
35985
|
+
const session = await connection.agent.request(
|
|
35986
|
+
methods6.agent.session.new,
|
|
35987
|
+
{ additionalDirectories: [], cwd: defaultWorkspace, mcpServers: [] },
|
|
35988
|
+
{ cancellationSignal: signal }
|
|
35989
|
+
);
|
|
35990
|
+
if (session.sessionId.length === 0) {
|
|
35991
|
+
throw new AgentProbeError("acp_incompatible", "Oh My Pi returned an invalid ACP session");
|
|
35992
|
+
}
|
|
35993
|
+
const prompt = await connection.agent.request(
|
|
35994
|
+
methods6.agent.session.prompt,
|
|
35995
|
+
{ prompt: [{ text: "/session", type: "text" }], sessionId: session.sessionId },
|
|
35996
|
+
{ cancellationSignal: signal }
|
|
35997
|
+
);
|
|
35998
|
+
if (prompt.stopReason !== "end_turn") {
|
|
35999
|
+
throw new AgentProbeError("acp_incompatible", "Oh My Pi did not complete its ACP conformance prompt");
|
|
36000
|
+
}
|
|
36001
|
+
};
|
|
36002
|
+
};
|
|
36003
|
+
|
|
35019
36004
|
// src/agent-catalog/agents/opencode-agent.ts
|
|
35020
36005
|
import { join as join10 } from "node:path";
|
|
35021
36006
|
|
|
@@ -35331,7 +36316,7 @@ var OpenCodeAgentSpecification = class extends DirectAcpAgentDefinition {
|
|
|
35331
36316
|
// src/agent-catalog/agents/pi-agent.ts
|
|
35332
36317
|
import { join as join11 } from "node:path";
|
|
35333
36318
|
import {
|
|
35334
|
-
methods as
|
|
36319
|
+
methods as methods7
|
|
35335
36320
|
} from "@agentclientprotocol/sdk";
|
|
35336
36321
|
|
|
35337
36322
|
// src/agent-installation/pi-managed-packages.ts
|
|
@@ -35351,9 +36336,9 @@ var PI_AGENT_PACKAGE = new SriManagedNpmPackageDefinition(
|
|
|
35351
36336
|
);
|
|
35352
36337
|
|
|
35353
36338
|
// src/agent-catalog/agents/pi-agent.ts
|
|
35354
|
-
var
|
|
36339
|
+
var ACP_PROBE_TIMEOUT_MILLISECONDS3 = 3e4;
|
|
35355
36340
|
var PiAgentSpecification = class extends BridgedAcpAgentDefinition {
|
|
35356
|
-
acpProbeTimeoutMilliseconds =
|
|
36341
|
+
acpProbeTimeoutMilliseconds = ACP_PROBE_TIMEOUT_MILLISECONDS3;
|
|
35357
36342
|
adapterEnvironmentVariable = "PI_ACP_PI_COMMAND";
|
|
35358
36343
|
adapterOverrideVariable = "MOBIUS_PI_ACP_PATH";
|
|
35359
36344
|
adapterPackageDefinition = PI_ACP_PACKAGE;
|
|
@@ -35398,7 +36383,7 @@ var PiAgentSpecification = class extends BridgedAcpAgentDefinition {
|
|
|
35398
36383
|
throw new AgentProbeError("acp_incompatible", "Pi ACP adapter does not support session recovery");
|
|
35399
36384
|
}
|
|
35400
36385
|
const session = await connection.agent.request(
|
|
35401
|
-
|
|
36386
|
+
methods7.agent.session.new,
|
|
35402
36387
|
{
|
|
35403
36388
|
additionalDirectories: [],
|
|
35404
36389
|
cwd: defaultWorkspace,
|
|
@@ -35410,7 +36395,7 @@ var PiAgentSpecification = class extends BridgedAcpAgentDefinition {
|
|
|
35410
36395
|
throw new AgentProbeError("acp_incompatible", "Pi ACP adapter returned an invalid session");
|
|
35411
36396
|
}
|
|
35412
36397
|
const prompt = await connection.agent.request(
|
|
35413
|
-
|
|
36398
|
+
methods7.agent.session.prompt,
|
|
35414
36399
|
{
|
|
35415
36400
|
prompt: [{ text: "/session", type: "text" }],
|
|
35416
36401
|
sessionId: session.sessionId
|
|
@@ -35522,6 +36507,7 @@ function supportedLocalAgentSpecifications() {
|
|
|
35522
36507
|
new DeepSeekHarnessAgentSpecification(),
|
|
35523
36508
|
new HermesAgentSpecification(),
|
|
35524
36509
|
new OpenCodeAgentSpecification(),
|
|
36510
|
+
new OhMyPiAgentSpecification(),
|
|
35525
36511
|
new CursorCliAgentSpecification(),
|
|
35526
36512
|
new GrokBuildAgentSpecification(),
|
|
35527
36513
|
new WorkBuddyAgentSpecification(),
|
|
@@ -35530,11 +36516,11 @@ function supportedLocalAgentSpecifications() {
|
|
|
35530
36516
|
}
|
|
35531
36517
|
|
|
35532
36518
|
// src/agent-catalog/acp-readiness-probe.ts
|
|
35533
|
-
import { spawn as
|
|
36519
|
+
import { spawn as spawn4 } from "node:child_process";
|
|
35534
36520
|
import {
|
|
35535
|
-
methods as
|
|
36521
|
+
methods as methods8,
|
|
35536
36522
|
ndJsonStream as ndJsonStream2,
|
|
35537
|
-
PROTOCOL_VERSION as
|
|
36523
|
+
PROTOCOL_VERSION as PROTOCOL_VERSION3,
|
|
35538
36524
|
RequestError as RequestError3
|
|
35539
36525
|
} from "@agentclientprotocol/sdk";
|
|
35540
36526
|
var ACP_OUTPUT_LIMIT_BYTES = 1024 * 1024;
|
|
@@ -35607,6 +36593,44 @@ function writableAcpStream(output2) {
|
|
|
35607
36593
|
}
|
|
35608
36594
|
});
|
|
35609
36595
|
}
|
|
36596
|
+
async function probeInProcessReadiness(agent, environment, defaultWorkspace, controller) {
|
|
36597
|
+
const inProcess = agent.createEndpoint({
|
|
36598
|
+
command: agent.command,
|
|
36599
|
+
cwd: defaultWorkspace,
|
|
36600
|
+
environment: { ...filterEnvironment(environment), ...agent.environment }
|
|
36601
|
+
});
|
|
36602
|
+
try {
|
|
36603
|
+
await inProcess.initialize(controller.signal);
|
|
36604
|
+
const connection = createAcpClient(new DiscoveryAcpHandler()).connect(inProcess.app());
|
|
36605
|
+
const initialized = await connection.agent.request(
|
|
36606
|
+
methods8.agent.initialize,
|
|
36607
|
+
{
|
|
36608
|
+
clientCapabilities: {},
|
|
36609
|
+
clientInfo: { name: "mobius", version: "0.0.3" },
|
|
36610
|
+
protocolVersion: PROTOCOL_VERSION3
|
|
36611
|
+
},
|
|
36612
|
+
{ cancellationSignal: controller.signal }
|
|
36613
|
+
);
|
|
36614
|
+
if (initialized.protocolVersion !== PROTOCOL_VERSION3) {
|
|
36615
|
+
throw new AgentProbeError("acp_incompatible", "ACP agent selected an unsupported protocol version");
|
|
36616
|
+
}
|
|
36617
|
+
return new VerifiedAcpReadiness(
|
|
36618
|
+
normalizeVersionOutput(initialized.agentInfo?.version ?? ""),
|
|
36619
|
+
normalizeAcpCapabilities(initialized)
|
|
36620
|
+
);
|
|
36621
|
+
} finally {
|
|
36622
|
+
await inProcess.close();
|
|
36623
|
+
}
|
|
36624
|
+
}
|
|
36625
|
+
function filterEnvironment(environment) {
|
|
36626
|
+
const filtered = {};
|
|
36627
|
+
for (const [name, value] of Object.entries(environment)) {
|
|
36628
|
+
if (typeof value === "string") {
|
|
36629
|
+
filtered[name] = value;
|
|
36630
|
+
}
|
|
36631
|
+
}
|
|
36632
|
+
return filtered;
|
|
36633
|
+
}
|
|
35610
36634
|
async function probeAcpReadiness(specification, agent, environment, defaultWorkspace, signal) {
|
|
35611
36635
|
signal.throwIfAborted();
|
|
35612
36636
|
const controller = new AbortController();
|
|
@@ -35620,7 +36644,23 @@ async function probeAcpReadiness(specification, agent, environment, defaultWorks
|
|
|
35620
36644
|
if (signal.aborted) {
|
|
35621
36645
|
abort();
|
|
35622
36646
|
}
|
|
35623
|
-
|
|
36647
|
+
if (agent.kind === "in-process-acp") {
|
|
36648
|
+
try {
|
|
36649
|
+
return await probeInProcessReadiness(agent, environment, defaultWorkspace, controller);
|
|
36650
|
+
} catch (error62) {
|
|
36651
|
+
if (signal.aborted) {
|
|
36652
|
+
signal.throwIfAborted();
|
|
36653
|
+
}
|
|
36654
|
+
if (timedOut) {
|
|
36655
|
+
throw new AgentProbeError("adapter_probe_timeout", "ACP agent probe timed out", { cause: error62 });
|
|
36656
|
+
}
|
|
36657
|
+
throw error62;
|
|
36658
|
+
} finally {
|
|
36659
|
+
clearTimeout(timeout);
|
|
36660
|
+
signal.removeEventListener("abort", abort);
|
|
36661
|
+
}
|
|
36662
|
+
}
|
|
36663
|
+
const child = spawn4(agent.adapterPath, [...agent.arguments], {
|
|
35624
36664
|
cwd: defaultWorkspace,
|
|
35625
36665
|
detached: process.platform !== "win32",
|
|
35626
36666
|
env: { ...environment, ...agent.environment },
|
|
@@ -35656,17 +36696,17 @@ async function probeAcpReadiness(specification, agent, environment, defaultWorks
|
|
|
35656
36696
|
try {
|
|
35657
36697
|
const initialized = await Promise.race([
|
|
35658
36698
|
connection.agent.request(
|
|
35659
|
-
|
|
36699
|
+
methods8.agent.initialize,
|
|
35660
36700
|
{
|
|
35661
36701
|
clientCapabilities: {},
|
|
35662
36702
|
clientInfo: { name: "mobius", version: "0.0.3" },
|
|
35663
|
-
protocolVersion:
|
|
36703
|
+
protocolVersion: PROTOCOL_VERSION3
|
|
35664
36704
|
},
|
|
35665
36705
|
{ cancellationSignal: controller.signal }
|
|
35666
36706
|
),
|
|
35667
36707
|
processExit
|
|
35668
36708
|
]);
|
|
35669
|
-
if (initialized.protocolVersion !==
|
|
36709
|
+
if (initialized.protocolVersion !== PROTOCOL_VERSION3) {
|
|
35670
36710
|
throw new AgentProbeError("acp_incompatible", "ACP adapter selected an unsupported protocol version");
|
|
35671
36711
|
}
|
|
35672
36712
|
await specification.verifyAcp(connection, initialized, defaultWorkspace, controller.signal);
|
|
@@ -35841,7 +36881,7 @@ async function resolveAgentExecutables(specification, context) {
|
|
|
35841
36881
|
);
|
|
35842
36882
|
}
|
|
35843
36883
|
async function resolveAdapterExecutables(specification, context) {
|
|
35844
|
-
if (specification instanceof DirectAcpAgentDefinition) {
|
|
36884
|
+
if (specification instanceof DirectAcpAgentDefinition || specification instanceof InProcessAcpAgentDefinition2) {
|
|
35845
36885
|
return await resolveAgentExecutables(specification, context);
|
|
35846
36886
|
}
|
|
35847
36887
|
if (!(specification instanceof BridgedAcpAgentDefinition)) {
|
|
@@ -35986,7 +37026,7 @@ async function discoverAgent(specification, context) {
|
|
|
35986
37026
|
agent.identity.requestedPath,
|
|
35987
37027
|
agentVersion
|
|
35988
37028
|
);
|
|
35989
|
-
if (adapters.length === 0) {
|
|
37029
|
+
if (adapters.length === 0 && !(specification instanceof InProcessAcpAgentDefinition2)) {
|
|
35990
37030
|
return new MissingAdapter(specification, installedAgent);
|
|
35991
37031
|
}
|
|
35992
37032
|
for (const adapter of adapters) {
|
|
@@ -36021,23 +37061,33 @@ async function discoverAgent(specification, context) {
|
|
|
36021
37061
|
lastFailure = integrationProbeFailure(specification, installedAgent, error62);
|
|
36022
37062
|
continue;
|
|
36023
37063
|
}
|
|
36024
|
-
const
|
|
37064
|
+
const buildDefinition = (verifiedAdapterVersion, capabilities) => specification instanceof InProcessAcpAgentDefinition2 ? new InProcessAcpAgentDefinition(
|
|
37065
|
+
specification.id,
|
|
37066
|
+
specification.label,
|
|
37067
|
+
agent.path,
|
|
37068
|
+
specification.createEndpoint,
|
|
37069
|
+
launchEnvironment,
|
|
37070
|
+
agentVersion.length > 0 ? agentVersion : verifiedAdapterVersion,
|
|
37071
|
+
agent.identity,
|
|
37072
|
+
capabilities
|
|
37073
|
+
) : new LocalAgentDefinition(
|
|
36025
37074
|
specification.id,
|
|
36026
37075
|
specification.label,
|
|
36027
37076
|
adapter.path,
|
|
36028
37077
|
specification.launchArguments,
|
|
36029
37078
|
launchEnvironment,
|
|
36030
|
-
|
|
37079
|
+
verifiedAdapterVersion,
|
|
36031
37080
|
agentVersion,
|
|
36032
37081
|
adapter.identity,
|
|
36033
|
-
agent.identity
|
|
37082
|
+
agent.identity,
|
|
37083
|
+
capabilities
|
|
36034
37084
|
);
|
|
36035
37085
|
try {
|
|
36036
37086
|
const readiness = await probeWithRetry(
|
|
36037
37087
|
context.signal,
|
|
36038
37088
|
async () => await probeAcpReadiness(
|
|
36039
37089
|
specification,
|
|
36040
|
-
|
|
37090
|
+
buildDefinition(adapterVersion, unsupportedSessionCapabilities()),
|
|
36041
37091
|
context.environment,
|
|
36042
37092
|
context.defaultWorkspace,
|
|
36043
37093
|
context.signal
|
|
@@ -36049,18 +37099,7 @@ async function discoverAgent(specification, context) {
|
|
|
36049
37099
|
}
|
|
36050
37100
|
return new AvailableAgent(
|
|
36051
37101
|
specification,
|
|
36052
|
-
|
|
36053
|
-
specification.id,
|
|
36054
|
-
specification.label,
|
|
36055
|
-
adapter.path,
|
|
36056
|
-
specification.launchArguments,
|
|
36057
|
-
launchEnvironment,
|
|
36058
|
-
verifiedAdapterVersion,
|
|
36059
|
-
agentVersion,
|
|
36060
|
-
adapter.identity,
|
|
36061
|
-
agent.identity,
|
|
36062
|
-
readiness.capabilities
|
|
36063
|
-
)
|
|
37102
|
+
buildDefinition(verifiedAdapterVersion, readiness.capabilities)
|
|
36064
37103
|
);
|
|
36065
37104
|
} catch (error62) {
|
|
36066
37105
|
if (context.signal.aborted) {
|
|
@@ -37712,7 +38751,7 @@ var FixedInstallationExecutor = class {
|
|
|
37712
38751
|
const verified = inventory.available.find((candidate) => candidate.specification.id === agentId);
|
|
37713
38752
|
if (verified instanceof AvailableAgent) {
|
|
37714
38753
|
this.#audit.record("agent_installation_acp_verified", requestId, agentId, {
|
|
37715
|
-
adapterVersion: verified.agent.adapterVersion,
|
|
38754
|
+
adapterVersion: verified.agent.kind === "acp-adapter-process" ? verified.agent.adapterVersion : verified.agent.agentVersion,
|
|
37716
38755
|
agentVersion: verified.agent.agentVersion
|
|
37717
38756
|
});
|
|
37718
38757
|
await this.#publishDiscoveredAgent(agentId, inventory, environment, signal);
|
|
@@ -37992,7 +39031,7 @@ var WorkspaceDirectoryService = class {
|
|
|
37992
39031
|
};
|
|
37993
39032
|
|
|
37994
39033
|
// src/native-sessions/codex-history.ts
|
|
37995
|
-
import { spawn as
|
|
39034
|
+
import { spawn as spawn5 } from "node:child_process";
|
|
37996
39035
|
var responseSchema = external_exports.union([
|
|
37997
39036
|
external_exports.object({
|
|
37998
39037
|
id: external_exports.number(),
|
|
@@ -38231,7 +39270,7 @@ async function readCodexHistoryWithOptions(agent, cwd, nativeSessionId, signal,
|
|
|
38231
39270
|
);
|
|
38232
39271
|
}
|
|
38233
39272
|
signal.throwIfAborted();
|
|
38234
|
-
const child =
|
|
39273
|
+
const child = spawn5(agent.agentIdentity.realPath, ["app-server"], {
|
|
38235
39274
|
cwd,
|
|
38236
39275
|
env: { ...process.env, ...agent.environment },
|
|
38237
39276
|
detached: process.platform !== "win32",
|
|
@@ -40875,7 +41914,7 @@ function settingsRevision(agent, reportedAgentVersion, settings, modelEffort) {
|
|
|
40875
41914
|
};
|
|
40876
41915
|
return createHash4("sha256").update(
|
|
40877
41916
|
JSON.stringify({
|
|
40878
|
-
adapterVersion: agent.adapterVersion,
|
|
41917
|
+
adapterVersion: agent.kind === "acp-adapter-process" ? agent.adapterVersion : agent.agentVersion,
|
|
40879
41918
|
agentId: agent.id,
|
|
40880
41919
|
agentVersion: agent.agentVersion,
|
|
40881
41920
|
modelEffort: revisionModelEffort,
|