oh-my-opencode-cohub 1.2.1 → 1.2.2
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.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAyClD,wBAAwB;AACxB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAalD,CAAC;AAwEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,wrBAA+B,CAAC;AAEhE,QAAA,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAyClD,wBAAwB;AACxB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAalD,CAAC;AAwEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,wrBAA+B,CAAC;AAEhE,QAAA,MAAM,WAAW,EAAE,MA0YlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1351,6 +1351,11 @@ var CoHubPlugin = async (input, options) => {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
const promptOverrides = { ...configOverrides, ...fileOverrides };
|
|
1353
1353
|
const tracker = new TaskTracker;
|
|
1354
|
+
const DEBUG_DIR = path2.join(projectDir, ".superpowers");
|
|
1355
|
+
const DEBUG_LOG = path2.join(DEBUG_DIR, "context-debug.log");
|
|
1356
|
+
if (!fs2.existsSync(DEBUG_DIR)) {
|
|
1357
|
+
fs2.mkdirSync(DEBUG_DIR, { recursive: true });
|
|
1358
|
+
}
|
|
1354
1359
|
const STATE_DIR = path2.join(os2.homedir(), ".local", "share", "opencode", "storage", "oh-my-opencode-cohub");
|
|
1355
1360
|
const STATE_FILE = path2.join(STATE_DIR, "tracker-state.json");
|
|
1356
1361
|
function syncTrackerState(sessionId) {
|
|
@@ -1556,6 +1561,8 @@ var CoHubPlugin = async (input, options) => {
|
|
|
1556
1561
|
},
|
|
1557
1562
|
"tool.execute.before": async (input2, output) => {
|
|
1558
1563
|
try {
|
|
1564
|
+
fs2.appendFileSync(DEBUG_LOG, `[${new Date().toISOString()}] HOOK_FIRED tool=${input2.tool} sessionId=${input2.sessionID}
|
|
1565
|
+
`);
|
|
1559
1566
|
if (input2.tool === "task") {
|
|
1560
1567
|
const args = output.args ?? {};
|
|
1561
1568
|
const subagentType = typeof args.subagent_type === "string" ? args.subagent_type : undefined;
|
|
@@ -1579,9 +1586,14 @@ var CoHubPlugin = async (input, options) => {
|
|
|
1579
1586
|
output.args.description = description + contextEngine.formatMarker(contextId);
|
|
1580
1587
|
console.error("[CONTEXT-DEBUG] before hook: marker appended, contextId=", contextId);
|
|
1581
1588
|
console.error("[CONTEXT-DEBUG] before hook: description preview=", output.args.description.slice(-80));
|
|
1589
|
+
fs2.appendFileSync(DEBUG_LOG, `[${new Date().toISOString()}] MARKER_APPENDED contextId=${contextId} descEnd=${output.args.description.slice(-60)}
|
|
1590
|
+
`);
|
|
1582
1591
|
contextEngine.fillContextAsync(contextId, input2.sessionID, {
|
|
1583
1592
|
strategy
|
|
1584
1593
|
}).catch(() => {});
|
|
1594
|
+
} else {
|
|
1595
|
+
fs2.appendFileSync(DEBUG_LOG, `[${new Date().toISOString()}] STRATEGY_NONE agent=${subagentType}
|
|
1596
|
+
`);
|
|
1585
1597
|
}
|
|
1586
1598
|
}
|
|
1587
1599
|
}
|