@squidcloud/backend 1.0.487 → 1.0.489

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.
@@ -65,6 +65,17 @@ export declare class CodexCliAdapter implements AgentCliSessionAdapter {
65
65
  completeRun(outcome: CliRunOutcome): void;
66
66
  /** Deletes temporary MCP and working-directory state. */
67
67
  afterRun(ctx: SessionCtx): Promise<void>;
68
+ /**
69
+ * Whether this run's sandbox home is a host directory this adapter may write into, which is what
70
+ * separates a session from a restricted source run: the latter's home materialises inside the jail,
71
+ * so it delegates every file it needs — the auth file included — to the rootfs entrypoint.
72
+ */
73
+ private get ownsSandboxHome();
74
+ /**
75
+ * Whether this run gets the session temporary directory of {@link TMPDIR_REL}. A restricted run is
76
+ * excluded on both counts named there: it brings its own, and only a host-owned home can hold one.
77
+ */
78
+ private get ownsSessionTmpDir();
68
79
  /** Writes the captured thread id into the sidecar so it round-trips with the session blob. */
69
80
  private persistThreadId;
70
81
  private readPersistedThreadId;
@@ -1,7 +1,6 @@
1
1
  export * from './local-source-development-runner';
2
2
  export * from './providers';
3
3
  export * from './restricted-source-runner';
4
- export * from './source-analysis-admission-controller';
5
4
  export * from './source-code-analyzer';
6
5
  export * from './source-code-errors';
7
6
  export * from './source-code-limits';
@@ -1,7 +1,6 @@
1
1
  import { type AiAgentSourceCodeIntegrationOptions, type AnalyzeCodeRequest, type AnalyzeCodeResult } from '@squidcloud/client';
2
2
  import type { CliAgentStatusUpdate } from '../cli-agent/cli-agent-adapter.types';
3
3
  import { RestrictedSourceRunRequest, RestrictedSourceRunResult } from './restricted-source-runner';
4
- import { type SourceAnalysisAdmissionControllerLike } from './source-analysis-admission-controller';
5
4
  import { SourceCodeLimits } from './source-code-limits';
6
5
  import { SourceCodeTelemetry } from './source-code-telemetry';
7
6
  import { SourceEvidenceVerifier } from './source-evidence-verifier';
@@ -33,8 +32,6 @@ export interface RestrictedSourceRunnerLike {
33
32
  }
34
33
  /** Configures testable source-analysis orchestration boundaries. */
35
34
  export interface SourceCodeAnalyzerOptions {
36
- /** Overrides process-wide source-analysis admission. */
37
- admissionController?: SourceAnalysisAdmissionControllerLike;
38
35
  /** Overrides trusted workspace preparation. */
39
36
  workspaceManager?: SourceWorkspaceManager;
40
37
  /** Overrides the isolated CLI runner. */
@@ -48,7 +45,6 @@ export interface SourceCodeAnalyzerOptions {
48
45
  }
49
46
  /** Coordinates trusted preparation, the isolated CLI, provenance validation, and telemetry. */
50
47
  export declare class SourceCodeAnalyzer {
51
- private readonly admissionController;
52
48
  private readonly evidenceVerifier;
53
49
  private readonly limits;
54
50
  private readonly restrictedRunner;
@@ -59,5 +55,4 @@ export declare class SourceCodeAnalyzer {
59
55
  /** Runs one source-code analysis and returns only provenance-validated evidence. */
60
56
  analyze(input: SourceCodeAnalyzeInput): Promise<AnalyzeCodeResult>;
61
57
  private recordTelemetry;
62
- private withAdmission;
63
58
  }
@@ -1,11 +1,7 @@
1
- /** Configures source-code preparation, analysis, storage, and lease ceilings. */
1
+ /** Configures source-code preparation, analysis, and storage ceilings. */
2
2
  export interface SourceCodeLimits {
3
- /** Bounds waiting for process-wide source-analysis capacity. */
4
- admissionWaitMs: number;
5
3
  /** Bounds repositories exposed to one analyzer run. */
6
4
  maxRepositories: number;
7
- /** Bounds simultaneous source analyses in one tenant process. */
8
- maxConcurrentAnalyses: number;
9
5
  /** Bounds persistent or disposable workspace bytes. */
10
6
  maxWorkspaceBytes: number;
11
7
  /** Bounds inodes in the quota-backed analyzer filesystem. */
@@ -85,6 +85,17 @@ export interface PrepareSourceWorkspaceInput {
85
85
  repositoryHints?: string;
86
86
  /** Requests one captured branch, tag, or advertised commit. */
87
87
  requestedRef?: string;
88
+ /** Reports coarse preparation stages without exposing credentials or local paths. */
89
+ reportProgress?: (progress: SourceWorkspacePreparationProgress) => void;
90
+ }
91
+ /** Names one user-visible stage in trusted repository preparation. */
92
+ export type SourceWorkspacePreparationStage = 'checking-access' | 'syncing-repositories' | 'saving-cache' | 'creating-checkout';
93
+ /** Describes one coarse repository-preparation transition. */
94
+ export interface SourceWorkspacePreparationProgress {
95
+ /** Lists canonical selected repository names when they are available. */
96
+ repositories?: readonly string[];
97
+ /** Identifies the current preparation stage. */
98
+ stage: SourceWorkspacePreparationStage;
88
99
  }
89
100
  /** Contains a callback value and a nonfatal shared-persistence warning. */
90
101
  export interface PreparedSourceWorkspaceResult<T> {
@@ -129,7 +140,7 @@ export declare class SourceWorkspaceManager {
129
140
  private readonly remoteUrlResolver;
130
141
  private readonly runtimeRootDirectory;
131
142
  private readonly tlsProvider;
132
- private readonly workspaceClient;
143
+ private readonly workspaceClient?;
133
144
  /** Creates a production manager unless explicit test boundaries are supplied. */
134
145
  constructor(options?: SourceWorkspaceManagerOptions);
135
146
  /** Runs a callback over disposable repositories and persists only trusted cache state. */
@@ -146,5 +157,6 @@ export declare class SourceWorkspaceManager {
146
157
  private materializeRepository;
147
158
  private withTrustedGitEnvironment;
148
159
  private runGit;
160
+ private createWorkspaceClientRun;
149
161
  private discardLocalSafely;
150
162
  }
@@ -62,7 +62,7 @@ export declare class WorkspaceClient {
62
62
  * prompt). Reusing one keypair across all workspaces/apps is safe: a keypair authorizes nothing on its own
63
63
  * — every connection is gated by a fresh, per-workspace certificate.
64
64
  */
65
- private podKeypairReady?;
65
+ private readonly podKeypairCache;
66
66
  private readonly rpcTransport;
67
67
  private readonly localCacheRoot;
68
68
  /** Creates a workspace client using Squid's RPC transport by default. */