@sjawhar/pi-envoy 15.2.0 → 15.3.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.
package/README.md CHANGED
@@ -197,10 +197,13 @@ The extension registers no Dispatch tool. Agents reach Dispatch through the `dis
197
197
  their shell: `dispatch --help` lists its commands, `dispatch <command> --help` each one's flags and
198
198
  an example, and the `dispatch` skill teaches when to use each. The package ships `bin/dispatch`, a
199
199
  shim that runs the bundled `dist/dispatch.js` (built from `@legion/envoy-client`'s
200
- `bin/dispatch.ts`) with `bun`. At load the extension puts that `bin/` first on `PATH`, sets
201
- `DISPATCH_HOST=omp` and hands the session's envoy.json on as `ENVOY_CONFIG_FILE`; each session
202
- start, switch and branch sets `DISPATCH_SESSION_ID` to the session's id, so a command acts as the
203
- session whose shell ran it and reads the file that session reads.
200
+ `bin/dispatch.ts`) with `bun`. The manifest's `omp.bin` names that `bin/`, so an Oh My Pi that
201
+ supports the field puts it on `PATH` under the plugin's installed path, which keeps working when a
202
+ symlinked plugins root is re-pointed and its old target removed; under an older Oh My Pi the
203
+ extension puts `bin/` first on `PATH` itself at load. The extension also sets `DISPATCH_HOST=omp`
204
+ and hands the session's envoy.json on as `ENVOY_CONFIG_FILE`; each session start, switch and
205
+ branch sets `DISPATCH_SESSION_ID` to the session's id, so a command acts as the session whose shell
206
+ ran it and reads the file that session reads.
204
207
 
205
208
  A session reads one envoy.json, with a section for Dispatch and one for Envoy:
206
209
 
package/dist/envoy.js CHANGED
@@ -17048,7 +17048,7 @@ __export(exports_coerce, {
17048
17048
  });
17049
17049
 
17050
17050
  // extensions/envoy.ts
17051
- import { existsSync as existsSync2 } from "fs";
17051
+ import { existsSync as existsSync2, realpathSync as realpathSync2 } from "fs";
17052
17052
  import { delimiter, dirname as dirname2, resolve as resolve4 } from "path";
17053
17053
  import { fileURLToPath } from "url";
17054
17054
 
@@ -38280,7 +38280,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
38280
38280
 
38281
38281
  // package.json
38282
38282
  var name = "@sjawhar/pi-envoy";
38283
- var version2 = "15.2.0";
38283
+ var version2 = "15.3.0";
38284
38284
  var package_default = {
38285
38285
  name,
38286
38286
  version: version2,
@@ -38292,6 +38292,9 @@ var package_default = {
38292
38292
  ],
38293
38293
  skills: [
38294
38294
  "dist/skills"
38295
+ ],
38296
+ bin: [
38297
+ "bin"
38295
38298
  ]
38296
38299
  },
38297
38300
  repository: {
@@ -44085,7 +44088,14 @@ function resolveSkillsDirectory() {
44085
44088
  var SKILLS_DIRECTORY = resolveSkillsDirectory();
44086
44089
  var DISPATCH_FIRST_CONTEXT = readDispatchFirstContext(dispatchFirstSkillFile(SKILLS_DIRECTORY));
44087
44090
  var PLUGIN_BIN = resolve4(dirname2(fileURLToPath(import.meta.url)), "..", "bin");
44088
- if (!(process.env.PATH ?? "").split(delimiter).includes(PLUGIN_BIN)) {
44091
+ var pluginBinOnPath = (process.env.PATH ?? "").split(delimiter).some((entry) => {
44092
+ try {
44093
+ return entry !== "" && realpathSync2(entry) === PLUGIN_BIN;
44094
+ } catch {
44095
+ return false;
44096
+ }
44097
+ });
44098
+ if (!pluginBinOnPath) {
44089
44099
  process.env.PATH = `${PLUGIN_BIN}${delimiter}${process.env.PATH ?? ""}`;
44090
44100
  }
44091
44101
  process.env.DISPATCH_HOST = "omp";
@@ -66,6 +66,7 @@ Link each item you name:
66
66
  ```text
67
67
  dispatch://KEY
68
68
  dispatch://KEY/spec
69
+ dispatch://KEY/spec#b-<block>[@vN]
69
70
  dispatch://KEY/artifact/<slug>[@vN]
70
71
  dispatch://KEY/ask/<id>
71
72
  dispatch://KEY/ask/<id>#b-<part>[@vN]
@@ -20,55 +20,56 @@ Part | Content
20
20
  `Goals and non-goals` | What is in and out of scope
21
21
  `Requirements` | `**R1.**` on, each naming its source (`From:`)
22
22
  `Design` | How it meets them; a value and its reason for each limit, size and time
23
- `Decisions` | Your own choices
23
+ `Decisions` | One line: `The decisions are in dispatch://KEY/artifact/decisions-md.`
24
24
  `Acceptance` | `**A1.**` on, each naming the requirements it tests
25
25
 
26
- Another agent can build and check the work from the spec alone. A small change gets a few sentences per part, no matrix. Split a large design into child issues.
26
+ Another agent can build and check the work from the spec alone. A small change gets a few sentences per part, no matrix; split a large design into child issues.
27
27
 
28
28
  ## Rules for the text
29
29
 
30
30
  For each spec, ask, comment and message:
31
31
 
32
32
  - Write in `skill://asd-ste100`'s strict mode.
33
- - Write about the current design, never the person or how people reached it. Never quote people or upload their words.
33
+ - Write about the current design, never the person or how people reached it, and never quote people or upload their words.
34
34
  - Link each source where the person wrote it, each id whole. With no link, state the design.
35
35
  - In a spec, cite code by file and symbol, never a line number: it goes stale at the next edit.
36
- - A sentence that cites a gate passing (a test, review, check or proof) also says what the pass does not show: "The tests pass; they catch a wrong verdict, not a proof of a contradiction."
36
+ - A sentence that cites a gate passing (test, review, check, proof) also says what the pass does not show: "Tests pass: a wrong verdict, not a missing one."
37
37
  - Name your session only if a reader must reach it.
38
38
  - Keep only text that helps a reader understand, decide, build, check.
39
- - Explain each name or term a new reader may not know. Say in a clause what each issue you name does for this reader.
39
+ - Explain each name or term a new reader may not know, and what each issue you name does for them.
40
40
  - In an ask, ask block, comment or message, name a requirement or check by what it is, never its number.
41
41
 
42
42
  ## Questions
43
43
 
44
- - Name the concrete case first: which machines, files, sessions or people, and the numbers. Then ask the choice in those terms, never "Which option?": a reader cannot work back from a general question to the case.
45
- - Propose an answer to each point, numbers included, with a reason.
46
- - A choice inside what the person asked for, or one their messages favour, is settled: decide it.
44
+ - Name the concrete case first: which machines, files, sessions or people, and the numbers. Then ask the choice in those terms, never "Which option?".
45
+ - A choice inside what the person asked for, or one their messages favour, is yours: decide it.
47
46
  - Ask only for the person's authority, taste or risk appetite, when options differ on what they care about.
48
- - Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks): 2 to 4 options with costs, your recommendation, answerable on a phone.
47
+ - Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks): 2 to 4 options with costs, your recommendation and its reason, answerable on a phone.
49
48
 
50
49
  ## Each version
51
50
 
52
- 1. After a person's answer, comment or edit, rewrite what it touches; delete what it contradicts. Never narrate an edit or what used to be here; versions and comments hold the history. Reply in a comment's thread.
53
- 2. Before each spec write, paste the whole spec, never a path, into a fresh subagent's assignment. It lists gaps, conflicts, uncheckable requirements, unclear text, and missing or needless questions. Fix or record each.
51
+ 1. After a person's answer, comment or edit, rewrite what it touches and delete what it contradicts. Never narrate an edit or what used to be here: versions and comments hold the history. Reply in a comment's thread.
52
+ 2. Before each spec write, paste the whole spec, never a path, into a fresh subagent: it lists gaps, conflicts, uncheckable requirements, unclear text and missing or needless questions. Fix or record each.
54
53
  3. Before each approval request, `wait` for a read-only fact check: `task(agent="scout")`.
55
54
  4. Name each version with `dispatch doc-edit --summary`.
56
55
 
57
56
  ## Decisions
58
57
 
59
- - Each design choice no source states is a `###` entry: choice, reason, options weighed, parts shaped.
60
- - An unsure entry adds an `Unsure:` paragraph: what would change your mind.
61
- - A replaced entry moves under a final `### Replaced`.
62
- - Link a person's answered ask block from each part it shapes.
58
+ Each choice you made alone, and each a person made in an answered ask, is a `##` section of the issue's `decisions.md`.
59
+
60
+ - The heading names the choice; the text gives the reason and the options weighed.
61
+ - Link each spec block it shaped, `dispatch://KEY/spec#b-<id>` (`doc-read --blocks` lists the ids), and a person's decision its ask, `dispatch://KEY/ask/<id>`.
62
+ - An unsure section adds a paragraph that starts `Unsure:`: what would change your mind.
63
+ - A replaced section moves under a final `## Replaced` as a `###`.
63
64
 
64
65
  ## Old specs
65
66
 
66
- At your next edit, rewrite a spec outside the outline whole, in one version. Move its ask blocks with `doc-edit`'s `move`. Kept text follows the text rules: restate each retelling, quotation or unlinked attribution as design, or cut it.
67
+ At your next edit, rewrite a spec outside the outline whole in one version, moving its ask blocks with `doc-edit`'s `move`; restate each retelling, quotation or unlinked attribution as design, or cut it.
67
68
 
68
69
  ## Approval
69
70
 
70
- - Request approval once, when each ask block is answered or waived, each claim is checked, and this version is unapproved. Unbuilt acceptance checks never delay it.
71
- - After approval, version only a change to scope, acceptance, cost, risk or a person's decision, all at once. Put other fixes in the plan or a comment.
71
+ - Request approval once: each ask block answered or waived, each claim checked, this version unapproved. Unbuilt acceptance checks never delay it.
72
+ - After approval, version only a change to scope, acceptance, cost, risk or a person's decision, all at once; put other fixes in the plan or a comment.
72
73
 
73
74
  ## The plan
74
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {
@@ -9,6 +9,9 @@
9
9
  ],
10
10
  "skills": [
11
11
  "dist/skills"
12
+ ],
13
+ "bin": [
14
+ "bin"
12
15
  ]
13
16
  },
14
17
  "repository": {