@crewx/sdk 0.9.0-rc.190 → 0.9.0-rc.192

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 (38) hide show
  1. package/dist/desktop/index.js +3 -3
  2. package/dist/esm/desktop/index.js +3 -3
  3. package/dist/esm/index.js +310 -302
  4. package/dist/esm/plugins/index.js +77 -77
  5. package/dist/esm/process/index.js +1 -1
  6. package/dist/esm/repository/index.js +116 -116
  7. package/dist/events/types.d.ts +15 -0
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.js +352 -344
  10. package/dist/lifecycle/task-stop.d.ts +7 -3
  11. package/dist/plugins/index.js +80 -80
  12. package/dist/process/index.js +1 -1
  13. package/dist/provider/acp/adapter.d.ts +37 -2
  14. package/dist/provider/acp/adapters/antigravity-account.d.ts +4 -0
  15. package/dist/provider/acp/completion-observer.d.ts +24 -0
  16. package/dist/provider/acp/connection.d.ts +63 -3
  17. package/dist/provider/acp/index.d.ts +3 -3
  18. package/dist/provider/acp/register.d.ts +1 -0
  19. package/dist/provider/acp/runtime.d.ts +1 -0
  20. package/dist/provider/acp/types.d.ts +31 -4
  21. package/dist/provider/bridge.browser.d.ts +1 -0
  22. package/dist/provider/bridge.d.ts +9 -1
  23. package/dist/provider-account/antigravity-acp/auth.d.ts +29 -0
  24. package/dist/provider-account/antigravity-acp/browser.d.ts +4 -0
  25. package/dist/provider-account/antigravity-acp/install.d.ts +42 -0
  26. package/dist/provider-account/antigravity-acp/lease.d.ts +23 -0
  27. package/dist/provider-account/antigravity-acp/lifecycle.d.ts +76 -0
  28. package/dist/provider-account/antigravity-acp/manifest.d.ts +76 -0
  29. package/dist/provider-account/antigravity-acp/profile.d.ts +4 -0
  30. package/dist/provider-account/capabilities.d.ts +6 -0
  31. package/dist/provider-account/index.d.ts +9 -1
  32. package/dist/provider-account/registry.d.ts +1 -1
  33. package/dist/provider-account/types.d.ts +9 -2
  34. package/dist/repository/index.d.ts +1 -1
  35. package/dist/repository/index.js +117 -117
  36. package/dist/repository/task.repository.d.ts +10 -0
  37. package/dist/types/index.d.ts +8 -0
  38. package/package.json +2 -1
@@ -0,0 +1,4 @@
1
+ import type { AiAccountEnvPlan } from '../types';
2
+ export declare const ANTIGRAVITY_ACCOUNT_STRIPPED_ENV: readonly ["GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION", "GOOGLE_CLOUD_QUOTA_PROJECT", "GOOGLE_GENAI_USE_VERTEXAI", "GCLOUD_PROJECT", "CLOUDSDK_CORE_PROJECT", "AGY_ADC_AUTH", "GEMINI_BASE_URL", "JETSKI_OAUTH_TOKEN"];
3
+ export declare const ANTIGRAVITY_ACCOUNT_STRIPPED_ENV_PREFIXES: readonly ["AGY_ACP_"];
4
+ export declare function antigravityAccountEnvPlan(accountDir: string): AiAccountEnvPlan;
@@ -0,0 +1,6 @@
1
+ export declare function getAiAccountCapabilities(): Readonly<{
2
+ schemaVersion: 1;
3
+ supportedProviders: readonly ['cli/claude', 'cli/codex', 'cli/antigravity'];
4
+ registryVersions: readonly [1, 2];
5
+ features: readonly ['antigravity-acp-accounts-v1'];
6
+ }>;
@@ -1,5 +1,13 @@
1
1
  export { addAiAccount, applyAiAccountEnv, aiAccountEnvPlan, getLoginInvocation, getStatusInvocation, listAiAccounts, removeAiAccount, resolveAiAccountForRun, setActiveAiAccount, } from './accounts';
2
+ export { getAiAccountCapabilities } from './capabilities';
3
+ export { ANTIGRAVITY_ACCOUNT_STRIPPED_ENV, ANTIGRAVITY_ACCOUNT_STRIPPED_ENV_PREFIXES, antigravityAccountEnvPlan, } from './antigravity-acp/profile';
4
+ export { ANTIGRAVITY_ACP_DISTRIBUTIONS, ANTIGRAVITY_ACP_VERSION, } from './antigravity-acp/manifest';
5
+ export { getAiAccountRuntimeStatus, installAiAccountRuntime, } from './antigravity-acp/install';
6
+ export type { AiAccountRuntimeInstallPhase, AiAccountRuntimeInstallProgress, AiAccountRuntimeStatus, AiAccountRuntimeStatusReason, InstallAiAccountRuntimeOptions, } from './antigravity-acp/install';
7
+ export type { AntigravityAcpDistribution } from './antigravity-acp/manifest';
8
+ export { assertAiAccountIdle, bindAiAccountRun, getAiAccountStatus, logoutAiAccount, removeAiAccountGuarded, startAiAccountLogin, withAiAccountExclusive, } from './antigravity-acp/lifecycle';
9
+ export type { AiAccountLifecycleOptions, AiAccountLoginHandle, AiAccountLoginResult, AiAccountResumeMetadata, AiAccountRunBinding, AiAccountRuntimeKind, AiAccountState, AiAccountStatus, AntigravityAccountErrorCode, } from './antigravity-acp/lifecycle';
2
10
  export { defaultAiAccountDir, loadProviderAccountsRegistry, providerAccountsRegistryPath, providerAccountsRoot, } from './registry';
3
11
  export type { ProviderAccountsRegistry, RemovedAiAccount, StoredAiAccount, } from './registry';
4
12
  export { AI_ACCOUNT_PROVIDERS, AiAccountError, CLAUDE_ACCOUNT_STRIPPED_ENV, DEFAULT_AI_ACCOUNT_ID, } from './types';
5
- export type { AddedAiAccount, AiAccountEnvPlan, AiAccountErrorCode, AiAccountInvocation, AiAccountProvider, AiAccountSummary, ResolveAiAccountInput, ResolvedAiAccount, } from './types';
13
+ export type { AddedAiAccount, AiAccountEnvPlan, AiAccountErrorCode, AiAccountInvocation, AiAccountLoginKind, AiAccountProvider, AiAccountRuntime, AiAccountSummary, ResolveAiAccountInput, ResolvedAiAccount, } from './types';
@@ -16,7 +16,7 @@ export interface ProviderAccountSlot {
16
16
  accounts: StoredAiAccount[];
17
17
  }
18
18
  export interface ProviderAccountsRegistry {
19
- version: 1;
19
+ version: 1 | 2;
20
20
  providers: Record<AiAccountProvider, ProviderAccountSlot>;
21
21
  removed: RemovedAiAccount[];
22
22
  }
@@ -1,8 +1,10 @@
1
- export declare const AI_ACCOUNT_PROVIDERS: readonly ["cli/claude", "cli/codex"];
1
+ export declare const AI_ACCOUNT_PROVIDERS: readonly ["cli/claude", "cli/codex", "cli/antigravity"];
2
2
  export type AiAccountProvider = (typeof AI_ACCOUNT_PROVIDERS)[number];
3
+ export type AiAccountRuntime = 'native' | 'acp';
4
+ export type AiAccountLoginKind = 'command' | 'acp-flow';
3
5
  export declare const DEFAULT_AI_ACCOUNT_ID = "default";
4
6
  export declare const CLAUDE_ACCOUNT_STRIPPED_ENV: readonly ["ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "CLAUDE_CODE_OAUTH_TOKEN"];
5
- export type AiAccountErrorCode = 'ACCOUNT_LABEL_INVALID' | 'ACCOUNT_PROVIDER_INVALID' | 'ACCOUNT_PROVIDER_UNSUPPORTED' | 'ACCOUNT_NOT_FOUND' | 'ACCOUNT_UNKNOWN' | 'ACCOUNT_DEFAULT_PROTECTED' | 'ACCOUNT_ACTIVE_PROTECTED' | 'ACCOUNT_RESUME_REMOVED' | 'ACCOUNT_REGISTRY_INVALID';
7
+ export type AiAccountErrorCode = 'ACCOUNT_LABEL_INVALID' | 'ACCOUNT_PROVIDER_INVALID' | 'ACCOUNT_PROVIDER_UNSUPPORTED' | 'ACCOUNT_NOT_FOUND' | 'ACCOUNT_UNKNOWN' | 'ACCOUNT_DEFAULT_PROTECTED' | 'ACCOUNT_ACTIVE_PROTECTED' | 'ACCOUNT_RESUME_REMOVED' | 'ACCOUNT_RUNTIME_UNAVAILABLE' | 'ACCOUNT_RUNTIME_CAPABILITY' | 'ACCOUNT_RUNTIME_CAPABILITY_UNSUPPORTED' | 'ACCOUNT_RUNTIME_MISMATCH' | 'ACCOUNT_RUNTIME_CONTEXT_REQUIRED' | 'ACCOUNT_INSTALL_FAILED' | 'ACCOUNT_OPTION_UNSUPPORTED' | 'ACCOUNT_NOT_SIGNED_IN' | 'ACCOUNT_LOGIN_IN_PROGRESS' | 'ACCOUNT_LOGIN_INCOMPLETE' | 'ACCOUNT_LOGIN_UNSUPPORTED_HOST' | 'ACCOUNT_LOGIN_UNSUPPORTED_POLICY' | 'ACCOUNT_LOGIN_FAILED' | 'ACCOUNT_LOGIN_CANCELLED' | 'ACCOUNT_BUSY' | 'ACCOUNT_RESUME_AUTH_CHANGED' | 'ACCOUNT_RESUME_NOT_FOUND' | 'ACCOUNT_LOGIN_FLOW_UNSUPPORTED' | 'ACCOUNT_REGISTRY_INVALID';
6
8
  export declare class AiAccountError extends Error {
7
9
  readonly code: AiAccountErrorCode;
8
10
  constructor(code: AiAccountErrorCode, message: string);
@@ -11,6 +13,8 @@ export interface AiAccountSummary {
11
13
  id: string;
12
14
  label: string;
13
15
  provider: AiAccountProvider;
16
+ runtime: AiAccountRuntime;
17
+ loginKind: AiAccountLoginKind;
14
18
  dir: string;
15
19
  builtIn: boolean;
16
20
  active: boolean;
@@ -23,6 +27,7 @@ export interface AddedAiAccount {
23
27
  export interface AiAccountEnvPlan {
24
28
  env: Record<string, string>;
25
29
  unsetEnv: string[];
30
+ unsetEnvPrefixes?: string[];
26
31
  }
27
32
  export interface AiAccountInvocation extends AiAccountEnvPlan {
28
33
  command: string;
@@ -31,6 +36,8 @@ export interface AiAccountInvocation extends AiAccountEnvPlan {
31
36
  export interface ResolvedAiAccount extends AiAccountEnvPlan {
32
37
  id: string;
33
38
  label: string;
39
+ runtime: AiAccountRuntime;
40
+ loginKind: AiAccountLoginKind;
34
41
  fallback?: 'removed';
35
42
  }
36
43
  export interface ResolveAiAccountInput {
@@ -26,7 +26,7 @@ export type { ReapOrphanedTasksOptions } from './task.repository.js';
26
26
  export type { ProviderInputEpochEntry, ProviderInputRecord } from './task.repository.js';
27
27
  export { countRatedTasks, listRatedTasks, RATED_TASK_EXCERPT_MAX_CHARS, RATED_TASK_LIST_MAX_LIMIT, setTaskRating, TASK_RATINGS, TaskRatingError, } from './task.repository.js';
28
28
  export type { CountRatedTasksInput, ListRatedTasksInput, RatedTaskRow, SetTaskRatingInput, SetTaskRatingResult, TaskRating, TaskRatingErrorCode, } from './task.repository.js';
29
- export type { FinalizeTaskStopOptions, TaskStopMethod, TaskStopOrigin, TaskStopRequestContext, TaskStopRequestResult, } from './task.repository.js';
29
+ export type { FinalizeTaskStopOptions, TaskStopMethod, TaskStopOrigin, TaskStopRequestContext, TaskStopRequestReceipt, TaskStopRequestResult, } from './task.repository.js';
30
30
  export { INSTRUCTION_STOP_EPOCH_MISMATCH, INSTRUCTION_STOP_GENERATION_ALREADY_SETTLED, INSTRUCTION_STOP_PROCESS_TERMINATION_FAILED, INSTRUCTION_STOP_REQUEST_FAILED, INSTRUCTION_STOP_SETTLE_CAS_FAILED, INSTRUCTION_STOP_TARGET_PID_MISSING, INSTRUCTION_STOP_WORKSPACE_MISMATCH, stopTask, resolveTaskStopMethod, TASK_STOP_DEFAULT_GRACE_MS, TASK_STOP_DEFAULT_POLL_MS, TASK_STOP_OWNED_PROCESS_MARKERS, } from '../lifecycle/task-stop.js';
31
31
  export type { StopTaskGenerationForInstructionOptions, StopTaskOptions, StopTaskProcessControl, StopTaskResult, StopTaskStatus, } from '../lifecycle/task-stop.js';
32
32
  export { runHeartbeatTick, startTaskHeartbeat, stopTaskHeartbeat, TASK_STOP_POLL_INTERVAL_MS, taskHeartbeatRegistry, } from '../lifecycle/task-heartbeat.js';