@tryaura/aura-cli 0.2.0 → 0.2.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/dist/bin/aura.js +3 -3
- package/dist/index.js +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{plugins-SZegBVXF.js → plugins-Dbasvr1u.js} +37 -31
- package/dist/{run.boundary-BtMqQAEQ.js → run.boundary-CF5kZTH3.js} +687 -315
- package/dist/{shared-link-plan-DVgOyqP9.js → shared-link-plan-D8fxdFYv.js} +21 -5
- package/package.json +3 -3
|
@@ -360,28 +360,44 @@ const MAX_TRUSTED_PATH_LENGTH = 1024;
|
|
|
360
360
|
* Each entry binds an absolute preset path to a hash of the exact contents that were reviewed, so
|
|
361
361
|
* a file edited after acceptance is untrusted again until someone looks at the new contents. Only
|
|
362
362
|
* acceptances appear here: declining records nothing, and the next interactive setup asks again.
|
|
363
|
+
*
|
|
364
|
+
* `mainWorktreePath` names the same file in the repository's primary Git checkout and carries no
|
|
365
|
+
* uniqueness of its own: every worktree of one repository shares it, so a repository accumulates
|
|
366
|
+
* one entry per distinct set of contents its user accepted rather than one per working directory.
|
|
363
367
|
*/
|
|
364
368
|
function optionalTrustedRepoPresets(value) {
|
|
365
369
|
if (value === void 0) return {};
|
|
366
370
|
if (!Array.isArray(value)) throw invalid("$.trustedRepoPresets", "must be an array");
|
|
367
371
|
if (value.length > 64) throw invalid("$.trustedRepoPresets", `must contain at most ${String(64)} entries`);
|
|
368
|
-
const
|
|
372
|
+
const records = /* @__PURE__ */ new Set();
|
|
369
373
|
return { trustedRepoPresets: Object.freeze(value.map((candidate, index) => {
|
|
370
374
|
const path = `$.trustedRepoPresets[${String(index)}]`;
|
|
371
375
|
const entry = requiredObject(candidate, path);
|
|
372
|
-
const presetPath = requiredString(entry, "path", path);
|
|
373
|
-
if (presetPath.length === 0 || presetPath.length > MAX_TRUSTED_PATH_LENGTH) throw invalid(`${path}.path`, `must be a non-empty path of at most ${String(MAX_TRUSTED_PATH_LENGTH)} characters`);
|
|
374
|
-
if (paths.has(presetPath)) throw invalid(`${path}.path`, "must not duplicate another trusted preset path");
|
|
375
|
-
paths.add(presetPath);
|
|
376
|
+
const presetPath = trustedPath(requiredString(entry, "path", path), `${path}.path`);
|
|
376
377
|
const hash = requiredString(entry, "hash", path);
|
|
377
378
|
if (!SHA256_PATTERN.test(hash)) throw invalid(`${path}.hash`, "must be a lowercase SHA-256 hash");
|
|
379
|
+
const record = `${presetPath}\0${hash}`;
|
|
380
|
+
if (records.has(record)) throw invalid(`${path}.hash`, "must not duplicate another trusted preset path and hash");
|
|
381
|
+
records.add(record);
|
|
382
|
+
const mainWorktree = entry["mainWorktreePath"];
|
|
383
|
+
if (mainWorktree === void 0) return Object.freeze({
|
|
384
|
+
...entry,
|
|
385
|
+
hash,
|
|
386
|
+
path: presetPath
|
|
387
|
+
});
|
|
388
|
+
if (typeof mainWorktree !== "string") throw invalid(`${path}.mainWorktreePath`, "must be a string");
|
|
378
389
|
return Object.freeze({
|
|
379
390
|
...entry,
|
|
380
391
|
hash,
|
|
392
|
+
mainWorktreePath: trustedPath(mainWorktree, `${path}.mainWorktreePath`),
|
|
381
393
|
path: presetPath
|
|
382
394
|
});
|
|
383
395
|
})) };
|
|
384
396
|
}
|
|
397
|
+
function trustedPath(value, jsonPath) {
|
|
398
|
+
if (value.length === 0 || value.length > MAX_TRUSTED_PATH_LENGTH) throw invalid(jsonPath, `must be a non-empty path of at most ${String(MAX_TRUSTED_PATH_LENGTH)} characters`);
|
|
399
|
+
return value;
|
|
400
|
+
}
|
|
385
401
|
//#endregion
|
|
386
402
|
//#region ../core/src/manifest/schema.ts
|
|
387
403
|
const APP_ID_PATTERN = /^[a-z0-9][a-z0-9._-]*$/u;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryaura/aura-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The composable Aura CLI runtime and official plugin distribution.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"toml-eslint-parser": "^1.0.3",
|
|
51
51
|
"typanion": "3.14.0",
|
|
52
52
|
"undici": "7.29.0",
|
|
53
|
-
"@tryaura/aura-sdk": "0.2.
|
|
53
|
+
"@tryaura/aura-sdk": "0.2.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "24.13.3",
|
|
57
57
|
"ajv": "8.20.0",
|
|
58
58
|
"vitest": "4.1.10",
|
|
59
|
+
"@tryaura/adapter-claude-code": "0.0.0",
|
|
59
60
|
"@tryaura/adapter-cursor": "0.0.0",
|
|
60
61
|
"@tryaura/adapter-codex": "0.0.0",
|
|
61
|
-
"@tryaura/adapter-claude-code": "0.0.0",
|
|
62
62
|
"@tryaura/checks-core": "0.0.0",
|
|
63
63
|
"@tryaura/core": "0.0.0",
|
|
64
64
|
"@tryaura/content-official": "0.0.0"
|