@squidcloud/backend 1.0.484 → 1.0.486

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 (26) hide show
  1. package/dist/backend/src/cli-agent/claude-code.adapter.d.ts +5 -0
  2. package/dist/backend/src/cli-agent/cli-agent-adapter.types.d.ts +29 -7
  3. package/dist/backend/src/cli-agent/cli-agent-root-status.d.ts +25 -0
  4. package/dist/backend/src/cli-agent/cli-agent-status.utils.d.ts +9 -0
  5. package/dist/backend/src/cli-agent/cli-output-stream.utils.d.ts +1 -0
  6. package/dist/backend/src/cli-agent/codex.adapter.d.ts +4 -0
  7. package/dist/backend/src/cli-agent/index.d.ts +3 -0
  8. package/dist/backend/src/cli-agent/nsjail-source-process-launcher.d.ts +5 -7
  9. package/dist/backend/src/public-types.d.ts +2 -2
  10. package/dist/backend/src/source-code/index.d.ts +6 -1
  11. package/dist/backend/src/source-code/local-source-development-runner.d.ts +10 -0
  12. package/dist/backend/src/source-code/restricted-source-runner.d.ts +8 -14
  13. package/dist/backend/src/source-code/source-code-analyzer.d.ts +3 -0
  14. package/dist/backend/src/source-code/source-development-runtime.d.ts +2 -0
  15. package/dist/backend/src/source-code/source-evidence-verifier.d.ts +80 -0
  16. package/dist/backend/src/source-code/source-git-command.d.ts +25 -0
  17. package/dist/backend/src/source-code/source-model-proxy.constants.d.ts +6 -0
  18. package/dist/backend/src/source-code/source-submodule-url.d.ts +10 -0
  19. package/dist/backend/src/source-code/source-workspace-manager.d.ts +1 -11
  20. package/dist/backend/src/source-code/windows-local-cli-process-launcher.d.ts +13 -0
  21. package/dist/cjs/index.js +1 -1
  22. package/dist/cjs/internal/source-code.js +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/internal/source-code.js +1 -1
  25. package/package.json +13 -3
  26. package/dist/backend/src/source-code/source-run-filesystem.d.ts +0 -82
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.484",
3
+ "version": "1.0.486",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -15,7 +15,17 @@
15
15
  "types": "./dist/backend/src/internal/source-code.d.ts",
16
16
  "require": "./dist/cjs/internal/source-code.js",
17
17
  "import": "./dist/esm/internal/source-code.js"
18
- }
18
+ },
19
+ "./dist/internal-common/src/public-types-backend/*": {
20
+ "types": "./dist/internal-common/src/public-types-backend/*.d.ts",
21
+ "default": "./dist/internal-common/src/public-types-backend/*"
22
+ },
23
+ "./dist/internal-common/src/public-utils-backend/*": {
24
+ "types": "./dist/internal-common/src/public-utils-backend/*.d.ts",
25
+ "default": "./dist/internal-common/src/public-utils-backend/*"
26
+ },
27
+ "./dist/*": "./dist/*",
28
+ "./package.json": "./package.json"
19
29
  },
20
30
  "scripts": {
21
31
  "prebuild": "del-cli dist",
@@ -47,7 +57,7 @@
47
57
  "typedoc-plugin-markdown": "^4.8.1"
48
58
  },
49
59
  "peerDependencies": {
50
- "@squidcloud/client": "^1.0.484"
60
+ "@squidcloud/client": "^1.0.486"
51
61
  },
52
62
  "engines": {
53
63
  "node": ">=20.0.0"
@@ -1,82 +0,0 @@
1
- import { type Stats } from 'node:fs';
2
- /** Fences one rootless filesystem keeper against PID reuse. */
3
- export interface SourceFilesystemNamespaceIdentity {
4
- /** Identifies the keeper process in the outer tenant PID namespace. */
5
- pid: number;
6
- /** Stores Linux's immutable process start-time tick for this PID. */
7
- processStartTimeTicks: string;
8
- /** Stores the mount-namespace inode link captured at creation. */
9
- mountNamespace: string;
10
- /** Stores the user-namespace inode link captured at creation. */
11
- userNamespace: string;
12
- /** Points to the private host directory bind-mounted at `/run/quota`. */
13
- hostRuntimeDirectory?: string;
14
- }
15
- /** Represents one mounted, quota-backed source-analysis filesystem. */
16
- export interface SourceRunFilesystemMount {
17
- /** Points through procfs to the keeper-private writable ext4 filesystem. */
18
- mountPath: string;
19
- /** Identifies the rootless namespaces required for a nested analyzer launch. */
20
- namespace?: SourceFilesystemNamespaceIdentity;
21
- /** Stops the keeper namespace and deletes its backing image. */
22
- dispose(): Promise<void>;
23
- }
24
- /** Configures the hard block and inode ceilings for one run filesystem. */
25
- export interface SourceRunFilesystemOptions {
26
- /** Bounds the ext4 backing image and writable blocks. */
27
- maxWorkspaceBytes: number;
28
- /** Bounds the formatted ext4 inode count. */
29
- maxRunInodes: number;
30
- /** Points to the immutable filesystem-keeper rootfs. */
31
- keeperRootfs?: string;
32
- /** Overrides nsjail for deployment or focused integration tests. */
33
- nsjailBinary?: string;
34
- /** Overrides the outer tenant UID mapped to the source-agent UID. */
35
- tenantUid?: number;
36
- /** Overrides the outer tenant GID mapped to the source-agent GID. */
37
- tenantGid?: number;
38
- }
39
- /** Overrides one quota mount and supplies its cancellation signal. */
40
- export interface SourceRunFilesystemCreateOptions {
41
- /** Bounds this mount's ext4 backing image and writable blocks. */
42
- maxWorkspaceBytes?: number;
43
- /** Bounds this mount's formatted ext4 inode count. */
44
- maxRunInodes?: number;
45
- /** Aborts mount preparation before the caller loses ownership. */
46
- signal?: AbortSignal;
47
- }
48
- /** Supplies pure inputs for the filesystem-keeper nsjail boundary. */
49
- export interface SourceFilesystemKeeperArgumentInput {
50
- /** Points to the immutable keeper rootfs. */
51
- keeperRootfs: string;
52
- /** Points to the private host directory containing the ext4 image. */
53
- runtimeDirectory: string;
54
- /** Maps the source-agent GID to this outer tenant GID. */
55
- tenantGid: number;
56
- /** Maps the source-agent UID to this outer tenant UID. */
57
- tenantUid: number;
58
- /** Bounds a single image file as defense in depth. */
59
- maxWorkspaceBytes: number;
60
- }
61
- /** Creates disposable ext4 filesystems inside a rootless keeper user namespace. */
62
- export declare class SourceRunFilesystem {
63
- private readonly options;
64
- /** Creates a filesystem factory with validated block, inode, and namespace settings. */
65
- constructor(options?: SourceRunFilesystemOptions);
66
- /** Copies a prepared analyzer tree into a fresh quota-backed mount. */
67
- create(sourceDirectory: string, signal?: AbortSignal): Promise<SourceRunFilesystemMount>;
68
- /** Creates an empty hard-quota mount for direct trusted repository preparation. */
69
- createEmpty(createOptions?: SourceRunFilesystemCreateOptions): Promise<SourceRunFilesystemMount>;
70
- }
71
- /** Builds the fixed rootless namespace that owns one FUSE mount. */
72
- export declare function buildSourceFilesystemKeeperArguments(input: SourceFilesystemKeeperArgumentInput): string[];
73
- /** Derives the only host path allowed to reach a keeper-private source mount. */
74
- export declare function sourceFilesystemHostMountPath(pid: number): string;
75
- /** Lowers mkfs's requested inode count after it rounds above a hard ceiling. */
76
- export declare function nextExt4RequestedInodeCount(maxRunInodes: number, requestedInodes: number, actualInodes: number): number;
77
- /** Checks mountinfo for the exact private mountpoint, FUSE filesystem type, and backing image source. */
78
- export declare function hasExpectedSourceMount(mountInfo: string, mountPath: string, imagePath: string): boolean;
79
- /** Reads and fences the namespace identity for one live keeper process. */
80
- export declare function readSourceFilesystemNamespaceIdentity(pid: number): Promise<SourceFilesystemNamespaceIdentity>;
81
- /** Returns whether a security-boundary executable is a root-owned regular file unavailable for tenant writes. */
82
- export declare function isTrustedBoundaryExecutable(statistics: Pick<Stats, 'gid' | 'isFile' | 'mode' | 'uid'>): boolean;