@tangle-network/agent-interface 2.15.0 → 2.16.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.
@@ -220,6 +220,7 @@ export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
220
220
  extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
221
221
  }, z.core.$strict>;
222
222
  requestedProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
223
+ authMode: z.ZodOptional<z.ZodLiteral<"oauth">>;
223
224
  initialPrompt: z.ZodOptional<z.ZodString>;
224
225
  cwd: z.ZodOptional<z.ZodString>;
225
226
  cols: z.ZodOptional<z.ZodNumber>;
@@ -23,6 +23,8 @@ export const AgentInteractiveSessionStartSchema = z.strictObject({
23
23
  run: AgentExactRunControlRefSchema,
24
24
  profile: agentProfileSchema,
25
25
  requestedProfileDigest: sha256DigestSchema,
26
+ // A provider-owned CLI login choice, never a credential or token.
27
+ authMode: z.literal("oauth").optional(),
26
28
  initialPrompt: boundedStringSchema.optional(),
27
29
  cwd: boundedStringSchema.min(1).optional(),
28
30
  cols: interactiveDimensionSchema.optional(),
@@ -36,6 +38,9 @@ export function agentInteractiveSessionRequestDigest(coordinates, input) {
36
38
  kind: "agent-interactive-session-start.v1",
37
39
  run: exactCoordinates,
38
40
  requestedProfileDigest: exactInput.requestedProfileDigest,
41
+ ...(exactInput.authMode === undefined
42
+ ? {}
43
+ : { authMode: exactInput.authMode }),
39
44
  ...(exactInput.initialPrompt === undefined
40
45
  ? {}
41
46
  : { initialPrompt: exactInput.initialPrompt }),
@@ -60,6 +65,10 @@ export function exactAgentInteractiveSessionStart(value) {
60
65
  if (parsed.profile.harness === undefined) {
61
66
  throw new Error("interactive agent sessions require AgentProfile.harness");
62
67
  }
68
+ if (parsed.authMode === "oauth" &&
69
+ parsed.profile.harness !== "claude-code") {
70
+ throw new Error("Claude Code OAuth mode requires the claude-code harness");
71
+ }
63
72
  const digest = canonicalAgentProfileDigest(parsed.profile);
64
73
  if (digest !== parsed.requestedProfileDigest) {
65
74
  throw new Error("interactive agent session requested profile digest does not match its profile");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",