open-think 0.1.5 → 0.1.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/dist/index.js +26 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1169,7 +1169,25 @@ function assembleCurationPrompt(params) {
|
|
|
1169
1169
|
const memoriesText = params.existingMemories.length > 0 ? params.existingMemories.map((m) => `- [${m.ts}] ${m.author}: ${m.content}`).join("\n") : "(no memories yet)";
|
|
1170
1170
|
const curatorMdText = params.curatorMd ?? "(none provided)";
|
|
1171
1171
|
const engramsText = params.pendingEngrams.map((e) => `- [${e.created_at}] (id: ${e.id}) ${e.content}`).join("\n");
|
|
1172
|
-
|
|
1172
|
+
let prompt3 = BASE_CURATION_PROMPT.replace("{existing_memories}", memoriesText).replace("{curator_md}", curatorMdText).replace("{pending_engrams}", engramsText);
|
|
1173
|
+
const tuning = [];
|
|
1174
|
+
if (params.selectivity === "high") {
|
|
1175
|
+
tuning.push("Be very selective. Only promote clearly significant events: major decisions, shipped deliverables, critical blockers, direction changes. Skip routine commits, minor fixes, and incremental progress.");
|
|
1176
|
+
} else if (params.selectivity === "low") {
|
|
1177
|
+
tuning.push("Be inclusive. Promote most work events that have any team relevance. Only drop purely administrative or personal events.");
|
|
1178
|
+
}
|
|
1179
|
+
if (params.granularity === "summary") {
|
|
1180
|
+
tuning.push("Consolidate related events into single memory entries. Prefer fewer, broader memories over many specific ones.");
|
|
1181
|
+
} else if (params.granularity === "detailed") {
|
|
1182
|
+
tuning.push("Keep memories specific and granular. Each distinct event or decision should be its own memory entry. Do not roll up multiple events into one.");
|
|
1183
|
+
}
|
|
1184
|
+
if (params.maxMemoriesPerRun && params.maxMemoriesPerRun > 0) {
|
|
1185
|
+
tuning.push(`Produce at most ${params.maxMemoriesPerRun} memory entries from this batch. If more events are significant, prioritize the most important.`);
|
|
1186
|
+
}
|
|
1187
|
+
if (tuning.length > 0) {
|
|
1188
|
+
prompt3 += "\n\nAdditional instructions:\n" + tuning.map((t) => `- ${t}`).join("\n");
|
|
1189
|
+
}
|
|
1190
|
+
return prompt3;
|
|
1173
1191
|
}
|
|
1174
1192
|
function parseMemoriesJsonl(content) {
|
|
1175
1193
|
if (!content.trim()) return [];
|
|
@@ -1264,7 +1282,10 @@ var curateCommand = new Command10("curate").description("Run curation: evaluate
|
|
|
1264
1282
|
existingMemories,
|
|
1265
1283
|
curatorMd,
|
|
1266
1284
|
pendingEngrams: pending,
|
|
1267
|
-
author
|
|
1285
|
+
author,
|
|
1286
|
+
selectivity: config.cortex?.selectivity,
|
|
1287
|
+
granularity: config.cortex?.granularity,
|
|
1288
|
+
maxMemoriesPerRun: config.cortex?.maxMemoriesPerRun
|
|
1268
1289
|
});
|
|
1269
1290
|
let newEntries;
|
|
1270
1291
|
try {
|
|
@@ -1589,6 +1610,9 @@ import chalk17 from "chalk";
|
|
|
1589
1610
|
var ALLOWED_KEYS = /* @__PURE__ */ new Set([
|
|
1590
1611
|
"cortex.curateEveryN",
|
|
1591
1612
|
"cortex.confirmBeforeCommit",
|
|
1613
|
+
"cortex.selectivity",
|
|
1614
|
+
"cortex.granularity",
|
|
1615
|
+
"cortex.maxMemoriesPerRun",
|
|
1592
1616
|
"cortex.author",
|
|
1593
1617
|
"cortex.repo",
|
|
1594
1618
|
"cortex.active",
|