@astrale-os/sdk 0.6.0-beta.20 → 0.6.0-beta.21

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,9 +65,8 @@ export declare const VERIFY_TIMEOUT_MS = 60000;
65
65
  * what CT29 says of it: Admin may have created the Publication (a rerun settles it), Admin made
66
66
  * none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then, where
67
67
  * the host has no registry principal to keep it (the platform namespace), `adapter.retain`
68
- * keeps the published deployment (CT36); Admin keeps those of its Services (A7), and a
69
- * Publication this run created whose mark failed warns, without changing the exit code or
70
- * the report.
68
+ * keeps the published deployment (CT36). Admin keeps no mark on its Services' deployments:
69
+ * Services keeps every deployment until it is retired.
71
70
  *
72
71
  * Steps 0 to 3 make no deploy call. Never installs.
73
72
  */
@@ -46,9 +46,8 @@ const DEFAULT_DEPENDENCIES = Object.freeze({
46
46
  * what CT29 says of it: Admin may have created the Publication (a rerun settles it), Admin made
47
47
  * none and a rerun can help, or Admin refused and a rerun meets the same refusal. Then, where
48
48
  * the host has no registry principal to keep it (the platform namespace), `adapter.retain`
49
- * keeps the published deployment (CT36); Admin keeps those of its Services (A7), and a
50
- * Publication this run created whose mark failed warns, without changing the exit code or
51
- * the report.
49
+ * keeps the published deployment (CT36). Admin keeps no mark on its Services' deployments:
50
+ * Services keeps every deployment until it is retired.
52
51
  *
53
52
  * Steps 0 to 3 make no deploy call. Never installs.
54
53
  */
@@ -126,7 +125,7 @@ export async function runPublish(input, dependencies = DEFAULT_DEPENDENCIES) {
126
125
  if (existing.yanked) {
127
126
  warn(`${name} is yanked; astrale-domain yank ${declared} --undo makes it resolvable again.`);
128
127
  }
129
- // A rerun after the Publication but before its retention completes the retention.
128
+ // A rerun after the Publication but before the adapter's `retain` completes that retention.
130
129
  const kept = await retain(plan, signal);
131
130
  if (kept.state === 'failed')
132
131
  return refuse(...notRetained(name, plan, kept.message));
@@ -195,9 +194,6 @@ export async function runPublish(input, dependencies = DEFAULT_DEPENDENCIES) {
195
194
  return refuse(...notPublished(name, origin, release.url, cause));
196
195
  }
197
196
  progress(`Published: ${name} · ${published.status}`);
198
- if (published.status === 'created' && published.retention === 'failed') {
199
- warn(...notMarked(name, release.url, published.replay));
200
- }
201
197
  const kept = await retain(plan, signal);
202
198
  if (kept.state === 'failed')
203
199
  return refuse(...notRetained(name, plan, kept.message));
@@ -326,20 +322,6 @@ function notRetained(name, plan, cause) {
326
322
  'Rerun publish: it publishes nothing again and keeps the deployment.',
327
323
  ];
328
324
  }
329
- /**
330
- * Admin created the Publication, then could not mark its Services' deployment retained (A7): the
331
- * version stands, so the run succeeds, but the deployment can still expire as a preview. Admin
332
- * marks on every call that names the version, an `unchanged` one too, so sending the same request
333
- * again marks it; a publish rerun finds the version in the index and never asks Admin.
334
- */
335
- function notMarked(name, url, replay) {
336
- return [
337
- `${name} is published, but its deployment at ${url} was not marked as retained: until it is, it can expire like a preview.`,
338
- 'To mark it, send the same request again: Admin answers unchanged and marks the deployment ' +
339
- 'again (a publish rerun does not send it):',
340
- replay,
341
- ];
342
- }
343
325
  /**
344
326
  * The version names a deployment its host can no longer keep (absent or retired): publishing has
345
327
  * nothing left to do, a rerun cannot keep it, and installing the version fails, never silently.
@@ -39,12 +39,6 @@ export interface RegistryPublishRequest {
39
39
  /** The working tree held changes the commit does not, or no commit could be read. */
40
40
  readonly dirty: boolean;
41
41
  }
42
- /**
43
- * Admin's retention mark of the deployment a Publication names, on this call (CT29
44
- * `PublishRetentionV1`): `marked`, `failed`, or `not-applicable` when Admin's Services do not
45
- * host it. Admin marks on every call that names the version, an `unchanged` one too.
46
- */
47
- export type RegistryPublishRetention = 'marked' | 'failed' | 'not-applicable';
48
42
  /**
49
43
  * What `astrale __domain-registry publish --json` answered (CT29 `PublishResultV1`): `created` by
50
44
  * this call, or `unchanged` when the version already named this release.
@@ -54,13 +48,6 @@ export interface RegistryPublishResult {
54
48
  readonly publication: RegistryPublication & {
55
49
  readonly url: string;
56
50
  };
57
- /** Absent when the CLI answered no retention mark this SDK knows. */
58
- readonly retention?: RegistryPublishRetention;
59
- /**
60
- * The command a person runs by hand to send this same request again, its document on stdin:
61
- * the one a publish that may have applied names.
62
- */
63
- readonly replay: string;
64
51
  }
65
52
  /** Every Publication of one Domain the caller may read, as `astrale domain versions` lists it. */
66
53
  export interface RegistryIndex {
@@ -127,7 +127,7 @@ export async function openDomainRegistry(input, dependencies = {
127
127
  stdout: DOCUMENT_LIMIT,
128
128
  timeoutMs: PUBLISH_TIMEOUT_MS,
129
129
  change: true,
130
- }), request, commandLine(invocation));
130
+ }), request);
131
131
  },
132
132
  async yank(origin, version, options) {
133
133
  const reference = `${origin}@${version}`;
@@ -256,10 +256,10 @@ function publication(input, origin) {
256
256
  /**
257
257
  * Admit the CT29 `PublishResultV1` only as the answer to this request: the same version, URL and
258
258
  * release digest, so a CLI that answered for another Publication is never reported as published.
259
- * Its retention mark never decides that: one this SDK does not know is left out, so the
260
- * Publication still reads as published.
259
+ * Any other key is ignored, such as the `retention` mark an Admin before admin#455 still answers:
260
+ * Admin keeps no Services mark any more, since Services keeps every deployment until it is retired.
261
261
  */
262
- function decodePublishResult(document, request, replay) {
262
+ function decodePublishResult(document, request) {
263
263
  const named = document.publication;
264
264
  if (document.format !== 'astrale.registry-publish-result' ||
265
265
  document.version !== 1 ||
@@ -277,13 +277,8 @@ function decodePublishResult(document, request, replay) {
277
277
  return Object.freeze({
278
278
  status: document.status,
279
279
  publication: Object.freeze({ ...published, url: named.url }),
280
- ...(isRetention(document.retention) ? { retention: document.retention } : {}),
281
- replay,
282
280
  });
283
281
  }
284
- function isRetention(input) {
285
- return input === 'marked' || input === 'failed' || input === 'not-applicable';
286
- }
287
282
  function decodeBundleDocument(document, origin, expected) {
288
283
  const named = document.publication;
289
284
  if (document.format !== 'astrale.registry-bundle' ||
@@ -2,7 +2,7 @@
2
2
  * The Admin Domain registry as Project commands read and change it: through the Astrale CLI's
3
3
  * registry plumbing (CT29), with the caller's own credential and the CLI's configured Admin target.
4
4
  */
5
- export { RegistryCliError, openDomainRegistry, type DomainRegistry, type DomainRegistryDependencies, type RegistryBundle, type RegistryDigest, type RegistryIndex, type RegistryPublication, type RegistryPublishRequest, type RegistryPublishResult, type RegistryPublishRetention, type RegistryYank, } from './client.js';
5
+ export { RegistryCliError, openDomainRegistry, type DomainRegistry, type DomainRegistryDependencies, type RegistryBundle, type RegistryDigest, type RegistryIndex, type RegistryPublication, type RegistryPublishRequest, type RegistryPublishResult, type RegistryYank, } from './client.js';
6
6
  export { MINIMUM_INSTALLATIONS_CLI_VERSION, MINIMUM_REGISTRY_CLI_VERSION, resolveRegistryExecutable, } from './executable.js';
7
7
  export { isAdminFailure } from './installations.js';
8
8
  export type { InstallationUnknownReason, InstanceInstallation, InstanceListing, } from './installations.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/sdk",
3
- "version": "0.6.0-beta.20",
3
+ "version": "0.6.0-beta.21",
4
4
  "description": "Schema-first SDK for defining, composing, and deploying Astrale domains",
5
5
  "keywords": [
6
6
  "astrale",