@animalabs/agent-framework 0.28.0 → 0.30.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 +88 -25
- package/dist/src/admission/admit.d.ts +90 -0
- package/dist/src/admission/admit.d.ts.map +1 -0
- package/dist/src/admission/admit.js +43 -0
- package/dist/src/admission/admit.js.map +1 -0
- package/dist/src/agent.d.ts +21 -0
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +47 -7
- 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 +3 -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 +7 -3
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/author-presentation.d.ts +50 -0
- package/dist/src/author-presentation.d.ts.map +1 -0
- package/dist/src/author-presentation.js +58 -0
- package/dist/src/author-presentation.js.map +1 -0
- package/dist/src/auto-continue.d.ts +2 -0
- package/dist/src/auto-continue.d.ts.map +1 -1
- package/dist/src/auto-continue.js +5 -2
- package/dist/src/auto-continue.js.map +1 -1
- package/dist/src/code-execution/isolate/runner.d.ts +7 -5
- package/dist/src/code-execution/isolate/runner.d.ts.map +1 -1
- package/dist/src/code-execution/isolate/runner.js +7 -5
- package/dist/src/code-execution/isolate/runner.js.map +1 -1
- package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
- package/dist/src/code-execution/isolate/scripts.js +3 -2
- package/dist/src/code-execution/isolate/scripts.js.map +1 -1
- package/dist/src/dendrite/index.d.ts +6 -0
- package/dist/src/dendrite/index.d.ts.map +1 -0
- package/dist/src/dendrite/index.js +3 -0
- package/dist/src/dendrite/index.js.map +1 -0
- package/dist/src/dendrite/presets.d.ts +60 -0
- package/dist/src/dendrite/presets.d.ts.map +1 -0
- package/dist/src/dendrite/presets.js +117 -0
- package/dist/src/dendrite/presets.js.map +1 -0
- package/dist/src/dendrite/registry.d.ts +260 -0
- package/dist/src/dendrite/registry.d.ts.map +1 -0
- package/dist/src/dendrite/registry.js +742 -0
- package/dist/src/dendrite/registry.js.map +1 -0
- package/dist/src/dendrite/types.d.ts +392 -0
- package/dist/src/dendrite/types.d.ts.map +1 -0
- package/dist/src/dendrite/types.js +24 -0
- package/dist/src/dendrite/types.js.map +1 -0
- package/dist/src/framework.d.ts +846 -67
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +4213 -924
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +46 -14
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +143 -53
- 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 +1 -1
- package/dist/src/gate/index.js.map +1 -1
- package/dist/src/gate/types.d.ts +12 -2
- package/dist/src/gate/types.d.ts.map +1 -1
- package/dist/src/heartbeat/heartbeat.d.ts +18 -0
- package/dist/src/heartbeat/heartbeat.d.ts.map +1 -1
- package/dist/src/heartbeat/heartbeat.js +34 -8
- package/dist/src/heartbeat/heartbeat.js.map +1 -1
- package/dist/src/held-writes.d.ts +3 -3
- package/dist/src/held-writes.js +3 -3
- package/dist/src/host-presentation.d.ts +174 -0
- package/dist/src/host-presentation.d.ts.map +1 -0
- package/dist/src/host-presentation.js +565 -0
- package/dist/src/host-presentation.js.map +1 -0
- package/dist/src/index.d.ts +7 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/line-reader.d.ts +4 -0
- package/dist/src/line-reader.d.ts.map +1 -0
- package/dist/src/line-reader.js +59 -0
- package/dist/src/line-reader.js.map +1 -0
- package/dist/src/mcpl/channel-registry.d.ts +118 -15
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +266 -110
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/conversation-router.d.ts.map +1 -1
- package/dist/src/mcpl/conversation-router.js +2 -1
- package/dist/src/mcpl/conversation-router.js.map +1 -1
- package/dist/src/mcpl/convert-block.d.ts +1 -0
- package/dist/src/mcpl/convert-block.d.ts.map +1 -1
- package/dist/src/mcpl/convert-block.js +16 -4
- package/dist/src/mcpl/convert-block.js.map +1 -1
- package/dist/src/mcpl/hook-orchestrator.d.ts.map +1 -1
- package/dist/src/mcpl/hook-orchestrator.js +4 -3
- package/dist/src/mcpl/hook-orchestrator.js.map +1 -1
- package/dist/src/mcpl/inbound-source.d.ts +3 -1
- package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
- package/dist/src/mcpl/inbound-source.js +3 -1
- package/dist/src/mcpl/inbound-source.js.map +1 -1
- package/dist/src/mcpl/modern-connection.d.ts.map +1 -1
- package/dist/src/mcpl/modern-connection.js +11 -7
- package/dist/src/mcpl/modern-connection.js.map +1 -1
- package/dist/src/mcpl/protocol-family.d.ts +3 -2
- package/dist/src/mcpl/protocol-family.d.ts.map +1 -1
- package/dist/src/mcpl/protocol-family.js +25 -3
- package/dist/src/mcpl/protocol-family.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +9 -0
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +21 -0
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.js +2 -2
- package/dist/src/mcpl/push-handler.js.map +1 -1
- package/dist/src/mcpl/references.d.ts +12 -40
- package/dist/src/mcpl/references.d.ts.map +1 -1
- package/dist/src/mcpl/references.js +29 -23
- package/dist/src/mcpl/references.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +20 -20
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/skip-reply-wake.d.ts +25 -0
- package/dist/src/mcpl/skip-reply-wake.d.ts.map +1 -1
- package/dist/src/mcpl/skip-reply-wake.js +25 -0
- package/dist/src/mcpl/skip-reply-wake.js.map +1 -1
- package/dist/src/mcpl/tool-presence.d.ts.map +1 -1
- package/dist/src/mcpl/tool-presence.js +18 -17
- package/dist/src/mcpl/tool-presence.js.map +1 -1
- package/dist/src/mcpl/tool-signature.d.ts.map +1 -1
- package/dist/src/mcpl/tool-signature.js +17 -16
- package/dist/src/mcpl/tool-signature.js.map +1 -1
- package/dist/src/mcpl/toolset-host.d.ts +8 -26
- package/dist/src/mcpl/toolset-host.d.ts.map +1 -1
- package/dist/src/mcpl/toolset-host.js +16 -6
- package/dist/src/mcpl/toolset-host.js.map +1 -1
- package/dist/src/mcpl/toolsets-module.d.ts +14 -25
- package/dist/src/mcpl/toolsets-module.d.ts.map +1 -1
- package/dist/src/mcpl/toolsets-module.js +187 -50
- package/dist/src/mcpl/toolsets-module.js.map +1 -1
- package/dist/src/mcpl/transport.d.ts +1 -1
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +16 -16
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +28 -12
- 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 +6 -7
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +6 -7
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/api/index.d.ts.map +1 -1
- package/dist/src/modules/api/index.js +4 -2
- package/dist/src/modules/api/index.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +33 -25
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/history/index.js +8 -6
- package/dist/src/modules/history/index.js.map +1 -1
- package/dist/src/modules/sender-name.d.ts +7 -0
- package/dist/src/modules/sender-name.d.ts.map +1 -0
- package/dist/src/modules/sender-name.js +10 -0
- package/dist/src/modules/sender-name.js.map +1 -0
- package/dist/src/modules/workspace/answers.d.ts +5 -1
- package/dist/src/modules/workspace/answers.d.ts.map +1 -1
- package/dist/src/modules/workspace/answers.js +16 -1
- package/dist/src/modules/workspace/answers.js.map +1 -1
- package/dist/src/modules/workspace/direct-write.d.ts.map +1 -1
- package/dist/src/modules/workspace/direct-write.js +6 -4
- package/dist/src/modules/workspace/direct-write.js.map +1 -1
- package/dist/src/modules/workspace/effects.d.ts +4 -2
- package/dist/src/modules/workspace/effects.d.ts.map +1 -1
- package/dist/src/modules/workspace/effects.js +50 -40
- package/dist/src/modules/workspace/effects.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +1 -0
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +66 -36
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +51 -20
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +120 -82
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/reconcile.d.ts +7 -1
- package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
- package/dist/src/modules/workspace/reconcile.js +133 -37
- package/dist/src/modules/workspace/reconcile.js.map +1 -1
- package/dist/src/notice-tags.d.ts +81 -0
- package/dist/src/notice-tags.d.ts.map +1 -0
- package/dist/src/notice-tags.js +85 -0
- package/dist/src/notice-tags.js.map +1 -0
- package/dist/src/reasoning-loss-notice.d.ts.map +1 -1
- package/dist/src/reasoning-loss-notice.js +5 -3
- package/dist/src/reasoning-loss-notice.js.map +1 -1
- package/dist/src/silent-heartbeat.d.ts +5 -55
- package/dist/src/silent-heartbeat.d.ts.map +1 -1
- package/dist/src/silent-heartbeat.js +63 -7
- package/dist/src/silent-heartbeat.js.map +1 -1
- package/dist/src/stored-injections.d.ts +4 -0
- package/dist/src/stored-injections.d.ts.map +1 -1
- package/dist/src/stored-injections.js +6 -0
- package/dist/src/stored-injections.js.map +1 -1
- package/dist/src/supplied-text.d.ts +35 -0
- package/dist/src/supplied-text.d.ts.map +1 -0
- package/dist/src/supplied-text.js +141 -0
- package/dist/src/supplied-text.js.map +1 -0
- package/dist/src/tool-args.d.ts.map +1 -1
- package/dist/src/tool-args.js +9 -8
- package/dist/src/tool-args.js.map +1 -1
- package/dist/src/tool-image-ledger.d.ts.map +1 -1
- package/dist/src/tool-image-ledger.js +2 -1
- package/dist/src/tool-image-ledger.js.map +1 -1
- package/dist/src/tool-presentation.d.ts.map +1 -1
- package/dist/src/tool-presentation.js +5 -4
- package/dist/src/tool-presentation.js.map +1 -1
- package/dist/src/tune-out/coordinator.d.ts +382 -11
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +1100 -119
- package/dist/src/tune-out/coordinator.js.map +1 -1
- package/dist/src/tune-out/tools.d.ts +101 -5
- package/dist/src/tune-out/tools.d.ts.map +1 -1
- package/dist/src/tune-out/tools.js +55 -18
- package/dist/src/tune-out/tools.js.map +1 -1
- package/dist/src/types/agent.d.ts +48 -9
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +142 -0
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +22 -11
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +136 -0
- package/dist/src/types/trace.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/admission/admit.ts +113 -0
- package/src/agent.ts +52 -7
- package/src/api/mcp-server-core.ts +3 -14
- package/src/api/server.ts +7 -3
- package/src/author-presentation.ts +81 -0
- package/src/auto-continue.ts +8 -2
- package/src/code-execution/isolate/runner.ts +7 -5
- package/src/code-execution/isolate/scripts.ts +3 -2
- package/src/dendrite/index.ts +32 -0
- package/src/dendrite/presets.ts +149 -0
- package/src/dendrite/registry.ts +808 -0
- package/src/dendrite/types.ts +397 -0
- package/src/framework.ts +4362 -852
- package/src/gate/event-gate.ts +159 -52
- package/src/gate/index.ts +1 -1
- package/src/gate/types.ts +12 -2
- package/src/heartbeat/heartbeat.ts +48 -9
- package/src/held-writes.ts +3 -3
- package/src/host-presentation.ts +612 -0
- package/src/index.ts +17 -4
- package/src/line-reader.ts +58 -0
- package/src/mcpl/channel-registry.ts +306 -111
- package/src/mcpl/conversation-router.ts +2 -1
- package/src/mcpl/convert-block.ts +17 -4
- package/src/mcpl/hook-orchestrator.ts +4 -3
- package/src/mcpl/inbound-source.ts +3 -1
- package/src/mcpl/modern-connection.ts +11 -7
- package/src/mcpl/protocol-family.ts +24 -3
- package/src/mcpl/push-coalescer.ts +19 -0
- package/src/mcpl/push-handler.ts +2 -2
- package/src/mcpl/references.ts +31 -23
- package/src/mcpl/server-connection.ts +20 -18
- package/src/mcpl/skip-reply-wake.ts +35 -0
- package/src/mcpl/tool-presence.ts +18 -17
- package/src/mcpl/tool-signature.ts +17 -16
- package/src/mcpl/toolset-host.ts +18 -6
- package/src/mcpl/toolsets-module.ts +149 -50
- package/src/mcpl/transport.ts +18 -14
- package/src/mcpl/types.ts +29 -12
- package/src/module-registry.ts +6 -7
- package/src/modules/api/index.ts +4 -2
- package/src/modules/discord/index.ts +37 -25
- package/src/modules/history/index.ts +8 -6
- package/src/modules/sender-name.ts +9 -0
- package/src/modules/workspace/answers.ts +20 -2
- package/src/modules/workspace/direct-write.ts +4 -3
- package/src/modules/workspace/effects.ts +50 -40
- package/src/modules/workspace/index.ts +58 -34
- package/src/modules/workspace/observe.ts +139 -88
- package/src/modules/workspace/reconcile.ts +159 -36
- package/src/notice-tags.ts +86 -0
- package/src/reasoning-loss-notice.ts +5 -3
- package/src/silent-heartbeat.ts +11 -7
- package/src/stored-injections.ts +7 -0
- package/src/supplied-text.ts +154 -0
- package/src/tool-args.ts +9 -8
- package/src/tool-image-ledger.ts +2 -1
- package/src/tool-presentation.ts +5 -4
- package/src/tune-out/coordinator.ts +1252 -123
- package/src/tune-out/tools.ts +152 -11
- package/src/types/agent.ts +51 -9
- package/src/types/framework.ts +146 -0
- package/src/types/module.ts +23 -11
- package/src/types/trace.ts +150 -0
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ Chronicle's audit history.
|
|
|
64
64
|
model: 'claude-opus-4-20250514',
|
|
65
65
|
systemPrompt: '...',
|
|
66
66
|
strategy: new AutobiographicalStrategy({ recentWindowTokens: 30000 }),
|
|
67
|
-
allowedTools: ['search--query', '
|
|
67
|
+
allowedTools: ['search--query', 'toolsets--open', 'toolsets--act', 'toolsets--look', 'toolsets--close', 'files--archive'], // or 'all'
|
|
68
68
|
triggerSources: ['discord'], // or 'all'
|
|
69
69
|
maxTokens: 8192,
|
|
70
70
|
maxStreamTokens: 150_000, // input token budget before stream restart
|
|
@@ -73,17 +73,13 @@ Chronicle's audit history.
|
|
|
73
73
|
|
|
74
74
|
`allowedTools` is enforced at dispatch for registered agents. Omission or
|
|
75
75
|
`'all'` permits all tools; an explicit list matches exact names, including
|
|
76
|
-
`module--utility` names.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
but none are permitted, `list` returns a failed `ToolResult` with the registered
|
|
84
|
-
and permitted counts and migration advice, and a list containing `utils`
|
|
85
|
-
logs one warning per Agent instance after registration.
|
|
86
|
-
An empty registry still returns a successful empty list.
|
|
76
|
+
`module--utility` names. A utility, like every tool of the host's built-in
|
|
77
|
+
toolset (see "The host's own toolsets" below), is called through
|
|
78
|
+
`toolsets--act`, and the dispatch check applies to the utility's own name: an
|
|
79
|
+
agent that should use one lists `module--utility` and the `toolsets--` tools.
|
|
80
|
+
An agent that can't use `toolsets--open` and `toolsets--act` gets no host
|
|
81
|
+
toolsets: every tool it may call stays in its tool list, except module
|
|
82
|
+
utilities, which are never in a tool list (it can still call one by name).
|
|
87
83
|
|
|
88
84
|
Trusted module calls are exempt from agent allowlists. Genuinely unidentified
|
|
89
85
|
public callers, including unknown legacy caller names, remain unrestricted.
|
|
@@ -137,6 +133,8 @@ return {
|
|
|
137
133
|
- **ApiModule** - WebSocket API event processing
|
|
138
134
|
- **WorkspaceModule** - Mountable filesystem abstraction with Chronicle tree state, filesystem watching, and materialization
|
|
139
135
|
|
|
136
|
+
DiscordModule and ApiModule store a sender's name that comes from outside the framework in a form marked with its source: a Discord author's username as `<name> (Discord)`, and the name on every `api:message` event, from an ApiServer caller or a host's own, as `<name> (API)`. An `api:message` whose `participant` isn't text, which its type doesn't allow, isn't stored, and starts no turn. Such a name is stored on one line: each run of line breaks (U+2028 and U+2029 included) and other control characters becomes one space. The generic name `user`, in any capitalization, is stored as given. Unless a host gives one of its own agents the name `user`, in any capitalization, or a name ending in ` (Discord)` or ` (API)`, such a message never carries an agent's name, so the agent's request never takes it as the agent's own turn. Where an agent's request shows senders' names, the agent sees the marked form, and the unmarked one in rows stored by earlier versions. A host that pushes an `api:message` in an agent's name records a user turn, not that agent's, with the same exception, and the ApiServer's message list returns each message's participant as stored, so a caller sees its own messages under `<name> (API)`. The ApiServer refuses a `participant` that isn't text, as it refuses content that isn't. The bot's own messages that a Discord history sync stores keep the name of the framework's first agent, as before. For a sender from outside, both modules also store the name as sent in `metadata.author` (with the author's Discord id), unless an `api:message` event's metadata already carries an `author` object, which is kept. History's author filter matches a row's `metadata.author` when it has one, and its participant otherwise. Code that tells senders apart should read a row's `metadata.author` (its `name`, and `id` for Discord) when it has one, and its participant otherwise, as the filter does: rows these modules stored in earlier versions have none, unless a host's `api:message` carried one.
|
|
137
|
+
|
|
140
138
|
### Event Processing
|
|
141
139
|
|
|
142
140
|
The framework runs an event loop over a `ProcessQueue`. Each event is processed by all modules, which return `EventResponse` objects. If any response requests inference, the framework compiles context and starts a stream.
|
|
@@ -349,7 +347,8 @@ three ways:
|
|
|
349
347
|
'auto'` or a non-empty list, a scope's non-empty `whitelist`, a
|
|
350
348
|
`toolLifecycle` `observe` or `inputs` block, a
|
|
351
349
|
`toolLifecycle.maxInputBytes` or an `autofetch` bound above its default,
|
|
352
|
-
and `toolHints: true
|
|
350
|
+
and `toolHints: true` (an MCPL server takes hints when the setting is left
|
|
351
|
+
out; a modern server ignores the default).
|
|
353
352
|
A setting
|
|
354
353
|
that only takes something away, or repeats a default, is already
|
|
355
354
|
satisfied, so it is accepted: `enabledFeatureSets` and the rest of
|
|
@@ -432,19 +431,28 @@ the `mcpl/coalescing` state (retry window 1 h); audit lines are
|
|
|
432
431
|
|
|
433
432
|
#### Tool presence and toolsets (RFC-014)
|
|
434
433
|
|
|
435
|
-
|
|
436
|
-
`
|
|
437
|
-
`toolHints` too.
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
434
|
+
Every MCPL server is offered `experimental.mcpl.toolHints` unless its
|
|
435
|
+
configuration sets `toolHints: false`, and its hints count only if it
|
|
436
|
+
advertised `toolHints` too. A server that doesn't advertise them lists every
|
|
437
|
+
tool as before. With `toolHints: false` on a server, the host advertises and
|
|
438
|
+
reads nothing new for it. The `toolsets` module below is registered at
|
|
439
|
+
creation in any case, since the host's own toolsets use it. A modern (MCP)
|
|
440
|
+
server never has hints. Only a module given to `create()` can hold the name
|
|
441
|
+
`toolsets`: MCPL servers that leave the setting out then have none, and a line
|
|
442
|
+
says so. A server `toolPrefix` of `toolsets` is refused.
|
|
443
|
+
|
|
444
|
+
With hints in effect, the server's static tools stay in the tool list as before, and its
|
|
441
445
|
dynamic tools (those in a toolset, or hinted `mcpl/presence: "dynamic"`) never
|
|
442
446
|
enter it, since every change to the list rebuilds the prompt cache. The
|
|
443
|
-
framework registers a `toolsets` module with four constant tools
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
447
|
+
framework registers a `toolsets` module with four constant tools at creation,
|
|
448
|
+
for every agent (the host's own toolsets need them too, below), so the tool
|
|
449
|
+
list doesn't change when a server starts to present:
|
|
450
|
+
|
|
451
|
+
- `toolsets--open {server?, toolset?, instance?, options?, full?}` opens a
|
|
452
|
+
server's toolset (`server` and `toolset`), or a named instance of one, and
|
|
453
|
+
answers with what the server shows on opening and the tools usable now;
|
|
454
|
+
`server` alone opens the server's tab and `toolset: "settings"` alone the
|
|
455
|
+
host's built-in toolset (below);
|
|
448
456
|
- `toolsets--act {server?, tool, instance?, args?}` calls a dynamic tool down
|
|
449
457
|
the same path as a direct call of it (the agent's `allowedTools`, the
|
|
450
458
|
server's tool policy, the state exchange, the reading of its result, RFC-007
|
|
@@ -461,7 +469,62 @@ framework registers a `toolsets` module with four constant tools:
|
|
|
461
469
|
couldn't; what that changed
|
|
462
470
|
is in the answer when look restates everything, and otherwise told as a
|
|
463
471
|
notice;
|
|
464
|
-
- `toolsets--close {server?, toolset?, instance?}` closes it
|
|
472
|
+
- `toolsets--close {server?, toolset?, instance?, disconnect?}` closes it;
|
|
473
|
+
`server` alone moves the server to a tab or hides its open tab, and with
|
|
474
|
+
`disconnect: true` makes it a closed tab (below).
|
|
475
|
+
|
|
476
|
+
### The host's own toolsets
|
|
477
|
+
|
|
478
|
+
Beside the toolsets servers declare, the host presents some tools out of the
|
|
479
|
+
tool list itself (RFC-014 §8.5 host-made toolsets, §8.1 surface presentation;
|
|
480
|
+
`src/host-presentation.ts`). It's host presentation, not an MCPL wire change,
|
|
481
|
+
and works for every server, with or without RFC-014. The `toolsets--` tools
|
|
482
|
+
are registered for every agent, MCPL or none, unless a module holds the name.
|
|
483
|
+
|
|
484
|
+
- **The built-in toolset, `settings`.** The host tools an agent reaches for
|
|
485
|
+
rarely: `agent_settings`, `wake_add_rule`, `wake_remove_rule`,
|
|
486
|
+
`gate_status`, `event_tags`, `set_tool_visibility`, `set_tool_description`,
|
|
487
|
+
`heartbeat--heartbeat_status`, `heartbeat--heartbeat_trigger`,
|
|
488
|
+
`workspace--status`, every module utility (`Module.getUtilities`), and a
|
|
489
|
+
module's tools it places there (`Module.toolPlacement` answering
|
|
490
|
+
`'builtin'`). None is in the tool list. `toolsets--open {toolset:"settings"}`
|
|
491
|
+
announces them, `toolsets--act {tool, args}` calls one while it's open, under
|
|
492
|
+
its own name and permissions, its `args` checked against the definition first, `toolsets--close {toolset:"settings"}` closes
|
|
493
|
+
it, and `toolsets--look {toolset:"settings"}` lists them either way. A
|
|
494
|
+
server's own toolset named `settings` is reached with its `server` named.
|
|
495
|
+
- **Server tabs.** Each MCPL server is presented to each agent one of three
|
|
496
|
+
ways: `full` (its tools in the tool list, the default), a `tab` (connected,
|
|
497
|
+
its events still arriving, none of its tools in the tool list:
|
|
498
|
+
`toolsets--open {server}` announces them and lets `toolsets--act` call them,
|
|
499
|
+
named in full or bare with `server`; `toolsets--close {server}` hides them
|
|
500
|
+
again), or a `closed-tab` (disconnected until `toolsets--open {server}`
|
|
501
|
+
connects it again, with its configuration and credentials, an
|
|
502
|
+
`accessProvider` asked afresh). `toolsets--close {server}` moves a full
|
|
503
|
+
server to a tab, `toolsets--close {server, disconnect: true}` disconnects it,
|
|
504
|
+
and `toolsets--open {server, full: true}` puts it back in the tool list. A
|
|
505
|
+
server's configured `presentation` (`'full' | 'tab' | 'closed-tab'`) is where
|
|
506
|
+
each agent starts; what an agent chose is kept across restarts. A
|
|
507
|
+
connection is the host's, so a closed tab is disconnected for every agent of
|
|
508
|
+
the host, and `disconnect` is refused while another resident agent has the
|
|
509
|
+
server in its tool list or its tab open, or can't use the meta-tools (it
|
|
510
|
+
has every server in its list, and couldn't open a closed tab again). A
|
|
511
|
+
disconnect that fails changes nothing. An operator's own connect of a
|
|
512
|
+
closed tab ends it, and an operator's disconnect forgets the server's tab.
|
|
513
|
+
- **Hidden tools.** A tool an agent hides with `set_tool_visibility` leaves its
|
|
514
|
+
tool list for the built-in toolset, or its server's tab, and comes back when
|
|
515
|
+
shown. The `toolsets--` tools can't be hidden.
|
|
516
|
+
|
|
517
|
+
The tool list changes only when a server moves between full and a tab or a
|
|
518
|
+
tool is hidden or shown, one prompt-cache write each; opening, acting in and
|
|
519
|
+
closing a host toolset never change it. Which host toolsets an agent has open,
|
|
520
|
+
and each server's presentation where the agent changed it, are kept in
|
|
521
|
+
`<storePath>/config/toolsets.json`. An open host toolset whose announcement has
|
|
522
|
+
left the context is reminded of, as a server's toolset is (§8.3). A call of a
|
|
523
|
+
tool the agent may call by name still works by name; the tool list just
|
|
524
|
+
doesn't carry it. `framework.presentedTools(agentName, tools, canUseMeta?)`
|
|
525
|
+
applies this presentation to a tool list, so a host can tell a stream that
|
|
526
|
+
isn't registered yet (a fork, before its run starts) what its first request
|
|
527
|
+
will carry.
|
|
465
528
|
|
|
466
529
|
`server` can be left out when only one server has the name. By our reading of
|
|
467
530
|
the code, a server with no toolsets stops presenting them once its latest `tools/list` has no dynamic
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The admission stage (Dendrite §D; issue #232 §3.5).
|
|
3
|
+
*
|
|
4
|
+
* One decision per inbound event, taken before any side effect. Everything
|
|
5
|
+
* downstream — storage, the recipient's view, the wake, the speech locus,
|
|
6
|
+
* the gate's batching — consumes this decision instead of rediscovering the
|
|
7
|
+
* policy at its own stage. The function is pure over the policy inputs it is
|
|
8
|
+
* handed; the framework supplies them and applies the result.
|
|
9
|
+
*
|
|
10
|
+
* What is decided, in the proposal's words:
|
|
11
|
+
* 1. captured — always; an admitted event is stored where it arrived
|
|
12
|
+
* 2. recipients — who is eligible (explicit targets, else the untargeted set)
|
|
13
|
+
* 3. delivery — a body in the recipients' view, or a hold
|
|
14
|
+
* 4. wake — may it start a turn
|
|
15
|
+
* 5. locus — may it count as "the latest delivered inbound" (never
|
|
16
|
+
* under a hold); the channel registry records it under
|
|
17
|
+
* either `speech.locus` setting, and makes it the fallback
|
|
18
|
+
* locus only under `'latest-inbound'`
|
|
19
|
+
*
|
|
20
|
+
* A hold is a policy epoch over a channel (today: tune-out). Residents share
|
|
21
|
+
* one message slot, so a hold applies to the slot: every resident recipient
|
|
22
|
+
* gets the same disposition. A reader of the slot (the subconscious, or a
|
|
23
|
+
* reader fork) sees held traffic through its own view; that is not a
|
|
24
|
+
* delivery decision of this stage.
|
|
25
|
+
*/
|
|
26
|
+
export interface InboundEnvelope {
|
|
27
|
+
/** Which MCPL lane carried it. */
|
|
28
|
+
lane: 'channel' | 'push';
|
|
29
|
+
serverId: string;
|
|
30
|
+
/** Endpoint-qualified channel id when the event has one (a push event
|
|
31
|
+
* without channel provenance — heartbeat, timer — has none). */
|
|
32
|
+
channelId?: string;
|
|
33
|
+
/** Platform message id, or the push event id. */
|
|
34
|
+
messageId: string;
|
|
35
|
+
authorId?: string;
|
|
36
|
+
tags?: string[];
|
|
37
|
+
/** `chat:addressed` (mention / reply / DM) or the server's equivalent. */
|
|
38
|
+
addressed: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The server-side veto: a per-server `shouldTriggerInference` said no, or
|
|
41
|
+
* the event is a materialized coalesced delivery whose wake already
|
|
42
|
+
* happened (`triggerInference: false`). A vetoed event wakes nobody and is
|
|
43
|
+
* not shown to the gate as a fresh event.
|
|
44
|
+
*/
|
|
45
|
+
vetoed: boolean;
|
|
46
|
+
/** Explicit recipients named by the event, if any. */
|
|
47
|
+
targetAgents?: string[];
|
|
48
|
+
/** What the gate sees: the text and the metadata shape it has always matched on. */
|
|
49
|
+
gateContent: string;
|
|
50
|
+
gateMetadata: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
export interface HoldRecord {
|
|
53
|
+
kind: 'tune-out';
|
|
54
|
+
epochId: string;
|
|
55
|
+
serverId: string;
|
|
56
|
+
channelId: string;
|
|
57
|
+
}
|
|
58
|
+
export interface AdmissionPolicy {
|
|
59
|
+
/** The recipients an untargeted event reaches. */
|
|
60
|
+
untargetedRecipients(): string[];
|
|
61
|
+
/** The hold in force over this channel, if any. */
|
|
62
|
+
holdFor(serverId: string, channelId: string): HoldRecord | null;
|
|
63
|
+
/**
|
|
64
|
+
* The wake gate. `evaluate` may have side effects (debounce batching,
|
|
65
|
+
* counters, traces) and is called only for an event that may reach the
|
|
66
|
+
* recipients; `probe` is side-effect-free and answers "would the gate have
|
|
67
|
+
* woken them" for a held event, which the hold's own policy needs.
|
|
68
|
+
*/
|
|
69
|
+
gate?: {
|
|
70
|
+
evaluate(env: InboundEnvelope): boolean;
|
|
71
|
+
probe(env: InboundEnvelope): boolean;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface AdmissionDecision {
|
|
75
|
+
recipients: string[];
|
|
76
|
+
/** Null = delivered into the recipients' view; otherwise held, with the record to stamp. */
|
|
77
|
+
held: HoldRecord | null;
|
|
78
|
+
/** Whether the recipients may be woken by this event. */
|
|
79
|
+
wake: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The gate's verdict as a precondition for whatever reads the hold: true
|
|
82
|
+
* when the gate would (or did) wake the recipients. For a held event this
|
|
83
|
+
* comes from the side-effect-free probe; for a vetoed event it is false.
|
|
84
|
+
*/
|
|
85
|
+
gatePass: boolean;
|
|
86
|
+
/** Whether this arrival may count as the latest delivered inbound message. */
|
|
87
|
+
locus: boolean;
|
|
88
|
+
}
|
|
89
|
+
export declare function admit(env: InboundEnvelope, policy: AdmissionPolicy): AdmissionDecision;
|
|
90
|
+
//# sourceMappingURL=admit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admit.d.ts","sourceRoot":"","sources":["../../../src/admission/admit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB;qEACiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,oBAAoB,IAAI,MAAM,EAAE,CAAC;IACjC,mDAAmD;IACnD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC;IAChE;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC;QACxC,KAAK,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC;KACtC,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,4FAA4F;IAC5F,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,yDAAyD;IACzD,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAmBtF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The admission stage (Dendrite §D; issue #232 §3.5).
|
|
3
|
+
*
|
|
4
|
+
* One decision per inbound event, taken before any side effect. Everything
|
|
5
|
+
* downstream — storage, the recipient's view, the wake, the speech locus,
|
|
6
|
+
* the gate's batching — consumes this decision instead of rediscovering the
|
|
7
|
+
* policy at its own stage. The function is pure over the policy inputs it is
|
|
8
|
+
* handed; the framework supplies them and applies the result.
|
|
9
|
+
*
|
|
10
|
+
* What is decided, in the proposal's words:
|
|
11
|
+
* 1. captured — always; an admitted event is stored where it arrived
|
|
12
|
+
* 2. recipients — who is eligible (explicit targets, else the untargeted set)
|
|
13
|
+
* 3. delivery — a body in the recipients' view, or a hold
|
|
14
|
+
* 4. wake — may it start a turn
|
|
15
|
+
* 5. locus — may it count as "the latest delivered inbound" (never
|
|
16
|
+
* under a hold); the channel registry records it under
|
|
17
|
+
* either `speech.locus` setting, and makes it the fallback
|
|
18
|
+
* locus only under `'latest-inbound'`
|
|
19
|
+
*
|
|
20
|
+
* A hold is a policy epoch over a channel (today: tune-out). Residents share
|
|
21
|
+
* one message slot, so a hold applies to the slot: every resident recipient
|
|
22
|
+
* gets the same disposition. A reader of the slot (the subconscious, or a
|
|
23
|
+
* reader fork) sees held traffic through its own view; that is not a
|
|
24
|
+
* delivery decision of this stage.
|
|
25
|
+
*/
|
|
26
|
+
export function admit(env, policy) {
|
|
27
|
+
const recipients = env.targetAgents ?? policy.untargetedRecipients();
|
|
28
|
+
const held = env.channelId ? policy.holdFor(env.serverId, env.channelId) : null;
|
|
29
|
+
if (held) {
|
|
30
|
+
// Held: nothing downstream may act for the recipients. The gate is only
|
|
31
|
+
// asked what it would have done — no batch forms, no counter moves.
|
|
32
|
+
const gatePass = env.vetoed ? false : (policy.gate ? policy.gate.probe(env) : true);
|
|
33
|
+
return { recipients, held, wake: false, gatePass, locus: false };
|
|
34
|
+
}
|
|
35
|
+
if (env.vetoed) {
|
|
36
|
+
return { recipients, held: null, wake: false, gatePass: false, locus: true };
|
|
37
|
+
}
|
|
38
|
+
// Deliverable: now the gate may take its side effects (a debounce batch
|
|
39
|
+
// is the gate's own deferred wake and is consumed later by the same rule).
|
|
40
|
+
const gatePass = policy.gate ? policy.gate.evaluate(env) : true;
|
|
41
|
+
return { recipients, held: null, wake: gatePass, gatePass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AAI,CAAC;IAChE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC3E,CAAC"}
|
package/dist/src/agent.d.ts
CHANGED
|
@@ -162,6 +162,11 @@ export declare class Agent {
|
|
|
162
162
|
/** Provider-specific request parameters forwarded unchanged by Membrane. */
|
|
163
163
|
readonly providerParams?: Record<string, unknown>;
|
|
164
164
|
readonly sameRoundThinkTextPolicy: AgentConfig['sameRoundThinkTextPolicy'];
|
|
165
|
+
/** The participant name this agent's turns are presented under (see AgentConfig.presentAs). */
|
|
166
|
+
readonly presentAs: string;
|
|
167
|
+
/** Stored participants presented as this agent's own turns: its name plus AgentConfig.selfParticipants. */
|
|
168
|
+
private readonly ownParticipants;
|
|
169
|
+
private readonly deniedAtDispatch;
|
|
165
170
|
private _state;
|
|
166
171
|
private _inferenceStartedAt;
|
|
167
172
|
private _streamId;
|
|
@@ -280,6 +285,22 @@ export declare class Agent {
|
|
|
280
285
|
* Check if agent can use a specific tool.
|
|
281
286
|
*/
|
|
282
287
|
canUseTool(toolName: string): boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Whether a call to an advertised tool is refused at dispatch
|
|
290
|
+
* (see AgentConfig.denyToolsAtDispatch).
|
|
291
|
+
*/
|
|
292
|
+
deniesAtDispatch(toolName: string): boolean;
|
|
293
|
+
/** Whether a stored participant is this agent's own voice. */
|
|
294
|
+
isOwnParticipant(participant: string): boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Role assignment for a request: every participant that is this agent's
|
|
297
|
+
* own voice — its name, and for a derived agent the agent it inherited
|
|
298
|
+
* from — is presented under one name, which the formatter maps to the
|
|
299
|
+
* assistant role. Stored authorship is untouched; this shapes the request
|
|
300
|
+
* only. For a plain agent (no selfParticipants, presentAs = name) the
|
|
301
|
+
* input is returned as is.
|
|
302
|
+
*/
|
|
303
|
+
private presentOwnTurns;
|
|
283
304
|
/**
|
|
284
305
|
* Check if a source can trigger inference for this agent.
|
|
285
306
|
*/
|
package/dist/src/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE9I,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAA+C,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK5D,OAAO,EAQL,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAO/E,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC;wEACoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;uBAKmB;IACnB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC;;;gDAG4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;mCAEmC;AACnC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAQpF;+CAC+C;AAC/C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,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EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAI5C;IAED;;OAEG;IACH,eAAe,IAAI,OAAO,CAEzB;IAED;;OAEG;IACH,iBAAiB,IAAI,UAAU,EAAE,CAKhC;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAEZ;IAED;;OAEG;IACH,iBAAiB,IAAI,cAAc,CAElC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IAazB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,KAAK,CAc7E;YAEa,WAAW;IAsEzB,OAAO,CAAC,yBAAyB;IAuBjC,OAAO,CAAC,uBAAuB;CA8BhC"}
|
package/dist/src/agent.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NOTICE_TAG } from './notice-tags.js';
|
|
1
2
|
import { heartbeatToolAlias } from './heartbeat/heartbeat.js';
|
|
2
3
|
import { isAbortedResponse } from '@animalabs/membrane';
|
|
3
4
|
import { ToolResultGuard } from './tool-result-guard.js';
|
|
@@ -165,6 +166,11 @@ export class Agent {
|
|
|
165
166
|
/** Provider-specific request parameters forwarded unchanged by Membrane. */
|
|
166
167
|
providerParams;
|
|
167
168
|
sameRoundThinkTextPolicy;
|
|
169
|
+
/** The participant name this agent's turns are presented under (see AgentConfig.presentAs). */
|
|
170
|
+
presentAs;
|
|
171
|
+
/** Stored participants presented as this agent's own turns: its name plus AgentConfig.selfParticipants. */
|
|
172
|
+
ownParticipants;
|
|
173
|
+
deniedAtDispatch;
|
|
168
174
|
_state = { status: 'idle' };
|
|
169
175
|
_inferenceStartedAt = 0;
|
|
170
176
|
_streamId = 0;
|
|
@@ -288,6 +294,9 @@ export class Agent {
|
|
|
288
294
|
this.prefillUserMessage = config.prefillUserMessage;
|
|
289
295
|
this.providerParams = config.providerParams;
|
|
290
296
|
this.sameRoundThinkTextPolicy = config.sameRoundThinkTextPolicy;
|
|
297
|
+
this.presentAs = config.presentAs ?? config.name;
|
|
298
|
+
this.ownParticipants = new Set([config.name, ...(config.selfParticipants ?? [])]);
|
|
299
|
+
this.deniedAtDispatch = new Set(config.denyToolsAtDispatch ?? []);
|
|
291
300
|
this.maxStreamTokens = config.maxStreamTokens ?? 150_000;
|
|
292
301
|
// The window size converted as the projection's comparison (`projected > window`) converts it, so a string such
|
|
293
302
|
// as "200000" from a JSON or YAML config is its number, for every rule that reads it. A value whose number isn't
|
|
@@ -343,6 +352,32 @@ export class Agent {
|
|
|
343
352
|
const alias = heartbeatToolAlias(toolName);
|
|
344
353
|
return alias !== undefined && this.allowedTools.includes(alias);
|
|
345
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Whether a call to an advertised tool is refused at dispatch
|
|
357
|
+
* (see AgentConfig.denyToolsAtDispatch).
|
|
358
|
+
*/
|
|
359
|
+
deniesAtDispatch(toolName) {
|
|
360
|
+
return this.deniedAtDispatch.has(toolName);
|
|
361
|
+
}
|
|
362
|
+
/** Whether a stored participant is this agent's own voice. */
|
|
363
|
+
isOwnParticipant(participant) {
|
|
364
|
+
return this.ownParticipants.has(participant);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Role assignment for a request: every participant that is this agent's
|
|
368
|
+
* own voice — its name, and for a derived agent the agent it inherited
|
|
369
|
+
* from — is presented under one name, which the formatter maps to the
|
|
370
|
+
* assistant role. Stored authorship is untouched; this shapes the request
|
|
371
|
+
* only. For a plain agent (no selfParticipants, presentAs = name) the
|
|
372
|
+
* input is returned as is.
|
|
373
|
+
*/
|
|
374
|
+
presentOwnTurns(messages) {
|
|
375
|
+
if (this.ownParticipants.size === 1 && this.presentAs === this.name)
|
|
376
|
+
return messages;
|
|
377
|
+
return messages.map((m) => this.ownParticipants.has(m.participant) && m.participant !== this.presentAs
|
|
378
|
+
? { ...m, participant: this.presentAs }
|
|
379
|
+
: m);
|
|
380
|
+
}
|
|
346
381
|
/**
|
|
347
382
|
* Check if a source can trigger inference for this agent.
|
|
348
383
|
*/
|
|
@@ -1422,8 +1457,9 @@ export class Agent {
|
|
|
1422
1457
|
// What it holds of the stored injections is what the agent last saw.
|
|
1423
1458
|
this.noteRenderedInjections(compiled);
|
|
1424
1459
|
const { systemInjections } = compiled;
|
|
1425
|
-
// The framework's own pricing stamp never goes out (thinking-token-stamp.ts)
|
|
1426
|
-
|
|
1460
|
+
// The framework's own pricing stamp never goes out (thinking-token-stamp.ts);
|
|
1461
|
+
// the agent's own turns are then presented under its name (presentOwnTurns).
|
|
1462
|
+
const messages = this.presentOwnTurns(withoutTokenEstimates(compiled.messages));
|
|
1427
1463
|
// Read once, after the first compile, since results may have become
|
|
1428
1464
|
// ready while it ran; the refusal retry, assembled while the agent is
|
|
1429
1465
|
// inferring, sends the same ones.
|
|
@@ -1435,6 +1471,7 @@ export class Agent {
|
|
|
1435
1471
|
system: this.buildSystemPrompt(systemInjections),
|
|
1436
1472
|
tools: tools.length > 0 ? tools : undefined,
|
|
1437
1473
|
...this.requestSettings(),
|
|
1474
|
+
assistantParticipant: this.presentAs,
|
|
1438
1475
|
};
|
|
1439
1476
|
};
|
|
1440
1477
|
const request = await assemble();
|
|
@@ -1645,6 +1682,7 @@ export class Agent {
|
|
|
1645
1682
|
.filter((m) => m.content.length > 0);
|
|
1646
1683
|
// The framework's own pricing stamp never goes out (thinking-token-stamp.ts).
|
|
1647
1684
|
messages = withoutTokenEstimates(messages);
|
|
1685
|
+
messages = this.presentOwnTurns(messages);
|
|
1648
1686
|
// Silent heartbeat ticks and replies to a [Continue] turn store no
|
|
1649
1687
|
// prompt row. Render each request-only turn before its response's first
|
|
1650
1688
|
// surviving row, so the wire formatter cannot merge the response into the
|
|
@@ -1655,7 +1693,7 @@ export class Agent {
|
|
|
1655
1693
|
// renders. "First" is per agent: a broadcast tick shares its eventId with
|
|
1656
1694
|
// every resident.
|
|
1657
1695
|
const index = this.indexRequestOnlyRows();
|
|
1658
|
-
const rendered = renderRequestOnlyRows(messages, index, this.
|
|
1696
|
+
const rendered = renderRequestOnlyRows(messages, index, this.presentAs);
|
|
1659
1697
|
messages = rendered.messages;
|
|
1660
1698
|
// A tick opens wherever its separator isn't already rendered: on its first
|
|
1661
1699
|
// request, and on a restart whose compile left none of the tick's rows,
|
|
@@ -1674,7 +1712,7 @@ export class Agent {
|
|
|
1674
1712
|
if (openingTick) {
|
|
1675
1713
|
messages = [...messages, silentHeartbeatSeparatorTurn()];
|
|
1676
1714
|
}
|
|
1677
|
-
else if (endsOnOwnMessage(messages, this.
|
|
1715
|
+
else if (endsOnOwnMessage(messages, this.presentAs, injectionTail)) {
|
|
1678
1716
|
// Safety: ensure messages don't end with an assistant message.
|
|
1679
1717
|
// Some models reject trailing assistant messages ("prefill not supported"),
|
|
1680
1718
|
// and after context compression a stale assistant turn can end up last.
|
|
@@ -1723,7 +1761,7 @@ export class Agent {
|
|
|
1723
1761
|
cacheTtl: this.cacheTtl,
|
|
1724
1762
|
...(this.prefillUserMessage && { prefillUserMessage: this.prefillUserMessage }),
|
|
1725
1763
|
...(this.providerParams && { providerParams: this.providerParams }),
|
|
1726
|
-
assistantParticipant: this.
|
|
1764
|
+
assistantParticipant: this.presentAs,
|
|
1727
1765
|
};
|
|
1728
1766
|
}
|
|
1729
1767
|
/**
|
|
@@ -1808,7 +1846,7 @@ export class Agent {
|
|
|
1808
1846
|
const stored = cm.getAllMessages();
|
|
1809
1847
|
if (this.requestOnlyIndex?.source === stored)
|
|
1810
1848
|
return this.requestOnlyIndex.index;
|
|
1811
|
-
const index = indexRequestOnlyRows(stored, this.
|
|
1849
|
+
const index = indexRequestOnlyRows(stored, this.ownParticipants);
|
|
1812
1850
|
this.requestOnlyIndex = { source: stored, index };
|
|
1813
1851
|
return index;
|
|
1814
1852
|
}
|
|
@@ -2109,7 +2147,9 @@ export class Agent {
|
|
|
2109
2147
|
if (systemInjections.length === 0) {
|
|
2110
2148
|
return this.systemPrompt;
|
|
2111
2149
|
}
|
|
2112
|
-
const injectedText = systemInjections.map((block) => block.type === 'text'
|
|
2150
|
+
const injectedText = systemInjections.map((block) => block.type === 'text'
|
|
2151
|
+
? block.text
|
|
2152
|
+
: `[${NOTICE_TAG.blockNotShown}: ${/^[aeiou]/i.test(block.type) ? 'an' : 'a'} ${block.type} block; the system prompt carries text only.]`);
|
|
2113
2153
|
return this.systemPrompt + '\n' + injectedText.join('\n');
|
|
2114
2154
|
}
|
|
2115
2155
|
abortInference(reason) {
|