@ctliz/agent-intercom-pi 0.14.0 → 0.14.3
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 +20 -10
- package/index.ts +9 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
| AGY | [`agent-intercom-agy`](https://github.com/ctliz/agent-intercom-agy) |
|
|
18
18
|
| Fleet lifecycle | [`agent-intercom-orchestrator`](https://github.com/ctliz/agent-intercom-orchestrator) |
|
|
19
19
|
|
|
20
|
-
## Pi 1.
|
|
20
|
+
## Pi 1.1 compatibility and codemode
|
|
21
21
|
|
|
22
|
-
Version 0.14.
|
|
22
|
+
Version 0.14.3 is tested with Pi 1.1.0. Version 0.14.0 was tested with Pi 1.0.0, and 0.13.0 with Pi 0.99.1. The development test baseline now uses Pi 1.1.0; host-provided Pi modules remain peer dependencies, not runtime dependencies. The existing protocol v4 broker, durable queues, acknowledgements, and cross-harness routing are unchanged.
|
|
23
23
|
|
|
24
24
|
Pi 1.0 defaults to fullscreen; set `tuiMode` to `"regular"` or launch with `--tui-mode regular` to retain terminal scrollback. Codemode's shorter declarations preserve Intercom's structured `{ ok, text, data }` results and team guidelines. To check tool existence in a script, use `"intercom_send" in tools`, not `typeof tools.intercom_send`, because unknown members now throw. Restart existing Pi processes to use a newly installed Pi version; `/reload` only reloads resources inside the running version.
|
|
25
25
|
|
|
@@ -41,7 +41,7 @@ Concurrent sends and independent asks are supported; do not create two unresolve
|
|
|
41
41
|
The package includes an `intercom-send` executable. Install the alias globally for a shell command, or run it without relying on Pi's private installation path:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
npm exec --yes --package=@ctliz/
|
|
44
|
+
npm exec --yes --package=@ctliz/agent-intercom-pi@0.14.3 -- intercom-send worker 'Tests passed.'
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
It prints one JSON result with `accepted`, `delivered`, `messageId`, and optional failure `code`/`reason`. Exit status is zero only for acknowledged delivery. It inherits the routing scope, but never inherits `PI_INTERCOM_SESSION_ID` or `AGENT_INTERCOM_SESSION_ID`: every invocation registers an independent sender, leaves running Pi sessions intact, and disconnects after sending. It is send-only; use the session tools for reply-tracked asks.
|
|
@@ -163,7 +163,18 @@ Each pi session that has `pi-intercom` loaded and enabled connects to a tiny loc
|
|
|
163
163
|
## Install
|
|
164
164
|
|
|
165
165
|
```bash
|
|
166
|
-
pi install npm:@ctliz/
|
|
166
|
+
pi install npm:@ctliz/agent-intercom-pi
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Starting with 0.14.3, `@ctliz/agent-intercom-pi` is the only npm release name. The legacy `@ctliz/pi-intercom` alias receives no new versions; its published history remains available. The 0.14.2 rename candidate was not published to npm. The GitHub repository and existing Git sources remain unchanged.
|
|
170
|
+
|
|
171
|
+
Existing `@ctliz/agent-intercom-pi` users do not need to switch packages. Update with `pi update npm:@ctliz/agent-intercom-pi`, then run `/reload` in open Pi sessions. If the configured source is pinned to a version, reinstall the unpinned source above to receive future update notifications.
|
|
172
|
+
|
|
173
|
+
If you installed the legacy alias, remove it before installing the supported name to avoid loading the same extension twice:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
pi remove npm:@ctliz/pi-intercom
|
|
177
|
+
pi install npm:@ctliz/agent-intercom-pi
|
|
167
178
|
```
|
|
168
179
|
|
|
169
180
|
If you are coming from `connect.1`, read [Upgrading from `connect.1`](#upgrading-from-connect1-to-connect2) first — the package namespace changed and the two versions must not be installed side by side.
|
|
@@ -789,7 +800,7 @@ Custom broker commands are trusted local configuration: anyone who can edit this
|
|
|
789
800
|
}
|
|
790
801
|
```
|
|
791
802
|
|
|
792
|
-
Pi-intercom publishes live session status automatically. Sessions register as `idle`, switch to `thinking` while the agent is running, show `tool:<name>` during tool execution, and
|
|
803
|
+
Pi-intercom publishes live session status automatically. Sessions register as `idle`, switch to `thinking` while the agent is running, and show `tool:<name>` during tool execution. They remain busy through automatic retries, compaction, and queued continuations until `agent_settled`. Normal settlement returns to `idle`; on Pi 1.1.0 or newer, `aborted: true` shows `cancelled` until the next run or session start. Older hosts without the `aborted` field continue to show `idle` after settlement. If `status` is set in config, it is appended as context instead of replacing the lifecycle status.
|
|
793
804
|
|
|
794
805
|
By default, runtime state and config live under `~/.pi/agent/intercom`. If Pi is launched with `PI_CODING_AGENT_DIR`, pi-intercom uses `$PI_CODING_AGENT_DIR/intercom` instead, including `config.json`, broker PID/lock files, sockets, durable inboxes/outboxes, ask state, and launcher state. `PI_INTERCOM_ASK_WAIT_MS` controls the foreground ask wait (30 seconds by default); `PI_INTERCOM_ASK_TIMEOUT_MS` controls how long a deferred ask remains replyable (10 minutes by default).
|
|
795
806
|
|
|
@@ -916,7 +927,7 @@ Use pi-messenger for multi-agent swarms working on a shared task. Use pi-interco
|
|
|
916
927
|
|
|
917
928
|
The `connect.1` tags, source commits, and published release assets are immutable and are not modified by this migration. Release notes may carry an explicit erratum, which corrects the description only and never moves a tag or replaces an asset.
|
|
918
929
|
|
|
919
|
-
|
|
930
|
+
The historical `connect.*` Git tags shown above remain available. For current Pi installations, use the npm package in [Install](#install).
|
|
920
931
|
|
|
921
932
|
## Limitations
|
|
922
933
|
|
|
@@ -939,10 +950,9 @@ git tag -a vX.Y.Z -m "vX.Y.Z"
|
|
|
939
950
|
git push origin vX.Y.Z
|
|
940
951
|
```
|
|
941
952
|
|
|
942
|
-
The release workflow verifies that the tag points into `main`, runs typecheck and
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
when a workflow is rerun.
|
|
953
|
+
The release workflow verifies that the tag points into `main` and the manifest name is `@ctliz/agent-intercom-pi`, runs typecheck and tests, publishes that one npm package with trusted OIDC provenance, and creates the GitHub Release. It does not publish or rewrite a second alias. Existing npm versions and GitHub Releases are skipped safely when a workflow is rerun.
|
|
954
|
+
|
|
955
|
+
The npm trusted publisher is configured on **`@ctliz/agent-intercom-pi`** for GitHub owner `ctliz`, repository `agent-intercom-pi`, workflow filename `release.yml`, with no environment name (this workflow does not use one). Authorization is package-specific. Changing this account-side setting requires npm package-owner access; a repository commit alone cannot grant it. The workflow uses OIDC without a placeholder registry token.
|
|
946
956
|
|
|
947
957
|
## License
|
|
948
958
|
|
package/index.ts
CHANGED
|
@@ -721,6 +721,7 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
721
721
|
let runtimeStarted = false;
|
|
722
722
|
let runtimeGeneration = 0;
|
|
723
723
|
let agentRunning = false;
|
|
724
|
+
let lastRunAborted = false;
|
|
724
725
|
const activeTools = new Map<string, string>();
|
|
725
726
|
const replyTracker = new ReplyTracker();
|
|
726
727
|
const registeredControlTypes = new Set<string>();
|
|
@@ -848,7 +849,8 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
848
849
|
function currentStatus(): string {
|
|
849
850
|
const activeToolName = activeTools.values().next().value;
|
|
850
851
|
const busy = agentRunning || getLiveContext()?.isIdle() === false;
|
|
851
|
-
const
|
|
852
|
+
const settledStatus = lastRunAborted ? "cancelled" : "idle";
|
|
853
|
+
const lifecycleStatus = activeToolName ? `tool:${activeToolName}` : busy ? "thinking" : settledStatus;
|
|
852
854
|
const queueStatus = inboundInbox?.size ? ` · inbox:${inboundInbox.size}` : "";
|
|
853
855
|
const outboxStatus = client?.outboxSize ? ` · outbox:${client.outboxSize}` : "";
|
|
854
856
|
return config.status ? `${lifecycleStatus}${queueStatus}${outboxStatus} · ${config.status}` : `${lifecycleStatus}${queueStatus}${outboxStatus}`;
|
|
@@ -1594,6 +1596,7 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
1594
1596
|
runtimeInstanceId = randomUUID();
|
|
1595
1597
|
lastPresenceName = buildPresenceIdentity(pi, currentSessionId).name;
|
|
1596
1598
|
agentRunning = false;
|
|
1599
|
+
lastRunAborted = false;
|
|
1597
1600
|
activeTools.clear();
|
|
1598
1601
|
startNamePoll();
|
|
1599
1602
|
if (authorizedRecovered.length > 0) scheduleInboundFlush(0);
|
|
@@ -1823,6 +1826,7 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
1823
1826
|
inboundLastQueuedAt = null;
|
|
1824
1827
|
controlRegistrationGraceUntil = 0;
|
|
1825
1828
|
agentRunning = false;
|
|
1829
|
+
lastRunAborted = false;
|
|
1826
1830
|
activeTools.clear();
|
|
1827
1831
|
if (client) {
|
|
1828
1832
|
await client.disconnect(true);
|
|
@@ -1844,6 +1848,7 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
1844
1848
|
return;
|
|
1845
1849
|
}
|
|
1846
1850
|
agentRunning = true;
|
|
1851
|
+
lastRunAborted = false;
|
|
1847
1852
|
activeTools.clear();
|
|
1848
1853
|
syncPresenceStatus();
|
|
1849
1854
|
});
|
|
@@ -1864,14 +1869,15 @@ export default function piIntercomExtension(pi: ExtensionAPI) {
|
|
|
1864
1869
|
pi.on("agent_end", (_event, ctx) => {
|
|
1865
1870
|
if (!getLiveContext(ctx)) return;
|
|
1866
1871
|
replyTracker.endTurn();
|
|
1867
|
-
|
|
1872
|
+
// Only agent_settled ends the busy state; retries and continuations can still follow.
|
|
1868
1873
|
activeTools.clear();
|
|
1869
1874
|
syncPresenceStatus();
|
|
1870
1875
|
scheduleInboundFlush(0);
|
|
1871
1876
|
});
|
|
1872
|
-
pi.on("agent_settled", (
|
|
1877
|
+
pi.on("agent_settled", (event, ctx) => {
|
|
1873
1878
|
if (!getLiveContext(ctx)) return;
|
|
1874
1879
|
agentRunning = false;
|
|
1880
|
+
lastRunAborted = event.aborted === true;
|
|
1875
1881
|
activeTools.clear();
|
|
1876
1882
|
syncPresenceStatus();
|
|
1877
1883
|
scheduleInboundFlush(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctliz/agent-intercom-pi",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "Pi coding-agent intercom for local messaging with Codex, Claude Code, OpenCode, Grok Build, and AGY agents.",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"typebox": "*"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@earendil-works/pi-ai": "^1.
|
|
71
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
72
|
-
"@earendil-works/pi-tui": "^1.
|
|
70
|
+
"@earendil-works/pi-ai": "^1.1.0",
|
|
71
|
+
"@earendil-works/pi-coding-agent": "^1.1.0",
|
|
72
|
+
"@earendil-works/pi-tui": "^1.1.0",
|
|
73
73
|
"@types/node": "^22.15.0",
|
|
74
74
|
"typebox": "*",
|
|
75
75
|
"typescript": "^5.9.3"
|