lastlight-core 0.25.9 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/config/default.yaml +317 -1
  2. package/dist/admin/chat-session-reader.d.ts +3 -3
  3. package/dist/admin/chat-session-reader.js +8 -8
  4. package/dist/admin/chat-session-reader.js.map +1 -1
  5. package/dist/admin/docker.js.map +1 -1
  6. package/dist/admin/routes.js +97 -99
  7. package/dist/admin/routes.js.map +1 -1
  8. package/dist/admin/sessions.d.ts +7 -7
  9. package/dist/admin/sessions.js +6 -4
  10. package/dist/admin/sessions.js.map +1 -1
  11. package/dist/admin/tail.js.map +1 -1
  12. package/dist/config/config.d.ts +29 -0
  13. package/dist/config/config.js +141 -0
  14. package/dist/config/config.js.map +1 -1
  15. package/dist/config/repo-config.js +6 -7
  16. package/dist/config/repo-config.js.map +1 -1
  17. package/dist/connectors/messaging/base.js +2 -2
  18. package/dist/connectors/messaging/base.js.map +1 -1
  19. package/dist/connectors/messaging/session-manager.d.ts +29 -31
  20. package/dist/connectors/messaging/session-manager.js +156 -189
  21. package/dist/connectors/messaging/session-manager.js.map +1 -1
  22. package/dist/connectors/messaging/thread-transcript.d.ts +2 -2
  23. package/dist/connectors/messaging/thread-transcript.js +14 -8
  24. package/dist/connectors/messaging/thread-transcript.js.map +1 -1
  25. package/dist/connectors/slack/connector.js +5 -5
  26. package/dist/connectors/slack/connector.js.map +1 -1
  27. package/dist/cron/dependabot-discovery.js.map +1 -1
  28. package/dist/cron/feedback-poll.js +6 -6
  29. package/dist/cron/feedback-poll.js.map +1 -1
  30. package/dist/cron/handlers.js +3 -3
  31. package/dist/cron/handlers.js.map +1 -1
  32. package/dist/cron/jobs.d.ts +1 -1
  33. package/dist/cron/jobs.js +2 -2
  34. package/dist/cron/jobs.js.map +1 -1
  35. package/dist/cron/repo-digest.js +4 -4
  36. package/dist/cron/repo-digest.js.map +1 -1
  37. package/dist/cron/review-discovery.js.map +1 -1
  38. package/dist/cron/runner.js +2 -2
  39. package/dist/cron/runner.js.map +1 -1
  40. package/dist/cron/scheduler.js +1 -1
  41. package/dist/cron/scheduler.js.map +1 -1
  42. package/dist/engine/agent-executor.d.ts +25 -1
  43. package/dist/engine/agent-executor.js +41 -1
  44. package/dist/engine/agent-executor.js.map +1 -1
  45. package/dist/engine/chat/chat-prompt.d.ts +11 -4
  46. package/dist/engine/chat/chat-prompt.js.map +1 -1
  47. package/dist/engine/chat/chat-runner.d.ts +3 -2
  48. package/dist/engine/chat/chat-runner.js +9 -7
  49. package/dist/engine/chat/chat-runner.js.map +1 -1
  50. package/dist/engine/dispatcher.js +29 -25
  51. package/dist/engine/dispatcher.js.map +1 -1
  52. package/dist/engine/event-shim.d.ts +18 -0
  53. package/dist/engine/event-shim.js +2 -0
  54. package/dist/engine/event-shim.js.map +1 -1
  55. package/dist/engine/executors/orchestrator.d.ts +120 -1
  56. package/dist/engine/executors/orchestrator.js +214 -47
  57. package/dist/engine/executors/orchestrator.js.map +1 -1
  58. package/dist/engine/executors/shared.js.map +1 -1
  59. package/dist/engine/feedback/ingest.d.ts +4 -4
  60. package/dist/engine/feedback/ingest.js +13 -13
  61. package/dist/engine/feedback/ingest.js.map +1 -1
  62. package/dist/engine/feedback/slack.d.ts +2 -2
  63. package/dist/engine/feedback/slack.js +6 -6
  64. package/dist/engine/feedback/slack.js.map +1 -1
  65. package/dist/engine/fix-harvest.d.ts +1 -1
  66. package/dist/engine/fix-harvest.js +3 -3
  67. package/dist/engine/fix-harvest.js.map +1 -1
  68. package/dist/engine/github/github.d.ts +59 -0
  69. package/dist/engine/github/github.js +72 -0
  70. package/dist/engine/github/github.js.map +1 -1
  71. package/dist/engine/github/installations.js.map +1 -1
  72. package/dist/engine/github/review-poster.d.ts +388 -9
  73. package/dist/engine/github/review-poster.js +550 -50
  74. package/dist/engine/github/review-poster.js.map +1 -1
  75. package/dist/engine/github/team-visibility.js +7 -7
  76. package/dist/engine/github/team-visibility.js.map +1 -1
  77. package/dist/engine/llm.js.map +1 -1
  78. package/dist/engine/pr-decisions.d.ts +13 -5
  79. package/dist/engine/pr-decisions.js +204 -5
  80. package/dist/engine/pr-decisions.js.map +1 -1
  81. package/dist/engine/pr-escalation.js +7 -7
  82. package/dist/engine/pr-escalation.js.map +1 -1
  83. package/dist/engine/pr-state.d.ts +59 -1
  84. package/dist/engine/pr-state.js +76 -10
  85. package/dist/engine/pr-state.js.map +1 -1
  86. package/dist/engine/review-check.d.ts +1 -1
  87. package/dist/engine/review-check.js +5 -5
  88. package/dist/engine/review-check.js.map +1 -1
  89. package/dist/engine/review-spec.d.ts +264 -0
  90. package/dist/engine/review-spec.js +723 -0
  91. package/dist/engine/review-spec.js.map +1 -0
  92. package/dist/engine/router.js +3 -3
  93. package/dist/engine/router.js.map +1 -1
  94. package/dist/engine/screen/classifier.js.map +1 -1
  95. package/dist/engine/screen/screen.js.map +1 -1
  96. package/dist/evals-api.d.ts +3 -0
  97. package/dist/evals-api.js +20 -0
  98. package/dist/evals-api.js.map +1 -1
  99. package/dist/index.js +145 -67
  100. package/dist/index.js.map +1 -1
  101. package/dist/notify/digest-blocks.js.map +1 -1
  102. package/dist/notify/model.js.map +1 -1
  103. package/dist/notify/transports/github.js.map +1 -1
  104. package/dist/notify/transports/slack.js.map +1 -1
  105. package/dist/sandbox/artifact-backend.js.map +1 -1
  106. package/dist/sandbox/artifact-store.js.map +1 -1
  107. package/dist/sandbox/docker.d.ts +56 -5
  108. package/dist/sandbox/docker.js +96 -2
  109. package/dist/sandbox/docker.js.map +1 -1
  110. package/dist/sandbox/egress-allowlist.js.map +1 -1
  111. package/dist/sandbox/k8s/agent-context-registry.js.map +1 -1
  112. package/dist/sandbox/k8s/client.js.map +1 -1
  113. package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +3 -0
  114. package/dist/sandbox/k8s/kubernetes-sandbox.js +9 -0
  115. package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -1
  116. package/dist/sandbox/k8s/pod.d.ts +11 -0
  117. package/dist/sandbox/k8s/pod.js +11 -6
  118. package/dist/sandbox/k8s/pod.js.map +1 -1
  119. package/dist/sandbox/k8s/resource-name.js.map +1 -1
  120. package/dist/sandbox/k8s/run-id.js.map +1 -1
  121. package/dist/sandbox/k8s/run-secrets.js.map +1 -1
  122. package/dist/sandbox/k8s/service-containers.d.ts +43 -0
  123. package/dist/sandbox/k8s/service-containers.js +87 -0
  124. package/dist/sandbox/k8s/service-containers.js.map +1 -0
  125. package/dist/sandbox/k8s/skill-bundle.js.map +1 -1
  126. package/dist/sandbox/k8s/workspace-provisioner.js +10 -2
  127. package/dist/sandbox/k8s/workspace-provisioner.js.map +1 -1
  128. package/dist/sandbox/reap.d.ts +9 -0
  129. package/dist/sandbox/reap.js +36 -0
  130. package/dist/sandbox/reap.js.map +1 -1
  131. package/dist/sandbox/sandbox.d.ts +34 -0
  132. package/dist/sandbox/sandbox.js +36 -6
  133. package/dist/sandbox/sandbox.js.map +1 -1
  134. package/dist/sandbox/service-containers-docker.d.ts +45 -0
  135. package/dist/sandbox/service-containers-docker.js +78 -0
  136. package/dist/sandbox/service-containers-docker.js.map +1 -0
  137. package/dist/session-log.js.map +1 -1
  138. package/dist/state/approval-store.d.ts +23 -14
  139. package/dist/state/approval-store.js +137 -86
  140. package/dist/state/approval-store.js.map +1 -1
  141. package/dist/state/build-assets.js.map +1 -1
  142. package/dist/state/client.d.ts +105 -0
  143. package/dist/state/client.js +68 -0
  144. package/dist/state/client.js.map +1 -0
  145. package/dist/state/cron-run-store.d.ts +32 -12
  146. package/dist/state/cron-run-store.js +105 -39
  147. package/dist/state/cron-run-store.js.map +1 -1
  148. package/dist/state/data-migrate.d.ts +135 -0
  149. package/dist/state/data-migrate.js +309 -0
  150. package/dist/state/data-migrate.js.map +1 -0
  151. package/dist/state/db.d.ts +82 -23
  152. package/dist/state/db.js +201 -105
  153. package/dist/state/db.js.map +1 -1
  154. package/dist/state/dialect.d.ts +77 -0
  155. package/dist/state/dialect.js +129 -0
  156. package/dist/state/dialect.js.map +1 -0
  157. package/dist/state/execution-store.d.ts +124 -103
  158. package/dist/state/execution-store.js +569 -374
  159. package/dist/state/execution-store.js.map +1 -1
  160. package/dist/state/feedback-store.d.ts +20 -20
  161. package/dist/state/feedback-store.js +241 -187
  162. package/dist/state/feedback-store.js.map +1 -1
  163. package/dist/state/legacy-sqlite.d.ts +15 -0
  164. package/dist/state/legacy-sqlite.js +131 -0
  165. package/dist/state/legacy-sqlite.js.map +1 -0
  166. package/dist/state/pg-client.d.ts +44 -0
  167. package/dist/state/pg-client.js +81 -0
  168. package/dist/state/pg-client.js.map +1 -0
  169. package/dist/state/repo-ref.d.ts +9 -4
  170. package/dist/state/repo-ref.js +12 -6
  171. package/dist/state/repo-ref.js.map +1 -1
  172. package/dist/state/schema/pg.d.ts +2788 -0
  173. package/dist/state/schema/pg.js +301 -0
  174. package/dist/state/schema/pg.js.map +1 -0
  175. package/dist/state/schema/sqlite.d.ts +3063 -0
  176. package/dist/state/schema/sqlite.js +391 -0
  177. package/dist/state/schema/sqlite.js.map +1 -0
  178. package/dist/state/state-cli.d.ts +8 -0
  179. package/dist/state/state-cli.js +247 -0
  180. package/dist/state/state-cli.js.map +1 -0
  181. package/dist/state/team-store.d.ts +26 -13
  182. package/dist/state/team-store.js +140 -93
  183. package/dist/state/team-store.js.map +1 -1
  184. package/dist/state/user-store.d.ts +31 -13
  185. package/dist/state/user-store.js +180 -80
  186. package/dist/state/user-store.js.map +1 -1
  187. package/dist/state/workflow-run-store.d.ts +95 -56
  188. package/dist/state/workflow-run-store.js +419 -314
  189. package/dist/state/workflow-run-store.js.map +1 -1
  190. package/dist/telemetry/index.js.map +1 -1
  191. package/dist/workflows/admission.d.ts +4 -3
  192. package/dist/workflows/admission.js +34 -10
  193. package/dist/workflows/admission.js.map +1 -1
  194. package/dist/workflows/handlers/fanout.d.ts +157 -0
  195. package/dist/workflows/handlers/fanout.js +663 -0
  196. package/dist/workflows/handlers/fanout.js.map +1 -0
  197. package/dist/workflows/handlers/post-review.d.ts +98 -8
  198. package/dist/workflows/handlers/post-review.js +394 -23
  199. package/dist/workflows/handlers/post-review.js.map +1 -1
  200. package/dist/workflows/resume.js +22 -15
  201. package/dist/workflows/resume.js.map +1 -1
  202. package/dist/workflows/runner.js +60 -12
  203. package/dist/workflows/runner.js.map +1 -1
  204. package/dist/workflows/simple.d.ts +23 -0
  205. package/dist/workflows/simple.js +40 -16
  206. package/dist/workflows/simple.js.map +1 -1
  207. package/docker-compose.yml +50 -0
  208. package/drizzle/pg/0000_init.sql +235 -0
  209. package/drizzle/pg/meta/0000_snapshot.json +1751 -0
  210. package/drizzle/pg/meta/_journal.json +13 -0
  211. package/drizzle/sqlite/0000_baseline.sql +257 -0
  212. package/drizzle/sqlite/0001_backfill_repo_refs.sql +74 -0
  213. package/drizzle/sqlite/meta/0000_snapshot.json +1593 -0
  214. package/drizzle/sqlite/meta/0001_snapshot.json +1593 -0
  215. package/drizzle/sqlite/meta/_journal.json +20 -0
  216. package/package.json +31 -15
  217. package/sandbox.Dockerfile +54 -0
  218. package/skills/code-review/SKILL.md +98 -13
  219. package/skills/pr-review/SKILL.md +97 -21
  220. package/skills/pr-review/references/findings-schema.md +37 -6
  221. package/workflows/pr-review.yaml +567 -0
  222. package/workflows/prompts/dependabot-pr-merge.md +22 -2
  223. package/workflows/prompts/review-adjudicate.md +323 -0
  224. package/workflows/prompts/review-falsify.md +149 -0
  225. package/workflows/prompts/review.md +80 -0
  226. package/workflows/prompts/survey-contract.md +109 -0
  227. package/workflows/prompts/survey-enforcement.md +126 -0
  228. package/workflows/prompts/survey-security.md +118 -0
  229. package/workflows/prompts/survey-spec.md +110 -0
  230. package/workflows/prompts/survey-state.md +143 -0
  231. package/workflows/prompts/survey-tests.md +99 -0
  232. package/dist/state/migrate.d.ts +0 -15
  233. package/dist/state/migrate.js +0 -518
  234. package/dist/state/migrate.js.map +0 -1
@@ -1,518 +0,0 @@
1
- /**
2
- * Apply the full SQLite schema for the harness state DB.
3
- *
4
- * Centralized here (rather than on a store) because the three stores
5
- * (`WorkflowRunStore` / `ApprovalStore` / `ExecutionStore`) all share a
6
- * single `Database` connection and assume the schema already exists. `StateDb`
7
- * is the construction root and calls this once at boot; tests that exercise a
8
- * store directly construct a raw `Database`, call `migrate()`, then build the
9
- * store on top.
10
- *
11
- * Every statement is idempotent (`IF NOT EXISTS` / additive `ALTER` guarded by
12
- * try/catch) so it is safe to run on an existing DB.
13
- */
14
- export function migrate(db) {
15
- db.exec(`
16
- CREATE TABLE IF NOT EXISTS executions (
17
- id TEXT PRIMARY KEY,
18
- trigger_type TEXT NOT NULL,
19
- trigger_id TEXT NOT NULL,
20
- skill TEXT NOT NULL,
21
- -- The target repo as (owner, BARE repo) — see state/repo-ref.ts, the one
22
- -- place that rule is expressed. The owner column arrives by ALTER below
23
- -- on an upgraded DB; it is here too so a fresh DB reaches the same shape.
24
- owner TEXT,
25
- repo TEXT,
26
- issue_number INTEGER,
27
- started_at TEXT NOT NULL,
28
- finished_at TEXT,
29
- success INTEGER,
30
- error TEXT,
31
- turns INTEGER,
32
- duration_ms INTEGER
33
- );
34
-
35
- CREATE INDEX IF NOT EXISTS idx_executions_trigger ON executions(trigger_type, trigger_id);
36
- CREATE INDEX IF NOT EXISTS idx_executions_skill ON executions(skill, started_at);
37
-
38
- CREATE TABLE IF NOT EXISTS workflow_runs (
39
- id TEXT PRIMARY KEY,
40
- workflow_name TEXT NOT NULL,
41
- trigger_id TEXT NOT NULL,
42
- -- Same (owner, BARE repo) pair as the executions ledger above.
43
- owner TEXT,
44
- repo TEXT,
45
- issue_number INTEGER,
46
- current_phase TEXT NOT NULL,
47
- phase_history TEXT NOT NULL DEFAULT '[]',
48
- status TEXT NOT NULL DEFAULT 'running',
49
- context TEXT,
50
- started_at TEXT NOT NULL,
51
- updated_at TEXT NOT NULL,
52
- finished_at TEXT
53
- );
54
- CREATE INDEX IF NOT EXISTS idx_workflow_runs_trigger ON workflow_runs(trigger_id, status);
55
- CREATE INDEX IF NOT EXISTS idx_workflow_runs_status ON workflow_runs(status);
56
- -- Dashboard's workflow-runs list query is ORDER BY started_at DESC
57
- -- LIMIT 20, often with optional workflow_name / status filters and a
58
- -- companion COUNT(*). It polls every 5s, so it's worth a covering
59
- -- index — without one this is a full-table sort.
60
- CREATE INDEX IF NOT EXISTS idx_workflow_runs_started_at ON workflow_runs(started_at DESC);
61
- CREATE INDEX IF NOT EXISTS idx_workflow_runs_name_started ON workflow_runs(workflow_name, started_at DESC);
62
-
63
- CREATE TABLE IF NOT EXISTS cron_overrides (
64
- name TEXT PRIMARY KEY,
65
- enabled INTEGER NOT NULL DEFAULT 1,
66
- schedule TEXT,
67
- updated_at TEXT NOT NULL,
68
- updated_by TEXT
69
- );
70
-
71
- -- One row per cron FIRE — scheduled or manual, workflow or handler.
72
- -- Distinct from the workflow_runs a fire may (or may not) dispatch: a
73
- -- zero-discovery fire dispatches nothing, so this is the only record that
74
- -- a backstop cron ran at all. Keyed on cron_name, never the workflow, so
75
- -- a run dispatched by /api/run or a comment cannot skew a cron's health.
76
- CREATE TABLE IF NOT EXISTS cron_runs (
77
- id TEXT PRIMARY KEY,
78
- cron_name TEXT NOT NULL,
79
- workflow TEXT,
80
- handler TEXT,
81
- source TEXT NOT NULL,
82
- actor TEXT,
83
- started_at TEXT NOT NULL,
84
- finished_at TEXT,
85
- status TEXT NOT NULL DEFAULT 'running',
86
- repos_eligible INTEGER,
87
- repos_scanned INTEGER,
88
- discovered INTEGER,
89
- dispatched INTEGER,
90
- failures INTEGER,
91
- error TEXT
92
- );
93
-
94
- CREATE INDEX IF NOT EXISTS idx_cron_runs_name_started ON cron_runs(cron_name, started_at DESC);
95
-
96
- CREATE TABLE IF NOT EXISTS workflow_overrides (
97
- name TEXT PRIMARY KEY,
98
- enabled INTEGER NOT NULL DEFAULT 1,
99
- updated_at TEXT NOT NULL,
100
- updated_by TEXT
101
- );
102
-
103
- CREATE TABLE IF NOT EXISTS workflow_approvals (
104
- id TEXT PRIMARY KEY,
105
- workflow_run_id TEXT NOT NULL,
106
- gate TEXT NOT NULL,
107
- summary TEXT NOT NULL,
108
- status TEXT NOT NULL DEFAULT 'pending',
109
- requested_by TEXT,
110
- responded_by TEXT,
111
- response TEXT,
112
- responded_at TEXT,
113
- created_at TEXT NOT NULL
114
- );
115
- CREATE INDEX IF NOT EXISTS idx_approvals_workflow ON workflow_approvals(workflow_run_id);
116
- CREATE INDEX IF NOT EXISTS idx_approvals_status ON workflow_approvals(status);
117
-
118
- -- First-class user identity (issue #205). An ADDITIVE enrichment table:
119
- -- every actor column elsewhere stays free-text \`login\`, and \`users\` is
120
- -- LEFT-JOINed on it to resolve a real person (name / email / avatar) for
121
- -- the dashboard and future email. \`github_id\` / \`slack_user_id\` are the
122
- -- stable upsert keys; \`login\` is the soft join key. \`email\` is indexed but
123
- -- deliberately NOT unique (corporate shared mailboxes + many null Slack-only
124
- -- rows would collide a UNIQUE constraint) — see issue #205 decisions.
125
- CREATE TABLE IF NOT EXISTS users (
126
- id TEXT PRIMARY KEY, -- randomUUID
127
- github_id INTEGER UNIQUE, -- stable numeric id (upsert key); null for Slack-only rows
128
- login TEXT UNIQUE, -- GitHub login = the soft join key used everywhere
129
- name TEXT,
130
- email TEXT, -- captured for future email; indexed, NOT unique
131
- avatar_url TEXT,
132
- slack_user_id TEXT UNIQUE, -- U… id, linked lazily on Slack match
133
- is_blocked INTEGER NOT NULL DEFAULT 0,
134
- email_is_placeholder INTEGER NOT NULL DEFAULT 0,
135
- created_at TEXT NOT NULL,
136
- updated_at TEXT NOT NULL,
137
- last_login_at TEXT
138
- );
139
- CREATE INDEX IF NOT EXISTS idx_users_login ON users(login);
140
- CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);
141
- CREATE INDEX IF NOT EXISTS idx_users_slack ON users(slack_user_id);
142
-
143
- -- Feedback signals (issue #255) — a 👍/👎 on something the bot wrote, scored
144
- -- against the run that wrote it. Two tables, because a reaction names a
145
- -- MESSAGE and we need a run:
146
- --
147
- -- feedback_anchors one row per reactable artefact the bot posted, and the
148
- -- run it came from. Written when we POST (Slack, where
149
- -- the ts is only ever known at send time) or when a run
150
- -- finishes (GitHub discovery).
151
- -- feedback_signals one row per (anchor, reactor, emoji).
152
- --
153
- -- Surface-agnostic from the start: \`source\` discriminates slack/github so a
154
- -- single query averages across both, and the GitHub poller adds rows rather
155
- -- than columns.
156
- CREATE TABLE IF NOT EXISTS feedback_anchors (
157
- id TEXT PRIMARY KEY, -- randomUUID
158
- source TEXT NOT NULL, -- slack | github
159
- kind TEXT NOT NULL, -- slack_message | issue_comment | review_comment | issue
160
- -- Slack message ts, or the GitHub comment/issue id as a string. Kept TEXT
161
- -- for both: a Slack ts ("1712000000.000100") is not a number, and a
162
- -- GitHub id read back as a float would lose precision.
163
- external_id TEXT NOT NULL,
164
- -- GitHub GraphQL global id. The batched reactions query keys on this, so
165
- -- the poller never has to re-resolve an id it already saw.
166
- node_id TEXT,
167
- -- Slack channel id. GitHub has no channel and stores the empty string
168
- -- rather than NULL, because **SQLite treats NULLs as DISTINCT in a UNIQUE
169
- -- constraint** — with NULL here, the UNIQUE below (and the ON CONFLICT
170
- -- that targets it) is silently inoperative for every GitHub anchor, and
171
- -- re-discovering the same comment forks a second row. A sentinel keeps
172
- -- ONE uniqueness rule and ONE upsert path for both surfaces; the store
173
- -- maps '' back to null at its boundary so callers still see
174
- -- \`channel: string | null\`.
175
- channel TEXT NOT NULL DEFAULT '',
176
- owner TEXT,
177
- repo TEXT,
178
- issue_number INTEGER,
179
- -- The attribution. Null is legal and deliberate: a bot comment we cannot
180
- -- tie to a run is still worth recording — dropping it would silently lose
181
- -- the reaction rather than the run.
182
- workflow_run_id TEXT,
183
- workflow_name TEXT,
184
- -- The Slack THREAD's messaging session, for a chat turn — which has no
185
- -- workflow run. Deliberately not called \`execution_id\`: it is
186
- -- \`messaging_sessions.id\`, which is what an \`executions\` row for a chat
187
- -- turn carries as its \`trigger_id\`, NOT an \`executions.id\`.
188
- messaging_session_id TEXT,
189
- created_at TEXT NOT NULL, -- when the bot posted it
190
- last_polled_at TEXT, -- github only; slack arrives live
191
- UNIQUE(source, channel, external_id)
192
- );
193
- -- The reverse lookup a Slack reaction hits: (channel, ts) → anchor.
194
- CREATE INDEX IF NOT EXISTS idx_feedback_anchors_lookup
195
- ON feedback_anchors(source, channel, external_id);
196
- CREATE INDEX IF NOT EXISTS idx_feedback_anchors_run
197
- ON feedback_anchors(workflow_run_id);
198
- -- The poller's rotation: least-recently-polled first, within the window.
199
- CREATE INDEX IF NOT EXISTS idx_feedback_anchors_poll
200
- ON feedback_anchors(source, created_at, last_polled_at);
201
-
202
- CREATE TABLE IF NOT EXISTS feedback_signals (
203
- id TEXT PRIMARY KEY,
204
- anchor_id TEXT NOT NULL,
205
- -- Denormalized from the anchor so every analytics query is one table.
206
- -- These never change for a given anchor, so there is nothing to keep in
207
- -- sync — the anchor's attribution is fixed the moment it is created.
208
- source TEXT NOT NULL,
209
- workflow_run_id TEXT,
210
- workflow_name TEXT,
211
- messaging_session_id TEXT,
212
- owner TEXT,
213
- repo TEXT,
214
- issue_number INTEGER,
215
- emoji TEXT NOT NULL, -- canonical name (see engine/feedback/reactions.ts)
216
- score INTEGER NOT NULL, -- -2..+2; 0 means "recorded, not scored"
217
- sentiment TEXT NOT NULL,
218
- reactor TEXT, -- GitHub login / Slack user id
219
- reacted_at TEXT, -- when they reacted, when known
220
- observed_at TEXT NOT NULL, -- when WE saw it
221
- -- Set when the reaction is taken away. Retracting rather than deleting
222
- -- keeps "somebody thumbed this and then thought better of it" visible,
223
- -- which is itself a signal; every score query filters on IS NULL.
224
- removed_at TEXT,
225
- -- OTel export watermark. Null means not yet exported, so a restart can't
226
- -- double-emit and signals recorded while telemetry was off can be
227
- -- backfilled later.
228
- exported_at TEXT,
229
- UNIQUE(anchor_id, reactor, emoji)
230
- );
231
- CREATE INDEX IF NOT EXISTS idx_feedback_signals_anchor ON feedback_signals(anchor_id);
232
- CREATE INDEX IF NOT EXISTS idx_feedback_signals_run ON feedback_signals(workflow_run_id);
233
- CREATE INDEX IF NOT EXISTS idx_feedback_signals_observed
234
- ON feedback_signals(observed_at DESC);
235
- CREATE INDEX IF NOT EXISTS idx_feedback_signals_workflow
236
- ON feedback_signals(workflow_name, observed_at DESC);
237
- CREATE INDEX IF NOT EXISTS idx_feedback_signals_export ON feedback_signals(exported_at);
238
-
239
- -- ── GitHub team-based dashboard visibility (issue #169) ────────────────
240
- -- These four tables are a CACHE, not a mirror of the org. Nothing here is
241
- -- enumerated up front: rows appear only for the teams a user who actually
242
- -- logged in belongs to, resolved on demand (see engine/github/team-visibility.ts).
243
- -- That is the whole scaling story — an org with thousands of repos and
244
- -- hundreds of teams costs a handful of requests per logged-in person
245
- -- instead of a full-org crawl. Safe to delete wholesale; it refills.
246
-
247
- -- One row per team we have ever resolved repos for.
248
- CREATE TABLE IF NOT EXISTS github_teams (
249
- org TEXT NOT NULL,
250
- slug TEXT NOT NULL,
251
- name TEXT,
252
- -- When this team's repo grant was last enumerated.
253
- repos_synced_at TEXT NOT NULL,
254
- -- 1 when the enumeration hit the per-team page budget and stopped early,
255
- -- so github_team_repos is a PREFIX of the real grant. A truncated team
256
- -- forces its members to fail open — a partial list would hide repos the
257
- -- person really can see, which is worse than not filtering at all.
258
- truncated INTEGER NOT NULL DEFAULT 0,
259
- PRIMARY KEY (org, slug)
260
- );
261
-
262
- -- A team's grant, already intersected with the managed-repo set. The repo
263
- -- column holds the owner/repo full name.
264
- CREATE TABLE IF NOT EXISTS github_team_repos (
265
- org TEXT NOT NULL,
266
- team_slug TEXT NOT NULL,
267
- repo TEXT NOT NULL,
268
- PRIMARY KEY (org, team_slug, repo)
269
- );
270
-
271
- -- Membership we have LEARNED, not enumerated: one row per (team, login)
272
- -- discovered while resolving that login. Absence means "unknown", never
273
- -- "not a member" — which is why every read path fails open.
274
- CREATE TABLE IF NOT EXISTS github_team_members (
275
- org TEXT NOT NULL,
276
- team_slug TEXT NOT NULL,
277
- login TEXT NOT NULL,
278
- PRIMARY KEY (org, team_slug, login)
279
- );
280
- -- reposForLogin joins membership → team_repos on this column.
281
- CREATE INDEX IF NOT EXISTS idx_github_team_members_login
282
- ON github_team_members(login);
283
-
284
- -- Per-login freshness + outcome, so a resolution that failed or blew its
285
- -- request budget is remembered for the TTL rather than retried on every
286
- -- dashboard poll. status is one of: ok | empty | truncated | error | disabled.
287
- CREATE TABLE IF NOT EXISTS github_visibility_sync (
288
- login TEXT PRIMARY KEY,
289
- synced_at TEXT NOT NULL,
290
- status TEXT NOT NULL,
291
- -- Free-text detail for the error/truncated cases (admin surface only).
292
- detail TEXT
293
- );
294
- `);
295
- // Actor logging (issue #205): who triggered a run and how. Additive on both
296
- // the append-only `executions` ledger and the `workflow_runs` aggregate. The
297
- // run's `triggered_by` is the ORIGINAL trigger; retry/cancel/approve actors
298
- // land on the executions ledger, never overwriting the run's origin value.
299
- // `trigger_actor_type` is one of github | slack | cli | cron | admin | system.
300
- for (const table of ["executions", "workflow_runs"]) {
301
- try {
302
- db.exec(`ALTER TABLE ${table} ADD COLUMN triggered_by TEXT`);
303
- }
304
- catch {
305
- // Column already exists — ignore
306
- }
307
- try {
308
- db.exec(`ALTER TABLE ${table} ADD COLUMN trigger_actor_type TEXT`);
309
- }
310
- catch {
311
- // Column already exists — ignore
312
- }
313
- }
314
- // Mutable phase-to-phase state for features like the socratic explore
315
- // loop that accumulate data across reply-gate pauses.
316
- try {
317
- db.exec(`ALTER TABLE workflow_runs ADD COLUMN scratch TEXT`);
318
- }
319
- catch {
320
- // Column already exists — ignore
321
- }
322
- // Restart attempt counter — bumped each time resumeOrphanedWorkflows
323
- // re-dispatches a still-'running' row at boot. Acts as a circuit
324
- // breaker so an OOM-on-restart loop can't churn forever.
325
- try {
326
- db.exec(`ALTER TABLE workflow_runs ADD COLUMN restart_count INTEGER NOT NULL DEFAULT 0`);
327
- }
328
- catch {
329
- // Column already exists — ignore
330
- }
331
- // Explicit `owner` column. A run targets a GitHub repo identified by
332
- // (owner, repo); `repo` stays a single path-safe segment (taskIds and
333
- // workspace/session dirs derive from it), so the owner previously lived
334
- // ONLY inside the `context` JSON blob. That left the runs list — which
335
- // omits `context` for payload size — unable to reconstruct `owner/repo`,
336
- // so the Repos tab showed a bare row + a managed `owner/repo` row for the
337
- // same repo and the dashboard's GitHub links never resolved. Storing owner
338
- // as its own column fixes both. Backfill existing rows from context.owner
339
- // in the same guarded step (runs once, when the column is first added).
340
- try {
341
- db.exec(`ALTER TABLE workflow_runs ADD COLUMN owner TEXT`);
342
- db.exec(`UPDATE workflow_runs
343
- SET owner = json_extract(context, '$.owner')
344
- WHERE owner IS NULL AND context IS NOT NULL`);
345
- }
346
- catch {
347
- // Column already exists — ignore
348
- }
349
- // ── One repo-identifier rule: (owner, BARE repo) — issue #279 ──────────────
350
- //
351
- // The column above fixed the SHAPE for new rows but left two populations
352
- // behind, so the same column meant two things depending on who wrote it:
353
- // rows predating it hold the qualified `owner/repo` in `repo` itself, and
354
- // `executions` never got an `owner` column at all — the dispatcher wrote the
355
- // qualified string there while the phase executor wrote the bare name, which
356
- // is every workflow phase row.
357
- //
358
- // Six read sites each re-derived "may be bare or qualified" and disagreed
359
- // about which source wins; #278 shipped a filter built on one reading, and a
360
- // non-null non-match HIDES rows rather than showing them. So converge the
361
- // data instead of teaching the seventh consumer the rule.
362
- //
363
- // Ordering matters: `workflow_runs` first, because the `executions` owner
364
- // backfill reads `workflow_runs.owner` back out. Every statement is a no-op
365
- // on a second run — after it, `instr(repo, '/') = 0` — so this is safe to
366
- // re-run, which it is, on every boot.
367
- try {
368
- db.exec(`UPDATE workflow_runs
369
- SET owner = CASE WHEN owner IS NULL OR owner = ''
370
- THEN substr(repo, 1, instr(repo, '/') - 1)
371
- ELSE owner END,
372
- repo = substr(repo, instr(repo, '/') + 1)
373
- WHERE repo IS NOT NULL AND instr(repo, '/') > 0`);
374
- // A row from before the owner column whose `context.owner` was absent has
375
- // one more witness: `trigger_id`, which is built as `owner/repo#N` (or
376
- // `owner/repo::workflow`) from the same pair at dispatch. `resume.ts` and
377
- // the approval-resume path already PREFER it over the columns, so reading
378
- // it here is the existing precedence, not a new guess. Slack-originated
379
- // ids (`slack:…`) carry no repo and are excluded.
380
- db.exec(`UPDATE workflow_runs
381
- SET owner = substr(trigger_id, 1, instr(trigger_id, '/') - 1)
382
- WHERE (owner IS NULL OR owner = '')
383
- AND repo IS NOT NULL
384
- AND trigger_id NOT LIKE 'slack:%'
385
- AND instr(trigger_id, '/') > 0`);
386
- }
387
- catch {
388
- // Best-effort: a run row that won't split is better left alone than
389
- // failing boot. The read path still tolerates both shapes.
390
- }
391
- try {
392
- db.exec(`ALTER TABLE executions ADD COLUMN owner TEXT`);
393
- }
394
- catch {
395
- // Column already exists — ignore
396
- }
397
- try {
398
- // 1. The account is already in the row, on the dispatcher-written rows that
399
- // stored the qualified string.
400
- db.exec(`UPDATE executions
401
- SET owner = substr(repo, 1, instr(repo, '/') - 1)
402
- WHERE (owner IS NULL OR owner = '')
403
- AND repo IS NOT NULL AND instr(repo, '/') > 0`);
404
- // 2. Otherwise it comes from the run that owns the execution. This is the
405
- // bulk: every phase row, written bare from `GitSandboxAccess`.
406
- // `build-cycle` rows are covered by (1) and chat rows carry no repo at
407
- // all, so there is nothing left needing a `trigger_id` parse.
408
- db.exec(`UPDATE executions
409
- SET owner = (SELECT r.owner FROM workflow_runs r WHERE r.id = executions.workflow_run_id)
410
- WHERE (owner IS NULL OR owner = '') AND workflow_run_id IS NOT NULL`);
411
- // 3. Now de-qualify, once the account has been rescued off it.
412
- db.exec(`UPDATE executions
413
- SET repo = substr(repo, instr(repo, '/') + 1)
414
- WHERE repo IS NOT NULL AND instr(repo, '/') > 0`);
415
- }
416
- catch {
417
- // Same best-effort rule as above — the ledger is append-only history, and
418
- // an un-normalized row degrades a dashboard filter, never a run.
419
- }
420
- // `feedback_anchors.channel` moved from nullable to a '' sentinel (issue
421
- // #255) so its UNIQUE actually binds for GitHub — see the CREATE TABLE above.
422
- // `CREATE TABLE IF NOT EXISTS` can't restate a column, so backfill any rows
423
- // written by a build that predates the fix. Guarded like every ALTER here: on
424
- // a table that already accumulated NULL-channel duplicates the UPDATE trips
425
- // the constraint, and leaving those rows alone is strictly better than
426
- // failing boot over a cache of reaction anchors.
427
- try {
428
- db.exec(`UPDATE feedback_anchors SET channel = '' WHERE channel IS NULL`);
429
- }
430
- catch {
431
- // Pre-existing duplicates — they age out via `retentionDays`.
432
- }
433
- // The run's OTel trace/span context (issue #255). A feedback signal can
434
- // arrive days after the run finished and its span closed, so the only way to
435
- // put the score on the trace it grades is to remember where that trace was.
436
- // Captured by the observability adapter in `src/workflows/runner.ts` when the
437
- // `lastlight.workflow.run` span opens; null whenever telemetry was disabled,
438
- // in which case the signal exports as its own root span instead.
439
- for (const col of ["trace_id TEXT", "span_id TEXT"]) {
440
- try {
441
- db.exec(`ALTER TABLE workflow_runs ADD COLUMN ${col}`);
442
- }
443
- catch {
444
- // Column already exists — ignore
445
- }
446
- }
447
- // Gate flavor: 'approve' (explicit approve/reject) vs 'reply' (resolves
448
- // on any free-form reply in the same thread — used by the socratic
449
- // explore loop).
450
- try {
451
- db.exec(`ALTER TABLE workflow_approvals ADD COLUMN kind TEXT NOT NULL DEFAULT 'approve'`);
452
- }
453
- catch {
454
- // Column already exists — ignore
455
- }
456
- // Artifact (handoff doc) filename a gate is asking the reviewer to approve,
457
- // e.g. 'architect-plan.md'. Lets the focused approval view open the right
458
- // doc. Nullable — most gates carry no artifact. Additive, safe on existing DBs.
459
- try {
460
- db.exec(`ALTER TABLE workflow_approvals ADD COLUMN artifact TEXT`);
461
- }
462
- catch {
463
- // Column already exists — ignore
464
- }
465
- // Add session_id column to executions so the dashboard can resolve a
466
- // phase click to its agent session log. Additive — safe on existing DBs.
467
- try {
468
- db.exec(`ALTER TABLE executions ADD COLUMN session_id TEXT`);
469
- }
470
- catch {
471
- // Column already exists — ignore
472
- }
473
- // Per-execution runtime usage metrics, captured from the OpenCode
474
- // step_finish events. Lets the dashboard show cost / tokens per phase
475
- // and lets us aggregate spend later. All additive, safe on existing DBs.
476
- for (const col of [
477
- "cost_usd REAL",
478
- "input_tokens INTEGER",
479
- "cache_creation_input_tokens INTEGER",
480
- "cache_read_input_tokens INTEGER",
481
- "output_tokens INTEGER",
482
- "api_duration_ms INTEGER",
483
- "stop_reason TEXT",
484
- // Links a phase execution to its owning workflow_run. Dedup and
485
- // "already running / done" checks scope to this column so a fresh
486
- // re-trigger of the same workflow on the same issue creates new
487
- // executions instead of reusing the old run's rows.
488
- "workflow_run_id TEXT",
489
- // Final assistant text for a phase execution. Populated only for
490
- // loop iterations whose output is referenced by `scratch.<key>
491
- // .lastOutputExecutionId` — keeps the inlined LLM output out of
492
- // `workflow_runs.scratch` (which is read on every list query)
493
- // while still being available to the runner's resume path.
494
- "output_text TEXT",
495
- // JSON map of agentic-pi extensions active for this execution
496
- // (file-search / github / web-search → {status, mode?, provider?,
497
- // toolCount?, reason?}). Surfaced in the dashboard phase-detail panel.
498
- "extension_status TEXT",
499
- // JSON object of agentic-pi's skill-loading status for this execution
500
- // ({status, discovered, skills[], mappedPaths, noSkills}). The skill-
501
- // loading counterpart to extension_status; surfaced in the same panel.
502
- "skills_status TEXT",
503
- ]) {
504
- try {
505
- db.exec(`ALTER TABLE executions ADD COLUMN ${col}`);
506
- }
507
- catch {
508
- // Column already exists — ignore
509
- }
510
- }
511
- try {
512
- db.exec(`CREATE INDEX IF NOT EXISTS idx_executions_workflow_run ON executions(workflow_run_id, skill)`);
513
- }
514
- catch {
515
- // Index already exists — ignore
516
- }
517
- }
518
- //# sourceMappingURL=migrate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/state/migrate.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,OAAO,CAAC,EAAqB;IAC3C,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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