@picassohq/cli 0.0.0-stage → 1.0.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.
Files changed (232) hide show
  1. package/agents/browser_agent.yaml +53 -0
  2. package/agents/code_reviewer.yaml +49 -0
  3. package/agents/codebase_investigator.yaml +70 -0
  4. package/agents/design_auditor.yaml +50 -0
  5. package/agents/devex_auditor.yaml +50 -0
  6. package/agents/doc_writer.yaml +54 -0
  7. package/agents/engineering_architect.yaml +51 -0
  8. package/agents/generalist.yaml +55 -0
  9. package/agents/migration_planner.yaml +51 -0
  10. package/agents/product_reviewer.yaml +48 -0
  11. package/agents/qa_operator.yaml +52 -0
  12. package/agents/release_engineer.yaml +50 -0
  13. package/agents/security_auditor.yaml +62 -0
  14. package/agents/test_writer.yaml +52 -0
  15. package/assets/first-light-lockup.png +0 -0
  16. package/assets/first-light-tagline.png +0 -0
  17. package/assets/house/README.md +26 -0
  18. package/assets/house/auraone-banner.png +0 -0
  19. package/assets/house/auraone-logo.png +0 -0
  20. package/assets/house/kiro-prism-banner.png +0 -0
  21. package/assets/house/kiro-prism-logo.png +0 -0
  22. package/assets/house/picasso-banner.png +0 -0
  23. package/assets/house/picasso-logo.png +0 -0
  24. package/assets/wordmark-app.png +0 -0
  25. package/assets/wordmark-tight.png +0 -0
  26. package/assets/wordmark.png +0 -0
  27. package/design/styles.css +1042 -0
  28. package/dist/build-info.json +37 -0
  29. package/dist/index.js +3062 -0
  30. package/goals/cli-hardening.yaml +40 -0
  31. package/goals/repo-maintenance.yaml +40 -0
  32. package/package.json +49 -4
  33. package/runtime/dsh/picasso-ecosystem.community.amendments.yml +24 -0
  34. package/runtime/dsh/picasso-ecosystem.community.json +185 -0
  35. package/runtime/dsh/picasso-ecosystem.community.patch.yml +40 -0
  36. package/runtime/dsh/picasso-ecosystem.cordis.patch.yml +143 -0
  37. package/runtime/dsh/picasso-isolation.patch.yml +25 -0
  38. package/runtime/dsh/picasso-providers.patch.yml +373 -0
  39. package/runtime/dsh/picasso-runtime.cordis.yml +738 -0
  40. package/runtime/dsh/picasso-sdk.patch.yml +204 -0
  41. package/runtime/engine-manifest.json +215 -0
  42. package/runtime/package.json +6 -0
  43. package/runtime/packages/picasso-cache-probe/cordis.patch.yml +5 -0
  44. package/runtime/packages/picasso-cache-probe/index.js +477 -0
  45. package/runtime/packages/picasso-cache-probe/package.json +38 -0
  46. package/runtime/packages/picasso-commands/cordis.patch.yml +4 -0
  47. package/runtime/packages/picasso-commands/fresh-review.js +573 -0
  48. package/runtime/packages/picasso-commands/index.js +497 -0
  49. package/runtime/packages/picasso-commands/package.json +28 -0
  50. package/runtime/packages/picasso-instructions/conflicts.js +115 -0
  51. package/runtime/packages/picasso-instructions/formats.js +145 -0
  52. package/runtime/packages/picasso-instructions/frontmatter.js +175 -0
  53. package/runtime/packages/picasso-instructions/glob.js +114 -0
  54. package/runtime/packages/picasso-instructions/globals.js +90 -0
  55. package/runtime/packages/picasso-instructions/imports.js +123 -0
  56. package/runtime/packages/picasso-instructions/index.js +326 -0
  57. package/runtime/packages/picasso-instructions/modes.js +64 -0
  58. package/runtime/packages/picasso-instructions/package.json +30 -0
  59. package/runtime/packages/picasso-instructions/parse.js +134 -0
  60. package/runtime/packages/picasso-instructions/report.js +161 -0
  61. package/runtime/packages/picasso-instructions/resolve.js +939 -0
  62. package/runtime/packages/picasso-instructions/scan.js +181 -0
  63. package/runtime/packages/picasso-instructions/settings.js +150 -0
  64. package/runtime/packages/picasso-instructions/skills.js +345 -0
  65. package/runtime/packages/picasso-lean-context/cordis.patch.yml +13 -0
  66. package/runtime/packages/picasso-lean-context/index.js +6280 -0
  67. package/runtime/packages/picasso-lean-context/package.json +26 -0
  68. package/runtime/packages/picasso-lean-context/read-image-recovery.js +306 -0
  69. package/runtime/packages/picasso-lean-context/timeline.js +418 -0
  70. package/runtime/packages/picasso-librarian/classify.js +146 -0
  71. package/runtime/packages/picasso-librarian/cordis.patch.yml +10 -0
  72. package/runtime/packages/picasso-librarian/index.js +878 -0
  73. package/runtime/packages/picasso-librarian/notes.js +159 -0
  74. package/runtime/packages/picasso-librarian/package.json +34 -0
  75. package/runtime/packages/picasso-librarian/state.js +478 -0
  76. package/runtime/packages/picasso-memory/index.js +1184 -0
  77. package/runtime/packages/picasso-memory/package.json +21 -0
  78. package/runtime/packages/picasso-model-router/connections.js +912 -0
  79. package/runtime/packages/picasso-model-router/cordis.patch.yml +17 -0
  80. package/runtime/packages/picasso-model-router/index.js +1083 -0
  81. package/runtime/packages/picasso-model-router/package.json +30 -0
  82. package/runtime/packages/picasso-options/cordis.patch.yml +4 -0
  83. package/runtime/packages/picasso-options/index.js +263 -0
  84. package/runtime/packages/picasso-options/package.json +28 -0
  85. package/runtime/packages/picasso-progress-reports/cordis.patch.yml +10 -0
  86. package/runtime/packages/picasso-progress-reports/index.js +267 -0
  87. package/runtime/packages/picasso-progress-reports/package.json +30 -0
  88. package/runtime/packages/picasso-progress-reports/report.js +235 -0
  89. package/runtime/packages/picasso-sdk-server/aside.js +142 -0
  90. package/runtime/packages/picasso-sdk-server/connections.js +38 -0
  91. package/runtime/packages/picasso-sdk-server/context-timeline.js +27 -0
  92. package/runtime/packages/picasso-sdk-server/egress-gate.js +520 -0
  93. package/runtime/packages/picasso-sdk-server/failure-policy.js +246 -0
  94. package/runtime/packages/picasso-sdk-server/file-input.js +169 -0
  95. package/runtime/packages/picasso-sdk-server/goal.js +131 -0
  96. package/runtime/packages/picasso-sdk-server/ignore-file.js +458 -0
  97. package/runtime/packages/picasso-sdk-server/ignore-plugin.js +12 -0
  98. package/runtime/packages/picasso-sdk-server/ignore-sandbox.js +122 -0
  99. package/runtime/packages/picasso-sdk-server/ignore-snapshot.js +131 -0
  100. package/runtime/packages/picasso-sdk-server/image-input.js +44 -0
  101. package/runtime/packages/picasso-sdk-server/index.js +891 -0
  102. package/runtime/packages/picasso-sdk-server/instructions.js +34 -0
  103. package/runtime/packages/picasso-sdk-server/jobs.js +113 -0
  104. package/runtime/packages/picasso-sdk-server/mcp-gate.js +51 -0
  105. package/runtime/packages/picasso-sdk-server/model-selection.js +162 -0
  106. package/runtime/packages/picasso-sdk-server/package.json +50 -0
  107. package/runtime/packages/picasso-sdk-server/picasso-records.js +50 -0
  108. package/runtime/packages/picasso-sdk-server/provider-reload.js +84 -0
  109. package/runtime/packages/picasso-sdk-server/queue.js +322 -0
  110. package/runtime/packages/picasso-sdk-server/requester.js +43 -0
  111. package/runtime/packages/picasso-sdk-server/rewind.js +108 -0
  112. package/runtime/packages/picasso-sdk-server/schedule.js +187 -0
  113. package/runtime/packages/picasso-sdk-server/session-grants.js +35 -0
  114. package/runtime/packages/picasso-sdk-server/session-state.js +118 -0
  115. package/runtime/packages/picasso-sdk-server/shell-paths.js +869 -0
  116. package/runtime/packages/picasso-sdk-server/stream-deltas.js +211 -0
  117. package/runtime/packages/picasso-sdk-server/team-tasks.js +451 -0
  118. package/runtime/packages/picasso-sdk-server/tool-output.js +128 -0
  119. package/runtime/packages/picasso-sdk-server/tools-list.js +51 -0
  120. package/runtime/packages/picasso-sdk-server/wave2-hooks.js +612 -0
  121. package/runtime/packages/picasso-sdk-server/workspace-archive.js +170 -0
  122. package/runtime/packages/picasso-sdk-server/workspace-restore.js +180 -0
  123. package/runtime/packages/picasso-web-search/backends.js +412 -0
  124. package/runtime/packages/picasso-web-search/config.js +121 -0
  125. package/runtime/packages/picasso-web-search/cordis.patch.yml +7 -0
  126. package/runtime/packages/picasso-web-search/failure.js +116 -0
  127. package/runtime/packages/picasso-web-search/format.js +42 -0
  128. package/runtime/packages/picasso-web-search/index.js +71 -0
  129. package/runtime/packages/picasso-web-search/package.json +38 -0
  130. package/runtime/packages/picasso-web-search/router.js +156 -0
  131. package/runtime/packages/picasso-x-reader/circle.js +324 -0
  132. package/runtime/packages/picasso-x-reader/command.js +169 -0
  133. package/runtime/packages/picasso-x-reader/cordis.patch.yml +8 -0
  134. package/runtime/packages/picasso-x-reader/index.js +170 -0
  135. package/runtime/packages/picasso-x-reader/package.json +39 -0
  136. package/runtime/packages/picasso-x-reader/read.js +370 -0
  137. package/runtime/packages/picasso-x-reader/rewrite.js +38 -0
  138. package/runtime/packages/picasso-x-reader/settings.js +131 -0
  139. package/runtime/packages/picasso-x-reader/urls.js +154 -0
  140. package/runtime/packages/picasso-x-reader/xmd.js +512 -0
  141. package/runtime/plugins/picasso-auth-bridge/index.js +380 -0
  142. package/runtime/plugins/picasso-auth-bridge/package.json +28 -0
  143. package/runtime/plugins/picasso-auto-approve/index.js +1003 -0
  144. package/runtime/plugins/picasso-auto-approve/package.json +28 -0
  145. package/runtime/plugins/picasso-browser/index.js +424 -0
  146. package/runtime/plugins/picasso-browser/package.json +28 -0
  147. package/runtime/plugins/picasso-checkpoints/evidence.js +210 -0
  148. package/runtime/plugins/picasso-checkpoints/index.js +885 -0
  149. package/runtime/plugins/picasso-checkpoints/package.json +29 -0
  150. package/runtime/plugins/picasso-commands/fresh-review.js +573 -0
  151. package/runtime/plugins/picasso-commands/index.js +497 -0
  152. package/runtime/plugins/picasso-commands/package.json +28 -0
  153. package/runtime/plugins/picasso-instructions/conflicts.js +115 -0
  154. package/runtime/plugins/picasso-instructions/formats.js +145 -0
  155. package/runtime/plugins/picasso-instructions/frontmatter.js +175 -0
  156. package/runtime/plugins/picasso-instructions/glob.js +114 -0
  157. package/runtime/plugins/picasso-instructions/globals.js +90 -0
  158. package/runtime/plugins/picasso-instructions/imports.js +123 -0
  159. package/runtime/plugins/picasso-instructions/index.js +326 -0
  160. package/runtime/plugins/picasso-instructions/modes.js +64 -0
  161. package/runtime/plugins/picasso-instructions/package.json +30 -0
  162. package/runtime/plugins/picasso-instructions/parse.js +134 -0
  163. package/runtime/plugins/picasso-instructions/report.js +161 -0
  164. package/runtime/plugins/picasso-instructions/resolve.js +939 -0
  165. package/runtime/plugins/picasso-instructions/scan.js +181 -0
  166. package/runtime/plugins/picasso-instructions/settings.js +150 -0
  167. package/runtime/plugins/picasso-instructions/skills.js +345 -0
  168. package/runtime/plugins/picasso-lean-context/index.js +6280 -0
  169. package/runtime/plugins/picasso-lean-context/package.json +26 -0
  170. package/runtime/plugins/picasso-lean-context/read-image-recovery.js +306 -0
  171. package/runtime/plugins/picasso-lean-context/timeline.js +418 -0
  172. package/runtime/plugins/picasso-librarian/classify.js +146 -0
  173. package/runtime/plugins/picasso-librarian/index.js +878 -0
  174. package/runtime/plugins/picasso-librarian/notes.js +159 -0
  175. package/runtime/plugins/picasso-librarian/package.json +34 -0
  176. package/runtime/plugins/picasso-librarian/state.js +478 -0
  177. package/runtime/plugins/picasso-lifecycle-hooks/index.js +186 -0
  178. package/runtime/plugins/picasso-lifecycle-hooks/package.json +25 -0
  179. package/runtime/plugins/picasso-mail/inbox.js +207 -0
  180. package/runtime/plugins/picasso-mail/index.js +293 -0
  181. package/runtime/plugins/picasso-mail/package.json +22 -0
  182. package/runtime/plugins/picasso-memory/index.js +1184 -0
  183. package/runtime/plugins/picasso-memory/package.json +21 -0
  184. package/runtime/plugins/picasso-model-router/connections.js +912 -0
  185. package/runtime/plugins/picasso-model-router/index.js +1083 -0
  186. package/runtime/plugins/picasso-model-router/package.json +30 -0
  187. package/runtime/plugins/picasso-options/index.js +263 -0
  188. package/runtime/plugins/picasso-options/package.json +28 -0
  189. package/runtime/plugins/picasso-progress-reports/index.js +267 -0
  190. package/runtime/plugins/picasso-progress-reports/package.json +30 -0
  191. package/runtime/plugins/picasso-progress-reports/report.js +235 -0
  192. package/runtime/plugins/picasso-provider-models/index.js +436 -0
  193. package/runtime/plugins/picasso-provider-models/package.json +28 -0
  194. package/runtime/plugins/picasso-repo-index/index.js +1850 -0
  195. package/runtime/plugins/picasso-repo-index/package.json +28 -0
  196. package/runtime/plugins/picasso-schedule-pause/index.js +344 -0
  197. package/runtime/plugins/picasso-schedule-pause/package.json +28 -0
  198. package/runtime/plugins/picasso-session-lifecycle/index.js +796 -0
  199. package/runtime/plugins/picasso-session-lifecycle/package.json +28 -0
  200. package/runtime/plugins/picasso-trackers/index.js +895 -0
  201. package/runtime/plugins/picasso-trackers/package.json +28 -0
  202. package/runtime/plugins/picasso-web-search/backends.js +412 -0
  203. package/runtime/plugins/picasso-web-search/config.js +121 -0
  204. package/runtime/plugins/picasso-web-search/failure.js +116 -0
  205. package/runtime/plugins/picasso-web-search/format.js +42 -0
  206. package/runtime/plugins/picasso-web-search/index.js +71 -0
  207. package/runtime/plugins/picasso-web-search/package.json +38 -0
  208. package/runtime/plugins/picasso-web-search/router.js +156 -0
  209. package/runtime/plugins/picasso-x-reader/circle.js +324 -0
  210. package/runtime/plugins/picasso-x-reader/command.js +169 -0
  211. package/runtime/plugins/picasso-x-reader/index.js +170 -0
  212. package/runtime/plugins/picasso-x-reader/package.json +39 -0
  213. package/runtime/plugins/picasso-x-reader/read.js +370 -0
  214. package/runtime/plugins/picasso-x-reader/rewrite.js +38 -0
  215. package/runtime/plugins/picasso-x-reader/settings.js +131 -0
  216. package/runtime/plugins/picasso-x-reader/urls.js +154 -0
  217. package/runtime/plugins/picasso-x-reader/xmd.js +512 -0
  218. package/runtime/relay/attachment-text.mjs +737 -0
  219. package/runtime/relay/companion/companion.css +126 -0
  220. package/runtime/relay/companion/companion.js +648 -0
  221. package/runtime/relay/companion/icon.svg +5 -0
  222. package/runtime/relay/companion/index.html +25 -0
  223. package/runtime/relay/companion/manifest.json +13 -0
  224. package/runtime/relay/companion/sw.js +41 -0
  225. package/runtime/relay/main.mjs +38580 -0
  226. package/runtime/relay/model-listing.mjs +614 -0
  227. package/runtime/relay/versions-routes.mjs +1400 -0
  228. package/runtime/verify-plugins.mjs +205 -0
  229. package/runtime-lock/package-lock.json +10779 -0
  230. package/runtime-lock/package.json +7 -0
  231. package/scripts/install-runtime.mjs +400 -0
  232. package/README.md +0 -3
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@picasso/model-router",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "description": "dsh cordis plugin: deterministic per-request model routing (B12). Classifies each admitted prompt against a rule ladder and installs the tier's {provider, model, reasoningEffort?} via agents.selectForNextRequest \u2014 never session/selectModel, so the user's persisted default model is never rewritten. Explicit picks pin the session.",
6
+ "type": "module",
7
+ "main": "index.js",
8
+ "exports": {
9
+ ".": "./index.js",
10
+ "./cordis.patch.yml": "./cordis.patch.yml",
11
+ "./package.json": "./package.json",
12
+ "./connections.js": "./connections.js"
13
+ },
14
+ "dshTarget": "0.2.2-rc.3",
15
+ "dsh": {
16
+ "bundle": {
17
+ "patch": "./cordis.patch.yml"
18
+ }
19
+ },
20
+ "scripts": {
21
+ "test": "node --import ../../test/setup/hermetic-preload.mjs --test test/*.test.mjs"
22
+ },
23
+ "files": [
24
+ "index.js",
25
+ "connections.js",
26
+ "cordis.patch.yml",
27
+ "README.md"
28
+ ],
29
+ "license": "UNLICENSED"
30
+ }
@@ -0,0 +1,4 @@
1
+ # Picasso options — one bundle patch layer row (loader insert): the deferred `present_options` tool.
2
+ - insert:
3
+ - id: picasso-options
4
+ name: '@picasso/options'
@@ -0,0 +1,263 @@
1
+ // @picasso/options — `present_options`: show the person 2–4 options (rendered HTML, an image, code or text) and wait
2
+ // for their pick plus an optional note.
3
+ //
4
+ // A deferred tool (reached through `tool_call`, never on the Tier-1 wire). It asks through the engine's own
5
+ // user-questions service (`ctx.userQuestions.ask`), so every surface that already answers `ask_user_question` answers
6
+ // it too: the Mac relay holds it as a `user-questions/request` interaction, the TUI gets it as `question/request`.
7
+ // The request is a normal two-question batch, readable by any answerer:
8
+ // pick one choice per option (label = the option's title, description = a short preview line)
9
+ // note free text, optional (no choices; an empty answer is a skip)
10
+ // and the pick question carries a `presentation` record ({kind: 'picasso-options', version: 1, options: [...]}) with
11
+ // each option's kind and content or absolute path, so the Mac can open its options window (HTML and images in the
12
+ // Preview sandbox) and the TUI can step through previews. Nothing here answers for the person (C1): with no answerer
13
+ // the engine fails the call, and a skipped pick comes back as a skip.
14
+ import { readFileSync, realpathSync, statSync } from 'node:fs';
15
+ import { isAbsolute, relative, resolve } from 'node:path';
16
+
17
+ export const name = 'picasso-options';
18
+ export const dshTarget = '0.2.2-rc.3';
19
+ export const inject = ['tools', 'userQuestions'];
20
+
21
+ export const TOOL_NAME = 'present_options';
22
+ export const PRESENTATION_KIND = 'picasso-options';
23
+ export const PICK_ID = 'pick';
24
+ export const NOTE_ID = 'note';
25
+ export const KINDS = Object.freeze(['html', 'image', 'code', 'text']);
26
+ export const MIN_OPTIONS = 2;
27
+ export const MAX_OPTIONS = 4;
28
+ /** Inline content and text files read for a preview stay under this many characters. */
29
+ export const MAX_CONTENT_CHARS = 200_000;
30
+ /** An image or HTML file larger than this is refused (the Mac renders it in a pane). */
31
+ export const MAX_FILE_BYTES = 20 * 1024 * 1024;
32
+ export const MAX_TITLE_CHARS = 80;
33
+ const EXCERPT_CHARS = 160;
34
+
35
+ export const DESCRIPTION =
36
+ 'Show the user 2–4 options side by side and wait for their pick: rendered HTML, images, code or text. Use it when you' +
37
+ ' are unsure which look, layout, wording or approach they want and seeing the candidates beats describing them. Each' +
38
+ ' option has a short title, a kind (html, image, code or text) and either inline content or a file path (relative to' +
39
+ ' the working directory). The result names the picked option and any note the user added; if they skip, continue' +
40
+ ' without a pick and do not ask again.';
41
+
42
+ export const PARAMETERS = Object.freeze({
43
+ type: 'object',
44
+ properties: {
45
+ question: { type: 'string', description: 'What the user is choosing, in their terms (e.g. "Which header style should the landing page use?").' },
46
+ options: {
47
+ type: 'array',
48
+ minItems: MIN_OPTIONS,
49
+ maxItems: MAX_OPTIONS,
50
+ description: '2 to 4 candidates, in the order to show them.',
51
+ items: {
52
+ type: 'object',
53
+ properties: {
54
+ title: { type: 'string', description: 'Short distinct title, e.g. "Dark hero".' },
55
+ kind: { type: 'string', enum: [...KINDS], description: 'html: a page rendered in the preview; image: a picture; code: source shown monospaced; text: prose.' },
56
+ content: { type: 'string', description: 'Inline content: the HTML document, the code or the text. Omit when giving path.' },
57
+ path: { type: 'string', description: 'A file to show instead of inline content (required for image).' },
58
+ language: { type: 'string', description: 'Optional language name for code, e.g. "swift".' },
59
+ },
60
+ required: ['title', 'kind'],
61
+ additionalProperties: false,
62
+ },
63
+ },
64
+ },
65
+ required: ['question', 'options'],
66
+ additionalProperties: false,
67
+ });
68
+
69
+ const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
70
+ const nonEmpty = (value) => (typeof value === 'string' && value.trim() ? value.trim() : undefined);
71
+
72
+ /** The first meaningful line of text or code, trimmed to one preview line. */
73
+ export function excerptOf(text) {
74
+ const line = String(text ?? '').split(/\r?\n/).map((part) => part.trim()).find((part) => part.length > 0) ?? '';
75
+ return line.length > EXCERPT_CHARS ? `${line.slice(0, EXCERPT_CHARS - 1)}…` : line;
76
+ }
77
+
78
+ /** A short description line for the pick choice: an excerpt for text and code, the file for HTML and images. */
79
+ export function previewLine(option) {
80
+ if (option.path !== undefined) return option.kind === 'code' || option.kind === 'text' ? `${option.path} · ${excerptOf(option.content)}` : option.path;
81
+ if (option.kind === 'html') return 'HTML page';
82
+ return excerptOf(option.content);
83
+ }
84
+
85
+ /** Whether real path `real` is `root` or inside it (both already resolved through symlinks). */
86
+ function insideRoot(real, root) {
87
+ const rel = relative(root, real);
88
+ return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
89
+ }
90
+
91
+ /**
92
+ * The folders a preview file may come from: the session's working directory (the engine's workspace boundary) plus
93
+ * the sandbox policy's extra roots, each resolved through symlinks. Unresolvable roots are dropped.
94
+ */
95
+ export function previewRoots(cwd, extraRoots = [], fs = { realpathSync }) {
96
+ const out = [];
97
+ for (const root of [cwd, ...extraRoots]) {
98
+ if (typeof root !== 'string' || root.trim() === '') continue;
99
+ try {
100
+ const real = fs.realpathSync(resolve(root));
101
+ if (!out.includes(real)) out.push(real);
102
+ } catch {
103
+ // a root that does not exist admits nothing
104
+ }
105
+ }
106
+ return out;
107
+ }
108
+
109
+ /**
110
+ * Validate the model's arguments and resolve every path against `cwd`. Returns `{question, options}` with each
111
+ * option as `{title, kind, content?, path?, language?}` (path absolute; text and code files read into content), or
112
+ * throws an Error whose message tells the model what to fix.
113
+ */
114
+ export function normalizeArguments(args, cwd, fs = { readFileSync, realpathSync, statSync }, roots = previewRoots(cwd ?? process.cwd(), [], fs)) {
115
+ if (!isRecord(args)) throw new Error('present_options needs {question, options}.');
116
+ const question = nonEmpty(args.question);
117
+ if (question === undefined) throw new Error('question must be a non-empty string.');
118
+ const raw = args.options;
119
+ if (!Array.isArray(raw) || raw.length < MIN_OPTIONS || raw.length > MAX_OPTIONS) {
120
+ throw new Error(`options must list ${MIN_OPTIONS} to ${MAX_OPTIONS} candidates.`);
121
+ }
122
+ const titles = new Set();
123
+ const options = raw.map((entry, index) => {
124
+ const at = `options[${index}]`;
125
+ if (!isRecord(entry)) throw new Error(`${at} must be an object.`);
126
+ const title = nonEmpty(entry.title);
127
+ if (title === undefined) throw new Error(`${at}.title must be a non-empty string.`);
128
+ if (title.length > MAX_TITLE_CHARS) throw new Error(`${at}.title must be at most ${MAX_TITLE_CHARS} characters.`);
129
+ if (titles.has(title.toLowerCase())) throw new Error(`${at}.title "${title}" repeats another option's title; titles must be distinct.`);
130
+ titles.add(title.toLowerCase());
131
+ const kind = entry.kind;
132
+ if (!KINDS.includes(kind)) throw new Error(`${at}.kind must be one of ${KINDS.join(', ')}.`);
133
+ const content = typeof entry.content === 'string' && entry.content.length > 0 ? entry.content : undefined;
134
+ const pathArg = nonEmpty(entry.path);
135
+ if ((content === undefined) === (pathArg === undefined)) throw new Error(`${at} needs exactly one of content or path.`);
136
+ if (kind === 'image' && pathArg === undefined) throw new Error(`${at} is an image: give its file path.`);
137
+ const language = nonEmpty(entry.language);
138
+ const option = { title, kind, ...(language !== undefined && kind === 'code' ? { language } : {}) };
139
+ if (content !== undefined) {
140
+ if (content.length > MAX_CONTENT_CHARS) throw new Error(`${at}.content is longer than ${MAX_CONTENT_CHARS} characters; write it to a file and pass path.`);
141
+ return { ...option, content };
142
+ }
143
+ const absolute = isAbsolute(pathArg) ? pathArg : resolve(cwd ?? process.cwd(), pathArg);
144
+ let real;
145
+ let stats;
146
+ try {
147
+ real = fs.realpathSync(absolute);
148
+ stats = fs.statSync(real);
149
+ } catch {
150
+ throw new Error(`${at}.path ${pathArg} does not exist.`);
151
+ }
152
+ // The same boundary the session works in: a path (or a symlink) leading outside the workspace is never read.
153
+ if (!roots.some((root) => insideRoot(real, root))) {
154
+ throw new Error(`${at}.path ${pathArg} is outside the working directory; write or copy the file into the workspace and pass that path.`);
155
+ }
156
+ if (!stats.isFile()) throw new Error(`${at}.path ${pathArg} is not a file.`);
157
+ if (stats.size > MAX_FILE_BYTES) throw new Error(`${at}.path ${pathArg} is larger than ${MAX_FILE_BYTES / (1024 * 1024)} MB.`);
158
+ if (kind === 'code' || kind === 'text') {
159
+ const text = String(fs.readFileSync(real, 'utf8'));
160
+ if (text.length > MAX_CONTENT_CHARS) throw new Error(`${at}.path ${pathArg} is longer than ${MAX_CONTENT_CHARS} characters.`);
161
+ return { ...option, path: real, content: text };
162
+ }
163
+ return { ...option, path: real };
164
+ });
165
+ return { question, options };
166
+ }
167
+
168
+ /** The user-questions request for one call: the pick question (with its presentation record) and the optional note. */
169
+ export function optionsRequest(normalized, exec) {
170
+ return {
171
+ questions: [
172
+ {
173
+ id: PICK_ID,
174
+ header: 'Options',
175
+ question: normalized.question,
176
+ options: normalized.options.map((option) => ({ label: option.title, description: previewLine(option) })),
177
+ presentation: { kind: PRESENTATION_KIND, version: 1, options: normalized.options.map((option) => ({ ...option })) },
178
+ },
179
+ { id: NOTE_ID, header: 'Note', question: 'Anything to add? (optional)' },
180
+ ],
181
+ ...(exec?.agent !== undefined ? { agent: exec.agent } : {}),
182
+ ...(exec?.signal !== undefined ? { signal: exec.signal } : {}),
183
+ };
184
+ }
185
+
186
+ /**
187
+ * The tool's value from the engine's answer batch: the picked option (index is 1-based), the note, or a skip. A pick
188
+ * question answered with the person's own words instead of a choice keeps those words as `other`.
189
+ */
190
+ export function resultFrom(normalized, answer) {
191
+ const answers = Array.isArray(answer?.answers) ? answer.answers : [];
192
+ const pick = answers.find((item) => item?.id === PICK_ID);
193
+ const noteAnswer = answers.find((item) => item?.id === NOTE_ID);
194
+ const label = Array.isArray(pick?.selected) ? pick.selected.find((value) => typeof value === 'string') : undefined;
195
+ const index = label === undefined ? -1 : normalized.options.findIndex((option) => option.title === label);
196
+ const note = nonEmpty(noteAnswer?.custom) ?? nonEmpty(noteAnswer?.selected?.[0]);
197
+ const other = index < 0 ? nonEmpty(pick?.custom) : undefined;
198
+ const value = {
199
+ picked: index >= 0 ? { index: index + 1, title: normalized.options[index].title } : null,
200
+ ...(note !== undefined ? { note } : {}),
201
+ ...(other !== undefined ? { other } : {}),
202
+ };
203
+ value.text = resultText(value);
204
+ return value;
205
+ }
206
+
207
+ /** One line the model reads. */
208
+ export function resultText(value) {
209
+ const parts = [];
210
+ if (value.picked) parts.push(`The user picked option ${value.picked.index}: "${value.picked.title}".`);
211
+ else if (value.other) parts.push(`The user picked none of the options and wrote: "${value.other}".`);
212
+ else parts.push('The user skipped the options without picking one. Continue without a pick and do not ask again.');
213
+ if (value.note) parts.push(`Their note: "${value.note}".`);
214
+ return parts.join(' ');
215
+ }
216
+
217
+ /** The working directory of the calling agent's session, best effort. */
218
+ export function cwdFor(ctx, exec) {
219
+ const session = exec?.agent?.session;
220
+ try {
221
+ const service = ctx.get?.('workingDirectory') ?? ctx.workingDirectory;
222
+ const cwd = service?.get?.(session);
223
+ if (typeof cwd === 'string' && cwd) return cwd;
224
+ } catch {
225
+ // fall through to the session's own cwd
226
+ }
227
+ return nonEmpty(session?.cwd) ?? process.cwd();
228
+ }
229
+
230
+ /** The sandbox policy's extra writable roots (shared by every session), best effort. */
231
+ export function extraRootsFor(ctx) {
232
+ try {
233
+ const policy = ctx.get?.('sandboxPolicy') ?? ctx.sandboxPolicy;
234
+ const roots = policy?.additionalWritableRoots;
235
+ return Array.isArray(roots) ? roots.filter((root) => typeof root === 'string') : [];
236
+ } catch {
237
+ return [];
238
+ }
239
+ }
240
+
241
+ export function buildTool(ctx) {
242
+ return {
243
+ name: TOOL_NAME,
244
+ description: DESCRIPTION,
245
+ parameters: PARAMETERS,
246
+ output: {
247
+ schema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'] },
248
+ render: (_args, value) => [{ type: 'text', text: typeof value?.text === 'string' ? value.text : '' }],
249
+ },
250
+ async execute(args, exec) {
251
+ const cwd = cwdFor(ctx, exec);
252
+ const normalized = normalizeArguments(args, cwd, undefined, previewRoots(cwd, extraRootsFor(ctx)));
253
+ const questions = ctx.get?.('userQuestions') ?? ctx.userQuestions;
254
+ if (questions === undefined || typeof questions.ask !== 'function') throw new Error('No one can answer options in this session.');
255
+ const answer = await questions.ask(optionsRequest(normalized, exec));
256
+ return resultFrom(normalized, answer);
257
+ },
258
+ };
259
+ }
260
+
261
+ export function apply(ctx) {
262
+ ctx.tools.register(buildTool(ctx));
263
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@picasso/options",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "description": "dsh cordis plugin: the deferred present_options tool. Shows the person 2-4 options (HTML, image, code or text) through the engine's user-questions service and returns the pick plus an optional note.",
6
+ "type": "module",
7
+ "main": "index.js",
8
+ "exports": {
9
+ ".": "./index.js",
10
+ "./cordis.patch.yml": "./cordis.patch.yml",
11
+ "./package.json": "./package.json"
12
+ },
13
+ "dshTarget": "0.2.2-rc.3",
14
+ "dsh": {
15
+ "bundle": {
16
+ "patch": "./cordis.patch.yml"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "test": "node --import ../../test/setup/hermetic-preload.mjs --test test/*.test.mjs"
21
+ },
22
+ "files": [
23
+ "index.js",
24
+ "cordis.patch.yml",
25
+ "README.md"
26
+ ],
27
+ "license": "UNLICENSED"
28
+ }
@@ -0,0 +1,10 @@
1
+ # Picasso progress reports — one bundle patch layer row (loader insert).
2
+ # ON by default: the live switch is `settings.progressReports.enabled` in the shared settings.json
3
+ # (Mac Settings and the TUI /settings write it); `config` here only sets the boot default.
4
+ - insert:
5
+ - id: picasso-progress-reports
6
+ name: '@picasso/progress-reports'
7
+ # config:
8
+ # enabled: true
9
+ # intervalMinutes: 10
10
+ # settingsFile: /abs/path/settings.json
@@ -0,0 +1,267 @@
1
+ // @picasso/progress-reports — harness-timed progress reports on long tasks (dsh 0.2.1-rc.5 cordis plugin).
2
+ //
3
+ // While a top-level agent has been working for `intervalMinutes` (default 10) of wall time since its run
4
+ // started or since the last progress report, the next model step gets ONE Tier-2 reminder: a sourced
5
+ // user-role `<system-reminder>` appended to that step's messages (durable history, like dsh-time-context),
6
+ // asking for a short report as a normal assistant message and to keep working. Tier 1 (tools → system →
7
+ // instruction index) is never touched.
8
+ //
9
+ // Timing (all from the session's own durable events, so a resumed session keeps its clock):
10
+ // - run start: the `turn/start` of the newest turn opened by anything other than an automatic goal round
11
+ // (a goal run's rounds are one run; a new prompt starts a new one);
12
+ // - last report: the newest `assistant/message` whose text `isProgressReport` (report.js) — whoever asked
13
+ // for it. A user whose own AGENTS.md already makes the model report every 10 minutes therefore never
14
+ // sees the harness reminder: their reports keep moving the baseline;
15
+ // - last reminder: the newest user message with this plugin's source.
16
+ // The reminder fires when now − max(run start, last report, last reminder) ≥ interval.
17
+ //
18
+ // Scope: top-level agents only. A delegated child (`header.origin === 'subagent'` or a positive
19
+ // `delegationDepth`) is skipped; the parent reports for the whole run.
20
+ //
21
+ // Setting (live, read at each step with an mtime cache): `settings.progressReports` in the shared
22
+ // `settings.json` (`PICASSO_SETTINGS_ROOT ?? <PICASSO_HOME ?? ~/.picasso>/settings`) —
23
+ // `{enabled: boolean, intervalMinutes: number}`; missing means on, 10 minutes. Patch config
24
+ // `{enabled, intervalMinutes, settingsFile}` sets the boot default; `PICASSO_PROGRESS_REPORTS=off`
25
+ // and `PICASSO_PROGRESS_REPORTS_INTERVAL_MS` are test/dev overrides.
26
+ import { randomUUID } from 'node:crypto';
27
+ import { readFileSync, statSync } from 'node:fs';
28
+ import { userInfo } from 'node:os';
29
+ import { join } from 'node:path';
30
+
31
+ import { isProgressReport } from './report.js';
32
+
33
+ export { formatReportMarkdown, isProgressReport, parseProgressReport, splitReportItems } from './report.js';
34
+
35
+ export const name = 'picasso-progress-reports';
36
+ export const dshTarget = '0.2.2-rc.3';
37
+ export const SOURCE_KIND = 'picasso-progress-reports';
38
+ export const DEFAULT_INTERVAL_MINUTES = 10;
39
+ /** The floor any configured interval is clamped to (keeps a typo from reminding every step). */
40
+ export const MIN_INTERVAL_MS = 5_000;
41
+ export const ENV_SWITCH = 'PICASSO_PROGRESS_REPORTS';
42
+ export const ENV_INTERVAL_MS = 'PICASSO_PROGRESS_REPORTS_INTERVAL_MS';
43
+
44
+ const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
45
+
46
+ /** `PICASSO_SETTINGS_ROOT ?? <PICASSO_HOME ?? <account home>/.picasso>/settings`/settings.json (shared-home's `settingsFile`). */
47
+ export function defaultSettingsFile(env = process.env) {
48
+ const root = typeof env.PICASSO_SETTINGS_ROOT === 'string' && env.PICASSO_SETTINGS_ROOT.trim() !== '' ? env.PICASSO_SETTINGS_ROOT : undefined;
49
+ if (root) return join(root, 'settings.json');
50
+ const home = typeof env.PICASSO_HOME === 'string' && env.PICASSO_HOME.trim() !== '' ? env.PICASSO_HOME : join(accountHome(), '.picasso');
51
+ return join(home, 'settings', 'settings.json');
52
+ }
53
+
54
+ function accountHome() {
55
+ try {
56
+ return userInfo().homedir;
57
+ } catch {
58
+ return process.env.HOME ?? '';
59
+ }
60
+ }
61
+
62
+ /** `settings.progressReports` from a parsed settings file, or `{}`. */
63
+ export function progressReportsSetting(file) {
64
+ const settings = isRecord(file) && isRecord(file.settings) ? file.settings : undefined;
65
+ return settings && isRecord(settings.progressReports) ? settings.progressReports : {};
66
+ }
67
+
68
+ /** The effective `{enabled, intervalMs}` from boot config, the settings file's value, and env overrides. */
69
+ export function resolveSettings(config = {}, stored = {}, env = process.env) {
70
+ let enabled = config.enabled !== false;
71
+ if (typeof stored.enabled === 'boolean') enabled = stored.enabled;
72
+ const switchValue = String(env[ENV_SWITCH] ?? '').trim().toLowerCase();
73
+ if (switchValue === 'off' || switchValue === '0' || switchValue === 'false') enabled = false;
74
+ let minutes = DEFAULT_INTERVAL_MINUTES;
75
+ if (Number.isFinite(config.intervalMinutes) && config.intervalMinutes > 0) minutes = config.intervalMinutes;
76
+ if (Number.isFinite(stored.intervalMinutes) && stored.intervalMinutes > 0) minutes = stored.intervalMinutes;
77
+ let intervalMs = Math.round(minutes * 60_000);
78
+ const envMs = Number(env[ENV_INTERVAL_MS]);
79
+ if (env[ENV_INTERVAL_MS] !== undefined && Number.isFinite(envMs) && envMs > 0) intervalMs = Math.round(envMs);
80
+ return { enabled, intervalMs: Math.max(MIN_INTERVAL_MS, intervalMs) };
81
+ }
82
+
83
+ /** A live reader over the settings file: re-parsed only when its mtime changes; unreadable reads as unset. */
84
+ export function settingsReader(config = {}, env = process.env) {
85
+ const file = typeof config.settingsFile === 'string' && config.settingsFile !== '' ? config.settingsFile : defaultSettingsFile(env);
86
+ let cache = { mtimeMs: Number.NaN, stored: {} };
87
+ return () => {
88
+ let mtimeMs;
89
+ try {
90
+ mtimeMs = statSync(file).mtimeMs;
91
+ } catch {
92
+ mtimeMs = -1;
93
+ }
94
+ if (mtimeMs !== cache.mtimeMs) {
95
+ let stored = {};
96
+ if (mtimeMs >= 0) {
97
+ try {
98
+ stored = progressReportsSetting(JSON.parse(readFileSync(file, 'utf8')));
99
+ } catch {
100
+ stored = {};
101
+ }
102
+ }
103
+ cache = { mtimeMs, stored };
104
+ }
105
+ return resolveSettings(config, cache.stored, env);
106
+ };
107
+ }
108
+
109
+ /** Whether an agent is a delegated child (subagent), which never gets the reminder. */
110
+ export function isChildAgent(agent) {
111
+ const header = agent?.session?.header;
112
+ if (!isRecord(header)) return false;
113
+ if (header.origin === 'subagent') return true;
114
+ return Number.isSafeInteger(header.delegationDepth) && header.delegationDepth > 0;
115
+ }
116
+
117
+ const textOf = (message) => (Array.isArray(message?.content) ? message.content : [])
118
+ .map((part) => (part?.type === 'text' && typeof part.text === 'string' ? part.text : ''))
119
+ .join('\n');
120
+
121
+ const isGoalRound = (message) => message?.source?.kind === 'goal' && Number(message.source.round) > 0;
122
+
123
+ /** Fresh per-session timing state. */
124
+ function freshState() {
125
+ return {
126
+ scanned: 0,
127
+ runStart: undefined,
128
+ lastReport: undefined,
129
+ lastReminder: undefined,
130
+ turnStart: undefined,
131
+ openerSeen: true,
132
+ /** A reminder is in history with no report after it yet. */
133
+ reminderPending: false,
134
+ /** The model has reported without being reminded (its own instructions ask for reports). */
135
+ selfReporting: false,
136
+ };
137
+ }
138
+
139
+ /** Fold one durable session event into the timing state. */
140
+ export function foldEvent(state, event) {
141
+ if (!isRecord(event)) return state;
142
+ const time = typeof event.time === 'number' ? event.time : undefined;
143
+ switch (event.type) {
144
+ case 'turn/start':
145
+ state.turnStart = time;
146
+ state.openerSeen = false;
147
+ break;
148
+ case 'user/message': {
149
+ const message = event.data;
150
+ if (!state.openerSeen) {
151
+ state.openerSeen = true;
152
+ // A goal round continues the run it belongs to; anything else (a prompt, mail, a schedule) starts one.
153
+ if (!isGoalRound(message) || state.runStart === undefined) state.runStart = state.turnStart ?? time;
154
+ }
155
+ if (message?.source?.kind === SOURCE_KIND && time !== undefined) {
156
+ state.lastReminder = time;
157
+ state.reminderPending = true;
158
+ }
159
+ break;
160
+ }
161
+ case 'assistant/message':
162
+ if (time !== undefined && isProgressReport(textOf(event.data?.message))) {
163
+ state.lastReport = time;
164
+ if (!state.reminderPending) state.selfReporting = true;
165
+ state.reminderPending = false;
166
+ }
167
+ break;
168
+ default:
169
+ break;
170
+ }
171
+ return state;
172
+ }
173
+
174
+ /** Bring a session's state up to date with its event log (incremental; restarts if the log shrank). */
175
+ export function scanSession(states, session) {
176
+ let state = states.get(session);
177
+ const length = Number.isSafeInteger(session?.seq) ? session.seq : 0;
178
+ if (!state || state.scanned > length) state = freshState();
179
+ for (let seq = state.scanned; seq < length; seq += 1) {
180
+ let event;
181
+ try {
182
+ event = session.eventAt(seq);
183
+ } catch {
184
+ event = undefined;
185
+ }
186
+ foldEvent(state, event);
187
+ }
188
+ state.scanned = length;
189
+ states.set(session, state);
190
+ return state;
191
+ }
192
+
193
+ /** How much longer the harness waits once the model reports on its own: its own cadence wins, no double report. */
194
+ export const SELF_REPORT_GRACE = 1.5;
195
+
196
+ /**
197
+ * When the reminder is due: `now − baseline ≥ intervalMs` (× SELF_REPORT_GRACE once the model has reported
198
+ * unprompted), with baseline the newest of run start, last report and last reminder. `proposed` are this step's not-yet-logged messages (a new turn's opener lives there on step 1).
199
+ */
200
+ export function reminderDue(state, now, intervalMs, proposed = []) {
201
+ let runStart = state.runStart;
202
+ if (!state.openerSeen) {
203
+ const opener = proposed.find((message) => message?.role === 'user');
204
+ if (opener !== undefined && (!isGoalRound(opener) || runStart === undefined)) runStart = state.turnStart ?? now;
205
+ }
206
+ if (proposed.some((message) => message?.role === 'assistant' && isProgressReport(textOf(message)))) return false;
207
+ const baseline = Math.max(runStart ?? Number.NEGATIVE_INFINITY, state.lastReport ?? Number.NEGATIVE_INFINITY, state.lastReminder ?? Number.NEGATIVE_INFINITY);
208
+ if (!Number.isFinite(baseline)) return false;
209
+ return now - baseline >= (state.selfReporting ? intervalMs * SELF_REPORT_GRACE : intervalMs);
210
+ }
211
+
212
+ /** The reminder's text. `minutes` is the elapsed wall time it reports. */
213
+ export function renderReminder(minutes) {
214
+ const elapsed = minutes >= 1 ? `about ${Math.round(minutes)} minute${Math.round(minutes) === 1 ? '' : 's'}` : 'a while';
215
+ return [
216
+ '<system-reminder>',
217
+ `Progress check: you have been working for ${elapsed} without a progress report. In your next reply, post a brief progress report as a normal message in exactly this shape, then keep working — do not stop, wait, or ask for confirmation:`,
218
+ '',
219
+ '**Progress report** · <overall %> (<how you measured it, e.g. 3 of 7 steps done>)',
220
+ 'Goal: <the original request, one line>',
221
+ 'Done: <what is finished>',
222
+ 'In progress: <what you are doing now>',
223
+ 'Next: <the next steps>',
224
+ 'Blockers: <blockers, or none>',
225
+ '',
226
+ 'Keep it under eight short lines, report only what actually happened, and do not mention this reminder.',
227
+ '</system-reminder>',
228
+ ].join('\n');
229
+ }
230
+
231
+ /** A frozen user-role message shaped like dsh-llm's `createUserMessage` output. */
232
+ export function reminderMessage(minutes) {
233
+ const text = renderReminder(minutes);
234
+ return Object.freeze({
235
+ role: 'user',
236
+ content: Object.freeze([Object.freeze({ type: 'text', text })]),
237
+ source: Object.freeze({ kind: SOURCE_KIND, form: 'notice', summary: 'Progress report requested' }),
238
+ id: randomUUID(),
239
+ });
240
+ }
241
+
242
+ export function apply(ctx, config = {}, deps = {}) {
243
+ const readSettings = deps.settings ?? settingsReader(config, deps.env ?? process.env);
244
+ const clock = deps.now ?? Date.now;
245
+ const states = new WeakMap();
246
+
247
+ ctx.on('agent/pre-step', async (args, next) => {
248
+ const decision = await next();
249
+ if (!isRecord(decision) || decision.kind === 'reject' || !Array.isArray(decision.messages)) return decision;
250
+ if (args?.signal?.aborted) return decision;
251
+ const agent = args?.agent;
252
+ const session = agent?.session;
253
+ if (!session || typeof session.eventAt !== 'function' || isChildAgent(agent)) return decision;
254
+ const { enabled, intervalMs } = readSettings();
255
+ if (!enabled) return decision;
256
+ if (decision.messages.some((message) => message?.source?.kind === SOURCE_KIND)) return decision;
257
+ const state = scanSession(states, session);
258
+ const now = clock();
259
+ if (!reminderDue(state, now, intervalMs, decision.messages)) return decision;
260
+ const baseline = Math.max(state.runStart ?? now, state.lastReport ?? 0, state.lastReminder ?? 0);
261
+ // Recorded now so a step that is rejected downstream cannot re-arm it before its event lands.
262
+ state.lastReminder = now;
263
+ state.reminderPending = true;
264
+ return { ...decision, messages: [...decision.messages, reminderMessage((now - baseline) / 60_000)] };
265
+ });
266
+ }
267
+
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@picasso/progress-reports",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "description": "dsh cordis plugin: harness-timed progress reports on long tasks. After 10 minutes of wall time without a progress report, the next step of a top-level agent gets one Tier-2 reminder asking for a short report (goal · done/in progress/next · % · blockers); any report the model writes on its own resets the clock, so a user policy that already asks for reports never doubles up.",
6
+ "type": "module",
7
+ "main": "index.js",
8
+ "exports": {
9
+ ".": "./index.js",
10
+ "./report.js": "./report.js",
11
+ "./cordis.patch.yml": "./cordis.patch.yml",
12
+ "./package.json": "./package.json"
13
+ },
14
+ "dshTarget": "0.2.2-rc.3",
15
+ "dsh": {
16
+ "bundle": {
17
+ "patch": "./cordis.patch.yml"
18
+ }
19
+ },
20
+ "scripts": {
21
+ "test": "node --import ../../test/setup/hermetic-preload.mjs --test test/*.test.mjs"
22
+ },
23
+ "files": [
24
+ "index.js",
25
+ "report.js",
26
+ "cordis.patch.yml",
27
+ "README.md"
28
+ ],
29
+ "license": "UNLICENSED"
30
+ }