@autopilot-agent/adapters 0.1.0 → 0.2.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.
@@ -7,6 +7,7 @@ export interface NodeRuntimePortsOptions extends NodeStoreOptions {
7
7
  cwd?: string;
8
8
  env?: NodeJS.ProcessEnv;
9
9
  userSettingsPath?: string;
10
+ trustRoot?: string;
10
11
  sandboxTempRoot?: string;
11
12
  }
12
13
  export declare function createNodeRuntimePorts(options: NodeRuntimePortsOptions): RuntimePorts;
@@ -0,0 +1,2 @@
1
+ export declare function getNodeFileMutationLockRoot(): string;
2
+ export declare function withNodeFileMutationLocks<T>(canonicalTargets: readonly string[], operation: () => Promise<T>): Promise<T>;
@@ -3,7 +3,9 @@ export interface JsonlCorruptionDiagnostic {
3
3
  line: number;
4
4
  reason: "INVALID_JSON";
5
5
  }
6
- export declare function withFileLock<T>(filePath: string, operation: () => T | Promise<T>): Promise<T>;
6
+ export declare function withFileLock<T>(filePath: string, operation: () => T | Promise<T>, options?: {
7
+ requireExitedOwner?: boolean;
8
+ }): Promise<T>;
7
9
  export declare function withAsyncFileLock<T>(filePath: string, operation: () => T | Promise<T>): Promise<T>;
8
10
  export declare function ensureParentDirectory(filePath: string): void;
9
11
  export declare function atomicReplace(filePath: string, content: string): void;
@@ -0,0 +1,7 @@
1
+ import type { HostMutationProtection } from "@autopilot-agent/core";
2
+ export declare function createNodeHostMutationProtection(options: {
3
+ stateRoot: string;
4
+ workspaceRoot?: string;
5
+ trustRoot?: string;
6
+ userSettingsPath?: string;
7
+ }): HostMutationProtection;
@@ -0,0 +1,2 @@
1
+ import { type SandboxPort } from "@autopilot-agent/core";
2
+ export declare function createNodeHostExecutionSandboxPort(): SandboxPort;
@@ -2,8 +2,8 @@ import { type SandboxPort, type SandboxPolicy } from "@autopilot-agent/core";
2
2
  import { type SrtRuntimeSurface } from "./srt-module";
3
3
  export interface NodeSandboxPortOptions {
4
4
  workspaceRoot: string;
5
+ stateRoot?: string;
5
6
  tempRoot?: string;
6
- windowsSrtWinExe?: string;
7
7
  loadModule?: () => Promise<SrtRuntimeSurface>;
8
8
  }
9
9
  export declare function serializePosixCommand(program: string, args: readonly string[], tempRoot?: string): string;
@@ -0,0 +1,12 @@
1
+ import { type ExternalPermissionSnapshot } from "@autopilot-agent/core";
2
+ export interface CreateNodeExternalPermissionProjectorOptions {
3
+ homeDirectory?: string;
4
+ }
5
+ export declare function createNodeExternalPermissionProjector(options?: CreateNodeExternalPermissionProjectorOptions): {
6
+ project(input: {
7
+ workspaceRoot: string;
8
+ rule: string;
9
+ action: "add" | "remove";
10
+ }): Promise<void>;
11
+ read(workspaceRoot: string): Promise<ExternalPermissionSnapshot>;
12
+ };
@@ -28,5 +28,6 @@ export interface NodeUserSettingsLoader {
28
28
  }
29
29
  export declare function resolveNodeUserSettingsPath(homeDirectory?: string | undefined, pathApi?: Pick<typeof path, "join" | "isAbsolute">): string;
30
30
  export declare function resolveNodeSettingsPaths(workspaceRoot: string, homeDirectory?: string, pathApi?: NodePathApi): NodeSettingsPaths;
31
+ export declare function isSafeSettingsFile(filePath: string): boolean;
31
32
  export declare function createNodeSettingsLoader(options?: CreateNodeSettingsLoaderOptions): NodeSettingsLoader & NodeUserSettingsLoader;
32
33
  export {};
@@ -52,6 +52,11 @@ export interface WebSearchSettingsCategoryInput {
52
52
  model: string;
53
53
  apiKey?: string;
54
54
  }
55
+ export interface UserSettingsDiagnostic {
56
+ code: string;
57
+ field?: string;
58
+ scope: string;
59
+ }
55
60
  export interface UserSettingsStatus {
56
61
  revision: string;
57
62
  main: Omit<MainSettingsCategoryInput, "apiKey"> & {
@@ -64,6 +69,7 @@ export interface UserSettingsStatus {
64
69
  rag: Record<RagConnectionRole, RagSettingsCategoryConnectionInput & {
65
70
  configured: boolean;
66
71
  }>;
72
+ diagnostics: UserSettingsDiagnostic[];
67
73
  }
68
74
  export interface MainSettingsCategoryUpdate {
69
75
  main: MainSettingsCategoryInput;
@@ -79,7 +85,8 @@ export interface MainModelCatalogResult {
79
85
  }
80
86
  export declare class NodeUserSettingsError extends Error {
81
87
  readonly code: "SETTINGS_INVALID" | "SETTINGS_CHANGED" | "SETTINGS_INPUT_INVALID" | "SETTINGS_KEY_REQUIRED" | "SETTINGS_MIGRATION_CONFLICT";
82
- constructor(code: "SETTINGS_INVALID" | "SETTINGS_CHANGED" | "SETTINGS_INPUT_INVALID" | "SETTINGS_KEY_REQUIRED" | "SETTINGS_MIGRATION_CONFLICT");
88
+ readonly diagnostic?: UserSettingsDiagnostic | undefined;
89
+ constructor(code: "SETTINGS_INVALID" | "SETTINGS_CHANGED" | "SETTINGS_INPUT_INVALID" | "SETTINGS_KEY_REQUIRED" | "SETTINGS_MIGRATION_CONFLICT", diagnostic?: UserSettingsDiagnostic | undefined);
83
90
  }
84
91
  export declare function createNodeUserSettingsService(options?: {
85
92
  homeDirectory?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autopilot-agent/adapters",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@anthropic-ai/sandbox-runtime": "0.0.78",
45
- "@autopilot-agent/core": "0.1.0",
45
+ "@autopilot-agent/core": "0.2.0",
46
46
  "js-yaml": "4.3.0",
47
47
  "linkedom": "0.18.12"
48
48
  },
@@ -1,9 +0,0 @@
1
- export declare function resolveWindowsSandboxRunner(vendored: string, explicit?: string): string;
2
- export declare function resolveWindowsSandboxCommand(program: string, args: readonly string[]): {
3
- exe: string;
4
- args: string[];
5
- };
6
- export declare function finalizeWindowsSandboxArgv(argv: readonly string[], target: {
7
- exe: string;
8
- args: readonly string[];
9
- }, tempRoot?: string): string[];
@@ -1,8 +0,0 @@
1
- import { type SandboxCapabilityReport } from "@autopilot-agent/core";
2
- import { type SrtRuntimeSurface } from "./srt-module";
3
- export interface WindowsSandboxSetupOptions {
4
- srtWinExe?: string;
5
- loadModule?: () => Promise<SrtRuntimeSurface>;
6
- }
7
- export declare function readWindowsSandboxCapability(options?: WindowsSandboxSetupOptions): Promise<SandboxCapabilityReport>;
8
- export declare function runWindowsSandboxSetup(options?: WindowsSandboxSetupOptions): Promise<SandboxCapabilityReport>;