@usecontextlayer/ctxe 0.5.18 → 0.5.20
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 +157 -102
- package/dist/cli.mjs.map +1 -1
- package/package.json +6 -6
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]="3f5dfa13-7817-555b-9c03-964aa0f42c2a")}catch(e){}}();
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
6
6
|
import { mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
@@ -684,7 +684,7 @@ const string$6 = (params) => {
|
|
|
684
684
|
};
|
|
685
685
|
const integer = /^-?\d+$/;
|
|
686
686
|
const number$4 = /^-?\d+(?:\.\d+)?$/;
|
|
687
|
-
const boolean$
|
|
687
|
+
const boolean$4 = /^(?:true|false)$/i;
|
|
688
688
|
const lowercase$1 = /^[^A-Z]*$/;
|
|
689
689
|
const uppercase$1 = /^[^a-z]*$/;
|
|
690
690
|
|
|
@@ -1483,9 +1483,9 @@ const $ZodNumberFormat = /*@__PURE__*/ $constructor$1("$ZodNumberFormat", (inst,
|
|
|
1483
1483
|
$ZodCheckNumberFormat.init(inst, def);
|
|
1484
1484
|
$ZodNumber.init(inst, def);
|
|
1485
1485
|
});
|
|
1486
|
-
const $ZodBoolean = /*@__PURE__*/ $constructor$1("$ZodBoolean", (inst, def) => {
|
|
1486
|
+
const $ZodBoolean$1 = /*@__PURE__*/ $constructor$1("$ZodBoolean", (inst, def) => {
|
|
1487
1487
|
$ZodType$1.init(inst, def);
|
|
1488
|
-
inst._zod.pattern = boolean$
|
|
1488
|
+
inst._zod.pattern = boolean$4;
|
|
1489
1489
|
inst._zod.parse = (payload, _ctx) => {
|
|
1490
1490
|
if (def.coerce) try {
|
|
1491
1491
|
payload.value = Boolean(payload.value);
|
|
@@ -2663,7 +2663,7 @@ function _int(Class, params) {
|
|
|
2663
2663
|
});
|
|
2664
2664
|
}
|
|
2665
2665
|
// @__NO_SIDE_EFFECTS__
|
|
2666
|
-
function _boolean(Class, params) {
|
|
2666
|
+
function _boolean$1(Class, params) {
|
|
2667
2667
|
return new Class({
|
|
2668
2668
|
type: "boolean",
|
|
2669
2669
|
...normalizeParams$1(params)
|
|
@@ -3217,7 +3217,7 @@ const numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
3217
3217
|
else if (typeof maximum === "number") json.maximum = maximum;
|
|
3218
3218
|
if (typeof multipleOf === "number") json.multipleOf = multipleOf;
|
|
3219
3219
|
};
|
|
3220
|
-
const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
3220
|
+
const booleanProcessor$1 = (_schema, _ctx, json, _params) => {
|
|
3221
3221
|
json.type = "boolean";
|
|
3222
3222
|
};
|
|
3223
3223
|
const neverProcessor$1 = (_schema, _ctx, json, _params) => {
|
|
@@ -3910,13 +3910,13 @@ const ZodNumberFormat = /*@__PURE__*/ $constructor$1("ZodNumberFormat", (inst, d
|
|
|
3910
3910
|
function int(params) {
|
|
3911
3911
|
return _int(ZodNumberFormat, params);
|
|
3912
3912
|
}
|
|
3913
|
-
const ZodBoolean = /*@__PURE__*/ $constructor$1("ZodBoolean", (inst, def) => {
|
|
3914
|
-
$ZodBoolean.init(inst, def);
|
|
3913
|
+
const ZodBoolean$1 = /*@__PURE__*/ $constructor$1("ZodBoolean", (inst, def) => {
|
|
3914
|
+
$ZodBoolean$1.init(inst, def);
|
|
3915
3915
|
ZodType$1.init(inst, def);
|
|
3916
|
-
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
3916
|
+
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor$1(inst, ctx, json, params);
|
|
3917
3917
|
});
|
|
3918
|
-
function boolean$
|
|
3919
|
-
return _boolean(ZodBoolean, params);
|
|
3918
|
+
function boolean$3(params) {
|
|
3919
|
+
return _boolean$1(ZodBoolean$1, params);
|
|
3920
3920
|
}
|
|
3921
3921
|
const ZodUnknown$1 = /*@__PURE__*/ $constructor$1("ZodUnknown", (inst, def) => {
|
|
3922
3922
|
$ZodUnknown$1.init(inst, def);
|
|
@@ -4031,7 +4031,7 @@ function object$3(shape, params) {
|
|
|
4031
4031
|
...normalizeParams$1(params)
|
|
4032
4032
|
});
|
|
4033
4033
|
}
|
|
4034
|
-
function strictObject(shape, params) {
|
|
4034
|
+
function strictObject$1(shape, params) {
|
|
4035
4035
|
return new ZodObject$1({
|
|
4036
4036
|
type: "object",
|
|
4037
4037
|
shape,
|
|
@@ -4349,7 +4349,7 @@ function normalizedKey(event) {
|
|
|
4349
4349
|
|
|
4350
4350
|
//#endregion
|
|
4351
4351
|
//#region package.json
|
|
4352
|
-
var version$1 = "0.5.
|
|
4352
|
+
var version$1 = "0.5.20";
|
|
4353
4353
|
|
|
4354
4354
|
//#endregion
|
|
4355
4355
|
//#region sentry.ts
|
|
@@ -5247,6 +5247,7 @@ const string$1$1 = (params) => {
|
|
|
5247
5247
|
return new RegExp(`^${regex}$`);
|
|
5248
5248
|
};
|
|
5249
5249
|
const number$2 = /^-?\d+(?:\.\d+)?$/;
|
|
5250
|
+
const boolean$1 = /^(?:true|false)$/i;
|
|
5250
5251
|
const lowercase = /^[^A-Z]*$/;
|
|
5251
5252
|
const uppercase = /^[^a-z]*$/;
|
|
5252
5253
|
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
@@ -5870,6 +5871,24 @@ const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
|
|
|
5870
5871
|
});
|
|
5871
5872
|
};
|
|
5872
5873
|
});
|
|
5874
|
+
const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
|
|
5875
|
+
$ZodType.init(inst, def);
|
|
5876
|
+
inst._zod.pattern = boolean$1;
|
|
5877
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
5878
|
+
if (def.coerce) try {
|
|
5879
|
+
payload.value = Boolean(payload.value);
|
|
5880
|
+
} catch (_) {}
|
|
5881
|
+
const input = payload.value;
|
|
5882
|
+
if (typeof input === "boolean") return payload;
|
|
5883
|
+
payload.issues.push({
|
|
5884
|
+
expected: "boolean",
|
|
5885
|
+
code: "invalid_type",
|
|
5886
|
+
input,
|
|
5887
|
+
inst
|
|
5888
|
+
});
|
|
5889
|
+
return payload;
|
|
5890
|
+
};
|
|
5891
|
+
});
|
|
5873
5892
|
const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
|
|
5874
5893
|
$ZodType.init(inst, def);
|
|
5875
5894
|
inst._zod.parse = (payload) => payload;
|
|
@@ -6989,6 +7008,13 @@ function _isoDuration(Class, params) {
|
|
|
6989
7008
|
});
|
|
6990
7009
|
}
|
|
6991
7010
|
// @__NO_SIDE_EFFECTS__
|
|
7011
|
+
function _boolean(Class, params) {
|
|
7012
|
+
return new Class({
|
|
7013
|
+
type: "boolean",
|
|
7014
|
+
...normalizeParams(params)
|
|
7015
|
+
});
|
|
7016
|
+
}
|
|
7017
|
+
// @__NO_SIDE_EFFECTS__
|
|
6992
7018
|
function _unknown(Class) {
|
|
6993
7019
|
return new Class({ type: "unknown" });
|
|
6994
7020
|
}
|
|
@@ -7466,6 +7492,9 @@ const stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
7466
7492
|
}))];
|
|
7467
7493
|
}
|
|
7468
7494
|
};
|
|
7495
|
+
const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
7496
|
+
json.type = "boolean";
|
|
7497
|
+
};
|
|
7469
7498
|
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
7470
7499
|
json.not = {};
|
|
7471
7500
|
};
|
|
@@ -8051,6 +8080,14 @@ const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
|
|
|
8051
8080
|
$ZodJWT.init(inst, def);
|
|
8052
8081
|
ZodStringFormat.init(inst, def);
|
|
8053
8082
|
});
|
|
8083
|
+
const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
|
|
8084
|
+
$ZodBoolean.init(inst, def);
|
|
8085
|
+
ZodType.init(inst, def);
|
|
8086
|
+
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
8087
|
+
});
|
|
8088
|
+
function boolean$2(params) {
|
|
8089
|
+
return /* @__PURE__ */ _boolean(ZodBoolean, params);
|
|
8090
|
+
}
|
|
8054
8091
|
const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
|
|
8055
8092
|
$ZodUnknown.init(inst, def);
|
|
8056
8093
|
ZodType.init(inst, def);
|
|
@@ -8164,6 +8201,14 @@ function object$2(shape, params) {
|
|
|
8164
8201
|
...normalizeParams(params)
|
|
8165
8202
|
});
|
|
8166
8203
|
}
|
|
8204
|
+
function strictObject(shape, params) {
|
|
8205
|
+
return new ZodObject({
|
|
8206
|
+
type: "object",
|
|
8207
|
+
shape,
|
|
8208
|
+
catchall: never(),
|
|
8209
|
+
...normalizeParams(params)
|
|
8210
|
+
});
|
|
8211
|
+
}
|
|
8167
8212
|
const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
8168
8213
|
$ZodUnion.init(inst, def);
|
|
8169
8214
|
ZodType.init(inst, def);
|
|
@@ -8489,94 +8534,101 @@ function superRefine(fn, params) {
|
|
|
8489
8534
|
}
|
|
8490
8535
|
},
|
|
8491
8536
|
root: "detail"
|
|
8492
|
-
} }, null, " ")}`, `${JSON.stringify({
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8537
|
+
} }, null, " ")}`, `${JSON.stringify({
|
|
8538
|
+
defaultWorkspaceView: true,
|
|
8539
|
+
render: {
|
|
8540
|
+
elements: {
|
|
8541
|
+
freshness: {
|
|
8542
|
+
props: {
|
|
8543
|
+
text: { $concat: ["Updated ", { $relativeDate: {
|
|
8544
|
+
now: { $state: "/now" },
|
|
8545
|
+
value: { $maxBy: {
|
|
8546
|
+
field: "last_updated",
|
|
8547
|
+
items: { $state: "/items" }
|
|
8548
|
+
} }
|
|
8549
|
+
} }] },
|
|
8550
|
+
variant: "muted"
|
|
8551
|
+
},
|
|
8552
|
+
type: "Text",
|
|
8553
|
+
visible: { $state: "/items/0" }
|
|
8504
8554
|
},
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
gap: "md"
|
|
8555
|
+
page: {
|
|
8556
|
+
children: ["freshness", "table"],
|
|
8557
|
+
props: {
|
|
8558
|
+
align: "stretch",
|
|
8559
|
+
className: "p-8",
|
|
8560
|
+
direction: "vertical",
|
|
8561
|
+
gap: "md"
|
|
8562
|
+
},
|
|
8563
|
+
type: "Stack"
|
|
8515
8564
|
},
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
variant: "strong",
|
|
8525
|
-
width: 15
|
|
8526
|
-
},
|
|
8527
|
-
{
|
|
8528
|
-
key: "title",
|
|
8529
|
-
label: "Update",
|
|
8530
|
-
truncate: true,
|
|
8531
|
-
width: 35
|
|
8532
|
-
},
|
|
8533
|
-
{
|
|
8534
|
-
component: "badge",
|
|
8535
|
-
key: "kind",
|
|
8536
|
-
label: "Kind",
|
|
8537
|
-
variantOverride: {
|
|
8538
|
-
call: "outline",
|
|
8539
|
-
followup: "warning",
|
|
8540
|
-
release: "success"
|
|
8565
|
+
table: {
|
|
8566
|
+
props: {
|
|
8567
|
+
columns: [
|
|
8568
|
+
{
|
|
8569
|
+
key: "client",
|
|
8570
|
+
label: "Client",
|
|
8571
|
+
variant: "strong",
|
|
8572
|
+
width: 15
|
|
8541
8573
|
},
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8574
|
+
{
|
|
8575
|
+
key: "title",
|
|
8576
|
+
label: "Update",
|
|
8577
|
+
truncate: true,
|
|
8578
|
+
width: 35
|
|
8579
|
+
},
|
|
8580
|
+
{
|
|
8581
|
+
component: "badge",
|
|
8582
|
+
key: "kind",
|
|
8583
|
+
label: "Kind",
|
|
8584
|
+
variantOverride: {
|
|
8585
|
+
call: "outline",
|
|
8586
|
+
followup: "warning",
|
|
8587
|
+
release: "success"
|
|
8588
|
+
},
|
|
8589
|
+
width: 12
|
|
8590
|
+
},
|
|
8591
|
+
{
|
|
8592
|
+
component: "badge",
|
|
8593
|
+
key: "lane",
|
|
8594
|
+
label: "Lane",
|
|
8595
|
+
truncate: true,
|
|
8596
|
+
variantOverride: { "Needs a lane": "warning" },
|
|
8597
|
+
width: 25
|
|
8598
|
+
},
|
|
8599
|
+
{
|
|
8600
|
+
key: "occurred_on",
|
|
8601
|
+
label: "Activity",
|
|
8602
|
+
type: "date",
|
|
8603
|
+
variant: "muted",
|
|
8604
|
+
width: 13
|
|
8605
|
+
}
|
|
8606
|
+
],
|
|
8607
|
+
emptyText: "No updates match",
|
|
8608
|
+
filterable: ["kind", "client"],
|
|
8609
|
+
groupable: [
|
|
8610
|
+
"lane",
|
|
8611
|
+
"client",
|
|
8612
|
+
"kind"
|
|
8613
|
+
],
|
|
8614
|
+
initialSort: {
|
|
8615
|
+
desc: true,
|
|
8616
|
+
key: "occurred_on"
|
|
8551
8617
|
},
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
label: "Activity",
|
|
8555
|
-
type: "date",
|
|
8556
|
-
variant: "muted",
|
|
8557
|
-
width: 13
|
|
8558
|
-
}
|
|
8559
|
-
],
|
|
8560
|
-
emptyText: "No updates match",
|
|
8561
|
-
filterable: ["kind", "client"],
|
|
8562
|
-
groupable: [
|
|
8563
|
-
"lane",
|
|
8564
|
-
"client",
|
|
8565
|
-
"kind"
|
|
8566
|
-
],
|
|
8567
|
-
initialSort: {
|
|
8568
|
-
desc: true,
|
|
8569
|
-
key: "occurred_on"
|
|
8618
|
+
rowLink: "path",
|
|
8619
|
+
rows: { $state: "/items" }
|
|
8570
8620
|
},
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
}
|
|
8577
|
-
root: "page"
|
|
8578
|
-
} }, null, " ")}`;
|
|
8621
|
+
type: "Table"
|
|
8622
|
+
}
|
|
8623
|
+
},
|
|
8624
|
+
root: "page"
|
|
8625
|
+
}
|
|
8626
|
+
}, null, " ")}`;
|
|
8579
8627
|
string$4().min(1, "a doc path must be non-empty").refine((docPath) => !docPath.startsWith("/"), { message: "a doc path must be root-relative, not absolute" }).refine((docPath) => !docPath.split("/").includes(".."), { message: "a doc path must not contain a '..' segment" });
|
|
8628
|
+
strictObject({
|
|
8629
|
+
params: record$1(string$4().min(1), strictObject({ default: string$4().min(1) })).optional(),
|
|
8630
|
+
render: unknown$2().refine((value) => value !== void 0, "render is required")
|
|
8631
|
+
}).extend({ defaultWorkspaceView: boolean$2().optional() });
|
|
8580
8632
|
const segmentSchema = string$4().min(1, "a repoId segment must be non-empty").refine((s) => s !== "." && s !== ".." && !s.includes("/"), { message: "a repoId segment must not be '.'/'..' or contain '/'" });
|
|
8581
8633
|
const sessionMetaSchema = object$2({
|
|
8582
8634
|
created: string$4().nullable(),
|
|
@@ -35917,7 +35969,7 @@ function formatError(error) {
|
|
|
35917
35969
|
if (error instanceof Error) return error.message;
|
|
35918
35970
|
return String(error);
|
|
35919
35971
|
}
|
|
35920
|
-
const cursorFileSchema = strictObject({
|
|
35972
|
+
const cursorFileSchema = strictObject$1({
|
|
35921
35973
|
floors: record$2(string$5(), isoMsSchema),
|
|
35922
35974
|
frontier: isoMsSchema
|
|
35923
35975
|
});
|
|
@@ -36411,15 +36463,15 @@ const runStatusSchema = _enum$1([
|
|
|
36411
36463
|
"stale",
|
|
36412
36464
|
"interrupted"
|
|
36413
36465
|
]);
|
|
36414
|
-
const claudeResultSchema = strictObject({
|
|
36466
|
+
const claudeResultSchema = strictObject$1({
|
|
36415
36467
|
api_error_status: number$3().int().optional(),
|
|
36416
|
-
is_error: boolean$
|
|
36468
|
+
is_error: boolean$3(),
|
|
36417
36469
|
num_turns: number$3().int(),
|
|
36418
36470
|
subtype: string$5().min(1),
|
|
36419
36471
|
terminal_reason: string$5().min(1).optional(),
|
|
36420
36472
|
total_cost_usd: number$3()
|
|
36421
36473
|
});
|
|
36422
|
-
const runRecordSchema = strictObject({
|
|
36474
|
+
const runRecordSchema = strictObject$1({
|
|
36423
36475
|
claude_result: claudeResultSchema.optional(),
|
|
36424
36476
|
completed_at: string$5().min(1).optional(),
|
|
36425
36477
|
duration_ms: number$3().int().nonnegative().optional(),
|
|
@@ -36656,7 +36708,7 @@ const MDAST_OPTIONS = {
|
|
|
36656
36708
|
};
|
|
36657
36709
|
const BOM = 65279;
|
|
36658
36710
|
const OPENS_WITH_FENCE = /^---(?:\r?\n|$)/u;
|
|
36659
|
-
const synthesizerSpecFrontmatterSchema = strictObject({
|
|
36711
|
+
const synthesizerSpecFrontmatterSchema = strictObject$1({
|
|
36660
36712
|
description: string$5().optional(),
|
|
36661
36713
|
name: string$5().trim().min(1)
|
|
36662
36714
|
});
|
|
@@ -42810,7 +42862,10 @@ const WorkspacePlan = object({
|
|
|
42810
42862
|
synthesizerImage: property("synthesizer_image", string()),
|
|
42811
42863
|
tick: string()
|
|
42812
42864
|
});
|
|
42813
|
-
const WorkspaceViews = object({
|
|
42865
|
+
const WorkspaceViews = object({
|
|
42866
|
+
defaultViews: list(string()),
|
|
42867
|
+
views: list(string())
|
|
42868
|
+
});
|
|
42814
42869
|
var PlanClient = class {
|
|
42815
42870
|
_options;
|
|
42816
42871
|
constructor(options) {
|
|
@@ -44458,4 +44513,4 @@ runCli().catch((error) => {
|
|
|
44458
44513
|
//#endregion
|
|
44459
44514
|
export { createProgram, resolveRepoContext, resolveRuntimePaths, runCli };
|
|
44460
44515
|
//# sourceMappingURL=cli.mjs.map
|
|
44461
|
-
//# debugId=
|
|
44516
|
+
//# debugId=3f5dfa13-7817-555b-9c03-964aa0f42c2a
|