@composable-os/cli 0.0.0-stage → 0.1.0-beta.8

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 (140) hide show
  1. package/LICENSE +109 -0
  2. package/README.md +24 -2
  3. package/dist/blocks-DEELKGDC.js +233 -0
  4. package/dist/chunk-2ABSVMGB.js +13 -0
  5. package/dist/chunk-2S7375SC.js +802 -0
  6. package/dist/chunk-5KSXSK7Y.js +47 -0
  7. package/dist/chunk-6UWRT4VM.js +220 -0
  8. package/dist/chunk-E5JLTLRM.js +50 -0
  9. package/dist/chunk-G3ORKXVP.js +1178 -0
  10. package/dist/chunk-HDIOVFAZ.js +544 -0
  11. package/dist/chunk-KGHA67HG.js +765 -0
  12. package/dist/chunk-KOKYDJ7Z.js +1423 -0
  13. package/dist/chunk-KTXGEXTY.js +358 -0
  14. package/dist/chunk-LTQDLCP7.js +16486 -0
  15. package/dist/chunk-MAXLUQKB.js +1287 -0
  16. package/dist/chunk-STJZJIRA.js +11378 -0
  17. package/dist/chunk-X6I2LWB3.js +24319 -0
  18. package/dist/chunk-XDDBLYKW.js +29154 -0
  19. package/dist/chunk-ZRWF6QZS.js +2357 -0
  20. package/dist/cli-BRSACHSG.js +31393 -0
  21. package/dist/cli-DTMGNDXN.js +121 -0
  22. package/dist/cli.js +25 -0
  23. package/dist/client-repo-ZVZ6KW5S.js +55 -0
  24. package/dist/create.js +25 -0
  25. package/dist/fields-64BQJA62.js +48 -0
  26. package/dist/invoke-NHHOLLF6.js +26 -0
  27. package/dist/person-WMWRF2HV.js +58 -0
  28. package/dist/platform/migrations/0001_init.sql +59 -0
  29. package/dist/platform/migrations/0002_users_settings.sql +34 -0
  30. package/dist/platform/migrations/0003_people_organisations.sql +225 -0
  31. package/dist/platform/migrations/0004_activities_tasks.sql +88 -0
  32. package/dist/platform/migrations/0005_views_audit.sql +79 -0
  33. package/dist/platform/migrations/0006_search.sql +223 -0
  34. package/dist/platform/migrations/0007_crm_views.sql +141 -0
  35. package/dist/platform/migrations/0008_audit_redaction.sql +116 -0
  36. package/dist/platform/migrations/0010_approval_queue.sql +90 -0
  37. package/dist/platform/migrations/0011_connected_apps.sql +36 -0
  38. package/dist/platform/migrations/0020_extensions.sql +373 -0
  39. package/dist/platform/migrations/0030_extension_proposals.sql +29 -0
  40. package/dist/platform/migrations/0050_live_row_indexes.sql +32 -0
  41. package/dist/platform/migrations/0060_audit_read_counts.sql +31 -0
  42. package/dist/platform/migrations/0061_audit_retention.sql +95 -0
  43. package/dist/platform/migrations/0062_run_history_retention.sql +6 -0
  44. package/dist/platform/migrations/0063_pending_action_compaction.sql +18 -0
  45. package/dist/platform/migrations/0064_drop_rate_limit.sql +6 -0
  46. package/dist/platform/migrations/0065_storage_stats.sql +13 -0
  47. package/dist/platform/migrations/0070_drop_proposals_ext_idx.sql +9 -0
  48. package/dist/platform/migrations/0080_views_dashboards.sql +46 -0
  49. package/dist/platform/migrations/0100_stage_history.sql +54 -0
  50. package/dist/platform/migrations/0110_integrations.sql +103 -0
  51. package/dist/platform/migrations/0111_email_calendar_sync.sql +137 -0
  52. package/dist/platform/migrations/0112_sync_item_occurred_at.sql +8 -0
  53. package/dist/platform/migrations/0130_automations.sql +113 -0
  54. package/dist/platform/migrations/0131_notifications.sql +29 -0
  55. package/dist/platform/migrations/0132_automation_runtime.sql +14 -0
  56. package/dist/platform/migrations/0150_ai_summaries_embeddings.sql +48 -0
  57. package/dist/platform/migrations/0160_releases.sql +41 -0
  58. package/dist/platform/migrations/0161_setup_wizard.sql +30 -0
  59. package/dist/platform/migrations/0170_automation_connections.sql +32 -0
  60. package/dist/platform/migrations/0171_automation_outbox.sql +23 -0
  61. package/dist/platform/migrations/0172_notification_delivery.sql +46 -0
  62. package/dist/platform/migrations/0200_assistant_conversations.sql +25 -0
  63. package/dist/platform/migrations/0205_policy_adjudicator.sql +61 -0
  64. package/dist/platform/migrations/0210_daily_digest.sql +33 -0
  65. package/dist/platform/migrations/0220_entitlements.sql +13 -0
  66. package/dist/platform/migrations/0221_support_grants.sql +33 -0
  67. package/dist/platform/migrations/0250_judge.sql +11 -0
  68. package/dist/platform/migrations/0251_adjudication_judgement.sql +8 -0
  69. package/dist/platform/migrations/0252_judge_usage.sql +14 -0
  70. package/dist/platform/migrations/0255_summary_checks.sql +9 -0
  71. package/dist/platform/migrations/0256_outbound_check.sql +9 -0
  72. package/dist/platform/migrations/0260_ai_usage.sql +20 -0
  73. package/dist/platform/migrations/0270_assistant_conversation_refs.sql +29 -0
  74. package/dist/platform/migrations/0310_assignment_rules.sql +54 -0
  75. package/dist/platform/migrations/0320_duplicates.sql +41 -0
  76. package/dist/platform/migrations/0330_erase_completeness.sql +54 -0
  77. package/dist/platform/migrations/0350_assistant_thread.sql +38 -0
  78. package/dist/platform/migrations/0351_assistant_model_roles.sql +26 -0
  79. package/dist/platform/migrations/0352_assistant_memory.sql +74 -0
  80. package/dist/platform/migrations/0358_ai_cache_observation.sql +24 -0
  81. package/dist/platform/migrations/0359_ai_compaction_decision.sql +25 -0
  82. package/dist/platform/migrations/0360_ai_cache_estimate.sql +35 -0
  83. package/dist/platform/migrations/0361_voice_preferences.sql +27 -0
  84. package/dist/platform/migrations/0362_voice_usage.sql +17 -0
  85. package/dist/platform/migrations/0365_routines.sql +38 -0
  86. package/dist/platform/migrations/0370_approval_execution.sql +20 -0
  87. package/dist/platform/migrations/0371_agent_jobs.sql +65 -0
  88. package/dist/platform/migrations/0380_rec_views.sql +94 -0
  89. package/dist/platform/migrations/0400_customer_audit_actor.sql +142 -0
  90. package/dist/platform/migrations/0401_customer_accounts.sql +61 -0
  91. package/dist/platform/migrations/0402_erase_requests.sql +34 -0
  92. package/dist/platform/migrations/0410_idempotency_keys.sql +45 -0
  93. package/dist/platform/migrations/0411_device_sessions.sql +33 -0
  94. package/dist/platform/migrations/0420_transition_history.sql +100 -0
  95. package/dist/platform/migrations/0421_orders.sql +134 -0
  96. package/dist/platform/migrations/0422_order_payments.sql +109 -0
  97. package/dist/platform/migrations/0440_capacity.sql +100 -0
  98. package/dist/platform/migrations/0441_capacity_views.sql +40 -0
  99. package/dist/platform/migrations/0450_order_grants.sql +21 -0
  100. package/dist/platform/migrations/0451_pack_roles.sql +18 -0
  101. package/dist/platform/migrations/0460_content.sql +59 -0
  102. package/dist/platform/migrations/0461_media.sql +52 -0
  103. package/dist/platform/migrations/0470_publish_versions.sql +36 -0
  104. package/dist/platform/migrations/0471_permission_grants.sql +18 -0
  105. package/dist/platform/migrations/0490_staff_invites.sql +40 -0
  106. package/dist/platform/migrations/0491_sign_in_mail_kind.sql +10 -0
  107. package/dist/platform/migrations/0492_email_confirmation_and_sign_in_confirm.sql +30 -0
  108. package/dist/platform/migrations/0500_published_media_field.sql +25 -0
  109. package/dist/platform/migrations/0501_import_keys.sql +23 -0
  110. package/dist/platform/migrations/0520_publish_requests.sql +20 -0
  111. package/dist/platform/sdk/automation-check.ts +534 -0
  112. package/dist/platform/sdk/automation.ts +743 -0
  113. package/dist/platform/sdk/behaviour.ts +215 -0
  114. package/dist/platform/sdk/capacity.ts +112 -0
  115. package/dist/platform/sdk/contract.ts +766 -0
  116. package/dist/platform/sdk/document.ts +788 -0
  117. package/dist/platform/sdk/field-types.ts +106 -0
  118. package/dist/platform/sdk/formula/ast.ts +72 -0
  119. package/dist/platform/sdk/formula/compile.ts +454 -0
  120. package/dist/platform/sdk/formula/index.ts +4 -0
  121. package/dist/platform/sdk/formula/parser.ts +417 -0
  122. package/dist/platform/sdk/index.ts +33 -0
  123. package/dist/platform/sdk/manifest.ts +1484 -0
  124. package/dist/platform/sdk/media.ts +46 -0
  125. package/dist/platform/sdk/permissions.ts +60 -0
  126. package/dist/platform/sdk/renamed.ts +63 -0
  127. package/dist/platform/sdk/rich-text-fixture.ts +68 -0
  128. package/dist/platform/sdk/rich-text.ts +173 -0
  129. package/dist/platform/sdk/runtime.ts +410 -0
  130. package/dist/platform/sdk/sellable.ts +396 -0
  131. package/dist/platform/sdk/slug.ts +25 -0
  132. package/dist/platform/sdk/states.ts +162 -0
  133. package/dist/platform/sdk/testing.ts +836 -0
  134. package/dist/products-2H5DR232.js +11 -0
  135. package/dist/run-4JNFLYXV.js +847 -0
  136. package/dist/src-G6OF5SKW.js +31 -0
  137. package/dist/src-J27WXNLY.js +270 -0
  138. package/dist/token-MOJUA2U6.js +70 -0
  139. package/dist/token-util-TENRN4V7.js +6 -0
  140. package/package.json +33 -4
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ try {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ } catch (e) {
18
+ throw mod = 0, e;
19
+ }
20
+ };
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, { get: all[name], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
34
+ // If the importer is in node compatibility mode or this is not an ESM
35
+ // file that has been converted to a CommonJS file using a Babel-
36
+ // compatible transform (i.e. "__esModule" has not been set), then set
37
+ // "default" to the CommonJS "module.exports" for node compatibility.
38
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
39
+ mod
40
+ ));
41
+
42
+ export {
43
+ __require,
44
+ __commonJS,
45
+ __export,
46
+ __toESM
47
+ };
@@ -0,0 +1,220 @@
1
+ #!/usr/bin/env node
2
+
3
+ // ../product/src/index.ts
4
+ var NAME = /^[a-z0-9]+(-[a-z0-9]+)*$/;
5
+ var PREFIX = /^[a-z0-9]+(-[a-z0-9]+)*-$/;
6
+ function defineProduct(definition) {
7
+ const fail = (what) => {
8
+ throw new Error(`product ${JSON.stringify(definition.id)}: ${what}`);
9
+ };
10
+ if (!NAME.test(definition.id)) fail("id must be lowercase letters, digits and single hyphens");
11
+ if (!definition.label.trim()) fail("label is empty");
12
+ if (!definition.strings.name.trim()) fail("strings.name is empty");
13
+ const { app, runner, gatekeeperPrefix, database, resourcePrefix } = definition.names;
14
+ for (const [key, value] of Object.entries({ app, runner, database })) {
15
+ if (!NAME.test(value)) fail(`names.${key} must be lowercase letters, digits and hyphens`);
16
+ }
17
+ for (const [key, value] of Object.entries({ gatekeeperPrefix, resourcePrefix })) {
18
+ if (!PREFIX.test(value)) fail(`names.${key} must end with a hyphen`);
19
+ }
20
+ if (app === runner) fail("names.app and names.runner are the same");
21
+ if (!/^[\w.-]+\/[\w.-]+$/.test(definition.updateRepository)) {
22
+ fail("updateRepository must be owner/repo");
23
+ }
24
+ if (!/^https:\/\//.test(definition.billingUrl)) fail("billingUrl must be an https:// URL");
25
+ return definition;
26
+ }
27
+ function isLiveEnvironment(product2, environment) {
28
+ if (environment === void 0 || environment === LIVE_ENVIRONMENT) return true;
29
+ return product2.environments?.[environment]?.live !== false;
30
+ }
31
+ function gatekeeperSettings(product2, environment) {
32
+ const base = product2.gatekeepers ?? {};
33
+ const own = (environment ? product2.environments?.[environment]?.gatekeepers : void 0) ?? {};
34
+ const out = {};
35
+ for (const name of /* @__PURE__ */ new Set([...Object.keys(base), ...Object.keys(own)])) {
36
+ out[name] = {
37
+ ...base[name],
38
+ ...own[name]
39
+ };
40
+ }
41
+ return out;
42
+ }
43
+ var LIVE_ENVIRONMENT = "live";
44
+ function environmentNames(product2) {
45
+ return Object.keys(product2.environments ?? {}).sort();
46
+ }
47
+ function clientNames(product2, environment) {
48
+ if (environment === void 0 || environment === LIVE_ENVIRONMENT) {
49
+ return {
50
+ app: `${product2.id}-app`,
51
+ runner: `${product2.id}-runner`,
52
+ gatekeeperPrefix: `${product2.id}-gatekeeper-`,
53
+ database: product2.id,
54
+ resourcePrefix: `${product2.id}-`,
55
+ ...product2.names,
56
+ ...environment ? product2.environments?.[environment]?.names : {}
57
+ };
58
+ }
59
+ const base = `${product2.id}-${environment}`;
60
+ return {
61
+ app: `${base}-app`,
62
+ runner: `${base}-runner`,
63
+ gatekeeperPrefix: `${base}-gatekeeper-`,
64
+ database: base,
65
+ resourcePrefix: `${base}-`,
66
+ ...product2.environments?.[environment]?.names
67
+ };
68
+ }
69
+ function clientWeb(product2, environment) {
70
+ if (!product2.web) return null;
71
+ const env = environment ? product2.environments?.[environment] : void 0;
72
+ const live = environment === void 0 || environment === LIVE_ENVIRONMENT;
73
+ const worker = env?.web?.worker ?? (live ? product2.web.worker : `${product2.web.worker}-${environment}`);
74
+ const hostname = env?.web?.hostname ?? (live ? product2.web.hostname : void 0);
75
+ return { worker, ...hostname ? { hostname } : {} };
76
+ }
77
+ function clientNameMaps(release, client, manifest) {
78
+ const rename = (name) => {
79
+ const r = release.names;
80
+ if (name === r.app) return client.app;
81
+ if (name === r.runner) return client.runner;
82
+ if (name === r.database) return client.database;
83
+ if (name.startsWith(r.gatekeeperPrefix)) {
84
+ return `${client.gatekeeperPrefix}${name.slice(r.gatekeeperPrefix.length)}`;
85
+ }
86
+ if (name.startsWith(r.resourcePrefix)) {
87
+ return `${client.resourcePrefix}${name.slice(r.resourcePrefix.length)}`;
88
+ }
89
+ return name;
90
+ };
91
+ const map = (names) => Object.fromEntries(
92
+ names.map((name) => [name, rename(name)]).filter(([from, to]) => from !== to)
93
+ );
94
+ return {
95
+ workers: map(manifest.workers.map((w) => w.name)),
96
+ resources: map(manifest.resources.map((r) => r.name))
97
+ };
98
+ }
99
+ var PRODUCT_LABEL_VAR = "COS_PRODUCT_LABEL";
100
+ var deployedLabel = null;
101
+ function productName(product2) {
102
+ return deployedLabel ?? product2.strings.name;
103
+ }
104
+ var VERSION = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;
105
+ function defineClientProduct(definition) {
106
+ const fail = (what) => {
107
+ throw new Error(`product ${JSON.stringify(definition.id)}: ${what}`);
108
+ };
109
+ if (!NAME.test(definition.id)) fail("id must be lowercase letters, digits and single hyphens");
110
+ if (!definition.label.trim()) fail("label is empty");
111
+ if (!VERSION.test(definition.platform.version)) fail("platform.version must be x.y.z");
112
+ if (!NAME.test(definition.platform.release)) fail("platform.release must be a product id");
113
+ if (!/^[\w.-]+\/[\w.-]+$/.test(definition.platform.repository)) {
114
+ fail("platform.repository must be owner/repo");
115
+ }
116
+ for (const pack of definition.packs) if (!NAME.test(pack)) fail(`pack ${pack} is not an id`);
117
+ if (new Set(definition.packs).size !== definition.packs.length) fail("a pack is listed twice");
118
+ if (definition.web && !NAME.test(definition.web.worker)) fail("web.worker must be a Worker name");
119
+ for (const role of definition.mobile?.roles ?? []) {
120
+ const [pack, local] = role.split(".");
121
+ if (!pack || !local || role.split(".").length !== 2) {
122
+ fail(`mobile.roles: ${role} is not <pack>.<role>`);
123
+ }
124
+ if (!definition.packs.includes(pack)) {
125
+ fail(`mobile.roles: ${role} is a role of ${pack}, which packs does not list`);
126
+ }
127
+ }
128
+ const names = clientNames(definition);
129
+ for (const key of ["app", "runner", "database"]) {
130
+ if (!NAME.test(names[key])) fail(`names.${key} must be lowercase letters, digits and hyphens`);
131
+ }
132
+ for (const key of ["gatekeeperPrefix", "resourcePrefix"]) {
133
+ if (!PREFIX.test(names[key])) fail(`names.${key} must end with a hyphen`);
134
+ }
135
+ if (names.app === names.runner) fail("names.app and names.runner are the same");
136
+ if (definition.web && [names.app, names.runner].includes(definition.web.worker)) {
137
+ fail("web.worker is one of the host's Workers");
138
+ }
139
+ if (definition.environments?.[LIVE_ENVIRONMENT]?.live === false) {
140
+ fail("the live environment cannot be marked live: false");
141
+ }
142
+ const deployments = environmentNames(definition);
143
+ for (const env of deployments.length ? deployments : [void 0]) {
144
+ if (gatekeeperSettings(definition, env).payments?.PAYMENTS_FAKE_PROVIDER === true && isLiveEnvironment(definition, env)) {
145
+ fail(
146
+ `${env ? `environment ${env}` : "the product"} is live and turns on the fake payment provider: only an environment marked live: false may`
147
+ );
148
+ }
149
+ }
150
+ if (definition.environments) {
151
+ const envs = environmentNames(definition);
152
+ if (!envs.length) fail("environments is empty: leave it out for one deployment");
153
+ const taken = /* @__PURE__ */ new Map();
154
+ for (const env of envs) {
155
+ if (!NAME.test(env)) fail(`environment ${env} must be lowercase letters, digits and hyphens`);
156
+ const n = clientNames(definition, env);
157
+ for (const key of ["app", "runner", "database"]) {
158
+ if (!NAME.test(n[key])) fail(`environments.${env}.names.${key} is not a name`);
159
+ }
160
+ for (const key of ["gatekeeperPrefix", "resourcePrefix"]) {
161
+ if (!PREFIX.test(n[key])) fail(`environments.${env}.names.${key} must end with a hyphen`);
162
+ }
163
+ const web = clientWeb(definition, env);
164
+ if (web && !NAME.test(web.worker))
165
+ fail(`environments.${env}.web.worker is not a Worker name`);
166
+ for (const name of [
167
+ n.app,
168
+ n.runner,
169
+ n.database,
170
+ n.resourcePrefix,
171
+ n.gatekeeperPrefix,
172
+ web?.worker
173
+ ]) {
174
+ if (!name) continue;
175
+ const other = taken.get(name);
176
+ if (other) fail(`environments ${other} and ${env} both use the name ${name}`);
177
+ taken.set(name, env);
178
+ }
179
+ }
180
+ }
181
+ return definition;
182
+ }
183
+ function releaseFilePrefix(productId) {
184
+ return `composable-os-${productId}`;
185
+ }
186
+
187
+ // ../../products/crm/product.ts
188
+ var product = defineProduct({
189
+ id: "crm",
190
+ label: "CRM",
191
+ names: {
192
+ app: "crm-app",
193
+ runner: "crm-runner",
194
+ gatekeeperPrefix: "crm-gatekeeper-",
195
+ database: "crm",
196
+ resourcePrefix: "crm-"
197
+ },
198
+ packs: ["deals", "leads", "lifecycle"],
199
+ updateRepository: "timoconnellaus/composable-os",
200
+ // Where the hosted CRM is served from is still open (ADR 0400): the value is unchanged.
201
+ billingUrl: "https://app.relationshiposcrm.com/billing",
202
+ strings: {
203
+ name: "CRM"
204
+ }
205
+ });
206
+
207
+ export {
208
+ isLiveEnvironment,
209
+ gatekeeperSettings,
210
+ LIVE_ENVIRONMENT,
211
+ environmentNames,
212
+ clientNames,
213
+ clientWeb,
214
+ clientNameMaps,
215
+ PRODUCT_LABEL_VAR,
216
+ productName,
217
+ defineClientProduct,
218
+ releaseFilePrefix,
219
+ product
220
+ };
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ VerificationError,
4
+ releaseAssetNames
5
+ } from "./chunk-ZRWF6QZS.js";
6
+
7
+ // src/gh.ts
8
+ import { execFile } from "node:child_process";
9
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
10
+ import { tmpdir } from "node:os";
11
+ import { join } from "node:path";
12
+ import { promisify } from "node:util";
13
+ var run = promisify(execFile);
14
+ async function ghAvailable() {
15
+ try {
16
+ await run("gh", ["--version"]);
17
+ return true;
18
+ } catch {
19
+ return false;
20
+ }
21
+ }
22
+ var ghVerifier = async ({ bytes, repository, product, version }) => {
23
+ const dir = await mkdtemp(join(tmpdir(), "demo-verify-"));
24
+ const file = join(dir, releaseAssetNames(product, version).bundle);
25
+ try {
26
+ await writeFile(file, bytes);
27
+ await run("gh", [
28
+ "attestation",
29
+ "verify",
30
+ file,
31
+ "--repo",
32
+ repository,
33
+ "--signer-workflow",
34
+ `${repository}/.github/workflows/release.yml`,
35
+ "--source-ref",
36
+ `refs/tags/v${version}`,
37
+ "--deny-self-hosted-runners"
38
+ ]);
39
+ } catch (error) {
40
+ const detail = error.stderr?.trim() || error.message;
41
+ throw new VerificationError(`gh attestation verify failed: ${detail}`);
42
+ } finally {
43
+ await rm(dir, { recursive: true, force: true });
44
+ }
45
+ };
46
+
47
+ export {
48
+ ghAvailable,
49
+ ghVerifier
50
+ };