@agenr/skeln-plugin 3.3.0 → 2026.6.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/build-before-turn-artifact-NPUHVWFE.js +71 -0
- package/dist/build-recall-artifact-F3LS3PZX.js +62 -0
- package/dist/chunk-5AXMFBHR.js +14 -0
- package/dist/chunk-5AYIXQRF.js +4452 -0
- package/dist/{chunk-Z5X7T4QZ.js → chunk-5TIP2EPP.js} +1519 -2565
- package/dist/{chunk-5LADPJ4C.js → chunk-GAERET5Q.js} +138 -504
- package/dist/chunk-GF3PX3VM.js +41 -0
- package/dist/chunk-GKZQ5AG5.js +44 -0
- package/dist/chunk-LDJN7CVU.js +3231 -0
- package/dist/{chunk-ZYADFKX3.js → chunk-MC3C2XM5.js} +34 -1
- package/dist/chunk-NBS62ES5.js +3012 -0
- package/dist/chunk-NSLTJBUC.js +270 -0
- package/dist/chunk-OJSIZDZD.js +9 -0
- package/dist/chunk-OWGQWQUP.js +45 -0
- package/dist/chunk-Q5UTJXHZ.js +1069 -0
- package/dist/{chunk-M5M65AYP.js → chunk-SOQW7356.js} +271 -1934
- package/dist/chunk-VBPYU7GO.js +597 -0
- package/dist/chunk-VTHBPXDQ.js +1750 -0
- package/dist/{chunk-KH52KJSJ.js → chunk-XFJ4S4G2.js} +844 -39
- package/dist/chunk-Y5NB3FTH.js +106 -0
- package/dist/{chunk-RYMSM3OS.js → chunk-ZX55JBV2.js} +1710 -322
- package/dist/claim-slot-policy-CdrW_1l4.d.ts +13 -0
- package/dist/index.d.ts +630 -51
- package/dist/index.js +881 -4682
- package/dist/lifecycle-checkpoint-IAC5FCQU.js +154 -0
- package/dist/{claim-slot-policy-CQ-h0GaV.d.ts → ports-C4QkwDBS.d.ts} +168 -78
- package/dist/scan-6JKPOQHD.js +6 -0
- package/dist/service-EKFACEN6.js +15 -0
- package/dist/service-RHNB5AEQ.js +861 -0
- package/dist/sink-AUAAWC5O.js +8 -0
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/internal-eval-server.d.ts +0 -1
- package/dist/internal-recall-eval-server.d.ts +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BEFORE_TURN_DEBUG_ARTIFACT_DEFAULT_TOP_K,
|
|
3
|
+
BEFORE_TURN_DEBUG_ARTIFACT_MAX_TOP_K
|
|
4
|
+
} from "./chunk-5AXMFBHR.js";
|
|
5
|
+
|
|
6
|
+
// src/adapters/openclaw/debug/build-before-turn-artifact.ts
|
|
7
|
+
function buildLiveBeforeTurnDebugArtifact(params) {
|
|
8
|
+
const { caseId, patch, currentTurnText, trigger, eventLevel, maxTopCandidates } = params;
|
|
9
|
+
const diagnostics = patch.diagnostics;
|
|
10
|
+
const includeCandidateBreakdown = eventLevel === "detailed";
|
|
11
|
+
const topK = includeCandidateBreakdown ? clampTopK(maxTopCandidates) : 0;
|
|
12
|
+
const durableTopCandidates = includeCandidateBreakdown ? buildDurableCandidates(patch, topK) : [];
|
|
13
|
+
const procedureTopCandidates = includeCandidateBreakdown ? buildProcedureCandidates(patch, topK) : [];
|
|
14
|
+
const normalizedTrigger = trigger?.trim() || "unspecified";
|
|
15
|
+
return {
|
|
16
|
+
schemaVersion: "before-turn-debug-artifact.v1",
|
|
17
|
+
caseId,
|
|
18
|
+
input: {
|
|
19
|
+
trigger: normalizedTrigger,
|
|
20
|
+
currentTurnText
|
|
21
|
+
},
|
|
22
|
+
...diagnostics.queryPolicy ? { queryPolicy: diagnostics.queryPolicy } : {},
|
|
23
|
+
...diagnostics.queryVariants.length > 0 ? { queryVariants: [...diagnostics.queryVariants] } : {},
|
|
24
|
+
...diagnostics.abstentionReasons.length > 0 ? { abstentionReasons: [...diagnostics.abstentionReasons] } : {},
|
|
25
|
+
selectedEntryIds: patch.durableMemory.map((item) => item.entry.id),
|
|
26
|
+
selectedProcedureKey: patch.procedure?.procedure.procedure_key ?? null,
|
|
27
|
+
...durableTopCandidates.length > 0 ? { durableRecallTopCandidates: durableTopCandidates } : {},
|
|
28
|
+
...procedureTopCandidates.length > 0 ? { procedureTopCandidates } : {}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function clampTopK(requested) {
|
|
32
|
+
if (!Number.isFinite(requested) || !Number.isInteger(requested)) {
|
|
33
|
+
return BEFORE_TURN_DEBUG_ARTIFACT_DEFAULT_TOP_K;
|
|
34
|
+
}
|
|
35
|
+
if (requested < 1) {
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
if (requested > BEFORE_TURN_DEBUG_ARTIFACT_MAX_TOP_K) {
|
|
39
|
+
return BEFORE_TURN_DEBUG_ARTIFACT_MAX_TOP_K;
|
|
40
|
+
}
|
|
41
|
+
return requested;
|
|
42
|
+
}
|
|
43
|
+
function buildDurableCandidates(patch, topK) {
|
|
44
|
+
if (topK < 1) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
return patch.durableMemory.slice(0, topK).map((item) => {
|
|
48
|
+
const reasons = item.whySurfaced.reasons.length > 0 ? [...item.whySurfaced.reasons] : void 0;
|
|
49
|
+
return {
|
|
50
|
+
id: item.entry.id,
|
|
51
|
+
score: item.score,
|
|
52
|
+
...reasons ? { reasons } : {}
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function buildProcedureCandidates(patch, topK) {
|
|
57
|
+
if (!patch.procedure || topK < 1) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
const reasons = patch.procedure.whySurfaced.reasons.length > 0 ? [...patch.procedure.whySurfaced.reasons] : void 0;
|
|
61
|
+
return [
|
|
62
|
+
{
|
|
63
|
+
procedureKey: patch.procedure.procedure.procedure_key,
|
|
64
|
+
score: patch.procedure.score,
|
|
65
|
+
...reasons ? { reasons } : {}
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
buildLiveBeforeTurnDebugArtifact
|
|
71
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RECALL_DEBUG_ARTIFACT_DEFAULT_TOP_K,
|
|
3
|
+
RECALL_DEBUG_ARTIFACT_MAX_TOP_K
|
|
4
|
+
} from "./chunk-5AXMFBHR.js";
|
|
5
|
+
|
|
6
|
+
// src/adapters/openclaw/debug/build-recall-artifact.ts
|
|
7
|
+
function buildLiveRecallDebugArtifact(params) {
|
|
8
|
+
const { caseId, query, result, eventLevel, maxTopCandidates } = params;
|
|
9
|
+
const selectedEntryIds = result.entries.map((entry) => entry.entry.id);
|
|
10
|
+
const includeCandidateBreakdown = eventLevel === "detailed";
|
|
11
|
+
const topK = includeCandidateBreakdown ? clampTopK(maxTopCandidates) : 0;
|
|
12
|
+
const reasonsByEntryId = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const projected of result.projectedEntries) {
|
|
14
|
+
if (projected.whySurfaced.reasons.length > 0) {
|
|
15
|
+
reasonsByEntryId.set(projected.entryId, [...projected.whySurfaced.reasons]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const topCandidates = includeCandidateBreakdown ? buildTopCandidates(result, reasonsByEntryId, topK) : [];
|
|
19
|
+
return {
|
|
20
|
+
schemaVersion: "recall-debug-artifact.v1",
|
|
21
|
+
caseId,
|
|
22
|
+
request: {
|
|
23
|
+
recallPath: "unified",
|
|
24
|
+
query
|
|
25
|
+
},
|
|
26
|
+
routing: result.routing,
|
|
27
|
+
selectedEntryIds,
|
|
28
|
+
...topCandidates.length > 0 ? { topCandidates } : {}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function clampTopK(requested) {
|
|
32
|
+
if (!Number.isFinite(requested) || !Number.isInteger(requested)) {
|
|
33
|
+
return RECALL_DEBUG_ARTIFACT_DEFAULT_TOP_K;
|
|
34
|
+
}
|
|
35
|
+
if (requested < 1) {
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
if (requested > RECALL_DEBUG_ARTIFACT_MAX_TOP_K) {
|
|
39
|
+
return RECALL_DEBUG_ARTIFACT_MAX_TOP_K;
|
|
40
|
+
}
|
|
41
|
+
return requested;
|
|
42
|
+
}
|
|
43
|
+
function buildTopCandidates(result, reasonsByEntryId, topK) {
|
|
44
|
+
if (topK < 1) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
return result.entries.slice(0, topK).map((entry) => {
|
|
48
|
+
const reasons = reasonsByEntryId.get(entry.entry.id);
|
|
49
|
+
return {
|
|
50
|
+
id: entry.entry.id,
|
|
51
|
+
score: entry.score,
|
|
52
|
+
lexicalScore: entry.scores.lexical,
|
|
53
|
+
vectorScore: entry.scores.vector,
|
|
54
|
+
recencyScore: entry.scores.recency,
|
|
55
|
+
importanceScore: entry.scores.importance,
|
|
56
|
+
...reasons && reasons.length > 0 ? { reasons } : {}
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
buildLiveRecallDebugArtifact
|
|
62
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/app/debug-artifacts/before-turn.ts
|
|
2
|
+
var BEFORE_TURN_DEBUG_ARTIFACT_DEFAULT_TOP_K = 10;
|
|
3
|
+
var BEFORE_TURN_DEBUG_ARTIFACT_MAX_TOP_K = 25;
|
|
4
|
+
|
|
5
|
+
// src/app/debug-artifacts/recall.ts
|
|
6
|
+
var RECALL_DEBUG_ARTIFACT_DEFAULT_TOP_K = 10;
|
|
7
|
+
var RECALL_DEBUG_ARTIFACT_MAX_TOP_K = 25;
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
BEFORE_TURN_DEBUG_ARTIFACT_DEFAULT_TOP_K,
|
|
11
|
+
BEFORE_TURN_DEBUG_ARTIFACT_MAX_TOP_K,
|
|
12
|
+
RECALL_DEBUG_ARTIFACT_DEFAULT_TOP_K,
|
|
13
|
+
RECALL_DEBUG_ARTIFACT_MAX_TOP_K
|
|
14
|
+
};
|