@animalabs/agent-framework 0.32.0 → 0.34.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 +340 -22
- 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 +208 -80
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +345 -113
- 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/append-all.d.ts +5 -0
- package/dist/src/append-all.d.ts.map +1 -0
- package/dist/src/append-all.js +8 -0
- package/dist/src/append-all.js.map +1 -0
- 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 +70 -0
- package/dist/src/context-options.d.ts.map +1 -0
- package/dist/src/context-options.js +90 -0
- package/dist/src/context-options.js.map +1 -0
- package/dist/src/cut-off-round.js +4 -4
- 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 +183 -12
- 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/failure-text.d.ts +36 -0
- package/dist/src/failure-text.d.ts.map +1 -0
- package/dist/src/failure-text.js +89 -0
- package/dist/src/failure-text.js.map +1 -0
- 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 +2064 -842
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +8586 -3739
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +125 -21
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +487 -72
- 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/reply-judge.d.ts +4 -0
- package/dist/src/gate/reply-judge.d.ts.map +1 -1
- package/dist/src/gate/reply-judge.js +12 -3
- package/dist/src/gate/reply-judge.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 +142 -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/heartbeat/heartbeat.js +1 -1
- package/dist/src/heartbeat/heartbeat.js.map +1 -1
- 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 +6 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/inference-bounds.d.ts +2 -1
- package/dist/src/inference-bounds.d.ts.map +1 -1
- package/dist/src/inference-bounds.js +9 -6
- package/dist/src/inference-bounds.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 +188 -28
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +426 -70
- 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/modern-connection.d.ts +109 -15
- package/dist/src/mcpl/modern-connection.d.ts.map +1 -1
- package/dist/src/mcpl/modern-connection.js +593 -86
- package/dist/src/mcpl/modern-connection.js.map +1 -1
- package/dist/src/mcpl/protocol-family.d.ts +3 -1
- package/dist/src/mcpl/protocol-family.d.ts.map +1 -1
- package/dist/src/mcpl/protocol-family.js +15 -9
- package/dist/src/mcpl/protocol-family.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 +50 -28
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +165 -72
- 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/tool-presence.d.ts.map +1 -1
- package/dist/src/mcpl/tool-presence.js +10 -6
- package/dist/src/mcpl/tool-presence.js.map +1 -1
- package/dist/src/mcpl/toolset-host.d.ts.map +1 -1
- package/dist/src/mcpl/toolset-host.js +7 -6
- package/dist/src/mcpl/toolset-host.js.map +1 -1
- package/dist/src/mcpl/toolsets-module.d.ts.map +1 -1
- package/dist/src/mcpl/toolsets-module.js +2 -1
- package/dist/src/mcpl/toolsets-module.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +33 -6
- 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 +238 -87
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/health/index.js +2 -2
- package/dist/src/modules/health/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 +18 -25
- 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 +80 -25
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +2 -1
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
- package/dist/src/modules/workspace/reconcile.js +3 -2
- package/dist/src/modules/workspace/reconcile.js.map +1 -1
- package/dist/src/notice-tags.d.ts +20 -9
- package/dist/src/notice-tags.d.ts.map +1 -1
- package/dist/src/notice-tags.js +20 -9
- 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 +747 -0
- package/dist/src/presentation.d.ts.map +1 -0
- package/dist/src/presentation.js +1437 -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/reasoning-loss.d.ts +5 -0
- package/dist/src/reasoning-loss.d.ts.map +1 -0
- package/dist/src/reasoning-loss.js +8 -0
- package/dist/src/reasoning-loss.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 +277 -32
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/recovery/recover-cli.js +24 -4
- 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/sent-rows.js +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/supplied-text.d.ts +1 -1
- package/dist/src/supplied-text.js +3 -3
- package/dist/src/supplied-text.js.map +1 -1
- package/dist/src/thinking-drops.d.ts +2 -0
- package/dist/src/thinking-drops.d.ts.map +1 -1
- package/dist/src/thinking-drops.js.map +1 -1
- package/dist/src/tool-presentation.d.ts.map +1 -1
- package/dist/src/tool-presentation.js +38 -9
- package/dist/src/tool-presentation.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 +1170 -81
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +3732 -369
- 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 +89 -28
- 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 +121 -25
- 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 +72 -17
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/inference-log.d.ts +1 -0
- package/dist/src/types/inference-log.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 +573 -39
- package/dist/src/types/trace.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/admission/admit.ts +32 -3
- package/src/agent.ts +392 -132
- package/src/api/mcp-server-core.ts +54 -17
- package/src/api/server.ts +4 -23
- package/src/append-all.ts +6 -0
- 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 +106 -0
- package/src/cut-off-round.ts +4 -4
- 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 +213 -14
- package/src/dendrite/types.ts +92 -8
- package/src/failure-text.ts +88 -0
- package/src/foreign-rounds.ts +199 -0
- package/src/framework.ts +8796 -3813
- package/src/gate/event-gate.ts +518 -91
- package/src/gate/index.ts +3 -0
- package/src/gate/reply-judge.ts +12 -3
- 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 +148 -7
- package/src/gate/wake-onboarding.ts +309 -0
- package/src/heartbeat/heartbeat.ts +1 -1
- package/src/held-writes.ts +49 -60
- package/src/index.ts +10 -2
- package/src/inference-bounds.ts +11 -6
- package/src/jsonrpc-envelope.ts +81 -0
- package/src/mcpl/channel-registry.ts +513 -116
- 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/modern-connection.ts +629 -91
- package/src/mcpl/protocol-family.ts +15 -9
- package/src/mcpl/push-coalescer.ts +193 -34
- package/src/mcpl/push-handler.ts +10 -5
- package/src/mcpl/server-connection.ts +169 -75
- package/src/mcpl/tool-classes.ts +3 -0
- package/src/mcpl/tool-presence.ts +10 -5
- package/src/mcpl/toolset-host.ts +7 -6
- package/src/mcpl/toolsets-module.ts +2 -1
- package/src/mcpl/types.ts +33 -6
- package/src/module-registry.ts +73 -17
- package/src/modules/discord/index.ts +230 -82
- package/src/modules/health/index.ts +2 -2
- package/src/modules/history/index.ts +439 -70
- package/src/modules/history/semantic.ts +18 -24
- package/src/modules/workspace/disk-agreement.ts +1 -1
- package/src/modules/workspace/index.ts +89 -26
- package/src/modules/workspace/observe.ts +2 -1
- package/src/modules/workspace/reconcile.ts +3 -2
- package/src/notice-tags.ts +21 -9
- package/src/operator-log.ts +36 -3
- package/src/presentation.ts +1678 -0
- package/src/prose-drafts.ts +16 -12
- package/src/read-marks.ts +328 -0
- package/src/reasoning-loss.ts +7 -0
- package/src/recovery/offline-branch.ts +350 -35
- package/src/recovery/recover-cli.ts +23 -4
- package/src/send-tools.ts +40 -7
- package/src/sent-rows.ts +1 -1
- package/src/stored-injections.ts +2 -2
- package/src/stored-removal.ts +31 -7
- package/src/supplied-text.ts +3 -3
- package/src/thinking-drops.ts +2 -0
- package/src/tool-presentation.ts +34 -9
- package/src/tool-result-guard.ts +41 -7
- package/src/tune-out/coordinator.ts +4121 -472
- package/src/tune-out/tools.ts +162 -44
- package/src/tune-out/window-anchor.ts +277 -0
- package/src/types/agent.ts +122 -25
- package/src/types/events.ts +2 -0
- package/src/types/framework.ts +73 -17
- package/src/types/inference-log.ts +1 -0
- package/src/types/module.ts +181 -68
- package/src/types/trace.ts +607 -43
package/src/types/agent.ts
CHANGED
|
@@ -221,11 +221,15 @@ export interface AgentConfig {
|
|
|
221
221
|
* counts it. After a fold, each block after the stretch it rewrote is
|
|
222
222
|
* bound to a conversation the request no longer holds. Where the context
|
|
223
223
|
* strategy still sends such a block, the provider drops it on every call
|
|
224
|
-
* until a later fold takes it out of the context,
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
224
|
+
* until a later fold takes it out of the context, or, with `binds` set
|
|
225
|
+
* too, until the next compile after a note lands: the stream tells the
|
|
226
|
+
* context manager which stored reply's thinking was dropped
|
|
227
|
+
* (`noteThinkingDropped`), and once a note lands, the next compile sends
|
|
228
|
+
* that reply without it. While such blocks are sent,
|
|
229
|
+
* no stream gives a sample and the calibration keeps the value it had. A
|
|
230
|
+
* strategy that leaves that thinking out at the fold sends none to drop.
|
|
231
|
+
* The direct API carries the control too, but reads no report: it traces
|
|
232
|
+
* no usage, feeds no calibration and notes nothing.
|
|
229
233
|
*
|
|
230
234
|
* Default false: nothing is sent, and the account's default applies.
|
|
231
235
|
*/
|
|
@@ -249,6 +253,11 @@ export interface AgentConfig {
|
|
|
249
253
|
* thinking is kept at the next compile. The direct API
|
|
250
254
|
* (`runInference`) notes nothing, so each of its replies' thinking is
|
|
251
255
|
* left out at the compile after it's stored;
|
|
256
|
+
* - with `dropBlock` set too, each framework stream tells the context
|
|
257
|
+
* manager which stored replies' thinking the provider reports dropping
|
|
258
|
+
* (`noteThinkingDropped`), naming the compile it was built from, so
|
|
259
|
+
* once a note lands, the next compile sends those replies without their
|
|
260
|
+
* thinking;
|
|
252
261
|
* - with `physicalWindowTokens` set too, `maxStreamTokens` no longer
|
|
253
262
|
* starts a new stream mid-turn, since the new stream's compile can take
|
|
254
263
|
* the turn's earlier reasoning out of the request;
|
|
@@ -330,8 +339,29 @@ export interface AgentConfig {
|
|
|
330
339
|
* - 'disabled': generated prose is never published. Only explicit tools may
|
|
331
340
|
* send externally; prose remains in Chronicle, and a turn that wrote plain
|
|
332
341
|
* speech ends with a private `[delivered] plain speech → no channel` receipt.
|
|
342
|
+
* - 'locked': unprefixed prose goes to one destination the agent chose, on
|
|
343
|
+
* every turn, and nothing moves it automatically: not the channel that
|
|
344
|
+
* woke the turn, not an addressed message, a heartbeat or channel_open.
|
|
345
|
+
* Only the `prose_locus` tool moves it, to a channel or to drafts (held,
|
|
346
|
+
* never posted unless the agent resends them). The choice persists
|
|
347
|
+
* across turns and restarts. Until the agent first makes one,
|
|
348
|
+
* `proseLock` is the destination. It governs routing through the channel
|
|
349
|
+
* registry: a module that handles final speech itself (`onAgentSpeech`,
|
|
350
|
+
* such as the in-process Discord module) receives it in every mode, this
|
|
351
|
+
* one included. See docs/locked-prose-routing.md.
|
|
333
352
|
*/
|
|
334
|
-
proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled';
|
|
353
|
+
proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled' | 'locked';
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Locked mode's destination until the agent chooses one with `prose_locus`:
|
|
357
|
+
* `"#channel"`, `"@person"`, a channel id, or `"drafts"`. Resolved as a
|
|
358
|
+
* `>>` target is, at each turn's start, so a channel its server hasn't
|
|
359
|
+
* registered yet resolves once it has; until it resolves, plain speech is
|
|
360
|
+
* held as drafts. Left out, plain speech is held as drafts until the agent
|
|
361
|
+
* chooses. The agent's own choice, once made, takes its place. Ignored in
|
|
362
|
+
* the other modes.
|
|
363
|
+
*/
|
|
364
|
+
proseLock?: string;
|
|
335
365
|
|
|
336
366
|
/**
|
|
337
367
|
* Stored participants that are this agent's own voice, in addition to its
|
|
@@ -424,6 +454,55 @@ export interface AgentConfig {
|
|
|
424
454
|
* view.
|
|
425
455
|
*/
|
|
426
456
|
clock?: import('../clock-rows.js').ClockConfig;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Keep the rows that open a turn raw for the whole turn (on when left out):
|
|
460
|
+
* at a start that opens a turn, the framework pins raw the rows of the
|
|
461
|
+
* agent's window after its newest own message and its consumed mark
|
|
462
|
+
* (`pinRange`, named `agent-framework:turn-inputs`; the README says
|
|
463
|
+
* which rows exactly), and removes the pin when the turn ends, so the
|
|
464
|
+
* strategy doesn't compress the rows the turn opened with while it runs,
|
|
465
|
+
* unless a committing compile refuses as over budget with it held: the
|
|
466
|
+
* pin is then removed and the compile runs once more (README). `false` places no pin:
|
|
467
|
+
* the turn's opening rows are compressed as any others, and a pin of the
|
|
468
|
+
* name left from before (a crash's) is removed at the next start that opens
|
|
469
|
+
* a turn, as a silent start removes one.
|
|
470
|
+
*/
|
|
471
|
+
turnInputsPin?: boolean;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* The other configured agents whose own rows this agent's window takes
|
|
475
|
+
* (none when left out). Residents share one slot, and each is shown only
|
|
476
|
+
* its own rows and the rows meant for it: another resident's rounds,
|
|
477
|
+
* replies, tool results and notes stay out of its window (#291, decision
|
|
478
|
+
* 1; rows an earlier release stored carry no stamp and stay in the window
|
|
479
|
+
* written down from the record: 291-presentation-mandatory). A name here
|
|
480
|
+
* is an observe edge in this agent's registry record, on
|
|
481
|
+
* that agent (`{ agent: name }`, the path the subconscious's edge takes),
|
|
482
|
+
* and the presentation index presents that agent's own rows to this one
|
|
483
|
+
* at its points, as it does any arrival (bearingOf); the history tools
|
|
484
|
+
* leave them in for its calls (ModuleContext.observes). That agent's own
|
|
485
|
+
* rows this one's window doesn't hold yet, those stored before the edge
|
|
486
|
+
* was declared included, enter it at its next presentation point, after
|
|
487
|
+
* what it holds: an edge declared on a store with history hands the
|
|
488
|
+
* observer that agent's earlier rows at once, at the end of its window
|
|
489
|
+
* (`ObserveEdge.fromMessageId`, which would start the edge at a row, is
|
|
490
|
+
* read by nothing yet). Only own rows: mail and channel traffic meant for that agent, and its stored
|
|
491
|
+
* context injections, stay out. One way: `nova` observing `mira` shows
|
|
492
|
+
* nova mira's rows, not mira nova's. `create()` refuses a name that is
|
|
493
|
+
* this agent's own or no configured agent's. Read when a configured agent
|
|
494
|
+
* is created; a derived agent's spec carries its own edges.
|
|
495
|
+
*/
|
|
496
|
+
observes?: string[];
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* How the rounds of an agent it observes (`observes`) go out in this
|
|
500
|
+
* agent's requests, as `PersistentReaderConfig.foreignRounds` for the
|
|
501
|
+
* persistent subconscious: `'transcript'` (the default), a line per tool
|
|
502
|
+
* call and per result and none of their thinking, or `'raw'`, as stored.
|
|
503
|
+
* Unread for an agent that observes no one.
|
|
504
|
+
*/
|
|
505
|
+
foreignRounds?: 'transcript' | 'raw';
|
|
427
506
|
}
|
|
428
507
|
|
|
429
508
|
/** The intentionally small set of agent settings that may change in-process. */
|
|
@@ -578,22 +657,19 @@ export interface InferenceRequest {
|
|
|
578
657
|
* all of them without materializing content, the turn has no cause left
|
|
579
658
|
* and does not run. */
|
|
580
659
|
coalescingBatchSubjects?: string[];
|
|
581
|
-
/** Host-owned: this wake's sole cause is this
|
|
582
|
-
*
|
|
660
|
+
/** Host-owned: this wake's sole cause is this row, by the stored row's
|
|
661
|
+
* id: one stored for its agent as it arrived, or one stored and not
|
|
662
|
+
* presented to its agent at its write, because a turn of the agent's was
|
|
663
|
+
* alive: a coalesced render its turn being assembled doesn't read
|
|
583
664
|
* (wakeToRead), or a message, notice or event whose wake was queued with
|
|
584
|
-
* it. Once a request that carried the
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
* request that carried the message was answered and, for a wake that
|
|
593
|
-
* carries a channel and isn't marked `ambient`, the agent has since
|
|
594
|
-
* published into that channel having read it, or once the message isn't
|
|
595
|
-
* on its store's current branch, the wake starts no turn. */
|
|
596
|
-
readsStoredMessage?: string;
|
|
665
|
+
* it. Once a request that carried the row was answered (an answered
|
|
666
|
+
* request's consumed watermark covers it, in the agent's window once its
|
|
667
|
+
* context presents rows) and, for a wake that carries a channel and isn't
|
|
668
|
+
* marked `ambient`, the agent has since published into that channel
|
|
669
|
+
* having read it, or once the row is not on its store's current branch,
|
|
670
|
+
* the wake starts no turn. A row stored and not yet presented to the
|
|
671
|
+
* agent keeps its wake. */
|
|
672
|
+
readsRow?: string;
|
|
597
673
|
agentName: string;
|
|
598
674
|
reason: string;
|
|
599
675
|
source: string;
|
|
@@ -653,10 +729,9 @@ export interface InferenceRequest {
|
|
|
653
729
|
* (`chat:ambient`). A coalesced push's wake carries it only to read a
|
|
654
730
|
* render, and only when every notice the render stands for was. Such a
|
|
655
731
|
* message asked nothing of the agent, so a wake for it that carries
|
|
656
|
-
* `
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* addressed one.
|
|
732
|
+
* `readsRow` is dropped once a request that carried the message
|
|
733
|
+
* was answered, with no publish asked of the agent. A message with neither
|
|
734
|
+
* tag is in doubt, and is judged as an addressed one.
|
|
660
735
|
*/
|
|
661
736
|
ambient?: true;
|
|
662
737
|
/**
|
|
@@ -687,6 +762,28 @@ export interface InferenceRequest {
|
|
|
687
762
|
* channel (ambient-only batches leave it unset).
|
|
688
763
|
*/
|
|
689
764
|
wakeChannelId?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Framework-set on a gate wake whose batch held no message that addressed
|
|
767
|
+
* the agent, and which so took no route: the channels its messages came
|
|
768
|
+
* from (a `chat:system` notice names none, unless it's a coalesced
|
|
769
|
+
* render's latest occurrence), each once. A start merged from several
|
|
770
|
+
* requests carries every one's channels, or, when any of them comes from
|
|
771
|
+
* outside the framework, isn't a silent heartbeat tick and brought
|
|
772
|
+
* channels, only those requests' channels. A request a quiesce keeps in
|
|
773
|
+
* another's place, and one a provider hold takes another into, carry both
|
|
774
|
+
* requests' channels.
|
|
775
|
+
* The framework's own wakes that continue a
|
|
776
|
+
* turn (a restart, a re-inference, a continuation, a retry, a bounce, a
|
|
777
|
+
* re-arm), unless its own wake named a channel that resolves to none,
|
|
778
|
+
* carry the channels the turn's starts gathered, whether or not the turn
|
|
779
|
+
* had a locus, so a turn's trigger can name channels from several batches,
|
|
780
|
+
* and a turn they open with no locus can name them too.
|
|
781
|
+
* When such a turn's plain speech, or a sleep's announcement, is routed
|
|
782
|
+
* with no locus, the agent is told these channels, unless the turn's own
|
|
783
|
+
* wake named a channel that resolves to none, or the turn is an ephemeral
|
|
784
|
+
* run's, which is told nothing.
|
|
785
|
+
*/
|
|
786
|
+
wakeChannels?: Array<{ serverId: string; channelId: string }>;
|
|
690
787
|
/** Timestamp of the event the wake provenance was taken from (ms). */
|
|
691
788
|
wakeAt?: number;
|
|
692
789
|
/** Batched-wake lines the gate handed to this wake rather than wrote
|
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
|
@@ -169,16 +169,14 @@ export interface FrameworkConfig {
|
|
|
169
169
|
subconscious?: import('../tune-out/tools.js').SubconsciousConfig;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* Tune-out
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* a reader
|
|
177
|
-
*
|
|
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).
|
|
178
178
|
*/
|
|
179
179
|
tuneOut?: {
|
|
180
|
-
/** Offer `tune_out` without a subconscious. Default: only with one. */
|
|
181
|
-
enabled?: boolean;
|
|
182
180
|
/**
|
|
183
181
|
* Announce the all-except scope in the excepted channel: one bracketed
|
|
184
182
|
* line under the resident's name when it opens (who, for how long) and
|
|
@@ -193,16 +191,23 @@ export interface FrameworkConfig {
|
|
|
193
191
|
* (architecture channel, 2026-10-06: the §3 carve-out accepted by the
|
|
194
192
|
* residents).
|
|
195
193
|
*
|
|
196
|
-
* - `'delivery'` (default): the locus comes
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
194
|
+
* - `'delivery'` (default): the locus comes from the delivery that woke
|
|
195
|
+
* the turn, a conversation fork's home channel, or a channel the agent
|
|
196
|
+
* opened during the turn, and past those only from an open all-except
|
|
197
|
+
* hold's channel or `unpromptedChannel` (below), each for the turns that
|
|
198
|
+
* take it. Incoming traffic never moves it — not between turns, not
|
|
199
|
+
* mid-turn. A turn with no such locus keeps its prose private, and says
|
|
200
|
+
* so in a `[routing]` notice.
|
|
201
201
|
* - `'latest-inbound'`: the previous rule. The most recent delivered
|
|
202
202
|
* inbound message is a global fallback locus for turns without one, and
|
|
203
203
|
* an addressed message injected mid-turn re-pins the turn's locus.
|
|
204
204
|
*
|
|
205
|
-
* Held traffic never moves the locus under either rule.
|
|
205
|
+
* Held traffic never moves the locus under either rule. Under either, a
|
|
206
|
+
* turn the agent's own timer starts takes `unpromptedChannel` where it's
|
|
207
|
+
* set, after an all-except hold's channel and before both rules' own
|
|
208
|
+
* fallbacks. Neither rule applies to an agent under locked prose routing
|
|
209
|
+
* (AgentConfig.proseRouting 'locked'): its turns speak at its lock,
|
|
210
|
+
* whatever arrives.
|
|
206
211
|
*/
|
|
207
212
|
speech?: {
|
|
208
213
|
locus?: 'delivery' | 'latest-inbound';
|
|
@@ -239,9 +244,29 @@ export interface FrameworkConfig {
|
|
|
239
244
|
hostModePath?: string;
|
|
240
245
|
|
|
241
246
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
247
|
+
* Where a release before #291 kept its durable queue of deferred context
|
|
248
|
+
* writes. Defaults to `<storePath>/recovery/deferred-writes.json`; without
|
|
249
|
+
* either, the store's `framework/deferred-writes` slot. This release keeps
|
|
250
|
+
* no durable queue: a write is stored when it is made, and enters each
|
|
251
|
+
* agent's window at that agent's presentation points. Two holds keep a
|
|
252
|
+
* write in memory instead, and a crash loses it: a live operator surgery
|
|
253
|
+
* (a rollback, a suppression, a branch switch), until its release stores
|
|
254
|
+
* it, and an agent's context manager refusing its work after a failed
|
|
255
|
+
* re-initialization, until a branch move (switchBranch, a rollback or a
|
|
256
|
+
* suppression) re-initializes it.
|
|
257
|
+
*
|
|
258
|
+
* create() reads the record once and stores its writes. A write for an
|
|
259
|
+
* agent no longer registered goes to the primary when it is a failed
|
|
260
|
+
* reply, a channel notice its reader could act on, or a module's write
|
|
261
|
+
* for a run or a fork, and is dropped otherwise, logged. It then rewrites
|
|
262
|
+
* the record with what it left for the next boot: a write it couldn't
|
|
263
|
+
* store, or couldn't tell had already landed, with that agent's later
|
|
264
|
+
* writes. A write the store refuses as malformed is dropped, logged, as an
|
|
265
|
+
* earlier release's flush dropped it. When the store doesn't sync after
|
|
266
|
+
* the import, the record is left as it was.
|
|
267
|
+
*
|
|
268
|
+
* @deprecated Read once at boot by the deferred-write importer; removed in
|
|
269
|
+
* the next release.
|
|
245
270
|
*/
|
|
246
271
|
deferredWritesPath?: string;
|
|
247
272
|
|
|
@@ -482,6 +507,35 @@ export interface FrameworkConfig {
|
|
|
482
507
|
*/
|
|
483
508
|
inferenceRouting?: InferenceRoutingPolicy;
|
|
484
509
|
|
|
510
|
+
/**
|
|
511
|
+
* The channel for a turn the agent's own timer starts, which no message
|
|
512
|
+
* prompted: the wake `skip_reply` schedules, or the end of a `sleep`. Plain
|
|
513
|
+
* speech in locus or hybrid prose routing goes there, and so does
|
|
514
|
+
* `channel_publish` naming no channel in any prose routing mode but locked,
|
|
515
|
+
* which servers are told as the turn's default outgoing channel. An
|
|
516
|
+
* all-except hold's channel still comes first while one is open, and without
|
|
517
|
+
* the setting such a turn follows `speech.locus`. A turn the framework opens
|
|
518
|
+
* to continue such a turn that had no locus of its own, as in explicit or
|
|
519
|
+
* disabled routing, takes it too: a `!` continuation, autoContinue's next
|
|
520
|
+
* turn, or a bounced reply's wake. No other turn takes it: not one a message
|
|
521
|
+
* prompted, from a channel, a module, a person at a console or another agent;
|
|
522
|
+
* not a heartbeat's or a reminder's (its plain speech is held as drafts); not
|
|
523
|
+
* a conversation fork's or an ephemeral run's; not a locked agent's, which
|
|
524
|
+
* speaks at its lock or holds its speech as drafts; and not a start merged
|
|
525
|
+
* from a timer's wake and any other cause. One value, for every agent on the
|
|
526
|
+
* framework. A registered channel's id, e.g. `discord:{guildId}:{channelId}`,
|
|
527
|
+
* or, to pick one server's where two register that id,
|
|
528
|
+
* `{serverId}:{channelId}`. `create()` refuses a value that is neither a
|
|
529
|
+
* string nor null, or is blank; null reads as not set. A value that names no
|
|
530
|
+
* registered channel, several, or one its server declared inbound-only, when
|
|
531
|
+
* a turn would take it, is logged, and logged again only after a turn has
|
|
532
|
+
* used it since; the turn takes what it would without the setting.
|
|
533
|
+
* `channel_publish`'s description adds a default for such turns only on a
|
|
534
|
+
* framework with an event gate, the only one with such turns; on any other
|
|
535
|
+
* the description is as it is without the setting.
|
|
536
|
+
*/
|
|
537
|
+
unpromptedChannel?: string | null;
|
|
538
|
+
|
|
485
539
|
/** EventGate config. If omitted, all events trigger inference (unchanged default). */
|
|
486
540
|
gate?: GateOptions;
|
|
487
541
|
/**
|
|
@@ -657,6 +711,8 @@ export interface InferenceLogEntry {
|
|
|
657
711
|
success: boolean;
|
|
658
712
|
/** Why it didn't succeed: the failure's message, or what stopped it */
|
|
659
713
|
error?: string;
|
|
714
|
+
/** `error` in the framework's words, with no provider's text: what an agent may be shown of it */
|
|
715
|
+
errorWords?: string;
|
|
660
716
|
/** Request data or blob ID if large. A stream the framework ended at a
|
|
661
717
|
* tool boundary (stopReason 'turn_ended', 'context_budget' or
|
|
662
718
|
* 'physical_window') records a note in place of the body. */
|
|
@@ -54,6 +54,7 @@ export interface InferenceLogSummary {
|
|
|
54
54
|
requestId: string;
|
|
55
55
|
success: boolean;
|
|
56
56
|
error?: string;
|
|
57
|
+
errorWords?: string;
|
|
57
58
|
durationMs: number;
|
|
58
59
|
tokenUsage?: { input: number; output: number; cacheCreation?: number; cacheRead?: number };
|
|
59
60
|
stopReason?: string;
|