cuelo 0.10.347 → 0.10.348
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 +52 -52
- 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/live/draft-secret/route.js +1 -1
- package/.next/server/app/api/live/speech/route.js +1 -1
- package/.next/server/app/api/live/transcribe-secret/route.js +1 -1
- package/.next/server/app/api/updates/apply/route.js +1 -1
- package/.next/server/app/api/updates/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 +4 -4
- 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 +52 -52
- package/.next/server/chunks/4975.js +1 -1
- package/.next/server/chunks/5228.js +1 -1
- package/.next/server/chunks/5870.js +1 -1
- 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-4311c4c4acebcd19.js → layout-a7e3b788bad21543.js} +1 -1
- package/.next/static/chunks/app/{page-6cec0b2740184a54.js → page-333f0faf1f8c9c49.js} +21 -21
- 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/agents/maker.md +10 -9
- package/Tools/OMP_Global_Config/agent/extensions/cross-review.ts +106 -38
- package/Tools/OMP_Global_Config/agent/extensions/lib/cross-review.ts +185 -83
- package/Tools/OMP_Global_Config/agent/rules/cross-review-procedure.md +9 -6
- package/Tools/OMP_Global_Config/agent/rules/subagent.md +5 -4
- package/Tools/OMP_Global_Config/agent/sop/_writer.md +9 -8
- package/Tools/OMP_Global_Config/agent/tools/ego-browser/index.ts +8 -1
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +2 -1
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +10 -5
- package/package.json +1 -1
- package/public/interpreter-draft/capture.js +11 -2
- /package/.next/static/{uvgTLdNTSi9QmrhxUiV1e → tFp7Ermfj8x_Dq3tE--j-}/_buildManifest.js +0 -0
- /package/.next/static/{uvgTLdNTSi9QmrhxUiV1e → tFp7Ermfj8x_Dq3tE--j-}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":101326456,"timestamp":494943,"id":14,"parentId":1,"tags":{},"startTime":1795464343836,"traceId":"caa48de6b8f93d74"},{"name":"run-typescript","duration":23013776,"timestamp":102281400,"id":11573,"parentId":1,"tags":{},"startTime":1795464445623,"traceId":"caa48de6b8f93d74"},{"name":"static-check","duration":3297714,"timestamp":125404293,"id":11576,"parentId":1,"tags":{},"startTime":1795464468746,"traceId":"caa48de6b8f93d74"},{"name":"static-generation","duration":9647580,"timestamp":128810174,"id":11796,"parentId":1,"tags":{},"startTime":1795464472152,"traceId":"caa48de6b8f93d74"},{"name":"collect-build-traces","duration":20820810,"timestamp":128787379,"id":11793,"parentId":1,"tags":{},"startTime":1795464472129,"traceId":"caa48de6b8f93d74"},{"name":"telemetry-flush","duration":62,"timestamp":149612509,"id":11805,"parentId":1,"tags":{},"startTime":1795464492954,"traceId":"caa48de6b8f93d74"},{"name":"next-build","duration":149199834,"timestamp":412784,"id":1,"tags":{"buildMode":"default","version":"16.2.12","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1795464343754,"traceId":"caa48de6b8f93d74"}]
|
|
@@ -9,7 +9,7 @@ const MEMORY_RE = /(const phase1Model = await resolveMemoryModel\(\{[^}]*?fallba
|
|
|
9
9
|
const MEMORY_DONE = /const phase1Model = await resolveMemoryModel\(\{[^}]*?fallbackRole: "smol"/;
|
|
10
10
|
const EXPECTED = {
|
|
11
11
|
name: 'cuelo',
|
|
12
|
-
version: '0.10.
|
|
12
|
+
version: '0.10.348',
|
|
13
13
|
distribution: 'cuelo',
|
|
14
14
|
coreVersion: '19.1.1',
|
|
15
15
|
};
|
|
@@ -8,7 +8,7 @@ tools: [read, bash, edit, write, grep, glob, skim, draft, lsp, eval, generate_im
|
|
|
8
8
|
output: {}
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
<!-- omp-global-config:generated source-hash=
|
|
11
|
+
<!-- omp-global-config:generated source-hash=285d2895f0b9 generated; edit agent/sop/maker.md, agent/sop/_writer.md, agent/sop/_common.md then run node patches/build-agents.mjs -->
|
|
12
12
|
|
|
13
13
|
You are the delegated implementation Maker on the default `modelRoles.implSonnet` slot. A delegated slice
|
|
14
14
|
is yours end to end.
|
|
@@ -145,14 +145,15 @@ Draft coverage is per authored block, not per tool invocation. A draft for intro
|
|
|
145
145
|
never re-explained at the end.
|
|
146
146
|
`mainLane.workerReview.steeringCheckpoint` (with `composition` and `finalScope`) and
|
|
147
147
|
`routing.high-risk.mainIntervention.preEditContract` are authoritative.
|
|
148
|
-
- Run `cross_review` `action:"review"` yourself after your
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
148
|
+
- Run `cross_review` `action:"review"` yourself after your focused checks and before reporting when
|
|
149
|
+
the gate scope meets the size rule (at least 3 changed gate-target code files or 50 added plus
|
|
150
|
+
removed lines in those files), a changed line hits a `git_finalize` marker, or `harness-policy`
|
|
151
|
+
material risk is declared (including a brief's `# Acceptance` requiring review for that risk).
|
|
152
|
+
A path name alone does not trigger review. Use the `files` target and exclusion rules in
|
|
153
|
+
`rule://cross-review-procedure`. For a reported concrete symptom, include the exact before and
|
|
154
|
+
after command and output in `acceptance` or a bound input. Run any reviewer-designed symptom
|
|
155
|
+
probe through the existing verdict-only round. `acceptance` is the brief's acceptance; `authors`
|
|
156
|
+
is your own model selector (the provider/model you run as - `"main"` is refused in a subagent session, and a first
|
|
156
157
|
round whose authors list no model of your own session's family is refused); pass relevant
|
|
157
158
|
unchanged callers, specs or contracts as `inputs` (bound to the pass) or `references` (context
|
|
158
159
|
only) instead of adding them as targets. For each first-round finding, fix it and re-run the
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chmodSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
3
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
3
4
|
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
4
5
|
// 런타임 패키지는 legacy-pi 확장 loader가 host SDK 경로로 재작성하므로 아래에서 지연 import한다.
|
|
5
6
|
import {
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
earlyReviewNotice,
|
|
11
12
|
SLOT,
|
|
12
13
|
ledgerPath,
|
|
14
|
+
resolveRepoTargets,
|
|
13
15
|
runResolve,
|
|
14
16
|
runReview,
|
|
15
17
|
snapshotRoot,
|
|
@@ -35,6 +37,13 @@ import type { TurnEndNotices } from "./turn-end-guard";
|
|
|
35
37
|
|
|
36
38
|
const OPENAI_PROVIDERS: Record<string, true> = { "openai-codex": true, openai: true };
|
|
37
39
|
|
|
40
|
+
const NOTICE_BATCH_MS = 25;
|
|
41
|
+
const NOTICE_RESULT_WAIT_MS = 1_000;
|
|
42
|
+
|
|
43
|
+
function appliedAstEdit(details: unknown): details is { applied: true } {
|
|
44
|
+
return !!details && typeof details === "object" && "applied" in details && details.applied === true;
|
|
45
|
+
}
|
|
46
|
+
|
|
38
47
|
/** slot이 가리키는 모델을 해석해 한 번 부른다(reasoning high, 10분 제한). 응답이 돌아온 시도는 비용 장부에 남긴다. */
|
|
39
48
|
/** system and purpose let slop_check reuse the role resolution, call, and usage ledger. */
|
|
40
49
|
export async function completeReviewer(
|
|
@@ -174,7 +183,7 @@ export default function crossReview(pi: ExtensionAPI): void {
|
|
|
174
183
|
const z = pi.zod;
|
|
175
184
|
pi.registerTool({
|
|
176
185
|
name: "cross_review", label: "Cross Review", loadMode: "essential", approval: "read",
|
|
177
|
-
description: "Read rule://cross-review-procedure first. action: review|resolve. review: risk-
|
|
186
|
+
description: "Read rule://cross-review-procedure first. action: review|resolve. review: marker, high-risk, or size-triggered changes; acceptance and authors (model selectors; subagents own family, not main). Delta: previousReviewId only for an R1 blocker. One verdict-only probe on unchanged code: previousReviewId + probeResults. base: first committed round. inputs bind pass; references=context. Sends code to reviewer providers. Main-only resolve: reviewId + resolutions[{id,status:fixed|refuted|limit,evidence}].",
|
|
178
187
|
parameters: z.object({
|
|
179
188
|
action: z.string(),
|
|
180
189
|
files: z.array(z.string()).optional(),
|
|
@@ -196,59 +205,118 @@ export default function crossReview(pi: ExtensionAPI): void {
|
|
|
196
205
|
},
|
|
197
206
|
});
|
|
198
207
|
|
|
199
|
-
//
|
|
200
|
-
//
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
// 추적은 도구가 꺼져 있어도 갱신하고, 같은 경로의 조회가 겹치면 마지막 조회만, 세션이 바뀌면 옛 조회는 버린다.
|
|
208
|
+
// 경로가 있는 편집은 marker와 변경 크기를 본다. 경로를 모르는 도구는 저장소의 변경 크기만 본다.
|
|
209
|
+
// 턴 종료 연결점은 동기다. 같은 저장소의 조회가 겹치면 마지막 조회만, 세션이 바뀌면 옛 조회는 버린다.
|
|
210
|
+
type RepoNoticeState = { edited: Set<string>; uncovered: string[]; lookup: number; sendPending: boolean };
|
|
211
|
+
const repos = new Map<string, RepoNoticeState>();
|
|
212
|
+
const inventoryBatches = new Map<string, { active?: Promise<void>; queued?: Promise<void> }>();
|
|
205
213
|
const noticed = new Set<string>();
|
|
206
|
-
const uncovered = new Set<string>();
|
|
207
|
-
const latestLookup = new Map<string, number>();
|
|
208
|
-
let lookupSeq = 0;
|
|
209
214
|
let epoch = 0;
|
|
210
215
|
let remindedThisInput = false;
|
|
211
|
-
|
|
216
|
+
const reset = () => { epoch++; noticed.clear(); repos.clear(); inventoryBatches.clear(); remindedThisInput = false; };
|
|
217
|
+
onSessionLifecycle(pi, { start: reset });
|
|
218
|
+
pi.on("session_shutdown", reset);
|
|
212
219
|
pi.on("input", (event) => {
|
|
213
220
|
if (event.source === "interactive" || event.source === "rpc") remindedThisInput = false;
|
|
214
221
|
});
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
const refresh = async (root: string, state: RepoNoticeState, startedEpoch: number, send: boolean) => {
|
|
223
|
+
state.sendPending ||= send;
|
|
224
|
+
const lookup = ++state.lookup;
|
|
225
|
+
try {
|
|
226
|
+
const notices = await earlyReviewNotice(root, state.edited, spawnExec(), () => readCrossReviewRecords(ledgerPath()));
|
|
227
|
+
if (startedEpoch !== epoch || lookup !== state.lookup) return;
|
|
228
|
+
state.uncovered = notices.map(({ path }) => resolve(root, path));
|
|
229
|
+
if (!state.sendPending || !(pi.getActiveTools?.().includes("cross_review") ?? true)) return;
|
|
230
|
+
state.sendPending = false;
|
|
231
|
+
for (const { path, text } of notices) {
|
|
232
|
+
const absolute = resolve(root, path);
|
|
233
|
+
if (noticed.has(absolute)) continue;
|
|
234
|
+
try {
|
|
235
|
+
pi.sendMessage({ customType: "cross-review-notice", content: text, display: false, attribution: "agent" }, { deliverAs: "aside" });
|
|
236
|
+
noticed.add(absolute);
|
|
237
|
+
} catch { /* 전달에 실패해도 다음 편집에서 다시 보낼 수 있다. */ }
|
|
238
|
+
}
|
|
239
|
+
} catch { /* 보조 알림 실패를 편집이나 검토 결과로 전파하지 않는다. */ }
|
|
240
|
+
};
|
|
241
|
+
const stateFor = (root: string): RepoNoticeState => {
|
|
242
|
+
let state = repos.get(root);
|
|
243
|
+
if (!state) repos.set(root, state = { edited: new Set(), uncovered: [], lookup: 0, sendPending: false });
|
|
244
|
+
return state;
|
|
245
|
+
};
|
|
246
|
+
const refreshAfterOpaqueWrite = async (cwd: string, startedEpoch: number) => {
|
|
247
|
+
if (startedEpoch !== epoch) return;
|
|
248
|
+
let inventory = inventoryBatches.get(cwd);
|
|
249
|
+
if (!inventory) inventoryBatches.set(cwd, inventory = {});
|
|
250
|
+
const queue = inventory;
|
|
251
|
+
queue.queued ??= delay(NOTICE_BATCH_MS).then(async () => {
|
|
252
|
+
// If the previous scan outlived its tool result, join one follow-up for writes during that scan.
|
|
253
|
+
await queue.active?.catch(() => {});
|
|
254
|
+
if (startedEpoch !== epoch) return;
|
|
255
|
+
queue.queued = undefined;
|
|
256
|
+
queue.active = (async () => {
|
|
257
|
+
const git = await spawnExec()("git", ["rev-parse", "--show-toplevel"], { cwd });
|
|
258
|
+
if (startedEpoch !== epoch || git.code !== 0) return;
|
|
259
|
+
const root = git.stdout.replace(/\r?\n$/, "");
|
|
260
|
+
if (isAbsolute(root)) await refresh(root, stateFor(root), startedEpoch, true);
|
|
261
|
+
})();
|
|
262
|
+
try { await queue.active; }
|
|
263
|
+
finally {
|
|
264
|
+
queue.active = undefined;
|
|
265
|
+
if (startedEpoch === epoch && !queue.queued) inventoryBatches.delete(cwd);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
await queue.queued;
|
|
225
269
|
};
|
|
226
270
|
pi.on("tool_result", async (event, ctx) => {
|
|
227
|
-
// 알림은 보조다: 경로 읽기·git·원장·전달 어느 단계의 실패도 편집 흐름으로 번지지 않고, 전달에 실패한 파일은 다음 편집에서 다시 알릴 수 있다.
|
|
228
271
|
if (event.isError) return;
|
|
272
|
+
const startedEpoch = epoch;
|
|
229
273
|
if (event.toolName === "cross_review") {
|
|
230
|
-
|
|
231
|
-
try { await refresh(path, ctx.cwd); } catch { /* 다음 편집이나 검토 결과에서 다시 본다. */ }
|
|
232
|
-
}
|
|
274
|
+
await Promise.all([...repos].filter(([, state]) => state.uncovered.length > 0).map(([root, state]) => refresh(root, state, startedEpoch, false)));
|
|
233
275
|
return;
|
|
234
276
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
277
|
+
const details = event.details;
|
|
278
|
+
const appliedResolve = event.toolName === "resolve" && details && typeof details === "object"
|
|
279
|
+
&& "sourceToolName" in details && details.sourceToolName === "ast_edit"
|
|
280
|
+
&& "sourceResultDetails" in details && appliedAstEdit(details.sourceResultDetails);
|
|
281
|
+
if (event.toolName === "bash" || event.toolName === "eval" || appliedResolve || (event.toolName === "ast_edit" && appliedAstEdit(details))) {
|
|
282
|
+
// The runner awaits tool_result. Bound the whole check, including cwd resolution, but leave a slow scan running.
|
|
283
|
+
const deadline = new AbortController();
|
|
284
|
+
const check = async () => {
|
|
285
|
+
let cwd = ctx.cwd;
|
|
286
|
+
const input = event.input;
|
|
287
|
+
if (event.toolName === "bash" && input && typeof input === "object" && "cwd" in input && typeof input.cwd === "string") {
|
|
288
|
+
const { resolveToCwd } = await import("@oh-my-pi/pi-coding-agent/tools/path-utils");
|
|
289
|
+
cwd = resolve(resolveToCwd(input.cwd, cwd));
|
|
290
|
+
}
|
|
291
|
+
await refreshAfterOpaqueWrite(cwd, startedEpoch);
|
|
292
|
+
};
|
|
293
|
+
try { await Promise.race([check(), delay(NOTICE_RESULT_WAIT_MS, undefined, { signal: deadline.signal })]); }
|
|
294
|
+
catch { /* 실패한 보조 조회는 도구 출력을 바꾸지 않는다. */ }
|
|
295
|
+
finally { deadline.abort(); }
|
|
296
|
+
return;
|
|
245
297
|
}
|
|
298
|
+
if (event.toolName !== "edit" && event.toolName !== "write") return;
|
|
299
|
+
const touched = new Map<string, RepoNoticeState>();
|
|
300
|
+
try {
|
|
301
|
+
const exec = spawnExec();
|
|
302
|
+
for (const absolute of editedPaths(event.toolName, event.input, ctx.cwd)) {
|
|
303
|
+
const target = await resolveRepoTargets(ctx.cwd, [relative(ctx.cwd, absolute)], exec);
|
|
304
|
+
if (startedEpoch !== epoch) return;
|
|
305
|
+
if ("failure" in target) continue;
|
|
306
|
+
const state = stateFor(target.root);
|
|
307
|
+
state.edited.add(target.targets[0]!.path);
|
|
308
|
+
touched.set(target.root, state);
|
|
309
|
+
}
|
|
310
|
+
} catch { /* 경로를 찾지 못해도 편집 결과는 유지한다. */ }
|
|
311
|
+
await Promise.all([...touched].map(([root, state]) => refresh(root, state, startedEpoch, true)));
|
|
246
312
|
});
|
|
247
313
|
pi.events.on("cuelo:turn-end-notices", (data) => {
|
|
248
314
|
const { ctx, notices } = data as TurnEndNotices;
|
|
249
|
-
if (ctx.agent?.kind === "sub" || remindedThisInput ||
|
|
315
|
+
if (ctx.agent?.kind === "sub" || remindedThisInput || !(pi.getActiveTools?.().includes("cross_review") ?? true)) return;
|
|
316
|
+
const uncovered = [...repos.values()].flatMap((state) => state.uncovered);
|
|
317
|
+
if (uncovered.length === 0) return;
|
|
250
318
|
remindedThisInput = true;
|
|
251
|
-
const names =
|
|
252
|
-
notices.push(`cross_review: ${names.join(", ")}${uncovered.
|
|
319
|
+
const names = uncovered.slice(0, 5).map((path) => relative(ctx.cwd, path) || path);
|
|
320
|
+
notices.push(`cross_review: ${names.join(", ")}${uncovered.length > names.length ? ` 외 ${uncovered.length - names.length}개` : ""}는 review marker 또는 변경 크기 기준에 해당하는데 지금 내용을 덮는 통과 기록이 없다. 완료를 보고하기 전에 필요한 파일을 함께 한 번 cross_review하라(rule://cross-review-procedure). 이 안내는 입력당 한 번이며 승인이 아니다.`);
|
|
253
321
|
});
|
|
254
322
|
}
|