@serene-pub/contracts 0.6.0-pr-5 โ 0.6.0-pr-7
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/inlets.d.ts +183 -0
- package/dist/inlets.js +350 -2
- package/dist/oracles.d.ts +317 -4
- package/dist/oracles.js +235 -10
- package/dist/outlets.d.ts +618 -2
- package/dist/outlets.js +667 -11
- package/dist/queries.d.ts +278 -1
- package/dist/queries.js +301 -4
- package/dist/tasks.d.ts +736 -7
- package/dist/tasks.js +527 -7
- package/package.json +3 -3
package/dist/tasks.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ import type { SlotDecl } from '@serene-pub/sdk';
|
|
|
9
9
|
export declare const contextBudget: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
10
10
|
main: string;
|
|
11
11
|
available: string;
|
|
12
|
-
|
|
12
|
+
fittedBlocks: string;
|
|
13
|
+
reads: string;
|
|
14
|
+
}, {
|
|
15
|
+
blocks: string;
|
|
16
|
+
}, "core:task/context-budget@1"> & {
|
|
13
17
|
kind: 'task';
|
|
14
18
|
slots?: {
|
|
15
19
|
/**
|
|
@@ -2509,7 +2513,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2509
2513
|
* (2026-09-29) โ the narrator modal's text,
|
|
2510
2514
|
* which feeds both of its halves. `{{turnDirection}}`, on the
|
|
2511
2515
|
* terms `build-narrator-context@1` states; wired by
|
|
2512
|
-
* `core:spec/
|
|
2516
|
+
* `core:spec/story-side-character` alone, so a genre's voices
|
|
2513
2517
|
* (whose composer text is a line somebody said) render
|
|
2514
2518
|
* nothing new.
|
|
2515
2519
|
*/
|
|
@@ -3296,6 +3300,66 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
3296
3300
|
kind: 'task';
|
|
3297
3301
|
slots?: Record<string, SlotDecl> | undefined;
|
|
3298
3302
|
}>;
|
|
3303
|
+
/**
|
|
3304
|
+
* ๐ง **Unprompted turns** (PLAN-genre-restructure ยง4, the voices group; lane
|
|
3305
|
+
* 2, 2026-10-19): what a genre's background tasks add to the order a
|
|
3306
|
+
* strategy prepared, after the round. Canon A9 holds โ who speaks is state,
|
|
3307
|
+
* written by the turn-order spec and fired by auto-advance; nothing reads the
|
|
3308
|
+
* history to decide a reply elsewhere.
|
|
3309
|
+
*
|
|
3310
|
+
* Only when the round has ended (no AI entry still to fire) and somebody has
|
|
3311
|
+
* answered the person since their line, it puts ONE entry at the head, at
|
|
3312
|
+
* most once per round each:
|
|
3313
|
+
*
|
|
3314
|
+
* ยท `side-cast` on โ a seated character who did not speak last speaks up
|
|
3315
|
+
* again (`{ ref: 'character:<id>', via: 'unprompted' }`); once any
|
|
3316
|
+
* character has spoken twice since the person's line, it is done;
|
|
3317
|
+
* ยท `narrator-interjections` on โ the narrator adds a line
|
|
3318
|
+
* (`{ ref: null, via: 'unprompted', subject: <params.narrate> }`, the
|
|
3319
|
+
* genre's narrate action; a plain narrator reply when unset), unless a
|
|
3320
|
+
* narration already landed since the person's line.
|
|
3321
|
+
*
|
|
3322
|
+
* `modes` is `{ 'side-cast': โฆ, 'narrator-interjections': โฆ }` โ `full` or
|
|
3323
|
+
* `off` each, the genre's voices settings as the turn-order spec reads them
|
|
3324
|
+
* (`core:script/unprompted-modes`, 2026-10-20; was the retired background
|
|
3325
|
+
* tasks' modes); a key absent or `off` adds nothing, so the order passes
|
|
3326
|
+
* through untouched โ a session with neither on gets exactly its strategy's
|
|
3327
|
+
* order. Pure.
|
|
3328
|
+
* @experimental
|
|
3329
|
+
*/
|
|
3330
|
+
export declare const turnUnprompted: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3331
|
+
main: string;
|
|
3332
|
+
order: string;
|
|
3333
|
+
}, {
|
|
3334
|
+
/** What the strategy prepared. */
|
|
3335
|
+
order: string;
|
|
3336
|
+
/** Who may be seated โ the pool's output. */
|
|
3337
|
+
candidates: string;
|
|
3338
|
+
/** The session's visible history, ascending. */
|
|
3339
|
+
messages: string;
|
|
3340
|
+
/** `{ 'side-cast', 'narrator-interjections' }` โ `full` | `off`: the genre's voices settings. */
|
|
3341
|
+
modes: string;
|
|
3342
|
+
}, "core:task/turn-unprompted@1"> & {
|
|
3343
|
+
kind: 'task';
|
|
3344
|
+
slots?: {
|
|
3345
|
+
readonly params: {
|
|
3346
|
+
readonly kind: "parameters";
|
|
3347
|
+
readonly facet: "behavior";
|
|
3348
|
+
readonly schema: {
|
|
3349
|
+
readonly narrate: {
|
|
3350
|
+
readonly type: "string";
|
|
3351
|
+
readonly default: "";
|
|
3352
|
+
readonly label: {
|
|
3353
|
+
readonly en: "Narrator action";
|
|
3354
|
+
};
|
|
3355
|
+
readonly description: {
|
|
3356
|
+
readonly en: "The action a narrator's own line fires, as '<spec>#<key>'. Empty: an ordinary reply in the narrator's voice.";
|
|
3357
|
+
};
|
|
3358
|
+
};
|
|
3359
|
+
};
|
|
3360
|
+
};
|
|
3361
|
+
} | undefined;
|
|
3362
|
+
}>;
|
|
3299
3363
|
/**
|
|
3300
3364
|
* The pool: who *may* be seated this recompute, from the settings
|
|
3301
3365
|
* document's cast and the history.
|
|
@@ -3895,7 +3959,7 @@ export declare const makeChoices: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
3895
3959
|
fn: string;
|
|
3896
3960
|
/**
|
|
3897
3961
|
* The identity of the declaration the options fire, when it is
|
|
3898
|
-
* another spec's (`core:spec/
|
|
3962
|
+
* another spec's (`core:spec/story-answer#answer`). Absent,
|
|
3899
3963
|
* the host stamps this spec's own declaration for `fn` at the
|
|
3900
3964
|
* write.
|
|
3901
3965
|
*/
|
|
@@ -5261,9 +5325,11 @@ export declare const runScript: import("@serene-pub/sdk").Pinned<import("@serene
|
|
|
5261
5325
|
* The time each script in the chain may take.
|
|
5262
5326
|
* Read by the HOST's script applier off the scope chain, not by the
|
|
5263
5327
|
* binding โ the binding never sees the chain. A script past it is
|
|
5264
|
-
* stopped and recorded `err` with the time in its reason, and the
|
|
5265
|
-
*
|
|
5266
|
-
*
|
|
5328
|
+
* stopped and recorded `err` with the time in its reason, and ๐ง the
|
|
5329
|
+
* step HALTS with that reason (2026-10-19): a script step's answer
|
|
5330
|
+
* is its script's, and handing its own input on as that answer
|
|
5331
|
+
* reached the next step as nonsense. Unset, the seam default
|
|
5332
|
+
* applies (the same 250 ms).
|
|
5267
5333
|
*/
|
|
5268
5334
|
readonly params: {
|
|
5269
5335
|
readonly kind: "parameters";
|
|
@@ -5278,11 +5344,674 @@ export declare const runScript: import("@serene-pub/sdk").Pinned<import("@serene
|
|
|
5278
5344
|
readonly en: "Script time limit (ms)";
|
|
5279
5345
|
};
|
|
5280
5346
|
readonly description: {
|
|
5281
|
-
readonly en: "How long each script in this step may run. A script that runs longer is stopped, and the
|
|
5347
|
+
readonly en: "How long each script in this step may run. A script that runs longer is stopped, and the step stops with it.";
|
|
5348
|
+
};
|
|
5349
|
+
};
|
|
5350
|
+
};
|
|
5351
|
+
};
|
|
5352
|
+
} | undefined;
|
|
5353
|
+
}>;
|
|
5354
|
+
/**
|
|
5355
|
+
* ๐ง **Resolve a ruleset** โ the one handler every genre calls to read and
|
|
5356
|
+
* apply a session's ruleset (rulesets programme, P1 contract stub).
|
|
5357
|
+
*
|
|
5358
|
+
* Ruleset-agnostic: it reads whichever ruleset the session has from the
|
|
5359
|
+
* registry (`defineRuleset`), at the rigour it is handed, in a fixed phase
|
|
5360
|
+
* order (base โ piece effects โ derived โ bridges โ prose render). A genre's
|
|
5361
|
+
* spec supplies only the moment:
|
|
5362
|
+
*
|
|
5363
|
+
* ยท `resolve` โ before a model call: labelled prompt blocks and the facts a
|
|
5364
|
+
* step may need. No dice.
|
|
5365
|
+
* ยท `apply` โ after the model proposes: validates the `deltas`, rolls what
|
|
5366
|
+
* must be rolled (seeded โ hence `declaresRandomness`), and returns the
|
|
5367
|
+
* outcomes, the explain trace and the deltas it refused.
|
|
5368
|
+
* ยท `advance` โ `apply` with no deltas and an `elapsed` amount (a rest, a
|
|
5369
|
+
* journey, a scene break).
|
|
5370
|
+
*
|
|
5371
|
+
* `blocks` is a record of labelled variables โ `voice`, `sheet`, `pieces`,
|
|
5372
|
+
* `ties`, `outcomes`, `custom` โ which a context template places by name;
|
|
5373
|
+
* the handler never writes into a prompt itself. `explain` is for receipts
|
|
5374
|
+
* and ledgers, never a prompt. Bound by the app since 2026-10-17 (no longer
|
|
5375
|
+
* provisional โ the Dungeon Crawler create spec seeds it).
|
|
5376
|
+
* @experimental
|
|
5377
|
+
*/
|
|
5378
|
+
export declare const rulesetResolve: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5379
|
+
/** Labelled variables: `voice`, `sheet`, `pieces`, `ties`, `outcomes`, `custom`. */
|
|
5380
|
+
blocks: string;
|
|
5381
|
+
/** What a step may need: targets, what is equipped, what is allowed this turn. */
|
|
5382
|
+
facts: string;
|
|
5383
|
+
/** `apply` / `advance`: rolls, degrees and totals, each with its origins. */
|
|
5384
|
+
outcomes: string;
|
|
5385
|
+
/** How each number was reached โ for receipts and ledgers, never a prompt. */
|
|
5386
|
+
explain: string;
|
|
5387
|
+
/** Proposed changes the mechanics refused, with why โ review items, never silent corrections. */
|
|
5388
|
+
rejected: string;
|
|
5389
|
+
/**
|
|
5390
|
+
* ๐ง D7 (2026-10-23): the JSON Schema a reply that carries changes
|
|
5391
|
+
* answers against โ `{ message, changes }`, built from the
|
|
5392
|
+
* session's ruleset (`facts.replySchema`) โ when the step's
|
|
5393
|
+
* `actions` asked for it (`{ replyShape: true }`); else null.
|
|
5394
|
+
*/
|
|
5395
|
+
replySchema: string;
|
|
5396
|
+
}, {
|
|
5397
|
+
/**
|
|
5398
|
+
* The session the call reads โ its ruleset, setting values and
|
|
5399
|
+
* owners when `owners` names none. Added 2026-10-16 (W3-S) so a
|
|
5400
|
+
* call that is not handed owners still knows its session; `@1`
|
|
5401
|
+
* evolves in place.
|
|
5402
|
+
*/
|
|
5403
|
+
scope: string;
|
|
5404
|
+
/** The owners resolved this turn โ the acting cast, the scene's place. */
|
|
5405
|
+
owners: string;
|
|
5406
|
+
/** `prose`, `mechanics` or `scripts`; else the session's rigour. */
|
|
5407
|
+
rigour: string;
|
|
5408
|
+
/**
|
|
5409
|
+
* `resolve`, `apply` or `advance` โ or ๐ง `propose` (lane 2,
|
|
5410
|
+
* 2026-10-19): `apply` whose every change is filed for review
|
|
5411
|
+
* (`state_proposals`) rather than applied, for a task on Review.
|
|
5412
|
+
*/
|
|
5413
|
+
mode: string;
|
|
5414
|
+
/** The turn's declared actions โ what selects the pieces in play. */
|
|
5415
|
+
actions: string;
|
|
5416
|
+
/** `apply`: the changes the model proposed, to validate. */
|
|
5417
|
+
deltas: string;
|
|
5418
|
+
/** `advance` (or `apply`): story time passed, in the ruleset's unit. */
|
|
5419
|
+
elapsed: string;
|
|
5420
|
+
/**
|
|
5421
|
+
* ๐ง **Whose eyes** the blocks are for (2026-10-17): a participant
|
|
5422
|
+
* reference, or `gm` for the game-master-facing step. Decides
|
|
5423
|
+
* what a repertoire's `earshot` and `gmOnly` let into `blocks` โ
|
|
5424
|
+
* a holder's own pieces into their voice, the creatures a
|
|
5425
|
+
* player never reads into the Narrator's. Unwired: everyone's
|
|
5426
|
+
* view, which carries nothing marked for the holder or the GM.
|
|
5427
|
+
*/
|
|
5428
|
+
viewer: string;
|
|
5429
|
+
/**
|
|
5430
|
+
* ๐ง D3 (2026-10-23): the event that woke the step โ `{ id,
|
|
5431
|
+
* payload }` โ when a registration or routine runs it on one;
|
|
5432
|
+
* what a function's handler reads as `ctx.event`. Unwired: none.
|
|
5433
|
+
*/
|
|
5434
|
+
event: string;
|
|
5435
|
+
}, "core:task/ruleset-resolve@1"> & {
|
|
5436
|
+
kind: 'task';
|
|
5437
|
+
slots?: {
|
|
5438
|
+
readonly params: {
|
|
5439
|
+
readonly kind: "parameters";
|
|
5440
|
+
readonly facet: "behavior";
|
|
5441
|
+
readonly schema: {
|
|
5442
|
+
/**
|
|
5443
|
+
* ๐ง D3 (2026-10-23): whether the events this step's
|
|
5444
|
+
* functions raise are emitted after the run's receipt. Off:
|
|
5445
|
+
* they are reported on `facts` and never emitted. The
|
|
5446
|
+
* pipeline's own switch (`SpecDocument.functionEvents`)
|
|
5447
|
+
* turns off every step's at once.
|
|
5448
|
+
*/
|
|
5449
|
+
readonly emits: {
|
|
5450
|
+
readonly type: "boolean";
|
|
5451
|
+
readonly default: true;
|
|
5452
|
+
readonly label: {
|
|
5453
|
+
readonly en: "Emit what its functions raise";
|
|
5454
|
+
};
|
|
5455
|
+
readonly description: {
|
|
5456
|
+
readonly en: "The events the ruleset's functions raise in this step are emitted once the run is saved. Off: they are only reported.";
|
|
5457
|
+
};
|
|
5458
|
+
};
|
|
5459
|
+
};
|
|
5460
|
+
};
|
|
5461
|
+
} | undefined;
|
|
5462
|
+
}>;
|
|
5463
|
+
/**
|
|
5464
|
+
* ๐ง **What a reply reads** (PLAN-layering ยง4, R1, A6; 2026-10-20) โ the
|
|
5465
|
+
* reply's own duties, a switch each, read where the reply branches: *Read the
|
|
5466
|
+
* lorebook* gates what retrieval hands the ranker, *Read the scene* gates
|
|
5467
|
+
* what the context builder is told about where the story is. Neither costs a
|
|
5468
|
+
* call. ๐ง *Replies carry changes* (PLAN-rulesets-functions D7, R7;
|
|
5469
|
+
* 2026-10-23; off): the reply is one JSON object โ its words and what the
|
|
5470
|
+
* scene changed of the rules' attributes and entries โ and the rules apply
|
|
5471
|
+
* the changes (owner ruling 2026-10-23: no review of a reply's changes; how
|
|
5472
|
+
* strict the rules are and the lore write modes decide what lands, and a
|
|
5473
|
+
* replaced reply's changes go with it). Publishes `modes` keyed `lore-retrieval`,
|
|
5474
|
+
* `scene-reading` and `reply-changes` (each `full` or `off`). Pure; no
|
|
5475
|
+
* model call.
|
|
5476
|
+
*
|
|
5477
|
+
* Was the reply group of the retired background tasks (`resolve-tasks@1`):
|
|
5478
|
+
* a reply's settings belong to the reply (A6), so a preset that swaps the
|
|
5479
|
+
* reply for another shows that one's settings instead (ยง5).
|
|
5480
|
+
* @experimental
|
|
5481
|
+
*/
|
|
5482
|
+
export declare const replyDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5483
|
+
main: string;
|
|
5484
|
+
/** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
|
|
5485
|
+
modes: string;
|
|
5486
|
+
/** True when any duty is on โ the routine has something to do. */
|
|
5487
|
+
any: string;
|
|
5488
|
+
}, {
|
|
5489
|
+
/**
|
|
5490
|
+
* The routine's firing (`core:inlet/routine@1`'s `routine` port) โ its
|
|
5491
|
+
* `mode` is what an on duty runs at: `full` applies, `review` holds
|
|
5492
|
+
* each write for the owner. Unwired (a reply's duties): `full`.
|
|
5493
|
+
*/
|
|
5494
|
+
routine: string;
|
|
5495
|
+
}, "core:task/reply-duties@1"> & {
|
|
5496
|
+
kind: 'task';
|
|
5497
|
+
slots?: {
|
|
5498
|
+
readonly params: {
|
|
5499
|
+
readonly kind: "parameters";
|
|
5500
|
+
readonly facet: "behavior";
|
|
5501
|
+
readonly schema: {
|
|
5502
|
+
lore: {
|
|
5503
|
+
type: 'boolean';
|
|
5504
|
+
default: boolean;
|
|
5505
|
+
reach: 'owner';
|
|
5506
|
+
label: {
|
|
5507
|
+
en: string;
|
|
5508
|
+
};
|
|
5509
|
+
description: {
|
|
5510
|
+
en: string;
|
|
5511
|
+
};
|
|
5512
|
+
};
|
|
5513
|
+
scene: {
|
|
5514
|
+
type: 'boolean';
|
|
5515
|
+
default: boolean;
|
|
5516
|
+
reach: 'owner';
|
|
5517
|
+
label: {
|
|
5518
|
+
en: string;
|
|
5519
|
+
};
|
|
5520
|
+
description: {
|
|
5521
|
+
en: string;
|
|
5522
|
+
};
|
|
5523
|
+
};
|
|
5524
|
+
changes: {
|
|
5525
|
+
type: 'boolean';
|
|
5526
|
+
default: boolean;
|
|
5527
|
+
reach: 'owner';
|
|
5528
|
+
label: {
|
|
5529
|
+
en: string;
|
|
5530
|
+
};
|
|
5531
|
+
description: {
|
|
5532
|
+
en: string;
|
|
5533
|
+
};
|
|
5534
|
+
};
|
|
5535
|
+
};
|
|
5536
|
+
};
|
|
5537
|
+
} | undefined;
|
|
5538
|
+
}>;
|
|
5539
|
+
/**
|
|
5540
|
+
* ๐ง **Note what changed** (PLAN-layering ยง4, R5, R37; 2026-10-20; titled by
|
|
5541
|
+
* the routine's name since 2026-10-23, PLAN-genres-seams S7 โ was *What the
|
|
5542
|
+
* reckoning keeps*) โ the duties of a reckoning routine (Story's
|
|
5543
|
+
* `core:spec/story-reckoning`; the Lair's keeper titles its own card):
|
|
5544
|
+
* one JSON call after a turn or a round that notes what the story made true.
|
|
5545
|
+
* Each duty is a switch; the routine's mode decides whether what an on duty
|
|
5546
|
+
* finds is applied (`full`) or held for review (`review`). Publishes `modes`
|
|
5547
|
+
* keyed `attributes`, `conditions`, `time`, `places-on-move`, `timed-expiry`
|
|
5548
|
+
* โ the keys the reckoning's scripts and junctions read โ and `any`.
|
|
5549
|
+
*
|
|
5550
|
+
* *End what runs out* (`timed-expiry`) and *Track conditions* are also what
|
|
5551
|
+
* the ruleset handler's expiry reads (the host, lane 6). A duty that writes
|
|
5552
|
+
* a lorebook (*Describe new places*) reads Off in a session with none.
|
|
5553
|
+
* Pure; no model call.
|
|
5554
|
+
* @experimental
|
|
5555
|
+
*/
|
|
5556
|
+
export declare const reckoningDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5557
|
+
main: string;
|
|
5558
|
+
/** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
|
|
5559
|
+
modes: string;
|
|
5560
|
+
/** True when any duty is on โ the routine has something to do. */
|
|
5561
|
+
any: string;
|
|
5562
|
+
}, {
|
|
5563
|
+
/**
|
|
5564
|
+
* The routine's firing (`core:inlet/routine@1`'s `routine` port) โ its
|
|
5565
|
+
* `mode` is what an on duty runs at: `full` applies, `review` holds
|
|
5566
|
+
* each write for the owner. Unwired (a reply's duties): `full`.
|
|
5567
|
+
*/
|
|
5568
|
+
routine: string;
|
|
5569
|
+
}, "core:task/reckoning-duties@1"> & {
|
|
5570
|
+
kind: 'task';
|
|
5571
|
+
slots?: {
|
|
5572
|
+
readonly params: {
|
|
5573
|
+
readonly kind: "parameters";
|
|
5574
|
+
readonly facet: "behavior";
|
|
5575
|
+
readonly schema: {
|
|
5576
|
+
attributes: {
|
|
5577
|
+
type: 'boolean';
|
|
5578
|
+
default: boolean;
|
|
5579
|
+
reach: 'owner';
|
|
5580
|
+
label: {
|
|
5581
|
+
en: string;
|
|
5582
|
+
};
|
|
5583
|
+
description: {
|
|
5584
|
+
en: string;
|
|
5585
|
+
};
|
|
5586
|
+
};
|
|
5587
|
+
conditions: {
|
|
5588
|
+
type: 'boolean';
|
|
5589
|
+
default: boolean;
|
|
5590
|
+
reach: 'owner';
|
|
5591
|
+
label: {
|
|
5592
|
+
en: string;
|
|
5593
|
+
};
|
|
5594
|
+
description: {
|
|
5595
|
+
en: string;
|
|
5596
|
+
};
|
|
5597
|
+
};
|
|
5598
|
+
time: {
|
|
5599
|
+
type: 'boolean';
|
|
5600
|
+
default: boolean;
|
|
5601
|
+
reach: 'owner';
|
|
5602
|
+
label: {
|
|
5603
|
+
en: string;
|
|
5604
|
+
};
|
|
5605
|
+
description: {
|
|
5606
|
+
en: string;
|
|
5607
|
+
};
|
|
5608
|
+
};
|
|
5609
|
+
placesOnMove: {
|
|
5610
|
+
type: 'boolean';
|
|
5611
|
+
default: boolean;
|
|
5612
|
+
reach: 'owner';
|
|
5613
|
+
label: {
|
|
5614
|
+
en: string;
|
|
5615
|
+
};
|
|
5616
|
+
description: {
|
|
5617
|
+
en: string;
|
|
5618
|
+
};
|
|
5619
|
+
};
|
|
5620
|
+
timedExpiry: {
|
|
5621
|
+
type: 'boolean';
|
|
5622
|
+
default: boolean;
|
|
5623
|
+
reach: 'owner';
|
|
5624
|
+
label: {
|
|
5625
|
+
en: string;
|
|
5626
|
+
};
|
|
5627
|
+
description: {
|
|
5628
|
+
en: string;
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
};
|
|
5632
|
+
};
|
|
5633
|
+
} | undefined;
|
|
5634
|
+
}>;
|
|
5635
|
+
/**
|
|
5636
|
+
* ๐ง **Look back over the story** (PLAN-layering ยง4, R5, R37; 2026-10-20;
|
|
5637
|
+
* titled by the routine's name since 2026-10-23, S7 โ was *What the sweep
|
|
5638
|
+
* files*) โ the duties of a sweep routine (Story's `core:spec/story-sweep`): ONE batched
|
|
5639
|
+
* JSON call every few turns that looks back over the story and files what is
|
|
5640
|
+
* worth keeping. Each duty is a switch; the routine's mode decides whether
|
|
5641
|
+
* what it files is written (`full`) or held for review (`review`). Publishes
|
|
5642
|
+
* `modes` keyed `summary`, `lore`, `cast`, `relationships`, `world-state`,
|
|
5643
|
+
* `scenes`, `goals`, `goal-reached`, `scene-moved-on` โ the keys the sweep's scripts and
|
|
5644
|
+
* junctions read โ and `any`. Duties that write a lorebook read Off in a
|
|
5645
|
+
* session with none. *Mark goals reached* (`goal-reached`) is read by the
|
|
5646
|
+
* host when the goals note moves (lane 6). Pure; no model call.
|
|
5647
|
+
* @experimental
|
|
5648
|
+
*/
|
|
5649
|
+
export declare const sweepDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5650
|
+
main: string;
|
|
5651
|
+
/** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
|
|
5652
|
+
modes: string;
|
|
5653
|
+
/** True when any duty is on โ the routine has something to do. */
|
|
5654
|
+
any: string;
|
|
5655
|
+
/** ๐ง A \`JudgedSceneCheck\` (pass 7, R-i): what *Notice when the scene moves on* may judge this run โ not due when the duty is Off or the host's conditions do not hold. */
|
|
5656
|
+
sceneCheck: string;
|
|
5657
|
+
}, {
|
|
5658
|
+
/**
|
|
5659
|
+
* The routine's firing (`core:inlet/routine@1`'s `routine` port) โ its
|
|
5660
|
+
* `mode` is what an on duty runs at: `full` applies, `review` holds
|
|
5661
|
+
* each write for the owner. Unwired (a reply's duties): `full`.
|
|
5662
|
+
*/
|
|
5663
|
+
routine: string;
|
|
5664
|
+
}, "core:task/sweep-duties@1"> & {
|
|
5665
|
+
kind: 'task';
|
|
5666
|
+
slots?: {
|
|
5667
|
+
readonly params: {
|
|
5668
|
+
readonly kind: "parameters";
|
|
5669
|
+
readonly facet: "behavior";
|
|
5670
|
+
readonly schema: {
|
|
5671
|
+
summary: {
|
|
5672
|
+
type: 'boolean';
|
|
5673
|
+
default: boolean;
|
|
5674
|
+
reach: 'owner';
|
|
5675
|
+
label: {
|
|
5676
|
+
en: string;
|
|
5677
|
+
};
|
|
5678
|
+
description: {
|
|
5679
|
+
en: string;
|
|
5680
|
+
};
|
|
5681
|
+
};
|
|
5682
|
+
lore: {
|
|
5683
|
+
type: 'boolean';
|
|
5684
|
+
default: boolean;
|
|
5685
|
+
reach: 'owner';
|
|
5686
|
+
label: {
|
|
5687
|
+
en: string;
|
|
5688
|
+
};
|
|
5689
|
+
description: {
|
|
5690
|
+
en: string;
|
|
5691
|
+
};
|
|
5692
|
+
};
|
|
5693
|
+
cast: {
|
|
5694
|
+
type: 'boolean';
|
|
5695
|
+
default: boolean;
|
|
5696
|
+
reach: 'owner';
|
|
5697
|
+
label: {
|
|
5698
|
+
en: string;
|
|
5699
|
+
};
|
|
5700
|
+
description: {
|
|
5701
|
+
en: string;
|
|
5702
|
+
};
|
|
5703
|
+
};
|
|
5704
|
+
relationships: {
|
|
5705
|
+
type: 'boolean';
|
|
5706
|
+
default: boolean;
|
|
5707
|
+
reach: 'owner';
|
|
5708
|
+
label: {
|
|
5709
|
+
en: string;
|
|
5710
|
+
};
|
|
5711
|
+
description: {
|
|
5712
|
+
en: string;
|
|
5713
|
+
};
|
|
5714
|
+
};
|
|
5715
|
+
worldState: {
|
|
5716
|
+
type: 'boolean';
|
|
5717
|
+
default: boolean;
|
|
5718
|
+
reach: 'owner';
|
|
5719
|
+
label: {
|
|
5720
|
+
en: string;
|
|
5721
|
+
};
|
|
5722
|
+
description: {
|
|
5723
|
+
en: string;
|
|
5724
|
+
};
|
|
5725
|
+
};
|
|
5726
|
+
scenes: {
|
|
5727
|
+
type: 'boolean';
|
|
5728
|
+
default: boolean;
|
|
5729
|
+
reach: 'owner';
|
|
5730
|
+
label: {
|
|
5731
|
+
en: string;
|
|
5732
|
+
};
|
|
5733
|
+
description: {
|
|
5734
|
+
en: string;
|
|
5735
|
+
};
|
|
5736
|
+
};
|
|
5737
|
+
goals: {
|
|
5738
|
+
type: 'boolean';
|
|
5739
|
+
default: boolean;
|
|
5740
|
+
reach: 'owner';
|
|
5741
|
+
label: {
|
|
5742
|
+
en: string;
|
|
5743
|
+
};
|
|
5744
|
+
description: {
|
|
5745
|
+
en: string;
|
|
5746
|
+
};
|
|
5747
|
+
};
|
|
5748
|
+
goalReached: {
|
|
5749
|
+
type: 'boolean';
|
|
5750
|
+
default: boolean;
|
|
5751
|
+
reach: 'owner';
|
|
5752
|
+
label: {
|
|
5753
|
+
en: string;
|
|
5754
|
+
};
|
|
5755
|
+
description: {
|
|
5756
|
+
en: string;
|
|
5757
|
+
};
|
|
5758
|
+
};
|
|
5759
|
+
sceneMovedOn: {
|
|
5760
|
+
type: 'boolean';
|
|
5761
|
+
default: boolean;
|
|
5762
|
+
reach: 'owner';
|
|
5763
|
+
label: {
|
|
5764
|
+
en: string;
|
|
5765
|
+
};
|
|
5766
|
+
description: {
|
|
5767
|
+
en: string;
|
|
5768
|
+
};
|
|
5769
|
+
};
|
|
5770
|
+
};
|
|
5771
|
+
};
|
|
5772
|
+
} | undefined;
|
|
5773
|
+
}>;
|
|
5774
|
+
/**
|
|
5775
|
+
* ๐ง What the **judged scene check** may judge this run (pass 7, R-i, sprint 2) โ the sweep
|
|
5776
|
+
* duties step's `sceneCheck`, the host's answer: due, with the lane and the lines since the last
|
|
5777
|
+
* look (oldest first, each a message id the new scene may begin at, at most 20); or not due,
|
|
5778
|
+
* with why (a receipt note). Not due โ *Notice when the scene moves on* reads Off for the run.
|
|
5779
|
+
* @experimental
|
|
5780
|
+
* @ruling R-i (2026-10-24)
|
|
5781
|
+
*/
|
|
5782
|
+
export type JudgedSceneCheck = {
|
|
5783
|
+
readonly due: true;
|
|
5784
|
+
readonly channel: string;
|
|
5785
|
+
readonly lines: readonly number[];
|
|
5786
|
+
} | {
|
|
5787
|
+
readonly due: false;
|
|
5788
|
+
readonly why: string;
|
|
5789
|
+
};
|
|
5790
|
+
/**
|
|
5791
|
+
* ๐ง **Cue a line** โ turn a line's text into the script it is spoken from
|
|
5792
|
+
* (`Cue[]`, PLAN-speech-connections-and-timbre ยง11.1). Pure and deterministic:
|
|
5793
|
+
* regex and locale tables, the same text giving the same cues, no model.
|
|
5794
|
+
*
|
|
5795
|
+
* - a quote opens **dialogue** (`quoteStyles`); `*โฆ*` / `_โฆ_` are **action**
|
|
5796
|
+
* (`asterisks`); `(โฆ)` is an **aside**; the rest is **narration**;
|
|
5797
|
+
* - `Name:` at the start of a run, where the name is one of `cast`, switches
|
|
5798
|
+
* the cue's `speaker` (multi-voice lines);
|
|
5799
|
+
* - inline expression markers the model wrote โ `[angry]`, `<laugh>`,
|
|
5800
|
+
* `*sighs*`, `(((word)))` โ are lifted off the text into `markers`, never
|
|
5801
|
+
* spoken; a marker the shipped marker table knows sets that cue's
|
|
5802
|
+
* inflection, else the line's `inflection` label does (ยง11.2);
|
|
5803
|
+
* - `voices` maps each kind to a voice; code blocks are dropped.
|
|
5804
|
+
*
|
|
5805
|
+
* `inflection` takes a sprite pick as it is (`sprite-pick@1` is assignable to
|
|
5806
|
+
* `inflection@1`): the sprite a line was given is the inflection it is spoken with.
|
|
5807
|
+
* @experimental
|
|
5808
|
+
*/
|
|
5809
|
+
export declare const cueLines: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5810
|
+
main: string;
|
|
5811
|
+
cues: string;
|
|
5812
|
+
}, {
|
|
5813
|
+
/** The line's text, as written. */
|
|
5814
|
+
text: string;
|
|
5815
|
+
/** Whose line it is โ the voice `speaker` cues take. */
|
|
5816
|
+
speaker: string;
|
|
5817
|
+
/** The line's recorded inflection โ a sprite pick wires in as it is. */
|
|
5818
|
+
inflection: string;
|
|
5819
|
+
/** `string[]` โ the cast's names, which `Name:` may switch to. */
|
|
5820
|
+
cast: string;
|
|
5821
|
+
}, "core:task/cue-lines@1"> & {
|
|
5822
|
+
kind: 'task';
|
|
5823
|
+
slots?: {
|
|
5824
|
+
readonly params: {
|
|
5825
|
+
readonly kind: "parameters";
|
|
5826
|
+
readonly facet: "behavior";
|
|
5827
|
+
readonly schema: {
|
|
5828
|
+
readonly quoteStyles: {
|
|
5829
|
+
readonly type: "list";
|
|
5830
|
+
readonly item: {
|
|
5831
|
+
readonly type: "string";
|
|
5832
|
+
};
|
|
5833
|
+
readonly default: readonly string[];
|
|
5834
|
+
readonly label: {
|
|
5835
|
+
readonly en: "Quote marks";
|
|
5836
|
+
};
|
|
5837
|
+
readonly description: {
|
|
5838
|
+
readonly en: "The marks that open and close dialogue โ each entry is the opening mark then the closing one.";
|
|
5839
|
+
};
|
|
5840
|
+
};
|
|
5841
|
+
readonly asterisks: {
|
|
5842
|
+
readonly type: "enum";
|
|
5843
|
+
readonly of: readonly ["action", "emphasis", "ignore"];
|
|
5844
|
+
readonly default: "action";
|
|
5845
|
+
readonly members: readonly [{
|
|
5846
|
+
readonly key: "action";
|
|
5847
|
+
readonly label: {
|
|
5848
|
+
readonly en: "Action";
|
|
5849
|
+
};
|
|
5850
|
+
readonly description: {
|
|
5851
|
+
readonly en: "*waves* is something done, read in the narrator's voice.";
|
|
5852
|
+
};
|
|
5853
|
+
}, {
|
|
5854
|
+
readonly key: "emphasis";
|
|
5855
|
+
readonly label: {
|
|
5856
|
+
readonly en: "Emphasis";
|
|
5857
|
+
};
|
|
5858
|
+
readonly description: {
|
|
5859
|
+
readonly en: "*really* is a stressed word, read in the line's own voice.";
|
|
5860
|
+
};
|
|
5861
|
+
}, {
|
|
5862
|
+
readonly key: "ignore";
|
|
5863
|
+
readonly label: {
|
|
5864
|
+
readonly en: "Ignore";
|
|
5865
|
+
};
|
|
5866
|
+
readonly description: {
|
|
5867
|
+
readonly en: "Asterisks are dropped and the words read as they stand.";
|
|
5868
|
+
};
|
|
5869
|
+
}];
|
|
5870
|
+
readonly label: {
|
|
5871
|
+
readonly en: "Text between asterisks";
|
|
5872
|
+
};
|
|
5873
|
+
};
|
|
5874
|
+
readonly voices: {
|
|
5875
|
+
readonly type: "object";
|
|
5876
|
+
readonly label: {
|
|
5877
|
+
readonly en: "Who speaks what";
|
|
5878
|
+
};
|
|
5879
|
+
readonly description: {
|
|
5880
|
+
readonly en: "Which voice reads dialogue, narration, actions and asides.";
|
|
5881
|
+
};
|
|
5882
|
+
readonly default: Readonly<Record<"action" | "aside" | "dialogue" | "narration", "narrator" | "silent" | "speaker">>;
|
|
5883
|
+
readonly fields: {
|
|
5884
|
+
readonly dialogue: {
|
|
5885
|
+
readonly type: "enum";
|
|
5886
|
+
readonly of: readonly ["speaker", "narrator", "silent"];
|
|
5887
|
+
readonly default: "narrator" | "silent" | "speaker";
|
|
5888
|
+
readonly members: readonly [{
|
|
5889
|
+
readonly key: 'speaker';
|
|
5890
|
+
readonly label: {
|
|
5891
|
+
readonly en: "The speaker's voice";
|
|
5892
|
+
};
|
|
5893
|
+
}, {
|
|
5894
|
+
readonly key: 'narrator';
|
|
5895
|
+
readonly label: {
|
|
5896
|
+
readonly en: "The narrator's voice";
|
|
5897
|
+
};
|
|
5898
|
+
}, {
|
|
5899
|
+
readonly key: 'silent';
|
|
5900
|
+
readonly label: {
|
|
5901
|
+
readonly en: 'Not spoken';
|
|
5902
|
+
};
|
|
5903
|
+
}];
|
|
5904
|
+
readonly label: {
|
|
5905
|
+
readonly en: "Dialogue";
|
|
5906
|
+
};
|
|
5907
|
+
};
|
|
5908
|
+
readonly narration: {
|
|
5909
|
+
readonly type: "enum";
|
|
5910
|
+
readonly of: readonly ["speaker", "narrator", "silent"];
|
|
5911
|
+
readonly default: "narrator" | "silent" | "speaker";
|
|
5912
|
+
readonly members: readonly [{
|
|
5913
|
+
readonly key: 'speaker';
|
|
5914
|
+
readonly label: {
|
|
5915
|
+
readonly en: "The speaker's voice";
|
|
5916
|
+
};
|
|
5917
|
+
}, {
|
|
5918
|
+
readonly key: 'narrator';
|
|
5919
|
+
readonly label: {
|
|
5920
|
+
readonly en: "The narrator's voice";
|
|
5921
|
+
};
|
|
5922
|
+
}, {
|
|
5923
|
+
readonly key: 'silent';
|
|
5924
|
+
readonly label: {
|
|
5925
|
+
readonly en: 'Not spoken';
|
|
5926
|
+
};
|
|
5927
|
+
}];
|
|
5928
|
+
readonly label: {
|
|
5929
|
+
readonly en: "Narration";
|
|
5930
|
+
};
|
|
5931
|
+
};
|
|
5932
|
+
readonly action: {
|
|
5933
|
+
readonly type: "enum";
|
|
5934
|
+
readonly of: readonly ["speaker", "narrator", "silent"];
|
|
5935
|
+
readonly default: "narrator" | "silent" | "speaker";
|
|
5936
|
+
readonly members: readonly [{
|
|
5937
|
+
readonly key: 'speaker';
|
|
5938
|
+
readonly label: {
|
|
5939
|
+
readonly en: "The speaker's voice";
|
|
5940
|
+
};
|
|
5941
|
+
}, {
|
|
5942
|
+
readonly key: 'narrator';
|
|
5943
|
+
readonly label: {
|
|
5944
|
+
readonly en: "The narrator's voice";
|
|
5945
|
+
};
|
|
5946
|
+
}, {
|
|
5947
|
+
readonly key: 'silent';
|
|
5948
|
+
readonly label: {
|
|
5949
|
+
readonly en: 'Not spoken';
|
|
5950
|
+
};
|
|
5951
|
+
}];
|
|
5952
|
+
readonly label: {
|
|
5953
|
+
readonly en: "Actions";
|
|
5954
|
+
};
|
|
5955
|
+
};
|
|
5956
|
+
readonly aside: {
|
|
5957
|
+
readonly type: "enum";
|
|
5958
|
+
readonly of: readonly ["speaker", "narrator", "silent"];
|
|
5959
|
+
readonly default: "narrator" | "silent" | "speaker";
|
|
5960
|
+
readonly members: readonly [{
|
|
5961
|
+
readonly key: 'speaker';
|
|
5962
|
+
readonly label: {
|
|
5963
|
+
readonly en: "The speaker's voice";
|
|
5964
|
+
};
|
|
5965
|
+
}, {
|
|
5966
|
+
readonly key: 'narrator';
|
|
5967
|
+
readonly label: {
|
|
5968
|
+
readonly en: "The narrator's voice";
|
|
5969
|
+
};
|
|
5970
|
+
}, {
|
|
5971
|
+
readonly key: 'silent';
|
|
5972
|
+
readonly label: {
|
|
5973
|
+
readonly en: 'Not spoken';
|
|
5974
|
+
};
|
|
5975
|
+
}];
|
|
5976
|
+
readonly label: {
|
|
5977
|
+
readonly en: "Asides";
|
|
5978
|
+
};
|
|
5979
|
+
};
|
|
5980
|
+
};
|
|
5981
|
+
};
|
|
5982
|
+
readonly language: {
|
|
5983
|
+
readonly type: "string";
|
|
5984
|
+
readonly default: "";
|
|
5985
|
+
readonly label: {
|
|
5986
|
+
readonly en: "Language";
|
|
5987
|
+
};
|
|
5988
|
+
readonly description: {
|
|
5989
|
+
readonly en: "ISO 639-1 code whose quote and number rules apply. Blank reads the line's own script.";
|
|
5282
5990
|
};
|
|
5283
5991
|
};
|
|
5284
5992
|
};
|
|
5285
5993
|
};
|
|
5286
5994
|
} | undefined;
|
|
5287
5995
|
}>;
|
|
5996
|
+
/**
|
|
5997
|
+
* ๐ง **Read a drafted card or book** (M2c path B, owner ruling 2026-10-31): a reply that drafts a character card or
|
|
5998
|
+
* a lorebook ends with one hidden block โ `<!--draft:character {โฆ}-->` or `<!--draft:lorebook {โฆ}-->`, an HTML
|
|
5999
|
+
* comment the message renderer never shows, even while the reply streams. This step takes every such block out of
|
|
6000
|
+
* the reply (`text`, what is saved) and reads the last one: `make` is `'character'`, `'lorebook'` or `''`, and
|
|
6001
|
+
* `draft` its JSON, for `create-character@1` / `create-lorebook@1` behind a junction on `make`. One model call per
|
|
6002
|
+
* turn โ the reply's own โ and no tool loop. Pure (the SDK's `readLibraryDraft`). โ Not `parse-json@1` (a whole reply
|
|
6003
|
+
* read as JSON) and not `parse-tool-call@1`.
|
|
6004
|
+
* @experimental
|
|
6005
|
+
*/
|
|
6006
|
+
export declare const readLibraryDraft: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
6007
|
+
main: string;
|
|
6008
|
+
text: string;
|
|
6009
|
+
make: string;
|
|
6010
|
+
draft: string;
|
|
6011
|
+
}, {
|
|
6012
|
+
text: string;
|
|
6013
|
+
}, "core:task/read-library-draft@1"> & {
|
|
6014
|
+
kind: 'task';
|
|
6015
|
+
slots?: Record<string, SlotDecl> | undefined;
|
|
6016
|
+
}>;
|
|
5288
6017
|
//# sourceMappingURL=tasks.d.ts.map
|