mossbear 0.1.0-alpha.117 → 0.1.0-alpha.118
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/artifacts/bundle-pull-limit.d.ts +4 -7
- package/dist/artifacts/bundle-pull-limit.d.ts.map +1 -1
- package/dist/artifacts/bundle-pull-limit.js +4 -7
- package/dist/artifacts/bundle-pull-limit.js.map +1 -1
- package/dist/artifacts/classify.d.ts +3 -10
- package/dist/artifacts/classify.d.ts.map +1 -1
- package/dist/artifacts/classify.js +3 -8
- package/dist/artifacts/classify.js.map +1 -1
- package/dist/artifacts/global-delivery.d.ts +1 -1
- package/dist/artifacts/global-namespace.d.ts +4 -4
- package/dist/artifacts/global-namespace.js +2 -2
- package/dist/artifacts/global-status.d.ts +0 -1
- package/dist/artifacts/global-status.d.ts.map +1 -1
- package/dist/artifacts/global-status.js +1 -1
- package/dist/artifacts/global-status.js.map +1 -1
- package/dist/artifacts/global-sync.d.ts +0 -1
- package/dist/artifacts/global-sync.d.ts.map +1 -1
- package/dist/artifacts/global-sync.js +2 -5
- package/dist/artifacts/global-sync.js.map +1 -1
- package/dist/artifacts/guide-projection.d.ts +23 -47
- package/dist/artifacts/guide-projection.d.ts.map +1 -1
- package/dist/artifacts/guide-projection.js +31 -45
- package/dist/artifacts/guide-projection.js.map +1 -1
- package/dist/artifacts/promote-plan.d.ts +0 -4
- package/dist/artifacts/promote-plan.d.ts.map +1 -1
- package/dist/artifacts/promote-plan.js +0 -6
- package/dist/artifacts/promote-plan.js.map +1 -1
- package/dist/artifacts/publish-ancestry.d.ts +2 -2
- package/dist/artifacts/publish-ancestry.d.ts.map +1 -1
- package/dist/artifacts/publish-ancestry.js +1 -12
- package/dist/artifacts/publish-ancestry.js.map +1 -1
- package/dist/artifacts/publish-identity.d.ts +3 -13
- package/dist/artifacts/publish-identity.d.ts.map +1 -1
- package/dist/artifacts/publish-identity.js +10 -26
- package/dist/artifacts/publish-identity.js.map +1 -1
- package/dist/artifacts/publish-plan.d.ts +1 -10
- package/dist/artifacts/publish-plan.d.ts.map +1 -1
- package/dist/artifacts/publish-plan.js +1 -8
- package/dist/artifacts/publish-plan.js.map +1 -1
- package/dist/artifacts/published-artifacts.d.ts +21 -35
- package/dist/artifacts/published-artifacts.d.ts.map +1 -1
- package/dist/artifacts/published-artifacts.js +77 -85
- package/dist/artifacts/published-artifacts.js.map +1 -1
- package/dist/artifacts/published-paths.d.ts +0 -8
- package/dist/artifacts/published-paths.d.ts.map +1 -1
- package/dist/artifacts/published-paths.js +0 -10
- package/dist/artifacts/published-paths.js.map +1 -1
- package/dist/artifacts/repo-config.d.ts +0 -5
- package/dist/artifacts/repo-config.d.ts.map +1 -1
- package/dist/artifacts/repo-config.js +4 -9
- package/dist/artifacts/repo-config.js.map +1 -1
- package/dist/artifacts/retirement-authority.d.ts +1 -1
- package/dist/artifacts/retirement-authority.d.ts.map +1 -1
- package/dist/artifacts/retirement-authority.js.map +1 -1
- package/dist/artifacts/sync-acquisition.d.ts +3 -6
- package/dist/artifacts/sync-acquisition.d.ts.map +1 -1
- package/dist/artifacts/sync-acquisition.js +11 -18
- package/dist/artifacts/sync-acquisition.js.map +1 -1
- package/dist/artifacts/sync-artifacts.d.ts +8 -22
- package/dist/artifacts/sync-artifacts.d.ts.map +1 -1
- package/dist/artifacts/sync-artifacts.js +13 -28
- package/dist/artifacts/sync-artifacts.js.map +1 -1
- package/dist/artifacts/sync-plan.d.ts +18 -36
- package/dist/artifacts/sync-plan.d.ts.map +1 -1
- package/dist/artifacts/sync-plan.js +17 -23
- package/dist/artifacts/sync-plan.js.map +1 -1
- package/dist/artifacts/sync-report.d.ts +5 -10
- package/dist/artifacts/sync-report.d.ts.map +1 -1
- package/dist/artifacts/sync-report.js +10 -29
- package/dist/artifacts/sync-report.js.map +1 -1
- package/dist/artifacts/working-skill-twins.d.ts.map +1 -1
- package/dist/artifacts/working-skill-twins.js +26 -3
- package/dist/artifacts/working-skill-twins.js.map +1 -1
- package/dist/commands/artifacts/stamp.d.ts.map +1 -1
- package/dist/commands/artifacts/stamp.js +2 -8
- package/dist/commands/artifacts/stamp.js.map +1 -1
- package/dist/commands/guides/active.d.ts.map +1 -1
- package/dist/commands/guides/active.js +2 -1
- package/dist/commands/guides/active.js.map +1 -1
- package/dist/commands/guides/search.d.ts.map +1 -1
- package/dist/commands/guides/search.js +1 -2
- package/dist/commands/guides/search.js.map +1 -1
- package/dist/commands/lifecycle.d.ts +3 -3
- package/dist/commands/lifecycle.js +1 -1
- package/dist/commands/lifecycle.js.map +1 -1
- package/dist/commands/promote.d.ts.map +1 -1
- package/dist/commands/promote.js +4 -7
- package/dist/commands/promote.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +4 -21
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/context/pull.d.ts +1 -1
- package/dist/context/pull.d.ts.map +1 -1
- package/dist/context/pull.js +33 -2
- package/dist/context/pull.js.map +1 -1
- package/dist/lifecycle/branch-drafts.d.ts.map +1 -1
- package/dist/lifecycle/branch-drafts.js +4 -10
- package/dist/lifecycle/branch-drafts.js.map +1 -1
- package/dist/lifecycle/publish-from-branch.d.ts.map +1 -1
- package/dist/lifecycle/publish-from-branch.js +3 -10
- package/dist/lifecycle/publish-from-branch.js.map +1 -1
- package/dist/lifecycle/retire-skipped-drafts.js +2 -2
- package/dist/lifecycle/retire-skipped-drafts.js.map +1 -1
- package/dist/mcp/client.d.ts +15 -15
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +3 -5
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/write-items.d.ts +4 -4
- package/dist/mcp/write-items.d.ts.map +1 -1
- package/dist/mcp/write-items.js +1 -2
- package/dist/mcp/write-items.js.map +1 -1
- package/dist/user-scope-hooks.d.ts +6 -6
- package/dist/user-scope-hooks.d.ts.map +1 -1
- package/dist/user-scope-hooks.js +128 -15
- package/dist/user-scope-hooks.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* endpoint). Without an explicit limit the endpoint
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* read that names no cursor ends there, so beyond this we surface the
|
|
7
|
-
* truncation rather than pretend the bundle is fully synced (no silent caps).
|
|
8
|
-
* The publishers page past it (`readPublishedArtifacts`).
|
|
2
|
+
* The page size for a paged bundle read: the server's maximum for one request
|
|
3
|
+
* (`MAX_LIMIT` in the items endpoint). Without an explicit limit the endpoint
|
|
4
|
+
* defaults to 100. A paged read follows the cursor past it
|
|
5
|
+
* (`readBundlePages`).
|
|
9
6
|
*/
|
|
10
7
|
export declare const MAX_BUNDLE_PULL = 500;
|
|
11
8
|
//# sourceMappingURL=bundle-pull-limit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-pull-limit.d.ts","sourceRoot":"","sources":["../../src/artifacts/bundle-pull-limit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bundle-pull-limit.d.ts","sourceRoot":"","sources":["../../src/artifacts/bundle-pull-limit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,MAAM,CAAA"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* endpoint). Without an explicit limit the endpoint
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* read that names no cursor ends there, so beyond this we surface the
|
|
7
|
-
* truncation rather than pretend the bundle is fully synced (no silent caps).
|
|
8
|
-
* The publishers page past it (`readPublishedArtifacts`).
|
|
2
|
+
* The page size for a paged bundle read: the server's maximum for one request
|
|
3
|
+
* (`MAX_LIMIT` in the items endpoint). Without an explicit limit the endpoint
|
|
4
|
+
* defaults to 100. A paged read follows the cursor past it
|
|
5
|
+
* (`readBundlePages`).
|
|
9
6
|
*/
|
|
10
7
|
export const MAX_BUNDLE_PULL = 500;
|
|
11
8
|
//# sourceMappingURL=bundle-pull-limit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-pull-limit.js","sourceRoot":"","sources":["../../src/artifacts/bundle-pull-limit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bundle-pull-limit.js","sourceRoot":"","sources":["../../src/artifacts/bundle-pull-limit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA"}
|
|
@@ -55,19 +55,12 @@ export type LocalClassification = {
|
|
|
55
55
|
state: 'edited';
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* We could not establish what the file is
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* - `unreadable` — the history could not be fetched at all, so there is no
|
|
62
|
-
* evidence either way and the caller's own baseline is the best it has.
|
|
63
|
-
* - `lookback-exhausted` — the history *was* read and the file matched none of
|
|
64
|
-
* the newest `MAX_VERSION_LOOKBACK` versions, but older ones went unchecked.
|
|
65
|
-
* Partial evidence, and pointed the wrong way: the file could still be one of
|
|
66
|
-
* our very old copies.
|
|
58
|
+
* We could not establish what the file is: the history could not be fetched,
|
|
59
|
+
* or the file matched none of the newest `MAX_VERSION_LOOKBACK` versions.
|
|
60
|
+
* Either way it is treated as the user's work.
|
|
67
61
|
*/
|
|
68
62
|
| {
|
|
69
63
|
state: 'unknown';
|
|
70
|
-
cause: 'unreadable' | 'lookback-exhausted';
|
|
71
64
|
reason: string;
|
|
72
65
|
};
|
|
73
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAKH,OAAO,KAAK,EAAE,aAAa,EAA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,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC,CA8C9B;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO,CAExE"}
|
|
@@ -99,13 +99,9 @@ export async function classifyLocalFile(client, bundleId, item, localBytes) {
|
|
|
99
99
|
}
|
|
100
100
|
catch (err) {
|
|
101
101
|
// Includes the 404 the server returns once an item leaves its bundle
|
|
102
|
-
// (
|
|
103
|
-
//
|
|
104
|
-
return {
|
|
105
|
-
state: 'unknown',
|
|
106
|
-
cause: 'unreadable',
|
|
107
|
-
reason: errText(err),
|
|
108
|
-
};
|
|
102
|
+
// (version reads are gated on current membership), so an orphan lands
|
|
103
|
+
// here rather than being mistaken for an unedited copy.
|
|
104
|
+
return { state: 'unknown', reason: errText(err) };
|
|
109
105
|
}
|
|
110
106
|
for (const version of page.versions) {
|
|
111
107
|
// Checked *before* consuming the entry, so `seen` counts only versions
|
|
@@ -129,7 +125,6 @@ export async function classifyLocalFile(client, bundleId, item, localBytes) {
|
|
|
129
125
|
}
|
|
130
126
|
return {
|
|
131
127
|
state: 'unknown',
|
|
132
|
-
cause: 'lookback-exhausted',
|
|
133
128
|
reason: `no match in the newest ${MAX_VERSION_LOOKBACK} versions`,
|
|
134
129
|
};
|
|
135
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAK1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;AAEvC,qEAAqE;AACrE,MAAM,iBAAiB,GAAG,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":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c,CAAC,KAAK,KAAK,QAAQ,IAAI,cAAc,CAAC,KAAK,KAAK,SAAS,CAAA;AAChF,CAAC"}
|
|
@@ -87,7 +87,7 @@ export type GlobalDeliverySyncOptions = {
|
|
|
87
87
|
prune?: boolean;
|
|
88
88
|
/**
|
|
89
89
|
* Every subscribed bundle the pass read, and whether each arrived complete,
|
|
90
|
-
* so a bundle that failed
|
|
90
|
+
* so a bundle that failed holds only the skills it
|
|
91
91
|
* delivered (`reconcileGlobalSkills`).
|
|
92
92
|
*/
|
|
93
93
|
bundles?: readonly BundleArrival[];
|
|
@@ -25,7 +25,7 @@ export declare function globalSkillsRoot(homeDir?: string): string;
|
|
|
25
25
|
*
|
|
26
26
|
* Sole-writership is what makes both delivery and retirement unambiguous, and
|
|
27
27
|
* it is the same argument that licenses pruning in `~/.mossbear/global/`
|
|
28
|
-
* (`mossbear-paths.ts
|
|
28
|
+
* (`MOSSBEAR_GLOBAL_DIR` in `mossbear-paths.ts`). It is not an argument for pruning anywhere else.
|
|
29
29
|
*/
|
|
30
30
|
export declare function namespaceDir(homeDir?: string): string;
|
|
31
31
|
/**
|
|
@@ -50,7 +50,7 @@ export declare function namespaceSkillsDir(homeDir?: string): string;
|
|
|
50
50
|
* It lives *inside* the namespace rather than under `~/.mossbear/state/`,
|
|
51
51
|
* because it must share the fate of what it describes. State is documented as
|
|
52
52
|
* derived — "deleting the directory costs recomputation and nothing else"
|
|
53
|
-
* (`mossbear-paths.ts
|
|
53
|
+
* (`mossbear-paths.ts`, above `MOSSBEAR_STATE_DIR`) — and this is not derivable: with no record, a
|
|
54
54
|
* file here cannot be proven ours, so it is kept rather than removed. That is
|
|
55
55
|
* the safe failure and the rail requires it, but it is not a *recomputation*,
|
|
56
56
|
* so the record does not belong in a directory whose contract says it is.
|
|
@@ -199,7 +199,7 @@ export type DeliveredSkill = {
|
|
|
199
199
|
* **Without this, one bundle that fails to arrive holds every removal.** A
|
|
200
200
|
* skill missing from the desired list is only retired when the bundles that
|
|
201
201
|
* delivered it are known to have arrived whole; with no record of which
|
|
202
|
-
* bundles those were, a single failed
|
|
202
|
+
* bundles those were, a single failed pull leaves every recorded
|
|
203
203
|
* skill's absence unproven, so a skill switched off in a bundle that did
|
|
204
204
|
* arrive stayed on disk for as long as an unrelated one kept failing.
|
|
205
205
|
*
|
|
@@ -221,7 +221,7 @@ export type BundleArrival = {
|
|
|
221
221
|
bundleId: string;
|
|
222
222
|
/**
|
|
223
223
|
* True when the pull read the whole bundle and every item in it was
|
|
224
|
-
* reconciled
|
|
224
|
+
* reconciled with no error. Only a complete bundle can prove
|
|
225
225
|
* that a skill it used to deliver is gone from it.
|
|
226
226
|
*/
|
|
227
227
|
complete: boolean;
|
|
@@ -81,7 +81,7 @@ export function globalSkillsRoot(homeDir = homedir()) {
|
|
|
81
81
|
*
|
|
82
82
|
* Sole-writership is what makes both delivery and retirement unambiguous, and
|
|
83
83
|
* it is the same argument that licenses pruning in `~/.mossbear/global/`
|
|
84
|
-
* (`mossbear-paths.ts
|
|
84
|
+
* (`MOSSBEAR_GLOBAL_DIR` in `mossbear-paths.ts`). It is not an argument for pruning anywhere else.
|
|
85
85
|
*/
|
|
86
86
|
export function namespaceDir(homeDir = homedir()) {
|
|
87
87
|
return join(globalSkillsRoot(homeDir), MOSSBEAR_NAMESPACE);
|
|
@@ -112,7 +112,7 @@ export function namespaceSkillsDir(homeDir = homedir()) {
|
|
|
112
112
|
* It lives *inside* the namespace rather than under `~/.mossbear/state/`,
|
|
113
113
|
* because it must share the fate of what it describes. State is documented as
|
|
114
114
|
* derived — "deleting the directory costs recomputation and nothing else"
|
|
115
|
-
* (`mossbear-paths.ts
|
|
115
|
+
* (`mossbear-paths.ts`, above `MOSSBEAR_STATE_DIR`) — and this is not derivable: with no record, a
|
|
116
116
|
* file here cannot be proven ours, so it is kept rather than removed. That is
|
|
117
117
|
* the safe failure and the rail requires it, but it is not a *recomputation*,
|
|
118
118
|
* so the record does not belong in a directory whose contract says it is.
|
|
@@ -66,7 +66,6 @@ export type CachedGuideForDelivery = {
|
|
|
66
66
|
/** The guide id — the same id a delivered item carries and a placement record keys on. */
|
|
67
67
|
id: string;
|
|
68
68
|
title: string;
|
|
69
|
-
enabled: boolean;
|
|
70
69
|
root?: GuideDiscoveryRoot | null | undefined;
|
|
71
70
|
path?: string | null | undefined;
|
|
72
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-status.d.ts","sourceRoot":"","sources":["../../src/artifacts/global-status.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAA;AAEzE,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,qBAAqB,CAAA;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB,mFAAmF;IACnF,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB;;;;OAIG;IACH,OAAO,EAAE,qBAAqB,CAAA;CAC/B,CAAA;AAQD,+EAA+E;AAC/E,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,OAAO,GAAG,IAAI,GACvB,qBAAqB,CAIvB;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,kBAAkB,EACxB,eAAe,EAAE,OAAO,GAAG,IAAI,EAC/B,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,GAAE,qBAA4B,GACpC,oBAAoB,CAYtB;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,SAAS,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1C,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GACxC,MAAM,EAAE,CA2BV;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAuBjF;AAuCD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,0FAA0F;IAC1F,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,sBAAsB,EAAE,EACzC,SAAS,EAAE,SAAS,gBAAgB,EAAE;AACtC,iFAAiF;AACjF,aAAa,GAAE,WAAW,CAAC,MAAM,CAAa,GAC7C,sBAAsB,EAAE,CAiB1B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,SAAS,sBAAsB,EAAE,GAC7C,MAAM,EAAE,CAcV"}
|
|
@@ -180,7 +180,7 @@ deliveredHere = new Set()) {
|
|
|
180
180
|
const seen = new Set();
|
|
181
181
|
const out = [];
|
|
182
182
|
for (const guide of guides) {
|
|
183
|
-
if (
|
|
183
|
+
if (guide.root !== 'global')
|
|
184
184
|
continue;
|
|
185
185
|
if (deliveredHere.has(guide.id))
|
|
186
186
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-status.js","sourceRoot":"","sources":["../../src/artifacts/global-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,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/** Settle after the catch: a whole pull with broken reconciliation is short. */
|
|
24
24
|
settleBundle(bundleId: string, outcome: {
|
|
25
25
|
error: string | undefined;
|
|
26
|
-
truncated: boolean;
|
|
27
26
|
}): void;
|
|
28
27
|
apply(): Promise<{
|
|
29
28
|
globalDelivery: import("./global-namespace.js").ReconcileOutcome[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-sync.d.ts","sourceRoot":"","sources":["../../src/artifacts/global-sync.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AASzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,KAAK,iBAAiB,GAAG,IAAI,CAC3B,yBAAyB,EACzB,QAAQ,GAAG,SAAS,GAAG,OAAO,CAC/B,GAAG;IACF,KAAK,EAAE,OAAO,CAAA;IACd,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE;QACN,KAAK,EAAE,eAAe,CAAA;QACtB,SAAS,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAA;QACvD,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;QAC/C,cAAc,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;KAC3C,CAAA;CACF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB;sBAQ7C,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC,QACxD,MAAM,YACF,MAAM,kBACA,WAAW,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+39,7 @@ export function openGlobalSync(options) {
|
|
|
39
39
|
},
|
|
40
40
|
/** Settle after the catch: a whole pull with broken reconciliation is short. */
|
|
41
41
|
settleBundle(bundleId, outcome) {
|
|
42
|
-
bundles.push({
|
|
43
|
-
bundleId,
|
|
44
|
-
complete: outcome.error === undefined && !outcome.truncated,
|
|
45
|
-
});
|
|
42
|
+
bundles.push({ bundleId, complete: outcome.error === undefined });
|
|
46
43
|
},
|
|
47
44
|
async apply() {
|
|
48
45
|
const globalDelivery = await syncGlobalDelivery({
|
|
@@ -59,7 +56,7 @@ export function openGlobalSync(options) {
|
|
|
59
56
|
})),
|
|
60
57
|
})),
|
|
61
58
|
// An unresolved subscription set or no arrivals proves no absence.
|
|
62
|
-
// Individual failed
|
|
59
|
+
// Individual failed arrivals hold their own skills below.
|
|
63
60
|
// Consent withdrawal remains the delivery grant's separate authority.
|
|
64
61
|
prune: prune && deliveryScope === 'all-subscriptions' && bundles.length > 0,
|
|
65
62
|
bundles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-sync.js","sourceRoot":"","sources":["../../src/artifacts/global-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAkC,MAAM,sBAAsB,CAAA;AACzF,OAAO,EACL,kBAAkB,GAGnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAqB1C;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAA0B;IACvD,MAAM,MAAM,GAAmD,EAAE,CAAA;IACjE,MAAM,OAAO,GAA8D,EAAE,CAAA;IAC7E,MAAM,OAAO,GAA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AC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,0CAA0C,EAAE,CAAC,CAAA;YAC9E,SAAQ;QACV,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;QAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACrB,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -9,62 +9,38 @@
|
|
|
9
9
|
* from), falling back to `.agents/<safe-name>.md` for dashboard-authored
|
|
10
10
|
* guides that carry neither.
|
|
11
11
|
*
|
|
12
|
-
* **
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* item instead — and no production caller supplies one: a `global` guide is not
|
|
19
|
-
* projected here at all but delivered into the consented harness skill roots by
|
|
20
|
-
* `./global-namespace.ts` (see {@link guideScopeRoots}). The last hop into
|
|
21
|
-
* `~/.claude/` is a separate question, and nothing callable may answer it.
|
|
12
|
+
* **Only the repo is a projection root.** A `global` item came from the user's
|
|
13
|
+
* home directory, and resolving it against the repo would turn a guide imported
|
|
14
|
+
* from `~/.claude/CLAUDE.md` into `<repo>/.claude/CLAUDE.md`, a fork of a file
|
|
15
|
+
* the user never asked to copy. A `global` guide is delivered into the
|
|
16
|
+
* consented harness skill roots by `./global-namespace.ts` instead, and one that
|
|
17
|
+
* reaches a resolver here is refused with a named reason.
|
|
22
18
|
*
|
|
23
19
|
* Paths are remote-supplied strings and are validated before a byte is
|
|
24
|
-
* written
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* in the scope root; and require realpath containment of the nearest existing
|
|
29
|
-
* ancestor, so a symlinked directory cannot carry the write outside it.
|
|
20
|
+
* written: reject absolute paths, parent traversal, and control characters;
|
|
21
|
+
* require lexical containment in the repo; and require realpath containment of
|
|
22
|
+
* the nearest existing ancestor, so a symlinked directory cannot carry the
|
|
23
|
+
* write outside it.
|
|
30
24
|
* A path that fails the guard is rejected and reported — never "fixed up".
|
|
31
25
|
*/
|
|
32
26
|
import type { GuideDiscoveryRoot } from '@mossbear/protocol';
|
|
33
27
|
/**
|
|
34
|
-
* The
|
|
28
|
+
* The root a projection resolves against: the repo checkout.
|
|
35
29
|
*
|
|
36
|
-
* `
|
|
37
|
-
* a `global` item is not projected by the docs phase at all. It is delivered
|
|
30
|
+
* A `global` item is not projected by the docs phase at all. It is delivered
|
|
38
31
|
* into the harness skill roots the user consented to (`./global-namespace.ts`
|
|
39
|
-
* → `reconcileGlobalSkills`) and nowhere else
|
|
40
|
-
* nowhere
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* The field stays optional in the type rather than being removed so that every
|
|
45
|
-
* resolver keeps its guard: an item declaring `root: 'global'` that reaches a
|
|
46
|
-
* resolver with no global root is refused with a named reason, never silently
|
|
47
|
-
* rewritten repo-relative — which is the fork this module exists to prevent.
|
|
48
|
-
*
|
|
49
|
-
* Production callers should not build this object by hand — use
|
|
50
|
-
* {@link guideScopeRoots}.
|
|
32
|
+
* → `reconcileGlobalSkills`) and nowhere else, and for a user who declined,
|
|
33
|
+
* nowhere. The docs phase never lets one reach a resolver (`planArtifact`'s
|
|
34
|
+
* `global` branch in `sync-plan.ts`); each resolver still refuses one rather
|
|
35
|
+
* than rewrite it repo-relative.
|
|
51
36
|
*/
|
|
52
37
|
export type GuideScopeRoots = {
|
|
53
38
|
project: string;
|
|
54
|
-
global?: string | undefined;
|
|
55
39
|
};
|
|
56
40
|
/**
|
|
57
41
|
* The scope roots for an ordinary sync or export in `repoRoot`.
|
|
58
42
|
*
|
|
59
|
-
*
|
|
60
|
-
* given differently at two call sites.** The answer is: it does not. Only the
|
|
61
|
-
* project root is offered, so a `global` item that reaches a resolver is refused
|
|
62
|
-
* rather than written into the checkout as a fork of the user's machine-wide
|
|
63
|
-
* guidance. The docs phase never lets one reach a resolver (`sync-plan.ts` →
|
|
64
|
-
* `planArtifact`, the `global` branch); the refusal is the guard for a caller that
|
|
65
|
-
* forgets that.
|
|
66
|
-
*
|
|
67
|
-
* There is no consent parameter, deliberately. A *callable* grant that widened
|
|
43
|
+
* There is no home-directory root and no consent parameter, deliberately. A *callable* grant that widened
|
|
68
44
|
* a projection to `~/.claude/` would be a prompt-injection primitive whose
|
|
69
45
|
* payoff is agent instructions on every future session on the machine. The
|
|
70
46
|
* write into another tool's directory is gated on the answer `mossbear init`
|
|
@@ -97,12 +73,12 @@ export type GuideProjection = {
|
|
|
97
73
|
*
|
|
98
74
|
* One spelling, here, because three modules ask about this directory and two of
|
|
99
75
|
* them decide something by the answer: the tracked-file sweep asks git for what
|
|
100
|
-
* is still in the index under it (`sync-
|
|
101
|
-
* reads this), and `classifyArtifactPlacement` below reads it to say whose copy of a
|
|
76
|
+
* is still in the index under it (`CONTEXT_DIR_PREFIX` in `sync-artifacts.ts`,
|
|
77
|
+
* which reads this), and `classifyArtifactPlacement` below reads it to say whose copy of a
|
|
102
78
|
* path is the record. A second literal would be two shapes of one fact.
|
|
103
79
|
*
|
|
104
80
|
* `defaultPullDir` builds the same prefix with `join` for the filesystem
|
|
105
|
-
* (`../context/pull.ts
|
|
81
|
+
* (`../context/pull.ts`); this is the git-facing spelling of it, and the
|
|
106
82
|
* two must not be swapped.
|
|
107
83
|
*/
|
|
108
84
|
export declare const MOSSBEAR_CONTEXT_DIR = ".mossbear/context";
|
|
@@ -126,7 +102,7 @@ export type ArtifactOwner = 'mossbear' | 'git';
|
|
|
126
102
|
* **Decided by the path alone, unlike `scope` and `owner`, and that is what
|
|
127
103
|
* keeps two callers from disagreeing.** The push rule knows the item's root; the
|
|
128
104
|
* report that names what it published knows only the path the item landed at
|
|
129
|
-
* (`sync-
|
|
105
|
+
* (`formatArtifactsSyncLine` in `sync-report.ts`). Were `record` to short-circuit on
|
|
130
106
|
* `scope` the way `owner` does, those two would answer differently about the
|
|
131
107
|
* same file — and that is reachable, not theoretical: `.mossbear/context/` is an
|
|
132
108
|
* *allowed* declared path (`@mossbear/protocol` → `MOSSBEAR_CONTENT_SUBTREES`),
|
|
@@ -135,7 +111,7 @@ export type ArtifactOwner = 'mossbear' | 'git';
|
|
|
135
111
|
* fact about where the file lives, and a global item's copy is no more git's
|
|
136
112
|
* than a repo one's. Saying so costs nothing: a global item's path is outside
|
|
137
113
|
* the repo root, so the probe already answers "no record" for it before any rule
|
|
138
|
-
* applies (`
|
|
114
|
+
* applies (`PlanEnv.readCommitted` in `sync-plan.ts`).
|
|
139
115
|
*/
|
|
140
116
|
export type ArtifactRecord = 'git' | 'server';
|
|
141
117
|
export type ArtifactPlacement = {
|
|
@@ -293,7 +269,7 @@ export type DocumentPlacement = {
|
|
|
293
269
|
*
|
|
294
270
|
* Only the mapping-free case reaches here. Once a mapping exists its path is
|
|
295
271
|
* authoritative and is never re-derived, so a doc moved (or renamed upstream)
|
|
296
|
-
* cannot sprout a second file (`sync-
|
|
272
|
+
* cannot sprout a second file (`writeMappedArtifact` in `sync-execution.ts`).
|
|
297
273
|
*/
|
|
298
274
|
export declare function resolveDocumentProjectionPath(roots: GuideScopeRoots, item: {
|
|
299
275
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guide-projection.d.ts","sourceRoot":"","sources":["../../src/artifacts/guide-projection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"guide-projection.d.ts","sourceRoot":"","sources":["../../src/artifacts/guide-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAcH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAEjE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J,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACjC,EACD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC;AACpC;;;;;;;GAOG;AACH,SAAS,EAAE,iBAAiB,EAC5B,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAmEjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgBxB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE;IACJ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACjC,EACD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA6C1B"}
|
|
@@ -9,24 +9,18 @@
|
|
|
9
9
|
* from), falling back to `.agents/<safe-name>.md` for dashboard-authored
|
|
10
10
|
* guides that carry neither.
|
|
11
11
|
*
|
|
12
|
-
* **
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* item instead — and no production caller supplies one: a `global` guide is not
|
|
19
|
-
* projected here at all but delivered into the consented harness skill roots by
|
|
20
|
-
* `./global-namespace.ts` (see {@link guideScopeRoots}). The last hop into
|
|
21
|
-
* `~/.claude/` is a separate question, and nothing callable may answer it.
|
|
12
|
+
* **Only the repo is a projection root.** A `global` item came from the user's
|
|
13
|
+
* home directory, and resolving it against the repo would turn a guide imported
|
|
14
|
+
* from `~/.claude/CLAUDE.md` into `<repo>/.claude/CLAUDE.md`, a fork of a file
|
|
15
|
+
* the user never asked to copy. A `global` guide is delivered into the
|
|
16
|
+
* consented harness skill roots by `./global-namespace.ts` instead, and one that
|
|
17
|
+
* reaches a resolver here is refused with a named reason.
|
|
22
18
|
*
|
|
23
19
|
* Paths are remote-supplied strings and are validated before a byte is
|
|
24
|
-
* written
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* in the scope root; and require realpath containment of the nearest existing
|
|
29
|
-
* ancestor, so a symlinked directory cannot carry the write outside it.
|
|
20
|
+
* written: reject absolute paths, parent traversal, and control characters;
|
|
21
|
+
* require lexical containment in the repo; and require realpath containment of
|
|
22
|
+
* the nearest existing ancestor, so a symlinked directory cannot carry the
|
|
23
|
+
* write outside it.
|
|
30
24
|
* A path that fails the guard is rejected and reported — never "fixed up".
|
|
31
25
|
*/
|
|
32
26
|
import { lstat, realpath } from 'node:fs/promises';
|
|
@@ -41,15 +35,7 @@ import { toPosix } from '../to-posix.js';
|
|
|
41
35
|
/**
|
|
42
36
|
* The scope roots for an ordinary sync or export in `repoRoot`.
|
|
43
37
|
*
|
|
44
|
-
*
|
|
45
|
-
* given differently at two call sites.** The answer is: it does not. Only the
|
|
46
|
-
* project root is offered, so a `global` item that reaches a resolver is refused
|
|
47
|
-
* rather than written into the checkout as a fork of the user's machine-wide
|
|
48
|
-
* guidance. The docs phase never lets one reach a resolver (`sync-plan.ts` →
|
|
49
|
-
* `planArtifact`, the `global` branch); the refusal is the guard for a caller that
|
|
50
|
-
* forgets that.
|
|
51
|
-
*
|
|
52
|
-
* There is no consent parameter, deliberately. A *callable* grant that widened
|
|
38
|
+
* There is no home-directory root and no consent parameter, deliberately. A *callable* grant that widened
|
|
53
39
|
* a projection to `~/.claude/` would be a prompt-injection primitive whose
|
|
54
40
|
* payoff is agent instructions on every future session on the machine. The
|
|
55
41
|
* write into another tool's directory is gated on the answer `mossbear init`
|
|
@@ -73,12 +59,12 @@ const MOSSBEAR_REPO_DIR = '.mossbear';
|
|
|
73
59
|
*
|
|
74
60
|
* One spelling, here, because three modules ask about this directory and two of
|
|
75
61
|
* them decide something by the answer: the tracked-file sweep asks git for what
|
|
76
|
-
* is still in the index under it (`sync-
|
|
77
|
-
* reads this), and `classifyArtifactPlacement` below reads it to say whose copy of a
|
|
62
|
+
* is still in the index under it (`CONTEXT_DIR_PREFIX` in `sync-artifacts.ts`,
|
|
63
|
+
* which reads this), and `classifyArtifactPlacement` below reads it to say whose copy of a
|
|
78
64
|
* path is the record. A second literal would be two shapes of one fact.
|
|
79
65
|
*
|
|
80
66
|
* `defaultPullDir` builds the same prefix with `join` for the filesystem
|
|
81
|
-
* (`../context/pull.ts
|
|
67
|
+
* (`../context/pull.ts`); this is the git-facing spelling of it, and the
|
|
82
68
|
* two must not be swapped.
|
|
83
69
|
*/
|
|
84
70
|
export const MOSSBEAR_CONTEXT_DIR = `${MOSSBEAR_REPO_DIR}/context`;
|
|
@@ -137,15 +123,15 @@ export async function resolveGuideProjectionPath(roots, item, usedStoredPaths, d
|
|
|
137
123
|
// An absent root reads as `project` — that is what every row predating the
|
|
138
124
|
// column meant, and guessing `global` for one would move a repo file into
|
|
139
125
|
// the user's home directory.
|
|
140
|
-
|
|
141
|
-
const scopeRoot = scope === 'global' ? roots.global : roots.project;
|
|
142
|
-
if (!scopeRoot) {
|
|
126
|
+
if (classifyArtifactPlacement({ root: item.root }).scope === 'global') {
|
|
143
127
|
return {
|
|
144
128
|
ok: false,
|
|
145
|
-
reason: 'guide is scoped to the home directory
|
|
129
|
+
reason: 'guide is scoped to the home directory — reported as not materialized rather than written into the project tree',
|
|
146
130
|
};
|
|
147
131
|
}
|
|
148
|
-
const
|
|
132
|
+
const scopeRoot = roots.project;
|
|
133
|
+
const where = 'the repo';
|
|
134
|
+
const scope = 'project';
|
|
149
135
|
// The declared path is identity; the origin is provenance and the fallback,
|
|
150
136
|
// so a row predating `guide_files.path` — or a guide the dashboard authored
|
|
151
137
|
// and never projected — keeps resolving exactly as it does today rather than
|
|
@@ -220,7 +206,7 @@ async function containedProjection(params) {
|
|
|
220
206
|
// `.mossbear/evals/AGENTS.md` and `.mossbear/evals/agents.md` are two paths and one
|
|
221
207
|
// file on macOS and Windows, so an exact-match claim lets both through — and
|
|
222
208
|
// the second item then either reads the first's content as a local edit or
|
|
223
|
-
// overwrites it, depending on the conflict mode.
|
|
209
|
+
// overwrites it, depending on the conflict mode.
|
|
224
210
|
//
|
|
225
211
|
// A scan rather than a normalized set because the set is the caller's and is
|
|
226
212
|
// also written to elsewhere in the pass; the bound is items-per-bundle, which
|
|
@@ -359,7 +345,7 @@ export function isStoredPathClaimed(claimed, storedPath) {
|
|
|
359
345
|
*
|
|
360
346
|
* Only the mapping-free case reaches here. Once a mapping exists its path is
|
|
361
347
|
* authoritative and is never re-derived, so a doc moved (or renamed upstream)
|
|
362
|
-
* cannot sprout a second file (`sync-
|
|
348
|
+
* cannot sprout a second file (`writeMappedArtifact` in `sync-execution.ts`).
|
|
363
349
|
*/
|
|
364
350
|
export async function resolveDocumentProjectionPath(roots, item, usedStoredPaths,
|
|
365
351
|
/**
|
|
@@ -378,15 +364,15 @@ placement, deps = {}) {
|
|
|
378
364
|
// A `global` one never reaches here — the sync reports it as out-of-scope
|
|
379
365
|
// before resolving a path — but the branch stays so this function is safe on
|
|
380
366
|
// its own terms rather than by its caller's discipline.
|
|
381
|
-
|
|
382
|
-
const scopeRoot = scope === 'global' ? roots.global : roots.project;
|
|
383
|
-
if (!scopeRoot) {
|
|
367
|
+
if (classifyArtifactPlacement({ root: item.root }).scope === 'global') {
|
|
384
368
|
return {
|
|
385
369
|
ok: false,
|
|
386
|
-
reason: 'artifact is scoped to the home directory
|
|
370
|
+
reason: 'artifact is scoped to the home directory — reported as not materialized rather than written into the project tree',
|
|
387
371
|
};
|
|
388
372
|
}
|
|
389
|
-
const
|
|
373
|
+
const scopeRoot = roots.project;
|
|
374
|
+
const where = 'the repo';
|
|
375
|
+
const scope = 'project';
|
|
390
376
|
const refusal = refuseUnsafeDeclaredPath('artifact', declared, 'refuse-reserved');
|
|
391
377
|
if (refusal)
|
|
392
378
|
return refusal;
|
|
@@ -486,15 +472,15 @@ export async function refuseUnsafeMappedTarget(root, absolutePath, deps = {}) {
|
|
|
486
472
|
export async function resolveEvalProjectionPath(roots, item, usedStoredPaths, deps = {}) {
|
|
487
473
|
// Same default as a guide: an absent root is `project`, which is what every
|
|
488
474
|
// row predating the column meant.
|
|
489
|
-
|
|
490
|
-
const scopeRoot = scope === 'global' ? roots.global : roots.project;
|
|
491
|
-
if (!scopeRoot) {
|
|
475
|
+
if (classifyArtifactPlacement({ root: item.root }).scope === 'global') {
|
|
492
476
|
return {
|
|
493
477
|
ok: false,
|
|
494
|
-
reason: 'eval criteria are scoped to the home directory
|
|
478
|
+
reason: 'eval criteria are scoped to the home directory — reported as not materialized rather than written into the project tree',
|
|
495
479
|
};
|
|
496
480
|
}
|
|
497
|
-
const
|
|
481
|
+
const scopeRoot = roots.project;
|
|
482
|
+
const where = 'the repo';
|
|
483
|
+
const scope = 'project';
|
|
498
484
|
const declared = typeof item.path === 'string' && item.path.length > 0 ? item.path : null;
|
|
499
485
|
if (declared === null) {
|
|
500
486
|
return {
|