carveout 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/dist/src/api.d.ts +14 -0
- package/dist/src/api.js +14 -0
- package/dist/src/carve.d.ts +1 -1
- package/dist/src/carve.js +1 -1
- package/package.json +1 -1
- package/skills/carveout/SKILL.md +13 -12
- package/skills/carveout-gate/SKILL.md +3 -3
package/dist/src/api.d.ts
CHANGED
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
* lockfile. `test/api.test.ts` holds it to that with `child_process` made
|
|
15
15
|
* to throw.
|
|
16
16
|
*
|
|
17
|
+
* `walk` returns the walk `plan` and `cut` make, whole, for a platform
|
|
18
|
+
* that generates its own stubs and project from it.
|
|
19
|
+
*
|
|
17
20
|
* Also exported: the policy's text checks (`integrityOf`,
|
|
18
21
|
* `gainedIntegrity`, `weakenedTest`) and the slice and project modules
|
|
19
22
|
* `core.ts` gathers, forked from sandbox-factory's core.
|
|
20
23
|
*/
|
|
24
|
+
import type { ReachResult } from "./slice/reach.js";
|
|
21
25
|
import { type CarveoutRecord, type Patch, type PlanSurface } from "./carve.js";
|
|
22
26
|
import { type CutEdge, type SliceExposure, type SliceExternals, type SliceOrigin, type SliceTestLeft, type TestRunner } from "./core.js";
|
|
23
27
|
import type { Readiness } from "./readiness.js";
|
|
@@ -25,6 +29,7 @@ import type { Receipt } from "./receipt.js";
|
|
|
25
29
|
export * from "./core.js";
|
|
26
30
|
export { gainedIntegrity, integrityOf, weakenedTest, type Refusal } from "./policy.js";
|
|
27
31
|
export type { CarveoutRecord, Patch, PlanSurface, Readiness, Receipt };
|
|
32
|
+
export type { ReachResult };
|
|
28
33
|
/** The walk's bounds, as `carveout plan` and `cut` take them. */
|
|
29
34
|
export interface WalkOptions {
|
|
30
35
|
/** The repository's checkout root. */
|
|
@@ -90,6 +95,15 @@ export interface PlanResult {
|
|
|
90
95
|
}
|
|
91
96
|
/** `carveout plan`: the files, cuts, public surface and tests of a cut, from the import graph. Writes nothing. */
|
|
92
97
|
export declare function plan(options: WalkOptions): PlanResult;
|
|
98
|
+
/**
|
|
99
|
+
* The walk itself, as `plan` and `cut` make it: the included files with
|
|
100
|
+
* their depths, every edge that crosses the slice's edge in either
|
|
101
|
+
* direction, the links inside it with the specifiers the source wrote,
|
|
102
|
+
* the imports that resolve to no file, and the tests, helpers, private and
|
|
103
|
+
* pure files it carried. For a platform that generates its own stubs and
|
|
104
|
+
* project from the walk (sandbox-factory's slice tool). Writes nothing.
|
|
105
|
+
*/
|
|
106
|
+
export declare function walk(options: WalkOptions): ReachResult;
|
|
93
107
|
export interface CutOptions extends WalkOptions {
|
|
94
108
|
/** An empty or new folder, outside the repository. */
|
|
95
109
|
readonly out: string;
|
package/dist/src/api.js
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* lockfile. `test/api.test.ts` holds it to that with `child_process` made
|
|
15
15
|
* to throw.
|
|
16
16
|
*
|
|
17
|
+
* `walk` returns the walk `plan` and `cut` make, whole, for a platform
|
|
18
|
+
* that generates its own stubs and project from it.
|
|
19
|
+
*
|
|
17
20
|
* Also exported: the policy's text checks (`integrityOf`,
|
|
18
21
|
* `gainedIntegrity`, `weakenedTest`) and the slice and project modules
|
|
19
22
|
* `core.ts` gathers, forked from sandbox-factory's core.
|
|
@@ -69,6 +72,17 @@ export function plan(options) {
|
|
|
69
72
|
blockers: planBlockers(planned),
|
|
70
73
|
};
|
|
71
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* The walk itself, as `plan` and `cut` make it: the included files with
|
|
77
|
+
* their depths, every edge that crosses the slice's edge in either
|
|
78
|
+
* direction, the links inside it with the specifiers the source wrote,
|
|
79
|
+
* the imports that resolve to no file, and the tests, helpers, private and
|
|
80
|
+
* pure files it carried. For a platform that generates its own stubs and
|
|
81
|
+
* project from the walk (sandbox-factory's slice tool). Writes nothing.
|
|
82
|
+
*/
|
|
83
|
+
export function walk(options) {
|
|
84
|
+
return planSlice(requestOf(options)).walk;
|
|
85
|
+
}
|
|
72
86
|
/**
|
|
73
87
|
* `carveout cut`: writes the folder and its `carveout.json` as the CLI
|
|
74
88
|
* does, and returns the receipt as data instead of writing it under
|
package/dist/src/carve.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { type SandboxSpec } from "./sandbox.js";
|
|
|
14
14
|
import { type Readiness } from "./readiness.js";
|
|
15
15
|
import { type AliasRule, type FolderPseudonyms } from "./pseudonyms/index.js";
|
|
16
16
|
import { type Receipt } from "./receipt.js";
|
|
17
|
-
export declare const CARVEOUT_VERSION = "0.
|
|
17
|
+
export declare const CARVEOUT_VERSION = "0.2.0";
|
|
18
18
|
export declare const RECORD_PATH = "carveout.json";
|
|
19
19
|
export declare const RECORD_SCHEMA_VERSION = 1;
|
|
20
20
|
export declare const BOUNDARY_PATH = "BOUNDARY.md";
|
package/dist/src/carve.js
CHANGED
|
@@ -35,7 +35,7 @@ import { sandboxRun } from "./sandbox.js";
|
|
|
35
35
|
import { configuredFolders, liveCandidates } from "./readiness.js";
|
|
36
36
|
import { exactToFolder, fromFolder, specifierPackages, toFolder, keptNames, looseLeaks, maskKept, pseudonymize, vocabularyBlockers, vocabularyLeaks, workspaceNames, ownedNames, workspaceVocabulary, } from "./pseudonyms/index.js";
|
|
37
37
|
import { RECEIPT_SCHEMA_VERSION, folderRecordFor, folderView, newCutId, receiptPathFor, trustedBaseline, trustedCut, trustedCutWith, writeReceipt, } from "./receipt.js";
|
|
38
|
-
export const CARVEOUT_VERSION = "0.
|
|
38
|
+
export const CARVEOUT_VERSION = "0.2.0";
|
|
39
39
|
export const RECORD_PATH = "carveout.json";
|
|
40
40
|
export const RECORD_SCHEMA_VERSION = 1;
|
|
41
41
|
/** Blockers that stop a cut before it writes anything. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carveout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Hand one part of a closed TypeScript repository to an outside contractor: a slice, stubbed and mocked, that installs, builds and tests on its own, and a checked patch back. Also checks a change made in the repository: what it reaches, the tests to run, and weakened tests or config edits.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"carveout",
|
package/skills/carveout/SKILL.md
CHANGED
|
@@ -17,14 +17,14 @@ description: >-
|
|
|
17
17
|
license: MIT
|
|
18
18
|
compatibility: >-
|
|
19
19
|
Node 22.12 or later, git and npm; Docker to run a returned folder's code. Runs
|
|
20
|
-
the carveout@0.
|
|
20
|
+
the carveout@0.2.0 CLI from npm; online cuts read the npm registry.
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
# carveout
|
|
24
24
|
|
|
25
|
-
`carveout <command>` is the CLI, `carveout@0.
|
|
25
|
+
`carveout <command>` is the CLI, `carveout@0.2.0`. When `carveout --version`
|
|
26
26
|
prints another version or nothing, ask the person before installing it:
|
|
27
|
-
`npm i -g carveout@0.
|
|
27
|
+
`npm i -g carveout@0.2.0`, or put `npx carveout@0.2.0` in place of `carveout` in
|
|
28
28
|
each command (in a clone of the repository, `node dist/src/cli.js` after
|
|
29
29
|
`npm install && npm run build`). Node 22.12 or later, and `git` and `npm` on
|
|
30
30
|
PATH.
|
|
@@ -69,15 +69,16 @@ kept. The sections below are each step in full.
|
|
|
69
69
|
|
|
70
70
|
## Hosted mode
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`
|
|
75
|
-
|
|
76
|
-
`
|
|
77
|
-
|
|
78
|
-
the
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
With the `lunox` MCP tools signed in (the plugin bundles the server; `/mcp`
|
|
73
|
+
signs in), read the workspace with `list_workspaces`, `list_repositories`,
|
|
74
|
+
`get_snapshot`, `list_sandboxes`, `get_sandbox` and `get_run`. For a connected
|
|
75
|
+
repository, and only when asked: `plan_slice` (read it with `get_run`),
|
|
76
|
+
`start_sandbox`, `cut_slice` (a draft version from a slice run and the approved
|
|
77
|
+
proposal) and `get_handout` (public files and the hidden suite's hash, never
|
|
78
|
+
the hidden tests). The platform keeps the receipt; patching stays local.
|
|
79
|
+
Approvals and publishing happen in the web app: point the person there. Never
|
|
80
|
+
ask for a token; the CLI signs in with `carveout login`. Local mode, below, is
|
|
81
|
+
the default.
|
|
81
82
|
|
|
82
83
|
## 1. Plan
|
|
83
84
|
|
|
@@ -14,7 +14,7 @@ description: >-
|
|
|
14
14
|
test to make it pass.
|
|
15
15
|
license: MIT
|
|
16
16
|
compatibility: >-
|
|
17
|
-
Node 22.12 or later, git and npm. Runs the carveout@0.
|
|
17
|
+
Node 22.12 or later, git and npm. Runs the carveout@0.2.0 CLI from npm.
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
# carveout-gate
|
|
@@ -23,9 +23,9 @@ What a change made in the repository reaches, and whether it weakened the checks
|
|
|
23
23
|
that would catch it. To hand a part of the repository to someone outside it
|
|
24
24
|
instead, use the `carveout` skill.
|
|
25
25
|
|
|
26
|
-
`carveout <command>` is the CLI, `carveout@0.
|
|
26
|
+
`carveout <command>` is the CLI, `carveout@0.2.0`. When `carveout --version`
|
|
27
27
|
prints another version or nothing, ask the person before installing it:
|
|
28
|
-
`npm i -g carveout@0.
|
|
28
|
+
`npm i -g carveout@0.2.0`, or put `npx carveout@0.2.0` in place of `carveout` in
|
|
29
29
|
each command (in a clone of the repository, `node dist/src/cli.js` after
|
|
30
30
|
`npm install && npm run build`). Node 22.12 or later, and `git` and `npm` on
|
|
31
31
|
PATH.
|