@introspection-ai/recipes 0.43.0 → 0.44.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 (209) hide show
  1. package/dist/agents.d.ts.map +1 -1
  2. package/dist/agents.js +11 -4
  3. package/dist/agents.js.map +1 -1
  4. package/dist/api/session.d.ts +2 -1
  5. package/dist/api/session.d.ts.map +1 -1
  6. package/dist/artifact-review-tui.d.ts +0 -2
  7. package/dist/artifact-review-tui.d.ts.map +1 -1
  8. package/dist/artifact-review-tui.js +1 -1
  9. package/dist/artifact-review-tui.js.map +1 -1
  10. package/dist/artifact-review.d.ts +30 -13
  11. package/dist/artifact-review.d.ts.map +1 -1
  12. package/dist/artifact-review.js +80 -12
  13. package/dist/artifact-review.js.map +1 -1
  14. package/dist/artifact-viewer-tui.d.ts.map +1 -1
  15. package/dist/artifact-viewer-tui.js.map +1 -1
  16. package/dist/artifact-viewer.d.ts +1 -63
  17. package/dist/artifact-viewer.d.ts.map +1 -1
  18. package/dist/artifact-viewer.js +6 -9
  19. package/dist/artifact-viewer.js.map +1 -1
  20. package/dist/ask-user-question.d.ts +0 -32
  21. package/dist/ask-user-question.d.ts.map +1 -1
  22. package/dist/ask-user-question.js +9 -5
  23. package/dist/ask-user-question.js.map +1 -1
  24. package/dist/channels/index.d.ts +1 -1
  25. package/dist/channels/index.d.ts.map +1 -1
  26. package/dist/channels/index.js +1 -1
  27. package/dist/channels/index.js.map +1 -1
  28. package/dist/channels/module.d.ts.map +1 -1
  29. package/dist/channels/module.js +15 -5
  30. package/dist/channels/module.js.map +1 -1
  31. package/dist/channels/refs.d.ts.map +1 -1
  32. package/dist/channels/refs.js +10 -2
  33. package/dist/channels/refs.js.map +1 -1
  34. package/dist/channels/tools.d.ts.map +1 -1
  35. package/dist/channels/tools.js +80 -36
  36. package/dist/channels/tools.js.map +1 -1
  37. package/dist/child/agent-completions.d.ts.map +1 -1
  38. package/dist/child/agent-completions.js +3 -1
  39. package/dist/child/agent-completions.js.map +1 -1
  40. package/dist/child/agent-store.d.ts +3 -2
  41. package/dist/child/agent-store.d.ts.map +1 -1
  42. package/dist/child/agent-store.js.map +1 -1
  43. package/dist/child/agent.d.ts.map +1 -1
  44. package/dist/child/agent.js +1 -3
  45. package/dist/child/agent.js.map +1 -1
  46. package/dist/child/session.d.ts +2 -2
  47. package/dist/child/session.d.ts.map +1 -1
  48. package/dist/child/session.js +1 -3
  49. package/dist/child/session.js.map +1 -1
  50. package/dist/connector-tools.d.ts +5 -4
  51. package/dist/connector-tools.d.ts.map +1 -1
  52. package/dist/connector-tools.js +19 -9
  53. package/dist/connector-tools.js.map +1 -1
  54. package/dist/documents/index.d.ts +3 -3
  55. package/dist/documents/index.d.ts.map +1 -1
  56. package/dist/documents/index.js +1 -1
  57. package/dist/documents/index.js.map +1 -1
  58. package/dist/documents/module.d.ts +0 -2
  59. package/dist/documents/module.d.ts.map +1 -1
  60. package/dist/documents/module.js +30 -11
  61. package/dist/documents/module.js.map +1 -1
  62. package/dist/documents/profile.d.ts.map +1 -1
  63. package/dist/documents/profile.js +10 -4
  64. package/dist/documents/profile.js.map +1 -1
  65. package/dist/documents/python.d.ts.map +1 -1
  66. package/dist/documents/python.js +12 -3
  67. package/dist/documents/python.js.map +1 -1
  68. package/dist/documents/tools.d.ts.map +1 -1
  69. package/dist/documents/tools.js +105 -29
  70. package/dist/documents/tools.js.map +1 -1
  71. package/dist/documents/types.d.ts.map +1 -1
  72. package/dist/extensions.d.ts.map +1 -1
  73. package/dist/extensions.js +6 -2
  74. package/dist/extensions.js.map +1 -1
  75. package/dist/genai-spans-file.d.ts +1 -14
  76. package/dist/genai-spans-file.d.ts.map +1 -1
  77. package/dist/genai-spans-file.js +5 -3
  78. package/dist/genai-spans-file.js.map +1 -1
  79. package/dist/index.d.ts +1 -1
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/index.js.map +1 -1
  83. package/dist/inspect.d.ts.map +1 -1
  84. package/dist/inspect.js +2 -3
  85. package/dist/inspect.js.map +1 -1
  86. package/dist/interaction-tui.d.ts +0 -2
  87. package/dist/interaction-tui.d.ts.map +1 -1
  88. package/dist/interaction-tui.js +9 -4
  89. package/dist/interaction-tui.js.map +1 -1
  90. package/dist/interactions.d.ts.map +1 -1
  91. package/dist/interactions.js +1 -3
  92. package/dist/interactions.js.map +1 -1
  93. package/dist/mcp/catalog.d.ts.map +1 -1
  94. package/dist/mcp/catalog.js.map +1 -1
  95. package/dist/mcp/cli/command-context.d.ts.map +1 -1
  96. package/dist/mcp/cli/command-context.js.map +1 -1
  97. package/dist/mcp/cli/core.d.ts +0 -41
  98. package/dist/mcp/cli/core.d.ts.map +1 -1
  99. package/dist/mcp/cli/core.js +79 -37
  100. package/dist/mcp/cli/core.js.map +1 -1
  101. package/dist/mcp/cli/help.js +3 -3
  102. package/dist/mcp/cli/help.js.map +1 -1
  103. package/dist/mcp/cli/index.js.map +1 -1
  104. package/dist/mcp/cli/policy.d.ts +2 -1
  105. package/dist/mcp/cli/policy.d.ts.map +1 -1
  106. package/dist/mcp/cli/policy.js +19 -11
  107. package/dist/mcp/cli/policy.js.map +1 -1
  108. package/dist/mcp/client-entry.js.map +1 -1
  109. package/dist/mcp/contract.d.ts.map +1 -1
  110. package/dist/mcp/contract.js +8 -3
  111. package/dist/mcp/contract.js.map +1 -1
  112. package/dist/mcp/daemon/client.d.ts +4 -0
  113. package/dist/mcp/daemon/client.d.ts.map +1 -1
  114. package/dist/mcp/daemon/client.js +4 -0
  115. package/dist/mcp/daemon/client.js.map +1 -1
  116. package/dist/mcp/daemon/index.js +9 -4
  117. package/dist/mcp/daemon/index.js.map +1 -1
  118. package/dist/mcp/daemon/protocol.d.ts +7 -6
  119. package/dist/mcp/daemon/protocol.d.ts.map +1 -1
  120. package/dist/mcp/index.d.ts +2 -6
  121. package/dist/mcp/index.d.ts.map +1 -1
  122. package/dist/mcp/index.js +36 -20
  123. package/dist/mcp/index.js.map +1 -1
  124. package/dist/mcp/tools.d.ts +1 -14
  125. package/dist/mcp/tools.d.ts.map +1 -1
  126. package/dist/mcp/tools.js +9 -4
  127. package/dist/mcp/tools.js.map +1 -1
  128. package/dist/mcp-chunks/{chunk-EZKOZO3F.js → chunk-GODH4VLN.js} +179 -70
  129. package/dist/mcp-daemon.js +29 -19
  130. package/dist/mcp-run-worker.js +1 -1
  131. package/dist/memory.d.ts.map +1 -1
  132. package/dist/memory.js +1 -1
  133. package/dist/memory.js.map +1 -1
  134. package/dist/model-binding.d.ts +4 -5
  135. package/dist/model-binding.d.ts.map +1 -1
  136. package/dist/model-binding.js +5 -5
  137. package/dist/model-binding.js.map +1 -1
  138. package/dist/pi-extension.d.ts.map +1 -1
  139. package/dist/pi-extension.js +39 -33
  140. package/dist/pi-extension.js.map +1 -1
  141. package/dist/python.d.ts.map +1 -1
  142. package/dist/python.js +5 -1
  143. package/dist/python.js.map +1 -1
  144. package/dist/recipe/agent.d.ts +9 -6
  145. package/dist/recipe/agent.d.ts.map +1 -1
  146. package/dist/recipe/agent.js +23 -28
  147. package/dist/recipe/agent.js.map +1 -1
  148. package/dist/recipe/companions.d.ts +0 -15
  149. package/dist/recipe/companions.d.ts.map +1 -1
  150. package/dist/recipe/companions.js +29 -11
  151. package/dist/recipe/companions.js.map +1 -1
  152. package/dist/recipe/extensions.d.ts.map +1 -1
  153. package/dist/recipe/extensions.js +23 -6
  154. package/dist/recipe/extensions.js.map +1 -1
  155. package/dist/recipe/mcp-config.d.ts +0 -12
  156. package/dist/recipe/mcp-config.d.ts.map +1 -1
  157. package/dist/recipe/mcp-config.js +1 -70
  158. package/dist/recipe/mcp-config.js.map +1 -1
  159. package/dist/recipe/model.d.ts +8 -7
  160. package/dist/recipe/model.d.ts.map +1 -1
  161. package/dist/recipe/model.js +2 -6
  162. package/dist/recipe/model.js.map +1 -1
  163. package/dist/recipe/package.d.ts +3 -16
  164. package/dist/recipe/package.d.ts.map +1 -1
  165. package/dist/recipe/package.js +105 -40
  166. package/dist/recipe/package.js.map +1 -1
  167. package/dist/recipe/python.d.ts +0 -8
  168. package/dist/recipe/python.d.ts.map +1 -1
  169. package/dist/recipe/python.js +40 -13
  170. package/dist/recipe/python.js.map +1 -1
  171. package/dist/recipe/resolve.d.ts.map +1 -1
  172. package/dist/recipe/resolve.js +4 -9
  173. package/dist/recipe/resolve.js.map +1 -1
  174. package/dist/recipe/session.d.ts +3 -2
  175. package/dist/recipe/session.d.ts.map +1 -1
  176. package/dist/recipe/session.js +4 -3
  177. package/dist/recipe/session.js.map +1 -1
  178. package/dist/recipe/skills-prompt.d.ts.map +1 -1
  179. package/dist/recipe/skills-prompt.js +6 -1
  180. package/dist/recipe/skills-prompt.js.map +1 -1
  181. package/dist/recipe/skills.d.ts +0 -6
  182. package/dist/recipe/skills.d.ts.map +1 -1
  183. package/dist/recipe/skills.js +8 -5
  184. package/dist/recipe/skills.js.map +1 -1
  185. package/dist/recipe/suggestions.d.ts.map +1 -1
  186. package/dist/recipe/suggestions.js +21 -8
  187. package/dist/recipe/suggestions.js.map +1 -1
  188. package/dist/run-controller.d.ts +0 -2
  189. package/dist/run-controller.d.ts.map +1 -1
  190. package/dist/run-controller.js +4 -2
  191. package/dist/run-controller.js.map +1 -1
  192. package/dist/session.d.ts +10 -4
  193. package/dist/session.d.ts.map +1 -1
  194. package/dist/session.js +30 -26
  195. package/dist/session.js.map +1 -1
  196. package/dist/skill-progress.d.ts +69 -20
  197. package/dist/skill-progress.d.ts.map +1 -1
  198. package/dist/skill-progress.js +153 -37
  199. package/dist/skill-progress.js.map +1 -1
  200. package/dist/suggestion-picker.d.ts +0 -3
  201. package/dist/suggestion-picker.d.ts.map +1 -1
  202. package/dist/suggestion-picker.js +4 -2
  203. package/dist/suggestion-picker.js.map +1 -1
  204. package/dist/test-utils.d.ts.map +1 -1
  205. package/dist/test-utils.js.map +1 -1
  206. package/docs/agent-composition.md +1 -0
  207. package/docs/pi-extension.md +41 -5
  208. package/docs/recipe-format.md +6 -0
  209. package/package.json +18 -6
@@ -94,6 +94,7 @@ Omission means "inherit" for a derived agent. Declaring a field means
94
94
  | `session` | Merges by key; nested settings objects merge recursively |
95
95
  | `tools` | Child array replaces the inherited allowlist; `[]` clears it |
96
96
  | `skills` | Child array replaces the inherited selection; `[]` clears it |
97
+ | `phases` | Child array replaces the inherited phases; omission inherits them |
97
98
  | `subagents` | Child array replaces inherited visibility; `[]` clears it |
98
99
  | `mcp` | Omission inherits; a declared block replaces the complete inherited policy |
99
100
  | `system_instructions` | Omission inherits; `append` composes after inherited instructions; `replace` replaces the complete inherited prompt |
@@ -57,7 +57,30 @@ A Recipe agent's step shows in Pi's footer, with how long the agent has worked:
57
57
  ⧈ Introspection build ✓ brainstorm ▸ draft ○ review · 12:04
58
58
  ```
59
59
 
60
- Nothing is declared for it. The step is the agent's skill it last read, among the skills of the phase it lists first (`build-*` for an agent listing `build-brainstorm` first; others it consults, such as `eval-case`, don't move it): a skill named `<phase>-<step>` shows its phase's steps in the order the agent lists them, done ticked, the current one marked and the rest to come; any other skill shows by its name. The clock is the agent's working time from the start of the session, across every step, redrawn every second. It pauses while the person is in the loop, when the agent's turn has ended or a question or review is open, and the current step then shows ⏸ in place of ▸. It's never an estimate of what's left. Pi's "Working" line and the terminal title are left as they are. A resumed session shows its step at once, from its earlier reads.
60
+ Nothing need be declared for it. The step is the agent's skill it last read, among the skills of the phase it lists first (`build-*` for an agent listing `build-brainstorm` first; others it consults, such as `eval-case`, don't move it): a skill named `<phase>-<step>` shows its phase's steps in the order the agent lists them, done ticked, the current one marked and the rest to come; any other skill shows by its name. The clock is the agent's working time from the start of the session, across every step, redrawn every second. It pauses while the person is in the loop, when the agent's turn has ended or a question or review is open, and the current step then shows ⏸ in place of ▸. It's never an estimate of what's left. Pi's "Working" line and the terminal title are left as they are. A resumed session shows its step at once, from its earlier reads.
61
+
62
+ An agent that moves through several phases declares them in its agent file, in order:
63
+
64
+ ```yaml
65
+ skills: [build-brainstorm, build-draft, build-review, build-deploy, improve-collect, improve-classify, improve-propose, eval-run]
66
+ phases: [build, improve]
67
+ ```
68
+
69
+ The phase is then that of the last step skill it read, a skill named `<phase>-<step>` of a declared phase, and its steps and ticks are that phase's skills in the order listed. Reading `improve-classify` shows:
70
+
71
+ ```text
72
+ ⧈ Introspection improve ✓ collect ▸ classify ○ propose · 31:40
73
+ ```
74
+
75
+ Any other of the agent's skills is a helper: reading it never changes the phase, and it shows after the current step, its first dash as a space (`eval-run` as `eval run`, a name without a dash as it is), until the agent next reads a step:
76
+
77
+ ```text
78
+ ⧈ Introspection build ✓ brainstorm ▸ draft · eval run ○ review ○ deploy · 12:04
79
+ ```
80
+
81
+ A helper read counts the same way a step read does: a glance at its top (fewer than 100 lines, or `head`) doesn't. While the clock is paused the step shows ⏸ as before, and a resumed session restores phase, step and helper from its earlier reads. Without `phases`, the footer works as described above.
82
+
83
+ A host that draws its own line (the platform's task chat) passes `onRecipeStep` to `createAgentSession`, with or without a UI. It receives the same step as data, `{ skill, phase?, steps: [{ name, state: "done" | "current" | "todo" }], paused, worked_ms }`, whenever the step changes or the clock starts or stops, not every second; the host runs the clock on from `worked_ms` while `paused` is false. A skill outside a phase has no `steps` and shows by `skill`.
61
84
 
62
85
  ## The Recipe a session runs
63
86
 
@@ -175,10 +198,23 @@ file has one, to the Submit tab; nothing is sent until the user submits there
175
198
  It is an interaction ([Interactions](interactions.md)), so it works on every
176
199
  host: over RPC each file is a select (`Approve`, `Request changes`, `Skip`),
177
200
  then a comment (required for changes); on a pause/resume host it pauses with
178
- `details.interrupt.metadata` `{ kind: "review_artifacts", items: [{ path, label }] }`
179
- for the host to render its own review, and resumes with `{ answer }` in the
180
- format below; headless runs and child agents decline, so nothing is approved
181
- without a person. The model sees, after `Answer: `:
201
+ `details.interrupt.metadata` `{ kind: "review_artifacts", items: [...] }` for
202
+ the host to render its own review, and resumes with `{ answer }` in the format
203
+ below; headless runs and child agents decline, so nothing is approved without a
204
+ person.
205
+
206
+ Each item carries what the reviewer is shown, so the host needs no access to
207
+ the files:
208
+
209
+ | Field | What it is |
210
+ | --- | --- |
211
+ | `path`, `label`, `section` | As given; `section` only when one was |
212
+ | `content` | The file as the terminal review shows it: front matter folded into one line, only `section` when given |
213
+ | `sha256` | Of the whole file on disk when asked (`null` when it doesn't exist), so a record of approval can say exactly which file was approved |
214
+ | `previous_content` | What this session's last review of the path showed, when the file has changed since; kept in memory only, so a restarted session sends none |
215
+ | `truncated` | `true` when `content` was cut to the interrupt's cap (256 KB of content across the review); the host lets such a file be read but not approved |
216
+
217
+ `details.files` holds `{ path, sha256 }` for every item, on every host. The model sees, after `Answer: `:
182
218
 
183
219
  ```text
184
220
  Reviewed 2 files: 1 approved, 1 with changes requested, 0 not reviewed.
@@ -132,6 +132,12 @@ All remaining agent fields are optional. Omitted `tools`, `skills`, and
132
132
  provider or session default. Omitted agent instructions preserve `SYSTEM.md`
133
133
  when present, or Pi's normal base prompt otherwise.
134
134
 
135
+ `phases` MAY list, in order, the phases the agent moves through, each the
136
+ prefix of its step skills (`build` for `build-draft`). It changes only what
137
+ Pi's footer shows: the phase of the step skill last read, with the agent's
138
+ other skills shown as helpers. See
139
+ [Where the agent is](pi-extension.md#where-the-agent-is).
140
+
135
141
  Recipe-authored configuration uses `snake_case`. `ai.options` is normalized at
136
142
  the Pi boundary to Pi's camelCase portable `streamSimple` request options, so
137
143
  newly added portable Pi options do not require a Recipe schema release. It is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@introspection-ai/recipes",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "The open format for vertical agents, built on Pi.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -106,10 +106,10 @@
106
106
  "@introspection-ai/recipe-channel-slack": ">=0.6.0",
107
107
  "@introspection-ai/recipe-documents-docx": ">=0.3.0",
108
108
  "@introspection-ai/recipe-documents-pdf": ">=0.2.0",
109
- "@introspection-ai/mcp-client-linux-x64": "0.43.0",
110
- "@introspection-ai/mcp-client-linux-arm64": "0.43.0",
111
- "@introspection-ai/mcp-client-darwin-arm64": "0.43.0",
112
- "@introspection-ai/mcp-client-darwin-x64": "0.43.0"
109
+ "@introspection-ai/mcp-client-linux-x64": "0.44.0",
110
+ "@introspection-ai/mcp-client-linux-arm64": "0.44.0",
111
+ "@introspection-ai/mcp-client-darwin-arm64": "0.44.0",
112
+ "@introspection-ai/mcp-client-darwin-x64": "0.44.0"
113
113
  },
114
114
  "peerDependencies": {
115
115
  "@earendil-works/pi-agent-core": ">=1.1.0 <2.0.0",
@@ -123,11 +123,19 @@
123
123
  "@earendil-works/pi-ai": "1.4.0",
124
124
  "@earendil-works/pi-coding-agent": "1.4.0",
125
125
  "@earendil-works/pi-tui": "1.4.0",
126
+ "@eslint/js": "9.39.5",
126
127
  "@types/node": "^26.1.2",
127
128
  "@types/semver": "^7.8.0",
129
+ "@typescript/native": "npm:typescript@^7.0.2",
128
130
  "esbuild": "^0.28.1",
131
+ "eslint": "9.39.5",
132
+ "eslint-config-prettier": "10.1.8",
133
+ "eslint-plugin-only-warn": "1.2.1",
134
+ "knip": "6.44.0",
135
+ "prettier": "3.9.10",
129
136
  "typebox": "^1.0.56",
130
- "typescript": "^7.0.2",
137
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
138
+ "typescript-eslint": "8.72.1",
131
139
  "vitest": "^5.0.1"
132
140
  },
133
141
  "scripts": {
@@ -137,6 +145,10 @@
137
145
  "build:native": "cargo build --release -p pi-mcp-client && node scripts/package-mcp-client.mjs",
138
146
  "bench:mcp-client": "pnpm build:ts && cargo build --release -p pi-mcp-client && node scripts/benchmark-mcp-client.mjs",
139
147
  "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json && pnpm --filter './packages/**' --filter './examples/**' typecheck",
148
+ "lint": "eslint . --max-warnings 0",
149
+ "format": "prettier --write \"{src,test,packages,examples}/**/*.{ts,mjs,md}\" \"*.{ts,mjs}\"",
150
+ "format:check": "prettier --check \"{src,test,packages,examples}/**/*.{ts,mjs,md}\" \"*.{ts,mjs}\"",
151
+ "knip": "knip",
140
152
  "test": "pnpm build:ts && cargo test -p pi-mcp-client -p introspection-recipe-check && cargo build -p pi-mcp-client && MCP_CLIENT_BIN=target/debug/mcp-client node scripts/package-mcp-client.mjs && vitest run && pnpm --filter './examples/**' test",
141
153
  "pack:check": "pnpm pack --dry-run --json | node scripts/check-npm-pack.mjs && pnpm --filter './packages/**' pack:check",
142
154
  "clean": "rm -rf dist .turbo node_modules target vendor/mcp-client"