@prestyj/cli 5.16.1 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/app-sidecar.js +27 -7
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.d.ts +34 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +356 -29
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-providers.d.ts.map +1 -1
- package/dist/core/auth-providers.js +3 -3
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/autopilot-cycle.d.ts +7 -3
- package/dist/core/autopilot-cycle.d.ts.map +1 -1
- package/dist/core/autopilot-cycle.js +43 -6
- package/dist/core/autopilot-cycle.js.map +1 -1
- package/dist/core/autopilot-verdict.d.ts +2 -0
- package/dist/core/autopilot-verdict.d.ts.map +1 -1
- package/dist/core/autopilot-verdict.js +25 -0
- package/dist/core/autopilot-verdict.js.map +1 -1
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +1 -1
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/event-bus.d.ts +1 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/fast-apply-benchmark.d.ts +1 -1
- package/dist/core/fast-apply-benchmark.js +2 -2
- package/dist/core/fast-apply-benchmark.js.map +1 -1
- package/dist/core/ideal-review-subagent.d.ts +43 -0
- package/dist/core/ideal-review-subagent.d.ts.map +1 -0
- package/dist/core/ideal-review-subagent.js +95 -0
- package/dist/core/ideal-review-subagent.js.map +1 -0
- package/dist/core/ideal-review.d.ts.map +1 -1
- package/dist/core/ideal-review.js +18 -5
- package/dist/core/ideal-review.js.map +1 -1
- package/dist/core/loop-breaker.d.ts.map +1 -1
- package/dist/core/loop-breaker.js +10 -9
- package/dist/core/loop-breaker.js.map +1 -1
- package/dist/core/nolan-prompt.js +32 -14
- package/dist/core/nolan-prompt.js.map +1 -1
- package/dist/core/persistent-shell.d.ts.map +1 -1
- package/dist/core/persistent-shell.js +3 -1
- package/dist/core/persistent-shell.js.map +1 -1
- package/dist/core/process-manager.d.ts +14 -0
- package/dist/core/process-manager.d.ts.map +1 -1
- package/dist/core/process-manager.js +49 -0
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/semantic-loop-check.d.ts +59 -0
- package/dist/core/semantic-loop-check.d.ts.map +1 -0
- package/dist/core/semantic-loop-check.js +103 -0
- package/dist/core/semantic-loop-check.js.map +1 -0
- package/dist/core/semantic-search-benchmark.d.ts +1 -1
- package/dist/core/semantic-search-benchmark.js +2 -2
- package/dist/core/semantic-search-benchmark.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +18 -2
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/shell.d.ts.map +1 -1
- package/dist/core/shell.js +6 -3
- package/dist/core/shell.js.map +1 -1
- package/dist/core/subagent-manager.d.ts +7 -1
- package/dist/core/subagent-manager.d.ts.map +1 -1
- package/dist/core/subagent-manager.js +15 -5
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-policy.js +1 -1
- package/dist/core/subagent-policy.js.map +1 -1
- package/dist/core/verification-evidence.d.ts +7 -1
- package/dist/core/verification-evidence.d.ts.map +1 -1
- package/dist/core/verification-evidence.js +70 -20
- package/dist/core/verification-evidence.js.map +1 -1
- package/dist/core/verification-gate.d.ts +58 -18
- package/dist/core/verification-gate.d.ts.map +1 -1
- package/dist/core/verification-gate.js +256 -23
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +20 -13
- package/dist/system-prompt.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +28 -3
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +3 -2
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-only-bash.d.ts +10 -0
- package/dist/tools/read-only-bash.d.ts.map +1 -1
- package/dist/tools/read-only-bash.js +23 -0
- package/dist/tools/read-only-bash.js.map +1 -1
- package/dist/tools/steroids.d.ts +1 -3
- package/dist/tools/steroids.d.ts.map +1 -1
- package/dist/tools/steroids.js +7 -6
- package/dist/tools/steroids.js.map +1 -1
- package/dist/tools/subagent-control.d.ts.map +1 -1
- package/dist/tools/subagent-control.js +2 -1
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/task-output.d.ts +2 -1
- package/dist/tools/task-output.d.ts.map +1 -1
- package/dist/tools/task-output.js +25 -3
- package/dist/tools/task-output.js.map +1 -1
- package/dist/ui/components/Footer.js +1 -1
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/utils/github-ci.d.ts +19 -0
- package/dist/utils/github-ci.d.ts.map +1 -0
- package/dist/utils/github-ci.js +137 -0
- package/dist/utils/github-ci.js.map +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -69,8 +69,8 @@ Switch mid-conversation with `/model`. Not locked to anyone.
|
|
|
69
69
|
|
|
70
70
|
| Provider | Models | Auth |
|
|
71
71
|
| ----------------- | ------------------------------------------------------------------ | ---------------- |
|
|
72
|
-
| **Anthropic** | Claude Opus 5, Sonnet 5, Haiku 4.5
|
|
73
|
-
| **OpenAI** | GPT-
|
|
72
|
+
| **Anthropic** | Claude Fable 5.1, Opus 5, Sonnet 5, Haiku 4.5 | OAuth |
|
|
73
|
+
| **OpenAI** | GPT-6 Astra, GPT-5.6 Sol, GPT-5.6 Terra, GPT-5.6 Luna | OAuth |
|
|
74
74
|
| **Moonshot** | Kimi K3, Kimi K2.7 Code | OAuth or API key |
|
|
75
75
|
| **Z.AI (GLM)** | GLM-5.3, GLM-5.3-Flash (image) | API key |
|
|
76
76
|
| **MiniMax** | MiniMax M3 (image + video) | API key |
|
package/dist/app-sidecar.js
CHANGED
|
@@ -56,6 +56,7 @@ import { getModel, getDefaultThinkingLevel, getContextWindow, getAllModels, clea
|
|
|
56
56
|
import { resolveStartOrFallback } from "./core/resolve-start.js";
|
|
57
57
|
import { getGitBranch, getGitDirtyFileCount, isGitRepo } from "./utils/git.js";
|
|
58
58
|
import { getGitHubOpenCounts, getGitHubRepoSlug } from "./utils/github.js";
|
|
59
|
+
import { startGitHubCIPoll } from "./utils/github-ci.js";
|
|
59
60
|
import { extractPlanSteps } from "./utils/plan-steps.js";
|
|
60
61
|
import { getNextThinkingLevel, getSupportedThinkingLevels, isThinkingLevelSupported, } from "./core/thinking-level.js";
|
|
61
62
|
import { PROMPT_COMMANDS } from "./core/prompt-commands.js";
|
|
@@ -1683,6 +1684,7 @@ async function createSession(deps, opts) {
|
|
|
1683
1684
|
const gitHubSlug = initialGitHubSlug;
|
|
1684
1685
|
let gitHubIssues = null;
|
|
1685
1686
|
let gitHubPRs = null;
|
|
1687
|
+
let gitHubCI = null;
|
|
1686
1688
|
function currentContextWindow() {
|
|
1687
1689
|
const st = session.getState();
|
|
1688
1690
|
return getContextWindow(st.model, { provider: st.provider, accountId: st.accountId });
|
|
@@ -1697,6 +1699,7 @@ async function createSession(deps, opts) {
|
|
|
1697
1699
|
gitDirtyFileCount,
|
|
1698
1700
|
gitHubIssues,
|
|
1699
1701
|
gitHubPRs,
|
|
1702
|
+
gitHubCI,
|
|
1700
1703
|
gitHubRepoUrl: gitHubSlug ? `https://github.com/${gitHubSlug}` : null,
|
|
1701
1704
|
tasks: session.listBackgroundProcesses(),
|
|
1702
1705
|
// Roots added with /add-dir — the header shows a badge when non-empty.
|
|
@@ -2201,7 +2204,14 @@ async function createSession(deps, opts) {
|
|
|
2201
2204
|
}
|
|
2202
2205
|
finally {
|
|
2203
2206
|
const cancelled = runLifecycle.isCancellationRequested(generation);
|
|
2207
|
+
const verificationProblem = cancelled ? null : session.getVerificationProblem();
|
|
2208
|
+
if (runSucceeded && verificationProblem && ownsGeneration) {
|
|
2209
|
+
// Expected control outcome: run_end and the journal already carry Unverified.
|
|
2210
|
+
// Do not format it as a crash or persist a misleading error marker.
|
|
2211
|
+
log("WARN", "app-sidecar", "verification incomplete", { message: verificationProblem });
|
|
2212
|
+
}
|
|
2204
2213
|
if (runSucceeded &&
|
|
2214
|
+
!verificationProblem &&
|
|
2205
2215
|
!cancelled &&
|
|
2206
2216
|
cancelGeneration === cancelGenAtStart &&
|
|
2207
2217
|
countAssistantMessages(session.getMessages()) > assistantsBeforeRun) {
|
|
@@ -2218,12 +2228,14 @@ async function createSession(deps, opts) {
|
|
|
2218
2228
|
// A run may have opened/closed issues or PRs — refresh fire-and-forget so
|
|
2219
2229
|
// teardown isn't delayed by the network. Broadcasts itself on change.
|
|
2220
2230
|
void refreshGitHubCounts();
|
|
2231
|
+
void ciPoll.refresh();
|
|
2221
2232
|
// Serialize behind any marker/tool-triggered refresh so the terminal
|
|
2222
2233
|
// progress snapshot uses the live plan file. Once every canonical step
|
|
2223
2234
|
// is complete, remove the approved plan from future system prompts and
|
|
2224
2235
|
// clear the widget before run_end paints the idle activity bar.
|
|
2225
2236
|
if (runSucceeded &&
|
|
2226
2237
|
!cancelled &&
|
|
2238
|
+
!verificationProblem &&
|
|
2227
2239
|
approvedPlanPath !== null &&
|
|
2228
2240
|
(await queueApprovedPlanProgressSync())) {
|
|
2229
2241
|
try {
|
|
@@ -2240,7 +2252,7 @@ async function createSession(deps, opts) {
|
|
|
2240
2252
|
}
|
|
2241
2253
|
}
|
|
2242
2254
|
if (ownsGeneration) {
|
|
2243
|
-
finishOwnedGeneration(generation, false, runSucceeded ? "completed" : "failed");
|
|
2255
|
+
finishOwnedGeneration(generation, false, verificationProblem ? "unverified" : runSucceeded ? "completed" : "failed");
|
|
2244
2256
|
}
|
|
2245
2257
|
// A cancelled injected run is still owned by the surrounding autopilot
|
|
2246
2258
|
// cycle; its outer finalizer emits the one terminal cancelled run_end.
|
|
@@ -2249,6 +2261,7 @@ async function createSession(deps, opts) {
|
|
|
2249
2261
|
cancelledRunEndGenerations.add(generation);
|
|
2250
2262
|
broadcast("run_end", {
|
|
2251
2263
|
...(cancelled ? { cancelled: true } : {}),
|
|
2264
|
+
...(verificationProblem ? { unverified: true } : {}),
|
|
2252
2265
|
runState: runLifecycle.state,
|
|
2253
2266
|
});
|
|
2254
2267
|
}
|
|
@@ -2364,7 +2377,7 @@ async function createSession(deps, opts) {
|
|
|
2364
2377
|
// control flow lives in driveAutopilotCycle (core/autopilot-cycle.ts) so
|
|
2365
2378
|
// every exit path is unit-tested; this only wires the real dependencies.
|
|
2366
2379
|
async function runAutopilotCycle(originalRequest) {
|
|
2367
|
-
if (!autopilot || autopilotCancelled)
|
|
2380
|
+
if (!autopilot || autopilotCancelled || session.getVerificationProblem())
|
|
2368
2381
|
return;
|
|
2369
2382
|
const generation = runLifecycle.begin(abortOwnedWork).generation;
|
|
2370
2383
|
pendingCancelDrain = null;
|
|
@@ -2380,6 +2393,7 @@ async function createSession(deps, opts) {
|
|
|
2380
2393
|
// round available.
|
|
2381
2394
|
maxRounds: pendingPlanPath !== null ? MAX_AUTOPILOT_ROUNDS + 2 : MAX_AUTOPILOT_ROUNDS,
|
|
2382
2395
|
isCancelled: () => autopilotCancelled,
|
|
2396
|
+
verificationProblem: () => session.getVerificationProblem(),
|
|
2383
2397
|
// An injected run entering plan mode WITHOUT submitting (enter_plan,
|
|
2384
2398
|
// no exit_plan) halts the cycle — Nolan never prompts into a read-only
|
|
2385
2399
|
// plan-mode session. A submitted plan takes the planPending branch.
|
|
@@ -2392,7 +2406,7 @@ async function createSession(deps, opts) {
|
|
|
2392
2406
|
// Auto-accept: the inlined POST /plan/accept body. Returns false when
|
|
2393
2407
|
// the plan generation moved since the review (user acted) — the cycle
|
|
2394
2408
|
// exits silently and the user's action stands.
|
|
2395
|
-
acceptPlan: async () => {
|
|
2409
|
+
acceptPlan: async (reason) => {
|
|
2396
2410
|
if (pendingPlanPath === null || planGeneration !== planGenAtReview)
|
|
2397
2411
|
return false;
|
|
2398
2412
|
const planPath = pendingPlanPath;
|
|
@@ -2409,11 +2423,11 @@ async function createSession(deps, opts) {
|
|
|
2409
2423
|
clearPendingPlan();
|
|
2410
2424
|
// Keep the approval marker ahead of the reset, then seed the reset
|
|
2411
2425
|
// with the sidecar's canonical count from the actual plan file.
|
|
2412
|
-
broadcast("autopilot_plan_accepted", {});
|
|
2426
|
+
broadcast("autopilot_plan_accepted", reason ? { reason } : {});
|
|
2413
2427
|
broadcast("session_reset", { planTotal });
|
|
2414
2428
|
broadcast("plan_progress", planProgressPayload());
|
|
2415
2429
|
// Persisted into the NEW session so a resume shows the marker.
|
|
2416
|
-
void session.persistAutopilotMarker("plan_approved");
|
|
2430
|
+
void session.persistAutopilotMarker("plan_approved", { reason });
|
|
2417
2431
|
return true;
|
|
2418
2432
|
},
|
|
2419
2433
|
runImplement: () => {
|
|
@@ -2467,9 +2481,10 @@ async function createSession(deps, opts) {
|
|
|
2467
2481
|
version: 1,
|
|
2468
2482
|
phase: "done",
|
|
2469
2483
|
afterMessageCount: session.getPersistedTranscriptCount(),
|
|
2484
|
+
...event.data,
|
|
2470
2485
|
});
|
|
2471
2486
|
broadcast(event.type, { ...event.data, copySeed: seed });
|
|
2472
|
-
void session.persistAutopilotMarker("done");
|
|
2487
|
+
void session.persistAutopilotMarker("done", event.data);
|
|
2473
2488
|
return;
|
|
2474
2489
|
}
|
|
2475
2490
|
broadcast(event.type, event.data);
|
|
@@ -2486,7 +2501,7 @@ async function createSession(deps, opts) {
|
|
|
2486
2501
|
finally {
|
|
2487
2502
|
autopilotActive = false;
|
|
2488
2503
|
session.setIdealReviewSuppressed(autopilot);
|
|
2489
|
-
finishOwnedGeneration(generation, true);
|
|
2504
|
+
finishOwnedGeneration(generation, true, session.getVerificationProblem() ? "unverified" : "completed");
|
|
2490
2505
|
queueMicrotask(() => void runStrandedQueue());
|
|
2491
2506
|
}
|
|
2492
2507
|
}
|
|
@@ -2754,6 +2769,10 @@ async function createSession(deps, opts) {
|
|
|
2754
2769
|
gitHubPoll.unref?.();
|
|
2755
2770
|
};
|
|
2756
2771
|
scheduleGitHubPoll(2000);
|
|
2772
|
+
const ciPoll = startGitHubCIPoll(cwd, (next) => {
|
|
2773
|
+
gitHubCI = next;
|
|
2774
|
+
broadcast("extras", footerExtras());
|
|
2775
|
+
});
|
|
2757
2776
|
function readBody(req, res) {
|
|
2758
2777
|
return readCappedBody(req, res);
|
|
2759
2778
|
}
|
|
@@ -5115,6 +5134,7 @@ async function createSession(deps, opts) {
|
|
|
5115
5134
|
gitHubPollStopped = true;
|
|
5116
5135
|
if (gitHubPoll)
|
|
5117
5136
|
clearTimeout(gitHubPoll);
|
|
5137
|
+
ciPoll.stop();
|
|
5118
5138
|
// Stop the Telegram serve loop + dispose its per-chat sessions.
|
|
5119
5139
|
if (serveController)
|
|
5120
5140
|
await serveController.stop().catch(() => { });
|