@serene-pub/contracts 0.6.0-pr-4 → 0.6.0-pr-5
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/inlets.d.ts +112 -50
- package/dist/inlets.js +118 -53
- package/dist/oracles.d.ts +308 -19
- package/dist/oracles.js +288 -40
- package/dist/outlets.d.ts +194 -44
- package/dist/outlets.js +231 -55
- package/dist/queries.d.ts +253 -79
- package/dist/queries.js +248 -88
- package/dist/tasks.d.ts +920 -176
- package/dist/tasks.js +788 -145
- package/package.json +3 -3
package/dist/oracles.js
CHANGED
|
@@ -41,7 +41,17 @@ const streamingParam = () => ({
|
|
|
41
41
|
description: "Automatic keeps the connection's own Stream setting; Off sends one request and waits, which is cheaper for background steps.",
|
|
42
42
|
});
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* The **loadout** a model call runs on: pair, sampling and workflow by
|
|
45
|
+
* one id. Additive and optional — the `connection` and `sampling` slots
|
|
46
|
+
* beside it stay as per-value overrides, and resolution is: the node's
|
|
47
|
+
* explicit slot → its loadout (following merges) → the transform's default
|
|
48
|
+
* loadout when that one is unfilled. One constant, so every model-calling
|
|
49
|
+
* oracle declares the same slot.
|
|
50
|
+
* @ruling DESIGN-image-generation §11, §13
|
|
51
|
+
*/
|
|
52
|
+
const LOADOUT_SLOT = { kind: 'loadout', quick: true };
|
|
53
|
+
/**
|
|
54
|
+
* **The model decides who speaks**: the oracle on
|
|
45
55
|
* the turn-order spec's optional model path (`decide.model.advise`). Same
|
|
46
56
|
* ports as a strategy — candidates and the visible history in, prepared turn
|
|
47
57
|
* entries out on `main` and `order` — so the junction's result port reads
|
|
@@ -68,6 +78,7 @@ export const turnAdvise = pin(describeOracleDefinition({
|
|
|
68
78
|
timeoutMs: 60000,
|
|
69
79
|
usage: 'response.usage',
|
|
70
80
|
slots: {
|
|
81
|
+
loadout: LOADOUT_SLOT,
|
|
71
82
|
connection: {
|
|
72
83
|
kind: 'connection',
|
|
73
84
|
quick: true,
|
|
@@ -97,7 +108,7 @@ export const turnAdvise = pin(describeOracleDefinition({
|
|
|
97
108
|
}));
|
|
98
109
|
/**
|
|
99
110
|
* Run the tool the model asked for, and hand the answer back as text it can
|
|
100
|
-
* read on the next pass
|
|
111
|
+
* read on the next pass.
|
|
101
112
|
*
|
|
102
113
|
* ## Why this is a Provider and not a Task
|
|
103
114
|
*
|
|
@@ -131,7 +142,7 @@ export const runTool = pin(describeOracleDefinition({
|
|
|
131
142
|
id: 'core:oracle/run-tool@1',
|
|
132
143
|
i18n: { name: { en: 'Run tool' } },
|
|
133
144
|
effects: 'external',
|
|
134
|
-
/** The call was the model's and the tool list the install's: approve or refuse
|
|
145
|
+
/** The call was the model's and the tool list the install's: approve or refuse. */
|
|
135
146
|
review: { fields: [] },
|
|
136
147
|
timeoutMs: 30000,
|
|
137
148
|
ports: {
|
|
@@ -164,7 +175,7 @@ export const embedText = pin(describeOracleDefinition({
|
|
|
164
175
|
id: 'core:oracle/embed-text@1',
|
|
165
176
|
shape: S.embeddings,
|
|
166
177
|
effects: 'external',
|
|
167
|
-
/** Nothing to edit: an embedding of a text somebody else wrote
|
|
178
|
+
/** Nothing to edit: an embedding of a text somebody else wrote. */
|
|
168
179
|
review: { fields: [] },
|
|
169
180
|
timeoutMs: 5000,
|
|
170
181
|
/**
|
|
@@ -212,8 +223,8 @@ export const embedText = pin(describeOracleDefinition({
|
|
|
212
223
|
kind: 'parameters',
|
|
213
224
|
schema: {
|
|
214
225
|
/**
|
|
215
|
-
* `shared`: one switch for every embed step of a
|
|
216
|
-
*
|
|
226
|
+
* `shared`: one switch for every embed step of a
|
|
227
|
+
* spec. `respond` puts it on the semantic mechanism's embed
|
|
217
228
|
* and the entity-vector mechanism's embed reads it through
|
|
218
229
|
* `slot.params({ node })` — an install with no embedding
|
|
219
230
|
* model switches both off in one place, which is the only
|
|
@@ -259,19 +270,19 @@ export const embedText = pin(describeOracleDefinition({
|
|
|
259
270
|
},
|
|
260
271
|
}));
|
|
261
272
|
/**
|
|
262
|
-
* An MCP tool call
|
|
263
|
-
* connection. The snapshot path
|
|
273
|
+
* An MCP tool call — the generic Provider for a tool on any MCP
|
|
274
|
+
* connection. The snapshot path projects each advertised tool as its
|
|
264
275
|
* own registry row under the connection's namespace, typed off the tool's
|
|
265
276
|
* declared input schema; this generic type is the escape hatch beneath them —
|
|
266
277
|
* pin it, choose the connection, name the tool in params.
|
|
267
278
|
*
|
|
268
279
|
* `effects: 'external'` unconditionally: MCP annotations (`readOnlyHint` and
|
|
269
280
|
* friends) are advisory by specification and are never trusted for gating
|
|
270
|
-
*
|
|
281
|
+
* The admin's per-tool classification lives on the snapshot rows;
|
|
271
282
|
* this generic type gates always, because through it any tool is reachable.
|
|
272
283
|
*
|
|
273
284
|
* The result carries the request and response verbatim in its output — which
|
|
274
|
-
* is the receipt, which is the pitch
|
|
285
|
+
* is the receipt, which is the pitch: no other MCP client can answer
|
|
275
286
|
* "what did this tool actually do, and did I approve it" from a row.
|
|
276
287
|
* @experimental
|
|
277
288
|
*/
|
|
@@ -285,9 +296,9 @@ export const mcpTool = pin(describeOracleDefinition({
|
|
|
285
296
|
},
|
|
286
297
|
shape: S.mcp,
|
|
287
298
|
effects: 'external',
|
|
288
|
-
/** Declared, not bound —
|
|
299
|
+
/** Declared, not bound — no handler exists for it yet. */
|
|
289
300
|
provisional: true,
|
|
290
|
-
/** The arguments are the model's invocation: approve or refuse it, never rewrite it
|
|
301
|
+
/** The arguments are the model's invocation: approve or refuse it, never rewrite it. */
|
|
291
302
|
review: { fields: [] },
|
|
292
303
|
timeoutMs: 60000,
|
|
293
304
|
slots: {
|
|
@@ -338,10 +349,10 @@ export const mcpTool = pin(describeOracleDefinition({
|
|
|
338
349
|
},
|
|
339
350
|
}));
|
|
340
351
|
/**
|
|
341
|
-
* An MCP resource read
|
|
342
|
-
* Query may not reach the network
|
|
343
|
-
* process boundary must be recorded verbatim so replay never re-infers
|
|
344
|
-
*
|
|
352
|
+
* An MCP resource read — a Provider, deliberately not a Query. A
|
|
353
|
+
* Query may not reach the network, and everything crossing the
|
|
354
|
+
* process boundary must be recorded verbatim so replay never re-infers;
|
|
355
|
+
* a resource is external state that can change between runs, and
|
|
345
356
|
* modelling it as a Query would quietly break both rules.
|
|
346
357
|
* @experimental
|
|
347
358
|
*/
|
|
@@ -355,9 +366,9 @@ export const mcpResource = pin(describeOracleDefinition({
|
|
|
355
366
|
},
|
|
356
367
|
shape: S.mcp,
|
|
357
368
|
effects: 'external',
|
|
358
|
-
/** Declared, not bound —
|
|
369
|
+
/** Declared, not bound — no handler exists for it yet. */
|
|
359
370
|
provisional: true,
|
|
360
|
-
/** The uri is the invocation: approve or refuse
|
|
371
|
+
/** The uri is the invocation: approve or refuse. */
|
|
361
372
|
review: { fields: [] },
|
|
362
373
|
timeoutMs: 60000,
|
|
363
374
|
slots: {
|
|
@@ -401,12 +412,13 @@ export const generateText = pin(describeOracleDefinition({
|
|
|
401
412
|
i18n: { name: { en: 'Generate reply' } },
|
|
402
413
|
shape: S.textGen,
|
|
403
414
|
effects: 'external',
|
|
404
|
-
/** The payload is the compiled prompt; a prompt rewritten at the gate is one the receipt cannot explain — approve or refuse
|
|
415
|
+
/** The payload is the compiled prompt; a prompt rewritten at the gate is one the receipt cannot explain — approve or refuse. */
|
|
405
416
|
review: { fields: [] },
|
|
406
417
|
timeoutMs: 120000,
|
|
407
418
|
timeoutKind: 'idle',
|
|
408
419
|
usage: 'response.usage',
|
|
409
420
|
slots: {
|
|
421
|
+
loadout: LOADOUT_SLOT,
|
|
410
422
|
connection: {
|
|
411
423
|
kind: 'connection',
|
|
412
424
|
quick: true,
|
|
@@ -440,7 +452,7 @@ export const generateText = pin(describeOracleDefinition({
|
|
|
440
452
|
/**
|
|
441
453
|
* ⚠ No `prompts` slot, and there was one — `system` and
|
|
442
454
|
* `postHistory`, "the written instructions sent with every request
|
|
443
|
-
* from this step" (culled 2026-09-16
|
|
455
|
+
* from this step" (culled 2026-09-16). No handler read it:
|
|
444
456
|
* the instructions reach the model INSIDE the assembled context,
|
|
445
457
|
* through `core:task/assemble@2`'s own `prompts` slot, and this
|
|
446
458
|
* node sends what it is handed on `context`. Every shipped spec
|
|
@@ -493,12 +505,12 @@ export const generateText = pin(describeOracleDefinition({
|
|
|
493
505
|
in: {
|
|
494
506
|
context: S.assembled,
|
|
495
507
|
/**
|
|
496
|
-
* Whose reply is being generated — the stop-string exclusion
|
|
497
|
-
*
|
|
508
|
+
* Whose reply is being generated — the stop-string exclusion:
|
|
509
|
+
* the speaking character's own name must not stop
|
|
498
510
|
* their own reply. The host already preferred a payload value
|
|
499
511
|
* over the run scope's; this port is what lets a spec supply
|
|
500
512
|
* one, so the exclusion follows the next-speaker node's output
|
|
501
|
-
*
|
|
513
|
+
* instead of the pre-run guess.
|
|
502
514
|
*/
|
|
503
515
|
currentCharacterId: S.rowIds,
|
|
504
516
|
/**
|
|
@@ -539,7 +551,7 @@ export const generateText = pin(describeOracleDefinition({
|
|
|
539
551
|
},
|
|
540
552
|
}));
|
|
541
553
|
/**
|
|
542
|
-
* Generate, with the tools on the wire
|
|
554
|
+
* Generate, with the tools on the wire — the native door.
|
|
543
555
|
*
|
|
544
556
|
* ## Why this is a second type rather than two ports on `generate-text`
|
|
545
557
|
*
|
|
@@ -574,12 +586,13 @@ export const generateWithTools = pin(describeOracleDefinition({
|
|
|
574
586
|
i18n: { name: { en: 'Generate with tools' } },
|
|
575
587
|
shape: S.textGen,
|
|
576
588
|
effects: 'external',
|
|
577
|
-
/** The compiled prompt and the tool list: approve or refuse, as `generate-text
|
|
589
|
+
/** The compiled prompt and the tool list: approve or refuse, as `generate-text`. */
|
|
578
590
|
review: { fields: [] },
|
|
579
591
|
timeoutMs: 120000,
|
|
580
592
|
timeoutKind: 'idle',
|
|
581
593
|
usage: 'response.usage',
|
|
582
594
|
slots: {
|
|
595
|
+
loadout: LOADOUT_SLOT,
|
|
583
596
|
connection: {
|
|
584
597
|
kind: 'connection',
|
|
585
598
|
quick: true,
|
|
@@ -684,7 +697,7 @@ export const generateJson = pin(describeOracleDefinition({
|
|
|
684
697
|
i18n: { name: { en: 'Generate JSON' } },
|
|
685
698
|
shape: S.textGen,
|
|
686
699
|
effects: 'external',
|
|
687
|
-
/** The compiled prompt and the schema: approve or refuse, as `generate-text
|
|
700
|
+
/** The compiled prompt and the schema: approve or refuse, as `generate-text`. */
|
|
688
701
|
review: { fields: [] },
|
|
689
702
|
timeoutMs: 120000,
|
|
690
703
|
timeoutKind: 'idle',
|
|
@@ -701,6 +714,7 @@ export const generateJson = pin(describeOracleDefinition({
|
|
|
701
714
|
*/
|
|
702
715
|
optional: true,
|
|
703
716
|
slots: {
|
|
717
|
+
loadout: LOADOUT_SLOT,
|
|
704
718
|
connection: {
|
|
705
719
|
kind: 'connection',
|
|
706
720
|
quick: true,
|
|
@@ -788,12 +802,13 @@ export const speak = pin(describeOracleDefinition({
|
|
|
788
802
|
i18n: { name: { en: 'Speak' } },
|
|
789
803
|
shape: S.tts,
|
|
790
804
|
effects: 'external',
|
|
791
|
-
/** Declared, not bound —
|
|
805
|
+
/** Declared, not bound — no handler exists for it yet. */
|
|
792
806
|
provisional: true,
|
|
793
|
-
/** The words to be spoken may be corrected before the call
|
|
807
|
+
/** The words to be spoken may be corrected before the call. */
|
|
794
808
|
review: { fields: ['text'] },
|
|
795
809
|
timeoutMs: 60000,
|
|
796
810
|
slots: {
|
|
811
|
+
loadout: LOADOUT_SLOT,
|
|
797
812
|
connection: {
|
|
798
813
|
kind: 'connection',
|
|
799
814
|
quick: true,
|
|
@@ -848,6 +863,30 @@ export const speak = pin(describeOracleDefinition({
|
|
|
848
863
|
* `init` is declared now rather than added later: img2img changes nothing else
|
|
849
864
|
* about this contract, and retrofitting a port onto a published type costs a
|
|
850
865
|
* version bump for every spec pinning it.
|
|
866
|
+
*
|
|
867
|
+
* ## Widened in place (2026-10-12)
|
|
868
|
+
*
|
|
869
|
+
* Additive, so still `@1` — every new port is optional and every new param
|
|
870
|
+
* has a default that reproduces the old behaviour; the descriptor hash moves.
|
|
871
|
+
*
|
|
872
|
+
* - `references` — images the output should RESEMBLE (a likeness). Not
|
|
873
|
+
* `init` (the starting canvas) and not `mask` (where to paint): three
|
|
874
|
+
* different wire fields on every backend that has them.
|
|
875
|
+
* - `series` — the pictures wanted, each `{ key, vars }`. The prompt rows
|
|
876
|
+
* render once per item with `vars` in scope; every media item out carries
|
|
877
|
+
* its `key`. How many CALLS that is, is the host's packing (loop, batch,
|
|
878
|
+
* keyed graph) from the pair's drawing sheet — never the spec's.
|
|
879
|
+
* - `orientation` swaps the longer edge of the sampling's size; `free`
|
|
880
|
+
* takes it as-is.
|
|
881
|
+
* - `cutOut` asks for a transparent background: native where the pair
|
|
882
|
+
* draws one, else the media is flagged for the cut-out task
|
|
883
|
+
* (`native-or-task`), or the bind refuses (`native-only`).
|
|
884
|
+
* - `references: required` refuses a pair that takes no reference image;
|
|
885
|
+
* `preferred` (default) runs anyway, reports `references` as ignored, and
|
|
886
|
+
* says so on the action's form before the run.
|
|
887
|
+
*
|
|
888
|
+
* `requires` stays `[text->image]`: `requires` is a static list, so the gate
|
|
889
|
+
* for reference images is the drawing sheet, read at bind, not a transform.
|
|
851
890
|
* @experimental
|
|
852
891
|
*/
|
|
853
892
|
export const generateImage = pin(describeOracleDefinition({
|
|
@@ -855,13 +894,14 @@ export const generateImage = pin(describeOracleDefinition({
|
|
|
855
894
|
i18n: { name: { en: 'Generate image' } },
|
|
856
895
|
shape: S.imageGen,
|
|
857
896
|
effects: 'external',
|
|
858
|
-
/** The prompt and the negative may be edited; `init` names an asset and may not
|
|
897
|
+
/** The prompt and the negative may be edited; `init` names an asset and may not. */
|
|
859
898
|
review: { fields: ['prompt', 'negative'] },
|
|
860
899
|
// Idle rather than wall: a render is minutes on modest hardware, and a
|
|
861
900
|
// backend still reporting progress is working, not hung.
|
|
862
901
|
timeoutMs: 600000,
|
|
863
902
|
timeoutKind: 'idle',
|
|
864
903
|
slots: {
|
|
904
|
+
loadout: LOADOUT_SLOT,
|
|
865
905
|
connection: {
|
|
866
906
|
kind: 'connection',
|
|
867
907
|
quick: true,
|
|
@@ -880,6 +920,16 @@ export const generateImage = pin(describeOracleDefinition({
|
|
|
880
920
|
shape: S.imageGen,
|
|
881
921
|
description: 'Steps, CFG, size, seed — the settings every image backend shares.',
|
|
882
922
|
},
|
|
923
|
+
/**
|
|
924
|
+
* 🚧 The graph a template-payload pair draws with (a ComfyUI
|
|
925
|
+
* workflow). Optional: flat dialects
|
|
926
|
+
* ignore it, and the host's bind guard requires it only when the
|
|
927
|
+
* resolved pair's drawing sheet says `payload: 'template'`.
|
|
928
|
+
*/
|
|
929
|
+
workflow: {
|
|
930
|
+
kind: 'workflow',
|
|
931
|
+
description: 'Which ComfyUI workflow this step draws with, when its image server runs workflows.',
|
|
932
|
+
},
|
|
883
933
|
prompts: {
|
|
884
934
|
kind: 'prompts',
|
|
885
935
|
quick: true,
|
|
@@ -901,7 +951,110 @@ export const generateImage = pin(describeOracleDefinition({
|
|
|
901
951
|
*/
|
|
902
952
|
params: {
|
|
903
953
|
kind: 'parameters',
|
|
904
|
-
schema: {
|
|
954
|
+
schema: {
|
|
955
|
+
streaming: streamingParam(),
|
|
956
|
+
orientation: {
|
|
957
|
+
type: 'enum',
|
|
958
|
+
of: ['free', 'square', 'portrait', 'landscape'],
|
|
959
|
+
members: [
|
|
960
|
+
{
|
|
961
|
+
key: 'free',
|
|
962
|
+
label: { en: 'As set' },
|
|
963
|
+
description: { en: "Takes the sampling's width and height as they are." },
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
key: 'square',
|
|
967
|
+
label: { en: 'Square' },
|
|
968
|
+
description: { en: 'Both edges become the shorter of the two.' },
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
key: 'portrait',
|
|
972
|
+
label: { en: 'Portrait' },
|
|
973
|
+
description: { en: 'Taller than wide: the longer edge is the height.' },
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
key: 'landscape',
|
|
977
|
+
label: { en: 'Landscape' },
|
|
978
|
+
description: { en: 'Wider than tall: the longer edge is the width.' },
|
|
979
|
+
},
|
|
980
|
+
],
|
|
981
|
+
default: 'free',
|
|
982
|
+
description: "Which way up the picture is drawn. As set takes the sampling's size unchanged.",
|
|
983
|
+
},
|
|
984
|
+
cutOut: {
|
|
985
|
+
type: 'enum',
|
|
986
|
+
of: ['off', 'native-or-task', 'native-only'],
|
|
987
|
+
members: [
|
|
988
|
+
{
|
|
989
|
+
key: 'off',
|
|
990
|
+
label: { en: 'Off' },
|
|
991
|
+
description: { en: 'Keeps the background the model draws.' },
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
key: 'native-or-task',
|
|
995
|
+
label: { en: 'Transparent when possible' },
|
|
996
|
+
description: {
|
|
997
|
+
en: 'Asks the model for a transparent background, or cuts one out afterwards when it cannot.',
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
key: 'native-only',
|
|
1002
|
+
label: { en: 'Transparent from the model' },
|
|
1003
|
+
description: { en: 'Only runs on a model that draws a transparent background itself.' },
|
|
1004
|
+
},
|
|
1005
|
+
],
|
|
1006
|
+
default: 'off',
|
|
1007
|
+
description: 'Whether the picture needs a transparent background, and where it may come from.',
|
|
1008
|
+
},
|
|
1009
|
+
references: {
|
|
1010
|
+
type: 'enum',
|
|
1011
|
+
of: ['preferred', 'required'],
|
|
1012
|
+
members: [
|
|
1013
|
+
{
|
|
1014
|
+
key: 'preferred',
|
|
1015
|
+
label: { en: 'Preferred' },
|
|
1016
|
+
description: {
|
|
1017
|
+
en: "Runs on a model that can't take a reference image, from the prompt alone, and says so first.",
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
key: 'required',
|
|
1022
|
+
label: { en: 'Required' },
|
|
1023
|
+
description: { en: 'Only runs on a model that takes reference images.' },
|
|
1024
|
+
},
|
|
1025
|
+
],
|
|
1026
|
+
default: 'preferred',
|
|
1027
|
+
description: 'What happens when the model cannot take the reference images wired to this step.',
|
|
1028
|
+
},
|
|
1029
|
+
/**
|
|
1030
|
+
* 🚧 One seed for the whole step:
|
|
1031
|
+
* `per-run` draws a seed once when the sampling's
|
|
1032
|
+
* seed is random and sends it with every call, so a
|
|
1033
|
+
* series drawn on an SD-class model coheres. A sampling
|
|
1034
|
+
* that fixes its own seed keeps it. Models that ignore
|
|
1035
|
+
* seeds ignore this too.
|
|
1036
|
+
*/
|
|
1037
|
+
seed: {
|
|
1038
|
+
type: 'enum',
|
|
1039
|
+
of: ['as-set', 'per-run'],
|
|
1040
|
+
members: [
|
|
1041
|
+
{
|
|
1042
|
+
key: 'as-set',
|
|
1043
|
+
label: { en: 'As set' },
|
|
1044
|
+
description: { en: "Uses the sampling's seed: random stays random for every picture." },
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
key: 'per-run',
|
|
1048
|
+
label: { en: 'Same for every picture' },
|
|
1049
|
+
description: {
|
|
1050
|
+
en: 'Picks one seed per run and draws every picture with it, so a set looks alike.',
|
|
1051
|
+
},
|
|
1052
|
+
},
|
|
1053
|
+
],
|
|
1054
|
+
default: 'as-set',
|
|
1055
|
+
description: 'Whether every picture this step draws shares one seed.',
|
|
1056
|
+
},
|
|
1057
|
+
},
|
|
905
1058
|
},
|
|
906
1059
|
},
|
|
907
1060
|
media: { emits: ['image', 'video'] },
|
|
@@ -909,10 +1062,21 @@ export const generateImage = pin(describeOracleDefinition({
|
|
|
909
1062
|
in: {
|
|
910
1063
|
prompt: S.text,
|
|
911
1064
|
negative: S.text,
|
|
912
|
-
/**
|
|
1065
|
+
/** The starting canvas, for an edit (img2img). Not a reference. */
|
|
913
1066
|
init: S.media,
|
|
1067
|
+
/** Where to paint, for inpainting. Absent edits the whole frame. */
|
|
1068
|
+
mask: S.image,
|
|
1069
|
+
/** Images the output should resemble — a likeness. Not `init`. */
|
|
1070
|
+
references: S.mediaList,
|
|
1071
|
+
/** The pictures wanted, each `{ key, vars }` (`ImageSeriesItemV1`). */
|
|
1072
|
+
series: S.imageSeries,
|
|
914
1073
|
},
|
|
915
1074
|
out: {
|
|
1075
|
+
/**
|
|
1076
|
+
* Each item is a `MediaRef` plus `key` — the series item it was
|
|
1077
|
+
* drawn for (`"1"` without a series). Several items may share a
|
|
1078
|
+
* key (variants); an item with no key is surplus the host kept.
|
|
1079
|
+
*/
|
|
916
1080
|
main: S.mediaList,
|
|
917
1081
|
media: S.mediaList,
|
|
918
1082
|
image: S.image,
|
|
@@ -929,7 +1093,7 @@ export const renderImage = pin(describeOracleDefinition({
|
|
|
929
1093
|
id: 'chariot.comfy:render-image@1',
|
|
930
1094
|
shape: S.imageGen,
|
|
931
1095
|
effects: 'external',
|
|
932
|
-
/** A sample plugin oracle: its payload is a compiled prompt — approve or refuse
|
|
1096
|
+
/** A sample plugin oracle: its payload is a compiled prompt — approve or refuse. */
|
|
933
1097
|
review: { fields: [] },
|
|
934
1098
|
timeoutMs: 300000,
|
|
935
1099
|
slots: {
|
|
@@ -1014,7 +1178,7 @@ export const pickSprite = pin(describeOracleDefinition({
|
|
|
1014
1178
|
id: 'core:oracle/pick-sprite@1',
|
|
1015
1179
|
i18n: { name: { en: 'Closest sprite' } },
|
|
1016
1180
|
effects: 'external',
|
|
1017
|
-
/** Nothing to edit: a choice among the card's own sprites
|
|
1181
|
+
/** Nothing to edit: a choice among the card's own sprites. */
|
|
1018
1182
|
review: { fields: [] },
|
|
1019
1183
|
timeoutMs: 5000,
|
|
1020
1184
|
slots: {
|
|
@@ -1101,21 +1265,23 @@ export const pickSprite = pin(describeOracleDefinition({
|
|
|
1101
1265
|
/** Phase 1 — one batch, drafted without sight of any other. @internal */
|
|
1102
1266
|
export const summarizeBatch = pin(describeOracleDefinition({
|
|
1103
1267
|
id: 'core:oracle/summarize-batch@1',
|
|
1268
|
+
/** Runs best on a low-temperature, short-answer preset — a suggestion, never a gate. */
|
|
1269
|
+
prefers: { sampling: 'sampling-extraction' },
|
|
1104
1270
|
i18n: { name: { en: 'Draft a batch' } },
|
|
1105
1271
|
shape: S.textGen,
|
|
1106
1272
|
effects: 'external',
|
|
1107
|
-
/** A drafting call over a batch: approve or refuse
|
|
1273
|
+
/** A drafting call over a batch: approve or refuse. */
|
|
1108
1274
|
review: { fields: [] },
|
|
1109
1275
|
timeoutMs: 120000,
|
|
1110
1276
|
timeoutKind: 'idle',
|
|
1111
1277
|
usage: 'response.usage',
|
|
1112
1278
|
/**
|
|
1113
|
-
* The first interior point
|
|
1279
|
+
* The first interior point, and core dogfooding it:
|
|
1114
1280
|
* every intermediate draft passes the user's chain before synthesis
|
|
1115
1281
|
* reads it — slop killed in the material summaries are built *from*,
|
|
1116
1282
|
* not only in final replies. Invoked by the binding via
|
|
1117
1283
|
* `ctx.scripts.applyText('each-draft', …)`; recorded per application
|
|
1118
|
-
* as `appliedBy: 'binding'`. Declares what it accepts
|
|
1284
|
+
* as `appliedBy: 'binding'`. Declares what it accepts: a draft
|
|
1119
1285
|
* is text, so text transforms — said here rather than assumed by the
|
|
1120
1286
|
* broker, which is the difference between a point a plugin can shape
|
|
1121
1287
|
* and a literal in the executor.
|
|
@@ -1131,6 +1297,7 @@ export const summarizeBatch = pin(describeOracleDefinition({
|
|
|
1131
1297
|
},
|
|
1132
1298
|
],
|
|
1133
1299
|
slots: {
|
|
1300
|
+
loadout: LOADOUT_SLOT,
|
|
1134
1301
|
connection: {
|
|
1135
1302
|
kind: 'connection',
|
|
1136
1303
|
quick: true,
|
|
@@ -1201,15 +1368,18 @@ export const summarizeBatch = pin(describeOracleDefinition({
|
|
|
1201
1368
|
/** Phase 2 — the ordered drafts merged into one past-tense narrative. @internal */
|
|
1202
1369
|
export const summarizeSynth = pin(describeOracleDefinition({
|
|
1203
1370
|
id: 'core:oracle/summarize-synth@1',
|
|
1371
|
+
/** Runs best on a low-temperature, short-answer preset — a suggestion, never a gate. */
|
|
1372
|
+
prefers: { sampling: 'sampling-extraction' },
|
|
1204
1373
|
i18n: { name: { en: 'Synthesize the drafts' } },
|
|
1205
1374
|
shape: S.textGen,
|
|
1206
1375
|
effects: 'external',
|
|
1207
|
-
/** The merge call: approve or refuse
|
|
1376
|
+
/** The merge call: approve or refuse. */
|
|
1208
1377
|
review: { fields: [] },
|
|
1209
1378
|
timeoutMs: 120000,
|
|
1210
1379
|
timeoutKind: 'idle',
|
|
1211
1380
|
usage: 'response.usage',
|
|
1212
1381
|
slots: {
|
|
1382
|
+
loadout: LOADOUT_SLOT,
|
|
1213
1383
|
connection: {
|
|
1214
1384
|
kind: 'connection',
|
|
1215
1385
|
quick: true,
|
|
@@ -1240,14 +1410,17 @@ export const summarizeSynth = pin(describeOracleDefinition({
|
|
|
1240
1410
|
/** What the entry gets called. Its own step because it has its own prompt. @internal */
|
|
1241
1411
|
export const nameEntry = pin(describeOracleDefinition({
|
|
1242
1412
|
id: 'core:oracle/name-entry@1',
|
|
1413
|
+
/** Runs best on a low-temperature, short-answer preset — a suggestion, never a gate. */
|
|
1414
|
+
prefers: { sampling: 'sampling-extraction' },
|
|
1243
1415
|
i18n: { name: { en: 'Name the entry' } },
|
|
1244
1416
|
shape: S.textGen,
|
|
1245
1417
|
effects: 'external',
|
|
1246
|
-
/** Approve or refuse; the name it produces is reviewed at the entry's write
|
|
1418
|
+
/** Approve or refuse; the name it produces is reviewed at the entry's write. */
|
|
1247
1419
|
review: { fields: [] },
|
|
1248
1420
|
timeoutMs: 60000,
|
|
1249
1421
|
usage: 'response.usage',
|
|
1250
1422
|
slots: {
|
|
1423
|
+
loadout: LOADOUT_SLOT,
|
|
1251
1424
|
connection: {
|
|
1252
1425
|
kind: 'connection',
|
|
1253
1426
|
quick: true,
|
|
@@ -1281,14 +1454,17 @@ export const nameEntry = pin(describeOracleDefinition({
|
|
|
1281
1454
|
*/
|
|
1282
1455
|
export const extractCast = pin(describeOracleDefinition({
|
|
1283
1456
|
id: 'core:oracle/extract-cast@1',
|
|
1457
|
+
/** Runs best on a low-temperature, short-answer preset — a suggestion, never a gate. */
|
|
1458
|
+
prefers: { sampling: 'sampling-extraction' },
|
|
1284
1459
|
i18n: { name: { en: 'Extract the cast' } },
|
|
1285
1460
|
shape: S.textGen,
|
|
1286
1461
|
effects: 'external',
|
|
1287
|
-
/** Approve or refuse
|
|
1462
|
+
/** Approve or refuse. */
|
|
1288
1463
|
review: { fields: [] },
|
|
1289
1464
|
timeoutMs: 60000,
|
|
1290
1465
|
usage: 'response.usage',
|
|
1291
1466
|
slots: {
|
|
1467
|
+
loadout: LOADOUT_SLOT,
|
|
1292
1468
|
connection: {
|
|
1293
1469
|
kind: 'connection',
|
|
1294
1470
|
quick: true,
|
|
@@ -1348,12 +1524,13 @@ const graphStep = (id, label, field, extra = {}) => pin(describeOracleDefinition
|
|
|
1348
1524
|
i18n: { name: { en: label } },
|
|
1349
1525
|
shape: S.textGen,
|
|
1350
1526
|
effects: 'external',
|
|
1351
|
-
/** Each graph step sends a compiled prompt: approve or refuse
|
|
1527
|
+
/** Each graph step sends a compiled prompt: approve or refuse. */
|
|
1352
1528
|
review: { fields: [] },
|
|
1353
1529
|
timeoutMs: extra.timeoutMs ?? 120000,
|
|
1354
1530
|
timeoutKind: 'idle',
|
|
1355
1531
|
usage: 'response.usage',
|
|
1356
1532
|
slots: {
|
|
1533
|
+
loadout: LOADOUT_SLOT,
|
|
1357
1534
|
connection: {
|
|
1358
1535
|
kind: 'connection',
|
|
1359
1536
|
quick: true,
|
|
@@ -1383,4 +1560,75 @@ export const graphPerspective = graphStep('core:oracle/graph-perspective@1', 'Pe
|
|
|
1383
1560
|
export const graphNodeDescription = graphStep('core:oracle/graph-node-description@1', 'Describe new nodes', 'nodeDescription');
|
|
1384
1561
|
/** Did any present character reach a new lifecycle state this scene? @internal */
|
|
1385
1562
|
export const graphStateDetection = graphStep('core:oracle/graph-state-detection@1', 'Detect state changes', 'stateDetection');
|
|
1563
|
+
/**
|
|
1564
|
+
* 🚧 **Describe image** — a model that reads pictures is shown one or more
|
|
1565
|
+
* images and asked one written question about them; its answer is the text
|
|
1566
|
+
* out (*Describe from image*, 2026-10-12).
|
|
1567
|
+
*
|
|
1568
|
+
* Not `generate-text`: that node sends an assembled TURN (a transcript, a
|
|
1569
|
+
* speaker, a reply being continued) and its connection requires only
|
|
1570
|
+
* `text->text`, so it resolves to the instance's chat default. This node
|
|
1571
|
+
* sends no transcript — one instruction plus the images — and its connection
|
|
1572
|
+
* REQUIRES `text+image->text`, so an unset slot resolves to the default of
|
|
1573
|
+
* that job (the model that reads pictures), never to the chat model.
|
|
1574
|
+
*
|
|
1575
|
+
* Not a caption either: `caption` is `generate-image`'s out-port (the text a
|
|
1576
|
+
* picture is posted with). This node's answer is whatever the instruction
|
|
1577
|
+
* asks for — a tag list of a person's look, for the likeness helper.
|
|
1578
|
+
*
|
|
1579
|
+
* The instruction is the `prompts` slot's `instruction` field (a prompt
|
|
1580
|
+
* row), so an admin rewrites the question in Admin › Pipelines.
|
|
1581
|
+
* @experimental
|
|
1582
|
+
*/
|
|
1583
|
+
export const describeImage = pin(describeOracleDefinition({
|
|
1584
|
+
id: 'core:oracle/describe-image@1',
|
|
1585
|
+
i18n: {
|
|
1586
|
+
name: { en: 'Describe image' },
|
|
1587
|
+
description: { en: 'Shows a model that reads pictures an image and asks it one question about it.' },
|
|
1588
|
+
},
|
|
1589
|
+
shape: S.textGen,
|
|
1590
|
+
effects: 'external',
|
|
1591
|
+
/** The instruction is config and the images are references: approve or refuse. */
|
|
1592
|
+
review: { fields: [] },
|
|
1593
|
+
timeoutMs: 120000,
|
|
1594
|
+
timeoutKind: 'idle',
|
|
1595
|
+
usage: 'response.usage',
|
|
1596
|
+
slots: {
|
|
1597
|
+
loadout: LOADOUT_SLOT,
|
|
1598
|
+
connection: {
|
|
1599
|
+
kind: 'connection',
|
|
1600
|
+
quick: true,
|
|
1601
|
+
shape: S.textGen,
|
|
1602
|
+
/** A model that reads images — the job default this resolves to when unset. */
|
|
1603
|
+
requires: [tf({ in: [IoKinds.text, IoKinds.image], out: [IoKinds.text] })],
|
|
1604
|
+
description: 'Which model reads the picture. It must be one that can see images.',
|
|
1605
|
+
},
|
|
1606
|
+
sampling: {
|
|
1607
|
+
kind: 'sampling',
|
|
1608
|
+
quick: true,
|
|
1609
|
+
shape: S.textGen,
|
|
1610
|
+
description: 'The sampling settings used for this request.',
|
|
1611
|
+
},
|
|
1612
|
+
prompts: {
|
|
1613
|
+
kind: 'prompts',
|
|
1614
|
+
quick: true,
|
|
1615
|
+
facet: 'prompts',
|
|
1616
|
+
description: 'The question the model is asked about the picture.',
|
|
1617
|
+
fields: {
|
|
1618
|
+
instruction: { type: 'text' },
|
|
1619
|
+
},
|
|
1620
|
+
},
|
|
1621
|
+
},
|
|
1622
|
+
media: { accepts: ['image'] },
|
|
1623
|
+
ports: {
|
|
1624
|
+
in: {
|
|
1625
|
+
/** The pictures to read, in order. Empty refuses: there is nothing to describe. */
|
|
1626
|
+
images: S.mediaList,
|
|
1627
|
+
},
|
|
1628
|
+
out: {
|
|
1629
|
+
main: S.text,
|
|
1630
|
+
text: S.text,
|
|
1631
|
+
},
|
|
1632
|
+
},
|
|
1633
|
+
}));
|
|
1386
1634
|
//# sourceMappingURL=oracles.js.map
|