cuelo 0.10.340 → 0.10.342
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +47 -47
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/account/route.js +1 -1
- package/.next/server/app/api/agent/[id]/computer-takeover/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/gpt6/handles/route.js +1 -1
- package/.next/server/app/api/gpt6/reply/route.js +1 -1
- package/.next/server/app/api/gpt6/token/route.js +1 -1
- package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
- package/.next/server/app/api/live/call/[callId]/route.js +1 -1
- package/.next/server/app/api/live/draft-secret/route.js +1 -1
- package/.next/server/app/api/live/events/route.js +1 -1
- package/.next/server/app/api/live/interpret/assist/route.js +1 -1
- package/.next/server/app/api/live/interpret/reading/route.js +1 -1
- package/.next/server/app/api/live/interpret/route.js +1 -1
- package/.next/server/app/api/live/interpret/scan/route.js +1 -1
- package/.next/server/app/api/live/interpret/text/route.js +1 -1
- package/.next/server/app/api/live/offer/route.js +1 -1
- package/.next/server/app/api/live/voices/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/prelude/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/tool-image/route.js +1 -1
- package/.next/server/app/api/update-maintenance/route.js +1 -1
- package/.next/server/app/api/updates/apply/route.js +2 -2
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/api/upkeep/check/route.js +1 -1
- package/.next/server/app/api/upkeep/morning/route.js +1 -1
- package/.next/server/app/api/upkeep/nightly/export/route.js +1 -1
- package/.next/server/app/api/upkeep/nightly/result/route.js +1 -1
- package/.next/server/app/api/upkeep/nightly/route.js +1 -1
- package/.next/server/app/api/upkeep/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover.html +1 -1
- package/.next/server/app/recover.rsc +2 -2
- package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +47 -47
- package/.next/server/chunks/2235.js +2 -2
- package/.next/server/chunks/3173.js +1 -1
- package/.next/server/chunks/4831.js +1 -1
- package/.next/server/chunks/5228.js +1 -1
- package/.next/server/chunks/8685.js +4 -4
- package/.next/server/chunks/9467.js +2 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/app/{layout-21f6af530e431195.js → layout-585455eca83e2c0a.js} +1 -1
- package/.next/static/chunks/app/{page-1b8437381ed0a136.js → page-6077166312a6ad7f.js} +2 -2
- package/.next/trace +113 -113
- package/.next/trace-build +1 -1
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
- package/Tools/OMP_Global_Config/agent/extensions/consult.ts +7 -7
- package/Tools/OMP_Global_Config/agent/extensions/cross-review.ts +6 -7
- package/Tools/OMP_Global_Config/agent/extensions/lib/cross-review.ts +31 -23
- package/Tools/OMP_Global_Config/agent/extensions/lib/finalize-checks.ts +213 -40
- package/Tools/OMP_Global_Config/agent/extensions/lib/helper-usage.ts +55 -0
- package/Tools/OMP_Global_Config/agent/extensions/lib/interpreter.ts +5 -6
- package/Tools/OMP_Global_Config/agent/extensions/lib/preflight-check.ts +44 -12
- package/Tools/OMP_Global_Config/agent/extensions/skim.ts +22 -24
- package/Tools/OMP_Global_Config/agent/rules/cross-review-procedure.md +3 -1
- package/Tools/OMP_Global_Config/agent/rules/subagent.md +1 -1
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/finalizer.ps1 +14 -0
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +9 -9
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +4 -3
- package/bin/ci-local.mjs +4 -1
- package/package.json +1 -1
- /package/.next/static/{4XtQSNswpweUHnrOc9NYK → rJoy8Q7UM_SXj3nOrYWTv}/_buildManifest.js +0 -0
- /package/.next/static/{4XtQSNswpweUHnrOc9NYK → rJoy8Q7UM_SXj3nOrYWTv}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Api, AssistantMessage, Model } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import type { ExtensionContext, SessionManager } from "@oh-my-pi/pi-coding-agent";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 도구 없는 helper 모델 호출(preflight·skim·cross_review 리뷰어·통역·consult)의 시도별 비용 장부 기록기.
|
|
6
|
+
* `completeSimple`의 `onAttempt`는 core가 내부에서 다시 부른 시도(thinking-loop 재시도)를 포함해 끝난 응답마다
|
|
7
|
+
* 한 번씩 부르므로, 호출자는 이 기록기만 `onAttempt`에 꽂고 최종 응답 usage를 따로 다시 적지 않는다(이중 합산 방지).
|
|
8
|
+
* 각 항목은 그 시도에 실제로 응답한 provider/model과 usage, stopReason, errorMessage를 담고, 호출을 시작한 세션과
|
|
9
|
+
* leaf에 묶는다. 응답 없이 던진 실패는 관측한 usage가 없어 항목을 만들지 않는다(0원으로 적지 않고 미기록).
|
|
10
|
+
*/
|
|
11
|
+
export interface HelperAttemptMeta {
|
|
12
|
+
purpose: string;
|
|
13
|
+
/** 모델 slot 이름. 정확한 경로·고정 모델 호출이면 생략한다. */
|
|
14
|
+
role?: string;
|
|
15
|
+
/** 호출 대상. 응답이 자기 provider/model/api를 싣지 않았을 때만 쓴다. */
|
|
16
|
+
model: Model<Api>;
|
|
17
|
+
/** 장부에 남기기 전에 오류 문구에서 비밀 값을 가린다. 호출자가 표시할 때 이미 가리는 문구라면 장부에도 같은 규칙을 쓴다. */
|
|
18
|
+
scrub?: (errorMessage: string) => string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface HelperAttemptRecorder {
|
|
22
|
+
onAttempt: (attempt: AssistantMessage) => void;
|
|
23
|
+
/**
|
|
24
|
+
* 장부 저장이 실패했으면 그 오류를 던진다. 저장 실패는 삼키지 않지만, core가 아직 재시도를 도는 중에 던져
|
|
25
|
+
* 그 호출을 공급자 실패로 오인하지 않도록 호출이 끝난 뒤 한 번 확인한다.
|
|
26
|
+
*/
|
|
27
|
+
assertSaved: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function helperAttemptRecorder(ctx: ExtensionContext, meta: HelperAttemptMeta): HelperAttemptRecorder {
|
|
31
|
+
const manager = ctx.sessionManager as Partial<Pick<SessionManager, "appendModelUsage" | "getLeafId" | "getSessionId">>;
|
|
32
|
+
// 모든 시도는 호출을 시작한 leaf에 매달려, 재시도가 더한 항목끼리 서로 사슬로 이어지지 않는다.
|
|
33
|
+
const owner = manager.appendModelUsage && manager.getSessionId
|
|
34
|
+
? { sessionId: manager.getSessionId(), parentId: manager.getLeafId?.() ?? null }
|
|
35
|
+
: undefined;
|
|
36
|
+
let failure: { error: unknown } | undefined;
|
|
37
|
+
return {
|
|
38
|
+
onAttempt(attempt) {
|
|
39
|
+
if (!owner) return;
|
|
40
|
+
try {
|
|
41
|
+
manager.appendModelUsage!({
|
|
42
|
+
purpose: meta.purpose, role: meta.role,
|
|
43
|
+
api: attempt.api ?? meta.model.api, provider: attempt.provider ?? meta.model.provider, model: attempt.model ?? meta.model.id,
|
|
44
|
+
usage: attempt.usage, stopReason: attempt.stopReason,
|
|
45
|
+
errorMessage: attempt.errorMessage === undefined || !meta.scrub ? attempt.errorMessage : meta.scrub(attempt.errorMessage),
|
|
46
|
+
}, owner);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
failure ??= { error };
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
assertSaved() {
|
|
52
|
+
if (failure) throw failure.error;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ExtensionContext
|
|
1
|
+
import type { ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
+
import { helperAttemptRecorder } from "./helper-usage";
|
|
2
3
|
import { beforeModelAbort, directFallbackModel, modelRoleSelector, sameModelRoutes } from "./model-routes";
|
|
3
4
|
// 런타임 패키지는 legacy-pi 확장 loader가 host SDK 경로로 재작성하므로 아래에서 지연 import한다.
|
|
4
5
|
|
|
@@ -54,6 +55,7 @@ export async function interpret(prompt: string, purpose: string, ctx: ExtensionC
|
|
|
54
55
|
const model = models[index]!;
|
|
55
56
|
signal.throwIfAborted();
|
|
56
57
|
try {
|
|
58
|
+
const usage = helperAttemptRecorder(ctx, { purpose, role: model === fallback ? "interpreterFallback" : role, model });
|
|
57
59
|
const response = await beforeModelAbort(signal, async () => {
|
|
58
60
|
if (!(await ctx.modelRegistry.getApiKey(model, sessionId, { signal }))) {
|
|
59
61
|
throw new Error(`${model.provider}/${model.id} 모델 자격을 찾지 못했습니다.`);
|
|
@@ -61,12 +63,9 @@ export async function interpret(prompt: string, purpose: string, ctx: ExtensionC
|
|
|
61
63
|
signal.throwIfAborted();
|
|
62
64
|
return completeSimple(model, {
|
|
63
65
|
messages: [{ role: "user", content: prompt, timestamp: Date.now() }],
|
|
64
|
-
}, { apiKey: ctx.modelRegistry.resolver(model, sessionId), sessionId, maxTokens: model.maxTokens ?? undefined, disableReasoning: true, signal });
|
|
66
|
+
}, { apiKey: ctx.modelRegistry.resolver(model, sessionId), sessionId, maxTokens: model.maxTokens ?? undefined, disableReasoning: true, signal, onAttempt: usage.onAttempt });
|
|
65
67
|
});
|
|
66
|
-
(
|
|
67
|
-
purpose, role: model === fallback ? "interpreterFallback" : role, api: model.api, provider: model.provider, model: model.id,
|
|
68
|
-
usage: response.usage, stopReason: response.stopReason, errorMessage: response.errorMessage,
|
|
69
|
-
}, { sessionId, parentId: ctx.sessionManager.getLeafId() });
|
|
68
|
+
usage.assertSaved();
|
|
70
69
|
signal.throwIfAborted();
|
|
71
70
|
const truncated = response.stopReason === "length";
|
|
72
71
|
if (response.stopReason !== "stop" && !truncated) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Model calls and session context shared by the explicit check and automatic routing plugins.
|
|
2
2
|
import type { Api, AssistantMessage, Model, isUsageLimitOutcome } from "@oh-my-pi/pi-ai";
|
|
3
3
|
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
4
|
+
import { helperAttemptRecorder } from "./helper-usage";
|
|
4
5
|
import { beforeModelAbort, sameModelRoutes } from "./model-routes";
|
|
5
6
|
const MAX_PLAN = 24_000;
|
|
6
7
|
const MAX_USER = 6_000;
|
|
@@ -18,7 +19,7 @@ const SYSTEM = [
|
|
|
18
19
|
].join("\n");
|
|
19
20
|
|
|
20
21
|
type Attempt = { ok: true; text: string; model: string } | { ok: false; why: string; model?: string; usageLimit?: boolean };
|
|
21
|
-
type Opinion = { text: string; model: string; ms: number; fallback?: { from: string; why: string } };
|
|
22
|
+
type Opinion = { text: string; model: string; ms: number; fallback?: { from: string; why: string }; partial?: boolean };
|
|
22
23
|
type Advice = { ok: true; opinion: Opinion } | { ok: false; why: string };
|
|
23
24
|
|
|
24
25
|
const SECRET_ANYWHERE = new RegExp(SECRET.source, "gi");
|
|
@@ -37,34 +38,54 @@ const secs = (ms: number) => (ms / 1000).toFixed(1);
|
|
|
37
38
|
|
|
38
39
|
/** Label the advice with the model that actually answered. */
|
|
39
40
|
function opinionText(opinion: Opinion): string {
|
|
40
|
-
|
|
41
|
+
const partial = opinion.partial ? "\n부분 점검: 입력 일부가 생략돼 전체를 보지 않고 낸 의견이다." : "";
|
|
42
|
+
return `${opinion.model}(${secs(opinion.ms)}초)${opinion.fallback ? `\n${fallbackLine(opinion)}` : ""}${partial}\n${opinion.text}`;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
function clip(text: string, max: number): string {
|
|
44
46
|
return text.length <= max ? text : `${text.slice(0, max)}\n…(${text.length - max}자 생략)`;
|
|
45
47
|
}
|
|
46
48
|
|
|
49
|
+
/** Keep the head and the end of a long text, cutting the middle, so a closing instruction survives the budget. */
|
|
50
|
+
function clipEnds(text: string, max: number): string {
|
|
51
|
+
if (text.length <= max) return text;
|
|
52
|
+
const sized = (omitted: number) => `\n…(${omitted}자 생략)…\n`;
|
|
53
|
+
// The longest marker (digits of the full length) fixes the room, so the result never exceeds max.
|
|
54
|
+
const room = Math.max(0, max - sized(text.length).length);
|
|
55
|
+
const marker = sized(text.length - room);
|
|
56
|
+
const head = Math.floor(room / 4);
|
|
57
|
+
return `${text.slice(0, head)}${marker}${text.slice(text.length - (room - head))}`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type UserTurn = { text: string; cut: boolean; secret: boolean };
|
|
61
|
+
|
|
47
62
|
/**
|
|
48
63
|
* The last six user turns within `max` characters. The budget fills from the newest turn, so long earlier turns never
|
|
49
64
|
* push out the latest instruction (issue #72); the kept turns stay oldest first under their numbers, and a leading line
|
|
50
65
|
* counts the earlier turns left out.
|
|
51
66
|
*/
|
|
52
|
-
function recentTurns(turns: readonly
|
|
67
|
+
function recentTurns(turns: readonly UserTurn[], max: number): { text: string; partial: boolean } {
|
|
53
68
|
const recent = turns.slice(-6);
|
|
54
69
|
const kept: string[] = [];
|
|
55
70
|
let used = 0;
|
|
71
|
+
let partial = false;
|
|
56
72
|
for (let i = recent.length - 1; i >= 0; i--) {
|
|
57
|
-
const
|
|
73
|
+
const turn = recent[i]!;
|
|
74
|
+
// Only the newest turn is kept whole; an earlier turn may be clipped to its head.
|
|
75
|
+
const body = i === recent.length - 1 ? turn.text : clip(turn.text, 2000);
|
|
76
|
+
const line = `(${i + 1}) ${body}`;
|
|
58
77
|
const cost = line.length + (kept.length ? 1 : 0);
|
|
59
78
|
if (used + cost > max) {
|
|
60
|
-
if (!kept.length) kept.push(
|
|
79
|
+
if (!kept.length) { kept.push(clipEnds(line, max)); partial = true; }
|
|
61
80
|
break;
|
|
62
81
|
}
|
|
63
82
|
kept.unshift(line);
|
|
64
83
|
used += cost;
|
|
84
|
+
if (turn.cut || (i !== recent.length - 1 && turn.text.length > 2000)) partial = true;
|
|
65
85
|
}
|
|
66
86
|
const dropped = recent.length - kept.length;
|
|
67
|
-
|
|
87
|
+
if (dropped > 0) partial = true;
|
|
88
|
+
return { text: dropped > 0 ? [`…(앞선 발언 ${dropped}개 생략)`, ...kept].join("\n") : kept.join("\n"), partial };
|
|
68
89
|
}
|
|
69
90
|
|
|
70
91
|
function record(value: unknown): value is Record<string, unknown> {
|
|
@@ -85,7 +106,7 @@ const panelHistory = shared[PANEL_HISTORY] ??= new WeakMap<object, string[]>();
|
|
|
85
106
|
|
|
86
107
|
export function createPreflightCheck(pi: ExtensionAPI, invalidate: () => void = () => {}) {
|
|
87
108
|
let main = true;
|
|
88
|
-
let userTurns:
|
|
109
|
+
let userTurns: UserTurn[] = [];
|
|
89
110
|
let panelSession: object | undefined;
|
|
90
111
|
/** Provider calls to abort when their session or turn ends. */
|
|
91
112
|
const inflight = new Set<AbortController>();
|
|
@@ -124,6 +145,7 @@ export function createPreflightCheck(pi: ExtensionAPI, invalidate: () => void =
|
|
|
124
145
|
try { target = ctx.models.resolve(exact ? selector : `@${selector}`); } catch { /* report an unresolved role below */ }
|
|
125
146
|
if (!target || (exact && `${target.provider}/${target.id}` !== selector)) return { ok: false, why: `${exact ? selector : `modelRoles.${selector}`} 모델을 이 PC에서 해석하지 못했다`, ...(exact ? { model: selector } : {}) };
|
|
126
147
|
const model = `${target.provider}/${target.id}`;
|
|
148
|
+
const usage = helperAttemptRecorder(ctx, { purpose: "preflight", role: exact ? undefined : selector, model: target, scrub: (message) => message.replace(SECRET_ANYWHERE, "[가림]") });
|
|
127
149
|
if (!exact && (selector === "preflightOpenAI"
|
|
128
150
|
? target.provider !== "openai-codex" && target.provider !== "openai"
|
|
129
151
|
: target.provider !== "anthropic")) {
|
|
@@ -157,8 +179,11 @@ export function createPreflightCheck(pi: ExtensionAPI, invalidate: () => void =
|
|
|
157
179
|
apiKey, sessionId, maxTokens: 8192,
|
|
158
180
|
reasoning: reasoning as never,
|
|
159
181
|
signal: callSignal,
|
|
182
|
+
// Every completed attempt (including core-internal retries) is billed, so each one lands in the model_usage ledger.
|
|
183
|
+
onAttempt: usage.onAttempt,
|
|
160
184
|
});
|
|
161
185
|
const response: AssistantMessage = await beforeModelAbort(callSignal, complete);
|
|
186
|
+
usage.assertSaved();
|
|
162
187
|
const text = response.content.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("").trim();
|
|
163
188
|
// Do not retry an answer containing a secret, even when it stopped with an error.
|
|
164
189
|
if (SECRET.test(text)) return { ok: false, why: "답에 비밀값으로 보이는 내용이 있어 쓰지 않았다", model };
|
|
@@ -184,15 +209,17 @@ export function createPreflightCheck(pi: ExtensionAPI, invalidate: () => void =
|
|
|
184
209
|
const t0 = Date.now();
|
|
185
210
|
const deadline = t0 + timeoutMs;
|
|
186
211
|
// Screen the whole input before clipping so a secret split by the budget is not sent.
|
|
187
|
-
if (SECRET.test(`${plan}\n${extra}`)) return { ok: false, why: "비밀값으로 보이는 내용이 있어 보내지 않았다" };
|
|
188
|
-
const
|
|
189
|
-
const
|
|
212
|
+
if (SECRET.test(`${plan}\n${extra}`) || userTurns.slice(-6).some((turn) => turn.secret)) return { ok: false, why: "비밀값으로 보이는 내용이 있어 보내지 않았다" };
|
|
213
|
+
const recent = recentTurns(userTurns, MAX_USER);
|
|
214
|
+
const user = recent.text;
|
|
215
|
+
const partial = recent.partial || plan.length > MAX_PLAN;
|
|
216
|
+
const prompt = `${partial ? "[부분 입력: 아래 내용 일부가 생략 부호(…)로 잘려 있다. 보지 못한 부분이 있으니 전체를 점검한 것처럼 말하지 말고 부분 점검임을 밝혀라.]\n\n" : ""}# 사용자의 최근 말\n${user || "(기록 없음)"}\n\n${clip(plan, MAX_PLAN)}${extra ? `\n\n${extra}` : ""}`;
|
|
190
217
|
if (SECRET.test(prompt)) return { ok: false, why: "비밀값으로 보이는 내용이 있어 보내지 않았다" };
|
|
191
218
|
const provider = (ctx.models.current() ?? ctx.model)?.provider;
|
|
192
219
|
const slot = provider === "anthropic" ? "preflightOpenAI" : "preflightAnthropic";
|
|
193
220
|
const first = await attempt(ctx, slot, prompt, deadline, opts.signal);
|
|
194
221
|
const success = (answer: Extract<Attempt, { ok: true }>, fallback?: Opinion["fallback"]): Advice => ({
|
|
195
|
-
ok: true, opinion: { text: answer.text, model: answer.model, ms: Date.now() - t0, ...(fallback ? { fallback } : {}) },
|
|
222
|
+
ok: true, opinion: { text: answer.text, model: answer.model, ms: Date.now() - t0, ...(fallback ? { fallback } : {}), ...(partial ? { partial } : {}) },
|
|
196
223
|
});
|
|
197
224
|
if (first.ok) return success(first);
|
|
198
225
|
let why = first.why;
|
|
@@ -219,7 +246,12 @@ export function createPreflightCheck(pi: ExtensionAPI, invalidate: () => void =
|
|
|
219
246
|
|
|
220
247
|
const rememberUser = (text: string) => {
|
|
221
248
|
const t = text.trim();
|
|
222
|
-
|
|
249
|
+
// The latest request keeps its head and its end (a closing constraint often sits last); only an oversized one is cut.
|
|
250
|
+
const kept = clipEnds(t, MAX_USER - 8); // room for the "(n) " number the line gets
|
|
251
|
+
// The secret screen reads the whole request: clipping can drop a key's header while its body survives.
|
|
252
|
+
const secret = SECRET.test(t);
|
|
253
|
+
const last = userTurns[userTurns.length - 1];
|
|
254
|
+
if (t && (last?.text !== kept || last.secret !== secret)) userTurns = [...userTurns, { text: kept, cut: kept !== t, secret }].slice(-12);
|
|
223
255
|
};
|
|
224
256
|
|
|
225
257
|
// After a reload or restart the hook state is empty; rebuild the recent user turns from the saved branch.
|
|
@@ -2,7 +2,8 @@ import { lstat, open, realpath, stat } from "node:fs/promises";
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
4
|
import type { Api, AssistantMessage, Model } from "@oh-my-pi/pi-ai";
|
|
5
|
-
import type { ExtensionAPI, ExtensionContext
|
|
5
|
+
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
6
|
+
import { helperAttemptRecorder } from "./lib/helper-usage";
|
|
6
7
|
import { modelRoleSelector, operationalFailure, sameModelRoutes } from "./lib/model-routes";
|
|
7
8
|
// 런타임 패키지는 legacy-pi 확장 loader가 host SDK 경로로 재작성하므로 아래에서 지연 import한다.
|
|
8
9
|
|
|
@@ -335,6 +336,10 @@ export async function completeRole(prompt: string, ctx: ExtensionContext, signal
|
|
|
335
336
|
identity = name;
|
|
336
337
|
if (!model.input.includes("text")) throw new HelperCallError(`${name}은 텍스트 입력을 지원하지 않아 ${call.role} 도구에 쓸 수 없습니다.`, name);
|
|
337
338
|
const sessionId = ctx.sessionManager.getSessionId();
|
|
339
|
+
// judge·cache-warm과 같은 대화 밖 비용 장부(`model_usage`)에 응답이 돌아온 시도마다 onAttempt로 남긴다(core 내부
|
|
340
|
+
// 재시도 포함). 오류·빈 답 응답도 청구된 시도라 먼저 기록하고, 응답 없이 던진 예외는 관측한 usage가 없어 남기지 않는다.
|
|
341
|
+
// 장부 저장 실패는 삼키지 않고 그 모델 이름으로 실패시킨다. 부모 leaf는 자격 확인 전에 호출을 시작한 시점으로 잡는다.
|
|
342
|
+
const usage = helperAttemptRecorder(ctx, { purpose: call.role, role: slotName, model });
|
|
338
343
|
if (!(await ctx.modelRegistry.getApiKey(model, sessionId, { signal }))) throw new HelperCallError(`${name} 자격을 찾지 못했습니다.`, name);
|
|
339
344
|
signal.throwIfAborted();
|
|
340
345
|
const maxTokens = call.maxTokens ?? model.maxTokens;
|
|
@@ -344,18 +349,11 @@ export async function completeRole(prompt: string, ctx: ExtensionContext, signal
|
|
|
344
349
|
response = await completeSimple(model, {
|
|
345
350
|
messages: [{ role: "user", content: prompt, timestamp: Date.now() }],
|
|
346
351
|
}, { apiKey, sessionId, maxTokens: maxTokens ?? undefined,
|
|
347
|
-
disableReasoning: true, signal });
|
|
352
|
+
disableReasoning: true, signal, onAttempt: usage.onAttempt });
|
|
348
353
|
} catch (error) {
|
|
349
354
|
throw new HelperCallError(error instanceof Error ? error.message : String(error), name, { cause: error, providerFailure: true });
|
|
350
355
|
}
|
|
351
|
-
|
|
352
|
-
// 응답도 청구된 시도라 먼저 기록하고, 응답 없이 던진 예외는 관측한 usage가 없어 남기지 않는다.
|
|
353
|
-
// 장부 저장 실패는 삼키지 않고 그 모델 이름으로 실패시킨다.
|
|
354
|
-
// ctx 타입은 읽기 전용이지만 런타임 값은 세션의 SessionManager다(extensions/runner.ts).
|
|
355
|
-
(ctx.sessionManager as Partial<Pick<SessionManager, "appendModelUsage">>).appendModelUsage?.({
|
|
356
|
-
purpose: call.role, role: slotName, api: model.api, provider: model.provider,
|
|
357
|
-
model: model.id, usage: response.usage, stopReason: response.stopReason, errorMessage: response.errorMessage,
|
|
358
|
-
}, { sessionId, parentId: ctx.sessionManager.getLeafId() });
|
|
356
|
+
usage.assertSaved();
|
|
359
357
|
const truncated = response.stopReason === "length" && call.acceptTruncated === true;
|
|
360
358
|
if (response.stopReason !== "stop" && !truncated) {
|
|
361
359
|
throw new HelperCallError(response.errorMessage ?? `Model stopped: ${response.stopReason}`, name, { cause: response, providerFailure: response.stopReason === "error" });
|
|
@@ -490,25 +488,25 @@ export async function withFallback<T>(attempt: (requested: HelperModel) => Promi
|
|
|
490
488
|
const text = raw.replace(/\s+/g, " ").trim();
|
|
491
489
|
failures.push(`${typeof requested === "object" ? model : displayName(model)} 실패: ${text}`);
|
|
492
490
|
if (signal.aborted) return { status: "cancelled", failures };
|
|
493
|
-
// A non-operational refusal, including an empty provider response, does not authorize
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if (
|
|
497
|
-
let limited = false;
|
|
491
|
+
// A non-operational refusal (auth, account, policy), including an empty provider response, does not authorize
|
|
492
|
+
// resending the request to another model, for skim and draft alike. A provider usage limit keeps its routes.
|
|
493
|
+
let limited = false;
|
|
494
|
+
if (error instanceof HelperCallError && error.providerFailure) {
|
|
498
495
|
try {
|
|
499
496
|
// The host loader rewrites runtime SDK imports; static package imports bypass that boundary.
|
|
500
497
|
const { isUsageLimitOutcome } = await import("@oh-my-pi/pi-ai");
|
|
501
498
|
limited = isUsageLimitOutcome(undefined, raw);
|
|
502
499
|
} catch { /* Optional route classification cannot prevent the existing fallback. */ }
|
|
503
|
-
if (limited)
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
if (
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
500
|
+
if (!limited && !(await operationalFailure(error.cause ?? error))) break;
|
|
501
|
+
}
|
|
502
|
+
if (limited && requested === ROLE_PRIMARY) {
|
|
503
|
+
if (slot && model === primary) {
|
|
504
|
+
const expiry = await limitExpiry(raw, Date.now());
|
|
505
|
+
if (expiry !== undefined && !signal.aborted) slot.map.set(slot.key, expiry);
|
|
506
|
+
}
|
|
507
|
+
if (scope) {
|
|
508
|
+
const routes = await sameModelRoutes(scope.ctx.cwd, model);
|
|
509
|
+
requests.splice(index + 1, 0, ...routes.filter((route) => route !== fallback?.name).map((route) => ({ route })));
|
|
512
510
|
}
|
|
513
511
|
}
|
|
514
512
|
if (signal.aborted) return { status: "cancelled", failures };
|
|
@@ -16,7 +16,9 @@ Main이나 Maker는 재현 방법을 실행한 뒤 `previousReviewId`와 `probeR
|
|
|
16
16
|
|
|
17
17
|
코드 검토는 기본 한 번이다. 첫 코드 검토에서 blocker가 나온 체인만 두 번째 코드 검토를 할 수 있다. probe는 코드 검토 횟수에 넣지 않으므로 실행 순서에 따라 결과의 `round` 번호는 다를 수 있다. 첫 검토 뒤 새로 나온 지적은 심각도와 probe verdict에 관계없이 `roundCap.limitCandidates`로 안내하며, `resolve`에서 지적 id와 사유를 근거로 적어 `limit`로 닫는다. 자발적으로 고쳤다면 그 사실과 검사 근거도 적는다. 첫 검토의 지적에는 여전히 각각 `fixed|refuted|limit`와 근거가 필요하다.
|
|
18
18
|
|
|
19
|
-
Main과 Maker는 바뀐 줄의 marker나 high-risk 선언이 있는 코드만 검토 대상으로 넘긴다.
|
|
19
|
+
Main과 Maker는 바뀐 줄의 marker나 high-risk 선언이 있는 코드만 검토 대상으로 넘긴다. 그런 코드는 커밋이나 게시 여부와 관계없이 완료를 보고하기 전에 1라운드를 돌린다. 원격이 없거나 커밋 요청이 없다는 이유로 검토를 미루지 않는다(2026-11-22 약한 모델 `shop-service-b`에서 Haiku와 Sonnet이 조기 안내를 받고도 커밋하지 않는다며 건너뜀).
|
|
20
|
+
|
|
21
|
+
명세가 다루지 않는 보안 기본값(다른 사용자의 데이터 접근 제어, 음수나 범위 밖 입력 검증, 로그와 쿼리 인젝션)에 대한 지적은 「명세가 요구하지 않는다」만으로 `refuted`나 `limit`로 닫지 않는다. 명세가 그 동작을 명시적으로 허용한 문구를 인용하거나, 고치거나, 사용자 결정으로 남긴다(2026-11-22 같은 비교에서 Terra와 DeepSeek 작성자가 접근 제어와 음수 수량 지적을 명세 침묵으로 반박함).
|
|
20
22
|
|
|
21
23
|
references(선택, 최대 10개)는 심사 대상이 아닌 맥락용 기존 또는 신규 파일(예: 작업 기록, 계약 파일)의 현재 내용을 변경 뒤에 읽기 전용으로 싣는다. 명시한 경로만이며 통과 지문을 덮지 않고 references만으로는 심사하지 않는다. 정책상 제외 경로(비밀을 담는 파일), gitignore, 심볼릭 링크, 바이너리, 파일당 200KiB 초과, inputs와 함께 쓰는 맥락 예산(합계 200KiB, inputs를 먼저 싣고 references는 남은 예산을 쓴다) 초과, 읽는 동안 열린 파일의 실제 경로가 고정한 저장소 루트 아래 요청 경로와 달라진 경우는 빠지고 skippedReferences에 이유가 나온다. 이 경로 확인은 Linux(WSL 포함)의 /proc/self/fd에 의존하므로 native Windows/macOS에서는 references를 읽지 않고 skippedReferences에 unsupported 이유를 남긴다(변경 파일 심사는 그대로). inputs(선택, 최대 10개)는 변경이 일관돼야 하는 명세, 계약, 스키마, 호출자 파일이며, references와 같은 읽기, 필터, 제한으로(맥락 예산은 inputs가 먼저 쓴다) 별도 블록에 싣고(심사 대상 아님, 빠진 것은 skippedInputs) files와 겹치면 거절한다. references와 달리 통과에 묶여서, resolve 뒤 입력이 바뀌거나 지워지면 git_finalize가 그 통과를 덮지 않는 것으로 보고 다시 검토를 요구한다(inputs 없는 검토는 그대로). 이어지는 라운드는 앞 라운드의 입력을 이어받고 더할 수 있으며, 이어받은 입력을 더 읽을 수 없으면 거절하므로 빼려면 previousReviewId 없이 새로 시작한다.
|
|
22
24
|
|
|
@@ -587,7 +587,7 @@ evidence locator·이유를 남긴다. `held`는 같은 identity와 보류 이
|
|
|
587
587
|
`routing.high-risk.mainIntervention`이다.
|
|
588
588
|
- **계열 교차검증과 Maker의 보고 전 검토는 `rule://cross-review-procedure`가 정본이다.**
|
|
589
589
|
Main은 Maker 소유 코드에 직접 `cross_review`를 돌리지 않고 owner에게 지적과 다음 라운드를 넘긴 뒤 근거를 확인해 resolve한다.
|
|
590
|
-
owner를 다시 깨울 수 없을 때만 Main이 대신한다.
|
|
590
|
+
owner를 다시 깨울 수 없을 때만 Main이 대신한다. 검토 횟수 상한은 같은 정본을 따른다.
|
|
591
591
|
면제는 사용자 명시 지시만 허용하며 2026-11-09 공급자 한도 상시 예외도 같은 정본을 따른다.
|
|
592
592
|
- Main은 각 finding을 `ACCEPTED`·`REJECTED_WITH_EVIDENCE`·`ESCALATED`로 판정한다. 재작업 주문에는
|
|
593
593
|
사용자 관측·재현 결과 또는 실제 diff와 요구 계약의 모순 및 정확한 locator가 필요하다.
|
|
@@ -317,6 +317,14 @@ try {
|
|
|
317
317
|
$stagedByFinalizer = $true
|
|
318
318
|
[void](Invoke-Git -WorkingDirectory $repoRoot -GitArgs (@('--literal-pathspecs', 'add', '-A', '--') + $repoPaths))
|
|
319
319
|
$cachedPaths = Get-GitPaths -WorkingDirectory $repoRoot -GitArgs @('-c', 'core.quotepath=false', 'diff', '--cached', '--no-renames', '--name-only')
|
|
320
|
+
if ($payload.finalizeChecksTree) {
|
|
321
|
+
$stage = 'finalize-checks'
|
|
322
|
+
$stagedTree = (Invoke-Git -WorkingDirectory $repoRoot -GitArgs @('write-tree')).Output
|
|
323
|
+
if ($stagedTree -cne $payload.finalizeChecksTree) {
|
|
324
|
+
throw 'The staged tree does not match the checked publication candidate. Call git_finalize again.'
|
|
325
|
+
}
|
|
326
|
+
$stage = 'stage'
|
|
327
|
+
}
|
|
320
328
|
# 계열 교차검증 게이트(index.ts)가 본 파일별 blob(요청한 모든 경로, 안 바뀐 것 포함)과 stage된 내용이 같아야 커밋한다.
|
|
321
329
|
# 게이트 검사와 이 잠금 사이에 파일이 바뀌었거나 게이트가 보지 못한 경로가 stage되면 검토받지 않은 내용이 커밋되므로
|
|
322
330
|
# 거절한다(요청에 gateBlobs가 없으면, 즉 코드 파일이 없는 요청이면 검사하지 않는다).
|
|
@@ -380,6 +388,12 @@ try {
|
|
|
380
388
|
}
|
|
381
389
|
$committedPaths = Get-GitPaths -WorkingDirectory $repoRoot -GitArgs @('-c', 'core.quotepath=false', 'diff-tree', '--no-commit-id', '--no-renames', '--name-only', '-r', $createdCommit)
|
|
382
390
|
Assert-ExactPathSet -Actual $committedPaths -Expected $cachedPaths -Label 'Committed path set'
|
|
391
|
+
if ($payload.finalizeChecksTree) {
|
|
392
|
+
$committedTree = (Invoke-Git -WorkingDirectory $repoRoot -GitArgs @('rev-parse', "$createdCommit^{tree}")).Output
|
|
393
|
+
if ($committedTree -cne $payload.finalizeChecksTree) {
|
|
394
|
+
throw "The created commit $createdCommit does not match the checked publication candidate. The local commit exists and was NOT pushed; inspect it before retrying."
|
|
395
|
+
}
|
|
396
|
+
}
|
|
383
397
|
# 커밋 hook이 stage 뒤 파일을 다시 쓸 수 있으므로 push 전에 커밋에 들어간 blob도 게이트가 본 blob과 대조한다. 어긋나면 되돌리지
|
|
384
398
|
# 않고(사용자 작업 보존) 로컬 커밋이 남았음을 알리며 멈춘다.
|
|
385
399
|
if ($gateMap) {
|
|
@@ -486,7 +486,6 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
486
486
|
const outsideCwdReason = params.outsideCwdReason?.trim();
|
|
487
487
|
const request = { cwd: windows?.[0] ?? pi.cwd, files, message, outsideCwdReason, generatedFiles: regeneratedManifest ? [manifestPath] : undefined };
|
|
488
488
|
let finalizeChecks: FinalizeChecksResult | undefined;
|
|
489
|
-
let finalizeChecksHead: string | undefined;
|
|
490
489
|
const run = spawnExec(signal);
|
|
491
490
|
let pathPreflight: { root: string; paths: string[] } | undefined;
|
|
492
491
|
const verifyPaths = async () => {
|
|
@@ -510,7 +509,7 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
510
509
|
try {
|
|
511
510
|
finalizeChecks = await runFinalizeChecks({
|
|
512
511
|
root, files: paths, git, exec: run, signal, waiver: params.finalizeChecksWaiver,
|
|
513
|
-
sessionManager: ctx?.sessionManager,
|
|
512
|
+
sessionManager: ctx?.sessionManager, publicationCandidate: true,
|
|
514
513
|
authorize: async () => {
|
|
515
514
|
// Project commands may only run after the finalizer approves the same target/paths.
|
|
516
515
|
const authoritative = await verifyPaths();
|
|
@@ -519,13 +518,10 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
519
518
|
authoritative.paths.some((path, index) => pathKey(path) !== pathKey(paths[index]))) {
|
|
520
519
|
throw new Error("The publication paths changed during path preflight.");
|
|
521
520
|
}
|
|
522
|
-
const head = await run(git, ["rev-parse", "--verify", "HEAD"], { cwd: root });
|
|
523
|
-
if (head.code !== 0) throw new Error(`Could not read HEAD: ${(head.stderr || head.stdout).trim()}`);
|
|
524
|
-
finalizeChecksHead = head.stdout.trim();
|
|
525
521
|
const missing = paths.filter((path) => !gateBlobs || !Object.hasOwn(gateBlobs, path));
|
|
526
522
|
const blobs = await currentBlobs(run, git, root, missing);
|
|
527
523
|
gateBlobs = { ...Object.fromEntries(blobs), ...gateBlobs };
|
|
528
|
-
onUpdate?.({ content: [{ type: "text", text: "
|
|
524
|
+
onUpdate?.({ content: [{ type: "text", text: "Checking the repository's publication candidate." }], details: { phase: "finalize-checks" } });
|
|
529
525
|
},
|
|
530
526
|
});
|
|
531
527
|
} catch (error) {
|
|
@@ -537,7 +533,10 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
537
533
|
details: { phase: "preflight", files },
|
|
538
534
|
});
|
|
539
535
|
// Gate blobs and HEAD bind the checked publication to the commit transaction under the lock.
|
|
540
|
-
await writeFile(requestPath, JSON.stringify({
|
|
536
|
+
await writeFile(requestPath, JSON.stringify({
|
|
537
|
+
...request, finalizeChecksHead: finalizeChecks?.publicationHead, finalizeChecksTree: finalizeChecks?.candidateTree,
|
|
538
|
+
gateBlobs: gateBlobs && Object.keys(gateBlobs).length ? gateBlobs : undefined,
|
|
539
|
+
}), "utf8");
|
|
541
540
|
const result = await pi.exec(shell, args, options);
|
|
542
541
|
const parsed = parseResult(result.stdout);
|
|
543
542
|
if (result.code !== 0 || !parsed?.ok) {
|
|
@@ -561,6 +560,7 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
561
560
|
}
|
|
562
561
|
}
|
|
563
562
|
}
|
|
563
|
+
const checksNote = finalizeChecksNote(finalizeChecks);
|
|
564
564
|
return {
|
|
565
565
|
content: [
|
|
566
566
|
{
|
|
@@ -572,7 +572,7 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
572
572
|
+ (memory.file ? ` 기억 transport(${memory.file})를 함께 커밋했다.` : "")
|
|
573
573
|
+ (memory.note ? ` ${memory.note}` : "")
|
|
574
574
|
+ (handoffNote ? ` ${handoffNote}` : "")
|
|
575
|
-
+ (
|
|
575
|
+
+ (checksNote ? `\n${checksNote}` : "")
|
|
576
576
|
+ (parsed.outsideCwdReason ? `\n세션 cwd 밖 경로를 사용자 지시(outsideCwdReason)로 커밋했다: ${parsed.outsideCwdReason}` : "")
|
|
577
577
|
+ (parsed.leftoverTotal && parsed.leftoverFiles?.length
|
|
578
578
|
? `\n커밋하지 않고 남은 파일(${parsed.leftoverScope}/ 아래 ${parsed.leftoverTotal}개, 이번 커밋에 포함되지 않음):\n${parsed.leftoverFiles.join("\n")}`
|
|
@@ -582,7 +582,7 @@ export const finalizeTool = (pi: ToolApi): CustomTool<any, any> => ({
|
|
|
582
582
|
+ syncHint
|
|
583
583
|
},
|
|
584
584
|
],
|
|
585
|
-
details:
|
|
585
|
+
details: checksNote ? { ...parsed, finalizeChecks } : parsed,
|
|
586
586
|
};
|
|
587
587
|
} finally {
|
|
588
588
|
await rm(tempDir, { recursive: true, force: true });
|
|
@@ -25924,10 +25924,11 @@ function main() {
|
|
|
25924
25924
|
return;
|
|
25925
25925
|
}
|
|
25926
25926
|
|
|
25927
|
-
// 어느 후보가 정본인지 정할 수 없는 상태(ambiguous)도
|
|
25928
|
-
|
|
25927
|
+
// 어느 후보가 정본인지 정할 수 없는 상태(ambiguous)와 대상 파일이 없는 상태(missing-file)도 쓰기 전에 막는다.
|
|
25928
|
+
// missing-file 을 여기서 빼면 앞 파일을 이미 고친 뒤 쓰기 루프에서 ENOENT 로 멈춰 설치가 반쯤 패치된다.
|
|
25929
|
+
const unresolved = state.filter(s => s.status === "anchor-lost" || s.status === "ambiguous" || s.status === "missing-file");
|
|
25929
25930
|
if (unresolved.length > 0) {
|
|
25930
|
-
const lost = unresolved.map(s => (s.status === "ambiguous" ? `${s.file} (후보가 둘 이상 성립한다)` : s.file));
|
|
25931
|
+
const lost = unresolved.map(s => (s.status === "ambiguous" ? `${s.file} (후보가 둘 이상 성립한다)` : s.status === "missing-file" ? `${s.file} (파일이 없다)` : s.file));
|
|
25931
25932
|
throw new Error(`앵커를 찾지 못했다: ${lost.join(", ")} — 패키지 버전이 바뀌었다. 패치를 다시 만들어야 한다.`);
|
|
25932
25933
|
}
|
|
25933
25934
|
if (state.every(s => s.status === "applied")) {
|
package/bin/ci-local.mjs
CHANGED
|
@@ -179,7 +179,10 @@ async function runExtensions(env, signal) {
|
|
|
179
179
|
await run([process.execPath, "patches/check-extension-duplicates.mjs"], harness, env, signal);
|
|
180
180
|
await run(["bun", "test", "./agent/extensions/tests", "./agent/extensions/command-guard",
|
|
181
181
|
"./agent/tools/git-finalizer", "./agent/tools/windows-control", "./agent/tools/artifact-search",
|
|
182
|
-
"./agent/tools/vm-build", "./
|
|
182
|
+
"./agent/tools/vm-build", "./agent/tools/ego-browser", "./agent/tools/deploy-verify",
|
|
183
|
+
"./agent/tools/windows-build", "./agent/cuelo-plugins/scratch-dependency-hint", "./skill-cost"], harness, env, signal);
|
|
184
|
+
await run([process.execPath, "--test", "agent/rule-ledger/check.test.mjs", "agent/extension-ledger/check.test.mjs",
|
|
185
|
+
"agent/skills/kill-ai-slop/scripts/scan.test.mjs"], harness, env, signal);
|
|
183
186
|
}
|
|
184
187
|
|
|
185
188
|
async function coreTest(file, log, env, signal) {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|