carveout 0.1.1 → 0.1.2

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.
Files changed (78) hide show
  1. package/AGENTS.md +21 -3
  2. package/NOTICE.md +2 -1
  3. package/README.md +248 -473
  4. package/dist/src/account.d.ts +37 -0
  5. package/dist/src/account.js +275 -0
  6. package/dist/src/api.d.ts +148 -0
  7. package/dist/src/api.js +120 -0
  8. package/dist/src/carve.d.ts +788 -0
  9. package/dist/src/carve.js +1721 -125
  10. package/dist/src/cli.d.ts +10 -0
  11. package/dist/src/cli.js +674 -47
  12. package/dist/src/command.d.ts +10 -0
  13. package/dist/src/core.d.ts +11 -0
  14. package/dist/src/cut.d.ts +78 -0
  15. package/dist/src/cut.js +25 -7
  16. package/dist/src/extract/compiler-config.d.ts +49 -0
  17. package/dist/src/extract/fixture.d.ts +103 -0
  18. package/dist/src/extract/hash.d.ts +6 -0
  19. package/dist/src/extract/package-registry.d.ts +47 -0
  20. package/dist/src/extract/package-types.d.ts +52 -0
  21. package/dist/src/extract/surface.d.ts +44 -0
  22. package/dist/src/extract/typescript.d.ts +180 -0
  23. package/dist/src/gate.d.ts +55 -0
  24. package/dist/src/gate.js +1 -0
  25. package/dist/src/graph.d.ts +142 -0
  26. package/dist/src/graph.js +4 -3
  27. package/dist/src/impact.d.ts +113 -0
  28. package/dist/src/imports.d.ts +67 -0
  29. package/dist/src/mergeback.d.ts +182 -0
  30. package/dist/src/mergeback.js +580 -35
  31. package/dist/src/platform.d.ts +69 -0
  32. package/dist/src/platform.js +184 -0
  33. package/dist/src/policy.d.ts +181 -0
  34. package/dist/src/policy.js +716 -230
  35. package/dist/src/project/build.d.ts +23 -0
  36. package/dist/src/project/catalog.d.ts +25 -0
  37. package/dist/src/project/project.d.ts +287 -0
  38. package/dist/src/project/project.js +479 -52
  39. package/dist/src/project/provenance.d.ts +73 -0
  40. package/dist/src/project/provenance.js +12 -0
  41. package/dist/src/project/runner.d.ts +19 -0
  42. package/dist/src/project/secrets.d.ts +64 -0
  43. package/dist/src/project/vitest-config.d.ts +70 -0
  44. package/dist/src/project/vitest-config.js +291 -0
  45. package/dist/src/pseudonyms/aliases.d.ts +107 -0
  46. package/dist/src/pseudonyms/aliases.js +394 -0
  47. package/dist/src/pseudonyms/draft.d.ts +64 -0
  48. package/dist/src/pseudonyms/draft.js +284 -0
  49. package/dist/src/pseudonyms/folder.d.ts +172 -0
  50. package/dist/src/pseudonyms/folder.js +527 -0
  51. package/dist/src/pseudonyms/index.d.ts +11 -0
  52. package/dist/src/pseudonyms/index.js +11 -0
  53. package/dist/src/pseudonyms/vocabulary.d.ts +113 -0
  54. package/dist/src/pseudonyms/vocabulary.js +522 -0
  55. package/dist/src/readiness.d.ts +71 -0
  56. package/dist/src/readiness.js +131 -0
  57. package/dist/src/receipt.d.ts +154 -0
  58. package/dist/src/receipt.js +296 -0
  59. package/dist/src/sandbox.d.ts +53 -0
  60. package/dist/src/sandbox.js +154 -0
  61. package/dist/src/slice/analysis.d.ts +75 -0
  62. package/dist/src/slice/externals.d.ts +51 -0
  63. package/dist/src/slice/graph.d.ts +69 -0
  64. package/dist/src/slice/manifest.d.ts +262 -0
  65. package/dist/src/slice/manifest.js +4 -3
  66. package/dist/src/slice/reach.d.ts +204 -0
  67. package/dist/src/slice/reach.js +11 -5
  68. package/dist/src/slice/report.d.ts +49 -0
  69. package/dist/src/slice/report.js +5 -2
  70. package/dist/src/specifiers.d.ts +48 -0
  71. package/dist/src/status.d.ts +46 -0
  72. package/dist/src/status.js +3 -2
  73. package/dist/src/test-integrity.d.ts +54 -0
  74. package/dist/src/test-integrity.js +812 -0
  75. package/package.json +24 -5
  76. package/skills/carveout/SKILL.md +517 -0
  77. package/skills/carveout-gate/SKILL.md +98 -0
  78. package/SKILL.md +0 -423
package/AGENTS.md CHANGED
@@ -21,8 +21,9 @@ the person:
21
21
 
22
22
  For a slice, run `npx -y carveout plan <entry> --depth 1` first. Show the
23
23
  person what the slice would hold and what it cuts, and agree the entry
24
- points and the depth with them. Then `cut` and `check`, and report the
25
- check's result as it is.
24
+ points and the depth with them. Then `cut` and `check` (or `handoff`, both
25
+ in one, with `--task` for the work and its acceptance), and report the
26
+ verdict as it is: ready, tests that fail on the mocks, or no tests.
26
27
 
27
28
  For a change in the repository, run `npx -y carveout impact` (add
28
29
  `--base <branch>` for committed work) and report the exports, importers and
@@ -56,14 +57,31 @@ What to tell them, accurately:
56
57
  - `--copy-pure` copies the pure code the slice runs instead of mocking
57
58
  it, so the folder's tests pass before any change; it shows the
58
59
  contributor more of the repository, which `plan` lists.
60
+ - `--public` also writes the folder in pseudonyms: the names the
61
+ repository goes by (packages, remote, authors, the maintainer's Git
62
+ identity, `--name`) are renamed under a table only the maintainer's
63
+ receipt holds, and `patch` renames the work back. A name left behind
64
+ blocks the cut; report it, and add it with `--name` or `pseudonyms` in
65
+ the configuration. Never send the receipt.
59
66
  - For someone outside the repository, cut with `--public`, take the folder
60
67
  back with `carveout patch` (it runs none of the folder's code and keeps
61
68
  out CI, hook, manifest and lockfile files, new files in other packages,
62
- deleted tests and code that newly reaches the disk, network or
69
+ deleted or bent tests, code that could pass a test without the code
70
+ under test, and code that newly reaches the disk, network or
63
71
  environment), read the whole patch before anything runs it (its
64
72
  tests and new files are code beside the closed repository, and a branch
65
73
  pushed there gets CI's secrets and network), then let the repository's
66
74
  CI judge the change: a pass in the slice is a pass against mocks.
75
+ - `carveout check` and `merge --verify` run a folder that came back only
76
+ after the hand-off policy has read it, and only in a container (Docker)
77
+ that mounts nothing of the machine but a copy, with no network but for an
78
+ install with scripts off. When the container cannot run, they run
79
+ nothing; `--no-sandbox` runs the folder's code as the person, with their
80
+ files and network: say so before passing it.
81
+ - For a job long enough that the repository moves, `carveout refresh`
82
+ brings its commits into the folder, merged into the work (an overlap is
83
+ named, never overwritten), and a patch after it carries the work alone;
84
+ `carveout widen` cuts the folder again, wider, with the work in it.
67
85
  - `carveout check` passing means the folder installs, builds, loads every
68
86
  export outside code uses and keeps their types. It tests the slice's
69
87
  behaviour only when the cut was made with `--with-tests`, and then only
package/NOTICE.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Provenance
2
2
 
3
- The slicing core (`src/slice`, `src/extract`, `src/project`) is carved out of
3
+ The slicing core (`src/slice`, `src/extract`, `src/project`) and the
4
+ pseudonyms (`src/pseudonyms`: aliases, vocabulary, draft) are carved out of
4
5
  [sandbox-factory](https://github.com/lunox-work/sandbox-factory) (MIT), from
5
6
  `packages/core/src/slice`, `packages/core/src/sandbox` and
6
7
  `apps/worker/src/tools/slice`. The import graph (`src/graph.ts`) replaces the