fifony 0.1.47 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +78 -0
  2. package/app/dist/assets/CommandPalette-CZDG20HW.js +1 -0
  3. package/app/dist/assets/{KeyboardShortcutsHelp-CqEFfGcE.js → KeyboardShortcutsHelp-TYhQc4aA.js} +1 -1
  4. package/app/dist/assets/OnboardingWizard-CQ9YmVIT.js +1 -0
  5. package/app/dist/assets/agents.lazy-CgakDm_P.js +1 -0
  6. package/app/dist/assets/analytics.lazy-C0rw3sov.js +1 -0
  7. package/app/dist/assets/{createLucideIcon-luywpIq4.js → createLucideIcon-B3bah5lk.js} +1 -1
  8. package/app/dist/assets/hooks-CNPue7d7.js +1 -0
  9. package/app/dist/assets/index-B8XCmr0-.css +1 -0
  10. package/app/dist/assets/index-Dfn02uW3.js +47 -0
  11. package/app/dist/assets/index.lazy-JdqhBwPd.js +44 -0
  12. package/app/dist/assets/services-CHpVij2M.css +1 -0
  13. package/app/dist/assets/services.lazy-BShKUCOt.js +12 -0
  14. package/app/dist/assets/vendor-X6HTElZW.js +9 -0
  15. package/app/dist/assets/viz-Dsh_q2DK.js +4 -0
  16. package/app/dist/index.html +5 -4
  17. package/app/dist/service-worker.js +32 -1
  18. package/dist/agent/run-local.js +89 -76
  19. package/dist/{agent-DFSFG6DG.js → agent-DJ4SCNBZ.js} +22 -17
  20. package/dist/{analytics-broadcaster-O4AE3RUK.js → analytics-broadcaster-INNYWHDJ.js} +25 -20
  21. package/dist/approve-plan.command-WE2CO3H2.js +21 -0
  22. package/dist/{chunk-HOIOVUHI.js → chunk-5M7PBFMZ.js} +8 -6
  23. package/dist/chunk-7R7XFXJM.js +1247 -0
  24. package/dist/{chunk-2PRRKBG6.js → chunk-A4P2MYJF.js} +22 -9
  25. package/dist/chunk-AFOV3ZAF.js +722 -0
  26. package/dist/chunk-AFP36N23.js +134 -0
  27. package/dist/{chunk-AAZKYWOY.js → chunk-AFYKGVSP.js} +103 -8
  28. package/dist/chunk-APJOZXRP.js +737 -0
  29. package/dist/chunk-DLSPRIQL.js +241 -0
  30. package/dist/{chunk-5AMWD66T.js → chunk-EDIPHR5B.js} +6 -4
  31. package/dist/{chunk-K36BWMUV.js → chunk-JU3MF3MW.js} +2526 -736
  32. package/dist/{chunk-7TXZYZR5.js → chunk-N5HCNY4O.js} +7 -5
  33. package/dist/{chunk-JRLWLZOD.js → chunk-NKMZYPIS.js} +31 -23
  34. package/dist/{chunk-PI7Y77R3.js → chunk-OFIVTM2E.js} +17 -7
  35. package/dist/{chunk-QH6VCTET.js → chunk-RCSJFMQG.js} +909 -98
  36. package/dist/{chunk-AAVROEQC.js → chunk-UR7T7IA6.js} +253 -349
  37. package/dist/{chunk-QHISYRXJ.js → chunk-VOYLU3MI.js} +57 -3
  38. package/dist/{chunk-EBCSQFPR.js → chunk-W5IULOWV.js} +2 -3
  39. package/dist/chunk-X37RNTWU.js +193 -0
  40. package/dist/{chunk-PACI3T4I.js → chunk-XY2APMDE.js} +13 -5
  41. package/dist/chunk-Z6ZWNWWR.js +34 -0
  42. package/dist/cli.js +45 -17
  43. package/dist/constants-AAP7ZGCX.js +124 -0
  44. package/dist/create-issue.command-SX3AXXIC.js +29 -0
  45. package/dist/fsm-agent-JGV22WK4.js +59 -0
  46. package/dist/{fsm-issue-EHTSKMFN.js → fsm-issue-LHIJM5VB.js} +12 -8
  47. package/dist/{fsm-service-7O4AJG2R.js → fsm-service-GGDKUTWS.js} +13 -4
  48. package/dist/{helpers-ON2S7UEF.js → helpers-AENVYEZJ.js} +6 -2
  49. package/dist/{issue-log-broadcaster-FZGVEEIX.js → issue-log-broadcaster-QQWM7LOV.js} +29 -18
  50. package/dist/{issues-3YNNTB4U.js → issues-RXFKKSXB.js} +10 -7
  51. package/dist/{log-analyzer-EIX6R6PP.js → log-analyzer-4LNXQISY.js} +30 -20
  52. package/dist/{logger-IFLXTQPS.js → logger-4F6ATWNA.js} +2 -1
  53. package/dist/mcp/server.js +6 -2
  54. package/dist/merge-workspace.command-ZNGIZC4O.js +29 -0
  55. package/dist/{parallel-executor-DWESCNX3.js → parallel-executor-OL5CB33L.js} +78 -19
  56. package/dist/{pid-manager-UBWXVSMD.js → pid-manager-EDT4DHAU.js} +2 -1
  57. package/dist/queue-workers-NSKIIMQ2.js +43 -0
  58. package/dist/replan-issue.command-73PETERX.js +21 -0
  59. package/dist/retry-issue.command-DIDP4OCS.js +21 -0
  60. package/dist/reverse-proxy-server-QSS3H4UH.js +97 -0
  61. package/dist/scheduler-5YORYECF.js +37 -0
  62. package/dist/service-log-broadcaster-JIUP2L3D.js +21 -0
  63. package/dist/{settings-SOTIS6ZD.js → settings-ZNDXYL46.js} +34 -23
  64. package/dist/settings.resource-OKUHXICJ.js +35 -0
  65. package/dist/{store-S3NAYZ3S.js → store-P3ACO6YA.js} +22 -17
  66. package/dist/telemetry-KVUFHDQS.js +828 -0
  67. package/dist/template-variants-HEPLYKMP.js +24 -0
  68. package/dist/trace-bundle-IJOV7IWH.js +41 -0
  69. package/dist/{web-push-QCTLS7EJ.js → web-push-X2LLMQ4M.js} +2 -1
  70. package/dist/websocket-Q2TUCIC2.js +103 -0
  71. package/dist/{workspace-OS7GPMCN.js → workspace-TDX3NJCX.js} +10 -6
  72. package/package.json +12 -9
  73. package/app/dist/assets/CommandPalette-CL8p78lG.js +0 -1
  74. package/app/dist/assets/OnboardingWizard-BmI50ZUv.js +0 -1
  75. package/app/dist/assets/analytics.lazy-CXGjZabc.js +0 -1
  76. package/app/dist/assets/index-CEaccpYh.js +0 -96
  77. package/app/dist/assets/index-CzzWGzux.css +0 -1
  78. package/app/dist/assets/vendor-uqBx3VSC.js +0 -9
  79. package/dist/approve-plan.command-QGQZZXTQ.js +0 -17
  80. package/dist/chunk-N4KFNX2G.js +0 -370
  81. package/dist/chunk-VM5QAYP5.js +0 -404
  82. package/dist/create-issue.command-VAKYRECC.js +0 -24
  83. package/dist/merge-workspace.command-T2NIGR4M.js +0 -24
  84. package/dist/queue-workers-V57BYXAY.js +0 -38
  85. package/dist/replan-issue.command-2GQ3QXCR.js +0 -17
  86. package/dist/retry-issue.command-GJBUUYDJ.js +0 -17
  87. package/dist/scheduler-KYILMWLD.js +0 -32
  88. package/dist/settings.resource-JMD3JQOS.js +0 -30
  89. package/dist/websocket-T2Y3BY4B.js +0 -61
@@ -20,12 +20,13 @@
20
20
  <link rel="icon" href="/icon-32.png" sizes="32x32" type="image/png" />
21
21
  <link rel="icon" href="/icon-16.png" sizes="16x16" type="image/png" />
22
22
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
23
- <script type="module" crossorigin src="/assets/index-CEaccpYh.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-Dfn02uW3.js"></script>
24
24
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dw2cE7zH.js">
25
25
  <link rel="modulepreload" crossorigin href="/assets/api-CEr_D4e5.js">
26
- <link rel="modulepreload" crossorigin href="/assets/vendor-uqBx3VSC.js">
27
- <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-luywpIq4.js">
28
- <link rel="stylesheet" crossorigin href="/assets/index-CzzWGzux.css">
26
+ <link rel="modulepreload" crossorigin href="/assets/vendor-X6HTElZW.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/hooks-CNPue7d7.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-B3bah5lk.js">
29
+ <link rel="stylesheet" crossorigin href="/assets/index-B8XCmr0-.css">
29
30
  </head>
30
31
  <body>
31
32
  <div id="root"></div>
@@ -1,6 +1,7 @@
1
- const CACHE_VERSION = "1774899686368";
1
+ const CACHE_VERSION = "1775569834695";
2
2
  const CORE_CACHE = `fifony-core-${CACHE_VERSION}`;
3
3
  const ASSET_CACHE = `fifony-assets-${CACHE_VERSION}`;
4
+ const FIFONY_NOTIFICATION_MESSAGE_TYPE = "FIFONY_NOTIFICATION";
4
5
  const APP_SHELL_ROUTES = [
5
6
  "/onboarding",
6
7
  "/kanban",
@@ -25,6 +26,15 @@ const APP_SHELL_ROUTES = [
25
26
  const APP_SHELL_FILES = ["/offline.html", "/manifest.webmanifest", "/favicon.png", "/icon-192.png", "/icon-512.png"];
26
27
  const API_PREFIXES = ["/api/", "/docs", "/ws"];
27
28
 
29
+ function normalizeNotificationTag(tag) {
30
+ if (typeof tag !== "string" || !tag.trim()) return "fifony";
31
+ return tag.startsWith("fifony-") ? tag : `fifony-${tag}`;
32
+ }
33
+
34
+ function toSafeUrl(value) {
35
+ return typeof value === "string" && value.trim() ? value : "/kanban";
36
+ }
37
+
28
38
  self.addEventListener("install", (event) => {
29
39
  event.waitUntil((async () => {
30
40
  const cache = await caches.open(CORE_CACHE);
@@ -60,8 +70,29 @@ self.addEventListener("activate", (event) => {
60
70
  });
61
71
 
62
72
  self.addEventListener("message", (event) => {
73
+ if (event.data?.type === FIFONY_NOTIFICATION_MESSAGE_TYPE) {
74
+ const payload = event.data.payload || {};
75
+ const title = typeof payload.title === "string" && payload.title.trim() ? payload.title : "fifony";
76
+ const body = typeof payload.body === "string" ? payload.body : "";
77
+ const notificationData = {
78
+ ...(payload.data && typeof payload.data === "object" ? payload.data : {}),
79
+ url: toSafeUrl(payload.data?.url),
80
+ };
81
+ const options = {
82
+ body,
83
+ tag: normalizeNotificationTag(payload.tag),
84
+ icon: typeof payload.icon === "string" ? payload.icon : "/icon.svg",
85
+ badge: typeof payload.badge === "string" ? payload.badge : "/favicon.png",
86
+ silent: false,
87
+ data: notificationData,
88
+ };
89
+ event.waitUntil(self.registration.showNotification(title, options));
90
+ return;
91
+ }
92
+
63
93
  if (event.data?.type === "SKIP_WAITING") {
64
94
  self.skipWaiting();
95
+ return;
65
96
  }
66
97
 
67
98
  if (event.data?.type === "GET_OFFLINE_STATUS") {
@@ -7,13 +7,14 @@ import {
7
7
  hasTerminalQueue,
8
8
  initQueueWorkers,
9
9
  initStateStore,
10
+ initVaulterClient,
10
11
  installGracefulShutdown,
11
12
  listServiceStatuses,
13
+ loadAllFromVaulter,
12
14
  loadLegacyPersistedServices,
13
15
  loadPersistedMilestones,
14
16
  loadPersistedServices,
15
17
  loadPersistedState,
16
- loadPersistedVariables,
17
18
  loadRuntimeSettings,
18
19
  persistDetectedProvidersSetting,
19
20
  persistSetting,
@@ -27,36 +28,23 @@ import {
27
28
  replaceAllServices,
28
29
  startApiServer,
29
30
  startAutoConfiguredServices,
30
- startManagedAgentWatcher,
31
31
  stopQueueWorkers,
32
32
  syncRuntimeConfigSettings,
33
- upsertPersistedVariable
34
- } from "../chunk-K36BWMUV.js";
35
- import "../chunk-PACI3T4I.js";
36
- import "../chunk-HOIOVUHI.js";
33
+ upsertVariableInVaulter
34
+ } from "../chunk-JU3MF3MW.js";
35
+ import "../chunk-XY2APMDE.js";
36
+ import "../chunk-5M7PBFMZ.js";
37
37
  import {
38
38
  initWebPush
39
39
  } from "../chunk-FH7HUPZX.js";
40
- import {
41
- broadcastToWebSocketClients,
42
- sendToMeshRoom,
43
- startServiceLogBroadcasting,
44
- stopServiceLogBroadcasting
45
- } from "../chunk-N4KFNX2G.js";
46
- import {
47
- setServiceRuntime,
48
- setServicesAccessor,
49
- startTrafficProxy,
50
- stopTrafficProxy
51
- } from "../chunk-AAVROEQC.js";
52
- import "../chunk-5AMWD66T.js";
53
- import "../chunk-7TXZYZR5.js";
54
- import "../chunk-JRLWLZOD.js";
40
+ import "../chunk-EDIPHR5B.js";
41
+ import "../chunk-N5HCNY4O.js";
42
+ import "../chunk-NKMZYPIS.js";
55
43
  import {
56
44
  detectDefaultBranch,
57
45
  getGitRepoStatus,
58
46
  setSkipSource
59
- } from "../chunk-QH6VCTET.js";
47
+ } from "../chunk-RCSJFMQG.js";
60
48
  import {
61
49
  addEvent,
62
50
  applyWorkflowConfig,
@@ -67,38 +55,60 @@ import {
67
55
  hydrate,
68
56
  resolveProjectMetadata,
69
57
  validateConfig
70
- } from "../chunk-2PRRKBG6.js";
58
+ } from "../chunk-A4P2MYJF.js";
71
59
  import {
72
60
  detectAvailableProviders,
73
61
  getProviderDefaultCommand,
74
62
  resolveDefaultProvider
75
- } from "../chunk-PI7Y77R3.js";
63
+ } from "../chunk-OFIVTM2E.js";
64
+ import "../chunk-AFP36N23.js";
65
+ import {
66
+ broadcastToWebSocketClients,
67
+ startServiceLogBroadcasting
68
+ } from "../chunk-AFOV3ZAF.js";
76
69
  import {
77
70
  computeMetrics
78
- } from "../chunk-QHISYRXJ.js";
79
- import "../chunk-EBCSQFPR.js";
80
- import "../chunk-AAZKYWOY.js";
71
+ } from "../chunk-VOYLU3MI.js";
72
+ import "../chunk-W5IULOWV.js";
73
+ import "../chunk-APJOZXRP.js";
74
+ import {
75
+ setServiceRuntime
76
+ } from "../chunk-UR7T7IA6.js";
77
+ import {
78
+ applyNetworkRuntimeConfig,
79
+ getMeshRuntimeSnapshotStatus,
80
+ getReverseProxyRuntimeSnapshotStatus
81
+ } from "../chunk-7R7XFXJM.js";
82
+ import "../chunk-3NE23NYW.js";
83
+ import "../chunk-AFYKGVSP.js";
81
84
  import {
82
- CLI_ARGS,
83
- PACKAGE_ROOT,
84
- STATE_ROOT,
85
- TARGET_ROOT,
86
85
  debugBoot,
87
86
  fail,
87
+ init_helpers,
88
88
  now,
89
89
  parseIntArg
90
- } from "../chunk-VM5QAYP5.js";
90
+ } from "../chunk-DLSPRIQL.js";
91
+ import {
92
+ CLI_ARGS,
93
+ PACKAGE_ROOT,
94
+ STATE_ROOT,
95
+ TARGET_ROOT,
96
+ init_constants
97
+ } from "../chunk-X37RNTWU.js";
91
98
  import {
92
99
  initLogger,
93
100
  logger
94
101
  } from "../chunk-PXTIWKLQ.js";
95
- import "../chunk-3NE23NYW.js";
102
+ import "../chunk-Z6ZWNWWR.js";
96
103
 
97
104
  // src/boot.ts
105
+ init_constants();
106
+ init_helpers();
98
107
  import { mkdirSync, readFileSync } from "fs";
99
108
  import { env, exit, argv } from "process";
100
109
 
101
110
  // src/persistence/plugins/dev-frontend.ts
111
+ init_constants();
102
112
  import { resolve } from "path";
103
113
  async function startDevFrontend(apiPort, devPort, options) {
104
114
  const VITE_CONFIG_PATH = resolve(PACKAGE_ROOT, "app/vite.config.js");
@@ -215,7 +225,6 @@ Options:
215
225
  );
216
226
  }
217
227
  async function main() {
218
- let agentWatcher = null;
219
228
  debugBoot("main:start");
220
229
  const args = CLI_ARGS;
221
230
  if (args.includes("--help") || args.includes("-h")) {
@@ -257,6 +266,9 @@ async function main() {
257
266
  await initStateStore();
258
267
  logger.info("[Boot] State store initialized");
259
268
  debugBoot("main:store-initialized");
269
+ await initVaulterClient();
270
+ logger.debug("[Boot] Vaulter client initialized");
271
+ debugBoot("main:vaulter-initialized");
260
272
  const earlyState = {
261
273
  projectName: detectedProjectName,
262
274
  detectedProjectName,
@@ -305,7 +317,7 @@ async function main() {
305
317
  loadPersistedServices(),
306
318
  loadLegacyPersistedServices(),
307
319
  loadPersistedMilestones(),
308
- loadPersistedVariables(),
320
+ loadAllFromVaulter(),
309
321
  persistDetectedProvidersSetting(detectedProviders),
310
322
  recoverPlanningSession()
311
323
  ]);
@@ -314,6 +326,10 @@ async function main() {
314
326
  const runtimeLegacyServices = extractLegacyServicesFromRuntimeState(previous);
315
327
  const migratedServices = persistedServices.length > 0 ? persistedServices : legacyPersistedServices.length > 0 ? legacyPersistedServices : runtimeLegacyServices;
316
328
  config = applyPersistedSettings(config, persistedSettings);
329
+ if (config.templateVariants) {
330
+ const { loadVariantsFromSettings } = await import("../template-variants-HEPLYKMP.js");
331
+ loadVariantsFromSettings(config.templateVariants);
332
+ }
317
333
  if (migratedServices.length > 0) {
318
334
  config = { ...config, services: migratedServices };
319
335
  if (persistedServices.length === 0) {
@@ -336,7 +352,7 @@ async function main() {
336
352
  }
337
353
  }
338
354
  if (migrated.length > 0) {
339
- await Promise.all(migrated.map((v) => upsertPersistedVariable(v)));
355
+ await Promise.all(migrated.map((v) => upsertVariableInVaulter(v)));
340
356
  state.variables = migrated;
341
357
  logger.info({ count: migrated.length }, "[Boot] Migrated legacy env vars to variables resource");
342
358
  }
@@ -388,15 +404,21 @@ async function main() {
388
404
  } catch (err) {
389
405
  logger.warn({ err }, "[Boot] Agent state reconciliation failed \u2014 continuing");
390
406
  }
407
+ const getGlobalEnvFromVars = () => Object.fromEntries(
408
+ (apiState.variables ?? []).filter((v) => v.scope === "global").map((v) => [v.key, v.value])
409
+ );
410
+ const getServiceEnvFromVars = (serviceId) => Object.fromEntries(
411
+ (apiState.variables ?? []).filter((v) => v.scope === serviceId).map((v) => [v.key, v.value])
412
+ );
391
413
  try {
392
414
  const services = state.config.services ?? [];
393
415
  setServiceRuntime({
394
416
  fifonyDir: STATE_ROOT,
395
417
  targetRoot: TARGET_ROOT,
396
418
  getEntries: () => apiState.config.services ?? [],
397
- getGlobalEnv: () => apiState.config.serviceEnv ?? {},
419
+ getGlobalEnv: getGlobalEnvFromVars,
420
+ getServiceEnv: getServiceEnvFromVars,
398
421
  onTransition: (t) => {
399
- logger.info({ id: t.id, from: t.from, to: t.to, reason: t.reason }, "[Service] FSM transition");
400
422
  broadcastToWebSocketClients({
401
423
  type: "service",
402
424
  id: t.id,
@@ -404,8 +426,6 @@ async function main() {
404
426
  running: t.to === "starting" || t.to === "running",
405
427
  pid: t.pid ?? null
406
428
  });
407
- if (t.to === "starting") startServiceLogBroadcasting(t.id, STATE_ROOT);
408
- else if (t.to === "stopped" || t.to === "crashed") stopServiceLogBroadcasting(t.id);
409
429
  }
410
430
  });
411
431
  reconcileManagedServiceStates(services, STATE_ROOT);
@@ -416,6 +436,35 @@ async function main() {
416
436
  for (const status of listServiceStatuses(services, STATE_ROOT)) {
417
437
  if (status.running) startServiceLogBroadcasting(status.id, STATE_ROOT);
418
438
  }
439
+ if (apiState.config.reverseProxyEnabled || apiState.config.meshEnabled) {
440
+ await applyNetworkRuntimeConfig({
441
+ dashPort: Number(apiState.config.dashboardPort ?? 4e3),
442
+ services: apiState.config.services ?? [],
443
+ routes: apiState.config.proxyRoutes ?? [],
444
+ localDomain: apiState.config.localDomain,
445
+ reverseProxyEnabled: apiState.config.reverseProxyEnabled ?? false,
446
+ port: apiState.config.reverseProxyPort ?? 4433,
447
+ meshEnabled: apiState.config.meshEnabled ?? false,
448
+ meshPort: apiState.config.meshProxyPort ?? 0,
449
+ meshBufferSize: apiState.config.meshBufferSize ?? 1e3,
450
+ meshLiveWindowSeconds: apiState.config.meshLiveWindowSeconds ?? 900
451
+ });
452
+ }
453
+ const reverseProxyRuntime = getReverseProxyRuntimeSnapshotStatus({
454
+ enabled: apiState.config.reverseProxyEnabled ?? false,
455
+ localDomain: apiState.config.localDomain,
456
+ configuredPort: apiState.config.reverseProxyPort ?? 4433
457
+ });
458
+ if (reverseProxyRuntime.running) {
459
+ startServiceLogBroadcasting(reverseProxyRuntime.id, STATE_ROOT);
460
+ }
461
+ const meshRuntime = getMeshRuntimeSnapshotStatus({
462
+ enabled: apiState.config.meshEnabled ?? false,
463
+ configuredPort: apiState.config.meshProxyPort ?? 0
464
+ });
465
+ if (meshRuntime.running) {
466
+ logger.info({ port: meshRuntime.port }, "[Boot] Mesh runtime already active");
467
+ }
419
468
  } catch (err) {
420
469
  logger.warn({ err }, "[Boot] Service init failed \u2014 continuing");
421
470
  }
@@ -432,41 +481,9 @@ async function main() {
432
481
  } catch (error) {
433
482
  logger.warn({ err: error }, "[Boot] Queue workers failed to initialize \u2014 continuing without queue-based dispatch");
434
483
  }
435
- if (apiState.config.meshEnabled) {
436
- try {
437
- setServicesAccessor(() => listServiceStatuses(apiState.config.services ?? [], STATE_ROOT));
438
- await startTrafficProxy({
439
- port: apiState.config.meshProxyPort ?? 0,
440
- bufferSize: apiState.config.meshBufferSize ?? 1e3,
441
- onEntry: (entry) => sendToMeshRoom({ type: "mesh:entry", entry })
442
- });
443
- } catch (err) {
444
- logger.warn({ err }, "[Boot] Mesh traffic proxy failed to start \u2014 continuing without mesh");
445
- }
446
- }
447
- agentWatcher = startManagedAgentWatcher(
448
- () => apiState.issues,
449
- STATE_ROOT,
450
- (t) => {
451
- logger.info({ issueId: t.issueId, identifier: t.identifier, from: t.from, to: t.to, reason: t.reason }, "[AgentFSM] Transition");
452
- broadcastToWebSocketClients({
453
- type: "agent-fsm",
454
- issueId: t.issueId,
455
- identifier: t.identifier,
456
- operation: t.operation,
457
- state: t.to,
458
- running: t.to === "running" || t.to === "preparing",
459
- pid: t.pid ?? null
460
- });
461
- }
462
- );
463
484
  process.once("SIGINT", () => {
464
- stopTrafficProxy().catch(() => {
465
- });
466
485
  });
467
486
  process.once("SIGTERM", () => {
468
- stopTrafficProxy().catch(() => {
469
- });
470
487
  });
471
488
  installGracefulShutdown(state);
472
489
  try {
@@ -511,10 +528,6 @@ async function main() {
511
528
  state.updatedAt = now();
512
529
  state.metrics = computeMetrics(state.issues);
513
530
  await persistStateFull(state);
514
- try {
515
- agentWatcher?.stop();
516
- } catch {
517
- }
518
531
  try {
519
532
  await stopQueueWorkers();
520
533
  } catch {
@@ -13,15 +13,13 @@ import {
13
13
  runManagedReviewJob,
14
14
  runPlanningJob,
15
15
  tryParseJsonOutput
16
- } from "./chunk-K36BWMUV.js";
17
- import "./chunk-PACI3T4I.js";
18
- import "./chunk-HOIOVUHI.js";
16
+ } from "./chunk-JU3MF3MW.js";
17
+ import "./chunk-XY2APMDE.js";
18
+ import "./chunk-5M7PBFMZ.js";
19
19
  import "./chunk-FH7HUPZX.js";
20
- import "./chunk-N4KFNX2G.js";
21
- import "./chunk-AAVROEQC.js";
22
- import "./chunk-5AMWD66T.js";
23
- import "./chunk-7TXZYZR5.js";
24
- import "./chunk-JRLWLZOD.js";
20
+ import "./chunk-EDIPHR5B.js";
21
+ import "./chunk-N5HCNY4O.js";
22
+ import "./chunk-NKMZYPIS.js";
25
23
  import {
26
24
  attachToDaemon,
27
25
  buildPrompt,
@@ -40,14 +38,16 @@ import {
40
38
  runHook,
41
39
  shouldSkipMergePath,
42
40
  writeToDaemon
43
- } from "./chunk-QH6VCTET.js";
44
- import "./chunk-2PRRKBG6.js";
45
- import "./chunk-PI7Y77R3.js";
46
- import "./chunk-QHISYRXJ.js";
47
- import "./chunk-EBCSQFPR.js";
48
- import "./chunk-AAZKYWOY.js";
49
- import "./chunk-VM5QAYP5.js";
50
- import "./chunk-PXTIWKLQ.js";
41
+ } from "./chunk-RCSJFMQG.js";
42
+ import "./chunk-A4P2MYJF.js";
43
+ import "./chunk-OFIVTM2E.js";
44
+ import "./chunk-AFP36N23.js";
45
+ import "./chunk-AFOV3ZAF.js";
46
+ import "./chunk-VOYLU3MI.js";
47
+ import "./chunk-W5IULOWV.js";
48
+ import "./chunk-APJOZXRP.js";
49
+ import "./chunk-UR7T7IA6.js";
50
+ import "./chunk-7R7XFXJM.js";
51
51
  import {
52
52
  cleanStalePidFile,
53
53
  isAgentStillRunning,
@@ -58,6 +58,11 @@ import {
58
58
  readDaemonExit,
59
59
  readDaemonPid
60
60
  } from "./chunk-3NE23NYW.js";
61
+ import "./chunk-AFYKGVSP.js";
62
+ import "./chunk-DLSPRIQL.js";
63
+ import "./chunk-X37RNTWU.js";
64
+ import "./chunk-PXTIWKLQ.js";
65
+ import "./chunk-Z6ZWNWWR.js";
61
66
  export {
62
67
  addTokenUsage,
63
68
  attachToDaemon,
@@ -99,4 +104,4 @@ export {
99
104
  tryParseJsonOutput,
100
105
  writeToDaemon
101
106
  };
102
- //# sourceMappingURL=agent-DFSFG6DG.js.map
107
+ //# sourceMappingURL=agent-DJ4SCNBZ.js.map
@@ -1,36 +1,41 @@
1
1
  import {
2
2
  getEcDailyEvents,
3
3
  getEcDailyLines
4
- } from "./chunk-K36BWMUV.js";
5
- import "./chunk-PACI3T4I.js";
6
- import "./chunk-HOIOVUHI.js";
4
+ } from "./chunk-JU3MF3MW.js";
5
+ import "./chunk-XY2APMDE.js";
6
+ import "./chunk-5M7PBFMZ.js";
7
7
  import "./chunk-FH7HUPZX.js";
8
+ import "./chunk-EDIPHR5B.js";
9
+ import "./chunk-N5HCNY4O.js";
10
+ import "./chunk-NKMZYPIS.js";
11
+ import "./chunk-RCSJFMQG.js";
12
+ import {
13
+ getAnalytics,
14
+ getHourlySnapshot
15
+ } from "./chunk-A4P2MYJF.js";
16
+ import "./chunk-OFIVTM2E.js";
17
+ import "./chunk-AFP36N23.js";
8
18
  import {
9
19
  analyticsRoomHasSubscribers,
10
20
  sendToAnalyticsRoom,
11
21
  setAnalyticsOnSubscribeFn,
12
22
  wsClients
13
- } from "./chunk-N4KFNX2G.js";
14
- import "./chunk-AAVROEQC.js";
15
- import "./chunk-5AMWD66T.js";
16
- import "./chunk-7TXZYZR5.js";
17
- import "./chunk-JRLWLZOD.js";
18
- import "./chunk-QH6VCTET.js";
19
- import {
20
- getAnalytics,
21
- getHourlySnapshot
22
- } from "./chunk-2PRRKBG6.js";
23
- import "./chunk-PI7Y77R3.js";
23
+ } from "./chunk-AFOV3ZAF.js";
24
24
  import {
25
25
  computeQualityGateMetrics
26
- } from "./chunk-QHISYRXJ.js";
27
- import "./chunk-EBCSQFPR.js";
28
- import "./chunk-AAZKYWOY.js";
29
- import "./chunk-VM5QAYP5.js";
26
+ } from "./chunk-VOYLU3MI.js";
27
+ import "./chunk-W5IULOWV.js";
28
+ import "./chunk-APJOZXRP.js";
29
+ import "./chunk-UR7T7IA6.js";
30
+ import "./chunk-7R7XFXJM.js";
31
+ import "./chunk-3NE23NYW.js";
32
+ import "./chunk-AFYKGVSP.js";
33
+ import "./chunk-DLSPRIQL.js";
34
+ import "./chunk-X37RNTWU.js";
30
35
  import {
31
36
  logger
32
37
  } from "./chunk-PXTIWKLQ.js";
33
- import "./chunk-3NE23NYW.js";
38
+ import "./chunk-Z6ZWNWWR.js";
34
39
 
35
40
  // src/persistence/plugins/analytics-broadcaster.ts
36
41
  async function computeTokensPayload() {
@@ -149,4 +154,4 @@ export {
149
154
  pushLinesAnalytics,
150
155
  pushTokenAnalytics
151
156
  };
152
- //# sourceMappingURL=analytics-broadcaster-O4AE3RUK.js.map
157
+ //# sourceMappingURL=analytics-broadcaster-INNYWHDJ.js.map
@@ -0,0 +1,21 @@
1
+ import {
2
+ approvePlanCommand
3
+ } from "./chunk-5M7PBFMZ.js";
4
+ import "./chunk-N5HCNY4O.js";
5
+ import "./chunk-NKMZYPIS.js";
6
+ import "./chunk-RCSJFMQG.js";
7
+ import "./chunk-A4P2MYJF.js";
8
+ import "./chunk-OFIVTM2E.js";
9
+ import "./chunk-AFP36N23.js";
10
+ import "./chunk-VOYLU3MI.js";
11
+ import "./chunk-W5IULOWV.js";
12
+ import "./chunk-APJOZXRP.js";
13
+ import "./chunk-AFYKGVSP.js";
14
+ import "./chunk-DLSPRIQL.js";
15
+ import "./chunk-X37RNTWU.js";
16
+ import "./chunk-PXTIWKLQ.js";
17
+ import "./chunk-Z6ZWNWWR.js";
18
+ export {
19
+ approvePlanCommand
20
+ };
21
+ //# sourceMappingURL=approve-plan.command-WE2CO3H2.js.map
@@ -1,17 +1,19 @@
1
1
  import {
2
2
  transitionIssueCommand
3
- } from "./chunk-7TXZYZR5.js";
3
+ } from "./chunk-N5HCNY4O.js";
4
4
  import {
5
5
  assertPlanReadyForExecution
6
- } from "./chunk-JRLWLZOD.js";
6
+ } from "./chunk-NKMZYPIS.js";
7
7
  import {
8
8
  ensureGitRepoReadyForWorktrees
9
- } from "./chunk-QH6VCTET.js";
9
+ } from "./chunk-RCSJFMQG.js";
10
10
  import {
11
- TARGET_ROOT
12
- } from "./chunk-VM5QAYP5.js";
11
+ TARGET_ROOT,
12
+ init_constants
13
+ } from "./chunk-X37RNTWU.js";
13
14
 
14
15
  // src/commands/approve-plan.command.ts
16
+ init_constants();
15
17
  async function approvePlanCommand(input, deps) {
16
18
  const { issue } = input;
17
19
  if (issue.state !== "Planning") {
@@ -32,4 +34,4 @@ async function approvePlanCommand(input, deps) {
32
34
  export {
33
35
  approvePlanCommand
34
36
  };
35
- //# sourceMappingURL=chunk-HOIOVUHI.js.map
37
+ //# sourceMappingURL=chunk-5M7PBFMZ.js.map