@open-mercato/cli 0.9.1-develop.7464.1.9a392fca41 → 0.9.1-develop.7467.1.3b2bb92d47

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 (91) hide show
  1. package/dist/agentic/guides/architecture.md +2 -0
  2. package/dist/agentic/guides/module-facts.json +150 -150
  3. package/dist/agentic/guides/module-facts.v2.json +150 -150
  4. package/dist/agentic/guides/module-tool.md +35 -0
  5. package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
  6. package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
  7. package/dist/agentic/guides/modules/api_docs/index.md +1 -1
  8. package/dist/agentic/guides/modules/api_keys/index.md +1 -1
  9. package/dist/agentic/guides/modules/attachments/index.md +1 -1
  10. package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
  11. package/dist/agentic/guides/modules/auth/index.md +1 -1
  12. package/dist/agentic/guides/modules/availability/index.md +1 -1
  13. package/dist/agentic/guides/modules/business_rules/index.md +1 -1
  14. package/dist/agentic/guides/modules/catalog/index.md +1 -1
  15. package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
  16. package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
  17. package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
  18. package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
  19. package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
  20. package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
  21. package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
  22. package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
  23. package/dist/agentic/guides/modules/checkout/index.md +1 -1
  24. package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
  25. package/dist/agentic/guides/modules/configs/index.md +1 -1
  26. package/dist/agentic/guides/modules/content/index.md +1 -1
  27. package/dist/agentic/guides/modules/currencies/index.md +1 -1
  28. package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
  29. package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
  30. package/dist/agentic/guides/modules/customers/index.md +1 -1
  31. package/dist/agentic/guides/modules/dashboards/index.md +1 -1
  32. package/dist/agentic/guides/modules/data_sync/index.md +1 -1
  33. package/dist/agentic/guides/modules/design_system/index.md +1 -1
  34. package/dist/agentic/guides/modules/devices/index.md +1 -1
  35. package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
  36. package/dist/agentic/guides/modules/directory/index.md +1 -1
  37. package/dist/agentic/guides/modules/documents/index.md +1 -1
  38. package/dist/agentic/guides/modules/entities/index.md +1 -1
  39. package/dist/agentic/guides/modules/eudr/index.md +1 -1
  40. package/dist/agentic/guides/modules/events/index.md +1 -1
  41. package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
  42. package/dist/agentic/guides/modules/forms/index.md +1 -1
  43. package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
  44. package/dist/agentic/guides/modules/gateway_tpay/index.md +1 -1
  45. package/dist/agentic/guides/modules/generators/index.md +1 -1
  46. package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
  47. package/dist/agentic/guides/modules/integrations/index.md +1 -1
  48. package/dist/agentic/guides/modules/messages/index.md +1 -1
  49. package/dist/agentic/guides/modules/notifications/index.md +1 -1
  50. package/dist/agentic/guides/modules/onboarding/index.md +1 -1
  51. package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
  52. package/dist/agentic/guides/modules/perspectives/index.md +1 -1
  53. package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
  54. package/dist/agentic/guides/modules/planner/index.md +1 -1
  55. package/dist/agentic/guides/modules/portal/index.md +1 -1
  56. package/dist/agentic/guides/modules/progress/index.md +1 -1
  57. package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
  58. package/dist/agentic/guides/modules/query_index/index.md +1 -1
  59. package/dist/agentic/guides/modules/record_locks/index.md +1 -1
  60. package/dist/agentic/guides/modules/resources/index.md +1 -1
  61. package/dist/agentic/guides/modules/sales/index.md +1 -1
  62. package/dist/agentic/guides/modules/scheduler/index.md +1 -1
  63. package/dist/agentic/guides/modules/search/index.md +1 -1
  64. package/dist/agentic/guides/modules/security/index.md +1 -1
  65. package/dist/agentic/guides/modules/seeds/index.md +1 -1
  66. package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
  67. package/dist/agentic/guides/modules/sso/index.md +1 -1
  68. package/dist/agentic/guides/modules/staff/index.md +1 -1
  69. package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
  70. package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
  71. package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
  72. package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
  73. package/dist/agentic/guides/modules/telemetry/index.md +1 -1
  74. package/dist/agentic/guides/modules/tillio/index.md +1 -1
  75. package/dist/agentic/guides/modules/translations/index.md +1 -1
  76. package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
  77. package/dist/agentic/guides/modules/webhooks/index.md +1 -1
  78. package/dist/agentic/guides/modules/wms/index.md +1 -1
  79. package/dist/agentic/guides/modules/workflows/index.md +1 -1
  80. package/dist/agentic/guides/reference-module-facts.json +1 -1
  81. package/dist/agentic/guides/upstream/manifest.json +1 -1
  82. package/dist/agentic/shared/AGENTS.md.template +1 -0
  83. package/dist/agentic/shared/ai/harness/README.md +4 -2
  84. package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
  85. package/dist/agentic/shared/ai/harness/cases.json +79 -5
  86. package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
  87. package/dist/agentic/shared/ai/harness/validators.json +1 -1
  88. package/dist/agentic/shared/ai/skills/om-module-scaffold/SKILL.md +2 -0
  89. package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +78 -9
  90. package/dist/agentic/shared/scripts/execution-sandbox.mjs +8 -7
  91. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
1
  # sync_akeneo — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/sync-akeneo 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/sync-akeneo 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/sync-akeneo/src/modules/sync_akeneo
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # sync_excel — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/sync_excel
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # system_status_overlays — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/enterprise 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/enterprise 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/enterprise/src/modules/system_status_overlays
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # telemetry — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/telemetry 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/telemetry 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/telemetry/src/modules/telemetry
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # tillio — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/tillio 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/tillio 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/tillio/src/modules/tillio
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # translations — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/translations
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # warranty_claims — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/warranty_claims
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # webhooks — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/webhooks 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/webhooks 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/webhooks/src/modules/webhooks
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # wms — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/wms
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # workflows — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.9.1-develop.7464.1.9a392fca41; core 0.9.1-develop.7464.1.9a392fca41 — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.9.1-develop.7467.1.3b2bb92d47; core 0.9.1-develop.7467.1.3b2bb92d47 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/workflows
4
4
 
5
5
  ## Sections
@@ -1185,7 +1185,7 @@
1185
1185
  "facts": {
1186
1186
  "title": "Example Module",
1187
1187
  "description": "Demonstrates pages, APIs, entities and DI.",
1188
- "coreVersion": "0.9.1-develop.7464.1.9a392fca41",
1188
+ "coreVersion": "0.9.1-develop.7467.1.3b2bb92d47",
1189
1189
  "sourcePackage": null,
1190
1190
  "sourceVersion": null,
1191
1191
  "sourceRoot": "src/modules/example",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "generator": "@open-mercato/cli@0.9.1-develop.7464.1.9a392fca41",
3
+ "generator": "@open-mercato/cli@0.9.1-develop.7467.1.3b2bb92d47",
4
4
  "files": {
5
5
  "AGENTS.md": "9fdaca247f55c64f5966cc103265cfb03233e0532f58f14aff538ae18aa3555d",
6
6
  "BACKWARD_COMPATIBILITY.md": "4ed6dfe6a79217d169748d52b92856516ed7fadff0f785c6d4b1913555e2e933"
@@ -68,6 +68,7 @@ Match every work-unit row; OPEN its skill before selection.
68
68
 
69
69
  | Route | Work unit | Skill/context |
70
70
  |---|---|---|
71
+ | `architecture` | Scaffold a module starter, publish, or link an app module | `.ai/guides/module-tool.md`; implementation also loads `om-module-scaffold` |
71
72
  | `architecture` | Explain/choose module, UMES, package, eject | architecture; `om-help` for an unresolved or comparative choice across these mechanisms |
72
73
  | `module-data` | Business slice or multi-seam domain/API/command fix | MUST load `om-module-scaffold` + its exact `.ai/skills/om-module-scaffold/references/business-one-shot-blueprints.md` key, which resolves units inside the slice, not ownership — an ownership/capability outline adds `architecture` |
73
74
  | `spec-pr` | Spec/plan | Axis 3; phases+integration coverage (`integration-coverage`); no domain routes |
@@ -1,9 +1,11 @@
1
1
  # Agent harness evaluations
2
2
 
3
- `cases.json` is the 238-case standalone-app contract. Run `yarn harness:validate --all` for the deterministic gate. Live routing uses a fresh read-only process per case:
3
+ `cases.json` is the 239-case standalone-app contract. Run `yarn harness:validate --all` for the deterministic gate. Live routing uses a fresh read-only process per case:
4
4
 
5
5
  `OMH-238` routes Customers calendar add/remove/patch requests to `.ai/guides/customers-calendar.md`, exact installed Customers definitions, and the bounded canonical `umes.customers.calendar-event-types` example. It preserves historical records, generic shared components, and warnings when optional staff/resources integrations are unavailable.
6
6
 
7
+ `OMH-239` routes custom-module initialization, packaging, preview, publication, authentication, and continued-development questions to `.ai/guides/module-tool.md`.
8
+
7
9
  UMES routing is fact-first. The additive and unified-override audit evaluations, plus their targeted cases, resolve exact/pattern hosts, outgoing contributions, correlation provenance, round-trip groups, framework-owned targets, and override domain/key/mode from the generated module sheets and `.ai/guides/framework-extension-points.md` before bounded installed source. The repository UMES umbrella spec may appear as optional source-checkout provenance; it is never required in a standalone scaffold.
8
10
 
9
11
  ```text
@@ -20,7 +22,7 @@ yarn harness:release --runner codex --prepare-targets /absolute/empty-release-ta
20
22
  yarn harness:release --runner codex --portability-runner claude --prepare-targets /absolute/empty-release-targets --acknowledge-writes
21
23
  ```
22
24
 
23
- The primary runner owns all 238 routing cases, all 49 writable cases, and all generative-judge runs. No per-case fallback or mixed primary ownership is allowed. Omitting `--portability-runner` is valid and the sanitized report records `portabilityRunner: null`; explicitly requesting an unavailable or failing secondary runner fails that extended run.
25
+ The primary runner owns all 239 routing cases, all 49 writable cases, and all generative-judge runs. No per-case fallback or mixed primary ownership is allowed. Omitting `--portability-runner` is valid and the sanitized report records `portabilityRunner: null`; explicitly requesting an unavailable or failing secondary runner fails that extended run.
24
26
 
25
27
  Writable evaluation is intentionally opt-in. The expanded catalog has a 49-case writable release target, but only cases registered in `release-matrix.json` and backed by controller-owned fixtures and oracles are executable. Copy or create a fresh standalone app for one registered case, then seed only that case and mark the target disposable:
26
28
 
@@ -6,7 +6,7 @@ Run the complete per-release gate from a generated standalone app with one comma
6
6
  yarn harness:release --runner codex --prepare-targets /absolute/empty-release-targets --acknowledge-writes
7
7
  ```
8
8
 
9
- Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete 238-case routing gate and every writable/review lane. To add cross-model portability evidence, explicitly pass the other runner as `--portability-runner claude` or `--portability-runner codex`; it runs only the exact 49-case representative read-only set. The two runners must differ. Omitting the portability option is valid and is recorded as `portabilityRunner: null`; no secondary result is claimed. There is no per-case fallback or mixed primary ownership. Once requested, a portability failure or unavailable runner fails that extended release run.
9
+ Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete 239-case routing gate and every writable/review lane. To add cross-model portability evidence, explicitly pass the other runner as `--portability-runner claude` or `--portability-runner codex`; it runs only the exact 49-case representative read-only set. The two runners must differ. Omitting the portability option is valid and is recorded as `portabilityRunner: null`; no secondary result is claimed. There is no per-case fallback or mixed primary ownership. Once requested, a portability failure or unavailable runner fails that extended release run.
10
10
 
11
11
  `--prepare-targets` accepts only an absolute, new or empty regular directory outside the controller app. The controller must be a sanitized fresh scaffold: automatic preparation fails before copying when it finds `.env`, `.env.*` (except `.env.example`, `.env.sample`, and `.env.template`), credential files, or private-key files. Never use a configured development or production app as the controller. It copies the fresh scaffold once per catalog case whose `evaluationKind` is `implementation` or `regression`, while excluding `.git`, `node_modules`, build/cache/coverage output, `.ai/harness/results`, `.ai/reports`, and `.ai/framework-context`. Each target receives a guarded link to the controller's installed dependency tree. The OS sandbox resolves that link as read-only during both the writable model run and the target command gate. The release gate also hashes every dependency entry and regular-file body once before execution and once after the complete suite, and fails if any nested content or metadata changed. A generated `release-targets.json` records the local mapping.
12
12
 
@@ -34,17 +34,17 @@ For externally prepared apps, `--writable-targets /absolute/release-targets.json
34
34
  }
35
35
  ```
36
36
 
37
- The current catalog contains 238 cases, including 49 writable implementation/regression cases (20.6%). The command still derives all counts and case IDs from `cases.json`, `validators.json`, and `release-matrix.json`; those figures are documented release facts, not runner constants. The matrix keeps both supported runner model selectors, an exact all-case primary profile, an exact 49-case portability profile, and runner-neutral writable assignments. Run `yarn install-skills` first so the pinned external `om-code-review` skill and ownership evidence are present; the reusable local `om-judge-agent-session` skill ships with the scaffold. Before running a model or writing a fixture, the release command requires complete deterministic, primary live-routing, writable, trusted-oracle, target, generated-test, and generative-judge coverage. Every one of the 49 writable cases must have a judge assignment composing both skills. Missing business fixtures or release-matrix entries fail preflight and are listed by exact case ID in the report.
37
+ The current catalog contains 239 cases, including 49 writable implementation/regression cases (20.5%). The command still derives all counts and case IDs from `cases.json`, `validators.json`, and `release-matrix.json`; those figures are documented release facts, not runner constants. The matrix keeps both supported runner model selectors, an exact all-case primary profile, an exact 49-case portability profile, and runner-neutral writable assignments. Run `yarn install-skills` first so the pinned external `om-code-review` skill and ownership evidence are present; the reusable local `om-judge-agent-session` skill ships with the scaffold. Before running a model or writing a fixture, the release command requires complete deterministic, primary live-routing, writable, trusted-oracle, target, generated-test, and generative-judge coverage. Every one of the 49 writable cases must have a judge assignment composing both skills. Missing business fixtures or release-matrix entries fail preflight and are listed by exact case ID in the report.
38
38
 
39
39
  ## PR #4529 remediation evidence
40
40
 
41
- The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary 238-case routing and 49-case writable/generated-test/review certification, prioritizing the generative cohort and recording unavailable Claude lanes without fallback or mixed-runner ownership.
41
+ The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary 239-case routing and 49-case writable/generated-test/review certification, prioritizing the generative cohort and recording unavailable Claude lanes without fallback or mixed-runner ownership.
42
42
 
43
43
  After preflight it runs, in order:
44
44
 
45
45
  1. deterministic validation for the complete catalog;
46
46
  2. the release matrix's fixed `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` foundation;
47
- 3. the selected primary runner across all 238 live-routing cases, followed by the optional distinct portability runner across the exact 49-case read-only sample when requested;
47
+ 3. the selected primary runner across all 239 live-routing cases, followed by the optional distinct portability runner across the exact 49-case read-only sample when requested;
48
48
  4. fixture preparation and the selected primary runner for every writable case, including the controller-owned AST/behavior oracles and target typecheck;
49
49
  5. `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` in every writable target, after its trusted oracles;
50
50
  6. real generated-code execution for OMH-163 and OMH-192 through fixed Jest, OMH-164 through API-only Playwright, and OMH-165 through real-browser Playwright; and
@@ -520,7 +520,7 @@
520
520
  ],
521
521
  "maxContextFiles": 8,
522
522
  "maxInitialContextBytes": 65536,
523
- "maxTotalContextBytes": 98304,
523
+ "maxTotalContextBytes": 114688,
524
524
  "relatedCases": [
525
525
  "OMH-008"
526
526
  ]
@@ -1736,7 +1736,7 @@
1736
1736
  ],
1737
1737
  "maxContextFiles": 6,
1738
1738
  "maxInitialContextBytes": 65536,
1739
- "maxTotalContextBytes": 98304,
1739
+ "maxTotalContextBytes": 102400,
1740
1740
  "relatedCases": [
1741
1741
  "OMH-023"
1742
1742
  ]
@@ -2431,7 +2431,7 @@
2431
2431
  ],
2432
2432
  "maxContextFiles": 6,
2433
2433
  "maxInitialContextBytes": 49152,
2434
- "maxTotalContextBytes": 98304,
2434
+ "maxTotalContextBytes": 114688,
2435
2435
  "relatedCases": [
2436
2436
  "OMH-031"
2437
2437
  ]
@@ -4553,7 +4553,7 @@
4553
4553
  ],
4554
4554
  "maxContextFiles": 5,
4555
4555
  "maxInitialContextBytes": 40960,
4556
- "maxTotalContextBytes": 98304,
4556
+ "maxTotalContextBytes": 106496,
4557
4557
  "relatedCases": [
4558
4558
  "OMH-058"
4559
4559
  ],
@@ -5144,7 +5144,7 @@
5144
5144
  ],
5145
5145
  "maxContextFiles": 8,
5146
5146
  "maxInitialContextBytes": 65536,
5147
- "maxTotalContextBytes": 98304,
5147
+ "maxTotalContextBytes": 114688,
5148
5148
  "relatedCases": [
5149
5149
  "OMH-065"
5150
5150
  ]
@@ -21687,5 +21687,79 @@
21687
21687
  ".ai/guides/customers-calendar.md"
21688
21688
  ]
21689
21689
  }
21690
+ },
21691
+ {
21692
+ "id": "OMH-239",
21693
+ "title": "Create or publish one custom module and continue development in the same standalone app",
21694
+ "family": "architecture",
21695
+ "mode": "analysis",
21696
+ "evaluationKind": "routing",
21697
+ "risk": "medium",
21698
+ "prompt": "I am already inside a create-mercato-app Cloud sandbox. Explain the supported npx tool commands to start a new visits module, or package an existing visits module, then publish it to npm and a dedicated GitHub repository. Include a local preview before remote publication and explain how to keep developing in this same app after publication, including the optional repository link and its portability. Distinguish npm login, environment token and trusted publishing requirements. Prepare the workflow only; do not publish or create remote resources.",
21699
+ "tags": [
21700
+ "architecture",
21701
+ "module-package",
21702
+ "publication",
21703
+ "source-link",
21704
+ "auth"
21705
+ ],
21706
+ "owner": {
21707
+ "kind": "guide",
21708
+ "path": ".ai/guides/module-tool.md",
21709
+ "ruleIds": [
21710
+ "BC-01",
21711
+ "BC-04"
21712
+ ]
21713
+ },
21714
+ "expectedRouter": {
21715
+ "required": [
21716
+ "architecture"
21717
+ ],
21718
+ "allowedExtra": []
21719
+ },
21720
+ "requiredSkills": [],
21721
+ "context": {
21722
+ "required": [
21723
+ "AGENTS.md",
21724
+ ".ai/guides/module-tool.md"
21725
+ ],
21726
+ "allowedExtra": [
21727
+ ".ai/guides/architecture.md"
21728
+ ],
21729
+ "forbidden": [
21730
+ ".env*",
21731
+ ".git/**",
21732
+ "node_modules/**"
21733
+ ]
21734
+ },
21735
+ "requiredDecisions": [
21736
+ "module-tool-init-or-existing",
21737
+ "dry-run-before-publication",
21738
+ "fresh-consumer-third-party",
21739
+ "app-source-preserved",
21740
+ "optional-repository-source-link",
21741
+ "npm-auth-mode-boundaries"
21742
+ ],
21743
+ "forbiddenPatterns": [
21744
+ "(?:print|display|commit).{0,30}(?:NPM_TOKEN|NODE_AUTH_TOKEN|raw token)",
21745
+ "(?:edit|patch).{0,30}(?:node_modules|generated registr)"
21746
+ ],
21747
+ "validators": [
21748
+ "catalog.schema",
21749
+ "owner.reference",
21750
+ "skills.reference",
21751
+ "router.contract",
21752
+ "context.budget",
21753
+ "context.forbidden",
21754
+ "patterns.forbidden"
21755
+ ],
21756
+ "maxContextFiles": 3,
21757
+ "maxInitialContextBytes": 32768,
21758
+ "maxTotalContextBytes": 32768,
21759
+ "relatedCases": [
21760
+ "OMH-002",
21761
+ "OMH-046",
21762
+ "OMH-161"
21763
+ ]
21690
21764
  }
21691
21765
  ]
@@ -3,8 +3,8 @@
3
3
  "$id": "https://open-mercato.dev/schemas/standalone-harness-cases.schema.json",
4
4
  "title": "Open Mercato standalone harness case catalog",
5
5
  "type": "array",
6
- "minItems": 238,
7
- "maxItems": 238,
6
+ "minItems": 239,
7
+ "maxItems": 239,
8
8
  "items": {
9
9
  "type": "object",
10
10
  "additionalProperties": false,
@@ -15,7 +15,7 @@
15
15
  "maxTotalContextBytes", "relatedCases"
16
16
  ],
17
17
  "properties": {
18
- "id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-8])$" },
18
+ "id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-9])$" },
19
19
  "title": { "type": "string", "minLength": 12, "maxLength": 180 },
20
20
  "family": { "enum": ["architecture", "module", "umes", "integration", "ai-workflow", "bugfix", "business", "testing"] },
21
21
  "mode": { "enum": ["analysis", "one-shot", "spec", "bugfix", "review"] },
@@ -168,7 +168,7 @@
168
168
  "maxInitialContextBytes": { "type": "integer", "minimum": 4096, "maximum": 98304 },
169
169
  "maxTotalContextBytes": { "type": "integer", "minimum": 8192, "maximum": 1048576 },
170
170
  "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 600000 },
171
- "relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-8])$" } },
171
+ "relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-9])$" } },
172
172
  "source": {
173
173
  "type": "object",
174
174
  "additionalProperties": false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "catalog": {
4
- "expectedCaseCount": 238,
4
+ "expectedCaseCount": 239,
5
5
  "maxContextFiles": 16,
6
6
  "maxInitialContextBytes": 98304,
7
7
  "maxTotalContextBytes": 1048576,
@@ -12,6 +12,8 @@ Create the smallest working vertical slice under `src/modules/<id>/`. START at [
12
12
  - A domain brief; infer names conservatively and ask only when a choice changes public behavior or scope.
13
13
  - Optional requested phases. Without phases, deliver the complete slice needed by the brief.
14
14
 
15
+ With terminal access, initialize a new app module with `npx create-mercato-module init <module_id>` before implementing the slice; skip `init` for existing modules. Without process execution, report that capability gap instead of claiming initialization or bypassing the tool. For publication or continued development in a dedicated repository, follow `.ai/guides/module-tool.md`.
16
+
15
17
  ## Workflow
16
18
 
17
19
  Route before reading: every specialist step below is conditional. Decide from the brief and the blueprint route key first, include each applicable route in the assembled route, and only then read that route's guide or skill. Never probe a specialist guide and discard its route. In particular, do not open the extension or framework-context skill as a precaution: select UMES only for an injected, overridden, enriched, or intercepted installed surface, and select framework context only after naming an unresolved exact-version detail. For an architecture-only plan, the root router's `architecture` + `module-data` exception wins: use the blueprint to name likely UI/workflow surfaces without loading their implementation guides or skills.
@@ -2906,13 +2906,79 @@ function buildRunnerInvocation({ runner, root, schemaPath, outputPath, model, re
2906
2906
  return { command: 'claude', args }
2907
2907
  }
2908
2908
 
2909
- function runAgentOnce({ runner, root, schemaPath, prompt, timeout, model, reasoningEffort, writable, allowedReads = [], allowedWrites = [], immutableRoots = [], validateResponse = validateRoutingResponse }) {
2909
+ export function codexOutputSchema(schema) {
2910
+ if (!isPlainObject(schema)) return schema
2911
+ const strict = { ...schema }
2912
+ delete strict.uniqueItems
2913
+ if (schema.$defs) strict.$defs = Object.fromEntries(Object.entries(schema.$defs).map(([key, child]) => [key, codexOutputSchema(child)]))
2914
+ if (schema.items) strict.items = codexOutputSchema(schema.items)
2915
+ for (const keyword of ['anyOf', 'oneOf', 'allOf']) {
2916
+ if (Array.isArray(schema[keyword])) strict[keyword] = schema[keyword].map(codexOutputSchema)
2917
+ }
2918
+ if (schema.properties) {
2919
+ const required = new Set(schema.required ?? [])
2920
+ strict.properties = Object.fromEntries(Object.entries(schema.properties).map(([key, child]) => {
2921
+ const converted = codexOutputSchema(child)
2922
+ return [key, required.has(key) ? converted : { anyOf: [converted, { type: 'null' }] }]
2923
+ }))
2924
+ strict.required = Object.keys(schema.properties)
2925
+ }
2926
+ return strict
2927
+ }
2928
+
2929
+ function acceptsCanonicalNull(schema, rootSchema) {
2930
+ if (schema.$ref) {
2931
+ const resolved = resolveJsonSchemaReference(rootSchema, schema.$ref)
2932
+ return resolved ? acceptsCanonicalNull(resolved, rootSchema) : false
2933
+ }
2934
+ if (schema.anyOf && !schema.anyOf.some((child) => acceptsCanonicalNull(child, rootSchema))) return false
2935
+ if (schema.oneOf && schema.oneOf.filter((child) => acceptsCanonicalNull(child, rootSchema)).length !== 1) return false
2936
+ return validateJsonSchema(null, schema, '$', rootSchema).length === 0
2937
+ }
2938
+
2939
+ export function normalizeCodexOutput(value, schema, rootSchema = schema) {
2940
+ if (schema.$ref) {
2941
+ const resolved = resolveJsonSchemaReference(rootSchema, schema.$ref)
2942
+ return resolved ? normalizeCodexOutput(value, resolved, rootSchema) : value
2943
+ }
2944
+ if (Array.isArray(value) && schema.items) return value.map((item) => normalizeCodexOutput(item, schema.items, rootSchema))
2945
+ if (!isPlainObject(value) || !schema.properties) return value
2946
+ const normalized = { ...value }
2947
+ const required = new Set(schema.required ?? [])
2948
+ for (const [key, child] of Object.entries(schema.properties)) {
2949
+ if (!Object.hasOwn(value, key)) continue
2950
+ const nullable = acceptsCanonicalNull(child, rootSchema)
2951
+ if (value[key] === null && !required.has(key) && !nullable) delete normalized[key]
2952
+ else normalized[key] = normalizeCodexOutput(value[key], child, rootSchema)
2953
+ }
2954
+ return normalized
2955
+ }
2956
+
2957
+ export function codexOutputPrompt(prompt, schema) {
2958
+ const optionalFields = Object.keys(schema.properties ?? {}).filter((key) => !(schema.required ?? []).includes(key))
2959
+ if (!optionalFields.length) return prompt
2960
+ return `${prompt}\n\nCodex wire format: nullable fields encode optional output. Use null for fields that the instructions omit or do not request; never invent optional content merely because the wire schema requires its key.`
2961
+ }
2962
+
2963
+ export function routingResponseSchemaForCase(schema, caseRecord) {
2964
+ if (isSpecRoutingCase(caseRecord) || !schema.properties?.specRouting) return schema
2965
+ const properties = { ...schema.properties }
2966
+ delete properties.specRouting
2967
+ return {
2968
+ ...schema,
2969
+ properties,
2970
+ required: (schema.required ?? []).filter((key) => key !== 'specRouting'),
2971
+ }
2972
+ }
2973
+
2974
+ function runAgentOnce({ runner, root, schemaPath, responseSchema, prompt, timeout, model, reasoningEffort, writable, allowedReads = [], allowedWrites = [], immutableRoots = [], validateResponse = validateRoutingResponse }) {
2910
2975
  const canonicalRoot = fs.realpathSync(root)
2911
2976
  const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'om-harness-result-'))
2912
2977
  const outputPath = path.join(tempDir, 'structured.json')
2913
2978
  const isolatedSchemaPath = path.join(tempDir, 'output.schema.json')
2914
- fs.copyFileSync(schemaPath, isolatedSchemaPath, fs.constants.COPYFILE_EXCL)
2915
- fs.chmodSync(isolatedSchemaPath, 0o600)
2979
+ const canonicalSchema = responseSchema ?? readJson(schemaPath)
2980
+ const transportSchema = runner === 'codex' ? codexOutputSchema(canonicalSchema) : canonicalSchema
2981
+ fs.writeFileSync(isolatedSchemaPath, `${JSON.stringify(transportSchema)}\n`, { flag: 'wx', mode: 0o600 })
2916
2982
  const invocation = buildRunnerInvocation({ runner, root: canonicalRoot, schemaPath: isolatedSchemaPath, outputPath, model, reasoningEffort, writable, allowedReads, allowedWrites, immutableRoots })
2917
2983
  const runnerEnv = narrowRunnerEnv(runner)
2918
2984
  if (runner === 'codex') {
@@ -2966,7 +3032,7 @@ function runAgentOnce({ runner, root, schemaPath, prompt, timeout, model, reason
2966
3032
  })
2967
3033
  const processResult = spawnSync(contained.command, contained.args, {
2968
3034
  cwd: contained.cwd,
2969
- input: prompt,
3035
+ input: runner === 'codex' ? codexOutputPrompt(prompt, canonicalSchema) : prompt,
2970
3036
  encoding: 'utf8',
2971
3037
  timeout,
2972
3038
  maxBuffer: 8 * 1024 * 1024,
@@ -2979,8 +3045,9 @@ function runAgentOnce({ runner, root, schemaPath, prompt, timeout, model, reason
2979
3045
  if (processResult.error) return { kind: 'environment-failure', durationMs, exitStatus: processResult.status, error: processResult.error.message, stdout: processResult.stdout ?? '' }
2980
3046
  if (processResult.status !== 0) return { kind: 'process-failure', durationMs, exitStatus: processResult.status, error: processFailureDiagnostic(runner, processResult), stdout: processResult.stdout ?? '' }
2981
3047
  try {
2982
- const rawResponse = extractJsonCandidate(processResult.stdout ?? '', outputPath, runner)
2983
- const schemaErrors = [...validateResponse(rawResponse), ...validateJsonSchema(rawResponse, readJson(schemaPath))]
3048
+ const transportResponse = extractJsonCandidate(processResult.stdout ?? '', outputPath, runner)
3049
+ const rawResponse = runner === 'codex' ? normalizeCodexOutput(transportResponse, canonicalSchema) : transportResponse
3050
+ const schemaErrors = [...validateResponse(rawResponse), ...validateJsonSchema(rawResponse, canonicalSchema)]
2984
3051
  if (schemaErrors.length) return { kind: 'invalid-structured-output', durationMs, exitStatus: processResult.status, error: schemaErrors.join('; '), stdout: processResult.stdout ?? '' }
2985
3052
  const response = rawResponse
2986
3053
  for (const key of ['selectedRouter', 'selectedSkills', 'selectedContext', 'decisions', 'violations']) {
@@ -3668,6 +3735,7 @@ export function resolveLiveCaseTimeout(options, model, caseTimeout = 0) {
3668
3735
 
3669
3736
  function liveRun({ options, selected, registry, releaseMatrix, fixtures, root, harnessDir, resultSchema }) {
3670
3737
  const schemaPath = path.join(harnessDir, 'routing-response.schema.json')
3738
+ const routingResponseSchema = readJson(schemaPath)
3671
3739
  const version = runnerVersion(options.runner, root)
3672
3740
  const model = options.model ?? releaseMatrix.routing.runners[options.runner].modelSelector
3673
3741
  const writableRoot = options.writableRoot ? path.resolve(options.writableRoot) : undefined
@@ -3710,8 +3778,9 @@ function liveRun({ options, selected, registry, releaseMatrix, fixtures, root, h
3710
3778
  // fail-closed tool server, so a declared example root can never be written.
3711
3779
  const immutableRoots = immutableExampleRoots(evaluationCase)
3712
3780
  const timeout = resolveLiveCaseTimeout(options, model, caseRecord.timeoutMs ?? 0)
3781
+ const responseSchema = routingResponseSchemaForCase(routingResponseSchema, evaluationCase)
3713
3782
  const executions = [runAgentOnce({
3714
- runner: options.runner, root: runRoot, schemaPath, prompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3783
+ runner: options.runner, root: runRoot, schemaPath, responseSchema, prompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3715
3784
  allowedReads, allowedWrites: writable ? caseRecord.allowedWrites ?? [] : [], immutableRoots,
3716
3785
  })]
3717
3786
  let execution = executions[0]
@@ -3723,7 +3792,7 @@ function liveRun({ options, selected, registry, releaseMatrix, fixtures, root, h
3723
3792
  ? `${prompt}\n\nYour previous response was not valid structured output. Return only the schema object.`
3724
3793
  : `${prompt}\n\nThis is retry attempt 2 after a transient provider failure. Continue with the same routing contract.`
3725
3794
  execution = runAgentOnce({
3726
- runner: options.runner, root: runRoot, schemaPath, prompt: retryPrompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3795
+ runner: options.runner, root: runRoot, schemaPath, responseSchema, prompt: retryPrompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3727
3796
  allowedReads, allowedWrites: writable ? caseRecord.allowedWrites ?? [] : [], immutableRoots,
3728
3797
  })
3729
3798
  executions.push(execution)
@@ -3787,7 +3856,7 @@ function liveRun({ options, selected, registry, releaseMatrix, fixtures, root, h
3787
3856
  const diagnostics = routingCorrectionDiagnostics(evaluated.violations)
3788
3857
  const retryPrompt = `${prompt}\n\nThis is correction attempt ${executions.length + 1} after the previous routing answer failed a non-safety contract. Correction kind: ${correctionKind}. Evaluator diagnostics: ${JSON.stringify(diagnostics)}. These diagnostics identify only the failing contract categories; derive every answer from emitted instructions. Start the routing audit again by calling harness.read with {"path":"AGENTS.md"}; never call read_mcp_resource or any resource API. Re-evaluate every additive Axis 1 route, Axis 2 work-unit skill, module fact, and required decision while opening only the smallest task-matching initial context. Build selectedContext from every successful read in this correction attempt: add every opened routed guide's route and every opened skill's ID, or avoid opening it. Never reuse or prune the previous answer. Re-check the context budget, then return only the schema object.`
3789
3858
  execution = runAgentOnce({
3790
- runner: options.runner, root: runRoot, schemaPath, prompt: retryPrompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3859
+ runner: options.runner, root: runRoot, schemaPath, responseSchema, prompt: retryPrompt, timeout, model, reasoningEffort: options.reasoningEffort, writable,
3791
3860
  allowedReads, allowedWrites: [], immutableRoots,
3792
3861
  })
3793
3862
  executions.push(execution)
@@ -69,16 +69,17 @@ export function collapseReadOnlyRoots(values) {
69
69
 
70
70
  export function linuxMergedUsrSymlinkArgs() {
71
71
  const aliases = [
72
- ['/bin', 'usr/bin'],
73
- ['/sbin', 'usr/sbin'],
74
- ['/lib', 'usr/lib'],
75
- ['/lib64', 'usr/lib64'],
72
+ ['/bin', ['usr/bin']],
73
+ ['/sbin', ['usr/sbin', 'usr/bin']],
74
+ ['/lib', ['usr/lib']],
75
+ ['/lib64', ['usr/lib64', 'usr/lib']],
76
76
  ]
77
- return aliases.flatMap(([alias, expected]) => {
77
+ return aliases.flatMap(([alias, targets]) => {
78
78
  try {
79
79
  const stat = fs.lstatSync(alias)
80
- return stat.isSymbolicLink() && fs.readlinkSync(alias) === expected
81
- ? ['--symlink', expected, alias]
80
+ const target = stat.isSymbolicLink() ? fs.readlinkSync(alias) : null
81
+ return targets.includes(target)
82
+ ? ['--symlink', target, alias]
82
83
  : []
83
84
  } catch { return [] }
84
85
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/cli",
3
- "version": "0.9.1-develop.7464.1.9a392fca41",
3
+ "version": "0.9.1-develop.7467.1.3b2bb92d47",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "@mikro-orm/decorators": "^7.1.14",
61
61
  "@mikro-orm/migrations": "^7.1.14",
62
62
  "@mikro-orm/postgresql": "^7.1.14",
63
- "@open-mercato/events": "0.9.1-develop.7464.1.9a392fca41",
64
- "@open-mercato/queue": "0.9.1-develop.7464.1.9a392fca41",
65
- "@open-mercato/shared": "0.9.1-develop.7464.1.9a392fca41",
66
- "@open-mercato/telemetry": "0.9.1-develop.7464.1.9a392fca41",
63
+ "@open-mercato/events": "0.9.1-develop.7467.1.3b2bb92d47",
64
+ "@open-mercato/queue": "0.9.1-develop.7467.1.3b2bb92d47",
65
+ "@open-mercato/shared": "0.9.1-develop.7467.1.3b2bb92d47",
66
+ "@open-mercato/telemetry": "0.9.1-develop.7467.1.3b2bb92d47",
67
67
  "cross-spawn": "^7.0.6",
68
68
  "pg": "8.23.0",
69
69
  "semver": "^7.8.5",
@@ -74,10 +74,10 @@
74
74
  "typescript-js": "npm:typescript@6.0.3"
75
75
  },
76
76
  "peerDependencies": {
77
- "@open-mercato/shared": "0.9.1-develop.7464.1.9a392fca41"
77
+ "@open-mercato/shared": "0.9.1-develop.7467.1.3b2bb92d47"
78
78
  },
79
79
  "devDependencies": {
80
- "@open-mercato/shared": "0.9.1-develop.7464.1.9a392fca41",
80
+ "@open-mercato/shared": "0.9.1-develop.7467.1.3b2bb92d47",
81
81
  "@types/jest": "^30.0.0",
82
82
  "jest": "^30.4.2",
83
83
  "ts-jest": "^29.4.12"