@svenroth-ai/shipwright 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/{EmbeddedTerminal-5QvKe3_a.js → EmbeddedTerminal-CqCQUDtp.js} +1 -1
- package/client/dist/assets/{abnfDiagram-VRR7QNED-CXi9HegQ.js → abnfDiagram-VRR7QNED-DX2objTP.js} +1 -1
- package/client/dist/assets/{arc-DLh4GiqR.js → arc-DQmjbsFU.js} +1 -1
- package/client/dist/assets/{architectureDiagram-ZJ3FMSHR-DUypQ8dQ.js → architectureDiagram-ZJ3FMSHR-DAvCsPCW.js} +1 -1
- package/client/dist/assets/{blockDiagram-677ZJIJ3-D2cVMKJG.js → blockDiagram-677ZJIJ3-DC-dlyYI.js} +1 -1
- package/client/dist/assets/{c4Diagram-LMCZKHZV-DtruBGJw.js → c4Diagram-LMCZKHZV-DSlmXfhE.js} +1 -1
- package/client/dist/assets/channel-BfmIcrp7.js +1 -0
- package/client/dist/assets/{chunk-2Q5K7J3B-CAfQkFw2.js → chunk-2Q5K7J3B-C111EHL6.js} +1 -1
- package/client/dist/assets/{chunk-32BRIVSS-CPWXoLnQ.js → chunk-32BRIVSS-DrCYs2XG.js} +1 -1
- package/client/dist/assets/{chunk-5VM5RSS4-xVc3oppQ.js → chunk-5VM5RSS4-DIejoaXS.js} +1 -1
- package/client/dist/assets/{chunk-EX3LRPZG-CUpl6fRR.js → chunk-EX3LRPZG-CGWNeH2g.js} +1 -1
- package/client/dist/assets/{chunk-JWPE2WC7-NejUp56x.js → chunk-JWPE2WC7-CCH0SRFY.js} +1 -1
- package/client/dist/assets/{chunk-MOJQB5TN-C9-2lLg0.js → chunk-MOJQB5TN-B3OpZGRv.js} +1 -1
- package/client/dist/assets/{chunk-RYQCIY6F-BAPtwABy.js → chunk-RYQCIY6F-BKhdp_8v.js} +1 -1
- package/client/dist/assets/{chunk-V7JOEXUC-Dwzihw26.js → chunk-V7JOEXUC-B6Bu8x1y.js} +1 -1
- package/client/dist/assets/{chunk-VR4S4FIN-9-iArFJM.js → chunk-VR4S4FIN-OgFi2_iB.js} +1 -1
- package/client/dist/assets/{chunk-XXDRQBXY-DiWHOrqe.js → chunk-XXDRQBXY-xyjuuhxl.js} +1 -1
- package/client/dist/assets/classDiagram-OUVF2IWQ-HfUQZ6Uc.js +1 -0
- package/client/dist/assets/classDiagram-v2-EOCWNBFH-HfUQZ6Uc.js +1 -0
- package/client/dist/assets/{cose-bilkent-JH36ORCC-Cp04EOcH.js → cose-bilkent-JH36ORCC-BQIH3SCK.js} +1 -1
- package/client/dist/assets/{cynefin-VYW2F7L2-D--GN1v8.js → cynefin-VYW2F7L2-oyLAz8te.js} +1 -1
- package/client/dist/assets/{cynefinDiagram-TSTJHNR4-BGH0o_qp.js → cynefinDiagram-TSTJHNR4-DoLCsH0l.js} +1 -1
- package/client/dist/assets/{dagre-VKFMJZFB-DSKkIKlj.js → dagre-VKFMJZFB-D7djx1_Y.js} +1 -1
- package/client/dist/assets/{diagram-FQU43EPY-Cs_C4lb-.js → diagram-FQU43EPY-DFuYE0Vf.js} +1 -1
- package/client/dist/assets/{diagram-G47NLZAW-oDtAA8O_.js → diagram-G47NLZAW-CffCZVXk.js} +1 -1
- package/client/dist/assets/{diagram-NH7WQ7WH-BiFMjqSH.js → diagram-NH7WQ7WH-BhrHtUlt.js} +1 -1
- package/client/dist/assets/{diagram-OA4YK3LP-Ccs3thCj.js → diagram-OA4YK3LP-CwQPbOn0.js} +1 -1
- package/client/dist/assets/{diagram-WEI45ONY-CdZNqgO3.js → diagram-WEI45ONY-abtYnYqH.js} +1 -1
- package/client/dist/assets/{ebnfDiagram-CCIWWBDH-CapTA0VL.js → ebnfDiagram-CCIWWBDH-DfV7gT4m.js} +1 -1
- package/client/dist/assets/{erDiagram-Q63AITRT-BcRNEP8s.js → erDiagram-Q63AITRT-vtbCprgH.js} +1 -1
- package/client/dist/assets/{flowDiagram-23GEKE2U-CJ_zF7e_.js → flowDiagram-23GEKE2U-CVCgcyDF.js} +1 -1
- package/client/dist/assets/{ganttDiagram-NO4QXBWP-CnJdcg9A.js → ganttDiagram-NO4QXBWP-BclyOgMb.js} +1 -1
- package/client/dist/assets/{gitGraphDiagram-IHSO6WYX-YTUQ_ELk.js → gitGraphDiagram-IHSO6WYX-BXT4rIKj.js} +1 -1
- package/client/dist/assets/index-CKU9dY18.css +1 -0
- package/client/dist/assets/index-DOMl6atu.js +847 -0
- package/client/dist/assets/{infoDiagram-FWYZ7A6U-CLOP_ZWD.js → infoDiagram-FWYZ7A6U-Dr4mN24J.js} +1 -1
- package/client/dist/assets/{ishikawaDiagram-FXEZZL3T-aFTIzr7o.js → ishikawaDiagram-FXEZZL3T-BBUFWq5C.js} +1 -1
- package/client/dist/assets/{journeyDiagram-5HDEW3XC-CbPJB4xd.js → journeyDiagram-5HDEW3XC-CmclipcQ.js} +1 -1
- package/client/dist/assets/{kanban-definition-HUTT4EX6-BoyhytIS.js → kanban-definition-HUTT4EX6-eIzUeZ03.js} +1 -1
- package/client/dist/assets/{linear-1VXA-uBg.js → linear-DGiT7uKK.js} +1 -1
- package/client/dist/assets/{mermaid.core-D_lO2yK9.js → mermaid.core-BcLNGbxW.js} +4 -4
- package/client/dist/assets/{mindmap-definition-LN4V7U3C-iFK7LXMx.js → mindmap-definition-LN4V7U3C-C4ANnNiP.js} +1 -1
- package/client/dist/assets/{pegDiagram-2B236MQR-DNmcmfA-.js → pegDiagram-2B236MQR-DnMeh3Yh.js} +1 -1
- package/client/dist/assets/{pieDiagram-ENE6RG2P-ekx83O5b.js → pieDiagram-ENE6RG2P-CKV_rkhF.js} +1 -1
- package/client/dist/assets/{quadrantDiagram-ABIIQ3AL-DayyD1l8.js → quadrantDiagram-ABIIQ3AL-BuUsGwHh.js} +1 -1
- package/client/dist/assets/{railroadDiagram-RFXS5EU6-Bdgz7S6G.js → railroadDiagram-RFXS5EU6-BwwdKnFL.js} +1 -1
- package/client/dist/assets/{requirementDiagram-TGXJPOKE-szP3Muld.js → requirementDiagram-TGXJPOKE-CpQZouJV.js} +1 -1
- package/client/dist/assets/{sankeyDiagram-HTMAVEWB-Ct3rzgUj.js → sankeyDiagram-HTMAVEWB-4fnDUNVa.js} +1 -1
- package/client/dist/assets/{sequenceDiagram-DBY2YBRQ-_69EfmOU.js → sequenceDiagram-DBY2YBRQ-BOcaWlM0.js} +1 -1
- package/client/dist/assets/{sizeCapture-X5ZJPWSS-BSOU06J2.js → sizeCapture-X5ZJPWSS-_pv-9R0c.js} +1 -1
- package/client/dist/assets/{stateDiagram-2N3HPSRC-HmOmFwQm.js → stateDiagram-2N3HPSRC-CFwCOonY.js} +1 -1
- package/client/dist/assets/stateDiagram-v2-6OUMAXLB-srkiu3Ib.js +1 -0
- package/client/dist/assets/{swimlanes-5IMT3BWC-CVg_4oT7.js → swimlanes-5IMT3BWC-DFa2tzxu.js} +2 -2
- package/client/dist/assets/swimlanesDiagram-G3AALYLV-Dq-0K9Zm.js +8 -0
- package/client/dist/assets/{timeline-definition-FHXFAJF6-CBBaDKXm.js → timeline-definition-FHXFAJF6-rhGYElgn.js} +1 -1
- package/client/dist/assets/{vennDiagram-L72KCM5P-CBXiWPMc.js → vennDiagram-L72KCM5P-BoGjRxyA.js} +1 -1
- package/client/dist/assets/{wardleyDiagram-EHGQE667-uhBCZoW0.js → wardleyDiagram-EHGQE667-D-IGv5bH.js} +1 -1
- package/client/dist/assets/{xychartDiagram-FW5EYKEG-xxE_wY5O.js → xychartDiagram-FW5EYKEG-D9PFTCfm.js} +1 -1
- package/client/dist/index.html +27 -27
- package/lib/claude-cli.mjs +173 -173
- package/lib/preflight.mjs +252 -252
- package/lib/probe-path.mjs +84 -84
- package/lib/probes.mjs +10 -4
- package/lib/server.mjs +506 -369
- package/lib/util.mjs +157 -157
- package/lib/win32-spawn.mjs +253 -253
- package/package.json +68 -68
- package/scripts/deploy-procs.mjs +208 -208
- package/scripts/deploy-swap.mjs +276 -276
- package/scripts/kill-targets.js +140 -140
- package/scripts/repair-claude-json.mjs +295 -295
- package/server/dist/config/default-actions.json +90 -90
- package/server/dist/core/mission-context/association.d.ts +46 -0
- package/server/dist/core/mission-context/association.d.ts.map +1 -1
- package/server/dist/core/mission-context/association.js +69 -0
- package/server/dist/core/mission-context/association.js.map +1 -1
- package/server/dist/core/mission-context/resolver-iterate.d.ts +6 -0
- package/server/dist/core/mission-context/resolver-iterate.d.ts.map +1 -0
- package/server/dist/core/mission-context/resolver-iterate.js +202 -0
- package/server/dist/core/mission-context/resolver-iterate.js.map +1 -0
- package/server/dist/core/mission-context/resolver-parts.d.ts +20 -0
- package/server/dist/core/mission-context/resolver-parts.d.ts.map +1 -1
- package/server/dist/core/mission-context/resolver-parts.js +92 -0
- package/server/dist/core/mission-context/resolver-parts.js.map +1 -1
- package/server/dist/core/mission-context/resolver.d.ts +1 -1
- package/server/dist/core/mission-context/resolver.d.ts.map +1 -1
- package/server/dist/core/mission-context/resolver.js +17 -199
- package/server/dist/core/mission-context/resolver.js.map +1 -1
- package/server/dist/core/mission-context/run-id-recovery.d.ts +21 -5
- package/server/dist/core/mission-context/run-id-recovery.d.ts.map +1 -1
- package/server/dist/core/mission-context/run-id-recovery.js +32 -5
- package/server/dist/core/mission-context/run-id-recovery.js.map +1 -1
- package/server/dist/core/mission-context/scenario.d.ts +18 -11
- package/server/dist/core/mission-context/scenario.d.ts.map +1 -1
- package/server/dist/core/mission-context/scenario.js +40 -3
- package/server/dist/core/mission-context/scenario.js.map +1 -1
- package/server/dist/core/path-guard.d.ts +1 -1
- package/server/dist/core/path-guard.d.ts.map +1 -1
- package/server/dist/core/path-guard.js +9 -2
- package/server/dist/core/path-guard.js.map +1 -1
- package/server/dist/core/sdk-sessions-merge.d.ts +19 -0
- package/server/dist/core/sdk-sessions-merge.d.ts.map +1 -1
- package/server/dist/core/sdk-sessions-merge.js +19 -5
- package/server/dist/core/sdk-sessions-merge.js.map +1 -1
- package/server/dist/core/sdk-sessions-refresh.d.ts +50 -0
- package/server/dist/core/sdk-sessions-refresh.d.ts.map +1 -0
- package/server/dist/core/sdk-sessions-refresh.js +69 -0
- package/server/dist/core/sdk-sessions-refresh.js.map +1 -0
- package/server/dist/core/sdk-sessions-store.d.ts +2 -0
- package/server/dist/core/sdk-sessions-store.d.ts.map +1 -1
- package/server/dist/core/sdk-sessions-store.js +7 -9
- package/server/dist/core/sdk-sessions-store.js.map +1 -1
- package/server/dist/core/shipslog-docs-reader.d.ts +4 -0
- package/server/dist/core/shipslog-docs-reader.d.ts.map +1 -0
- package/server/dist/core/shipslog-docs-reader.js +181 -0
- package/server/dist/core/shipslog-docs-reader.js.map +1 -0
- package/server/dist/core/shipslog-docs-types.d.ts +15 -0
- package/server/dist/core/shipslog-docs-types.d.ts.map +1 -0
- package/server/dist/core/shipslog-docs-types.js +14 -0
- package/server/dist/core/shipslog-docs-types.js.map +1 -0
- package/server/dist/core/shipwright-plugin-version-reader.d.ts +15 -0
- package/server/dist/core/shipwright-plugin-version-reader.d.ts.map +1 -0
- package/server/dist/core/shipwright-plugin-version-reader.js +49 -0
- package/server/dist/core/shipwright-plugin-version-reader.js.map +1 -0
- package/server/dist/external/design-review/serve.js +27 -27
- package/server/dist/external/inbox/_derive.d.ts +2 -25
- package/server/dist/external/inbox/_derive.d.ts.map +1 -1
- package/server/dist/external/inbox/_derive.js.map +1 -1
- package/server/dist/external/inbox/_lead.d.ts +23 -0
- package/server/dist/external/inbox/_lead.d.ts.map +1 -0
- package/server/dist/external/inbox/_lead.js +83 -0
- package/server/dist/external/inbox/_lead.js.map +1 -0
- package/server/dist/external/inbox/_types.d.ts +32 -0
- package/server/dist/external/inbox/_types.d.ts.map +1 -0
- package/server/dist/external/inbox/_types.js +10 -0
- package/server/dist/external/inbox/_types.js.map +1 -0
- package/server/dist/external/inbox/routes.d.ts.map +1 -1
- package/server/dist/external/inbox/routes.js +29 -1
- package/server/dist/external/inbox/routes.js.map +1 -1
- package/server/dist/external/launch/claim-holder-gate.d.ts +42 -0
- package/server/dist/external/launch/claim-holder-gate.d.ts.map +1 -0
- package/server/dist/external/launch/claim-holder-gate.js +87 -0
- package/server/dist/external/launch/claim-holder-gate.js.map +1 -0
- package/server/dist/external/launch/routes.d.ts.map +1 -1
- package/server/dist/external/launch/routes.js +23 -19
- package/server/dist/external/launch/routes.js.map +1 -1
- package/server/dist/external/mission-context/association-write.d.ts +22 -0
- package/server/dist/external/mission-context/association-write.d.ts.map +1 -0
- package/server/dist/external/mission-context/association-write.js +90 -0
- package/server/dist/external/mission-context/association-write.js.map +1 -0
- package/server/dist/external/mission-context/routes.d.ts.map +1 -1
- package/server/dist/external/mission-context/routes.js +18 -31
- package/server/dist/external/mission-context/routes.js.map +1 -1
- package/server/dist/external/org/lead-question-threads.d.ts +46 -0
- package/server/dist/external/org/lead-question-threads.d.ts.map +1 -0
- package/server/dist/external/org/lead-question-threads.js +132 -0
- package/server/dist/external/org/lead-question-threads.js.map +1 -0
- package/server/dist/external/org/mount.d.ts +3 -0
- package/server/dist/external/org/mount.d.ts.map +1 -1
- package/server/dist/external/org/mount.js +2 -1
- package/server/dist/external/org/mount.js.map +1 -1
- package/server/dist/external/org/usage.d.ts.map +1 -1
- package/server/dist/external/org/usage.js +20 -2
- package/server/dist/external/org/usage.js.map +1 -1
- package/server/dist/external/routes.d.ts.map +1 -1
- package/server/dist/external/routes.js +10 -13
- package/server/dist/external/routes.js.map +1 -1
- package/server/dist/external/shipslog-docs/routes.d.ts +10 -0
- package/server/dist/external/shipslog-docs/routes.d.ts.map +1 -0
- package/server/dist/external/shipslog-docs/routes.js +41 -0
- package/server/dist/external/shipslog-docs/routes.js.map +1 -0
- package/server/dist/routes/diagnostics.d.ts +12 -0
- package/server/dist/routes/diagnostics.d.ts.map +1 -1
- package/server/dist/routes/diagnostics.js +4 -1
- package/server/dist/routes/diagnostics.js.map +1 -1
- package/server/dist/routes/org-threads-composite.d.ts +24 -0
- package/server/dist/routes/org-threads-composite.d.ts.map +1 -0
- package/server/dist/routes/org-threads-composite.js +51 -0
- package/server/dist/routes/org-threads-composite.js.map +1 -0
- package/server/dist/routes/org.d.ts +5 -0
- package/server/dist/routes/org.d.ts.map +1 -1
- package/server/dist/routes/org.js +13 -0
- package/server/dist/routes/org.js.map +1 -1
- package/server/dist/terminal/pty-manager.d.ts +23 -1
- package/server/dist/terminal/pty-manager.d.ts.map +1 -1
- package/server/dist/terminal/pty-manager.js +22 -3
- package/server/dist/terminal/pty-manager.js.map +1 -1
- package/server/dist/terminal/pty-write-chunker.d.ts +109 -0
- package/server/dist/terminal/pty-write-chunker.d.ts.map +1 -0
- package/server/dist/terminal/pty-write-chunker.js +234 -0
- package/server/dist/terminal/pty-write-chunker.js.map +1 -0
- package/server/dist/types/org.d.ts +19 -0
- package/server/dist/types/org.d.ts.map +1 -1
- package/server/package.json +1 -1
- package/server/profiles/PROFILE_SCHEMA_VERSION +1 -1
- package/server/profiles/README.md +27 -27
- package/server/profiles/python-plugin-monorepo.json +35 -35
- package/server/profiles/supabase-nextjs.json +253 -253
- package/server/profiles/vite-hono.json +92 -92
- package/client/dist/assets/channel-C_k-9jsa.js +0 -1
- package/client/dist/assets/classDiagram-OUVF2IWQ-CsEPq9Ac.js +0 -1
- package/client/dist/assets/classDiagram-v2-EOCWNBFH-CsEPq9Ac.js +0 -1
- package/client/dist/assets/index-6nZ1bt0a.css +0 -1
- package/client/dist/assets/index-irQhGNpn.js +0 -828
- package/client/dist/assets/stateDiagram-v2-6OUMAXLB-BW8H33dv.js +0 -1
- package/client/dist/assets/swimlanesDiagram-G3AALYLV-BaRlxcPD.js +0 -8
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"defaults": {
|
|
4
|
-
"autonomy": "guided"
|
|
5
|
-
},
|
|
6
|
-
"actions": [
|
|
7
|
-
{
|
|
8
|
-
"id": "new-task",
|
|
9
|
-
"label": "New task",
|
|
10
|
-
"kind": "external_launch",
|
|
11
|
-
"description": "Plain Claude invocation scoped to a Shipwright phase. Fire-and-forget — no pipeline state.",
|
|
12
|
-
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
13
|
-
"modal_fields": ["title", "phase", "description", "domain", "priority", "complexityHint", "tags", "blockedBy"],
|
|
14
|
-
"phase_parameters": {
|
|
15
|
-
"adopt": [
|
|
16
|
-
{ "name": "dry-run", "type": "boolean", "label": "Dry run", "cli_flag": "--dry-run", "helpText": "Simulate adoption without commits" },
|
|
17
|
-
{ "name": "scope", "type": "enum", "label": "Scope", "enum": ["full_app", "library", "cli"], "cli_flag": "--scope", "value_separator": "space" },
|
|
18
|
-
{ "name": "include-nested", "type": "boolean", "label": "Include nested projects", "cli_flag": "--include-nested" },
|
|
19
|
-
{ "name": "skip-crawl", "type": "boolean", "label": "Skip Playwright crawl", "cli_flag": "--skip-crawl" },
|
|
20
|
-
{ "name": "crawl-base-url", "type": "string", "label": "Crawl base URL", "cli_flag": "--crawl-base-url", "value_separator": "space", "placeholder": "e.g. http://localhost:3000" },
|
|
21
|
-
{ "name": "crawl-auth-token", "type": "string", "label": "Crawl auth token", "cli_flag": "--crawl-auth-token", "value_separator": "space", "sensitive": true },
|
|
22
|
-
{ "name": "crawl-max-depth", "type": "string", "label": "Crawl max depth", "cli_flag": "--crawl-max-depth", "value_separator": "space", "pattern": "^[1-9][0-9]?$", "default": "3" },
|
|
23
|
-
{ "name": "crawl-max-pages", "type": "string", "label": "Crawl max pages", "cli_flag": "--crawl-max-pages", "value_separator": "space", "pattern": "^[1-9][0-9]{0,3}$", "default": "50" },
|
|
24
|
-
{ "name": "no-backfill-events", "type": "boolean", "label": "Skip event backfill", "cli_flag": "--no-backfill-events" },
|
|
25
|
-
{ "name": "no-sync", "type": "boolean", "label": "Skip writing sync config", "cli_flag": "--no-sync" },
|
|
26
|
-
{ "name": "planning-split", "type": "string", "label": "Planning split name", "cli_flag": "--planning-split", "value_separator": "space", "default": "01-adopted", "pattern": "^[A-Za-z0-9_-]+$" }
|
|
27
|
-
],
|
|
28
|
-
"build": [
|
|
29
|
-
{ "name": "section", "type": "string", "label": "Section file (relative to project)", "cli_flag": "@", "value_separator": "none", "pattern": "^[A-Za-z0-9_./-]+\\.md$", "placeholder": "e.g. planning/03-build-feature.md", "required": true, "helpText": "Path relative to your project root — e.g. planning/03-build-feature.md. /shipwright-plan creates these files; pick one to build now." },
|
|
30
|
-
{ "name": "from", "type": "string", "label": "Start from section number", "cli_flag": "--from", "value_separator": "space", "pattern": "^[0-9]+$", "placeholder": "e.g. 03", "helpText": "Resume autonomous build from this section number" }
|
|
31
|
-
],
|
|
32
|
-
"test": [
|
|
33
|
-
{ "name": "fix", "type": "boolean", "label": "Auto-fix failing tests", "cli_flag": "--fix" },
|
|
34
|
-
{ "name": "e2e-only", "type": "boolean", "label": "E2E tests only", "cli_flag": "--e2e-only" },
|
|
35
|
-
{ "name": "design-fidelity", "type": "boolean", "label": "Design-fidelity check only", "cli_flag": "--design-fidelity" }
|
|
36
|
-
],
|
|
37
|
-
"deploy": [
|
|
38
|
-
{ "name": "target", "type": "enum", "label": "Target", "enum": ["dev", "prod", "rollback"], "cli_flag_map": { "prod": "--prod", "rollback": "--rollback" }, "default": "dev", "helpText": "Dev is default — no CLI flag emitted." }
|
|
39
|
-
],
|
|
40
|
-
"changelog": [
|
|
41
|
-
{ "name": "from", "type": "string", "label": "From git tag", "cli_flag": "--from", "value_separator": "space", "pattern": "^[A-Za-z0-9._/-]+$", "placeholder": "e.g. v0.3.1" }
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"id": "new-pipeline",
|
|
47
|
-
"label": "New pipeline",
|
|
48
|
-
"kind": "external_launch",
|
|
49
|
-
"description": "Full Shipwright pipeline — project → design → plan → build → test → deploy → changelog.",
|
|
50
|
-
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
51
|
-
"modal_fields": ["title", "autonomy", "description"]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"id": "new-iterate",
|
|
55
|
-
"label": "New iterate",
|
|
56
|
-
"kind": "external_launch",
|
|
57
|
-
"description": "Run the complexity-adaptive iterate skill against an existing project.",
|
|
58
|
-
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
59
|
-
"modal_fields": ["title", "autonomy", "description", "domain", "priority", "complexityHint", "tags", "blockedBy"],
|
|
60
|
-
"parameters": [
|
|
61
|
-
{ "name": "type", "type": "enum", "label": "Change type", "enum": ["feature", "change", "bug"], "cli_flag": "--type", "value_separator": "space", "helpText": "Auto-detected if omitted" },
|
|
62
|
-
{ "name": "plan-review-model", "type": "enum", "label": "Plan review", "enum": ["opus", "sonnet", "haiku", "inherit"], "cli_flag": "--plan-review-model", "value_separator": "space" },
|
|
63
|
-
{ "name": "review-model", "type": "enum", "label": "Review", "enum": ["opus", "sonnet", "haiku", "inherit"], "cli_flag": "--review-model", "value_separator": "space" }
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"id": "new-plain",
|
|
68
|
-
"label": "Plain Claude",
|
|
69
|
-
"kind": "external_launch",
|
|
70
|
-
"description": "Plain Claude session in this project's directory. No Shipwright skill — just chat.",
|
|
71
|
-
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs}{task.description?}",
|
|
72
|
-
"modal_fields": ["title", "description"]
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"phases": [
|
|
76
|
-
{ "id": "adopt", "label": "Adopt", "color": "#64748B" },
|
|
77
|
-
{ "id": "project", "label": "Project", "color": "#9ca3af" },
|
|
78
|
-
{ "id": "design", "label": "Design", "color": "#A855F7" },
|
|
79
|
-
{ "id": "plan", "label": "Plan", "color": "#3B82F6" },
|
|
80
|
-
{ "id": "build", "label": "Build", "color": "#F59E0B", "supports_autonomy": true },
|
|
81
|
-
{ "id": "test", "label": "Test", "color": "#059669", "supports_autonomy": true },
|
|
82
|
-
{ "id": "deploy", "label": "Deploy", "color": "#14B8A6" },
|
|
83
|
-
{ "id": "changelog", "label": "Changelog", "color": "#6366F1" },
|
|
84
|
-
{ "id": "compliance", "label": "Compliance", "color": "#0EA5E9" },
|
|
85
|
-
{ "id": "security", "label": "Security", "color": "#DC2626", "supports_autonomy": true }
|
|
86
|
-
],
|
|
87
|
-
"preview": {
|
|
88
|
-
"enabled": "auto"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"defaults": {
|
|
4
|
+
"autonomy": "guided"
|
|
5
|
+
},
|
|
6
|
+
"actions": [
|
|
7
|
+
{
|
|
8
|
+
"id": "new-task",
|
|
9
|
+
"label": "New task",
|
|
10
|
+
"kind": "external_launch",
|
|
11
|
+
"description": "Plain Claude invocation scoped to a Shipwright phase. Fire-and-forget — no pipeline state.",
|
|
12
|
+
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
13
|
+
"modal_fields": ["title", "phase", "description", "domain", "priority", "complexityHint", "tags", "blockedBy"],
|
|
14
|
+
"phase_parameters": {
|
|
15
|
+
"adopt": [
|
|
16
|
+
{ "name": "dry-run", "type": "boolean", "label": "Dry run", "cli_flag": "--dry-run", "helpText": "Simulate adoption without commits" },
|
|
17
|
+
{ "name": "scope", "type": "enum", "label": "Scope", "enum": ["full_app", "library", "cli"], "cli_flag": "--scope", "value_separator": "space" },
|
|
18
|
+
{ "name": "include-nested", "type": "boolean", "label": "Include nested projects", "cli_flag": "--include-nested" },
|
|
19
|
+
{ "name": "skip-crawl", "type": "boolean", "label": "Skip Playwright crawl", "cli_flag": "--skip-crawl" },
|
|
20
|
+
{ "name": "crawl-base-url", "type": "string", "label": "Crawl base URL", "cli_flag": "--crawl-base-url", "value_separator": "space", "placeholder": "e.g. http://localhost:3000" },
|
|
21
|
+
{ "name": "crawl-auth-token", "type": "string", "label": "Crawl auth token", "cli_flag": "--crawl-auth-token", "value_separator": "space", "sensitive": true },
|
|
22
|
+
{ "name": "crawl-max-depth", "type": "string", "label": "Crawl max depth", "cli_flag": "--crawl-max-depth", "value_separator": "space", "pattern": "^[1-9][0-9]?$", "default": "3" },
|
|
23
|
+
{ "name": "crawl-max-pages", "type": "string", "label": "Crawl max pages", "cli_flag": "--crawl-max-pages", "value_separator": "space", "pattern": "^[1-9][0-9]{0,3}$", "default": "50" },
|
|
24
|
+
{ "name": "no-backfill-events", "type": "boolean", "label": "Skip event backfill", "cli_flag": "--no-backfill-events" },
|
|
25
|
+
{ "name": "no-sync", "type": "boolean", "label": "Skip writing sync config", "cli_flag": "--no-sync" },
|
|
26
|
+
{ "name": "planning-split", "type": "string", "label": "Planning split name", "cli_flag": "--planning-split", "value_separator": "space", "default": "01-adopted", "pattern": "^[A-Za-z0-9_-]+$" }
|
|
27
|
+
],
|
|
28
|
+
"build": [
|
|
29
|
+
{ "name": "section", "type": "string", "label": "Section file (relative to project)", "cli_flag": "@", "value_separator": "none", "pattern": "^[A-Za-z0-9_./-]+\\.md$", "placeholder": "e.g. planning/03-build-feature.md", "required": true, "helpText": "Path relative to your project root — e.g. planning/03-build-feature.md. /shipwright-plan creates these files; pick one to build now." },
|
|
30
|
+
{ "name": "from", "type": "string", "label": "Start from section number", "cli_flag": "--from", "value_separator": "space", "pattern": "^[0-9]+$", "placeholder": "e.g. 03", "helpText": "Resume autonomous build from this section number" }
|
|
31
|
+
],
|
|
32
|
+
"test": [
|
|
33
|
+
{ "name": "fix", "type": "boolean", "label": "Auto-fix failing tests", "cli_flag": "--fix" },
|
|
34
|
+
{ "name": "e2e-only", "type": "boolean", "label": "E2E tests only", "cli_flag": "--e2e-only" },
|
|
35
|
+
{ "name": "design-fidelity", "type": "boolean", "label": "Design-fidelity check only", "cli_flag": "--design-fidelity" }
|
|
36
|
+
],
|
|
37
|
+
"deploy": [
|
|
38
|
+
{ "name": "target", "type": "enum", "label": "Target", "enum": ["dev", "prod", "rollback"], "cli_flag_map": { "prod": "--prod", "rollback": "--rollback" }, "default": "dev", "helpText": "Dev is default — no CLI flag emitted." }
|
|
39
|
+
],
|
|
40
|
+
"changelog": [
|
|
41
|
+
{ "name": "from", "type": "string", "label": "From git tag", "cli_flag": "--from", "value_separator": "space", "pattern": "^[A-Za-z0-9._/-]+$", "placeholder": "e.g. v0.3.1" }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "new-pipeline",
|
|
47
|
+
"label": "New pipeline",
|
|
48
|
+
"kind": "external_launch",
|
|
49
|
+
"description": "Full Shipwright pipeline — project → design → plan → build → test → deploy → changelog.",
|
|
50
|
+
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
51
|
+
"modal_fields": ["title", "autonomy", "description"]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "new-iterate",
|
|
55
|
+
"label": "New iterate",
|
|
56
|
+
"kind": "external_launch",
|
|
57
|
+
"description": "Run the complexity-adaptive iterate skill against an existing project.",
|
|
58
|
+
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs} {task.initial_prompt}",
|
|
59
|
+
"modal_fields": ["title", "autonomy", "description", "domain", "priority", "complexityHint", "tags", "blockedBy"],
|
|
60
|
+
"parameters": [
|
|
61
|
+
{ "name": "type", "type": "enum", "label": "Change type", "enum": ["feature", "change", "bug"], "cli_flag": "--type", "value_separator": "space", "helpText": "Auto-detected if omitted" },
|
|
62
|
+
{ "name": "plan-review-model", "type": "enum", "label": "Plan review", "enum": ["opus", "sonnet", "haiku", "inherit"], "cli_flag": "--plan-review-model", "value_separator": "space" },
|
|
63
|
+
{ "name": "review-model", "type": "enum", "label": "Review", "enum": ["opus", "sonnet", "haiku", "inherit"], "cli_flag": "--review-model", "value_separator": "space" }
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "new-plain",
|
|
68
|
+
"label": "Plain Claude",
|
|
69
|
+
"kind": "external_launch",
|
|
70
|
+
"description": "Plain Claude session in this project's directory. No Shipwright skill — just chat.",
|
|
71
|
+
"command_template": "{cd.prefix}claude --session-id {task.uuid} --name {task.session_name} {plugin.dirs}{task.description?}",
|
|
72
|
+
"modal_fields": ["title", "description"]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"phases": [
|
|
76
|
+
{ "id": "adopt", "label": "Adopt", "color": "#64748B" },
|
|
77
|
+
{ "id": "project", "label": "Project", "color": "#9ca3af" },
|
|
78
|
+
{ "id": "design", "label": "Design", "color": "#A855F7" },
|
|
79
|
+
{ "id": "plan", "label": "Plan", "color": "#3B82F6" },
|
|
80
|
+
{ "id": "build", "label": "Build", "color": "#F59E0B", "supports_autonomy": true },
|
|
81
|
+
{ "id": "test", "label": "Test", "color": "#059669", "supports_autonomy": true },
|
|
82
|
+
{ "id": "deploy", "label": "Deploy", "color": "#14B8A6" },
|
|
83
|
+
{ "id": "changelog", "label": "Changelog", "color": "#6366F1" },
|
|
84
|
+
{ "id": "compliance", "label": "Compliance", "color": "#0EA5E9" },
|
|
85
|
+
{ "id": "security", "label": "Security", "color": "#DC2626", "supports_autonomy": true }
|
|
86
|
+
],
|
|
87
|
+
"preview": {
|
|
88
|
+
"enabled": "auto"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -24,4 +24,50 @@ export declare function setMissionContextOnce(store: Pick<SdkSessionsStore, "get
|
|
|
24
24
|
* concurrent writer's value is never clobbered.
|
|
25
25
|
*/
|
|
26
26
|
export declare function revertMissionContext(store: Pick<SdkSessionsStore, "get" | "patch">, taskId: string, attempted: MissionContextAssociation): void;
|
|
27
|
+
/**
|
|
28
|
+
* Evidence-gated UPDATE of an association ALREADY on file — the one
|
|
29
|
+
* deliberate exception to the once-only doctrine above (external code
|
|
30
|
+
* review, openai HIGH, iterate-2026-08-31-mission-feed-gaps).
|
|
31
|
+
*
|
|
32
|
+
* Without this, scenario.ts rule 2b's supersession is provably decorative:
|
|
33
|
+
* the ONCE-only write above makes every corrected `associateRunId` it returns
|
|
34
|
+
* unreachable, so a long-lived task's stale association never durably
|
|
35
|
+
* corrects — and once the newer run's `Run-ID:` footer scrolls past this
|
|
36
|
+
* task's (narrower, associated-task) reach-back window, rule 2b's per-poll
|
|
37
|
+
* scan stops finding it too, and the Mission tab is stuck on the stale run
|
|
38
|
+
* for good. Persisting the correction closes both holes.
|
|
39
|
+
*
|
|
40
|
+
* Narrow on purpose — this is a correction, not a general-purpose write: the
|
|
41
|
+
* caller only ever offers a `transcript_run_id`-sourced association, and only
|
|
42
|
+
* after scenario.ts rule 2b has required a corroborated footer naming a
|
|
43
|
+
* PROVABLY newer run than the one on file (`isProvablyNewerRunId`). This
|
|
44
|
+
* function does not re-derive that recency itself — it trusts the one caller
|
|
45
|
+
* that computes it, the same posture `setMissionContextOnce` already takes
|
|
46
|
+
* toward its own caller's pointer validation.
|
|
47
|
+
*
|
|
48
|
+
* Compare-and-set against `expectedPrevious` (external code review, openai
|
|
49
|
+
* MEDIUM): without it, this is a blind overwrite of "whatever is currently
|
|
50
|
+
* stored", not of the specific stale association the resolver actually
|
|
51
|
+
* decided against. Two polls can race on the same stale association — poll
|
|
52
|
+
* A resolves against it and decides to supersede with run X, poll B resolves
|
|
53
|
+
* against the SAME stale read (a later poll interval, different transcript
|
|
54
|
+
* snapshot) and decides to supersede with run Y — and whichever write lands
|
|
55
|
+
* second would clobber the other's answer even though it is validating a read
|
|
56
|
+
* that is no longer current. Requiring the stored value to still equal what
|
|
57
|
+
* THIS caller read before writing turns that into a no-op instead: the loser
|
|
58
|
+
* skips its write and the next resolve operates on whatever is now current.
|
|
59
|
+
*/
|
|
60
|
+
export declare function supersedeMissionContext(store: Pick<SdkSessionsStore, "get" | "patch">, taskId: string, association: MissionContextAssociation, expectedPrevious: MissionContextAssociation): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Roll back a supersession that was set in memory but FAILED to persist — the
|
|
63
|
+
* supersede counterpart to `revertMissionContext`. Restores the PREVIOUS
|
|
64
|
+
* association rather than clearing the field: unlike a first association,
|
|
65
|
+
* there was already a valid, durable value here, and losing it to a
|
|
66
|
+
* transient lock contention would be a second, worse regression stacked on
|
|
67
|
+
* top of the one this whole mechanism exists to fix.
|
|
68
|
+
*
|
|
69
|
+
* Only reverts when the field still holds the association WE just set, so a
|
|
70
|
+
* concurrent writer's value is never clobbered.
|
|
71
|
+
*/
|
|
72
|
+
export declare function revertSupersession(store: Pick<SdkSessionsStore, "get" | "patch">, taskId: string, attempted: MissionContextAssociation, previous: MissionContextAssociation): void;
|
|
27
73
|
//# sourceMappingURL=association.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../../src/core/mission-context/association.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAA+B,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEzF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAOT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,yBAAyB,GACnC,IAAI,CAMN"}
|
|
1
|
+
{"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../../src/core/mission-context/association.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAA+B,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEzF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAOT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,yBAAyB,GACnC,IAAI,CAMN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,yBAAyB,EACtC,gBAAgB,EAAE,yBAAyB,GAC1C,OAAO,CAST;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,yBAAyB,EACpC,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CAMN"}
|
|
@@ -66,4 +66,73 @@ export function revertMissionContext(store, taskId, attempted) {
|
|
|
66
66
|
return;
|
|
67
67
|
store.patch(taskId, { missionContext: undefined });
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Evidence-gated UPDATE of an association ALREADY on file — the one
|
|
71
|
+
* deliberate exception to the once-only doctrine above (external code
|
|
72
|
+
* review, openai HIGH, iterate-2026-08-31-mission-feed-gaps).
|
|
73
|
+
*
|
|
74
|
+
* Without this, scenario.ts rule 2b's supersession is provably decorative:
|
|
75
|
+
* the ONCE-only write above makes every corrected `associateRunId` it returns
|
|
76
|
+
* unreachable, so a long-lived task's stale association never durably
|
|
77
|
+
* corrects — and once the newer run's `Run-ID:` footer scrolls past this
|
|
78
|
+
* task's (narrower, associated-task) reach-back window, rule 2b's per-poll
|
|
79
|
+
* scan stops finding it too, and the Mission tab is stuck on the stale run
|
|
80
|
+
* for good. Persisting the correction closes both holes.
|
|
81
|
+
*
|
|
82
|
+
* Narrow on purpose — this is a correction, not a general-purpose write: the
|
|
83
|
+
* caller only ever offers a `transcript_run_id`-sourced association, and only
|
|
84
|
+
* after scenario.ts rule 2b has required a corroborated footer naming a
|
|
85
|
+
* PROVABLY newer run than the one on file (`isProvablyNewerRunId`). This
|
|
86
|
+
* function does not re-derive that recency itself — it trusts the one caller
|
|
87
|
+
* that computes it, the same posture `setMissionContextOnce` already takes
|
|
88
|
+
* toward its own caller's pointer validation.
|
|
89
|
+
*
|
|
90
|
+
* Compare-and-set against `expectedPrevious` (external code review, openai
|
|
91
|
+
* MEDIUM): without it, this is a blind overwrite of "whatever is currently
|
|
92
|
+
* stored", not of the specific stale association the resolver actually
|
|
93
|
+
* decided against. Two polls can race on the same stale association — poll
|
|
94
|
+
* A resolves against it and decides to supersede with run X, poll B resolves
|
|
95
|
+
* against the SAME stale read (a later poll interval, different transcript
|
|
96
|
+
* snapshot) and decides to supersede with run Y — and whichever write lands
|
|
97
|
+
* second would clobber the other's answer even though it is validating a read
|
|
98
|
+
* that is no longer current. Requiring the stored value to still equal what
|
|
99
|
+
* THIS caller read before writing turns that into a no-op instead: the loser
|
|
100
|
+
* skips its write and the next resolve operates on whatever is now current.
|
|
101
|
+
*/
|
|
102
|
+
export function supersedeMissionContext(store, taskId, association, expectedPrevious) {
|
|
103
|
+
const task = store.get(taskId);
|
|
104
|
+
if (!task?.missionContext)
|
|
105
|
+
return false;
|
|
106
|
+
if (task.missionContext.runId !== expectedPrevious.runId)
|
|
107
|
+
return false;
|
|
108
|
+
if (task.missionContext.observedAt !== expectedPrevious.observedAt)
|
|
109
|
+
return false;
|
|
110
|
+
if (association.source !== "transcript_run_id")
|
|
111
|
+
return false;
|
|
112
|
+
if (!isMissionContextAssociation(association))
|
|
113
|
+
return false;
|
|
114
|
+
store.patch(taskId, { missionContext: association });
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Roll back a supersession that was set in memory but FAILED to persist — the
|
|
119
|
+
* supersede counterpart to `revertMissionContext`. Restores the PREVIOUS
|
|
120
|
+
* association rather than clearing the field: unlike a first association,
|
|
121
|
+
* there was already a valid, durable value here, and losing it to a
|
|
122
|
+
* transient lock contention would be a second, worse regression stacked on
|
|
123
|
+
* top of the one this whole mechanism exists to fix.
|
|
124
|
+
*
|
|
125
|
+
* Only reverts when the field still holds the association WE just set, so a
|
|
126
|
+
* concurrent writer's value is never clobbered.
|
|
127
|
+
*/
|
|
128
|
+
export function revertSupersession(store, taskId, attempted, previous) {
|
|
129
|
+
const task = store.get(taskId);
|
|
130
|
+
if (!task?.missionContext)
|
|
131
|
+
return;
|
|
132
|
+
if (task.missionContext.runId !== attempted.runId)
|
|
133
|
+
return;
|
|
134
|
+
if (task.missionContext.observedAt !== attempted.observedAt)
|
|
135
|
+
return;
|
|
136
|
+
store.patch(taskId, { missionContext: previous });
|
|
137
|
+
}
|
|
69
138
|
//# sourceMappingURL=association.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"association.js","sourceRoot":"","sources":["../../../src/core/mission-context/association.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,2BAA2B,EAAkC,MAAM,YAAY,CAAC;AAEzF;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAA8C,EAC9C,MAAc,EACd,WAAsC;IAEtC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,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AAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAA8C,EAC9C,MAAc,EACd,SAAoC,EACpC,QAAmC;IAEnC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,IAAI,EAAE,cAAc;QAAE,OAAO;IAClC,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK;QAAE,OAAO;IAC1D,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,KAAK,SAAS,CAAC,UAAU;QAAE,OAAO;IACpE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReadPointerResult } from "./pointer.js";
|
|
2
|
+
import type { ScenarioDecision } from "./scenario.js";
|
|
3
|
+
import type { ResolveDeps, ResolveRequest, ResolveResult } from "./resolver-io.js";
|
|
4
|
+
/** `decision.runId` resolved and non-null — caller has already checked. */
|
|
5
|
+
export declare function resolveIterateContext(req: ResolveRequest, deps: ResolveDeps, decision: ScenarioDecision, runId: string, pointer: ReadPointerResult, baseRevPaths: string[]): Promise<ResolveResult>;
|
|
6
|
+
//# sourceMappingURL=resolver-iterate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-iterate.d.ts","sourceRoot":"","sources":["../../../src/core/mission-context/resolver-iterate.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAItD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAanF,2EAA2E;AAC3E,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,iBAAiB,EAC1B,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,aAAa,CAAC,CA0MxB"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* core/mission-context/resolver-iterate.ts — the ITERATE-scenario branch of
|
|
3
|
+
* `resolveMissionContext`, split out of resolver.ts (2026-08-31,
|
|
4
|
+
* iterate-2026-08-31-mission-feed-gaps) to stay under the 300-line file-size
|
|
5
|
+
* limit. Pure continuation of the same function body: `resolver.ts` handles
|
|
6
|
+
* scenario detection and the non-iterate early returns, then hands off here
|
|
7
|
+
* once `decision.scenario === "iterate"` with a resolved `runId`. Contract
|
|
8
|
+
* and architecture notes live in resolver.ts's header.
|
|
9
|
+
*/
|
|
10
|
+
import { cache, CACHE_CAP, computeSourceRev, docFingerprint, readBounded, } from "./resolver-parts.js";
|
|
11
|
+
import { loadFoldMap, SPEC_REL_PARTS, specPath } from "./fold-map.js";
|
|
12
|
+
import { checkSquashMerged, extractPrMarker, readOriginSlug } from "./merge-check.js";
|
|
13
|
+
import { refreshMerge } from "./merge-refresh.js";
|
|
14
|
+
import { mintDocId } from "./doc-ids.js";
|
|
15
|
+
import { buildRequirementArtifact, buildSpecArtifact } from "./artifacts.js";
|
|
16
|
+
import { buildCommitArtifact } from "./artifacts-commit.js";
|
|
17
|
+
import { buildSlice2Artifacts, slice2RevPaths } from "./slice2-sources.js";
|
|
18
|
+
import { iterateDocPath, readIterateDoc } from "./iterate-record.js";
|
|
19
|
+
import { resolveWorkCompleted } from "./merged-events.js";
|
|
20
|
+
import { campaignSpecCandidates, specCandidates, specHintCandidate } from "./spec-candidates.js";
|
|
21
|
+
import { toMissionTests } from "./artifacts-tests.js";
|
|
22
|
+
import { chooseRoot, readAllowedRootsCached, resolveFirstDoc } from "./worktree-roots.js";
|
|
23
|
+
import { MISSION_CONTEXT_SCHEMA_VERSION, } from "./types.js";
|
|
24
|
+
/** `decision.runId` resolved and non-null — caller has already checked. */
|
|
25
|
+
export async function resolveIterateContext(req, deps, decision, runId, pointer, baseRevPaths) {
|
|
26
|
+
const { projectRoot, sessionUuid } = req;
|
|
27
|
+
const slug = pointer.status === "ok" ? pointer.pointer.slug : null;
|
|
28
|
+
const worktreePath = pointer.status === "ok" ? pointer.pointer.worktreePath : null;
|
|
29
|
+
const roots = await readAllowedRootsCached(projectRoot, { git: deps.git });
|
|
30
|
+
// A worktree git does not know is simply NOT USED as a read root — that is
|
|
31
|
+
// `chooseRoot`'s contract, and it is the normal post-Finalize state, not an
|
|
32
|
+
// integrity failure. MEASURED 2026-07-21: git registered 0 of this project's
|
|
33
|
+
// 20 live pointers' worktrees (removed at Finalize, directory left behind),
|
|
34
|
+
// and the earlier hard failure here erased all six artifacts for every one of
|
|
35
|
+
// them although every run had its record in the main root. See ADR.
|
|
36
|
+
const chosen = chooseRoot(roots, worktreePath);
|
|
37
|
+
// --- Records (the spec candidates below are built from them). The event
|
|
38
|
+
// lookup is (mtime,size)-indexed: ahead of the cache check it is a Map hit.
|
|
39
|
+
const iterateDoc = readIterateDoc(projectRoot, runId);
|
|
40
|
+
// Working tree first, then — for a FINISHED run whose worktree is gone
|
|
41
|
+
// (`!isWorktree`) and whose row is not local — the default remote ref where
|
|
42
|
+
// the squash landed it. This is the "merged but not pulled" case that
|
|
43
|
+
// otherwise leaves only Decisions on the rail (merged-events.ts).
|
|
44
|
+
const { events, mergedRefMiss } = await resolveWorkCompleted(projectRoot, runId, chosen.isWorktree, { git: deps.git });
|
|
45
|
+
const run = events.status === "found" ? events.run : null;
|
|
46
|
+
// --- Spec: known layout, agent-doc hint, then that same campaign path rebuilt
|
|
47
|
+
// from the never-evicted event log — APPENDED, so preference order is
|
|
48
|
+
// unchanged and it only adds reach once the doc evicts (trg-92c0c36b).
|
|
49
|
+
const hint = specHintCandidate(iterateDoc?.specHint);
|
|
50
|
+
const candidates = [
|
|
51
|
+
...specCandidates(runId, slug),
|
|
52
|
+
...(hint ? [hint] : []),
|
|
53
|
+
...campaignSpecCandidates(chosen.root, run?.campaign, run?.subIterateId),
|
|
54
|
+
];
|
|
55
|
+
const doc = resolveFirstDoc(chosen.root, candidates);
|
|
56
|
+
// The rev covers EVERY source used, incl. the iterate + agent docs AND the
|
|
57
|
+
// Slice-2 sources. An input missing from here is an input FROZEN by the cache.
|
|
58
|
+
const rev = computeSourceRev([
|
|
59
|
+
...baseRevPaths,
|
|
60
|
+
iterateDocPath(projectRoot, runId),
|
|
61
|
+
...slice2RevPaths(projectRoot, runId),
|
|
62
|
+
...(doc.ok ? [doc.absolute] : []),
|
|
63
|
+
], [runId, chosen.root, req.taskId]);
|
|
64
|
+
// Task terminal state is server-owned input, not a filesystem revision. It
|
|
65
|
+
// must participate in the cache identity so a completed task cannot reuse a
|
|
66
|
+
// previously-live context while its worktree and event log are unchanged.
|
|
67
|
+
const cacheKey = `${projectRoot}::${sessionUuid}::${runId}::${req.taskTerminal ? "terminal" : "active"}`;
|
|
68
|
+
// Report the id + source the route should persist — a LIVE pointer (rule
|
|
69
|
+
// 2), a first association from a corroborated footer (rule 5), or a
|
|
70
|
+
// confirmed supersession of a stale one (rule 2b, association.ts
|
|
71
|
+
// `supersedeMissionContext`). Read back off the WINNING rule so the id and
|
|
72
|
+
// its provenance cannot disagree; an id that already came from the store
|
|
73
|
+
// (an unchanged association) is reported but the route's guard makes that
|
|
74
|
+
// report a no-op write.
|
|
75
|
+
const associate = decision.runIdSource === "pointer" || decision.runIdSource === "transcript" ? runId : null;
|
|
76
|
+
const associateSource = decision.runIdSource === "transcript" ? "transcript_run_id" : "iterate_active_pointer";
|
|
77
|
+
const hit = cache.get(cacheKey);
|
|
78
|
+
if (hit && hit.rev === rev) {
|
|
79
|
+
// NOT returned verbatim — merge is the one time-varying field and must be
|
|
80
|
+
// re-derived, or it freezes at "pending" forever. See merge-refresh.ts.
|
|
81
|
+
return {
|
|
82
|
+
context: await refreshMerge(hit.context, projectRoot, req.transcript, deps),
|
|
83
|
+
associateRunId: associate,
|
|
84
|
+
associateSource,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
let documentId = null, title = null, specText = null;
|
|
88
|
+
if (doc.ok) {
|
|
89
|
+
// BY INDEX — a suffix-compare against the realpath misses on a leaf-casing
|
|
90
|
+
// normalisation and silently pairs candidates[0] with the OTHER file's
|
|
91
|
+
// fingerprint (see resolveFirstDoc).
|
|
92
|
+
// BY INDEX — what resolveFirstDoc returns it for. See
|
|
93
|
+
// resolver.candidate-pairing.test.ts for why re-deriving it is a trap.
|
|
94
|
+
const rel = candidates[doc.index].join("/");
|
|
95
|
+
title = rel.slice(rel.lastIndexOf("/") + 1);
|
|
96
|
+
documentId = mintDocId({
|
|
97
|
+
t: req.taskId,
|
|
98
|
+
s: sessionUuid,
|
|
99
|
+
p: projectRoot,
|
|
100
|
+
r: runId,
|
|
101
|
+
root: chosen.root,
|
|
102
|
+
rel,
|
|
103
|
+
rev,
|
|
104
|
+
f: docFingerprint(doc.absolute),
|
|
105
|
+
});
|
|
106
|
+
specText = readBounded(doc.absolute);
|
|
107
|
+
}
|
|
108
|
+
const foldMap = loadFoldMap(projectRoot);
|
|
109
|
+
const requirementsDocument = mintDocId({
|
|
110
|
+
t: req.taskId,
|
|
111
|
+
s: sessionUuid,
|
|
112
|
+
p: projectRoot,
|
|
113
|
+
r: runId,
|
|
114
|
+
root: projectRoot,
|
|
115
|
+
rel: SPEC_REL_PARTS.join("/"),
|
|
116
|
+
rev,
|
|
117
|
+
f: docFingerprint(specPath(projectRoot)),
|
|
118
|
+
});
|
|
119
|
+
// --- Commit + merge -------------------------------------------------------
|
|
120
|
+
// The marker must belong to THIS project's own origin repo (a sibling repo's
|
|
121
|
+
// PR number would grep our origin/main), and merge is only checked once the
|
|
122
|
+
// run completed — a per-poll git call mid-run is waste (§5.3).
|
|
123
|
+
const marker = extractPrMarker(req.transcript, await readOriginSlug(projectRoot, deps.git));
|
|
124
|
+
const merge = run && marker
|
|
125
|
+
? await checkSquashMerged(projectRoot, marker.number, { git: deps.git, ...deps.merge })
|
|
126
|
+
: "unknown";
|
|
127
|
+
const slice2 = await buildSlice2Artifacts({
|
|
128
|
+
projectRoot,
|
|
129
|
+
runId,
|
|
130
|
+
events,
|
|
131
|
+
commit: run?.commit?.trim() || null,
|
|
132
|
+
git: deps.git,
|
|
133
|
+
});
|
|
134
|
+
// `runLive` retains its visual worktree meaning. Requirement planning has a
|
|
135
|
+
// separate authority: the server-owned task state, which can mark a run
|
|
136
|
+
// terminal while a worktree lingers (or active while root selection fell back).
|
|
137
|
+
const runLive = chosen.isWorktree && !req.taskTerminal && events.status !== "found";
|
|
138
|
+
const requirementLive = !req.taskTerminal && events.status !== "found";
|
|
139
|
+
// CONTRACT §6 order: Spec · Requirement · Tests · Review · Decisions · Commit.
|
|
140
|
+
const artifacts = [
|
|
141
|
+
buildSpecArtifact({
|
|
142
|
+
documentId,
|
|
143
|
+
title,
|
|
144
|
+
denied: !doc.ok && doc.reason === "denied",
|
|
145
|
+
fromWorktree: chosen.isWorktree,
|
|
146
|
+
intent: run?.intent ?? null,
|
|
147
|
+
}),
|
|
148
|
+
buildRequirementArtifact({
|
|
149
|
+
foldMap,
|
|
150
|
+
doc: iterateDoc,
|
|
151
|
+
events,
|
|
152
|
+
specText,
|
|
153
|
+
runLive: requirementLive,
|
|
154
|
+
sourceDocument: {
|
|
155
|
+
documentId: requirementsDocument,
|
|
156
|
+
title: "Requirements specification",
|
|
157
|
+
},
|
|
158
|
+
}),
|
|
159
|
+
...slice2.artifacts,
|
|
160
|
+
buildCommitArtifact({ events, prNumber: marker?.number ?? null, prUrl: marker?.url ?? null, merge }),
|
|
161
|
+
];
|
|
162
|
+
const requirement = artifacts[1];
|
|
163
|
+
const servesFrId = requirement.kind === "requirement" && requirement.detail?.rows.length
|
|
164
|
+
? requirement.detail.rows[0].displayFrId
|
|
165
|
+
: null;
|
|
166
|
+
const context = {
|
|
167
|
+
schemaVersion: MISSION_CONTEXT_SCHEMA_VERSION,
|
|
168
|
+
scenario: "iterate",
|
|
169
|
+
missionTabVisible: true,
|
|
170
|
+
runId,
|
|
171
|
+
// IN FLIGHT = git still registers the pointer's worktree AND the run has not
|
|
172
|
+
// recorded completion. The worktree alone is a filesystem PROXY (external
|
|
173
|
+
// plan review, openai MEDIUM): an abandoned or already-finished run can
|
|
174
|
+
// leave a registered worktree behind, and "pending" for a run that is over
|
|
175
|
+
// is the same lie in the other direction. A `work_completed` record is a
|
|
176
|
+
// terminal fact, so it ends live-ness. Both inputs participate in `rev`
|
|
177
|
+
// (`chosen.root` + the event log's mtime), so neither can freeze in cache.
|
|
178
|
+
runLive,
|
|
179
|
+
artifacts,
|
|
180
|
+
// Shares artifacts-tests.ts's constructor so this never diverges from
|
|
181
|
+
// the Tests artifact's own `detail.results` on the `{0,0}` edge case.
|
|
182
|
+
tests: run ? toMissionTests(run.tests, run.ts) : null,
|
|
183
|
+
servesFrId,
|
|
184
|
+
sourceRev: rev,
|
|
185
|
+
};
|
|
186
|
+
// A TRANSIENT git failure is not cached: git's answer is not a statted file,
|
|
187
|
+
// so it cannot participate in `rev`, and caching it would pin Tests at
|
|
188
|
+
// "currently unavailable" until an unrelated source file changed. A merged-ref
|
|
189
|
+
// MISS is excluded for the same reason — the run may land on the ref after a
|
|
190
|
+
// later fetch, which `rev` would not see; re-resolving is cheap (the ref blob
|
|
191
|
+
// is TTL-cached in merged-events). A merged-ref HIT is stable and caches.
|
|
192
|
+
if (slice2.cacheable && !mergedRefMiss) {
|
|
193
|
+
if (cache.size >= CACHE_CAP)
|
|
194
|
+
cache.clear();
|
|
195
|
+
cache.set(cacheKey, { rev, context });
|
|
196
|
+
}
|
|
197
|
+
// `associate` comes from EVIDENCE — a validated pointer or a corroborated
|
|
198
|
+
// footer — never from the task's `state`, which decays to `idle` on a parked
|
|
199
|
+
// design gate. See association.ts.
|
|
200
|
+
return { context, associateRunId: associate, associateSource };
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=resolver-iterate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-iterate.js","sourceRoot":"","sources":["../../../src/core/mission-context/resolver-iterate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EACL,8BAA8B,GAI/B,MAAM,YAAY,CAAC;AAEpB,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAmB,EACnB,IAAiB,EACjB,QAA0B,EAC1B,KAAa,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7E,uEAAuE;IACvE,+EAA+E;IAC/E,6EAA6E;IAC7E,8EAA8E;IAC9E,0EAA0E;IAC1E,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC,aAAa,EAAE,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,IAAI,SAAS;YAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC3C,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,0EAA0E;IAC1E,6EAA6E;IAC7E,mCAAmC;IACnC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -27,6 +27,26 @@ export declare const cache: Map<string, CacheEntry>;
|
|
|
27
27
|
export declare const CACHE_CAP = 256;
|
|
28
28
|
/** Test-only: drop the module-level cache between cases. */
|
|
29
29
|
export declare function _clearResolverCache(): void;
|
|
30
|
+
/**
|
|
31
|
+
* The memoized, CONFIRMED supersession for this (session, association,
|
|
32
|
+
* transcript-content) triple — `undefined` when none is cached (either this
|
|
33
|
+
* content was never checked, or it was checked and found nothing, which is
|
|
34
|
+
* deliberately never memoized here; a scan is owed either way).
|
|
35
|
+
*/
|
|
36
|
+
export declare function supersessionMemoHit(sessionUuid: string, associationRunId: string, transcript: string): string | undefined;
|
|
37
|
+
/** Record this triple's CONFIRMED recovery, so the next unchanged poll reuses it instead of re-scanning. */
|
|
38
|
+
export declare function markSupersessionResult(sessionUuid: string, associationRunId: string, transcript: string, recovered: string): void;
|
|
39
|
+
/** Test-only: drop the supersession-check memo between cases. */
|
|
40
|
+
export declare function _clearSupersessionMemo(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Builds the LAZY `recoverTranscriptRunId` thunk `detectScenario` calls for
|
|
43
|
+
* both rule 5 (no association) and rule 2b (supersession check) — wiring the
|
|
44
|
+
* throttle above around `recoverRunIdFromTranscript` in one place so the
|
|
45
|
+
* orchestrator (resolver.ts) stays a one-line call site. `memoHit` is read at
|
|
46
|
+
* BUILD time (this resolve's transcript/association snapshot), not
|
|
47
|
+
* re-evaluated inside the thunk, since neither changes within one call.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildRecoveryThunk(projectRoot: string, sessionUuid: string, transcript: string, associationRunId: string | null): () => string | null;
|
|
30
50
|
/**
|
|
31
51
|
* Bounded read of a document body (mid-run planned impact + the detail
|
|
32
52
|
* endpoint). Atomic: the size cap is enforced against the SAME descriptor the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver-parts.d.ts","sourceRoot":"","sources":["../../../src/core/mission-context/resolver-parts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolver-parts.d.ts","sourceRoot":"","sources":["../../../src/core/mission-context/resolver-parts.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAYpF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOvD;AAoBD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAavE;AAED,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,wFAAwF;AACxF,eAAO,MAAM,KAAK,yBAAgC,CAAC;AACnD,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,4DAA4D;AAC5D,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAgDD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACx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