@axiastudio/aioc 0.2.8 → 0.2.9
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/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Its core job is to make agent execution boundaries explicit, testable, auditable
|
|
|
23
23
|
|
|
24
24
|
## Release Status
|
|
25
25
|
|
|
26
|
-
Current stable release: `0.2.
|
|
26
|
+
Current stable release: `0.2.9`.
|
|
27
27
|
The stable line started with `0.1.0`.
|
|
28
28
|
The core runtime surface is compatibility-managed. Breaking changes to the stable surface should ship only with explicit migration guidance and release notes.
|
|
29
29
|
|
|
@@ -45,6 +45,9 @@ AIOC `0.2.7` adds run-regression suite utilities and the experimental
|
|
|
45
45
|
inputs and structured judge results.
|
|
46
46
|
AIOC `0.2.8` fixes replay agent cloning so strict and hybrid replay preserve
|
|
47
47
|
conditional handoff rules and expose enabled `handoff_to_*` tools.
|
|
48
|
+
AIOC `0.2.9` captures `RunRecord.contextSnapshot` as a cloned initial run
|
|
49
|
+
context, so replay starts from the state that entered the run while apps keep
|
|
50
|
+
owning final mutable state persistence.
|
|
48
51
|
|
|
49
52
|
### Experimental Packages
|
|
50
53
|
|
|
@@ -216,6 +219,7 @@ Privacy notes:
|
|
|
216
219
|
|
|
217
220
|
- `record.includePromptText` defaults to `false`; keep it disabled unless needed.
|
|
218
221
|
- `record.contextRedactor` should be considered mandatory for production persistence.
|
|
222
|
+
- `contextSnapshot` captures the initial run context, not final mutable app state.
|
|
219
223
|
- sink adapters should implement encryption, access controls, retention, and deletion.
|
|
220
224
|
|
|
221
225
|
## RunRecord Utilities (Minimal)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-recorder-runtime.d.ts","sourceRoot":"","sources":["../src/run-recorder-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-recorder-runtime.d.ts","sourceRoot":"","sources":["../src/run-recorder-runtime.ts"],"names":[],"mappings":"AAKA,OAA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,CAW9D;IAEF,oBAAoB,GAClB,aAAa,+BAA+B,KAC3C,IAAI,CAgCL;IAEF,eAAe,GAAI,SAAS,MAAM,KAAG,IAAI,CAEvC;IAEI,aAAa,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,UAAU,CACd,OAAO,EAAE,0BAA0B,EACnC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC;YAIF,IAAI;CA+CnB"}
|
|
@@ -5,6 +5,7 @@ const node_crypto_1 = require("node:crypto");
|
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
6
|
const node_path_1 = require("node:path");
|
|
7
7
|
const canonical_json_1 = require("./canonical-json");
|
|
8
|
+
const json_1 = require("./json");
|
|
8
9
|
const REQUEST_FINGERPRINT_SCHEMA_VERSION = "request-fingerprint.v1";
|
|
9
10
|
function resolveRuntimeVersion() {
|
|
10
11
|
const envVersion = process.env.AIOC_RUNTIME_VERSION?.trim() ??
|
|
@@ -57,19 +58,31 @@ function resolveRunRecordWriter(options) {
|
|
|
57
58
|
}
|
|
58
59
|
return sink.write;
|
|
59
60
|
}
|
|
61
|
+
function cloneContextSnapshot(context) {
|
|
62
|
+
if (context === null || typeof context !== "object") {
|
|
63
|
+
return context;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
return structuredClone(context);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return (0, json_1.toJsonValue)(context);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
60
72
|
async function resolveContextSnapshot(context, options) {
|
|
73
|
+
const initialContextSnapshot = cloneContextSnapshot(context);
|
|
61
74
|
if (!options?.contextRedactor) {
|
|
62
75
|
return {
|
|
63
|
-
contextSnapshot:
|
|
76
|
+
contextSnapshot: initialContextSnapshot,
|
|
64
77
|
contextRedacted: false,
|
|
65
78
|
};
|
|
66
79
|
}
|
|
67
80
|
try {
|
|
68
|
-
return await options.contextRedactor(
|
|
81
|
+
return await options.contextRedactor(initialContextSnapshot);
|
|
69
82
|
}
|
|
70
83
|
catch {
|
|
71
84
|
return {
|
|
72
|
-
contextSnapshot:
|
|
85
|
+
contextSnapshot: initialContextSnapshot,
|
|
73
86
|
contextRedacted: false,
|
|
74
87
|
};
|
|
75
88
|
}
|