@tandryio/pi 0.1.0-alpha.3 → 0.1.0-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/README.md +4 -3
- package/THIRD_PARTY_NOTICES.md +0 -3
- package/dist/index.cjs +33 -10
- 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,11 +24803,15 @@ 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
|
-
lastActiveAt: external_exports.number()
|
|
24808
|
+
lastActiveAt: external_exports.number(),
|
|
24809
|
+
/**
|
|
24810
|
+
* Deprecated. Clients up to 0.1.0-alpha.3 require it; it now equals
|
|
24811
|
+
* `state === "online"` for push members and is false for pull members.
|
|
24812
|
+
* Nothing new reads it. Remove once those clients are gone.
|
|
24813
|
+
*/
|
|
24814
|
+
wakeable: external_exports.boolean().optional()
|
|
24809
24815
|
});
|
|
24810
24816
|
var Visibility = external_exports.enum(["room", "dm"]);
|
|
24811
24817
|
var MessageKind = external_exports.enum(["text", "intro"]);
|
|
@@ -25009,7 +25015,7 @@ var new_room = operation({
|
|
|
25009
25015
|
description: external_exports.string().trim().max(ROOM_DESCRIPTION_LIMIT)
|
|
25010
25016
|
}),
|
|
25011
25017
|
output: external_exports.object({ id: RoomId, name: external_exports.string(), code: external_exports.string() }),
|
|
25012
|
-
errors: [...SIGNED_IN, "handle_required", "limit_reached"]
|
|
25018
|
+
errors: [...SIGNED_IN, "handle_required", "limit_reached", "not_in_room", "forbidden"]
|
|
25013
25019
|
});
|
|
25014
25020
|
var update_room = operation({
|
|
25015
25021
|
name: "update_room",
|
|
@@ -25023,6 +25029,13 @@ var update_room = operation({
|
|
|
25023
25029
|
output: RoomSummary,
|
|
25024
25030
|
errors: [...SIGNED_IN, "no_such_room", "forbidden"]
|
|
25025
25031
|
});
|
|
25032
|
+
var delete_room = operation({
|
|
25033
|
+
name: "delete_room",
|
|
25034
|
+
scope: "account",
|
|
25035
|
+
input: external_exports.object({ room: RoomId }),
|
|
25036
|
+
output: Empty,
|
|
25037
|
+
errors: [...SIGNED_IN, "forbidden"]
|
|
25038
|
+
});
|
|
25026
25039
|
var join = operation({
|
|
25027
25040
|
name: "join",
|
|
25028
25041
|
scope: "account",
|
|
@@ -25154,6 +25167,7 @@ var operations = {
|
|
|
25154
25167
|
revoke_device,
|
|
25155
25168
|
new_room,
|
|
25156
25169
|
update_room,
|
|
25170
|
+
delete_room,
|
|
25157
25171
|
join,
|
|
25158
25172
|
leave,
|
|
25159
25173
|
rename,
|
|
@@ -25402,9 +25416,9 @@ Older messages exist. Call history with before: ${page.nextBefore}.` : "";
|
|
|
25402
25416
|
].join("\n") + more;
|
|
25403
25417
|
}
|
|
25404
25418
|
function renderPresence(presence, now) {
|
|
25405
|
-
if (presence.state === "offline") return `offline, last active ${relativeTime(presence.lastActiveAt, now)}; reads it when its
|
|
25419
|
+
if (presence.state === "offline") return `offline, last active ${relativeTime(presence.lastActiveAt, now)}; reads it when its owner is next back in that conversation`;
|
|
25406
25420
|
if (presence.tier === "pull") return "online in a web chat; reads it at its next inbox check";
|
|
25407
|
-
return
|
|
25421
|
+
return "online; told now";
|
|
25408
25422
|
}
|
|
25409
25423
|
function renderSent(result, now) {
|
|
25410
25424
|
if (!result.recipients.length) return `Sent ${result.id}. On record in the room; nobody was told.`;
|
|
@@ -26202,7 +26216,15 @@ function createBridge(options) {
|
|
|
26202
26216
|
waker.evaluate();
|
|
26203
26217
|
},
|
|
26204
26218
|
inactive() {
|
|
26205
|
-
return inactive({
|
|
26219
|
+
return inactive({
|
|
26220
|
+
loggedIn: !!readCredentials(hub),
|
|
26221
|
+
bound: !!conversation,
|
|
26222
|
+
joined: !!marker,
|
|
26223
|
+
ended,
|
|
26224
|
+
connected: !!link?.connected,
|
|
26225
|
+
wakeable: options.shell.wakeable(),
|
|
26226
|
+
unwakeable: options.shell.unwakeable?.() ?? null
|
|
26227
|
+
});
|
|
26206
26228
|
},
|
|
26207
26229
|
dispose() {
|
|
26208
26230
|
disposed = true;
|
|
@@ -26261,8 +26283,9 @@ function tandry(pi) {
|
|
|
26261
26283
|
host: "pi",
|
|
26262
26284
|
shell: {
|
|
26263
26285
|
// Print/JSON runs exit after their prompt instead of waiting for mail.
|
|
26264
|
-
wakeable: () => !!context?.model && (context.mode === "tui" || context.mode === "rpc")
|
|
26265
|
-
|
|
26286
|
+
wakeable: () => !!context?.model && (context.mode === "tui" || context.mode === "rpc"),
|
|
26287
|
+
// A blocking UI prompt is the owner's moment: no wake until it closes, as during a turn.
|
|
26288
|
+
idle: () => !!context?.isIdle() && !starting && !waitingForOwner,
|
|
26266
26289
|
async wake(notice) {
|
|
26267
26290
|
pi.sendMessage(message(notice), { triggerTurn: true, deliverAs: "followUp" });
|
|
26268
26291
|
}
|