@deeeed/metamask-harness 0.50.6 → 0.51.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.
@@ -123,7 +123,9 @@ Example:
123
123
  mark delegates checklist state to @farmslot/agent-runtime. Successful complete
124
124
  and no-change marks stage a learning package through @farmslot/handoff.
125
125
  closeout exposes that same Handoff boundary directly; --share remains explicit.
126
- The task directory must contain CHECKLIST.md and checklist-target.json.
126
+ The task directory is the one mm-harness task init wrote. Without a
127
+ checklist-target.json it marks CHECKLIST.md and writes SIGNAL.json; only a
128
+ role switch writes that manifest, to point at its own checklist.
127
129
 
128
130
  Steps: start | 1 | 2 | ... | complete | no-change | blocked
129
131
 
@@ -133,6 +135,84 @@ Example:
133
135
  mm-harness checklist mark temp/tasks/recipe-cook/<task> complete --mark-last
134
136
  mm-harness checklist closeout temp/tasks/recipe-cook/<task> --share`
135
137
  },
138
+ {
139
+ name: "prepare",
140
+ summary: "Bring this checkout to a proven-ready state and write the readiness record.",
141
+ example: "mm-harness prepare --platform extension",
142
+ helpText: `mm-harness prepare [flags]
143
+
144
+ Run the readiness chain for this checkout and record what it did as one
145
+ protocol readiness record (sandbox.json). Steps run in order and stop at the
146
+ first failure; later steps are recorded as skipped.
147
+
148
+ doctor --fix status launch --verify fixtures set verify
149
+
150
+ Core skips launch and fixtures (headless; verify is its readiness gate).
151
+ Mobile infers ios|android from the connected devices reported by status and
152
+ refuses with the numbered choice when that is ambiguous.
153
+
154
+ --target <path> Checkout path (default: cwd)
155
+ --platform <mobile|extension|core> Force the platform (auto-detected inside a checkout)
156
+ --mobile-platform <ios|android> Mobile target when status cannot decide it
157
+ --artifacts-dir <dir> Where sandbox.json and the per-step reports land
158
+ (default: <target>/temp/recipe/runtime)
159
+ --json Print the readiness record
160
+
161
+ Exit 0 when the record is ready, 1 otherwise.
162
+
163
+ Example:
164
+ mm-harness prepare
165
+ mm-harness prepare --platform mobile --mobile-platform ios --json
166
+ mm-harness prepare --artifacts-dir temp/tasks/fix/TAT-1/artifacts --json`
167
+ },
168
+ {
169
+ name: "task",
170
+ summary: "Create the task directory an agent works from, out of a shared execution template.",
171
+ example: 'mm-harness task init temp/tasks/fix/TAT-1 --flow fix-bug --run-mode autonomous --template fix-bug/autonomous.mobile --title "Wrong total"',
172
+ helpText: `mm-harness task init <task-dir> [options]
173
+
174
+ Write the task directory from a selected execution template: TASK.md, the
175
+ CHECKLIST.md whose boxes are the steps, a mark shim routed through
176
+ mm-harness checklist mark, and inputs/ (handoff.json, worker-terminal-contract.json).
177
+ checklist-target.json is NOT written \u2014 absent means CHECKLIST.md + SIGNAL.json.
178
+
179
+ Applied when you do not pass them: --surface skill, --mark-command for this
180
+ executable, and --platform from the detected checkout.
181
+
182
+ Task:
183
+ --title <t> Task title (required)
184
+ --task-text <s> | --task-file <p> Task description, inline or from a file
185
+ --ticket <key> Ticket key
186
+ --source-ref <url> Where the task came from
187
+
188
+ Selection (same catalog as execution-template):
189
+ --flow <flow> Exact flow (required)
190
+ --run-mode <mode> autonomous|interactive|validation (required)
191
+ --platform <platform> Exact platform
192
+ --template <id> Exact template id (required)
193
+ --domain <domain> Exact domain
194
+ --dir <path> Custom flow-tree source (repeatable)
195
+ --domain-dir <domain=path> Domain-scoped team source (repeatable)
196
+ --package-templates <path> Canonical package flow-tree root
197
+ --package-id <id> Source label for the package root
198
+ --project-worker <path> Project template directory
199
+ --project-name <name> Source label for project templates
200
+
201
+ Identity and rendering:
202
+ --surface <s> Handoff surface (default: skill)
203
+ --project <name> --repo <owner/name> --attempt-id <id>
204
+ --var KEY=VALUE Template placeholder value (repeatable)
205
+ --task-dir-label <label> Task directory as written into the documents
206
+ --mode-preamble <text> Run-mode preamble for TASK.md
207
+ --addendum-file <path> Extra task-document section
208
+ --mark-command <cmd> Override the recorded mark command
209
+ --json Machine-readable output
210
+
211
+ Example:
212
+ mm-harness task init temp/tasks/fix/TAT-1 --flow fix-bug --run-mode autonomous \\
213
+ --template fix-bug/autonomous.mobile --package-templates <path> \\
214
+ --title "Wrong total on the receipt" --ticket TAT-1 --json`
215
+ },
136
216
  {
137
217
  name: "execution-template",
138
218
  summary: "Discover, validate, and materialize shared agent checklists.",
@@ -698,7 +778,7 @@ const HELP_GROUPS = [
698
778
  {
699
779
  title: "DAILY LOOP",
700
780
  blurb: "what a teammate runs many times a day (auto-ensures the overlay; --heal owns recovery)",
701
- commands: ["status", "launch", "stop", "logs", "debug", "reload", "fixtures"]
781
+ commands: ["status", "task", "prepare", "launch", "stop", "logs", "debug", "reload", "fixtures"]
702
782
  },
703
783
  {
704
784
  title: "DISCOVER",
package/dist/paths.js CHANGED
@@ -11,6 +11,9 @@ function recipeRuntimeDir() {
11
11
  function recipeHarnessRoot() {
12
12
  return validateRelativeRecipePath("RECIPE_HARNESS_ROOT", process.env.RECIPE_HARNESS_ROOT || DEFAULT_RECIPE_HARNESS_ROOT);
13
13
  }
14
+ function harnessExecutable() {
15
+ return path.resolve(process.env.MM_HARNESS_EXECUTABLE ?? path.join(runnerDir, "bin/mm-harness"));
16
+ }
14
17
  function readPathDefaults() {
15
18
  const defaultsPath = path.join(runnerDir, "adapters/shared/path-defaults.json");
16
19
  const parsed = JSON.parse(fs.readFileSync(defaultsPath, "utf8"));
@@ -170,6 +173,7 @@ export {
170
173
  DEFAULT_RECIPE_RUNTIME_DIR,
171
174
  assertAdapter,
172
175
  extensionIdPath,
176
+ harnessExecutable,
173
177
  importMetaMaskNativeUiProvider,
174
178
  importRecipeHarness,
175
179
  importRecipeHarnessAppLifecycle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.50.6",
3
+ "version": "0.51.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"
@@ -20,11 +20,11 @@
20
20
  "check:syntax": "find . -name '*.mjs' -print0 | xargs -0 -n1 node --check"
21
21
  },
22
22
  "dependencies": {
23
- "@farmslot/agent-runtime": "0.8.1",
24
- "@farmslot/expo-recipe": "0.9.0",
23
+ "@farmslot/agent-runtime": "0.9.0",
24
+ "@farmslot/expo-recipe": "0.9.1",
25
25
  "@farmslot/handoff": "^0.3.1",
26
- "@farmslot/protocol": "0.21.0",
27
- "@farmslot/recipe-harness": "0.16.1",
26
+ "@farmslot/protocol": "0.26.0",
27
+ "@farmslot/recipe-harness": "0.16.2",
28
28
  "agent-device": "0.19.3",
29
29
  "commander": "^12.0.0",
30
30
  "es-module-lexer": "2.3.1",