Commit Graph
12 Commits
Author SHA1 Message Date
Willie 2ef704a77b fix(sync): isolate extension modules and condense diagnostics
Keep bundled CommonJS converters working inside ESM projects. Show concise sync failures with expandable original diagnostics and clarify that the last-sync card covers skills and agents only.
2026-10-06 21:36:04 +08:00
Willie cb2bcec948 feat(agents): convert agents with a target extension
Tools disagree on agent frontmatter and some need another format entirely,
so an agent written for Claude is misread elsewhere. An `extension` on a
target's agents block reuses the extras transform mechanism to convert each
agent during sync.

Converted targets hold transformed output, so collect never pulls them back
into the source. Leftover symlinks from merge or symlink mode are removed
rather than written through, and a failed conversion drops the old output
so an unconverted agent never stays active.

The bundled opencode-agents extension keeps only fields OpenCode documents
and refuses agents that restrict their tools, since dropping those fields
would widen the agent's access.

Refs #267
Refs #241
2026-09-21 13:31:38 +08:00
Willie 1183e0a366 fix: improve codex agent extension validation 2026-05-31 13:39:41 +08:00
Letiancheng Lee 0ae4e11376 reject blank codex agent descriptions 2026-05-31 13:07:25 +08:00
Letiancheng Lee ad9ffde242 fix codex agent extension validation 2026-05-31 13:07:25 +08:00
Willie 04f5cfa3c8 chore: update extensions readme 2026-05-30 19:45:16 +08:00
Willie 4d08690d36 fix(review): address PR #174 review feedback
- handler_git: dashboard Pull auto-sync now uses EffectiveSkillsSource()
  instead of the git_root scope dir, so it no longer mangles skill rel
  paths (skills/foo -> skills__foo) when git_root is root/agents/extras
- extension: run the transform subprocess via CommandContext with a 30s
  timeout so a hung extension can't block sync indefinitely
- md-toml.js (codex-agents, gemini-commands): escape values via
  JSON.stringify so control characters produce valid TOML basic strings
- gitroot: quote paths in the commit/push mv guidance so paths with spaces
  can be pasted safely
- extras list + extras server handlers: warn when an extension fails to
  resolve instead of silently falling back and reporting false drift

Lock-contention suggestions on handleSetGitRoot/handleAbsorbNested are not
applied: this is a single-user localhost dashboard, and dropping the write
lock around .git-mutating operations trades safety for negligible throughput.
2026-05-30 19:23:12 +08:00
Willie f59d5e905b refactor(extensions): simplify reference converters 2026-05-30 19:23:12 +08:00
Willie 9bafda4fa3 refactor(ui): use Checkbox component and lock chip in Extras targets
The raw <input type=checkbox> and greyed-out mode select looked out of
place against the hand-drawn design. Use the shared Checkbox component for
Flatten, and render a read-only lock chip (instead of a disabled select)
when an extension forces copy mode — in both the Add Extra modal and
ExtraCard so the two stay consistent.
2026-05-30 19:23:12 +08:00
Willie c0609011e4 feat(extensions): map model field and document Codex agents recipe
The md2codex reference converter now carries the agent's `model`
frontmatter into the generated TOML, matching what Codex agents expect.
Document the extras + extension recipe for converting markdown agents to
Codex TOML so the conversion works without a built-in agents target.
2026-05-30 19:23:12 +08:00
Willie 9e4563d143 chore(extensions): port reference scripts to Node.js and validate extras extension schema
Port the md2gemini and md2codex reference extensions from Python to
Node.js for broader portability (Node ships uniformly across Windows,
macOS, and Linux). Add the extension field to extraTargetConfig in the
global and project JSON schemas so editors accept it, with a schema test
guarding its presence.
2026-05-30 19:23:12 +08:00
Willie 3a2a97b542 docs(extensions): add md2gemini and md2codex reference extensions 2026-05-30 19:23:12 +08:00