@usecontextlayer/ctxs 0.5.25 → 0.5.27
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/cli.mjs +492 -137
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="405dec0e-73a1-5331-873c-4bcf5de3c90e")}catch(e){}}();
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
6
6
|
import * as fs$2 from "node:fs/promises";
|
|
@@ -2082,6 +2082,98 @@ function handleIntersectionResults$1(result, left, right) {
|
|
|
2082
2082
|
result.value = merged.data;
|
|
2083
2083
|
return result;
|
|
2084
2084
|
}
|
|
2085
|
+
const $ZodTuple$1 = /*@__PURE__*/ $constructor$1("$ZodTuple", (inst, def) => {
|
|
2086
|
+
$ZodType$1.init(inst, def);
|
|
2087
|
+
const items = def.items;
|
|
2088
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2089
|
+
const input = payload.value;
|
|
2090
|
+
if (!Array.isArray(input)) {
|
|
2091
|
+
payload.issues.push({
|
|
2092
|
+
input,
|
|
2093
|
+
inst,
|
|
2094
|
+
expected: "tuple",
|
|
2095
|
+
code: "invalid_type"
|
|
2096
|
+
});
|
|
2097
|
+
return payload;
|
|
2098
|
+
}
|
|
2099
|
+
payload.value = [];
|
|
2100
|
+
const proms = [];
|
|
2101
|
+
const optinStart = getTupleOptStart$1(items, "optin");
|
|
2102
|
+
const optoutStart = getTupleOptStart$1(items, "optout");
|
|
2103
|
+
if (!def.rest) {
|
|
2104
|
+
if (input.length < optinStart) {
|
|
2105
|
+
payload.issues.push({
|
|
2106
|
+
code: "too_small",
|
|
2107
|
+
minimum: optinStart,
|
|
2108
|
+
inclusive: true,
|
|
2109
|
+
input,
|
|
2110
|
+
inst,
|
|
2111
|
+
origin: "array"
|
|
2112
|
+
});
|
|
2113
|
+
return payload;
|
|
2114
|
+
}
|
|
2115
|
+
if (input.length > items.length) payload.issues.push({
|
|
2116
|
+
code: "too_big",
|
|
2117
|
+
maximum: items.length,
|
|
2118
|
+
inclusive: true,
|
|
2119
|
+
input,
|
|
2120
|
+
inst,
|
|
2121
|
+
origin: "array"
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
const itemResults = new Array(items.length);
|
|
2125
|
+
for (let i = 0; i < items.length; i++) {
|
|
2126
|
+
const r = items[i]._zod.run({
|
|
2127
|
+
value: input[i],
|
|
2128
|
+
issues: []
|
|
2129
|
+
}, ctx);
|
|
2130
|
+
if (r instanceof Promise) proms.push(r.then((rr) => {
|
|
2131
|
+
itemResults[i] = rr;
|
|
2132
|
+
}));
|
|
2133
|
+
else itemResults[i] = r;
|
|
2134
|
+
}
|
|
2135
|
+
if (def.rest) {
|
|
2136
|
+
let i = items.length - 1;
|
|
2137
|
+
const rest = input.slice(items.length);
|
|
2138
|
+
for (const el of rest) {
|
|
2139
|
+
i++;
|
|
2140
|
+
const result = def.rest._zod.run({
|
|
2141
|
+
value: el,
|
|
2142
|
+
issues: []
|
|
2143
|
+
}, ctx);
|
|
2144
|
+
if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult$1(r, payload, i)));
|
|
2145
|
+
else handleTupleResult$1(result, payload, i);
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
if (proms.length) return Promise.all(proms).then(() => handleTupleResults$1(itemResults, payload, items, input, optoutStart));
|
|
2149
|
+
return handleTupleResults$1(itemResults, payload, items, input, optoutStart);
|
|
2150
|
+
};
|
|
2151
|
+
});
|
|
2152
|
+
function getTupleOptStart$1(items, key) {
|
|
2153
|
+
for (let i = items.length - 1; i >= 0; i--) if (items[i]._zod[key] !== "optional") return i + 1;
|
|
2154
|
+
return 0;
|
|
2155
|
+
}
|
|
2156
|
+
function handleTupleResult$1(result, final, index) {
|
|
2157
|
+
if (result.issues.length) final.issues.push(...prefixIssues$1(index, result.issues));
|
|
2158
|
+
final.value[index] = result.value;
|
|
2159
|
+
}
|
|
2160
|
+
function handleTupleResults$1(itemResults, final, items, input, optoutStart) {
|
|
2161
|
+
for (let i = 0; i < items.length; i++) {
|
|
2162
|
+
const r = itemResults[i];
|
|
2163
|
+
const isPresent = i < input.length;
|
|
2164
|
+
if (r.issues.length) {
|
|
2165
|
+
if (!isPresent && i >= optoutStart) {
|
|
2166
|
+
final.value.length = i;
|
|
2167
|
+
break;
|
|
2168
|
+
}
|
|
2169
|
+
final.issues.push(...prefixIssues$1(i, r.issues));
|
|
2170
|
+
}
|
|
2171
|
+
final.value[i] = r.value;
|
|
2172
|
+
}
|
|
2173
|
+
for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
|
|
2174
|
+
else break;
|
|
2175
|
+
return final;
|
|
2176
|
+
}
|
|
2085
2177
|
const $ZodRecord$1 = /*@__PURE__*/ $constructor$1("$ZodRecord", (inst, def) => {
|
|
2086
2178
|
$ZodType$1.init(inst, def);
|
|
2087
2179
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2209,7 +2301,7 @@ const $ZodEnum$1 = /*@__PURE__*/ $constructor$1("$ZodEnum", (inst, def) => {
|
|
|
2209
2301
|
return payload;
|
|
2210
2302
|
};
|
|
2211
2303
|
});
|
|
2212
|
-
const $ZodLiteral = /*@__PURE__*/ $constructor$1("$ZodLiteral", (inst, def) => {
|
|
2304
|
+
const $ZodLiteral$1 = /*@__PURE__*/ $constructor$1("$ZodLiteral", (inst, def) => {
|
|
2213
2305
|
$ZodType$1.init(inst, def);
|
|
2214
2306
|
if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
|
|
2215
2307
|
const values = new Set(def.values);
|
|
@@ -3425,7 +3517,7 @@ const enumProcessor$1 = (schema, _ctx, json, _params) => {
|
|
|
3425
3517
|
if (values.every((v) => typeof v === "string")) json.type = "string";
|
|
3426
3518
|
json.enum = values;
|
|
3427
3519
|
};
|
|
3428
|
-
const literalProcessor = (schema, ctx, json, _params) => {
|
|
3520
|
+
const literalProcessor$1 = (schema, ctx, json, _params) => {
|
|
3429
3521
|
const def = schema._zod.def;
|
|
3430
3522
|
const vals = [];
|
|
3431
3523
|
for (const val of def.values) if (val === void 0) {
|
|
@@ -3569,7 +3661,7 @@ const intersectionProcessor$1 = (schema, ctx, json, params) => {
|
|
|
3569
3661
|
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
3570
3662
|
json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
3571
3663
|
};
|
|
3572
|
-
const tupleProcessor = (schema, ctx, _json, params) => {
|
|
3664
|
+
const tupleProcessor$1 = (schema, ctx, _json, params) => {
|
|
3573
3665
|
const json = _json;
|
|
3574
3666
|
const def = schema._zod.def;
|
|
3575
3667
|
json.type = "array";
|
|
@@ -3729,7 +3821,7 @@ const allProcessors = {
|
|
|
3729
3821
|
unknown: unknownProcessor,
|
|
3730
3822
|
date: dateProcessor,
|
|
3731
3823
|
enum: enumProcessor$1,
|
|
3732
|
-
literal: literalProcessor,
|
|
3824
|
+
literal: literalProcessor$1,
|
|
3733
3825
|
nan: nanProcessor,
|
|
3734
3826
|
template_literal: templateLiteralProcessor,
|
|
3735
3827
|
file: fileProcessor,
|
|
@@ -3743,7 +3835,7 @@ const allProcessors = {
|
|
|
3743
3835
|
object: objectProcessor$1,
|
|
3744
3836
|
union: unionProcessor$1,
|
|
3745
3837
|
intersection: intersectionProcessor$1,
|
|
3746
|
-
tuple: tupleProcessor,
|
|
3838
|
+
tuple: tupleProcessor$1,
|
|
3747
3839
|
record: recordProcessor$1,
|
|
3748
3840
|
nullable: nullableProcessor$1,
|
|
3749
3841
|
nonoptional: nonoptionalProcessor$1,
|
|
@@ -4463,6 +4555,25 @@ function intersection$1(left, right) {
|
|
|
4463
4555
|
right
|
|
4464
4556
|
});
|
|
4465
4557
|
}
|
|
4558
|
+
const ZodTuple$2 = /*@__PURE__*/ $constructor$1("ZodTuple", (inst, def) => {
|
|
4559
|
+
$ZodTuple$1.init(inst, def);
|
|
4560
|
+
ZodType$2.init(inst, def);
|
|
4561
|
+
inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor$1(inst, ctx, json, params);
|
|
4562
|
+
inst.rest = (rest) => inst.clone({
|
|
4563
|
+
...inst._zod.def,
|
|
4564
|
+
rest
|
|
4565
|
+
});
|
|
4566
|
+
});
|
|
4567
|
+
function tuple$1(items, _paramsOrRest, _params) {
|
|
4568
|
+
const hasRest = _paramsOrRest instanceof $ZodType$1;
|
|
4569
|
+
const params = hasRest ? _params : _paramsOrRest;
|
|
4570
|
+
return new ZodTuple$2({
|
|
4571
|
+
type: "tuple",
|
|
4572
|
+
items,
|
|
4573
|
+
rest: hasRest ? _paramsOrRest : null,
|
|
4574
|
+
...normalizeParams$1(params)
|
|
4575
|
+
});
|
|
4576
|
+
}
|
|
4466
4577
|
const ZodRecord$2 = /*@__PURE__*/ $constructor$1("ZodRecord", (inst, def) => {
|
|
4467
4578
|
$ZodRecord$1.init(inst, def);
|
|
4468
4579
|
ZodType$2.init(inst, def);
|
|
@@ -4521,18 +4632,18 @@ function _enum$1(values, params) {
|
|
|
4521
4632
|
...normalizeParams$1(params)
|
|
4522
4633
|
});
|
|
4523
4634
|
}
|
|
4524
|
-
const ZodLiteral$
|
|
4525
|
-
$ZodLiteral.init(inst, def);
|
|
4635
|
+
const ZodLiteral$2 = /*@__PURE__*/ $constructor$1("ZodLiteral", (inst, def) => {
|
|
4636
|
+
$ZodLiteral$1.init(inst, def);
|
|
4526
4637
|
ZodType$2.init(inst, def);
|
|
4527
|
-
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
4638
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor$1(inst, ctx, json, params);
|
|
4528
4639
|
inst.values = new Set(def.values);
|
|
4529
4640
|
Object.defineProperty(inst, "value", { get() {
|
|
4530
4641
|
if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4531
4642
|
return def.values[0];
|
|
4532
4643
|
} });
|
|
4533
4644
|
});
|
|
4534
|
-
function literal(value, params) {
|
|
4535
|
-
return new ZodLiteral$
|
|
4645
|
+
function literal$1(value, params) {
|
|
4646
|
+
return new ZodLiteral$2({
|
|
4536
4647
|
type: "literal",
|
|
4537
4648
|
values: Array.isArray(value) ? value : [value],
|
|
4538
4649
|
...normalizeParams$1(params)
|
|
@@ -4788,7 +4899,7 @@ function normalizedKey(event) {
|
|
|
4788
4899
|
|
|
4789
4900
|
//#endregion
|
|
4790
4901
|
//#region package.json
|
|
4791
|
-
var version$1 = "0.5.
|
|
4902
|
+
var version$1 = "0.5.27";
|
|
4792
4903
|
|
|
4793
4904
|
//#endregion
|
|
4794
4905
|
//#region sentry.ts
|
|
@@ -7637,6 +7748,98 @@ function handleIntersectionResults(result, left, right) {
|
|
|
7637
7748
|
result.value = merged.data;
|
|
7638
7749
|
return result;
|
|
7639
7750
|
}
|
|
7751
|
+
const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
|
|
7752
|
+
$ZodType.init(inst, def);
|
|
7753
|
+
const items = def.items;
|
|
7754
|
+
inst._zod.parse = (payload, ctx) => {
|
|
7755
|
+
const input = payload.value;
|
|
7756
|
+
if (!Array.isArray(input)) {
|
|
7757
|
+
payload.issues.push({
|
|
7758
|
+
input,
|
|
7759
|
+
inst,
|
|
7760
|
+
expected: "tuple",
|
|
7761
|
+
code: "invalid_type"
|
|
7762
|
+
});
|
|
7763
|
+
return payload;
|
|
7764
|
+
}
|
|
7765
|
+
payload.value = [];
|
|
7766
|
+
const proms = [];
|
|
7767
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
7768
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
7769
|
+
if (!def.rest) {
|
|
7770
|
+
if (input.length < optinStart) {
|
|
7771
|
+
payload.issues.push({
|
|
7772
|
+
code: "too_small",
|
|
7773
|
+
minimum: optinStart,
|
|
7774
|
+
inclusive: true,
|
|
7775
|
+
input,
|
|
7776
|
+
inst,
|
|
7777
|
+
origin: "array"
|
|
7778
|
+
});
|
|
7779
|
+
return payload;
|
|
7780
|
+
}
|
|
7781
|
+
if (input.length > items.length) payload.issues.push({
|
|
7782
|
+
code: "too_big",
|
|
7783
|
+
maximum: items.length,
|
|
7784
|
+
inclusive: true,
|
|
7785
|
+
input,
|
|
7786
|
+
inst,
|
|
7787
|
+
origin: "array"
|
|
7788
|
+
});
|
|
7789
|
+
}
|
|
7790
|
+
const itemResults = new Array(items.length);
|
|
7791
|
+
for (let i = 0; i < items.length; i++) {
|
|
7792
|
+
const r = items[i]._zod.run({
|
|
7793
|
+
value: input[i],
|
|
7794
|
+
issues: []
|
|
7795
|
+
}, ctx);
|
|
7796
|
+
if (r instanceof Promise) proms.push(r.then((rr) => {
|
|
7797
|
+
itemResults[i] = rr;
|
|
7798
|
+
}));
|
|
7799
|
+
else itemResults[i] = r;
|
|
7800
|
+
}
|
|
7801
|
+
if (def.rest) {
|
|
7802
|
+
let i = items.length - 1;
|
|
7803
|
+
const rest = input.slice(items.length);
|
|
7804
|
+
for (const el of rest) {
|
|
7805
|
+
i++;
|
|
7806
|
+
const result = def.rest._zod.run({
|
|
7807
|
+
value: el,
|
|
7808
|
+
issues: []
|
|
7809
|
+
}, ctx);
|
|
7810
|
+
if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
7811
|
+
else handleTupleResult(result, payload, i);
|
|
7812
|
+
}
|
|
7813
|
+
}
|
|
7814
|
+
if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
7815
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
7816
|
+
};
|
|
7817
|
+
});
|
|
7818
|
+
function getTupleOptStart(items, key) {
|
|
7819
|
+
for (let i = items.length - 1; i >= 0; i--) if (items[i]._zod[key] !== "optional") return i + 1;
|
|
7820
|
+
return 0;
|
|
7821
|
+
}
|
|
7822
|
+
function handleTupleResult(result, final, index) {
|
|
7823
|
+
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
7824
|
+
final.value[index] = result.value;
|
|
7825
|
+
}
|
|
7826
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
7827
|
+
for (let i = 0; i < items.length; i++) {
|
|
7828
|
+
const r = itemResults[i];
|
|
7829
|
+
const isPresent = i < input.length;
|
|
7830
|
+
if (r.issues.length) {
|
|
7831
|
+
if (!isPresent && i >= optoutStart) {
|
|
7832
|
+
final.value.length = i;
|
|
7833
|
+
break;
|
|
7834
|
+
}
|
|
7835
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
7836
|
+
}
|
|
7837
|
+
final.value[i] = r.value;
|
|
7838
|
+
}
|
|
7839
|
+
for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
|
|
7840
|
+
else break;
|
|
7841
|
+
return final;
|
|
7842
|
+
}
|
|
7640
7843
|
const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
|
|
7641
7844
|
$ZodType.init(inst, def);
|
|
7642
7845
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -7764,6 +7967,24 @@ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
|
|
|
7764
7967
|
return payload;
|
|
7765
7968
|
};
|
|
7766
7969
|
});
|
|
7970
|
+
const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
|
|
7971
|
+
$ZodType.init(inst, def);
|
|
7972
|
+
if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
|
|
7973
|
+
const values = new Set(def.values);
|
|
7974
|
+
inst._zod.values = values;
|
|
7975
|
+
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
7976
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
7977
|
+
const input = payload.value;
|
|
7978
|
+
if (values.has(input)) return payload;
|
|
7979
|
+
payload.issues.push({
|
|
7980
|
+
code: "invalid_value",
|
|
7981
|
+
values: def.values,
|
|
7982
|
+
input,
|
|
7983
|
+
inst
|
|
7984
|
+
});
|
|
7985
|
+
return payload;
|
|
7986
|
+
};
|
|
7987
|
+
});
|
|
7767
7988
|
const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
|
|
7768
7989
|
$ZodType.init(inst, def);
|
|
7769
7990
|
inst._zod.optin = "optional";
|
|
@@ -8810,6 +9031,27 @@ const enumProcessor = (schema, _ctx, json, _params) => {
|
|
|
8810
9031
|
if (values.every((v) => typeof v === "string")) json.type = "string";
|
|
8811
9032
|
json.enum = values;
|
|
8812
9033
|
};
|
|
9034
|
+
const literalProcessor = (schema, ctx, json, _params) => {
|
|
9035
|
+
const def = schema._zod.def;
|
|
9036
|
+
const vals = [];
|
|
9037
|
+
for (const val of def.values) if (val === void 0) {
|
|
9038
|
+
if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
9039
|
+
} else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
9040
|
+
else vals.push(Number(val));
|
|
9041
|
+
else vals.push(val);
|
|
9042
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
9043
|
+
const val = vals[0];
|
|
9044
|
+
json.type = val === null ? "null" : typeof val;
|
|
9045
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
|
|
9046
|
+
else json.const = val;
|
|
9047
|
+
} else {
|
|
9048
|
+
if (vals.every((v) => typeof v === "number")) json.type = "number";
|
|
9049
|
+
if (vals.every((v) => typeof v === "string")) json.type = "string";
|
|
9050
|
+
if (vals.every((v) => typeof v === "boolean")) json.type = "boolean";
|
|
9051
|
+
if (vals.every((v) => v === null)) json.type = "null";
|
|
9052
|
+
json.enum = vals;
|
|
9053
|
+
}
|
|
9054
|
+
};
|
|
8813
9055
|
const customProcessor = (_schema, ctx, _json, _params) => {
|
|
8814
9056
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
8815
9057
|
};
|
|
@@ -8892,6 +9134,44 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
8892
9134
|
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
8893
9135
|
json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
8894
9136
|
};
|
|
9137
|
+
const tupleProcessor = (schema, ctx, _json, params) => {
|
|
9138
|
+
const json = _json;
|
|
9139
|
+
const def = schema._zod.def;
|
|
9140
|
+
json.type = "array";
|
|
9141
|
+
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
9142
|
+
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
9143
|
+
const prefixItems = def.items.map((x, i) => process$1(x, ctx, {
|
|
9144
|
+
...params,
|
|
9145
|
+
path: [
|
|
9146
|
+
...params.path,
|
|
9147
|
+
prefixPath,
|
|
9148
|
+
i
|
|
9149
|
+
]
|
|
9150
|
+
}));
|
|
9151
|
+
const rest = def.rest ? process$1(def.rest, ctx, {
|
|
9152
|
+
...params,
|
|
9153
|
+
path: [
|
|
9154
|
+
...params.path,
|
|
9155
|
+
restPath,
|
|
9156
|
+
...ctx.target === "openapi-3.0" ? [def.items.length] : []
|
|
9157
|
+
]
|
|
9158
|
+
}) : null;
|
|
9159
|
+
if (ctx.target === "draft-2020-12") {
|
|
9160
|
+
json.prefixItems = prefixItems;
|
|
9161
|
+
if (rest) json.items = rest;
|
|
9162
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
9163
|
+
json.items = { anyOf: prefixItems };
|
|
9164
|
+
if (rest) json.items.anyOf.push(rest);
|
|
9165
|
+
json.minItems = prefixItems.length;
|
|
9166
|
+
if (!rest) json.maxItems = prefixItems.length;
|
|
9167
|
+
} else {
|
|
9168
|
+
json.items = prefixItems;
|
|
9169
|
+
if (rest) json.additionalItems = rest;
|
|
9170
|
+
}
|
|
9171
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
9172
|
+
if (typeof minimum === "number") json.minItems = minimum;
|
|
9173
|
+
if (typeof maximum === "number") json.maxItems = maximum;
|
|
9174
|
+
};
|
|
8895
9175
|
const recordProcessor = (schema, ctx, _json, params) => {
|
|
8896
9176
|
const json = _json;
|
|
8897
9177
|
const def = schema._zod.def;
|
|
@@ -9547,6 +9827,24 @@ function intersection(left, right) {
|
|
|
9547
9827
|
right
|
|
9548
9828
|
});
|
|
9549
9829
|
}
|
|
9830
|
+
const ZodTuple$1 = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
|
|
9831
|
+
$ZodTuple.init(inst, def);
|
|
9832
|
+
ZodType$1.init(inst, def);
|
|
9833
|
+
inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
|
|
9834
|
+
inst.rest = (rest) => inst.clone({
|
|
9835
|
+
...inst._zod.def,
|
|
9836
|
+
rest
|
|
9837
|
+
});
|
|
9838
|
+
});
|
|
9839
|
+
function tuple(items, _paramsOrRest, _params) {
|
|
9840
|
+
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
9841
|
+
return new ZodTuple$1({
|
|
9842
|
+
type: "tuple",
|
|
9843
|
+
items,
|
|
9844
|
+
rest: hasRest ? _paramsOrRest : null,
|
|
9845
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
9846
|
+
});
|
|
9847
|
+
}
|
|
9550
9848
|
const ZodRecord$1 = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
|
|
9551
9849
|
$ZodRecord.init(inst, def);
|
|
9552
9850
|
ZodType$1.init(inst, def);
|
|
@@ -9605,6 +9903,23 @@ function _enum(values, params) {
|
|
|
9605
9903
|
...normalizeParams(params)
|
|
9606
9904
|
});
|
|
9607
9905
|
}
|
|
9906
|
+
const ZodLiteral$1 = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
|
|
9907
|
+
$ZodLiteral.init(inst, def);
|
|
9908
|
+
ZodType$1.init(inst, def);
|
|
9909
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
9910
|
+
inst.values = new Set(def.values);
|
|
9911
|
+
Object.defineProperty(inst, "value", { get() {
|
|
9912
|
+
if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
9913
|
+
return def.values[0];
|
|
9914
|
+
} });
|
|
9915
|
+
});
|
|
9916
|
+
function literal(value, params) {
|
|
9917
|
+
return new ZodLiteral$1({
|
|
9918
|
+
type: "literal",
|
|
9919
|
+
values: Array.isArray(value) ? value : [value],
|
|
9920
|
+
...normalizeParams(params)
|
|
9921
|
+
});
|
|
9922
|
+
}
|
|
9608
9923
|
const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
|
|
9609
9924
|
$ZodTransform.init(inst, def);
|
|
9610
9925
|
ZodType$1.init(inst, def);
|
|
@@ -9954,6 +10269,10 @@ function buildRepoId$1(id) {
|
|
|
9954
10269
|
if (id.kind === "workspace" && id.owner === "slate") return `workspace/slate/${segment$1(id.workspaceId, "workspaceId")}`;
|
|
9955
10270
|
throw new Error(`Unhandled repoId variant: ${JSON.stringify(id)}`);
|
|
9956
10271
|
}
|
|
10272
|
+
const CLAUDE_INTERRUPT_MARKERS$1 = {
|
|
10273
|
+
text: "[Request interrupted by user]",
|
|
10274
|
+
tool: "[Request interrupted by user for tool use]"
|
|
10275
|
+
};
|
|
9957
10276
|
const sessionMetaSchema$1 = object$3({
|
|
9958
10277
|
created: string$4().nullable(),
|
|
9959
10278
|
firstPrompt: string$4().nullable(),
|
|
@@ -9966,6 +10285,10 @@ looseObject({
|
|
|
9966
10285
|
type: string$4(),
|
|
9967
10286
|
uuid: string$4().optional()
|
|
9968
10287
|
});
|
|
10288
|
+
looseObject({ content: tuple([looseObject({
|
|
10289
|
+
text: _enum(CLAUDE_INTERRUPT_MARKERS$1),
|
|
10290
|
+
type: literal("text")
|
|
10291
|
+
})]) });
|
|
9969
10292
|
async function ensureWorkspaceCheckout(workspaceId, ctx) {
|
|
9970
10293
|
const repo = await resolveRepo({
|
|
9971
10294
|
platformUrl: ctx.platformUrl,
|
|
@@ -12130,8 +12453,24 @@ const UpdateBindingInput = object$2({
|
|
|
12130
12453
|
enabled: boolean().optional(),
|
|
12131
12454
|
models: BindingModels.optionalNullable()
|
|
12132
12455
|
});
|
|
12456
|
+
const BindingAuthResourceApiKey = object$2({});
|
|
12457
|
+
const BindingAuthResourceAuthenticatedAccount = object$2({
|
|
12458
|
+
accountId: property$1("account_id", string$3()),
|
|
12459
|
+
providerId: property$1("provider_id", string$3())
|
|
12460
|
+
});
|
|
12461
|
+
const BindingAuthResourceClientCredentials = object$2({ clientId: property$1("client_id", string$3()) });
|
|
12462
|
+
const BindingAuthResourceNone = object$2({});
|
|
12463
|
+
const BindingAuthResource = union("type", {
|
|
12464
|
+
api_key: BindingAuthResourceApiKey,
|
|
12465
|
+
authenticated_account: BindingAuthResourceAuthenticatedAccount,
|
|
12466
|
+
client_credentials: BindingAuthResourceClientCredentials,
|
|
12467
|
+
none: BindingAuthResourceNone
|
|
12468
|
+
}).transform({
|
|
12469
|
+
transform: (value) => value,
|
|
12470
|
+
untransform: (value) => value
|
|
12471
|
+
});
|
|
12133
12472
|
const Binding = object$2({
|
|
12134
|
-
auth:
|
|
12473
|
+
auth: BindingAuthResource,
|
|
12135
12474
|
authType: property$1("auth_type", string$3()),
|
|
12136
12475
|
baseId: property$1("base_id", string$3()),
|
|
12137
12476
|
bindingId: property$1("binding_id", string$3()),
|
|
@@ -12943,19 +13282,19 @@ let logging$1;
|
|
|
12943
13282
|
//#region ../base-schemas/dist/index.mjs
|
|
12944
13283
|
const apiKeyAuthSchema = strictObject$1({
|
|
12945
13284
|
api_key: string$5().trim().min(1),
|
|
12946
|
-
type: literal("api_key")
|
|
13285
|
+
type: literal$1("api_key")
|
|
12947
13286
|
}).meta({ title: "ApiKeyAuth" });
|
|
12948
13287
|
const authenticatedAccountRefSchema = strictObject$1({
|
|
12949
13288
|
account_id: string$5().trim().min(1),
|
|
12950
13289
|
provider_id: string$5().trim().min(1),
|
|
12951
|
-
type: literal("authenticated_account")
|
|
13290
|
+
type: literal$1("authenticated_account")
|
|
12952
13291
|
}).meta({ title: "AuthenticatedAccountRef" });
|
|
12953
13292
|
const authenticatedAccountIdentitySchema = authenticatedAccountRefSchema.omit({ type: true }).meta({ title: "AuthenticatedAccountIdentity" });
|
|
12954
|
-
const bindingAuthNoneSchema = strictObject$1({ type: literal("none") }).meta({ title: "BindingAuthNone" });
|
|
13293
|
+
const bindingAuthNoneSchema = strictObject$1({ type: literal$1("none") }).meta({ title: "BindingAuthNone" });
|
|
12955
13294
|
const clientCredentialsAuthSchema = strictObject$1({
|
|
12956
13295
|
client_id: string$5().trim().min(1),
|
|
12957
13296
|
client_secret: string$5().trim().min(1),
|
|
12958
|
-
type: literal("client_credentials")
|
|
13297
|
+
type: literal$1("client_credentials")
|
|
12959
13298
|
}).meta({ title: "ClientCredentialsAuth" });
|
|
12960
13299
|
const bindingAuthSchema = discriminatedUnion("type", [
|
|
12961
13300
|
bindingAuthNoneSchema,
|
|
@@ -12978,11 +13317,11 @@ const dagsterAllPlanBindingSchema = strictObject$1({
|
|
|
12978
13317
|
mode: modeSchema,
|
|
12979
13318
|
models: bindingModelsSchema.optional(),
|
|
12980
13319
|
plugin_id: string$5().trim().min(1)
|
|
12981
|
-
}).meta({ title: "PlanBinding" }).extend({ mode: literal("dagster") }).meta({ title: "DagsterAllPlanBinding" });
|
|
13320
|
+
}).meta({ title: "PlanBinding" }).extend({ mode: literal$1("dagster") }).meta({ title: "DagsterAllPlanBinding" });
|
|
12982
13321
|
const dagsterBindingPlanAllSchema = strictObject$1({
|
|
12983
13322
|
bindings: array$1(dagsterAllPlanBindingSchema),
|
|
12984
13323
|
generated_at: generatedAtSchema,
|
|
12985
|
-
version: literal(1)
|
|
13324
|
+
version: literal$1(1)
|
|
12986
13325
|
}).meta({ title: "DagsterBindingPlanAll" });
|
|
12987
13326
|
const dagsterPluginPlanBindingSchema = dagsterAllPlanBindingSchema.omit({
|
|
12988
13327
|
mode: true,
|
|
@@ -12991,9 +13330,9 @@ const dagsterPluginPlanBindingSchema = dagsterAllPlanBindingSchema.omit({
|
|
|
12991
13330
|
const dagsterBindingPlanPluginSchema = strictObject$1({
|
|
12992
13331
|
bindings: array$1(dagsterPluginPlanBindingSchema),
|
|
12993
13332
|
generated_at: generatedAtSchema,
|
|
12994
|
-
mode: literal("dagster"),
|
|
13333
|
+
mode: literal$1("dagster"),
|
|
12995
13334
|
plugin_id: string$5().trim().min(1),
|
|
12996
|
-
version: literal(1)
|
|
13335
|
+
version: literal$1(1)
|
|
12997
13336
|
}).meta({ title: "DagsterBindingPlanPlugin" });
|
|
12998
13337
|
const RUN_STATUSES = [
|
|
12999
13338
|
"QUEUED",
|
|
@@ -13016,16 +13355,16 @@ const bindingStateSchema = strictObject$1({
|
|
|
13016
13355
|
}).meta({ title: "BindingState" });
|
|
13017
13356
|
const bindingStateResponseSchema = strictObject$1({
|
|
13018
13357
|
bindings: record$2(string$5().uuid(), bindingStateSchema),
|
|
13019
|
-
version: literal(1)
|
|
13358
|
+
version: literal$1(1)
|
|
13020
13359
|
}).meta({ title: "BindingStateResponse" });
|
|
13021
|
-
const pluginAuthNoneSchema = strictObject$1({ type: literal("none") }).meta({ title: "PluginAuthNone" });
|
|
13022
|
-
const pluginAuthApiKeySchema = strictObject$1({ type: literal("api_key") }).meta({ title: "PluginAuthApiKey" });
|
|
13023
|
-
const pluginAuthClientCredentialsSchema = strictObject$1({ type: literal("client_credentials") }).meta({ title: "PluginAuthClientCredentials" });
|
|
13360
|
+
const pluginAuthNoneSchema = strictObject$1({ type: literal$1("none") }).meta({ title: "PluginAuthNone" });
|
|
13361
|
+
const pluginAuthApiKeySchema = strictObject$1({ type: literal$1("api_key") }).meta({ title: "PluginAuthApiKey" });
|
|
13362
|
+
const pluginAuthClientCredentialsSchema = strictObject$1({ type: literal$1("client_credentials") }).meta({ title: "PluginAuthClientCredentials" });
|
|
13024
13363
|
const pluginOAuthSchema = strictObject$1({
|
|
13025
13364
|
provider_id: string$5().trim().min(1),
|
|
13026
13365
|
requires_oauth_app_id: boolean$3().optional(),
|
|
13027
13366
|
scopes: array$1(string$5().trim().min(1)),
|
|
13028
|
-
type: literal("oauth")
|
|
13367
|
+
type: literal$1("oauth")
|
|
13029
13368
|
}).meta({ title: "PluginOAuth" });
|
|
13030
13369
|
const pluginAuthSchema = discriminatedUnion("type", [
|
|
13031
13370
|
pluginAuthNoneSchema,
|
|
@@ -13037,13 +13376,13 @@ const pluginMcpEnabledToolSchema = strictObject$1({ autoAllow: boolean$3().optio
|
|
|
13037
13376
|
const pluginMcpEnabledToolsSchema = record$2(string$5().min(1), pluginMcpEnabledToolSchema).refine((tools) => Object.keys(tools).length > 0, { message: "enabledTools must declare at least one tool" }).meta({ title: "PluginMcpEnabledTools" });
|
|
13038
13377
|
const pluginMcpHttpServerSchema = strictObject$1({
|
|
13039
13378
|
enabledTools: pluginMcpEnabledToolsSchema,
|
|
13040
|
-
type: literal("http"),
|
|
13379
|
+
type: literal$1("http"),
|
|
13041
13380
|
url: url()
|
|
13042
13381
|
}).meta({ title: "PluginMcpHttpServer" });
|
|
13043
13382
|
const pluginMcpModuleServerSchema = strictObject$1({
|
|
13044
13383
|
enabledTools: pluginMcpEnabledToolsSchema,
|
|
13045
13384
|
module: string$5().trim().min(1),
|
|
13046
|
-
type: literal("module")
|
|
13385
|
+
type: literal$1("module")
|
|
13047
13386
|
}).meta({ title: "PluginMcpModuleServer" });
|
|
13048
13387
|
const pluginMcpServerSchema = discriminatedUnion("type", [pluginMcpHttpServerSchema, pluginMcpModuleServerSchema]).meta({ title: "PluginMcpServer" });
|
|
13049
13388
|
const mcpServerNameSchema = string$5().regex(/^[a-z0-9]+(?:_[a-z0-9]+)*$/);
|
|
@@ -14759,6 +15098,40 @@ const _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8
|
|
|
14759
15098
|
|
|
14760
15099
|
//#endregion
|
|
14761
15100
|
//#region ../slate-shared/dist/index.mjs
|
|
15101
|
+
function createClaudeUserMessage(text) {
|
|
15102
|
+
return {
|
|
15103
|
+
message: {
|
|
15104
|
+
content: text,
|
|
15105
|
+
role: "user"
|
|
15106
|
+
},
|
|
15107
|
+
parent_tool_use_id: null,
|
|
15108
|
+
type: "user"
|
|
15109
|
+
};
|
|
15110
|
+
}
|
|
15111
|
+
function createClaudePromptStream() {
|
|
15112
|
+
const queue = [];
|
|
15113
|
+
let resolveNext;
|
|
15114
|
+
async function* messages() {
|
|
15115
|
+
while (true) {
|
|
15116
|
+
const buffered = queue.shift();
|
|
15117
|
+
if (buffered !== void 0) yield buffered;
|
|
15118
|
+
else yield await new Promise((resolve) => {
|
|
15119
|
+
resolveNext = resolve;
|
|
15120
|
+
});
|
|
15121
|
+
}
|
|
15122
|
+
}
|
|
15123
|
+
return {
|
|
15124
|
+
prompt: messages(),
|
|
15125
|
+
push(text) {
|
|
15126
|
+
const message = createClaudeUserMessage(text);
|
|
15127
|
+
if (resolveNext !== void 0) {
|
|
15128
|
+
const resolve = resolveNext;
|
|
15129
|
+
resolveNext = void 0;
|
|
15130
|
+
resolve(message);
|
|
15131
|
+
} else queue.push(message);
|
|
15132
|
+
}
|
|
15133
|
+
};
|
|
15134
|
+
}
|
|
14762
15135
|
const INBOX_DOCS_TREE = {
|
|
14763
15136
|
"docs/types/update.loader.js": `// docs/types/update.loader.js
|
|
14764
15137
|
export default async ({ docs, path }) => {
|
|
@@ -15050,6 +15423,13 @@ function buildRepoId(id) {
|
|
|
15050
15423
|
if (id.kind === "workspace" && id.owner === "slate") return `workspace/slate/${segment(id.workspaceId, "workspaceId")}`;
|
|
15051
15424
|
throw new Error(`Unhandled repoId variant: ${JSON.stringify(id)}`);
|
|
15052
15425
|
}
|
|
15426
|
+
const CLAUDE_INTERRUPT_MARKERS = {
|
|
15427
|
+
text: "[Request interrupted by user]",
|
|
15428
|
+
tool: "[Request interrupted by user for tool use]"
|
|
15429
|
+
};
|
|
15430
|
+
function isStoppedResult(message) {
|
|
15431
|
+
return message.terminal_reason === "aborted_streaming" || message.terminal_reason === "aborted_tools";
|
|
15432
|
+
}
|
|
15053
15433
|
const sessionMetaSchema = object$4({
|
|
15054
15434
|
created: string$5().nullable(),
|
|
15055
15435
|
firstPrompt: string$5().nullable(),
|
|
@@ -15091,6 +15471,10 @@ function singleSessionStore(sessionId, entries) {
|
|
|
15091
15471
|
}
|
|
15092
15472
|
};
|
|
15093
15473
|
}
|
|
15474
|
+
const interruptMarkerMessageSchema = looseObject$1({ content: tuple$1([looseObject$1({
|
|
15475
|
+
text: _enum$1(CLAUDE_INTERRUPT_MARKERS),
|
|
15476
|
+
type: literal$1("text")
|
|
15477
|
+
})]) });
|
|
15094
15478
|
|
|
15095
15479
|
//#endregion
|
|
15096
15480
|
//#region ../../node_modules/.pnpm/undici@8.8.0/node_modules/undici/lib/core/symbols.js
|
|
@@ -40737,7 +41121,7 @@ const OAuthErrorResponseSchema = object$4({
|
|
|
40737
41121
|
/**
|
|
40738
41122
|
* Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri
|
|
40739
41123
|
*/
|
|
40740
|
-
const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal("").transform(() => void 0));
|
|
41124
|
+
const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal$1("").transform(() => void 0));
|
|
40741
41125
|
/**
|
|
40742
41126
|
* RFC 7591 OAuth 2.0 Dynamic Client Registration metadata
|
|
40743
41127
|
*/
|
|
@@ -40849,9 +41233,9 @@ const ClientAuthorizationParamsSchema = object$4({
|
|
|
40849
41233
|
redirect_uri: string$5().optional().refine((value) => value === void 0 || URL.canParse(value), { message: "redirect_uri must be a valid URL" })
|
|
40850
41234
|
});
|
|
40851
41235
|
const RequestAuthorizationParamsSchema = object$4({
|
|
40852
|
-
response_type: literal("code"),
|
|
41236
|
+
response_type: literal$1("code"),
|
|
40853
41237
|
code_challenge: string$5(),
|
|
40854
|
-
code_challenge_method: literal("S256"),
|
|
41238
|
+
code_challenge_method: literal$1("S256"),
|
|
40855
41239
|
scope: string$5().optional(),
|
|
40856
41240
|
state: string$5().optional(),
|
|
40857
41241
|
resource: url().optional()
|
|
@@ -40985,7 +41369,7 @@ const RequestIdSchema = union$2([string$5(), number$4().int()]);
|
|
|
40985
41369
|
* A request that expects a response.
|
|
40986
41370
|
*/
|
|
40987
41371
|
const JSONRPCRequestSchema = object$4({
|
|
40988
|
-
jsonrpc: literal("2.0"),
|
|
41372
|
+
jsonrpc: literal$1("2.0"),
|
|
40989
41373
|
id: RequestIdSchema,
|
|
40990
41374
|
...RequestSchema.shape
|
|
40991
41375
|
}).strict();
|
|
@@ -40994,7 +41378,7 @@ const isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).succes
|
|
|
40994
41378
|
* A notification which does not expect a response.
|
|
40995
41379
|
*/
|
|
40996
41380
|
const JSONRPCNotificationSchema = object$4({
|
|
40997
|
-
jsonrpc: literal("2.0"),
|
|
41381
|
+
jsonrpc: literal$1("2.0"),
|
|
40998
41382
|
...NotificationSchema.shape
|
|
40999
41383
|
}).strict();
|
|
41000
41384
|
const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
@@ -41002,7 +41386,7 @@ const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(val
|
|
|
41002
41386
|
* A successful (non-error) response to a request.
|
|
41003
41387
|
*/
|
|
41004
41388
|
const JSONRPCResultResponseSchema = object$4({
|
|
41005
|
-
jsonrpc: literal("2.0"),
|
|
41389
|
+
jsonrpc: literal$1("2.0"),
|
|
41006
41390
|
id: RequestIdSchema,
|
|
41007
41391
|
result: ResultSchema
|
|
41008
41392
|
}).strict();
|
|
@@ -41031,7 +41415,7 @@ var ErrorCode;
|
|
|
41031
41415
|
* A response to a request that indicates an error occurred.
|
|
41032
41416
|
*/
|
|
41033
41417
|
const JSONRPCErrorResponseSchema = object$4({
|
|
41034
|
-
jsonrpc: literal("2.0"),
|
|
41418
|
+
jsonrpc: literal$1("2.0"),
|
|
41035
41419
|
id: RequestIdSchema.optional(),
|
|
41036
41420
|
error: object$4({
|
|
41037
41421
|
/**
|
|
@@ -41088,7 +41472,7 @@ const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
|
41088
41472
|
* A client MUST NOT attempt to cancel its `initialize` request.
|
|
41089
41473
|
*/
|
|
41090
41474
|
const CancelledNotificationSchema = NotificationSchema.extend({
|
|
41091
|
-
method: literal("notifications/cancelled"),
|
|
41475
|
+
method: literal$1("notifications/cancelled"),
|
|
41092
41476
|
params: CancelledNotificationParamsSchema
|
|
41093
41477
|
});
|
|
41094
41478
|
/**
|
|
@@ -41284,7 +41668,7 @@ const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
41284
41668
|
* This request is sent from the client to the server when it first connects, asking it to begin initialization.
|
|
41285
41669
|
*/
|
|
41286
41670
|
const InitializeRequestSchema = RequestSchema.extend({
|
|
41287
|
-
method: literal("initialize"),
|
|
41671
|
+
method: literal$1("initialize"),
|
|
41288
41672
|
params: InitializeRequestParamsSchema
|
|
41289
41673
|
});
|
|
41290
41674
|
const isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;
|
|
@@ -41363,7 +41747,7 @@ const InitializeResultSchema = ResultSchema.extend({
|
|
|
41363
41747
|
* This notification is sent from the client to the server after initialization has finished.
|
|
41364
41748
|
*/
|
|
41365
41749
|
const InitializedNotificationSchema = NotificationSchema.extend({
|
|
41366
|
-
method: literal("notifications/initialized"),
|
|
41750
|
+
method: literal$1("notifications/initialized"),
|
|
41367
41751
|
params: NotificationsParamsSchema.optional()
|
|
41368
41752
|
});
|
|
41369
41753
|
const isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
@@ -41371,7 +41755,7 @@ const isInitializedNotification = (value) => InitializedNotificationSchema.safeP
|
|
|
41371
41755
|
* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
|
|
41372
41756
|
*/
|
|
41373
41757
|
const PingRequestSchema = RequestSchema.extend({
|
|
41374
|
-
method: literal("ping"),
|
|
41758
|
+
method: literal$1("ping"),
|
|
41375
41759
|
params: BaseRequestParamsSchema.optional()
|
|
41376
41760
|
});
|
|
41377
41761
|
const ProgressSchema = object$4({
|
|
@@ -41402,7 +41786,7 @@ const ProgressNotificationParamsSchema = object$4({
|
|
|
41402
41786
|
* @category notifications/progress
|
|
41403
41787
|
*/
|
|
41404
41788
|
const ProgressNotificationSchema = NotificationSchema.extend({
|
|
41405
|
-
method: literal("notifications/progress"),
|
|
41789
|
+
method: literal$1("notifications/progress"),
|
|
41406
41790
|
params: ProgressNotificationParamsSchema
|
|
41407
41791
|
});
|
|
41408
41792
|
const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -41465,14 +41849,14 @@ const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskS
|
|
|
41465
41849
|
* A notification sent when a task's status changes.
|
|
41466
41850
|
*/
|
|
41467
41851
|
const TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
41468
|
-
method: literal("notifications/tasks/status"),
|
|
41852
|
+
method: literal$1("notifications/tasks/status"),
|
|
41469
41853
|
params: TaskStatusNotificationParamsSchema
|
|
41470
41854
|
});
|
|
41471
41855
|
/**
|
|
41472
41856
|
* A request to get the state of a specific task.
|
|
41473
41857
|
*/
|
|
41474
41858
|
const GetTaskRequestSchema = RequestSchema.extend({
|
|
41475
|
-
method: literal("tasks/get"),
|
|
41859
|
+
method: literal$1("tasks/get"),
|
|
41476
41860
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41477
41861
|
});
|
|
41478
41862
|
/**
|
|
@@ -41483,7 +41867,7 @@ const GetTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
|
41483
41867
|
* A request to get the result of a specific task.
|
|
41484
41868
|
*/
|
|
41485
41869
|
const GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
41486
|
-
method: literal("tasks/result"),
|
|
41870
|
+
method: literal$1("tasks/result"),
|
|
41487
41871
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41488
41872
|
});
|
|
41489
41873
|
/**
|
|
@@ -41496,7 +41880,7 @@ const GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
|
41496
41880
|
/**
|
|
41497
41881
|
* A request to list tasks.
|
|
41498
41882
|
*/
|
|
41499
|
-
const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal("tasks/list") });
|
|
41883
|
+
const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tasks/list") });
|
|
41500
41884
|
/**
|
|
41501
41885
|
* The response to a tasks/list request.
|
|
41502
41886
|
*/
|
|
@@ -41505,7 +41889,7 @@ const ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: array$1(Task
|
|
|
41505
41889
|
* A request to cancel a specific task.
|
|
41506
41890
|
*/
|
|
41507
41891
|
const CancelTaskRequestSchema = RequestSchema.extend({
|
|
41508
|
-
method: literal("tasks/cancel"),
|
|
41892
|
+
method: literal$1("tasks/cancel"),
|
|
41509
41893
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41510
41894
|
});
|
|
41511
41895
|
/**
|
|
@@ -41643,7 +42027,7 @@ const ResourceTemplateSchema = object$4({
|
|
|
41643
42027
|
/**
|
|
41644
42028
|
* Sent from the client to request a list of resources the server has.
|
|
41645
42029
|
*/
|
|
41646
|
-
const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/list") });
|
|
42030
|
+
const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/list") });
|
|
41647
42031
|
/**
|
|
41648
42032
|
* The server's response to a resources/list request from the client.
|
|
41649
42033
|
*/
|
|
@@ -41651,7 +42035,7 @@ const ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: arra
|
|
|
41651
42035
|
/**
|
|
41652
42036
|
* Sent from the client to request a list of resource templates the server has.
|
|
41653
42037
|
*/
|
|
41654
|
-
const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/templates/list") });
|
|
42038
|
+
const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/templates/list") });
|
|
41655
42039
|
/**
|
|
41656
42040
|
* The server's response to a resources/templates/list request from the client.
|
|
41657
42041
|
*/
|
|
@@ -41671,7 +42055,7 @@ const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41671
42055
|
* Sent from the client to the server, to read a specific resource URI.
|
|
41672
42056
|
*/
|
|
41673
42057
|
const ReadResourceRequestSchema = RequestSchema.extend({
|
|
41674
|
-
method: literal("resources/read"),
|
|
42058
|
+
method: literal$1("resources/read"),
|
|
41675
42059
|
params: ReadResourceRequestParamsSchema
|
|
41676
42060
|
});
|
|
41677
42061
|
/**
|
|
@@ -41682,7 +42066,7 @@ const ReadResourceResultSchema = ResultSchema.extend({ contents: array$1(union$2
|
|
|
41682
42066
|
* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
|
|
41683
42067
|
*/
|
|
41684
42068
|
const ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
41685
|
-
method: literal("notifications/resources/list_changed"),
|
|
42069
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
41686
42070
|
params: NotificationsParamsSchema.optional()
|
|
41687
42071
|
});
|
|
41688
42072
|
const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
@@ -41690,7 +42074,7 @@ const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41690
42074
|
* Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
|
|
41691
42075
|
*/
|
|
41692
42076
|
const SubscribeRequestSchema = RequestSchema.extend({
|
|
41693
|
-
method: literal("resources/subscribe"),
|
|
42077
|
+
method: literal$1("resources/subscribe"),
|
|
41694
42078
|
params: SubscribeRequestParamsSchema
|
|
41695
42079
|
});
|
|
41696
42080
|
const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
@@ -41698,7 +42082,7 @@ const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41698
42082
|
* Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
|
|
41699
42083
|
*/
|
|
41700
42084
|
const UnsubscribeRequestSchema = RequestSchema.extend({
|
|
41701
|
-
method: literal("resources/unsubscribe"),
|
|
42085
|
+
method: literal$1("resources/unsubscribe"),
|
|
41702
42086
|
params: UnsubscribeRequestParamsSchema
|
|
41703
42087
|
});
|
|
41704
42088
|
/**
|
|
@@ -41713,7 +42097,7 @@ uri: string$5() });
|
|
|
41713
42097
|
* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
|
|
41714
42098
|
*/
|
|
41715
42099
|
const ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
41716
|
-
method: literal("notifications/resources/updated"),
|
|
42100
|
+
method: literal$1("notifications/resources/updated"),
|
|
41717
42101
|
params: ResourceUpdatedNotificationParamsSchema
|
|
41718
42102
|
});
|
|
41719
42103
|
/**
|
|
@@ -41756,7 +42140,7 @@ const PromptSchema = object$4({
|
|
|
41756
42140
|
/**
|
|
41757
42141
|
* Sent from the client to request a list of prompts and prompt templates the server has.
|
|
41758
42142
|
*/
|
|
41759
|
-
const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal("prompts/list") });
|
|
42143
|
+
const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("prompts/list") });
|
|
41760
42144
|
/**
|
|
41761
42145
|
* The server's response to a prompts/list request from the client.
|
|
41762
42146
|
*/
|
|
@@ -41778,14 +42162,14 @@ const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
41778
42162
|
* Used by the client to get a prompt provided by the server.
|
|
41779
42163
|
*/
|
|
41780
42164
|
const GetPromptRequestSchema = RequestSchema.extend({
|
|
41781
|
-
method: literal("prompts/get"),
|
|
42165
|
+
method: literal$1("prompts/get"),
|
|
41782
42166
|
params: GetPromptRequestParamsSchema
|
|
41783
42167
|
});
|
|
41784
42168
|
/**
|
|
41785
42169
|
* Text provided to or from an LLM.
|
|
41786
42170
|
*/
|
|
41787
42171
|
const TextContentSchema = object$4({
|
|
41788
|
-
type: literal("text"),
|
|
42172
|
+
type: literal$1("text"),
|
|
41789
42173
|
/**
|
|
41790
42174
|
* The text content of the message.
|
|
41791
42175
|
*/
|
|
@@ -41804,7 +42188,7 @@ const TextContentSchema = object$4({
|
|
|
41804
42188
|
* An image provided to or from an LLM.
|
|
41805
42189
|
*/
|
|
41806
42190
|
const ImageContentSchema = object$4({
|
|
41807
|
-
type: literal("image"),
|
|
42191
|
+
type: literal$1("image"),
|
|
41808
42192
|
/**
|
|
41809
42193
|
* The base64-encoded image data.
|
|
41810
42194
|
*/
|
|
@@ -41827,7 +42211,7 @@ const ImageContentSchema = object$4({
|
|
|
41827
42211
|
* An Audio provided to or from an LLM.
|
|
41828
42212
|
*/
|
|
41829
42213
|
const AudioContentSchema = object$4({
|
|
41830
|
-
type: literal("audio"),
|
|
42214
|
+
type: literal$1("audio"),
|
|
41831
42215
|
/**
|
|
41832
42216
|
* The base64-encoded audio data.
|
|
41833
42217
|
*/
|
|
@@ -41851,7 +42235,7 @@ const AudioContentSchema = object$4({
|
|
|
41851
42235
|
* Represents the assistant's request to use a tool.
|
|
41852
42236
|
*/
|
|
41853
42237
|
const ToolUseContentSchema = object$4({
|
|
41854
|
-
type: literal("tool_use"),
|
|
42238
|
+
type: literal$1("tool_use"),
|
|
41855
42239
|
/**
|
|
41856
42240
|
* The name of the tool to invoke.
|
|
41857
42241
|
* Must match a tool name from the request's tools array.
|
|
@@ -41877,7 +42261,7 @@ const ToolUseContentSchema = object$4({
|
|
|
41877
42261
|
* The contents of a resource, embedded into a prompt or tool call result.
|
|
41878
42262
|
*/
|
|
41879
42263
|
const EmbeddedResourceSchema = object$4({
|
|
41880
|
-
type: literal("resource"),
|
|
42264
|
+
type: literal$1("resource"),
|
|
41881
42265
|
resource: union$2([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
41882
42266
|
/**
|
|
41883
42267
|
* Optional annotations for the client.
|
|
@@ -41894,7 +42278,7 @@ const EmbeddedResourceSchema = object$4({
|
|
|
41894
42278
|
*
|
|
41895
42279
|
* Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
|
|
41896
42280
|
*/
|
|
41897
|
-
const ResourceLinkSchema = ResourceSchema.extend({ type: literal("resource_link") });
|
|
42281
|
+
const ResourceLinkSchema = ResourceSchema.extend({ type: literal$1("resource_link") });
|
|
41898
42282
|
/**
|
|
41899
42283
|
* A content block that can be used in prompts and tool results.
|
|
41900
42284
|
*/
|
|
@@ -41926,7 +42310,7 @@ const GetPromptResultSchema = ResultSchema.extend({
|
|
|
41926
42310
|
* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
41927
42311
|
*/
|
|
41928
42312
|
const PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
41929
|
-
method: literal("notifications/prompts/list_changed"),
|
|
42313
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
41930
42314
|
params: NotificationsParamsSchema.optional()
|
|
41931
42315
|
});
|
|
41932
42316
|
/**
|
|
@@ -42010,7 +42394,7 @@ const ToolSchema = object$4({
|
|
|
42010
42394
|
* Must have type: 'object' at the root level per MCP spec.
|
|
42011
42395
|
*/
|
|
42012
42396
|
inputSchema: object$4({
|
|
42013
|
-
type: literal("object"),
|
|
42397
|
+
type: literal$1("object"),
|
|
42014
42398
|
properties: record$2(string$5(), AssertObjectSchema).optional(),
|
|
42015
42399
|
required: array$1(string$5()).optional()
|
|
42016
42400
|
}).catchall(unknown$3()),
|
|
@@ -42020,7 +42404,7 @@ const ToolSchema = object$4({
|
|
|
42020
42404
|
* Must have type: 'object' at the root level per MCP spec.
|
|
42021
42405
|
*/
|
|
42022
42406
|
outputSchema: object$4({
|
|
42023
|
-
type: literal("object"),
|
|
42407
|
+
type: literal$1("object"),
|
|
42024
42408
|
properties: record$2(string$5(), AssertObjectSchema).optional(),
|
|
42025
42409
|
required: array$1(string$5()).optional()
|
|
42026
42410
|
}).catchall(unknown$3()).optional(),
|
|
@@ -42041,7 +42425,7 @@ const ToolSchema = object$4({
|
|
|
42041
42425
|
/**
|
|
42042
42426
|
* Sent from the client to request a list of tools the server has.
|
|
42043
42427
|
*/
|
|
42044
|
-
const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal("tools/list") });
|
|
42428
|
+
const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tools/list") });
|
|
42045
42429
|
/**
|
|
42046
42430
|
* The server's response to a tools/list request from the client.
|
|
42047
42431
|
*/
|
|
@@ -42100,14 +42484,14 @@ const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42100
42484
|
* Used by the client to invoke a tool provided by the server.
|
|
42101
42485
|
*/
|
|
42102
42486
|
const CallToolRequestSchema = RequestSchema.extend({
|
|
42103
|
-
method: literal("tools/call"),
|
|
42487
|
+
method: literal$1("tools/call"),
|
|
42104
42488
|
params: CallToolRequestParamsSchema
|
|
42105
42489
|
});
|
|
42106
42490
|
/**
|
|
42107
42491
|
* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
42108
42492
|
*/
|
|
42109
42493
|
const ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
42110
|
-
method: literal("notifications/tools/list_changed"),
|
|
42494
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
42111
42495
|
params: NotificationsParamsSchema.optional()
|
|
42112
42496
|
});
|
|
42113
42497
|
/**
|
|
@@ -42159,7 +42543,7 @@ level: LoggingLevelSchema });
|
|
|
42159
42543
|
* A request from the client to the server, to enable or adjust logging.
|
|
42160
42544
|
*/
|
|
42161
42545
|
const SetLevelRequestSchema = RequestSchema.extend({
|
|
42162
|
-
method: literal("logging/setLevel"),
|
|
42546
|
+
method: literal$1("logging/setLevel"),
|
|
42163
42547
|
params: SetLevelRequestParamsSchema
|
|
42164
42548
|
});
|
|
42165
42549
|
/**
|
|
@@ -42183,7 +42567,7 @@ const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend(
|
|
|
42183
42567
|
* Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
|
|
42184
42568
|
*/
|
|
42185
42569
|
const LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
42186
|
-
method: literal("notifications/message"),
|
|
42570
|
+
method: literal$1("notifications/message"),
|
|
42187
42571
|
params: LoggingMessageNotificationParamsSchema
|
|
42188
42572
|
});
|
|
42189
42573
|
/**
|
|
@@ -42235,7 +42619,7 @@ mode: _enum$1([
|
|
|
42235
42619
|
* Represents the outcome of invoking a tool requested via ToolUseContent.
|
|
42236
42620
|
*/
|
|
42237
42621
|
const ToolResultContentSchema = object$4({
|
|
42238
|
-
type: literal("tool_result"),
|
|
42622
|
+
type: literal$1("tool_result"),
|
|
42239
42623
|
toolUseId: string$5().describe("The unique identifier for the corresponding tool call."),
|
|
42240
42624
|
content: array$1(ContentBlockSchema).default([]),
|
|
42241
42625
|
structuredContent: object$4({}).loose().optional(),
|
|
@@ -42331,7 +42715,7 @@ const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend
|
|
|
42331
42715
|
* A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
|
|
42332
42716
|
*/
|
|
42333
42717
|
const CreateMessageRequestSchema = RequestSchema.extend({
|
|
42334
|
-
method: literal("sampling/createMessage"),
|
|
42718
|
+
method: literal$1("sampling/createMessage"),
|
|
42335
42719
|
params: CreateMessageRequestParamsSchema
|
|
42336
42720
|
});
|
|
42337
42721
|
/**
|
|
@@ -42401,7 +42785,7 @@ const CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
42401
42785
|
* Primitive schema definition for boolean fields.
|
|
42402
42786
|
*/
|
|
42403
42787
|
const BooleanSchemaSchema = object$4({
|
|
42404
|
-
type: literal("boolean"),
|
|
42788
|
+
type: literal$1("boolean"),
|
|
42405
42789
|
title: string$5().optional(),
|
|
42406
42790
|
description: string$5().optional(),
|
|
42407
42791
|
default: boolean$3().optional()
|
|
@@ -42410,7 +42794,7 @@ const BooleanSchemaSchema = object$4({
|
|
|
42410
42794
|
* Primitive schema definition for string fields.
|
|
42411
42795
|
*/
|
|
42412
42796
|
const StringSchemaSchema = object$4({
|
|
42413
|
-
type: literal("string"),
|
|
42797
|
+
type: literal$1("string"),
|
|
42414
42798
|
title: string$5().optional(),
|
|
42415
42799
|
description: string$5().optional(),
|
|
42416
42800
|
minLength: number$4().optional(),
|
|
@@ -42438,7 +42822,7 @@ const NumberSchemaSchema = object$4({
|
|
|
42438
42822
|
* Schema for single-selection enumeration without display titles for options.
|
|
42439
42823
|
*/
|
|
42440
42824
|
const UntitledSingleSelectEnumSchemaSchema = object$4({
|
|
42441
|
-
type: literal("string"),
|
|
42825
|
+
type: literal$1("string"),
|
|
42442
42826
|
title: string$5().optional(),
|
|
42443
42827
|
description: string$5().optional(),
|
|
42444
42828
|
enum: array$1(string$5()),
|
|
@@ -42448,7 +42832,7 @@ const UntitledSingleSelectEnumSchemaSchema = object$4({
|
|
|
42448
42832
|
* Schema for single-selection enumeration with display titles for each option.
|
|
42449
42833
|
*/
|
|
42450
42834
|
const TitledSingleSelectEnumSchemaSchema = object$4({
|
|
42451
|
-
type: literal("string"),
|
|
42835
|
+
type: literal$1("string"),
|
|
42452
42836
|
title: string$5().optional(),
|
|
42453
42837
|
description: string$5().optional(),
|
|
42454
42838
|
oneOf: array$1(object$4({
|
|
@@ -42462,7 +42846,7 @@ const TitledSingleSelectEnumSchemaSchema = object$4({
|
|
|
42462
42846
|
* This interface will be removed in a future version.
|
|
42463
42847
|
*/
|
|
42464
42848
|
const LegacyTitledEnumSchemaSchema = object$4({
|
|
42465
|
-
type: literal("string"),
|
|
42849
|
+
type: literal$1("string"),
|
|
42466
42850
|
title: string$5().optional(),
|
|
42467
42851
|
description: string$5().optional(),
|
|
42468
42852
|
enum: array$1(string$5()),
|
|
@@ -42474,13 +42858,13 @@ const SingleSelectEnumSchemaSchema = union$2([UntitledSingleSelectEnumSchemaSche
|
|
|
42474
42858
|
* Schema for multiple-selection enumeration without display titles for options.
|
|
42475
42859
|
*/
|
|
42476
42860
|
const UntitledMultiSelectEnumSchemaSchema = object$4({
|
|
42477
|
-
type: literal("array"),
|
|
42861
|
+
type: literal$1("array"),
|
|
42478
42862
|
title: string$5().optional(),
|
|
42479
42863
|
description: string$5().optional(),
|
|
42480
42864
|
minItems: number$4().optional(),
|
|
42481
42865
|
maxItems: number$4().optional(),
|
|
42482
42866
|
items: object$4({
|
|
42483
|
-
type: literal("string"),
|
|
42867
|
+
type: literal$1("string"),
|
|
42484
42868
|
enum: array$1(string$5())
|
|
42485
42869
|
}),
|
|
42486
42870
|
default: array$1(string$5()).optional()
|
|
@@ -42489,7 +42873,7 @@ const UntitledMultiSelectEnumSchemaSchema = object$4({
|
|
|
42489
42873
|
* Schema for multiple-selection enumeration with display titles for each option.
|
|
42490
42874
|
*/
|
|
42491
42875
|
const TitledMultiSelectEnumSchemaSchema = object$4({
|
|
42492
|
-
type: literal("array"),
|
|
42876
|
+
type: literal$1("array"),
|
|
42493
42877
|
title: string$5().optional(),
|
|
42494
42878
|
description: string$5().optional(),
|
|
42495
42879
|
minItems: number$4().optional(),
|
|
@@ -42530,7 +42914,7 @@ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42530
42914
|
*
|
|
42531
42915
|
* Optional for backward compatibility. Clients MUST treat missing mode as "form".
|
|
42532
42916
|
*/
|
|
42533
|
-
mode: literal("form").optional(),
|
|
42917
|
+
mode: literal$1("form").optional(),
|
|
42534
42918
|
/**
|
|
42535
42919
|
* The message to present to the user describing what information is being requested.
|
|
42536
42920
|
*/
|
|
@@ -42540,7 +42924,7 @@ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42540
42924
|
* Only top-level properties are allowed, without nesting.
|
|
42541
42925
|
*/
|
|
42542
42926
|
requestedSchema: object$4({
|
|
42543
|
-
type: literal("object"),
|
|
42927
|
+
type: literal$1("object"),
|
|
42544
42928
|
properties: record$2(string$5(), PrimitiveSchemaDefinitionSchema),
|
|
42545
42929
|
required: array$1(string$5()).optional()
|
|
42546
42930
|
})
|
|
@@ -42552,7 +42936,7 @@ const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42552
42936
|
/**
|
|
42553
42937
|
* The elicitation mode.
|
|
42554
42938
|
*/
|
|
42555
|
-
mode: literal("url"),
|
|
42939
|
+
mode: literal$1("url"),
|
|
42556
42940
|
/**
|
|
42557
42941
|
* The message to present to the user explaining why the interaction is needed.
|
|
42558
42942
|
*/
|
|
@@ -42577,7 +42961,7 @@ const ElicitRequestParamsSchema = union$2([ElicitRequestFormParamsSchema, Elicit
|
|
|
42577
42961
|
* or navigate to a URL (URL mode).
|
|
42578
42962
|
*/
|
|
42579
42963
|
const ElicitRequestSchema = RequestSchema.extend({
|
|
42580
|
-
method: literal("elicitation/create"),
|
|
42964
|
+
method: literal$1("elicitation/create"),
|
|
42581
42965
|
params: ElicitRequestParamsSchema
|
|
42582
42966
|
});
|
|
42583
42967
|
/**
|
|
@@ -42596,7 +42980,7 @@ elicitationId: string$5() });
|
|
|
42596
42980
|
* @category notifications/elicitation/complete
|
|
42597
42981
|
*/
|
|
42598
42982
|
const ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
42599
|
-
method: literal("notifications/elicitation/complete"),
|
|
42983
|
+
method: literal$1("notifications/elicitation/complete"),
|
|
42600
42984
|
params: ElicitationCompleteNotificationParamsSchema
|
|
42601
42985
|
});
|
|
42602
42986
|
/**
|
|
@@ -42631,7 +43015,7 @@ const ElicitResultSchema = ResultSchema.extend({
|
|
|
42631
43015
|
* A reference to a resource or resource template definition.
|
|
42632
43016
|
*/
|
|
42633
43017
|
const ResourceTemplateReferenceSchema = object$4({
|
|
42634
|
-
type: literal("ref/resource"),
|
|
43018
|
+
type: literal$1("ref/resource"),
|
|
42635
43019
|
/**
|
|
42636
43020
|
* The URI or URI template of the resource.
|
|
42637
43021
|
*/
|
|
@@ -42641,7 +43025,7 @@ const ResourceTemplateReferenceSchema = object$4({
|
|
|
42641
43025
|
* Identifies a prompt.
|
|
42642
43026
|
*/
|
|
42643
43027
|
const PromptReferenceSchema = object$4({
|
|
42644
|
-
type: literal("ref/prompt"),
|
|
43028
|
+
type: literal$1("ref/prompt"),
|
|
42645
43029
|
/**
|
|
42646
43030
|
* The name of the prompt or prompt template
|
|
42647
43031
|
*/
|
|
@@ -42675,7 +43059,7 @@ arguments: record$2(string$5(), string$5()).optional() }).optional()
|
|
|
42675
43059
|
* A request from the client to the server, to ask for completion options.
|
|
42676
43060
|
*/
|
|
42677
43061
|
const CompleteRequestSchema = RequestSchema.extend({
|
|
42678
|
-
method: literal("completion/complete"),
|
|
43062
|
+
method: literal$1("completion/complete"),
|
|
42679
43063
|
params: CompleteRequestParamsSchema
|
|
42680
43064
|
});
|
|
42681
43065
|
function assertCompleteRequestPrompt(request) {
|
|
@@ -42723,7 +43107,7 @@ const RootSchema = object$4({
|
|
|
42723
43107
|
* Sent from the server to request a list of root URIs from the client.
|
|
42724
43108
|
*/
|
|
42725
43109
|
const ListRootsRequestSchema = RequestSchema.extend({
|
|
42726
|
-
method: literal("roots/list"),
|
|
43110
|
+
method: literal$1("roots/list"),
|
|
42727
43111
|
params: BaseRequestParamsSchema.optional()
|
|
42728
43112
|
});
|
|
42729
43113
|
/**
|
|
@@ -42734,7 +43118,7 @@ const ListRootsResultSchema = ResultSchema.extend({ roots: array$1(RootSchema) }
|
|
|
42734
43118
|
* A notification from the client to the server, informing it that the list of roots has changed.
|
|
42735
43119
|
*/
|
|
42736
43120
|
const RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
42737
|
-
method: literal("notifications/roots/list_changed"),
|
|
43121
|
+
method: literal$1("notifications/roots/list_changed"),
|
|
42738
43122
|
params: NotificationsParamsSchema.optional()
|
|
42739
43123
|
});
|
|
42740
43124
|
const ClientRequestSchema = union$2([
|
|
@@ -58873,7 +59257,7 @@ const OPERATION_SET_STATUS = {
|
|
|
58873
59257
|
};
|
|
58874
59258
|
const operationSetRowSchema = object$4({
|
|
58875
59259
|
_msdyn_psserrorlog_value: string$5().nullish(),
|
|
58876
|
-
msdyn_status: literal([
|
|
59260
|
+
msdyn_status: literal$1([
|
|
58877
59261
|
19235e4,
|
|
58878
59262
|
192350001,
|
|
58879
59263
|
192350002,
|
|
@@ -59138,7 +59522,7 @@ function createScheduleApiClient(config) {
|
|
|
59138
59522
|
})
|
|
59139
59523
|
};
|
|
59140
59524
|
}
|
|
59141
|
-
const SERVER_VERSION = "0.5.
|
|
59525
|
+
const SERVER_VERSION = "0.5.27";
|
|
59142
59526
|
/** The most operations one OperationSet will carry. The service's own ceiling. */
|
|
59143
59527
|
const MAX_OPERATIONS = 200;
|
|
59144
59528
|
/**
|
|
@@ -59174,7 +59558,7 @@ const taskCreate = strictObject$1({
|
|
|
59174
59558
|
bucket: bucketRef().describe("The bucket the task goes in"),
|
|
59175
59559
|
description: string$5().optional().describe("Body text for the task, shown under its name"),
|
|
59176
59560
|
finish: instant.optional().describe("When the task is due"),
|
|
59177
|
-
kind: literal("task"),
|
|
59561
|
+
kind: literal$1("task"),
|
|
59178
59562
|
name: string$5().min(1).describe("The new task's name"),
|
|
59179
59563
|
outline_level: number$4().int().min(1).default(1).describe("1 for a top-level task. A subtask is its parent's level plus one — read the parent's msdyn_outlinelevel from the synced tables."),
|
|
59180
59564
|
parent_task: taskRef().optional().describe("Makes this a subtask of that task"),
|
|
@@ -59183,17 +59567,17 @@ const taskCreate = strictObject$1({
|
|
|
59183
59567
|
start: instant.optional().describe("When work on the task starts")
|
|
59184
59568
|
});
|
|
59185
59569
|
const bucketCreate = strictObject$1({
|
|
59186
|
-
kind: literal("bucket"),
|
|
59570
|
+
kind: literal$1("bucket"),
|
|
59187
59571
|
name: string$5().min(1).describe("The new bucket's name"),
|
|
59188
59572
|
ref: string$5().min(1).optional().describe("Name this bucket so tasks in this same submission can go into it")
|
|
59189
59573
|
});
|
|
59190
59574
|
const taskLabelCreate = strictObject$1({
|
|
59191
|
-
kind: literal("task_label"),
|
|
59575
|
+
kind: literal$1("task_label"),
|
|
59192
59576
|
label: existing("label", "msdyn_projectlabelid").describe("The label to put on the task"),
|
|
59193
59577
|
task: taskRef().describe("The task getting the label")
|
|
59194
59578
|
});
|
|
59195
59579
|
const assignmentCreate = strictObject$1({
|
|
59196
|
-
kind: literal("assignment"),
|
|
59580
|
+
kind: literal$1("assignment"),
|
|
59197
59581
|
member: existing("project team member", "msdyn_projectteamid").describe("The team member to assign, from msdyn_projectteams"),
|
|
59198
59582
|
name: string$5().min(1).describe("A label for the assignment, shown on the approval card"),
|
|
59199
59583
|
task: taskRef().describe("The task to assign. A task that has subtasks CANNOT be assigned to — the service refuses it.")
|
|
@@ -59204,7 +59588,7 @@ const taskUpdate = strictObject$1({
|
|
|
59204
59588
|
duration: number$4().optional().describe("Working days. Writing this moves the finish."),
|
|
59205
59589
|
effort: number$4().optional().describe("Hours of work"),
|
|
59206
59590
|
finish: instant.optional(),
|
|
59207
|
-
kind: literal("task"),
|
|
59591
|
+
kind: literal$1("task"),
|
|
59208
59592
|
name: string$5().min(1).optional().describe("Rename the task to this"),
|
|
59209
59593
|
parent_task: taskRef().optional(),
|
|
59210
59594
|
priority: number$4().int().min(0).max(10).optional(),
|
|
@@ -59214,25 +59598,25 @@ const taskUpdate = strictObject$1({
|
|
|
59214
59598
|
}).refine((input) => input.bucket !== void 0 || input.description !== void 0 || input.duration !== void 0 || input.effort !== void 0 || input.finish !== void 0 || input.name !== void 0 || input.parent_task !== void 0 || input.priority !== void 0 || input.progress !== void 0 || input.start !== void 0, { message: "Nothing to update — a task update needs at least one changed field." });
|
|
59215
59599
|
const bucketUpdate = strictObject$1({
|
|
59216
59600
|
bucket: bucketRef().describe("The bucket to change"),
|
|
59217
|
-
kind: literal("bucket"),
|
|
59601
|
+
kind: literal$1("bucket"),
|
|
59218
59602
|
name: string$5().min(1).describe("Rename the bucket to this")
|
|
59219
59603
|
});
|
|
59220
59604
|
const labelUpdate = strictObject$1({
|
|
59221
|
-
kind: literal("label"),
|
|
59605
|
+
kind: literal$1("label"),
|
|
59222
59606
|
label: existing("label", "msdyn_projectlabelid"),
|
|
59223
59607
|
text: string$5().describe("The label's name. A project's labels start unnamed; clearing the text retires one.")
|
|
59224
59608
|
});
|
|
59225
59609
|
const taskDelete = strictObject$1({
|
|
59226
|
-
kind: literal("task"),
|
|
59610
|
+
kind: literal$1("task"),
|
|
59227
59611
|
task: existing("task", "msdyn_projecttaskid")
|
|
59228
59612
|
});
|
|
59229
59613
|
const taskLabelDelete = strictObject$1({
|
|
59230
|
-
kind: literal("task_label"),
|
|
59614
|
+
kind: literal$1("task_label"),
|
|
59231
59615
|
link: existing("task-label link", "msdyn_projecttasktolabelid")
|
|
59232
59616
|
});
|
|
59233
59617
|
const assignmentDelete = strictObject$1({
|
|
59234
59618
|
assignment: existing("assignment", "msdyn_resourceassignmentid"),
|
|
59235
|
-
kind: literal("assignment")
|
|
59619
|
+
kind: literal$1("assignment")
|
|
59236
59620
|
});
|
|
59237
59621
|
const createOperationSchema = discriminatedUnion("kind", [
|
|
59238
59622
|
taskCreate,
|
|
@@ -98186,7 +98570,7 @@ async function provisionEphemeralDatabases(opts) {
|
|
|
98186
98570
|
}
|
|
98187
98571
|
|
|
98188
98572
|
//#endregion
|
|
98189
|
-
//#region ../slate-bridge/dist/platform-harness-
|
|
98573
|
+
//#region ../slate-bridge/dist/platform-harness-DyM4tmfZ.mjs
|
|
98190
98574
|
const nonEmptyStringSchema = string$5().trim().min(1);
|
|
98191
98575
|
const portSchema = number$3().int().min(0).max(65535).default(7777);
|
|
98192
98576
|
const envSchema = object$4({
|
|
@@ -98195,7 +98579,7 @@ const envSchema = object$4({
|
|
|
98195
98579
|
CTX_PLATFORM_URL: url().default("http://127.0.0.1:3010").transform((url) => url.replace(/\/+$/, "")),
|
|
98196
98580
|
CTX_WEB_URL: url().default("http://localhost:3000").transform((url) => url.replace(/\/+$/, "")),
|
|
98197
98581
|
CTXS_BRIDGE_PORT: portSchema,
|
|
98198
|
-
CTXS_CLAUDE_IMAGE: nonEmptyStringSchema.default("ghcr.io/usecontextlayer/ctx-sandbox:0.5.
|
|
98582
|
+
CTXS_CLAUDE_IMAGE: nonEmptyStringSchema.default("ghcr.io/usecontextlayer/ctx-sandbox:0.5.27"),
|
|
98199
98583
|
CTXS_CLAUDE_MODEL: nonEmptyStringSchema.default("opus"),
|
|
98200
98584
|
CTXS_HOST_CLAUDE_JSON_PATH: nonEmptyStringSchema.default(() => path.join(os.homedir(), ".claude.json")),
|
|
98201
98585
|
NODE_ENV: _enum$1([
|
|
@@ -99608,14 +99992,10 @@ function transcriptRowText(row) {
|
|
|
99608
99992
|
if (!Array.isArray(content)) return "";
|
|
99609
99993
|
return content.map((block) => typeof block === "object" && block !== null && "text" in block ? String(block.text ?? "") : "").join("\n");
|
|
99610
99994
|
}
|
|
99611
|
-
const INTERRUPT_MARKER = {
|
|
99612
|
-
text: "[Request interrupted by user]",
|
|
99613
|
-
tool: "[Request interrupted by user for tool use]"
|
|
99614
|
-
};
|
|
99615
99995
|
function assertInterruptPersisted(scenario, history) {
|
|
99616
99996
|
const phases = new Set(scenario.turns.map(turnInterruptPhase).filter((phase) => phase !== void 0));
|
|
99617
99997
|
for (const phase of phases) {
|
|
99618
|
-
const marker =
|
|
99998
|
+
const marker = CLAUDE_INTERRUPT_MARKERS[phase];
|
|
99619
99999
|
if (!history.some((row) => transcriptRowText(row).includes(marker))) throw new Error(`[parity] scenario "${scenario.name}": declared interrupt:"${phase}" but the captured transcript carries no ${marker} row — the stream aborted without the transcript recording it`);
|
|
99620
100000
|
}
|
|
99621
100001
|
}
|
|
@@ -99630,7 +100010,7 @@ function assertTurnInterruptionOutcome(scenario, turnNumber, result, expectedInt
|
|
|
99630
100010
|
return;
|
|
99631
100011
|
}
|
|
99632
100012
|
if (result.subtype === "success") throw new Error(`${where} declared interrupt:"${expectedInterruptPhase}" but ended success — the interrupt did not land`);
|
|
99633
|
-
if (result
|
|
100013
|
+
if (!isStoppedResult(result)) throw new Error(`${where} declared interrupt:"${expectedInterruptPhase}" but ended ${result.subtype} with terminal_reason ${String(result.terminal_reason)} — that is a failure, not an interrupt`);
|
|
99634
100014
|
}
|
|
99635
100015
|
async function captureScenarioStream(server, scenario, options) {
|
|
99636
100016
|
const ac = new AbortController();
|
|
@@ -99638,35 +100018,10 @@ async function captureScenarioStream(server, scenario, options) {
|
|
|
99638
100018
|
try {
|
|
99639
100019
|
const sessionId = crypto.randomUUID();
|
|
99640
100020
|
const url = `ws://127.0.0.1:${server.port}/bridge/workspaces/${options.workspaceId}/sessions/${sessionId}/wss?token=${encodeURIComponent(options.ctxToken)}`;
|
|
99641
|
-
const
|
|
99642
|
-
let resolveNext = null;
|
|
99643
|
-
const pushTurn = (text) => {
|
|
99644
|
-
const message = {
|
|
99645
|
-
message: {
|
|
99646
|
-
content: text,
|
|
99647
|
-
role: "user"
|
|
99648
|
-
},
|
|
99649
|
-
parent_tool_use_id: null,
|
|
99650
|
-
type: "user"
|
|
99651
|
-
};
|
|
99652
|
-
if (resolveNext) {
|
|
99653
|
-
const resolve = resolveNext;
|
|
99654
|
-
resolveNext = null;
|
|
99655
|
-
resolve(message);
|
|
99656
|
-
} else queue.push(message);
|
|
99657
|
-
};
|
|
99658
|
-
async function* promptGen() {
|
|
99659
|
-
while (true) {
|
|
99660
|
-
const buffered = queue.shift();
|
|
99661
|
-
if (buffered !== void 0) yield buffered;
|
|
99662
|
-
else yield await new Promise((resolve) => {
|
|
99663
|
-
resolveNext = resolve;
|
|
99664
|
-
});
|
|
99665
|
-
}
|
|
99666
|
-
}
|
|
100021
|
+
const promptStream = createClaudePromptStream();
|
|
99667
100022
|
const claudeQuery = query({
|
|
99668
100023
|
abortController: ac,
|
|
99669
|
-
prompt:
|
|
100024
|
+
prompt: promptStream.prompt,
|
|
99670
100025
|
websocket: { url }
|
|
99671
100026
|
});
|
|
99672
100027
|
iter = claudeQuery;
|
|
@@ -99677,7 +100032,7 @@ async function captureScenarioStream(server, scenario, options) {
|
|
|
99677
100032
|
const sendNextTurn = () => {
|
|
99678
100033
|
const turn = scenario.turns[sentTurnCount];
|
|
99679
100034
|
if (turn === void 0) return false;
|
|
99680
|
-
|
|
100035
|
+
promptStream.push(turnPrompt(turn));
|
|
99681
100036
|
expectedInterruptPhase = turnInterruptPhase(turn);
|
|
99682
100037
|
interruptFired = false;
|
|
99683
100038
|
sentTurnCount += 1;
|
|
@@ -103751,4 +104106,4 @@ runCli().catch((error) => {
|
|
|
103751
104106
|
//#endregion
|
|
103752
104107
|
export { createProgram, runCli };
|
|
103753
104108
|
//# sourceMappingURL=cli.mjs.map
|
|
103754
|
-
//# debugId=
|
|
104109
|
+
//# debugId=405dec0e-73a1-5331-873c-4bcf5de3c90e
|