gm-skill 2.0.1402 → 2.0.1403
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/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +28 -18
- package/gm.json +1 -1
- package/package.json +1 -1
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1403",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -288,29 +288,39 @@ function mergeAutoRecallIntoInstructionResponse(resultStr, autoRecall) {
|
|
|
288
288
|
return JSON.stringify(parsed);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
function endTurn(sess, t, idleSpanned) {
|
|
292
|
+
logEvent('plugkit', 'turn.end', {
|
|
293
|
+
sess, turn_idx: t.idx, dur_ms: t.lastTs - t.startTs,
|
|
294
|
+
dispatches: t.dispatches, verbs: Object.fromEntries(t.verbs),
|
|
295
|
+
phases_walked: [...t.phases], deviations: t.deviations,
|
|
296
|
+
ended_in_phase: t.lastPhase || null,
|
|
297
|
+
idle_spanned: !!idleSpanned,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
|
|
291
301
|
function turnTick(sess, verb, taskBase, phase) {
|
|
292
302
|
const key = sess || '(no-session)';
|
|
293
303
|
const now = Date.now();
|
|
294
304
|
let t = _turns.get(key);
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
// Any verb arriving after an idle gap closes the stale turn — not just instruction.
|
|
306
|
+
// Otherwise a non-instruction verb (prd-add, mutable-resolve, transition) landing
|
|
307
|
+
// after an overnight sleep stamps t.lastTs forward without splitting, and dur_ms
|
|
308
|
+
// (lastTs - startTs) balloons to wall-clock-with-sleep instead of active work time.
|
|
309
|
+
if (t && (now - t.lastTs) > TURN_IDLE_MS) {
|
|
310
|
+
endTurn(sess, t, true);
|
|
311
|
+
_turns.delete(key);
|
|
312
|
+
t = null;
|
|
313
|
+
}
|
|
314
|
+
if (!t) {
|
|
315
|
+
// Only an instruction dispatch opens a new turn; a stray non-instruction verb after
|
|
316
|
+
// idle is recorded against no turn (the next instruction starts the real turn).
|
|
317
|
+
if (verb !== 'instruction') return;
|
|
318
|
+
const idx = ((_turns.get(key + ':lastIdx') || 0) + 1);
|
|
319
|
+
_turns.set(key + ':lastIdx', idx);
|
|
320
|
+
t = { idx, startTs: now, lastTs: now, dispatches: 0, verbs: new Map(), phases: new Set(), deviations: 0, lastPhase: phase };
|
|
321
|
+
_turns.set(key, t);
|
|
322
|
+
logEvent('plugkit', 'turn.start', { sess, turn_idx: idx, phase: phase || null });
|
|
312
323
|
}
|
|
313
|
-
if (!t) return;
|
|
314
324
|
t.lastTs = now;
|
|
315
325
|
t.dispatches++;
|
|
316
326
|
t.verbs.set(verb, (t.verbs.get(verb) || 0) + 1);
|
package/gm.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1403",
|
|
4
4
|
"description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|