@usecontextlayer/ctxs 0.5.25 → 0.5.26
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 +475 -136
- 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]="706efdec-7252-5edd-aee9-ff839acf6fa2")}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.26";
|
|
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,
|
|
@@ -12943,19 +13266,19 @@ let logging$1;
|
|
|
12943
13266
|
//#region ../base-schemas/dist/index.mjs
|
|
12944
13267
|
const apiKeyAuthSchema = strictObject$1({
|
|
12945
13268
|
api_key: string$5().trim().min(1),
|
|
12946
|
-
type: literal("api_key")
|
|
13269
|
+
type: literal$1("api_key")
|
|
12947
13270
|
}).meta({ title: "ApiKeyAuth" });
|
|
12948
13271
|
const authenticatedAccountRefSchema = strictObject$1({
|
|
12949
13272
|
account_id: string$5().trim().min(1),
|
|
12950
13273
|
provider_id: string$5().trim().min(1),
|
|
12951
|
-
type: literal("authenticated_account")
|
|
13274
|
+
type: literal$1("authenticated_account")
|
|
12952
13275
|
}).meta({ title: "AuthenticatedAccountRef" });
|
|
12953
13276
|
const authenticatedAccountIdentitySchema = authenticatedAccountRefSchema.omit({ type: true }).meta({ title: "AuthenticatedAccountIdentity" });
|
|
12954
|
-
const bindingAuthNoneSchema = strictObject$1({ type: literal("none") }).meta({ title: "BindingAuthNone" });
|
|
13277
|
+
const bindingAuthNoneSchema = strictObject$1({ type: literal$1("none") }).meta({ title: "BindingAuthNone" });
|
|
12955
13278
|
const clientCredentialsAuthSchema = strictObject$1({
|
|
12956
13279
|
client_id: string$5().trim().min(1),
|
|
12957
13280
|
client_secret: string$5().trim().min(1),
|
|
12958
|
-
type: literal("client_credentials")
|
|
13281
|
+
type: literal$1("client_credentials")
|
|
12959
13282
|
}).meta({ title: "ClientCredentialsAuth" });
|
|
12960
13283
|
const bindingAuthSchema = discriminatedUnion("type", [
|
|
12961
13284
|
bindingAuthNoneSchema,
|
|
@@ -12978,11 +13301,11 @@ const dagsterAllPlanBindingSchema = strictObject$1({
|
|
|
12978
13301
|
mode: modeSchema,
|
|
12979
13302
|
models: bindingModelsSchema.optional(),
|
|
12980
13303
|
plugin_id: string$5().trim().min(1)
|
|
12981
|
-
}).meta({ title: "PlanBinding" }).extend({ mode: literal("dagster") }).meta({ title: "DagsterAllPlanBinding" });
|
|
13304
|
+
}).meta({ title: "PlanBinding" }).extend({ mode: literal$1("dagster") }).meta({ title: "DagsterAllPlanBinding" });
|
|
12982
13305
|
const dagsterBindingPlanAllSchema = strictObject$1({
|
|
12983
13306
|
bindings: array$1(dagsterAllPlanBindingSchema),
|
|
12984
13307
|
generated_at: generatedAtSchema,
|
|
12985
|
-
version: literal(1)
|
|
13308
|
+
version: literal$1(1)
|
|
12986
13309
|
}).meta({ title: "DagsterBindingPlanAll" });
|
|
12987
13310
|
const dagsterPluginPlanBindingSchema = dagsterAllPlanBindingSchema.omit({
|
|
12988
13311
|
mode: true,
|
|
@@ -12991,9 +13314,9 @@ const dagsterPluginPlanBindingSchema = dagsterAllPlanBindingSchema.omit({
|
|
|
12991
13314
|
const dagsterBindingPlanPluginSchema = strictObject$1({
|
|
12992
13315
|
bindings: array$1(dagsterPluginPlanBindingSchema),
|
|
12993
13316
|
generated_at: generatedAtSchema,
|
|
12994
|
-
mode: literal("dagster"),
|
|
13317
|
+
mode: literal$1("dagster"),
|
|
12995
13318
|
plugin_id: string$5().trim().min(1),
|
|
12996
|
-
version: literal(1)
|
|
13319
|
+
version: literal$1(1)
|
|
12997
13320
|
}).meta({ title: "DagsterBindingPlanPlugin" });
|
|
12998
13321
|
const RUN_STATUSES = [
|
|
12999
13322
|
"QUEUED",
|
|
@@ -13016,16 +13339,16 @@ const bindingStateSchema = strictObject$1({
|
|
|
13016
13339
|
}).meta({ title: "BindingState" });
|
|
13017
13340
|
const bindingStateResponseSchema = strictObject$1({
|
|
13018
13341
|
bindings: record$2(string$5().uuid(), bindingStateSchema),
|
|
13019
|
-
version: literal(1)
|
|
13342
|
+
version: literal$1(1)
|
|
13020
13343
|
}).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" });
|
|
13344
|
+
const pluginAuthNoneSchema = strictObject$1({ type: literal$1("none") }).meta({ title: "PluginAuthNone" });
|
|
13345
|
+
const pluginAuthApiKeySchema = strictObject$1({ type: literal$1("api_key") }).meta({ title: "PluginAuthApiKey" });
|
|
13346
|
+
const pluginAuthClientCredentialsSchema = strictObject$1({ type: literal$1("client_credentials") }).meta({ title: "PluginAuthClientCredentials" });
|
|
13024
13347
|
const pluginOAuthSchema = strictObject$1({
|
|
13025
13348
|
provider_id: string$5().trim().min(1),
|
|
13026
13349
|
requires_oauth_app_id: boolean$3().optional(),
|
|
13027
13350
|
scopes: array$1(string$5().trim().min(1)),
|
|
13028
|
-
type: literal("oauth")
|
|
13351
|
+
type: literal$1("oauth")
|
|
13029
13352
|
}).meta({ title: "PluginOAuth" });
|
|
13030
13353
|
const pluginAuthSchema = discriminatedUnion("type", [
|
|
13031
13354
|
pluginAuthNoneSchema,
|
|
@@ -13037,13 +13360,13 @@ const pluginMcpEnabledToolSchema = strictObject$1({ autoAllow: boolean$3().optio
|
|
|
13037
13360
|
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
13361
|
const pluginMcpHttpServerSchema = strictObject$1({
|
|
13039
13362
|
enabledTools: pluginMcpEnabledToolsSchema,
|
|
13040
|
-
type: literal("http"),
|
|
13363
|
+
type: literal$1("http"),
|
|
13041
13364
|
url: url()
|
|
13042
13365
|
}).meta({ title: "PluginMcpHttpServer" });
|
|
13043
13366
|
const pluginMcpModuleServerSchema = strictObject$1({
|
|
13044
13367
|
enabledTools: pluginMcpEnabledToolsSchema,
|
|
13045
13368
|
module: string$5().trim().min(1),
|
|
13046
|
-
type: literal("module")
|
|
13369
|
+
type: literal$1("module")
|
|
13047
13370
|
}).meta({ title: "PluginMcpModuleServer" });
|
|
13048
13371
|
const pluginMcpServerSchema = discriminatedUnion("type", [pluginMcpHttpServerSchema, pluginMcpModuleServerSchema]).meta({ title: "PluginMcpServer" });
|
|
13049
13372
|
const mcpServerNameSchema = string$5().regex(/^[a-z0-9]+(?:_[a-z0-9]+)*$/);
|
|
@@ -14759,6 +15082,40 @@ const _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8
|
|
|
14759
15082
|
|
|
14760
15083
|
//#endregion
|
|
14761
15084
|
//#region ../slate-shared/dist/index.mjs
|
|
15085
|
+
function createClaudeUserMessage(text) {
|
|
15086
|
+
return {
|
|
15087
|
+
message: {
|
|
15088
|
+
content: text,
|
|
15089
|
+
role: "user"
|
|
15090
|
+
},
|
|
15091
|
+
parent_tool_use_id: null,
|
|
15092
|
+
type: "user"
|
|
15093
|
+
};
|
|
15094
|
+
}
|
|
15095
|
+
function createClaudePromptStream() {
|
|
15096
|
+
const queue = [];
|
|
15097
|
+
let resolveNext;
|
|
15098
|
+
async function* messages() {
|
|
15099
|
+
while (true) {
|
|
15100
|
+
const buffered = queue.shift();
|
|
15101
|
+
if (buffered !== void 0) yield buffered;
|
|
15102
|
+
else yield await new Promise((resolve) => {
|
|
15103
|
+
resolveNext = resolve;
|
|
15104
|
+
});
|
|
15105
|
+
}
|
|
15106
|
+
}
|
|
15107
|
+
return {
|
|
15108
|
+
prompt: messages(),
|
|
15109
|
+
push(text) {
|
|
15110
|
+
const message = createClaudeUserMessage(text);
|
|
15111
|
+
if (resolveNext !== void 0) {
|
|
15112
|
+
const resolve = resolveNext;
|
|
15113
|
+
resolveNext = void 0;
|
|
15114
|
+
resolve(message);
|
|
15115
|
+
} else queue.push(message);
|
|
15116
|
+
}
|
|
15117
|
+
};
|
|
15118
|
+
}
|
|
14762
15119
|
const INBOX_DOCS_TREE = {
|
|
14763
15120
|
"docs/types/update.loader.js": `// docs/types/update.loader.js
|
|
14764
15121
|
export default async ({ docs, path }) => {
|
|
@@ -15050,6 +15407,13 @@ function buildRepoId(id) {
|
|
|
15050
15407
|
if (id.kind === "workspace" && id.owner === "slate") return `workspace/slate/${segment(id.workspaceId, "workspaceId")}`;
|
|
15051
15408
|
throw new Error(`Unhandled repoId variant: ${JSON.stringify(id)}`);
|
|
15052
15409
|
}
|
|
15410
|
+
const CLAUDE_INTERRUPT_MARKERS = {
|
|
15411
|
+
text: "[Request interrupted by user]",
|
|
15412
|
+
tool: "[Request interrupted by user for tool use]"
|
|
15413
|
+
};
|
|
15414
|
+
function isStoppedResult(message) {
|
|
15415
|
+
return message.terminal_reason === "aborted_streaming" || message.terminal_reason === "aborted_tools";
|
|
15416
|
+
}
|
|
15053
15417
|
const sessionMetaSchema = object$4({
|
|
15054
15418
|
created: string$5().nullable(),
|
|
15055
15419
|
firstPrompt: string$5().nullable(),
|
|
@@ -15091,6 +15455,10 @@ function singleSessionStore(sessionId, entries) {
|
|
|
15091
15455
|
}
|
|
15092
15456
|
};
|
|
15093
15457
|
}
|
|
15458
|
+
const interruptMarkerMessageSchema = looseObject$1({ content: tuple$1([looseObject$1({
|
|
15459
|
+
text: _enum$1(CLAUDE_INTERRUPT_MARKERS),
|
|
15460
|
+
type: literal$1("text")
|
|
15461
|
+
})]) });
|
|
15094
15462
|
|
|
15095
15463
|
//#endregion
|
|
15096
15464
|
//#region ../../node_modules/.pnpm/undici@8.8.0/node_modules/undici/lib/core/symbols.js
|
|
@@ -40737,7 +41105,7 @@ const OAuthErrorResponseSchema = object$4({
|
|
|
40737
41105
|
/**
|
|
40738
41106
|
* Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri
|
|
40739
41107
|
*/
|
|
40740
|
-
const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal("").transform(() => void 0));
|
|
41108
|
+
const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal$1("").transform(() => void 0));
|
|
40741
41109
|
/**
|
|
40742
41110
|
* RFC 7591 OAuth 2.0 Dynamic Client Registration metadata
|
|
40743
41111
|
*/
|
|
@@ -40849,9 +41217,9 @@ const ClientAuthorizationParamsSchema = object$4({
|
|
|
40849
41217
|
redirect_uri: string$5().optional().refine((value) => value === void 0 || URL.canParse(value), { message: "redirect_uri must be a valid URL" })
|
|
40850
41218
|
});
|
|
40851
41219
|
const RequestAuthorizationParamsSchema = object$4({
|
|
40852
|
-
response_type: literal("code"),
|
|
41220
|
+
response_type: literal$1("code"),
|
|
40853
41221
|
code_challenge: string$5(),
|
|
40854
|
-
code_challenge_method: literal("S256"),
|
|
41222
|
+
code_challenge_method: literal$1("S256"),
|
|
40855
41223
|
scope: string$5().optional(),
|
|
40856
41224
|
state: string$5().optional(),
|
|
40857
41225
|
resource: url().optional()
|
|
@@ -40985,7 +41353,7 @@ const RequestIdSchema = union$2([string$5(), number$4().int()]);
|
|
|
40985
41353
|
* A request that expects a response.
|
|
40986
41354
|
*/
|
|
40987
41355
|
const JSONRPCRequestSchema = object$4({
|
|
40988
|
-
jsonrpc: literal("2.0"),
|
|
41356
|
+
jsonrpc: literal$1("2.0"),
|
|
40989
41357
|
id: RequestIdSchema,
|
|
40990
41358
|
...RequestSchema.shape
|
|
40991
41359
|
}).strict();
|
|
@@ -40994,7 +41362,7 @@ const isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).succes
|
|
|
40994
41362
|
* A notification which does not expect a response.
|
|
40995
41363
|
*/
|
|
40996
41364
|
const JSONRPCNotificationSchema = object$4({
|
|
40997
|
-
jsonrpc: literal("2.0"),
|
|
41365
|
+
jsonrpc: literal$1("2.0"),
|
|
40998
41366
|
...NotificationSchema.shape
|
|
40999
41367
|
}).strict();
|
|
41000
41368
|
const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
@@ -41002,7 +41370,7 @@ const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(val
|
|
|
41002
41370
|
* A successful (non-error) response to a request.
|
|
41003
41371
|
*/
|
|
41004
41372
|
const JSONRPCResultResponseSchema = object$4({
|
|
41005
|
-
jsonrpc: literal("2.0"),
|
|
41373
|
+
jsonrpc: literal$1("2.0"),
|
|
41006
41374
|
id: RequestIdSchema,
|
|
41007
41375
|
result: ResultSchema
|
|
41008
41376
|
}).strict();
|
|
@@ -41031,7 +41399,7 @@ var ErrorCode;
|
|
|
41031
41399
|
* A response to a request that indicates an error occurred.
|
|
41032
41400
|
*/
|
|
41033
41401
|
const JSONRPCErrorResponseSchema = object$4({
|
|
41034
|
-
jsonrpc: literal("2.0"),
|
|
41402
|
+
jsonrpc: literal$1("2.0"),
|
|
41035
41403
|
id: RequestIdSchema.optional(),
|
|
41036
41404
|
error: object$4({
|
|
41037
41405
|
/**
|
|
@@ -41088,7 +41456,7 @@ const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
|
41088
41456
|
* A client MUST NOT attempt to cancel its `initialize` request.
|
|
41089
41457
|
*/
|
|
41090
41458
|
const CancelledNotificationSchema = NotificationSchema.extend({
|
|
41091
|
-
method: literal("notifications/cancelled"),
|
|
41459
|
+
method: literal$1("notifications/cancelled"),
|
|
41092
41460
|
params: CancelledNotificationParamsSchema
|
|
41093
41461
|
});
|
|
41094
41462
|
/**
|
|
@@ -41284,7 +41652,7 @@ const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
41284
41652
|
* This request is sent from the client to the server when it first connects, asking it to begin initialization.
|
|
41285
41653
|
*/
|
|
41286
41654
|
const InitializeRequestSchema = RequestSchema.extend({
|
|
41287
|
-
method: literal("initialize"),
|
|
41655
|
+
method: literal$1("initialize"),
|
|
41288
41656
|
params: InitializeRequestParamsSchema
|
|
41289
41657
|
});
|
|
41290
41658
|
const isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;
|
|
@@ -41363,7 +41731,7 @@ const InitializeResultSchema = ResultSchema.extend({
|
|
|
41363
41731
|
* This notification is sent from the client to the server after initialization has finished.
|
|
41364
41732
|
*/
|
|
41365
41733
|
const InitializedNotificationSchema = NotificationSchema.extend({
|
|
41366
|
-
method: literal("notifications/initialized"),
|
|
41734
|
+
method: literal$1("notifications/initialized"),
|
|
41367
41735
|
params: NotificationsParamsSchema.optional()
|
|
41368
41736
|
});
|
|
41369
41737
|
const isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
@@ -41371,7 +41739,7 @@ const isInitializedNotification = (value) => InitializedNotificationSchema.safeP
|
|
|
41371
41739
|
* 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
41740
|
*/
|
|
41373
41741
|
const PingRequestSchema = RequestSchema.extend({
|
|
41374
|
-
method: literal("ping"),
|
|
41742
|
+
method: literal$1("ping"),
|
|
41375
41743
|
params: BaseRequestParamsSchema.optional()
|
|
41376
41744
|
});
|
|
41377
41745
|
const ProgressSchema = object$4({
|
|
@@ -41402,7 +41770,7 @@ const ProgressNotificationParamsSchema = object$4({
|
|
|
41402
41770
|
* @category notifications/progress
|
|
41403
41771
|
*/
|
|
41404
41772
|
const ProgressNotificationSchema = NotificationSchema.extend({
|
|
41405
|
-
method: literal("notifications/progress"),
|
|
41773
|
+
method: literal$1("notifications/progress"),
|
|
41406
41774
|
params: ProgressNotificationParamsSchema
|
|
41407
41775
|
});
|
|
41408
41776
|
const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -41465,14 +41833,14 @@ const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskS
|
|
|
41465
41833
|
* A notification sent when a task's status changes.
|
|
41466
41834
|
*/
|
|
41467
41835
|
const TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
41468
|
-
method: literal("notifications/tasks/status"),
|
|
41836
|
+
method: literal$1("notifications/tasks/status"),
|
|
41469
41837
|
params: TaskStatusNotificationParamsSchema
|
|
41470
41838
|
});
|
|
41471
41839
|
/**
|
|
41472
41840
|
* A request to get the state of a specific task.
|
|
41473
41841
|
*/
|
|
41474
41842
|
const GetTaskRequestSchema = RequestSchema.extend({
|
|
41475
|
-
method: literal("tasks/get"),
|
|
41843
|
+
method: literal$1("tasks/get"),
|
|
41476
41844
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41477
41845
|
});
|
|
41478
41846
|
/**
|
|
@@ -41483,7 +41851,7 @@ const GetTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
|
41483
41851
|
* A request to get the result of a specific task.
|
|
41484
41852
|
*/
|
|
41485
41853
|
const GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
41486
|
-
method: literal("tasks/result"),
|
|
41854
|
+
method: literal$1("tasks/result"),
|
|
41487
41855
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41488
41856
|
});
|
|
41489
41857
|
/**
|
|
@@ -41496,7 +41864,7 @@ const GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
|
41496
41864
|
/**
|
|
41497
41865
|
* A request to list tasks.
|
|
41498
41866
|
*/
|
|
41499
|
-
const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal("tasks/list") });
|
|
41867
|
+
const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tasks/list") });
|
|
41500
41868
|
/**
|
|
41501
41869
|
* The response to a tasks/list request.
|
|
41502
41870
|
*/
|
|
@@ -41505,7 +41873,7 @@ const ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: array$1(Task
|
|
|
41505
41873
|
* A request to cancel a specific task.
|
|
41506
41874
|
*/
|
|
41507
41875
|
const CancelTaskRequestSchema = RequestSchema.extend({
|
|
41508
|
-
method: literal("tasks/cancel"),
|
|
41876
|
+
method: literal$1("tasks/cancel"),
|
|
41509
41877
|
params: BaseRequestParamsSchema.extend({ taskId: string$5() })
|
|
41510
41878
|
});
|
|
41511
41879
|
/**
|
|
@@ -41643,7 +42011,7 @@ const ResourceTemplateSchema = object$4({
|
|
|
41643
42011
|
/**
|
|
41644
42012
|
* Sent from the client to request a list of resources the server has.
|
|
41645
42013
|
*/
|
|
41646
|
-
const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/list") });
|
|
42014
|
+
const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/list") });
|
|
41647
42015
|
/**
|
|
41648
42016
|
* The server's response to a resources/list request from the client.
|
|
41649
42017
|
*/
|
|
@@ -41651,7 +42019,7 @@ const ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: arra
|
|
|
41651
42019
|
/**
|
|
41652
42020
|
* Sent from the client to request a list of resource templates the server has.
|
|
41653
42021
|
*/
|
|
41654
|
-
const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/templates/list") });
|
|
42022
|
+
const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/templates/list") });
|
|
41655
42023
|
/**
|
|
41656
42024
|
* The server's response to a resources/templates/list request from the client.
|
|
41657
42025
|
*/
|
|
@@ -41671,7 +42039,7 @@ const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41671
42039
|
* Sent from the client to the server, to read a specific resource URI.
|
|
41672
42040
|
*/
|
|
41673
42041
|
const ReadResourceRequestSchema = RequestSchema.extend({
|
|
41674
|
-
method: literal("resources/read"),
|
|
42042
|
+
method: literal$1("resources/read"),
|
|
41675
42043
|
params: ReadResourceRequestParamsSchema
|
|
41676
42044
|
});
|
|
41677
42045
|
/**
|
|
@@ -41682,7 +42050,7 @@ const ReadResourceResultSchema = ResultSchema.extend({ contents: array$1(union$2
|
|
|
41682
42050
|
* 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
42051
|
*/
|
|
41684
42052
|
const ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
41685
|
-
method: literal("notifications/resources/list_changed"),
|
|
42053
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
41686
42054
|
params: NotificationsParamsSchema.optional()
|
|
41687
42055
|
});
|
|
41688
42056
|
const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
@@ -41690,7 +42058,7 @@ const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41690
42058
|
* Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
|
|
41691
42059
|
*/
|
|
41692
42060
|
const SubscribeRequestSchema = RequestSchema.extend({
|
|
41693
|
-
method: literal("resources/subscribe"),
|
|
42061
|
+
method: literal$1("resources/subscribe"),
|
|
41694
42062
|
params: SubscribeRequestParamsSchema
|
|
41695
42063
|
});
|
|
41696
42064
|
const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
@@ -41698,7 +42066,7 @@ const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
|
41698
42066
|
* Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
|
|
41699
42067
|
*/
|
|
41700
42068
|
const UnsubscribeRequestSchema = RequestSchema.extend({
|
|
41701
|
-
method: literal("resources/unsubscribe"),
|
|
42069
|
+
method: literal$1("resources/unsubscribe"),
|
|
41702
42070
|
params: UnsubscribeRequestParamsSchema
|
|
41703
42071
|
});
|
|
41704
42072
|
/**
|
|
@@ -41713,7 +42081,7 @@ uri: string$5() });
|
|
|
41713
42081
|
* 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
42082
|
*/
|
|
41715
42083
|
const ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
41716
|
-
method: literal("notifications/resources/updated"),
|
|
42084
|
+
method: literal$1("notifications/resources/updated"),
|
|
41717
42085
|
params: ResourceUpdatedNotificationParamsSchema
|
|
41718
42086
|
});
|
|
41719
42087
|
/**
|
|
@@ -41756,7 +42124,7 @@ const PromptSchema = object$4({
|
|
|
41756
42124
|
/**
|
|
41757
42125
|
* Sent from the client to request a list of prompts and prompt templates the server has.
|
|
41758
42126
|
*/
|
|
41759
|
-
const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal("prompts/list") });
|
|
42127
|
+
const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("prompts/list") });
|
|
41760
42128
|
/**
|
|
41761
42129
|
* The server's response to a prompts/list request from the client.
|
|
41762
42130
|
*/
|
|
@@ -41778,14 +42146,14 @@ const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
41778
42146
|
* Used by the client to get a prompt provided by the server.
|
|
41779
42147
|
*/
|
|
41780
42148
|
const GetPromptRequestSchema = RequestSchema.extend({
|
|
41781
|
-
method: literal("prompts/get"),
|
|
42149
|
+
method: literal$1("prompts/get"),
|
|
41782
42150
|
params: GetPromptRequestParamsSchema
|
|
41783
42151
|
});
|
|
41784
42152
|
/**
|
|
41785
42153
|
* Text provided to or from an LLM.
|
|
41786
42154
|
*/
|
|
41787
42155
|
const TextContentSchema = object$4({
|
|
41788
|
-
type: literal("text"),
|
|
42156
|
+
type: literal$1("text"),
|
|
41789
42157
|
/**
|
|
41790
42158
|
* The text content of the message.
|
|
41791
42159
|
*/
|
|
@@ -41804,7 +42172,7 @@ const TextContentSchema = object$4({
|
|
|
41804
42172
|
* An image provided to or from an LLM.
|
|
41805
42173
|
*/
|
|
41806
42174
|
const ImageContentSchema = object$4({
|
|
41807
|
-
type: literal("image"),
|
|
42175
|
+
type: literal$1("image"),
|
|
41808
42176
|
/**
|
|
41809
42177
|
* The base64-encoded image data.
|
|
41810
42178
|
*/
|
|
@@ -41827,7 +42195,7 @@ const ImageContentSchema = object$4({
|
|
|
41827
42195
|
* An Audio provided to or from an LLM.
|
|
41828
42196
|
*/
|
|
41829
42197
|
const AudioContentSchema = object$4({
|
|
41830
|
-
type: literal("audio"),
|
|
42198
|
+
type: literal$1("audio"),
|
|
41831
42199
|
/**
|
|
41832
42200
|
* The base64-encoded audio data.
|
|
41833
42201
|
*/
|
|
@@ -41851,7 +42219,7 @@ const AudioContentSchema = object$4({
|
|
|
41851
42219
|
* Represents the assistant's request to use a tool.
|
|
41852
42220
|
*/
|
|
41853
42221
|
const ToolUseContentSchema = object$4({
|
|
41854
|
-
type: literal("tool_use"),
|
|
42222
|
+
type: literal$1("tool_use"),
|
|
41855
42223
|
/**
|
|
41856
42224
|
* The name of the tool to invoke.
|
|
41857
42225
|
* Must match a tool name from the request's tools array.
|
|
@@ -41877,7 +42245,7 @@ const ToolUseContentSchema = object$4({
|
|
|
41877
42245
|
* The contents of a resource, embedded into a prompt or tool call result.
|
|
41878
42246
|
*/
|
|
41879
42247
|
const EmbeddedResourceSchema = object$4({
|
|
41880
|
-
type: literal("resource"),
|
|
42248
|
+
type: literal$1("resource"),
|
|
41881
42249
|
resource: union$2([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
41882
42250
|
/**
|
|
41883
42251
|
* Optional annotations for the client.
|
|
@@ -41894,7 +42262,7 @@ const EmbeddedResourceSchema = object$4({
|
|
|
41894
42262
|
*
|
|
41895
42263
|
* Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
|
|
41896
42264
|
*/
|
|
41897
|
-
const ResourceLinkSchema = ResourceSchema.extend({ type: literal("resource_link") });
|
|
42265
|
+
const ResourceLinkSchema = ResourceSchema.extend({ type: literal$1("resource_link") });
|
|
41898
42266
|
/**
|
|
41899
42267
|
* A content block that can be used in prompts and tool results.
|
|
41900
42268
|
*/
|
|
@@ -41926,7 +42294,7 @@ const GetPromptResultSchema = ResultSchema.extend({
|
|
|
41926
42294
|
* 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
42295
|
*/
|
|
41928
42296
|
const PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
41929
|
-
method: literal("notifications/prompts/list_changed"),
|
|
42297
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
41930
42298
|
params: NotificationsParamsSchema.optional()
|
|
41931
42299
|
});
|
|
41932
42300
|
/**
|
|
@@ -42010,7 +42378,7 @@ const ToolSchema = object$4({
|
|
|
42010
42378
|
* Must have type: 'object' at the root level per MCP spec.
|
|
42011
42379
|
*/
|
|
42012
42380
|
inputSchema: object$4({
|
|
42013
|
-
type: literal("object"),
|
|
42381
|
+
type: literal$1("object"),
|
|
42014
42382
|
properties: record$2(string$5(), AssertObjectSchema).optional(),
|
|
42015
42383
|
required: array$1(string$5()).optional()
|
|
42016
42384
|
}).catchall(unknown$3()),
|
|
@@ -42020,7 +42388,7 @@ const ToolSchema = object$4({
|
|
|
42020
42388
|
* Must have type: 'object' at the root level per MCP spec.
|
|
42021
42389
|
*/
|
|
42022
42390
|
outputSchema: object$4({
|
|
42023
|
-
type: literal("object"),
|
|
42391
|
+
type: literal$1("object"),
|
|
42024
42392
|
properties: record$2(string$5(), AssertObjectSchema).optional(),
|
|
42025
42393
|
required: array$1(string$5()).optional()
|
|
42026
42394
|
}).catchall(unknown$3()).optional(),
|
|
@@ -42041,7 +42409,7 @@ const ToolSchema = object$4({
|
|
|
42041
42409
|
/**
|
|
42042
42410
|
* Sent from the client to request a list of tools the server has.
|
|
42043
42411
|
*/
|
|
42044
|
-
const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal("tools/list") });
|
|
42412
|
+
const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tools/list") });
|
|
42045
42413
|
/**
|
|
42046
42414
|
* The server's response to a tools/list request from the client.
|
|
42047
42415
|
*/
|
|
@@ -42100,14 +42468,14 @@ const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42100
42468
|
* Used by the client to invoke a tool provided by the server.
|
|
42101
42469
|
*/
|
|
42102
42470
|
const CallToolRequestSchema = RequestSchema.extend({
|
|
42103
|
-
method: literal("tools/call"),
|
|
42471
|
+
method: literal$1("tools/call"),
|
|
42104
42472
|
params: CallToolRequestParamsSchema
|
|
42105
42473
|
});
|
|
42106
42474
|
/**
|
|
42107
42475
|
* 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
42476
|
*/
|
|
42109
42477
|
const ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
42110
|
-
method: literal("notifications/tools/list_changed"),
|
|
42478
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
42111
42479
|
params: NotificationsParamsSchema.optional()
|
|
42112
42480
|
});
|
|
42113
42481
|
/**
|
|
@@ -42159,7 +42527,7 @@ level: LoggingLevelSchema });
|
|
|
42159
42527
|
* A request from the client to the server, to enable or adjust logging.
|
|
42160
42528
|
*/
|
|
42161
42529
|
const SetLevelRequestSchema = RequestSchema.extend({
|
|
42162
|
-
method: literal("logging/setLevel"),
|
|
42530
|
+
method: literal$1("logging/setLevel"),
|
|
42163
42531
|
params: SetLevelRequestParamsSchema
|
|
42164
42532
|
});
|
|
42165
42533
|
/**
|
|
@@ -42183,7 +42551,7 @@ const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend(
|
|
|
42183
42551
|
* 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
42552
|
*/
|
|
42185
42553
|
const LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
42186
|
-
method: literal("notifications/message"),
|
|
42554
|
+
method: literal$1("notifications/message"),
|
|
42187
42555
|
params: LoggingMessageNotificationParamsSchema
|
|
42188
42556
|
});
|
|
42189
42557
|
/**
|
|
@@ -42235,7 +42603,7 @@ mode: _enum$1([
|
|
|
42235
42603
|
* Represents the outcome of invoking a tool requested via ToolUseContent.
|
|
42236
42604
|
*/
|
|
42237
42605
|
const ToolResultContentSchema = object$4({
|
|
42238
|
-
type: literal("tool_result"),
|
|
42606
|
+
type: literal$1("tool_result"),
|
|
42239
42607
|
toolUseId: string$5().describe("The unique identifier for the corresponding tool call."),
|
|
42240
42608
|
content: array$1(ContentBlockSchema).default([]),
|
|
42241
42609
|
structuredContent: object$4({}).loose().optional(),
|
|
@@ -42331,7 +42699,7 @@ const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend
|
|
|
42331
42699
|
* 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
42700
|
*/
|
|
42333
42701
|
const CreateMessageRequestSchema = RequestSchema.extend({
|
|
42334
|
-
method: literal("sampling/createMessage"),
|
|
42702
|
+
method: literal$1("sampling/createMessage"),
|
|
42335
42703
|
params: CreateMessageRequestParamsSchema
|
|
42336
42704
|
});
|
|
42337
42705
|
/**
|
|
@@ -42401,7 +42769,7 @@ const CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
42401
42769
|
* Primitive schema definition for boolean fields.
|
|
42402
42770
|
*/
|
|
42403
42771
|
const BooleanSchemaSchema = object$4({
|
|
42404
|
-
type: literal("boolean"),
|
|
42772
|
+
type: literal$1("boolean"),
|
|
42405
42773
|
title: string$5().optional(),
|
|
42406
42774
|
description: string$5().optional(),
|
|
42407
42775
|
default: boolean$3().optional()
|
|
@@ -42410,7 +42778,7 @@ const BooleanSchemaSchema = object$4({
|
|
|
42410
42778
|
* Primitive schema definition for string fields.
|
|
42411
42779
|
*/
|
|
42412
42780
|
const StringSchemaSchema = object$4({
|
|
42413
|
-
type: literal("string"),
|
|
42781
|
+
type: literal$1("string"),
|
|
42414
42782
|
title: string$5().optional(),
|
|
42415
42783
|
description: string$5().optional(),
|
|
42416
42784
|
minLength: number$4().optional(),
|
|
@@ -42438,7 +42806,7 @@ const NumberSchemaSchema = object$4({
|
|
|
42438
42806
|
* Schema for single-selection enumeration without display titles for options.
|
|
42439
42807
|
*/
|
|
42440
42808
|
const UntitledSingleSelectEnumSchemaSchema = object$4({
|
|
42441
|
-
type: literal("string"),
|
|
42809
|
+
type: literal$1("string"),
|
|
42442
42810
|
title: string$5().optional(),
|
|
42443
42811
|
description: string$5().optional(),
|
|
42444
42812
|
enum: array$1(string$5()),
|
|
@@ -42448,7 +42816,7 @@ const UntitledSingleSelectEnumSchemaSchema = object$4({
|
|
|
42448
42816
|
* Schema for single-selection enumeration with display titles for each option.
|
|
42449
42817
|
*/
|
|
42450
42818
|
const TitledSingleSelectEnumSchemaSchema = object$4({
|
|
42451
|
-
type: literal("string"),
|
|
42819
|
+
type: literal$1("string"),
|
|
42452
42820
|
title: string$5().optional(),
|
|
42453
42821
|
description: string$5().optional(),
|
|
42454
42822
|
oneOf: array$1(object$4({
|
|
@@ -42462,7 +42830,7 @@ const TitledSingleSelectEnumSchemaSchema = object$4({
|
|
|
42462
42830
|
* This interface will be removed in a future version.
|
|
42463
42831
|
*/
|
|
42464
42832
|
const LegacyTitledEnumSchemaSchema = object$4({
|
|
42465
|
-
type: literal("string"),
|
|
42833
|
+
type: literal$1("string"),
|
|
42466
42834
|
title: string$5().optional(),
|
|
42467
42835
|
description: string$5().optional(),
|
|
42468
42836
|
enum: array$1(string$5()),
|
|
@@ -42474,13 +42842,13 @@ const SingleSelectEnumSchemaSchema = union$2([UntitledSingleSelectEnumSchemaSche
|
|
|
42474
42842
|
* Schema for multiple-selection enumeration without display titles for options.
|
|
42475
42843
|
*/
|
|
42476
42844
|
const UntitledMultiSelectEnumSchemaSchema = object$4({
|
|
42477
|
-
type: literal("array"),
|
|
42845
|
+
type: literal$1("array"),
|
|
42478
42846
|
title: string$5().optional(),
|
|
42479
42847
|
description: string$5().optional(),
|
|
42480
42848
|
minItems: number$4().optional(),
|
|
42481
42849
|
maxItems: number$4().optional(),
|
|
42482
42850
|
items: object$4({
|
|
42483
|
-
type: literal("string"),
|
|
42851
|
+
type: literal$1("string"),
|
|
42484
42852
|
enum: array$1(string$5())
|
|
42485
42853
|
}),
|
|
42486
42854
|
default: array$1(string$5()).optional()
|
|
@@ -42489,7 +42857,7 @@ const UntitledMultiSelectEnumSchemaSchema = object$4({
|
|
|
42489
42857
|
* Schema for multiple-selection enumeration with display titles for each option.
|
|
42490
42858
|
*/
|
|
42491
42859
|
const TitledMultiSelectEnumSchemaSchema = object$4({
|
|
42492
|
-
type: literal("array"),
|
|
42860
|
+
type: literal$1("array"),
|
|
42493
42861
|
title: string$5().optional(),
|
|
42494
42862
|
description: string$5().optional(),
|
|
42495
42863
|
minItems: number$4().optional(),
|
|
@@ -42530,7 +42898,7 @@ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42530
42898
|
*
|
|
42531
42899
|
* Optional for backward compatibility. Clients MUST treat missing mode as "form".
|
|
42532
42900
|
*/
|
|
42533
|
-
mode: literal("form").optional(),
|
|
42901
|
+
mode: literal$1("form").optional(),
|
|
42534
42902
|
/**
|
|
42535
42903
|
* The message to present to the user describing what information is being requested.
|
|
42536
42904
|
*/
|
|
@@ -42540,7 +42908,7 @@ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42540
42908
|
* Only top-level properties are allowed, without nesting.
|
|
42541
42909
|
*/
|
|
42542
42910
|
requestedSchema: object$4({
|
|
42543
|
-
type: literal("object"),
|
|
42911
|
+
type: literal$1("object"),
|
|
42544
42912
|
properties: record$2(string$5(), PrimitiveSchemaDefinitionSchema),
|
|
42545
42913
|
required: array$1(string$5()).optional()
|
|
42546
42914
|
})
|
|
@@ -42552,7 +42920,7 @@ const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
42552
42920
|
/**
|
|
42553
42921
|
* The elicitation mode.
|
|
42554
42922
|
*/
|
|
42555
|
-
mode: literal("url"),
|
|
42923
|
+
mode: literal$1("url"),
|
|
42556
42924
|
/**
|
|
42557
42925
|
* The message to present to the user explaining why the interaction is needed.
|
|
42558
42926
|
*/
|
|
@@ -42577,7 +42945,7 @@ const ElicitRequestParamsSchema = union$2([ElicitRequestFormParamsSchema, Elicit
|
|
|
42577
42945
|
* or navigate to a URL (URL mode).
|
|
42578
42946
|
*/
|
|
42579
42947
|
const ElicitRequestSchema = RequestSchema.extend({
|
|
42580
|
-
method: literal("elicitation/create"),
|
|
42948
|
+
method: literal$1("elicitation/create"),
|
|
42581
42949
|
params: ElicitRequestParamsSchema
|
|
42582
42950
|
});
|
|
42583
42951
|
/**
|
|
@@ -42596,7 +42964,7 @@ elicitationId: string$5() });
|
|
|
42596
42964
|
* @category notifications/elicitation/complete
|
|
42597
42965
|
*/
|
|
42598
42966
|
const ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
42599
|
-
method: literal("notifications/elicitation/complete"),
|
|
42967
|
+
method: literal$1("notifications/elicitation/complete"),
|
|
42600
42968
|
params: ElicitationCompleteNotificationParamsSchema
|
|
42601
42969
|
});
|
|
42602
42970
|
/**
|
|
@@ -42631,7 +42999,7 @@ const ElicitResultSchema = ResultSchema.extend({
|
|
|
42631
42999
|
* A reference to a resource or resource template definition.
|
|
42632
43000
|
*/
|
|
42633
43001
|
const ResourceTemplateReferenceSchema = object$4({
|
|
42634
|
-
type: literal("ref/resource"),
|
|
43002
|
+
type: literal$1("ref/resource"),
|
|
42635
43003
|
/**
|
|
42636
43004
|
* The URI or URI template of the resource.
|
|
42637
43005
|
*/
|
|
@@ -42641,7 +43009,7 @@ const ResourceTemplateReferenceSchema = object$4({
|
|
|
42641
43009
|
* Identifies a prompt.
|
|
42642
43010
|
*/
|
|
42643
43011
|
const PromptReferenceSchema = object$4({
|
|
42644
|
-
type: literal("ref/prompt"),
|
|
43012
|
+
type: literal$1("ref/prompt"),
|
|
42645
43013
|
/**
|
|
42646
43014
|
* The name of the prompt or prompt template
|
|
42647
43015
|
*/
|
|
@@ -42675,7 +43043,7 @@ arguments: record$2(string$5(), string$5()).optional() }).optional()
|
|
|
42675
43043
|
* A request from the client to the server, to ask for completion options.
|
|
42676
43044
|
*/
|
|
42677
43045
|
const CompleteRequestSchema = RequestSchema.extend({
|
|
42678
|
-
method: literal("completion/complete"),
|
|
43046
|
+
method: literal$1("completion/complete"),
|
|
42679
43047
|
params: CompleteRequestParamsSchema
|
|
42680
43048
|
});
|
|
42681
43049
|
function assertCompleteRequestPrompt(request) {
|
|
@@ -42723,7 +43091,7 @@ const RootSchema = object$4({
|
|
|
42723
43091
|
* Sent from the server to request a list of root URIs from the client.
|
|
42724
43092
|
*/
|
|
42725
43093
|
const ListRootsRequestSchema = RequestSchema.extend({
|
|
42726
|
-
method: literal("roots/list"),
|
|
43094
|
+
method: literal$1("roots/list"),
|
|
42727
43095
|
params: BaseRequestParamsSchema.optional()
|
|
42728
43096
|
});
|
|
42729
43097
|
/**
|
|
@@ -42734,7 +43102,7 @@ const ListRootsResultSchema = ResultSchema.extend({ roots: array$1(RootSchema) }
|
|
|
42734
43102
|
* A notification from the client to the server, informing it that the list of roots has changed.
|
|
42735
43103
|
*/
|
|
42736
43104
|
const RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
42737
|
-
method: literal("notifications/roots/list_changed"),
|
|
43105
|
+
method: literal$1("notifications/roots/list_changed"),
|
|
42738
43106
|
params: NotificationsParamsSchema.optional()
|
|
42739
43107
|
});
|
|
42740
43108
|
const ClientRequestSchema = union$2([
|
|
@@ -58873,7 +59241,7 @@ const OPERATION_SET_STATUS = {
|
|
|
58873
59241
|
};
|
|
58874
59242
|
const operationSetRowSchema = object$4({
|
|
58875
59243
|
_msdyn_psserrorlog_value: string$5().nullish(),
|
|
58876
|
-
msdyn_status: literal([
|
|
59244
|
+
msdyn_status: literal$1([
|
|
58877
59245
|
19235e4,
|
|
58878
59246
|
192350001,
|
|
58879
59247
|
192350002,
|
|
@@ -59138,7 +59506,7 @@ function createScheduleApiClient(config) {
|
|
|
59138
59506
|
})
|
|
59139
59507
|
};
|
|
59140
59508
|
}
|
|
59141
|
-
const SERVER_VERSION = "0.5.
|
|
59509
|
+
const SERVER_VERSION = "0.5.26";
|
|
59142
59510
|
/** The most operations one OperationSet will carry. The service's own ceiling. */
|
|
59143
59511
|
const MAX_OPERATIONS = 200;
|
|
59144
59512
|
/**
|
|
@@ -59174,7 +59542,7 @@ const taskCreate = strictObject$1({
|
|
|
59174
59542
|
bucket: bucketRef().describe("The bucket the task goes in"),
|
|
59175
59543
|
description: string$5().optional().describe("Body text for the task, shown under its name"),
|
|
59176
59544
|
finish: instant.optional().describe("When the task is due"),
|
|
59177
|
-
kind: literal("task"),
|
|
59545
|
+
kind: literal$1("task"),
|
|
59178
59546
|
name: string$5().min(1).describe("The new task's name"),
|
|
59179
59547
|
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
59548
|
parent_task: taskRef().optional().describe("Makes this a subtask of that task"),
|
|
@@ -59183,17 +59551,17 @@ const taskCreate = strictObject$1({
|
|
|
59183
59551
|
start: instant.optional().describe("When work on the task starts")
|
|
59184
59552
|
});
|
|
59185
59553
|
const bucketCreate = strictObject$1({
|
|
59186
|
-
kind: literal("bucket"),
|
|
59554
|
+
kind: literal$1("bucket"),
|
|
59187
59555
|
name: string$5().min(1).describe("The new bucket's name"),
|
|
59188
59556
|
ref: string$5().min(1).optional().describe("Name this bucket so tasks in this same submission can go into it")
|
|
59189
59557
|
});
|
|
59190
59558
|
const taskLabelCreate = strictObject$1({
|
|
59191
|
-
kind: literal("task_label"),
|
|
59559
|
+
kind: literal$1("task_label"),
|
|
59192
59560
|
label: existing("label", "msdyn_projectlabelid").describe("The label to put on the task"),
|
|
59193
59561
|
task: taskRef().describe("The task getting the label")
|
|
59194
59562
|
});
|
|
59195
59563
|
const assignmentCreate = strictObject$1({
|
|
59196
|
-
kind: literal("assignment"),
|
|
59564
|
+
kind: literal$1("assignment"),
|
|
59197
59565
|
member: existing("project team member", "msdyn_projectteamid").describe("The team member to assign, from msdyn_projectteams"),
|
|
59198
59566
|
name: string$5().min(1).describe("A label for the assignment, shown on the approval card"),
|
|
59199
59567
|
task: taskRef().describe("The task to assign. A task that has subtasks CANNOT be assigned to — the service refuses it.")
|
|
@@ -59204,7 +59572,7 @@ const taskUpdate = strictObject$1({
|
|
|
59204
59572
|
duration: number$4().optional().describe("Working days. Writing this moves the finish."),
|
|
59205
59573
|
effort: number$4().optional().describe("Hours of work"),
|
|
59206
59574
|
finish: instant.optional(),
|
|
59207
|
-
kind: literal("task"),
|
|
59575
|
+
kind: literal$1("task"),
|
|
59208
59576
|
name: string$5().min(1).optional().describe("Rename the task to this"),
|
|
59209
59577
|
parent_task: taskRef().optional(),
|
|
59210
59578
|
priority: number$4().int().min(0).max(10).optional(),
|
|
@@ -59214,25 +59582,25 @@ const taskUpdate = strictObject$1({
|
|
|
59214
59582
|
}).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
59583
|
const bucketUpdate = strictObject$1({
|
|
59216
59584
|
bucket: bucketRef().describe("The bucket to change"),
|
|
59217
|
-
kind: literal("bucket"),
|
|
59585
|
+
kind: literal$1("bucket"),
|
|
59218
59586
|
name: string$5().min(1).describe("Rename the bucket to this")
|
|
59219
59587
|
});
|
|
59220
59588
|
const labelUpdate = strictObject$1({
|
|
59221
|
-
kind: literal("label"),
|
|
59589
|
+
kind: literal$1("label"),
|
|
59222
59590
|
label: existing("label", "msdyn_projectlabelid"),
|
|
59223
59591
|
text: string$5().describe("The label's name. A project's labels start unnamed; clearing the text retires one.")
|
|
59224
59592
|
});
|
|
59225
59593
|
const taskDelete = strictObject$1({
|
|
59226
|
-
kind: literal("task"),
|
|
59594
|
+
kind: literal$1("task"),
|
|
59227
59595
|
task: existing("task", "msdyn_projecttaskid")
|
|
59228
59596
|
});
|
|
59229
59597
|
const taskLabelDelete = strictObject$1({
|
|
59230
|
-
kind: literal("task_label"),
|
|
59598
|
+
kind: literal$1("task_label"),
|
|
59231
59599
|
link: existing("task-label link", "msdyn_projecttasktolabelid")
|
|
59232
59600
|
});
|
|
59233
59601
|
const assignmentDelete = strictObject$1({
|
|
59234
59602
|
assignment: existing("assignment", "msdyn_resourceassignmentid"),
|
|
59235
|
-
kind: literal("assignment")
|
|
59603
|
+
kind: literal$1("assignment")
|
|
59236
59604
|
});
|
|
59237
59605
|
const createOperationSchema = discriminatedUnion("kind", [
|
|
59238
59606
|
taskCreate,
|
|
@@ -98186,7 +98554,7 @@ async function provisionEphemeralDatabases(opts) {
|
|
|
98186
98554
|
}
|
|
98187
98555
|
|
|
98188
98556
|
//#endregion
|
|
98189
|
-
//#region ../slate-bridge/dist/platform-harness-
|
|
98557
|
+
//#region ../slate-bridge/dist/platform-harness-B1E8S0il.mjs
|
|
98190
98558
|
const nonEmptyStringSchema = string$5().trim().min(1);
|
|
98191
98559
|
const portSchema = number$3().int().min(0).max(65535).default(7777);
|
|
98192
98560
|
const envSchema = object$4({
|
|
@@ -98195,7 +98563,7 @@ const envSchema = object$4({
|
|
|
98195
98563
|
CTX_PLATFORM_URL: url().default("http://127.0.0.1:3010").transform((url) => url.replace(/\/+$/, "")),
|
|
98196
98564
|
CTX_WEB_URL: url().default("http://localhost:3000").transform((url) => url.replace(/\/+$/, "")),
|
|
98197
98565
|
CTXS_BRIDGE_PORT: portSchema,
|
|
98198
|
-
CTXS_CLAUDE_IMAGE: nonEmptyStringSchema.default("ghcr.io/usecontextlayer/ctx-sandbox:0.5.
|
|
98566
|
+
CTXS_CLAUDE_IMAGE: nonEmptyStringSchema.default("ghcr.io/usecontextlayer/ctx-sandbox:0.5.26"),
|
|
98199
98567
|
CTXS_CLAUDE_MODEL: nonEmptyStringSchema.default("opus"),
|
|
98200
98568
|
CTXS_HOST_CLAUDE_JSON_PATH: nonEmptyStringSchema.default(() => path.join(os.homedir(), ".claude.json")),
|
|
98201
98569
|
NODE_ENV: _enum$1([
|
|
@@ -99608,14 +99976,10 @@ function transcriptRowText(row) {
|
|
|
99608
99976
|
if (!Array.isArray(content)) return "";
|
|
99609
99977
|
return content.map((block) => typeof block === "object" && block !== null && "text" in block ? String(block.text ?? "") : "").join("\n");
|
|
99610
99978
|
}
|
|
99611
|
-
const INTERRUPT_MARKER = {
|
|
99612
|
-
text: "[Request interrupted by user]",
|
|
99613
|
-
tool: "[Request interrupted by user for tool use]"
|
|
99614
|
-
};
|
|
99615
99979
|
function assertInterruptPersisted(scenario, history) {
|
|
99616
99980
|
const phases = new Set(scenario.turns.map(turnInterruptPhase).filter((phase) => phase !== void 0));
|
|
99617
99981
|
for (const phase of phases) {
|
|
99618
|
-
const marker =
|
|
99982
|
+
const marker = CLAUDE_INTERRUPT_MARKERS[phase];
|
|
99619
99983
|
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
99984
|
}
|
|
99621
99985
|
}
|
|
@@ -99630,7 +99994,7 @@ function assertTurnInterruptionOutcome(scenario, turnNumber, result, expectedInt
|
|
|
99630
99994
|
return;
|
|
99631
99995
|
}
|
|
99632
99996
|
if (result.subtype === "success") throw new Error(`${where} declared interrupt:"${expectedInterruptPhase}" but ended success — the interrupt did not land`);
|
|
99633
|
-
if (result
|
|
99997
|
+
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
99998
|
}
|
|
99635
99999
|
async function captureScenarioStream(server, scenario, options) {
|
|
99636
100000
|
const ac = new AbortController();
|
|
@@ -99638,35 +100002,10 @@ async function captureScenarioStream(server, scenario, options) {
|
|
|
99638
100002
|
try {
|
|
99639
100003
|
const sessionId = crypto.randomUUID();
|
|
99640
100004
|
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
|
-
}
|
|
100005
|
+
const promptStream = createClaudePromptStream();
|
|
99667
100006
|
const claudeQuery = query({
|
|
99668
100007
|
abortController: ac,
|
|
99669
|
-
prompt:
|
|
100008
|
+
prompt: promptStream.prompt,
|
|
99670
100009
|
websocket: { url }
|
|
99671
100010
|
});
|
|
99672
100011
|
iter = claudeQuery;
|
|
@@ -99677,7 +100016,7 @@ async function captureScenarioStream(server, scenario, options) {
|
|
|
99677
100016
|
const sendNextTurn = () => {
|
|
99678
100017
|
const turn = scenario.turns[sentTurnCount];
|
|
99679
100018
|
if (turn === void 0) return false;
|
|
99680
|
-
|
|
100019
|
+
promptStream.push(turnPrompt(turn));
|
|
99681
100020
|
expectedInterruptPhase = turnInterruptPhase(turn);
|
|
99682
100021
|
interruptFired = false;
|
|
99683
100022
|
sentTurnCount += 1;
|
|
@@ -103751,4 +104090,4 @@ runCli().catch((error) => {
|
|
|
103751
104090
|
//#endregion
|
|
103752
104091
|
export { createProgram, runCli };
|
|
103753
104092
|
//# sourceMappingURL=cli.mjs.map
|
|
103754
|
-
//# debugId=
|
|
104093
|
+
//# debugId=706efdec-7252-5edd-aee9-ff839acf6fa2
|