@tinoy/pi-canon 0.4.0 → 0.6.0

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.
Files changed (3) hide show
  1. package/README.md +8 -1
  2. package/index.ts +5 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ > [!WARNING]
2
+ > **Do not install anything here yet.**
3
+ >
4
+ > This is a fast-moving prototype: the interfaces change without notice, and nothing here
5
+ > is stable. Every package in this project is headed for a stable 1.0, but that is still
6
+ > some way off. Install one only if you intend to follow the code and expect breakage.
7
+
1
8
  # @tinoy/pi-canon
2
9
 
3
10
  Durable system-prompt rules ("canon") for pi. Rules and learned facts are stored
@@ -17,7 +24,7 @@ pi install npm:@tinoy/pi-canon
17
24
  - **Commands** — `/canon` (list, add, remove, edit, category management) and `/canon-dump`.
18
25
  - **Injection** — the block is appended at `before_agent_start` and re-normalized on every provider request, so a run started by an injected message carries the same bytes as an interactive prompt.
19
26
  - **Category headings** — a category sub-heading inside a scope group prints the store id after the word `category` (`#### Behavioural Preferences [category 1cg5lr]`), which is the same id a `canon_add` refusal lists; the word keeps it from reading as an entry handle, which the block renders as `[1i15c2]`. Uncategorized entries carry no id, and a scope group holding a single category stays flat with no sub-heading.
20
- - **Peer notices** — entry changes are broadcast over the pi-intercom bus (namespace `canon`); receivers match the entry scope against their own model and audience.
27
+ - **Peer notices** — entry changes are published over the `ipc` transport's bus (namespace `canon`); receivers match the entry scope against their own model and audience.
21
28
  - **Tail sections** — another extension contributes prompt text through the `canon:section` event; its ids are published on `canon:sections`.
22
29
 
23
30
  ## Exports
package/index.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * changes via canon notices (and the user's /canon-dump).
15
15
  * Edited at runtime via canon_add / canon_remove / canon_edit (plus
16
16
  * the /canon and /canon-dump commands). Changes are broadcast to peer sessions
17
- * over the pi-intercom extension bus (namespace "canon"); each receiver matches
17
+ * over the `ipc` transport's extension bus (namespace "canon"); each receiver matches
18
18
  * the entry scope against its own model + audience before showing a notice.
19
19
  *
20
20
  * Replaces APPEND_SYSTEM.md (global/parent) and FLASH.md (global/subagent).
@@ -714,8 +714,8 @@ export default function (pi: ExtensionAPI) {
714
714
 
715
715
  // Best-effort peer notice: the store write has already landed when this runs,
716
716
  // so EVERY failure mode of the channel call is swallowed here and logged:
717
- // - pi-intercom 0.12.1's channel.publish is SYNCHRONOUS and throws
718
- // "Intercom is not connected" when the broker client is down;
717
+ // - the channel's publish may throw SYNCHRONOUSLY when the transport is
718
+ // down, and returns void, so there is no promise to catch;
719
719
  // - it returns void, so .catch must only ever be reached through the
720
720
  // optional call (chaining it directly was the TypeError that escaped);
721
721
  // - a promise-returning build rejects instead of throwing — the guarded
@@ -748,7 +748,7 @@ export default function (pi: ExtensionAPI) {
748
748
  }
749
749
  }
750
750
 
751
- // ---------- intercom channel (mirrors the intercom-broadcast package) ----------
751
+ // ---------- the bus channel (mirrors the ipc package's registration) ----------
752
752
 
753
753
  const registration: CanonRegistration = {
754
754
  namespace: NAMESPACE,
@@ -793,7 +793,7 @@ export default function (pi: ExtensionAPI) {
793
793
  pi.events.emit("intercom:extension-register", registration);
794
794
  }
795
795
 
796
- // pi-intercom may load after this extension; re-emit once its registry is
796
+ // The registrar may load after this extension; re-emit once the registry is
797
797
  // reported ready. First successful registration wins (duplicate namespace
798
798
  // is rejected, not thrown).
799
799
  pi.events.on("intercom:extension-registry-ready", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinoy/pi-canon",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Durable system-prompt rules for pi: an on-disk canon store, its tools, and the /canon commands.",
5
5
  "license": "MIT",
6
6
  "repository": {