@timurproko/a1 0.1.8-dev.b449b5c → 0.1.8-dev.de7821a

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
@@ -68,14 +68,15 @@ time and never committed, so previews cost no commits and need no command, and a
68
68
  installed preview says exactly which source produced it.
69
69
 
70
70
  ```sh
71
- a1 update:next # install the newest preview
72
- a1 update:7eabe9e # install the preview built from that commit
73
- a1 update:0.1.8-dev.7eabe9e # or name the version outright
71
+ a1 update:next # install the newest preview
72
+ a1 update:7eabe9e # install the preview built from that commit
74
73
  ```
75
74
 
76
75
  Naming a commit is what the version suffix is for: read it off `a1 version`, a
77
- pull request, or a commit list, and install exactly that build. A commit that was
78
- never published is refused rather than guessed at.
76
+ pull request, or a commit list, and install exactly that build you never need to
77
+ know which version it went out under. A commit that was never published is refused
78
+ rather than guessed at. A full preview version works in the same place, so a string
79
+ pasted back from `a1 version` is understood too.
79
80
 
80
81
  ### Stable — npm `latest`
81
82
 
@@ -92,7 +93,7 @@ It lands the version on `develop` through a pull request that merges itself.
92
93
  **Landing it is what publishes** — the workflow builds, validates the packed release
93
94
  on Windows, Linux, and macOS, publishes to npm `latest` with provenance, and only
94
95
  then writes the `v<version>` tag and records the GitHub Release. The command waits
95
- for that to succeed, then lands the next `-dev.0` version so previews resume
96
+ for that to succeed, then opens the next `-dev` line so previews resume
96
97
  immediately.
97
98
 
98
99
  ```sh
@@ -5,7 +5,7 @@
5
5
  "platform": "darwin",
6
6
  "architecture": "arm64",
7
7
  "capability": "unsupported",
8
- "builtAt": "2026-08-24T06:35:58.522Z",
8
+ "builtAt": "2026-08-25T06:41:39.084Z",
9
9
  "artifact": {
10
10
  "filename": "process-guardian",
11
11
  "sha256": "7524bf568992517f50ed53196c861c5edeba0d7275633bb4735ab45bd5963a28",
@@ -5,7 +5,7 @@
5
5
  "platform": "linux",
6
6
  "architecture": "x64",
7
7
  "capability": "supported",
8
- "builtAt": "2026-08-24T06:35:49.229Z",
8
+ "builtAt": "2026-08-25T06:42:29.795Z",
9
9
  "artifact": {
10
10
  "filename": "process-guardian",
11
11
  "sha256": "29e22fe29de2828982bc67ef418c4adcaab1490281477b7bea592ec6fe621bcd",
@@ -5,10 +5,10 @@
5
5
  "platform": "win32",
6
6
  "architecture": "x64",
7
7
  "capability": "supported",
8
- "builtAt": "2026-08-24T06:36:28.685Z",
8
+ "builtAt": "2026-08-25T06:42:38.243Z",
9
9
  "artifact": {
10
10
  "filename": "process-guardian.exe",
11
- "sha256": "1d535ec647852d21736769e0d418b80f9a99d02a9721609a13f251300986b9b9",
11
+ "sha256": "3f7446a3e9eba745ab0458f9ca9afaf5adb42961c4bdb7709036f17b97787978",
12
12
  "size": 172544
13
13
  },
14
14
  "provenance": {
@@ -1,7 +1,6 @@
1
1
  export * from "./bootstrap.js";
2
2
  export * from "./cohort-selection.js";
3
3
  export * from "./cohort-state.js";
4
- export * from "./development-preview-release.js";
5
4
  export * from "./process-cleanup.js";
6
5
  export * from "./release.js";
7
6
  export * from "./release-gc.js";
@@ -1,7 +1,6 @@
1
1
  export * from "./bootstrap.js";
2
2
  export * from "./cohort-selection.js";
3
3
  export * from "./cohort-state.js";
4
- export * from "./development-preview-release.js";
5
4
  export * from "./process-cleanup.js";
6
5
  export * from "./release.js";
7
6
  export * from "./release-gc.js";
@@ -259,8 +259,16 @@ async function resolveRequestedPreview(runner, requested, output) {
259
259
  }
260
260
  const versions = (Array.isArray(published) ? published : [published]).filter((value) => typeof value === "string");
261
261
  const exact = versions.find(version => version === requested);
262
- if (exact !== undefined)
262
+ if (exact !== undefined) {
263
+ // Naming a release here would install it through the preview path, which is a
264
+ // different command with a different meaning. The commit form cannot express
265
+ // one, so only the fuller spelling of a preview reaches this.
266
+ if (!exact.includes("-dev.")) {
267
+ output.stderr(`${PRODUCT_TEXT.diagnostic(`${exact} is a release, not a preview; run ${PRODUCT_TEXT.commandName} update to move to the current release.`)}\n`);
268
+ return { version: null, exitCode: 1 };
269
+ }
263
270
  return { version: exact, exitCode: 0 };
271
+ }
264
272
  const matches = versions.filter(version => version.endsWith(`-dev.${requested}`));
265
273
  if (matches.length === 1)
266
274
  return { version: matches[0], exitCode: 0 };
@@ -306,7 +314,9 @@ export async function runSelfUpdate(options) {
306
314
  if (resolved.version === null)
307
315
  return resolved.exitCode;
308
316
  const targetVersion = resolved.version;
309
- output.stdout(`${PRODUCT_TEXT.commandName} update (${UPDATE_CHANNEL_LABELS[channel]}): ${runningVersion} ${targetVersion}.\n`);
317
+ // No full stop after a version: it already ends in a dot-separated identifier,
318
+ // and a trailing one reads as part of the version rather than as punctuation.
319
+ output.stdout(`${PRODUCT_TEXT.commandName} update (${UPDATE_CHANNEL_LABELS[channel]}): ${runningVersion} → ${targetVersion}\n`);
310
320
  const progress = createUpdateProgress(output, options.progress ?? (options.output === undefined && process.stdout.isTTY === true));
311
321
  const rootLookup = await measure("global-root", async () => await runNpm(runner, ["root", "--global"], true, output, "resolve npm's global package root"));
312
322
  if (rootLookup.result === null)
@@ -395,7 +405,7 @@ export async function runSelfUpdate(options) {
395
405
  await transactionStore.clearCompleted();
396
406
  options.onPhaseTiming?.({ phase: "transaction-complete", durationMs: Math.max(0, now() - transactionStartedAt) });
397
407
  progress.finish();
398
- output.stdout(`${PRODUCT_TEXT.commandName} updated successfully: ${targetVersion}.\n`);
408
+ output.stdout(`${PRODUCT_TEXT.commandName} updated successfully: ${targetVersion}\n`);
399
409
  return 0;
400
410
  }
401
411
  catch (error) {
@@ -54,7 +54,7 @@ npm run release -- patch # or minor, major, or an exact x.y.z
54
54
  ```
55
55
 
56
56
  It lands `x.y.z` on `develop` through a pull request that merges itself, waits for
57
- that publication to succeed, and then lands `x.y.(z+1)-dev.0` so previews resume
57
+ that publication to succeed, and then lands `x.y.(z+1)-dev` so previews resume
58
58
  immediately. It publishes nothing itself and creates no tag.
59
59
 
60
60
  Landing the stable version is what publishes. The same pipeline sees a commit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timurproko/a1",
3
- "version": "0.1.8-dev.b449b5c",
3
+ "version": "0.1.8-dev.de7821a",
4
4
  "description": "Standalone terminal workspace for supervised native and managed agents",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.13.0",
@@ -1,49 +0,0 @@
1
- export declare const PREVIEW_RELEASE_SCHEMA: string;
2
- export interface DevelopmentPreviewCandidate {
3
- readonly version: string;
4
- readonly requiresVersionCommit: boolean;
5
- }
6
- export interface DevelopmentPreviewRegistryState {
7
- readonly published: boolean;
8
- readonly nextVersion: string | null;
9
- }
10
- export interface DevelopmentPreviewVerificationOptions {
11
- readonly attempts?: number;
12
- readonly delayMs?: number;
13
- readonly delay?: (milliseconds: number) => Promise<void>;
14
- }
15
- export interface DevelopmentPreviewPublishResult {
16
- readonly published: boolean;
17
- readonly recoveredPublishError: unknown | null;
18
- }
19
- export interface UncertifiedDevelopmentPreviewEvidenceInput {
20
- readonly packageName: string;
21
- readonly version: string;
22
- readonly commit: string;
23
- readonly tarball: string;
24
- readonly integrity: string;
25
- readonly shasum: string;
26
- readonly platform: NodeJS.Platform;
27
- readonly architecture: string;
28
- readonly recordedAt: string;
29
- }
30
- export interface UncertifiedDevelopmentPreviewEvidence extends UncertifiedDevelopmentPreviewEvidenceInput {
31
- readonly schema: typeof PREVIEW_RELEASE_SCHEMA;
32
- readonly channel: "next";
33
- readonly certificationStatus: "uncertified-development-preview";
34
- readonly terminalCapability: "owned-ui";
35
- readonly manualAcceptance: "accepted";
36
- readonly physicalHostCertification: "deferred";
37
- readonly crossPlatformCertification: "deferred";
38
- readonly stableReleaseEligible: false;
39
- }
40
- export declare function createUncertifiedDevelopmentPreviewEvidence(input: UncertifiedDevelopmentPreviewEvidenceInput): UncertifiedDevelopmentPreviewEvidence;
41
- export declare function requireManuallyAcceptedDevelopmentPreview(version: string, acceptedVersion: string): void;
42
- export declare function selectDevelopmentPreviewCandidate(currentVersion: string, publishedVersions: readonly string[]): DevelopmentPreviewCandidate;
43
- /**
44
- * Treats npm's process result as provisional: browser-auth completion can fail
45
- * after the immutable upload succeeds. Registry identity remains authoritative.
46
- */
47
- export declare function publishDevelopmentPreviewWithRecovery(publish: () => Promise<void>, verify: () => Promise<void>): Promise<DevelopmentPreviewPublishResult>;
48
- export declare function verifyDevelopmentPreviewRegistry(version: string, observe: () => Promise<DevelopmentPreviewRegistryState>, repairNextTag: () => Promise<void>, options?: DevelopmentPreviewVerificationOptions): Promise<void>;
49
- export declare function developmentPreviewTarballName(packageName: string, version: string): string;
@@ -1,114 +0,0 @@
1
- import { compare, inc, prerelease, valid } from "semver";
2
- import { PRODUCT_IDENTITY } from "../../product-identity.js";
3
- export const PREVIEW_RELEASE_SCHEMA = PRODUCT_IDENTITY.evidence.previewReleaseSchema;
4
- export function createUncertifiedDevelopmentPreviewEvidence(input) {
5
- const prereleaseParts = prerelease(input.version);
6
- if (valid(input.version) === null || prereleaseParts?.[0] !== "dev") {
7
- throw new Error(`uncertified preview requires a development prerelease: ${input.version}`);
8
- }
9
- return {
10
- schema: PREVIEW_RELEASE_SCHEMA,
11
- channel: "next",
12
- certificationStatus: "uncertified-development-preview",
13
- terminalCapability: "owned-ui",
14
- manualAcceptance: "accepted",
15
- physicalHostCertification: "deferred",
16
- crossPlatformCertification: "deferred",
17
- stableReleaseEligible: false,
18
- ...input,
19
- };
20
- }
21
- export function requireManuallyAcceptedDevelopmentPreview(version, acceptedVersion) {
22
- const acceptedPrerelease = prerelease(acceptedVersion);
23
- if (valid(acceptedVersion) === null || acceptedPrerelease?.[0] !== "dev") {
24
- throw new Error(`invalid manually accepted development preview: ${acceptedVersion}`);
25
- }
26
- if (version !== acceptedVersion) {
27
- throw new Error(`development preview ${version} has no exact manual acceptance; accepted version is ${acceptedVersion}`);
28
- }
29
- }
30
- export function selectDevelopmentPreviewCandidate(currentVersion, publishedVersions) {
31
- if (valid(currentVersion) === null)
32
- throw new Error(`invalid current package version: ${currentVersion}`);
33
- const published = publishedVersions.map(version => {
34
- if (valid(version) === null)
35
- throw new Error(`invalid published package version: ${version}`);
36
- return version;
37
- });
38
- const publishedSet = new Set(published);
39
- const highestPublished = published.reduce((highest, version) => highest === null || compare(version, highest) > 0 ? version : highest, null);
40
- const currentPrerelease = prerelease(currentVersion);
41
- const currentIsUnpublishedLeadingDev = currentPrerelease?.[0] === "dev"
42
- && !publishedSet.has(currentVersion)
43
- && (highestPublished === null || compare(currentVersion, highestPublished) > 0);
44
- if (currentIsUnpublishedLeadingDev)
45
- return { version: currentVersion, requiresVersionCommit: false };
46
- const base = highestPublished === null || compare(currentVersion, highestPublished) > 0
47
- ? currentVersion
48
- : highestPublished;
49
- const basePrerelease = prerelease(base);
50
- let candidate = basePrerelease?.[0] === "dev"
51
- ? inc(base, "prerelease", "dev")
52
- : inc(base, "prepatch", "dev");
53
- if (candidate === null)
54
- throw new Error(`could not increment development preview from ${base}`);
55
- while (publishedSet.has(candidate)) {
56
- candidate = inc(candidate, "prerelease", "dev");
57
- if (candidate === null)
58
- throw new Error(`could not increment development preview from ${base}`);
59
- }
60
- return { version: candidate, requiresVersionCommit: candidate !== currentVersion };
61
- }
62
- /**
63
- * Treats npm's process result as provisional: browser-auth completion can fail
64
- * after the immutable upload succeeds. Registry identity remains authoritative.
65
- */
66
- export async function publishDevelopmentPreviewWithRecovery(publish, verify) {
67
- let publishError = null;
68
- try {
69
- await publish();
70
- }
71
- catch (error) {
72
- publishError = error;
73
- }
74
- try {
75
- await verify();
76
- return { published: true, recoveredPublishError: publishError };
77
- }
78
- catch (verificationError) {
79
- if (publishError !== null)
80
- throw new AggregateError([publishError, verificationError], "npm publish failed and the exact version could not be verified in the registry");
81
- throw verificationError;
82
- }
83
- }
84
- export async function verifyDevelopmentPreviewRegistry(version, observe, repairNextTag, options = {}) {
85
- const attempts = options.attempts ?? 12;
86
- const delayMs = options.delayMs ?? 2_000;
87
- const delay = options.delay ?? (async (milliseconds) => await new Promise(resolvePromise => setTimeout(resolvePromise, milliseconds)));
88
- if (!Number.isInteger(attempts) || attempts < 1)
89
- throw new Error(`invalid registry verification attempts: ${attempts}`);
90
- let repaired = false;
91
- let last = { published: false, nextVersion: null };
92
- for (let attempt = 1; attempt <= attempts; attempt += 1) {
93
- last = await observe();
94
- if (last.published && last.nextVersion === version)
95
- return;
96
- if (last.published && !repaired) {
97
- await repairNextTag();
98
- repaired = true;
99
- }
100
- if (attempt < attempts)
101
- await delay(delayMs);
102
- }
103
- if (!last.published)
104
- throw new Error(`npm registry did not expose published version ${version} after ${attempts} attempts`);
105
- throw new Error(`npm next resolved ${last.nextVersion ?? "nothing"}; expected ${version} after ${attempts} attempts`);
106
- }
107
- export function developmentPreviewTarballName(packageName, version) {
108
- if (valid(version) === null)
109
- throw new Error(`invalid development preview version: ${version}`);
110
- const unscopedName = packageName.startsWith("@") ? packageName.slice(1).replace("/", "-") : packageName;
111
- if (!/^[a-z0-9._-]+$/i.test(unscopedName))
112
- throw new Error(`invalid package name: ${packageName}`);
113
- return `${unscopedName}-${version}.tgz`;
114
- }