@shardworks/nexus-core 0.1.5 → 0.1.6
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/bundle.d.ts +111 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +438 -0
- package/dist/bundle.js.map +1 -0
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.d.ts.map +1 -1
- package/dist/guild-config.d.ts +9 -5
- package/dist/guild-config.d.ts.map +1 -1
- package/dist/guild-config.js +4 -5
- package/dist/guild-config.js.map +1 -1
- package/dist/implement.d.ts +2 -2
- package/dist/implement.d.ts.map +1 -1
- package/dist/implement.js +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/init-guild.d.ts +14 -11
- package/dist/init-guild.d.ts.map +1 -1
- package/dist/init-guild.js +29 -39
- package/dist/init-guild.js.map +1 -1
- package/dist/install-tool.d.ts +29 -26
- package/dist/install-tool.d.ts.map +1 -1
- package/dist/install-tool.js +185 -142
- package/dist/install-tool.js.map +1 -1
- package/dist/instantiate.d.ts +1 -1
- package/dist/instantiate.d.ts.map +1 -1
- package/dist/instantiate.js +6 -7
- package/dist/instantiate.js.map +1 -1
- package/dist/nexus-home.d.ts +15 -8
- package/dist/nexus-home.d.ts.map +1 -1
- package/dist/nexus-home.js +32 -17
- package/dist/nexus-home.js.map +1 -1
- package/dist/rehydrate.d.ts +15 -0
- package/dist/rehydrate.d.ts.map +1 -0
- package/dist/rehydrate.js +84 -0
- package/dist/rehydrate.js.map +1 -0
- package/dist/remove-tool.d.ts +0 -3
- package/dist/remove-tool.d.ts.map +1 -1
- package/dist/remove-tool.js +21 -40
- package/dist/remove-tool.js.map +1 -1
- package/package.json +1 -1
- package/dist/base-tools.d.ts +0 -27
- package/dist/base-tools.d.ts.map +0 -1
- package/dist/base-tools.js +0 -30
- package/dist/base-tools.js.map +0 -1
- package/dist/bootstrap.d.ts +0 -14
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -46
- package/dist/bootstrap.js.map +0 -1
- package/dist/publish.d.ts +0 -20
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -41
- package/dist/publish.js.map +0 -1
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle — a manifest that delivers multiple installable artifacts to a guild.
|
|
3
|
+
*
|
|
4
|
+
* A bundle is a recipe, not a dependency. The installer reads the manifest,
|
|
5
|
+
* installs each artifact individually (via installTool), and discards the
|
|
6
|
+
* bundle itself. Each artifact becomes an independent guild dependency.
|
|
7
|
+
*
|
|
8
|
+
* ## Manifest: `nexus-bundle.json`
|
|
9
|
+
*
|
|
10
|
+
* The manifest has explicit top-level arrays for each artifact category:
|
|
11
|
+
* - `implements` and `engines` require a `package` specifier (runtime code)
|
|
12
|
+
* - `curricula` and `temperaments` support `package` OR `path` (content-only)
|
|
13
|
+
*
|
|
14
|
+
* ## Transitive bundles
|
|
15
|
+
*
|
|
16
|
+
* A package entry can itself contain a `nexus-bundle.json`. The installer
|
|
17
|
+
* recurses, so bundles can compose other bundles.
|
|
18
|
+
*/
|
|
19
|
+
/** A package-based artifact entry (implements and engines). */
|
|
20
|
+
export interface BundlePackageEntry {
|
|
21
|
+
/** npm package specifier or git URL. */
|
|
22
|
+
package: string;
|
|
23
|
+
/** Override the artifact name in the guild. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** Roles for implements (which roles can use this tool). */
|
|
26
|
+
roles?: string[];
|
|
27
|
+
}
|
|
28
|
+
/** A content artifact entry (curricula and temperaments). */
|
|
29
|
+
export interface BundleContentEntry {
|
|
30
|
+
/** npm package specifier or git URL. */
|
|
31
|
+
package?: string;
|
|
32
|
+
/** Path relative to the bundle root for inline content. */
|
|
33
|
+
path?: string;
|
|
34
|
+
/** Override the artifact name in the guild. */
|
|
35
|
+
name?: string;
|
|
36
|
+
}
|
|
37
|
+
/** A migration entry (always inline via `path`). */
|
|
38
|
+
export interface BundleMigrationEntry {
|
|
39
|
+
/** Path relative to the bundle root for the .sql file. */
|
|
40
|
+
path: string;
|
|
41
|
+
}
|
|
42
|
+
/** The `nexus-bundle.json` manifest shape. */
|
|
43
|
+
export interface BundleManifest {
|
|
44
|
+
/** Human-readable description of the bundle. */
|
|
45
|
+
description?: string;
|
|
46
|
+
/** Implements to install (require `package`). */
|
|
47
|
+
implements?: BundlePackageEntry[];
|
|
48
|
+
/** Engines to install (require `package`). */
|
|
49
|
+
engines?: BundlePackageEntry[];
|
|
50
|
+
/** Curricula to install (`package` or `path`). */
|
|
51
|
+
curricula?: BundleContentEntry[];
|
|
52
|
+
/** Temperaments to install (`package` or `path`). */
|
|
53
|
+
temperaments?: BundleContentEntry[];
|
|
54
|
+
/** Migrations to install (always inline, renumbered on install). */
|
|
55
|
+
migrations?: BundleMigrationEntry[];
|
|
56
|
+
}
|
|
57
|
+
export interface InstallBundleOptions {
|
|
58
|
+
/** Absolute path to the guild root directory. */
|
|
59
|
+
home: string;
|
|
60
|
+
/** Absolute path to the bundle directory (contains nexus-bundle.json). */
|
|
61
|
+
bundleDir: string;
|
|
62
|
+
/** Bundle provenance string, e.g. "@shardworks/guild-starter-kit@0.1.0". */
|
|
63
|
+
bundleSource?: string;
|
|
64
|
+
/** Whether to create a git commit after installing. Defaults to true. */
|
|
65
|
+
commit?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface InstallBundleResult {
|
|
68
|
+
/** Number of artifacts installed. */
|
|
69
|
+
installed: number;
|
|
70
|
+
/** Names of installed artifacts, grouped by category. */
|
|
71
|
+
artifacts: {
|
|
72
|
+
implements: string[];
|
|
73
|
+
engines: string[];
|
|
74
|
+
curricula: string[];
|
|
75
|
+
temperaments: string[];
|
|
76
|
+
migrations: string[];
|
|
77
|
+
};
|
|
78
|
+
/** Provenance map for installed migrations: guild filename → { bundle, originalName }. */
|
|
79
|
+
migrationProvenance?: Record<string, {
|
|
80
|
+
bundle: string;
|
|
81
|
+
originalName: string;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Check if a directory contains a nexus-bundle.json manifest.
|
|
86
|
+
*/
|
|
87
|
+
export declare function isBundleDir(dir: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Read and validate a nexus-bundle.json manifest.
|
|
90
|
+
*
|
|
91
|
+
* Enforces schema rules:
|
|
92
|
+
* - implements/engines must use `package`, not `path`
|
|
93
|
+
* - curricula/temperaments must have either `package` or `path`
|
|
94
|
+
*/
|
|
95
|
+
export declare function readBundleManifest(bundleDir: string): BundleManifest;
|
|
96
|
+
/**
|
|
97
|
+
* Install a bundle into a guild.
|
|
98
|
+
*
|
|
99
|
+
* Reads the bundle manifest, installs all referenced artifacts individually,
|
|
100
|
+
* and optionally commits the result. The bundle itself is NOT retained as
|
|
101
|
+
* a guild dependency — each artifact is installed independently.
|
|
102
|
+
*
|
|
103
|
+
* Package artifacts (implements, engines, and packaged content) are installed
|
|
104
|
+
* via npm. Inline content artifacts (curricula/temperaments with `path`) are
|
|
105
|
+
* copied directly from the bundle directory.
|
|
106
|
+
*
|
|
107
|
+
* If an installed package contains its own `nexus-bundle.json`, the installer
|
|
108
|
+
* recurses to install the transitive bundle's artifacts.
|
|
109
|
+
*/
|
|
110
|
+
export declare function installBundle(opts: InstallBundleOptions): InstallBundleResult;
|
|
111
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAUH,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,KA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CAAC;IACF,0FAA0F;IAC1F,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF;AAkCD;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD;AAID;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CA+DpE;AA8ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,mBAAmB,CAqP7E"}
|
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle — a manifest that delivers multiple installable artifacts to a guild.
|
|
3
|
+
*
|
|
4
|
+
* A bundle is a recipe, not a dependency. The installer reads the manifest,
|
|
5
|
+
* installs each artifact individually (via installTool), and discards the
|
|
6
|
+
* bundle itself. Each artifact becomes an independent guild dependency.
|
|
7
|
+
*
|
|
8
|
+
* ## Manifest: `nexus-bundle.json`
|
|
9
|
+
*
|
|
10
|
+
* The manifest has explicit top-level arrays for each artifact category:
|
|
11
|
+
* - `implements` and `engines` require a `package` specifier (runtime code)
|
|
12
|
+
* - `curricula` and `temperaments` support `package` OR `path` (content-only)
|
|
13
|
+
*
|
|
14
|
+
* ## Transitive bundles
|
|
15
|
+
*
|
|
16
|
+
* A package entry can itself contain a `nexus-bundle.json`. The installer
|
|
17
|
+
* recurses, so bundles can compose other bundles.
|
|
18
|
+
*/
|
|
19
|
+
import fs from 'node:fs';
|
|
20
|
+
import path from 'node:path';
|
|
21
|
+
import { execFileSync } from 'node:child_process';
|
|
22
|
+
import { installTool } from "./install-tool.js";
|
|
23
|
+
import { readGuildConfig, writeGuildConfig } from "./guild-config.js";
|
|
24
|
+
// ── Helpers ─────────────────────────────────────────────────────────────
|
|
25
|
+
const BUNDLE_MANIFEST = 'nexus-bundle.json';
|
|
26
|
+
function git(args, cwd) {
|
|
27
|
+
execFileSync('git', args, { cwd, stdio: 'pipe' });
|
|
28
|
+
}
|
|
29
|
+
function npm(args, cwd) {
|
|
30
|
+
return execFileSync('npm', args, { cwd, stdio: 'pipe', encoding: 'utf-8' });
|
|
31
|
+
}
|
|
32
|
+
function readJson(filePath) {
|
|
33
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
34
|
+
}
|
|
35
|
+
// ── Descriptor types for each category ──────────────────────────────────
|
|
36
|
+
const DESCRIPTOR_MAP = {
|
|
37
|
+
implements: 'nexus-implement.json',
|
|
38
|
+
engines: 'nexus-engine.json',
|
|
39
|
+
curricula: 'nexus-curriculum.json',
|
|
40
|
+
temperaments: 'nexus-temperament.json',
|
|
41
|
+
};
|
|
42
|
+
const DIR_MAP = {
|
|
43
|
+
implements: 'implements',
|
|
44
|
+
engines: 'engines',
|
|
45
|
+
curricula: 'training/curricula',
|
|
46
|
+
temperaments: 'training/temperaments',
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Check if a directory contains a nexus-bundle.json manifest.
|
|
50
|
+
*/
|
|
51
|
+
export function isBundleDir(dir) {
|
|
52
|
+
return fs.existsSync(path.join(dir, BUNDLE_MANIFEST));
|
|
53
|
+
}
|
|
54
|
+
// ── Validation ──────────────────────────────────────────────────────────
|
|
55
|
+
/**
|
|
56
|
+
* Read and validate a nexus-bundle.json manifest.
|
|
57
|
+
*
|
|
58
|
+
* Enforces schema rules:
|
|
59
|
+
* - implements/engines must use `package`, not `path`
|
|
60
|
+
* - curricula/temperaments must have either `package` or `path`
|
|
61
|
+
*/
|
|
62
|
+
export function readBundleManifest(bundleDir) {
|
|
63
|
+
const manifestPath = path.join(bundleDir, BUNDLE_MANIFEST);
|
|
64
|
+
if (!fs.existsSync(manifestPath)) {
|
|
65
|
+
throw new Error(`No ${BUNDLE_MANIFEST} found in ${bundleDir}`);
|
|
66
|
+
}
|
|
67
|
+
const manifest = readJson(manifestPath);
|
|
68
|
+
// Validate implements: must have package, no path allowed
|
|
69
|
+
for (const entry of manifest.implements ?? []) {
|
|
70
|
+
if (!entry.package) {
|
|
71
|
+
throw new Error('Implements must have a "package" specifier. ' +
|
|
72
|
+
'Implements have runtime code and potential npm dependencies — they cannot be inline.');
|
|
73
|
+
}
|
|
74
|
+
if ('path' in entry) {
|
|
75
|
+
throw new Error('Implements must be npm packages or git URLs. Use a "package" specifier instead of "path".');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Validate engines: must have package, no path allowed
|
|
79
|
+
for (const entry of manifest.engines ?? []) {
|
|
80
|
+
if (!entry.package) {
|
|
81
|
+
throw new Error('Engines must have a "package" specifier. ' +
|
|
82
|
+
'Engines have runtime code and potential npm dependencies — they cannot be inline.');
|
|
83
|
+
}
|
|
84
|
+
if ('path' in entry) {
|
|
85
|
+
throw new Error('Engines must be npm packages or git URLs. Use a "package" specifier instead of "path".');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Validate content entries: must have package or path
|
|
89
|
+
for (const entry of manifest.curricula ?? []) {
|
|
90
|
+
if (!entry.package && !entry.path) {
|
|
91
|
+
throw new Error('Curriculum entries must have either a "package" or "path" specifier.');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (const entry of manifest.temperaments ?? []) {
|
|
95
|
+
if (!entry.package && !entry.path) {
|
|
96
|
+
throw new Error('Temperament entries must have either a "package" or "path" specifier.');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Validate migrations: must have path, no package allowed
|
|
100
|
+
for (const entry of manifest.migrations ?? []) {
|
|
101
|
+
if (!entry.path) {
|
|
102
|
+
throw new Error('Migration entries must have a "path" specifier.');
|
|
103
|
+
}
|
|
104
|
+
if ('package' in entry) {
|
|
105
|
+
throw new Error('Migrations must be inline SQL files. Use a "path" specifier instead of "package".');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return manifest;
|
|
109
|
+
}
|
|
110
|
+
// ── Inline content installation ─────────────────────────────────────────
|
|
111
|
+
/**
|
|
112
|
+
* Install an inline content artifact (curriculum or temperament) from a
|
|
113
|
+
* path relative to the bundle directory.
|
|
114
|
+
*
|
|
115
|
+
* Copies the full directory to the guild slot and registers in guild.json.
|
|
116
|
+
*/
|
|
117
|
+
function installInlineContent(home, bundleDir, category, entry, bundleSource) {
|
|
118
|
+
const contentDir = path.resolve(bundleDir, entry.path);
|
|
119
|
+
if (!fs.existsSync(contentDir)) {
|
|
120
|
+
throw new Error(`Inline content path not found: ${contentDir}`);
|
|
121
|
+
}
|
|
122
|
+
// Read descriptor to get version
|
|
123
|
+
const descriptorFile = DESCRIPTOR_MAP[category];
|
|
124
|
+
const descriptorPath = path.join(contentDir, descriptorFile);
|
|
125
|
+
if (!fs.existsSync(descriptorPath)) {
|
|
126
|
+
throw new Error(`No ${descriptorFile} found in ${contentDir}`);
|
|
127
|
+
}
|
|
128
|
+
const descriptor = readJson(descriptorPath);
|
|
129
|
+
const name = entry.name || path.basename(contentDir);
|
|
130
|
+
const slot = descriptor['version'];
|
|
131
|
+
if (!slot) {
|
|
132
|
+
throw new Error(`No version in ${descriptorPath}`);
|
|
133
|
+
}
|
|
134
|
+
// Copy full directory to guild slot
|
|
135
|
+
const parentDir = DIR_MAP[category];
|
|
136
|
+
const targetDir = path.join(home, parentDir, name, slot);
|
|
137
|
+
if (fs.existsSync(targetDir)) {
|
|
138
|
+
fs.rmSync(targetDir, { recursive: true });
|
|
139
|
+
}
|
|
140
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
141
|
+
copyDir(contentDir, targetDir);
|
|
142
|
+
// Register in guild.json
|
|
143
|
+
const config = readGuildConfig(home);
|
|
144
|
+
config[category][name] = {
|
|
145
|
+
slot,
|
|
146
|
+
upstream: null,
|
|
147
|
+
installedAt: new Date().toISOString(),
|
|
148
|
+
...(bundleSource ? { bundle: bundleSource } : {}),
|
|
149
|
+
};
|
|
150
|
+
writeGuildConfig(home, config);
|
|
151
|
+
return name;
|
|
152
|
+
}
|
|
153
|
+
/** Recursively copy a directory, skipping node_modules and .git. */
|
|
154
|
+
const SKIP_DIRS = new Set(['node_modules', '.git']);
|
|
155
|
+
function copyDir(src, dest) {
|
|
156
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
157
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
158
|
+
const srcPath = path.join(src, entry.name);
|
|
159
|
+
const destPath = path.join(dest, entry.name);
|
|
160
|
+
if (entry.isDirectory()) {
|
|
161
|
+
if (!SKIP_DIRS.has(entry.name)) {
|
|
162
|
+
copyDir(srcPath, destPath);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
fs.copyFileSync(srcPath, destPath);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// ── Main ────────────────────────────────────────────────────────────────
|
|
171
|
+
/**
|
|
172
|
+
* Install a bundle into a guild.
|
|
173
|
+
*
|
|
174
|
+
* Reads the bundle manifest, installs all referenced artifacts individually,
|
|
175
|
+
* and optionally commits the result. The bundle itself is NOT retained as
|
|
176
|
+
* a guild dependency — each artifact is installed independently.
|
|
177
|
+
*
|
|
178
|
+
* Package artifacts (implements, engines, and packaged content) are installed
|
|
179
|
+
* via npm. Inline content artifacts (curricula/temperaments with `path`) are
|
|
180
|
+
* copied directly from the bundle directory.
|
|
181
|
+
*
|
|
182
|
+
* If an installed package contains its own `nexus-bundle.json`, the installer
|
|
183
|
+
* recurses to install the transitive bundle's artifacts.
|
|
184
|
+
*/
|
|
185
|
+
export function installBundle(opts) {
|
|
186
|
+
const { home, bundleDir, commit = true } = opts;
|
|
187
|
+
// Auto-detect bundle provenance from package.json if not provided
|
|
188
|
+
let bundleSource = opts.bundleSource;
|
|
189
|
+
if (!bundleSource) {
|
|
190
|
+
const bundlePkgPath = path.join(bundleDir, 'package.json');
|
|
191
|
+
if (fs.existsSync(bundlePkgPath)) {
|
|
192
|
+
const bundlePkg = readJson(bundlePkgPath);
|
|
193
|
+
const name = bundlePkg['name'];
|
|
194
|
+
const version = bundlePkg['version'];
|
|
195
|
+
if (name && version) {
|
|
196
|
+
bundleSource = `${name}@${version}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const manifest = readBundleManifest(bundleDir);
|
|
201
|
+
const result = {
|
|
202
|
+
installed: 0,
|
|
203
|
+
artifacts: { implements: [], engines: [], curricula: [], temperaments: [], migrations: [] },
|
|
204
|
+
};
|
|
205
|
+
// ── Collect all package specifiers for batch npm install ──────────────
|
|
206
|
+
const packageSpecs = [];
|
|
207
|
+
for (const entry of manifest.implements ?? []) {
|
|
208
|
+
packageSpecs.push(entry.package);
|
|
209
|
+
}
|
|
210
|
+
for (const entry of manifest.engines ?? []) {
|
|
211
|
+
packageSpecs.push(entry.package);
|
|
212
|
+
}
|
|
213
|
+
for (const entry of manifest.curricula ?? []) {
|
|
214
|
+
if (entry.package)
|
|
215
|
+
packageSpecs.push(entry.package);
|
|
216
|
+
}
|
|
217
|
+
for (const entry of manifest.temperaments ?? []) {
|
|
218
|
+
if (entry.package)
|
|
219
|
+
packageSpecs.push(entry.package);
|
|
220
|
+
}
|
|
221
|
+
// Batch npm install all package dependencies at once
|
|
222
|
+
if (packageSpecs.length > 0) {
|
|
223
|
+
npm(['install', '--save', ...packageSpecs], home);
|
|
224
|
+
}
|
|
225
|
+
// ── Install package-based artifacts ───────────────────────────────────
|
|
226
|
+
// Helper to install a single package artifact via installTool
|
|
227
|
+
const installPackageArtifact = (entry, category) => {
|
|
228
|
+
const spec = entry.package;
|
|
229
|
+
// Resolve package name from the specifier
|
|
230
|
+
const packageName = resolvePackageName(spec, home);
|
|
231
|
+
const packageDir = path.join(home, 'node_modules', packageName);
|
|
232
|
+
// Check for transitive bundle
|
|
233
|
+
const nestedBundlePath = path.join(packageDir, BUNDLE_MANIFEST);
|
|
234
|
+
if (fs.existsSync(nestedBundlePath)) {
|
|
235
|
+
const nestedResult = installBundle({
|
|
236
|
+
home,
|
|
237
|
+
bundleDir: packageDir,
|
|
238
|
+
bundleSource: spec,
|
|
239
|
+
commit: false,
|
|
240
|
+
});
|
|
241
|
+
// Merge nested results
|
|
242
|
+
result.installed += nestedResult.installed;
|
|
243
|
+
for (const cat of ['implements', 'engines', 'curricula', 'temperaments']) {
|
|
244
|
+
result.artifacts[cat].push(...nestedResult.artifacts[cat]);
|
|
245
|
+
}
|
|
246
|
+
return packageName;
|
|
247
|
+
}
|
|
248
|
+
// Find descriptor to determine artifact type
|
|
249
|
+
const descriptorFile = DESCRIPTOR_MAP[category];
|
|
250
|
+
const descriptorPath = path.join(packageDir, descriptorFile);
|
|
251
|
+
if (!fs.existsSync(descriptorPath)) {
|
|
252
|
+
throw new Error(`Package "${packageName}" does not contain ${descriptorFile}. ` +
|
|
253
|
+
`Expected a ${category.slice(0, -1)} descriptor.`);
|
|
254
|
+
}
|
|
255
|
+
const descriptor = readJson(descriptorPath);
|
|
256
|
+
// Determine artifact name and slot
|
|
257
|
+
const name = entry.name || packageName.replace(/^@[^/]+\//, '');
|
|
258
|
+
const slot = descriptor['version'];
|
|
259
|
+
if (!slot) {
|
|
260
|
+
throw new Error(`No version in ${descriptorPath}`);
|
|
261
|
+
}
|
|
262
|
+
// Copy metadata to guild slot
|
|
263
|
+
const parentDir = DIR_MAP[category];
|
|
264
|
+
const targetDir = path.join(home, parentDir, name, slot);
|
|
265
|
+
if (fs.existsSync(targetDir)) {
|
|
266
|
+
fs.rmSync(targetDir, { recursive: true });
|
|
267
|
+
}
|
|
268
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
269
|
+
// Copy descriptor
|
|
270
|
+
fs.copyFileSync(descriptorPath, path.join(targetDir, descriptorFile));
|
|
271
|
+
// Copy instructions if referenced
|
|
272
|
+
const instructionsFile = descriptor['instructions'];
|
|
273
|
+
if (instructionsFile) {
|
|
274
|
+
const instrPath = path.join(packageDir, instructionsFile);
|
|
275
|
+
if (fs.existsSync(instrPath)) {
|
|
276
|
+
fs.copyFileSync(instrPath, path.join(targetDir, instructionsFile));
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
// Copy content file if referenced (for curricula/temperaments)
|
|
280
|
+
const contentFile = descriptor['content'];
|
|
281
|
+
if (contentFile) {
|
|
282
|
+
const contentPath = path.join(packageDir, contentFile);
|
|
283
|
+
if (fs.existsSync(contentPath)) {
|
|
284
|
+
fs.copyFileSync(contentPath, path.join(targetDir, contentFile));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
// Register in guild.json
|
|
288
|
+
const config = readGuildConfig(home);
|
|
289
|
+
const now = new Date().toISOString();
|
|
290
|
+
if (category === 'implements' || category === 'engines') {
|
|
291
|
+
config[category][name] = {
|
|
292
|
+
slot,
|
|
293
|
+
upstream: `${packageName}@${descriptor['version']}`,
|
|
294
|
+
installedAt: now,
|
|
295
|
+
...(category === 'implements' && entry.roles
|
|
296
|
+
? { roles: entry.roles }
|
|
297
|
+
: {}),
|
|
298
|
+
package: packageName,
|
|
299
|
+
...(bundleSource ? { bundle: bundleSource } : {}),
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
config[category][name] = {
|
|
304
|
+
slot,
|
|
305
|
+
upstream: `${packageName}@${descriptor['version']}`,
|
|
306
|
+
installedAt: now,
|
|
307
|
+
...(bundleSource ? { bundle: bundleSource } : {}),
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
writeGuildConfig(home, config);
|
|
311
|
+
return name;
|
|
312
|
+
};
|
|
313
|
+
// Install implements
|
|
314
|
+
for (const entry of manifest.implements ?? []) {
|
|
315
|
+
const name = installPackageArtifact(entry, 'implements');
|
|
316
|
+
result.artifacts.implements.push(name);
|
|
317
|
+
result.installed++;
|
|
318
|
+
}
|
|
319
|
+
// Install engines
|
|
320
|
+
for (const entry of manifest.engines ?? []) {
|
|
321
|
+
const name = installPackageArtifact(entry, 'engines');
|
|
322
|
+
result.artifacts.engines.push(name);
|
|
323
|
+
result.installed++;
|
|
324
|
+
}
|
|
325
|
+
// Install curricula (package or inline)
|
|
326
|
+
for (const entry of manifest.curricula ?? []) {
|
|
327
|
+
if (entry.package) {
|
|
328
|
+
const name = installPackageArtifact(entry, 'curricula');
|
|
329
|
+
result.artifacts.curricula.push(name);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
const name = installInlineContent(home, bundleDir, 'curricula', entry, bundleSource);
|
|
333
|
+
result.artifacts.curricula.push(name);
|
|
334
|
+
}
|
|
335
|
+
result.installed++;
|
|
336
|
+
}
|
|
337
|
+
// Install temperaments (package or inline)
|
|
338
|
+
for (const entry of manifest.temperaments ?? []) {
|
|
339
|
+
if (entry.package) {
|
|
340
|
+
const name = installPackageArtifact(entry, 'temperaments');
|
|
341
|
+
result.artifacts.temperaments.push(name);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
const name = installInlineContent(home, bundleDir, 'temperaments', entry, bundleSource);
|
|
345
|
+
result.artifacts.temperaments.push(name);
|
|
346
|
+
}
|
|
347
|
+
result.installed++;
|
|
348
|
+
}
|
|
349
|
+
// Install migrations (inline only, renumbered into guild sequence)
|
|
350
|
+
if (manifest.migrations && manifest.migrations.length > 0) {
|
|
351
|
+
const migrationsDir = path.join(home, 'nexus', 'migrations');
|
|
352
|
+
fs.mkdirSync(migrationsDir, { recursive: true });
|
|
353
|
+
// Find current highest sequence in guild
|
|
354
|
+
const existing = fs.readdirSync(migrationsDir);
|
|
355
|
+
const MIGRATION_PATTERN = /^(\d{3})-(.+)\.sql$/;
|
|
356
|
+
let maxSeq = 0;
|
|
357
|
+
for (const file of existing) {
|
|
358
|
+
const match = file.match(MIGRATION_PATTERN);
|
|
359
|
+
if (match) {
|
|
360
|
+
maxSeq = Math.max(maxSeq, parseInt(match[1], 10));
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
const provenance = {};
|
|
364
|
+
for (const entry of manifest.migrations) {
|
|
365
|
+
const srcPath = path.resolve(bundleDir, entry.path);
|
|
366
|
+
if (!fs.existsSync(srcPath)) {
|
|
367
|
+
throw new Error(`Migration file not found: ${srcPath}`);
|
|
368
|
+
}
|
|
369
|
+
const originalName = path.basename(srcPath);
|
|
370
|
+
maxSeq++;
|
|
371
|
+
const seq = String(maxSeq).padStart(3, '0');
|
|
372
|
+
// Derive description from original filename (strip sequence prefix if present)
|
|
373
|
+
const descMatch = originalName.match(/^\d{3}-(.+)$/);
|
|
374
|
+
const description = descMatch ? descMatch[1] : originalName;
|
|
375
|
+
const guildFilename = `${seq}-${description}`;
|
|
376
|
+
fs.copyFileSync(srcPath, path.join(migrationsDir, guildFilename));
|
|
377
|
+
if (bundleSource) {
|
|
378
|
+
provenance[guildFilename] = { bundle: bundleSource, originalName };
|
|
379
|
+
}
|
|
380
|
+
result.artifacts.migrations.push(guildFilename);
|
|
381
|
+
result.installed++;
|
|
382
|
+
}
|
|
383
|
+
if (Object.keys(provenance).length > 0) {
|
|
384
|
+
result.migrationProvenance = provenance;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// Commit all changes in one batch
|
|
388
|
+
if (commit) {
|
|
389
|
+
git(['add', '-A'], home);
|
|
390
|
+
const bundleLabel = bundleSource || path.basename(bundleDir);
|
|
391
|
+
git(['commit', '-m', `Install bundle ${bundleLabel}`], home);
|
|
392
|
+
}
|
|
393
|
+
return result;
|
|
394
|
+
}
|
|
395
|
+
// ── Package name resolution ─────────────────────────────────────────────
|
|
396
|
+
/**
|
|
397
|
+
* Resolve a package specifier to a package name.
|
|
398
|
+
*
|
|
399
|
+
* - Local paths: reads name from the source's package.json
|
|
400
|
+
* - Git URLs: finds the package in guild's package.json deps
|
|
401
|
+
* - Registry specifiers: parses name from "name@version" or "@scope/name@version"
|
|
402
|
+
*/
|
|
403
|
+
function resolvePackageName(spec, guildRoot) {
|
|
404
|
+
// Local path: read package.json directly
|
|
405
|
+
const isLocalPath = spec.startsWith('/') || spec.startsWith('./') || spec.startsWith('../');
|
|
406
|
+
if (isLocalPath) {
|
|
407
|
+
const pkgJsonPath = path.join(path.resolve(spec), 'package.json');
|
|
408
|
+
if (!fs.existsSync(pkgJsonPath)) {
|
|
409
|
+
throw new Error(`No package.json found at ${pkgJsonPath}`);
|
|
410
|
+
}
|
|
411
|
+
const pkg = readJson(pkgJsonPath);
|
|
412
|
+
const name = pkg['name'];
|
|
413
|
+
if (!name) {
|
|
414
|
+
throw new Error(`No "name" field in ${pkgJsonPath}`);
|
|
415
|
+
}
|
|
416
|
+
return name;
|
|
417
|
+
}
|
|
418
|
+
// Git URL: find the package in node_modules by reading package.json deps
|
|
419
|
+
if (spec.startsWith('git+')) {
|
|
420
|
+
const guildPkg = readJson(path.join(guildRoot, 'package.json'));
|
|
421
|
+
const deps = guildPkg['dependencies'] ?? {};
|
|
422
|
+
for (const [name, value] of Object.entries(deps)) {
|
|
423
|
+
if (value === spec || value.includes(spec.replace(/^git\+/, ''))) {
|
|
424
|
+
return name;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
throw new Error(`Could not resolve package name for git URL: ${spec}`);
|
|
428
|
+
}
|
|
429
|
+
// Registry specifier: parse name from "name@version" or "@scope/name@version"
|
|
430
|
+
if (spec.startsWith('@') && spec.lastIndexOf('@') > 0) {
|
|
431
|
+
return spec.substring(0, spec.lastIndexOf('@'));
|
|
432
|
+
}
|
|
433
|
+
if (spec.includes('@')) {
|
|
434
|
+
return spec.split('@')[0];
|
|
435
|
+
}
|
|
436
|
+
return spec;
|
|
437
|
+
}
|
|
438
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,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GED
package/dist/dispatch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,eAAe;IAC9B,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,QAAQ,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAgE9D"}
|
package/dist/guild-config.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** A reference to an implement or engine registered in guild.json. */
|
|
2
2
|
export interface ToolEntry {
|
|
3
|
-
/** Whether the tool is provided by the Nexus framework or authored by the guild. */
|
|
4
|
-
source: 'nexus' | 'guild';
|
|
5
3
|
/** Guild-local version slot — the directory name under {implements|engines}/{name}/. */
|
|
6
4
|
slot: string;
|
|
7
5
|
/** Upstream package identifier, e.g. "@shardworks/implement-dispatch@1.11.3". Null for locally-built tools. */
|
|
@@ -10,6 +8,10 @@ export interface ToolEntry {
|
|
|
10
8
|
installedAt: string;
|
|
11
9
|
/** Which roles have access (implements only). ["*"] means all roles. */
|
|
12
10
|
roles?: string[];
|
|
11
|
+
/** npm package name for runtime resolution via node_modules. Omitted for script-only tools. */
|
|
12
|
+
package?: string;
|
|
13
|
+
/** Bundle that delivered this artifact, e.g. "@shardworks/guild-starter-kit@0.1.0". */
|
|
14
|
+
bundle?: string;
|
|
13
15
|
}
|
|
14
16
|
/** A reference to a curriculum or temperament registered in guild.json. */
|
|
15
17
|
export interface TrainingEntry {
|
|
@@ -19,6 +21,8 @@ export interface TrainingEntry {
|
|
|
19
21
|
upstream: string | null;
|
|
20
22
|
/** ISO-8601 timestamp of when the content was installed into this slot. */
|
|
21
23
|
installedAt: string;
|
|
24
|
+
/** Bundle that delivered this artifact, e.g. "@shardworks/guild-starter-kit@0.1.0". */
|
|
25
|
+
bundle?: string;
|
|
22
26
|
}
|
|
23
27
|
/** The guild's central configuration file shape (`guild.json`). */
|
|
24
28
|
export interface GuildConfig {
|
|
@@ -44,10 +48,10 @@ export interface GuildConfig {
|
|
|
44
48
|
* All registries (implements, engines, curricula, temperaments) start empty.
|
|
45
49
|
*/
|
|
46
50
|
export declare function createInitialGuildConfig(name: string, nexusVersion: string, model: string): GuildConfig;
|
|
47
|
-
/** Resolve the path to guild.json in the
|
|
51
|
+
/** Resolve the path to guild.json in the guild root. */
|
|
48
52
|
export declare function guildConfigPath(home: string): string;
|
|
49
|
-
/** Read and parse guild.json from the
|
|
53
|
+
/** Read and parse guild.json from the guild root. */
|
|
50
54
|
export declare function readGuildConfig(home: string): GuildConfig;
|
|
51
|
-
/** Write guild.json to the
|
|
55
|
+
/** Write guild.json to the guild root. */
|
|
52
56
|
export declare function writeGuildConfig(home: string, config: GuildConfig): void;
|
|
53
57
|
//# sourceMappingURL=guild-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guild-config.d.ts","sourceRoot":"","sources":["../src/guild-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guild-config.d.ts","sourceRoot":"","sources":["../src/guild-config.ts"],"names":[],"mappings":"AAGA,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB,wFAAwF;IACxF,IAAI,EAAE,M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