cuelo 0.9.4 → 0.9.6
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 +6 -6
- 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 +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- 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 +2 -2
- package/.next/server/app/api/agent/[id]/account/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/attachments/[id]/transcription/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/events/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/lounge/events/route.js +1 -1
- package/.next/server/app/api/lounge/route.js +1 -1
- package/.next/server/app/api/project-trust/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/tool-image/route.js +1 -1
- package/.next/server/app/api/update-maintenance/route.js +59 -21
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/office/page_client-reference-manifest.js +1 -1
- package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/office-preview.html +1 -1
- package/.next/server/app/office-preview.rsc +3 -3
- package/.next/server/app/office-preview.segments/_full.segment.rsc +3 -3
- package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/_index.segment.rsc +3 -3
- package/.next/server/app/office-preview.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
- package/.next/server/app/office.html +1 -1
- package/.next/server/app/office.rsc +6 -6
- package/.next/server/app/office.segments/_full.segment.rsc +6 -6
- package/.next/server/app/office.segments/_head.segment.rsc +1 -1
- package/.next/server/app/office.segments/_index.segment.rsc +3 -3
- package/.next/server/app/office.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/office.segments/office.segment.rsc +1 -1
- 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 +3 -3
- package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
- package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
- 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 +6 -6
- package/.next/server/chunks/1008.js +15 -0
- package/.next/server/chunks/5489.js +12 -12
- package/.next/server/chunks/5582.js +1 -1
- package/.next/server/chunks/6429.js +6 -6
- package/.next/server/chunks/7121.js +4 -1
- package/.next/server/chunks/7362.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +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/6110-004be57c825af4d9.js +1 -0
- package/.next/static/chunks/9575-4a84cf066c2f1257.js +22 -0
- package/.next/static/chunks/app/{layout-76b01721b96d2c1a.js → layout-15c56b62f49b1c1d.js} +1 -1
- package/.next/static/css/00f20b26266e86ed.css +1 -0
- package/.next/static/css/7a264466e19eaafd.css +1 -0
- package/.next/trace +108 -108
- package/.next/trace-build +1 -1
- package/README.md +11 -3
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
- package/Tools/OMP_Global_Config/agent/AGENTS.md +6 -0
- package/Tools/OMP_Global_Config/agent/agents/maker.md +11 -5
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/task-guard.ts +35 -14
- package/Tools/OMP_Global_Config/agent/extensions/gitnexus-autosync.ts +89 -19
- package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +194 -0
- package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +32 -15
- package/Tools/OMP_Global_Config/agent/extensions/lib/prepared-task.ts +4 -3
- package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +7 -1
- package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +24 -9
- package/Tools/OMP_Global_Config/agent/rules/subagent.md +23 -4
- package/Tools/OMP_Global_Config/agent/rules/task-guard.md +1 -0
- package/Tools/OMP_Global_Config/agent/sop/_writer.md +10 -4
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +303 -194
- package/install.mjs +1 -0
- package/package.json +1 -1
- package/.next/static/chunks/6110-691c0f77641fc07e.js +0 -1
- package/.next/static/chunks/9575-08609cfc6c1cf3e1.js +0 -22
- package/.next/static/css/1ffe2d5d654f7eea.css +0 -1
- package/.next/static/css/81a05eb6255ef12e.css +0 -1
- /package/.next/static/{6tGLEaiCe3Wa8PkWKUhB4 → kRJ4zgHxJf680foSBrfpf}/_buildManifest.js +0 -0
- /package/.next/static/{6tGLEaiCe3Wa8PkWKUhB4 → kRJ4zgHxJf680foSBrfpf}/_ssgManifest.js +0 -0
|
@@ -85,6 +85,131 @@ const OPUS55_ROW_18410 = {
|
|
|
85
85
|
*/
|
|
86
86
|
const OPUS55_ROW_1851 = OPUS55_ROW_1846.patched.replace('"tps":95.2,', '"tps":93,');
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* learn topic upsert 적용본. 갱신 때 metadata 의 session_id/cwd 는 최초 저장자로 남고,
|
|
90
|
+
* updated_session_id/updated_cwd/updated_at 이 최신 정정자·시점이며 context 는 최신 이유다.
|
|
91
|
+
* first_context/first_timestamp 는 기존 revision 이 명시적으로 1 일 때만 갱신 직전 값으로 보존한다
|
|
92
|
+
* (revision 없음/2+ 는 최초 이유·시점을 알 수 없으므로 지어내지 않는다). `$` 중괄호와 백틱은 쓰지 않는다.
|
|
93
|
+
*/
|
|
94
|
+
const learnTopicUpsertBlock = `// HANSE: topic-key learn upsert
|
|
95
|
+
function upsertLearnTopic(
|
|
96
|
+
state: MnemopiSessionState,
|
|
97
|
+
params: LearnParams,
|
|
98
|
+
target: ReturnType<MnemopiSessionState["getScopedRetainTarget"]>,
|
|
99
|
+
): { id: string; revision: number } {
|
|
100
|
+
const topic = params.topic!.normalize("NFKC").trim().toLowerCase();
|
|
101
|
+
if (!topic) throw new Error("Learn topic must not be blank.");
|
|
102
|
+
if (redactMemorySecrets(topic) !== topic) throw new Error("Learn topic contains a credential.");
|
|
103
|
+
const db = target.memory.conn;
|
|
104
|
+
const existing = db.query(
|
|
105
|
+
"SELECT id, timestamp, metadata_json FROM working_memory WHERE json_extract(metadata_json, '$.topic_key') = ? ORDER BY timestamp DESC, id DESC LIMIT 1",
|
|
106
|
+
).get(topic) as { id: string; timestamp: string; metadata_json: string } | null;
|
|
107
|
+
const revision = existing ? (Number(JSON.parse(existing.metadata_json).revision) || 1) + 1 : 1;
|
|
108
|
+
if (existing) return db.transaction(() => {
|
|
109
|
+
const content = redactMemorySecrets(params.memory);
|
|
110
|
+
const stored = JSON.parse(existing.metadata_json);
|
|
111
|
+
const now = new Date().toISOString();
|
|
112
|
+
// HANSE: learn topic provenance keeps first and latest source
|
|
113
|
+
const firstSeen = stored.revision === 1 ? { first_context: stored.context ?? null, first_timestamp: existing.timestamp } : {};
|
|
114
|
+
const latest = { updated_session_id: state.sessionId, updated_cwd: state.session.sessionManager.getCwd(), updated_at: now };
|
|
115
|
+
db.query("UPDATE working_memory SET content = ?, embed_text = NULL, timestamp = ?, metadata_json = ? WHERE id = ?").run(
|
|
116
|
+
content, now,
|
|
117
|
+
JSON.stringify({ ...firstSeen, ...stored, context: params.context == null ? null : redactMemorySecrets(params.context), topic_key: topic, revision, ...latest }),
|
|
118
|
+
existing.id,
|
|
119
|
+
);
|
|
120
|
+
db.query("DELETE FROM memory_embeddings WHERE memory_id = ?").run(existing.id);
|
|
121
|
+
return { id: existing.id, revision };
|
|
122
|
+
})();
|
|
123
|
+
const id = state.rememberScoped(params.memory, {
|
|
124
|
+
source: "coding-agent-learn", importance: 0.8,
|
|
125
|
+
metadata: { session_id: state.sessionId, cwd: state.session.sessionManager.getCwd(), context: params.context ?? null, tool: "learn", topic_key: topic, revision },
|
|
126
|
+
scope: "bank", extract: true, extractEntities: true, veracity: "tool", memoryType: "fact",
|
|
127
|
+
}, target);
|
|
128
|
+
return { id, revision };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export class LearnTool implements AgentTool<LearnSchema> {`;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 회상 줄의 범위(global/project)·정정 표시 보조. 순수 표시이며 DB 와 RecallResult 원본은 바꾸지 않는다.
|
|
135
|
+
* 범위는 collectScopedRecallResults 가 고른 결과의 실제 bank 로 붙인 일시 필드(recallScope)에서만 읽는다.
|
|
136
|
+
* 정정 표시는 revision>1 일 때만, 최초 시점은 first_timestamp 가 있을 때만, 정정 시점은 updated_at 이 있을 때만 쓴다.
|
|
137
|
+
*/
|
|
138
|
+
const recallProvenanceBlock = String.raw`// HANSE: recall provenance note
|
|
139
|
+
type RecallProvenance = { scope?: string; revision: number; first?: string; corrected?: string };
|
|
140
|
+
function recallProvenance(result: RecallResult): RecallProvenance {
|
|
141
|
+
const scope = (result as { recallScope?: string }).recallScope;
|
|
142
|
+
let meta: Record<string, unknown> | null = null;
|
|
143
|
+
try {
|
|
144
|
+
const raw: unknown = result.metadata ?? (result.metadata_json ? JSON.parse(result.metadata_json) : null);
|
|
145
|
+
if (raw && typeof raw === "object") meta = raw as Record<string, unknown>;
|
|
146
|
+
} catch {
|
|
147
|
+
meta = null;
|
|
148
|
+
}
|
|
149
|
+
const day = (value: unknown): string | undefined =>
|
|
150
|
+
typeof value === "string" && /^\d{4}-\d{2}-\d{2}/.test(value) ? value.slice(0, 10) : undefined;
|
|
151
|
+
const revision = Number(meta?.revision);
|
|
152
|
+
return {
|
|
153
|
+
scope,
|
|
154
|
+
revision: Number.isInteger(revision) ? revision : 0,
|
|
155
|
+
first: day(meta?.first_timestamp),
|
|
156
|
+
corrected: day(meta?.updated_at),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function recallProvenanceNote(result: RecallResult): string {
|
|
160
|
+
const info = recallProvenance(result);
|
|
161
|
+
const parts: string[] = [];
|
|
162
|
+
if (info.scope) parts.push(info.scope);
|
|
163
|
+
if (info.revision > 1) {
|
|
164
|
+
parts.push("corrected r" + info.revision);
|
|
165
|
+
parts.push("first " + (info.first ?? "unknown"));
|
|
166
|
+
if (info.corrected) parts.push("corrected " + info.corrected);
|
|
167
|
+
}
|
|
168
|
+
return parts.length > 0 ? " {" + parts.join("; ") + "}" : "";
|
|
169
|
+
}
|
|
170
|
+
function recallRevisionFooter(results: readonly RecallResult[]): string {
|
|
171
|
+
return results.some(result => recallProvenance(result).revision > 1)
|
|
172
|
+
? "\n\nCorrected rows: read memory://<id> for the full metadata and correction reason."
|
|
173
|
+
: "";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
`;
|
|
177
|
+
|
|
178
|
+
/** 출처 구분 이전 learn topic upsert 적용본. 새 판(learnTopicUpsertBlock)이 이 본문을 대체한다(legacyPatched). */
|
|
179
|
+
const learnTopicUpsertLegacyBlock = `// HANSE: topic-key learn upsert
|
|
180
|
+
function upsertLearnTopic(
|
|
181
|
+
state: MnemopiSessionState,
|
|
182
|
+
params: LearnParams,
|
|
183
|
+
target: ReturnType<MnemopiSessionState["getScopedRetainTarget"]>,
|
|
184
|
+
): { id: string; revision: number } {
|
|
185
|
+
const topic = params.topic!.normalize("NFKC").trim().toLowerCase();
|
|
186
|
+
if (!topic) throw new Error("Learn topic must not be blank.");
|
|
187
|
+
if (redactMemorySecrets(topic) !== topic) throw new Error("Learn topic contains a credential.");
|
|
188
|
+
const db = target.memory.conn;
|
|
189
|
+
const existing = db.query(
|
|
190
|
+
"SELECT id, metadata_json FROM working_memory WHERE json_extract(metadata_json, '$.topic_key') = ? ORDER BY timestamp DESC, id DESC LIMIT 1",
|
|
191
|
+
).get(topic) as { id: string; metadata_json: string } | null;
|
|
192
|
+
const revision = existing ? (Number(JSON.parse(existing.metadata_json).revision) || 1) + 1 : 1;
|
|
193
|
+
if (existing) return db.transaction(() => {
|
|
194
|
+
const content = redactMemorySecrets(params.memory);
|
|
195
|
+
db.query("UPDATE working_memory SET content = ?, embed_text = NULL, timestamp = ?, metadata_json = ? WHERE id = ?").run(
|
|
196
|
+
content, new Date().toISOString(),
|
|
197
|
+
JSON.stringify({ ...JSON.parse(existing.metadata_json), context: params.context == null ? null : redactMemorySecrets(params.context), topic_key: topic, revision }),
|
|
198
|
+
existing.id,
|
|
199
|
+
);
|
|
200
|
+
db.query("DELETE FROM memory_embeddings WHERE memory_id = ?").run(existing.id);
|
|
201
|
+
return { id: existing.id, revision };
|
|
202
|
+
})();
|
|
203
|
+
const id = state.rememberScoped(params.memory, {
|
|
204
|
+
source: "coding-agent-learn", importance: 0.8,
|
|
205
|
+
metadata: { session_id: state.sessionId, cwd: state.session.sessionManager.getCwd(), context: params.context ?? null, tool: "learn", topic_key: topic, revision },
|
|
206
|
+
scope: "bank", extract: true, extractEntities: true, veracity: "tool", memoryType: "fact",
|
|
207
|
+
}, target);
|
|
208
|
+
return { id, revision };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export class LearnTool implements AgentTool<LearnSchema> {`;
|
|
212
|
+
|
|
88
213
|
/**
|
|
89
214
|
* 기억 임베딩 (6) 항목의 본문. 0.9.3 은 recall 이 e5 여부로 dense 하한을 고르게 `usesE5Prefix` 를 export 한다.
|
|
90
215
|
* 0.9.2 적용본(export 없음)은 legacyPatched 로 남겨 같은 항목이 새 판으로 바꾼다.
|
|
@@ -116,6 +241,109 @@ export function currentEmbeddingModel(): string {
|
|
|
116
241
|
}
|
|
117
242
|
`;
|
|
118
243
|
|
|
244
|
+
/**
|
|
245
|
+
* task schema 정적 네 곳(item·isolated item·단일 flat·단일 no-isolation)의 per-spawn `model?` 전달과 optional `agent`.
|
|
246
|
+
* 18.3.4는 모든 schema에 필수 `solutionSpace: "string"` 을 `task` 바로 뒤에 넣었고 `model?` 은 그 뒤에 둔다.
|
|
247
|
+
*
|
|
248
|
+
* `agent: "string = 'task'"` 기본값은 pi-ai validateToolArguments가 extension tool_call 앞에서 채워, hook에는 생략한 호출과
|
|
249
|
+
* 명시한 `task`가 구별되지 않았다. 생략을 undefined로 두면 CUELO guard가 생략만 maker로 해석하고 명시 `task`·scout 등은 계속
|
|
250
|
+
* 거절할 수 있다. core executor는 생략을 이미 처리한다(task/index.ts spawnParamsFor `item.agent?.trim() || defaultAgent`,
|
|
251
|
+
* `spawn.agent ?? defaultAgent`)이므로 다른 프로필의 기본 agent 의미는 그대로다.
|
|
252
|
+
*
|
|
253
|
+
* 두 변경은 같은 줄 묶음에 있으므로 한 항목이 함께 만든다. 각 항목의 marker는 자기 schema header를 포함해 다른 schema의 줄이
|
|
254
|
+
* 이 항목을 이미 적용한 것으로 보이게 하지 않고, 빠진 model 줄은 그 schema에서만 복구된다. 후보는
|
|
255
|
+
* - 기본 후보: model이 없는 순정(18.4 이하)에서 model과 optional agent를 함께 넣는다. 옛 패치가 이미 model을 넣은
|
|
256
|
+
* 기본-agent 상태는 `legacyPatched` 로 optional agent만 얹는다.
|
|
257
|
+
* - alternates: model을 가진 18.5+ upstream(`string | string[]`)에 optional agent만 얹는다.
|
|
258
|
+
* 한 항목이 변환 전체를 가지므로 `--revert` 는 patched를 anchor로 되돌려 순정을 그대로 복원한다.
|
|
259
|
+
*/
|
|
260
|
+
const TASK_SCHEMA_MODEL_EDITS = [
|
|
261
|
+
"export const taskItemSchema = type({",
|
|
262
|
+
"const taskItemSchemaIsolated = type({",
|
|
263
|
+
"export const taskSchema = type({",
|
|
264
|
+
"const taskSchemaNoIsolation = type({",
|
|
265
|
+
].map(header => {
|
|
266
|
+
const body = (agent, model) =>
|
|
267
|
+
[header, '\t"name?": "string",', `\t${agent}`, '\ttask: "string",', '\tsolutionSpace: "string",', ...(model ? [`\t${model}`] : [])].join("\n");
|
|
268
|
+
const DEFAULT_AGENT = "agent: \"string = 'task'\",";
|
|
269
|
+
const OPTIONAL_AGENT = '"agent?": "string",';
|
|
270
|
+
const SINGLE = '"model?": "string",';
|
|
271
|
+
const SINGLE_OR_ARRAY = '"model?": "string | string[]",';
|
|
272
|
+
const output = '\n\t"outputSchema?": outputSchemaInputSchema,';
|
|
273
|
+
return {
|
|
274
|
+
file: "src/task/types.ts",
|
|
275
|
+
marker: body(OPTIONAL_AGENT, SINGLE),
|
|
276
|
+
anchor: body(DEFAULT_AGENT) + output,
|
|
277
|
+
patched: body(OPTIONAL_AGENT, SINGLE) + output,
|
|
278
|
+
legacyPatched: body(DEFAULT_AGENT, SINGLE) + output,
|
|
279
|
+
alternates: [{
|
|
280
|
+
file: "src/task/types.ts",
|
|
281
|
+
marker: body(OPTIONAL_AGENT, SINGLE_OR_ARRAY),
|
|
282
|
+
anchor: body(DEFAULT_AGENT, SINGLE_OR_ARRAY),
|
|
283
|
+
patched: body(OPTIONAL_AGENT, SINGLE_OR_ARRAY),
|
|
284
|
+
}],
|
|
285
|
+
};
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* 위 정적 schema와 같은 이유로 defaultAgent 동적 schema(createTaskSchema)의 agent도 optional로 둔다.
|
|
290
|
+
* 동적 model 항목의 앵커가 `agent,` 를 포함하므로 반드시 그 뒤에 적용한다.
|
|
291
|
+
*/
|
|
292
|
+
const TASK_AGENT_OPTIONAL_EDITS = [
|
|
293
|
+
...[
|
|
294
|
+
["\t\t\tconst item = type.raw({", "\t\t\t\t"],
|
|
295
|
+
["\t\tconst item = type.raw({", "\t\t\t"],
|
|
296
|
+
["\t\treturn type.raw({", "\t\t\t"],
|
|
297
|
+
["\treturn type.raw({", "\t\t"],
|
|
298
|
+
].map(([header, indent]) => ({
|
|
299
|
+
file: "src/task/types.ts",
|
|
300
|
+
marker: `${header}\n${indent}"name?": "string",\n${indent}"agent?": "string",`,
|
|
301
|
+
anchor: `${header}\n${indent}"name?": "string",\n${indent}agent,`,
|
|
302
|
+
patched: `${header}\n${indent}"name?": "string",\n${indent}"agent?": "string",`,
|
|
303
|
+
})),
|
|
304
|
+
{
|
|
305
|
+
// 위 여덟 곳이 더는 쓰지 않는 기본 agent 규칙 helper와 그 정규식·지역 변수를 함께 지운다.
|
|
306
|
+
file: "src/task/types.ts",
|
|
307
|
+
marker: "// CUELO: task schema agent is optional on the wire.",
|
|
308
|
+
anchor: [
|
|
309
|
+
"const TASK_AGENT_NAME_PATTERN = /^[A-Za-z0-9_-]+$/;",
|
|
310
|
+
"const taskSchemaCache = new Map<string, BaseType>();",
|
|
311
|
+
"",
|
|
312
|
+
"function taskAgentSchemaRule(defaultAgent: string): string {",
|
|
313
|
+
"\tconst trimmed = defaultAgent.trim();",
|
|
314
|
+
"\tif (TASK_AGENT_NAME_PATTERN.test(trimmed)) {",
|
|
315
|
+
"\t\treturn `string = '${trimmed}'`;",
|
|
316
|
+
"\t}",
|
|
317
|
+
"\treturn \"string\";",
|
|
318
|
+
"}",
|
|
319
|
+
"",
|
|
320
|
+
"function createTaskSchema(options: {",
|
|
321
|
+
"\tisolationEnabled: boolean;",
|
|
322
|
+
"\tbatchEnabled: boolean;",
|
|
323
|
+
"\tdefaultAgent: string;",
|
|
324
|
+
"\teffortEnabled: boolean;",
|
|
325
|
+
"\tevalToolsEnabled: boolean;",
|
|
326
|
+
"}): BaseType {",
|
|
327
|
+
"\tconst agent = taskAgentSchemaRule(options.defaultAgent);",
|
|
328
|
+
"",
|
|
329
|
+
].join("\n"),
|
|
330
|
+
patched: [
|
|
331
|
+
"// CUELO: task schema agent is optional on the wire. An omitted agent reaches extension hooks as undefined and",
|
|
332
|
+
"// the executor resolves it to the spawn policy's defaultAgent.",
|
|
333
|
+
"const taskSchemaCache = new Map<string, BaseType>();",
|
|
334
|
+
"",
|
|
335
|
+
"function createTaskSchema(options: {",
|
|
336
|
+
"\tisolationEnabled: boolean;",
|
|
337
|
+
"\tbatchEnabled: boolean;",
|
|
338
|
+
"\tdefaultAgent: string;",
|
|
339
|
+
"\teffortEnabled: boolean;",
|
|
340
|
+
"\tevalToolsEnabled: boolean;",
|
|
341
|
+
"}): BaseType {",
|
|
342
|
+
"",
|
|
343
|
+
].join("\n"),
|
|
344
|
+
},
|
|
345
|
+
];
|
|
346
|
+
|
|
119
347
|
/** 각 항목: 원본 앵커를 찾아 patched 로 바꾼다. marker 가 있으면 이미 적용된 것으로 본다. */
|
|
120
348
|
const EDITS = [
|
|
121
349
|
{
|
|
@@ -2535,165 +2763,7 @@ function evalRejectionResult(error: unknown): AgentToolResult<EvalToolDetails |
|
|
|
2535
2763
|
patched: "\t/** Per-spawn thinking effort (flat form): lowest/middle/highest level the resolved model supports. */\n\teffort?: \"lo\" | \"med\" | \"hi\";\n\t/** Per-spawn model selector or ordered selector array; overrides agent and settings preferences. */\n\tmodel?: string | string[];",
|
|
2536
2764
|
}],
|
|
2537
2765
|
},
|
|
2538
|
-
|
|
2539
|
-
// 18.3.4는 모든 task schema에 필수 `solutionSpace: "string"` 을 `task` 바로 뒤에 넣었다
|
|
2540
|
-
// (types.ts:52-185). per-spawn `model?` 은 그 필수 필드 뒤에 둔다. 의미는 18.3.2와 같다.
|
|
2541
|
-
file: "src/task/types.ts",
|
|
2542
|
-
marker: `task: "string",
|
|
2543
|
-
solutionSpace: "string",
|
|
2544
|
-
"model?": "string",`,
|
|
2545
|
-
anchor: `export const taskItemSchema = type({
|
|
2546
|
-
"name?": "string",
|
|
2547
|
-
agent: "string = 'task'",
|
|
2548
|
-
task: "string",
|
|
2549
|
-
solutionSpace: "string",
|
|
2550
|
-
"outputSchema?": outputSchemaInputSchema,
|
|
2551
|
-
"schemaMode?": '"permissive" | "strict"',
|
|
2552
|
-
"tools?": "string[]",
|
|
2553
|
-
"+": "delete",
|
|
2554
|
-
});
|
|
2555
|
-
const taskItemSchemaIsolated = type({
|
|
2556
|
-
"name?": "string",
|
|
2557
|
-
agent: "string = 'task'",
|
|
2558
|
-
task: "string",
|
|
2559
|
-
solutionSpace: "string",
|
|
2560
|
-
"outputSchema?": outputSchemaInputSchema,
|
|
2561
|
-
"schemaMode?": '"permissive" | "strict"',
|
|
2562
|
-
"tools?": "string[]",
|
|
2563
|
-
"isolated?": "boolean",
|
|
2564
|
-
"+": "delete",
|
|
2565
|
-
});`,
|
|
2566
|
-
patched: `export const taskItemSchema = type({
|
|
2567
|
-
"name?": "string",
|
|
2568
|
-
agent: "string = 'task'",
|
|
2569
|
-
task: "string",
|
|
2570
|
-
solutionSpace: "string",
|
|
2571
|
-
"model?": "string",
|
|
2572
|
-
"outputSchema?": outputSchemaInputSchema,
|
|
2573
|
-
"schemaMode?": '"permissive" | "strict"',
|
|
2574
|
-
"tools?": "string[]",
|
|
2575
|
-
"+": "delete",
|
|
2576
|
-
});
|
|
2577
|
-
const taskItemSchemaIsolated = type({
|
|
2578
|
-
"name?": "string",
|
|
2579
|
-
agent: "string = 'task'",
|
|
2580
|
-
task: "string",
|
|
2581
|
-
solutionSpace: "string",
|
|
2582
|
-
"model?": "string",
|
|
2583
|
-
"outputSchema?": outputSchemaInputSchema,
|
|
2584
|
-
"schemaMode?": '"permissive" | "strict"',
|
|
2585
|
-
"tools?": "string[]",
|
|
2586
|
-
"isolated?": "boolean",
|
|
2587
|
-
"+": "delete",
|
|
2588
|
-
});`,
|
|
2589
|
-
alternates: [{
|
|
2590
|
-
file: "src/task/types.ts",
|
|
2591
|
-
marker: `export const taskItemSchema = type({
|
|
2592
|
-
"name?": "string",
|
|
2593
|
-
agent: "string = 'task'",
|
|
2594
|
-
task: "string",
|
|
2595
|
-
solutionSpace: "string",
|
|
2596
|
-
"model?": "string | string[]",`,
|
|
2597
|
-
anchor: `export const taskItemSchema = type({
|
|
2598
|
-
"name?": "string",
|
|
2599
|
-
agent: "string = 'task'",
|
|
2600
|
-
task: "string",
|
|
2601
|
-
solutionSpace: "string",
|
|
2602
|
-
"model?": "string | string[]",`,
|
|
2603
|
-
patched: `export const taskItemSchema = type({
|
|
2604
|
-
"name?": "string",
|
|
2605
|
-
agent: "string = 'task'",
|
|
2606
|
-
task: "string",
|
|
2607
|
-
solutionSpace: "string",
|
|
2608
|
-
"model?": "string | string[]",`,
|
|
2609
|
-
}],
|
|
2610
|
-
},
|
|
2611
|
-
{
|
|
2612
|
-
file: "src/task/types.ts",
|
|
2613
|
-
marker: `export const taskSchema = type({
|
|
2614
|
-
"name?": "string",
|
|
2615
|
-
agent: "string = 'task'",
|
|
2616
|
-
task: "string",
|
|
2617
|
-
solutionSpace: "string",
|
|
2618
|
-
"model?": "string",`,
|
|
2619
|
-
anchor: `export const taskSchema = type({
|
|
2620
|
-
"name?": "string",
|
|
2621
|
-
agent: "string = 'task'",
|
|
2622
|
-
task: "string",
|
|
2623
|
-
solutionSpace: "string",
|
|
2624
|
-
"outputSchema?": outputSchemaInputSchema,`,
|
|
2625
|
-
patched: `export const taskSchema = type({
|
|
2626
|
-
"name?": "string",
|
|
2627
|
-
agent: "string = 'task'",
|
|
2628
|
-
task: "string",
|
|
2629
|
-
solutionSpace: "string",
|
|
2630
|
-
"model?": "string",
|
|
2631
|
-
"outputSchema?": outputSchemaInputSchema,`,
|
|
2632
|
-
alternates: [{
|
|
2633
|
-
file: "src/task/types.ts",
|
|
2634
|
-
marker: `export const taskSchema = type({
|
|
2635
|
-
"name?": "string",
|
|
2636
|
-
agent: "string = 'task'",
|
|
2637
|
-
task: "string",
|
|
2638
|
-
solutionSpace: "string",
|
|
2639
|
-
"model?": "string | string[]",`,
|
|
2640
|
-
anchor: `export const taskSchema = type({
|
|
2641
|
-
"name?": "string",
|
|
2642
|
-
agent: "string = 'task'",
|
|
2643
|
-
task: "string",
|
|
2644
|
-
solutionSpace: "string",
|
|
2645
|
-
"model?": "string | string[]",`,
|
|
2646
|
-
patched: `export const taskSchema = type({
|
|
2647
|
-
"name?": "string",
|
|
2648
|
-
agent: "string = 'task'",
|
|
2649
|
-
task: "string",
|
|
2650
|
-
solutionSpace: "string",
|
|
2651
|
-
"model?": "string | string[]",`,
|
|
2652
|
-
}],
|
|
2653
|
-
},
|
|
2654
|
-
{
|
|
2655
|
-
file: "src/task/types.ts",
|
|
2656
|
-
marker: `const taskSchemaNoIsolation = type({
|
|
2657
|
-
"name?": "string",
|
|
2658
|
-
agent: "string = 'task'",
|
|
2659
|
-
task: "string",
|
|
2660
|
-
solutionSpace: "string",
|
|
2661
|
-
"model?": "string",`,
|
|
2662
|
-
anchor: `const taskSchemaNoIsolation = type({
|
|
2663
|
-
"name?": "string",
|
|
2664
|
-
agent: "string = 'task'",
|
|
2665
|
-
task: "string",
|
|
2666
|
-
solutionSpace: "string",
|
|
2667
|
-
"outputSchema?": outputSchemaInputSchema,`,
|
|
2668
|
-
patched: `const taskSchemaNoIsolation = type({
|
|
2669
|
-
"name?": "string",
|
|
2670
|
-
agent: "string = 'task'",
|
|
2671
|
-
task: "string",
|
|
2672
|
-
solutionSpace: "string",
|
|
2673
|
-
"model?": "string",
|
|
2674
|
-
"outputSchema?": outputSchemaInputSchema,`,
|
|
2675
|
-
alternates: [{
|
|
2676
|
-
file: "src/task/types.ts",
|
|
2677
|
-
marker: `const taskSchemaNoIsolation = type({
|
|
2678
|
-
"name?": "string",
|
|
2679
|
-
agent: "string = 'task'",
|
|
2680
|
-
task: "string",
|
|
2681
|
-
solutionSpace: "string",
|
|
2682
|
-
"model?": "string | string[]",`,
|
|
2683
|
-
anchor: `const taskSchemaNoIsolation = type({
|
|
2684
|
-
"name?": "string",
|
|
2685
|
-
agent: "string = 'task'",
|
|
2686
|
-
task: "string",
|
|
2687
|
-
solutionSpace: "string",
|
|
2688
|
-
"model?": "string | string[]",`,
|
|
2689
|
-
patched: `const taskSchemaNoIsolation = type({
|
|
2690
|
-
"name?": "string",
|
|
2691
|
-
agent: "string = 'task'",
|
|
2692
|
-
task: "string",
|
|
2693
|
-
solutionSpace: "string",
|
|
2694
|
-
"model?": "string | string[]",`,
|
|
2695
|
-
}],
|
|
2696
|
-
},
|
|
2766
|
+
...TASK_SCHEMA_MODEL_EDITS,
|
|
2697
2767
|
{
|
|
2698
2768
|
file: "src/task/types.ts",
|
|
2699
2769
|
marker: `"model?": "string",
|
|
@@ -3152,6 +3222,45 @@ import { isUnexpectedSocketCloseMessage } from "@oh-my-pi/pi-utils/fetch-retry";
|
|
|
3152
3222
|
// Other roots retain their timers and revivers. Release while shared
|
|
3153
3223
|
// resources are still live; subagent disposal does not tear down roots.`,
|
|
3154
3224
|
},
|
|
3225
|
+
{
|
|
3226
|
+
// 2026-10-05: 재시작 뒤 복원된 child 의 부모는 top-level 별칭(`Main#3` 등)일 수 있다. 부활 factory 는 parentId 가 literal
|
|
3227
|
+
// `Main` 에 닿을 때까지의 단계 수로 taskDepth 를 정해 `Main#3` 직속 child 의 depth 가 하나 늘었다. top-level(kind main)
|
|
3228
|
+
// 에서도 멈추게 해 registry 의 실제 parent 를 그대로 쓴다. literal `Main`·없는 ref·깊은 child 의 기존 동작은 같다.
|
|
3229
|
+
file: "src/task/persisted-revive.ts",
|
|
3230
|
+
marker: "export function revivedTaskDepth(",
|
|
3231
|
+
anchor: `/**
|
|
3232
|
+
* Build the factory the {@link AgentLifecycleManager} uses to cold-revive a`,
|
|
3233
|
+
patched: `/** HANSE: depth of a cold-revived subagent from its persisted parent chain; a top-level (\`main\`) parent ends the climb. */
|
|
3234
|
+
export function revivedTaskDepth(ref: { parentId?: string }, registry: AgentRegistry): number {
|
|
3235
|
+
let taskDepth = 1;
|
|
3236
|
+
let parentId = ref.parentId;
|
|
3237
|
+
const seen = new Set<string>();
|
|
3238
|
+
while (parentId && parentId !== MAIN_AGENT_ID && registry.get(parentId)?.kind !== "main" && !seen.has(parentId)) {
|
|
3239
|
+
seen.add(parentId);
|
|
3240
|
+
taskDepth++;
|
|
3241
|
+
parentId = registry.get(parentId)?.parentId;
|
|
3242
|
+
}
|
|
3243
|
+
return taskDepth;
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* Build the factory the {@link AgentLifecycleManager} uses to cold-revive a`,
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
file: "src/task/persisted-revive.ts",
|
|
3251
|
+
marker: "const taskDepth = revivedTaskDepth(ref, registry);",
|
|
3252
|
+
anchor: ` let taskDepth = 1;
|
|
3253
|
+
let parentId = ref.parentId;
|
|
3254
|
+
const seen = new Set<string>();
|
|
3255
|
+
while (parentId && parentId !== MAIN_AGENT_ID && !seen.has(parentId)) {
|
|
3256
|
+
seen.add(parentId);
|
|
3257
|
+
taskDepth++;
|
|
3258
|
+
parentId = registry.get(parentId)?.parentId;
|
|
3259
|
+
}
|
|
3260
|
+
`,
|
|
3261
|
+
patched: ` const taskDepth = revivedTaskDepth(ref, registry);
|
|
3262
|
+
`,
|
|
3263
|
+
},
|
|
3155
3264
|
// 18.3.0 RETIRE: `hub wait` 의 생략 ids 미소비 결과 포함·정산 결과 우선(옛 #115·#116).
|
|
3156
3265
|
// upstream `wait` 가 `undeliveredJobs` 로 같은 일을 실행 중 job 유무와 무관하게 먼저 한다
|
|
3157
3266
|
// (tools/wait.ts:78-81, async/job-control.ts:44-58). 차이는 isDeliverySuppressed 인
|
|
@@ -5739,7 +5848,35 @@ function operationFromNative(op: string): Operation | undefined {
|
|
|
5739
5848
|
file: "src/mnemopi/state.ts",
|
|
5740
5849
|
marker: "// HANSE: recall line carries memory id",
|
|
5741
5850
|
anchor: "\t\treturn `- ${content}${source}${date}`;\n",
|
|
5742
|
-
patched: "\t\t// HANSE: recall line carries memory id\n\t\tconst memoryId = result.id ? ` (id: ${result.id})` : \"\";\n\t\treturn `- ${content}${source}${date}${memoryId}`;\n",
|
|
5851
|
+
patched: "\t\t// HANSE: recall line carries memory id\n\t\tconst memoryId = result.id ? ` (id: ${result.id})` : \"\";\n\t\treturn `- ${content}${source}${date}${recallProvenanceNote(result)}${memoryId}`;\n",
|
|
5852
|
+
legacyPatched: "\t\t// HANSE: recall line carries memory id\n\t\tconst memoryId = result.id ? ` (id: ${result.id})` : \"\";\n\t\treturn `- ${content}${source}${date}${memoryId}`;\n",
|
|
5853
|
+
},
|
|
5854
|
+
{
|
|
5855
|
+
// 위 항목의 짝. 범위·정정 표시 보조 함수와 정정 행이 있을 때만 붙는 한 줄 안내(상세는 memory://<id>).
|
|
5856
|
+
file: "src/mnemopi/state.ts",
|
|
5857
|
+
marker: "// HANSE: recall provenance note",
|
|
5858
|
+
anchor: "function formatRecallBlock(results: RecallResult[]): string {\n",
|
|
5859
|
+
patched: recallProvenanceBlock + "function formatRecallBlock(results: RecallResult[]): string {\n",
|
|
5860
|
+
},
|
|
5861
|
+
{
|
|
5862
|
+
file: "src/mnemopi/state.ts",
|
|
5863
|
+
marker: "${lines.join(\"\\n\\n\")}${recallRevisionFooter(results)}\\n</memories>",
|
|
5864
|
+
anchor: "${lines.join(\"\\n\\n\")}\\n</memories>`;\n",
|
|
5865
|
+
patched: "${lines.join(\"\\n\\n\")}${recallRevisionFooter(results)}\\n</memories>`;\n",
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
// recall 도구 출력도 같은 표시를 쓴다.
|
|
5869
|
+
file: "src/mnemopi/state.ts",
|
|
5870
|
+
marker: "${source}${date}${recallProvenanceNote(result)}${confidence}",
|
|
5871
|
+
anchor: "\t\t\treturn `- ${result.content}${id}${source}${date}${confidence}`;\n\t\t});\n\t\treturn lines.join(\"\\n\\n\");\n",
|
|
5872
|
+
patched: "\t\t\treturn `- ${result.content}${id}${source}${date}${recallProvenanceNote(result)}${confidence}`;\n\t\t});\n\t\treturn lines.join(\"\\n\\n\") + recallRevisionFooter(results);\n",
|
|
5873
|
+
},
|
|
5874
|
+
{
|
|
5875
|
+
// 결과가 실제로 나온 bank 로 범위를 일시 표시한다(DB 저장 없음). 전역 bank 가 없는 구성은 추정하지 않는다.
|
|
5876
|
+
file: "src/mnemopi/state.ts",
|
|
5877
|
+
marker: "// HANSE: recall result carries its bank scope",
|
|
5878
|
+
anchor: "\t\t\t\t\tfor (const result of results) {\n\t\t\t\t\t\tmergeRecallResult(merged, byId, byContent, result);\n",
|
|
5879
|
+
patched: "\t\t\t\t\tfor (const result of results) {\n\t\t\t\t\t\t// HANSE: recall result carries its bank scope\n\t\t\t\t\t\tconst recallScope = this.scoped.global ? (target.bank === this.scoped.global.bank ? \"global\" : \"project\") : undefined;\n\t\t\t\t\t\tmergeRecallResult(merged, byId, byContent, { ...result, recallScope } as RecallResult);\n",
|
|
5743
5880
|
},
|
|
5744
5881
|
{
|
|
5745
5882
|
file: "src/tools/learn.ts",
|
|
@@ -5760,42 +5897,12 @@ function operationFromNative(op: string): Operation | undefined {
|
|
|
5760
5897
|
patched: '\t"topic?": type("string").describe("stable topic key; later lessons with this key replace the prior project lesson"),\n\t"scope?": type("\'project\' | \'global\'").describe(',
|
|
5761
5898
|
},
|
|
5762
5899
|
{
|
|
5900
|
+
// 출처 구분: 갱신해도 최초 session/cwd 는 남고 updated_* 가 최신 정정자다. legacyPatched 는 출처 구분 이전 적용본이다.
|
|
5763
5901
|
file: "src/tools/learn.ts",
|
|
5764
|
-
marker: "// HANSE: topic
|
|
5902
|
+
marker: "// HANSE: learn topic provenance keeps first and latest source",
|
|
5765
5903
|
anchor: "export class LearnTool implements AgentTool<LearnSchema> {",
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
state: MnemopiSessionState,
|
|
5769
|
-
params: LearnParams,
|
|
5770
|
-
target: ReturnType<MnemopiSessionState["getScopedRetainTarget"]>,
|
|
5771
|
-
): { id: string; revision: number } {
|
|
5772
|
-
const topic = params.topic!.normalize("NFKC").trim().toLowerCase();
|
|
5773
|
-
if (!topic) throw new Error("Learn topic must not be blank.");
|
|
5774
|
-
if (redactMemorySecrets(topic) !== topic) throw new Error("Learn topic contains a credential.");
|
|
5775
|
-
const db = target.memory.conn;
|
|
5776
|
-
const existing = db.query(
|
|
5777
|
-
"SELECT id, metadata_json FROM working_memory WHERE json_extract(metadata_json, '$.topic_key') = ? ORDER BY timestamp DESC, id DESC LIMIT 1",
|
|
5778
|
-
).get(topic) as { id: string; metadata_json: string } | null;
|
|
5779
|
-
const revision = existing ? (Number(JSON.parse(existing.metadata_json).revision) || 1) + 1 : 1;
|
|
5780
|
-
if (existing) return db.transaction(() => {
|
|
5781
|
-
const content = redactMemorySecrets(params.memory);
|
|
5782
|
-
db.query("UPDATE working_memory SET content = ?, embed_text = NULL, timestamp = ?, metadata_json = ? WHERE id = ?").run(
|
|
5783
|
-
content, new Date().toISOString(),
|
|
5784
|
-
JSON.stringify({ ...JSON.parse(existing.metadata_json), context: params.context == null ? null : redactMemorySecrets(params.context), topic_key: topic, revision }),
|
|
5785
|
-
existing.id,
|
|
5786
|
-
);
|
|
5787
|
-
db.query("DELETE FROM memory_embeddings WHERE memory_id = ?").run(existing.id);
|
|
5788
|
-
return { id: existing.id, revision };
|
|
5789
|
-
})();
|
|
5790
|
-
const id = state.rememberScoped(params.memory, {
|
|
5791
|
-
source: "coding-agent-learn", importance: 0.8,
|
|
5792
|
-
metadata: { session_id: state.sessionId, cwd: state.session.sessionManager.getCwd(), context: params.context ?? null, tool: "learn", topic_key: topic, revision },
|
|
5793
|
-
scope: "bank", extract: true, extractEntities: true, veracity: "tool", memoryType: "fact",
|
|
5794
|
-
}, target);
|
|
5795
|
-
return { id, revision };
|
|
5796
|
-
}
|
|
5797
|
-
|
|
5798
|
-
export class LearnTool implements AgentTool<LearnSchema> {`,
|
|
5904
|
+
legacyPatched: learnTopicUpsertLegacyBlock,
|
|
5905
|
+
patched: learnTopicUpsertBlock,
|
|
5799
5906
|
},
|
|
5800
5907
|
{
|
|
5801
5908
|
// learn 은 rememberScoped 가 돌려준 기억 id 를 버리고 "Lesson stored." 만 알렸다. 교훈을 뒤에서
|
|
@@ -9889,6 +9996,8 @@ function matchesReplacementCredential(
|
|
|
9889
9996
|
anchor: "\t\t\t\t\tconst previewBytes = firstLineExceedsLimit ? (firstLinePreview?.bytes ?? 0) : 0;\n",
|
|
9890
9997
|
patched: "\t\t\t\t\t// CUELO: hashline mode refuses the oversized line outright and delivers none of it, so its\n\t\t\t\t\t// notice must report 0 bytes shown, not the preview it never rendered.\n\t\t\t\t\tconst previewBytes =\n\t\t\t\t\t\tfirstLineExceedsLimit && (rawSelector || !displayMode.hashLines) ? (firstLinePreview?.bytes ?? 0) : 0;\n",
|
|
9891
9998
|
},
|
|
9999
|
+
// agent 생략 보존: 위 per-item model 항목의 앵커가 `agent: "string = 'task'"`를 포함하므로 반드시 그 뒤에 적용한다.
|
|
10000
|
+
...TASK_AGENT_OPTIONAL_EDITS,
|
|
9892
10001
|
];
|
|
9893
10002
|
// EDITS 문자열의 줄 끝을 LF로 통일한다. 이 파일의 작업 사본이 CRLF여도 core 파일(LF)과
|
|
9894
10003
|
// 비교·치환이 어긋나지 않는다. core 파일 자체의 줄 끝은 건드리지 않는다.
|
package/install.mjs
CHANGED
|
@@ -170,6 +170,7 @@ export const PROFILE_DEFAULTS = {
|
|
|
170
170
|
memory: { backend: "mnemopi" },
|
|
171
171
|
mnemopi: { scoping: "per-project-tagged", embeddingVariant: "multilingual", autoRetain: false },
|
|
172
172
|
task: {
|
|
173
|
+
enableLsp: true,
|
|
173
174
|
softRequestBudget: 400,
|
|
174
175
|
maxConcurrency: 8,
|
|
175
176
|
eager: "preferred",
|
package/package.json
CHANGED