You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertNoRuntimeSourcePaths(text,privateUploadRoots,"Runtime source or workspace paths must never be persisted in artifact uploads.")
137
141
assertNoSeedSnapshotPaths(text)
138
-
if(containsRuntimeSourceContent(text))thrownewError("Prepared runtime plugin source contents must never be staged for artifact upload.")
142
+
if(!options.allowTargetCode&&containsRuntimeSourceContent(text))thrownewError("Prepared runtime plugin source contents must never be staged for artifact upload.")
if(refs.length!==1||!safeRelativeArtifactPath(refs[0].path))thrownewError("Canonical transcript requires exactly one trusted codebox-transcript path.")
154
+
returnrefs[0]
155
+
}
156
+
157
+
asyncfunctionstageCanonicalTranscript(result){
158
+
constref=awaitcanonicalTranscript(result)
159
+
if(!ref)returnundefined
160
+
constpath=safeRelativeArtifactPath(ref.path)
161
+
constsource=resolve(artifactsPath,path)
162
+
if(relative(artifactsPath,source).startsWith("..")||sourceCategory(path,source))thrownewError("Canonical transcript must stay under the trusted artifact root.")
assertNoRuntimeSourcePaths(text,privateUploadRoots,"Runtime source or workspace paths must never be persisted in artifact uploads.")
218
251
assertNoSeedSnapshotPaths(text)
219
-
if(containsRuntimeSourceContent(text))thrownewError("Prepared runtime plugin source contents must never be persisted in artifact uploads.")
252
+
if(relativePath!==".codebox/agent-task-artifacts/transcript.json"&&containsRuntimeSourceContent(text))thrownewError("Prepared runtime plugin source contents must never be persisted in artifact uploads.")
220
253
}elsethrownewError("Only regular files may be persisted in artifact uploads.")
Copy file name to clipboardExpand all lines: docs/agent-runtime-contract.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,8 @@ Generic command runners and host tool registries should write tool-call evidence
176
176
177
177
The artifact verifier checks that transcript artifact refs are listed in `manifest.json`, stay within the bundle, and match their declared SHA-256 digests when present. This lets a generic command runner branch merge by materializing its command/tool transcript into `files/runtime-evidence/tool-calls/transcript.json` and appending the referenced input/output artifacts through the existing runtime-evidence manifest update path.
178
178
179
+
The reusable agent-task workflow separately uploads one normalized `codebox-transcript` ref for reviewer diagnostics. It accepts exactly one bounded, regular, non-symlink JSON file under its trusted artifact root, stages it as `.codebox/agent-task-artifacts/transcript.json`, and records the source ref plus staged SHA-256 in the upload exclusions manifest. This reviewer copy removes secrets and private host/runtime/source/snapshot paths while retaining target-relative tool arguments, errors, and model messages; package declarations cannot authorize alternate transcript paths or dependency source files.
180
+
179
181
## Runner Workspace Publication
180
182
181
183
Runner workspace publication is a separate exported contract in runtime-core:
assert.ok(awaitreadFile(join(upload,".codebox","agent-task-workflow-result.json"),"utf8"),"Declared artifact rejection preserves the normalized control result")
awaitassert.rejects(readFile(join(upload,".codebox","agent-task-artifacts","prepared-plugins","agents-api","agents-api.php"),"utf8"),/ENOENT/,"Package-declared source aliases never reach the upload")
0 commit comments