@rbbtsn0w/adg 0.11.4 → 1.0.1
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 +31 -12
- package/dist/src/agents/antigravity.js +218 -45
- package/dist/src/agents/claude.js +98 -38
- package/dist/src/agents/codex.js +1 -0
- package/dist/src/cli/core-plugin-handlers.js +3 -3
- package/dist/src/cli/handlers.js +160 -36
- package/dist/src/cli/index.js +19 -12
- package/dist/src/cli/review-update.js +80 -0
- package/dist/src/commands/install/default-dsl.js +1 -1
- package/dist/src/commands/install/install-one.js +41 -31
- package/dist/src/commands/install.js +38 -23
- package/dist/src/commands/marketplace.js +136 -109
- package/dist/src/commands/migrate.js +2 -2
- package/dist/src/commands/projection.js +3 -1
- package/dist/src/commands/remove.js +10 -0
- package/dist/src/commands/review-executables.js +106 -0
- package/dist/src/commands/select-agents.js +2 -2
- package/dist/src/commands/select-components.js +2 -2
- package/dist/src/commands/select-plugins.js +15 -2
- package/dist/src/commands/select-scope.js +3 -4
- package/dist/src/commands/source-upgrade.js +552 -0
- package/dist/src/commands/state.js +3 -1
- package/dist/src/commands/update.js +3 -1
- package/dist/src/lock.js +13 -5
- package/dist/src/migration-transaction.js +1011 -0
- package/dist/src/native-retry.js +329 -0
- package/dist/src/process-identity.js +65 -0
- package/dist/src/render/plugins.js +115 -9
- package/dist/src/source-history.js +194 -0
- package/dist/src/source-intent.js +7 -0
- package/dist/src/store-mutex.js +179 -0
- package/dist/src/types.js +1 -1
- package/dist/src/update-executables.js +193 -0
- package/dist/src/upgrade-plan.js +378 -0
- package/docs/agents/antigravity.md +5 -0
- package/docs/agents-spec.md +10 -0
- package/docs/branching-and-release.md +53 -0
- package/docs/plugin-update-semantics.md +30 -34
- package/docs/plugin-upgrade-migrations.md +349 -0
- package/package.json +4 -3
- package/schemas/plugin-lock.schema.json +78 -1
package/dist/src/lock.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from "node:fs";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { recordTelemetryEvent } from "./telemetry.js";
|
|
3
4
|
import { LOCK_VERSION } from "./types.js";
|
|
4
5
|
/** Compatibility reads are upgraded in memory; record the transition on first successful persistence. */
|
|
@@ -15,14 +16,14 @@ export function readLock(file, telemetrySpan) {
|
|
|
15
16
|
}
|
|
16
17
|
const parsed = raw;
|
|
17
18
|
if (typeof parsed.version === "number") {
|
|
18
|
-
const observed = parsed.version === 2 || parsed.version === 3 || parsed.version === 4 || parsed.version === LOCK_VERSION ? parsed.version : -1;
|
|
19
|
+
const observed = parsed.version === 2 || parsed.version === 3 || parsed.version === 4 || parsed.version === 5 || parsed.version === LOCK_VERSION ? parsed.version : -1;
|
|
19
20
|
recordTelemetryEvent("adg.lock.read", { "format.version": observed }, telemetrySpan);
|
|
20
21
|
}
|
|
21
22
|
if (typeof parsed.version !== "number" || typeof parsed.plugins !== "object" || parsed.plugins === null || Array.isArray(parsed.plugins)) {
|
|
22
23
|
throw new Error(`${file} is not a valid .plugin-lock.json`);
|
|
23
24
|
}
|
|
24
|
-
if (
|
|
25
|
-
// Read compatibility for the retained v3
|
|
25
|
+
if ([3, 4, 5].includes(parsed.version)) {
|
|
26
|
+
// Read compatibility for the retained v3–v5 formats keeps runtime
|
|
26
27
|
// adapters working before the user runs the explicit migration command.
|
|
27
28
|
const upgraded = { ...parsed, version: LOCK_VERSION };
|
|
28
29
|
pendingLockMigrations.set(upgraded, parsed.version);
|
|
@@ -35,7 +36,14 @@ export function readLock(file, telemetrySpan) {
|
|
|
35
36
|
return parsed;
|
|
36
37
|
}
|
|
37
38
|
export function writeLock(file, lock, telemetrySpan) {
|
|
38
|
-
|
|
39
|
+
const temporary = file + "." + randomUUID() + ".tmp";
|
|
40
|
+
try {
|
|
41
|
+
writeFileSync(temporary, JSON.stringify(lock, null, 2) + "\n", { mode: 0o600 });
|
|
42
|
+
renameSync(temporary, file);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
rmSync(temporary, { force: true });
|
|
46
|
+
}
|
|
39
47
|
const fromVersion = pendingLockMigrations.get(lock);
|
|
40
48
|
if (fromVersion !== undefined) {
|
|
41
49
|
pendingLockMigrations.delete(lock);
|