@animalabs/agent-framework 0.31.0 → 0.33.0
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/README.md +204 -14
- package/dist/src/admission/admit.d.ts +18 -0
- package/dist/src/admission/admit.d.ts.map +1 -1
- package/dist/src/admission/admit.js +16 -3
- package/dist/src/admission/admit.js.map +1 -1
- package/dist/src/agent.d.ts +185 -78
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +279 -102
- package/dist/src/agent.js.map +1 -1
- package/dist/src/api/mcp-server-core.d.ts.map +1 -1
- package/dist/src/api/mcp-server-core.js +50 -12
- package/dist/src/api/mcp-server-core.js.map +1 -1
- package/dist/src/api/server.d.ts.map +1 -1
- package/dist/src/api/server.js +4 -20
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/code-execution/isolate/scripts.d.ts +12 -8
- package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
- package/dist/src/code-execution/isolate/scripts.js +24 -0
- package/dist/src/code-execution/isolate/scripts.js.map +1 -1
- package/dist/src/config-checks.d.ts +7 -0
- package/dist/src/config-checks.d.ts.map +1 -1
- package/dist/src/config-checks.js +14 -0
- package/dist/src/config-checks.js.map +1 -1
- package/dist/src/context-manager-errors.d.ts +25 -0
- package/dist/src/context-manager-errors.d.ts.map +1 -0
- package/dist/src/context-manager-errors.js +31 -0
- package/dist/src/context-manager-errors.js.map +1 -0
- package/dist/src/context-options.d.ts +67 -0
- package/dist/src/context-options.d.ts.map +1 -0
- package/dist/src/context-options.js +85 -0
- package/dist/src/context-options.js.map +1 -0
- package/dist/src/deferred-import.d.ts +93 -0
- package/dist/src/deferred-import.d.ts.map +1 -0
- package/dist/src/deferred-import.js +177 -0
- package/dist/src/deferred-import.js.map +1 -0
- package/dist/src/dendrite/audience.d.ts +223 -0
- package/dist/src/dendrite/audience.d.ts.map +1 -0
- package/dist/src/dendrite/audience.js +202 -0
- package/dist/src/dendrite/audience.js.map +1 -0
- package/dist/src/dendrite/index.d.ts +5 -3
- package/dist/src/dendrite/index.d.ts.map +1 -1
- package/dist/src/dendrite/index.js +2 -1
- package/dist/src/dendrite/index.js.map +1 -1
- package/dist/src/dendrite/presets.d.ts +10 -5
- package/dist/src/dendrite/presets.d.ts.map +1 -1
- package/dist/src/dendrite/presets.js +17 -5
- package/dist/src/dendrite/presets.js.map +1 -1
- package/dist/src/dendrite/registry.d.ts +62 -7
- package/dist/src/dendrite/registry.d.ts.map +1 -1
- package/dist/src/dendrite/registry.js +179 -10
- package/dist/src/dendrite/registry.js.map +1 -1
- package/dist/src/dendrite/types.d.ts +91 -8
- package/dist/src/dendrite/types.d.ts.map +1 -1
- package/dist/src/foreign-rounds.d.ts +69 -0
- package/dist/src/foreign-rounds.d.ts.map +1 -0
- package/dist/src/foreign-rounds.js +152 -0
- package/dist/src/foreign-rounds.js.map +1 -0
- package/dist/src/framework.d.ts +1977 -820
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +7571 -3457
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +85 -15
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +421 -47
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/gate/index.d.ts +1 -1
- package/dist/src/gate/index.d.ts.map +1 -1
- package/dist/src/gate/index.js.map +1 -1
- package/dist/src/gate/rule-scope.d.ts +30 -0
- package/dist/src/gate/rule-scope.d.ts.map +1 -0
- package/dist/src/gate/rule-scope.js +41 -0
- package/dist/src/gate/rule-scope.js.map +1 -0
- package/dist/src/gate/suppress-script-worker.d.ts +2 -0
- package/dist/src/gate/suppress-script-worker.d.ts.map +1 -0
- package/dist/src/gate/suppress-script-worker.js +103 -0
- package/dist/src/gate/suppress-script-worker.js.map +1 -0
- package/dist/src/gate/suppress-scripts.d.ts +105 -0
- package/dist/src/gate/suppress-scripts.d.ts.map +1 -0
- package/dist/src/gate/suppress-scripts.js +403 -0
- package/dist/src/gate/suppress-scripts.js.map +1 -0
- package/dist/src/gate/suppression-review.d.ts +143 -0
- package/dist/src/gate/suppression-review.d.ts.map +1 -0
- package/dist/src/gate/suppression-review.js +463 -0
- package/dist/src/gate/suppression-review.js.map +1 -0
- package/dist/src/gate/suppression-stats.d.ts +125 -0
- package/dist/src/gate/suppression-stats.d.ts.map +1 -0
- package/dist/src/gate/suppression-stats.js +214 -0
- package/dist/src/gate/suppression-stats.js.map +1 -0
- package/dist/src/gate/types.d.ts +135 -7
- package/dist/src/gate/types.d.ts.map +1 -1
- package/dist/src/gate/wake-onboarding.d.ts +119 -0
- package/dist/src/gate/wake-onboarding.d.ts.map +1 -0
- package/dist/src/gate/wake-onboarding.js +277 -0
- package/dist/src/gate/wake-onboarding.js.map +1 -0
- package/dist/src/held-writes.d.ts +31 -23
- package/dist/src/held-writes.d.ts.map +1 -1
- package/dist/src/held-writes.js +44 -59
- package/dist/src/held-writes.js.map +1 -1
- package/dist/src/index.d.ts +5 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsonrpc-envelope.d.ts +69 -0
- package/dist/src/jsonrpc-envelope.d.ts.map +1 -0
- package/dist/src/jsonrpc-envelope.js +66 -0
- package/dist/src/jsonrpc-envelope.js.map +1 -0
- package/dist/src/mcpl/channel-registry.d.ts +131 -15
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +290 -46
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.d.ts +2 -4
- package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
- package/dist/src/mcpl/feature-set-manager.d.ts +2 -4
- package/dist/src/mcpl/feature-set-manager.d.ts.map +1 -1
- package/dist/src/mcpl/feature-set-manager.js.map +1 -1
- package/dist/src/mcpl/inbound-source.d.ts +2 -1
- package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
- package/dist/src/mcpl/inbound-source.js +2 -1
- package/dist/src/mcpl/inbound-source.js.map +1 -1
- package/dist/src/mcpl/inference-router.d.ts +6 -6
- package/dist/src/mcpl/inference-router.d.ts.map +1 -1
- package/dist/src/mcpl/inference-router.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +132 -22
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +105 -15
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.d.ts +9 -7
- package/dist/src/mcpl/push-handler.d.ts.map +1 -1
- package/dist/src/mcpl/push-handler.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +13 -10
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +134 -56
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/tool-classes.d.ts.map +1 -1
- package/dist/src/mcpl/tool-classes.js +3 -0
- package/dist/src/mcpl/tool-classes.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +8 -2
- package/dist/src/mcpl/types.d.ts.map +1 -1
- package/dist/src/mcpl/types.js.map +1 -1
- package/dist/src/module-registry.d.ts +24 -1
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +68 -18
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts +45 -8
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +237 -86
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/history/index.d.ts +59 -0
- package/dist/src/modules/history/index.d.ts.map +1 -1
- package/dist/src/modules/history/index.js +432 -67
- package/dist/src/modules/history/index.js.map +1 -1
- package/dist/src/modules/history/semantic.d.ts +6 -5
- package/dist/src/modules/history/semantic.d.ts.map +1 -1
- package/dist/src/modules/history/semantic.js +15 -22
- package/dist/src/modules/history/semantic.js.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.d.ts +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +1 -1
- package/dist/src/modules/workspace/index.d.ts +28 -7
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +76 -22
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/notice-tags.d.ts +10 -1
- package/dist/src/notice-tags.d.ts.map +1 -1
- package/dist/src/notice-tags.js +10 -1
- package/dist/src/notice-tags.js.map +1 -1
- package/dist/src/operator-log.d.ts +36 -3
- package/dist/src/operator-log.d.ts.map +1 -1
- package/dist/src/operator-log.js +2 -2
- package/dist/src/operator-log.js.map +1 -1
- package/dist/src/presentation.d.ts +746 -0
- package/dist/src/presentation.d.ts.map +1 -0
- package/dist/src/presentation.js +1435 -0
- package/dist/src/presentation.js.map +1 -0
- package/dist/src/prose-drafts.d.ts +15 -11
- package/dist/src/prose-drafts.d.ts.map +1 -1
- package/dist/src/prose-drafts.js +16 -12
- package/dist/src/prose-drafts.js.map +1 -1
- package/dist/src/read-marks.d.ts +192 -0
- package/dist/src/read-marks.d.ts.map +1 -0
- package/dist/src/read-marks.js +242 -0
- package/dist/src/read-marks.js.map +1 -0
- package/dist/src/recovery/offline-branch.d.ts +91 -6
- package/dist/src/recovery/offline-branch.d.ts.map +1 -1
- package/dist/src/recovery/offline-branch.js +273 -29
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/recovery/recover-cli.js +22 -3
- package/dist/src/recovery/recover-cli.js.map +1 -1
- package/dist/src/send-tools.d.ts +5 -9
- package/dist/src/send-tools.d.ts.map +1 -1
- package/dist/src/send-tools.js +40 -7
- package/dist/src/send-tools.js.map +1 -1
- package/dist/src/stored-injections.d.ts +2 -2
- package/dist/src/stored-injections.js +2 -2
- package/dist/src/stored-removal.d.ts +17 -4
- package/dist/src/stored-removal.d.ts.map +1 -1
- package/dist/src/stored-removal.js +29 -5
- package/dist/src/stored-removal.js.map +1 -1
- package/dist/src/tool-result-guard.d.ts +12 -1
- package/dist/src/tool-result-guard.d.ts.map +1 -1
- package/dist/src/tool-result-guard.js +42 -8
- package/dist/src/tool-result-guard.js.map +1 -1
- package/dist/src/tune-out/coordinator.d.ts +1159 -79
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +3709 -363
- package/dist/src/tune-out/coordinator.js.map +1 -1
- package/dist/src/tune-out/tools.d.ts +114 -17
- package/dist/src/tune-out/tools.d.ts.map +1 -1
- package/dist/src/tune-out/tools.js +87 -27
- package/dist/src/tune-out/tools.js.map +1 -1
- package/dist/src/tune-out/window-anchor.d.ts +143 -0
- package/dist/src/tune-out/window-anchor.d.ts.map +1 -0
- package/dist/src/tune-out/window-anchor.js +202 -0
- package/dist/src/tune-out/window-anchor.js.map +1 -0
- package/dist/src/types/agent.d.ts +86 -31
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +2 -0
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +43 -21
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +180 -69
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +510 -36
- package/dist/src/types/trace.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/admission/admit.ts +32 -3
- package/src/agent.ts +323 -120
- package/src/api/mcp-server-core.ts +54 -17
- package/src/api/server.ts +4 -23
- package/src/code-execution/isolate/scripts.ts +28 -3
- package/src/config-checks.ts +14 -0
- package/src/context-manager-errors.ts +37 -0
- package/src/context-options.ts +96 -0
- package/src/deferred-import.ts +239 -0
- package/src/dendrite/audience.ts +315 -0
- package/src/dendrite/index.ts +14 -2
- package/src/dendrite/presets.ts +18 -6
- package/src/dendrite/registry.ts +209 -12
- package/src/dendrite/types.ts +92 -8
- package/src/foreign-rounds.ts +199 -0
- package/src/framework.ts +7814 -3585
- package/src/gate/event-gate.ts +428 -65
- package/src/gate/index.ts +3 -0
- package/src/gate/rule-scope.ts +45 -0
- package/src/gate/suppress-script-worker.ts +89 -0
- package/src/gate/suppress-scripts.ts +414 -0
- package/src/gate/suppression-review.ts +517 -0
- package/src/gate/suppression-stats.ts +314 -0
- package/src/gate/types.ts +141 -7
- package/src/gate/wake-onboarding.ts +309 -0
- package/src/held-writes.ts +49 -60
- package/src/index.ts +9 -2
- package/src/jsonrpc-envelope.ts +81 -0
- package/src/mcpl/channel-registry.ts +353 -85
- package/src/mcpl/checkpoint-manager.ts +3 -2
- package/src/mcpl/feature-set-manager.ts +2 -1
- package/src/mcpl/inbound-source.ts +2 -1
- package/src/mcpl/inference-router.ts +7 -4
- package/src/mcpl/push-coalescer.ts +193 -34
- package/src/mcpl/push-handler.ts +10 -5
- package/src/mcpl/server-connection.ts +141 -60
- package/src/mcpl/tool-classes.ts +3 -0
- package/src/mcpl/types.ts +8 -2
- package/src/module-registry.ts +73 -17
- package/src/modules/discord/index.ts +229 -81
- package/src/modules/history/index.ts +439 -70
- package/src/modules/history/semantic.ts +15 -21
- package/src/modules/workspace/disk-agreement.ts +1 -1
- package/src/modules/workspace/index.ts +85 -23
- package/src/notice-tags.ts +10 -1
- package/src/operator-log.ts +36 -3
- package/src/presentation.ts +1676 -0
- package/src/prose-drafts.ts +16 -12
- package/src/read-marks.ts +328 -0
- package/src/recovery/offline-branch.ts +346 -32
- package/src/recovery/recover-cli.ts +21 -3
- package/src/send-tools.ts +40 -7
- package/src/stored-injections.ts +2 -2
- package/src/stored-removal.ts +31 -7
- package/src/tool-result-guard.ts +41 -7
- package/src/tune-out/coordinator.ts +4089 -457
- package/src/tune-out/tools.ts +160 -43
- package/src/tune-out/window-anchor.ts +277 -0
- package/src/types/agent.ts +90 -31
- package/src/types/events.ts +2 -0
- package/src/types/framework.ts +43 -21
- package/src/types/module.ts +181 -68
- package/src/types/trace.ts +542 -40
- package/dist/src/reasoning-loss-notice.d.ts +0 -23
- package/dist/src/reasoning-loss-notice.d.ts.map +0 -1
- package/dist/src/reasoning-loss-notice.js +0 -52
- package/dist/src/reasoning-loss-notice.js.map +0 -1
- package/dist/src/reasoning-loss.d.ts +0 -24
- package/dist/src/reasoning-loss.d.ts.map +0 -1
- package/dist/src/reasoning-loss.js +0 -102
- package/dist/src/reasoning-loss.js.map +0 -1
- package/src/reasoning-loss-notice.ts +0 -64
- package/src/reasoning-loss.ts +0 -120
package/src/types/agent.ts
CHANGED
|
@@ -258,17 +258,10 @@ export interface AgentConfig {
|
|
|
258
258
|
* `thinking-binding-loss` ops alert, once per incident and again if a
|
|
259
259
|
* call drops more. The provider reports drops only on a request that
|
|
260
260
|
* carries the drop control; without it, such a block is refused;
|
|
261
|
-
* - the agent is told
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* fold or other change to an earlier message that takes a reply of the
|
|
266
|
-
* current turn, and, with `dropBlock` set too, when the provider drops
|
|
267
|
-
* blocks it can place as the agent's stored replies or the stream's
|
|
268
|
-
* rounds, once per incident and again when a call drops more. The
|
|
269
|
-
* framework hears compiles through `Agent.onThinkingStrip` from the
|
|
270
|
-
* agent's first stream on, unless a host has set its own, so an agent
|
|
271
|
-
* driven only through the direct API is never told.
|
|
261
|
+
* - the agent is told nothing of reasoning left out or dropped: no line
|
|
262
|
+
* about the mechanics of its own memory or reasoning is put in its
|
|
263
|
+
* context. Hosts can observe compiles' strips through
|
|
264
|
+
* `Agent.onThinkingStrip`;
|
|
272
265
|
* The record and the notes
|
|
273
266
|
* vouch for requests as agent-framework hands them to membrane, so a
|
|
274
267
|
* membrane `beforeRequest` hook that changes a request must change every
|
|
@@ -337,8 +330,29 @@ export interface AgentConfig {
|
|
|
337
330
|
* - 'disabled': generated prose is never published. Only explicit tools may
|
|
338
331
|
* send externally; prose remains in Chronicle, and a turn that wrote plain
|
|
339
332
|
* speech ends with a private `[delivered] plain speech → no channel` receipt.
|
|
333
|
+
* - 'locked': unprefixed prose goes to one destination the agent chose, on
|
|
334
|
+
* every turn, and nothing moves it automatically: not the channel that
|
|
335
|
+
* woke the turn, not an addressed message, a heartbeat or channel_open.
|
|
336
|
+
* Only the `prose_locus` tool moves it, to a channel or to drafts (held,
|
|
337
|
+
* never posted unless the agent resends them). The choice persists
|
|
338
|
+
* across turns and restarts. Until the agent first makes one,
|
|
339
|
+
* `proseLock` is the destination. It governs routing through the channel
|
|
340
|
+
* registry: a module that handles final speech itself (`onAgentSpeech`,
|
|
341
|
+
* such as the in-process Discord module) receives it in every mode, this
|
|
342
|
+
* one included. See docs/locked-prose-routing.md.
|
|
340
343
|
*/
|
|
341
|
-
proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled';
|
|
344
|
+
proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled' | 'locked';
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Locked mode's destination until the agent chooses one with `prose_locus`:
|
|
348
|
+
* `"#channel"`, `"@person"`, a channel id, or `"drafts"`. Resolved as a
|
|
349
|
+
* `>>` target is, at each turn's start, so a channel its server hasn't
|
|
350
|
+
* registered yet resolves once it has; until it resolves, plain speech is
|
|
351
|
+
* held as drafts. Left out, plain speech is held as drafts until the agent
|
|
352
|
+
* chooses. The agent's own choice, once made, takes its place. Ignored in
|
|
353
|
+
* the other modes.
|
|
354
|
+
*/
|
|
355
|
+
proseLock?: string;
|
|
342
356
|
|
|
343
357
|
/**
|
|
344
358
|
* Stored participants that are this agent's own voice, in addition to its
|
|
@@ -431,6 +445,55 @@ export interface AgentConfig {
|
|
|
431
445
|
* view.
|
|
432
446
|
*/
|
|
433
447
|
clock?: import('../clock-rows.js').ClockConfig;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Keep the rows that open a turn raw for the whole turn (on when left out):
|
|
451
|
+
* at a start that opens a turn, the framework pins raw the rows of the
|
|
452
|
+
* agent's window after its newest own message and its consumed mark
|
|
453
|
+
* (`pinRange`, named `agent-framework:turn-inputs`; the README says
|
|
454
|
+
* which rows exactly), and removes the pin when the turn ends, so the
|
|
455
|
+
* strategy doesn't compress the rows the turn opened with while it runs,
|
|
456
|
+
* unless a committing compile refuses as over budget with it held: the
|
|
457
|
+
* pin is then removed and the compile runs once more (README). `false` places no pin:
|
|
458
|
+
* the turn's opening rows are compressed as any others, and a pin of the
|
|
459
|
+
* name left from before (a crash's) is removed at the next start that opens
|
|
460
|
+
* a turn, as a silent start removes one.
|
|
461
|
+
*/
|
|
462
|
+
turnInputsPin?: boolean;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* The other configured agents whose own rows this agent's window takes
|
|
466
|
+
* (none when left out). Residents share one slot, and each is shown only
|
|
467
|
+
* its own rows and the rows meant for it: another resident's rounds,
|
|
468
|
+
* replies, tool results and notes stay out of its window (#291, decision
|
|
469
|
+
* 1; rows an earlier release stored carry no stamp and stay in the window
|
|
470
|
+
* written down from the record: 291-presentation-mandatory). A name here
|
|
471
|
+
* is an observe edge in this agent's registry record, on
|
|
472
|
+
* that agent (`{ agent: name }`, the path the subconscious's edge takes),
|
|
473
|
+
* and the presentation index presents that agent's own rows to this one
|
|
474
|
+
* at its points, as it does any arrival (bearingOf); the history tools
|
|
475
|
+
* leave them in for its calls (ModuleContext.observes). That agent's own
|
|
476
|
+
* rows this one's window doesn't hold yet, those stored before the edge
|
|
477
|
+
* was declared included, enter it at its next presentation point, after
|
|
478
|
+
* what it holds: an edge declared on a store with history hands the
|
|
479
|
+
* observer that agent's earlier rows at once, at the end of its window
|
|
480
|
+
* (`ObserveEdge.fromMessageId`, which would start the edge at a row, is
|
|
481
|
+
* read by nothing yet). Only own rows: mail and channel traffic meant for that agent, and its stored
|
|
482
|
+
* context injections, stay out. One way: `nova` observing `mira` shows
|
|
483
|
+
* nova mira's rows, not mira nova's. `create()` refuses a name that is
|
|
484
|
+
* this agent's own or no configured agent's. Read when a configured agent
|
|
485
|
+
* is created; a derived agent's spec carries its own edges.
|
|
486
|
+
*/
|
|
487
|
+
observes?: string[];
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* How the rounds of an agent it observes (`observes`) go out in this
|
|
491
|
+
* agent's requests, as `PersistentReaderConfig.foreignRounds` for the
|
|
492
|
+
* persistent subconscious: `'transcript'` (the default), a line per tool
|
|
493
|
+
* call and per result and none of their thinking, or `'raw'`, as stored.
|
|
494
|
+
* Unread for an agent that observes no one.
|
|
495
|
+
*/
|
|
496
|
+
foreignRounds?: 'transcript' | 'raw';
|
|
434
497
|
}
|
|
435
498
|
|
|
436
499
|
/** The intentionally small set of agent settings that may change in-process. */
|
|
@@ -585,22 +648,19 @@ export interface InferenceRequest {
|
|
|
585
648
|
* all of them without materializing content, the turn has no cause left
|
|
586
649
|
* and does not run. */
|
|
587
650
|
coalescingBatchSubjects?: string[];
|
|
588
|
-
/** Host-owned: this wake's sole cause is this
|
|
589
|
-
*
|
|
651
|
+
/** Host-owned: this wake's sole cause is this row, by the stored row's
|
|
652
|
+
* id: one stored for its agent as it arrived, or one stored and not
|
|
653
|
+
* presented to its agent at its write, because a turn of the agent's was
|
|
654
|
+
* alive: a coalesced render its turn being assembled doesn't read
|
|
590
655
|
* (wakeToRead), or a message, notice or event whose wake was queued with
|
|
591
|
-
* it. Once a request that carried the
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
* request that carried the message was answered and, for a wake that
|
|
600
|
-
* carries a channel and isn't marked `ambient`, the agent has since
|
|
601
|
-
* published into that channel having read it, or once the message isn't
|
|
602
|
-
* on its store's current branch, the wake starts no turn. */
|
|
603
|
-
readsStoredMessage?: string;
|
|
656
|
+
* it. Once a request that carried the row was answered (an answered
|
|
657
|
+
* request's consumed watermark covers it, in the agent's window once its
|
|
658
|
+
* context presents rows) and, for a wake that carries a channel and isn't
|
|
659
|
+
* marked `ambient`, the agent has since published into that channel
|
|
660
|
+
* having read it, or once the row is not on its store's current branch,
|
|
661
|
+
* the wake starts no turn. A row stored and not yet presented to the
|
|
662
|
+
* agent keeps its wake. */
|
|
663
|
+
readsRow?: string;
|
|
604
664
|
agentName: string;
|
|
605
665
|
reason: string;
|
|
606
666
|
source: string;
|
|
@@ -660,10 +720,9 @@ export interface InferenceRequest {
|
|
|
660
720
|
* (`chat:ambient`). A coalesced push's wake carries it only to read a
|
|
661
721
|
* render, and only when every notice the render stands for was. Such a
|
|
662
722
|
* message asked nothing of the agent, so a wake for it that carries
|
|
663
|
-
* `
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* addressed one.
|
|
723
|
+
* `readsRow` is dropped once a request that carried the message
|
|
724
|
+
* was answered, with no publish asked of the agent. A message with neither
|
|
725
|
+
* tag is in doubt, and is judged as an addressed one.
|
|
667
726
|
*/
|
|
668
727
|
ambient?: true;
|
|
669
728
|
/**
|
package/src/types/events.ts
CHANGED
|
@@ -349,6 +349,8 @@ export interface ToolCall {
|
|
|
349
349
|
* Converted from wire-format McplContentBlock to membrane ContentBlock.
|
|
350
350
|
*/
|
|
351
351
|
export interface McplPushEvent {
|
|
352
|
+
/** The occurrence's suppression, when a coalesced push's wake decided it (CoalescedOccurrence.suppressionDecision). */
|
|
353
|
+
suppressionDecision?: string | null;
|
|
352
354
|
type: 'mcpl:push-event';
|
|
353
355
|
serverId: string;
|
|
354
356
|
featureSet: string;
|
package/src/types/framework.ts
CHANGED
|
@@ -131,12 +131,12 @@ export interface FrameworkConfig {
|
|
|
131
131
|
*/
|
|
132
132
|
announceOrphans?: boolean;
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* `
|
|
134
|
+
* With a `derivationNotice`, after this many derivations of one kind from
|
|
135
|
+
* one agent, the line it's given is a count line every so many instead of
|
|
136
|
+
* a line per fork, so a reader loop that forks a hundred times a session
|
|
137
|
+
* doesn't fill its source's context with stamps; every derivation still
|
|
138
|
+
* emits its `dendrite:agent-created` trace. Default 10; 0 never collapses.
|
|
139
|
+
* Without a `derivationNotice` the source is told nothing.
|
|
140
140
|
*/
|
|
141
141
|
collapseDerivationNoticesAfter?: number;
|
|
142
142
|
/**
|
|
@@ -152,9 +152,11 @@ export interface FrameworkConfig {
|
|
|
152
152
|
beforeDerive?: (spec: import('../dendrite/types.js').AgentSpec) => void | { refuse: string };
|
|
153
153
|
/**
|
|
154
154
|
* What an agent is told when something is derived from it. Given the
|
|
155
|
-
* record, the agent it was derived from and the framework's
|
|
156
|
-
* return the text to add, or
|
|
157
|
-
*
|
|
155
|
+
* record, the agent it was derived from and the framework's own line,
|
|
156
|
+
* return the text to add (that line, or the host's own), or null to add
|
|
157
|
+
* nothing. Absent, nothing is added: an agent isn't told of derivations
|
|
158
|
+
* unless the host asks for it. The `dendrite:agent-created` trace is
|
|
159
|
+
* emitted either way.
|
|
158
160
|
*/
|
|
159
161
|
derivationNotice?: (record: import('../dendrite/types.js').AgentRecord, from: string, defaultText: string) => string | null;
|
|
160
162
|
};
|
|
@@ -167,16 +169,14 @@ export interface FrameworkConfig {
|
|
|
167
169
|
subconscious?: import('../tune-out/tools.js').SubconsciousConfig;
|
|
168
170
|
|
|
169
171
|
/**
|
|
170
|
-
* Tune-out
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* a reader
|
|
175
|
-
*
|
|
172
|
+
* Tune-out settings. Residents are offered `tune_out` only with a reader
|
|
173
|
+
* (`subconscious`), or while a hold a failed release left is still on
|
|
174
|
+
* record to check or cancel: a hold nothing summarizes would hand the resident an
|
|
175
|
+
* undated backlog all at once when it ends. `enabled`, which offered one
|
|
176
|
+
* without a reader, was removed in 0.33.0: `enabled: true` is refused at
|
|
177
|
+
* `create` (`false` is still accepted, from JavaScript, and does nothing).
|
|
176
178
|
*/
|
|
177
179
|
tuneOut?: {
|
|
178
|
-
/** Offer `tune_out` without a subconscious. Default: only with one. */
|
|
179
|
-
enabled?: boolean;
|
|
180
180
|
/**
|
|
181
181
|
* Announce the all-except scope in the excepted channel: one bracketed
|
|
182
182
|
* line under the resident's name when it opens (who, for how long) and
|
|
@@ -200,7 +200,9 @@ export interface FrameworkConfig {
|
|
|
200
200
|
* inbound message is a global fallback locus for turns without one, and
|
|
201
201
|
* an addressed message injected mid-turn re-pins the turn's locus.
|
|
202
202
|
*
|
|
203
|
-
* Held traffic never moves the locus under either rule.
|
|
203
|
+
* Held traffic never moves the locus under either rule. Neither rule
|
|
204
|
+
* applies to an agent under locked prose routing (AgentConfig.proseRouting
|
|
205
|
+
* 'locked'): its turns speak at its lock, whatever arrives.
|
|
204
206
|
*/
|
|
205
207
|
speech?: {
|
|
206
208
|
locus?: 'delivery' | 'latest-inbound';
|
|
@@ -237,9 +239,29 @@ export interface FrameworkConfig {
|
|
|
237
239
|
hostModePath?: string;
|
|
238
240
|
|
|
239
241
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
242
|
+
* Where a release before #291 kept its durable queue of deferred context
|
|
243
|
+
* writes. Defaults to `<storePath>/recovery/deferred-writes.json`; without
|
|
244
|
+
* either, the store's `framework/deferred-writes` slot. This release keeps
|
|
245
|
+
* no durable queue: a write is stored when it is made, and enters each
|
|
246
|
+
* agent's window at that agent's presentation points. Two holds keep a
|
|
247
|
+
* write in memory instead, and a crash loses it: a live operator surgery
|
|
248
|
+
* (a rollback, a suppression, a branch switch), until its release stores
|
|
249
|
+
* it, and an agent's context manager refusing its work after a failed
|
|
250
|
+
* re-initialization, until a branch move (switchBranch, a rollback or a
|
|
251
|
+
* suppression) re-initializes it.
|
|
252
|
+
*
|
|
253
|
+
* create() reads the record once and stores its writes. A write for an
|
|
254
|
+
* agent no longer registered goes to the primary when it is a failed
|
|
255
|
+
* reply, a channel notice its reader could act on, or a module's write
|
|
256
|
+
* for a run or a fork, and is dropped otherwise, logged. It then rewrites
|
|
257
|
+
* the record with what it left for the next boot: a write it couldn't
|
|
258
|
+
* store, or couldn't tell had already landed, with that agent's later
|
|
259
|
+
* writes. A write the store refuses as malformed is dropped, logged, as an
|
|
260
|
+
* earlier release's flush dropped it. When the store doesn't sync after
|
|
261
|
+
* the import, the record is left as it was.
|
|
262
|
+
*
|
|
263
|
+
* @deprecated Read once at boot by the deferred-write importer; removed in
|
|
264
|
+
* the next release.
|
|
243
265
|
*/
|
|
244
266
|
deferredWritesPath?: string;
|
|
245
267
|
|