@timurproko/a1 0.1.1-dev.2 → 0.1.1-dev.4
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
|
@@ -44,6 +44,19 @@ npm start
|
|
|
44
44
|
|
|
45
45
|
A1 control state uses `%APPDATA%\\A1` and `%LOCALAPPDATA%\\A1` on Windows, and the `a1` directory under XDG config/data/runtime roots on Unix. Override it only with declared `A1_*` variables such as `A1_CONFIG_DIR`, `A1_DATA_DIR`, `A1_RUNTIME_DIR`, `A1_DATABASE_PATH`, and `A1_ENDPOINT`. Pi profile roots remain `~/.a1/agent`, `~/.pi/agent`, and `~/.a1/sandbox`. This is a no-migration identity hard cut; see [`docs/architecture/toolchain.md`](docs/architecture/toolchain.md#identity-hard-cut-and-cleanup) before removing obsolete control state.
|
|
46
46
|
|
|
47
|
+
### Branch lifecycle
|
|
48
|
+
|
|
49
|
+
Create every topic branch and every `milestone/<name>` work branch from `develop`; never implement directly on `develop` or `master`. A source branch is closed only after this sequence completes:
|
|
50
|
+
|
|
51
|
+
1. Validate the source branch with its required gates.
|
|
52
|
+
2. Merge it into `develop` and push the merged `develop` commit.
|
|
53
|
+
3. Switch to `develop`.
|
|
54
|
+
4. Preview the exact cleanup set with `npm run branches:prune -- --branch <source>`.
|
|
55
|
+
5. Safely delete the reviewed local source with `npm run branches:prune -- --apply --branch <source>`.
|
|
56
|
+
6. When the non-protected remote source exists, delete it in the same cleanup with `npm run branches:prune -- --apply --branch <source> --remote origin`.
|
|
57
|
+
|
|
58
|
+
The command defaults to a dry run against `develop`. It always retains `develop`, `master`, the checked-out branch, explicitly protected branches, and branches whose tips are not ancestors of the integration target. Apply mode uses only Git safe deletion (`git branch -d`), never force deletion. Use `--base <branch>` for another explicit integration target, `--protect <branch>` for additional protection, and `--json` for machine-readable review.
|
|
59
|
+
|
|
47
60
|
Run the non-desktop gates with:
|
|
48
61
|
|
|
49
62
|
```sh
|
|
@@ -42,9 +42,7 @@ export async function runBootstrap(options) {
|
|
|
42
42
|
return await launchUi(retained, environment);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const candidate = await materializeRelease(options.packageRoot, paths.dataDir
|
|
46
|
-
onProgress: progress => output.write(`${PRODUCT_TEXT.diagnostic(`preparing ${progress.fileCount} installed release files; first launch may take a moment.`)}\n`),
|
|
47
|
-
});
|
|
45
|
+
const candidate = await materializeRelease(options.packageRoot, paths.dataDir);
|
|
48
46
|
await stateStore.recordCandidate(candidate);
|
|
49
47
|
state = await stateStore.read();
|
|
50
48
|
if (!state.references.active) {
|
|
@@ -106,9 +106,7 @@ export function createUpdateLifecycleCoordinator(environment = process.env, file
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
async activateInstalled(packageRoot, targetVersion, phase) {
|
|
109
|
-
const candidate = await materializeRelease(packageRoot, paths.dataDir
|
|
110
|
-
onProgress: progress => output.stdout(`${PRODUCT_TEXT.diagnostic(`preparing ${progress.fileCount} installed release files; this one-time activation may take a moment.`)}\n`),
|
|
111
|
-
});
|
|
109
|
+
const candidate = await materializeRelease(packageRoot, paths.dataDir);
|
|
112
110
|
if (candidate.packageVersion !== targetVersion)
|
|
113
111
|
throw new Error(`installed ${PRODUCT_TEXT.displayName} version ${candidate.packageVersion} does not match target ${targetVersion}`);
|
|
114
112
|
await stateStore.recordCandidate(candidate);
|
|
@@ -198,14 +196,20 @@ export async function runSelfUpdate(options) {
|
|
|
198
196
|
transaction = await transactionStore.advance("ownership-released");
|
|
199
197
|
}
|
|
200
198
|
if (phaseBefore(transaction.phase, "package-installed")) {
|
|
201
|
-
|
|
202
|
-
const installation = await runNpm(runner, ["install", "--global", `${PRODUCT_PACKAGE}@${targetVersion}`], false, output, "start the global npm installation", false);
|
|
199
|
+
const installation = await runNpm(runner, ["install", "--global", "--loglevel=error", "--no-fund", "--no-audit", `${PRODUCT_PACKAGE}@${targetVersion}`], true, output, "start the global npm installation", false);
|
|
203
200
|
if (installation.result === null)
|
|
204
201
|
throw new UpdateFailure(installation.exitCode, "npm process failed");
|
|
205
|
-
if (installation.result.code !== 0)
|
|
202
|
+
if (installation.result.code !== 0) {
|
|
203
|
+
if (installation.result.stdout.trim().length > 0)
|
|
204
|
+
output.stderr(`${installation.result.stdout.trimEnd()}\n`);
|
|
206
205
|
throw new UpdateFailure(unsuccessfulCode(installation.result.code), `npm exited with status ${formatExitCode(installation.result.code)}`);
|
|
206
|
+
}
|
|
207
207
|
transaction = await transactionStore.advance("package-installed");
|
|
208
208
|
}
|
|
209
|
+
// Ownership can be reacquired after an interrupted installation (for
|
|
210
|
+
// example, if bare A1 is launched before the update is resumed). Recheck
|
|
211
|
+
// immediately before activation so recovery cannot start a second cohort.
|
|
212
|
+
await lifecycle.shutdownVerifiedOwners(targetVersion);
|
|
209
213
|
await lifecycle.activateInstalled(packageRoot, targetVersion, async (phase) => { transaction = await transactionStore.advance(phase); });
|
|
210
214
|
await transactionStore.advance("supervisor-verified");
|
|
211
215
|
await transactionStore.finish("completed");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timurproko/a1",
|
|
3
|
-
"version": "0.1.1-dev.
|
|
3
|
+
"version": "0.1.1-dev.4",
|
|
4
4
|
"description": "Standalone terminal workspace for supervised native and managed agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.13.0",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"check:architecture": "node scripts/check-architecture.mjs && node scripts/product-identifier-policy.mjs --check && node scripts/check-product-identity-boundaries.mjs && node scripts/check-package-identity.mjs && node scripts/check-pinned-pi-source-ledger.mjs && node scripts/check-terminal-host-provenance.mjs",
|
|
25
25
|
"check:customization-ready": "node scripts/check-owned-ui-customization-prerequisites.mjs",
|
|
26
26
|
"check:deprecated": "node scripts/check-deprecated-dependencies.mjs",
|
|
27
|
+
"branches:prune": "node scripts/prune-merged-branches.mjs",
|
|
27
28
|
"check": "npm run typecheck && npm run check:architecture && npm run check:customization-ready && npm run check:deprecated && npm test && npm run test:release",
|
|
28
29
|
"validate:agent": "npm run check",
|
|
29
30
|
"publish:next": "tsx scripts/publish-next.ts",
|