@peer-agent/runtime-core 0.1.0-rc.49 → 0.1.0-rc.50
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/evidence.js +7 -3
- package/package.json +2 -2
package/dist/evidence.js
CHANGED
|
@@ -24,12 +24,16 @@ function addEvidenceRefStrings(target, value) {
|
|
|
24
24
|
*/
|
|
25
25
|
export function collectToolEvidenceRefs(options = {}) {
|
|
26
26
|
const refs = new Set();
|
|
27
|
-
if (typeof options.toolCallId === 'string' && options.toolCallId.trim()) {
|
|
28
|
-
refs.add(`tool-result://${options.toolCallId.trim()}`);
|
|
29
|
-
}
|
|
30
27
|
const execution = asEvidenceObject(options.execution);
|
|
31
28
|
const result = asEvidenceObject(execution?.result);
|
|
32
29
|
const evidence = asEvidenceObject(result?.evidence);
|
|
30
|
+
if (typeof options.toolCallId === 'string' && options.toolCallId.trim()) {
|
|
31
|
+
const callId = options.toolCallId.trim();
|
|
32
|
+
const dispatch = evidence?.retiredDispatchId;
|
|
33
|
+
const retired = result?.status === 'cancelled' && evidence?.dispatchOutcome === 'not_dispatched'
|
|
34
|
+
&& typeof dispatch === 'string' && /^dispatch-[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i.test(dispatch);
|
|
35
|
+
refs.add(retired ? `tool-attempt://${callId}/${dispatch}` : `tool-result://${callId}`);
|
|
36
|
+
}
|
|
33
37
|
addEvidenceRefStrings(refs, evidence?.refs);
|
|
34
38
|
addEvidenceRefStrings(refs, evidence?.artifactRefs);
|
|
35
39
|
const outputPreview = asEvidenceObject(result?.outputPreview);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peer-agent/runtime-core",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.50",
|
|
4
4
|
"description": "Host-neutral capability, permission, projection, and Evidence primitives for Peer Agent runtimes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"LICENSE"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@peer-agent/protocol": "0.1.0-rc.
|
|
41
|
+
"@peer-agent/protocol": "0.1.0-rc.50"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "^5.9.3"
|