@crewx/sdk 0.8.3-rc.2 → 0.8.3-rc.4

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.
@@ -0,0 +1,19 @@
1
+ import type { ProviderQueryOptions, ProviderUsage } from './bridge.js';
2
+ export interface CliProviderAdapter {
3
+ readonly command: string;
4
+ buildArgs(message: string, options: ProviderQueryOptions, isExecute: boolean): {
5
+ args: string[];
6
+ stdinMessage?: string;
7
+ };
8
+ extractText(stdout: string): string;
9
+ extractFailure?(line: string): Error | null;
10
+ interpretExit?(code: number, stderr: string): Error | null;
11
+ parseResultMeta?(stdout: string): {
12
+ usage?: ProviderUsage | null;
13
+ model?: string | null;
14
+ };
15
+ }
16
+ export declare class RateLimitError extends Error {
17
+ readonly name = "RateLimitError";
18
+ constructor(message: string);
19
+ }
@@ -0,0 +1,2 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export declare const claudeAdapter: CliProviderAdapter;
@@ -0,0 +1,2 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export declare const codexAdapter: CliProviderAdapter;
@@ -0,0 +1,2 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export declare const copilotAdapter: CliProviderAdapter;
@@ -0,0 +1,2 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export declare const geminiAdapter: CliProviderAdapter;
@@ -0,0 +1,7 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export { claudeAdapter } from './claude.js';
3
+ export { geminiAdapter } from './gemini.js';
4
+ export { copilotAdapter } from './copilot.js';
5
+ export { codexAdapter } from './codex.js';
6
+ export { opencodeAdapter } from './opencode.js';
7
+ export declare const BUILTIN_ADAPTERS: Record<string, CliProviderAdapter>;
@@ -0,0 +1,2 @@
1
+ import type { CliProviderAdapter } from '../adapter.types.js';
2
+ export declare const opencodeAdapter: CliProviderAdapter;
@@ -1,3 +1,4 @@
1
+ import type { CliProviderAdapter } from './adapter.types.js';
1
2
  export declare function parseStreamJsonOutput(raw: string): string;
2
3
  export declare function parseResultEventUsage(raw: string): ProviderUsage | null;
3
4
  export declare class ProviderError extends Error {
@@ -20,7 +21,7 @@ export interface RunCliProcessOptions {
20
21
  onUsage?: (usage: ProviderUsage) => void;
21
22
  onModel?: (model: string) => void;
22
23
  }
23
- export declare function runCliProcess(command: string, args: string[], providerStr: string, _providerId: string, options?: RunCliProcessOptions, stdinMessage?: string): Promise<{
24
+ export declare function runCliProcess(command: string, args: string[], providerStr: string, _providerId: string, options?: RunCliProcessOptions, stdinMessage?: string, adapter?: CliProviderAdapter): Promise<{
24
25
  stdout: string;
25
26
  parsed: string;
26
27
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.8.3-rc.2",
3
+ "version": "0.8.3-rc.4",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"