@nurix/etna 0.20.0 → 0.20.1
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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// packages/cli/lib/codex/plugin-manifest.mjs
|
|
2
|
+
// Pure builders for the Codex plugin + marketplace manifests, emitted by the
|
|
3
|
+
// marketplace shipper (.github/scripts/publish.mjs) alongside the Claude ones.
|
|
4
|
+
// A Codex plugin reuses the same skills/ and hooks/ dirs as a Claude plugin — only
|
|
5
|
+
// the manifest differs (.codex-plugin/plugin.json) — plus a Codex marketplace
|
|
6
|
+
// catalog (.agents/plugins/marketplace.json). Codex also reads the legacy
|
|
7
|
+
// .claude-plugin/marketplace.json but for DISCOVERY only, so native ones are still emitted.
|
|
8
|
+
|
|
9
|
+
// The required Codex plugin.json fields + component pointers. `hasHooks` adds the
|
|
10
|
+
// hooks pointer (Codex auto-detects hooks/hooks.json, but naming it is explicit).
|
|
11
|
+
export function buildCodexPluginJson(fm, { hasHooks = false } = {}) {
|
|
12
|
+
const out = {
|
|
13
|
+
name: fm.name,
|
|
14
|
+
version: fm.version,
|
|
15
|
+
description: fm.description,
|
|
16
|
+
skills: './skills/',
|
|
17
|
+
};
|
|
18
|
+
if (hasHooks) out.hooks = './hooks/hooks.json';
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// The repo marketplace catalog Codex reads at .agents/plugins/marketplace.json. Each plugin is a
|
|
23
|
+
// LOCAL source (source.path relative to the catalog root) carrying an explicit install policy:
|
|
24
|
+
// · installation AVAILABLE — offered, not force-installed (INSTALLED_BY_DEFAULT / NOT_AVAILABLE
|
|
25
|
+
// are the other documented tokens; these plugins are opt-in).
|
|
26
|
+
// · authentication NONE — they bundle only skills + hooks, no credentials or external auth.
|
|
27
|
+
// The first keyword (if any) seeds a category. (Enum tokens per codex-support.md → Open Questions;
|
|
28
|
+
// AVAILABLE/NONE are the correct pair for an opt-in, no-auth plugin.)
|
|
29
|
+
export function buildCodexMarketplace(plugins) {
|
|
30
|
+
return {
|
|
31
|
+
name: 'nurixlabs',
|
|
32
|
+
interface: { displayName: 'Nurix Labs' },
|
|
33
|
+
plugins: [...plugins]
|
|
34
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
35
|
+
.map((p) => ({
|
|
36
|
+
name: p.name,
|
|
37
|
+
source: { path: `./plugins/${p.name}` },
|
|
38
|
+
policy: { installation: 'AVAILABLE', authentication: 'NONE' },
|
|
39
|
+
...(p.frontmatter?.keywords?.length ? { category: p.frontmatter.keywords[0] } : {}),
|
|
40
|
+
})),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -314,6 +314,14 @@ export function materializeHarness({ bundledHarnessDir, targetDir }) {
|
|
|
314
314
|
for (const rel of CODEX_REBUILT_DIRS)
|
|
315
315
|
rmSync(join(targetDir, rel), { recursive: true, force: true });
|
|
316
316
|
|
|
317
|
+
// .claude/hooks/ is harness-owned wholesale — nothing else keeps files there. On a refresh it is
|
|
318
|
+
// reset before the write pass, so a script this bundle stopped shipping (a retired check, a
|
|
319
|
+
// renamed lib module) vanishes instead of surviving for ever as a stale copy no enumerated retire
|
|
320
|
+
// list ever names. First contact skips the reset: a colliding file there is the user's, and the
|
|
321
|
+
// backup path below is what stays honest about it.
|
|
322
|
+
if (!firstContact && existsSync(join(bundledHarnessDir, 'hooks')))
|
|
323
|
+
rmSync(join(targetDir, '.claude', 'hooks'), { recursive: true, force: true });
|
|
324
|
+
|
|
317
325
|
let written = 0;
|
|
318
326
|
let seeded = 0;
|
|
319
327
|
const backedUp = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nurix/etna",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Bootstrap a project with a Nurix harness — copies the harness's CLAUDE.md, skills, agents, rules, and hooks directly into the project from a bundled payload (no marketplace fetch, no network).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|