@tangle-network/agent-interface 0.46.1 → 0.47.0
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.
|
@@ -81,7 +81,9 @@ export interface AgentExecutionPreparationReceipt {
|
|
|
81
81
|
schemaVersion: 1;
|
|
82
82
|
preparationId: string;
|
|
83
83
|
requestDigest: Sha256Digest;
|
|
84
|
+
/** Canonical identity before executor overrides. */
|
|
84
85
|
authoredProfileDigest: Sha256Digest;
|
|
86
|
+
/** Canonical identity after executor overrides. */
|
|
85
87
|
effectiveProfileDigest: Sha256Digest;
|
|
86
88
|
backend: string;
|
|
87
89
|
harness: HarnessType;
|
package/dist/agent-profile.d.ts
CHANGED
|
@@ -339,13 +339,12 @@ export interface AgentProfile {
|
|
|
339
339
|
* Preferred execution harness for this profile — the coding-CLI runtime that
|
|
340
340
|
* materializes and runs it (`claude-code`, `codex`, `opencode`, `pi`, …).
|
|
341
341
|
*
|
|
342
|
-
* This
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
* harness routing as a first-class lever.
|
|
342
|
+
* This optional authored preference participates in canonical profile
|
|
343
|
+
* identity. An executor MAY override it for one run; the effective profile and
|
|
344
|
+
* execution receipt then bind that override without changing what was
|
|
345
|
+
* authored. When unset, the caller/executor chooses. Formalizes what runtimes
|
|
346
|
+
* already read as `profile.harness`; making it typed also lets an improvement
|
|
347
|
+
* loop optimize harness routing as a first-class lever.
|
|
349
348
|
*/
|
|
350
349
|
harness?: HarnessType;
|
|
351
350
|
permissions?: Record<string, AgentProfilePermission>;
|
package/dist/harness.d.ts
CHANGED
|
@@ -2,13 +2,12 @@ import { z } from "zod";
|
|
|
2
2
|
/**
|
|
3
3
|
* The execution runner for an agent — WHICH runtime materializes and runs an `AgentProfile`.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* cli-bridge backends, VB profile specs).
|
|
5
|
+
* This enum describes an EXECUTION concern. When an `AgentProfile` authors a `harness`
|
|
6
|
+
* preference, that field participates in its canonical identity like every other parsed profile
|
|
7
|
+
* field. A caller or executor may override the preference for one run, but the execution receipt
|
|
8
|
+
* preserves the authored identity, effective identity, and selected harness separately. This is
|
|
9
|
+
* the single shared enum every layer references instead of keeping its own copy (session control,
|
|
10
|
+
* the profile materializer, the cli-bridge backends, VB profile specs).
|
|
12
11
|
*
|
|
13
12
|
* `cli-base` is the router-backed mode — a plain multi-turn router call (a reviewer, a cheap judge,
|
|
14
13
|
* a one-shot) with no full coding-agent harness. The rest are full agentic harnesses run in a
|
package/dist/profile-schema.d.ts
CHANGED
|
@@ -490,6 +490,18 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
490
490
|
metadata: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
491
491
|
extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
|
|
492
492
|
}, z.core.$strict>;
|
|
493
|
+
/**
|
|
494
|
+
* Model-facing JSON Schema for an authored {@link AgentProfile}.
|
|
495
|
+
*
|
|
496
|
+
* This is generated from {@link agentProfileSchema}'s input contract rather
|
|
497
|
+
* than restating the profile shape. Zod sees encoded record keys at its
|
|
498
|
+
* preprocessing boundary, so the generated `propertyNames` constraints for
|
|
499
|
+
* that internal encoding are removed before exposing the schema to callers.
|
|
500
|
+
* The root dialect declaration is also omitted because tool APIs embed this
|
|
501
|
+
* value as a subschema rather than serving it as a standalone document.
|
|
502
|
+
* Runtime admission remains the canonical Zod validator above.
|
|
503
|
+
*/
|
|
504
|
+
export declare const agentProfileJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
493
505
|
export declare const agentProfileDiffSchema: z.ZodType<AgentProfileDiff>;
|
|
494
506
|
/**
|
|
495
507
|
* A registered capability: a stable id paired with its canonical
|
package/dist/profile-schema.js
CHANGED
|
@@ -315,6 +315,50 @@ export const agentProfileSchema = z
|
|
|
315
315
|
.superRefine((profile, context) => {
|
|
316
316
|
validateNestedRecordKeys(profile, context, [], new Set());
|
|
317
317
|
});
|
|
318
|
+
const encodedRecordKeyPattern = "^u(?:[0-9a-f]{4})*$";
|
|
319
|
+
function isEncodedRecordKeyPropertyNames(value) {
|
|
320
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
const propertyNames = value;
|
|
324
|
+
return (propertyNames.type === "string" &&
|
|
325
|
+
propertyNames.pattern === encodedRecordKeyPattern);
|
|
326
|
+
}
|
|
327
|
+
function removeModelInputSchemaArtifacts(value) {
|
|
328
|
+
if (Array.isArray(value)) {
|
|
329
|
+
return value.map(removeModelInputSchemaArtifacts);
|
|
330
|
+
}
|
|
331
|
+
if (value === null || typeof value !== "object") {
|
|
332
|
+
return value;
|
|
333
|
+
}
|
|
334
|
+
const result = {};
|
|
335
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
336
|
+
if (key === "$schema") {
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
if (key === "propertyNames" && isEncodedRecordKeyPropertyNames(entry)) {
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
result[key] = removeModelInputSchemaArtifacts(entry);
|
|
343
|
+
}
|
|
344
|
+
return result;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Model-facing JSON Schema for an authored {@link AgentProfile}.
|
|
348
|
+
*
|
|
349
|
+
* This is generated from {@link agentProfileSchema}'s input contract rather
|
|
350
|
+
* than restating the profile shape. Zod sees encoded record keys at its
|
|
351
|
+
* preprocessing boundary, so the generated `propertyNames` constraints for
|
|
352
|
+
* that internal encoding are removed before exposing the schema to callers.
|
|
353
|
+
* The root dialect declaration is also omitted because tool APIs embed this
|
|
354
|
+
* value as a subschema rather than serving it as a standalone document.
|
|
355
|
+
* Runtime admission remains the canonical Zod validator above.
|
|
356
|
+
*/
|
|
357
|
+
export const agentProfileJsonSchema = removeModelInputSchemaArtifacts(z.toJSONSchema(agentProfileSchema, {
|
|
358
|
+
target: "draft-2020-12",
|
|
359
|
+
io: "input",
|
|
360
|
+
unrepresentable: "any",
|
|
361
|
+
}));
|
|
318
362
|
function validateNestedRecordKeys(value, context, path, seen) {
|
|
319
363
|
if (value === null || typeof value !== "object" || seen.has(value))
|
|
320
364
|
return;
|