@bastani/atomic 0.9.86-alpha.1 → 0.9.87-alpha.1
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 +26 -0
- package/dist/builtin/intercom/CHANGELOG.md +29 -0
- package/dist/builtin/intercom/broker/away-asks.ts +56 -3
- package/dist/builtin/intercom/broker/broker.ts +13 -2
- package/dist/builtin/intercom/broker/pending-question-index.ts +25 -1
- package/dist/builtin/intercom/broker/released-asker-replies.ts +23 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +20 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.87-alpha.1] - 2026-11-14
|
|
6
|
+
|
|
7
|
+
Asks from released subagents no longer vanish when their recipient comes and goes.
|
|
8
|
+
|
|
9
|
+
- **Reliable failed-ask notices for released subagents.** When a released subagent's ask goes to a session that leaves, returns and then ends, the subagent now gets one "Your ask <id> to <name> failed" message instead of losing the ask silently, also after a broker restart, and `pending` stops listing it ([#4765](https://github.com/bastani-inc/atomic/issues/4765), [#4767](https://github.com/bastani-inc/atomic/pull/4767)).
|
|
10
|
+
|
|
11
|
+
## [0.9.86] - 2026-11-14
|
|
12
|
+
|
|
13
|
+
Intercom asks stop blocking, partial restores keep more of your checkout, and subagent chats get autocomplete.
|
|
14
|
+
|
|
15
|
+
- **Non-blocking Intercom asks.** `ask` returns once the question is delivered and waits for the reply like `bash` waits for a command. A late reply arrives as a message, so the asking session keeps working, and an ask whose recipient ends while the asker is closed now fails visibly instead of staying pending ([#4751](https://github.com/bastani-inc/atomic/issues/4751), [#4758](https://github.com/bastani-inc/atomic/pull/4758), [#4761](https://github.com/bastani-inc/atomic/issues/4761), [#4764](https://github.com/bastani-inc/atomic/pull/4764)).
|
|
16
|
+
- **Fuller degraded restores.** A partial resume restore keeps worktrees that a checkout filter changes, searches every earlier snapshot for the closest commit, and shows its notice after `/resume` and `/import` too. Workflow runs and worker hosts can reuse the same restore through `restoreBestWorktree` and `withWorktreeRestoreNotices` ([#4744](https://github.com/bastani-inc/atomic/issues/4744), [#4747](https://github.com/bastani-inc/atomic/pull/4747), [#4738](https://github.com/bastani-inc/atomic/issues/4738), [#4750](https://github.com/bastani-inc/atomic/pull/4750)).
|
|
17
|
+
- **Autocomplete in subagent chats.** A subagent's chat opened from `/tasks` completes `/tasks`, its own `/skill:` commands, `@` file mentions and Tab paths in its working directory ([#4755](https://github.com/bastani-inc/atomic/issues/4755), [#4757](https://github.com/bastani-inc/atomic/pull/4757)).
|
|
18
|
+
- **Faster, safer credential stripping.** Checking a snapshot's remote URL for credentials is now linear, so a crafted long remote can no longer stall resume, and credentials containing `@` are stripped completely ([#4749](https://github.com/bastani-inc/atomic/pull/4749)).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Intercom `ask` no longer blocks the asking session: it returns at delivery, and a reply that misses its `wait` (the same options as `bash`) arrives later as a message. Extensions can read the automatic wait budget an owner gives a command with `automaticWaitBudgetMs` and `AgentTaskHost.commandWaitBudgetMs` ([#4751](https://github.com/bastani-inc/atomic/issues/4751))
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Fixed checking a worktree snapshot's remote URL for credentials taking quadratic time, so a crafted record with a very long remote could stall resume for seconds or minutes. The check is now linear, and it also strips credentials that contain `@` completely ([#4749](https://github.com/bastani-inc/atomic/pull/4749))
|
|
27
|
+
- Fixed a degraded resume restore that was more limited than this machine allowed ([#4744](https://github.com/bastani-inc/atomic/issues/4744)). A partial restore whose files a checkout filter changes now keeps its worktree and names the files that differ, whatever started the partial restore; before, a missing change set or bundle combined with such a filter left the checkout out entirely. The closest-commit search now tries the commit of every earlier snapshot of the checkout, nearest first, before the branch tip, instead of only the three nearest. The notice's list of missing commits leaves out commits the restored history already holds. A checkout whose snapshot record the session lacks now gets its notice after `/resume` and `/import` in the TUI too, not only at startup.
|
|
28
|
+
- Fixed a subagent's chat, opened from `/tasks`, having no autocomplete. Its prompt now offers `/tasks` and the subagent's own `/skill:` commands, and completes `@` file mentions and Tab paths in the subagent's working directory, from the same completion the workflow stage chat uses. A skill command typed there reaches the subagent expanded from its own skills ([#4755](https://github.com/bastani-inc/atomic/issues/4755))
|
|
29
|
+
- Fixed workflow runs and worker hosts having no way to reuse a session resume's degraded restore: `restoreBestWorktree(snapshot, options)` restores a snapshot exactly, else as well as this host can, else reports that nothing could be restored. `withWorktreeRestoreNotices(notices, work)` tells every session opened in `work` which checkouts were restored only in part, in a `worktree_restore` system prompt section, and `formatDegradedRestoreNotice` and `formatUnrestoredNotice` take an optional `"workflow run"` owner for their wording ([#4738](https://github.com/bastani-inc/atomic/issues/4738))
|
|
30
|
+
|
|
5
31
|
## [0.9.86-alpha.1] - 2026-11-14
|
|
6
32
|
|
|
7
33
|
Intercom asks stop blocking, and partial restores keep more of your checkout.
|
|
@@ -4,6 +4,35 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.87-alpha.1] - 2026-11-14
|
|
8
|
+
|
|
9
|
+
Asks from released subagents no longer vanish when their recipient comes and goes.
|
|
10
|
+
|
|
11
|
+
- **Reliable failed-ask notices for released subagents.** When a released subagent's ask goes to a session that leaves, returns and then ends, the subagent now gets one "Your ask <id> to <name> failed" message instead of losing the ask silently, also after a broker restart, and `pending` stops listing it ([#4765](https://github.com/bastani-inc/atomic/issues/4765), [#4767](https://github.com/bastani-inc/atomic/pull/4767)).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed an Intercom ask from a released subagent that was dropped with no failed-ask message when its recipient went away before the subagent was released, then came back and ended. The broker now puts that ask on the owner's route for the released subagent, as it does for an ask whose recipient is still connected, so the owner wakes the subagent with one "Your ask <id> to <name> failed" message and `pending` no longer lists it. The ask also stays saved under the subagent's own session, so after a broker restart, or when the subagent reconnects without being released, the subagent still gets the failure once. A workflow stage released between turns already got its failure in this order; a test now covers it ([#4765](https://github.com/bastani-inc/atomic/issues/4765), [#4767](https://github.com/bastani-inc/atomic/pull/4767))
|
|
16
|
+
|
|
17
|
+
## [0.9.86] - 2026-11-14
|
|
18
|
+
|
|
19
|
+
Intercom asks stop blocking, and one send can reach many sessions.
|
|
20
|
+
|
|
21
|
+
- **Non-blocking asks.** `ask` returns at delivery with the recipient's state, waits like `bash` does, and delivers a late reply, refusal or ended recipient as a message. Asks no longer expire, survive restarts on either side, can be listed and cancelled, and no longer stay pending forever when the recipient ends while the asker is closed ([#4751](https://github.com/bastani-inc/atomic/issues/4751), [#4760](https://github.com/bastani-inc/atomic/issues/4760), [#4758](https://github.com/bastani-inc/atomic/pull/4758), [#4761](https://github.com/bastani-inc/atomic/issues/4761), [#4764](https://github.com/bastani-inc/atomic/pull/4764)).
|
|
22
|
+
- **Send to many at once.** Name patterns such as `subagent-*` and the `subagents:*` target reach every matching session in your groups in one call, with a per-recipient result ([#4752](https://github.com/bastani-inc/atomic/issues/4752), [#4756](https://github.com/bastani-inc/atomic/pull/4756)).
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- Added name patterns and a children target to Intercom `send`: `subagent-worker-*`, `subagent-*` or `*` reaches every matching live session visible in your groups except you, and `subagents:*` (or `subagents:<runId>/*` for one run) reaches every running, released or paused subagent this session launched, foreground or background. Each recipient gets its own direct send with the usual refusals, receipts and retries, and the result lists every recipient's outcome. A glob that matches nothing is an error listing the closest names, patterns never reach outside your groups, and `ask` still needs one exact target. Workflow-stage paths are unchanged ([#4752](https://github.com/bastani-inc/atomic/issues/4752))
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- `intercom` `ask` no longer blocks the asker. It returns once the question is delivered, with an ask ID and whether the recipient is idle or busy (and what it is running). It waits for the reply like `bash` waits for a command: up to the automatic yield (10 seconds by default), up to `wait: { kind: "foreground", budgetMs }`, or not at all with `wait: { kind: "background" }`. A reply that misses the wait arrives later as a message starting "Reply to your ask <id> from <name>" with the question quoted; it starts a turn when the asker is idle and arrives after the current tool call when it is busy. A refusal, or a recipient session that ends, arrives the same way as a failed-ask message. Asks no longer expire after 10 minutes. `pending` also lists your own pending asks, the new `cancel` action cancels one (a later reply is shown once, marked late), and restarting the asker or the recipient keeps the ask, with its reply delivered once. A reply to a background subagent or workflow stage that was released after asking wakes it, or waits until the stage reopens, and is shown once. A reply to a closed asker is held and delivered once when it resumes (the recipient sees "delivered (held for …)"), also with multi-node routing, and a recipient that ends or finishes while its asker is away (closed or released) comes back as a failed-ask message ([#4751](https://github.com/bastani-inc/atomic/issues/4751), [#4760](https://github.com/bastani-inc/atomic/issues/4760))
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Fixed an Intercom ask that stayed pending forever, with no failed-ask message, when its recipient went away before its asker closed and then came back and ended while the asker was still closed. The broker now keeps the asker's return address on that ask when the asker closes, so the resumed asker gets one "Your ask <id> to <name> failed" message and `pending` no longer lists it, also when the asker resumed and closed again before the recipient ended ([#4761](https://github.com/bastani-inc/atomic/issues/4761))
|
|
35
|
+
|
|
7
36
|
## [0.9.86-alpha.1] - 2026-11-14
|
|
8
37
|
|
|
9
38
|
Intercom asks stop blocking, and one send can reach many sessions.
|
|
@@ -98,6 +98,41 @@ export class AwayAsks {
|
|
|
98
98
|
this.purge();
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* #4761: the asker `senderSessionId` is away now too. Its questions kept while only their recipient was away, which
|
|
103
|
+
* have no asker identity yet, take its return address, so a recipient that ends before the asker is back fails them
|
|
104
|
+
* with a message held for the asker rather than dropping them.
|
|
105
|
+
*/
|
|
106
|
+
markAsker(senderSessionId: string, senderReturnAddress: string | undefined): void {
|
|
107
|
+
if (senderReturnAddress === undefined || senderReturnAddress === "") return;
|
|
108
|
+
this.statement(
|
|
109
|
+
"UPDATE away_questions SET sender_return_address = ? WHERE sender_session_id = ? AND sender_return_address = ''",
|
|
110
|
+
).run(senderReturnAddress, senderSessionId);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* #4765: the questions the released subagent `senderSessionId` asked that are kept while their recipient is away. They
|
|
115
|
+
* stay here too, so the ask survives a broker restart and a subagent back under its own id.
|
|
116
|
+
*/
|
|
117
|
+
forReleasedAsker(senderSessionId: string): PendingQuestion[] {
|
|
118
|
+
return this.statement(
|
|
119
|
+
"SELECT message_id, target_session_id FROM away_questions WHERE sender_session_id = ? ORDER BY kept_at",
|
|
120
|
+
)
|
|
121
|
+
.all(senderSessionId)
|
|
122
|
+
.map((row) => ({
|
|
123
|
+
messageId: String(row.message_id),
|
|
124
|
+
senderSessionId,
|
|
125
|
+
targetSessionId: String(row.target_session_id),
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** The kept question was answered some other way: it no longer waits here. */
|
|
130
|
+
forget(question: PendingQuestion): void {
|
|
131
|
+
this.statement(
|
|
132
|
+
"DELETE FROM away_questions WHERE message_id = ? AND sender_session_id = ? AND target_session_id = ?",
|
|
133
|
+
).run(question.messageId, question.senderSessionId, question.targetSessionId);
|
|
134
|
+
}
|
|
135
|
+
|
|
101
136
|
/** The kept question `questionId` that `replierSessionId` answers, if its asker is away. */
|
|
102
137
|
question(
|
|
103
138
|
questionId: string,
|
|
@@ -126,11 +161,14 @@ export class AwayAsks {
|
|
|
126
161
|
// registered with now; a recipient's come back to the id it is asked under.
|
|
127
162
|
const proven = returnAddress ?? "";
|
|
128
163
|
const rows = this.statement(
|
|
129
|
-
"SELECT message_id, sender_session_id, target_session_id, sender_return_address FROM away_questions WHERE (sender_return_address <> '' AND sender_return_address = ?) OR (sender_return_address = '' AND sender_session_id = ?) OR target_session_id = ? ORDER BY kept_at",
|
|
164
|
+
"SELECT message_id, sender_session_id, target_session_id, sender_return_address, kept_at FROM away_questions WHERE (sender_return_address <> '' AND sender_return_address = ?) OR (sender_return_address = '' AND sender_session_id = ?) OR target_session_id = ? ORDER BY kept_at",
|
|
130
165
|
).all(proven, sessionId, sessionId);
|
|
131
166
|
const remove = this.statement(
|
|
132
167
|
"DELETE FROM away_questions WHERE message_id = ? AND sender_session_id = ? AND target_session_id = ?",
|
|
133
168
|
);
|
|
169
|
+
const rebind = this.statement(
|
|
170
|
+
"INSERT OR REPLACE INTO away_questions (message_id, sender_session_id, target_session_id, sender_return_address, kept_at) VALUES (?, ?, ?, ?, ?)",
|
|
171
|
+
);
|
|
134
172
|
const restored: PendingQuestion[] = [];
|
|
135
173
|
for (const row of rows) {
|
|
136
174
|
const kept = {
|
|
@@ -140,7 +178,15 @@ export class AwayAsks {
|
|
|
140
178
|
};
|
|
141
179
|
const askerBack = proven !== "" && row.sender_return_address === proven;
|
|
142
180
|
const question = askerBack ? { ...kept, senderSessionId: sessionId } : kept;
|
|
143
|
-
if (!isConnected(question.senderSessionId) || !isConnected(question.targetSessionId))
|
|
181
|
+
if (!isConnected(question.senderSessionId) || !isConnected(question.targetSessionId)) {
|
|
182
|
+
// #4765: an asker back under a new id while its recipient is still away keeps the question under that id, so
|
|
183
|
+
// the recipient's answer to it clears the question and its later end does not fail it again.
|
|
184
|
+
if (question.senderSessionId !== kept.senderSessionId) {
|
|
185
|
+
remove.run(kept.messageId, kept.senderSessionId, kept.targetSessionId);
|
|
186
|
+
rebind.run(question.messageId, question.senderSessionId, question.targetSessionId, proven, Number(row.kept_at));
|
|
187
|
+
}
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
144
190
|
remove.run(kept.messageId, kept.senderSessionId, kept.targetSessionId);
|
|
145
191
|
restored.push(question);
|
|
146
192
|
}
|
|
@@ -151,7 +197,12 @@ export class AwayAsks {
|
|
|
151
197
|
* The recipient `target` ended, or can no longer answer: each kept question to it becomes a failed-ask message held
|
|
152
198
|
* for its away asker. Returns the questions failed.
|
|
153
199
|
*/
|
|
154
|
-
failForTarget(
|
|
200
|
+
failForTarget(
|
|
201
|
+
target: SessionInfo,
|
|
202
|
+
reason: string,
|
|
203
|
+
idPrefix: string,
|
|
204
|
+
failedElsewhere: (question: PendingQuestion) => boolean,
|
|
205
|
+
): PendingQuestion[] {
|
|
155
206
|
const rows = this.statement(
|
|
156
207
|
"SELECT message_id, sender_session_id, sender_return_address FROM away_questions WHERE target_session_id = ? ORDER BY kept_at",
|
|
157
208
|
).all(target.id);
|
|
@@ -165,6 +216,8 @@ export class AwayAsks {
|
|
|
165
216
|
const returnAddress = typeof row.sender_return_address === "string" ? row.sender_return_address : "";
|
|
166
217
|
// A recipient's own asks to an away session keep no asker identity: only an away asker learns of the end.
|
|
167
218
|
if (returnAddress === "") continue;
|
|
219
|
+
// #4765: a released subagent's owner is handed this failure on its own route, which wakes the subagent.
|
|
220
|
+
if (failedElsewhere(question)) continue;
|
|
168
221
|
failed.push(question);
|
|
169
222
|
this.hold({ ...question, senderReturnAddress: returnAddress }, target, {
|
|
170
223
|
// Unguessable, so no other session can name it.
|
|
@@ -438,6 +438,7 @@ class IntercomBroker {
|
|
|
438
438
|
mkdirSync(INTERCOM_DIR, { recursive: true, mode: 0o700 });
|
|
439
439
|
if (process.platform !== "win32") chmodSync(INTERCOM_DIR, 0o700);
|
|
440
440
|
this.server = net.createServer(this.handleConnection.bind(this));
|
|
441
|
+
this.pendingQuestions.failThroughOwnerWhen((question) => this.releasedAskerReplies.hasOwnedRoute(question));
|
|
441
442
|
}
|
|
442
443
|
|
|
443
444
|
/**
|
|
@@ -2710,6 +2711,11 @@ class IntercomBroker {
|
|
|
2710
2711
|
});
|
|
2711
2712
|
return true;
|
|
2712
2713
|
}
|
|
2714
|
+
this.pendingQuestions.forgetDormant({
|
|
2715
|
+
messageId: route.questionId,
|
|
2716
|
+
senderSessionId: route.askerSessionId,
|
|
2717
|
+
targetSessionId: route.replierSessionId,
|
|
2718
|
+
});
|
|
2713
2719
|
this.handOffReleasedReply(route, from.info, message, socket, attemptId);
|
|
2714
2720
|
return true;
|
|
2715
2721
|
};
|
|
@@ -3230,15 +3236,20 @@ class IntercomBroker {
|
|
|
3230
3236
|
this.failParkedQuestions(this.pendingQuestions.takeParkedForOwner(sessionId));
|
|
3231
3237
|
|
|
3232
3238
|
const unanswered = this.pendingQuestions.takeForSender(sessionId);
|
|
3233
|
-
if (
|
|
3239
|
+
if (departed.supervisorId !== undefined && departed.registrationName !== undefined) {
|
|
3240
|
+
// #4765: an ask kept while its recipient was away waits on the owner's route too, so the recipient's later end
|
|
3241
|
+
// fails it through the owner, which wakes the subagent. It stays kept under the subagent's own return address as
|
|
3242
|
+
// well, so a broker restart or a subagent back without its owner still gets the failure, held for it alone.
|
|
3234
3243
|
this.releasedAskerReplies.keep(
|
|
3235
3244
|
{ sessionId, childName: departed.registrationName },
|
|
3236
|
-
unanswered,
|
|
3245
|
+
[...unanswered, ...this.pendingQuestions.dormantForReleasedAsker(sessionId)],
|
|
3237
3246
|
this.restoringRecipients.releasedOwner(departed.registrationName),
|
|
3238
3247
|
);
|
|
3248
|
+
this.pendingQuestions.markAwayAsker(sessionId, departed.registrationReturnAddress);
|
|
3239
3249
|
} else if (departed.supervisorId === undefined && !ended) {
|
|
3240
3250
|
// #4751: an ask has no expiry and survives its asker's restart or release: the route waits for the asker.
|
|
3241
3251
|
this.pendingQuestions.keepDormant(unanswered, departed.registrationReturnAddress);
|
|
3252
|
+
this.pendingQuestions.markAwayAsker(sessionId, departed.registrationReturnAddress);
|
|
3242
3253
|
}
|
|
3243
3254
|
this.releasedAskerReplies.dropOwner(sessionId);
|
|
3244
3255
|
for (const [messageId, pending] of [...this.releasedReplyAcks]) {
|
|
@@ -31,6 +31,21 @@ export class PendingQuestionIndex {
|
|
|
31
31
|
this.awayAsks().keep(questions, senderReturnAddress);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/** The asker is away now too: its questions kept for an away recipient wait for it under its return address (#4761). */
|
|
35
|
+
markAwayAsker(senderSessionId: string, senderReturnAddress: string | undefined): void {
|
|
36
|
+
this.away?.markAsker(senderSessionId, senderReturnAddress);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** A released subagent asker's questions kept for an away recipient: its owner's route waits on them too (#4765). */
|
|
40
|
+
dormantForReleasedAsker(senderSessionId: string): PendingQuestion[] {
|
|
41
|
+
return this.away?.forReleasedAsker(senderSessionId) ?? [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** A kept question answered through its released asker's owner no longer waits for its peers (#4765). */
|
|
45
|
+
forgetDormant(question: PendingQuestion): void {
|
|
46
|
+
this.away?.forget(question);
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/** Whether `replierSessionId` answers the kept question `questionId`, whose asker is away (#4751). */
|
|
35
50
|
hasDormantReply(questionId: string, replierSessionId: string): boolean {
|
|
36
51
|
return this.awayAsks().question(questionId, replierSessionId) !== undefined;
|
|
@@ -60,7 +75,14 @@ export class PendingQuestionIndex {
|
|
|
60
75
|
* message held until it is back (#4751).
|
|
61
76
|
*/
|
|
62
77
|
failDormantForTarget(target: SessionInfo, reason: string, idPrefix: string): void {
|
|
63
|
-
this.awayAsks().failForTarget(target, reason, idPrefix);
|
|
78
|
+
this.awayAsks().failForTarget(target, reason, idPrefix, this.failsThroughOwner);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private failsThroughOwner: (question: PendingQuestion) => boolean = () => false;
|
|
82
|
+
|
|
83
|
+
/** #4765: kept questions a released subagent's owner fails on its own route are not also held for the subagent. */
|
|
84
|
+
failThroughOwnerWhen(check: (question: PendingQuestion) => boolean): void {
|
|
85
|
+
this.failsThroughOwner = check;
|
|
64
86
|
}
|
|
65
87
|
|
|
66
88
|
/** The session ended for good: nothing waits for it any more. */
|
|
@@ -180,6 +202,8 @@ export class PendingQuestionIndex {
|
|
|
180
202
|
if (!routes || index < 0) return false;
|
|
181
203
|
routes.splice(index, 1);
|
|
182
204
|
if (routes.length === 0) this.questions.delete(replyTo);
|
|
205
|
+
// #4765: a released subagent's ask can be kept for its away recipient while it is live again; answered, it is not.
|
|
206
|
+
this.away?.forget({ messageId: replyTo, senderSessionId: targetSessionId, targetSessionId: senderSessionId });
|
|
183
207
|
return true;
|
|
184
208
|
}
|
|
185
209
|
|
|
@@ -70,6 +70,18 @@ export class ReleasedAskerReplies {
|
|
|
70
70
|
let kept = 0;
|
|
71
71
|
for (const question of questions) {
|
|
72
72
|
if (question.senderSessionId !== asker.sessionId) continue;
|
|
73
|
+
// #4765: an ask kept both live and for an away recipient, or kept again, has one route.
|
|
74
|
+
const existing = [...(this.byQuestion.get(question.messageId) ?? [])].find(
|
|
75
|
+
(entry) =>
|
|
76
|
+
entry.askerSessionId === question.senderSessionId && entry.replierSessionId === question.targetSessionId,
|
|
77
|
+
);
|
|
78
|
+
if (existing !== undefined) {
|
|
79
|
+
if (existing.ownerSessionId === undefined && ownerSessionId !== undefined) {
|
|
80
|
+
existing.ownerSessionId = ownerSessionId;
|
|
81
|
+
addTo(this.byOwner, ownerSessionId, existing);
|
|
82
|
+
}
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
73
85
|
if (this.entries.size >= this.maxRoutes) {
|
|
74
86
|
this.recordOverflow();
|
|
75
87
|
continue;
|
|
@@ -130,6 +142,17 @@ export class ReleasedAskerReplies {
|
|
|
130
142
|
return undefined;
|
|
131
143
|
}
|
|
132
144
|
|
|
145
|
+
/** #4765: whether an owner holds the route for this question, so the owner is handed its reply or failure. */
|
|
146
|
+
hasOwnedRoute(question: PendingQuestion): boolean {
|
|
147
|
+
this.expire();
|
|
148
|
+
return [...(this.byQuestion.get(question.messageId) ?? [])].some(
|
|
149
|
+
(entry) =>
|
|
150
|
+
entry.ownerSessionId !== undefined &&
|
|
151
|
+
entry.askerSessionId === question.senderSessionId &&
|
|
152
|
+
entry.replierSessionId === question.targetSessionId,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
133
156
|
/** A definitely refused handoff may be tried again; it keeps its original deadline. */
|
|
134
157
|
restore(route: ReleasedAskerReplyRoute, ownerSessionId: string | undefined): void {
|
|
135
158
|
this.expire();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87-alpha.1",
|
|
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": [
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.86] - 2026-11-14
|
|
6
|
+
|
|
7
|
+
Subagents are easier to reach and to talk to.
|
|
8
|
+
|
|
9
|
+
- **Message all your subagents at once.** The Intercom `subagents:*` and `subagents:<runId>/*` targets reach every running, released or paused subagent this session launched ([#4752](https://github.com/bastani-inc/atomic/issues/4752), [#4756](https://github.com/bastani-inc/atomic/pull/4756)).
|
|
10
|
+
- **Asks no longer block.** Subagents know an Intercom `ask` returns at delivery and its reply arrives later as a message ([#4751](https://github.com/bastani-inc/atomic/issues/4751), [#4758](https://github.com/bastani-inc/atomic/pull/4758)).
|
|
11
|
+
- **Autocomplete in subagent chats.** A subagent's chat completes `/tasks`, its own `/skill:` commands and `@` and Tab paths, even after it finished ([#4755](https://github.com/bastani-inc/atomic/issues/4755), [#4757](https://github.com/bastani-inc/atomic/pull/4757)).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added Intercom `subagents:*` and `subagents:<runId>/*` send targets, which message every running, released or paused subagent this session launched, or those of one run, in one call ([#4752](https://github.com/bastani-inc/atomic/issues/4752))
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Subagents are told that an Intercom `ask` to a peer or the supervisor no longer blocks: its reply arrives later as a message ([#4751](https://github.com/bastani-inc/atomic/issues/4751))
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Fixed a subagent's chat having no autocomplete: it now completes `/tasks`, the subagent's own `/skill:` commands and `@` and Tab paths in the subagent's working directory, including after the subagent finished ([#4755](https://github.com/bastani-inc/atomic/issues/4755))
|
|
24
|
+
|
|
5
25
|
## [0.9.86-alpha.1] - 2026-11-14
|
|
6
26
|
|
|
7
27
|
Subagents are easier to reach and to talk to.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.86] - 2026-11-14
|
|
10
|
+
|
|
11
|
+
Workflow runs always resume, and stage chats complete file mentions.
|
|
12
|
+
|
|
13
|
+
- **Resume never strands a run.** A run whose worktree snapshot cannot be restored exactly resumes from the closest state it can reach, tells its stages what is missing, and records the outcome for later resumes and forks ([#4738](https://github.com/bastani-inc/atomic/issues/4738), [#4750](https://github.com/bastani-inc/atomic/pull/4750)).
|
|
14
|
+
- **`@` mentions in stage chats.** Typing `@` completes paths in the stage's working directory, and subagents launched by a stage get the same completion ([#4755](https://github.com/bastani-inc/atomic/issues/4755), [#4757](https://github.com/bastani-inc/atomic/pull/4757)).
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Fixed workflow stage chats offering no `@` file-mention suggestions. Typing `@` now completes paths in the stage's working directory, as in the main chat. A subagent launched by a stage on a local worker gets the same completion in its chat, from its own working directory and skills ([#4755](https://github.com/bastani-inc/atomic/issues/4755))
|
|
19
|
+
- Fixed a workflow run's resume, and a pooled child's restore on a worker host, failing when a worktree snapshot could not be restored exactly. The run now always resumes: it restores the recorded commit with the change sets that apply, else the closest commit it can fetch, else continues without the checkout (in the directory it was resumed from when the recorded one is not on this machine), with one notice in the run's notices and on a `checkout:` line of `workflow status`. Its stages are told what is missing, and the outcome is recorded on the run (`worktreeRestoreOutcomes`), so a later resume or fork knows the checkout is partial. Missing Git no longer stops a resume. Only an unreadable run, `invalid-snapshot` and `unsafe-target` still refuse ([#4738](https://github.com/bastani-inc/atomic/issues/4738))
|
|
20
|
+
|
|
9
21
|
## [0.9.86-alpha.1] - 2026-11-14
|
|
10
22
|
|
|
11
23
|
Workflow runs always resume, and stage chats complete file mentions.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87-alpha.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bastani/atomic",
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.87-alpha.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bastani/atomic-natives": "0.9.
|
|
13
|
-
"@bastani/pi-ai": "0.9.
|
|
12
|
+
"@bastani/atomic-natives": "0.9.87-alpha.1",
|
|
13
|
+
"@bastani/pi-ai": "0.9.87-alpha.1",
|
|
14
14
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
15
15
|
"@earendil-works/pi-codemode": "1.5.2",
|
|
16
16
|
"@earendil-works/pi-tui": "1.5.2",
|
|
@@ -427,18 +427,18 @@
|
|
|
427
427
|
}
|
|
428
428
|
},
|
|
429
429
|
"node_modules/@bastani/atomic-natives": {
|
|
430
|
-
"version": "0.9.
|
|
431
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.
|
|
430
|
+
"version": "0.9.87-alpha.1",
|
|
431
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.87-alpha.1.tgz",
|
|
432
432
|
"license": "MIT",
|
|
433
433
|
"optionalDependencies": {
|
|
434
|
-
"@bastani/atomic-natives-darwin-arm64": "0.9.
|
|
435
|
-
"@bastani/atomic-natives-darwin-x64": "0.9.
|
|
436
|
-
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.
|
|
437
|
-
"@bastani/atomic-natives-linux-arm64-musl": "0.9.
|
|
438
|
-
"@bastani/atomic-natives-linux-x64-gnu": "0.9.
|
|
439
|
-
"@bastani/atomic-natives-linux-x64-musl": "0.9.
|
|
440
|
-
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.
|
|
441
|
-
"@bastani/atomic-natives-win32-x64-msvc": "0.9.
|
|
434
|
+
"@bastani/atomic-natives-darwin-arm64": "0.9.87-alpha.1",
|
|
435
|
+
"@bastani/atomic-natives-darwin-x64": "0.9.87-alpha.1",
|
|
436
|
+
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.87-alpha.1",
|
|
437
|
+
"@bastani/atomic-natives-linux-arm64-musl": "0.9.87-alpha.1",
|
|
438
|
+
"@bastani/atomic-natives-linux-x64-gnu": "0.9.87-alpha.1",
|
|
439
|
+
"@bastani/atomic-natives-linux-x64-musl": "0.9.87-alpha.1",
|
|
440
|
+
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.87-alpha.1",
|
|
441
|
+
"@bastani/atomic-natives-win32-x64-msvc": "0.9.87-alpha.1"
|
|
442
442
|
},
|
|
443
443
|
"engines": {
|
|
444
444
|
"bun": ">=1.4.2",
|
|
@@ -446,8 +446,8 @@
|
|
|
446
446
|
}
|
|
447
447
|
},
|
|
448
448
|
"node_modules/@bastani/atomic-natives-darwin-arm64": {
|
|
449
|
-
"version": "0.9.
|
|
450
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.
|
|
449
|
+
"version": "0.9.87-alpha.1",
|
|
450
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.87-alpha.1.tgz",
|
|
451
451
|
"license": "MIT",
|
|
452
452
|
"os": [
|
|
453
453
|
"darwin"
|
|
@@ -458,8 +458,8 @@
|
|
|
458
458
|
"optional": true
|
|
459
459
|
},
|
|
460
460
|
"node_modules/@bastani/atomic-natives-darwin-x64": {
|
|
461
|
-
"version": "0.9.
|
|
462
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.
|
|
461
|
+
"version": "0.9.87-alpha.1",
|
|
462
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.87-alpha.1.tgz",
|
|
463
463
|
"license": "MIT",
|
|
464
464
|
"os": [
|
|
465
465
|
"darwin"
|
|
@@ -470,8 +470,8 @@
|
|
|
470
470
|
"optional": true
|
|
471
471
|
},
|
|
472
472
|
"node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
|
|
473
|
-
"version": "0.9.
|
|
474
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.
|
|
473
|
+
"version": "0.9.87-alpha.1",
|
|
474
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.87-alpha.1.tgz",
|
|
475
475
|
"license": "MIT",
|
|
476
476
|
"os": [
|
|
477
477
|
"linux"
|
|
@@ -485,8 +485,8 @@
|
|
|
485
485
|
"optional": true
|
|
486
486
|
},
|
|
487
487
|
"node_modules/@bastani/atomic-natives-linux-arm64-musl": {
|
|
488
|
-
"version": "0.9.
|
|
489
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.
|
|
488
|
+
"version": "0.9.87-alpha.1",
|
|
489
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.87-alpha.1.tgz",
|
|
490
490
|
"license": "MIT",
|
|
491
491
|
"os": [
|
|
492
492
|
"linux"
|
|
@@ -500,8 +500,8 @@
|
|
|
500
500
|
"optional": true
|
|
501
501
|
},
|
|
502
502
|
"node_modules/@bastani/atomic-natives-linux-x64-gnu": {
|
|
503
|
-
"version": "0.9.
|
|
504
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.
|
|
503
|
+
"version": "0.9.87-alpha.1",
|
|
504
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.87-alpha.1.tgz",
|
|
505
505
|
"license": "MIT",
|
|
506
506
|
"os": [
|
|
507
507
|
"linux"
|
|
@@ -515,8 +515,8 @@
|
|
|
515
515
|
"optional": true
|
|
516
516
|
},
|
|
517
517
|
"node_modules/@bastani/atomic-natives-linux-x64-musl": {
|
|
518
|
-
"version": "0.9.
|
|
519
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.
|
|
518
|
+
"version": "0.9.87-alpha.1",
|
|
519
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.87-alpha.1.tgz",
|
|
520
520
|
"license": "MIT",
|
|
521
521
|
"os": [
|
|
522
522
|
"linux"
|
|
@@ -530,8 +530,8 @@
|
|
|
530
530
|
"optional": true
|
|
531
531
|
},
|
|
532
532
|
"node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
|
|
533
|
-
"version": "0.9.
|
|
534
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.
|
|
533
|
+
"version": "0.9.87-alpha.1",
|
|
534
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.87-alpha.1.tgz",
|
|
535
535
|
"license": "MIT",
|
|
536
536
|
"os": [
|
|
537
537
|
"win32"
|
|
@@ -542,8 +542,8 @@
|
|
|
542
542
|
"optional": true
|
|
543
543
|
},
|
|
544
544
|
"node_modules/@bastani/atomic-natives-win32-x64-msvc": {
|
|
545
|
-
"version": "0.9.
|
|
546
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.
|
|
545
|
+
"version": "0.9.87-alpha.1",
|
|
546
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.87-alpha.1.tgz",
|
|
547
547
|
"license": "MIT",
|
|
548
548
|
"os": [
|
|
549
549
|
"win32"
|
|
@@ -554,8 +554,8 @@
|
|
|
554
554
|
"optional": true
|
|
555
555
|
},
|
|
556
556
|
"node_modules/@bastani/pi-ai": {
|
|
557
|
-
"version": "0.9.
|
|
558
|
-
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.
|
|
557
|
+
"version": "0.9.87-alpha.1",
|
|
558
|
+
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.87-alpha.1.tgz",
|
|
559
559
|
"license": "MIT",
|
|
560
560
|
"dependencies": {
|
|
561
561
|
"@anthropic-ai/sdk": "0.129.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87-alpha.1",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@bastani/atomic-natives": "0.9.
|
|
93
|
-
"@bastani/pi-ai": "0.9.
|
|
92
|
+
"@bastani/atomic-natives": "0.9.87-alpha.1",
|
|
93
|
+
"@bastani/pi-ai": "0.9.87-alpha.1",
|
|
94
94
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
95
95
|
"@earendil-works/pi-codemode": "1.5.2",
|
|
96
96
|
"@earendil-works/pi-tui": "1.5.2",
|