@jokerized/decksmith 0.9.7 → 0.9.9
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.js +38 -14
- package/dist/index.js +38 -14
- package/dist/mcp.js +38 -14
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -23530,9 +23530,9 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
23530
23530
|
prevKey = { id: beat2.id, key };
|
|
23531
23531
|
});
|
|
23532
23532
|
const tables = beats.filter((b) => b.literal?.kind === "table");
|
|
23533
|
-
|
|
23533
|
+
for (const t2 of tables.slice(1))
|
|
23534
23534
|
out.push(
|
|
23535
|
-
|
|
23535
|
+
`${t2.id} draws a table, and so does ${tables[0]?.id}. A table reads like a report: keep at most one, and draw this one as what it lists \u2014 results as \`place\` (margin or plane), what was and was not evaluated as \`place\` sets, experiments not run as \`place\` combos, earlier approaches as \`prior-work\`, reported costs as \`place\` length \u2014 or leave \`literal\` null where nothing is honest.`
|
|
23536
23536
|
);
|
|
23537
23537
|
const byVectors = /* @__PURE__ */ new Map();
|
|
23538
23538
|
for (const b of beats) {
|
|
@@ -23541,20 +23541,20 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
23541
23541
|
const key = JSON.stringify(l.vectors.map((v) => v.values));
|
|
23542
23542
|
byVectors.set(key, [...byVectors.get(key) ?? [], b.id]);
|
|
23543
23543
|
}
|
|
23544
|
-
for (const
|
|
23545
|
-
|
|
23544
|
+
for (const [first, ...rest] of byVectors.values())
|
|
23545
|
+
for (const id2 of rest)
|
|
23546
23546
|
out.push(
|
|
23547
|
-
`${
|
|
23547
|
+
`${id2} runs operate on the same vectors as ${first}, so the deck shows one chart twice. Give its chain to ${first} (one longer chain), or draw ${id2} another way.`
|
|
23548
23548
|
);
|
|
23549
23549
|
const forms = /* @__PURE__ */ new Map();
|
|
23550
23550
|
for (const b of beats) {
|
|
23551
23551
|
const f = b.literal && wordForm(b.literal);
|
|
23552
23552
|
if (f) forms.set(f, [...forms.get(f) ?? [], b.id]);
|
|
23553
23553
|
}
|
|
23554
|
-
for (const [f,
|
|
23555
|
-
|
|
23554
|
+
for (const [f, [first, ...rest]] of forms)
|
|
23555
|
+
for (const id2 of rest)
|
|
23556
23556
|
out.push(
|
|
23557
|
-
|
|
23557
|
+
`${id2} draws \`${f}\`, as ${first} already does. It draws no picture, so a second one is the same slide again: draw ${id2} another way, or with \`literal\` null.`
|
|
23558
23558
|
);
|
|
23559
23559
|
return out;
|
|
23560
23560
|
}
|
|
@@ -24891,8 +24891,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
24891
24891
|
"multipleOf",
|
|
24892
24892
|
"minLength",
|
|
24893
24893
|
"maxLength",
|
|
24894
|
-
"minItems",
|
|
24895
|
-
"maxItems",
|
|
24896
24894
|
"uniqueItems"
|
|
24897
24895
|
]);
|
|
24898
24896
|
function forStructuredOutput(node) {
|
|
@@ -25008,13 +25006,39 @@ function operateVariants(v) {
|
|
|
25008
25006
|
return [only(OPERATE_CHAIN, OPERATE_TERMS), only(OPERATE_TERMS)];
|
|
25009
25007
|
}
|
|
25010
25008
|
function schemaFor(prefs, source) {
|
|
25011
|
-
return
|
|
25012
|
-
|
|
25013
|
-
|
|
25014
|
-
|
|
25009
|
+
return shareLiteral(
|
|
25010
|
+
splitOperate(
|
|
25011
|
+
hideFromPlanner(
|
|
25012
|
+
forStructuredOutput(z3.toJSONSchema(storyboardSchema, { io: "input" })),
|
|
25013
|
+
plannerInvisible(prefs, source)
|
|
25014
|
+
)
|
|
25015
25015
|
)
|
|
25016
25016
|
);
|
|
25017
25017
|
}
|
|
25018
|
+
function shareLiteral(schema) {
|
|
25019
|
+
const root = schema;
|
|
25020
|
+
const variants = root.properties.beats.items.anyOf;
|
|
25021
|
+
const literal = variants[0]?.properties.literal;
|
|
25022
|
+
if (!literal) return schema;
|
|
25023
|
+
const one2 = JSON.stringify(literal);
|
|
25024
|
+
if (!variants.every((v) => JSON.stringify(v.properties.literal) === one2))
|
|
25025
|
+
throw new Error("schemaFor: the beat variants carry different `literal` schemas.");
|
|
25026
|
+
const ref = { $ref: "#/$defs/literal" };
|
|
25027
|
+
return {
|
|
25028
|
+
...root,
|
|
25029
|
+
$defs: { literal },
|
|
25030
|
+
properties: {
|
|
25031
|
+
...root.properties,
|
|
25032
|
+
beats: {
|
|
25033
|
+
...root.properties.beats,
|
|
25034
|
+
items: {
|
|
25035
|
+
...root.properties.beats.items,
|
|
25036
|
+
anyOf: variants.map((v) => ({ ...v, properties: { ...v.properties, literal: ref } }))
|
|
25037
|
+
}
|
|
25038
|
+
}
|
|
25039
|
+
}
|
|
25040
|
+
};
|
|
25041
|
+
}
|
|
25018
25042
|
var SCHEMA = schemaFor(prefsSchema.parse({}));
|
|
25019
25043
|
async function codexPlanner(source, opts = {}) {
|
|
25020
25044
|
const prefs = opts.prefs ?? prefsSchema.parse({});
|
package/dist/index.js
CHANGED
|
@@ -25877,9 +25877,9 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
25877
25877
|
prevKey = { id: beat2.id, key };
|
|
25878
25878
|
});
|
|
25879
25879
|
const tables = beats.filter((b) => b.literal?.kind === "table");
|
|
25880
|
-
|
|
25880
|
+
for (const t2 of tables.slice(1))
|
|
25881
25881
|
out.push(
|
|
25882
|
-
|
|
25882
|
+
`${t2.id} draws a table, and so does ${tables[0]?.id}. A table reads like a report: keep at most one, and draw this one as what it lists \u2014 results as \`place\` (margin or plane), what was and was not evaluated as \`place\` sets, experiments not run as \`place\` combos, earlier approaches as \`prior-work\`, reported costs as \`place\` length \u2014 or leave \`literal\` null where nothing is honest.`
|
|
25883
25883
|
);
|
|
25884
25884
|
const byVectors = /* @__PURE__ */ new Map();
|
|
25885
25885
|
for (const b of beats) {
|
|
@@ -25888,20 +25888,20 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
25888
25888
|
const key = JSON.stringify(l.vectors.map((v) => v.values));
|
|
25889
25889
|
byVectors.set(key, [...byVectors.get(key) ?? [], b.id]);
|
|
25890
25890
|
}
|
|
25891
|
-
for (const
|
|
25892
|
-
|
|
25891
|
+
for (const [first, ...rest] of byVectors.values())
|
|
25892
|
+
for (const id2 of rest)
|
|
25893
25893
|
out.push(
|
|
25894
|
-
`${
|
|
25894
|
+
`${id2} runs operate on the same vectors as ${first}, so the deck shows one chart twice. Give its chain to ${first} (one longer chain), or draw ${id2} another way.`
|
|
25895
25895
|
);
|
|
25896
25896
|
const forms = /* @__PURE__ */ new Map();
|
|
25897
25897
|
for (const b of beats) {
|
|
25898
25898
|
const f = b.literal && wordForm(b.literal);
|
|
25899
25899
|
if (f) forms.set(f, [...forms.get(f) ?? [], b.id]);
|
|
25900
25900
|
}
|
|
25901
|
-
for (const [f,
|
|
25902
|
-
|
|
25901
|
+
for (const [f, [first, ...rest]] of forms)
|
|
25902
|
+
for (const id2 of rest)
|
|
25903
25903
|
out.push(
|
|
25904
|
-
|
|
25904
|
+
`${id2} draws \`${f}\`, as ${first} already does. It draws no picture, so a second one is the same slide again: draw ${id2} another way, or with \`literal\` null.`
|
|
25905
25905
|
);
|
|
25906
25906
|
return out;
|
|
25907
25907
|
}
|
|
@@ -27238,8 +27238,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
27238
27238
|
"multipleOf",
|
|
27239
27239
|
"minLength",
|
|
27240
27240
|
"maxLength",
|
|
27241
|
-
"minItems",
|
|
27242
|
-
"maxItems",
|
|
27243
27241
|
"uniqueItems"
|
|
27244
27242
|
]);
|
|
27245
27243
|
function forStructuredOutput(node) {
|
|
@@ -27355,13 +27353,39 @@ function operateVariants(v) {
|
|
|
27355
27353
|
return [only(OPERATE_CHAIN, OPERATE_TERMS), only(OPERATE_TERMS)];
|
|
27356
27354
|
}
|
|
27357
27355
|
function schemaFor(prefs, source) {
|
|
27358
|
-
return
|
|
27359
|
-
|
|
27360
|
-
|
|
27361
|
-
|
|
27356
|
+
return shareLiteral(
|
|
27357
|
+
splitOperate(
|
|
27358
|
+
hideFromPlanner(
|
|
27359
|
+
forStructuredOutput(z3.toJSONSchema(storyboardSchema, { io: "input" })),
|
|
27360
|
+
plannerInvisible(prefs, source)
|
|
27361
|
+
)
|
|
27362
27362
|
)
|
|
27363
27363
|
);
|
|
27364
27364
|
}
|
|
27365
|
+
function shareLiteral(schema) {
|
|
27366
|
+
const root = schema;
|
|
27367
|
+
const variants = root.properties.beats.items.anyOf;
|
|
27368
|
+
const literal = variants[0]?.properties.literal;
|
|
27369
|
+
if (!literal) return schema;
|
|
27370
|
+
const one2 = JSON.stringify(literal);
|
|
27371
|
+
if (!variants.every((v) => JSON.stringify(v.properties.literal) === one2))
|
|
27372
|
+
throw new Error("schemaFor: the beat variants carry different `literal` schemas.");
|
|
27373
|
+
const ref = { $ref: "#/$defs/literal" };
|
|
27374
|
+
return {
|
|
27375
|
+
...root,
|
|
27376
|
+
$defs: { literal },
|
|
27377
|
+
properties: {
|
|
27378
|
+
...root.properties,
|
|
27379
|
+
beats: {
|
|
27380
|
+
...root.properties.beats,
|
|
27381
|
+
items: {
|
|
27382
|
+
...root.properties.beats.items,
|
|
27383
|
+
anyOf: variants.map((v) => ({ ...v, properties: { ...v.properties, literal: ref } }))
|
|
27384
|
+
}
|
|
27385
|
+
}
|
|
27386
|
+
}
|
|
27387
|
+
};
|
|
27388
|
+
}
|
|
27365
27389
|
var SCHEMA = schemaFor(prefsSchema.parse({}));
|
|
27366
27390
|
async function codexPlanner(source, opts = {}) {
|
|
27367
27391
|
const prefs = opts.prefs ?? prefsSchema.parse({});
|
package/dist/mcp.js
CHANGED
|
@@ -24389,9 +24389,9 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
24389
24389
|
prevKey = { id: beat.id, key };
|
|
24390
24390
|
});
|
|
24391
24391
|
const tables = beats.filter((b) => b.literal?.kind === "table");
|
|
24392
|
-
|
|
24392
|
+
for (const t2 of tables.slice(1))
|
|
24393
24393
|
out.push(
|
|
24394
|
-
|
|
24394
|
+
`${t2.id} draws a table, and so does ${tables[0]?.id}. A table reads like a report: keep at most one, and draw this one as what it lists \u2014 results as \`place\` (margin or plane), what was and was not evaluated as \`place\` sets, experiments not run as \`place\` combos, earlier approaches as \`prior-work\`, reported costs as \`place\` length \u2014 or leave \`literal\` null where nothing is honest.`
|
|
24395
24395
|
);
|
|
24396
24396
|
const byVectors = /* @__PURE__ */ new Map();
|
|
24397
24397
|
for (const b of beats) {
|
|
@@ -24400,20 +24400,20 @@ function literalFindings(storyboard, source, opts = {}) {
|
|
|
24400
24400
|
const key = JSON.stringify(l.vectors.map((v) => v.values));
|
|
24401
24401
|
byVectors.set(key, [...byVectors.get(key) ?? [], b.id]);
|
|
24402
24402
|
}
|
|
24403
|
-
for (const
|
|
24404
|
-
|
|
24403
|
+
for (const [first, ...rest] of byVectors.values())
|
|
24404
|
+
for (const id2 of rest)
|
|
24405
24405
|
out.push(
|
|
24406
|
-
`${
|
|
24406
|
+
`${id2} runs operate on the same vectors as ${first}, so the deck shows one chart twice. Give its chain to ${first} (one longer chain), or draw ${id2} another way.`
|
|
24407
24407
|
);
|
|
24408
24408
|
const forms = /* @__PURE__ */ new Map();
|
|
24409
24409
|
for (const b of beats) {
|
|
24410
24410
|
const f = b.literal && wordForm(b.literal);
|
|
24411
24411
|
if (f) forms.set(f, [...forms.get(f) ?? [], b.id]);
|
|
24412
24412
|
}
|
|
24413
|
-
for (const [f,
|
|
24414
|
-
|
|
24413
|
+
for (const [f, [first, ...rest]] of forms)
|
|
24414
|
+
for (const id2 of rest)
|
|
24415
24415
|
out.push(
|
|
24416
|
-
|
|
24416
|
+
`${id2} draws \`${f}\`, as ${first} already does. It draws no picture, so a second one is the same slide again: draw ${id2} another way, or with \`literal\` null.`
|
|
24417
24417
|
);
|
|
24418
24418
|
return out;
|
|
24419
24419
|
}
|
|
@@ -25708,8 +25708,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
25708
25708
|
"multipleOf",
|
|
25709
25709
|
"minLength",
|
|
25710
25710
|
"maxLength",
|
|
25711
|
-
"minItems",
|
|
25712
|
-
"maxItems",
|
|
25713
25711
|
"uniqueItems"
|
|
25714
25712
|
]);
|
|
25715
25713
|
function forStructuredOutput(node) {
|
|
@@ -25825,13 +25823,39 @@ function operateVariants(v) {
|
|
|
25825
25823
|
return [only(OPERATE_CHAIN, OPERATE_TERMS), only(OPERATE_TERMS)];
|
|
25826
25824
|
}
|
|
25827
25825
|
function schemaFor(prefs, source) {
|
|
25828
|
-
return
|
|
25829
|
-
|
|
25830
|
-
|
|
25831
|
-
|
|
25826
|
+
return shareLiteral(
|
|
25827
|
+
splitOperate(
|
|
25828
|
+
hideFromPlanner(
|
|
25829
|
+
forStructuredOutput(z3.toJSONSchema(storyboardSchema, { io: "input" })),
|
|
25830
|
+
plannerInvisible(prefs, source)
|
|
25831
|
+
)
|
|
25832
25832
|
)
|
|
25833
25833
|
);
|
|
25834
25834
|
}
|
|
25835
|
+
function shareLiteral(schema2) {
|
|
25836
|
+
const root2 = schema2;
|
|
25837
|
+
const variants = root2.properties.beats.items.anyOf;
|
|
25838
|
+
const literal = variants[0]?.properties.literal;
|
|
25839
|
+
if (!literal) return schema2;
|
|
25840
|
+
const one2 = JSON.stringify(literal);
|
|
25841
|
+
if (!variants.every((v) => JSON.stringify(v.properties.literal) === one2))
|
|
25842
|
+
throw new Error("schemaFor: the beat variants carry different `literal` schemas.");
|
|
25843
|
+
const ref = { $ref: "#/$defs/literal" };
|
|
25844
|
+
return {
|
|
25845
|
+
...root2,
|
|
25846
|
+
$defs: { literal },
|
|
25847
|
+
properties: {
|
|
25848
|
+
...root2.properties,
|
|
25849
|
+
beats: {
|
|
25850
|
+
...root2.properties.beats,
|
|
25851
|
+
items: {
|
|
25852
|
+
...root2.properties.beats.items,
|
|
25853
|
+
anyOf: variants.map((v) => ({ ...v, properties: { ...v.properties, literal: ref } }))
|
|
25854
|
+
}
|
|
25855
|
+
}
|
|
25856
|
+
}
|
|
25857
|
+
};
|
|
25858
|
+
}
|
|
25835
25859
|
var SCHEMA = schemaFor(prefsSchema.parse({}));
|
|
25836
25860
|
async function codexPlanner(source, opts = {}) {
|
|
25837
25861
|
const prefs = opts.prefs ?? prefsSchema.parse({});
|