neondeck 1.0.0-beta.11 → 1.0.0-beta.12
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 +12 -0
- package/DEVELOPMENT.md +13 -3
- package/README.md +4 -2
- package/dist/assets/{app-DjGMCarC.js → app-DhszYlGY.js} +89 -63
- package/dist/assets/app-DhszYlGY.js.map +1 -0
- package/dist/assets/{autopilot-C7Seq7MQ.js → autopilot-qL87yC9q.js} +866 -452
- package/dist/assets/{autopilot-C7Seq7MQ.js.map → autopilot-qL87yC9q.js.map} +1 -1
- package/dist/assets/{briefing-BGhPu0Wh.js → briefing-4ghcw_tK.js} +4 -4
- package/dist/assets/{briefing-BGhPu0Wh.js.map → briefing-4ghcw_tK.js.map} +1 -1
- package/dist/assets/briefing-SGxGRVRL.js +2 -0
- package/dist/assets/{briefings-B4ZhXUT7.js → briefings-CV-cUM_O.js} +5 -5
- package/dist/assets/{briefings-B4ZhXUT7.js.map → briefings-CV-cUM_O.js.map} +1 -1
- package/dist/assets/command-run-BhphThZX.js +2 -0
- package/dist/assets/{command-run-BM9AIZ0u.js → command-run-BrDX5_VE.js} +4 -4
- package/dist/assets/{command-run-BM9AIZ0u.js.map → command-run-BrDX5_VE.js.map} +1 -1
- package/dist/assets/{display-assistant-MSQdleWE.js → display-assistant-D89G_m7U.js} +4 -4
- package/dist/assets/{display-assistant-MSQdleWE.js.map → display-assistant-D89G_m7U.js.map} +1 -1
- package/dist/assets/{fix-pr-ci-a8lh_xI8.js → fix-pr-ci-Bjxeo0BH.js} +2 -2
- package/dist/assets/{fix-pr-ci-a8lh_xI8.js.map → fix-pr-ci-Bjxeo0BH.js.map} +1 -1
- package/dist/assets/fix-pr-ci-CaiDwBsb.js +2 -0
- package/dist/assets/{pr-reviews-DTiVoXi5.js → pr-reviews-D9WKKo88.js} +3 -3
- package/dist/assets/{pr-reviews-DTiVoXi5.js.map → pr-reviews-D9WKKo88.js.map} +1 -1
- package/dist/assets/{prepare-pr-worktree-SnFRzzNT.js → prepare-pr-worktree-B6CLKWdC.js} +1 -1
- package/dist/assets/{prepare-pr-worktree-Bs5LdxTk.js → prepare-pr-worktree-Dgqn7Brv.js} +3 -3
- package/dist/assets/{prepare-pr-worktree-Bs5LdxTk.js.map → prepare-pr-worktree-Dgqn7Brv.js.map} +1 -1
- package/dist/assets/{push-pr-autofix-DIunWa6R.js → push-pr-autofix-C9KLnjoU.js} +3 -3
- package/dist/assets/{push-pr-autofix-DIunWa6R.js.map → push-pr-autofix-C9KLnjoU.js.map} +1 -1
- package/dist/assets/{push-pr-autofix-BX3Ji9vv.js → push-pr-autofix-CMQ8kUPx.js} +1 -1
- package/dist/assets/{review-pr-for-human-f7K5R0uO.js → review-pr-for-human-BjXpLPrj.js} +3 -3
- package/dist/assets/{review-pr-for-human-f7K5R0uO.js.map → review-pr-for-human-BjXpLPrj.js.map} +1 -1
- package/dist/assets/{review-pr-for-human-BOzLt8j9.js → review-pr-for-human-DQEL1Xdb.js} +1 -1
- package/dist/assets/{safety-k3tFk-rE.js → safety-xidMjA2t.js} +34 -40
- package/dist/assets/safety-xidMjA2t.js.map +1 -0
- package/dist/assets/{scheduled-agent-instruction-vEVvuicq.js → scheduled-agent-instruction-CwKi-cmU.js} +3 -3
- package/dist/assets/{scheduled-agent-instruction-vEVvuicq.js.map → scheduled-agent-instruction-CwKi-cmU.js.map} +1 -1
- package/dist/assets/{scheduled-agent-instruction-ZV7gDyD8.js → scheduled-agent-instruction-D9VUoUP7.js} +1 -1
- package/dist/assets/{scheduler-tick-4Wyi0Qje.js → scheduler-tick-Dd4mFuvf.js} +4 -4
- package/dist/assets/{scheduler-tick-4Wyi0Qje.js.map → scheduler-tick-Dd4mFuvf.js.map} +1 -1
- package/dist/assets/{scheduler-workflow-DjVtmzL8.js → scheduler-workflow-BYcpXx98.js} +2 -2
- package/dist/assets/{scheduler-workflow-DjVtmzL8.js.map → scheduler-workflow-BYcpXx98.js.map} +1 -1
- package/dist/assets/{triage-pr-event-DLQRw0bX.js → triage-pr-event-CNCKwy10.js} +3 -3
- package/dist/assets/{triage-pr-event-DLQRw0bX.js.map → triage-pr-event-CNCKwy10.js.map} +1 -1
- package/dist/assets/{triage-pr-event-DVCugfMK.js → triage-pr-event-D1BSyKy4.js} +1 -1
- package/dist/assets/{verify-then-push-pr-autofix-Bh76Yuup.js → verify-then-push-pr-autofix-CE9Dr9dr.js} +3 -3
- package/dist/assets/{verify-then-push-pr-autofix-Bh76Yuup.js.map → verify-then-push-pr-autofix-CE9Dr9dr.js.map} +1 -1
- package/dist/assets/{verify-then-push-pr-autofix-KZ9tpGV9.js → verify-then-push-pr-autofix-CH7Zuu-o.js} +1 -1
- package/dist/server.mjs +38 -14
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
- package/src/db.ts +2 -0
- package/src/domains/mcp/config.ts +4 -4
- package/src/domains/mcp/oauth.ts +14 -14
- package/src/domains/mcp/store.ts +16 -16
- package/src/lib/node-sqlite-defaults.ts +37 -0
- package/src/lib/sqlite.ts +74 -7
- package/src/modules/autopilot/admissions.ts +5 -5
- package/src/modules/autopilot/comments.ts +8 -5
- package/src/modules/autopilot/fixtures.ts +2 -0
- package/src/modules/autopilot/push.ts +1 -0
- package/src/modules/autopilot/schemas.ts +3 -0
- package/src/modules/autopilot/state-mappers.ts +1 -1
- package/src/modules/autopilot/state-schemas.ts +1 -1
- package/src/modules/autopilot/state-store.ts +4 -4
- package/src/modules/autopilot/state.ts +1 -1
- package/src/modules/autopilot-policy/risk.ts +2 -2
- package/src/modules/execution/approvals.ts +56 -59
- package/src/modules/execution/store.ts +136 -1
- package/src/modules/execution-policy/index.ts +24 -1
- package/src/modules/github/comments.ts +39 -0
- package/src/modules/github/index.ts +1 -0
- package/src/modules/github/schemas.ts +4 -0
- package/src/modules/kilo/docs-drift-boundary.ts +3 -3
- package/src/modules/kilo/notifications.ts +2 -2
- package/src/modules/kilo/process.ts +38 -22
- package/src/modules/kilo/service.ts +53 -36
- package/src/modules/kilo/sessions-adapters.ts +3 -2
- package/src/modules/kilo/sessions.ts +2 -2
- package/src/modules/kilo/store.ts +17 -16
- package/src/modules/learning/automation-health.ts +3 -2
- package/src/modules/learning/observability.ts +30 -3
- package/src/modules/learning/operator.ts +3 -2
- package/src/modules/learning/reviews/events.ts +3 -3
- package/src/modules/learning/reviews/pr-cadence.ts +4 -3
- package/src/modules/learning/reviews/pr-context.ts +6 -6
- package/src/modules/learning/reviews/store.ts +9 -8
- package/src/modules/learning/skill-patches/service.ts +247 -147
- package/src/modules/learning/skill-patches/support.ts +12 -1
- package/src/modules/memory/candidates.ts +5 -5
- package/src/modules/memory/prompt.ts +3 -3
- package/src/modules/memory/service.ts +9 -9
- package/src/modules/memory/store.ts +1 -1
- package/src/modules/pr-events/schemas.ts +4 -1
- package/src/modules/pr-events/service.ts +51 -2
- package/src/modules/pr-events/target.ts +1 -1
- package/src/modules/pr-events/utils.ts +1 -1
- package/src/modules/pr-events/watermarks.ts +4 -4
- package/src/modules/prepared-diffs/service.ts +64 -26
- package/src/modules/prepared-diffs/store.ts +206 -48
- package/src/modules/review-surfaces/registry.ts +11 -11
- package/src/modules/runtime/status-database.ts +4 -3
- package/src/modules/scheduled-tasks/store.ts +46 -11
- package/src/modules/scheduler/lease.ts +5 -25
- package/src/modules/scheduler/schemas.ts +2 -0
- package/src/modules/scheduler/service.ts +44 -26
- package/src/modules/sessions/approval-nudges.ts +18 -16
- package/src/modules/sessions/service.ts +1 -1
- package/src/modules/sessions/store.ts +1 -1
- package/src/modules/watches/store.ts +10 -10
- package/src/modules/worktrees/locks.ts +77 -67
- package/src/modules/worktrees/service.ts +46 -0
- package/src/modules/worktrees/store.ts +9 -9
- package/src/repo-edit/actions.ts +1 -0
- package/src/repo-edit/audit.ts +3 -3
- package/src/repo-edit/git.ts +12 -2
- package/src/repo-edit/support.ts +3 -3
- package/src/runtime-home/app-db/index.ts +3 -5
- package/src/runtime-home/app-db/migrate.ts +8 -2
- package/src/runtime-home/app-db/reconcile.ts +1 -1
- package/src/server/learning-hooks.ts +21 -6
- package/src/server/scheduler-workflow.ts +61 -29
- package/web/dist/assets/GitHubPrReview-BU27jKvJ.js +3 -0
- package/web/dist/assets/{PrReviewPopoutPage-B9a9tX1D.js → PrReviewPopoutPage-BiUQ-kvi.js} +1 -1
- package/web/dist/assets/{ReviewRefreshNotice-DxaO1z1x.js → ReviewRefreshNotice-Ce66m5o-.js} +8 -8
- package/web/dist/assets/{index-BlSVj3KT.js → index-A09xBuzp.js} +3 -3
- package/web/dist/assets/{index-BD-UkEbG.css → index-DlAdcBKg.css} +1 -1
- package/web/dist/assets/{surfaces-BNBriVDH.js → surfaces-DLxDc3d3.js} +2 -2
- package/web/dist/index.html +2 -2
- package/dist/assets/app-DjGMCarC.js.map +0 -1
- package/dist/assets/briefing-DVT6jbBd.js +0 -2
- package/dist/assets/command-run-D7GnUbf3.js +0 -2
- package/dist/assets/fix-pr-ci-DY7lfh-G.js +0 -2
- package/dist/assets/safety-k3tFk-rE.js.map +0 -1
- package/web/dist/assets/GitHubPrReview-D4vqdez9.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157](https://github.com/pandemicsyn/neondeck/pull/157) [`48425a6`](https://github.com/pandemicsyn/neondeck/commit/48425a6d7274931d34b4f4468d1aec5f48ef56b8) Thanks [@pandemicsyn](https://github.com/pandemicsyn)! - Keep Phase B review navigation, findings, promotions, refresh, and mounted surface state consistent across slow requests, event-stream outages, and concurrent actions.
|
|
8
|
+
|
|
9
|
+
- [#159](https://github.com/pandemicsyn/neondeck/pull/159) [`3840128`](https://github.com/pandemicsyn/neondeck/commit/3840128277c83aeb40c8561a6f80b821ca081303) Thanks [@pandemicsyn](https://github.com/pandemicsyn)! - Run the app database in WAL mode and harden scheduler leases, workflow settlement, recovery, and SQLite diagnostics against lock contention and partial persistence failures.
|
|
10
|
+
|
|
11
|
+
- [#160](https://github.com/pandemicsyn/neondeck/pull/160) [`2134a32`](https://github.com/pandemicsyn/neondeck/commit/2134a32ee4a8fc5979ab2675692e53971990a901) Thanks [@pandemicsyn](https://github.com/pandemicsyn)! - Harden SQLite contention handling, Kilo cancellation, exact-commit pushes, idempotent autofix comments, unattended GitHub command policy, and concurrent skill-patch decisions.
|
|
12
|
+
|
|
13
|
+
- [#161](https://github.com/pandemicsyn/neondeck/pull/161) [`85ab780`](https://github.com/pandemicsyn/neondeck/commit/85ab780411bd105fec8075c8c1a8b931791f1b05) Thanks [@pandemicsyn](https://github.com/pandemicsyn)! - Prevent duplicate approval dispatches, serialize worktree cleanup with active workflows, and record approval nudges before Flue accepts them.
|
|
14
|
+
|
|
3
15
|
## 1.0.0-beta.11
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/DEVELOPMENT.md
CHANGED
|
@@ -81,6 +81,11 @@ The runtime home contains `.env`, `config.json`, `mcp.json`, `repos.json`,
|
|
|
81
81
|
`data/neondeck.db` and `data/flue.db` databases. Neondeck app database
|
|
82
82
|
migrations are shipped with the package and auto-apply before app code touches
|
|
83
83
|
`data/neondeck.db`; pre-migration backups are kept under `data/backups/`.
|
|
84
|
+
Production app-state connections must be opened through `src/lib/sqlite.ts` so
|
|
85
|
+
they share the configured busy timeout and foreign-key enforcement. The Flue
|
|
86
|
+
adapter keeps its separate database and receives the same busy timeout through
|
|
87
|
+
the startup hook in `src/db.ts`. Raw `DatabaseSync` construction is reserved for
|
|
88
|
+
the shared gateway and the migration boundary.
|
|
84
89
|
|
|
85
90
|
Initialize or validate the runtime home explicitly without starting the server:
|
|
86
91
|
|
|
@@ -160,6 +165,7 @@ Individual checks:
|
|
|
160
165
|
npm run lint
|
|
161
166
|
npm run typecheck
|
|
162
167
|
npm run test
|
|
168
|
+
npm run test:git
|
|
163
169
|
npm run test:integration
|
|
164
170
|
npm run test:all
|
|
165
171
|
npm run format:check
|
|
@@ -174,8 +180,9 @@ npm run verify
|
|
|
174
180
|
|
|
175
181
|
`npm run check` is the fast local loop: lint, import-layer check, database
|
|
176
182
|
migration check, typecheck, and the unit Vitest suite. The slower
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
serial Git/performance/docs-drift group lives under `npm run test:git`; the
|
|
184
|
+
workflow-heavy worktree/Kilo/autopilot group lives under
|
|
185
|
+
`npm run test:integration`. `npm run test:all` runs every Vitest suite.
|
|
179
186
|
`npm run verify` keeps the full pre-release path: lint, import-layer check,
|
|
180
187
|
database migration check, typecheck, all tests, production builds, npm package
|
|
181
188
|
smoke checks, and format check.
|
|
@@ -253,7 +260,10 @@ Use `patch` for fixes, `minor` for features, and `major` for breaking changes.
|
|
|
253
260
|
The private docs workspace is excluded from package versioning. The committed
|
|
254
261
|
Changesets prerelease state keeps versions on the beta channel. After changesets
|
|
255
262
|
reach `main`, `.github/workflows/changesets.yml` creates or updates a version PR
|
|
256
|
-
containing the package version,
|
|
263
|
+
containing the package version, changelog, and Changesets release bookkeeping.
|
|
264
|
+
The exact file set depends on release mode: a prerelease update may retain the
|
|
265
|
+
individual Changeset files and update `.changeset/pre.json`, while a stable
|
|
266
|
+
version may consume Changesets or update lockfile metadata.
|
|
257
267
|
|
|
258
268
|
Merge the version PR, pull `main`, then tag and push the exact package version:
|
|
259
269
|
|
package/README.md
CHANGED
|
@@ -23,8 +23,10 @@ Neon watches your PRs, prepares fixes, and keeps the busywork moving.
|
|
|
23
23
|
prepare a fix in an isolated worktree, run checks, and hand you the diff or
|
|
24
24
|
push it when repo policy allows.
|
|
25
25
|
- **Review and approve PRs on the deck.** Read diffs, leave inline comments,
|
|
26
|
-
resolve threads,
|
|
27
|
-
|
|
26
|
+
resolve threads, traverse files, hunks, drafts, threads, and revision-bound
|
|
27
|
+
Neon findings, and submit approvals or change requests without switching to
|
|
28
|
+
github.com. Findings can be dismissed locally or explicitly promoted into
|
|
29
|
+
the existing draft/revision workflow without silently submitting anything.
|
|
28
30
|
- **Handoff, both directions.** Delegate work to agents like Kilo or Codex, then
|
|
29
31
|
let the finished PR come back to Neon for checks and deployment follow-through.
|
|
30
32
|
- **Conversational briefings and scheduled instructions.** Neon grounds a
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as readLearningOperatorState, $a as
|
|
2
|
-
import { a as readBriefingState, c as settleBriefingObservation, i as readBriefingRunDetails, l as updateBriefingProfile, o as rotateBriefingSession, r as linkBriefingWorkflowObservation, s as runBriefingNow } from "./briefings-
|
|
3
|
-
import { a as recentPrReviews, c as reservePrReviewSubmission, d as readPrReview, f as readPrReviewForTarget, h as subscribePrReviewEvents, i as failPrReview, l as startPrReview, m as formatPrReviewServerSentEvent, n as beginPrReviewSubmissionAttempt, o as reconcilePrReviewSubmission, s as releasePrReviewSubmission, t as attachPrReviewAttemptRun, u as submitPrReview } from "./pr-reviews-
|
|
4
|
-
import {
|
|
5
|
-
import { a as review_conversation_for_learning_default, r as review_pr_batch_for_learning_default, s as curate_learning_store_default, t as scheduler_tick_default } from "./scheduler-tick-
|
|
1
|
+
import { $ as readLearningOperatorState, $a as parseAppConfig, $i as subscribeConfigEvents, $r as listMcpApprovals, $t as getGitHubPrFileDiff, A as readReport, Aa as addNotification, Ai as linkChatSessionContext, An as createAgentInstructionTask, At as promoteKiloResult, Ba as installFlueExecutionContextTracker, Bi as subscribeChatSessionCommandEvents, Bt as readRepoDiff, Ca as runPreparedDiffVerification, Ci as listChatSessions, Cn as removePrWatch, Cr as readHostMetrics, Ct as searchKiloSessions, D as fixPrReviewFeedback, Da as addWorkflowSummary, Di as archiveChatSession, Dr as localApiTokenQueryParam, E as commentPrAutofixResult, Ea as subscribeReviewSourceRevisionEvents, Ei as searchChatSessions, Er as localApiTokenMatches, Fa as subscribeNotificationEvents, Fi as switchChatSession, Fn as setTaskEnabled, Fr as loadRuntimeSkill, Ft as fixPrCiFailure, Ga as loadNeondeckEnv, Gi as listMemoryCandidates, Gr as completeMcpOAuthCallback, Gt as listRepoEditEvents, Ha as isRegisteredProvider, Ht as replaceRepoFile, I as recordConversationTurnAndMaybeQueueLearning, Ii as updateChatSessionCommandEvent, Ir as reloadRuntimeSkills, J as rejectSkillPatchCandidate, Ja as ensureRuntimeHome, Ji as listMemoryEvents, Jr as startMcpOAuthLogin, K as applySkillPatchCandidate, Ki as archiveMemory, Kn as settleScheduledTaskWorkflowRun, Kr as logoutMcpOAuthServer, Kt as pushPrAutofix, L as recordHandledPrFromWorkflowResult, La as nonEmptyStringSchema, Li as formatChatSessionCommandServerSentEvent, Ma as markNotificationRead, Mi as pinChatSession, Mn as listTaskRecords, Mt as verifyKiloResult, Na as resolveNotification, Ni as renameChatSession, Nn as readTaskRecord, Nr as readRuntimeStatus, Nt as recordDocsDriftFixTaskBoundary, Oa as listWorkflowSummaries, Oi as createChatSession, Or as readLocalApiToken, Pa as formatNotificationServerSentEvent, Pi as restoreChatSession, Pn as removeTask, Pr as listRuntimeSkills, Qa as ConfigValidationError, Qi as replayConfigEventsAfter, Qn as syncExeDevCheckout, Qr as updateMcpServer, Qt as getGitHubPrEventState, Ra as parseInput, Ri as formatChatSessionServerSentEvent, Rt as patchRepoFiles, Sa as requestPreparedDiffRevision, Si as refreshChatSessionSummary, Sn as listRefWatches, St as readUnavailableSessionAdapter, T as approvePreparedDiffPushWithPolicy, Ta as formatReviewSourceRevisionServerSentEvent, Ti as readChatSessionMessages, Tn as resolvePrReference, Tr as localApiAuthHeader, Ua as providerRuntimeRegistrations, Ur as getMcpRegistry, Ut as searchRepoFiles, Vi as subscribeChatSessionEvents, Vt as readRepoFile, Wa as readProviderConfigSync, Wi as decideMemoryCandidate, Wt as writeRepoFile, Xa as readRuntimeJson, Xi as readNeonSessionState, Xn as verifyPrWorktree, Xr as removeMcpServer, Xt as deleteGitHubPrReviewDraftComment, Y as restoreSkillPatchCandidate, Ya as ensureRuntimeHomeSync, Yi as upsertMemory, Yn as preparePrWorktree, Yr as addMcpServer, Yt as deleteGitHubPrReviewDraft, Zi as formatConfigServerSentEvent, Zr as setMcpServerEnabled, Zt as getGitHubPrBranchPermissions, _a as openPreparedDiffWorktree, _r as reloadConfig, an as patchGitHubPrReviewDraftComment, ao as rollbackQuietly, at as listLearningReviews, ba as readPreparedDiffFileDiff, bt as readKiloSessionDiff, c as abandonPreparedDiffWithRevisionAbort, ca as cleanupWorktrees, cn as postGitHubPrReviewDraftComment, co as invalidInputAction, d as failAutopilotAdmission, da as readWorktreeStatus, dn as putGitHubPrReviewDraft, dr as updateProviderConfig, dt as listKiloTasks, ei as listMcpAudit, en as getGitHubPrFiles, eo as parseDashboardConfig, er as runApprovedExecution, et as expireWorkflowRunObservation, f as recordAutopilotAdmissionRun, fa as releaseWorktreeLock, fn as refreshPrWatchEventState, fo as __require, fr as updateAgentModels, ft as readKiloTaskDiff, ga as listPreparedDiffs, gr as updateDashboardLayout, gt as startKiloTask, h as settleAutopilotAdmissionTriage, hr as applyDashboardPreset, ht as readKiloTaskStatus, i as runAutopilotRecoveryAction, ia as repoFullName, ii as getGitHubPullRequest, in as listPrWatchEventWatermarks, io as openDb, ir as checkExecutionPolicy, it as attachLearningReviewRunId, j as readReportHtml, ja as listNotifications, ji as listChatSessionCommandEvents, jn as createBriefingTask, jt as reviewKiloResult, k as listReports, ka as setWorkflowSummaryRunId, ki as createChatSessionCommandEvent, kt as listKiloResultStates, l as runPreparedDiffRevision, la as createWorktree, ln as postGitHubPrThreadReply, lo as okAction, lr as updateRepoAutopilotPolicy, m as settleAutopilotAdmissionPrepare, mr as updateExecutionPolicy, mt as readKiloTaskSessions, na as readRepoHealthSnapshot, nn as getGitHubPrReviewDraft, nr as requestExecutionApproval, nt as recordFlueObservation, o as readAutopilotState, oi as listGitHubPrQueue, on as postGitHubPrComment, oo as asJsonValue, p as recordAutopilotAdmissionTerminalFact, pa as syncWorktree, pr as updateWorktreePolicy, pt as readKiloTaskEvents, q as listSkillPatchCandidates, qi as listMemories, qr as readPublicMcpOAuthLogin, r as readAutopilotRecoveryOptions, ra as readRepoRegistrySnapshot, rn as getGitHubPrReviewThreads, ro as isSqliteBusy, rr as resolveExecutionApproval, rt as loadAutomationLearningMemoryContext, s as autopilotStateSchema, sa as listWorktrees, sn as postGitHubPrReview, so as failedAction, sr as readExecutionPolicy, ti as resolveMcpApprovalWithPaths, tn as getGitHubPrRequestedChanges, to as runtimePaths, tr as listExecutionApprovals, tt as readWorkflowObservability, u as beginAutopilotAdmissionPrepare, ua as lockWorktree, un as postGitHubPrThreadResolution, uo as __commonJSMin, ur as readProviderConfig, ut as abortKiloTask, vn as addPrWatch, vr as triagePrEvent, vt as readKiloSession, wa as readApprovalRecord, wi as readChatSession, wn as setPrWatchPolling, wr as bearerToken, xa as readPreparedDiffSummary, xi as referenceChatSession, xn as listPrWatches, xt as readKiloSessionMessages, ya as readPreparedDiffChangedFiles, yi as listChatSessionActivity, yn as addRefWatch, yt as readKiloSessionChildren, zt as readRepoCheckoutStatus } from "./autopilot-qL87yC9q.js";
|
|
2
|
+
import { a as readBriefingState, c as settleBriefingObservation, i as readBriefingRunDetails, l as updateBriefingProfile, o as rotateBriefingSession, r as linkBriefingWorkflowObservation, s as runBriefingNow } from "./briefings-CV-cUM_O.js";
|
|
3
|
+
import { a as recentPrReviews, c as reservePrReviewSubmission, d as readPrReview, f as readPrReviewForTarget, h as subscribePrReviewEvents, i as failPrReview, l as startPrReview, m as formatPrReviewServerSentEvent, n as beginPrReviewSubmissionAttempt, o as reconcilePrReviewSubmission, s as releasePrReviewSubmission, t as attachPrReviewAttemptRun, u as submitPrReview } from "./pr-reviews-D9WKKo88.js";
|
|
4
|
+
import { C as supportedCommands, _ as reviewSurfaceFindingsDismissSchema, a as runSchedulerTick, b as reviewSurfaceSnapshotSchema, d as ReviewSurfaceFindingPromotionService, f as formatReviewSurfaceServerSentEvent, g as reviewSurfaceFindingsClearSchema, h as reviewSurfaceFindingsApplySchema, l as localApiFindingProvenance, m as reviewSurfaceFindingPromoteSchema, n as readSafetyPolicy, o as readMetadataValue, p as reviewSurfaceRegistry, u as stampReviewFindingSubmissions, v as reviewSurfaceNavigationAckInputSchema, y as reviewSurfaceNavigationRequestSchema } from "./safety-xidMjA2t.js";
|
|
5
|
+
import { a as review_conversation_for_learning_default, r as review_pr_batch_for_learning_default, s as curate_learning_store_default, t as scheduler_tick_default } from "./scheduler-tick-Dd4mFuvf.js";
|
|
6
6
|
import { t as REPORT_DECK_CONTROLLER_SOURCE } from "./report-deck-controller-DknwLLOh.js";
|
|
7
7
|
import { getRun, invoke, listRuns, observe, registerProvider } from "@flue/runtime";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -11,7 +11,6 @@ import { existsSync } from "node:fs";
|
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
12
12
|
import "node:path";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
|
-
import { DatabaseSync } from "node:sqlite";
|
|
15
14
|
import { flue } from "@flue/runtime/routing";
|
|
16
15
|
import { Hono } from "hono";
|
|
17
16
|
//#region node_modules/@hono/node-server/dist/utils/stream.cjs
|
|
@@ -378,7 +377,10 @@ function createEventStreamRoutes(dependencies = defaultDependencies) {
|
|
|
378
377
|
var observationHandlerUnsubscribers = /* @__PURE__ */ new Map();
|
|
379
378
|
function installFlueObservationHandlers(paths, dependencies = {}) {
|
|
380
379
|
if (observationHandlerUnsubscribers.has(paths.home)) return;
|
|
381
|
-
const
|
|
380
|
+
const observeFn = dependencies.observe ?? observe;
|
|
381
|
+
const recordObservation = dependencies.recordFlueObservation ?? recordFlueObservation;
|
|
382
|
+
const settleScheduledWorkflow = dependencies.settleScheduledTaskWorkflowRun ?? settleScheduledTaskWorkflowRun;
|
|
383
|
+
const unsubscribe = observeFn((event, context) => {
|
|
382
384
|
const contextHome = flueContextRuntimeHome(context);
|
|
383
385
|
if (contextHome && contextHome !== paths.home) return;
|
|
384
386
|
if (event.type === "run_start") try {
|
|
@@ -387,29 +389,31 @@ function installFlueObservationHandlers(paths, dependencies = {}) {
|
|
|
387
389
|
console.error("[neondeck] failed to link PR review run", error);
|
|
388
390
|
}
|
|
389
391
|
if (event.type === "run_end") {
|
|
390
|
-
|
|
392
|
+
recordObservation(event, paths).catch((error) => {
|
|
393
|
+
console.error("[neondeck] failed to record Flue observation", error);
|
|
394
|
+
});
|
|
395
|
+
settleScheduledWorkflow({
|
|
396
|
+
workflowRunId: event.runId,
|
|
397
|
+
failed: event.isError
|
|
398
|
+
}, paths).catch((error) => {
|
|
399
|
+
console.error("[neondeck] failed to settle scheduled workflow run", error);
|
|
400
|
+
});
|
|
401
|
+
Promise.resolve().then(async () => {
|
|
391
402
|
const terminalFact = autopilotTerminalFact(event);
|
|
392
403
|
if (terminalFact) await recordAutopilotAdmissionTerminalFact({
|
|
393
404
|
runId: event.runId,
|
|
394
405
|
fact: terminalFact
|
|
395
406
|
}, paths);
|
|
396
|
-
}).then(() => Promise.all([
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
settleAutopilotAdmissionPrepare({
|
|
407
|
-
runId: event.runId,
|
|
408
|
-
failed: terminalActionFailed(event),
|
|
409
|
-
worktreeId: prepareWorktreeId(event)
|
|
410
|
-
}, paths)
|
|
411
|
-
])).then(() => startPrepareAfterTriage(event, paths)).catch((error) => {
|
|
412
|
-
console.error("[neondeck] failed to record or settle Flue observation", error);
|
|
407
|
+
}).then(() => Promise.all([settleAutopilotAdmissionTriage({
|
|
408
|
+
runId: event.runId,
|
|
409
|
+
failed: terminalActionFailed(event),
|
|
410
|
+
shouldPrepare: triageRequestsPrepare(event)
|
|
411
|
+
}, paths), settleAutopilotAdmissionPrepare({
|
|
412
|
+
runId: event.runId,
|
|
413
|
+
failed: terminalActionFailed(event),
|
|
414
|
+
worktreeId: prepareWorktreeId(event)
|
|
415
|
+
}, paths)])).then(() => startPrepareAfterTriage(event, paths)).catch((error) => {
|
|
416
|
+
console.error("[neondeck] failed to settle autopilot Flue observation", error);
|
|
413
417
|
});
|
|
414
418
|
attachCommandRunSummaryRunId(event, paths).catch((error) => {
|
|
415
419
|
console.error("[neondeck] failed to attach Flue run id", error);
|
|
@@ -500,7 +504,7 @@ async function startPrepareAfterTriage(event, paths) {
|
|
|
500
504
|
const admission = await beginAutopilotAdmissionPrepare({ triageRunId: event.runId }, paths);
|
|
501
505
|
if (!admission) return;
|
|
502
506
|
try {
|
|
503
|
-
const { runId } = await invoke((await import("./prepare-pr-worktree-
|
|
507
|
+
const { runId } = await invoke((await import("./prepare-pr-worktree-B6CLKWdC.js")).default, { input: {
|
|
504
508
|
repoId: admission.repoId,
|
|
505
509
|
prNumber: admission.prNumber,
|
|
506
510
|
eventId: admission.eventFingerprint,
|
|
@@ -703,7 +707,7 @@ async function dispatchApprovedPreparedDiffPush(approval, paths, dependencies) {
|
|
|
703
707
|
try {
|
|
704
708
|
receipt = await invokeWorkflowForRuntimeHome(paths, dispatch, invokeWorkflow);
|
|
705
709
|
} catch (error) {
|
|
706
|
-
const message = errorMessage$
|
|
710
|
+
const message = errorMessage$3(error);
|
|
707
711
|
await recordDispatchFailure(preparedDiff, mode, dispatch, approvalId, message, paths);
|
|
708
712
|
return {
|
|
709
713
|
...withDispatchData(approval, {
|
|
@@ -734,7 +738,7 @@ async function dispatchApprovedPreparedDiffPush(approval, paths, dependencies) {
|
|
|
734
738
|
dispatchedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
735
739
|
}
|
|
736
740
|
}, paths).catch(async (error) => {
|
|
737
|
-
const message = errorMessage$
|
|
741
|
+
const message = errorMessage$3(error);
|
|
738
742
|
await recordDispatchSummaryFailure(preparedDiff, mode, dispatch, approvalId, receipt.runId, message, paths);
|
|
739
743
|
return null;
|
|
740
744
|
});
|
|
@@ -783,8 +787,8 @@ async function invokeWorkflowForRuntimeHome(paths, dispatch, invokeWorkflow) {
|
|
|
783
787
|
return invokeWorkflow(dispatch.workflow, dispatch.input);
|
|
784
788
|
}
|
|
785
789
|
async function invokeAutopilotWorkflow(workflow, input) {
|
|
786
|
-
if (workflow === "push-pr-autofix") return invokeWorkflow((await import("./push-pr-autofix-
|
|
787
|
-
return invokeWorkflow((await import("./verify-then-push-pr-autofix-
|
|
790
|
+
if (workflow === "push-pr-autofix") return invokeWorkflow((await import("./push-pr-autofix-CMQ8kUPx.js")).default, { input });
|
|
791
|
+
return invokeWorkflow((await import("./verify-then-push-pr-autofix-CH7Zuu-o.js")).default, { input });
|
|
788
792
|
}
|
|
789
793
|
async function recordDispatchFailure(preparedDiff, mode, dispatch, approvalId, error, paths) {
|
|
790
794
|
await addWorkflowSummary({
|
|
@@ -841,7 +845,7 @@ async function recordDispatchSummaryFailure(preparedDiff, mode, dispatch, approv
|
|
|
841
845
|
async function invokeWorkflow(workflow, request) {
|
|
842
846
|
return invoke(workflow, request);
|
|
843
847
|
}
|
|
844
|
-
function errorMessage$
|
|
848
|
+
function errorMessage$3(error) {
|
|
845
849
|
return error instanceof Error ? error.message : String(error);
|
|
846
850
|
}
|
|
847
851
|
function withDispatchData(approval, dispatch, message) {
|
|
@@ -1686,7 +1690,7 @@ async function registerHandoffPr(rawInput, paths = runtimePaths(), dependencies
|
|
|
1686
1690
|
queued: true
|
|
1687
1691
|
});
|
|
1688
1692
|
} catch (error) {
|
|
1689
|
-
const message = errorMessage$
|
|
1693
|
+
const message = errorMessage$2(error);
|
|
1690
1694
|
const audit = await addHandoffAudit({
|
|
1691
1695
|
event: "register-pr",
|
|
1692
1696
|
source,
|
|
@@ -1780,7 +1784,7 @@ async function externalReviewQueueAllowed(paths) {
|
|
|
1780
1784
|
}
|
|
1781
1785
|
async function invokeReviewPrWorkflow(input) {
|
|
1782
1786
|
const { invoke } = await import("@flue/runtime");
|
|
1783
|
-
return invoke((await import("./review-pr-for-human-
|
|
1787
|
+
return invoke((await import("./review-pr-for-human-DQEL1Xdb.js")).default, { input });
|
|
1784
1788
|
}
|
|
1785
1789
|
async function addHandoffAudit(summary, paths, options = {}) {
|
|
1786
1790
|
return addWorkflowSummary({
|
|
@@ -1825,7 +1829,7 @@ function failResult(action, message, data = {}) {
|
|
|
1825
1829
|
function displaySource(source) {
|
|
1826
1830
|
return source.replace(/^(?:external|ci):/, "");
|
|
1827
1831
|
}
|
|
1828
|
-
function errorMessage$
|
|
1832
|
+
function errorMessage$2(error) {
|
|
1829
1833
|
if (error instanceof Error) return error.message;
|
|
1830
1834
|
return String(error);
|
|
1831
1835
|
}
|
|
@@ -2681,9 +2685,9 @@ async function stageDocsDriftFix(rawInput, paths = runtimePaths(), dependencies
|
|
|
2681
2685
|
allowedDocsPaths: docsFixAllowedDocsPaths(summary)
|
|
2682
2686
|
}, paths);
|
|
2683
2687
|
} catch (error) {
|
|
2684
|
-
return failedAction("docs_drift_stage_fix", `Could not record docs drift fix boundary: ${errorMessage$
|
|
2688
|
+
return failedAction("docs_drift_stage_fix", `Could not record docs drift fix boundary: ${errorMessage$1(error)}.`, {
|
|
2685
2689
|
requires: ["docsDriftBoundary"],
|
|
2686
|
-
errors: [errorMessage$
|
|
2690
|
+
errors: [errorMessage$1(error)]
|
|
2687
2691
|
});
|
|
2688
2692
|
}
|
|
2689
2693
|
const learningMemoryContext = await loadAutomationLearningMemoryContext(paths, {
|
|
@@ -2827,7 +2831,7 @@ function stringArrayConfig(value) {
|
|
|
2827
2831
|
function objectConfig(value) {
|
|
2828
2832
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
2829
2833
|
}
|
|
2830
|
-
function errorMessage$
|
|
2834
|
+
function errorMessage$1(error) {
|
|
2831
2835
|
return error instanceof Error ? error.message : String(error);
|
|
2832
2836
|
}
|
|
2833
2837
|
var reportContentSecurityPolicy = [
|
|
@@ -3000,7 +3004,7 @@ function createReviewRoutes(paths) {
|
|
|
3000
3004
|
ok: false,
|
|
3001
3005
|
action: "pr_review_start",
|
|
3002
3006
|
changed: false,
|
|
3003
|
-
message: errorMessage
|
|
3007
|
+
message: errorMessage(error)
|
|
3004
3008
|
}, 400);
|
|
3005
3009
|
}
|
|
3006
3010
|
});
|
|
@@ -3029,7 +3033,7 @@ function createReviewRoutes(paths) {
|
|
|
3029
3033
|
ok: false,
|
|
3030
3034
|
action: "pr_review_restart",
|
|
3031
3035
|
changed: false,
|
|
3032
|
-
message: errorMessage
|
|
3036
|
+
message: errorMessage(error)
|
|
3033
3037
|
}, 400);
|
|
3034
3038
|
}
|
|
3035
3039
|
});
|
|
@@ -3047,7 +3051,7 @@ function createReviewRoutes(paths) {
|
|
|
3047
3051
|
runId: result.review.runId ?? ""
|
|
3048
3052
|
}, result.outcome === "pending" ? 202 : 200);
|
|
3049
3053
|
} catch (error) {
|
|
3050
|
-
const message = errorMessage
|
|
3054
|
+
const message = errorMessage(error);
|
|
3051
3055
|
return c.json({
|
|
3052
3056
|
ok: false,
|
|
3053
3057
|
action: "pr_review_submission_reconcile",
|
|
@@ -3079,7 +3083,7 @@ function objectBody(value) {
|
|
|
3079
3083
|
function reviewOrigin(value) {
|
|
3080
3084
|
return value === "chat" || value === "panel" || value === "api" ? value : "api";
|
|
3081
3085
|
}
|
|
3082
|
-
function errorMessage
|
|
3086
|
+
function errorMessage(error) {
|
|
3083
3087
|
return error instanceof Error ? error.message : String(error);
|
|
3084
3088
|
}
|
|
3085
3089
|
//#endregion
|
|
@@ -3367,20 +3371,24 @@ async function resultFromObservedRun(paths, runId, dependencies) {
|
|
|
3367
3371
|
}
|
|
3368
3372
|
}
|
|
3369
3373
|
async function runDirectSchedulerTickFallback(paths, error, phase) {
|
|
3370
|
-
const message =
|
|
3374
|
+
const message = errorMessageWithCauses(error);
|
|
3371
3375
|
const fallback = await runSchedulerTick(paths);
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3376
|
+
try {
|
|
3377
|
+
await addNotification({
|
|
3378
|
+
level: "attention",
|
|
3379
|
+
title: "Scheduler workflow observation failed",
|
|
3380
|
+
message: `Scheduler tick workflow ${phase} failed; ran the direct scheduler tick instead. ${message}`,
|
|
3381
|
+
source: "scheduler",
|
|
3382
|
+
sourceId: "scheduler-tick:workflow-observation-fallback",
|
|
3383
|
+
data: {
|
|
3384
|
+
phase,
|
|
3385
|
+
error: message,
|
|
3386
|
+
fallbackOutcome: fallback.outcome ?? null
|
|
3387
|
+
}
|
|
3388
|
+
}, paths);
|
|
3389
|
+
} catch (notificationError) {
|
|
3390
|
+
console.warn("[neondeck] failed to persist scheduler workflow fallback notification", notificationError);
|
|
3391
|
+
}
|
|
3384
3392
|
return {
|
|
3385
3393
|
...fallback,
|
|
3386
3394
|
changed: true,
|
|
@@ -3418,8 +3426,8 @@ function resultFromTerminalRun(runId, run) {
|
|
|
3418
3426
|
action: "scheduler_tick",
|
|
3419
3427
|
changed: false,
|
|
3420
3428
|
outcome: "failed",
|
|
3421
|
-
message: `Scheduler tick workflow ${runId} failed: ${
|
|
3422
|
-
errors: [
|
|
3429
|
+
message: `Scheduler tick workflow ${runId} failed: ${errorMessageWithCauses(run.error)}.`,
|
|
3430
|
+
errors: [errorMessageWithCauses(run.error)],
|
|
3423
3431
|
extra: { runId },
|
|
3424
3432
|
runId
|
|
3425
3433
|
};
|
|
@@ -3456,7 +3464,16 @@ async function activeSchedulerTickRun(paths, dependencies, now) {
|
|
|
3456
3464
|
const run = await (dependencies.getRun ?? getRun)(pointer.runId);
|
|
3457
3465
|
if (!run || run.status !== "active") continue;
|
|
3458
3466
|
if (runRuntimeHome(run) !== paths.home) continue;
|
|
3459
|
-
if (isStaleActiveRun(run, now, activeRunTtlMs(dependencies)))
|
|
3467
|
+
if (isStaleActiveRun(run, now, activeRunTtlMs(dependencies))) {
|
|
3468
|
+
await expireWorkflowRunObservation({
|
|
3469
|
+
runId: run.runId,
|
|
3470
|
+
message: "Scheduler workflow exceeded the active-run deadline and was superseded by a new tick.",
|
|
3471
|
+
endedAt: now.toISOString()
|
|
3472
|
+
}, paths).catch((error) => {
|
|
3473
|
+
console.warn("[neondeck] failed to expire stale scheduler workflow projection", error);
|
|
3474
|
+
});
|
|
3475
|
+
continue;
|
|
3476
|
+
}
|
|
3460
3477
|
return run;
|
|
3461
3478
|
}
|
|
3462
3479
|
return null;
|
|
@@ -3491,7 +3508,7 @@ function runRuntimeHome(run) {
|
|
|
3491
3508
|
return typeof input.runtimeHome === "string" && input.runtimeHome ? input.runtimeHome : null;
|
|
3492
3509
|
}
|
|
3493
3510
|
function acquireSchedulerWorkflowAdmissionLease(paths, now, ttlMs) {
|
|
3494
|
-
const database =
|
|
3511
|
+
const database = openDb(paths.neondeckDatabase);
|
|
3495
3512
|
try {
|
|
3496
3513
|
database.exec("BEGIN IMMEDIATE;");
|
|
3497
3514
|
const existingLease = parseSchedulerWorkflowAdmissionLease(readMetadataValue(database.prepare("SELECT value FROM app_metadata WHERE key = ?;").get(schedulerWorkflowAdmissionLeaseKey)));
|
|
@@ -3534,7 +3551,7 @@ function acquireSchedulerWorkflowAdmissionLease(paths, now, ttlMs) {
|
|
|
3534
3551
|
}
|
|
3535
3552
|
}
|
|
3536
3553
|
function recordSchedulerWorkflowAdmissionRunId(paths, owner, runId, now, ttlMs) {
|
|
3537
|
-
const database =
|
|
3554
|
+
const database = openDb(paths.neondeckDatabase);
|
|
3538
3555
|
try {
|
|
3539
3556
|
database.exec("BEGIN IMMEDIATE;");
|
|
3540
3557
|
const existingLease = parseSchedulerWorkflowAdmissionLease(readMetadataValue(database.prepare("SELECT value FROM app_metadata WHERE key = ?;").get(schedulerWorkflowAdmissionLeaseKey)));
|
|
@@ -3583,7 +3600,7 @@ async function releaseSchedulerWorkflowAdmissionLease(paths, owner) {
|
|
|
3583
3600
|
}
|
|
3584
3601
|
}
|
|
3585
3602
|
function releaseSchedulerWorkflowAdmissionLeaseOnce(paths, owner) {
|
|
3586
|
-
const database =
|
|
3603
|
+
const database = openDb(paths.neondeckDatabase);
|
|
3587
3604
|
try {
|
|
3588
3605
|
database.exec("BEGIN IMMEDIATE;");
|
|
3589
3606
|
if (parseSchedulerWorkflowAdmissionLease(readMetadataValue(database.prepare("SELECT value FROM app_metadata WHERE key = ?;").get(schedulerWorkflowAdmissionLeaseKey)))?.owner === owner) database.prepare("DELETE FROM app_metadata WHERE key = ?;").run(schedulerWorkflowAdmissionLeaseKey);
|
|
@@ -3625,8 +3642,17 @@ function activeRunTtlMs(dependencies) {
|
|
|
3625
3642
|
function currentDate(dependencies) {
|
|
3626
3643
|
return dependencies.now?.() ?? /* @__PURE__ */ new Date();
|
|
3627
3644
|
}
|
|
3628
|
-
function
|
|
3629
|
-
|
|
3645
|
+
function errorMessageWithCauses(error) {
|
|
3646
|
+
const messages = [];
|
|
3647
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3648
|
+
let current = error;
|
|
3649
|
+
while (current !== void 0 && current !== null && !seen.has(current)) {
|
|
3650
|
+
seen.add(current);
|
|
3651
|
+
const message = current instanceof Error ? current.message : String(current);
|
|
3652
|
+
if (message && !messages.includes(message)) messages.push(message);
|
|
3653
|
+
current = current instanceof Error ? current.cause : void 0;
|
|
3654
|
+
}
|
|
3655
|
+
return messages.join(": ").slice(0, 2e3) || "Unknown error";
|
|
3630
3656
|
}
|
|
3631
3657
|
function sleep(milliseconds) {
|
|
3632
3658
|
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
@@ -4019,4 +4045,4 @@ var app_default = await createApp();
|
|
|
4019
4045
|
//#endregion
|
|
4020
4046
|
export { app_default as default };
|
|
4021
4047
|
|
|
4022
|
-
//# sourceMappingURL=app-
|
|
4048
|
+
//# sourceMappingURL=app-DhszYlGY.js.map
|