specrails-desktop 2.57.0 → 2.58.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/README.md +1 -1
- package/cli/dist/args.js +10 -4
- package/cli/dist/help.js +1 -1
- package/client/dist/assets/{ActivityFeedPage-DdMNmVBk.js → ActivityFeedPage-BQGppIR0.js} +1 -1
- package/client/dist/assets/{AgentBrowserCapture-CeerUf--.js → AgentBrowserCapture-PI-cxyxi.js} +1 -1
- package/client/dist/assets/{AgentModeAnalyticsPane-BjGb-8rh.js → AgentModeAnalyticsPane-mQsOqdXx.js} +2 -2
- package/client/dist/assets/{AgentModeCodePane-8XRkQEo_.js → AgentModeCodePane-BL-vpmlY.js} +2 -2
- package/client/dist/assets/{AgentModeJobsPane-BN3dgJOA.js → AgentModeJobsPane-DR_06oqH.js} +1 -1
- package/client/dist/assets/AgentsPage-BKIKjm_1.js +118 -0
- package/client/dist/assets/{AnalyticsPage-CyfhYiBn.js → AnalyticsPage-069npRVo.js} +1 -1
- package/client/dist/assets/{CodePage-C2Nf-Q5W.js → CodePage-Alitorrv.js} +2 -2
- package/client/dist/assets/DesktopAnalyticsPage-qtWAPM47.js +1 -0
- package/client/dist/assets/{DocsDialog-Br3bczCp.js → DocsDialog-DwL6rgcT.js} +1 -1
- package/client/dist/assets/{DocsPage-BcDr2cBm.js → DocsPage-BA1hiJZ-.js} +1 -1
- package/client/dist/assets/{ExportDropdown-BVGKEgkd.js → ExportDropdown-BcMpvV89.js} +1 -1
- package/client/dist/assets/InteractiveJobComposer-B3H1YHr6.js +19 -0
- package/client/dist/assets/JobDetailModal-XZQ9eAAy.js +1 -0
- package/client/dist/assets/{JobDetailPage-vBbNeRuz.js → JobDetailPage-B-SIaq_q.js} +1 -1
- package/client/dist/assets/{JobsPage-CJCtPhIz.js → JobsPage-iQXAv2mx.js} +1 -1
- package/client/dist/assets/LoopBuilderPage-B_gbFAHn.js +1 -0
- package/client/dist/assets/LoopPreviewModal-je5pSCf-.js +1 -0
- package/client/dist/assets/LoopsPage-BZwcY5cu.js +2 -0
- package/client/dist/assets/{MinimizedChatsContext-D3QzgV0B.js → MinimizedChatsContext-CNx_0bZu.js} +1 -1
- package/client/dist/assets/{PluginsPage-DOpTV75p.js → PluginsPage-DFocnoHX.js} +2 -2
- package/client/dist/assets/{ProjectSettingsDialog-Dkwrn0z1.js → ProjectSettingsDialog-Bh3S6EBB.js} +1 -1
- package/client/dist/assets/{RepositoryDeliveries-Du2UCf1a.js → RepositoryDeliveries-BiwJuS8r.js} +1 -1
- package/client/dist/assets/{RepositoryScopeSelector-hPGZNRBm.js → RepositoryScopeSelector-C2mvWBQ6.js} +1 -1
- package/client/dist/assets/{ReviewPacketPage-DcOq-UTA.js → ReviewPacketPage-CrAf-WDy.js} +2 -2
- package/client/dist/assets/TemplatePreviewModal-C7DordpN.js +1 -0
- package/client/dist/assets/{TicketDetailModalContext-DAK-NoK6.js → TicketDetailModalContext-B-DySpKL.js} +1 -1
- package/client/dist/assets/{Trans-DEbgkuAY.js → Trans-D3AfDylf.js} +1 -1
- package/client/dist/assets/agentRuntime-BeUb3g9g.js +1 -0
- package/client/dist/assets/agentRuntime-Bg9tbmqm.js +1 -0
- package/client/dist/assets/agentRuntime-D-GJVGkj.js +1 -0
- package/client/dist/assets/agentRuntime-D2__CVI_.js +1 -0
- package/client/dist/assets/agentRuntime-D35dGVOP.js +1 -0
- package/client/dist/assets/agentRuntime-DGz_IqKW.js +1 -0
- package/client/dist/assets/agentRuntime-O1liDt6G.js +1 -0
- package/client/dist/assets/agentRuntime-hInH9Fzj.js +1 -0
- package/client/dist/assets/agentstudio-B2CTtQgZ.js +1 -0
- package/client/dist/assets/agentstudio-BWAKeGgB.js +1 -0
- package/client/dist/assets/{agentstudio-DR7doNBV.js → agentstudio-Cja8Sjcp.js} +1 -1
- package/client/dist/assets/agentstudio-DtfPcr99.js +1 -0
- package/client/dist/assets/agentstudio-QdAJIDef.js +1 -0
- package/client/dist/assets/agentstudio-X70BKf6u.js +1 -0
- package/client/dist/assets/agentstudio-fLXpRGIi.js +1 -0
- package/client/dist/assets/agentstudio-qXKqVnWS.js +1 -0
- package/client/dist/assets/{analytics-jzCkOec3.js → analytics-B1DIQd4m.js} +1 -1
- package/client/dist/assets/{analytics-CoEzWPx4.js → analytics-BAIZ9vE_.js} +1 -1
- package/client/dist/assets/{analytics-DjLlE7jS.js → analytics-BTqgmgBd.js} +1 -1
- package/client/dist/assets/analytics-BWynXPEm.js +1 -0
- package/client/dist/assets/{analytics-nZIjjtCc.js → analytics-DGcUsQ44.js} +1 -1
- package/client/dist/assets/{analytics-BNgZ1Nj7.js → analytics-GnSnpJ4W.js} +1 -1
- package/client/dist/assets/{analytics-DFh5lSOl.js → analytics-TWgYaoO0.js} +1 -1
- package/client/dist/assets/{analytics-DZp-DS2U.js → analytics-kJy6Tuko.js} +1 -1
- package/client/dist/assets/builder-C0FyvM83.js +1 -0
- package/client/dist/assets/builder-C1neIYGR.js +1 -0
- package/client/dist/assets/builder-CvnFm0im.js +1 -0
- package/client/dist/assets/builder-CzW5ovyI.js +1 -0
- package/client/dist/assets/builder-D06L7iPy.js +1 -0
- package/client/dist/assets/builder-DGETbtZj.js +1 -0
- package/client/dist/assets/builder-DXEJUlC0.js +1 -0
- package/client/dist/assets/builder-DyQperXU.js +1 -0
- package/client/dist/assets/common-BCK7c9Pv.js +1 -0
- package/client/dist/assets/common-C0BOdeNi.js +1 -0
- package/client/dist/assets/common-C4Yvvhp6.js +1 -0
- package/client/dist/assets/{common-BrlwEnL7.js → common-DmsclwjP.js} +1 -1
- package/client/dist/assets/common-DpLWwgI1.js +1 -0
- package/client/dist/assets/common-OCvl3c8t.js +1 -0
- package/client/dist/assets/common-c0aujEZC.js +1 -0
- package/client/dist/assets/common-od8WThlf.js +1 -0
- package/client/dist/assets/dashboard-B1ndRHuC.js +1 -0
- package/client/dist/assets/dashboard-BX7KXiqA.js +1 -0
- package/client/dist/assets/dashboard-B_BSNxcN.js +1 -0
- package/client/dist/assets/dashboard-CCeFN7-V.js +1 -0
- package/client/dist/assets/dashboard-CRl0WtFJ.js +1 -0
- package/client/dist/assets/dashboard-XGdQ5mjw.js +1 -0
- package/client/dist/assets/dashboard-_oltA6Jd.js +1 -0
- package/client/dist/assets/dashboard-bAuf5KVk.js +1 -0
- package/client/dist/assets/{formatDistanceToNow-Cc2u5FwQ.js → formatDistanceToNow-aBss1Nai.js} +1 -1
- package/client/dist/assets/{getTimezoneOffsetInMilliseconds-BHm2U-w1.js → getTimezoneOffsetInMilliseconds-DOGj1Mfz.js} +1 -1
- package/client/dist/assets/index-BS7KCWkV.css +2 -0
- package/client/dist/assets/{index-Cxb288Rj.js → index-C4Mv6tV6.js} +32 -32
- package/client/dist/assets/{jira-api-DrGxiD9p.js → jira-api-BYbEPlkr.js} +1 -1
- package/client/dist/assets/{jobs-DSp9DoD_.js → jobs-6_-r75yC.js} +1 -1
- package/client/dist/assets/{jobs-C6qmvUAi.js → jobs-B1yqyId5.js} +1 -1
- package/client/dist/assets/{jobs-DoFaEl9g.js → jobs-BFuV7ttH.js} +1 -1
- package/client/dist/assets/{jobs-DTQO08nJ.js → jobs-BKa8LuwA.js} +1 -1
- package/client/dist/assets/{jobs-DrF8Do8s.js → jobs-BKiK-ZWh.js} +1 -1
- package/client/dist/assets/{jobs-DLHdDkHc.js → jobs-DmKV7b7d.js} +1 -1
- package/client/dist/assets/{jobs-C9j2PuwW.js → jobs-KG4Sn12X.js} +1 -1
- package/client/dist/assets/{jobs-Dpw6AEOP.js → jobs-pPv4KWjb.js} +1 -1
- package/client/dist/assets/loop-layout-BF8xMiNv.js +7 -0
- package/client/dist/assets/loops-B4_D-nbg.js +1 -0
- package/client/dist/assets/loops-BJDY9FTh.js +1 -0
- package/client/dist/assets/loops-BO3V8244.js +1 -0
- package/client/dist/assets/loops-C-hZK8pf.js +1 -0
- package/client/dist/assets/loops-CDOWZ0ci.js +1 -0
- package/client/dist/assets/loops-Dv849ckF.js +1 -0
- package/client/dist/assets/loops-Q9LIgGkq.js +1 -0
- package/client/dist/assets/loops-eUnCfLjC.js +1 -0
- package/client/dist/assets/{project-repositories-9Wzs0coQ.js → project-repositories-CSnfzUpg.js} +1 -1
- package/client/dist/assets/settings-3o4Ntzi5.js +1 -0
- package/client/dist/assets/settings-B97jlkwD.js +1 -0
- package/client/dist/assets/settings-BTaT_bsS.js +1 -0
- package/client/dist/assets/settings-CT8w7WiC.js +1 -0
- package/client/dist/assets/settings-Cvr8_tvh.js +1 -0
- package/client/dist/assets/settings-Dn1qgAC8.js +1 -0
- package/client/dist/assets/settings-EShDdg4J.js +1 -0
- package/client/dist/assets/settings-tfLhQZRN.js +1 -0
- package/client/dist/assets/{setup-Dwzt5nO1.js → setup-CBMu3tqH.js} +1 -1
- package/client/dist/assets/{setup-B5FHuxvB.js → setup-CPh-e6J2.js} +1 -1
- package/client/dist/assets/{setup-DpqzaEEA.js → setup-CRKLp_ke.js} +1 -1
- package/client/dist/assets/{setup-CROyqD5N.js → setup-Cy302v4J.js} +1 -1
- package/client/dist/assets/{setup-C9Fy9PKQ.js → setup-D681vTPf.js} +1 -1
- package/client/dist/assets/{setup-BihzXadx.js → setup-DYK0VBkE.js} +1 -1
- package/client/dist/assets/{setup-BtC6Hg4K.js → setup-KAuiIiVs.js} +1 -1
- package/client/dist/assets/{setup-zLEDnG7N.js → setup-OGX-oCfI.js} +1 -1
- package/client/dist/assets/{spending-T5GM7wpn.js → spending-HBSk-6jv.js} +1 -1
- package/client/dist/assets/{useDesktop-QogiN0zR.js → useDesktop-0unHDBJJ.js} +1 -1
- package/client/dist/assets/useRuntimeRuns-BN1rhyEm.js +1 -0
- package/client/dist/assets/{useSharedWebSocket-Dz-HI6De.js → useSharedWebSocket-BZMrX4jr.js} +2 -2
- package/client/dist/index.html +25 -25
- package/docs/agent-live-steering.md +16 -0
- package/docs/cli.md +7 -7
- package/docs/codex.md +2 -2
- package/docs/customizing.md +1 -1
- package/docs/gemini.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/guide/de/integrations/7-local-engines.md +1 -1
- package/docs/guide/de/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/de/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/de/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/de/pipeline/5-the-loop-builder.md +24 -5
- package/docs/guide/en/integrations/7-local-engines.md +1 -1
- package/docs/guide/en/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/en/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/en/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/en/pipeline/5-the-loop-builder.md +34 -5
- package/docs/guide/en/settings/3-pipeline-telemetry-and-diagnostics.md +1 -1
- package/docs/guide/es/integrations/7-local-engines.md +1 -1
- package/docs/guide/es/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/es/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/es/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/es/pipeline/5-the-loop-builder.md +30 -5
- package/docs/guide/es/settings/3-pipeline-telemetry-and-diagnostics.md +1 -2
- package/docs/guide/fr/integrations/7-local-engines.md +1 -1
- package/docs/guide/fr/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/fr/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/fr/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/fr/pipeline/5-the-loop-builder.md +24 -5
- package/docs/guide/it/integrations/7-local-engines.md +1 -1
- package/docs/guide/it/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/it/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/it/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/it/pipeline/5-the-loop-builder.md +24 -5
- package/docs/guide/ja/integrations/7-local-engines.md +1 -1
- package/docs/guide/ja/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/ja/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/ja/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/ja/pipeline/5-the-loop-builder.md +24 -5
- package/docs/guide/pt/integrations/7-local-engines.md +1 -1
- package/docs/guide/pt/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/pt/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/pt/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/pt/pipeline/5-the-loop-builder.md +24 -5
- package/docs/guide/zh/integrations/7-local-engines.md +1 -1
- package/docs/guide/zh/pipeline/1-rails-and-jobs.md +8 -6
- package/docs/guide/zh/pipeline/2-the-job-detail-view.md +11 -2
- package/docs/guide/zh/pipeline/4-picking-an-engine-per-rail.md +2 -2
- package/docs/guide/zh/pipeline/5-the-loop-builder.md +24 -5
- package/docs/internals/api-reference.md +2 -2
- package/docs/internals/ci-performance.md +71 -0
- package/docs/internals/companion-rails-as-loops-contract.md +4 -3
- package/docs/internals/configuration.md +3 -3
- package/docs/internals/core-runtime-updates.md +3 -2
- package/docs/internals/interactive-jobs.md +2 -2
- package/docs/internals/loop-step-log-explorer.md +42 -0
- package/docs/internals/mission-rail-cards.md +1 -1
- package/docs/internals/operations-runbook.md +22 -0
- package/docs/internals/programmatic-agent-runtime.md +130 -7
- package/docs/internals/project-builder.md +35 -16
- package/docs/internals/source-map.md +48 -2
- package/docs/kimi.md +2 -2
- package/docs/local-providers.md +1 -1
- package/docs/running-pipelines.md +26 -18
- package/docs/tracking-cost.md +10 -1
- package/package.json +2 -1
- package/server/dist/core-compat.js +8 -3
- package/server/dist/core-execution.js +49 -3
- package/server/dist/db/migrations.js +101 -0
- package/server/dist/desktop-db.js +28 -0
- package/server/dist/desktop-router.js +2 -0
- package/server/dist/mcp/guide.js +6 -3
- package/server/dist/mcp/tools/jobs.js +14 -1
- package/server/dist/mcp/tools/loops.js +17 -8
- package/server/dist/mcp/tools/rails.js +3 -3
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-bridge.js +313 -9
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-controls-router.js +34 -1
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-controls.js +203 -21
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-effective-config.js +46 -1
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-engines.js +10 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-loader.js +68 -3
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-metrics.js +16 -8
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-package-gc.js +81 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-package-lock.js +37 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-package.js +30 -24
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-host.js +87 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-quarantine.js +231 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention-records.js +32 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-retention.js +102 -0
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-settings-router.js +12 -7
- package/server/dist/modules/agent-runtime/runtime/agent-runtime-settings.js +57 -13
- package/server/dist/modules/agents/runtime/agent-catalog.js +32 -0
- package/server/dist/modules/agents/runtime/agent-refine-manager.js +12 -0
- package/server/dist/modules/agents/runtime/agent-role-descriptor.js +64 -0
- package/server/dist/modules/agents/runtime/profiles-router.js +26 -34
- package/server/dist/modules/builder/runtime/milestone-chain.js +121 -73
- package/server/dist/modules/delivery/runtime/definition-fork.js +158 -0
- package/server/dist/modules/delivery/runtime/delivery-evidence.js +56 -10
- package/server/dist/modules/delivery/runtime/isolated-settlement-reconstruction.js +99 -0
- package/server/dist/modules/delivery/runtime/isolated-settlement-store.js +53 -0
- package/server/dist/modules/delivery/runtime/multi-repo-execution-store.js +3 -1
- package/server/dist/modules/delivery/runtime/rail-isolated-launch.js +388 -203
- package/server/dist/modules/delivery/runtime/rail-launch-parser.js +3 -2
- package/server/dist/modules/delivery/runtime/rail-pr-store.js +6 -1
- package/server/dist/modules/delivery/runtime/rails-router.js +66 -10
- package/server/dist/modules/execution/runtime/queue-manager.js +11 -2
- package/server/dist/modules/loops/runtime/builtin-loops.js +70 -0
- package/server/dist/modules/loops/runtime/definition-cancellation.js +31 -0
- package/server/dist/modules/loops/runtime/legacy-launch-telemetry.js +78 -0
- package/server/dist/modules/loops/runtime/loop-command-catalog.js +13 -12
- package/server/dist/modules/loops/runtime/loop-compat.js +219 -0
- package/server/dist/modules/loops/runtime/loop-core-factory.js +42 -0
- package/server/dist/modules/loops/runtime/loop-definition-controls.js +48 -0
- package/server/dist/modules/loops/runtime/loop-definition-events.js +145 -0
- package/server/dist/modules/loops/runtime/loop-definition-recovery.js +106 -0
- package/server/dist/modules/loops/runtime/loop-definition-run.js +36 -0
- package/server/dist/modules/loops/runtime/loop-definition.js +246 -0
- package/server/dist/modules/loops/runtime/loop-effect.js +10 -1
- package/server/dist/modules/loops/runtime/loop-executors.js +63 -3
- package/server/dist/modules/loops/runtime/loop-factory.js +35 -15
- package/server/dist/modules/loops/runtime/loop-graph.js +84 -8
- package/server/dist/modules/loops/runtime/loop-migration.js +36 -0
- package/server/dist/modules/loops/runtime/loop-preview.js +10 -0
- package/server/dist/modules/loops/runtime/loop-run-manager.js +206 -13
- package/server/dist/modules/loops/runtime/loop-runs-store.js +271 -7
- package/server/dist/modules/loops/runtime/loop-templates.js +205 -45
- package/server/dist/modules/loops/runtime/loops-router.js +246 -29
- package/server/dist/modules/loops/runtime/loops-store.js +140 -20
- package/server/dist/modules/missions/runtime/agent-operator-prompt.js +14 -11
- package/server/dist/modules/specs/runtime/spec-addenda.js +28 -0
- package/server/dist/project-registry.js +87 -51
- package/server/dist/project-router-jobs.js +17 -6
- package/server/dist/project-router-loop-runs.js +200 -0
- package/server/dist/project-router-spending.js +17 -0
- package/server/dist/project-router.js +8 -6
- package/server/dist/schemas/agent-runtime.schema.json +93 -1
- package/server/dist/schemas/workflow-definition.schema.json +312 -0
- package/server/dist/vitest-setup.js +22 -0
- package/server/dist/worktree-overlay.js +1 -1
- package/client/dist/assets/AgentsPage-DfHWgP_x.js +0 -87
- package/client/dist/assets/DesktopAnalyticsPage-tc0p4jJW.js +0 -1
- package/client/dist/assets/InteractiveJobComposer-DFPpdg2D.js +0 -19
- package/client/dist/assets/JobDetailModal-BdOv-l-M.js +0 -1
- package/client/dist/assets/LoopBuilderPage-BemvUOxy.js +0 -7
- package/client/dist/assets/LoopPreviewModal-C6hNAeYN.js +0 -1
- package/client/dist/assets/LoopsPage-BZr0quvh.js +0 -1
- package/client/dist/assets/TemplatePreviewModal-Cejcquah.js +0 -1
- package/client/dist/assets/agentRuntime-BUimiX__.js +0 -1
- package/client/dist/assets/agentRuntime-BcN97sAB.js +0 -1
- package/client/dist/assets/agentRuntime-Ckyg-ahT.js +0 -1
- package/client/dist/assets/agentRuntime-DJCwyX4t.js +0 -1
- package/client/dist/assets/agentRuntime-DVzPJOl0.js +0 -1
- package/client/dist/assets/agentRuntime-V9AZTG3c.js +0 -1
- package/client/dist/assets/agentRuntime-bAAjw1vw.js +0 -1
- package/client/dist/assets/agentRuntime-v4qKAYH-.js +0 -1
- package/client/dist/assets/agentstudio-BNUth0uj.js +0 -1
- package/client/dist/assets/agentstudio-BNdB5hkr.js +0 -1
- package/client/dist/assets/agentstudio-C7-bt8FO.js +0 -1
- package/client/dist/assets/agentstudio-C8uNchpV.js +0 -1
- package/client/dist/assets/agentstudio-CKabyMlg.js +0 -1
- package/client/dist/assets/agentstudio-CN2pokQu.js +0 -1
- package/client/dist/assets/agentstudio-y2dVDXeM.js +0 -1
- package/client/dist/assets/analytics-BlypLLR6.js +0 -1
- package/client/dist/assets/builder-765NeYTp.js +0 -1
- package/client/dist/assets/builder-8MG3V6ea.js +0 -1
- package/client/dist/assets/builder-B-1UBs5K.js +0 -1
- package/client/dist/assets/builder-BTiGnPT0.js +0 -1
- package/client/dist/assets/builder-Cx9Rz-7u.js +0 -1
- package/client/dist/assets/builder-DKFMELBl.js +0 -1
- package/client/dist/assets/builder-OcmKrC0h.js +0 -1
- package/client/dist/assets/builder-P9qVBXFZ.js +0 -1
- package/client/dist/assets/common-B5AZNYMH.js +0 -1
- package/client/dist/assets/common-BFZ0c_vN.js +0 -1
- package/client/dist/assets/common-BttQx3z4.js +0 -1
- package/client/dist/assets/common-CM65k_-e.js +0 -1
- package/client/dist/assets/common-D4mvFFlu.js +0 -1
- package/client/dist/assets/common-TZ9Ny96S.js +0 -1
- package/client/dist/assets/common-nFpSF4GC.js +0 -1
- package/client/dist/assets/dashboard-B9uWNGO2.js +0 -1
- package/client/dist/assets/dashboard-BIwmO9wc.js +0 -1
- package/client/dist/assets/dashboard-BV4vOZkR.js +0 -1
- package/client/dist/assets/dashboard-Bf6MPVsM.js +0 -1
- package/client/dist/assets/dashboard-C8klWVvZ.js +0 -1
- package/client/dist/assets/dashboard-D1ORhPF0.js +0 -1
- package/client/dist/assets/dashboard-DSubvs9x.js +0 -1
- package/client/dist/assets/dashboard-px_vlRx_.js +0 -1
- package/client/dist/assets/index-C51x61Bz.css +0 -2
- package/client/dist/assets/loops-B7YpGizO.js +0 -1
- package/client/dist/assets/loops-BomD2J-h.js +0 -1
- package/client/dist/assets/loops-BrQHSQw3.js +0 -1
- package/client/dist/assets/loops-BvBwvTPA.js +0 -1
- package/client/dist/assets/loops-CODk6Slz.js +0 -1
- package/client/dist/assets/loops-DC6k-Ym-.js +0 -1
- package/client/dist/assets/loops-DSEg8-uY.js +0 -1
- package/client/dist/assets/loops-DhCoXD_v.js +0 -1
- package/client/dist/assets/settings-BsehKpty.js +0 -1
- package/client/dist/assets/settings-CQWob3SB.js +0 -1
- package/client/dist/assets/settings-CgCl0hzy.js +0 -1
- package/client/dist/assets/settings-DLRLd22L.js +0 -1
- package/client/dist/assets/settings-Dn5prAFl.js +0 -1
- package/client/dist/assets/settings-HZSu-K4l.js +0 -1
- package/client/dist/assets/settings-p4OVIyRh.js +0 -1
- package/client/dist/assets/settings-rddaldUp.js +0 -1
- package/client/dist/assets/useRuntimeRuns-Dqmz9fS9.js +0 -1
- package/docs/guide/de/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/docs/guide/en/pipeline/3-batch-implement-and-multi-feature.md +0 -126
- package/docs/guide/es/pipeline/3-batch-implement-and-multi-feature.md +0 -114
- package/docs/guide/fr/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/docs/guide/it/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/docs/guide/ja/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/docs/guide/pt/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/docs/guide/zh/pipeline/3-batch-implement-and-multi-feature.md +0 -84
- package/server/dist/modules/loops/runtime/loop-templates-ported.js +0 -675
- /package/client/dist/assets/{LoopBuilderPage-DtxX27Jz.css → loop-layout-DtxX27Jz.css} +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOOP_TEMPLATES = exports.LOOP_CATEGORIES = void 0;
|
|
4
|
-
exports.compilePortSpec = compilePortSpec;
|
|
3
|
+
exports.LEGACY_LOOP_TEMPLATES = exports.LOOP_TEMPLATES = exports.CORE_STARTER_TEMPLATE_IDS = exports.LOOP_CATEGORIES = void 0;
|
|
5
4
|
exports.aiLoopGraph = aiLoopGraph;
|
|
6
5
|
exports.fixLoopGraph = fixLoopGraph;
|
|
7
6
|
exports.opsxLifecycleGraph = opsxLifecycleGraph;
|
|
7
|
+
exports.coreStarterGraph = coreStarterGraph;
|
|
8
|
+
exports.supportsCoreTemplates = supportsCoreTemplates;
|
|
9
|
+
exports.loopTemplatesForCapabilities = loopTemplatesForCapabilities;
|
|
8
10
|
exports.getLoopTemplate = getLoopTemplate;
|
|
9
|
-
const loop_templates_ported_1 = require("./loop-templates-ported");
|
|
10
11
|
/** Closed taxonomy a template's `category` must belong to. Single source of truth
|
|
11
12
|
* for the gallery's category chips (the client derives its chip list from the
|
|
12
13
|
* categories actually present in the served catalog). */
|
|
@@ -14,22 +15,6 @@ exports.LOOP_CATEGORIES = [
|
|
|
14
15
|
'API', 'Automation', 'CI', 'Database', 'Debugging', 'DevOps', 'Docs', 'Git',
|
|
15
16
|
'Maintenance', 'Performance', 'Planning', 'Quality', 'Review', 'Security', 'Testing',
|
|
16
17
|
];
|
|
17
|
-
/** Compile a PortSpec into a publishable LoopTemplate (graph passes validation,
|
|
18
|
-
* no Shell nodes, exactly one continue+stop Decider branch — by construction). */
|
|
19
|
-
function compilePortSpec(spec) {
|
|
20
|
-
const graph = spec.loopBack === 'verify'
|
|
21
|
-
? fixLoopGraph(spec.steps, spec.goal, spec.maxIterations ?? 12, spec.timeoutMinutes ?? 30)
|
|
22
|
-
: aiLoopGraph(spec.steps, spec.goal, spec.maxIterations ?? 10, spec.loopBack === 'first' ? 'first' : 'last', spec.timeoutMinutes ?? 30);
|
|
23
|
-
return {
|
|
24
|
-
id: spec.id,
|
|
25
|
-
name: spec.name,
|
|
26
|
-
description: spec.description,
|
|
27
|
-
category: spec.category,
|
|
28
|
-
tags: spec.tags,
|
|
29
|
-
...(spec.readOnly ? { readOnly: true } : {}),
|
|
30
|
-
graph,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
18
|
/** Helper: a linear chain of AI steps closed by a Loop Decider. The decider's
|
|
34
19
|
* "continue" edge loops back to the LAST step (the verify/fix step) — so a retry
|
|
35
20
|
* re-verifies and fixes WITHOUT re-running the (expensive) earlier steps like
|
|
@@ -127,7 +112,7 @@ function fixLoopGraph(mainPrompts, deciderGoal, maxIterations = 12, timeoutMinut
|
|
|
127
112
|
edges.push({ id: 'e-stop', source: 'decide', target: 'done', branch: 'stop' }); // green → exit (drops down)
|
|
128
113
|
return { nodes, edges, config: { maxIterations, timeoutMinutes, ...(aiStepTimeoutMinutes != null ? { aiStepTimeoutMinutes } : {}) } };
|
|
129
114
|
}
|
|
130
|
-
// ── OpenSpec lifecycle
|
|
115
|
+
// ── OpenSpec lifecycle graph (legacy Quick SDD factory) ──────────────────────
|
|
131
116
|
// Lightweight lifecycle: prepare → preflight → apply/test → validate artifacts → archive.
|
|
132
117
|
// CLI validation checks OpenSpec artifacts; Apply owns code tests and corrections.
|
|
133
118
|
const OPSX_FF_PROMPT = [
|
|
@@ -149,7 +134,8 @@ const OPSX_APPLY_PROMPT = [
|
|
|
149
134
|
'Finish with exactly `{{const:VERIFICATION_PASS}}` only after implementation and relevant checks succeed. Otherwise finish with `{{const:VERIFICATION_FAIL}} — <remaining work or failed checks>`.',
|
|
150
135
|
'{{const:GUARDRAILS}}',
|
|
151
136
|
].join('\n\n');
|
|
152
|
-
/** The OpenSpec-lifecycle graph (see comment above).
|
|
137
|
+
/** The OpenSpec-lifecycle graph (see comment above). Legacy variant of the
|
|
138
|
+
* `factory:sdd-quick-openspec` built-in; it is not a gallery template. */
|
|
153
139
|
function opsxLifecycleGraph() {
|
|
154
140
|
return {
|
|
155
141
|
nodes: [
|
|
@@ -178,25 +164,78 @@ function opsxLifecycleGraph() {
|
|
|
178
164
|
config: { maxIterations: 3, timeoutMinutes: 0, aiStepTimeoutMinutes: 0 },
|
|
179
165
|
};
|
|
180
166
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
167
|
+
// ── The eight named starters ─────────────────────────────────────────────────
|
|
168
|
+
// Prompt/goal text is shared by the legacy graphs (Desktop traversal, older Core)
|
|
169
|
+
// and the Core definition graphs below, so porting never silently rewrites the
|
|
170
|
+
// user-facing instructions. Iteration bounds are kept per starter as well.
|
|
171
|
+
/** Starters that ship as Core definition graphs when the selected Core advertises
|
|
172
|
+
* both `engineV2: 1` and `workflowDefinitions: 1` (same gate as the factories). */
|
|
173
|
+
exports.CORE_STARTER_TEMPLATE_IDS = [
|
|
174
|
+
'ship-and-green', 'verify-pass', 'ci-watch', 'lint-and-fix', 'type-safe', 'coverage-climb', 'build-fix', 'deploy-check',
|
|
175
|
+
];
|
|
176
|
+
const STARTER_TEXT = {
|
|
177
|
+
'ship-and-green': {
|
|
178
|
+
prompt: '{{cmd:implement}}',
|
|
179
|
+
// Uses the built-in {{const:VERIFICATION_PASS}} so the Decider goal and the
|
|
180
|
+
// sentinel {{cmd:verify}} emits stay in lock-step (resolved at run time).
|
|
181
|
+
goal: 'The verification step reported {{const:VERIFICATION_PASS}} — the spec is implemented and all tests pass.',
|
|
182
|
+
maxIterations: 12,
|
|
183
|
+
},
|
|
184
|
+
'verify-pass': {
|
|
185
|
+
prompt: '',
|
|
186
|
+
goal: 'The verification step reported {{const:VERIFICATION_PASS}} with no remaining issues.',
|
|
187
|
+
maxIterations: 12,
|
|
188
|
+
},
|
|
189
|
+
'ci-watch': {
|
|
190
|
+
prompt: 'Check the CI status of the current pull request using the repository\'s CI tooling (e.g. `gh pr checks`). Report whether every check has passed or is still running/failing.',
|
|
191
|
+
goal: 'Every CI check on the PR reports success.',
|
|
192
|
+
maxIterations: 20,
|
|
193
|
+
},
|
|
194
|
+
'lint-and-fix': {
|
|
195
|
+
prompt: 'Detect this project\'s linter from its config and run it. Fix every issue it reports for spec "{{spec.title}}" (lint/format only — no behaviour change). Report whether the linter is now clean.',
|
|
196
|
+
goal: 'The linter reports zero errors and zero warnings.',
|
|
197
|
+
maxIterations: 10,
|
|
198
|
+
},
|
|
199
|
+
'type-safe': {
|
|
200
|
+
prompt: 'Detect this project\'s type checker from its config and run it. Resolve every type error related to spec "{{spec.title}}" without `any`, ignore comments, or non-null assertions. Report whether it passes.',
|
|
201
|
+
goal: 'The type checker passes with zero errors and no suppressions were added.',
|
|
202
|
+
maxIterations: 10,
|
|
203
|
+
},
|
|
204
|
+
'coverage-climb': {
|
|
205
|
+
prompt: 'Detect this project\'s test/coverage tooling and run it with coverage. Add focused tests for the code implementing spec "{{spec.title}}" until the coverage gate passes; cover edge cases and error paths (tests must assert real behaviour). Report coverage status.',
|
|
206
|
+
goal: 'The coverage thresholds pass and the added tests assert meaningful behaviour.',
|
|
207
|
+
maxIterations: 10,
|
|
208
|
+
},
|
|
209
|
+
'build-fix': {
|
|
210
|
+
prompt: 'Detect this project\'s production build command from its config and run it. Fix any compilation or bundling errors for spec "{{spec.title}}" without disabling type or build checks. Report whether the build succeeds.',
|
|
211
|
+
goal: 'The production build completes successfully with no errors.',
|
|
212
|
+
maxIterations: 10,
|
|
189
213
|
},
|
|
214
|
+
'deploy-check': {
|
|
215
|
+
prompt: 'Check the latest deployment/health status using the repository\'s deploy tooling (e.g. `gh run list --workflow deploy`, a health endpoint). Report whether the deployment finished successfully and the service is healthy.',
|
|
216
|
+
goal: 'The latest deployment finished successfully and the service is healthy.',
|
|
217
|
+
maxIterations: 20,
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
/** Legacy starter graphs (Desktop node traversal). Served whenever the selected
|
|
221
|
+
* Core does not advertise the definition engine; retained until D8. */
|
|
222
|
+
function legacyStarterGraph(id) {
|
|
223
|
+
const { prompt, goal, maxIterations } = STARTER_TEXT[id];
|
|
224
|
+
if (id === 'ship-and-green' || id === 'verify-pass')
|
|
225
|
+
return fixLoopGraph(prompt ? [prompt] : [], goal, maxIterations);
|
|
226
|
+
return aiLoopGraph([prompt], goal, maxIterations);
|
|
227
|
+
}
|
|
228
|
+
/** Legacy catalog: every starter as a Desktop-traversal graph. `LOOP_TEMPLATES`
|
|
229
|
+
* keeps this meaning for existing consumers; capability-aware callers use
|
|
230
|
+
* `loopTemplatesForCapabilities` / `getLoopTemplate(id, capabilities)`. */
|
|
231
|
+
exports.LOOP_TEMPLATES = [
|
|
190
232
|
{
|
|
191
233
|
id: 'ship-and-green',
|
|
192
234
|
name: 'Ship & Green',
|
|
193
235
|
description: 'Fully autonomous: implement the spec, verify, and refine (fix) on failure — looping verify → fix → verify until everything is green. No human intervention.',
|
|
194
236
|
category: 'CI',
|
|
195
237
|
tags: ['CI', 'testing'],
|
|
196
|
-
graph:
|
|
197
|
-
// Uses the built-in {{const:VERIFICATION_PASS}} so the Decider goal and the
|
|
198
|
-
// sentinel {{cmd:verify}} emits stay in lock-step (resolved at run time).
|
|
199
|
-
'The verification step reported {{const:VERIFICATION_PASS}} — the spec is implemented and all tests pass.'),
|
|
238
|
+
graph: legacyStarterGraph('ship-and-green'),
|
|
200
239
|
},
|
|
201
240
|
{
|
|
202
241
|
id: 'verify-pass',
|
|
@@ -204,7 +243,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
204
243
|
description: 'Autonomous verify-and-fix: detect and run the project\'s build/lint/tests, then refine on failure — verify → fix → verify until green.',
|
|
205
244
|
category: 'Testing',
|
|
206
245
|
tags: ['testing', 'quality'],
|
|
207
|
-
graph:
|
|
246
|
+
graph: legacyStarterGraph('verify-pass'),
|
|
208
247
|
},
|
|
209
248
|
{
|
|
210
249
|
id: 'ci-watch',
|
|
@@ -212,7 +251,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
212
251
|
description: 'Poll CI checks on the open PR (the agent uses the repo\'s CI tooling) until every check is green.',
|
|
213
252
|
category: 'CI',
|
|
214
253
|
tags: ['CI', 'DevOps'],
|
|
215
|
-
graph:
|
|
254
|
+
graph: legacyStarterGraph('ci-watch'),
|
|
216
255
|
},
|
|
217
256
|
{
|
|
218
257
|
id: 'lint-and-fix',
|
|
@@ -220,7 +259,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
220
259
|
description: 'The agent detects and runs the project\'s linter and fixes every issue, iterating until the codebase is clean.',
|
|
221
260
|
category: 'Quality',
|
|
222
261
|
tags: ['quality', 'lint'],
|
|
223
|
-
graph:
|
|
262
|
+
graph: legacyStarterGraph('lint-and-fix'),
|
|
224
263
|
},
|
|
225
264
|
{
|
|
226
265
|
id: 'type-safe',
|
|
@@ -228,7 +267,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
228
267
|
description: 'The agent detects and runs the project\'s type checker and resolves every error, iterating until it passes cleanly.',
|
|
229
268
|
category: 'Quality',
|
|
230
269
|
tags: ['quality', 'types'],
|
|
231
|
-
graph:
|
|
270
|
+
graph: legacyStarterGraph('type-safe'),
|
|
232
271
|
},
|
|
233
272
|
{
|
|
234
273
|
id: 'coverage-climb',
|
|
@@ -236,7 +275,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
236
275
|
description: 'The agent runs the project\'s coverage tooling and adds focused tests until the thresholds pass.',
|
|
237
276
|
category: 'Testing',
|
|
238
277
|
tags: ['testing', 'coverage'],
|
|
239
|
-
graph:
|
|
278
|
+
graph: legacyStarterGraph('coverage-climb'),
|
|
240
279
|
},
|
|
241
280
|
{
|
|
242
281
|
id: 'build-fix',
|
|
@@ -244,7 +283,7 @@ exports.LOOP_TEMPLATES = [
|
|
|
244
283
|
description: 'The agent detects and runs the project\'s production build and fixes compile/bundle errors until it is green.',
|
|
245
284
|
category: 'CI',
|
|
246
285
|
tags: ['CI', 'build'],
|
|
247
|
-
graph:
|
|
286
|
+
graph: legacyStarterGraph('build-fix'),
|
|
248
287
|
},
|
|
249
288
|
{
|
|
250
289
|
id: 'deploy-check',
|
|
@@ -252,12 +291,133 @@ exports.LOOP_TEMPLATES = [
|
|
|
252
291
|
description: 'The agent polls the deployment/health status (using the project\'s deploy tooling) until the service reports healthy.',
|
|
253
292
|
category: 'DevOps',
|
|
254
293
|
tags: ['DevOps', 'deploy'],
|
|
255
|
-
graph:
|
|
294
|
+
graph: legacyStarterGraph('deploy-check'),
|
|
256
295
|
},
|
|
257
|
-
// Ported community-pattern starters (Specrails-authored), compiled from
|
|
258
|
-
// declarative PortSpecs so the catalog spans every category in the taxonomy.
|
|
259
|
-
...loop_templates_ported_1.PORTED_TEMPLATES.map(compilePortSpec),
|
|
260
296
|
];
|
|
261
|
-
|
|
262
|
-
|
|
297
|
+
/** Explicit alias: the legacy (older Core / no engineV2) catalog. */
|
|
298
|
+
exports.LEGACY_LOOP_TEMPLATES = exports.LOOP_TEMPLATES;
|
|
299
|
+
// ── Core definition starters (engineV2 + workflowDefinitions) ────────────────
|
|
300
|
+
// Rules (CHECKPOINT-D1B-D5 "Still pending"):
|
|
301
|
+
// - watchers (ci-watch, deploy-check) are explicit `access: 'read'` prompts and
|
|
302
|
+
// certify nothing (their success end has `requiresVerified: false`);
|
|
303
|
+
// - every mutating starter runs the real `verify` piece over the project's
|
|
304
|
+
// configured checks and ends with `requiresVerified: true` — a passing sentinel
|
|
305
|
+
// alone never reaches a success end;
|
|
306
|
+
// - ship-and-green = native `implementation` → verify → decider → prompt(fix) loop;
|
|
307
|
+
// - prompts, goals and iteration caps come from STARTER_TEXT (legacy parity).
|
|
308
|
+
/** Fix step shared by every mutating Core starter. Reuses the tuned `{{cmd:fix}}`
|
|
309
|
+
* contract and covers the verify→fix edge, where no Decider verdict precedes it. */
|
|
310
|
+
const CORE_FIX_PROMPT = [
|
|
311
|
+
'Either the configured host verification failed or the Loop Decider judged the goal not yet met.',
|
|
312
|
+
'{{cmd:fix}}',
|
|
313
|
+
'If the verification findings are not visible above, run the project\'s configured checks (build, type-check, lint, tests) yourself first and act on their actual output. Never weaken, skip or disable a check to make it pass.',
|
|
314
|
+
].join('\n\n');
|
|
315
|
+
/** Read-only watcher verdict: the legacy Decider goal becomes the explicit sentinel rule. */
|
|
316
|
+
function watcherVerdict(goal) {
|
|
317
|
+
return [
|
|
318
|
+
'Read-only: do not modify any file, branch, pull request or deployment.',
|
|
319
|
+
`Finish with exactly \`{{const:VERIFICATION_PASS}}\` only when this holds: ${goal} Otherwise finish with \`{{const:VERIFICATION_FAIL}} — <what is still running or failing>\`.`,
|
|
320
|
+
].join('\n\n');
|
|
321
|
+
}
|
|
322
|
+
/** Evidence clause appended to legacy Decider goals: the Core decider only runs after
|
|
323
|
+
* the real `verify` piece passed, so it judges completeness, not check status. */
|
|
324
|
+
const CORE_GOAL_EVIDENCE = 'The configured host verification already passed on the current candidate before this decision. Judge only from concrete evidence in the history (commands run, their output, files changed); green baseline checks, setup or planning alone do not prove the goal.';
|
|
325
|
+
const SHIP_AND_GREEN_GOAL = 'Stop only when the history proves the spec is implemented: every acceptance criterion maps to real code and behavioral evidence across every selected ticket and repository, and the configured host verification passed on the current candidate. Setup, planning, a launched subagent or green baseline checks alone are insufficient; continue when work is missing or incomplete.';
|
|
326
|
+
/** Wall-clock cap for starters (legacy default). ship-and-green is untimed like the
|
|
327
|
+
* Implement factory: the native implementation piece runs the whole pipeline. */
|
|
328
|
+
const STARTER_TIMEOUT_MIN = 30;
|
|
329
|
+
const CORE_STARTER_SHAPES = {
|
|
330
|
+
'ship-and-green': 'ship',
|
|
331
|
+
'verify-pass': 'verify-fix',
|
|
332
|
+
'ci-watch': 'watch',
|
|
333
|
+
'lint-and-fix': 'quality',
|
|
334
|
+
'type-safe': 'quality',
|
|
335
|
+
'coverage-climb': 'quality',
|
|
336
|
+
'build-fix': 'quality',
|
|
337
|
+
'deploy-check': 'watch',
|
|
338
|
+
};
|
|
339
|
+
/** Core definition graph for one of the eight starters. Deterministic: same id ⇒
|
|
340
|
+
* structurally identical graph (positions included). */
|
|
341
|
+
function coreStarterGraph(id) {
|
|
342
|
+
const shape = CORE_STARTER_SHAPES[id];
|
|
343
|
+
const { prompt, goal, maxIterations } = STARTER_TEXT[id];
|
|
344
|
+
const nodes = [{ id: 'start', type: 'start', position: { x: COL_X, y: 0 } }];
|
|
345
|
+
const edges = [];
|
|
346
|
+
const piece = (nodeId, kind, params, outcomes, x = COL_X) => {
|
|
347
|
+
nodes.push({ id: nodeId, type: 'core', position: { x, y: ROW_GAP * nodes.length }, data: { kind, params } });
|
|
348
|
+
for (const [label, target] of Object.entries(outcomes))
|
|
349
|
+
edges.push({ id: `e-${nodeId}-${label}`, source: nodeId, target, label });
|
|
350
|
+
};
|
|
351
|
+
const verify = (pass) => piece('verify', 'verify', { commands: 'configured' }, { pass, fail: 'fix', failed: 'failed' });
|
|
352
|
+
const decide = (deciderGoal, next) => piece('decide', 'decider', { roleId: 'loop-decider', goal: deciderGoal, noProgress: 3 }, { stop: 'done', continue: next, failed: 'failed' });
|
|
353
|
+
const fix = () => piece('fix', 'prompt', { text: CORE_FIX_PROMPT, access: 'write' }, { next: 'verify', failed: 'failed' }, COL_RIGHT_X);
|
|
354
|
+
let entry;
|
|
355
|
+
let config = { maxIterations, timeoutMinutes: STARTER_TIMEOUT_MIN, journal: 'ledger-only', change: 'none' };
|
|
356
|
+
let successEnd = { outcome: 'success', requiresVerified: true };
|
|
357
|
+
if (shape === 'ship') {
|
|
358
|
+
entry = 'implement';
|
|
359
|
+
piece('implement', 'implementation', {}, { next: 'verify', rejected: 'failed', failed: 'failed' });
|
|
360
|
+
verify('decide');
|
|
361
|
+
decide(SHIP_AND_GREEN_GOAL, 'fix');
|
|
362
|
+
fix();
|
|
363
|
+
config = { maxIterations, timeoutMinutes: 0, aiStepTimeoutMinutes: 0, journal: 'implementation', change: 'new' };
|
|
364
|
+
}
|
|
365
|
+
else if (shape === 'verify-fix') {
|
|
366
|
+
entry = 'verify';
|
|
367
|
+
verify('done');
|
|
368
|
+
fix();
|
|
369
|
+
}
|
|
370
|
+
else if (shape === 'quality') {
|
|
371
|
+
entry = 'work';
|
|
372
|
+
piece('work', 'prompt', { text: prompt, access: 'write' }, { next: 'verify', failed: 'failed' });
|
|
373
|
+
verify('decide');
|
|
374
|
+
decide(`${goal} ${CORE_GOAL_EVIDENCE}`, 'work');
|
|
375
|
+
fix();
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
entry = 'check';
|
|
379
|
+
piece('check', 'prompt', { text: `${prompt}\n\n${watcherVerdict(goal)}`, access: 'read', sentinel: 'verification' }, { pass: 'done', fail: 'check', failed: 'failed' });
|
|
380
|
+
successEnd = { outcome: 'success', requiresVerified: false };
|
|
381
|
+
}
|
|
382
|
+
edges.unshift({ id: 'e-start', source: 'start', target: entry });
|
|
383
|
+
nodes.push({ id: 'done', type: 'end', position: { x: COL_X, y: ROW_GAP * nodes.length }, data: successEnd }, { id: 'failed', type: 'end', position: { x: COL_RIGHT_X, y: ROW_GAP * nodes.length }, data: { outcome: 'failure' } });
|
|
384
|
+
return { nodes, edges, config };
|
|
385
|
+
}
|
|
386
|
+
const CORE_STARTER_DESCRIPTIONS = {
|
|
387
|
+
'ship-and-green': 'Fully autonomous: run Core\'s native implementation pipeline for the spec, then verify with the project\'s configured checks and refine (fix) on failure — verify → decide → fix until green. Success requires a verified candidate; no human intervention.',
|
|
388
|
+
'verify-pass': 'Autonomous verify-and-fix: run the project\'s configured build/lint/tests through Core\'s verify piece, then refine on failure — verify → fix → verify until green.',
|
|
389
|
+
'ci-watch': 'Poll CI checks on the open PR (the agent uses the repo\'s CI tooling) until every check is green. Read-only: the watcher never edits the repository.',
|
|
390
|
+
'lint-and-fix': 'The agent detects and runs the project\'s linter and fixes every issue, iterating until the codebase is clean. Every pass is confirmed by the project\'s configured verification before the loop can succeed.',
|
|
391
|
+
'type-safe': 'The agent detects and runs the project\'s type checker and resolves every error, iterating until it passes cleanly. Every pass is confirmed by the project\'s configured verification before the loop can succeed.',
|
|
392
|
+
'coverage-climb': 'The agent runs the project\'s coverage tooling and adds focused tests until the thresholds pass. Every pass is confirmed by the project\'s configured verification before the loop can succeed.',
|
|
393
|
+
'build-fix': 'The agent detects and runs the project\'s production build and fixes compile/bundle errors until it is green. Every pass is confirmed by the project\'s configured verification before the loop can succeed.',
|
|
394
|
+
'deploy-check': 'The agent polls the deployment/health status (using the project\'s deploy tooling) until the service reports healthy. Read-only: the watcher never edits the repository.',
|
|
395
|
+
};
|
|
396
|
+
function isCoreStarterId(id) {
|
|
397
|
+
return exports.CORE_STARTER_TEMPLATE_IDS.includes(id);
|
|
398
|
+
}
|
|
399
|
+
/** Same gate as `factoryLoopsForCapabilities`: both flags must be advertised. */
|
|
400
|
+
function supportsCoreTemplates(capabilities) {
|
|
401
|
+
return capabilities?.engineV2 === 1 && capabilities.workflowDefinitions === 1;
|
|
402
|
+
}
|
|
403
|
+
/** The catalog for the selected Core: the eight starters become Core definitions
|
|
404
|
+
* when the capabilities allow it; every other entry (and every entry on older
|
|
405
|
+
* Core) is the legacy graph. Order, ids, names, categories and tags are stable. */
|
|
406
|
+
function loopTemplatesForCapabilities(capabilities) {
|
|
407
|
+
if (!supportsCoreTemplates(capabilities))
|
|
408
|
+
return exports.LOOP_TEMPLATES;
|
|
409
|
+
return exports.LOOP_TEMPLATES.map((template) => {
|
|
410
|
+
if (!isCoreStarterId(template.id))
|
|
411
|
+
return template;
|
|
412
|
+
const readOnly = CORE_STARTER_SHAPES[template.id] === 'watch';
|
|
413
|
+
return {
|
|
414
|
+
...template,
|
|
415
|
+
description: CORE_STARTER_DESCRIPTIONS[template.id],
|
|
416
|
+
...(readOnly ? { readOnly: true } : {}),
|
|
417
|
+
graph: coreStarterGraph(template.id),
|
|
418
|
+
};
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
function getLoopTemplate(id, capabilities) {
|
|
422
|
+
return loopTemplatesForCapabilities(capabilities).find((t) => t.id === id);
|
|
263
423
|
}
|