@tandryio/pi 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +4 -3
- package/THIRD_PARTY_NOTICES.md +0 -3
- package/dist/index.cjs +26 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tandry for pi
|
|
2
2
|
|
|
3
|
-
Native extension for pi 0.85.1. It registers
|
|
3
|
+
Native extension for pi 0.85.1. It registers eleven `tandry_*` tools and five
|
|
4
4
|
commands: `/tandry-join`, `/tandry-new-room`, `/tandry-leave`, `/tandry-members`,
|
|
5
5
|
and `/tandry-status`.
|
|
6
6
|
|
|
@@ -56,8 +56,9 @@ old connection; pi 0.85.1 creates a fresh extension instance on session changes.
|
|
|
56
56
|
TUI and RPC modes can wake an idle conversation through a custom follow-up
|
|
57
57
|
message. During a run, notices enter at a tool boundary or queue after the
|
|
58
58
|
turn. `agent_settled` reports true idle, including after retries and queued
|
|
59
|
-
continuations.
|
|
60
|
-
JSON modes
|
|
59
|
+
continuations. A blocking UI prompt counts as the owner's turn: no wake until
|
|
60
|
+
it closes. Print and JSON modes are offline to senders because they do not
|
|
61
|
+
wait for new mail.
|
|
61
62
|
|
|
62
63
|
Pi's `sendMessage` returns no delivery acknowledgement. The bridge can confirm
|
|
63
64
|
that it submitted a notice, but asynchronous model/provider failures are shown
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -704,7 +704,6 @@ Cloudflare-generated runtime declarations also retain their upstream headers.
|
|
|
704
704
|
- [why-is-node-running@2.3.0](https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz) — MIT; [notice 6a134e51aa31](#license-6a134e51aa31)
|
|
705
705
|
- [workerd@1.20260911.1](https://registry.npmjs.org/workerd/-/workerd-1.20260911.1.tgz) — Apache-2.0; [notice bb28c48e3e07](#license-bb28c48e3e07)
|
|
706
706
|
- [workerd@1.20260916.1](https://registry.npmjs.org/workerd/-/workerd-1.20260916.1.tgz) — Apache-2.0; [notice bb28c48e3e07](#license-bb28c48e3e07)
|
|
707
|
-
- [wrangler@4.131.1](https://registry.npmjs.org/wrangler/-/wrangler-4.131.1.tgz) — MIT OR Apache-2.0; [notice b30df9a48463](#license-b30df9a48463), [notice 9bb3b077cc86](#license-9bb3b077cc86)
|
|
708
707
|
- [wrangler@4.133.0](https://registry.npmjs.org/wrangler/-/wrangler-4.133.0.tgz) — MIT OR Apache-2.0; [notice b30df9a48463](#license-b30df9a48463), [notice 9bb3b077cc86](#license-9bb3b077cc86)
|
|
709
708
|
- [wrappy@1.0.2](https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz) — ISC; [notice 4ec3d4c66cd8](#license-4ec3d4c66cd8)
|
|
710
709
|
- [ws@8.21.0](https://registry.npmjs.org/ws/-/ws-8.21.0.tgz) — MIT; [notice 2b29dcfe0d64](#license-2b29dcfe0d64)
|
|
@@ -11956,7 +11955,6 @@ SOFTWARE.
|
|
|
11956
11955
|
- @cloudflare/vitest-plugin@1.1.11: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-MIT
|
|
11957
11956
|
- miniflare@5.20260911.0-alpha: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-MIT
|
|
11958
11957
|
- miniflare@5.20260916.0-alpha: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-MIT
|
|
11959
|
-
- wrangler@4.131.1: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-MIT
|
|
11960
11958
|
- wrangler@4.133.0: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-MIT
|
|
11961
11959
|
|
|
11962
11960
|
```text
|
|
@@ -13372,7 +13370,6 @@ SOFTWARE.
|
|
|
13372
13370
|
|
|
13373
13371
|
- @cloudflare/kv-asset-handler@0.5.0: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-APACHE
|
|
13374
13372
|
- @cloudflare/unenv-preset@2.16.1: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-APACHE
|
|
13375
|
-
- wrangler@4.131.1: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-APACHE
|
|
13376
13373
|
- wrangler@4.133.0: https://raw.githubusercontent.com/cloudflare/workers-sdk/main/LICENSE-APACHE
|
|
13377
13374
|
|
|
13378
13375
|
```text
|
package/dist/index.cjs
CHANGED
|
@@ -5071,6 +5071,7 @@ function inactive(view) {
|
|
|
5071
5071
|
if (!view.joined) return "This conversation has not joined a room.";
|
|
5072
5072
|
if (view.ended) return view.ended.message && view.ended.reason === "upgrade_required" ? view.ended.message : ENDED[view.ended.reason];
|
|
5073
5073
|
if (!view.connected) return "The connection to the Hub dropped; reconnecting. Operations still work.";
|
|
5074
|
+
if (!view.wakeable) return view.unwakeable ?? "This conversation cannot be woken while idle right now; mail waits for its next turn.";
|
|
5074
5075
|
return null;
|
|
5075
5076
|
}
|
|
5076
5077
|
|
|
@@ -24778,11 +24779,12 @@ function parseAddress(address) {
|
|
|
24778
24779
|
const slash = address.indexOf("/");
|
|
24779
24780
|
return { handle: address.slice(0, slash), name: address.slice(slash + 1) };
|
|
24780
24781
|
}
|
|
24781
|
-
var HostKind = external_exports.enum(["claude", "codex", "kimi", "pi", "opencode", "dsh", "claude-web", "chatgpt-web", "web"]);
|
|
24782
|
+
var HostKind = external_exports.enum(["claude", "codex", "grok", "kimi", "pi", "opencode", "dsh", "claude-web", "chatgpt-web", "web"]);
|
|
24782
24783
|
var Tier = external_exports.enum(["push", "pull"]);
|
|
24783
24784
|
var HOST_LABELS = {
|
|
24784
24785
|
claude: "Claude Code",
|
|
24785
24786
|
codex: "Codex",
|
|
24787
|
+
grok: "Grok Build",
|
|
24786
24788
|
kimi: "Kimi Code",
|
|
24787
24789
|
pi: "pi",
|
|
24788
24790
|
opencode: "opencode",
|
|
@@ -24801,8 +24803,6 @@ var MemberState = external_exports.enum(["online", "offline"]);
|
|
|
24801
24803
|
var Presence = external_exports.object({
|
|
24802
24804
|
state: MemberState,
|
|
24803
24805
|
tier: Tier,
|
|
24804
|
-
/** Only meaningful for an online push member. */
|
|
24805
|
-
wakeable: external_exports.boolean(),
|
|
24806
24806
|
/** Reported by a connected push host; absent for pull hosts. */
|
|
24807
24807
|
busy: external_exports.boolean().optional(),
|
|
24808
24808
|
lastActiveAt: external_exports.number()
|
|
@@ -25009,7 +25009,7 @@ var new_room = operation({
|
|
|
25009
25009
|
description: external_exports.string().trim().max(ROOM_DESCRIPTION_LIMIT)
|
|
25010
25010
|
}),
|
|
25011
25011
|
output: external_exports.object({ id: RoomId, name: external_exports.string(), code: external_exports.string() }),
|
|
25012
|
-
errors: [...SIGNED_IN, "handle_required", "limit_reached"]
|
|
25012
|
+
errors: [...SIGNED_IN, "handle_required", "limit_reached", "not_in_room", "forbidden"]
|
|
25013
25013
|
});
|
|
25014
25014
|
var update_room = operation({
|
|
25015
25015
|
name: "update_room",
|
|
@@ -25023,6 +25023,13 @@ var update_room = operation({
|
|
|
25023
25023
|
output: RoomSummary,
|
|
25024
25024
|
errors: [...SIGNED_IN, "no_such_room", "forbidden"]
|
|
25025
25025
|
});
|
|
25026
|
+
var delete_room = operation({
|
|
25027
|
+
name: "delete_room",
|
|
25028
|
+
scope: "account",
|
|
25029
|
+
input: external_exports.object({ room: RoomId }),
|
|
25030
|
+
output: Empty,
|
|
25031
|
+
errors: [...SIGNED_IN, "forbidden"]
|
|
25032
|
+
});
|
|
25026
25033
|
var join = operation({
|
|
25027
25034
|
name: "join",
|
|
25028
25035
|
scope: "account",
|
|
@@ -25154,6 +25161,7 @@ var operations = {
|
|
|
25154
25161
|
revoke_device,
|
|
25155
25162
|
new_room,
|
|
25156
25163
|
update_room,
|
|
25164
|
+
delete_room,
|
|
25157
25165
|
join,
|
|
25158
25166
|
leave,
|
|
25159
25167
|
rename,
|
|
@@ -25402,9 +25410,9 @@ Older messages exist. Call history with before: ${page.nextBefore}.` : "";
|
|
|
25402
25410
|
].join("\n") + more;
|
|
25403
25411
|
}
|
|
25404
25412
|
function renderPresence(presence, now) {
|
|
25405
|
-
if (presence.state === "offline") return `offline, last active ${relativeTime(presence.lastActiveAt, now)}; reads it when its
|
|
25413
|
+
if (presence.state === "offline") return `offline, last active ${relativeTime(presence.lastActiveAt, now)}; reads it when its owner is next back in that conversation`;
|
|
25406
25414
|
if (presence.tier === "pull") return "online in a web chat; reads it at its next inbox check";
|
|
25407
|
-
return
|
|
25415
|
+
return "online; told now";
|
|
25408
25416
|
}
|
|
25409
25417
|
function renderSent(result, now) {
|
|
25410
25418
|
if (!result.recipients.length) return `Sent ${result.id}. On record in the room; nobody was told.`;
|
|
@@ -26202,7 +26210,15 @@ function createBridge(options) {
|
|
|
26202
26210
|
waker.evaluate();
|
|
26203
26211
|
},
|
|
26204
26212
|
inactive() {
|
|
26205
|
-
return inactive({
|
|
26213
|
+
return inactive({
|
|
26214
|
+
loggedIn: !!readCredentials(hub),
|
|
26215
|
+
bound: !!conversation,
|
|
26216
|
+
joined: !!marker,
|
|
26217
|
+
ended,
|
|
26218
|
+
connected: !!link?.connected,
|
|
26219
|
+
wakeable: options.shell.wakeable(),
|
|
26220
|
+
unwakeable: options.shell.unwakeable?.() ?? null
|
|
26221
|
+
});
|
|
26206
26222
|
},
|
|
26207
26223
|
dispose() {
|
|
26208
26224
|
disposed = true;
|
|
@@ -26261,8 +26277,9 @@ function tandry(pi) {
|
|
|
26261
26277
|
host: "pi",
|
|
26262
26278
|
shell: {
|
|
26263
26279
|
// Print/JSON runs exit after their prompt instead of waiting for mail.
|
|
26264
|
-
wakeable: () => !!context?.model && (context.mode === "tui" || context.mode === "rpc")
|
|
26265
|
-
|
|
26280
|
+
wakeable: () => !!context?.model && (context.mode === "tui" || context.mode === "rpc"),
|
|
26281
|
+
// A blocking UI prompt is the owner's moment: no wake until it closes, as during a turn.
|
|
26282
|
+
idle: () => !!context?.isIdle() && !starting && !waitingForOwner,
|
|
26266
26283
|
async wake(notice) {
|
|
26267
26284
|
pi.sendMessage(message(notice), { triggerTurn: true, deliverAs: "followUp" });
|
|
26268
26285
|
}
|