@ship.zone/runner 0.1.1 → 0.2.1

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.
package/changelog.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-31 - 0.2.1
4
+
5
+ ### Fixes
6
+
7
+ - publish Node-compatible declaration types for OCI dependency injection (oci-executor)
8
+ - Replace Deno-specific dependency injection types with runtime-neutral interfaces for temporary directories, removal options, directory entries, and file metadata.
9
+
10
+ ## 2026-07-31 - 0.2.0
11
+
12
+ ### Features
13
+
14
+ - support foss-ci-runner/2.0-draft.2 archive validation (protocol)
15
+ - Upgrade @foss.global/ci-spec to 0.2.0 and update runner job validation for the 2.0-draft.2 protocol.
16
+ - Enforce archive path metadata ceilings, materialized workspace entry limits, and staging reserve checks during source and cache extraction.
17
+ - Track implicit parent directories and actual materialized entries so workspace entry limits are applied correctly during cache restore.
18
+ - Add ci-spec archive conformance coverage and cleanup regression tests for canceled compression.
19
+
3
20
  ## 2026-07-31 - 0.1.1
4
21
 
5
22
  ### Fixes
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ship.zone/runner",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "exports": "./mod.ts",
5
5
  "nodeModulesDir": "none",
6
6
  "tasks": {
@@ -32,8 +32,9 @@
32
32
  "strict": true
33
33
  },
34
34
  "imports": {
35
- "@foss.global/ci-spec": "npm:@foss.global/ci-spec@0.1.0",
36
- "@foss.global/ci-spec/runner-job.schema.json": "npm:@foss.global/ci-spec@0.1.0/runner-job.schema.json",
35
+ "@foss.global/ci-spec": "npm:@foss.global/ci-spec@0.2.0",
36
+ "@foss.global/ci-spec/archive-cases.json": "npm:@foss.global/ci-spec@0.2.0/archive-cases.json",
37
+ "@foss.global/ci-spec/runner-job.schema.json": "npm:@foss.global/ci-spec@0.2.0/runner-job.schema.json",
37
38
  "@std/assert": "jsr:@std/assert@^1.0.14",
38
39
  "@std/path": "jsr:@std/path@^1.1.2",
39
40
  "ajv/dist/2020.js": "npm:ajv@8.20.0/dist/2020.js"
package/deno.lock CHANGED
@@ -5,7 +5,7 @@
5
5
  "jsr:@std/internal@^1.0.12": "1.0.14",
6
6
  "jsr:@std/internal@^1.0.14": "1.0.14",
7
7
  "jsr:@std/path@^1.1.2": "1.1.6",
8
- "npm:@foss.global/ci-spec@0.1.0": "0.1.0",
8
+ "npm:@foss.global/ci-spec@0.2.0": "0.2.0",
9
9
  "npm:@git.zone/tsrust@^1.7.0": "1.7.0",
10
10
  "npm:ajv@8.20.0": "8.20.0",
11
11
  "npm:ajv@^8.20.0": "8.20.0"
@@ -110,9 +110,9 @@
110
110
  ],
111
111
  "tarball": "https://verdaccio.lossless.digital/@design.estate/dees-element/-/dees-element-2.4.0.tgz"
112
112
  },
113
- "@foss.global/ci-spec@0.1.0": {
114
- "integrity": "sha512-QhuEe4JqnkQyk59PcuNQM/DompS3TMd2gtkRSxn9I+E/08lBFzUA/yZK9YLjSMa9M9eHdIVToWzC8puz8TUsyA==",
115
- "tarball": "https://verdaccio.lossless.digital/@foss.global/ci-spec/-/ci-spec-0.1.0.tgz"
113
+ "@foss.global/ci-spec@0.2.0": {
114
+ "integrity": "sha512-o/r5jx1FUIZaVzOV3cAPC5zMFC6JqbKxcWotK6LjSyy1sZNXCFOb4DPoi/cfIFeOibasaHkWAsDDcSYN/zJi3A==",
115
+ "tarball": "https://verdaccio.lossless.digital/@foss.global/ci-spec/-/ci-spec-0.2.0.tgz"
116
116
  },
117
117
  "@git.zone/tsrust@1.7.0": {
118
118
  "integrity": "sha512-xgSL8c7f2deH6qjqHKH+z0pUq3j8cM7/WbzcraEiPnbz4QZ4pULnfUWKZqI0QahKyOcpG06S8YLTw0q2/KJ5YQ==",
@@ -1829,12 +1829,12 @@
1829
1829
  "dependencies": [
1830
1830
  "jsr:@std/assert@^1.0.14",
1831
1831
  "jsr:@std/path@^1.1.2",
1832
- "npm:@foss.global/ci-spec@0.1.0",
1832
+ "npm:@foss.global/ci-spec@0.2.0",
1833
1833
  "npm:ajv@8.20.0"
1834
1834
  ],
1835
1835
  "packageJson": {
1836
1836
  "dependencies": [
1837
- "npm:@foss.global/ci-spec@0.1.0",
1837
+ "npm:@foss.global/ci-spec@0.2.0",
1838
1838
  "npm:@git.zone/tsrust@^1.7.0",
1839
1839
  "npm:ajv@^8.20.0"
1840
1840
  ]
package/dist_npm/mod.d.ts CHANGED
@@ -84,7 +84,7 @@ export declare class LeaseLostError extends CoordinatorError { constructor(messa
84
84
  export declare class ProtocolError extends CoordinatorError { constructor(message: string, options?: ErrorOptions);
85
85
  }
86
86
  export declare const runnerVersion: string;
87
- export declare const runnerProtocolIdentifier: 'foss-ci-runner/2.0-draft.1';
87
+ export declare const runnerProtocolIdentifier: 'foss-ci-runner/2.0-draft.2';
88
88
  export type TRunnerProtocolIdentifier = typeof runnerProtocolIdentifier;
89
89
  export type TExecutionProfile = 'oci.v1';
90
90
  export type TRunnerFeature = 'source.tar-gz' | 'artifacts.v1' | 'caches.v1';
@@ -305,7 +305,7 @@ export interface ICacheDeclaration { name: string;
305
305
  maximumEntries: number;
306
306
  retentionDays?: number;
307
307
  }
308
- export interface ICompiledRunnerJob { specVersion: '2.0-draft.1';
308
+ export interface ICompiledRunnerJob { specVersion: '2.0-draft.2';
309
309
  sourceObjectId: string;
310
310
  workflowDigest: string;
311
311
  compiledPlanDigest: string;
@@ -452,6 +452,7 @@ export interface IJobExecutor { verifyRuntime(): Promise<IOciRuntimeFacts>;
452
452
  }
453
453
  export interface IPreparedWorkspace { path: string;
454
454
  metadata: IWorkspaceTreeMetadata;
455
+ materializedEntryCount: number;
455
456
  cleanup(): Promise<void>;
456
457
  }
457
458
  export interface ISourcePrepareContext { identity: IJobIdentity;
@@ -470,6 +471,7 @@ export interface IArtifactUploadContext { workspace: IRuntimeWorkspaceExporter;
470
471
  export interface IArtifactManager { upload(context: IArtifactUploadContext): Promise<void>;
471
472
  }
472
473
  export interface ICacheRestoreContext { workspacePath: string;
474
+ workspaceEntryCount: number;
473
475
  job: Pick<ICompiledRunnerJob, 'caches' | 'permissions' | 'requirements' | 'source'>;
474
476
  identity: IJobIdentity;
475
477
  signal: AbortSignal;
@@ -520,21 +522,39 @@ export interface IOciRuntimeCommandResult { success: boolean;
520
522
  stderr: Uint8Array;
521
523
  }
522
524
  export type TOciRuntimeCommandRunner = (request: IOciRuntimeCommandRequest) => Promise<IOciRuntimeCommandResult>;
525
+ export interface IRuntimeMakeTempOptions { dir?: string;
526
+ prefix?: string;
527
+ suffix?: string;
528
+ }
529
+ export interface IRuntimeRemoveOptions { recursive?: boolean;
530
+ }
531
+ export interface IRuntimeDirectoryEntry { name: string;
532
+ isFile: boolean;
533
+ isDirectory: boolean;
534
+ isSymlink: boolean;
535
+ }
536
+ export interface IRuntimeFileInfo { isDirectory: boolean;
537
+ isSymlink: boolean;
538
+ uid: number | null;
539
+ mtime: Date | null;
540
+ dev: number | null;
541
+ ino: number | null;
542
+ }
523
543
  export interface IOciExecutorDependencies { commandRunner?: TOciRuntimeCommandRunner;
524
544
  runtimeEnvironment?: Record<string, string>;
525
545
  resolveHelperPath?: (target: TOciHelperTarget) => Promise<string>;
526
546
  probeTmpfs?: (helperPath: string) => Promise<number>;
527
547
  randomId?: () => string;
528
548
  now?: () => number;
529
- makeTempDir?: (options: Deno.MakeTempOptions) => Promise<string>;
549
+ makeTempDir?: (options: IRuntimeMakeTempOptions) => Promise<string>;
530
550
  chmod?: (path: string, mode: number) => Promise<void>;
531
- remove?: (path: string, options?: Deno.RemoveOptions) => Promise<void>;
551
+ remove?: (path: string, options?: IRuntimeRemoveOptions) => Promise<void>;
532
552
  }
533
553
  export interface IHostTmpfsProbeScavengerDependencies { getUid?: () => number | undefined;
534
554
  now?: () => number;
535
- readDir?: (path: string) => AsyncIterable<Deno.DirEntry>;
536
- lstat?: (path: string) => Promise<Deno.FileInfo>;
537
- remove?: (path: string, options?: Deno.RemoveOptions) => Promise<void>;
555
+ readDir?: (path: string) => AsyncIterable<IRuntimeDirectoryEntry>;
556
+ lstat?: (path: string) => Promise<IRuntimeFileInfo>;
557
+ remove?: (path: string, options?: IRuntimeRemoveOptions) => Promise<void>;
538
558
  }
539
559
  export interface IWorkspaceVolumeLimits { blockSize: number;
540
560
  logicalBytes: number;