@serene-pub/contracts 0.6.0-pr-2 → 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 +12 -10591
- package/dist/index.js +12 -10236
- package/dist/inlets.d.ts +628 -0
- package/dist/inlets.js +744 -0
- package/dist/oracles.d.ts +1535 -0
- package/dist/oracles.js +1634 -0
- package/dist/outlets.d.ts +1140 -0
- package/dist/outlets.js +1261 -0
- package/dist/queries.d.ts +3492 -0
- package/dist/queries.js +3335 -0
- package/dist/tasks.d.ts +5288 -0
- package/dist/tasks.js +4654 -0
- package/package.json +9 -4
|
@@ -0,0 +1,1535 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core's **oracle** node definitions — calls out to an external, nondeterministic
|
|
3
|
+
* source: a model, TTS, image generation, embeddings, a person.
|
|
4
|
+
*
|
|
5
|
+
* One file per node kind, with the helpers only that kind uses; `index.ts`
|
|
6
|
+
* re-exports them all.
|
|
7
|
+
*/
|
|
8
|
+
import type { FieldDecl } from '@serene-pub/sdk';
|
|
9
|
+
/**
|
|
10
|
+
* **The model decides who speaks**: the oracle on
|
|
11
|
+
* the turn-order spec's optional model path (`decide.model.advise`). Same
|
|
12
|
+
* ports as a strategy — candidates and the visible history in, prepared turn
|
|
13
|
+
* entries out on `main` and `order` — so the junction's result port reads
|
|
14
|
+
* the same whichever path fired. Its answer is held to the candidates: a
|
|
15
|
+
* ref the pool did not admit is dropped with a note, and an answer that
|
|
16
|
+
* names nobody (or no answer at all) falls back to round robin, noted —
|
|
17
|
+
* never a halt, so a model hiccup never leaves a session without an order.
|
|
18
|
+
*
|
|
19
|
+
* A plugin's own model strategy is a swap for this node: an oracle with
|
|
20
|
+
* these ports and these three slots (the fit check holds it to them).
|
|
21
|
+
* @experimental
|
|
22
|
+
*/
|
|
23
|
+
export declare const turnAdvise: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
24
|
+
main: string;
|
|
25
|
+
order: string;
|
|
26
|
+
}, {
|
|
27
|
+
candidates: string;
|
|
28
|
+
messages: string;
|
|
29
|
+
}, "core:oracle/turn-advise@1"> & {
|
|
30
|
+
kind: 'oracle';
|
|
31
|
+
slots?: {
|
|
32
|
+
readonly loadout: {
|
|
33
|
+
readonly kind: 'loadout';
|
|
34
|
+
readonly quick: true;
|
|
35
|
+
};
|
|
36
|
+
readonly connection: {
|
|
37
|
+
readonly kind: "connection";
|
|
38
|
+
readonly quick: true;
|
|
39
|
+
readonly shape: string;
|
|
40
|
+
readonly requires: readonly ["text->text"];
|
|
41
|
+
/**
|
|
42
|
+
* Asked rather than required (the `ctx.can` ruling, as
|
|
43
|
+
* generate-json): the answer's schema goes out through the
|
|
44
|
+
* strongest door the connection has — json_schema (natively or
|
|
45
|
+
* as a grammar), then json_object — and the prompt's own
|
|
46
|
+
* words are the rung that works everywhere.
|
|
47
|
+
*/
|
|
48
|
+
readonly optional: readonly ["json_schema", "json_object"];
|
|
49
|
+
};
|
|
50
|
+
readonly sampling: {
|
|
51
|
+
readonly kind: "sampling";
|
|
52
|
+
readonly quick: true;
|
|
53
|
+
readonly shape: string;
|
|
54
|
+
};
|
|
55
|
+
readonly prompts: {
|
|
56
|
+
readonly kind: "prompts";
|
|
57
|
+
readonly quick: true;
|
|
58
|
+
readonly facet: "prompts";
|
|
59
|
+
readonly fields: {
|
|
60
|
+
readonly turnAdvice: {
|
|
61
|
+
readonly type: "text";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
} | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Run the tool the model asked for, and hand the answer back as text it can
|
|
69
|
+
* read on the next pass.
|
|
70
|
+
*
|
|
71
|
+
* ## Why this is a Provider and not a Task
|
|
72
|
+
*
|
|
73
|
+
* The two halves either side of it are pure and this one cannot be: a tool
|
|
74
|
+
* reads the session, or reaches an extension's sandboxed hook, which may in
|
|
75
|
+
* turn reach the network under its own grants. That is `effects: 'external'`
|
|
76
|
+
* exactly — and it is the kind that is handed `ctx.call`, so the tool's own
|
|
77
|
+
* dispatch stays behind the host seam where every other outward call lives.
|
|
78
|
+
* A Task with database access would be a second, unaudited read path.
|
|
79
|
+
*
|
|
80
|
+
* ## What it refuses, and what it never throws
|
|
81
|
+
*
|
|
82
|
+
* `tools` is the advertisement the model was actually given, so a name that
|
|
83
|
+
* was never offered is refused **by name** rather than resolved: a model
|
|
84
|
+
* inventing a tool must not be able to reach one that exists but was withheld
|
|
85
|
+
* from this step.
|
|
86
|
+
*
|
|
87
|
+
* A tool that fails is a **result, not an exception**. `main` is
|
|
88
|
+
* `{ tool, error }` and `text` renders it, because the model asking for a
|
|
89
|
+
* missing file needs to read "no such file" and try something else — a throw
|
|
90
|
+
* would end the run at the one moment the agent could have recovered. The
|
|
91
|
+
* type's `timeoutMs` is the time-box per call: one node invocation is one
|
|
92
|
+
* tool, so the executor's own timeout already is the tool's.
|
|
93
|
+
*
|
|
94
|
+
* `call` may be null — that is the ordinary last iteration, where the model
|
|
95
|
+
* answered in prose and the loop is about to stop. Nothing runs and `text` is
|
|
96
|
+
* empty.
|
|
97
|
+
* @experimental
|
|
98
|
+
*/
|
|
99
|
+
export declare const runTool: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
100
|
+
main: string;
|
|
101
|
+
text: string;
|
|
102
|
+
answer: string;
|
|
103
|
+
}, {
|
|
104
|
+
call: string;
|
|
105
|
+
tools: string;
|
|
106
|
+
text: string;
|
|
107
|
+
}, "core:oracle/run-tool@1"> & {
|
|
108
|
+
kind: 'oracle';
|
|
109
|
+
slots?: Record<string, never> | undefined;
|
|
110
|
+
}>;
|
|
111
|
+
/** @experimental */
|
|
112
|
+
export declare const embedText: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
113
|
+
main: string;
|
|
114
|
+
vector: string;
|
|
115
|
+
vectors: string;
|
|
116
|
+
}, {
|
|
117
|
+
text: string;
|
|
118
|
+
/** Batched: one call, one vector each, in order. */
|
|
119
|
+
texts: string;
|
|
120
|
+
}, "core:oracle/embed-text@1"> & {
|
|
121
|
+
kind: 'oracle';
|
|
122
|
+
slots?: {
|
|
123
|
+
readonly params: {
|
|
124
|
+
readonly kind: "parameters";
|
|
125
|
+
readonly schema: {
|
|
126
|
+
/**
|
|
127
|
+
* `shared`: one switch for every embed step of a
|
|
128
|
+
* spec. `respond` puts it on the semantic mechanism's embed
|
|
129
|
+
* and the entity-vector mechanism's embed reads it through
|
|
130
|
+
* `slot.params({ node })` — an install with no embedding
|
|
131
|
+
* model switches both off in one place, which is the only
|
|
132
|
+
* reading of "embedding: off" a person means.
|
|
133
|
+
*/
|
|
134
|
+
readonly enabled: {
|
|
135
|
+
readonly type: "enum";
|
|
136
|
+
readonly of: readonly ["auto", "on", "off"];
|
|
137
|
+
readonly members: readonly [{
|
|
138
|
+
readonly key: "auto";
|
|
139
|
+
readonly label: {
|
|
140
|
+
readonly en: "Automatic";
|
|
141
|
+
};
|
|
142
|
+
readonly description: {
|
|
143
|
+
readonly en: "Embeds when a model is loaded; without one, retrieval goes on without vectors.";
|
|
144
|
+
};
|
|
145
|
+
}, {
|
|
146
|
+
readonly key: "on";
|
|
147
|
+
readonly label: {
|
|
148
|
+
readonly en: "On";
|
|
149
|
+
};
|
|
150
|
+
readonly description: {
|
|
151
|
+
readonly en: "Always embeds; a missing model is recorded as a failure, and the reply still goes out.";
|
|
152
|
+
};
|
|
153
|
+
}, {
|
|
154
|
+
readonly key: "off";
|
|
155
|
+
readonly label: {
|
|
156
|
+
readonly en: "Off";
|
|
157
|
+
};
|
|
158
|
+
readonly description: {
|
|
159
|
+
readonly en: "Never embeds: semantic matching is switched off.";
|
|
160
|
+
};
|
|
161
|
+
}];
|
|
162
|
+
readonly default: "auto";
|
|
163
|
+
readonly shared: true;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
} | undefined;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* An MCP tool call — the generic Provider for a tool on any MCP
|
|
171
|
+
* connection. The snapshot path projects each advertised tool as its
|
|
172
|
+
* own registry row under the connection's namespace, typed off the tool's
|
|
173
|
+
* declared input schema; this generic type is the escape hatch beneath them —
|
|
174
|
+
* pin it, choose the connection, name the tool in params.
|
|
175
|
+
*
|
|
176
|
+
* `effects: 'external'` unconditionally: MCP annotations (`readOnlyHint` and
|
|
177
|
+
* friends) are advisory by specification and are never trusted for gating
|
|
178
|
+
* The admin's per-tool classification lives on the snapshot rows;
|
|
179
|
+
* this generic type gates always, because through it any tool is reachable.
|
|
180
|
+
*
|
|
181
|
+
* The result carries the request and response verbatim in its output — which
|
|
182
|
+
* is the receipt, which is the pitch: no other MCP client can answer
|
|
183
|
+
* "what did this tool actually do, and did I approve it" from a row.
|
|
184
|
+
* @experimental
|
|
185
|
+
*/
|
|
186
|
+
export declare const mcpTool: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
187
|
+
main: string;
|
|
188
|
+
text: string;
|
|
189
|
+
/** The content blocks exactly as the server returned them. */
|
|
190
|
+
content: string;
|
|
191
|
+
}, {
|
|
192
|
+
/** Arguments for the tool, merged over any declared in params. */
|
|
193
|
+
args: string;
|
|
194
|
+
}, "core:oracle/mcp-tool@1"> & {
|
|
195
|
+
kind: 'oracle';
|
|
196
|
+
slots?: {
|
|
197
|
+
readonly connection: {
|
|
198
|
+
readonly kind: "connection";
|
|
199
|
+
readonly quick: true;
|
|
200
|
+
readonly shape: string;
|
|
201
|
+
/**
|
|
202
|
+
* ⚠ No `requires`, and that is deliberate rather than an omission.
|
|
203
|
+
*
|
|
204
|
+
* The capability space describes io TRANSFORMS — what a model can
|
|
205
|
+
* be handed and what it gives back. An MCP server is not one: it
|
|
206
|
+
* serves tools, it does not turn text into anything. The nearest
|
|
207
|
+
* id, `text->text`, would be false, and claiming it would make
|
|
208
|
+
* every chat connection in the install look offerable here.
|
|
209
|
+
*
|
|
210
|
+
* So this slot keeps filtering by `shape` alone, which is the
|
|
211
|
+
* right axis for it. `requires` is for slots whose answer is "what
|
|
212
|
+
* must this connection be able to DO".
|
|
213
|
+
*/
|
|
214
|
+
readonly description: "Which MCP server this step calls.";
|
|
215
|
+
};
|
|
216
|
+
readonly params: {
|
|
217
|
+
readonly kind: "parameters";
|
|
218
|
+
readonly schema: {
|
|
219
|
+
readonly tool: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly quick: true;
|
|
222
|
+
readonly label: {
|
|
223
|
+
readonly en: "Tool";
|
|
224
|
+
};
|
|
225
|
+
readonly description: {
|
|
226
|
+
readonly en: "The advertised tool name on the connected server.";
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
} | undefined;
|
|
232
|
+
}>;
|
|
233
|
+
/**
|
|
234
|
+
* An MCP resource read — a Provider, deliberately not a Query. A
|
|
235
|
+
* Query may not reach the network, and everything crossing the
|
|
236
|
+
* process boundary must be recorded verbatim so replay never re-infers;
|
|
237
|
+
* a resource is external state that can change between runs, and
|
|
238
|
+
* modelling it as a Query would quietly break both rules.
|
|
239
|
+
* @experimental
|
|
240
|
+
*/
|
|
241
|
+
export declare const mcpResource: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
242
|
+
main: string;
|
|
243
|
+
text: string;
|
|
244
|
+
content: string;
|
|
245
|
+
}, {
|
|
246
|
+
/** Overrides the declared URI when wired. */
|
|
247
|
+
uri: string;
|
|
248
|
+
}, "core:oracle/mcp-resource@1"> & {
|
|
249
|
+
kind: 'oracle';
|
|
250
|
+
slots?: {
|
|
251
|
+
readonly connection: {
|
|
252
|
+
readonly kind: "connection";
|
|
253
|
+
readonly quick: true;
|
|
254
|
+
readonly shape: string;
|
|
255
|
+
readonly description: "Which MCP server this step reads from.";
|
|
256
|
+
};
|
|
257
|
+
readonly params: {
|
|
258
|
+
readonly kind: "parameters";
|
|
259
|
+
readonly schema: {
|
|
260
|
+
readonly uri: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly quick: true;
|
|
263
|
+
readonly label: {
|
|
264
|
+
readonly en: "Resource URI";
|
|
265
|
+
};
|
|
266
|
+
readonly description: {
|
|
267
|
+
readonly en: "The advertised resource URI on the connected server.";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
} | undefined;
|
|
273
|
+
}>;
|
|
274
|
+
/** @public */
|
|
275
|
+
export declare const generateText: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
276
|
+
main: string;
|
|
277
|
+
text: string;
|
|
278
|
+
parts: string;
|
|
279
|
+
reasoning: string;
|
|
280
|
+
}, {
|
|
281
|
+
context: string;
|
|
282
|
+
/**
|
|
283
|
+
* Whose reply is being generated — the stop-string exclusion:
|
|
284
|
+
* the speaking character's own name must not stop
|
|
285
|
+
* their own reply. The host already preferred a payload value
|
|
286
|
+
* over the run scope's; this port is what lets a spec supply
|
|
287
|
+
* one, so the exclusion follows the next-speaker node's output
|
|
288
|
+
* instead of the pre-run guess.
|
|
289
|
+
*/
|
|
290
|
+
currentCharacterId: string;
|
|
291
|
+
/**
|
|
292
|
+
* Media travelling with the request — the page a user
|
|
293
|
+
* attached, the frame a vision step is asked about. A list
|
|
294
|
+
* because interleaving is ordered and a single ref could not
|
|
295
|
+
* express "these three, in this order".
|
|
296
|
+
*
|
|
297
|
+
* Optional, and never quietly ignored: the host forwards these
|
|
298
|
+
* references to the dispatch, which resolves each one to bytes
|
|
299
|
+
* (checking it belongs to this run's session or user) and hands
|
|
300
|
+
* them to the adapter in this order. A request whose connection
|
|
301
|
+
* has vision switched off, or whose adapter has no code that
|
|
302
|
+
* sends files, is REFUSED rather than sent without them —
|
|
303
|
+
* dropping a file is indistinguishable from a model ignoring it.
|
|
304
|
+
*/
|
|
305
|
+
attachments: string;
|
|
306
|
+
}, "core:oracle/generate-text@1"> & {
|
|
307
|
+
kind: 'oracle';
|
|
308
|
+
slots?: {
|
|
309
|
+
readonly loadout: {
|
|
310
|
+
readonly kind: 'loadout';
|
|
311
|
+
readonly quick: true;
|
|
312
|
+
};
|
|
313
|
+
readonly connection: {
|
|
314
|
+
readonly kind: "connection";
|
|
315
|
+
readonly quick: true;
|
|
316
|
+
readonly shape: string;
|
|
317
|
+
/**
|
|
318
|
+
* What the connection must be able to do, as opposed to what it
|
|
319
|
+
* is called. `shape` above still types the SLOT; this types the
|
|
320
|
+
* connection, and it is what the picker filters on and what the
|
|
321
|
+
* bind check refuses by — naming "Chat" rather than an id.
|
|
322
|
+
*
|
|
323
|
+
* Only `requires`, deliberately — still, now that the binding DOES
|
|
324
|
+
* consume `attachments`. It is the Anthropic adapter that sends
|
|
325
|
+
* them today (as base64 content blocks on the last user turn); a
|
|
326
|
+
* connection whose adapter has no such code REFUSES a request
|
|
327
|
+
* carrying files rather than sending it without them, so the
|
|
328
|
+
* `attachments` port is honest without a slot-level requirement.
|
|
329
|
+
*
|
|
330
|
+
* An `optional` vision requirement would meanwhile put a "no
|
|
331
|
+
* vision" caveat on every text connection in the app, on every
|
|
332
|
+
* run — and the port is empty on nearly all of them.
|
|
333
|
+
*/
|
|
334
|
+
readonly requires: readonly ["text->text"];
|
|
335
|
+
readonly description: "Which model server this step sends its request to.";
|
|
336
|
+
};
|
|
337
|
+
readonly sampling: {
|
|
338
|
+
readonly kind: "sampling";
|
|
339
|
+
readonly quick: true;
|
|
340
|
+
readonly shape: string;
|
|
341
|
+
readonly description: "The sampling settings — temperature and friends — used for this request.";
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* ⚠ No `prompts` slot, and there was one — `system` and
|
|
345
|
+
* `postHistory`, "the written instructions sent with every request
|
|
346
|
+
* from this step" (culled 2026-09-16). No handler read it:
|
|
347
|
+
* the instructions reach the model INSIDE the assembled context,
|
|
348
|
+
* through `core:task/assemble@2`'s own `prompts` slot, and this
|
|
349
|
+
* node sends what it is handed on `context`. Every shipped spec
|
|
350
|
+
* wired it as `slot.prompts({ node: 'context' })` for one reason
|
|
351
|
+
* only — so the panel would not render a second copy of the
|
|
352
|
+
* context builder's text — which is a declaration existing to hide
|
|
353
|
+
* itself. The same slot on `generate-with-tools@1` and
|
|
354
|
+
* `generate-json@1` went with it.
|
|
355
|
+
*/
|
|
356
|
+
/**
|
|
357
|
+
* ⚠ No `template` slot, and there was one — "how the assembled
|
|
358
|
+
* context is wrapped for this model before sending".
|
|
359
|
+
*
|
|
360
|
+
* Nothing read it and nothing seeded a row, so it rendered as an
|
|
361
|
+
* empty picker beside the settings that do work. Wrapping for the
|
|
362
|
+
* wire is the `wire` slot's job and the connection adapter's; a
|
|
363
|
+
* second, inert way to express it invited the two to disagree.
|
|
364
|
+
*/
|
|
365
|
+
readonly params: {
|
|
366
|
+
readonly kind: "parameters";
|
|
367
|
+
readonly facet: "weights";
|
|
368
|
+
readonly schema: {
|
|
369
|
+
readonly stopSequences: {
|
|
370
|
+
readonly type: "string[]";
|
|
371
|
+
readonly description: "Sequences that end the reply the moment the model writes one. One per line.";
|
|
372
|
+
};
|
|
373
|
+
readonly streaming: FieldDecl<import("@serene-pub/sdk").FieldType, readonly string[]>;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
} | undefined;
|
|
377
|
+
}>;
|
|
378
|
+
/**
|
|
379
|
+
* Generate, with the tools on the wire — the native door.
|
|
380
|
+
*
|
|
381
|
+
* ## Why this is a second type rather than two ports on `generate-text`
|
|
382
|
+
*
|
|
383
|
+
* `core:oracle/generate-text@1` is published and frozen: a spec that pinned
|
|
384
|
+
* it must keep meaning what it meant. Adding ports would move its content hash
|
|
385
|
+
* and every install would need a re-projection to keep booting — for a
|
|
386
|
+
* capability most connections do not have. A new pin costs a row and conflicts
|
|
387
|
+
* with nothing.
|
|
388
|
+
*
|
|
389
|
+
* It is otherwise the same node: same shape, same slots, same `context` in and
|
|
390
|
+
* the same `main`/`text`/`parts` out. A spec swaps one for the other and
|
|
391
|
+
* nothing else changes.
|
|
392
|
+
*
|
|
393
|
+
* ## The two doors, and why only one of them parses
|
|
394
|
+
*
|
|
395
|
+
* `advertise-tools` publishes both: `prompt` for models that never heard of
|
|
396
|
+
* tools, `native` for APIs that take a declaration list. Wire `native` here and
|
|
397
|
+
* the adapter puts the tools in the field its service calls them — and reads
|
|
398
|
+
* the answer back out of the structured field, so `toolCall` arrives as data.
|
|
399
|
+
* **There is nothing for `parse-tool-call` to do on this door**: the loop's
|
|
400
|
+
* predicate is this node's own `toolCall`, and `run-tool` takes it directly.
|
|
401
|
+
* Parsing prose the API already parsed would be a second reading of one answer.
|
|
402
|
+
*
|
|
403
|
+
* A connection whose adapter cannot send tools REFUSES a request carrying them
|
|
404
|
+
* rather than sending it without: a model that was never offered a tool and a
|
|
405
|
+
* model that declined one produce the same empty `toolCall`, and dropping the
|
|
406
|
+
* declarations silently is indistinguishable from a model choosing not to call.
|
|
407
|
+
* @experimental
|
|
408
|
+
*/
|
|
409
|
+
export declare const generateWithTools: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
410
|
+
main: string;
|
|
411
|
+
text: string;
|
|
412
|
+
parts: string;
|
|
413
|
+
/**
|
|
414
|
+
* `{ tool, args }` when the model called one, null when it
|
|
415
|
+
* answered — the same shape `parse-tool-call` publishes, so
|
|
416
|
+
* `run-tool` and the loop's predicate take either door without
|
|
417
|
+
* knowing which was used.
|
|
418
|
+
*/
|
|
419
|
+
toolCall: string;
|
|
420
|
+
}, {
|
|
421
|
+
context: string;
|
|
422
|
+
/** `advertise-tools`' `native` port — the declarations, verbatim. */
|
|
423
|
+
tools: string;
|
|
424
|
+
currentCharacterId: string;
|
|
425
|
+
attachments: string;
|
|
426
|
+
}, "core:oracle/generate-with-tools@1"> & {
|
|
427
|
+
kind: 'oracle';
|
|
428
|
+
slots?: {
|
|
429
|
+
readonly loadout: {
|
|
430
|
+
readonly kind: 'loadout';
|
|
431
|
+
readonly quick: true;
|
|
432
|
+
};
|
|
433
|
+
readonly connection: {
|
|
434
|
+
readonly kind: "connection";
|
|
435
|
+
readonly quick: true;
|
|
436
|
+
readonly shape: string;
|
|
437
|
+
readonly requires: readonly ["text->text"];
|
|
438
|
+
/**
|
|
439
|
+
* Asked rather than required, so this node is bindable to every
|
|
440
|
+
* text connection and the author decides what to do without one
|
|
441
|
+
* — which is the ruling on `optional` (`ctx.can`): the type
|
|
442
|
+
* system makes absence impossible to forget about, and the
|
|
443
|
+
* fallback is the author's to write. A spec that wants the
|
|
444
|
+
* emulated door instead wires `advertise-tools`' `prompt`.
|
|
445
|
+
*/
|
|
446
|
+
readonly optional: readonly ["tools"];
|
|
447
|
+
readonly description: "Which model server this step sends its request to.";
|
|
448
|
+
};
|
|
449
|
+
readonly sampling: {
|
|
450
|
+
readonly kind: "sampling";
|
|
451
|
+
readonly quick: true;
|
|
452
|
+
readonly shape: string;
|
|
453
|
+
};
|
|
454
|
+
readonly params: {
|
|
455
|
+
readonly kind: "parameters";
|
|
456
|
+
readonly facet: "weights";
|
|
457
|
+
readonly schema: {
|
|
458
|
+
readonly stopSequences: {
|
|
459
|
+
readonly type: "string[]";
|
|
460
|
+
readonly description: "Sequences that end the reply the moment the model writes one. One per line.";
|
|
461
|
+
};
|
|
462
|
+
readonly streaming: FieldDecl<import("@serene-pub/sdk").FieldType, readonly string[]>;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
} | undefined;
|
|
466
|
+
}>;
|
|
467
|
+
/**
|
|
468
|
+
* Generate, with the ANSWER's shape on the wire — the structured door.
|
|
469
|
+
*
|
|
470
|
+
* ## Why a third generate type rather than a schema port on the other two
|
|
471
|
+
*
|
|
472
|
+
* The same reason `generate-with-tools` is a second one: `generate-text@1` is
|
|
473
|
+
* published and frozen, and a port added to it moves the content hash every
|
|
474
|
+
* spec in every install pins. But the stronger reason here is that this node
|
|
475
|
+
* does not make the same REQUEST. `generate-text` sends a turn — a speaker, a
|
|
476
|
+
* trailing assistant line the model continues — and this sends an instruction.
|
|
477
|
+
* A parameter cannot express that difference honestly: a node whose prompt is
|
|
478
|
+
* sometimes a turn and sometimes a question is two nodes with a flag between
|
|
479
|
+
* them, and the flag is the thing a reader has to find before the receipt makes
|
|
480
|
+
* sense.
|
|
481
|
+
*
|
|
482
|
+
* So: no `currentCharacterId` and no `attachments`, and neither is an omission.
|
|
483
|
+
* The first is the speaker whose reply is being written, and nobody's reply is
|
|
484
|
+
* being written. The second is files travelling with a turn.
|
|
485
|
+
*
|
|
486
|
+
* ⚠ **The trailing assistant line is the TRANSCRIPT's business, not this
|
|
487
|
+
* node's.** A prompt arrives here already rendered, and on a completion wire the
|
|
488
|
+
* seed is an open block inside one string that nothing can take back out. So the
|
|
489
|
+
* guarantee is made where the line is never written:
|
|
490
|
+
* `core:task/prose-transcript@1`, which is what a spec wires into the assemble
|
|
491
|
+
* step feeding this node.
|
|
492
|
+
*
|
|
493
|
+
* ## It parses, and that is not the Provider doing two jobs
|
|
494
|
+
*
|
|
495
|
+
* `parse-json@1`'s own header says why the reading is a separate Task *there*:
|
|
496
|
+
* `generate-text` publishes prose, so the reading is a second step over
|
|
497
|
+
* somebody else's output, and every way it can fail deserves its own node on
|
|
498
|
+
* the receipt. Here the structure IS the output — a request that named a schema
|
|
499
|
+
* and came back with a document has nothing left to interpret — so publishing
|
|
500
|
+
* prose and asking the next node to recover the document from it would be
|
|
501
|
+
* undoing the work this node exists to do.
|
|
502
|
+
*
|
|
503
|
+
* The failures still show. `json` is null and `parseError` carries the sentence
|
|
504
|
+
* when the answer could not be read, and `structured` says which door the
|
|
505
|
+
* request actually went out through, so "the model ignored the schema" and
|
|
506
|
+
* "this connection takes no schema, so there was none" are told apart by
|
|
507
|
+
* reading rather than by guessing.
|
|
508
|
+
*
|
|
509
|
+
* `parse-json@1` stays declared and unchanged: it is content-addressed, other
|
|
510
|
+
* specs pin it, and a reply from `generate-text` still needs it.
|
|
511
|
+
* @public
|
|
512
|
+
*/
|
|
513
|
+
export declare const generateJson: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
514
|
+
/** The parsed document, which is what this node is for. */
|
|
515
|
+
main: string;
|
|
516
|
+
json: string;
|
|
517
|
+
/** The value at `path` — the document itself when `path` is empty. */
|
|
518
|
+
value: string;
|
|
519
|
+
/** That same value as a list, for a `map` to iterate. */
|
|
520
|
+
items: string;
|
|
521
|
+
/** What the model actually wrote, for a reader diagnosing the above. */
|
|
522
|
+
text: string;
|
|
523
|
+
}, {
|
|
524
|
+
context: string;
|
|
525
|
+
/**
|
|
526
|
+
* The shape the answer must take, as a JSON Schema document.
|
|
527
|
+
*
|
|
528
|
+
* Optional, and the node is useful without it: an unschema'd
|
|
529
|
+
* request still asks for JSON rather than prose. Supplied, it
|
|
530
|
+
* reaches whichever field the connection's service calls it —
|
|
531
|
+
* Ollama's `format`, OpenAI's `json_schema`, a GBNF grammar on
|
|
532
|
+
* the llama.cpp family — and a connection that takes none
|
|
533
|
+
* ignores it, which is the degradation rule the adapters
|
|
534
|
+
* already follow for `responseFormat`.
|
|
535
|
+
*/
|
|
536
|
+
schema: string;
|
|
537
|
+
}, "core:oracle/generate-json@1"> & {
|
|
538
|
+
kind: 'oracle';
|
|
539
|
+
slots?: {
|
|
540
|
+
readonly loadout: {
|
|
541
|
+
readonly kind: 'loadout';
|
|
542
|
+
readonly quick: true;
|
|
543
|
+
};
|
|
544
|
+
readonly connection: {
|
|
545
|
+
readonly kind: "connection";
|
|
546
|
+
readonly quick: true;
|
|
547
|
+
readonly shape: string;
|
|
548
|
+
readonly requires: readonly ["text->text"];
|
|
549
|
+
/**
|
|
550
|
+
* Asked rather than required, which is the `ctx.can` ruling: the
|
|
551
|
+
* node binds to every text connection and the binding decides
|
|
552
|
+
* what to do without them. The ladder is `json_schema` (the
|
|
553
|
+
* shape on the wire, natively or compiled to a grammar), then
|
|
554
|
+
* `json_object` (JSON, shape unsaid), then a sentence in the
|
|
555
|
+
* prompt — and the last rung works everywhere, so an absence
|
|
556
|
+
* costs fidelity rather than the step.
|
|
557
|
+
*/
|
|
558
|
+
readonly optional: readonly ["json_schema", "json_object"];
|
|
559
|
+
readonly description: "Which model server this step sends its request to.";
|
|
560
|
+
};
|
|
561
|
+
readonly sampling: {
|
|
562
|
+
readonly kind: "sampling";
|
|
563
|
+
readonly quick: true;
|
|
564
|
+
readonly shape: string;
|
|
565
|
+
};
|
|
566
|
+
readonly params: {
|
|
567
|
+
readonly kind: "parameters";
|
|
568
|
+
readonly facet: "weights";
|
|
569
|
+
readonly schema: {
|
|
570
|
+
/**
|
|
571
|
+
* Which value inside the answer reaches `value` and `items`.
|
|
572
|
+
*
|
|
573
|
+
* A data reference is `{node, port}` with no sub-path, so a
|
|
574
|
+
* downstream `map` cannot iterate `plan.speakers` off a port
|
|
575
|
+
* carrying the whole document — the same reason `parse-json`
|
|
576
|
+
* carries this parameter, and the same spelling.
|
|
577
|
+
*
|
|
578
|
+
* Several dotted paths separated by commas are read in order
|
|
579
|
+
* and their lists joined. That is what makes an answer split
|
|
580
|
+
* into arms wireable at all: a keeper reports
|
|
581
|
+
* `{values, inventory}` (its item arm, named for the stat
|
|
582
|
+
* it resolves onto) because a schema can only be strict
|
|
583
|
+
* about a list whose items are all one shape, and the node
|
|
584
|
+
* that resolves them takes one list.
|
|
585
|
+
*/
|
|
586
|
+
readonly path: {
|
|
587
|
+
readonly type: "string";
|
|
588
|
+
readonly quick: true;
|
|
589
|
+
readonly description: "Which value inside the answer to publish on `value` and `items`, as a dotted path. Several paths, separated by commas, are joined in order. Empty publishes the whole answer.";
|
|
590
|
+
};
|
|
591
|
+
readonly stopSequences: {
|
|
592
|
+
readonly type: "string[]";
|
|
593
|
+
readonly description: "Sequences that end the reply the moment the model writes one. One per line.";
|
|
594
|
+
};
|
|
595
|
+
readonly streaming: FieldDecl<import("@serene-pub/sdk").FieldType, readonly string[]>;
|
|
596
|
+
};
|
|
597
|
+
};
|
|
598
|
+
} | undefined;
|
|
599
|
+
}>;
|
|
600
|
+
/** @experimental */
|
|
601
|
+
export declare const speak: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
602
|
+
main: string;
|
|
603
|
+
audio: string;
|
|
604
|
+
}, {
|
|
605
|
+
text: string;
|
|
606
|
+
}, "core:oracle/speak@1"> & {
|
|
607
|
+
kind: 'oracle';
|
|
608
|
+
slots?: {
|
|
609
|
+
readonly loadout: {
|
|
610
|
+
readonly kind: 'loadout';
|
|
611
|
+
readonly quick: true;
|
|
612
|
+
};
|
|
613
|
+
readonly connection: {
|
|
614
|
+
readonly kind: "connection";
|
|
615
|
+
readonly quick: true;
|
|
616
|
+
readonly shape: string;
|
|
617
|
+
readonly requires: readonly ["text->audio"];
|
|
618
|
+
};
|
|
619
|
+
readonly sampling: {
|
|
620
|
+
readonly kind: "sampling";
|
|
621
|
+
readonly quick: true;
|
|
622
|
+
readonly shape: string;
|
|
623
|
+
};
|
|
624
|
+
readonly template: {
|
|
625
|
+
readonly kind: "template";
|
|
626
|
+
readonly engine: string;
|
|
627
|
+
readonly facet: "templates";
|
|
628
|
+
};
|
|
629
|
+
readonly params: {
|
|
630
|
+
readonly kind: "parameters";
|
|
631
|
+
readonly facet: "weights";
|
|
632
|
+
readonly schema: {
|
|
633
|
+
readonly skipCodeBlocks: {
|
|
634
|
+
readonly type: "boolean";
|
|
635
|
+
readonly default: true;
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
} | undefined;
|
|
640
|
+
}>;
|
|
641
|
+
/**
|
|
642
|
+
* Render an image.
|
|
643
|
+
*
|
|
644
|
+
* The structural twin of `generate-text` and `speak`, which is the whole point:
|
|
645
|
+
* one node KIND (`provider`), one type per modality, and the type's `shape`
|
|
646
|
+
* naming which one. That shape is what makes an image node offerable only an
|
|
647
|
+
* image connection and an image sampling config — and, just as importantly, what
|
|
648
|
+
* gives whatever is wired downstream a settled answer about what comes out of it.
|
|
649
|
+
* A single "generate anything" provider whose ports changed with its connection
|
|
650
|
+
* would be a node no spec could plan around.
|
|
651
|
+
*
|
|
652
|
+
* ## Nothing here belongs to one backend
|
|
653
|
+
*
|
|
654
|
+
* An A1111-compatible server takes width and height directly and names its
|
|
655
|
+
* schedulers its own way; ComfyUI takes a whole graph; a hosted API ignores seed
|
|
656
|
+
* and steps entirely. None
|
|
657
|
+
* of that appears in this declaration, because a slot only one backend honours is
|
|
658
|
+
* a control that does nothing on the other three. What a backend alone offers
|
|
659
|
+
* lives on its CONNECTION, declared by its adapter as a profile schema; what a
|
|
660
|
+
* person means lives here and in the sampling config, and the adapter translates
|
|
661
|
+
* — reporting whatever it could not carry across rather than dropping it quietly.
|
|
662
|
+
*
|
|
663
|
+
* ## Ports
|
|
664
|
+
*
|
|
665
|
+
* `media` carries references, never bytes (media.ts): the run stores the image
|
|
666
|
+
* and passes its uuid on, so a consumer that attaches it and a consumer that
|
|
667
|
+
* posts it both work from the same stored row rather than from a base64 string
|
|
668
|
+
* travelling through the graph. `image` is the first of them, for the common
|
|
669
|
+
* single-image wiring, and `caption` is the prompt that produced it — which is
|
|
670
|
+
* what a message posting the image usually wants as its text.
|
|
671
|
+
*
|
|
672
|
+
* `init` is declared now rather than added later: img2img changes nothing else
|
|
673
|
+
* about this contract, and retrofitting a port onto a published type costs a
|
|
674
|
+
* version bump for every spec pinning it.
|
|
675
|
+
*
|
|
676
|
+
* ## Widened in place (2026-10-12)
|
|
677
|
+
*
|
|
678
|
+
* Additive, so still `@1` — every new port is optional and every new param
|
|
679
|
+
* has a default that reproduces the old behaviour; the descriptor hash moves.
|
|
680
|
+
*
|
|
681
|
+
* - `references` — images the output should RESEMBLE (a likeness). Not
|
|
682
|
+
* `init` (the starting canvas) and not `mask` (where to paint): three
|
|
683
|
+
* different wire fields on every backend that has them.
|
|
684
|
+
* - `series` — the pictures wanted, each `{ key, vars }`. The prompt rows
|
|
685
|
+
* render once per item with `vars` in scope; every media item out carries
|
|
686
|
+
* its `key`. How many CALLS that is, is the host's packing (loop, batch,
|
|
687
|
+
* keyed graph) from the pair's drawing sheet — never the spec's.
|
|
688
|
+
* - `orientation` swaps the longer edge of the sampling's size; `free`
|
|
689
|
+
* takes it as-is.
|
|
690
|
+
* - `cutOut` asks for a transparent background: native where the pair
|
|
691
|
+
* draws one, else the media is flagged for the cut-out task
|
|
692
|
+
* (`native-or-task`), or the bind refuses (`native-only`).
|
|
693
|
+
* - `references: required` refuses a pair that takes no reference image;
|
|
694
|
+
* `preferred` (default) runs anyway, reports `references` as ignored, and
|
|
695
|
+
* says so on the action's form before the run.
|
|
696
|
+
*
|
|
697
|
+
* `requires` stays `[text->image]`: `requires` is a static list, so the gate
|
|
698
|
+
* for reference images is the drawing sheet, read at bind, not a transform.
|
|
699
|
+
* @experimental
|
|
700
|
+
*/
|
|
701
|
+
export declare const generateImage: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
702
|
+
/**
|
|
703
|
+
* Each item is a `MediaRef` plus `key` — the series item it was
|
|
704
|
+
* drawn for (`"1"` without a series). Several items may share a
|
|
705
|
+
* key (variants); an item with no key is surplus the host kept.
|
|
706
|
+
*/
|
|
707
|
+
main: string;
|
|
708
|
+
media: string;
|
|
709
|
+
image: string;
|
|
710
|
+
caption: string;
|
|
711
|
+
}, {
|
|
712
|
+
prompt: string;
|
|
713
|
+
negative: string;
|
|
714
|
+
/** The starting canvas, for an edit (img2img). Not a reference. */
|
|
715
|
+
init: string;
|
|
716
|
+
/** Where to paint, for inpainting. Absent edits the whole frame. */
|
|
717
|
+
mask: string;
|
|
718
|
+
/** Images the output should resemble — a likeness. Not `init`. */
|
|
719
|
+
references: string;
|
|
720
|
+
/** The pictures wanted, each `{ key, vars }` (`ImageSeriesItemV1`). */
|
|
721
|
+
series: string;
|
|
722
|
+
}, "core:oracle/generate-image@1"> & {
|
|
723
|
+
kind: 'oracle';
|
|
724
|
+
slots?: {
|
|
725
|
+
readonly loadout: {
|
|
726
|
+
readonly kind: 'loadout';
|
|
727
|
+
readonly quick: true;
|
|
728
|
+
};
|
|
729
|
+
readonly connection: {
|
|
730
|
+
readonly kind: "connection";
|
|
731
|
+
readonly quick: true;
|
|
732
|
+
readonly shape: string;
|
|
733
|
+
/**
|
|
734
|
+
* The declaration that makes a KoboldCPP connection offerable
|
|
735
|
+
* here at all: its TYPE says text, and what it can do says
|
|
736
|
+
* otherwise.
|
|
737
|
+
*/
|
|
738
|
+
readonly requires: readonly ["text->image"];
|
|
739
|
+
readonly description: "Which image server this step sends its request to.";
|
|
740
|
+
};
|
|
741
|
+
readonly sampling: {
|
|
742
|
+
readonly kind: "sampling";
|
|
743
|
+
readonly quick: true;
|
|
744
|
+
readonly shape: string;
|
|
745
|
+
readonly description: "Steps, CFG, size, seed — the settings every image backend shares.";
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* 🚧 The graph a template-payload pair draws with (a ComfyUI
|
|
749
|
+
* workflow). Optional: flat dialects
|
|
750
|
+
* ignore it, and the host's bind guard requires it only when the
|
|
751
|
+
* resolved pair's drawing sheet says `payload: 'template'`.
|
|
752
|
+
*/
|
|
753
|
+
readonly workflow: {
|
|
754
|
+
readonly kind: "workflow";
|
|
755
|
+
readonly description: "Which ComfyUI workflow this step draws with, when its image server runs workflows.";
|
|
756
|
+
};
|
|
757
|
+
readonly prompts: {
|
|
758
|
+
readonly kind: "prompts";
|
|
759
|
+
readonly quick: true;
|
|
760
|
+
readonly facet: "prompts";
|
|
761
|
+
readonly description: "How the incoming text becomes what the image model is asked for.";
|
|
762
|
+
readonly fields: {
|
|
763
|
+
readonly positive: {
|
|
764
|
+
readonly type: "text";
|
|
765
|
+
};
|
|
766
|
+
readonly negative: {
|
|
767
|
+
readonly type: "text";
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* No `facet`, unlike the text nodes' `weights`: the one parameter
|
|
773
|
+
* here decides how the request is SENT, and the weights facet is
|
|
774
|
+
* where a person looks for what the model is asked for.
|
|
775
|
+
*
|
|
776
|
+
* On an image backend `off` is the difference between one request
|
|
777
|
+
* and a render polled for progress and previews, which is the
|
|
778
|
+
* whole of what a background step saves by turning it off.
|
|
779
|
+
*/
|
|
780
|
+
readonly params: {
|
|
781
|
+
readonly kind: "parameters";
|
|
782
|
+
readonly schema: {
|
|
783
|
+
readonly streaming: FieldDecl<import("@serene-pub/sdk").FieldType, readonly string[]>;
|
|
784
|
+
readonly orientation: {
|
|
785
|
+
readonly type: "enum";
|
|
786
|
+
readonly of: readonly ["free", "square", "portrait", "landscape"];
|
|
787
|
+
readonly members: readonly [{
|
|
788
|
+
readonly key: "free";
|
|
789
|
+
readonly label: {
|
|
790
|
+
readonly en: "As set";
|
|
791
|
+
};
|
|
792
|
+
readonly description: {
|
|
793
|
+
readonly en: "Takes the sampling's width and height as they are.";
|
|
794
|
+
};
|
|
795
|
+
}, {
|
|
796
|
+
readonly key: "square";
|
|
797
|
+
readonly label: {
|
|
798
|
+
readonly en: "Square";
|
|
799
|
+
};
|
|
800
|
+
readonly description: {
|
|
801
|
+
readonly en: "Both edges become the shorter of the two.";
|
|
802
|
+
};
|
|
803
|
+
}, {
|
|
804
|
+
readonly key: "portrait";
|
|
805
|
+
readonly label: {
|
|
806
|
+
readonly en: "Portrait";
|
|
807
|
+
};
|
|
808
|
+
readonly description: {
|
|
809
|
+
readonly en: "Taller than wide: the longer edge is the height.";
|
|
810
|
+
};
|
|
811
|
+
}, {
|
|
812
|
+
readonly key: "landscape";
|
|
813
|
+
readonly label: {
|
|
814
|
+
readonly en: "Landscape";
|
|
815
|
+
};
|
|
816
|
+
readonly description: {
|
|
817
|
+
readonly en: "Wider than tall: the longer edge is the width.";
|
|
818
|
+
};
|
|
819
|
+
}];
|
|
820
|
+
readonly default: "free";
|
|
821
|
+
readonly description: "Which way up the picture is drawn. As set takes the sampling's size unchanged.";
|
|
822
|
+
};
|
|
823
|
+
readonly cutOut: {
|
|
824
|
+
readonly type: "enum";
|
|
825
|
+
readonly of: readonly ["off", "native-or-task", "native-only"];
|
|
826
|
+
readonly members: readonly [{
|
|
827
|
+
readonly key: "off";
|
|
828
|
+
readonly label: {
|
|
829
|
+
readonly en: "Off";
|
|
830
|
+
};
|
|
831
|
+
readonly description: {
|
|
832
|
+
readonly en: "Keeps the background the model draws.";
|
|
833
|
+
};
|
|
834
|
+
}, {
|
|
835
|
+
readonly key: "native-or-task";
|
|
836
|
+
readonly label: {
|
|
837
|
+
readonly en: "Transparent when possible";
|
|
838
|
+
};
|
|
839
|
+
readonly description: {
|
|
840
|
+
readonly en: "Asks the model for a transparent background, or cuts one out afterwards when it cannot.";
|
|
841
|
+
};
|
|
842
|
+
}, {
|
|
843
|
+
readonly key: "native-only";
|
|
844
|
+
readonly label: {
|
|
845
|
+
readonly en: "Transparent from the model";
|
|
846
|
+
};
|
|
847
|
+
readonly description: {
|
|
848
|
+
readonly en: "Only runs on a model that draws a transparent background itself.";
|
|
849
|
+
};
|
|
850
|
+
}];
|
|
851
|
+
readonly default: "off";
|
|
852
|
+
readonly description: "Whether the picture needs a transparent background, and where it may come from.";
|
|
853
|
+
};
|
|
854
|
+
readonly references: {
|
|
855
|
+
readonly type: "enum";
|
|
856
|
+
readonly of: readonly ["preferred", "required"];
|
|
857
|
+
readonly members: readonly [{
|
|
858
|
+
readonly key: "preferred";
|
|
859
|
+
readonly label: {
|
|
860
|
+
readonly en: "Preferred";
|
|
861
|
+
};
|
|
862
|
+
readonly description: {
|
|
863
|
+
readonly en: "Runs on a model that can't take a reference image, from the prompt alone, and says so first.";
|
|
864
|
+
};
|
|
865
|
+
}, {
|
|
866
|
+
readonly key: "required";
|
|
867
|
+
readonly label: {
|
|
868
|
+
readonly en: "Required";
|
|
869
|
+
};
|
|
870
|
+
readonly description: {
|
|
871
|
+
readonly en: "Only runs on a model that takes reference images.";
|
|
872
|
+
};
|
|
873
|
+
}];
|
|
874
|
+
readonly default: "preferred";
|
|
875
|
+
readonly description: "What happens when the model cannot take the reference images wired to this step.";
|
|
876
|
+
};
|
|
877
|
+
/**
|
|
878
|
+
* 🚧 One seed for the whole step:
|
|
879
|
+
* `per-run` draws a seed once when the sampling's
|
|
880
|
+
* seed is random and sends it with every call, so a
|
|
881
|
+
* series drawn on an SD-class model coheres. A sampling
|
|
882
|
+
* that fixes its own seed keeps it. Models that ignore
|
|
883
|
+
* seeds ignore this too.
|
|
884
|
+
*/
|
|
885
|
+
readonly seed: {
|
|
886
|
+
readonly type: "enum";
|
|
887
|
+
readonly of: readonly ["as-set", "per-run"];
|
|
888
|
+
readonly members: readonly [{
|
|
889
|
+
readonly key: "as-set";
|
|
890
|
+
readonly label: {
|
|
891
|
+
readonly en: "As set";
|
|
892
|
+
};
|
|
893
|
+
readonly description: {
|
|
894
|
+
readonly en: "Uses the sampling's seed: random stays random for every picture.";
|
|
895
|
+
};
|
|
896
|
+
}, {
|
|
897
|
+
readonly key: "per-run";
|
|
898
|
+
readonly label: {
|
|
899
|
+
readonly en: "Same for every picture";
|
|
900
|
+
};
|
|
901
|
+
readonly description: {
|
|
902
|
+
readonly en: "Picks one seed per run and draws every picture with it, so a set looks alike.";
|
|
903
|
+
};
|
|
904
|
+
}];
|
|
905
|
+
readonly default: "as-set";
|
|
906
|
+
readonly description: "Whether every picture this step draws shares one seed.";
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
} | undefined;
|
|
911
|
+
}>;
|
|
912
|
+
/**
|
|
913
|
+
* A plugin's own image provider, kept as the worked example of one: same shape,
|
|
914
|
+
* same slots, a `params` schema of its own. Nothing in core dispatches it.
|
|
915
|
+
* @internal
|
|
916
|
+
*/
|
|
917
|
+
export declare const renderImage: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
918
|
+
main: string;
|
|
919
|
+
image: string;
|
|
920
|
+
}, {
|
|
921
|
+
context: string;
|
|
922
|
+
}, "chariot.comfy:render-image@1"> & {
|
|
923
|
+
kind: 'oracle';
|
|
924
|
+
slots?: {
|
|
925
|
+
readonly connection: {
|
|
926
|
+
readonly kind: "connection";
|
|
927
|
+
readonly quick: true;
|
|
928
|
+
readonly shape: string;
|
|
929
|
+
readonly requires: readonly ["text->image"];
|
|
930
|
+
};
|
|
931
|
+
readonly sampling: {
|
|
932
|
+
readonly kind: "sampling";
|
|
933
|
+
readonly quick: true;
|
|
934
|
+
readonly shape: string;
|
|
935
|
+
};
|
|
936
|
+
readonly prompts: {
|
|
937
|
+
readonly kind: "prompts";
|
|
938
|
+
readonly quick: true;
|
|
939
|
+
readonly facet: "prompts";
|
|
940
|
+
readonly fields: {
|
|
941
|
+
readonly positive: {
|
|
942
|
+
readonly type: "text";
|
|
943
|
+
};
|
|
944
|
+
readonly negative: {
|
|
945
|
+
readonly type: "text";
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
readonly params: {
|
|
950
|
+
readonly kind: "parameters";
|
|
951
|
+
readonly facet: "weights";
|
|
952
|
+
readonly schema: {
|
|
953
|
+
readonly steps: {
|
|
954
|
+
readonly type: "integer";
|
|
955
|
+
readonly default: 25;
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
} | undefined;
|
|
960
|
+
}>;
|
|
961
|
+
/**
|
|
962
|
+
* **The sprite picker** — which sprite a line shows, chosen in one step from
|
|
963
|
+
* what the reply spec hands it: the line's text, whose line it is, and (when
|
|
964
|
+
* the spec knows it) the sprite set.
|
|
965
|
+
*
|
|
966
|
+
* All in one (owner, 2026-10-05). The step reads what the speaker can show —
|
|
967
|
+
* the set in force and that set's sprite labels, and the speaker's recent
|
|
968
|
+
* faces — then embeds the line and the labels, and picks the label whose
|
|
969
|
+
* vector is closest to the line's, with a small penalty on labels shown in the
|
|
970
|
+
* speaker's recent lines and a **stickiness margin**: the last shown sprite is
|
|
971
|
+
* kept unless the best beats it by `margin`, which stops a face flickering on
|
|
972
|
+
* every line. The receipt answers "why this face": `choices` carries the set
|
|
973
|
+
* and how it was decided, `pick` the label, its score, the runner-up and
|
|
974
|
+
* whether stickiness held.
|
|
975
|
+
*
|
|
976
|
+
* ⚠ **An oracle, because it embeds.** An embedding model is an external,
|
|
977
|
+
* nondeterministic source, and with an embedding service it is a provider
|
|
978
|
+
* call — one per reply whose speaker has sprites, after the reply is saved, so
|
|
979
|
+
* it never delays the reply. A task is pure and a query may not reach the
|
|
980
|
+
* network; this step does both of the things they may not.
|
|
981
|
+
*
|
|
982
|
+
* ⚠ **No connection slot.** A pipeline never chooses its embedding connection:
|
|
983
|
+
* the host embeds through the install's one active embedding connection, by
|
|
984
|
+
* policy, as it does for `embed-text`. Label vectors are the host's to cache
|
|
985
|
+
* per model.
|
|
986
|
+
*
|
|
987
|
+
* **Picks nothing** — null, and embeds nothing — when `enabled` is off, when
|
|
988
|
+
* the speaker has no sprites (no `speaker`, an envoy, a card with no art), or
|
|
989
|
+
* when no embedding model is set up: an absent mechanism subtracts a signal, it
|
|
990
|
+
* never guesses. A fault here must never fail a delivered reply, so the
|
|
991
|
+
* binding answers a failure with null rather than an error.
|
|
992
|
+
*
|
|
993
|
+
* Not `core:outlet/show-sprite@1`, which records a pick; not the sprite set
|
|
994
|
+
* slot (`core:slot/sprite-set@1`), which is the session's override this step
|
|
995
|
+
* reads.
|
|
996
|
+
* @experimental
|
|
997
|
+
*/
|
|
998
|
+
export declare const pickSprite: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
999
|
+
/** The pick, `sprite-pick@1`: `{ set, label, … }`, or null for none. */
|
|
1000
|
+
main: string;
|
|
1001
|
+
pick: string;
|
|
1002
|
+
/**
|
|
1003
|
+
* What the speaker could show, and how the set was decided
|
|
1004
|
+
* (`decidedBy`, `missing`) — for the receipt, never for the line.
|
|
1005
|
+
*/
|
|
1006
|
+
choices: string;
|
|
1007
|
+
}, {
|
|
1008
|
+
/**
|
|
1009
|
+
* The line's own text — the reply string the spec saved, wired
|
|
1010
|
+
* from the step that produced it. Never re-read from the row:
|
|
1011
|
+
* that is the hidden read this step replaced.
|
|
1012
|
+
*/
|
|
1013
|
+
text: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* Whose line it is, as a **participant reference** — the one the
|
|
1016
|
+
* spec wrote the reply row as (the inlet's `speaker`, or a
|
|
1017
|
+
* character turn's own). `character:<id>` has a card, and so may
|
|
1018
|
+
* have sprites; `envoy:<slug>`, or none at all (a narrator's
|
|
1019
|
+
* line), has none, and the pick is null.
|
|
1020
|
+
*/
|
|
1021
|
+
speaker: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* The session the line is in — where the set is decided (the
|
|
1024
|
+
* session's override, the cast member's set at the session's
|
|
1025
|
+
* reading) and the speaker's recent faces are found: their
|
|
1026
|
+
* lines in this session other than the one this run is
|
|
1027
|
+
* writing. ⚠ Never read for whose line it is; that is `speaker`.
|
|
1028
|
+
*/
|
|
1029
|
+
scope: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* The sprite set to choose within, when the spec knows it.
|
|
1032
|
+
* Absent — every core spec — the set is decided from the
|
|
1033
|
+
* speaker, in one order: the session's override, then the cast
|
|
1034
|
+
* member's set, then the card's default set. A name the card
|
|
1035
|
+
* has no set by falls to the default set and says so on
|
|
1036
|
+
* `choices`, never silently.
|
|
1037
|
+
*/
|
|
1038
|
+
set: string;
|
|
1039
|
+
}, "core:oracle/pick-sprite@1"> & {
|
|
1040
|
+
kind: 'oracle';
|
|
1041
|
+
slots?: {
|
|
1042
|
+
readonly params: {
|
|
1043
|
+
readonly kind: "parameters";
|
|
1044
|
+
readonly schema: {
|
|
1045
|
+
/**
|
|
1046
|
+
* Sprites off for this session (or instance): the picker
|
|
1047
|
+
* picks nothing and embeds nothing, and faces stay as they
|
|
1048
|
+
* are.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly enabled: {
|
|
1051
|
+
readonly type: "boolean";
|
|
1052
|
+
readonly label: "Choose sprites";
|
|
1053
|
+
readonly description: "Choose a sprite for each character's line. Off leaves faces as they are.";
|
|
1054
|
+
readonly default: true;
|
|
1055
|
+
};
|
|
1056
|
+
readonly margin: {
|
|
1057
|
+
readonly type: "number";
|
|
1058
|
+
readonly label: "Stickiness";
|
|
1059
|
+
readonly description: "How much closer a new sprite must be before the face changes. Higher keeps faces steadier.";
|
|
1060
|
+
readonly min: 0;
|
|
1061
|
+
readonly max: 0.5;
|
|
1062
|
+
readonly default: 0.04;
|
|
1063
|
+
};
|
|
1064
|
+
readonly floor: {
|
|
1065
|
+
readonly type: "number";
|
|
1066
|
+
readonly label: "Minimum similarity";
|
|
1067
|
+
readonly description: "A line less similar than this to every sprite keeps the last one, or shows neutral.";
|
|
1068
|
+
readonly min: 0;
|
|
1069
|
+
readonly max: 1;
|
|
1070
|
+
readonly default: 0.1;
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
} | undefined;
|
|
1075
|
+
}>;
|
|
1076
|
+
/** Phase 1 — one batch, drafted without sight of any other. @internal */
|
|
1077
|
+
export declare const summarizeBatch: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1078
|
+
main: string;
|
|
1079
|
+
draft: string;
|
|
1080
|
+
}, {
|
|
1081
|
+
batch: string;
|
|
1082
|
+
request: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* Which kind of entry this pipeline writes — the word every
|
|
1085
|
+
* summarize prompt template branches on (D-I).
|
|
1086
|
+
*
|
|
1087
|
+
* ## A port, not a parameter, and the call site is what decides
|
|
1088
|
+
*
|
|
1089
|
+
* `summarizeSpec` writes it as a **literal into the node's
|
|
1090
|
+
* config**, in the same map as `batch` and `request` and
|
|
1091
|
+
* alongside them: `C.summarizeBatch.v1({ batch, request,
|
|
1092
|
+
* loreType, … })`. `resolveInput` passes a non-ref config value
|
|
1093
|
+
* through untouched, so the binding reads `input.loreType`
|
|
1094
|
+
* exactly the way it reads a port — same position, same access,
|
|
1095
|
+
* same absence-is-`undefined`. Declaring it as anything else
|
|
1096
|
+
* would describe a mechanism that is not the one running.
|
|
1097
|
+
*
|
|
1098
|
+
* A `params` field is the alternative, and it is the wrong one
|
|
1099
|
+
* twice over. It would move the read to `input.params.loreType`
|
|
1100
|
+
* — a different value from a different layer — and it would put
|
|
1101
|
+
* the control in the panel, stored per configuration and
|
|
1102
|
+
* layered instance → user → session like every other parameter.
|
|
1103
|
+
* `SummarizeShape` in the catalog already rules on that: this is
|
|
1104
|
+
* "the thing that distinguishes the four namespaces from one
|
|
1105
|
+
* another", and a user who changed it "would turn their scene
|
|
1106
|
+
* summarizer into a world summarizer without renaming
|
|
1107
|
+
* anything".
|
|
1108
|
+
*
|
|
1109
|
+
* ⚠ An in-port no edge feeds is not a contradiction here. A
|
|
1110
|
+
* port is a named input the node reads; where the value comes
|
|
1111
|
+
* from — an upstream node, or an author writing it down — is the
|
|
1112
|
+
* document's business. What the declaration buys is that the
|
|
1113
|
+
* name is now checkable: the app's binding types derive their
|
|
1114
|
+
* legal reads from `ports.in`, so `input.loreTypes` stops
|
|
1115
|
+
* compiling, and the panel and the plugin validator can both see
|
|
1116
|
+
* that this node takes one.
|
|
1117
|
+
*
|
|
1118
|
+
* `text` rather than an enum shape: a shape ids a payload, and
|
|
1119
|
+
* the four legal words are the prompt templates' vocabulary,
|
|
1120
|
+
* which a plugin summarizer is free to extend.
|
|
1121
|
+
*/
|
|
1122
|
+
loreType: string;
|
|
1123
|
+
}, "core:oracle/summarize-batch@1"> & {
|
|
1124
|
+
kind: 'oracle';
|
|
1125
|
+
slots?: {
|
|
1126
|
+
readonly loadout: {
|
|
1127
|
+
readonly kind: 'loadout';
|
|
1128
|
+
readonly quick: true;
|
|
1129
|
+
};
|
|
1130
|
+
readonly connection: {
|
|
1131
|
+
readonly kind: "connection";
|
|
1132
|
+
readonly quick: true;
|
|
1133
|
+
readonly shape: string;
|
|
1134
|
+
readonly requires: readonly ["text->text"];
|
|
1135
|
+
};
|
|
1136
|
+
readonly sampling: {
|
|
1137
|
+
readonly kind: "sampling";
|
|
1138
|
+
readonly quick: true;
|
|
1139
|
+
readonly shape: string;
|
|
1140
|
+
};
|
|
1141
|
+
readonly prompts: {
|
|
1142
|
+
readonly kind: "prompts";
|
|
1143
|
+
readonly quick: true;
|
|
1144
|
+
readonly facet: "prompts";
|
|
1145
|
+
readonly fields: {
|
|
1146
|
+
readonly batch: {
|
|
1147
|
+
readonly type: "text";
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
} | undefined;
|
|
1152
|
+
}>;
|
|
1153
|
+
/** Phase 2 — the ordered drafts merged into one past-tense narrative. @internal */
|
|
1154
|
+
export declare const summarizeSynth: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1155
|
+
main: string;
|
|
1156
|
+
content: string;
|
|
1157
|
+
}, {
|
|
1158
|
+
drafts: string;
|
|
1159
|
+
request: string;
|
|
1160
|
+
/** Authored on the node, exactly as on the batch step — see it. */
|
|
1161
|
+
loreType: string;
|
|
1162
|
+
}, "core:oracle/summarize-synth@1"> & {
|
|
1163
|
+
kind: 'oracle';
|
|
1164
|
+
slots?: {
|
|
1165
|
+
readonly loadout: {
|
|
1166
|
+
readonly kind: 'loadout';
|
|
1167
|
+
readonly quick: true;
|
|
1168
|
+
};
|
|
1169
|
+
readonly connection: {
|
|
1170
|
+
readonly kind: "connection";
|
|
1171
|
+
readonly quick: true;
|
|
1172
|
+
readonly shape: string;
|
|
1173
|
+
readonly requires: readonly ["text->text"];
|
|
1174
|
+
};
|
|
1175
|
+
readonly sampling: {
|
|
1176
|
+
readonly kind: "sampling";
|
|
1177
|
+
readonly quick: true;
|
|
1178
|
+
readonly shape: string;
|
|
1179
|
+
};
|
|
1180
|
+
readonly prompts: {
|
|
1181
|
+
readonly kind: "prompts";
|
|
1182
|
+
readonly quick: true;
|
|
1183
|
+
readonly facet: "prompts";
|
|
1184
|
+
readonly fields: {
|
|
1185
|
+
readonly synth: {
|
|
1186
|
+
readonly type: "text";
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
} | undefined;
|
|
1191
|
+
}>;
|
|
1192
|
+
/** What the entry gets called. Its own step because it has its own prompt. @internal */
|
|
1193
|
+
export declare const nameEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1194
|
+
main: string;
|
|
1195
|
+
name: string;
|
|
1196
|
+
}, {
|
|
1197
|
+
content: string;
|
|
1198
|
+
/** Authored on the node, exactly as on the two steps above — see them. */
|
|
1199
|
+
loreType: string;
|
|
1200
|
+
}, "core:oracle/name-entry@1"> & {
|
|
1201
|
+
kind: 'oracle';
|
|
1202
|
+
slots?: {
|
|
1203
|
+
readonly loadout: {
|
|
1204
|
+
readonly kind: 'loadout';
|
|
1205
|
+
readonly quick: true;
|
|
1206
|
+
};
|
|
1207
|
+
readonly connection: {
|
|
1208
|
+
readonly kind: "connection";
|
|
1209
|
+
readonly quick: true;
|
|
1210
|
+
readonly shape: string;
|
|
1211
|
+
readonly requires: readonly ["text->text"];
|
|
1212
|
+
};
|
|
1213
|
+
readonly sampling: {
|
|
1214
|
+
readonly kind: "sampling";
|
|
1215
|
+
readonly quick: true;
|
|
1216
|
+
readonly shape: string;
|
|
1217
|
+
};
|
|
1218
|
+
readonly prompts: {
|
|
1219
|
+
readonly kind: "prompts";
|
|
1220
|
+
readonly quick: true;
|
|
1221
|
+
readonly facet: "prompts";
|
|
1222
|
+
readonly fields: {
|
|
1223
|
+
readonly name: {
|
|
1224
|
+
readonly type: "text";
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
} | undefined;
|
|
1229
|
+
}>;
|
|
1230
|
+
/**
|
|
1231
|
+
* Who was in the scene — scene summaries only.
|
|
1232
|
+
*
|
|
1233
|
+
* Present on one summarize pipeline and not the other three, which is exactly
|
|
1234
|
+
* why they are four specs rather than one spec with a flag. A flag would put the
|
|
1235
|
+
* difference in a condition somebody has to find; four specs put it in the shape.
|
|
1236
|
+
* @internal
|
|
1237
|
+
*/
|
|
1238
|
+
export declare const extractCast: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1239
|
+
main: string;
|
|
1240
|
+
cast: string;
|
|
1241
|
+
}, {
|
|
1242
|
+
content: string;
|
|
1243
|
+
request: string;
|
|
1244
|
+
}, "core:oracle/extract-cast@1"> & {
|
|
1245
|
+
kind: 'oracle';
|
|
1246
|
+
slots?: {
|
|
1247
|
+
readonly loadout: {
|
|
1248
|
+
readonly kind: 'loadout';
|
|
1249
|
+
readonly quick: true;
|
|
1250
|
+
};
|
|
1251
|
+
readonly connection: {
|
|
1252
|
+
readonly kind: "connection";
|
|
1253
|
+
readonly quick: true;
|
|
1254
|
+
readonly shape: string;
|
|
1255
|
+
readonly requires: readonly ["text->text"];
|
|
1256
|
+
};
|
|
1257
|
+
readonly sampling: {
|
|
1258
|
+
readonly kind: "sampling";
|
|
1259
|
+
readonly quick: true;
|
|
1260
|
+
readonly shape: string;
|
|
1261
|
+
};
|
|
1262
|
+
readonly prompts: {
|
|
1263
|
+
readonly kind: "prompts";
|
|
1264
|
+
readonly quick: true;
|
|
1265
|
+
readonly facet: "prompts";
|
|
1266
|
+
readonly fields: {
|
|
1267
|
+
readonly characterExtraction: {
|
|
1268
|
+
readonly type: "text";
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
/**
|
|
1273
|
+
* The two halves of a replaceable core function, on the scripts
|
|
1274
|
+
* rung. Scripts here *shape* the extraction — what the model reads,
|
|
1275
|
+
* what the pipeline keeps. Replacing the extractor itself is the
|
|
1276
|
+
* other rung: a same-shaped provider offered by the swap list,
|
|
1277
|
+
* because extraction calls a model and scripts are pure compute.
|
|
1278
|
+
*/
|
|
1279
|
+
readonly scripts: {
|
|
1280
|
+
readonly kind: "scripts";
|
|
1281
|
+
readonly accepts: ["core:script:text/transform@1"];
|
|
1282
|
+
readonly port: "content";
|
|
1283
|
+
readonly phase: "before";
|
|
1284
|
+
readonly description: "Scripts over the scene text before the extractor reads it — strip out-of-character chatter, normalise a nickname, redact.";
|
|
1285
|
+
};
|
|
1286
|
+
readonly castScripts: {
|
|
1287
|
+
readonly kind: "scripts";
|
|
1288
|
+
readonly accepts: ["core:script:cast/transform@1"];
|
|
1289
|
+
readonly port: "cast";
|
|
1290
|
+
readonly phase: "after";
|
|
1291
|
+
readonly description: "Scripts over the extracted cast — rename someone, merge aliases, drop a junk detection, add someone the model missed.";
|
|
1292
|
+
};
|
|
1293
|
+
} | undefined;
|
|
1294
|
+
}>;
|
|
1295
|
+
/** Which existing node a mentioned name refers to, or whether it is new. @internal */
|
|
1296
|
+
export declare const graphNodeResolution: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1297
|
+
main: string;
|
|
1298
|
+
result: string;
|
|
1299
|
+
}, {
|
|
1300
|
+
scenes: string;
|
|
1301
|
+
}, string> & {
|
|
1302
|
+
kind: 'oracle';
|
|
1303
|
+
slots?: {
|
|
1304
|
+
readonly loadout: {
|
|
1305
|
+
readonly kind: 'loadout';
|
|
1306
|
+
readonly quick: true;
|
|
1307
|
+
};
|
|
1308
|
+
readonly connection: {
|
|
1309
|
+
readonly kind: "connection";
|
|
1310
|
+
readonly quick: true;
|
|
1311
|
+
readonly shape: string;
|
|
1312
|
+
readonly requires: readonly ["text->text"];
|
|
1313
|
+
};
|
|
1314
|
+
readonly sampling: {
|
|
1315
|
+
readonly kind: "sampling";
|
|
1316
|
+
readonly quick: true;
|
|
1317
|
+
readonly shape: string;
|
|
1318
|
+
};
|
|
1319
|
+
readonly prompts: {
|
|
1320
|
+
readonly kind: "prompts";
|
|
1321
|
+
readonly quick: true;
|
|
1322
|
+
readonly facet: "prompts";
|
|
1323
|
+
readonly fields: {
|
|
1324
|
+
readonly [x: string]: {
|
|
1325
|
+
readonly type: "text";
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
} | undefined;
|
|
1330
|
+
}>;
|
|
1331
|
+
/** Drop what is not worth graphing before the expensive steps run. @internal */
|
|
1332
|
+
export declare const graphPreFilter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1333
|
+
main: string;
|
|
1334
|
+
result: string;
|
|
1335
|
+
}, {
|
|
1336
|
+
scenes: string;
|
|
1337
|
+
}, string> & {
|
|
1338
|
+
kind: 'oracle';
|
|
1339
|
+
slots?: {
|
|
1340
|
+
readonly loadout: {
|
|
1341
|
+
readonly kind: 'loadout';
|
|
1342
|
+
readonly quick: true;
|
|
1343
|
+
};
|
|
1344
|
+
readonly connection: {
|
|
1345
|
+
readonly kind: "connection";
|
|
1346
|
+
readonly quick: true;
|
|
1347
|
+
readonly shape: string;
|
|
1348
|
+
readonly requires: readonly ["text->text"];
|
|
1349
|
+
};
|
|
1350
|
+
readonly sampling: {
|
|
1351
|
+
readonly kind: "sampling";
|
|
1352
|
+
readonly quick: true;
|
|
1353
|
+
readonly shape: string;
|
|
1354
|
+
};
|
|
1355
|
+
readonly prompts: {
|
|
1356
|
+
readonly kind: "prompts";
|
|
1357
|
+
readonly quick: true;
|
|
1358
|
+
readonly facet: "prompts";
|
|
1359
|
+
readonly fields: {
|
|
1360
|
+
readonly [x: string]: {
|
|
1361
|
+
readonly type: "text";
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
};
|
|
1365
|
+
} | undefined;
|
|
1366
|
+
}>;
|
|
1367
|
+
/** Whose account of the scene this is. @internal */
|
|
1368
|
+
export declare const graphPerspective: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1369
|
+
main: string;
|
|
1370
|
+
result: string;
|
|
1371
|
+
}, {
|
|
1372
|
+
scenes: string;
|
|
1373
|
+
}, string> & {
|
|
1374
|
+
kind: 'oracle';
|
|
1375
|
+
slots?: {
|
|
1376
|
+
readonly loadout: {
|
|
1377
|
+
readonly kind: 'loadout';
|
|
1378
|
+
readonly quick: true;
|
|
1379
|
+
};
|
|
1380
|
+
readonly connection: {
|
|
1381
|
+
readonly kind: "connection";
|
|
1382
|
+
readonly quick: true;
|
|
1383
|
+
readonly shape: string;
|
|
1384
|
+
readonly requires: readonly ["text->text"];
|
|
1385
|
+
};
|
|
1386
|
+
readonly sampling: {
|
|
1387
|
+
readonly kind: "sampling";
|
|
1388
|
+
readonly quick: true;
|
|
1389
|
+
readonly shape: string;
|
|
1390
|
+
};
|
|
1391
|
+
readonly prompts: {
|
|
1392
|
+
readonly kind: "prompts";
|
|
1393
|
+
readonly quick: true;
|
|
1394
|
+
readonly facet: "prompts";
|
|
1395
|
+
readonly fields: {
|
|
1396
|
+
readonly [x: string]: {
|
|
1397
|
+
readonly type: "text";
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1401
|
+
} | undefined;
|
|
1402
|
+
}>;
|
|
1403
|
+
/** The two-sentence introduction written for a newly discovered character. @internal */
|
|
1404
|
+
export declare const graphNodeDescription: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1405
|
+
main: string;
|
|
1406
|
+
result: string;
|
|
1407
|
+
}, {
|
|
1408
|
+
scenes: string;
|
|
1409
|
+
}, string> & {
|
|
1410
|
+
kind: 'oracle';
|
|
1411
|
+
slots?: {
|
|
1412
|
+
readonly loadout: {
|
|
1413
|
+
readonly kind: 'loadout';
|
|
1414
|
+
readonly quick: true;
|
|
1415
|
+
};
|
|
1416
|
+
readonly connection: {
|
|
1417
|
+
readonly kind: "connection";
|
|
1418
|
+
readonly quick: true;
|
|
1419
|
+
readonly shape: string;
|
|
1420
|
+
readonly requires: readonly ["text->text"];
|
|
1421
|
+
};
|
|
1422
|
+
readonly sampling: {
|
|
1423
|
+
readonly kind: "sampling";
|
|
1424
|
+
readonly quick: true;
|
|
1425
|
+
readonly shape: string;
|
|
1426
|
+
};
|
|
1427
|
+
readonly prompts: {
|
|
1428
|
+
readonly kind: "prompts";
|
|
1429
|
+
readonly quick: true;
|
|
1430
|
+
readonly facet: "prompts";
|
|
1431
|
+
readonly fields: {
|
|
1432
|
+
readonly [x: string]: {
|
|
1433
|
+
readonly type: "text";
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
};
|
|
1437
|
+
} | undefined;
|
|
1438
|
+
}>;
|
|
1439
|
+
/** Did any present character reach a new lifecycle state this scene? @internal */
|
|
1440
|
+
export declare const graphStateDetection: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1441
|
+
main: string;
|
|
1442
|
+
result: string;
|
|
1443
|
+
}, {
|
|
1444
|
+
scenes: string;
|
|
1445
|
+
}, string> & {
|
|
1446
|
+
kind: 'oracle';
|
|
1447
|
+
slots?: {
|
|
1448
|
+
readonly loadout: {
|
|
1449
|
+
readonly kind: 'loadout';
|
|
1450
|
+
readonly quick: true;
|
|
1451
|
+
};
|
|
1452
|
+
readonly connection: {
|
|
1453
|
+
readonly kind: "connection";
|
|
1454
|
+
readonly quick: true;
|
|
1455
|
+
readonly shape: string;
|
|
1456
|
+
readonly requires: readonly ["text->text"];
|
|
1457
|
+
};
|
|
1458
|
+
readonly sampling: {
|
|
1459
|
+
readonly kind: "sampling";
|
|
1460
|
+
readonly quick: true;
|
|
1461
|
+
readonly shape: string;
|
|
1462
|
+
};
|
|
1463
|
+
readonly prompts: {
|
|
1464
|
+
readonly kind: "prompts";
|
|
1465
|
+
readonly quick: true;
|
|
1466
|
+
readonly facet: "prompts";
|
|
1467
|
+
readonly fields: {
|
|
1468
|
+
readonly [x: string]: {
|
|
1469
|
+
readonly type: "text";
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
} | undefined;
|
|
1474
|
+
}>;
|
|
1475
|
+
/**
|
|
1476
|
+
* 🚧 **Describe image** — a model that reads pictures is shown one or more
|
|
1477
|
+
* images and asked one written question about them; its answer is the text
|
|
1478
|
+
* out (*Describe from image*, 2026-10-12).
|
|
1479
|
+
*
|
|
1480
|
+
* Not `generate-text`: that node sends an assembled TURN (a transcript, a
|
|
1481
|
+
* speaker, a reply being continued) and its connection requires only
|
|
1482
|
+
* `text->text`, so it resolves to the instance's chat default. This node
|
|
1483
|
+
* sends no transcript — one instruction plus the images — and its connection
|
|
1484
|
+
* REQUIRES `text+image->text`, so an unset slot resolves to the default of
|
|
1485
|
+
* that job (the model that reads pictures), never to the chat model.
|
|
1486
|
+
*
|
|
1487
|
+
* Not a caption either: `caption` is `generate-image`'s out-port (the text a
|
|
1488
|
+
* picture is posted with). This node's answer is whatever the instruction
|
|
1489
|
+
* asks for — a tag list of a person's look, for the likeness helper.
|
|
1490
|
+
*
|
|
1491
|
+
* The instruction is the `prompts` slot's `instruction` field (a prompt
|
|
1492
|
+
* row), so an admin rewrites the question in Admin › Pipelines.
|
|
1493
|
+
* @experimental
|
|
1494
|
+
*/
|
|
1495
|
+
export declare const describeImage: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1496
|
+
main: string;
|
|
1497
|
+
text: string;
|
|
1498
|
+
}, {
|
|
1499
|
+
/** The pictures to read, in order. Empty refuses: there is nothing to describe. */
|
|
1500
|
+
images: string;
|
|
1501
|
+
}, "core:oracle/describe-image@1"> & {
|
|
1502
|
+
kind: 'oracle';
|
|
1503
|
+
slots?: {
|
|
1504
|
+
readonly loadout: {
|
|
1505
|
+
readonly kind: 'loadout';
|
|
1506
|
+
readonly quick: true;
|
|
1507
|
+
};
|
|
1508
|
+
readonly connection: {
|
|
1509
|
+
readonly kind: "connection";
|
|
1510
|
+
readonly quick: true;
|
|
1511
|
+
readonly shape: string;
|
|
1512
|
+
/** A model that reads images — the job default this resolves to when unset. */
|
|
1513
|
+
readonly requires: readonly ["text+image->text"];
|
|
1514
|
+
readonly description: "Which model reads the picture. It must be one that can see images.";
|
|
1515
|
+
};
|
|
1516
|
+
readonly sampling: {
|
|
1517
|
+
readonly kind: "sampling";
|
|
1518
|
+
readonly quick: true;
|
|
1519
|
+
readonly shape: string;
|
|
1520
|
+
readonly description: "The sampling settings used for this request.";
|
|
1521
|
+
};
|
|
1522
|
+
readonly prompts: {
|
|
1523
|
+
readonly kind: "prompts";
|
|
1524
|
+
readonly quick: true;
|
|
1525
|
+
readonly facet: "prompts";
|
|
1526
|
+
readonly description: "The question the model is asked about the picture.";
|
|
1527
|
+
readonly fields: {
|
|
1528
|
+
readonly instruction: {
|
|
1529
|
+
readonly type: "text";
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
} | undefined;
|
|
1534
|
+
}>;
|
|
1535
|
+
//# sourceMappingURL=oracles.d.ts.map
|