@tangle-network/agent-interface 5.10.15 → 5.10.16

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.
@@ -148,6 +148,8 @@ export interface AgentProfileSeat {
148
148
  model: string;
149
149
  /** Override profile.model.reasoningEffort for this stage; omission inherits, none disables thinking. */
150
150
  reasoningEffort?: ReasoningEffort;
151
+ /** This stage's credential intent; omitted inherits profile.model.metadata.credentialSource (absent there means managed). */
152
+ credentialSource?: "subscription" | "managed";
151
153
  /** Select all eligible accounts in account-manager order, or one named account. */
152
154
  selector: {
153
155
  kind: "all-eligible";
@@ -79,7 +79,6 @@ type WithDigest<Material> = Material extends unknown ? Material & {
79
79
  /** Self-hashed public projection. Private authorization and durable state stay out. */
80
80
  export type AgentWorkspaceLeaseRecord = WithDigest<AgentWorkspaceLeaseRecordMaterial>;
81
81
  export type AgentWorkspaceSealedLeaseRecord = WithDigest<AgentWorkspaceSealedLeaseRecordMaterial>;
82
- export type AgentWorkspaceExecutionBoundLeaseRecord = WithDigest<AgentWorkspaceExecutionBoundLeaseRecordMaterial>;
83
82
  export declare const agentWorkspaceLeasePhaseSchema: z.ZodEnum<{
84
83
  "copy-ready": "copy-ready";
85
84
  "workspace-sealed": "workspace-sealed";
@@ -102,6 +102,10 @@ export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
102
102
  xhigh: "xhigh";
103
103
  ultracode: "ultracode";
104
104
  }>>;
105
+ credentialSource: z.ZodOptional<z.ZodEnum<{
106
+ subscription: "subscription";
107
+ managed: "managed";
108
+ }>>;
105
109
  selector: z.ZodUnion<readonly [z.ZodObject<{
106
110
  kind: z.ZodLiteral<"all-eligible">;
107
111
  }, z.core.$strict>, z.ZodObject<{
@@ -126,6 +126,10 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
126
126
  xhigh: "xhigh";
127
127
  ultracode: "ultracode";
128
128
  }>>;
129
+ credentialSource: z.ZodOptional<z.ZodEnum<{
130
+ subscription: "subscription";
131
+ managed: "managed";
132
+ }>>;
129
133
  selector: z.ZodUnion<readonly [z.ZodObject<{
130
134
  kind: z.ZodLiteral<"all-eligible">;
131
135
  }, z.core.$strict>, z.ZodObject<{
@@ -535,6 +539,10 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
535
539
  xhigh: "xhigh";
536
540
  ultracode: "ultracode";
537
541
  }>>;
542
+ credentialSource: z.ZodOptional<z.ZodEnum<{
543
+ subscription: "subscription";
544
+ managed: "managed";
545
+ }>>;
538
546
  selector: z.ZodUnion<readonly [z.ZodObject<{
539
547
  kind: z.ZodLiteral<"all-eligible">;
540
548
  }, z.core.$strict>, z.ZodObject<{
@@ -2058,6 +2066,10 @@ export declare const AgentEnvironmentGetOptionsSchema: z.ZodObject<{
2058
2066
  xhigh: "xhigh";
2059
2067
  ultracode: "ultracode";
2060
2068
  }>>;
2069
+ credentialSource: z.ZodOptional<z.ZodEnum<{
2070
+ subscription: "subscription";
2071
+ managed: "managed";
2072
+ }>>;
2061
2073
  selector: z.ZodUnion<readonly [z.ZodObject<{
2062
2074
  kind: z.ZodLiteral<"all-eligible">;
2063
2075
  }, z.core.$strict>, z.ZodObject<{
@@ -55,7 +55,6 @@ export declare const AgentLearningFileSchema: z.ZodObject<{
55
55
  trust: z.ZodLiteral<"untrusted">;
56
56
  }, z.core.$strict>;
57
57
  }, z.core.$strict>;
58
- export type AgentLearningFile = z.infer<typeof AgentLearningFileSchema>;
59
58
  /** A host-resolved reference to exact native state, never a path or credential value. */
60
59
  export declare const AgentLearningNativeRefSchema: z.ZodObject<{
61
60
  harness: z.ZodEnum<{
@@ -82,7 +81,6 @@ export declare const AgentLearningNativeRefSchema: z.ZodObject<{
82
81
  reference: z.ZodString;
83
82
  digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
84
83
  }, z.core.$strict>;
85
- export type AgentLearningNativeRef = z.infer<typeof AgentLearningNativeRefSchema>;
86
84
  declare const materialSchema: z.ZodObject<{
87
85
  version: z.ZodLiteral<1>;
88
86
  identity: z.ZodObject<{
@@ -212,6 +212,10 @@ export declare const ContextTransferRequestSchema: z.ZodObject<{
212
212
  xhigh: "xhigh";
213
213
  ultracode: "ultracode";
214
214
  }>>;
215
+ credentialSource: z.ZodOptional<z.ZodEnum<{
216
+ subscription: "subscription";
217
+ managed: "managed";
218
+ }>>;
215
219
  selector: z.ZodUnion<readonly [z.ZodObject<{
216
220
  kind: z.ZodLiteral<"all-eligible">;
217
221
  }, z.core.$strict>, z.ZodObject<{
@@ -203,6 +203,10 @@ export declare const agentProfileSeatSchema: z.ZodObject<{
203
203
  xhigh: "xhigh";
204
204
  ultracode: "ultracode";
205
205
  }>>;
206
+ credentialSource: z.ZodOptional<z.ZodEnum<{
207
+ subscription: "subscription";
208
+ managed: "managed";
209
+ }>>;
206
210
  selector: z.ZodUnion<readonly [z.ZodObject<{
207
211
  kind: z.ZodLiteral<"all-eligible">;
208
212
  }, z.core.$strict>, z.ZodObject<{
@@ -569,6 +573,10 @@ export declare const agentProfileSchema: z.ZodObject<{
569
573
  xhigh: "xhigh";
570
574
  ultracode: "ultracode";
571
575
  }>>;
576
+ credentialSource: z.ZodOptional<z.ZodEnum<{
577
+ subscription: "subscription";
578
+ managed: "managed";
579
+ }>>;
572
580
  selector: z.ZodUnion<readonly [z.ZodObject<{
573
581
  kind: z.ZodLiteral<"all-eligible">;
574
582
  }, z.core.$strict>, z.ZodObject<{
@@ -114,6 +114,7 @@ export const agentProfileSeatSchema = z.strictObject({
114
114
  provider: z.string().regex(/^[a-z][a-z0-9-]*$/),
115
115
  model: z.string().min(1).refine((value) => value.trim() === value, "model must be canonical"),
116
116
  reasoningEffort: reasoningEffortSchema.optional(),
117
+ credentialSource: z.enum(["subscription", "managed"]).optional(),
117
118
  selector: z.union([
118
119
  z.strictObject({ kind: z.literal("all-eligible") }),
119
120
  z.strictObject({ kind: z.literal("seat"), id: z.string().min(1).refine((value) => value.trim() === value, "seat id must be canonical") }),
@@ -426,7 +427,7 @@ export const agentProfileSchema = z
426
427
  .superRefine((profile, context) => {
427
428
  validateNestedRecordKeys(profile, context, [], new Set());
428
429
  if (profile.seats?.length) {
429
- const first = profile.seats[0];
430
+ const first = profile.seats[0], source = profile.model?.metadata?.credentialSource ?? "managed";
430
431
  if (first.harness !== profile.harness || first.provider !== profile.model?.provider ||
431
432
  first.model !== profile.model?.default) {
432
433
  context.addIssue({ code: "custom", path: ["seats", 0], message: "first seat must match profile harness, model.provider, and model.default" });
@@ -434,6 +435,9 @@ export const agentProfileSchema = z
434
435
  if (first.reasoningEffort !== undefined && first.reasoningEffort !== profile.model?.reasoningEffort) {
435
436
  context.addIssue({ code: "custom", path: ["seats", 0, "reasoningEffort"], message: "first seat reasoningEffort must match profile model.reasoningEffort" });
436
437
  }
438
+ if ((first.credentialSource ?? source) !== source) {
439
+ context.addIssue({ code: "custom", path: ["seats", 0, "credentialSource"], message: "first seat credentialSource must match profile model.metadata.credentialSource" });
440
+ }
437
441
  if (first.tools !== undefined &&
438
442
  canonicalAgentProfileJson(first.tools) !== canonicalAgentProfileJson(profile.tools)) {
439
443
  context.addIssue({ code: "custom", path: ["seats", 0, "tools"], message: "first seat tools must match profile tools" });
@@ -88,8 +88,6 @@ export declare const ProxySecretParentsSchema: z.ZodType<Record<string, string |
88
88
  export type ProxySecretParents = z.infer<typeof ProxySecretParentsSchema>;
89
89
  /** Shape and totality only; the API verifies issuer authority and durable immutable pins. */
90
90
  export declare function isProxySecretParentsTotal(bindings: readonly ProxySecretBinding[], parents: unknown): parents is ProxySecretParents;
91
- /** API control-plane support; intentionally separate from the engine capability contract. */
92
- export declare const ProxySecretDelegationCapabilitySchema: z.ZodLiteral<1>;
93
91
  export declare const ProxySecretResolvedIdentitySchema: z.ZodObject<{
94
92
  tenantId: z.ZodString;
95
93
  issuerId: z.ZodString;
@@ -63,8 +63,6 @@ export function isProxySecretParentsTotal(bindings, parents) {
63
63
  return selection.success && parsed.success && Object.keys(parsed.data).length === selection.data.length &&
64
64
  selection.data.every((binding) => Object.hasOwn(parsed.data, binding.envName));
65
65
  }
66
- /** API control-plane support; intentionally separate from the engine capability contract. */
67
- export const ProxySecretDelegationCapabilitySchema = z.literal(1);
68
66
  export const ProxySecretResolvedIdentitySchema = z.strictObject({
69
67
  tenantId: boundedIdentifierSchema, issuerId: boundedIdentifierSchema,
70
68
  secretId: boundedIdentifierSchema, revision: boundedIdentifierSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "5.10.15",
3
+ "version": "5.10.16",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",