@amsterdamdatalabs/enact-extensions 0.1.51 → 0.1.55

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 CHANGED
@@ -19,7 +19,12 @@ This package owns the manifest tooling and a set of self-contained plugin bundle
19
19
 
20
20
  ## Surface contract
21
21
 
22
- Each `extensions/<plugin>/.agents/plugin.json` is the canonical source. `sync` and `install --repo` derive `.claude-plugin/`, `.codex-plugin/`, `.cursor-plugin/`, and `.kimi-plugin/` from it — these projections are generated and never committed.
22
+ Each `extensions/<plugin>/.agents/plugin.json` is the canonical source. `sync` derives
23
+ the generated plugin-root projections (`.claude-plugin/`, `.codex-plugin/`,
24
+ `.cursor-plugin/`, and `.kimi-plugin/`) in the bundle source for the explicit global
25
+ plugin path owned by `enact-vps`. Repo-local `install --repo` does **not** derive,
26
+ register, or write any plugin root or marketplace; it writes only the native project
27
+ files below.
23
28
 
24
29
  Author skills so they are valid on **all projected surfaces by default**. Use surface-neutral workflow language, treat `.agents/plugin.json` as the source of truth, and isolate host-specific details only when required.
25
30
 
@@ -75,28 +80,45 @@ enact-extensions doctor enact-repo --repo <path> [--json] # read-only healt
75
80
 
76
81
  `--dry-run` prints exactly what would be written, merged, removed, or restored — one line per file, naming the action and the reason (including a drift/conflict refusal, if the real run would refuse) — and exits with the same success/failure a real run would, without touching the filesystem.
77
82
 
78
- `doctor enact-repo --repo <path>` is a read-only report: installed?; installed version vs. the current bundle version (outdated?), plus any managed file whose content has drifted from what the current bundle would generate; lock integrity (every managed file present and hash-matching; missing/drifted files listed); per-host status — Claude (marketplace + settings present, with the trust / "start a new session" note above), Codex (files present, plus a read-only check of `~/.codex/config.toml`'s `projects."<path>".trust_level` for this exact repo), Cursor (files present, with an MCP-approval note), Kimi (`.kimi-code/mcp.json` present; whether `~/.kimi-code/config.toml` has the global `# BEGIN ENACT KIMI HOOKS` block installed by enact-vps; and a **Kimi Code workspace-trust** check — Kimi only loads project MCP servers, `.kimi-code/mcp.json` included, once you've opened the repo in Kimi Code and accepted "Trust this folder", so doctor reports trusted/NOT trusted by reading `${KIMI_CODE_HOME:-~/.kimi-code}/workspace-trust/wd_<slug>_<hash>` — never writes it), OpenCode (plugin file present and generated from the current bundle); the required global binaries on `PATH` (`enact-hook`, `lean-ctx`, `crg`/`code-review-graph`, `azure-devops-mcp`) with versions; the root `enact-config.toml` marker (present, parses as TOML, has a `[skills]` table; other tools' tables are never inspected), plus a stale leftover `.agents/enact-repo.toml` reported for information only (never read); an `enact-hook doctor --repo` passthrough when that sub-command is available; and the `enact-hook` per-repo logs — `.agents/hooks/hooks.log` (deny log CSV: `timestamp,surface,reason_id,command,agent_message`) and `.agents/hooks/hooks-activity.log` (activity log CSV: those columns plus `host,kind,event,tool,session,downstream,duration_ms`) — reporting each log's path, whether it exists, its row count, and (deny log only) the last 5 rows, parsed with a CSV reader that handles quoted commas and already-flattened fields. It never writes anything and exits non-zero only when a hard requirement fails (not installed, lock integrity failure, a missing required binary, or a missing, unparseable or `[skills]`-less `enact-config.toml`) — an outdated version, a host trust/approval note, a stale `.agents/enact-repo.toml`, or the hook-log summary is informational only.
83
+ `doctor enact-repo --repo <path>` is read-only. It reports the installed and current
84
+ bundle versions, lock integrity and drift, and each host's lock-owned native paths.
85
+ It also reports Codex and Kimi trust notes, Cursor MCP approval, Kimi's global-hook
86
+ status, required global binaries, the root `enact-config.toml` `[extensions]` marker,
87
+ an optional `enact-hook doctor --repo` result, and the per-repo hook logs. It never
88
+ writes; it exits non-zero only for a hard requirement such as a missing install,
89
+ lock-integrity failure, missing required binary, or invalid/missing `[extensions]`
90
+ marker.
79
91
 
80
92
  | Host | Files written in the repo |
81
93
  | --- | --- |
82
- | Claude Code | `.claude-plugin/enact-repo/` (plugin root: `.claude-plugin/plugin.json`, `skills/`, `hooks/hooks.json` with `--host=claude`, `.mcp.json`); `.claude-plugin/marketplace.json` (marketplace `enact-repo-local`, plugin `"source": "./.claude-plugin/enact-repo"`); `.claude/settings.json` merged with `extraKnownMarketplaces.enact-repo-local = {"source": {"source": "directory", "path": "./"}}` and `enabledPlugins["enact-repo@enact-repo-local"] = true`. Loads only after you trust the folder — **and, per live testing, not necessarily in that very first trusted session**: the marketplace registers on first launch but hooks/skills may not finish activating until the *second* Claude Code session in the folder. If hooks/skills seem missing right after install, start a new Claude Code session in this folder before assuming the install failed. |
83
- | Codex | `.codex/config.toml` `[mcp_servers.<name>]` tables in a marker-delimited block (your TOML and comments are untouched); `.codex/hooks.json` (nested schema, `--host=codex`). Loads only after you trust the project (exact path, no parent inheritance) and review hooks with `/hooks`. No repo marketplace (Codex does not auto-discover one). |
84
- | Cursor | `.cursor/hooks.json` (`version: 1`, Cursor event names, `--host=cursor`); `.cursor/mcp.json` (`type: "stdio"`). |
85
- | Kimi Code | `.kimi-code/mcp.json`. Kimi hooks are global-only and are installed by enact-vps, not here. |
86
- | OpenCode | `.opencode/plugins/enact-repo.ts` (hooks with `--host=opencode`, MCP servers via the `config` hook; no skills path, because OpenCode reads `.agents/skills/` natively). |
94
+ | Claude Code | `.claude/agents/*.md`, `.claude/skills/<skill>/`, root `.mcp.json`, and hook entries merged into `.claude/settings.json`. Trust the folder before loading the project configuration. |
95
+ | Codex | `.codex/agents/*.toml`, `.agents/skills/<skill>/`, `.codex/config.toml` MCP tables, and `.codex/hooks.json`. Trust the exact project path and review hooks with `/hooks`. |
96
+ | Cursor | `.cursor/agents/*.md`, `.cursor/skills/<skill>/`, `.cursor/mcp.json`, and `.cursor/hooks.json`. |
97
+ | Kimi Code | `.kimi-code/agents/*.md`, `.kimi-code/skills/<skill>/`, and `.kimi-code/mcp.json`. Kimi hooks remain global-only and are installed by `enact-vps`, never by this repo-local command. |
98
+ | OpenCode | A hook-free bundle writes `.opencode/agents/*.md`, `.opencode/skills/<skill>/`, and root `opencode.json` MCP entries. `enact-repo` declares hooks, so its repo-local OpenCode install is refused before any write; install its explicit global OpenCode plugin through `enact-vps`. |
87
99
 
88
- Skills: Codex, Cursor, Kimi, and OpenCode share one copy in `.agents/skills/<skill>/`. Claude uses the copy bundled in its plugin. An existing skill dir with the same name that the bundle does not manage is never overwritten, even with `--force`.
100
+ Skills are installed at each host's native project discovery path: `.agents/skills/` for
101
+ Codex and `.claude/skills/`, `.cursor/skills/`, `.kimi-code/skills/`, or
102
+ `.opencode/skills/` for the other hosts. An existing same-named skill directory that
103
+ the bundle does not manage is never overwritten, even with `--force`.
89
104
 
90
105
  `lean-ctx` config: regardless of `--host`, the bundle's baseline `lean-ctx/config.toml` and `lean-ctx/layout.toml` are installed as managed whole files at `.agents/lean-ctx/config/lean-ctx/` — every host's `.mcp.json`/hooks equivalent runs `enact-hook lean-ctx ...`, which resolves its config from this repo-local path. Managed like any other whole file: drift is detected, `--force` takes over and records a pre-existing user `config.toml`/`layout.toml` for byte-exact restore on uninstall.
91
106
 
92
- Always written: the `[skills]` table of root `enact-config.toml` (the managed-repo marker the `enact-hook` runtime checks; the file is shared, and each root table has one owner — `version`/`[hooks]`/`[rules]`/`[repo]` enact-hook, `[skills]` enact-extensions, `[controls]` enact-repo-controls). If the file is missing, install creates it with `version = 1` plus `[skills]`. If it lacks `[skills]`, install appends a `[skills]` block (`version = 1`) as text, leaving every other byte intact. If `[skills]` already exists, install leaves it alone. Install never writes `[hooks]`, refuses to append to a file that is not valid TOML, and no longer creates `.agents/enact-repo.toml`; the baseline `lean-ctx` config (`config.toml`, `layout.toml`) as managed whole files at `.agents/lean-ctx/config/lean-ctx/`; six managed lines in `.agents/.gitignore` — `/lean-ctx/data/`, `/lean-ctx/cache/`, `/lean-ctx/state/`, `/lean-ctx/bin/` (lean-ctx's runtime-generated dirs stay out of git; `config/` itself is committed), plus `/hooks/hooks.log` and `/hooks/hooks-activity.log` (the `enact-hook` runtime's own deny/activity logs under `.agents/hooks/`, same treatment: a plain uninstall keeps these two lines while either log file still exists on disk, `--purge` removes the log files themselves first); and `.agents/enact-repo.lock.json`. Commit all of it except what `.gitignore` excludes.
107
+ Always written: root `enact-config.toml`'s `[extensions]` marker and the bare
108
+ `[extensions.<name>]` declaration for the installed bundle. The shared file's tables
109
+ have one owner: `version`/`[hooks]`/`[rules]`/`[repo]` are `enact-hook`,
110
+ `[extensions]` is enact-extensions, and `[controls]` is enact-repo-controls. The
111
+ installer edits only its own block, removes the legacy marker-only `[skills]` block,
112
+ and never writes `[hooks]`. It also manages the baseline `lean-ctx` config,
113
+ `.agents/.gitignore` runtime entries, and `.agents/enact-repo.lock.json`. Commit all
114
+ of it except what `.gitignore` excludes.
93
115
 
94
116
  The lock records every managed file (sha256), every entry merged into a user file, and the plugin version, all as relative paths:
95
117
 
96
118
  - **Re-runs are idempotent.** An unchanged bundle produces no diff. Narrowing `--host` removes the dropped hosts' managed content.
97
119
  - **Merged user files are edited surgically.** `.claude/settings.json`, `.cursor/hooks.json`, `.cursor/mcp.json`, `.kimi-code/mcp.json`, `.codex/hooks.json`, and `.codex/config.toml` only gain or lose the bundle's own entries. Key order and indentation are preserved.
98
- - **Refusals (override with `--force`).** Install stops if a managed file or entry was edited since the last install, or if a same-named MCP server or marketplace entry exists that the bundle does not own. The error names each file.
99
- - **Uninstall removes exactly what the lock records.** It deletes a merged file only if install created it and it is now empty, then deletes the lock. `enact-config.toml` stays unless you pass `--purge`. `--purge` cuts only the `[skills]` block install wrote, at text level; it refuses if that block was edited (with `--force`, it keeps the block). It deletes the file only if install created it and nothing but `version = 1` remains.
120
+ - **Refusals (override with `--force`).** Install stops if a managed file or entry was edited since the last install, or if a same-named native agent, skill, or MCP entry exists that the bundle does not own. The error names each file.
121
+ - **Uninstall removes exactly what the lock records.** It deletes a merged file only if install created it and it is now empty, then deletes the lock. `enact-config.toml` stays unless you pass `--purge`. `--purge` cuts only the `[extensions]` block install wrote, at text level; it refuses if that block was edited (with `--force`, it keeps the block). It deletes the file only if install created it and nothing but `version = 1` remains.
100
122
 
101
123
  Install the CLI itself globally (the CLI binary only — no plugins, no host config):
102
124
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export type { OpenCodeHookFallback, OpenCodeLocalMcpServer, OpenCodePluginSource, ScaffoldOptions, } from "./create/index.js";
2
2
  export { createEnactManifest, deriveClaudeManifest, deriveCodexManifest, deriveCursorManifest, deriveKimiManifest, deriveManifest, deriveOpenCodeManifest, deriveOpenCodeMcp, deriveOpenCodePlugin, fallbackOpenCodeHookEvents, manifestForPlatform, resolveProjectionTargets, resolveTargets, scaffoldPlugin, syncPlatformManifests, unmappedOpenCodeHookEvents, } from "./create/index.js";
3
3
  export type { AgentDef, MarkdownAgentPlatform } from "./internal/agents.js";
4
- export { emitMarkdownAgent, parseTomlAgent, projectAgentsDir, projectCursorHooks, unmappedCursorHookEvents, unmappedCursorHookMatchers, writeCursorHooksFile, } from "./internal/agents.js";
4
+ export { emitKimiAgent, emitMarkdownAgent, emitOpenCodeAgent, emitTomlAgent, parseMarkdownAgent, parseTomlAgent, projectAgentsDir, projectCursorHooks, projectNativeAgentsDir, unmappedCursorHookEvents, unmappedCursorHookMatchers, writeCursorHooksFile, } from "./internal/agents.js";
5
5
  export { cutExtensionsBlock, cutLegacySkillsBlock, declaredExtensionsFrom, declareExtension, EXTENSIONS_BLOCK, extensionBlock, removeExtensionBlock, } from "./internal/extensions-table.js";
6
6
  export { makeFileOps } from "./internal/file-ops.js";
7
7
  export { applyHostFlagToHooksDoc, clampHookTimeoutsForHost, withHostFlag, writeHostFlaggedHooksFile, } from "./internal/hooks.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,E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iB,EAAE,MAAM,iBAAiB,CAAC;AAC5G,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACnH,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,4CAA4C,EAC5C,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,GACrB,MA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qB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { createEnactManifest, deriveClaudeManifest, deriveCodexManifest, deriveCursorManifest, deriveKimiManifest, deriveManifest, deriveOpenCodeManifest, deriveOpenCodeMcp, deriveOpenCodePlugin, fallbackOpenCodeHookEvents, manifestForPlatform, resolveProjectionTargets, resolveTargets, scaffoldPlugin, syncPlatformManifests, unmappedOpenCodeHookEvents, } from "./create/index.js";
2
- export { emitMarkdownAgent, parseTomlAgent, projectAgentsDir, projectCursorHooks, unmappedCursorHookEvents, unmappedCursorHookMatchers, writeCursorHooksFile, } from "./internal/agents.js";
2
+ export { emitKimiAgent, emitMarkdownAgent, emitOpenCodeAgent, emitTomlAgent, parseMarkdownAgent, parseTomlAgent, projectAgentsDir, projectCursorHooks, projectNativeAgentsDir, unmappedCursorHookEvents, unmappedCursorHookMatchers, writeCursorHooksFile, } from "./internal/agents.js";
3
3
  export { cutExtensionsBlock, cutLegacySkillsBlock, declaredExtensionsFrom, declareExtension, EXTENSIONS_BLOCK, extensionBlock, removeExtensionBlock, } from "./internal/extensions-table.js";
4
4
  export { makeFileOps } from "./internal/file-ops.js";
5
5
  export { applyHostFlagToHooksDoc, clampHookTimeoutsForHost, withHostFlag, writeHostFlaggedHooksFile, } from "./internal/hooks.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB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,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,YAAY,EACZ,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAUlC,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAE5G,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,4CAA4C,EAC5C,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
@@ -3,9 +3,10 @@ import type { Platform } from "./types.js";
3
3
  * Agent transformation. Canonical agents are authored in enact-native `.toml`
4
4
  * (enact ≡ codex). On install we project per surface:
5
5
  * - codex / enact : copy the canonical `.toml` as-is.
6
- * - claude / cursor: emit `.md` + YAML frontmatter (same format both use).
7
- * Non-`.toml` files (e.g. an already-`.md` agent, README) are copied verbatim,
8
- * so mixed-format bundles keep working. See enact-tooling-memory/procedural/enact-extensions-authoring-guidelines.md §6.
6
+ * - claude / cursor / kimi / opencode: emit their native Markdown profile.
7
+ * - a canonical Markdown profile is converted to native Codex TOML.
8
+ * Non-agent files (for example README files without frontmatter) are copied
9
+ * verbatim, so mixed-format bundles keep working.
9
10
  */
10
11
  export type MarkdownAgentPlatform = "claude" | "cursor";
11
12
  export interface AgentDef {
@@ -18,13 +19,31 @@ export interface AgentDef {
18
19
  claudeModel?: string;
19
20
  /** Cursor model alias projected into Markdown `model:` frontmatter. */
20
21
  cursorModel?: string;
22
+ /** Kimi model aliases have no portable direct-agent equivalent. */
23
+ kimiModel?: string;
24
+ /** OpenCode model aliases have no portable direct-agent equivalent. */
25
+ openCodeModel?: string;
26
+ sandboxMode?: string;
27
+ modelReasoningEffort?: string;
21
28
  tools?: string;
22
29
  disallowedTools?: string;
23
30
  color?: string;
24
31
  skills?: string[];
32
+ whenToUse?: string;
33
+ override?: boolean;
34
+ /** Cursor's native read-only switch. */
35
+ readonly?: boolean;
25
36
  }
26
37
  export declare function parseTomlAgent(content: string): AgentDef;
38
+ /** Parse a canonical Markdown agent with YAML frontmatter. */
39
+ export declare function parseMarkdownAgent(content: string): AgentDef;
27
40
  export declare function emitMarkdownAgent(def: AgentDef, platform?: MarkdownAgentPlatform): string;
41
+ /** Emit Kimi's native Markdown agent format from an enact canonical agent. */
42
+ export declare function emitKimiAgent(def: AgentDef): string;
43
+ /** Emit OpenCode's native Markdown subagent format from an enact canonical agent. */
44
+ export declare function emitOpenCodeAgent(def: AgentDef): string;
45
+ /** Emit Codex's native TOML agent format from an enact canonical agent. */
46
+ export declare function emitTomlAgent(def: AgentDef): string;
28
47
  interface CursorFlatHookEntry {
29
48
  command: string;
30
49
  matcher?: string;
@@ -54,9 +73,15 @@ export declare function projectCursorHooks(canonical: Record<string, unknown>):
54
73
  */
55
74
  export declare function writeCursorHooksFile(sourcePath: string, targetPath: string): boolean;
56
75
  /**
57
- * Project a source agents/ dir into targetDir for `platform`, transforming
58
- * `.toml` agents to `.md` for claude/cursor. Recurses into subfolders (plugin
59
- * subagents may be namespaced into subdirs).
76
+ * Project a source agents/ dir into a direct native host target. TOML and
77
+ * frontmatter-bearing Markdown agents are always transformed for a different
78
+ * host; only canonical Codex TOML is copied unchanged to Codex/enact.
79
+ */
80
+ export declare function projectNativeAgentsDir(sourceDir: string, targetDir: string, platform: Platform): void;
81
+ /**
82
+ * Legacy plugin-root projection. Keep this behavior isolated from direct repo
83
+ * installation: plugin surfaces own their Markdown agents and may accept
84
+ * plugin-specific frontmatter that a native host cannot represent.
60
85
  */
61
86
  export declare function projectAgentsDir(sourceDir: string, targetDir: string, platform: Platform): void;
62
87
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/internal/agents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAA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ED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAkB/F"}
@@ -1,6 +1,7 @@
1
1
  import { cpSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import * as TOML from "@iarna/toml";
4
+ import { parse as parseYaml } from "yaml";
4
5
  import { withHostFlag } from "./hooks.js";
5
6
  function str(v) {
6
7
  if (typeof v === "string" && v.trim())
@@ -12,6 +13,17 @@ function list(v) {
12
13
  return v.map(String).join(", ");
13
14
  return str(v);
14
15
  }
16
+ function stringList(value) {
17
+ return value
18
+ ? value
19
+ .split(",")
20
+ .map((item) => item.trim())
21
+ .filter(Boolean)
22
+ : [];
23
+ }
24
+ function bool(v) {
25
+ return typeof v === "boolean" ? v : undefined;
26
+ }
15
27
  export function parseTomlAgent(content) {
16
28
  const t = TOML.parse(content);
17
29
  return {
@@ -21,10 +33,49 @@ export function parseTomlAgent(content) {
21
33
  model: str(t.model),
22
34
  claudeModel: str(t.claude_model) ?? str(t.claudeModel),
23
35
  cursorModel: str(t.cursor_model) ?? str(t.cursorModel),
36
+ kimiModel: str(t.kimi_model) ?? str(t.kimiModel),
37
+ openCodeModel: str(t.opencode_model) ?? str(t.opencodeModel),
38
+ sandboxMode: str(t.sandbox_mode) ?? str(t.sandboxMode),
39
+ modelReasoningEffort: str(t.model_reasoning_effort) ?? str(t.modelReasoningEffort),
40
+ tools: list(t.tools),
41
+ disallowedTools: list(t.disallowed_tools) ?? list(t.disallowedTools),
42
+ color: str(t.color),
43
+ skills: Array.isArray(t.skills) ? t.skills.map(String) : undefined,
44
+ whenToUse: str(t.when_to_use) ?? str(t.whenToUse),
45
+ override: bool(t.override),
46
+ readonly: bool(t.readonly),
47
+ };
48
+ }
49
+ /** Parse a canonical Markdown agent with YAML frontmatter. */
50
+ export function parseMarkdownAgent(content) {
51
+ const match = /^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/u.exec(content);
52
+ if (!match)
53
+ throw new Error("Canonical Markdown agent must start with YAML frontmatter delimited by ---");
54
+ const raw = parseYaml(match[1]);
55
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
56
+ throw new Error("Canonical Markdown agent frontmatter must be a mapping");
57
+ }
58
+ const t = raw;
59
+ return {
60
+ name: str(t.name) ?? "",
61
+ description: str(t.description) ?? "",
62
+ body: match[2].trimEnd(),
63
+ // `model` in canonical Markdown is the long-standing Claude field. A
64
+ // Codex model must be declared as codex_model; names share no namespace.
65
+ claudeModel: str(t.claude_model) ?? str(t.claudeModel) ?? str(t.model),
66
+ cursorModel: str(t.cursor_model) ?? str(t.cursorModel),
67
+ kimiModel: str(t.kimi_model) ?? str(t.kimiModel),
68
+ openCodeModel: str(t.opencode_model) ?? str(t.opencodeModel),
69
+ model: str(t.codex_model) ?? str(t.codexModel),
70
+ sandboxMode: str(t.sandbox_mode) ?? str(t.sandboxMode),
71
+ modelReasoningEffort: str(t.model_reasoning_effort) ?? str(t.modelReasoningEffort),
24
72
  tools: list(t.tools),
25
73
  disallowedTools: list(t.disallowed_tools) ?? list(t.disallowedTools),
26
74
  color: str(t.color),
27
75
  skills: Array.isArray(t.skills) ? t.skills.map(String) : undefined,
76
+ whenToUse: str(t.when_to_use) ?? str(t.whenToUse),
77
+ override: bool(t.override),
78
+ readonly: bool(t.readonly),
28
79
  };
29
80
  }
30
81
  /** Emit a YAML scalar that round-trips arbitrary text safely. */
@@ -52,6 +103,11 @@ export function emitMarkdownAgent(def, platform) {
52
103
  fm.push(`model: ${surfaceModel}`);
53
104
  if (def.color)
54
105
  fm.push(`color: ${def.color}`);
106
+ if (platform === "cursor") {
107
+ const readonly = def.readonly ?? (def.sandboxMode === "read-only" ? true : def.sandboxMode ? false : undefined);
108
+ if (readonly !== undefined)
109
+ fm.push(`readonly: ${readonly}`);
110
+ }
55
111
  if (def.skills?.length) {
56
112
  fm.push("skills:");
57
113
  for (const s of def.skills)
@@ -60,6 +116,118 @@ export function emitMarkdownAgent(def, platform) {
60
116
  fm.push("---", "");
61
117
  return `${fm.join("\n")}\n${def.body.trimEnd()}\n`;
62
118
  }
119
+ function assertNoTargetOnlyModel(def, platform) {
120
+ const field = platform === "Kimi" ? "kimiModel" : "openCodeModel";
121
+ const label = platform === "Kimi" ? "kimi_model" : "opencode_model";
122
+ if (def[field]) {
123
+ throw new Error(`${platform} agent projection cannot represent explicit ${label}: ${def[field]}`);
124
+ }
125
+ }
126
+ function assertNoUnsupportedKimiFields(def) {
127
+ assertNoTargetOnlyModel(def, "Kimi");
128
+ const disallowed = stringList(def.disallowedTools);
129
+ const allowed = new Set(stringList(def.tools));
130
+ if (disallowed.length > 0 && allowed.size === 0) {
131
+ throw new Error(`Kimi agent projection cannot represent explicit disallowed_tools without tools: ${def.disallowedTools}. ` +
132
+ "Use a Kimi tools allowlist instead.");
133
+ }
134
+ const conflicts = disallowed.filter((tool) => allowed.has(tool));
135
+ if (conflicts.length > 0) {
136
+ throw new Error(`Kimi agent projection has tools/disallowed_tools conflict for: ${conflicts.join(", ")}.`);
137
+ }
138
+ if ((def.sandboxMode === "read-only" || def.readonly === true) && !def.tools) {
139
+ throw new Error("Kimi agent projection cannot represent a read-only profile without an explicit tools allowlist.");
140
+ }
141
+ // `color` is presentation-only, `skills` are discovered from the native
142
+ // repo skill directory, and model reasoning is a Codex-only setting. These
143
+ // are deliberate no-ops, not dropped authority.
144
+ }
145
+ /** Emit Kimi's native Markdown agent format from an enact canonical agent. */
146
+ export function emitKimiAgent(def) {
147
+ assertNoUnsupportedKimiFields(def);
148
+ const fm = [
149
+ "---",
150
+ `name: ${yamlScalar(def.name)}`,
151
+ `description: ${yamlScalar(def.description)}`,
152
+ `whenToUse: ${yamlScalar(def.whenToUse ?? def.description)}`,
153
+ `override: ${def.override ?? false}`,
154
+ ];
155
+ const tools = stringList(def.tools);
156
+ if (tools.length > 0) {
157
+ fm.push("tools:");
158
+ for (const tool of tools)
159
+ fm.push(` - ${yamlScalar(tool)}`);
160
+ }
161
+ fm.push("---", "");
162
+ return `${fm.join("\n")}\n${def.body.trimEnd()}\n`;
163
+ }
164
+ function openCodeDeniedActions(def) {
165
+ assertNoTargetOnlyModel(def, "OpenCode");
166
+ // `color` is presentation-only; native skills are auto-discovered; Kimi's
167
+ // routing fields and Codex reasoning are host-scoped configuration. None
168
+ // changes an OpenCode subagent's authority, so omission is intentional.
169
+ const disallowed = new Set(stringList(def.disallowedTools));
170
+ const allowed = new Set(stringList(def.tools));
171
+ const deny = new Set();
172
+ if (def.sandboxMode === "read-only" || def.readonly === true) {
173
+ deny.add("edit");
174
+ deny.add("bash");
175
+ }
176
+ if (disallowed.has("Write") || disallowed.has("Edit") || disallowed.has("MultiEdit"))
177
+ deny.add("edit");
178
+ if (disallowed.has("Bash") || disallowed.has("Shell"))
179
+ deny.add("bash");
180
+ if (allowed.size > 0) {
181
+ if (!["Write", "Edit", "MultiEdit"].some((tool) => allowed.has(tool)))
182
+ deny.add("edit");
183
+ if (!["Bash", "Shell"].some((tool) => allowed.has(tool)))
184
+ deny.add("bash");
185
+ }
186
+ const unsupported = [...disallowed].filter((tool) => !["Write", "Edit", "MultiEdit", "Bash", "Shell"].includes(tool));
187
+ if (unsupported.length > 0) {
188
+ throw new Error(`OpenCode agent projection cannot represent explicit disallowed_tools: ${unsupported.join(", ")}`);
189
+ }
190
+ return [...deny];
191
+ }
192
+ /** Emit OpenCode's native Markdown subagent format from an enact canonical agent. */
193
+ export function emitOpenCodeAgent(def) {
194
+ const denied = openCodeDeniedActions(def);
195
+ const fm = ["---", `description: ${yamlScalar(def.description)}`, "mode: subagent"];
196
+ if (denied.length > 0) {
197
+ fm.push("permission:");
198
+ for (const action of denied)
199
+ fm.push(` ${action}: deny`);
200
+ }
201
+ fm.push("---", "");
202
+ return `${fm.join("\n")}\n${def.body.trimEnd()}\n`;
203
+ }
204
+ /** Emit Codex's native TOML agent format from an enact canonical agent. */
205
+ export function emitTomlAgent(def) {
206
+ const allowed = new Set(stringList(def.tools));
207
+ const disallowed = new Set(stringList(def.disallowedTools));
208
+ const grantsWrite = ["Write", "Edit", "MultiEdit"].some((tool) => allowed.has(tool));
209
+ const deniesWrite = ["Write", "Edit", "MultiEdit"].some((tool) => disallowed.has(tool));
210
+ if (grantsWrite && deniesWrite) {
211
+ throw new Error("Codex agent projection has tools/disallowed_tools conflict for write authority.");
212
+ }
213
+ // Claude tool names have no Codex frontmatter equivalent. They do, however,
214
+ // express whether an agent may edit: derive the native sandbox when no
215
+ // explicit Codex mapping already exists. Presentation/routing metadata and
216
+ // skills are host-scoped; skills remain auto-discovered under `.agents`.
217
+ const derivedSandbox = def.tools || def.disallowedTools ? (grantsWrite ? "workspace-write" : "read-only") : undefined;
218
+ const output = {
219
+ name: def.name,
220
+ description: def.description,
221
+ ...(def.model ? { model: def.model } : {}),
222
+ ...(def.modelReasoningEffort ? { model_reasoning_effort: def.modelReasoningEffort } : {}),
223
+ ...(def.sandboxMode ? { sandbox_mode: def.sandboxMode } : derivedSandbox ? { sandbox_mode: derivedSandbox } : {}),
224
+ ...(!def.sandboxMode && def.readonly !== undefined
225
+ ? { sandbox_mode: def.readonly ? "read-only" : "workspace-write" }
226
+ : {}),
227
+ developer_instructions: def.body,
228
+ };
229
+ return TOML.stringify(output);
230
+ }
63
231
  // ---------------------------------------------------------------------------
64
232
  // Cursor hooks projection
65
233
  // ---------------------------------------------------------------------------
@@ -249,9 +417,72 @@ export function writeCursorHooksFile(sourcePath, targetPath) {
249
417
  return true;
250
418
  }
251
419
  /**
252
- * Project a source agents/ dir into targetDir for `platform`, transforming
253
- * `.toml` agents to `.md` for claude/cursor. Recurses into subfolders (plugin
254
- * subagents may be namespaced into subdirs).
420
+ * Project a source agents/ dir into a direct native host target. TOML and
421
+ * frontmatter-bearing Markdown agents are always transformed for a different
422
+ * host; only canonical Codex TOML is copied unchanged to Codex/enact.
423
+ */
424
+ export function projectNativeAgentsDir(sourceDir, targetDir, platform) {
425
+ mkdirSync(targetDir, { recursive: true });
426
+ for (const entry of readdirSync(sourceDir, { withFileTypes: true })) {
427
+ const src = join(sourceDir, entry.name);
428
+ if (entry.isDirectory()) {
429
+ projectNativeAgentsDir(src, join(targetDir, entry.name), platform);
430
+ continue;
431
+ }
432
+ if (entry.name.endsWith(".toml")) {
433
+ const def = parseTomlAgent(readFileSync(src, "utf8"));
434
+ const base = entry.name.slice(0, -".toml".length);
435
+ if (platform === "codex" || platform === "enact") {
436
+ cpSync(src, join(targetDir, entry.name), { force: true });
437
+ }
438
+ else if (platform === "claude" || platform === "cursor") {
439
+ const mdPlatform = platform === "cursor" ? "cursor" : "claude";
440
+ writeFileSync(join(targetDir, `${base}.md`), emitMarkdownAgent(def, mdPlatform), "utf8");
441
+ }
442
+ else if (platform === "kimi") {
443
+ writeFileSync(join(targetDir, `${base}.md`), emitKimiAgent(def), "utf8");
444
+ }
445
+ else {
446
+ writeFileSync(join(targetDir, `${base}.md`), emitOpenCodeAgent(def), "utf8");
447
+ }
448
+ continue;
449
+ }
450
+ if (entry.name.endsWith(".md")) {
451
+ const content = readFileSync(src, "utf8");
452
+ if (!content.startsWith("---")) {
453
+ cpSync(src, join(targetDir, entry.name), { force: true });
454
+ continue;
455
+ }
456
+ const def = parseMarkdownAgent(content);
457
+ const base = entry.name.slice(0, -".md".length);
458
+ if (platform === "codex" || platform === "enact") {
459
+ writeFileSync(join(targetDir, `${base}.toml`), emitTomlAgent(def), "utf8");
460
+ }
461
+ else if (platform === "claude" || platform === "cursor") {
462
+ const mdPlatform = platform === "cursor" ? "cursor" : "claude";
463
+ if (platform === "cursor" && def.claudeModel && def.claudeModel !== "inherit" && !def.cursorModel) {
464
+ throw new Error(`Cursor agent projection cannot represent explicit claude_model without cursor_model: ${def.claudeModel}`);
465
+ }
466
+ const cursorDef = platform === "cursor" && !def.cursorModel && def.claudeModel === "inherit"
467
+ ? { ...def, cursorModel: "inherit" }
468
+ : def;
469
+ writeFileSync(join(targetDir, entry.name), emitMarkdownAgent(cursorDef, mdPlatform), "utf8");
470
+ }
471
+ else if (platform === "kimi") {
472
+ writeFileSync(join(targetDir, entry.name), emitKimiAgent(def), "utf8");
473
+ }
474
+ else {
475
+ writeFileSync(join(targetDir, entry.name), emitOpenCodeAgent(def), "utf8");
476
+ }
477
+ continue;
478
+ }
479
+ cpSync(src, join(targetDir, entry.name), { force: true });
480
+ }
481
+ }
482
+ /**
483
+ * Legacy plugin-root projection. Keep this behavior isolated from direct repo
484
+ * installation: plugin surfaces own their Markdown agents and may accept
485
+ * plugin-specific frontmatter that a native host cannot represent.
255
486
  */
256
487
  export function projectAgentsDir(sourceDir, targetDir, platform) {
257
488
  mkdirSync(targetDir, { recursive: true });
@@ -269,7 +500,6 @@ export function projectAgentsDir(sourceDir, targetDir, platform) {
269
500
  writeFileSync(join(targetDir, `${base}.md`), emitMarkdownAgent(def, mdPlatform), "utf8");
270
501
  continue;
271
502
  }
272
- // codex/enact: copy .toml as-is. Any surface: copy non-.toml verbatim.
273
503
  cpSync(src, join(targetDir, entry.name), { force: true });
274
504
  }
275
505
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/internal/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA8B1C,SAAS,GAAG,CAAC,CAAU;IACrB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE;QAAE,OAAO,CAAC,CAAC;IAChD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,IAAI,CAAC,CAAU;IACtB,IAAI,KAAK,CAAC,OAAO,C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ent setup for any repository: the full Enact skill catalog plus guard, briefing, and code-review-graph hooks and MCP tooling, installed at repo scope.",
5
5
  "author": {
6
6
  "name": "amsterdamdatalabs"
@@ -70,12 +70,19 @@ host, with no `--host` appended.
70
70
  ## Repo-local install
71
71
 
72
72
  Install into a repository with `enact-extensions install enact-repo --repo <repo-root>` (see the
73
- top-level README, "Repo-local install"). Every host gets committed, relative files; skills are shared
74
- from `.agents/skills/` (Claude uses its plugin copy). Kimi hooks are global-only: they are installed
75
- by enact-vps, not by this bundle. The installer also marks the repo as managed through root
76
- `enact-config.toml` (the file `enact-hook` checks): it creates the file with `version = 1` when
77
- missing, or appends a `[skills]` block (`version = 1`) as text, touching no other byte and never
78
- writing `[hooks]`; installs the baseline `lean-ctx/config.toml` and
73
+ top-level README, "Repo-local install"). The command writes direct native project files only:
74
+ `.claude/agents` and `.claude/skills`; `.codex/agents` and `.agents/skills`;
75
+ `.cursor/agents` and `.cursor/skills`; `.kimi-code/agents` and `.kimi-code/skills`; and,
76
+ for hook-free bundles, `.opencode/agents` and `.opencode/skills`. It also writes each host's
77
+ native MCP and hook configuration where supported. It never writes a plugin root, marketplace,
78
+ or plugin registration.
79
+ Kimi hooks are global-only and are installed by `enact-vps`, not by this bundle. OpenCode has no
80
+ repo-local hook carrier: an OpenCode install of a hook-bearing bundle fails before writing anything
81
+ and requires the explicit global OpenCode plugin through `enact-vps`. The installer also marks the
82
+ repo as managed through root `enact-config.toml` (the file `enact-hook` checks): it creates the
83
+ file with `version = 1` when missing, manages the `[extensions]` declaration for this bundle by
84
+ text-level surgery only, removes the legacy marker-only `[skills]` block, and never writes
85
+ `[hooks]`; installs the baseline `lean-ctx/config.toml` and
79
86
  `lean-ctx/layout.toml` as managed whole files at `.agents/lean-ctx/config/lean-ctx/` (tracked by
80
87
  the lock like any other managed file — drift detection, `--force` takeover with originals
81
88
  restore on uninstall, all reused from the existing managed-file machinery); and ignores
@@ -85,6 +92,6 @@ committed).
85
92
 
86
93
  ## Canonical install path
87
94
 
88
- The canonical install entrypoint is `extensions/enact-repo/.agents/plugin.json`. Host surfaces
89
- (`.claude-plugin/`, `.codex-plugin/`, `.cursor-plugin/`) are generated by `enact-extensions
90
- sync`/`install` and are not committed.
95
+ The canonical install entrypoint is `extensions/enact-repo/.agents/plugin.json`. `enact-extensions
96
+ sync` generates host plugin-root projections in this bundle for the explicit global plugin path;
97
+ repo-local `install --repo` never writes them.