@nurix/etna 0.19.13 → 0.19.15

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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/bin/etna.js +18 -0
  3. package/data/harness-index.json +1 -1
  4. package/data/harnesses/code/codex/agents/brainstorm.toml +142 -0
  5. package/data/harnesses/code/codex/agents/change-review.toml +250 -0
  6. package/data/harnesses/code/codex/agents/lld-mode.toml +52 -0
  7. package/data/harnesses/code/codex/agents/maintenance.toml +216 -0
  8. package/data/harnesses/code/codex/agents/performance-review.toml +222 -0
  9. package/data/harnesses/code/harness.json +1 -1
  10. package/data/harnesses/discover/codex/agents/api.toml +33 -0
  11. package/data/harnesses/discover/codex/agents/codebase.toml +43 -0
  12. package/data/harnesses/discover/codex/agents/community.toml +31 -0
  13. package/data/harnesses/discover/codex/agents/deployed-client-bundle.toml +53 -0
  14. package/data/harnesses/discover/codex/agents/distribution-artifacts.toml +58 -0
  15. package/data/harnesses/discover/codex/agents/docs.toml +36 -0
  16. package/data/harnesses/discover/codex/agents/infra-backend-fingerprint.toml +64 -0
  17. package/data/harnesses/discover/codex/agents/packages.toml +30 -0
  18. package/data/harnesses/discover/codex/agents/session.toml +41 -0
  19. package/data/harnesses/discover/codex/agents/website.toml +36 -0
  20. package/data/harnesses/discover/codex/agents/wire-capture.toml +45 -0
  21. package/data/harnesses/discover/harness.json +1 -1
  22. package/data/harnesses/discussion/codex/agents/discussion-baseline.toml +256 -0
  23. package/data/harnesses/discussion/codex/agents/lessons-maintenance.toml +29 -0
  24. package/data/harnesses/discussion/harness.json +1 -1
  25. package/data/harnesses/etna/codex/agents/brainstorm.toml +142 -0
  26. package/data/harnesses/etna/codex/agents/change-review.toml +250 -0
  27. package/data/harnesses/etna/codex/agents/lld-mode.toml +52 -0
  28. package/data/harnesses/etna/codex/agents/maintenance.toml +216 -0
  29. package/data/harnesses/etna/codex/agents/performance-review.toml +222 -0
  30. package/data/harnesses/etna/harness.json +1 -1
  31. package/data/harnesses/kb-agi/codex/agents/kb-apply.toml +32 -0
  32. package/data/harnesses/kb-agi/codex/agents/kb-audit.toml +47 -0
  33. package/data/harnesses/kb-agi/codex/agents/kb-init.toml +314 -0
  34. package/data/harnesses/kb-agi/harness.json +1 -1
  35. package/lib/codex/README.md +31 -0
  36. package/lib/codex/agents-md.mjs +35 -0
  37. package/lib/codex/gen-agents.mjs +156 -0
  38. package/lib/codex/hooks.mjs +33 -0
  39. package/lib/codex/index.mjs +62 -0
  40. package/lib/codex/plugin-manifest.mjs +36 -0
  41. package/lib/codex/skills.mjs +26 -0
  42. package/lib/codex/subagents.mjs +26 -0
  43. package/package.json +4 -2
@@ -0,0 +1,36 @@
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.
23
+ // Each plugin is a local source; the first keyword (if any) seeds a category.
24
+ export function buildCodexMarketplace(plugins) {
25
+ return {
26
+ name: 'nurixlabs',
27
+ interface: { displayName: 'Nurix Labs' },
28
+ plugins: [...plugins]
29
+ .sort((a, b) => a.name.localeCompare(b.name))
30
+ .map((p) => ({
31
+ name: p.name,
32
+ source: `./plugins/${p.name}`,
33
+ ...(p.frontmatter?.keywords?.length ? { category: p.frontmatter.keywords[0] } : {}),
34
+ })),
35
+ };
36
+ }
@@ -0,0 +1,26 @@
1
+ // packages/cli/lib/codex/skills.mjs
2
+ // .claude/skills/ → .agents/skills/ — Codex's official skill-scan path. A full
3
+ // rebuild each run from the installed .claude/skills tree, which the bundle
4
+ // already ship-filtered (evals/, fixtures/ stripped at build time), so this is a
5
+ // straight recursive copy. Both runtimes require exactly name+description in
6
+ // SKILL.md frontmatter, so the mirrored files are valid for Codex unchanged.
7
+
8
+ import { existsSync, cpSync, rmSync } from 'node:fs';
9
+ import { join } from 'node:path';
10
+
11
+ export function projectSkills({ targetDir, projectHasGit }) {
12
+ const src = join(targetDir, '.claude', 'skills');
13
+ if (!existsSync(src)) return null;
14
+ const dest = join(targetDir, '.agents', 'skills');
15
+ let warning = null;
16
+ if (existsSync(dest)) {
17
+ if (!projectHasGit) {
18
+ const ts = new Date().toISOString().replace(/[:.]/g, '-');
19
+ cpSync(dest, `${dest}.bak.${ts}`, { recursive: true });
20
+ warning = 'No .git here — snapshotted existing .agents/skills/ before rebuild.';
21
+ }
22
+ rmSync(dest, { recursive: true, force: true });
23
+ }
24
+ cpSync(src, dest, { recursive: true });
25
+ return { installed: '.agents/skills/ (mirror of .claude/skills)', warning };
26
+ }
@@ -0,0 +1,26 @@
1
+ // packages/cli/lib/codex/subagents.mjs
2
+ // Copy the harness's pre-generated Codex subagent TOML — bundle codex/agents/*.toml,
3
+ // authored on a Codex-authenticated laptop by gen-agents.mjs — into the project's
4
+ // .codex/agents/. Full rebuild each run. The consumer needs NO Codex CLI: the TOML
5
+ // ships ready, so a missing local Codex never blocks an install.
6
+
7
+ import { existsSync, readdirSync, cpSync, rmSync, mkdirSync } from 'node:fs';
8
+ import { join } from 'node:path';
9
+
10
+ export function copyCodexAgents({ targetDir, bundledHarnessDir, projectHasGit }) {
11
+ const src = join(bundledHarnessDir, 'codex', 'agents');
12
+ if (!existsSync(src)) return null;
13
+ const tomls = readdirSync(src).filter((f) => f.endsWith('.toml'));
14
+ if (!tomls.length) return null;
15
+ const dest = join(targetDir, '.codex', 'agents');
16
+ if (existsSync(dest)) {
17
+ if (!projectHasGit) {
18
+ const ts = new Date().toISOString().replace(/[:.]/g, '-');
19
+ cpSync(dest, `${dest}.bak.${ts}`, { recursive: true });
20
+ }
21
+ rmSync(dest, { recursive: true, force: true });
22
+ }
23
+ mkdirSync(dest, { recursive: true });
24
+ for (const f of tomls) cpSync(join(src, f), join(dest, f), { force: true });
25
+ return { installed: `${tomls.length} codex agent(s) → .codex/agents/` };
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurix/etna",
3
- "version": "0.19.13",
3
+ "version": "0.19.15",
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": {
@@ -11,6 +11,7 @@
11
11
  },
12
12
  "files": [
13
13
  "bin/",
14
+ "lib/",
14
15
  "data/",
15
16
  "README.md"
16
17
  ],
@@ -19,7 +20,8 @@
19
20
  },
20
21
  "scripts": {
21
22
  "build:data": "node scripts/build-data.js",
22
- "prepack": "node scripts/build-data.js"
23
+ "prepack": "node scripts/build-data.js",
24
+ "gen:codex-agents": "node lib/codex/gen-agents.mjs"
23
25
  },
24
26
  "repository": {
25
27
  "type": "git",