pi-pocket 0.28.1 → 0.28.2

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.
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "pi-pocket",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-pocket",
9
- "version": "0.28.1",
9
+ "version": "0.28.2",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@earendil-works/chord": "1.5.0",
13
- "@earendil-works/pi-ai": "1.5.0",
14
- "@earendil-works/pi-codemode": "1.5.0",
15
- "@earendil-works/pi-coding-agent": "1.5.0",
16
- "@earendil-works/pi-durable": "1.5.0",
17
- "@earendil-works/pi-mcp": "1.5.0",
18
- "@earendil-works/pi-schema": "1.5.0",
12
+ "@earendil-works/chord": "1.5.2",
13
+ "@earendil-works/pi-ai": "1.5.2",
14
+ "@earendil-works/pi-codemode": "1.5.2",
15
+ "@earendil-works/pi-coding-agent": "1.5.2",
16
+ "@earendil-works/pi-durable": "1.5.2",
17
+ "@earendil-works/pi-mcp": "1.5.2",
18
+ "@earendil-works/pi-schema": "1.5.2",
19
19
  "dompurify": "^3.4.17",
20
20
  "heic-convert": "^2.1.0",
21
21
  "htm": "^3.1.1",
@@ -442,53 +442,57 @@
442
442
  }
443
443
  },
444
444
  "node_modules/@earendil-works/chord": {
445
- "version": "1.5.0",
446
- "resolved": "https://registry.npmjs.org/@earendil-works/chord/-/chord-1.5.0.tgz",
447
- "integrity": "sha512-jf555zbCM21E03DVBDPD/Tuae0lz64YjaHx/athUxNZ/H7phVVb0dWfZsaYnxaXPQ1odW8iHEoVLOlE/prvUPg==",
445
+ "version": "1.5.2",
446
+ "resolved": "https://registry.npmjs.org/@earendil-works/chord/-/chord-1.5.2.tgz",
447
+ "integrity": "sha512-3g088g7qVXL2cpRAKWjj9za6RLls9FBnuUo5c0hBZ0xCftBQjae0opS+34M22vdXTVE7BNqkRG/FPc9BsM7eEg==",
448
448
  "license": "MIT",
449
449
  "dependencies": {
450
- "@earendil-works/pi-schema": "1.5.0",
451
- "@earendil-works/pi-telemetry": "1.5.0"
450
+ "@earendil-works/pi-schema": "1.5.2",
451
+ "@earendil-works/pi-telemetry": "1.5.2"
452
452
  },
453
453
  "engines": {
454
454
  "node": ">=22.19.0"
455
455
  },
456
456
  "peerDependencies": {
457
457
  "esbuild": "0.28.2",
458
+ "react": "19.3.0",
458
459
  "ws": "8.21.0"
459
460
  },
460
461
  "peerDependenciesMeta": {
461
462
  "esbuild": {
462
463
  "optional": true
463
464
  },
465
+ "react": {
466
+ "optional": true
467
+ },
464
468
  "ws": {
465
469
  "optional": true
466
470
  }
467
471
  }
468
472
  },
469
473
  "node_modules/@earendil-works/pi-agent-core": {
470
- "version": "1.5.0",
471
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-1.5.0.tgz",
472
- "integrity": "sha512-FOj+jXj48DbzMycR/ghNa2KcsqWmvOln24e0FnQOVgnd8vn5H79g335WdHaZUVdRo+zCeogb40/qPPlCWFuvmA==",
474
+ "version": "1.5.2",
475
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-1.5.2.tgz",
476
+ "integrity": "sha512-ie5mejS7mGfXt//9As7i3LfxVXdktZvF1JP4EQsUXTp4mU437h23MNGx7wXZ5VYs3YiG/Qnj3e7OZ2HC069OMw==",
473
477
  "license": "MIT",
474
478
  "dependencies": {
475
- "@earendil-works/pi-ai": "1.5.0",
476
- "@earendil-works/pi-schema": "1.5.0"
479
+ "@earendil-works/pi-ai": "1.5.2",
480
+ "@earendil-works/pi-schema": "1.5.2"
477
481
  },
478
482
  "engines": {
479
483
  "node": ">=22.19.0"
480
484
  }
481
485
  },
482
486
  "node_modules/@earendil-works/pi-ai": {
483
- "version": "1.5.0",
484
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-1.5.0.tgz",
485
- "integrity": "sha512-VeWxNqTHSqRCf8AcY/6kvNwh+neRL6MPxZPePVztIQy6qqK9MR/YoCSN/ZgDnIyCD3pqEXgRyQbzk4KV4uvjbg==",
487
+ "version": "1.5.2",
488
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-1.5.2.tgz",
489
+ "integrity": "sha512-2tWPSnV3qzfiDIY3aWluBag3vC++Vs+VsXt/UquSU5onPMohPih72FUhIhaqmDdMYubOgB3Byl9uF4Vk40JLvQ==",
486
490
  "license": "MIT",
487
491
  "dependencies": {
488
492
  "@anthropic-ai/sdk": "0.129.0",
489
493
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
490
- "@earendil-works/pi-schema": "1.5.0",
491
- "@earendil-works/pi-telemetry": "1.5.0",
494
+ "@earendil-works/pi-schema": "1.5.2",
495
+ "@earendil-works/pi-telemetry": "1.5.2",
492
496
  "@google/genai": "2.21.0",
493
497
  "@smithy/node-http-handler": "4.12.1",
494
498
  "http-proxy-agent": "9.1.0",
@@ -504,9 +508,9 @@
504
508
  }
505
509
  },
506
510
  "node_modules/@earendil-works/pi-codemode": {
507
- "version": "1.5.0",
508
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-codemode/-/pi-codemode-1.5.0.tgz",
509
- "integrity": "sha512-PLBJZ17AEWGzOlAAcFuOkw3PxkOti0JlFuZQyeF2GRTqbpuYo4k9t8YqUV2uOQVzrUnKdxahwaFUqc1eNS1WAg==",
511
+ "version": "1.5.2",
512
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-codemode/-/pi-codemode-1.5.2.tgz",
513
+ "integrity": "sha512-HoZQ40a9RgdZ1VgmrX6x8887cNXedaRJT1l+Ie5YRIMK4gY7v0EpsiNqf6dmixrKylZlTgUSyR+vE8xhjfkr+w==",
510
514
  "license": "MIT",
511
515
  "dependencies": {
512
516
  "quickjs-wasi": "3.6.2"
@@ -516,26 +520,26 @@
516
520
  }
517
521
  },
518
522
  "node_modules/@earendil-works/pi-coding-agent": {
519
- "version": "1.5.0",
520
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-coding-agent/-/pi-coding-agent-1.5.0.tgz",
521
- "integrity": "sha512-xNDZ5kqowO6Z03FS2gwAkPEGk1ssxVcYKQ6qZId84mFEvwACvvyc2l0vAMOS+c5zvxLRMLBE9r4y44IGYkMJaQ==",
523
+ "version": "1.5.2",
524
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-coding-agent/-/pi-coding-agent-1.5.2.tgz",
525
+ "integrity": "sha512-mUWI04rqF1Vd/m1q+Ps1XeWsTXEVvRUnsmRa83I3Dzua0Tx5bYS93imeqtIfrXf7PkkaR6ERz+AuQhIJlom5yA==",
522
526
  "license": "MIT",
523
527
  "dependencies": {
524
- "@earendil-works/pi-agent-core": "1.5.0",
525
- "@earendil-works/pi-ai": "1.5.0",
526
- "@earendil-works/pi-codemode": "1.5.0",
527
- "@earendil-works/pi-mcp": "1.5.0",
528
- "@earendil-works/pi-tui": "1.5.0",
528
+ "@earendil-works/pi-agent-core": "1.5.2",
529
+ "@earendil-works/pi-ai": "1.5.2",
530
+ "@earendil-works/pi-codemode": "1.5.2",
531
+ "@earendil-works/pi-mcp": "1.5.2",
532
+ "@earendil-works/pi-tui": "1.5.2",
529
533
  "@silvia-odwyer/photon-node": "0.3.4",
530
534
  "brace-expansion": "5.0.12",
531
535
  "chalk": "6.0.0",
532
536
  "cross-spawn": "7.0.6",
533
537
  "diff": "8.0.4",
534
- "grok-mermaid": "0.2.3",
535
538
  "highlight.js": "10.7.3",
536
539
  "hosted-git-info": "9.0.3",
537
540
  "ignore": "7.0.8",
538
541
  "jiti": "2.7.0",
542
+ "lovely-mermaid": "0.3.3",
539
543
  "minimatch": "11.0.3",
540
544
  "proper-lockfile": "4.1.2",
541
545
  "quickjs-wasi": "3.6.2",
@@ -568,16 +572,16 @@
568
572
  }
569
573
  },
570
574
  "node_modules/@earendil-works/pi-durable": {
571
- "version": "1.5.0",
572
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-durable/-/pi-durable-1.5.0.tgz",
573
- "integrity": "sha512-xeBP2vIo5NvsCMQ4Y/V+Z164xQEi9JWiBWHdjn4Z15EnFqV3c0FxJAX26FqyyyintrYyk+Enre94GNcvRlBA5g==",
575
+ "version": "1.5.2",
576
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-durable/-/pi-durable-1.5.2.tgz",
577
+ "integrity": "sha512-zDB3anbI/yD0IG+VVY+g5tU+c5XOVqQAFwLkXRMiqZb4p/afWro0voZtLNoRAWcDA2r73kvmH6kKin9Ka8l55g==",
574
578
  "license": "MIT",
575
579
  "dependencies": {
576
- "@earendil-works/chord": "1.5.0",
577
- "@earendil-works/pi-ai": "1.5.0",
578
- "@earendil-works/pi-codemode": "1.5.0",
579
- "@earendil-works/pi-schema": "1.5.0",
580
- "@earendil-works/pi-telemetry": "1.5.0",
580
+ "@earendil-works/chord": "1.5.2",
581
+ "@earendil-works/pi-ai": "1.5.2",
582
+ "@earendil-works/pi-codemode": "1.5.2",
583
+ "@earendil-works/pi-schema": "1.5.2",
584
+ "@earendil-works/pi-telemetry": "1.5.2",
581
585
  "@silvia-odwyer/photon": "0.3.3",
582
586
  "diff": "8.0.4"
583
587
  },
@@ -586,9 +590,9 @@
586
590
  }
587
591
  },
588
592
  "node_modules/@earendil-works/pi-mcp": {
589
- "version": "1.5.0",
590
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-mcp/-/pi-mcp-1.5.0.tgz",
591
- "integrity": "sha512-DURw3IwHCTMHV8CzUJWVp9css27NowsCWfXt4xg2r09IZ+P1O/Uq58hp0hb9WJO0dbkaKGXKBIkV4LVXcu2nlg==",
593
+ "version": "1.5.2",
594
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-mcp/-/pi-mcp-1.5.2.tgz",
595
+ "integrity": "sha512-zU1UgeXDlbixPqGEWD7Ql0brEMIpYr7aEWjoEE5h5enJbM/kQ2jIr7lN8JoR80oUnq1fJSU7SC8kLx2Fx/IZYg==",
592
596
  "license": "MIT",
593
597
  "dependencies": {
594
598
  "cross-spawn": "7.0.6"
@@ -598,27 +602,27 @@
598
602
  }
599
603
  },
600
604
  "node_modules/@earendil-works/pi-schema": {
601
- "version": "1.5.0",
602
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-schema/-/pi-schema-1.5.0.tgz",
603
- "integrity": "sha512-RW0MbT2tR65OY6xMsgB/yVBb7m/RTNwA+9hurSN1vVXfHZRVmVnXbruBPrx/PzbrQnW5yLVlMRWxErGDQtF1Hg==",
605
+ "version": "1.5.2",
606
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-schema/-/pi-schema-1.5.2.tgz",
607
+ "integrity": "sha512-hJoyCXWUhsSrXY5wJo2Q4kHXUsR51pNhkJHAMkWRwVMLDRtMDPkKNaa+JlVRVqTw1hjdSxcVVaFLSDbKlaTXEQ==",
604
608
  "license": "MIT",
605
609
  "engines": {
606
610
  "node": ">=22.19.0"
607
611
  }
608
612
  },
609
613
  "node_modules/@earendil-works/pi-telemetry": {
610
- "version": "1.5.0",
611
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-1.5.0.tgz",
612
- "integrity": "sha512-VW3tcVdnNfl/Vk8wHPTzZdKkxcsCOM12ppiO4DXnd9wMxUCmOfLt/wvUnWeKWbTVlVSRg0uqKtnnhE2UCsG2Bw==",
614
+ "version": "1.5.2",
615
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-1.5.2.tgz",
616
+ "integrity": "sha512-m+cumjIqNh1aMISi/9ttcG3ZOwIdriPbz/eMyWmRMJCGa/WcgY1RX4lrb7HvsHhSfI/JUeBESA4nOCr8C3y5ow==",
613
617
  "license": "MIT",
614
618
  "engines": {
615
619
  "node": ">=22.19.0"
616
620
  }
617
621
  },
618
622
  "node_modules/@earendil-works/pi-tui": {
619
- "version": "1.5.0",
620
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-1.5.0.tgz",
621
- "integrity": "sha512-56KqrDVeLF18k+syppVbT35Ai1opbM44ot+sL7O3K40CaWwXCiwOpqEFugDBAILtAhseZh6uYIuYxPPOJHLFAA==",
623
+ "version": "1.5.2",
624
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-1.5.2.tgz",
625
+ "integrity": "sha512-WK8ih+c88GWizaB79y7Pq3PV7ySf5VI1pZ1i/6aBBjDOAiG2EE3ojKjl+pxQqLfyQGnzHYu4VfakOBJgumuoyw==",
622
626
  "license": "MIT",
623
627
  "dependencies": {
624
628
  "get-east-asian-width": "1.6.0",
@@ -2168,15 +2172,6 @@
2168
2172
  "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
2169
2173
  "license": "ISC"
2170
2174
  },
2171
- "node_modules/grok-mermaid": {
2172
- "version": "0.2.3",
2173
- "resolved": "https://registry.npmjs.org/grok-mermaid/-/grok-mermaid-0.2.3.tgz",
2174
- "integrity": "sha512-/4KopAbsjvuRP9MdPtlDjOHUmUVEohOX73JNcsWpzAtFxh+bq5+Dhb6gzvRieLDwIPQIR3/vy8V1NNTuz4Zsmg==",
2175
- "license": "Apache-2.0",
2176
- "engines": {
2177
- "node": ">=18"
2178
- }
2179
- },
2180
2175
  "node_modules/hashery": {
2181
2176
  "version": "1.5.1",
2182
2177
  "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz",
@@ -2483,6 +2478,15 @@
2483
2478
  "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
2484
2479
  "license": "Apache-2.0"
2485
2480
  },
2481
+ "node_modules/lovely-mermaid": {
2482
+ "version": "0.3.3",
2483
+ "resolved": "https://registry.npmjs.org/lovely-mermaid/-/lovely-mermaid-0.3.3.tgz",
2484
+ "integrity": "sha512-EMLJS934qwt2MLO/a5o+T/89HGbuXZPwmCpHIhHO+DVrm+y5tHlEHgpZzlC2o4yW/rFPHRFO9xSMafzqH4wH5A==",
2485
+ "license": "Apache-2.0",
2486
+ "engines": {
2487
+ "node": ">=18"
2488
+ }
2489
+ },
2486
2490
  "node_modules/lru-cache": {
2487
2491
  "version": "11.5.3",
2488
2492
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-pocket",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "description": "A durable, multiplayer, mobile-first web app for Pi agents, built on Pi Durable",
5
5
  "keywords": [
6
6
  "pi",
@@ -54,13 +54,13 @@
54
54
  "prepublishOnly": "npm run check && npm run lint && npm test"
55
55
  },
56
56
  "dependencies": {
57
- "@earendil-works/chord": "1.5.0",
58
- "@earendil-works/pi-ai": "1.5.0",
59
- "@earendil-works/pi-codemode": "1.5.0",
60
- "@earendil-works/pi-coding-agent": "1.5.0",
61
- "@earendil-works/pi-durable": "1.5.0",
62
- "@earendil-works/pi-mcp": "1.5.0",
63
- "@earendil-works/pi-schema": "1.5.0",
57
+ "@earendil-works/chord": "1.5.2",
58
+ "@earendil-works/pi-ai": "1.5.2",
59
+ "@earendil-works/pi-codemode": "1.5.2",
60
+ "@earendil-works/pi-coding-agent": "1.5.2",
61
+ "@earendil-works/pi-durable": "1.5.2",
62
+ "@earendil-works/pi-mcp": "1.5.2",
63
+ "@earendil-works/pi-schema": "1.5.2",
64
64
  "dompurify": "^3.4.17",
65
65
  "heic-convert": "^2.1.0",
66
66
  "htm": "^3.1.1",
@@ -19,10 +19,11 @@ const ENTRYPOINT = "sdk-cli";
19
19
 
20
20
  /**
21
21
  * The Claude Code version requests are shaped as: the one pi-ai's Anthropic transport reports in its
22
- * `claude-cli/<version>` user-agent, which Anthropic gates models on. Set the environment variable to raise it when
23
- * a model's floor is higher. It is read when the server starts.
22
+ * `claude-cli/<version>` user-agent, which Anthropic gates models on. Raise it with each Pi update that raises that
23
+ * user-agent: `test/anthropic-shape.test.ts` checks that the two match. The environment variable overrides it, read when
24
+ * the server starts.
24
25
  */
25
- const VERSION = process.env.PI_POCKET_ANTHROPIC_CC_VERSION ?? "2.1.280";
26
+ const VERSION = process.env.PI_POCKET_ANTHROPIC_CC_VERSION ?? "2.1.322";
26
27
 
27
28
  /** A system block of an Anthropic request body. */
28
29
  type TextBlock = { type?: string; text?: string; [key: string]: unknown };
package/src/server/app.ts CHANGED
@@ -4246,7 +4246,8 @@ export class PocketApp {
4246
4246
  /**
4247
4247
  * Continue on the runtime's calls: after Pi and the caller shaped a request, each shaper may replace the payload, the
4248
4248
  * last one closest to the wire. With no shaper, the call goes on untouched. A shaper may answer with a promise. One
4249
- * that throws is logged and skipped: a faulty module must not fail the model call.
4249
+ * that throws is logged and skipped: a faulty module must not fail the model call. A shaped call sends its whole
4250
+ * request: an Anthropic thread continuation would leave out the system blocks and tools a shaper may have changed.
4250
4251
  */
4251
4252
  export function installRequestShaping(
4252
4253
  models: { streamSimple: ModelRuntime["streamSimple"] },
@@ -4262,6 +4263,7 @@ export function installRequestShaping(
4262
4263
 
4263
4264
  return stream(model, context, {
4264
4265
  ...options,
4266
+ disableContinuation: true,
4265
4267
  onPayload: async (payload, payloadModel) => {
4266
4268
  const asked = await options?.onPayload?.(payload, payloadModel);
4267
4269
  let next = asked ?? payload;
@@ -3,7 +3,7 @@
3
3
  * JSON value for each artifact, person, and session, kept apart from the artifact's versions and from Pi's context.
4
4
  * A page names a schema to tell old values from new ones: a value saved under another schema reads as none.
5
5
  */
6
- import type { JsonValue } from "@earendil-works/chord";
6
+ import type { JsonValue } from "@earendil-works/chord/json";
7
7
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
8
8
  import type { ConversationId } from "@earendil-works/pi-durable";
9
9
  import type { PocketApp } from "./app.ts";
@@ -31,7 +31,7 @@ import {
31
31
  statSync,
32
32
  } from "node:fs";
33
33
  import { join } from "node:path";
34
- import type { Context } from "@earendil-works/chord";
34
+ import type { Context } from "@earendil-works/chord/context";
35
35
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
36
36
  import {
37
37
  type ConversationId,
@@ -502,6 +502,7 @@ export class CacheKeeper {
502
502
  const options: ObservedOptions = {
503
503
  ...rest,
504
504
  maxTokens: 1,
505
+ disableContinuation: true,
505
506
  maxRetries: 0,
506
507
  signal: abort.signal,
507
508
  [FINAL_PAYLOAD]: (payload) => {
@@ -7,7 +7,8 @@
7
7
  import { randomUUID } from "node:crypto";
8
8
  import { statSync } from "node:fs";
9
9
  import { basename, extname, join, sep } from "node:path";
10
- import { type Context, copyJson, type JsonValue } from "@earendil-works/chord";
10
+ import type { Context } from "@earendil-works/chord/context";
11
+ import { copyJson, type JsonValue } from "@earendil-works/chord/json";
11
12
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
12
13
  import {
13
14
  clampThinkingLevel,
@@ -1,5 +1,5 @@
1
1
  /** A design's bundle, read from the artifact documents: the page, and every asset of the version. */
2
- import type { Context } from "@earendil-works/chord";
2
+ import type { Context } from "@earendil-works/chord/context";
3
3
  import type { ConversationId, DocumentReader } from "@earendil-works/pi-durable";
4
4
  import { ArtifactAssetDoc, ArtifactBodyDoc, ArtifactsDoc, type ArtifactMeta } from "../docs.ts";
5
5
  import type { PocketHost } from "../host.ts";
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Kinds are part of the stored data: rename one and old sessions lose it.
6
6
  */
7
- import type { JsonValue } from "@earendil-works/chord";
7
+ import type { JsonValue } from "@earendil-works/chord/json";
8
8
  import {
9
9
  type CheckpointInfo,
10
10
  type ConversationId,
@@ -7,7 +7,7 @@
7
7
  * - `browser`: a session's browser page (`browser.ts`), with the actions an extension needs and nothing of the page's
8
8
  * internals: no script to run in it, and a `fill` for a person's value that core never shows.
9
9
  */
10
- import type { Context } from "@earendil-works/chord";
10
+ import type { Context } from "@earendil-works/chord/context";
11
11
  import type { Browsers } from "./browser.ts";
12
12
  import type { BrowserPage, Target } from "./browser/page.ts";
13
13
  import { normalizeUrl } from "./browser/urls.ts";
@@ -1,5 +1,5 @@
1
1
  /** Request-lifetime document access and conversation authorization for extension routes. */
2
- import type { Context } from "@earendil-works/chord";
2
+ import type { Context } from "@earendil-works/chord/context";
3
3
  import { BACKGROUND_CONTEXT, withAbortSignal } from "@earendil-works/chord/context";
4
4
  import type { AgentState, ConversationId, DocumentReader, Tx } from "@earendil-works/pi-durable";
5
5
  import type { PocketApp } from "./app.ts";
@@ -9,7 +9,7 @@ import { randomBytes } from "node:crypto";
9
9
  import { writeFile } from "node:fs/promises";
10
10
  import { tmpdir } from "node:os";
11
11
  import { join } from "node:path";
12
- import type { JsonValue } from "@earendil-works/chord";
12
+ import type { JsonValue } from "@earendil-works/chord/json";
13
13
  import { withAbortSignal } from "@earendil-works/chord/context";
14
14
  import { type ToolCall } from "@earendil-works/pi-ai";
15
15
  import { obj, str } from "@earendil-works/pi-schema";
@@ -17,7 +17,7 @@
17
17
  import type { AssistantMessage, ModelThinkingLevel } from "@earendil-works/pi-ai";
18
18
  import { StringEnum } from "@earendil-works/pi-ai";
19
19
  import { arr, bool, obj, opt, str } from "@earendil-works/pi-schema";
20
- import type { Context } from "@earendil-works/chord";
20
+ import type { Context } from "@earendil-works/chord/context";
21
21
  import {
22
22
  AgentDoc,
23
23
  AssistantEntry,
@@ -3,7 +3,7 @@
3
3
  * extension (`extensions/goals.ts`) runs the check in the session's folder; while it fails, Pi is told so, with the
4
4
  * end of the output, and keeps going, up to a number of checks. This module keeps the goal and runs the check.
5
5
  */
6
- import type { Context } from "@earendil-works/chord";
6
+ import type { Context } from "@earendil-works/chord/context";
7
7
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
8
8
  import type { ConversationId, TaskId } from "@earendil-works/pi-durable";
9
9
  import type { PocketApp } from "./app.ts";
@@ -13,7 +13,7 @@
13
13
  * keeps values out of transcripts by accident and by default: it is no boundary against a command that transforms a
14
14
  * value on purpose.
15
15
  */
16
- import type { Context } from "@earendil-works/chord";
16
+ import type { Context } from "@earendil-works/chord/context";
17
17
  import type { ConversationId, ToolExecutionResult } from "@earendil-works/pi-durable";
18
18
  import type {
19
19
  ExecutionEnv,
@@ -1,4 +1,4 @@
1
- import type { Context } from "@earendil-works/chord";
1
+ import type { Context } from "@earendil-works/chord/context";
2
2
  import { awaitWithContext } from "@earendil-works/chord/context";
3
3
  import type { ProviderConfig, Skill } from "@earendil-works/pi-coding-agent";
4
4
  import type { Api, Model, ModelThinkingLevel } from "@earendil-works/pi-ai";
@@ -3,7 +3,7 @@
3
3
  * at the target's next pause, and each one's final answer carried back to the session that started it.
4
4
  */
5
5
  import { createHash, randomUUID } from "node:crypto";
6
- import type { Context } from "@earendil-works/chord";
6
+ import type { Context } from "@earendil-works/chord/context";
7
7
  import type { AssistantMessage, ModelThinkingLevel } from "@earendil-works/pi-ai";
8
8
  import { BACKGROUND_CONTEXT, withAbortSignal } from "@earendil-works/chord/context";
9
9
  import {
@@ -10,7 +10,7 @@
10
10
  import { randomUUID } from "node:crypto";
11
11
  import { realpath } from "node:fs/promises";
12
12
  import { basename, dirname, resolve } from "node:path";
13
- import type { Context } from "@earendil-works/chord";
13
+ import type { Context } from "@earendil-works/chord/context";
14
14
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
15
15
  import type { ConversationId, Tx } from "@earendil-works/pi-durable";
16
16
  import type { PocketApp } from "./app.ts";
@@ -10,7 +10,7 @@
10
10
  * its own notes. It keeps what PiP's person asked for, what is still open, and what PiP follows and watches (which
11
11
  * live on the server, and work on as they did). What it costs is added to `pi.usage`, once, as Pi Durable's are.
12
12
  */
13
- import type { Context } from "@earendil-works/chord";
13
+ import type { Context } from "@earendil-works/chord/context";
14
14
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
15
15
  import type { AssistantMessage, Message, Usage } from "@earendil-works/pi-ai";
16
16
  import {
package/src/server/pip.ts CHANGED
@@ -17,7 +17,7 @@ import { createHash, randomUUID } from "node:crypto";
17
17
  import { existsSync, mkdirSync, readdirSync, renameSync, rmSync, statSync } from "node:fs";
18
18
  import { basename, dirname, join } from "node:path";
19
19
  import type { AssistantMessage } from "@earendil-works/pi-ai";
20
- import type { Context } from "@earendil-works/chord";
20
+ import type { Context } from "@earendil-works/chord/context";
21
21
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
22
22
  import {
23
23
  AgentDoc,
@@ -6,7 +6,7 @@
6
6
  * the address answers nothing.
7
7
  */
8
8
  import { randomBytes } from "node:crypto";
9
- import type { JsonValue } from "@earendil-works/chord";
9
+ import type { JsonValue } from "@earendil-works/chord/json";
10
10
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
11
11
  import type { PocketApp } from "./app.ts";
12
12
  import { type PublicLink, PublicLinksDoc } from "./docs.ts";
@@ -14,7 +14,7 @@
14
14
  * (`extensions/pip.ts`).
15
15
  */
16
16
  import { randomUUID } from "node:crypto";
17
- import type { Context } from "@earendil-works/chord";
17
+ import type { Context } from "@earendil-works/chord/context";
18
18
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
19
19
  import {
20
20
  type ConversationId,
@@ -3,7 +3,7 @@
3
3
  * the message went out cannot leave the fork without it. Whoever sends it again sends it right away as well; with one
4
4
  * request id per fork, it goes out once either way.
5
5
  */
6
- import type { Context } from "@earendil-works/chord";
6
+ import type { Context } from "@earendil-works/chord/context";
7
7
  import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
8
8
  import {
9
9
  defineTask,
@@ -11,7 +11,7 @@
11
11
  * nothing goes out.
12
12
  */
13
13
  import { randomUUID } from "node:crypto";
14
- import type { Context } from "@earendil-works/chord";
14
+ import type { Context } from "@earendil-works/chord/context";
15
15
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
16
16
  import {
17
17
  type ConversationId,
@@ -5,7 +5,7 @@
5
5
  * done part of its work, so its entry says it was cut off. The entry goes in as a write submission, which Pi Durable
6
6
  * queues while Pi works and places where a message can go.
7
7
  */
8
- import type { Context } from "@earendil-works/chord";
8
+ import type { Context } from "@earendil-works/chord/context";
9
9
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
10
10
  import type { Message } from "@earendil-works/pi-ai";
11
11
  import {
@@ -4,7 +4,7 @@
4
4
  * the work's usage is committed. The owner can limit a session or a person. Past a limit, new messages are refused,
5
5
  * and a run that crosses it is stopped; the model request that crossed it still counts.
6
6
  */
7
- import { copyJson } from "@earendil-works/chord";
7
+ import { copyJson } from "@earendil-works/chord/json";
8
8
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
9
9
  import type { AssistantMessage, Usage } from "@earendil-works/pi-ai";
10
10
  import { type ConversationId, UsageDoc, type UsageState } from "@earendil-works/pi-durable";
@@ -10,7 +10,7 @@
10
10
  * or closed, when there is more to tell than it may send, after two weeks with nothing new, after an hour of failed
11
11
  * looks, or when someone stops it. The triggers extension (`extensions/triggers.ts`) installs the task and Pi's tool.
12
12
  */
13
- import type { Context } from "@earendil-works/chord";
13
+ import type { Context } from "@earendil-works/chord/context";
14
14
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
15
15
  import {
16
16
  type ConversationId,
package/types/pocket.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * release. A member without it is stable. The reference is in `docs/extensions/reference/`. `test/public-types.ts`
14
14
  * fails when this file and Pi Pocket's code do not agree.
15
15
  */
16
- import type { Context } from "@earendil-works/chord";
16
+ import type { Context } from "@earendil-works/chord/context";
17
17
  import type { Api, Model, ModelThinkingLevel } from "@earendil-works/pi-ai";
18
18
  import type { ProviderConfig, Skill } from "@earendil-works/pi-coding-agent";
19
19
  import type {