@sleepy_panda_srl/portulan 0.1.2 → 0.2.0
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 +7 -6
- package/cli/README.md +142 -291
- package/cli/advisory.mjs +354 -0
- package/cli/comments.mjs +932 -0
- package/cli/compile.mjs +1443 -1210
- package/cli/context.mjs +883 -0
- package/cli/control-chars.mjs +12 -301
- package/cli/discover.mjs +17 -574
- package/cli/doctor.mjs +225 -1071
- package/cli/drills.mjs +1107 -0
- package/cli/feedback.mjs +16 -237
- package/cli/finish.mjs +437 -0
- package/cli/form.mjs +644 -0
- package/cli/fuzz-shell.mjs +595 -0
- package/cli/gate.mjs +7 -198
- package/cli/goldens.mjs +311 -0
- package/cli/index.mjs +305 -655
- package/cli/init.mjs +244 -564
- package/cli/inside.mjs +3 -28
- package/cli/instructions.mjs +829 -0
- package/cli/ledger.mjs +778 -0
- package/cli/librarian.mjs +135 -599
- package/cli/manifest.mjs +2 -39
- package/cli/mutants.mjs +764 -0
- package/cli/new.mjs +12 -243
- package/cli/pack-identity.mjs +6 -68
- package/cli/pack-version.mjs +13 -248
- package/cli/plugin-lint.mjs +42 -658
- package/cli/portulan.mjs +5 -124
- package/cli/recipe-set.mjs +16 -240
- package/cli/release-eval.mjs +748 -0
- package/cli/review-meter.mjs +500 -0
- package/cli/rule-carriers.mjs +12 -175
- package/cli/sessions.mjs +82 -0
- package/cli/skill-goldens.mjs +424 -0
- package/cli/skills-set.mjs +12 -414
- package/cli/stop-gate.mjs +126 -454
- package/cli/symbols.mjs +1132 -0
- package/cli/telemetry.mjs +582 -0
- package/cli/upgrade.mjs +171 -314
- package/cli/vendor.mjs +146 -476
- package/cli/version-carriers.mjs +9 -74
- package/core/README.md +1 -1
- package/core/engine.md +3 -9
- package/core/operating/autonomy.md +1 -1
- package/core/operating/context.md +183 -0
- package/core/operating/evolution.md +3 -3
- package/core/operating/loop.md +13 -20
- package/core/operating/memory.md +12 -3
- package/core/operating/sessions.md +100 -0
- package/core/personas/librarian.md +2 -2
- package/core/skills/consolidate/SKILL.md +4 -2
- package/core/templates/gate-policy.md +27 -8
- package/core/templates/handoff.md +28 -15
- package/core/templates/memory-entry.md +1 -0
- package/evals/README.md +320 -0
- package/evals/releases/0.1.3.json +134 -0
- package/evals/releases/0.1.3.md +64 -0
- package/evals/releases/0.2.0.json +146 -0
- package/evals/releases/0.2.0.md +67 -0
- package/evals/releases/README.md +32 -0
- package/package.json +9 -2
- package/packs/rituals/checkpoints/README.md +9 -2
- package/packs/rituals/checkpoints/pack.json +1 -1
- package/packs/rituals/checkpoints/skills/pre-commit/SKILL.md +32 -2
- package/packs/tools/github/verify/actions-pinned.sh +10 -55
- package/spec/README.md +112 -6
- package/spec/migrations/0001-repository-declares-its-tree.mjs +1 -26
- package/spec/migrations/0002-bundle-fallback-path.mjs +13 -74
- package/spec/migrations/0003-handoff-index-not-kept.mjs +66 -0
- package/spec/migrations/0004-changelog-fragments.mjs +53 -0
- package/spec/migrations/0005-session-log-retired.mjs +69 -0
- package/spec/migrations/0006-boot-card.mjs +77 -0
- package/spec/migrations/0007-guidance-compiled.mjs +31 -0
- package/spec/migrations/0008-card-reading.mjs +55 -0
- package/spec/migrations/0009-instruction-sections-on-read.mjs +60 -0
- package/spec/migrations/0010-comment-rail.mjs +57 -0
- package/spec/migrations/README.md +45 -10
- package/spec/pack.schema.json +1 -1
- package/spec/slots.md +359 -23
- package/spec/workspace.schema.json +145 -4
package/cli/inside.mjs
CHANGED
|
@@ -1,38 +1,13 @@
|
|
|
1
1
|
// Is one path inside another? One predicate, one file, no dependencies.
|
|
2
|
-
//
|
|
3
|
-
// **It lives alone because two large modules need it and must not import each other.** It began in
|
|
4
|
-
// `./index.mjs`, which `./doctor.mjs` imports; when `./compile.mjs` needed it too, importing it from
|
|
5
|
-
// there would have closed a cycle — `index.mjs` already imports `resolvePack`/`rootPlan` from
|
|
6
|
-
// `compile.mjs`. This repository has paid for a cycle once already: `../docs/plan.md`'s session log
|
|
7
|
-
// records **an import cycle exiting 13 in silence**, and three modules (`./plugin-lint.mjs:1369`,
|
|
8
|
-
// `./skills-set.mjs:48` and `:114`) carry comments explaining that they chose their import direction
|
|
9
|
-
// to avoid making one. Copying the predicate instead was the other option and is the one its own
|
|
10
|
-
// docblock forbids: two copies of this rule drifted into the identical defect before either shipped.
|
|
11
|
-
//
|
|
12
|
-
// So the rule keeps one implementation and gains no edges. `./index.mjs` re-exports it, so every
|
|
13
|
-
// existing importer is untouched.
|
|
14
|
-
//
|
|
15
|
-
// Found by Copilot on the change that closed #264, which had reached for the `index.mjs` export.
|
|
16
2
|
|
|
17
3
|
import path from "node:path";
|
|
18
4
|
|
|
19
|
-
/**
|
|
20
|
-
* Is `child` inside `parent`?
|
|
21
|
-
*
|
|
22
|
-
* **The obvious spelling — `!path.relative(parent, child).startsWith("..")` — is wrong, and it fails
|
|
23
|
-
* OPEN.** A name beginning with `..` is an ordinary filename, not a traversal: `path.relative` of
|
|
24
|
-
* `memory/..index.md` against `memory/` is `..index.md`, which `startsWith("..")` calls *outside*.
|
|
25
|
-
* Measured end to end before this was written — an index declared at `memory/..index.md` was written
|
|
26
|
-
* into the store, reported `ok`, and `doctor` then counted it as a second record. That is the ninth
|
|
27
|
-
* fail-open found in this repository's scaffolding, and the first one written by the change that
|
|
28
|
-
* cites the class; `recordedOrigin` in `./compile.mjs` was the second, which is why this moved here.
|
|
29
|
-
*
|
|
30
|
-
* Only `..` exactly, or `..` followed by a separator, means outside. An absolute result means the two
|
|
31
|
-
* paths share no root and cannot contain one another. A path is inside itself.
|
|
32
|
-
*/
|
|
5
|
+
/** True when `child` is `parent` itself or lies under it. */
|
|
33
6
|
export function isInside(parent, child) {
|
|
34
7
|
const rel = path.relative(parent, child);
|
|
35
8
|
if (rel === "") return true;
|
|
9
|
+
// Absolute when the two share no root, as two Windows drives do.
|
|
36
10
|
if (path.isAbsolute(rel)) return false;
|
|
11
|
+
// Not `startsWith("..")`: a name such as `..index.md` is an ordinary file, not a traversal.
|
|
37
12
|
return rel !== ".." && !rel.startsWith(`..${path.sep}`);
|
|
38
13
|
}
|