neondeck 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/DEVELOPMENT.md +310 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/SOUL.md +8 -0
- package/bin/neondeck.mjs +27 -0
- package/config/dashboard.json +208 -0
- package/config/dashboard.schema.json +207 -0
- package/dist/SOUL.md +8 -0
- package/dist/assets/app-BuuvLo98.js +3620 -0
- package/dist/assets/app-BuuvLo98.js.map +1 -0
- package/dist/assets/autopilot-CKgEx8yQ.js +68025 -0
- package/dist/assets/autopilot-CKgEx8yQ.js.map +1 -0
- package/dist/assets/briefing-DYVbJaqk.js +2 -0
- package/dist/assets/briefing-DoO-fJr1.js +22 -0
- package/dist/assets/briefing-DoO-fJr1.js.map +1 -0
- package/dist/assets/command-run-B2TWLpLL.js +20 -0
- package/dist/assets/command-run-B2TWLpLL.js.map +1 -0
- package/dist/assets/command-run-CzQra_Y7.js +2 -0
- package/dist/assets/display-assistant-CbCRBSYM.js +389 -0
- package/dist/assets/display-assistant-CbCRBSYM.js.map +1 -0
- package/dist/assets/fix-pr-ci-BlUl-2ht.js +46 -0
- package/dist/assets/fix-pr-ci-BlUl-2ht.js.map +1 -0
- package/dist/assets/fix-pr-ci-Dl1wpKXp.js +2 -0
- package/dist/assets/migrations/20260710061339_neondeck_pre_1_0_baseline/migration.sql +748 -0
- package/dist/assets/migrations/20260710061339_neondeck_pre_1_0_baseline/snapshot.json +7240 -0
- package/dist/assets/prepare-pr-worktree-CLzccRYh.js +2 -0
- package/dist/assets/prepare-pr-worktree-DxyTygiU.js +17 -0
- package/dist/assets/prepare-pr-worktree-DxyTygiU.js.map +1 -0
- package/dist/assets/push-pr-autofix-BFNSEASU.js +2 -0
- package/dist/assets/push-pr-autofix-DlVjw1IN.js +17 -0
- package/dist/assets/push-pr-autofix-DlVjw1IN.js.map +1 -0
- package/dist/assets/review-pr-for-human-B2j8wz2L.js +2 -0
- package/dist/assets/review-pr-for-human-DcGE-7wb.js +708 -0
- package/dist/assets/review-pr-for-human-DcGE-7wb.js.map +1 -0
- package/dist/assets/safety-CawD9GxD.js +2499 -0
- package/dist/assets/safety-CawD9GxD.js.map +1 -0
- package/dist/assets/scheduled-agent-instruction-CQgogBv3.js +22 -0
- package/dist/assets/scheduled-agent-instruction-CQgogBv3.js.map +1 -0
- package/dist/assets/scheduled-agent-instruction-Dr2ebZRD.js +2 -0
- package/dist/assets/scheduler-tick-Cy26qBld.js +105 -0
- package/dist/assets/scheduler-tick-Cy26qBld.js.map +1 -0
- package/dist/assets/skills/github-gh/SKILL.md +56 -0
- package/dist/assets/skills/neon-ci-fix/SKILL.md +15 -0
- package/dist/assets/skills/neon-docs-fix/SKILL.md +15 -0
- package/dist/assets/skills/neon-issue-triage/SKILL.md +13 -0
- package/dist/assets/skills/neon-pr-review/SKILL.md +19 -0
- package/dist/assets/skills/neondeck/SKILL.md +123 -0
- package/dist/assets/skills/neondeck-handoff/SKILL.md +31 -0
- package/dist/assets/triage-pr-event-BlE3GKNR.js +17 -0
- package/dist/assets/triage-pr-event-BlE3GKNR.js.map +1 -0
- package/dist/assets/triage-pr-event-hxUP587F.js +2 -0
- package/dist/assets/verify-then-push-pr-autofix-CIl5ZwZm.js +2 -0
- package/dist/assets/verify-then-push-pr-autofix-Djy0UFUv.js +75 -0
- package/dist/assets/verify-then-push-pr-autofix-Djy0UFUv.js.map +1 -0
- package/dist/config/dashboard.json +208 -0
- package/dist/config/dashboard.schema.json +207 -0
- package/dist/server.mjs +582 -0
- package/dist/server.mjs.map +1 -0
- package/dist/skills/github-gh/SKILL.md +56 -0
- package/dist/skills/neon-ci-fix/SKILL.md +15 -0
- package/dist/skills/neon-docs-fix/SKILL.md +15 -0
- package/dist/skills/neon-issue-triage/SKILL.md +13 -0
- package/dist/skills/neon-pr-review/SKILL.md +19 -0
- package/dist/skills/neondeck/SKILL.md +123 -0
- package/dist/skills/neondeck-handoff/SKILL.md +31 -0
- package/drizzle.config.ts +7 -0
- package/package.json +155 -0
- package/shared/patch-anchors.ts +78 -0
- package/src/agents/busywork-workflow.ts +24 -0
- package/src/agents/display-assistant.ts +134 -0
- package/src/agents/pr-review-assistant.ts +25 -0
- package/src/agents/scheduler-workflow.ts +20 -0
- package/src/agents/support/tools.ts +346 -0
- package/src/app.ts +1 -0
- package/src/cli/index.ts +560 -0
- package/src/cli/learning.ts +44 -0
- package/src/cli/mcp.ts +496 -0
- package/src/cli/modules.ts +107 -0
- package/src/cli/onboarding.ts +667 -0
- package/src/cli/options.ts +103 -0
- package/src/cli/output.ts +399 -0
- package/src/cli/preapprovals.ts +204 -0
- package/src/cli/prompts.ts +108 -0
- package/src/cli/types.ts +59 -0
- package/src/db.ts +41 -0
- package/src/desktop/open.ts +698 -0
- package/src/desktop/service.ts +863 -0
- package/src/domains/mcp/actions.ts +420 -0
- package/src/domains/mcp/config.ts +501 -0
- package/src/domains/mcp/format.ts +35 -0
- package/src/domains/mcp/gate.ts +188 -0
- package/src/domains/mcp/index.ts +9 -0
- package/src/domains/mcp/instructions.ts +18 -0
- package/src/domains/mcp/oauth.ts +1063 -0
- package/src/domains/mcp/policy.ts +15 -0
- package/src/domains/mcp/registry.ts +461 -0
- package/src/domains/mcp/schemas.ts +171 -0
- package/src/domains/mcp/stdio.ts +451 -0
- package/src/domains/mcp/store.ts +905 -0
- package/src/domains/mcp/tools.ts +119 -0
- package/src/lib/action-result.ts +51 -0
- package/src/lib/exec.ts +118 -0
- package/src/lib/git.ts +20 -0
- package/src/lib/report-html.ts +193 -0
- package/src/lib/sqlite.ts +51 -0
- package/src/lib/valibot.ts +33 -0
- package/src/modules/app-state/index.ts +5 -0
- package/src/modules/app-state/native-notifications.ts +76 -0
- package/src/modules/app-state/notification-events.ts +45 -0
- package/src/modules/app-state/notifications.ts +276 -0
- package/src/modules/app-state/types.ts +42 -0
- package/src/modules/app-state/workflow-summaries.ts +201 -0
- package/src/modules/autonomous-audit/index.ts +225 -0
- package/src/modules/autopilot/actions.ts +165 -0
- package/src/modules/autopilot/admissions.ts +865 -0
- package/src/modules/autopilot/approvals.ts +59 -0
- package/src/modules/autopilot/ci-fix-run.ts +1332 -0
- package/src/modules/autopilot/ci-fix.ts +692 -0
- package/src/modules/autopilot/comments.ts +426 -0
- package/src/modules/autopilot/fixtures.ts +344 -0
- package/src/modules/autopilot/github-facts.ts +303 -0
- package/src/modules/autopilot/index.ts +64 -0
- package/src/modules/autopilot/notifications.ts +271 -0
- package/src/modules/autopilot/push-support.ts +288 -0
- package/src/modules/autopilot/push.ts +661 -0
- package/src/modules/autopilot/recovery.ts +656 -0
- package/src/modules/autopilot/review-feedback.ts +651 -0
- package/src/modules/autopilot/review-support.ts +524 -0
- package/src/modules/autopilot/revision-run.ts +445 -0
- package/src/modules/autopilot/schemas.ts +485 -0
- package/src/modules/autopilot/state-mappers.ts +512 -0
- package/src/modules/autopilot/state-schemas.ts +451 -0
- package/src/modules/autopilot/state-store.ts +183 -0
- package/src/modules/autopilot/state.ts +255 -0
- package/src/modules/autopilot/triage-support.ts +234 -0
- package/src/modules/autopilot/triage.ts +156 -0
- package/src/modules/autopilot/utils.ts +145 -0
- package/src/modules/autopilot/worktree.ts +622 -0
- package/src/modules/autopilot-policy/config.ts +110 -0
- package/src/modules/autopilot-policy/index.ts +4 -0
- package/src/modules/autopilot-policy/risk.ts +359 -0
- package/src/modules/autopilot-policy/schemas.ts +284 -0
- package/src/modules/autopilot-policy/service.ts +304 -0
- package/src/modules/commands/actions.ts +112 -0
- package/src/modules/commands/handlers/index.ts +3 -0
- package/src/modules/commands/handlers/misc.ts +441 -0
- package/src/modules/commands/handlers/queue.ts +694 -0
- package/src/modules/commands/handlers/repo.ts +339 -0
- package/src/modules/commands/index.ts +5 -0
- package/src/modules/commands/registry.ts +157 -0
- package/src/modules/commands/runner.ts +152 -0
- package/src/modules/commands/schemas.ts +107 -0
- package/src/modules/commands/summaries.ts +92 -0
- package/src/modules/commands/utils.ts +113 -0
- package/src/modules/config/actions.ts +253 -0
- package/src/modules/config/events.ts +80 -0
- package/src/modules/config/files.ts +9 -0
- package/src/modules/config/history.ts +74 -0
- package/src/modules/config/index.ts +9 -0
- package/src/modules/config/mutations/dashboard.ts +319 -0
- package/src/modules/config/mutations/execution.ts +89 -0
- package/src/modules/config/mutations/models.ts +467 -0
- package/src/modules/config/mutations/providers.ts +163 -0
- package/src/modules/config/mutations/repos.ts +620 -0
- package/src/modules/config/read.ts +135 -0
- package/src/modules/config/result.ts +66 -0
- package/src/modules/config/schemas.ts +181 -0
- package/src/modules/docs-drift/index.ts +1 -0
- package/src/modules/docs-drift/service.ts +863 -0
- package/src/modules/execution/actions.ts +35 -0
- package/src/modules/execution/approvals.ts +322 -0
- package/src/modules/execution/exedev/checkouts.ts +356 -0
- package/src/modules/execution/exedev/context.ts +286 -0
- package/src/modules/execution/index.ts +7 -0
- package/src/modules/execution/policy.ts +102 -0
- package/src/modules/execution/run.ts +589 -0
- package/src/modules/execution/schemas.ts +116 -0
- package/src/modules/execution/scope.ts +137 -0
- package/src/modules/execution/store.ts +320 -0
- package/src/modules/execution/utils.ts +105 -0
- package/src/modules/execution-policy/index.ts +424 -0
- package/src/modules/flue/execution-context.ts +41 -0
- package/src/modules/github/actions.ts +334 -0
- package/src/modules/github/checks.ts +484 -0
- package/src/modules/github/client.ts +110 -0
- package/src/modules/github/comments.ts +204 -0
- package/src/modules/github/errors.ts +50 -0
- package/src/modules/github/index.ts +92 -0
- package/src/modules/github/issues.ts +116 -0
- package/src/modules/github/pr-file-cache.ts +264 -0
- package/src/modules/github/pull-requests.ts +384 -0
- package/src/modules/github/queue.ts +342 -0
- package/src/modules/github/reviews.ts +1421 -0
- package/src/modules/github/schemas.ts +794 -0
- package/src/modules/github/state-truncation.ts +31 -0
- package/src/modules/handoff/index.ts +2 -0
- package/src/modules/handoff/schemas.ts +61 -0
- package/src/modules/handoff/service.ts +587 -0
- package/src/modules/hygiene/index.ts +1 -0
- package/src/modules/hygiene/service.ts +513 -0
- package/src/modules/kilo/actions.ts +229 -0
- package/src/modules/kilo/ci-fix-run-reconcile.ts +299 -0
- package/src/modules/kilo/docs-drift-boundary.ts +178 -0
- package/src/modules/kilo/index.ts +8 -0
- package/src/modules/kilo/notifications.ts +295 -0
- package/src/modules/kilo/process.ts +637 -0
- package/src/modules/kilo/results/actions.ts +66 -0
- package/src/modules/kilo/results/gates.ts +227 -0
- package/src/modules/kilo/results/index.ts +23 -0
- package/src/modules/kilo/results/schemas.ts +112 -0
- package/src/modules/kilo/results/service.ts +512 -0
- package/src/modules/kilo/results/state.ts +508 -0
- package/src/modules/kilo/results/verify.ts +328 -0
- package/src/modules/kilo/revision-reconcile.ts +187 -0
- package/src/modules/kilo/runtime-facts.ts +128 -0
- package/src/modules/kilo/schemas.ts +265 -0
- package/src/modules/kilo/service.ts +714 -0
- package/src/modules/kilo/sessions-adapters.ts +343 -0
- package/src/modules/kilo/sessions.ts +446 -0
- package/src/modules/kilo/store.ts +689 -0
- package/src/modules/kilo/utils.ts +166 -0
- package/src/modules/learning/automation-health.ts +441 -0
- package/src/modules/learning/automation-memory.ts +179 -0
- package/src/modules/learning/index.ts +6 -0
- package/src/modules/learning/observability.ts +616 -0
- package/src/modules/learning/operator.ts +404 -0
- package/src/modules/learning/reviews/agents.ts +33 -0
- package/src/modules/learning/reviews/complete.ts +321 -0
- package/src/modules/learning/reviews/context.ts +145 -0
- package/src/modules/learning/reviews/events.ts +306 -0
- package/src/modules/learning/reviews/index.ts +6 -0
- package/src/modules/learning/reviews/pr-cadence.ts +157 -0
- package/src/modules/learning/reviews/pr-context.ts +749 -0
- package/src/modules/learning/reviews/prepare.ts +387 -0
- package/src/modules/learning/reviews/schemas.ts +184 -0
- package/src/modules/learning/reviews/store.ts +405 -0
- package/src/modules/learning/skill-patches/actions.ts +86 -0
- package/src/modules/learning/skill-patches/index.ts +3 -0
- package/src/modules/learning/skill-patches/schemas.ts +60 -0
- package/src/modules/learning/skill-patches/service.ts +571 -0
- package/src/modules/learning/skill-patches/support.ts +417 -0
- package/src/modules/memory/actions.ts +183 -0
- package/src/modules/memory/candidates.ts +525 -0
- package/src/modules/memory/events.ts +2 -0
- package/src/modules/memory/index.ts +6 -0
- package/src/modules/memory/prompt.ts +214 -0
- package/src/modules/memory/schemas.ts +170 -0
- package/src/modules/memory/service.ts +578 -0
- package/src/modules/memory/store.ts +489 -0
- package/src/modules/pr-events/actions.ts +191 -0
- package/src/modules/pr-events/index.ts +45 -0
- package/src/modules/pr-events/schemas.ts +186 -0
- package/src/modules/pr-events/service.ts +1414 -0
- package/src/modules/pr-events/target.ts +222 -0
- package/src/modules/pr-events/utils.ts +85 -0
- package/src/modules/pr-events/watermarks.ts +308 -0
- package/src/modules/pr-local-diffs/index.ts +334 -0
- package/src/modules/pr-review-assist/actions.ts +199 -0
- package/src/modules/pr-review-assist/index.ts +3 -0
- package/src/modules/pr-review-assist/schemas.ts +74 -0
- package/src/modules/pr-review-assist/service.ts +656 -0
- package/src/modules/prepared-diffs/actions.ts +132 -0
- package/src/modules/prepared-diffs/index.ts +53 -0
- package/src/modules/prepared-diffs/schemas.ts +255 -0
- package/src/modules/prepared-diffs/service.ts +777 -0
- package/src/modules/prepared-diffs/store.ts +606 -0
- package/src/modules/reports/index.ts +1 -0
- package/src/modules/reports/service.ts +322 -0
- package/src/modules/repos/index.ts +3 -0
- package/src/modules/repos/model-discovery.ts +233 -0
- package/src/modules/repos/providers.ts +194 -0
- package/src/modules/repos/registry.ts +232 -0
- package/src/modules/runtime/agent-config.ts +167 -0
- package/src/modules/runtime/doctor.ts +528 -0
- package/src/modules/runtime/env.ts +123 -0
- package/src/modules/runtime/index.ts +12 -0
- package/src/modules/runtime/local-api-auth.ts +43 -0
- package/src/modules/runtime/metrics.ts +211 -0
- package/src/modules/runtime/skills-actions.ts +141 -0
- package/src/modules/runtime/skills.ts +689 -0
- package/src/modules/runtime/soul.ts +68 -0
- package/src/modules/runtime/status-database.ts +252 -0
- package/src/modules/runtime/status-schema.ts +149 -0
- package/src/modules/runtime/status.ts +482 -0
- package/src/modules/runtime/subagents.ts +37 -0
- package/src/modules/runtime/utility-model.ts +47 -0
- package/src/modules/safety/index.ts +3 -0
- package/src/modules/safety/policy-entries.ts +2432 -0
- package/src/modules/safety/schemas.ts +63 -0
- package/src/modules/safety/service.ts +58 -0
- package/src/modules/safety/tools.ts +15 -0
- package/src/modules/scheduled-tasks/actions.ts +113 -0
- package/src/modules/scheduled-tasks/dispatch.ts +105 -0
- package/src/modules/scheduled-tasks/index.ts +6 -0
- package/src/modules/scheduled-tasks/schemas.ts +91 -0
- package/src/modules/scheduled-tasks/service.ts +296 -0
- package/src/modules/scheduled-tasks/store.ts +814 -0
- package/src/modules/scheduled-tasks/triggers.ts +87 -0
- package/src/modules/scheduler/actions.ts +37 -0
- package/src/modules/scheduler/dispatch.ts +126 -0
- package/src/modules/scheduler/index.ts +4 -0
- package/src/modules/scheduler/lease.ts +247 -0
- package/src/modules/scheduler/pr-watch-event-deltas.ts +367 -0
- package/src/modules/scheduler/pr-watch-events.ts +834 -0
- package/src/modules/scheduler/schemas.ts +79 -0
- package/src/modules/scheduler/service.ts +228 -0
- package/src/modules/scheduler/utils.ts +106 -0
- package/src/modules/scheduler/workflow-invocation.ts +40 -0
- package/src/modules/sessions/actions.ts +213 -0
- package/src/modules/sessions/active-session.ts +46 -0
- package/src/modules/sessions/agent-context.ts +146 -0
- package/src/modules/sessions/approval-nudges.ts +156 -0
- package/src/modules/sessions/events.ts +58 -0
- package/src/modules/sessions/index.ts +10 -0
- package/src/modules/sessions/queries.ts +252 -0
- package/src/modules/sessions/references.ts +113 -0
- package/src/modules/sessions/schemas.ts +263 -0
- package/src/modules/sessions/service.ts +845 -0
- package/src/modules/sessions/store.ts +559 -0
- package/src/modules/sessions/summaries.ts +129 -0
- package/src/modules/sessions/utils.ts +18 -0
- package/src/modules/watches/actions.ts +115 -0
- package/src/modules/watches/index.ts +6 -0
- package/src/modules/watches/polling.ts +245 -0
- package/src/modules/watches/references.ts +293 -0
- package/src/modules/watches/schemas.ts +156 -0
- package/src/modules/watches/service.ts +558 -0
- package/src/modules/watches/store.ts +398 -0
- package/src/modules/watches/utils.ts +51 -0
- package/src/modules/worktree-verification/index.ts +256 -0
- package/src/modules/worktrees/access.ts +129 -0
- package/src/modules/worktrees/actions.ts +108 -0
- package/src/modules/worktrees/cleanup.ts +98 -0
- package/src/modules/worktrees/errors.ts +38 -0
- package/src/modules/worktrees/git.ts +48 -0
- package/src/modules/worktrees/index.ts +5 -0
- package/src/modules/worktrees/locks.ts +192 -0
- package/src/modules/worktrees/paths.ts +209 -0
- package/src/modules/worktrees/queries.ts +31 -0
- package/src/modules/worktrees/schemas.ts +234 -0
- package/src/modules/worktrees/service.ts +657 -0
- package/src/modules/worktrees/store.ts +414 -0
- package/src/repo-edit/actions.ts +129 -0
- package/src/repo-edit/audit.ts +180 -0
- package/src/repo-edit/fuzzy-replace.ts +256 -0
- package/src/repo-edit/git.ts +784 -0
- package/src/repo-edit/index.ts +4 -0
- package/src/repo-edit/locks.ts +27 -0
- package/src/repo-edit/patch-parser.ts +212 -0
- package/src/repo-edit/patch-service.ts +572 -0
- package/src/repo-edit/path-safety.ts +294 -0
- package/src/repo-edit/schemas.ts +220 -0
- package/src/repo-edit/service.ts +488 -0
- package/src/repo-edit/support.ts +459 -0
- package/src/runtime-home/app-db/index.ts +73 -0
- package/src/runtime-home/app-db/migrate.ts +491 -0
- package/src/runtime-home/app-db/migrations/20260710061339_neondeck_pre_1_0_baseline/migration.sql +748 -0
- package/src/runtime-home/app-db/migrations/20260710061339_neondeck_pre_1_0_baseline/snapshot.json +7240 -0
- package/src/runtime-home/app-db/reconcile.ts +155 -0
- package/src/runtime-home/app-db/schema.ts +1118 -0
- package/src/runtime-home/bootstrap.ts +171 -0
- package/src/runtime-home/defaults.ts +42 -0
- package/src/runtime-home/files.ts +193 -0
- package/src/runtime-home/index.ts +68 -0
- package/src/runtime-home/paths.ts +75 -0
- package/src/runtime-home/schemas.ts +485 -0
- package/src/sandboxes/exedev.ts +676 -0
- package/src/server/app.ts +5 -0
- package/src/server/autopilot-push-dispatch.ts +326 -0
- package/src/server/create-app.ts +160 -0
- package/src/server/events/config-stream.ts +67 -0
- package/src/server/events/notification-stream.ts +49 -0
- package/src/server/events/session-stream.ts +49 -0
- package/src/server/http.ts +56 -0
- package/src/server/learning-hooks.ts +430 -0
- package/src/server/middleware.ts +81 -0
- package/src/server/routes/autopilot.ts +318 -0
- package/src/server/routes/commands.ts +12 -0
- package/src/server/routes/config.ts +124 -0
- package/src/server/routes/execution.ts +71 -0
- package/src/server/routes/github.ts +372 -0
- package/src/server/routes/handoff.ts +69 -0
- package/src/server/routes/kilo.ts +179 -0
- package/src/server/routes/learning.ts +384 -0
- package/src/server/routes/mcp.ts +301 -0
- package/src/server/routes/memory.ts +99 -0
- package/src/server/routes/metrics.ts +12 -0
- package/src/server/routes/notifications.ts +48 -0
- package/src/server/routes/repo-edit.ts +115 -0
- package/src/server/routes/reports.ts +127 -0
- package/src/server/routes/repos.ts +50 -0
- package/src/server/routes/runtime.ts +48 -0
- package/src/server/routes/safety.ts +13 -0
- package/src/server/routes/scheduled-tasks.ts +58 -0
- package/src/server/routes/scheduler.ts +13 -0
- package/src/server/routes/sessions.ts +216 -0
- package/src/server/routes/skills.ts +103 -0
- package/src/server/routes/watches.ts +81 -0
- package/src/server/routes/workflows.ts +21 -0
- package/src/server/routes/worktrees.ts +64 -0
- package/src/server/scheduler-workflow.ts +541 -0
- package/src/server/serve.ts +100 -0
- package/src/setup.ts +162 -0
- package/src/skills/github-gh/SKILL.md +56 -0
- package/src/skills/neon-ci-fix/SKILL.md +15 -0
- package/src/skills/neon-docs-fix/SKILL.md +15 -0
- package/src/skills/neon-issue-triage/SKILL.md +13 -0
- package/src/skills/neon-pr-review/SKILL.md +19 -0
- package/src/skills/neondeck/SKILL.md +123 -0
- package/src/skills/neondeck-handoff/SKILL.md +31 -0
- package/src/workflows/briefing.ts +14 -0
- package/src/workflows/command-run.ts +15 -0
- package/src/workflows/comment-pr-autofix-result.ts +10 -0
- package/src/workflows/curate_learning_store.ts +37 -0
- package/src/workflows/dev-doctor.ts +10 -0
- package/src/workflows/fix-pr-ci-failure.ts +10 -0
- package/src/workflows/fix-pr-ci.ts +15 -0
- package/src/workflows/fix-pr-review-feedback.ts +10 -0
- package/src/workflows/handoff_to_kilo.ts +10 -0
- package/src/workflows/prepare-pr-worktree.ts +10 -0
- package/src/workflows/promote_kilo_result.ts +10 -0
- package/src/workflows/push-pr-autofix.ts +10 -0
- package/src/workflows/reconcile_kilo_task.ts +10 -0
- package/src/workflows/review-pr-for-human.ts +15 -0
- package/src/workflows/review_conversation_for_learning.ts +37 -0
- package/src/workflows/review_kilo_result.ts +10 -0
- package/src/workflows/review_pr_batch_for_learning.ts +37 -0
- package/src/workflows/scheduled-agent-instruction.ts +16 -0
- package/src/workflows/scheduler-tick.ts +10 -0
- package/src/workflows/summarize_kilo_session.ts +25 -0
- package/src/workflows/triage-pr-event.ts +10 -0
- package/src/workflows/verify-pr-worktree.ts +10 -0
- package/src/workflows/verify-then-push-pr-autofix.ts +82 -0
- package/src/workflows/verify_kilo_result.ts +10 -0
- package/src/workflows/watch-pr.ts +10 -0
- package/web/dist/assets/GitHubPrReview-QK9oqeDs.js +2 -0
- package/web/dist/assets/MultiFileView-CMm6tA9f.js +2970 -0
- package/web/dist/assets/abap-CLvhMVsD.js +1 -0
- package/web/dist/assets/actionscript-3--17pq3dv.js +1 -0
- package/web/dist/assets/ada-C5qYipkI.js +1 -0
- package/web/dist/assets/andromeeda-vGVdxbeo.js +1 -0
- package/web/dist/assets/angular-html-BVBpGdXr.js +1 -0
- package/web/dist/assets/angular-ts-BfdufMKP.js +1 -0
- package/web/dist/assets/apache-U0d_L8uA.js +1 -0
- package/web/dist/assets/apex-VAyPSnFM.js +1 -0
- package/web/dist/assets/apl-DWBSSoBH.js +1 -0
- package/web/dist/assets/applescript-CCn79oCD.js +1 -0
- package/web/dist/assets/ara-4CJ0cIlV.js +1 -0
- package/web/dist/assets/asciidoc-DE70LPWp.js +1 -0
- package/web/dist/assets/asm-Cmm7eHzH.js +1 -0
- package/web/dist/assets/astro-3LtMP0Sq.js +1 -0
- package/web/dist/assets/aurora-x-CDeNXAV0.js +1 -0
- package/web/dist/assets/awk-BWXHIvNe.js +1 -0
- package/web/dist/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/web/dist/assets/ayu-light-C3h-C4tm.js +1 -0
- package/web/dist/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/web/dist/assets/ballerina-B7ZEbQpA.js +1 -0
- package/web/dist/assets/bat-Bo4NYOV-.js +1 -0
- package/web/dist/assets/beancount-D-usSTwE.js +1 -0
- package/web/dist/assets/berry-DKpUyyne.js +1 -0
- package/web/dist/assets/bibtex-Ci_nEsc7.js +1 -0
- package/web/dist/assets/bicep-CUHmPFLl.js +1 -0
- package/web/dist/assets/bird2-C6vDhewU.js +1 -0
- package/web/dist/assets/blade-llJRbbtR.js +1 -0
- package/web/dist/assets/bsl-BkkzgIyY.js +1 -0
- package/web/dist/assets/c-Wt1voDr2.js +1 -0
- package/web/dist/assets/c3-BFHwR3_K.js +1 -0
- package/web/dist/assets/cadence-CQ2zXKGN.js +1 -0
- package/web/dist/assets/cairo-DLTphjLi.js +1 -0
- package/web/dist/assets/catppuccin-frappe-3VR1Za6u.js +1 -0
- package/web/dist/assets/catppuccin-latte-DwIHMF0Q.js +1 -0
- package/web/dist/assets/catppuccin-macchiato-DYnBP6_5.js +1 -0
- package/web/dist/assets/catppuccin-mocha-DYhrFGRu.js +1 -0
- package/web/dist/assets/clarity-SemFz856.js +1 -0
- package/web/dist/assets/clojure-DqKBuwfJ.js +1 -0
- package/web/dist/assets/cmake-Bj61d0ZC.js +1 -0
- package/web/dist/assets/cobol-x_HIyl2P.js +1 -0
- package/web/dist/assets/codeowners-C8r90Shi.js +1 -0
- package/web/dist/assets/codeql-oeQT6MSM.js +1 -0
- package/web/dist/assets/coffee-CThvmt4R.js +1 -0
- package/web/dist/assets/common-lisp-Cv5bFMCO.js +1 -0
- package/web/dist/assets/coq-BrsZFFmf.js +1 -0
- package/web/dist/assets/cpp-NtAeskI3.js +1 -0
- package/web/dist/assets/crystal-DNu_sX0G.js +1 -0
- package/web/dist/assets/csharp-oqKa8noW.js +1 -0
- package/web/dist/assets/css-DJp_X0uY.js +1 -0
- package/web/dist/assets/csv-Dx-8-gkx.js +1 -0
- package/web/dist/assets/cue-CE9AQfxI.js +1 -0
- package/web/dist/assets/cypher-ClKdZ_lG.js +1 -0
- package/web/dist/assets/d-qD-0Kul2.js +1 -0
- package/web/dist/assets/dark-plus-Cs2F2srj.js +1 -0
- package/web/dist/assets/dart-CnvKMtbv.js +1 -0
- package/web/dist/assets/dax-BkyTk9wS.js +1 -0
- package/web/dist/assets/desktop-Dlh5hvp9.js +1 -0
- package/web/dist/assets/diff-woXpYk--.js +1 -0
- package/web/dist/assets/docker-IyjqRm3v.js +1 -0
- package/web/dist/assets/dotenv-_5a1GRtc.js +1 -0
- package/web/dist/assets/dracula-BHWKrbxM.js +1 -0
- package/web/dist/assets/dracula-soft-5eyTD99u.js +1 -0
- package/web/dist/assets/dream-maker-DW3nJb8Q.js +1 -0
- package/web/dist/assets/edge-ozw5tpLl.js +1 -0
- package/web/dist/assets/elixir-VhA6FeZt.js +1 -0
- package/web/dist/assets/elm-dREJmIFz.js +1 -0
- package/web/dist/assets/emacs-lisp-B4R74twV.js +1 -0
- package/web/dist/assets/erb-CIg6G69l.js +1 -0
- package/web/dist/assets/erlang-Cphh6RMH.js +1 -0
- package/web/dist/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/web/dist/assets/everforest-light-Df2xbC6M.js +1 -0
- package/web/dist/assets/fennel-DQxkIbk2.js +1 -0
- package/web/dist/assets/fish-BJitypiv.js +1 -0
- package/web/dist/assets/fluent-C03EYrpw.js +1 -0
- package/web/dist/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
- package/web/dist/assets/fortran-free-form-CYNrtFtB.js +1 -0
- package/web/dist/assets/fsharp-D13ZGOAj.js +1 -0
- package/web/dist/assets/gdresource-C0sCabJj.js +1 -0
- package/web/dist/assets/gdscript-Cp2uCuqX.js +1 -0
- package/web/dist/assets/gdshader-CBce3t8t.js +1 -0
- package/web/dist/assets/genie-CV2tkWYe.js +1 -0
- package/web/dist/assets/gherkin-DExj1W_8.js +1 -0
- package/web/dist/assets/git-commit-BSykSTBG.js +1 -0
- package/web/dist/assets/git-rebase-B44mJPta.js +1 -0
- package/web/dist/assets/github-dark-C-LZuMrd.js +1 -0
- package/web/dist/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/web/dist/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/web/dist/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/web/dist/assets/github-light-EUqPIrTm.js +1 -0
- package/web/dist/assets/github-light-default-BXViO-2h.js +1 -0
- package/web/dist/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/web/dist/assets/gleam-CSRkHgEL.js +1 -0
- package/web/dist/assets/glimmer-js-vH_gHG0-.js +1 -0
- package/web/dist/assets/glimmer-ts--abOzSAQ.js +1 -0
- package/web/dist/assets/glsl-Dv5r7kPw.js +1 -0
- package/web/dist/assets/gn-ilITqXS6.js +1 -0
- package/web/dist/assets/gnuplot-7GGW24-e.js +1 -0
- package/web/dist/assets/go-rLFTqkRN.js +1 -0
- package/web/dist/assets/graphql-CB4jsw2E.js +1 -0
- package/web/dist/assets/groovy-CacY0gHj.js +1 -0
- package/web/dist/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/web/dist/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/web/dist/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/web/dist/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/web/dist/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/web/dist/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/web/dist/assets/hack-DvEYX148.js +1 -0
- package/web/dist/assets/haml-zE6W3STP.js +1 -0
- package/web/dist/assets/handlebars-CzBR2SDs.js +1 -0
- package/web/dist/assets/haskell-D8IpX4py.js +1 -0
- package/web/dist/assets/haxe-OTjmBuCE.js +1 -0
- package/web/dist/assets/hcl-Dh228itO.js +1 -0
- package/web/dist/assets/hjson-CxZEssPk.js +1 -0
- package/web/dist/assets/hlsl-Cvrh5tZx.js +1 -0
- package/web/dist/assets/horizon-CE9ld1lL.js +1 -0
- package/web/dist/assets/horizon-bright-DSNQnXHK.js +1 -0
- package/web/dist/assets/houston-CsvMBhTu.js +1 -0
- package/web/dist/assets/html-C8UlPnhE.js +1 -0
- package/web/dist/assets/html-derivative-CY6NRz-J.js +1 -0
- package/web/dist/assets/http-Cyd7bS_S.js +1 -0
- package/web/dist/assets/hurl-CWPsiEpf.js +1 -0
- package/web/dist/assets/hxml-B0Qn7Nwc.js +1 -0
- package/web/dist/assets/hy-CZbG8q4J.js +1 -0
- package/web/dist/assets/imba-DsUTQ-LC.js +1 -0
- package/web/dist/assets/index-DqZpo0Jd.js +44 -0
- package/web/dist/assets/index-_jKCE4ks.css +2 -0
- package/web/dist/assets/ini-B5eOa1yu.js +1 -0
- package/web/dist/assets/java-CGc3VwQr.js +1 -0
- package/web/dist/assets/javascript-CUt1pgmJ.js +1 -0
- package/web/dist/assets/jinja-CD-Z-FLd.js +1 -0
- package/web/dist/assets/jison-imPNup1l.js +1 -0
- package/web/dist/assets/json-Bg9ijW3F.js +1 -0
- package/web/dist/assets/json5-BR5RXkoi.js +1 -0
- package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/web/dist/assets/jsonl-CmCQp5Yx.js +1 -0
- package/web/dist/assets/jsonnet-CJTPZ8u_.js +1 -0
- package/web/dist/assets/jssm-DXw9l8Rf.js +1 -0
- package/web/dist/assets/jsx-CY6oMTks.js +1 -0
- package/web/dist/assets/julia-Dc3O-irA.js +1 -0
- package/web/dist/assets/just-BhOq_Kbv.js +1 -0
- package/web/dist/assets/kanagawa-dragon-CXtmUGW6.js +1 -0
- package/web/dist/assets/kanagawa-lotus-BN08jTvb.js +1 -0
- package/web/dist/assets/kanagawa-wave-CTweb8Dz.js +1 -0
- package/web/dist/assets/kdl-CsD5j6eV.js +1 -0
- package/web/dist/assets/kotlin-DhhofPvG.js +1 -0
- package/web/dist/assets/kusto-C7mF5XQf.js +1 -0
- package/web/dist/assets/laserwave-C_8bwKvT.js +1 -0
- package/web/dist/assets/latex-Cu4Y1d5w.js +1 -0
- package/web/dist/assets/lean-CewbzKMR.js +1 -0
- package/web/dist/assets/less-DVTAwKKz.js +1 -0
- package/web/dist/assets/light-plus-DVQuIRkW.js +1 -0
- package/web/dist/assets/liquid-CvXMrjlQ.js +1 -0
- package/web/dist/assets/llvm-Cm23YOpf.js +1 -0
- package/web/dist/assets/log-BNLmms1o.js +1 -0
- package/web/dist/assets/logo-Cluzi2Zq.js +1 -0
- package/web/dist/assets/lua-BjLEUjKY.js +1 -0
- package/web/dist/assets/luau-FMPmPwt6.js +1 -0
- package/web/dist/assets/make-Dixweg8N.js +1 -0
- package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/web/dist/assets/marko-DvhNOisQ.js +1 -0
- package/web/dist/assets/material-theme-Bm3Qr25_.js +1 -0
- package/web/dist/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/web/dist/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/web/dist/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/web/dist/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/web/dist/assets/matlab-D7qyCx1q.js +1 -0
- package/web/dist/assets/mdc-Bm9TpL1X.js +1 -0
- package/web/dist/assets/mdx-DQZ5AkYe.js +1 -0
- package/web/dist/assets/mermaid-Bk4SNUv9.js +1 -0
- package/web/dist/assets/min-dark-BSWPekZh.js +1 -0
- package/web/dist/assets/min-light-DDpmG2fV.js +1 -0
- package/web/dist/assets/mipsasm-BMqwQI7S.js +1 -0
- package/web/dist/assets/mojo-BgCJLMeH.js +1 -0
- package/web/dist/assets/monokai-CdkpiU2Y.js +1 -0
- package/web/dist/assets/moonbit-CaWjb8XO.js +1 -0
- package/web/dist/assets/move-B1IS1UjX.js +1 -0
- package/web/dist/assets/narrat-_X_XdTYD.js +1 -0
- package/web/dist/assets/nextflow-BJtWHP5T.js +1 -0
- package/web/dist/assets/nextflow-groovy-DJMQeKeT.js +1 -0
- package/web/dist/assets/nginx-Bhc82uuv.js +1 -0
- package/web/dist/assets/night-owl-DhmEMT88.js +1 -0
- package/web/dist/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/web/dist/assets/nim-DXTVBFnF.js +1 -0
- package/web/dist/assets/nix-IvuFDN5E.js +1 -0
- package/web/dist/assets/nord-Cb4Vim4T.js +1 -0
- package/web/dist/assets/nushell-DcLAeLz5.js +1 -0
- package/web/dist/assets/objective-c-D1A_Heim.js +1 -0
- package/web/dist/assets/objective-cpp-BsSzOQcm.js +1 -0
- package/web/dist/assets/ocaml-O90oeIOV.js +1 -0
- package/web/dist/assets/odin-B1RWQWA5.js +1 -0
- package/web/dist/assets/one-dark-pro-CLwyXe_n.js +1 -0
- package/web/dist/assets/one-light-D7Lr4KcI.js +1 -0
- package/web/dist/assets/openscad-BUDT5pXO.js +1 -0
- package/web/dist/assets/pascal-4ZHwLPI5.js +1 -0
- package/web/dist/assets/perl-C7veXV9z.js +1 -0
- package/web/dist/assets/php-BRiuMnnr.js +1 -0
- package/web/dist/assets/pierre-dark-CpLgRqie.js +1 -0
- package/web/dist/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
- package/web/dist/assets/pierre-dark-soft-kZQmAZld.js +1 -0
- package/web/dist/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
- package/web/dist/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
- package/web/dist/assets/pierre-light-CoaEpmwp.js +1 -0
- package/web/dist/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
- package/web/dist/assets/pierre-light-soft-lWLdNTOI.js +1 -0
- package/web/dist/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
- package/web/dist/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
- package/web/dist/assets/pkl-ot-7Btpt.js +1 -0
- package/web/dist/assets/plastic-DQwYfKfQ.js +1 -0
- package/web/dist/assets/plsql-DGHpHOYJ.js +1 -0
- package/web/dist/assets/po-BiJDBrnU.js +1 -0
- package/web/dist/assets/poimandres-DRFjx7u4.js +1 -0
- package/web/dist/assets/polar-C7UOKdEL.js +1 -0
- package/web/dist/assets/postcss-BXeXVLqQ.js +1 -0
- package/web/dist/assets/powerquery-DNMTfnFr.js +1 -0
- package/web/dist/assets/powershell-DshXNtvi.js +1 -0
- package/web/dist/assets/prisma-BsRQq5mF.js +1 -0
- package/web/dist/assets/prolog-iXnhIJG7.js +1 -0
- package/web/dist/assets/proto-DB4EqR-F.js +1 -0
- package/web/dist/assets/pug-C5hz5LQ7.js +1 -0
- package/web/dist/assets/puppet-CDv2pdJW.js +1 -0
- package/web/dist/assets/purescript-9MfHhQsQ.js +1 -0
- package/web/dist/assets/python-gzcpVVnB.js +1 -0
- package/web/dist/assets/qml-BdUV3aTS.js +1 -0
- package/web/dist/assets/qmldir-DCQb3MpD.js +1 -0
- package/web/dist/assets/qss-Fe1Jh2GI.js +1 -0
- package/web/dist/assets/r-8R7vtdQc.js +1 -0
- package/web/dist/assets/racket-DcIDlBhZ.js +1 -0
- package/web/dist/assets/raku-B3gFvitq.js +1 -0
- package/web/dist/assets/razor-DRL52XO2.js +1 -0
- package/web/dist/assets/red-CJ3rzSJv.js +1 -0
- package/web/dist/assets/reg-CRGYupPL.js +1 -0
- package/web/dist/assets/regexp-Omp9DhTb.js +1 -0
- package/web/dist/assets/rel-BtDbiS_P.js +1 -0
- package/web/dist/assets/riscv-Ckw8ddFX.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/ron-VUp2lXgN.js +1 -0
- package/web/dist/assets/rose-pine-BthvhNj6.js +1 -0
- package/web/dist/assets/rose-pine-dawn-Dg85fqjY.js +1 -0
- package/web/dist/assets/rose-pine-moon-hon4tzzS.js +1 -0
- package/web/dist/assets/rosmsg-CAekHB0j.js +1 -0
- package/web/dist/assets/rst-BHX71KW9.js +1 -0
- package/web/dist/assets/ruby-B--HzjGU.js +1 -0
- package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/web/dist/assets/sas-DrLaYOK_.js +1 -0
- package/web/dist/assets/sass-DXrisJhu.js +1 -0
- package/web/dist/assets/scala-DKOlJaKm.js +1 -0
- package/web/dist/assets/scheme-DQCgrYNe.js +1 -0
- package/web/dist/assets/scss-DdSxiZKl.js +1 -0
- package/web/dist/assets/sdbl-bTVj8UrX.js +1 -0
- package/web/dist/assets/shaderlab-TOUzSsQk.js +1 -0
- package/web/dist/assets/shellscript-DwcUjJBL.js +1 -0
- package/web/dist/assets/shellsession-CPZkydE6.js +1 -0
- package/web/dist/assets/slack-dark-DnToyrRv.js +1 -0
- package/web/dist/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/web/dist/assets/smalltalk-B16xEiuN.js +1 -0
- package/web/dist/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/web/dist/assets/solarized-dark-DV17i1UV.js +1 -0
- package/web/dist/assets/solarized-light-DSh2HLQt.js +1 -0
- package/web/dist/assets/solidity-CKzVLygQ.js +1 -0
- package/web/dist/assets/soy-Br5FhD7c.js +1 -0
- package/web/dist/assets/sparql-D_iOobhT.js +1 -0
- package/web/dist/assets/splunk-BC2Px7Mm.js +1 -0
- package/web/dist/assets/sql-DNssxck8.js +1 -0
- package/web/dist/assets/ssh-config-BgfXC-Er.js +1 -0
- package/web/dist/assets/stata-DXn1tqOr.js +1 -0
- package/web/dist/assets/stylus-B6D30XZt.js +1 -0
- package/web/dist/assets/surfaces-B8Ko8AJ3.js +1 -0
- package/web/dist/assets/surrealql-IeLNQw0f.js +1 -0
- package/web/dist/assets/svelte-DOdLCIlh.js +1 -0
- package/web/dist/assets/swift-DonLKvLd.js +1 -0
- package/web/dist/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/web/dist/assets/system-verilog-DJ5XKQeo.js +1 -0
- package/web/dist/assets/systemd-BxMlprV5.js +1 -0
- package/web/dist/assets/talonscript-CohzipZa.js +1 -0
- package/web/dist/assets/tasl-DMoTqEGO.js +1 -0
- package/web/dist/assets/tcl-CZd0xW_V.js +1 -0
- package/web/dist/assets/templ-CIwIngms.js +1 -0
- package/web/dist/assets/terraform-DswuEJGm.js +1 -0
- package/web/dist/assets/tex-D8QMumu5.js +1 -0
- package/web/dist/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/web/dist/assets/toml-CcmNWLt0.js +1 -0
- package/web/dist/assets/ts-tags-BMVY4q-l.js +1 -0
- package/web/dist/assets/tsv-sltzmVWM.js +1 -0
- package/web/dist/assets/tsx-5Eka4NBX.js +1 -0
- package/web/dist/assets/turtle-ByJddavk.js +1 -0
- package/web/dist/assets/twig-C8o_5mgw.js +1 -0
- package/web/dist/assets/typescript-DOu2WMV5.js +1 -0
- package/web/dist/assets/typespec-BRdr0IET.js +1 -0
- package/web/dist/assets/typst-DI99ib-x.js +1 -0
- package/web/dist/assets/v-DETTlOr0.js +1 -0
- package/web/dist/assets/vala-zf12oZj6.js +1 -0
- package/web/dist/assets/vb-Djn5o6TS.js +1 -0
- package/web/dist/assets/verilog-CiiDBU1e.js +1 -0
- package/web/dist/assets/vesper-DdrHHSXu.js +1 -0
- package/web/dist/assets/vhdl-BroJfC0k.js +1 -0
- package/web/dist/assets/viml-DvXPmvsu.js +1 -0
- package/web/dist/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/web/dist/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/web/dist/assets/vitesse-light-VbXTXTou.js +1 -0
- package/web/dist/assets/vue-BU18DNDL.js +1 -0
- package/web/dist/assets/vue-html-BeluIYX0.js +1 -0
- package/web/dist/assets/vue-vine-DGUAbOCX.js +1 -0
- package/web/dist/assets/vyper-CgoNMtux.js +1 -0
- package/web/dist/assets/wasm-BnjxR4X6.js +1 -0
- package/web/dist/assets/wasm-ByWQv1Qj.js +1 -0
- package/web/dist/assets/wenyan-C8pVoKbM.js +1 -0
- package/web/dist/assets/wgsl-BsKzXJz4.js +1 -0
- package/web/dist/assets/wikitext-ClFFjSW2.js +1 -0
- package/web/dist/assets/wit-DdvCle-K.js +1 -0
- package/web/dist/assets/wolfram-DLL8P-h_.js +1 -0
- package/web/dist/assets/worker-CBKQOXEl.js +160 -0
- package/web/dist/assets/xml-DIqSwXR3.js +1 -0
- package/web/dist/assets/xsl-Ct_-YIAy.js +1 -0
- package/web/dist/assets/yaml-DTtCYNlS.js +1 -0
- package/web/dist/assets/zenscript-BnlCZFoB.js +1 -0
- package/web/dist/assets/zig-CMLA9XwU.js +1 -0
- package/web/dist/icons/neondeck-icon-192.png +0 -0
- package/web/dist/icons/neondeck-icon-512.png +0 -0
- package/web/dist/icons/neondeck-icon.svg +41 -0
- package/web/dist/icons/neondeck-maskable-512.png +0 -0
- package/web/dist/index.html +24 -0
- package/web/dist/manifest.webmanifest +28 -0
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
import { sql } from 'drizzle-orm';
|
|
2
|
+
import {
|
|
3
|
+
index,
|
|
4
|
+
integer,
|
|
5
|
+
primaryKey,
|
|
6
|
+
real,
|
|
7
|
+
sqliteTable,
|
|
8
|
+
text,
|
|
9
|
+
unique,
|
|
10
|
+
uniqueIndex,
|
|
11
|
+
} from 'drizzle-orm/sqlite-core';
|
|
12
|
+
|
|
13
|
+
export const appMetadata = sqliteTable('app_metadata', {
|
|
14
|
+
key: text('key').primaryKey(),
|
|
15
|
+
value: text('value').notNull(),
|
|
16
|
+
updatedAt: text('updated_at').notNull(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const configHistory = sqliteTable('config_history', {
|
|
20
|
+
id: integer('id').primaryKey({ autoIncrement: true }),
|
|
21
|
+
action: text('action').notNull(),
|
|
22
|
+
file: text('file').notNull(),
|
|
23
|
+
target: text('target'),
|
|
24
|
+
beforeJson: text('before_json'),
|
|
25
|
+
afterJson: text('after_json'),
|
|
26
|
+
changedAt: text('changed_at').notNull(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const prWatches = sqliteTable(
|
|
30
|
+
'pr_watches',
|
|
31
|
+
{
|
|
32
|
+
id: text('id').primaryKey(),
|
|
33
|
+
repoId: text('repo_id').notNull(),
|
|
34
|
+
repoFullName: text('repo_full_name').notNull(),
|
|
35
|
+
githubOwner: text('github_owner').notNull(),
|
|
36
|
+
githubName: text('github_name').notNull(),
|
|
37
|
+
prNumber: integer('pr_number').notNull(),
|
|
38
|
+
desiredTerminalState: text('desired_terminal_state').notNull(),
|
|
39
|
+
status: text('status').notNull(),
|
|
40
|
+
prState: text('pr_state'),
|
|
41
|
+
title: text('title'),
|
|
42
|
+
url: text('url'),
|
|
43
|
+
mergeCommitSha: text('merge_commit_sha'),
|
|
44
|
+
lastSnapshotJson: text('last_snapshot_json'),
|
|
45
|
+
lastOutcome: text('last_outcome'),
|
|
46
|
+
lastCheckedAt: text('last_checked_at'),
|
|
47
|
+
createdBy: text('created_by'),
|
|
48
|
+
createdAt: text('created_at').notNull(),
|
|
49
|
+
updatedAt: text('updated_at').notNull(),
|
|
50
|
+
},
|
|
51
|
+
(table) => [unique().on(table.repoFullName, table.prNumber)],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export const refWatches = sqliteTable(
|
|
55
|
+
'ref_watches',
|
|
56
|
+
{
|
|
57
|
+
id: text('id').primaryKey(),
|
|
58
|
+
repoId: text('repo_id').notNull(),
|
|
59
|
+
repoFullName: text('repo_full_name').notNull(),
|
|
60
|
+
githubOwner: text('github_owner').notNull(),
|
|
61
|
+
githubName: text('github_name').notNull(),
|
|
62
|
+
ref: text('ref').notNull(),
|
|
63
|
+
status: text('status').notNull(),
|
|
64
|
+
title: text('title'),
|
|
65
|
+
url: text('url'),
|
|
66
|
+
lastSnapshotJson: text('last_snapshot_json'),
|
|
67
|
+
lastOutcome: text('last_outcome'),
|
|
68
|
+
lastCheckedAt: text('last_checked_at'),
|
|
69
|
+
createdAt: text('created_at').notNull(),
|
|
70
|
+
updatedAt: text('updated_at').notNull(),
|
|
71
|
+
},
|
|
72
|
+
(table) => [unique().on(table.repoFullName, table.ref)],
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export const prWatchEventWatermarks = sqliteTable(
|
|
76
|
+
'pr_watch_event_watermarks',
|
|
77
|
+
{
|
|
78
|
+
watchId: text('watch_id').notNull(),
|
|
79
|
+
category: text('category').notNull(),
|
|
80
|
+
watermarkJson: text('watermark_json').notNull(),
|
|
81
|
+
sourceUpdatedAt: text('source_updated_at'),
|
|
82
|
+
checkedAt: text('checked_at').notNull(),
|
|
83
|
+
createdAt: text('created_at').notNull(),
|
|
84
|
+
updatedAt: text('updated_at').notNull(),
|
|
85
|
+
},
|
|
86
|
+
(table) => [
|
|
87
|
+
primaryKey({ columns: [table.watchId, table.category] }),
|
|
88
|
+
index('idx_pr_watch_event_watermarks_watch').on(
|
|
89
|
+
table.watchId,
|
|
90
|
+
sql`${table.updatedAt} DESC`,
|
|
91
|
+
),
|
|
92
|
+
],
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
export const scheduledTasks = sqliteTable(
|
|
96
|
+
'scheduled_tasks',
|
|
97
|
+
{
|
|
98
|
+
id: text('id').primaryKey(),
|
|
99
|
+
kind: text('kind').notNull(),
|
|
100
|
+
triggerJson: text('trigger_json').notNull(),
|
|
101
|
+
payloadJson: text('payload_json').notNull(),
|
|
102
|
+
enabled: integer('enabled').default(1).notNull(),
|
|
103
|
+
nextRunAt: text('next_run_at'),
|
|
104
|
+
claimId: text('claim_id'),
|
|
105
|
+
claimExpiresAt: text('claim_expires_at'),
|
|
106
|
+
lastRunAt: text('last_run_at'),
|
|
107
|
+
createdAt: text('created_at').notNull(),
|
|
108
|
+
updatedAt: text('updated_at').notNull(),
|
|
109
|
+
},
|
|
110
|
+
(table) => [
|
|
111
|
+
index('idx_scheduled_tasks_due').on(
|
|
112
|
+
table.enabled,
|
|
113
|
+
table.nextRunAt,
|
|
114
|
+
table.claimExpiresAt,
|
|
115
|
+
),
|
|
116
|
+
index('idx_scheduled_tasks_kind').on(table.kind, table.enabled),
|
|
117
|
+
],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
export const scheduledTaskRuns = sqliteTable(
|
|
121
|
+
'scheduled_task_runs',
|
|
122
|
+
{
|
|
123
|
+
id: text('id').primaryKey(),
|
|
124
|
+
taskId: text('task_id').notNull(),
|
|
125
|
+
status: text('status').notNull(),
|
|
126
|
+
outcome: text('outcome').notNull(),
|
|
127
|
+
message: text('message').notNull(),
|
|
128
|
+
workflowRunId: text('workflow_run_id'),
|
|
129
|
+
sessionId: text('session_id'),
|
|
130
|
+
resultJson: text('result_json'),
|
|
131
|
+
error: text('error'),
|
|
132
|
+
startedAt: text('started_at').notNull(),
|
|
133
|
+
completedAt: text('completed_at'),
|
|
134
|
+
createdAt: text('created_at').notNull(),
|
|
135
|
+
updatedAt: text('updated_at').notNull(),
|
|
136
|
+
},
|
|
137
|
+
(table) => [
|
|
138
|
+
index('idx_scheduled_task_runs_task').on(
|
|
139
|
+
table.taskId,
|
|
140
|
+
sql`${table.createdAt} DESC`,
|
|
141
|
+
),
|
|
142
|
+
index('idx_scheduled_task_runs_status').on(
|
|
143
|
+
table.status,
|
|
144
|
+
sql`${table.updatedAt} DESC`,
|
|
145
|
+
),
|
|
146
|
+
],
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
export const notifications = sqliteTable(
|
|
150
|
+
'notifications',
|
|
151
|
+
{
|
|
152
|
+
id: text('id').primaryKey(),
|
|
153
|
+
level: text('level').notNull(),
|
|
154
|
+
title: text('title').notNull(),
|
|
155
|
+
message: text('message').notNull(),
|
|
156
|
+
source: text('source'),
|
|
157
|
+
sourceId: text('source_id'),
|
|
158
|
+
dataJson: text('data_json'),
|
|
159
|
+
readAt: text('read_at'),
|
|
160
|
+
createdAt: text('created_at').notNull(),
|
|
161
|
+
resolvedAt: text('resolved_at'),
|
|
162
|
+
updatedAt: text('updated_at'),
|
|
163
|
+
occurrenceCount: integer('occurrence_count').default(1).notNull(),
|
|
164
|
+
},
|
|
165
|
+
(table) => [
|
|
166
|
+
index('idx_notifications_source_unresolved').on(
|
|
167
|
+
table.source,
|
|
168
|
+
table.sourceId,
|
|
169
|
+
table.resolvedAt,
|
|
170
|
+
),
|
|
171
|
+
index('idx_notifications_attention').on(
|
|
172
|
+
table.resolvedAt,
|
|
173
|
+
table.readAt,
|
|
174
|
+
table.level,
|
|
175
|
+
sql`${table.createdAt} DESC`,
|
|
176
|
+
),
|
|
177
|
+
],
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
export const memories = sqliteTable(
|
|
181
|
+
'memories',
|
|
182
|
+
{
|
|
183
|
+
id: text('id').primaryKey(),
|
|
184
|
+
scope: text('scope').notNull(),
|
|
185
|
+
key: text('key').notNull(),
|
|
186
|
+
valueJson: text('value_json').notNull(),
|
|
187
|
+
repoId: text('repo_id'),
|
|
188
|
+
status: text('status').default('active').notNull(),
|
|
189
|
+
useCount: integer('use_count').default(0).notNull(),
|
|
190
|
+
lastUsedAt: text('last_used_at'),
|
|
191
|
+
createdAt: text('created_at').notNull(),
|
|
192
|
+
updatedAt: text('updated_at').notNull(),
|
|
193
|
+
},
|
|
194
|
+
(table) => [
|
|
195
|
+
index('idx_memories_active_scope').on(
|
|
196
|
+
table.status,
|
|
197
|
+
table.scope,
|
|
198
|
+
sql`${table.updatedAt} DESC`,
|
|
199
|
+
),
|
|
200
|
+
uniqueIndex('idx_memories_scope_key_repo').on(
|
|
201
|
+
table.scope,
|
|
202
|
+
table.key,
|
|
203
|
+
sql`COALESCE(${table.repoId}, '')`,
|
|
204
|
+
),
|
|
205
|
+
],
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
export const memoryEvents = sqliteTable(
|
|
209
|
+
'memory_events',
|
|
210
|
+
{
|
|
211
|
+
id: text('id').primaryKey(),
|
|
212
|
+
memoryId: text('memory_id'),
|
|
213
|
+
action: text('action').notNull(),
|
|
214
|
+
actor: text('actor').notNull(),
|
|
215
|
+
reason: text('reason'),
|
|
216
|
+
beforeJson: text('before_json'),
|
|
217
|
+
afterJson: text('after_json'),
|
|
218
|
+
createdAt: text('created_at').notNull(),
|
|
219
|
+
},
|
|
220
|
+
(table) => [
|
|
221
|
+
index('idx_memory_events_changed').on(sql`${table.createdAt} DESC`),
|
|
222
|
+
],
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
export const learningEvents = sqliteTable(
|
|
226
|
+
'learning_events',
|
|
227
|
+
{
|
|
228
|
+
id: text('id').primaryKey(),
|
|
229
|
+
type: text('type').notNull(),
|
|
230
|
+
source: text('source').notNull(),
|
|
231
|
+
sourceId: text('source_id'),
|
|
232
|
+
repoId: text('repo_id'),
|
|
233
|
+
sessionId: text('session_id'),
|
|
234
|
+
prKey: text('pr_key'),
|
|
235
|
+
dataJson: text('data_json'),
|
|
236
|
+
createdAt: text('created_at').notNull(),
|
|
237
|
+
},
|
|
238
|
+
(table) => [
|
|
239
|
+
index('idx_learning_events_type').on(
|
|
240
|
+
table.type,
|
|
241
|
+
sql`${table.createdAt} DESC`,
|
|
242
|
+
),
|
|
243
|
+
uniqueIndex('idx_learning_pr_handled_source')
|
|
244
|
+
.on(table.sourceId)
|
|
245
|
+
.where(
|
|
246
|
+
sql`${table.type} = 'pr_handled' AND ${table.sourceId} IS NOT NULL`,
|
|
247
|
+
),
|
|
248
|
+
],
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
export const learningReviews = sqliteTable(
|
|
252
|
+
'learning_reviews',
|
|
253
|
+
{
|
|
254
|
+
id: text('id').primaryKey(),
|
|
255
|
+
kind: text('kind').notNull(),
|
|
256
|
+
status: text('status').notNull(),
|
|
257
|
+
model: text('model').notNull(),
|
|
258
|
+
thinkingLevel: text('thinking_level').notNull(),
|
|
259
|
+
triggerJson: text('trigger_json').notNull(),
|
|
260
|
+
inputSummaryJson: text('input_summary_json'),
|
|
261
|
+
resultJson: text('result_json'),
|
|
262
|
+
error: text('error'),
|
|
263
|
+
flueRunId: text('flue_run_id'),
|
|
264
|
+
startedAt: text('started_at').notNull(),
|
|
265
|
+
completedAt: text('completed_at'),
|
|
266
|
+
},
|
|
267
|
+
(table) => [
|
|
268
|
+
index('idx_learning_reviews_kind').on(
|
|
269
|
+
table.kind,
|
|
270
|
+
table.status,
|
|
271
|
+
sql`${table.startedAt} DESC`,
|
|
272
|
+
),
|
|
273
|
+
],
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
export const learningCandidates = sqliteTable(
|
|
277
|
+
'learning_candidates',
|
|
278
|
+
{
|
|
279
|
+
id: text('id').primaryKey(),
|
|
280
|
+
target: text('target').notNull(),
|
|
281
|
+
status: text('status').notNull(),
|
|
282
|
+
action: text('action'),
|
|
283
|
+
scope: text('scope'),
|
|
284
|
+
key: text('key'),
|
|
285
|
+
valueJson: text('value_json'),
|
|
286
|
+
skillId: text('skill_id'),
|
|
287
|
+
patchJson: text('patch_json'),
|
|
288
|
+
repoId: text('repo_id'),
|
|
289
|
+
reason: text('reason'),
|
|
290
|
+
reviewId: text('review_id'),
|
|
291
|
+
createdAt: text('created_at').notNull(),
|
|
292
|
+
decidedAt: text('decided_at'),
|
|
293
|
+
},
|
|
294
|
+
(table) => [
|
|
295
|
+
index('idx_learning_candidates_status').on(
|
|
296
|
+
table.target,
|
|
297
|
+
table.status,
|
|
298
|
+
sql`${table.createdAt} DESC`,
|
|
299
|
+
),
|
|
300
|
+
],
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
export const workflowSummaries = sqliteTable('workflow_summaries', {
|
|
304
|
+
id: text('id').primaryKey(),
|
|
305
|
+
workflow: text('workflow').notNull(),
|
|
306
|
+
runId: text('run_id'),
|
|
307
|
+
status: text('status').notNull(),
|
|
308
|
+
summaryJson: text('summary_json'),
|
|
309
|
+
createdAt: text('created_at').notNull(),
|
|
310
|
+
updatedAt: text('updated_at').notNull(),
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
export const reports = sqliteTable(
|
|
314
|
+
'reports',
|
|
315
|
+
{
|
|
316
|
+
id: text('id').primaryKey(),
|
|
317
|
+
kind: text('kind').notNull(),
|
|
318
|
+
title: text('title').notNull(),
|
|
319
|
+
repoId: text('repo_id'),
|
|
320
|
+
sourceRef: text('source_ref'),
|
|
321
|
+
htmlPath: text('html_path').notNull(),
|
|
322
|
+
summaryJson: text('summary_json'),
|
|
323
|
+
createdBy: text('created_by').notNull(),
|
|
324
|
+
createdAt: text('created_at').notNull(),
|
|
325
|
+
},
|
|
326
|
+
(table) => [
|
|
327
|
+
index('idx_reports_kind_created').on(
|
|
328
|
+
table.kind,
|
|
329
|
+
sql`${table.createdAt} DESC`,
|
|
330
|
+
),
|
|
331
|
+
index('idx_reports_repo_created').on(
|
|
332
|
+
table.repoId,
|
|
333
|
+
sql`${table.createdAt} DESC`,
|
|
334
|
+
),
|
|
335
|
+
],
|
|
336
|
+
);
|
|
337
|
+
|
|
338
|
+
export const prReviewDrafts = sqliteTable(
|
|
339
|
+
'pr_review_drafts',
|
|
340
|
+
{
|
|
341
|
+
id: text('id').primaryKey(),
|
|
342
|
+
repo: text('repo').notNull(),
|
|
343
|
+
prNumber: integer('pr_number').notNull(),
|
|
344
|
+
headSha: text('head_sha').notNull(),
|
|
345
|
+
verdict: text('verdict'),
|
|
346
|
+
body: text('body'),
|
|
347
|
+
status: text('status').notNull(),
|
|
348
|
+
createdAt: text('created_at').notNull(),
|
|
349
|
+
updatedAt: text('updated_at').notNull(),
|
|
350
|
+
submittedAt: text('submitted_at'),
|
|
351
|
+
},
|
|
352
|
+
(table) => [
|
|
353
|
+
uniqueIndex('idx_pr_review_drafts_live')
|
|
354
|
+
.on(table.repo, table.prNumber)
|
|
355
|
+
.where(sql`${table.status} = 'draft'`),
|
|
356
|
+
index('idx_pr_review_drafts_pr').on(
|
|
357
|
+
table.repo,
|
|
358
|
+
table.prNumber,
|
|
359
|
+
sql`${table.updatedAt} DESC`,
|
|
360
|
+
),
|
|
361
|
+
],
|
|
362
|
+
);
|
|
363
|
+
|
|
364
|
+
export const prReviewDraftComments = sqliteTable(
|
|
365
|
+
'pr_review_draft_comments',
|
|
366
|
+
{
|
|
367
|
+
id: text('id').primaryKey(),
|
|
368
|
+
draftId: text('draft_id')
|
|
369
|
+
.notNull()
|
|
370
|
+
.references(() => prReviewDrafts.id),
|
|
371
|
+
path: text('path').notNull(),
|
|
372
|
+
side: text('side').notNull(),
|
|
373
|
+
line: integer('line').notNull(),
|
|
374
|
+
startLine: integer('start_line'),
|
|
375
|
+
startSide: text('start_side'),
|
|
376
|
+
body: text('body').notNull(),
|
|
377
|
+
origin: text('origin').default('human').notNull(),
|
|
378
|
+
createdAt: text('created_at').notNull(),
|
|
379
|
+
updatedAt: text('updated_at').notNull(),
|
|
380
|
+
},
|
|
381
|
+
(table) => [
|
|
382
|
+
index('idx_pr_review_draft_comments_draft').on(
|
|
383
|
+
table.draftId,
|
|
384
|
+
sql`${table.createdAt} ASC`,
|
|
385
|
+
),
|
|
386
|
+
],
|
|
387
|
+
);
|
|
388
|
+
|
|
389
|
+
export const prReviewNeonSeededComments = sqliteTable(
|
|
390
|
+
'pr_review_neon_seeded_comments',
|
|
391
|
+
{
|
|
392
|
+
commentId: text('comment_id').primaryKey(),
|
|
393
|
+
draftId: text('draft_id')
|
|
394
|
+
.notNull()
|
|
395
|
+
.references(() => prReviewDrafts.id),
|
|
396
|
+
repo: text('repo').notNull(),
|
|
397
|
+
prNumber: integer('pr_number').notNull(),
|
|
398
|
+
headSha: text('head_sha').notNull(),
|
|
399
|
+
path: text('path').notNull(),
|
|
400
|
+
side: text('side').notNull(),
|
|
401
|
+
line: integer('line').notNull(),
|
|
402
|
+
startLine: integer('start_line'),
|
|
403
|
+
startSide: text('start_side'),
|
|
404
|
+
severity: text('severity').notNull(),
|
|
405
|
+
summary: text('summary').notNull(),
|
|
406
|
+
source: text('source').notNull(),
|
|
407
|
+
outcome: text('outcome'),
|
|
408
|
+
outcomeAt: text('outcome_at'),
|
|
409
|
+
seededAt: text('seeded_at').notNull(),
|
|
410
|
+
},
|
|
411
|
+
(table) => [
|
|
412
|
+
index('idx_pr_review_neon_seeded_comments_draft').on(
|
|
413
|
+
table.draftId,
|
|
414
|
+
sql`${table.seededAt} ASC`,
|
|
415
|
+
),
|
|
416
|
+
index('idx_pr_review_neon_seeded_comments_pr').on(
|
|
417
|
+
table.repo,
|
|
418
|
+
table.prNumber,
|
|
419
|
+
sql`${table.seededAt} ASC`,
|
|
420
|
+
),
|
|
421
|
+
],
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
export const githubPrFileCache = sqliteTable(
|
|
425
|
+
'github_pr_file_cache',
|
|
426
|
+
{
|
|
427
|
+
repo: text('repo').notNull(),
|
|
428
|
+
prNumber: integer('pr_number').notNull(),
|
|
429
|
+
headSha: text('head_sha').notNull(),
|
|
430
|
+
payload: text('payload').notNull(),
|
|
431
|
+
byteSize: integer('byte_size').notNull(),
|
|
432
|
+
fetchedAt: text('fetched_at').notNull(),
|
|
433
|
+
},
|
|
434
|
+
(table) => [
|
|
435
|
+
primaryKey({ columns: [table.repo, table.prNumber, table.headSha] }),
|
|
436
|
+
],
|
|
437
|
+
);
|
|
438
|
+
|
|
439
|
+
export const workflowEvents = sqliteTable(
|
|
440
|
+
'workflow_events',
|
|
441
|
+
{
|
|
442
|
+
id: integer('id').primaryKey({ autoIncrement: true }),
|
|
443
|
+
runId: text('run_id'),
|
|
444
|
+
workflow: text('workflow'),
|
|
445
|
+
eventType: text('event_type').notNull(),
|
|
446
|
+
eventIndex: integer('event_index'),
|
|
447
|
+
level: text('level'),
|
|
448
|
+
message: text('message').notNull(),
|
|
449
|
+
name: text('name'),
|
|
450
|
+
operationKind: text('operation_kind'),
|
|
451
|
+
operationId: text('operation_id'),
|
|
452
|
+
durationMs: integer('duration_ms'),
|
|
453
|
+
isError: integer('is_error').default(0).notNull(),
|
|
454
|
+
summaryJson: text('summary_json'),
|
|
455
|
+
createdAt: text('created_at').notNull(),
|
|
456
|
+
},
|
|
457
|
+
(table) => [
|
|
458
|
+
index('idx_workflow_events_run').on(table.runId, table.eventIndex),
|
|
459
|
+
index('idx_workflow_events_created').on(sql`${table.createdAt} DESC`),
|
|
460
|
+
],
|
|
461
|
+
);
|
|
462
|
+
|
|
463
|
+
export const workflowRunObservations = sqliteTable(
|
|
464
|
+
'workflow_run_observations',
|
|
465
|
+
{
|
|
466
|
+
runId: text('run_id').primaryKey(),
|
|
467
|
+
workflow: text('workflow').notNull(),
|
|
468
|
+
status: text('status').notNull(),
|
|
469
|
+
startedAt: text('started_at').notNull(),
|
|
470
|
+
endedAt: text('ended_at'),
|
|
471
|
+
lastEventAt: text('last_event_at').notNull(),
|
|
472
|
+
lastMessage: text('last_message').notNull(),
|
|
473
|
+
eventCount: integer('event_count').default(0).notNull(),
|
|
474
|
+
durationMs: integer('duration_ms'),
|
|
475
|
+
isError: integer('is_error').default(0).notNull(),
|
|
476
|
+
updatedAt: text('updated_at').notNull(),
|
|
477
|
+
},
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
export const autopilotAdmissions = sqliteTable(
|
|
481
|
+
'autopilot_admissions',
|
|
482
|
+
{
|
|
483
|
+
id: text('id').primaryKey(),
|
|
484
|
+
watchId: text('watch_id').notNull(),
|
|
485
|
+
eventFingerprint: text('event_fingerprint').notNull(),
|
|
486
|
+
repoId: text('repo_id').notNull(),
|
|
487
|
+
prNumber: integer('pr_number').notNull(),
|
|
488
|
+
mode: text('mode').notNull(),
|
|
489
|
+
inputJson: text('input_json').default('{}').notNull(),
|
|
490
|
+
state: text('state').notNull(),
|
|
491
|
+
priority: integer('priority').default(0).notNull(),
|
|
492
|
+
currentWorkflow: text('current_workflow'),
|
|
493
|
+
currentRunId: text('current_run_id'),
|
|
494
|
+
worktreeId: text('worktree_id'),
|
|
495
|
+
preparedDiffId: text('prepared_diff_id'),
|
|
496
|
+
attemptCount: integer('attempt_count').default(0).notNull(),
|
|
497
|
+
nextAttemptAt: text('next_attempt_at'),
|
|
498
|
+
lastError: text('last_error'),
|
|
499
|
+
createdAt: text('created_at').notNull(),
|
|
500
|
+
updatedAt: text('updated_at').notNull(),
|
|
501
|
+
},
|
|
502
|
+
(table) => [
|
|
503
|
+
uniqueIndex('idx_autopilot_admissions_watch_event').on(
|
|
504
|
+
table.watchId,
|
|
505
|
+
table.eventFingerprint,
|
|
506
|
+
),
|
|
507
|
+
index('idx_autopilot_admissions_state_due').on(
|
|
508
|
+
table.state,
|
|
509
|
+
table.nextAttemptAt,
|
|
510
|
+
sql`${table.updatedAt} DESC`,
|
|
511
|
+
),
|
|
512
|
+
index('idx_autopilot_admissions_repo_pr').on(
|
|
513
|
+
table.repoId,
|
|
514
|
+
table.prNumber,
|
|
515
|
+
table.state,
|
|
516
|
+
),
|
|
517
|
+
],
|
|
518
|
+
);
|
|
519
|
+
|
|
520
|
+
export const chatSessions = sqliteTable(
|
|
521
|
+
'chat_sessions',
|
|
522
|
+
{
|
|
523
|
+
id: text('id').primaryKey(),
|
|
524
|
+
title: text('title').notNull(),
|
|
525
|
+
agentName: text('agent_name').notNull(),
|
|
526
|
+
kind: text('kind').notNull(),
|
|
527
|
+
pinned: integer('pinned').default(0).notNull(),
|
|
528
|
+
archivedAt: text('archived_at'),
|
|
529
|
+
linkedRepoId: text('linked_repo_id'),
|
|
530
|
+
linkedWatchId: text('linked_watch_id'),
|
|
531
|
+
linkedTaskId: text('linked_task_id'),
|
|
532
|
+
staleReasonsJson: text('stale_reasons_json'),
|
|
533
|
+
uiMetadataJson: text('ui_metadata_json'),
|
|
534
|
+
summary: text('summary'),
|
|
535
|
+
summaryGeneratedAt: text('summary_generated_at'),
|
|
536
|
+
summarySource: text('summary_source'),
|
|
537
|
+
summaryRefreshNote: text('summary_refresh_note'),
|
|
538
|
+
contextLoadedAt: text('context_loaded_at'),
|
|
539
|
+
contextMemoryIdsJson: text('context_memory_ids_json'),
|
|
540
|
+
learningTurnCount: integer('learning_turn_count').default(0).notNull(),
|
|
541
|
+
lastLearningReviewTurnCount: integer('last_learning_review_turn_count')
|
|
542
|
+
.default(0)
|
|
543
|
+
.notNull(),
|
|
544
|
+
lastLearningReviewAt: text('last_learning_review_at'),
|
|
545
|
+
lastLearningCurationTurnCount: integer('last_learning_curation_turn_count')
|
|
546
|
+
.default(0)
|
|
547
|
+
.notNull(),
|
|
548
|
+
lastLearningCurationAt: text('last_learning_curation_at'),
|
|
549
|
+
createdAt: text('created_at').notNull(),
|
|
550
|
+
updatedAt: text('updated_at').notNull(),
|
|
551
|
+
lastActiveAt: text('last_active_at').notNull(),
|
|
552
|
+
},
|
|
553
|
+
(table) => [
|
|
554
|
+
index('idx_chat_sessions_recent').on(
|
|
555
|
+
table.archivedAt,
|
|
556
|
+
sql`${table.pinned} DESC`,
|
|
557
|
+
sql`${table.lastActiveAt} DESC`,
|
|
558
|
+
),
|
|
559
|
+
index('idx_chat_sessions_kind').on(
|
|
560
|
+
table.kind,
|
|
561
|
+
table.archivedAt,
|
|
562
|
+
sql`${table.lastActiveAt} DESC`,
|
|
563
|
+
),
|
|
564
|
+
],
|
|
565
|
+
);
|
|
566
|
+
|
|
567
|
+
export const chatSessionSurfaces = sqliteTable('chat_session_surfaces', {
|
|
568
|
+
surface: text('surface').primaryKey(),
|
|
569
|
+
sessionId: text('session_id').notNull(),
|
|
570
|
+
updatedAt: text('updated_at').notNull(),
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
export const chatSessionAudit = sqliteTable(
|
|
574
|
+
'chat_session_audit',
|
|
575
|
+
{
|
|
576
|
+
id: integer('id').primaryKey({ autoIncrement: true }),
|
|
577
|
+
action: text('action').notNull(),
|
|
578
|
+
sessionId: text('session_id'),
|
|
579
|
+
surface: text('surface'),
|
|
580
|
+
reason: text('reason'),
|
|
581
|
+
metadataJson: text('metadata_json'),
|
|
582
|
+
createdAt: text('created_at').notNull(),
|
|
583
|
+
},
|
|
584
|
+
(table) => [
|
|
585
|
+
index('idx_chat_session_audit_session').on(
|
|
586
|
+
table.sessionId,
|
|
587
|
+
sql`${table.createdAt} DESC`,
|
|
588
|
+
),
|
|
589
|
+
],
|
|
590
|
+
);
|
|
591
|
+
|
|
592
|
+
export const chatSessionCommandEvents = sqliteTable(
|
|
593
|
+
'chat_session_command_events',
|
|
594
|
+
{
|
|
595
|
+
id: text('id').primaryKey(),
|
|
596
|
+
sessionId: text('session_id').notNull(),
|
|
597
|
+
input: text('input').notNull(),
|
|
598
|
+
status: text('status').notNull(),
|
|
599
|
+
resultJson: text('result_json'),
|
|
600
|
+
flueRunId: text('flue_run_id'),
|
|
601
|
+
workflowSummaryId: text('workflow_summary_id'),
|
|
602
|
+
createdAt: text('created_at').notNull(),
|
|
603
|
+
completedAt: text('completed_at'),
|
|
604
|
+
updatedAt: text('updated_at').notNull(),
|
|
605
|
+
},
|
|
606
|
+
(table) => [
|
|
607
|
+
index('idx_chat_session_command_events_session').on(
|
|
608
|
+
table.sessionId,
|
|
609
|
+
sql`${table.createdAt} DESC`,
|
|
610
|
+
),
|
|
611
|
+
],
|
|
612
|
+
);
|
|
613
|
+
|
|
614
|
+
export const executionApprovals = sqliteTable(
|
|
615
|
+
'execution_approvals',
|
|
616
|
+
{
|
|
617
|
+
id: text('id').primaryKey(),
|
|
618
|
+
command: text('command').notNull(),
|
|
619
|
+
backend: text('backend').notNull(),
|
|
620
|
+
cwd: text('cwd'),
|
|
621
|
+
context: text('context').notNull(),
|
|
622
|
+
risk: text('risk').notNull(),
|
|
623
|
+
policyDecision: text('policy_decision').notNull(),
|
|
624
|
+
status: text('status').notNull(),
|
|
625
|
+
approvalDecision: text('approval_decision'),
|
|
626
|
+
approverSurface: text('approver_surface'),
|
|
627
|
+
sessionId: text('session_id'),
|
|
628
|
+
requestContextJson: text('request_context_json'),
|
|
629
|
+
resultJson: text('result_json'),
|
|
630
|
+
exitCode: integer('exit_code'),
|
|
631
|
+
stdoutPreview: text('stdout_preview'),
|
|
632
|
+
stderrPreview: text('stderr_preview'),
|
|
633
|
+
error: text('error'),
|
|
634
|
+
createdAt: text('created_at').notNull(),
|
|
635
|
+
resolvedAt: text('resolved_at'),
|
|
636
|
+
usedAt: text('used_at'),
|
|
637
|
+
executedAt: text('executed_at'),
|
|
638
|
+
updatedAt: text('updated_at').notNull(),
|
|
639
|
+
},
|
|
640
|
+
(table) => [
|
|
641
|
+
index('idx_execution_approvals_status').on(
|
|
642
|
+
table.status,
|
|
643
|
+
sql`${table.updatedAt} DESC`,
|
|
644
|
+
),
|
|
645
|
+
index('idx_execution_approvals_updated').on(sql`${table.updatedAt} DESC`),
|
|
646
|
+
],
|
|
647
|
+
);
|
|
648
|
+
|
|
649
|
+
export const repoEditEvents = sqliteTable(
|
|
650
|
+
'repo_edit_events',
|
|
651
|
+
{
|
|
652
|
+
id: text('id').primaryKey(),
|
|
653
|
+
repoId: text('repo_id').notNull(),
|
|
654
|
+
sessionId: text('session_id'),
|
|
655
|
+
workflowRunId: text('workflow_run_id'),
|
|
656
|
+
actorType: text('actor_type').notNull(),
|
|
657
|
+
actorId: text('actor_id'),
|
|
658
|
+
action: text('action').notNull(),
|
|
659
|
+
status: text('status').notNull(),
|
|
660
|
+
reason: text('reason'),
|
|
661
|
+
pathsJson: text('paths_json').notNull(),
|
|
662
|
+
inputHash: text('input_hash'),
|
|
663
|
+
diffSummaryJson: text('diff_summary_json'),
|
|
664
|
+
diffPatch: text('diff_patch'),
|
|
665
|
+
errorJson: text('error_json'),
|
|
666
|
+
createdAt: text('created_at').notNull(),
|
|
667
|
+
updatedAt: text('updated_at').notNull(),
|
|
668
|
+
worktreeId: text('worktree_id'),
|
|
669
|
+
},
|
|
670
|
+
(table) => [
|
|
671
|
+
index('idx_repo_edit_events_updated').on(sql`${table.updatedAt} DESC`),
|
|
672
|
+
index('idx_repo_edit_events_repo').on(
|
|
673
|
+
table.repoId,
|
|
674
|
+
sql`${table.updatedAt} DESC`,
|
|
675
|
+
),
|
|
676
|
+
],
|
|
677
|
+
);
|
|
678
|
+
|
|
679
|
+
export const repoFileReads = sqliteTable(
|
|
680
|
+
'repo_file_reads',
|
|
681
|
+
{
|
|
682
|
+
id: integer('id').primaryKey({ autoIncrement: true }),
|
|
683
|
+
sessionId: text('session_id'),
|
|
684
|
+
repoId: text('repo_id').notNull(),
|
|
685
|
+
worktreeId: text('worktree_id'),
|
|
686
|
+
path: text('path').notNull(),
|
|
687
|
+
mtimeMs: real('mtime_ms').notNull(),
|
|
688
|
+
size: integer('size').notNull(),
|
|
689
|
+
sha256: text('sha256').notNull(),
|
|
690
|
+
partial: integer('partial').default(0).notNull(),
|
|
691
|
+
readAt: text('read_at').notNull(),
|
|
692
|
+
},
|
|
693
|
+
(table) => [
|
|
694
|
+
index('idx_repo_file_reads_lookup').on(
|
|
695
|
+
table.sessionId,
|
|
696
|
+
table.repoId,
|
|
697
|
+
table.worktreeId,
|
|
698
|
+
table.path,
|
|
699
|
+
sql`${table.readAt} DESC`,
|
|
700
|
+
),
|
|
701
|
+
],
|
|
702
|
+
);
|
|
703
|
+
|
|
704
|
+
export const worktrees = sqliteTable(
|
|
705
|
+
'worktrees',
|
|
706
|
+
{
|
|
707
|
+
id: text('id').primaryKey(),
|
|
708
|
+
repoId: text('repo_id').notNull(),
|
|
709
|
+
repoFullName: text('repo_full_name').notNull(),
|
|
710
|
+
githubOwner: text('github_owner').notNull(),
|
|
711
|
+
githubName: text('github_name').notNull(),
|
|
712
|
+
prNumber: integer('pr_number'),
|
|
713
|
+
baseRef: text('base_ref').notNull(),
|
|
714
|
+
headOwner: text('head_owner'),
|
|
715
|
+
headName: text('head_name'),
|
|
716
|
+
headRef: text('head_ref').notNull(),
|
|
717
|
+
headSha: text('head_sha'),
|
|
718
|
+
localPath: text('local_path').notNull(),
|
|
719
|
+
storageKind: text('storage_kind').notNull(),
|
|
720
|
+
owningWorkflowRunId: text('owning_workflow_run_id'),
|
|
721
|
+
lifecycleStatus: text('lifecycle_status').notNull(),
|
|
722
|
+
lastSyncedSha: text('last_synced_sha'),
|
|
723
|
+
lastPushedSha: text('last_pushed_sha'),
|
|
724
|
+
cleanupPolicyJson: text('cleanup_policy_json'),
|
|
725
|
+
directPushAllowed: integer('direct_push_allowed').default(0).notNull(),
|
|
726
|
+
adopted: integer('adopted').default(0).notNull(),
|
|
727
|
+
createdBy: text('created_by').notNull(),
|
|
728
|
+
createdAt: text('created_at').notNull(),
|
|
729
|
+
updatedAt: text('updated_at').notNull(),
|
|
730
|
+
},
|
|
731
|
+
(table) => [
|
|
732
|
+
unique().on(table.localPath),
|
|
733
|
+
index('idx_worktrees_repo').on(
|
|
734
|
+
table.repoId,
|
|
735
|
+
table.lifecycleStatus,
|
|
736
|
+
sql`${table.updatedAt} DESC`,
|
|
737
|
+
),
|
|
738
|
+
index('idx_worktrees_pr').on(
|
|
739
|
+
table.repoId,
|
|
740
|
+
table.prNumber,
|
|
741
|
+
table.headRef,
|
|
742
|
+
table.lifecycleStatus,
|
|
743
|
+
),
|
|
744
|
+
],
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
export const worktreeLocks = sqliteTable(
|
|
748
|
+
'worktree_locks',
|
|
749
|
+
{
|
|
750
|
+
id: text('id').primaryKey(),
|
|
751
|
+
scope: text('scope').notNull(),
|
|
752
|
+
scopeKey: text('scope_key').notNull(),
|
|
753
|
+
worktreeId: text('worktree_id'),
|
|
754
|
+
repoId: text('repo_id').notNull(),
|
|
755
|
+
prNumber: integer('pr_number'),
|
|
756
|
+
owner: text('owner').notNull(),
|
|
757
|
+
workflowRunId: text('workflow_run_id'),
|
|
758
|
+
expiresAt: text('expires_at').notNull(),
|
|
759
|
+
releasedAt: text('released_at'),
|
|
760
|
+
staleRecoveredAt: text('stale_recovered_at'),
|
|
761
|
+
createdAt: text('created_at').notNull(),
|
|
762
|
+
updatedAt: text('updated_at').notNull(),
|
|
763
|
+
},
|
|
764
|
+
(table) => [
|
|
765
|
+
index('idx_worktree_locks_active').on(
|
|
766
|
+
table.scopeKey,
|
|
767
|
+
table.releasedAt,
|
|
768
|
+
table.expiresAt,
|
|
769
|
+
),
|
|
770
|
+
uniqueIndex('idx_worktree_locks_one_active')
|
|
771
|
+
.on(table.scopeKey)
|
|
772
|
+
.where(sql`${table.releasedAt} IS NULL`),
|
|
773
|
+
],
|
|
774
|
+
);
|
|
775
|
+
|
|
776
|
+
export const worktreeEvents = sqliteTable(
|
|
777
|
+
'worktree_events',
|
|
778
|
+
{
|
|
779
|
+
id: text('id').primaryKey(),
|
|
780
|
+
worktreeId: text('worktree_id').notNull(),
|
|
781
|
+
repoId: text('repo_id').notNull(),
|
|
782
|
+
eventType: text('event_type').notNull(),
|
|
783
|
+
status: text('status').notNull(),
|
|
784
|
+
message: text('message').notNull(),
|
|
785
|
+
dataJson: text('data_json'),
|
|
786
|
+
createdAt: text('created_at').notNull(),
|
|
787
|
+
},
|
|
788
|
+
(table) => [
|
|
789
|
+
index('idx_worktree_events_worktree').on(
|
|
790
|
+
table.worktreeId,
|
|
791
|
+
sql`${table.createdAt} DESC`,
|
|
792
|
+
),
|
|
793
|
+
],
|
|
794
|
+
);
|
|
795
|
+
|
|
796
|
+
export const worktreeCleanupAttempts = sqliteTable(
|
|
797
|
+
'worktree_cleanup_attempts',
|
|
798
|
+
{
|
|
799
|
+
id: text('id').primaryKey(),
|
|
800
|
+
worktreeId: text('worktree_id').notNull(),
|
|
801
|
+
repoId: text('repo_id').notNull(),
|
|
802
|
+
action: text('action').notNull(),
|
|
803
|
+
outcome: text('outcome').notNull(),
|
|
804
|
+
reason: text('reason').notNull(),
|
|
805
|
+
error: text('error'),
|
|
806
|
+
deleted: integer('deleted').default(0).notNull(),
|
|
807
|
+
attemptedAt: text('attempted_at').notNull(),
|
|
808
|
+
},
|
|
809
|
+
(table) => [
|
|
810
|
+
index('idx_worktree_cleanup_attempts_worktree').on(
|
|
811
|
+
table.worktreeId,
|
|
812
|
+
sql`${table.attemptedAt} DESC`,
|
|
813
|
+
),
|
|
814
|
+
],
|
|
815
|
+
);
|
|
816
|
+
|
|
817
|
+
export const preparedDiffs = sqliteTable(
|
|
818
|
+
'prepared_diffs',
|
|
819
|
+
{
|
|
820
|
+
id: text('id').primaryKey(),
|
|
821
|
+
worktreeId: text('worktree_id').notNull(),
|
|
822
|
+
repoId: text('repo_id').notNull(),
|
|
823
|
+
repoFullName: text('repo_full_name').notNull(),
|
|
824
|
+
prNumber: integer('pr_number'),
|
|
825
|
+
title: text('title').notNull(),
|
|
826
|
+
sourceWorktreePath: text('source_worktree_path').notNull(),
|
|
827
|
+
baseRef: text('base_ref').notNull(),
|
|
828
|
+
headRef: text('head_ref').notNull(),
|
|
829
|
+
headSha: text('head_sha'),
|
|
830
|
+
status: text('status').notNull(),
|
|
831
|
+
pushApprovalStatus: text('push_approval_status').notNull(),
|
|
832
|
+
verificationStatus: text('verification_status').notNull(),
|
|
833
|
+
summaryJson: text('summary_json'),
|
|
834
|
+
createdBy: text('created_by').notNull(),
|
|
835
|
+
createdAt: text('created_at').notNull(),
|
|
836
|
+
updatedAt: text('updated_at').notNull(),
|
|
837
|
+
abandonedAt: text('abandoned_at'),
|
|
838
|
+
},
|
|
839
|
+
(table) => [
|
|
840
|
+
unique().on(table.worktreeId),
|
|
841
|
+
index('idx_prepared_diffs_status').on(
|
|
842
|
+
table.status,
|
|
843
|
+
sql`${table.updatedAt} DESC`,
|
|
844
|
+
),
|
|
845
|
+
index('idx_prepared_diffs_repo').on(
|
|
846
|
+
table.repoId,
|
|
847
|
+
table.prNumber,
|
|
848
|
+
sql`${table.updatedAt} DESC`,
|
|
849
|
+
),
|
|
850
|
+
],
|
|
851
|
+
);
|
|
852
|
+
|
|
853
|
+
export const preparedDiffApprovals = sqliteTable(
|
|
854
|
+
'prepared_diff_approvals',
|
|
855
|
+
{
|
|
856
|
+
id: text('id').primaryKey(),
|
|
857
|
+
preparedDiffId: text('prepared_diff_id').notNull(),
|
|
858
|
+
worktreeId: text('worktree_id').notNull(),
|
|
859
|
+
approvalType: text('approval_type').notNull(),
|
|
860
|
+
status: text('status').notNull(),
|
|
861
|
+
targetSha: text('target_sha'),
|
|
862
|
+
policyHash: text('policy_hash'),
|
|
863
|
+
policyDecision: text('policy_decision'),
|
|
864
|
+
reason: text('reason'),
|
|
865
|
+
approverSurface: text('approver_surface'),
|
|
866
|
+
requestedAt: text('requested_at').notNull(),
|
|
867
|
+
resolvedAt: text('resolved_at'),
|
|
868
|
+
updatedAt: text('updated_at').notNull(),
|
|
869
|
+
},
|
|
870
|
+
(table) => [
|
|
871
|
+
index('idx_prepared_diff_approvals_pending').on(
|
|
872
|
+
table.status,
|
|
873
|
+
sql`${table.updatedAt} DESC`,
|
|
874
|
+
),
|
|
875
|
+
index('idx_prepared_diff_approvals_diff').on(
|
|
876
|
+
table.preparedDiffId,
|
|
877
|
+
sql`${table.updatedAt} DESC`,
|
|
878
|
+
),
|
|
879
|
+
],
|
|
880
|
+
);
|
|
881
|
+
|
|
882
|
+
export const kiloTasks = sqliteTable(
|
|
883
|
+
'kilo_tasks',
|
|
884
|
+
{
|
|
885
|
+
id: text('id').primaryKey(),
|
|
886
|
+
title: text('title').notNull(),
|
|
887
|
+
prompt: text('prompt').notNull(),
|
|
888
|
+
repoId: text('repo_id').notNull(),
|
|
889
|
+
repoFullName: text('repo_full_name').notNull(),
|
|
890
|
+
worktreeId: text('worktree_id'),
|
|
891
|
+
lockId: text('lock_id'),
|
|
892
|
+
cwd: text('cwd').notNull(),
|
|
893
|
+
mode: text('mode').notNull(),
|
|
894
|
+
status: text('status').notNull(),
|
|
895
|
+
explicitUserRequest: integer('explicit_user_request').notNull(),
|
|
896
|
+
autoEnabled: integer('auto_enabled').default(0).notNull(),
|
|
897
|
+
cliPath: text('cli_path').notNull(),
|
|
898
|
+
argsJson: text('args_json').notNull(),
|
|
899
|
+
pid: integer('pid'),
|
|
900
|
+
processStartedAt: text('process_started_at'),
|
|
901
|
+
rootSessionId: text('root_session_id'),
|
|
902
|
+
childSessionIdsJson: text('child_session_ids_json').default('[]').notNull(),
|
|
903
|
+
rawLogPath: text('raw_log_path'),
|
|
904
|
+
summary: text('summary'),
|
|
905
|
+
exitCode: integer('exit_code'),
|
|
906
|
+
error: text('error'),
|
|
907
|
+
createdAt: text('created_at').notNull(),
|
|
908
|
+
updatedAt: text('updated_at').notNull(),
|
|
909
|
+
completedAt: text('completed_at'),
|
|
910
|
+
},
|
|
911
|
+
(table) => [
|
|
912
|
+
index('idx_kilo_tasks_status').on(
|
|
913
|
+
table.status,
|
|
914
|
+
sql`${table.updatedAt} DESC`,
|
|
915
|
+
),
|
|
916
|
+
index('idx_kilo_tasks_repo').on(table.repoId, sql`${table.updatedAt} DESC`),
|
|
917
|
+
index('idx_kilo_tasks_session').on(table.rootSessionId),
|
|
918
|
+
],
|
|
919
|
+
);
|
|
920
|
+
|
|
921
|
+
export const kiloTaskEvents = sqliteTable(
|
|
922
|
+
'kilo_task_events',
|
|
923
|
+
{
|
|
924
|
+
id: text('id').primaryKey(),
|
|
925
|
+
taskId: text('task_id').notNull(),
|
|
926
|
+
eventIndex: integer('event_index').notNull(),
|
|
927
|
+
eventType: text('event_type').notNull(),
|
|
928
|
+
stream: text('stream').notNull(),
|
|
929
|
+
sessionId: text('session_id'),
|
|
930
|
+
childSessionId: text('child_session_id'),
|
|
931
|
+
summary: text('summary').notNull(),
|
|
932
|
+
dataJson: text('data_json'),
|
|
933
|
+
createdAt: text('created_at').notNull(),
|
|
934
|
+
},
|
|
935
|
+
(table) => [
|
|
936
|
+
index('idx_kilo_task_events_task').on(table.taskId, table.eventIndex),
|
|
937
|
+
],
|
|
938
|
+
);
|
|
939
|
+
|
|
940
|
+
export const kiloSessionAudit = sqliteTable(
|
|
941
|
+
'kilo_session_audit',
|
|
942
|
+
{
|
|
943
|
+
id: text('id').primaryKey(),
|
|
944
|
+
taskId: text('task_id'),
|
|
945
|
+
sessionId: text('session_id'),
|
|
946
|
+
childSessionId: text('child_session_id'),
|
|
947
|
+
readType: text('read_type').notNull(),
|
|
948
|
+
requesterSurface: text('requester_surface').notNull(),
|
|
949
|
+
reason: text('reason'),
|
|
950
|
+
limitCount: integer('limit_count'),
|
|
951
|
+
offsetCount: integer('offset_count'),
|
|
952
|
+
includeFullTranscript: integer('include_full_transcript')
|
|
953
|
+
.default(0)
|
|
954
|
+
.notNull(),
|
|
955
|
+
includeToolOutput: integer('include_tool_output').default(0).notNull(),
|
|
956
|
+
includeDiff: integer('include_diff').default(0).notNull(),
|
|
957
|
+
createdAt: text('created_at').notNull(),
|
|
958
|
+
},
|
|
959
|
+
(table) => [
|
|
960
|
+
index('idx_kilo_session_audit_session').on(
|
|
961
|
+
table.sessionId,
|
|
962
|
+
sql`${table.createdAt} DESC`,
|
|
963
|
+
),
|
|
964
|
+
],
|
|
965
|
+
);
|
|
966
|
+
|
|
967
|
+
export const kiloResultState = sqliteTable(
|
|
968
|
+
'kilo_result_state',
|
|
969
|
+
{
|
|
970
|
+
taskId: text('task_id').primaryKey(),
|
|
971
|
+
preparedDiffId: text('prepared_diff_id'),
|
|
972
|
+
classification: text('classification').notNull(),
|
|
973
|
+
verificationStatus: text('verification_status').notNull(),
|
|
974
|
+
promotionStatus: text('promotion_status').notNull(),
|
|
975
|
+
diffFingerprint: text('diff_fingerprint'),
|
|
976
|
+
verifiedDiffFingerprint: text('verified_diff_fingerprint'),
|
|
977
|
+
reviewSummaryJson: text('review_summary_json'),
|
|
978
|
+
diffSummaryJson: text('diff_summary_json'),
|
|
979
|
+
policyJson: text('policy_json'),
|
|
980
|
+
verificationJson: text('verification_json'),
|
|
981
|
+
promotionJson: text('promotion_json'),
|
|
982
|
+
pendingApprovalsJson: text('pending_approvals_json')
|
|
983
|
+
.default('[]')
|
|
984
|
+
.notNull(),
|
|
985
|
+
createdAt: text('created_at').notNull(),
|
|
986
|
+
updatedAt: text('updated_at').notNull(),
|
|
987
|
+
reviewedAt: text('reviewed_at'),
|
|
988
|
+
verifiedAt: text('verified_at'),
|
|
989
|
+
promotedAt: text('promoted_at'),
|
|
990
|
+
},
|
|
991
|
+
(table) => [
|
|
992
|
+
index('idx_kilo_result_state_updated').on(sql`${table.updatedAt} DESC`),
|
|
993
|
+
],
|
|
994
|
+
);
|
|
995
|
+
|
|
996
|
+
export const kiloResultEvents = sqliteTable(
|
|
997
|
+
'kilo_result_events',
|
|
998
|
+
{
|
|
999
|
+
id: text('id').primaryKey(),
|
|
1000
|
+
taskId: text('task_id').notNull(),
|
|
1001
|
+
eventType: text('event_type').notNull(),
|
|
1002
|
+
summary: text('summary').notNull(),
|
|
1003
|
+
dataJson: text('data_json'),
|
|
1004
|
+
createdAt: text('created_at').notNull(),
|
|
1005
|
+
},
|
|
1006
|
+
(table) => [
|
|
1007
|
+
index('idx_kilo_result_events_task').on(
|
|
1008
|
+
table.taskId,
|
|
1009
|
+
sql`${table.createdAt} DESC`,
|
|
1010
|
+
),
|
|
1011
|
+
],
|
|
1012
|
+
);
|
|
1013
|
+
|
|
1014
|
+
export const mcpToolCatalog = sqliteTable(
|
|
1015
|
+
'mcp_tool_catalog',
|
|
1016
|
+
{
|
|
1017
|
+
serverId: text('server_id').notNull(),
|
|
1018
|
+
toolName: text('tool_name').notNull(),
|
|
1019
|
+
adaptedName: text('adapted_name').notNull(),
|
|
1020
|
+
description: text('description').notNull(),
|
|
1021
|
+
inputSchemaJson: text('input_schema_json'),
|
|
1022
|
+
outputSchemaJson: text('output_schema_json'),
|
|
1023
|
+
annotationsJson: text('annotations_json'),
|
|
1024
|
+
status: text('status').notNull(),
|
|
1025
|
+
updatedAt: text('updated_at').notNull(),
|
|
1026
|
+
},
|
|
1027
|
+
(table) => [
|
|
1028
|
+
primaryKey({ columns: [table.serverId, table.toolName] }),
|
|
1029
|
+
index('idx_mcp_tool_catalog_status').on(
|
|
1030
|
+
table.serverId,
|
|
1031
|
+
table.status,
|
|
1032
|
+
sql`${table.updatedAt} DESC`,
|
|
1033
|
+
),
|
|
1034
|
+
],
|
|
1035
|
+
);
|
|
1036
|
+
|
|
1037
|
+
export const mcpToolApprovals = sqliteTable(
|
|
1038
|
+
'mcp_tool_approvals',
|
|
1039
|
+
{
|
|
1040
|
+
id: text('id').primaryKey(),
|
|
1041
|
+
serverId: text('server_id').notNull(),
|
|
1042
|
+
toolName: text('tool_name').notNull(),
|
|
1043
|
+
adaptedName: text('adapted_name').notNull(),
|
|
1044
|
+
argumentsHash: text('arguments_hash').notNull(),
|
|
1045
|
+
argumentsPreview: text('arguments_preview').notNull(),
|
|
1046
|
+
status: text('status').notNull(),
|
|
1047
|
+
approverSurface: text('approver_surface'),
|
|
1048
|
+
sessionId: text('session_id'),
|
|
1049
|
+
expiresAt: text('expires_at').notNull(),
|
|
1050
|
+
createdAt: text('created_at').notNull(),
|
|
1051
|
+
resolvedAt: text('resolved_at'),
|
|
1052
|
+
usedAt: text('used_at'),
|
|
1053
|
+
updatedAt: text('updated_at').notNull(),
|
|
1054
|
+
},
|
|
1055
|
+
(table) => [
|
|
1056
|
+
index('idx_mcp_tool_approvals_pending').on(
|
|
1057
|
+
table.serverId,
|
|
1058
|
+
table.toolName,
|
|
1059
|
+
table.adaptedName,
|
|
1060
|
+
table.argumentsHash,
|
|
1061
|
+
table.status,
|
|
1062
|
+
table.expiresAt,
|
|
1063
|
+
),
|
|
1064
|
+
],
|
|
1065
|
+
);
|
|
1066
|
+
|
|
1067
|
+
export const mcpToolAudit = sqliteTable(
|
|
1068
|
+
'mcp_tool_audit',
|
|
1069
|
+
{
|
|
1070
|
+
id: text('id').primaryKey(),
|
|
1071
|
+
serverId: text('server_id').notNull(),
|
|
1072
|
+
toolName: text('tool_name').notNull(),
|
|
1073
|
+
adaptedName: text('adapted_name').notNull(),
|
|
1074
|
+
argumentsHash: text('arguments_hash').notNull(),
|
|
1075
|
+
decision: text('decision').notNull(),
|
|
1076
|
+
approvalId: text('approval_id'),
|
|
1077
|
+
durationMs: integer('duration_ms'),
|
|
1078
|
+
ok: integer('ok').notNull(),
|
|
1079
|
+
resultPreview: text('result_preview'),
|
|
1080
|
+
error: text('error'),
|
|
1081
|
+
createdAt: text('created_at').notNull(),
|
|
1082
|
+
},
|
|
1083
|
+
(table) => [
|
|
1084
|
+
index('idx_mcp_tool_audit_created').on(sql`${table.createdAt} DESC`),
|
|
1085
|
+
],
|
|
1086
|
+
);
|
|
1087
|
+
|
|
1088
|
+
export const mcpOauthTokens = sqliteTable('mcp_oauth_tokens', {
|
|
1089
|
+
serverId: text('server_id').primaryKey(),
|
|
1090
|
+
serverIdentity: text('server_identity'),
|
|
1091
|
+
accessToken: text('access_token'),
|
|
1092
|
+
refreshToken: text('refresh_token'),
|
|
1093
|
+
tokenType: text('token_type'),
|
|
1094
|
+
idToken: text('id_token'),
|
|
1095
|
+
expiresAt: text('expires_at'),
|
|
1096
|
+
scopesJson: text('scopes_json'),
|
|
1097
|
+
clientInformationJson: text('client_information_json'),
|
|
1098
|
+
discoveryStateJson: text('discovery_state_json'),
|
|
1099
|
+
codeVerifier: text('code_verifier'),
|
|
1100
|
+
updatedAt: text('updated_at').notNull(),
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
export const mcpOauthLogins = sqliteTable('mcp_oauth_logins', {
|
|
1104
|
+
id: text('id').primaryKey(),
|
|
1105
|
+
serverId: text('server_id').notNull(),
|
|
1106
|
+
serverIdentity: text('server_identity'),
|
|
1107
|
+
state: text('state').notNull(),
|
|
1108
|
+
status: text('status').notNull(),
|
|
1109
|
+
redirectUrl: text('redirect_url').notNull(),
|
|
1110
|
+
authorizationUrl: text('authorization_url'),
|
|
1111
|
+
discoveryStateJson: text('discovery_state_json'),
|
|
1112
|
+
codeVerifier: text('code_verifier'),
|
|
1113
|
+
error: text('error'),
|
|
1114
|
+
createdAt: text('created_at').notNull(),
|
|
1115
|
+
expiresAt: text('expires_at').notNull(),
|
|
1116
|
+
completedAt: text('completed_at'),
|
|
1117
|
+
updatedAt: text('updated_at').notNull(),
|
|
1118
|
+
});
|