@bastani/atomic 0.9.16-alpha.9 → 0.9.16
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/CHANGELOG.md +120 -0
- package/README.md +4 -4
- package/dist/builtin/intercom/CHANGELOG.md +42 -0
- package/dist/builtin/intercom/README.md +18 -17
- package/dist/builtin/intercom/broker/broker.ts +43 -18
- package/dist/builtin/intercom/broker/client.ts +138 -7
- package/dist/builtin/intercom/broker/group-isolation.ts +3 -3
- package/dist/builtin/intercom/broker/group-membership.ts +55 -0
- package/dist/builtin/intercom/broker/presence-handler.ts +62 -50
- package/dist/builtin/intercom/broker/send-handler.ts +2 -3
- package/dist/builtin/intercom/group.ts +40 -0
- package/dist/builtin/intercom/index.bundle.mjs +490 -183
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/skills/intercom/SKILL.md +16 -10
- package/dist/builtin/intercom/types.ts +24 -2
- package/dist/builtin/mcp/index.bundle.mjs +202 -52
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +51 -0
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
- package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
- package/dist/builtin/subagents/agents/debugger.md +1 -1
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +422 -140
- package/dist/builtin/web-access/index.bundle.mjs +202 -52
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +70 -0
- package/dist/builtin/workflows/README.md +2 -2
- package/dist/builtin/workflows/builtin/{chunk-h5e65g7g.js → chunk-3y1hmzw6.js} +36 -6
- package/dist/builtin/workflows/builtin/{chunk-nqr34qp3.js → chunk-6rbajjf5.js} +7 -1
- package/dist/builtin/workflows/builtin/{chunk-qe6bfpbd.js → chunk-bz1c9732.js} +15 -3
- package/dist/builtin/workflows/builtin/{chunk-8v8wmb7z.js → chunk-dattsgxg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-17zk6ffd.js → chunk-gdx0avpx.js} +355 -67
- package/dist/builtin/workflows/builtin/{chunk-rbnj9621.js → chunk-w9c7rkrk.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +5 -5
- package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +531 -143
- package/dist/builtin/workflows/src/index.js +212 -72
- package/dist/cli/args.js +6 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/session-picker.d.ts +2 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +3 -2
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +2 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -0
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +3 -6
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +3 -1
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +7 -5
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +37 -23
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +9 -2
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/builtin-packages.d.ts +4 -0
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +22 -1
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/callback-activity.d.ts.map +1 -1
- package/dist/core/callback-activity.js +6 -3
- package/dist/core/callback-activity.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts +1 -0
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +11 -1
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner-registries.d.ts.map +1 -1
- package/dist/core/extensions/runner-registries.js +9 -4
- package/dist/core/extensions/runner-registries.js.map +1 -1
- package/dist/core/extensions/runner-shortcuts.d.ts.map +1 -1
- package/dist/core/extensions/runner-shortcuts.js +1 -0
- package/dist/core/extensions/runner-shortcuts.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mandatory-resource-loader.d.ts +6 -0
- package/dist/core/mandatory-resource-loader.d.ts.map +1 -0
- package/dist/core/mandatory-resource-loader.js +94 -0
- package/dist/core/mandatory-resource-loader.js.map +1 -0
- package/dist/core/mandatory-runtime-tools.d.ts +10 -0
- package/dist/core/mandatory-runtime-tools.d.ts.map +1 -0
- package/dist/core/mandatory-runtime-tools.js +31 -0
- package/dist/core/mandatory-runtime-tools.js.map +1 -0
- package/dist/core/model-resolver-defaults.js +1 -1
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +24 -13
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +4 -1
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +22 -0
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +4 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +3 -2
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +2 -2
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +2 -1
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +1 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +3 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +15 -1
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +6 -1
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +3 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +7 -12
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +1 -0
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +16 -0
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +2 -0
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/docs/compaction.md +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +1 -1
- package/docs/intercom.md +29 -24
- package/docs/keybindings.md +5 -2
- package/docs/packages.md +1 -1
- package/docs/providers.md +2 -2
- package/docs/sdk.md +9 -7
- package/docs/settings.md +9 -3
- package/docs/subagents.md +2 -2
- package/docs/usage.md +7 -6
- package/docs/workflows.md +11 -7
- package/npm-shrinkwrap.json +59 -77
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.16
|
|
3
|
+
"version": "0.9.16",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
|
|
6
6
|
"contributors": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@bastani/atomic": "*",
|
|
47
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
47
|
+
"@earendil-works/pi-tui": "^0.84.4"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@bastani/atomic": {
|
|
@@ -81,6 +81,8 @@ Live sessions accept an exact full session ID or exact case-insensitive name. Or
|
|
|
81
81
|
|
|
82
82
|
Send material updates through Intercom to every affected workflow stage, including stages that have not started. Atomic queues messages for known pending stages and delivers them when their sessions initialize:
|
|
83
83
|
|
|
84
|
+
Before steering a stage, join its invocation group. Use the Intercom `groups` action to discover it. Workflow invocation groups are named `workflow:<rootRunId>`.
|
|
85
|
+
|
|
84
86
|
```typescript
|
|
85
87
|
intercom({
|
|
86
88
|
action: "send",
|
|
@@ -94,18 +96,21 @@ The stage receives the ordinary inbound Intercom message before its first model
|
|
|
94
96
|
|
|
95
97
|
### Runtime named groups
|
|
96
98
|
|
|
97
|
-
Plain chat sessions can
|
|
99
|
+
Plain chat sessions can add and remove group memberships without restarting:
|
|
98
100
|
|
|
99
101
|
```typescript
|
|
100
|
-
//
|
|
102
|
+
// Add a membership. Existing memberships remain active.
|
|
101
103
|
intercom({ action: "join", group: "api-review" })
|
|
102
|
-
intercom({ action: "list" }) // now shows only peers in api-review
|
|
103
104
|
|
|
104
|
-
//
|
|
105
|
+
// Discover every available group and see membership markers.
|
|
106
|
+
intercom({ action: "groups" })
|
|
107
|
+
|
|
108
|
+
// Remove one membership, or reset to home by omitting group.
|
|
109
|
+
intercom({ action: "leave", group: "api-review" })
|
|
105
110
|
intercom({ action: "leave" })
|
|
106
111
|
```
|
|
107
112
|
|
|
108
|
-
|
|
113
|
+
`list` still lists sessions: without a filter it returns every peer sharing at least one membership. `default` remains shared, while `true` and `auto` remain reserved. Later subagents inherit the most recently joined membership. Ordinary `send`/`ask` requires a shared membership; only authorized `contact_supervisor` traffic crosses group boundaries.
|
|
109
114
|
|
|
110
115
|
### Pattern 3: Reply Naturally
|
|
111
116
|
|
|
@@ -243,14 +248,15 @@ In Atomic workflows, each invocation has its own Intercom group, and parallel st
|
|
|
243
248
|
|
|
244
249
|
| Action | Behavior | Use When |
|
|
245
250
|
|--------|----------|----------|
|
|
246
|
-
| `join` |
|
|
247
|
-
| `leave` |
|
|
251
|
+
| `join` | Adds or creates a named membership in place | Sessions need another shared routing group |
|
|
252
|
+
| `leave` | Removes one named membership, or resets to home when omitted | Stop sharing one group or restore startup membership |
|
|
253
|
+
| `groups` | Lists every available group with counts and membership markers | Discover a group instead of guessing its name |
|
|
248
254
|
| `send` | Fire-and-forget to a live session, or durable `queued` delivery to `<runId>:<stageKey>` before a workflow stage starts | You don't need a response |
|
|
249
255
|
| `ask` | Blocks until a live recipient replies (10 min timeout); refused for an unstarted stage | You need an answer to continue |
|
|
250
256
|
| `reply` | Responds to the active or pending inbound ask; `to` accepts an exact full session ID or exact session name | You were asked something and need to answer naturally |
|
|
251
257
|
| `pending` | Lists unresolved inbound asks | You need to see who is waiting before replying |
|
|
252
|
-
| `list` | Returns all sessions
|
|
253
|
-
| `status` | Returns
|
|
258
|
+
| `list` | Returns all sessions sharing any membership, with full IDs and live status | Discover targets or choose an idle peer |
|
|
259
|
+
| `status` | Returns connection state and every current membership | Troubleshooting |
|
|
254
260
|
|
|
255
261
|
Inside workflows, `ask` may target a sibling stage that has already completed. If that stage retains a valid conversation, Atomic automatically schedules a post-mortem turn there and preserves the exact child-to-child reply thread; do not send a separate workflow follow-up. Missing, deleted, non-resumable, or failed-to-reopen completed targets return an actionable error. A parent or unrelated session cannot satisfy the pending ask.
|
|
256
262
|
|
|
@@ -471,7 +477,7 @@ if (!result.delivered) {
|
|
|
471
477
|
|
|
472
478
|
### Session not appearing in list
|
|
473
479
|
|
|
474
|
-
1. Check
|
|
480
|
+
1. Check Intercom connection status: `intercom({ action: "status" })`
|
|
475
481
|
2. Verify the target session has loaded pi-intercom
|
|
476
482
|
3. Ensure both sessions are on the same machine (intercom is same-machine only)
|
|
477
483
|
|
|
@@ -7,10 +7,18 @@ export interface SessionInfo {
|
|
|
7
7
|
startedAt: number;
|
|
8
8
|
lastActivity: number;
|
|
9
9
|
status?: string;
|
|
10
|
-
/** Session's intercom group
|
|
10
|
+
/** Session's normalized intercom group memberships. */
|
|
11
|
+
groups?: string[];
|
|
12
|
+
/** Legacy single-group membership; accepted alongside `groups` for compatibility. */
|
|
11
13
|
group?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
export interface GroupSummary {
|
|
17
|
+
group: string;
|
|
18
|
+
sessionCount: number;
|
|
19
|
+
member: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
export interface Message {
|
|
15
23
|
id: string;
|
|
16
24
|
timestamp: number;
|
|
@@ -53,6 +61,9 @@ export type ClientMessage =
|
|
|
53
61
|
}
|
|
54
62
|
| { type: "unregister" }
|
|
55
63
|
| { type: "list"; requestId: string; group?: string }
|
|
64
|
+
| { type: "list_groups"; requestId: string }
|
|
65
|
+
| { type: "join_group"; requestId: string; group: string }
|
|
66
|
+
| { type: "leave_group"; requestId: string; group?: string }
|
|
56
67
|
| { type: "authorize_supervisor"; requestId: string; childName: string; capability?: string }
|
|
57
68
|
| { type: "send" | "supervisor_send"; to: string; message: Message; attemptId?: string }
|
|
58
69
|
| {
|
|
@@ -82,12 +93,23 @@ export type ClientMessage =
|
|
|
82
93
|
reason?: string;
|
|
83
94
|
reasonCode?: "message_id_conflict";
|
|
84
95
|
}
|
|
85
|
-
| {
|
|
96
|
+
| {
|
|
97
|
+
type: "presence";
|
|
98
|
+
name?: string;
|
|
99
|
+
status?: string;
|
|
100
|
+
model?: string;
|
|
101
|
+
groups?: string[];
|
|
102
|
+
/** Legacy single-group membership; accepted alongside `groups` for compatibility. */
|
|
103
|
+
group?: string;
|
|
104
|
+
requestId?: string;
|
|
105
|
+
};
|
|
86
106
|
|
|
87
107
|
export type BrokerMessage =
|
|
88
108
|
| { type: "registered"; sessionId: string; supervisorSessionId?: string }
|
|
89
109
|
| { type: "registration_failed"; reason: string }
|
|
90
110
|
| { type: "sessions"; requestId: string; sessions: SessionInfo[] }
|
|
111
|
+
| { type: "groups"; requestId: string; groups: GroupSummary[] }
|
|
112
|
+
| { type: "membership_ack"; requestId: string; groups: string[] }
|
|
91
113
|
| { type: "supervisor_authorized"; requestId: string; capability: string; supervisorSessionId: string; childName: string }
|
|
92
114
|
| { type: "message"; from: SessionInfo; message: Message; channel?: "supervisor" }
|
|
93
115
|
| { type: "pending_stage_notification"; requestId: string; from: SessionInfo; message: Message }
|