@shepai/cli 1.111.0 → 1.112.0-pr346.5ff956f

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 (143) hide show
  1. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
  2. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +1 -0
  3. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
  4. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +1 -0
  5. package/dist/packages/core/src/infrastructure/persistence/sqlite/legacy-migrations.d.ts +27 -0
  6. package/dist/packages/core/src/infrastructure/persistence/sqlite/legacy-migrations.d.ts.map +1 -0
  7. package/dist/packages/core/src/infrastructure/persistence/sqlite/legacy-migrations.js +540 -0
  8. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts +13 -7
  9. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +94 -545
  11. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.d.ts +59 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.d.ts.map +1 -0
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.js +98 -0
  14. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +5 -0
  16. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +1 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.js +42 -2
  20. package/dist/tsconfig.build.tsbuildinfo +1 -1
  21. package/package.json +2 -2
  22. package/web/.next/BUILD_ID +1 -1
  23. package/web/.next/build-manifest.json +2 -2
  24. package/web/.next/fallback-build-manifest.json +2 -2
  25. package/web/.next/prerender-manifest.json +3 -3
  26. package/web/.next/required-server-files.js +3 -3
  27. package/web/.next/required-server-files.json +3 -3
  28. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
  29. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  32. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +26 -26
  35. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  38. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
  41. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  44. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +26 -26
  47. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
  50. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  53. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/_global-error.html +2 -2
  56. package/web/.next/server/app/_global-error.rsc +1 -1
  57. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  58. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  59. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  60. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  61. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  62. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  63. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  65. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  66. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  68. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  70. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  72. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  74. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  75. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  76. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js +1 -1
  77. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js +1 -1
  79. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js.map +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js.map +1 -1
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  84. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  85. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  86. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js +1 -1
  87. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  89. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js +1 -1
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js +1 -1
  95. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/{_ba9c581b._.js → _09d4fb32._.js} +2 -2
  101. package/web/.next/server/chunks/ssr/{_ba9c581b._.js.map → _09d4fb32._.js.map} +1 -1
  102. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  103. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/{_2649c1af._.js → _22bc0323._.js} +2 -2
  105. package/web/.next/server/chunks/ssr/{_2649c1af._.js.map → _22bc0323._.js.map} +1 -1
  106. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  107. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/{_4474f9f3._.js → _a4557a13._.js} +2 -2
  109. package/web/.next/server/chunks/ssr/{_4474f9f3._.js.map → _a4557a13._.js.map} +1 -1
  110. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  111. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  113. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js +1 -1
  115. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  117. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  119. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js +2 -2
  121. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  123. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  124. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  125. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js +2 -2
  127. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js.map +1 -1
  128. package/web/.next/server/pages/500.html +2 -2
  129. package/web/.next/server/server-reference-manifest.js +1 -1
  130. package/web/.next/server/server-reference-manifest.json +31 -31
  131. package/web/.next/static/chunks/{cbfa943160cc5f90.js → 1840b1a34127ea89.js} +1 -1
  132. package/web/.next/static/chunks/{4e2530a36f28dec7.js → 1a026082dc73cec8.js} +1 -1
  133. package/web/.next/static/chunks/{185203c3444a4da7.js → 1fe3a578584e4538.js} +2 -2
  134. package/web/.next/static/chunks/{6d2a5b3e881c75a8.js → 3b9e0c267c5a77ca.js} +1 -1
  135. package/web/.next/static/chunks/{b27c0bbd1de96d37.js → 69dfa9542ae36ebb.js} +1 -1
  136. package/web/.next/static/chunks/{dd15e70af64f5dd0.js → 796367e064593de5.js} +1 -1
  137. package/web/.next/static/chunks/{464557a2dc1fe286.js → 90f9341aecef9b35.js} +1 -1
  138. package/web/.next/static/chunks/{5f52d11e6182396e.js → c4dca3d63fdd7c34.js} +1 -1
  139. package/web/.next/static/chunks/{279db4719a31b985.js → d6d633b3c74f8146.js} +1 -1
  140. package/web/.next/static/chunks/{487babfd13611736.js → e70934a28d1384c7.js} +1 -1
  141. /package/web/.next/static/{4LIlcvj7VQahrcSQtqQlm → F8smp8_OtqQkdbNyMdZHl}/_buildManifest.js +0 -0
  142. /package/web/.next/static/{4LIlcvj7VQahrcSQtqQlm → F8smp8_OtqQkdbNyMdZHl}/_clientMiddlewareManifest.json +0 -0
  143. /package/web/.next/static/{4LIlcvj7VQahrcSQtqQlm → F8smp8_OtqQkdbNyMdZHl}/_ssgManifest.js +0 -0
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Custom umzug storage adapter for better-sqlite3.
3
+ *
4
+ * Wraps better-sqlite3's synchronous API in async methods to satisfy
5
+ * umzug's UmzugStorage interface. Manages the `umzug_migrations` tracking
6
+ * table with columns: name (TEXT PK) and created_at (TEXT NOT NULL).
7
+ *
8
+ * Includes a bootstrap seeder that auto-detects existing databases
9
+ * (PRAGMA user_version > 0 with empty umzug_migrations table) and seeds
10
+ * migration records for versions 1 through user_version.
11
+ */
12
+ import type Database from 'better-sqlite3';
13
+ import type { UmzugStorage, MigrationParams } from 'umzug';
14
+ /**
15
+ * SQLite-backed migration storage for umzug.
16
+ *
17
+ * Tracks which migrations have been applied in a `umzug_migrations` table
18
+ * within the same SQLite database as the application data.
19
+ */
20
+ export declare class SQLiteMigrationStorage implements UmzugStorage<Database.Database> {
21
+ private readonly db;
22
+ /**
23
+ * @param db - The better-sqlite3 database instance.
24
+ * @param legacyMigrationNames - Ordered list of legacy migration names (e.g.,
25
+ * ['001-create-settings-table', '002-add-agent-config', ...]). When provided,
26
+ * the constructor checks if this is an existing database transitioning from
27
+ * PRAGMA user_version tracking and seeds the umzug_migrations table accordingly.
28
+ */
29
+ constructor(db: Database.Database, legacyMigrationNames?: string[]);
30
+ /**
31
+ * Returns the names of all executed migrations, sorted lexicographically.
32
+ */
33
+ executed(_meta: Pick<MigrationParams<Database.Database>, 'context'>): Promise<string[]>;
34
+ /**
35
+ * Records a migration as executed.
36
+ */
37
+ logMigration(params: MigrationParams<Database.Database>): Promise<void>;
38
+ /**
39
+ * Removes a migration record (marks it as pending).
40
+ */
41
+ unlogMigration(params: MigrationParams<Database.Database>): Promise<void>;
42
+ /**
43
+ * Creates the umzug_migrations table if it does not exist.
44
+ */
45
+ private ensureTable;
46
+ /**
47
+ * Auto-detects existing databases that used PRAGMA user_version tracking
48
+ * and seeds the umzug_migrations table so umzug does not re-apply them.
49
+ *
50
+ * Conditions for bootstrap:
51
+ * - PRAGMA user_version > 0 (database has been migrated before)
52
+ * - umzug_migrations table is empty (not yet transitioned to umzug)
53
+ *
54
+ * When both conditions are met, inserts records for migrations 1 through
55
+ * user_version using the provided legacy migration names.
56
+ */
57
+ private bootstrapLegacyMigrations;
58
+ }
59
+ //# sourceMappingURL=sqlite-migration-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-migration-storage.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC5E,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IAEvC;;;;;;OAMG;gBACS,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE;IAQlE;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO7F;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7E;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E;;OAEG;IACH,OAAO,CAAC,WAAW;IASnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,yBAAyB;CA+BlC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Custom umzug storage adapter for better-sqlite3.
3
+ *
4
+ * Wraps better-sqlite3's synchronous API in async methods to satisfy
5
+ * umzug's UmzugStorage interface. Manages the `umzug_migrations` tracking
6
+ * table with columns: name (TEXT PK) and created_at (TEXT NOT NULL).
7
+ *
8
+ * Includes a bootstrap seeder that auto-detects existing databases
9
+ * (PRAGMA user_version > 0 with empty umzug_migrations table) and seeds
10
+ * migration records for versions 1 through user_version.
11
+ */
12
+ /**
13
+ * SQLite-backed migration storage for umzug.
14
+ *
15
+ * Tracks which migrations have been applied in a `umzug_migrations` table
16
+ * within the same SQLite database as the application data.
17
+ */
18
+ export class SQLiteMigrationStorage {
19
+ db;
20
+ /**
21
+ * @param db - The better-sqlite3 database instance.
22
+ * @param legacyMigrationNames - Ordered list of legacy migration names (e.g.,
23
+ * ['001-create-settings-table', '002-add-agent-config', ...]). When provided,
24
+ * the constructor checks if this is an existing database transitioning from
25
+ * PRAGMA user_version tracking and seeds the umzug_migrations table accordingly.
26
+ */
27
+ constructor(db, legacyMigrationNames) {
28
+ this.db = db;
29
+ this.ensureTable();
30
+ if (legacyMigrationNames && legacyMigrationNames.length > 0) {
31
+ this.bootstrapLegacyMigrations(legacyMigrationNames);
32
+ }
33
+ }
34
+ /**
35
+ * Returns the names of all executed migrations, sorted lexicographically.
36
+ */
37
+ async executed(_meta) {
38
+ const rows = this.db.prepare('SELECT name FROM umzug_migrations ORDER BY name').all();
39
+ return rows.map((r) => r.name);
40
+ }
41
+ /**
42
+ * Records a migration as executed.
43
+ */
44
+ async logMigration(params) {
45
+ this.db
46
+ .prepare('INSERT INTO umzug_migrations (name, created_at) VALUES (?, ?)')
47
+ .run(params.name, new Date().toISOString());
48
+ }
49
+ /**
50
+ * Removes a migration record (marks it as pending).
51
+ */
52
+ async unlogMigration(params) {
53
+ this.db.prepare('DELETE FROM umzug_migrations WHERE name = ?').run(params.name);
54
+ }
55
+ /**
56
+ * Creates the umzug_migrations table if it does not exist.
57
+ */
58
+ ensureTable() {
59
+ this.db.exec(`
60
+ CREATE TABLE IF NOT EXISTS umzug_migrations (
61
+ name TEXT PRIMARY KEY NOT NULL,
62
+ created_at TEXT NOT NULL
63
+ )
64
+ `);
65
+ }
66
+ /**
67
+ * Auto-detects existing databases that used PRAGMA user_version tracking
68
+ * and seeds the umzug_migrations table so umzug does not re-apply them.
69
+ *
70
+ * Conditions for bootstrap:
71
+ * - PRAGMA user_version > 0 (database has been migrated before)
72
+ * - umzug_migrations table is empty (not yet transitioned to umzug)
73
+ *
74
+ * When both conditions are met, inserts records for migrations 1 through
75
+ * user_version using the provided legacy migration names.
76
+ */
77
+ bootstrapLegacyMigrations(legacyMigrationNames) {
78
+ const result = this.db.prepare('PRAGMA user_version').get();
79
+ const userVersion = result.user_version;
80
+ if (userVersion <= 0) {
81
+ return;
82
+ }
83
+ const count = this.db.prepare('SELECT COUNT(*) as count FROM umzug_migrations').get();
84
+ if (count.count > 0) {
85
+ return;
86
+ }
87
+ // Seed records for migrations 1 through user_version
88
+ const now = new Date().toISOString();
89
+ const insert = this.db.prepare('INSERT INTO umzug_migrations (name, created_at) VALUES (?, ?)');
90
+ const seedAll = this.db.transaction(() => {
91
+ const count = Math.min(userVersion, legacyMigrationNames.length);
92
+ for (let i = 0; i < count; i++) {
93
+ insert.run(legacyMigrationNames[i], now);
94
+ }
95
+ });
96
+ seedAll();
97
+ }
98
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"feature-agent-worker.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAe1B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAW9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAwE1D;AAgCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA0P/D"}
1
+ {"version":3,"file":"feature-agent-worker.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAe1B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAW9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAwE1D;AAgCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgQ/D"}
@@ -294,8 +294,13 @@ export async function runWorker(args) {
294
294
  const interruptPayload = result.__interrupt__;
295
295
  if (interruptPayload && interruptPayload.length > 0) {
296
296
  const now = new Date();
297
+ // Extract the node name from the interrupt payload so the rejection
298
+ // use case can tag feedback with the correct phase (e.g. "merge").
299
+ const interruptValue = interruptPayload[0]?.value;
300
+ const interruptNode = typeof interruptValue?.node === 'string' ? interruptValue.node : undefined;
297
301
  await runRepository.updateStatus(args.runId, AgentRunStatus.waitingApproval, {
298
302
  updatedAt: now,
303
+ ...(interruptNode ? { result: `node:${interruptNode}` } : {}),
299
304
  });
300
305
  log('Run paused — waiting for human approval');
301
306
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAkBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA4S7E"}
1
+ {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAkBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA6S7E"}
@@ -58,6 +58,7 @@ export function createMergeNode(deps) {
58
58
  return {
59
59
  currentNode: 'merge',
60
60
  messages: [`[merge] Rejected — will re-execute`],
61
+ error: null,
61
62
  _approvalAction: null,
62
63
  _rejectionFeedback: null,
63
64
  _needsReexecution: true,
@@ -1 +1 @@
1
- {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA+FxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAiEzE"}
1
+ {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwIxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAoEzE"}
@@ -105,6 +105,44 @@ function extractUserQuery(specDir) {
105
105
  }
106
106
  return specContent;
107
107
  }
108
+ /**
109
+ * Extract rejection feedback from spec.yaml for merge-phase rejections.
110
+ * Returns a formatted prompt section if feedback exists, empty string otherwise.
111
+ */
112
+ function getRejectionFeedback(specDir) {
113
+ try {
114
+ const specContent = readSpecFile(specDir, 'spec.yaml');
115
+ if (!specContent)
116
+ return '';
117
+ const specData = yaml.load(specContent);
118
+ const rejectionFeedback = specData?.rejectionFeedback;
119
+ if (rejectionFeedback && rejectionFeedback.length > 0) {
120
+ const mergeRejections = rejectionFeedback.filter((e) => e.phase === 'merge');
121
+ if (mergeRejections.length > 0) {
122
+ const latest = mergeRejections[mergeRejections.length - 1];
123
+ const older = mergeRejections.slice(0, -1);
124
+ const olderSection = older.length > 0
125
+ ? `\n### Earlier feedback (for context only)\n${older.map((e) => `- Iteration ${e.iteration}: ${e.message}`).join('\n')}\n`
126
+ : '';
127
+ return `
128
+ ## CRITICAL — User Rejection Feedback (MUST ADDRESS)
129
+
130
+ **YOUR PRIMARY TASK: The user rejected the previous result and gave this feedback. You MUST act on it:**
131
+
132
+ > ${latest.message}
133
+
134
+ (Iteration ${latest.iteration}, ${latest.timestamp})
135
+
136
+ Do NOT just record this feedback — you must actually make the changes the user requested.
137
+ ${olderSection}`;
138
+ }
139
+ }
140
+ }
141
+ catch {
142
+ // Continue without rejection feedback
143
+ }
144
+ return '';
145
+ }
108
146
  /**
109
147
  * Build the fast-implement prompt from user query + codebase context.
110
148
  *
@@ -124,17 +162,19 @@ export function buildFastImplementPrompt(state) {
124
162
  const claudeMd = readWorktreeFile(cwd, 'CLAUDE.md');
125
163
  const packageJson = readWorktreeFile(cwd, 'package.json');
126
164
  const dirListing = buildDirectoryListing(cwd);
165
+ // Check for rejection feedback from prior merge rejection
166
+ const rejectionSection = getRejectionFeedback(state.specDir);
127
167
  // Build sections conditionally
128
168
  const sections = [];
129
169
  sections.push(`You are a senior software engineer implementing a change directly from a user request.
130
-
170
+ ${rejectionSection}
131
171
  ## User Request
132
172
 
133
173
  ${userQuery}
134
174
 
135
175
  ## Implementation Instructions
136
176
 
137
- 1. Implement the requested changes in the codebase
177
+ 1. ${rejectionSection ? 'Address the rejection feedback above by modifying the existing implementation' : 'Implement the requested changes in the codebase'}
138
178
  2. Write tests for your changes where appropriate
139
179
  3. Run the test suite and fix any failures
140
180
  4. Run the linter and fix any issues