@bastani/atomic 0.9.26-alpha.3 → 0.9.26-alpha.4
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/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/broker/broker.ts +9 -1
- package/dist/builtin/intercom/index.bundle.mjs +11 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/types.ts +13 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +6 -0
- package/dist/builtin/workflows/builtin/{chunk-kfsnh3w7.js → chunk-73p2cm5s.js} +4 -2
- package/dist/builtin/workflows/builtin/{chunk-rqmasd3d.js → chunk-n95myjcg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-wz783pvd.js → chunk-ycvg8y8k.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +336 -241
- package/dist/builtin/workflows/src/index.js +25 -15
- package/dist/core/extensions/context-types.d.ts +5 -2
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/docs/intercom/reference.md +13 -1
- package/docs/workflows/operations.md +2 -0
- package/npm-shrinkwrap.json +32 -32
- package/package.json +4 -4
|
@@ -4,6 +4,12 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.26-alpha.4] - 2026-10-02
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed sticky workflow messages disappearing during stage startup, and added per-stage delivery and skip results to `intercom list` so retained future-message counts cannot be mistaken for receipt by every stage ([#3406](https://github.com/bastani-inc/atomic/issues/3406)).
|
|
12
|
+
|
|
7
13
|
## [0.9.20] - 2026-09-24
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -232,7 +232,13 @@ function isWorkflowPossibleStageAnnouncements(
|
|
|
232
232
|
((groupRootRunId !== undefined && groupRootRunId === parsed.rootRunId) || runId === parsed.rootRunId) &&
|
|
233
233
|
typeof announcement.queuedCount === "number" &&
|
|
234
234
|
Number.isInteger(announcement.queuedCount) &&
|
|
235
|
-
announcement.queuedCount >= 0
|
|
235
|
+
announcement.queuedCount >= 0 &&
|
|
236
|
+
(announcement.deliveryOnly === undefined || announcement.deliveryOnly === true) &&
|
|
237
|
+
(announcement.deliveryStates === undefined || (Array.isArray(announcement.deliveryStates) && announcement.deliveryStates.every((delivery) =>
|
|
238
|
+
delivery !== null && typeof delivery === "object" &&
|
|
239
|
+
typeof delivery.messageId === "string" && typeof delivery.runId === "string" &&
|
|
240
|
+
typeof delivery.stageId === "string" && typeof delivery.state === "string" &&
|
|
241
|
+
typeof delivery.reason === "string" && (delivery.sessionId === undefined || typeof delivery.sessionId === "string"))))
|
|
236
242
|
);
|
|
237
243
|
})
|
|
238
244
|
);
|
|
@@ -545,6 +551,8 @@ class IntercomBroker {
|
|
|
545
551
|
runId,
|
|
546
552
|
target: row.target,
|
|
547
553
|
queuedCount: row.queuedCount,
|
|
554
|
+
...(row.deliveryStates === undefined ? {} : { deliveryStates: row.deliveryStates }),
|
|
555
|
+
...(row.deliveryOnly === undefined ? {} : { deliveryOnly: row.deliveryOnly }),
|
|
548
556
|
group: roster.group,
|
|
549
557
|
});
|
|
550
558
|
}
|
|
@@ -3293,7 +3293,8 @@ function formatWorkflowStageRow(stage) {
|
|
|
3293
3293
|
return `- \`${stage.target}\` [${stage.lifecycle.toUpperCase()}] workflow stage: ${stage.stageName}${stage.sessionId === undefined ? "" : ` session: \`${stage.sessionId}\``}`;
|
|
3294
3294
|
}
|
|
3295
3295
|
function formatWorkflowFutureStageRow(stage) {
|
|
3296
|
-
return `- \`${stage.target}\` [future] ${stage.queuedCount} queued message${stage.queuedCount === 1 ? "" : "s"}
|
|
3296
|
+
return `- \`${stage.target}\` [${stage.deliveryOnly === true ? "delivery" : "future"}] ${stage.queuedCount} queued message${stage.queuedCount === 1 ? "" : "s"}${(stage.deliveryStates ?? []).map((delivery) => `
|
|
3297
|
+
delivery ${delivery.messageId} stage ${delivery.runId}/${delivery.stageId}${delivery.sessionId === undefined ? "" : ` session ${delivery.sessionId}`} ${delivery.state} — ${delivery.reason}`).join("")}`;
|
|
3297
3298
|
}
|
|
3298
3299
|
function registerIntercomTool(pi, deps) {
|
|
3299
3300
|
const retryIdentities = new RetryIdentityReservations({ maxEntries: deps.retryIdentityMaxEntries });
|
|
@@ -6618,6 +6619,8 @@ function piIntercomExtension(pi, testOverrides = {}) {
|
|
|
6618
6619
|
const messageGeneration = runtimeGeneration;
|
|
6619
6620
|
const liveContext = getLiveContext(ctx, messageGeneration);
|
|
6620
6621
|
if (!liveContext) {
|
|
6622
|
+
if (receivedBeforeStageStart)
|
|
6623
|
+
throw new Error("Intercom session retired before pending-stage delivery; message remains queued");
|
|
6621
6624
|
return;
|
|
6622
6625
|
}
|
|
6623
6626
|
replyTracker = bindWorkflowReplyTracker(liveContext, replyTracker);
|
|
@@ -7264,7 +7267,13 @@ function piIntercomExtension(pi, testOverrides = {}) {
|
|
|
7264
7267
|
return;
|
|
7265
7268
|
}
|
|
7266
7269
|
await ensureConnected("startup");
|
|
7267
|
-
|
|
7270
|
+
const receivedMessageIds = ctx.sessionManager.getBranch().flatMap((entry) => {
|
|
7271
|
+
if (entry.type !== "custom_message" || entry.customType !== "intercom_message")
|
|
7272
|
+
return [];
|
|
7273
|
+
const id = entry.details?.message?.id;
|
|
7274
|
+
return typeof id === "string" ? [id] : [];
|
|
7275
|
+
});
|
|
7276
|
+
await pendingStageDelivery.deliverPending((from, message) => handleIncomingMessage(ctx, from, message, undefined, true), { sessionId: ctx.sessionManager.getSessionId(), receivedMessageIds });
|
|
7268
7277
|
});
|
|
7269
7278
|
pi.registerMessageRenderer("intercom_message", (message, _options, theme) => {
|
|
7270
7279
|
const details = message.details;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.26-alpha.
|
|
3
|
+
"version": "0.9.26-alpha.4",
|
|
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": [
|
|
@@ -38,11 +38,22 @@ export interface WorkflowRunParentAnnouncement {
|
|
|
38
38
|
readonly stageKeys: readonly string[];
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export interface WorkflowStickyDeliveryState {
|
|
42
|
+
readonly messageId: string;
|
|
43
|
+
readonly runId: string;
|
|
44
|
+
readonly stageId: string;
|
|
45
|
+
readonly sessionId?: string;
|
|
46
|
+
readonly state: string;
|
|
47
|
+
readonly reason: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
export interface WorkflowPossibleStageAnnouncement {
|
|
42
51
|
/** Canonical depth-faithful path target, e.g. `workflow:<rootRunId>/orchestrator-*`. */
|
|
43
52
|
readonly target: string;
|
|
44
53
|
/** Current number of queued sticky entries matching this target. */
|
|
45
54
|
readonly queuedCount: number;
|
|
55
|
+
readonly deliveryStates?: readonly WorkflowStickyDeliveryState[];
|
|
56
|
+
readonly deliveryOnly?: true;
|
|
46
57
|
}
|
|
47
58
|
|
|
48
59
|
export interface WorkflowFutureStageRosterEntry {
|
|
@@ -51,6 +62,8 @@ export interface WorkflowFutureStageRosterEntry {
|
|
|
51
62
|
readonly target: string;
|
|
52
63
|
readonly queuedCount: number;
|
|
53
64
|
readonly group: string;
|
|
65
|
+
readonly deliveryStates?: readonly WorkflowStickyDeliveryState[];
|
|
66
|
+
readonly deliveryOnly?: true;
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
export interface SessionDirectory {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.26-alpha.
|
|
3
|
+
"version": "0.9.26-alpha.4",
|
|
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.26-alpha.
|
|
3
|
+
"version": "0.9.26-alpha.4",
|
|
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,12 @@ 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.26-alpha.4] - 2026-10-02
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed sticky Intercom broadcasts to `workflow:<rootRunId>/**` missing later stages before their first model turn. Workflow status now reports per-stage delivery and skip results for retained messages ([#3406](https://github.com/bastani-inc/atomic/issues/3406)).
|
|
14
|
+
|
|
9
15
|
## [0.9.26-alpha.1] - 2026-10-01
|
|
10
16
|
|
|
11
17
|
### Fixed
|
|
@@ -8353,10 +8353,10 @@ function recordPendingStageMessageDeliveries(messages, runId, messageId, records
|
|
|
8353
8353
|
if (index < 0)
|
|
8354
8354
|
return messages;
|
|
8355
8355
|
const entry = messages[index];
|
|
8356
|
-
const recorded = new Set((entry.deliveries ?? []).map((delivery) =>
|
|
8356
|
+
const recorded = new Set((entry.deliveries ?? []).map((delivery) => JSON.stringify([delivery.runId, delivery.stageId, delivery.sessionId, delivery.admission])));
|
|
8357
8357
|
const additions = [];
|
|
8358
8358
|
for (const record of records) {
|
|
8359
|
-
const key =
|
|
8359
|
+
const key = JSON.stringify([record.runId, record.stageId, record.sessionId, record.admission]);
|
|
8360
8360
|
if (recorded.has(key))
|
|
8361
8361
|
continue;
|
|
8362
8362
|
recorded.add(key);
|
|
@@ -8364,6 +8364,8 @@ function recordPendingStageMessageDeliveries(messages, runId, messageId, records
|
|
|
8364
8364
|
runId: record.runId,
|
|
8365
8365
|
stageId: record.stageId,
|
|
8366
8366
|
...record.stageName === undefined ? {} : { stageName: record.stageName },
|
|
8367
|
+
...record.sessionId === undefined ? {} : { sessionId: record.sessionId },
|
|
8368
|
+
...record.admission === undefined ? {} : { admission: record.admission },
|
|
8367
8369
|
deliveredAt
|
|
8368
8370
|
});
|
|
8369
8371
|
}
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
generate_and_filter_default
|
|
16
16
|
} from "./chunk-kb7s3gx2.js";
|
|
17
|
-
import"./chunk-
|
|
17
|
+
import"./chunk-73p2cm5s.js";
|
|
18
18
|
import"./chunk-z0d03ktm.js";
|
|
19
19
|
import {
|
|
20
20
|
goal_default
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ycvg8y8k.js";
|
|
22
22
|
import {
|
|
23
23
|
open_claude_design_default
|
|
24
24
|
} from "./chunk-nkj4qhj6.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-94f8zfz1.js";
|
|
28
28
|
import {
|
|
29
29
|
ralph_default
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-n95myjcg.js";
|
|
31
31
|
import {
|
|
32
32
|
tournament_default
|
|
33
33
|
} from "./chunk-wf876n16.js";
|