@adea-ai/app-framework 0.26.0 → 0.27.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.
package/README.md CHANGED
@@ -809,6 +809,9 @@ downloading does not install an update or enforce a version policy.
809
809
  `installer-identity` inspects a platform installer on a matching disposable
810
810
  GitHub-hosted runner and verifies that its embedded archive matches the staged
811
811
  archive. It does not execute the installer or issue an installation receipt.
812
+ With `local: true` (a local release) the same read-only inspection runs on the
813
+ maintainer's own machine, which must still match the installer's OS and
814
+ architecture; installer execution and qualification stay hosted-runner only.
812
815
 
813
816
  Run `bun scripts/test-packed.ts --archive PATH` to validate a particular packed
814
817
  framework archive in an isolated consumer. The check copies and hashes the
@@ -859,8 +862,9 @@ retained-build choice to `GITHUB_OUTPUT`; `stage-build [--artifacts <dir>]
859
862
  <platform> <dir>` stages the stable Electrobun installer and archive under their
860
863
  asset names; `inspect`, `qualify` and `qualify-upgrade <platform> <dir>` check
861
864
  the staged payload, run installer qualification and run the upgrade test with
862
- the workflow's `ADEA_APP_RENDERER`. Apps point their `release:*` scripts at it;
863
- one with extra payload checks calls `inspectStagedStep` and adds them.
865
+ the workflow's `ADEA_APP_RENDERER`. `inspect --local` is the local-release form
866
+ (context `local: true`). Apps point their `release:*` scripts at it; one with
867
+ extra payload checks calls `inspectStagedStep` and adds them.
864
868
 
865
869
  Command artifacts are portable command-line payloads an app publishes beside its
866
870
  desktop payloads, through the same staging, qualification, signing and immutable
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,9 @@ await runCli((error) => `Release step failed: ${error instanceof Error ? error.m
7
7
  const flag = args.indexOf("--artifacts");
8
8
  const artifacts = flag === -1 ? void 0 : args.splice(flag, 2)[1];
9
9
  if (flag !== -1 && !artifacts) throw new Error("Expected a directory after --artifacts");
10
+ const localFlag = args.indexOf("--local");
11
+ const local = localFlag !== -1;
12
+ if (local) args.splice(localFlag, 1);
10
13
  const [step, platform, directory, ...extra] = args;
11
14
  const tag = process.env.RELEASE_TAG;
12
15
  if (!tag || extra.length) throw new Error("Expected <step> <platform> [directory] and RELEASE_TAG");
@@ -16,8 +19,10 @@ await runCli((error) => `Release step failed: ${error instanceof Error ? error.m
16
19
  env: process.env,
17
20
  config,
18
21
  tag,
19
- platform: releasePlatform(platform)
22
+ platform: releasePlatform(platform),
23
+ ...local ? { local } : {}
20
24
  };
25
+ if (local && step !== "inspect") throw new Error("--local applies only to the inspect step");
21
26
  if (step === "select-retained") {
22
27
  if (directory) throw new Error("select-retained takes only the platform");
23
28
  return selectRetainedStep(context);
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":"0.26.0","commit":"0619c543d21813fb8ce967fc6e9d11233c986f3f"}
1
+ {"version":"0.27.0","commit":"379422bb8d442fb7182a26a70d9d4f40410e7f6e"}
@@ -23,7 +23,9 @@ export type ImageAttachIo = {
23
23
  */
24
24
  export declare function attachImage(mount: string, image: string, env: Record<string, string>, io?: ImageAttachIo): Promise<void>;
25
25
  /**
26
- * Inspect a shipped installer without executing it, on a matching disposable runner.
26
+ * Inspect a shipped installer without executing it, on a matching disposable runner, or with
27
+ * `local` on the maintainer's own matching machine for a local release (read-only inspection of
28
+ * an installer that machine just built; installer execution stays hosted-runner only).
27
29
  * macOS attach gets up to three attempts at fresh private mountpoints. Failed-attempt
28
30
  * directories remain available for recovery because Disk Arbitration may mount them later.
29
31
  */
@@ -33,6 +35,7 @@ export declare function verifyInstallerPayload(options: {
33
35
  installer: string;
34
36
  archive: string;
35
37
  env?: Record<string, string | undefined>;
38
+ local?: boolean;
36
39
  }): Promise<{
37
40
  installer: Artifact;
38
41
  archive: Artifact;
@@ -1,4 +1,4 @@
1
- import { assertInstallerContext, assertInstallerLayout, assertPortableAppName } from "./installer-layout.js";
1
+ import { assertInstallerContext, assertInstallerHost, assertInstallerLayout, assertPortableAppName } from "./installer-layout.js";
2
2
  import { assertNativeExecutable } from "./native-executable.js";
3
3
  import { InstallerImageLifecycleError, cleanupInstallerDirectoryAfterFailure, defaultInstallerImageMountIo, installerImageMountState, withInstallerImageRetries } from "./installer-image-mount.js";
4
4
  import { runInstallerCommand } from "./installer-command.js";
@@ -166,13 +166,16 @@ function within(root, path) {
166
166
  return rel !== "" && rel !== ".." && !rel.startsWith(".." + sep) && !isAbsolute(rel);
167
167
  }
168
168
  /**
169
- * Inspect a shipped installer without executing it, on a matching disposable runner.
169
+ * Inspect a shipped installer without executing it, on a matching disposable runner, or with
170
+ * `local` on the maintainer's own matching machine for a local release (read-only inspection of
171
+ * an installer that machine just built; installer execution stays hosted-runner only).
170
172
  * macOS attach gets up to three attempts at fresh private mountpoints. Failed-attempt
171
173
  * directories remain available for recovery because Disk Arbitration may mount them later.
172
174
  */
173
175
  async function verifyInstallerPayload(options) {
174
176
  const parent = options.env ?? process.env;
175
- assertInstallerContext(parent, options.platform, process.platform, process.arch);
177
+ if (options.local === true) assertInstallerHost(options.platform, process.platform, process.arch);
178
+ else assertInstallerContext(parent, options.platform, process.platform, process.arch);
176
179
  assertPortableAppName(options.appName);
177
180
  const installerPath = resolve(options.installer), archivePath = resolve(options.archive);
178
181
  const before = {
@@ -4,6 +4,8 @@ export type InstallerPlatform = 'macos-arm64' | 'windows-x64' | 'linux-x64';
4
4
  export type InstallerRenderer = 'native' | 'cef';
5
5
  /** Native installer execution is only allowed on disposable, matching hosted runners. */
6
6
  export declare function assertInstallerContext(env: Record<string, string | undefined>, platform: InstallerPlatform, host: string, arch: string): void;
7
+ /** The installer's platform must match the native OS and architecture handling it. */
8
+ export declare function assertInstallerHost(platform: InstallerPlatform, host: string, arch: string): void;
7
9
  /** A bundle and installer name usable on macOS, Windows and Linux. */
8
10
  export declare function assertPortableAppName(name: string): void;
9
11
  /** Check names before extraction. Callers must also reject unsafe links and archive entry types. */
@@ -5,6 +5,10 @@ import { assertHostedRunner } from "./hosted-runner.js";
5
5
  /** Native installer execution is only allowed on disposable, matching hosted runners. */
6
6
  function assertInstallerContext(env, platform, host, arch) {
7
7
  assertHostedRunner(env, "Installer execution");
8
+ assertInstallerHost(platform, host, arch);
9
+ }
10
+ /** The installer's platform must match the native OS and architecture handling it. */
11
+ function assertInstallerHost(platform, host, arch) {
8
12
  const expected = {
9
13
  "macos-arm64": "darwin/arm64",
10
14
  "windows-x64": "win32/x64",
@@ -86,4 +90,4 @@ function assertBuildMetadata(value, renderer) {
86
90
  ]) if (flags[flag] !== false) throw new Error(`Unsafe CEF flag: ${flag}`);
87
91
  }
88
92
  }
89
- export { assertBuildMetadata, assertInstallerContext, assertInstallerLayout, assertPayloadLayout, assertPortableAppName };
93
+ export { assertBuildMetadata, assertInstallerContext, assertInstallerHost, assertInstallerLayout, assertPayloadLayout, assertPortableAppName };
@@ -7,6 +7,11 @@ export type ReleaseStepContext = {
7
7
  } & Record<string, unknown>;
8
8
  tag: string;
9
9
  platform: InstallerPlatform;
10
+ /**
11
+ * A local release on the maintainer's own matching machine: the staged installer is inspected
12
+ * read-only there instead of on a disposable hosted runner. Qualification never runs locally.
13
+ */
14
+ local?: boolean;
10
15
  };
11
16
  export declare function releasePlatform(value: string | undefined): InstallerPlatform;
12
17
  /** Reuse this tag's payload from an earlier trusted attempt; writes `reuse`, `artifactId` and `runId` to `GITHUB_OUTPUT`. */
@@ -115,7 +115,8 @@ async function inspectStagedStep(context, directory) {
115
115
  appName: context.config.appName,
116
116
  installer,
117
117
  archive,
118
- env: context.env
118
+ env: context.env,
119
+ local: context.local === true
119
120
  })
120
121
  };
121
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/app-framework",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",