Skip to content

feat(agents): manage plugin subscription sources through Attention - #1553

Draft
johnmatthewtennant wants to merge 55 commits into
jtennant/aaron/attention-deliveryfrom
jtennant/aaron/attention-monitor
Draft

johnmatthewtennant wants to merge 55 commits into
jtennant/aaron/attention-deliveryfrom
jtennant/aaron/attention-monitor

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

Plugins need to monitor external work while sharing Attention's existing task lifecycle. Without a source contribution, a plugin must keep its own registrations, execution loop and wake delivery.

What

Add agents.addAttentionSource({ id, run }) for deterministic plugin producers. A source subscription stores its provider and configuration under an Interest. Attention starts and cancels producers, queues their output and delivers to the subscription's optional conversation address. A completed producer or spent timer is removed after its final queued turn succeeds. Failed source deliveries retain their subscription and output. Instructions stay on the Interest; empty output starts no turn.

The separately installed Attention plugin supplies command and GitHub PR producers, configuration forms, its overview and legacy Monitor import. The built-in panel shows the provider and completion state. The host keeps source lifecycle, storage and delivery, plus device-local last-wake timestamps and a bounded source-output tail (40 lines, at most 16 KiB). Older subscriptions without history remain unknown.

Event watches also accept bounded, case-insensitive literal keywords. The external plugin offers one keyword or phrase per line instead of model-filter controls; existing classifier subscriptions retain their settings.

Plugins can obtain an authenticated loopback Buzz MCP connection with agents.connect(pubkey, { signal, channel?, root?, cwd? }), including for an agent running another harness. The app retains the key and uses its existing agent-backed tools. Cancellation, explicit close and plugin unload revoke the endpoint; agent and community lifetime checks reject stale calls. Plugin command execution retains its existing OS privileges.

Validation

In the service integration fixture, the registered producer first emitted whitespace, which started no turn. It then emitted done, and the runner received that output at the saved channel and thread. Resolving the producer preserved its queued delivery, then removed the completed subscription; recreating the service with the same storage did not run the producer or agent again. A held-turn regression verifies output and wake history remain visible until the final turn settles, and a failed-delivery regression verifies its output is retained. Both regressions failed before the change. The fixture uses a mocked harness, relay and native custody.

Two lifecycle regressions failed before their fixes and pass afterward: a rejected producer is not durably marked complete and retries after restart; plugin reactivation waits until the previous producer exits before starting its replacement. Codex and Pi core-memory loading and Goose standalone startup reject cancelled output before a model turn begins.

The external plugin's built artifact was exercised through Buzz's Blob loader for recipe creation, separate listening and delivery destinations, thread-root resolution, keyboard controls and deletion. Its browser fixture uses synthetic persistence.

Keyword regressions reject unrelated content while accepting case variants and literal punctuation. Tool integration preserves and clears the selector. The built external form saves keywords through the host validator and displays their literal matching behavior.

The agent-connection integration fixture runs a consumer plugin distinct from the agent type owner. Its direct handle remains unavailable, while its MCP read reaches native query with the agent pubkey and its memory write reaches native signing as that agent. Transport tests cover close, unload, cancellation during startup and late replies. A pending file-backed memory write is also gated while the connection closes, the plugin unloads, or its caller cancels: all three prevent the native memory write after the file read finishes. Close and unload allowed the write before the fix. These use mocked native custody and transport. A cross-repository fixture then ran the external command producer and a real Node child through Agents.connect, connectMcp, appClient and the MCP dispatcher. The child received its endpoint through environment variables, read as the agent, wrote mem/child-roundtrip as that agent, and emitted its result. An unauthenticated request was rejected, and the endpoint refused connections after the producer finished. This uses a real loopback HTTP listener in place of native transport; native signing/storage remain mocked.

Screenshots

The existing Attention panel displays a plugin-owned source beside an event watch.

Limits

Buffered output and accepted jobs are not durable delivery acknowledgements across app exit. Native platform acceptance and human testing remain outstanding. Source classification and generic provider discovery remain required before readiness. The command-plugin wiring and real child-process fixture are implemented and validated; publication of the external plugin is pending.

Plugin subscription source and conversation delivery

johnmatthewtennant and others added 6 commits October 22, 2026 12:48
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant johnmatthewtennant changed the title feat(agents): manage plugin monitors through Attention feat(agents): consolidate monitoring in Attention Oct 22, 2026
johnmatthewtennant and others added 15 commits October 22, 2026 13:33
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>

* origin/main:
  fix(channels): confirm a requested member when the relay stores bot (#1519)
  test(browser): settle dialog motion and startup errors before strict checks (#1492)
  perf(messages): measure read-tracking rows once per frame (#1527)
  fix(settings): keep the chosen plugin row in place when details open or close (#1551)
  fix(messages): polish reaction pills and mention badges (#1506)

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
… plugin

Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant johnmatthewtennant changed the title feat(agents): consolidate monitoring in Attention feat(agents): unify Attention subscription delivery for plugin sources Oct 23, 2026
johnmatthewtennant and others added 6 commits October 22, 2026 23:20
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant johnmatthewtennant changed the title feat(agents): unify Attention subscription delivery for plugin sources feat(agents): unify Attention tasks and delivery for plugin sources Oct 23, 2026
@johnmatthewtennant
johnmatthewtennant changed the base branch from main to jtennant/aaron/attention-delivery October 23, 2026 14:11
johnmatthewtennant and others added 18 commits October 23, 2026 10:37
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>

* jtennant/aaron/attention-delivery:
  fix(pi): preserve answers when reply cleanup fails
  fix(goose): retain admitted scope when rebuilding prompts
  fix(goose): show pending delivery policies as active

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>

* jtennant/aaron/attention-delivery:
  fix(goose): preserve accepted work past policy wait deadlines
  fix(goose): notify when the final posting policy settles

Signed-off-by: John Tennant <jtennant@block.xyz>
Preserve both service test groups and use Codex session schema v10 for the combined agent tools, Attention delivery and plugin sources.

Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
johnmatthewtennant and others added 5 commits October 23, 2026 16:59
Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Preserve source provider ids and load enabled plugins without a plugin-specific ban. Document the Janet configuration gaps and source completion behavior.

Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Hold recovered timer delivery until its occurrence is checked, then verify successful cleanup. Expect the shared Attention trigger for plugin-source output.

Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant
johnmatthewtennant force-pushed the jtennant/aaron/attention-monitor branch from 8e9ab70 to f11445f Compare October 23, 2026 21:03
johnmatthewtennant and others added 3 commits October 23, 2026 17:08
Reuse the existing classifier decisions, ordered reservations and outcome prompts for source subscriptions. Keep completed producers registered while classification settles and allow clearing source classifiers.

Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Catch completion persistence errors without rejecting the classifier sequencing promise. Preserve the completed subscription and allow later classified events to run after storage recovers.

Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Guard Attention reads and writes with the MCP connection lifetime and community check. Recheck queued writes before applying them and after asynchronous token calculation.

Co-authored-by: Gigi <65cc00ce5da00abcd27be4a87ad29d7ef8431766d769a24d94f004fb8fe07066@buzz.block.builderlab.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant