| author | |
| committer | |
| log | 1bd4d6d953a01232a049485612d40faa1a48afa8 |
| tree | c8a570c9c2423e75ff061c4c499be7c74926e70e |
| parent | e9655d43d506943925dcb1f1561d0f52843f30f6 |
Co-authored-by: codex <codex@users.noreply.github.com>3 files changed, 0 insertions(+), 36 deletions(-)
packages/contracts/src/model.ts-6| ... | @@ -13,11 +13,6 @@ export const CodexModelOptions = Schema.Struct({ | ... | @@ -13,11 +13,6 @@ export const CodexModelOptions = Schema.Struct({ |
| 13 | }); | 13 | }); |
| 14 | export type CodexModelOptions = typeof CodexModelOptions.Type; | 14 | export type CodexModelOptions = typeof CodexModelOptions.Type; |
| 15 | 15 | ||
| 16 | export const ClaudeCodeModelOptions = Schema.Struct({ | ||
| 17 | thinking: Schema.optional(Schema.Boolean), | ||
| 18 | }); | ||
| 19 | export type ClaudeCodeModelOptions = typeof ClaudeCodeModelOptions.Type; | ||
| 20 | |||
| 21 | export const CursorModelOptions = Schema.Struct({ | 16 | export const CursorModelOptions = Schema.Struct({ |
| 22 | reasoning: Schema.optional(Schema.Literals(CURSOR_REASONING_OPTIONS)), | 17 | reasoning: Schema.optional(Schema.Literals(CURSOR_REASONING_OPTIONS)), |
| 23 | fastMode: Schema.optional(Schema.Boolean), | 18 | fastMode: Schema.optional(Schema.Boolean), |
| ... | @@ -27,7 +22,6 @@ export type CursorModelOptions = typeof CursorModelOptions.Type; | ... | @@ -27,7 +22,6 @@ export type CursorModelOptions = typeof CursorModelOptions.Type; |
| 27 | 22 | ||
| 28 | export const ProviderModelOptions = Schema.Struct({ | 23 | export const ProviderModelOptions = Schema.Struct({ |
| 29 | codex: Schema.optional(CodexModelOptions), | 24 | codex: Schema.optional(CodexModelOptions), |
| 30 | claudeCode: Schema.optional(ClaudeCodeModelOptions), | ||
| 31 | cursor: Schema.optional(CursorModelOptions), | 25 | cursor: Schema.optional(CursorModelOptions), |
| 32 | }); | 26 | }); |
| 33 | export type ProviderModelOptions = typeof ProviderModelOptions.Type; | 27 | export type ProviderModelOptions = typeof ProviderModelOptions.Type; |
packages/contracts/src/provider.test.ts-22| ... | @@ -43,28 +43,6 @@ describe("ProviderSessionStartInput", () => { | ... | @@ -43,28 +43,6 @@ describe("ProviderSessionStartInput", () => { |
| 43 | ).toThrow(); | 43 | ).toThrow(); |
| 44 | }); | 44 | }); |
| 45 | 45 | ||
| 46 | it("accepts claude runtime knobs", () => { | ||
| 47 | const parsed = decodeProviderSessionStartInput({ | ||
| 48 | threadId: "thread-1", | ||
| 49 | provider: "claudeCode", | ||
| 50 | cwd: "/tmp/workspace", | ||
| 51 | model: "claude-sonnet-4-6", | ||
| 52 | providerOptions: { | ||
| 53 | claudeCode: { | ||
| 54 | binaryPath: "/usr/local/bin/claude", | ||
| 55 | permissionMode: "plan", | ||
| 56 | maxThinkingTokens: 12_000, | ||
| 57 | }, | ||
| 58 | }, | ||
| 59 | runtimeMode: "full-access", | ||
| 60 | }); | ||
| 61 | expect(parsed.provider).toBe("claudeCode"); | ||
| 62 | expect(parsed.providerOptions?.claudeCode?.binaryPath).toBe("/usr/local/bin/claude"); | ||
| 63 | expect(parsed.providerOptions?.claudeCode?.permissionMode).toBe("plan"); | ||
| 64 | expect(parsed.providerOptions?.claudeCode?.maxThinkingTokens).toBe(12_000); | ||
| 65 | expect(parsed.runtimeMode).toBe("full-access"); | ||
| 66 | }); | ||
| 67 | |||
| 68 | it("accepts cursor provider payloads", () => { | 46 | it("accepts cursor provider payloads", () => { |
| 69 | const parsed = decodeProviderSessionStartInput({ | 47 | const parsed = decodeProviderSessionStartInput({ |
| 70 | threadId: "thread-1", | 48 | threadId: "thread-1", |
packages/contracts/src/provider.ts-8| ... | @@ -5,7 +5,6 @@ import { | ... | @@ -5,7 +5,6 @@ import { |
| 5 | ApprovalRequestId, | 5 | ApprovalRequestId, |
| 6 | EventId, | 6 | EventId, |
| 7 | IsoDateTime, | 7 | IsoDateTime, |
| 8 | NonNegativeInt, | ||
| 9 | ProviderItemId, | 8 | ProviderItemId, |
| 10 | ThreadId, | 9 | ThreadId, |
| 11 | TurnId, | 10 | TurnId, |
| ... | @@ -51,19 +50,12 @@ const CodexProviderStartOptions = Schema.Struct({ | ... | @@ -51,19 +50,12 @@ const CodexProviderStartOptions = Schema.Struct({ |
| 51 | homePath: Schema.optional(TrimmedNonEmptyStringSchema), | 50 | homePath: Schema.optional(TrimmedNonEmptyStringSchema), |
| 52 | }); | 51 | }); |
| 53 | 52 | ||
| 54 | const ClaudeCodeProviderStartOptions = Schema.Struct({ | ||
| 55 | binaryPath: Schema.optional(TrimmedNonEmptyStringSchema), | ||
| 56 | permissionMode: Schema.optional(TrimmedNonEmptyStringSchema), | ||
| 57 | maxThinkingTokens: Schema.optional(NonNegativeInt), | ||
| 58 | }); | ||
| 59 | |||
| 60 | const CursorProviderStartOptions = Schema.Struct({ | 53 | const CursorProviderStartOptions = Schema.Struct({ |
| 61 | binaryPath: Schema.optional(TrimmedNonEmptyStringSchema), | 54 | binaryPath: Schema.optional(TrimmedNonEmptyStringSchema), |
| 62 | }); | 55 | }); |
| 63 | 56 | ||
| 64 | const ProviderStartOptions = Schema.Struct({ | 57 | const ProviderStartOptions = Schema.Struct({ |
| 65 | codex: Schema.optional(CodexProviderStartOptions), | 58 | codex: Schema.optional(CodexProviderStartOptions), |
| 66 | claudeCode: Schema.optional(ClaudeCodeProviderStartOptions), | ||
| 67 | cursor: Schema.optional(CursorProviderStartOptions), | 59 | cursor: Schema.optional(CursorProviderStartOptions), |
| 68 | }); | 60 | }); |
| 69 | 61 |