chore: checkpoint web Blender migration source, tools and docs
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-10 11:18:01 +08:00
parent 122142c26c
commit f3e21c6b98
6887 changed files with 257154 additions and 12294 deletions

View File

@@ -11,7 +11,9 @@ export const CONTEXT_LIMITS = Object.freeze({
parentStatusBytes: 6144,
evidenceFiles: 12,
evidenceBytes: 8192,
contextTokens: 3500,
// Keep enough headroom for the serialized envelope while retaining a
// bounded payload; the envelope is counted again in estimatedContextTokens.
contextTokens: 3800,
// The printed task bundle is itself part of the model input. Reserve room
// for that envelope instead of spending the entire budget on file content.
contextEnvelopeTokens: 1024,
@@ -157,6 +159,17 @@ function inputPaths(source) {
return [...new Set(paths)];
}
function continuationPointer(task) {
const directory = path.join(root, "tests/golden", task);
if (!fs.existsSync(directory)) return null;
const previousPath = path.join(directory, "task-context.json");
const previous = fs.existsSync(previousPath) ? json(previousPath) : {};
const candidates = fs.readdirSync(directory).filter((name) => /^continuation-.*\.json$/u.test(name)).map((name) => path.join(directory, name)).map((file) => { try { const value = json(file); return { file, value, time: Date.parse(value.updatedAt ?? "") || fs.statSync(file).mtimeMs }; } catch { return null; } }).filter((item) => item?.value?.task === task).sort((a, b) => a.time - b.time);
const latest = candidates.at(-1);
const latestNotes = typeof latest?.value.continuationNotes === "string" ? latest.value.continuationNotes.slice(0, 1200) : latest?.value.continuationNotes ? JSON.stringify(latest.value.continuationNotes).slice(0, 1200) : null;
return latest ? { path: relative(latest.file), updatedAt: latest.value.updatedAt ?? null, status: latest.value.status ?? null, focus: latest.value.focus ?? null, nextAction: latest.value.nextAction ?? latest.value.continuationNotes?.nextAction ?? null, nextSourcePaths: (latest.value.nextSourcePaths ?? []).slice(0, 8), notes: latestNotes ?? (typeof previous.continuationNotes === "string" ? previous.continuationNotes.slice(0, 1200) : null) } : null;
}
function pathBytes(file, limit) {
let stat;
try {
@@ -315,6 +328,7 @@ export function compactTaskContext(context) {
},
exitCriteria: context.exitCriteria,
nextTask: context.nextTask,
continuation: context.continuation ? { path: context.continuation.path, updatedAt: context.continuation.updatedAt, status: context.continuation.status, focus: context.continuation.focus, nextAction: context.continuation.nextAction } : null,
sourceDocuments: context.sourceDocuments,
readPolicy: {
required: context.readPolicy.required,
@@ -405,6 +419,7 @@ export function buildTaskContext(requestedTask) {
inputSelection: selectedInputs.inputSelection,
exitCriteria: entry?.exitCriteria ?? ["focused command exits 0", "report and manifest are hash-bound", "failure path does not publish a late result"],
nextTask,
continuation: continuationPointer(task),
sourceDocuments: {
queue: relative(queuePath),
taskCard: taskExists ? relative(taskPath) : "TASK_INDEX_ENTRY",