@mulmoclaude/core 7.3.1 → 7.5.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 +1 -1
- package/dist/{root-CqxPNSyK.js → atomic-C3NMg6-j.js} +2 -20
- package/dist/atomic-C3NMg6-j.js.map +1 -0
- package/dist/{root-9lRFeXbm.cjs → atomic-cqafMWEI.cjs} +1 -25
- package/dist/atomic-cqafMWEI.cjs.map +1 -0
- package/dist/collection/registry/server/index.cjs +4 -4
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +3 -3
- package/dist/collection/server/index.cjs +3 -3
- package/dist/collection/server/index.js +3 -3
- package/dist/collection-watchers/index.cjs +3 -3
- package/dist/collection-watchers/index.js +3 -3
- package/dist/{discovery-RyuhNKjx.js → discovery-CImpaG95.js} +3 -2
- package/dist/{discovery-RyuhNKjx.js.map → discovery-CImpaG95.js.map} +1 -1
- package/dist/{discovery-DxmMcpFo.cjs → discovery-CY4pvgo9.cjs} +4 -3
- package/dist/{discovery-DxmMcpFo.cjs.map → discovery-CY4pvgo9.cjs.map} +1 -1
- package/dist/feeds/server/index.cjs +3 -3
- package/dist/feeds/server/index.js +3 -3
- package/dist/files/index.cjs +8 -13
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +3 -8
- package/dist/files/index.js.map +1 -1
- package/dist/google/index.cjs +3 -3
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.js +2 -2
- package/dist/json-BGdV2cz6.cjs +16 -0
- package/dist/json-BGdV2cz6.cjs.map +1 -0
- package/dist/json-BizOSThv.js +11 -0
- package/dist/json-BizOSThv.js.map +1 -0
- package/dist/root-Ccgd3H5S.cjs +29 -0
- package/dist/root-Ccgd3H5S.cjs.map +1 -0
- package/dist/root-s0MUUMQU.js +22 -0
- package/dist/root-s0MUUMQU.js.map +1 -0
- package/dist/runtime-plugins/containment.d.ts +5 -0
- package/dist/runtime-plugins/download.d.ts +12 -0
- package/dist/runtime-plugins/extract.d.ts +19 -0
- package/dist/runtime-plugins/fetchPackage.d.ts +52 -0
- package/dist/runtime-plugins/index.cjs +1060 -0
- package/dist/runtime-plugins/index.cjs.map +1 -0
- package/dist/runtime-plugins/index.d.ts +11 -0
- package/dist/runtime-plugins/index.js +1020 -0
- package/dist/runtime-plugins/index.js.map +1 -0
- package/dist/runtime-plugins/inspect.d.ts +18 -0
- package/dist/runtime-plugins/install.d.ts +48 -0
- package/dist/runtime-plugins/installSource.d.ts +34 -0
- package/dist/runtime-plugins/ledger.d.ts +17 -0
- package/dist/runtime-plugins/ledgerWrite.d.ts +17 -0
- package/dist/runtime-plugins/load.d.ts +77 -0
- package/dist/runtime-plugins/npmBuiltinNames.d.ts +1 -0
- package/dist/runtime-plugins/packageJson.d.ts +29 -0
- package/dist/{server-xdXBsiba.js → server-B5TZjZN9.js} +3 -3
- package/dist/{server-xdXBsiba.js.map → server-B5TZjZN9.js.map} +1 -1
- package/dist/{server-ZKTtI8_W.cjs → server-BXtSbL-b.cjs} +6 -6
- package/dist/{server-ZKTtI8_W.cjs.map → server-BXtSbL-b.cjs.map} +1 -1
- package/package.json +7 -1
- package/dist/root-9lRFeXbm.cjs.map +0 -1
- package/dist/root-CqxPNSyK.js.map +0 -1
package/dist/google/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _t as createForwardingLogger, d as storeFor, n as discoverCollections, rt as getWorkspaceRoot, vt as createHostSlot } from "../discovery-
|
|
1
|
+
import { _t as createForwardingLogger, d as storeFor, n as discoverCollections, rt as getWorkspaceRoot, vt as createHostSlot } from "../discovery-CImpaG95.js";
|
|
2
2
|
import "../errors-0QwjDxsv.js";
|
|
3
3
|
import { f as parseIsoDate, p as parseIsoDateTime } from "../itemId-D_pSpa3U.js";
|
|
4
4
|
import { t as truncate } from "../text-BQAuwKVj.js";
|
|
5
5
|
import { t as mulmoConfigDir } from "../paths-BMQNHdaJ.js";
|
|
6
|
-
import {
|
|
6
|
+
import { n as writeFileAtomic } from "../atomic-C3NMg6-j.js";
|
|
7
7
|
import { fetchWithTimeout } from "../utils/fetch.js";
|
|
8
8
|
import { i as hasStringProp, t as errorMessage } from "../dist-BmO4oSQy.js";
|
|
9
9
|
import { t as mergeIntoExisting } from "../project-mU6-xLfy.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_atomic = require("./atomic-cqafMWEI.cjs");
|
|
2
|
+
// src/files/json.ts
|
|
3
|
+
var JSON_INDENT = 2;
|
|
4
|
+
/** Atomic JSON write (2-space indent) — serialize then write through the atomic
|
|
5
|
+
* tmp-file + rename seam so a reader never sees a half-written document. */
|
|
6
|
+
async function writeJsonAtomic(filePath, data, opts = {}) {
|
|
7
|
+
await require_atomic.writeFileAtomic(filePath, JSON.stringify(data, null, JSON_INDENT), opts);
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(exports, "writeJsonAtomic", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return writeJsonAtomic;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=json-BGdV2cz6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-BGdV2cz6.cjs","names":["writeFileAtomic"],"sources":["../src/files/json.ts"],"sourcesContent":["import { writeFileAtomic, type WriteAtomicOptions } from \"./atomic.js\";\n\nconst JSON_INDENT = 2;\n\n/** Atomic JSON write (2-space indent) — serialize then write through the atomic\n * tmp-file + rename seam so a reader never sees a half-written document. */\nexport async function writeJsonAtomic(filePath: string, data: unknown, opts: WriteAtomicOptions = {}): Promise<void> {\n await writeFileAtomic(filePath, JSON.stringify(data, null, JSON_INDENT), opts);\n}\n"],"mappings":";;AAEA,IAAM,cAAc;;;AAIpB,eAAsB,gBAAgB,UAAkB,MAAe,OAA2B,CAAC,GAAkB;CACnH,MAAMA,eAAAA,gBAAgB,UAAU,KAAK,UAAU,MAAM,MAAM,WAAW,GAAG,IAAI;AAC/E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { n as writeFileAtomic } from "./atomic-C3NMg6-j.js";
|
|
2
|
+
// src/files/json.ts
|
|
3
|
+
var JSON_INDENT = 2;
|
|
4
|
+
/** Atomic JSON write (2-space indent) — serialize then write through the atomic
|
|
5
|
+
* tmp-file + rename seam so a reader never sees a half-written document. */
|
|
6
|
+
async function writeJsonAtomic(filePath, data, opts = {}) {
|
|
7
|
+
await writeFileAtomic(filePath, JSON.stringify(data, null, JSON_INDENT), opts);
|
|
8
|
+
}
|
|
9
|
+
export { writeJsonAtomic as t };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=json-BizOSThv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-BizOSThv.js","names":[],"sources":["../src/files/json.ts"],"sourcesContent":["import { writeFileAtomic, type WriteAtomicOptions } from \"./atomic.js\";\n\nconst JSON_INDENT = 2;\n\n/** Atomic JSON write (2-space indent) — serialize then write through the atomic\n * tmp-file + rename seam so a reader never sees a half-written document. */\nexport async function writeJsonAtomic(filePath: string, data: unknown, opts: WriteAtomicOptions = {}): Promise<void> {\n await writeFileAtomic(filePath, JSON.stringify(data, null, JSON_INDENT), opts);\n}\n"],"mappings":";;AAEA,IAAM,cAAc;;;AAIpB,eAAsB,gBAAgB,UAAkB,MAAe,OAA2B,CAAC,GAAkB;CACnH,MAAM,gBAAgB,UAAU,KAAK,UAAU,MAAM,MAAM,WAAW,GAAG,IAAI;AAC/E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
2
|
+
let node_path = require("node:path");
|
|
3
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
4
|
+
// src/files/root.ts
|
|
5
|
+
/** The canonical form of a root, for every place a root becomes an IDENTITY
|
|
6
|
+
* rather than a path to read.
|
|
7
|
+
*
|
|
8
|
+
* `path.resolve` only — it collapses `.`/`..` and the trailing separator, so
|
|
9
|
+
* `/work/project` and `/work/project/` are one root instead of two watcher
|
|
10
|
+
* generations over the same tree, two bells per record, and two scheduled
|
|
11
|
+
* refresh jobs.
|
|
12
|
+
*
|
|
13
|
+
* Deliberately NOT `realpath`. Resolving symlinks is async (so it could not run
|
|
14
|
+
* on a synchronous claim path), it fails for a root that does not exist yet,
|
|
15
|
+
* and it would put a path the host never named into an id that is written to
|
|
16
|
+
* disk. The policy is therefore lexical: a host that hands the same tree under
|
|
17
|
+
* two different symlink spellings gets two roots, and it is the host's job to
|
|
18
|
+
* name a project the same way every time. */
|
|
19
|
+
function canonicalRoot(root) {
|
|
20
|
+
return node_path.default.resolve(root);
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(exports, "canonicalRoot", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return canonicalRoot;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=root-Ccgd3H5S.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-Ccgd3H5S.cjs","names":["path"],"sources":["../src/files/root.ts"],"sourcesContent":["// The canonical form of a workspace / project root.\n//\n// Lives here rather than in the collection engine because a root is an IDENTITY\n// in several subsystems that do not depend on each other — a watcher generation\n// key, a change payload, a completion-bell id, a scheduled task id — and every\n// one of them has to agree on it or the same project registers twice.\n\nimport path from \"node:path\";\n\n/** The canonical form of a root, for every place a root becomes an IDENTITY\n * rather than a path to read.\n *\n * `path.resolve` only — it collapses `.`/`..` and the trailing separator, so\n * `/work/project` and `/work/project/` are one root instead of two watcher\n * generations over the same tree, two bells per record, and two scheduled\n * refresh jobs.\n *\n * Deliberately NOT `realpath`. Resolving symlinks is async (so it could not run\n * on a synchronous claim path), it fails for a root that does not exist yet,\n * and it would put a path the host never named into an id that is written to\n * disk. The policy is therefore lexical: a host that hands the same tree under\n * two different symlink spellings gets two roots, and it is the host's job to\n * name a project the same way every time. */\nexport function canonicalRoot(root: string): string {\n return path.resolve(root);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,SAAgB,cAAc,MAAsB;CAClD,OAAOA,UAAAA,QAAK,QAAQ,IAAI;AAC1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
// src/files/root.ts
|
|
3
|
+
/** The canonical form of a root, for every place a root becomes an IDENTITY
|
|
4
|
+
* rather than a path to read.
|
|
5
|
+
*
|
|
6
|
+
* `path.resolve` only — it collapses `.`/`..` and the trailing separator, so
|
|
7
|
+
* `/work/project` and `/work/project/` are one root instead of two watcher
|
|
8
|
+
* generations over the same tree, two bells per record, and two scheduled
|
|
9
|
+
* refresh jobs.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately NOT `realpath`. Resolving symlinks is async (so it could not run
|
|
12
|
+
* on a synchronous claim path), it fails for a root that does not exist yet,
|
|
13
|
+
* and it would put a path the host never named into an id that is written to
|
|
14
|
+
* disk. The policy is therefore lexical: a host that hands the same tree under
|
|
15
|
+
* two different symlink spellings gets two roots, and it is the host's job to
|
|
16
|
+
* name a project the same way every time. */
|
|
17
|
+
function canonicalRoot(root) {
|
|
18
|
+
return path.resolve(root);
|
|
19
|
+
}
|
|
20
|
+
export { canonicalRoot as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=root-s0MUUMQU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-s0MUUMQU.js","names":[],"sources":["../src/files/root.ts"],"sourcesContent":["// The canonical form of a workspace / project root.\n//\n// Lives here rather than in the collection engine because a root is an IDENTITY\n// in several subsystems that do not depend on each other — a watcher generation\n// key, a change payload, a completion-bell id, a scheduled task id — and every\n// one of them has to agree on it or the same project registers twice.\n\nimport path from \"node:path\";\n\n/** The canonical form of a root, for every place a root becomes an IDENTITY\n * rather than a path to read.\n *\n * `path.resolve` only — it collapses `.`/`..` and the trailing separator, so\n * `/work/project` and `/work/project/` are one root instead of two watcher\n * generations over the same tree, two bells per record, and two scheduled\n * refresh jobs.\n *\n * Deliberately NOT `realpath`. Resolving symlinks is async (so it could not run\n * on a synchronous claim path), it fails for a root that does not exist yet,\n * and it would put a path the host never named into an id that is written to\n * disk. The policy is therefore lexical: a host that hands the same tree under\n * two different symlink spellings gets two roots, and it is the host's job to\n * name a project the same way every time. */\nexport function canonicalRoot(root: string): string {\n return path.resolve(root);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,SAAgB,cAAc,MAAsB;CAClD,OAAO,KAAK,QAAQ,IAAI;AAC1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** True when `file` exists and, with every link followed, is inside `root`. */
|
|
2
|
+
export declare function resolvesInside(file: string, root: string): boolean;
|
|
3
|
+
/** The first symlink under `root` that leads outside it (or nowhere), relative to `root`; null when
|
|
4
|
+
* every link stays inside. */
|
|
5
|
+
export declare function linkLeadingOut(root: string, dir?: string): string | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type FetchFn = typeof fetch;
|
|
2
|
+
export interface DownloadLimits {
|
|
3
|
+
timeoutMs: number;
|
|
4
|
+
maxBytes: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class DownloadError extends Error {
|
|
7
|
+
}
|
|
8
|
+
export declare function downloadBytes(fetchFn: FetchFn, url: string, headers: Record<string, string>, limits: DownloadLimits): Promise<Buffer>;
|
|
9
|
+
export declare function downloadJson(fetchFn: FetchFn, url: string, headers: Record<string, string>, limits: DownloadLimits): Promise<unknown>;
|
|
10
|
+
/** Whether `bytes` match an npm `dist.integrity` (Subresource Integrity, possibly several space-
|
|
11
|
+
* separated hashes) — the strongest algorithm present must match. False when none is recognised. */
|
|
12
|
+
export declare function matchesIntegrity(bytes: Uint8Array, integrity: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Sentinel file written at the end of a successful extract. The
|
|
2
|
+
* loader uses its presence (not just `existsSync(cachePath)`) as the
|
|
3
|
+
* cache-validity check, so a partial extract (interrupted tar, ENOSPC
|
|
4
|
+
* half-write) is detected and re-extracted on the next boot instead
|
|
5
|
+
* of becoming a permanent broken state. */
|
|
6
|
+
export declare const EXTRACT_MARKER = ".extract-complete";
|
|
7
|
+
export declare function isCacheValid(cachePath: string): boolean;
|
|
8
|
+
/** Run `tar xzf` to extract a tgz into the version-keyed cache slot.
|
|
9
|
+
* `--strip-components=1` drops the `package/` prefix that npm packs
|
|
10
|
+
* add. `execFileSync` (not `execSync`) so paths bypass shell parsing
|
|
11
|
+
* and never trip on metacharacters in workspace paths. Synchronous
|
|
12
|
+
* because boot is single-threaded and the alternative (a stream
|
|
13
|
+
* pipeline) adds dependencies for no benefit.
|
|
14
|
+
*
|
|
15
|
+
* On failure, the partial directory is removed so the next boot
|
|
16
|
+
* re-extracts cleanly (no sticky broken state). The completion
|
|
17
|
+
* marker is written ONLY after tar exits 0 — readers should test
|
|
18
|
+
* `isCacheValid()`, not `existsSync(cachePath)`. */
|
|
19
|
+
export declare function extractTgz(tgzAbs: string, destDir: string): void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FetchFn } from './download.js';
|
|
2
|
+
import { InstallSource } from './installSource.js';
|
|
3
|
+
export declare const NPM_REGISTRY = "https://registry.npmjs.org";
|
|
4
|
+
export declare const GITHUB_API = "https://api.github.com";
|
|
5
|
+
export interface FetchedPackage {
|
|
6
|
+
bytes: Buffer;
|
|
7
|
+
/** The npm version or GitHub tag that was resolved, for the ledger's `source`. */
|
|
8
|
+
resolved: string;
|
|
9
|
+
}
|
|
10
|
+
export interface NpmRelease {
|
|
11
|
+
version: string;
|
|
12
|
+
tarball: string;
|
|
13
|
+
integrity: string | null;
|
|
14
|
+
}
|
|
15
|
+
/** A decision that either holds a value or says why there is none. */
|
|
16
|
+
export type Resolved<T> = {
|
|
17
|
+
ok: true;
|
|
18
|
+
value: T;
|
|
19
|
+
} | {
|
|
20
|
+
ok: false;
|
|
21
|
+
error: string;
|
|
22
|
+
};
|
|
23
|
+
/** The version a packument resolves `spec` to — exact, a dist-tag, or `latest` when absent. */
|
|
24
|
+
export declare function resolveNpmRelease(packument: unknown, spec: string | null): Resolved<NpmRelease>;
|
|
25
|
+
/** Whether the downloaded bytes are the ones the registry published, by its strongest hash. */
|
|
26
|
+
export declare function verifyNpmBytes(bytes: Uint8Array, release: NpmRelease): string | null;
|
|
27
|
+
export interface GithubAsset {
|
|
28
|
+
tag: string;
|
|
29
|
+
name: string;
|
|
30
|
+
/** The browser download URL, for an unauthenticated download. */
|
|
31
|
+
downloadUrl: string;
|
|
32
|
+
/** The API URL of the asset, for a download with a token (private repositories). */
|
|
33
|
+
apiUrl: string;
|
|
34
|
+
/** GitHub's own `sha256:<hex>` for the asset, when the API gives one (assets uploaded before GitHub
|
|
35
|
+
* started recording digests have none). */
|
|
36
|
+
digest: string | null;
|
|
37
|
+
}
|
|
38
|
+
/** The release's one `.tgz` asset. None, or several, is refused: guessing which file is the plugin
|
|
39
|
+
* is exactly what a user should not have to trust. */
|
|
40
|
+
export declare function resolveGithubAsset(release: unknown): Resolved<GithubAsset>;
|
|
41
|
+
/** Whether the bytes are the asset GitHub recorded. An asset with no digest is accepted — older
|
|
42
|
+
* uploads carry none, and the bytes still came over https from GitHub — but a digest that is present
|
|
43
|
+
* must be a sha256 and must match. */
|
|
44
|
+
export declare function verifyGithubBytes(bytes: Uint8Array, asset: GithubAsset): string | null;
|
|
45
|
+
export interface FetchDeps {
|
|
46
|
+
fetch: FetchFn;
|
|
47
|
+
/** Sent to GitHub when present: raises the rate limit and reaches private repositories. */
|
|
48
|
+
githubToken?: string | undefined;
|
|
49
|
+
npmRegistry?: string | undefined;
|
|
50
|
+
githubApi?: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
export declare const fetchPackage: (source: InstallSource, deps: FetchDeps) => Promise<FetchedPackage>;
|