@crewx/sdk 0.9.0-rc.180 → 0.9.0-rc.182

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.
Files changed (40) hide show
  1. package/dist/agent-interceptor/schema.d.ts +12 -12
  2. package/dist/app/app-files/index.d.ts +3 -2
  3. package/dist/app/app-files/store.d.ts +1 -0
  4. package/dist/app/app.d.ts +1 -0
  5. package/dist/app/index.d.ts +1 -1
  6. package/dist/app/index.js +12 -12
  7. package/dist/config/models.generated.d.ts +2 -2
  8. package/dist/config/pricing.generated.d.ts +2 -2
  9. package/dist/esm/app/index.js +12 -12
  10. package/dist/esm/index.js +307 -286
  11. package/dist/esm/plugins/index.js +107 -106
  12. package/dist/esm/publish/index.js +2 -2
  13. package/dist/esm/repository/index.js +182 -167
  14. package/dist/esm/skills/index.js +2 -2
  15. package/dist/esm/testing/index.js +1 -1
  16. package/dist/events/types.d.ts +1 -0
  17. package/dist/index.browser.js +1 -1
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +305 -284
  20. package/dist/mcp-app/agent-access.d.ts +8 -1
  21. package/dist/mcp-app/index.d.ts +1 -0
  22. package/dist/mcp-app/view-call.d.ts +7 -0
  23. package/dist/mcp-app/workspace-snapshot.d.ts +2 -1
  24. package/dist/plugins/index.js +107 -106
  25. package/dist/provider/bridge.browser.d.ts +2 -0
  26. package/dist/provider/bridge.d.ts +4 -0
  27. package/dist/provider/cli/adapter.types.d.ts +2 -0
  28. package/dist/provider/cli/adapters/antigravity-stream.d.ts +27 -0
  29. package/dist/publish/index.js +2 -2
  30. package/dist/repository/index.js +180 -165
  31. package/dist/repository/task.repository.d.ts +2 -0
  32. package/dist/repository/usage-backfill.d.ts +2 -2
  33. package/dist/repository/usage-from-logs.d.ts +1 -0
  34. package/dist/skills/index.js +2 -2
  35. package/dist/testing/index.js +1 -1
  36. package/dist/ui-instance/index.d.ts +2 -2
  37. package/dist/ui-instance/store.d.ts +4 -1
  38. package/dist/ui-instance/types.d.ts +39 -0
  39. package/dist/ui-plugin/app-manifest.d.ts +1 -1
  40. package/package.json +1 -1
@@ -5,6 +5,7 @@ export interface ProviderUsage {
5
5
  outputTokens: number;
6
6
  cachedInputTokens: number;
7
7
  costUsd: number;
8
+ complete?: boolean;
8
9
  }
9
10
  export interface ProviderQueryOptions {
10
11
  model?: string;
@@ -12,6 +13,7 @@ export interface ProviderQueryOptions {
12
13
  systemPrompt?: string;
13
14
  additionalArgs?: string[];
14
15
  onOutput?: (line: string, level: 'stdout' | 'stderr') => void;
16
+ onSpawn?: () => void;
15
17
  onPid?: (pid: number) => void;
16
18
  onCommand?: (command: string) => void;
17
19
  onUsage?: (usage: ProviderUsage) => void;
@@ -8,11 +8,13 @@ export interface RunCliProcessOptions {
8
8
  timeoutMs?: number;
9
9
  idleMs?: number;
10
10
  resumeSessionId?: string;
11
+ onProviderSessionId?: (id: string) => void;
11
12
  env?: Record<string, string>;
12
13
  unsetEnv?: readonly string[];
13
14
  cwd?: string;
14
15
  onOutput?: (line: string, level: 'stdout' | 'stderr') => void;
15
16
  onRateLimitObserved?: (windows: ProviderRateLimitWindows) => void;
17
+ onSpawn?: () => void;
16
18
  onPid?: (pid: number) => void;
17
19
  onExitCode?: (code: number) => void;
18
20
  onUsage?: (usage: ProviderUsage) => void;
@@ -53,6 +55,7 @@ export interface ProviderUsage {
53
55
  outputTokens: number;
54
56
  cachedInputTokens: number;
55
57
  costUsd: number;
58
+ complete?: boolean;
56
59
  }
57
60
  export interface ProviderQueryOptions {
58
61
  model?: string;
@@ -65,6 +68,7 @@ export interface ProviderQueryOptions {
65
68
  resumeSessionId?: string;
66
69
  providerSessionId?: string;
67
70
  onProviderSessionId?: (id: string) => void;
71
+ onSpawn?: () => void;
68
72
  onOutput?: (line: string, level: 'stdout' | 'stderr') => void;
69
73
  onPid?: (pid: number) => void;
70
74
  onCommand?: (command: string) => void;
@@ -9,6 +9,7 @@ export interface ParseEventContext {
9
9
  export interface CliProviderAdapter {
10
10
  readonly command: string;
11
11
  createSessionId?(): string;
12
+ extractSessionId?(line: string): string | null;
12
13
  readonly meta?: {
13
14
  displayName?: string;
14
15
  models?: Array<{
@@ -30,6 +31,7 @@ export interface CliProviderAdapter {
30
31
  audio?: boolean;
31
32
  mcp?: boolean;
32
33
  loadSession?: boolean;
34
+ usageCompleteness?: boolean;
33
35
  };
34
36
  };
35
37
  buildArgs(message: string, options: ProviderQueryOptions, isExecute: boolean): {
@@ -0,0 +1,27 @@
1
+ type JsonRecord = Record<string, unknown>;
2
+ export type AntigravityStreamEvent = {
3
+ kind: 'init';
4
+ envelope: JsonRecord;
5
+ init: JsonRecord;
6
+ } | {
7
+ kind: 'step_update';
8
+ envelope: JsonRecord;
9
+ step: JsonRecord;
10
+ } | {
11
+ kind: 'result';
12
+ envelope: JsonRecord;
13
+ result: JsonRecord;
14
+ } | {
15
+ kind: 'legacy_result';
16
+ envelope: JsonRecord;
17
+ result: JsonRecord;
18
+ } | {
19
+ kind: 'agy_error';
20
+ envelope: JsonRecord;
21
+ error: unknown;
22
+ };
23
+ export declare function parseAntigravityLine(line: string): AntigravityStreamEvent | undefined;
24
+ export declare function isAntigravityProtocolLine(line: string): boolean;
25
+ export declare function isAntigravityMetadataOnlyLine(line: string): boolean;
26
+ export declare function parseAntigravityStream(stdout: string): AntigravityStreamEvent[];
27
+ export {};