@sentry/warden 0.0.0 → 0.1.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.
- package/.claude/skills/warden-skill/SKILL.md +0 -24
- package/.claude/skills/warden-skill/references/config-schema.md +0 -17
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/release.yml +6 -1
- package/.github/workflows/warden.yml +1 -1
- package/dist/action/159.index.js +523 -0
- package/dist/action/159.index.js.map +1 -0
- package/dist/action/action/index.d.ts +2 -0
- package/dist/action/action/index.d.ts.map +1 -0
- package/dist/action/action/main.d.ts +2 -0
- package/dist/action/action/main.d.ts.map +1 -0
- package/dist/action/cli/args.d.ts +74 -0
- package/dist/action/cli/args.d.ts.map +1 -0
- package/dist/action/cli/args.test.d.ts +2 -0
- package/dist/action/cli/args.test.d.ts.map +1 -0
- package/dist/action/cli/commands/add.d.ts +7 -0
- package/dist/action/cli/commands/add.d.ts.map +1 -0
- package/dist/action/cli/commands/init.d.ts +10 -0
- package/dist/action/cli/commands/init.d.ts.map +1 -0
- package/dist/action/cli/commands/init.test.d.ts +2 -0
- package/dist/action/cli/commands/init.test.d.ts.map +1 -0
- package/dist/action/cli/commands/setup-app/browser.d.ts +9 -0
- package/dist/action/cli/commands/setup-app/browser.d.ts.map +1 -0
- package/dist/action/cli/commands/setup-app/credentials.d.ts +15 -0
- package/dist/action/cli/commands/setup-app/credentials.d.ts.map +1 -0
- package/dist/action/cli/commands/setup-app/manifest.d.ts +24 -0
- package/dist/action/cli/commands/setup-app/manifest.d.ts.map +1 -0
- package/dist/action/cli/commands/setup-app/server.d.ts +28 -0
- package/dist/action/cli/commands/setup-app/server.d.ts.map +1 -0
- package/dist/action/cli/commands/setup-app.d.ts +11 -0
- package/dist/action/cli/commands/setup-app.d.ts.map +1 -0
- package/dist/action/cli/commands/sync.d.ts +9 -0
- package/dist/action/cli/commands/sync.d.ts.map +1 -0
- package/dist/action/cli/context.d.ts +27 -0
- package/dist/action/cli/context.d.ts.map +1 -0
- package/dist/action/cli/files.d.ts +22 -0
- package/dist/action/cli/files.d.ts.map +1 -0
- package/dist/action/cli/files.test.d.ts +2 -0
- package/dist/action/cli/files.test.d.ts.map +1 -0
- package/dist/action/cli/fix.d.ts +41 -0
- package/dist/action/cli/fix.d.ts.map +1 -0
- package/dist/action/cli/fix.test.d.ts +2 -0
- package/dist/action/cli/fix.test.d.ts.map +1 -0
- package/dist/action/cli/git.d.ts +73 -0
- package/dist/action/cli/git.d.ts.map +1 -0
- package/dist/action/cli/git.test.d.ts +2 -0
- package/dist/action/cli/git.test.d.ts.map +1 -0
- package/dist/action/cli/index.d.ts +3 -0
- package/dist/action/cli/index.d.ts.map +1 -0
- package/dist/action/cli/main.d.ts +7 -0
- package/dist/action/cli/main.d.ts.map +1 -0
- package/dist/action/cli/output/box.d.ts +75 -0
- package/dist/action/cli/output/box.d.ts.map +1 -0
- package/dist/action/cli/output/formatters.d.ts +90 -0
- package/dist/action/cli/output/formatters.d.ts.map +1 -0
- package/dist/action/cli/output/formatters.test.d.ts +2 -0
- package/dist/action/cli/output/formatters.test.d.ts.map +1 -0
- package/dist/action/cli/output/icons.d.ts +15 -0
- package/dist/action/cli/output/icons.d.ts.map +1 -0
- package/dist/action/cli/output/index.d.ts +10 -0
- package/dist/action/cli/output/index.d.ts.map +1 -0
- package/dist/action/cli/output/ink-runner.d.ts +29 -0
- package/dist/action/cli/output/ink-runner.d.ts.map +1 -0
- package/dist/action/cli/output/jsonl.d.ts +43 -0
- package/dist/action/cli/output/jsonl.d.ts.map +1 -0
- package/dist/action/cli/output/jsonl.test.d.ts +2 -0
- package/dist/action/cli/output/jsonl.test.d.ts.map +1 -0
- package/dist/action/cli/output/reporter.d.ts +108 -0
- package/dist/action/cli/output/reporter.d.ts.map +1 -0
- package/dist/action/cli/output/tasks.d.ts +89 -0
- package/dist/action/cli/output/tasks.d.ts.map +1 -0
- package/dist/action/cli/output/tty.d.ts +21 -0
- package/dist/action/cli/output/tty.d.ts.map +1 -0
- package/dist/action/cli/output/tty.test.d.ts +2 -0
- package/dist/action/cli/output/tty.test.d.ts.map +1 -0
- package/dist/action/cli/output/verbosity.d.ts +20 -0
- package/dist/action/cli/output/verbosity.d.ts.map +1 -0
- package/dist/action/cli/output/verbosity.test.d.ts +2 -0
- package/dist/action/cli/output/verbosity.test.d.ts.map +1 -0
- package/dist/action/cli/terminal.d.ts +19 -0
- package/dist/action/cli/terminal.d.ts.map +1 -0
- package/dist/action/cli/terminal.test.d.ts +2 -0
- package/dist/action/cli/terminal.test.d.ts.map +1 -0
- package/dist/action/config/index.d.ts +4 -0
- package/dist/action/config/index.d.ts.map +1 -0
- package/dist/action/config/loader.d.ts +27 -0
- package/dist/action/config/loader.d.ts.map +1 -0
- package/dist/action/config/loader.test.d.ts +2 -0
- package/dist/action/config/loader.test.d.ts.map +1 -0
- package/dist/action/config/schema.d.ts +318 -0
- package/dist/action/config/schema.d.ts.map +1 -0
- package/dist/action/config/writer.d.ts +11 -0
- package/dist/action/config/writer.d.ts.map +1 -0
- package/dist/action/config/writer.test.d.ts +2 -0
- package/dist/action/config/writer.test.d.ts.map +1 -0
- package/dist/action/diff/classify.d.ts +29 -0
- package/dist/action/diff/classify.d.ts.map +1 -0
- package/dist/action/diff/classify.test.d.ts +2 -0
- package/dist/action/diff/classify.test.d.ts.map +1 -0
- package/dist/action/diff/coalesce.d.ts +42 -0
- package/dist/action/diff/coalesce.d.ts.map +1 -0
- package/dist/action/diff/coalesce.test.d.ts +2 -0
- package/dist/action/diff/coalesce.test.d.ts.map +1 -0
- package/dist/action/diff/context.d.ts +30 -0
- package/dist/action/diff/context.d.ts.map +1 -0
- package/dist/action/diff/context.test.d.ts +2 -0
- package/dist/action/diff/context.test.d.ts.map +1 -0
- package/dist/action/diff/index.d.ts +5 -0
- package/dist/action/diff/index.d.ts.map +1 -0
- package/dist/action/diff/parser.d.ts +52 -0
- package/dist/action/diff/parser.d.ts.map +1 -0
- package/dist/action/diff/parser.test.d.ts +2 -0
- package/dist/action/diff/parser.test.d.ts.map +1 -0
- package/dist/action/event/context.d.ts +9 -0
- package/dist/action/event/context.d.ts.map +1 -0
- package/dist/action/event/index.d.ts +3 -0
- package/dist/action/event/index.d.ts.map +1 -0
- package/dist/action/event/schedule-context.d.ts +30 -0
- package/dist/action/event/schedule-context.d.ts.map +1 -0
- package/dist/action/examples/examples.integration.test.d.ts +2 -0
- package/dist/action/examples/examples.integration.test.d.ts.map +1 -0
- package/dist/action/examples/index.d.ts +50 -0
- package/dist/action/examples/index.d.ts.map +1 -0
- package/dist/action/examples/index.test.d.ts +2 -0
- package/dist/action/examples/index.test.d.ts.map +1 -0
- package/dist/action/examples/setup.d.ts +2 -0
- package/dist/action/examples/setup.d.ts.map +1 -0
- package/dist/action/index.d.ts +11 -0
- package/dist/action/index.d.ts.map +1 -0
- package/dist/action/index.js +38231 -0
- package/dist/action/index.js.map +1 -0
- package/dist/action/licenses.txt +992 -0
- package/dist/action/main.d.ts +2 -0
- package/dist/action/main.d.ts.map +1 -0
- package/dist/action/main.js +707 -0
- package/dist/action/main.js.map +1 -0
- package/dist/action/output/dedup.d.ts +153 -0
- package/dist/action/output/dedup.d.ts.map +1 -0
- package/dist/action/output/dedup.test.d.ts +2 -0
- package/dist/action/output/dedup.test.d.ts.map +1 -0
- package/dist/action/output/github-checks.d.ts +106 -0
- package/dist/action/output/github-checks.d.ts.map +1 -0
- package/dist/action/output/github-checks.test.d.ts +2 -0
- package/dist/action/output/github-checks.test.d.ts.map +1 -0
- package/dist/action/output/github-issues.d.ts +35 -0
- package/dist/action/output/github-issues.d.ts.map +1 -0
- package/dist/action/output/index.d.ts +6 -0
- package/dist/action/output/index.d.ts.map +1 -0
- package/dist/action/output/issue-renderer.d.ts +20 -0
- package/dist/action/output/issue-renderer.d.ts.map +1 -0
- package/dist/action/output/renderer.d.ts +4 -0
- package/dist/action/output/renderer.d.ts.map +1 -0
- package/dist/action/output/renderer.test.d.ts +2 -0
- package/dist/action/output/renderer.test.d.ts.map +1 -0
- package/dist/action/output/stale.d.ts +31 -0
- package/dist/action/output/stale.d.ts.map +1 -0
- package/dist/action/output/stale.test.d.ts +2 -0
- package/dist/action/output/stale.test.d.ts.map +1 -0
- package/dist/action/output/types.d.ts +31 -0
- package/dist/action/output/types.d.ts.map +1 -0
- package/dist/action/package.json +3 -0
- package/dist/action/sdk/index.d.ts +2 -0
- package/dist/action/sdk/index.d.ts.map +1 -0
- package/dist/action/sdk/runner.d.ts +202 -0
- package/dist/action/sdk/runner.d.ts.map +1 -0
- package/dist/action/sdk/runner.test.d.ts +2 -0
- package/dist/action/sdk/runner.test.d.ts.map +1 -0
- package/dist/action/skills/index.d.ts +5 -0
- package/dist/action/skills/index.d.ts.map +1 -0
- package/dist/action/skills/loader.d.ts +111 -0
- package/dist/action/skills/loader.d.ts.map +1 -0
- package/dist/action/skills/loader.test.d.ts +2 -0
- package/dist/action/skills/loader.test.d.ts.map +1 -0
- package/dist/action/skills/remote.d.ts +117 -0
- package/dist/action/skills/remote.d.ts.map +1 -0
- package/dist/action/skills/remote.test.d.ts +2 -0
- package/dist/action/skills/remote.test.d.ts.map +1 -0
- package/dist/action/sourcemap-register.cjs +1 -0
- package/dist/action/triggers/matcher.d.ts +30 -0
- package/dist/action/triggers/matcher.d.ts.map +1 -0
- package/dist/action/triggers/matcher.test.d.ts +2 -0
- package/dist/action/triggers/matcher.test.d.ts.map +1 -0
- package/dist/action/types/index.d.ts +269 -0
- package/dist/action/types/index.d.ts.map +1 -0
- package/dist/action/utils/async.d.ts +5 -0
- package/dist/action/utils/async.d.ts.map +1 -0
- package/dist/action/utils/index.d.ts +16 -0
- package/dist/action/utils/index.d.ts.map +1 -0
- package/dist/action/utils/index.test.d.ts +2 -0
- package/dist/action/utils/index.test.d.ts.map +1 -0
- package/dist/action/utils/version.d.ts +3 -0
- package/dist/action/utils/version.d.ts.map +1 -0
- package/dist/cli/args.d.ts +74 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +359 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/args.test.d.ts +2 -0
- package/dist/cli/args.test.d.ts.map +1 -0
- package/dist/cli/args.test.js +392 -0
- package/dist/cli/args.test.js.map +1 -0
- package/dist/cli/commands/add.d.ts +7 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +380 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +113 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/init.test.d.ts +2 -0
- package/dist/cli/commands/init.test.d.ts.map +1 -0
- package/dist/cli/commands/init.test.js +117 -0
- package/dist/cli/commands/init.test.js.map +1 -0
- package/dist/cli/commands/setup-app/browser.d.ts +9 -0
- package/dist/cli/commands/setup-app/browser.d.ts.map +1 -0
- package/dist/cli/commands/setup-app/browser.js +36 -0
- package/dist/cli/commands/setup-app/browser.js.map +1 -0
- package/dist/cli/commands/setup-app/credentials.d.ts +15 -0
- package/dist/cli/commands/setup-app/credentials.d.ts.map +1 -0
- package/dist/cli/commands/setup-app/credentials.js +29 -0
- package/dist/cli/commands/setup-app/credentials.js.map +1 -0
- package/dist/cli/commands/setup-app/manifest.d.ts +24 -0
- package/dist/cli/commands/setup-app/manifest.d.ts.map +1 -0
- package/dist/cli/commands/setup-app/manifest.js +29 -0
- package/dist/cli/commands/setup-app/manifest.js.map +1 -0
- package/dist/cli/commands/setup-app/server.d.ts +28 -0
- package/dist/cli/commands/setup-app/server.d.ts.map +1 -0
- package/dist/cli/commands/setup-app/server.js +136 -0
- package/dist/cli/commands/setup-app/server.js.map +1 -0
- package/dist/cli/commands/setup-app.d.ts +11 -0
- package/dist/cli/commands/setup-app.d.ts.map +1 -0
- package/dist/cli/commands/setup-app.js +139 -0
- package/dist/cli/commands/setup-app.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +9 -0
- package/dist/cli/commands/sync.d.ts.map +1 -0
- package/dist/cli/commands/sync.js +96 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/context.d.ts +27 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +101 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/files.d.ts +22 -0
- package/dist/cli/files.d.ts.map +1 -0
- package/dist/cli/files.js +66 -0
- package/dist/cli/files.js.map +1 -0
- package/dist/cli/files.test.d.ts +2 -0
- package/dist/cli/files.test.d.ts.map +1 -0
- package/dist/cli/files.test.js +117 -0
- package/dist/cli/files.test.js.map +1 -0
- package/dist/cli/fix.d.ts +41 -0
- package/dist/cli/fix.d.ts.map +1 -0
- package/dist/cli/fix.js +320 -0
- package/dist/cli/fix.js.map +1 -0
- package/dist/cli/fix.test.d.ts +2 -0
- package/dist/cli/fix.test.d.ts.map +1 -0
- package/dist/cli/fix.test.js +251 -0
- package/dist/cli/fix.test.js.map +1 -0
- package/dist/cli/git.d.ts +73 -0
- package/dist/cli/git.d.ts.map +1 -0
- package/dist/cli/git.js +267 -0
- package/dist/cli/git.js.map +1 -0
- package/dist/cli/git.test.d.ts +2 -0
- package/dist/cli/git.test.d.ts.map +1 -0
- package/dist/cli/git.test.js +96 -0
- package/dist/cli/git.test.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +13 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +560 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/output/box.d.ts +75 -0
- package/dist/cli/output/box.d.ts.map +1 -0
- package/dist/cli/output/box.js +191 -0
- package/dist/cli/output/box.js.map +1 -0
- package/dist/cli/output/formatters.d.ts +90 -0
- package/dist/cli/output/formatters.d.ts.map +1 -0
- package/dist/cli/output/formatters.js +248 -0
- package/dist/cli/output/formatters.js.map +1 -0
- package/dist/cli/output/formatters.test.d.ts +2 -0
- package/dist/cli/output/formatters.test.d.ts.map +1 -0
- package/dist/cli/output/formatters.test.js +152 -0
- package/dist/cli/output/formatters.test.js.map +1 -0
- package/dist/cli/output/icons.d.ts +15 -0
- package/dist/cli/output/icons.d.ts.map +1 -0
- package/dist/cli/output/icons.js +15 -0
- package/dist/cli/output/icons.js.map +1 -0
- package/dist/cli/output/index.d.ts +10 -0
- package/dist/cli/output/index.d.ts.map +1 -0
- package/dist/cli/output/index.js +10 -0
- package/dist/cli/output/index.js.map +1 -0
- package/dist/cli/output/ink-runner.d.ts +29 -0
- package/dist/cli/output/ink-runner.d.ts.map +1 -0
- package/dist/cli/output/ink-runner.js +241 -0
- package/dist/cli/output/ink-runner.js.map +1 -0
- package/dist/cli/output/jsonl.d.ts +43 -0
- package/dist/cli/output/jsonl.d.ts.map +1 -0
- package/dist/cli/output/jsonl.js +89 -0
- package/dist/cli/output/jsonl.js.map +1 -0
- package/dist/cli/output/jsonl.test.d.ts +2 -0
- package/dist/cli/output/jsonl.test.d.ts.map +1 -0
- package/dist/cli/output/jsonl.test.js +284 -0
- package/dist/cli/output/jsonl.test.js.map +1 -0
- package/dist/cli/output/reporter.d.ts +108 -0
- package/dist/cli/output/reporter.d.ts.map +1 -0
- package/dist/cli/output/reporter.js +378 -0
- package/dist/cli/output/reporter.js.map +1 -0
- package/dist/cli/output/tasks.d.ts +89 -0
- package/dist/cli/output/tasks.d.ts.map +1 -0
- package/dist/cli/output/tasks.js +251 -0
- package/dist/cli/output/tasks.js.map +1 -0
- package/dist/cli/output/tty.d.ts +21 -0
- package/dist/cli/output/tty.d.ts.map +1 -0
- package/dist/cli/output/tty.js +44 -0
- package/dist/cli/output/tty.js.map +1 -0
- package/dist/cli/output/tty.test.d.ts +2 -0
- package/dist/cli/output/tty.test.d.ts.map +1 -0
- package/dist/cli/output/tty.test.js +105 -0
- package/dist/cli/output/tty.test.js.map +1 -0
- package/dist/cli/output/verbosity.d.ts +20 -0
- package/dist/cli/output/verbosity.d.ts.map +1 -0
- package/dist/cli/output/verbosity.js +32 -0
- package/dist/cli/output/verbosity.js.map +1 -0
- package/dist/cli/output/verbosity.test.d.ts +2 -0
- package/dist/cli/output/verbosity.test.d.ts.map +1 -0
- package/dist/cli/output/verbosity.test.js +35 -0
- package/dist/cli/output/verbosity.test.js.map +1 -0
- package/dist/cli/terminal.d.ts +19 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +247 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/cli/terminal.test.d.ts +2 -0
- package/dist/cli/terminal.test.d.ts.map +1 -0
- package/dist/cli/terminal.test.js +123 -0
- package/dist/cli/terminal.test.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +27 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +77 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/loader.test.d.ts +2 -0
- package/dist/config/loader.test.d.ts.map +1 -0
- package/dist/config/loader.test.js +263 -0
- package/dist/config/loader.test.js.map +1 -0
- package/dist/config/schema.d.ts +318 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +137 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/writer.d.ts +11 -0
- package/dist/config/writer.d.ts.map +1 -0
- package/dist/config/writer.js +74 -0
- package/dist/config/writer.js.map +1 -0
- package/dist/config/writer.test.d.ts +2 -0
- package/dist/config/writer.test.d.ts.map +1 -0
- package/dist/config/writer.test.js +98 -0
- package/dist/config/writer.test.js.map +1 -0
- package/dist/diff/classify.d.ts +29 -0
- package/dist/diff/classify.d.ts.map +1 -0
- package/dist/diff/classify.js +74 -0
- package/dist/diff/classify.js.map +1 -0
- package/dist/diff/classify.test.d.ts +2 -0
- package/dist/diff/classify.test.d.ts.map +1 -0
- package/dist/diff/classify.test.js +140 -0
- package/dist/diff/classify.test.js.map +1 -0
- package/dist/diff/coalesce.d.ts +42 -0
- package/dist/diff/coalesce.d.ts.map +1 -0
- package/dist/diff/coalesce.js +104 -0
- package/dist/diff/coalesce.js.map +1 -0
- package/dist/diff/coalesce.test.d.ts +2 -0
- package/dist/diff/coalesce.test.d.ts.map +1 -0
- package/dist/diff/coalesce.test.js +159 -0
- package/dist/diff/coalesce.test.js.map +1 -0
- package/dist/diff/context.d.ts +30 -0
- package/dist/diff/context.d.ts.map +1 -0
- package/dist/diff/context.js +144 -0
- package/dist/diff/context.js.map +1 -0
- package/dist/diff/context.test.d.ts +2 -0
- package/dist/diff/context.test.d.ts.map +1 -0
- package/dist/diff/context.test.js +190 -0
- package/dist/diff/context.test.js.map +1 -0
- package/dist/diff/index.d.ts +5 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +5 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/parser.d.ts +52 -0
- package/dist/diff/parser.d.ts.map +1 -0
- package/dist/diff/parser.js +95 -0
- package/dist/diff/parser.js.map +1 -0
- package/dist/diff/parser.test.d.ts +2 -0
- package/dist/diff/parser.test.d.ts.map +1 -0
- package/dist/diff/parser.test.js +178 -0
- package/dist/diff/parser.test.js.map +1 -0
- package/dist/event/context.d.ts +9 -0
- package/dist/event/context.d.ts.map +1 -0
- package/dist/event/context.js +94 -0
- package/dist/event/context.js.map +1 -0
- package/dist/event/index.d.ts +3 -0
- package/dist/event/index.d.ts.map +1 -0
- package/dist/event/index.js +3 -0
- package/dist/event/index.js.map +1 -0
- package/dist/event/schedule-context.d.ts +30 -0
- package/dist/event/schedule-context.d.ts.map +1 -0
- package/dist/event/schedule-context.js +57 -0
- package/dist/event/schedule-context.js.map +1 -0
- package/dist/examples/examples.integration.test.d.ts +2 -0
- package/dist/examples/examples.integration.test.d.ts.map +1 -0
- package/dist/examples/examples.integration.test.js +55 -0
- package/dist/examples/examples.integration.test.js.map +1 -0
- package/dist/examples/index.d.ts +50 -0
- package/dist/examples/index.d.ts.map +1 -0
- package/dist/examples/index.js +104 -0
- package/dist/examples/index.js.map +1 -0
- package/dist/examples/index.test.d.ts +2 -0
- package/dist/examples/index.test.d.ts.map +1 -0
- package/dist/examples/index.test.js +88 -0
- package/dist/examples/index.test.js.map +1 -0
- package/dist/examples/setup.d.ts +2 -0
- package/dist/examples/setup.d.ts.map +1 -0
- package/dist/examples/setup.js +22 -0
- package/dist/examples/setup.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/output/dedup.d.ts +153 -0
- package/dist/output/dedup.d.ts.map +1 -0
- package/dist/output/dedup.js +416 -0
- package/dist/output/dedup.js.map +1 -0
- package/dist/output/dedup.test.d.ts +2 -0
- package/dist/output/dedup.test.d.ts.map +1 -0
- package/dist/output/dedup.test.js +357 -0
- package/dist/output/dedup.test.js.map +1 -0
- package/dist/output/github-checks.d.ts +106 -0
- package/dist/output/github-checks.d.ts.map +1 -0
- package/dist/output/github-checks.js +321 -0
- package/dist/output/github-checks.js.map +1 -0
- package/dist/output/github-checks.test.d.ts +2 -0
- package/dist/output/github-checks.test.d.ts.map +1 -0
- package/dist/output/github-checks.test.js +255 -0
- package/dist/output/github-checks.test.js.map +1 -0
- package/dist/output/github-issues.d.ts +35 -0
- package/dist/output/github-issues.d.ts.map +1 -0
- package/dist/output/github-issues.js +246 -0
- package/dist/output/github-issues.js.map +1 -0
- package/dist/output/index.d.ts +6 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/index.js +6 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/issue-renderer.d.ts +20 -0
- package/dist/output/issue-renderer.d.ts.map +1 -0
- package/dist/output/issue-renderer.js +154 -0
- package/dist/output/issue-renderer.js.map +1 -0
- package/dist/output/renderer.d.ts +4 -0
- package/dist/output/renderer.d.ts.map +1 -0
- package/dist/output/renderer.js +168 -0
- package/dist/output/renderer.js.map +1 -0
- package/dist/output/renderer.test.d.ts +2 -0
- package/dist/output/renderer.test.d.ts.map +1 -0
- package/dist/output/renderer.test.js +645 -0
- package/dist/output/renderer.test.js.map +1 -0
- package/dist/output/stale.d.ts +31 -0
- package/dist/output/stale.d.ts.map +1 -0
- package/dist/output/stale.js +114 -0
- package/dist/output/stale.js.map +1 -0
- package/dist/output/stale.test.d.ts +2 -0
- package/dist/output/stale.test.d.ts.map +1 -0
- package/dist/output/stale.test.js +330 -0
- package/dist/output/stale.test.js.map +1 -0
- package/dist/output/types.d.ts +31 -0
- package/dist/output/types.d.ts.map +1 -0
- package/dist/output/types.js +2 -0
- package/dist/output/types.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +2 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/runner.d.ts +202 -0
- package/dist/sdk/runner.d.ts.map +1 -0
- package/dist/sdk/runner.js +888 -0
- package/dist/sdk/runner.js.map +1 -0
- package/dist/sdk/runner.test.d.ts +2 -0
- package/dist/sdk/runner.test.d.ts.map +1 -0
- package/dist/sdk/runner.test.js +677 -0
- package/dist/sdk/runner.test.js.map +1 -0
- package/dist/skills/index.d.ts +5 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +3 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/loader.d.ts +111 -0
- package/dist/skills/loader.d.ts.map +1 -0
- package/dist/skills/loader.js +319 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/loader.test.d.ts +2 -0
- package/dist/skills/loader.test.d.ts.map +1 -0
- package/dist/skills/loader.test.js +241 -0
- package/dist/skills/loader.test.js.map +1 -0
- package/dist/skills/remote.d.ts +117 -0
- package/dist/skills/remote.d.ts.map +1 -0
- package/dist/skills/remote.js +496 -0
- package/dist/skills/remote.js.map +1 -0
- package/dist/skills/remote.test.d.ts +2 -0
- package/dist/skills/remote.test.d.ts.map +1 -0
- package/dist/skills/remote.test.js +582 -0
- package/dist/skills/remote.test.js.map +1 -0
- package/dist/triggers/matcher.d.ts +30 -0
- package/dist/triggers/matcher.d.ts.map +1 -0
- package/dist/triggers/matcher.js +122 -0
- package/dist/triggers/matcher.js.map +1 -0
- package/dist/triggers/matcher.test.d.ts +2 -0
- package/dist/triggers/matcher.test.d.ts.map +1 -0
- package/dist/triggers/matcher.test.js +234 -0
- package/dist/triggers/matcher.test.js.map +1 -0
- package/dist/types/index.d.ts +269 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +162 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/async.d.ts +5 -0
- package/dist/utils/async.d.ts.map +1 -0
- package/dist/utils/async.js +13 -0
- package/dist/utils/async.js.map +1 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +44 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.test.d.ts +2 -0
- package/dist/utils/index.test.d.ts.map +1 -0
- package/dist/utils/index.test.js +68 -0
- package/dist/utils/index.test.js.map +1 -0
- package/dist/utils/version.d.ts +3 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +16 -0
- package/dist/utils/version.js.map +1 -0
- package/docs/src/pages/config.astro +2 -1
- package/docs/src/pages/guide.astro +2 -1
- package/docs/src/utils/version.ts +6 -0
- package/package.json +12 -2
- package/src/cli/args.ts +2 -3
- package/src/cli/commands/init.test.ts +2 -1
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/output/icons.ts +6 -0
- package/src/cli/output/ink-runner.tsx +69 -40
- package/src/cli/output/reporter.ts +3 -4
- package/src/utils/index.ts +1 -0
- package/src/utils/version.ts +17 -0
- package/.claude/settings.local.json +0 -88
- package/docs/.claude/settings.local.json +0 -11
|
@@ -175,30 +175,6 @@ remote = "getsentry/skills@abc123"
|
|
|
175
175
|
|
|
176
176
|
**Cache TTL:** 24 hours for unpinned refs (override with `WARDEN_SKILL_CACHE_TTL` in seconds)
|
|
177
177
|
|
|
178
|
-
**Inline skill in warden.toml:**
|
|
179
|
-
|
|
180
|
-
```toml
|
|
181
|
-
[[skills]]
|
|
182
|
-
name = "custom-check"
|
|
183
|
-
description = "Check for TODO comments"
|
|
184
|
-
prompt = """
|
|
185
|
-
Find TODO comments that have been in the code for too long.
|
|
186
|
-
Report as low severity findings.
|
|
187
|
-
"""
|
|
188
|
-
|
|
189
|
-
[skills.tools]
|
|
190
|
-
allowed = ["Read", "Grep", "Glob"]
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## Built-in Skills
|
|
194
|
-
|
|
195
|
-
| Skill | Purpose |
|
|
196
|
-
|-------|---------|
|
|
197
|
-
| `find-bugs` | Logical/functional bugs, null handling, async issues |
|
|
198
|
-
| `security-review` | Injection, auth, CSRF, crypto, race conditions |
|
|
199
|
-
| `code-simplifier` | Readability, consistency, redundancy removal |
|
|
200
|
-
| `performance-review` | N+1 queries, blocking I/O, memory leaks |
|
|
201
|
-
|
|
202
178
|
## Common Patterns
|
|
203
179
|
|
|
204
180
|
**Strict security on critical files:**
|
|
@@ -7,7 +7,6 @@ version = 1 # Required, must be 1
|
|
|
7
7
|
|
|
8
8
|
[defaults] # Optional, inherited by all triggers
|
|
9
9
|
[[triggers]] # Required, array of trigger configs
|
|
10
|
-
[[skills]] # Optional, inline skill definitions
|
|
11
10
|
```
|
|
12
11
|
|
|
13
12
|
## Defaults Section
|
|
@@ -81,22 +80,6 @@ fixBranchPrefix = "security-fix" # Branch name prefix
|
|
|
81
80
|
**Actions (for non-schedule):**
|
|
82
81
|
- `opened`, `synchronize`, `reopened`, `closed`
|
|
83
82
|
|
|
84
|
-
## Skills Section (Inline Skills)
|
|
85
|
-
|
|
86
|
-
```toml
|
|
87
|
-
[[skills]]
|
|
88
|
-
name = "custom-skill"
|
|
89
|
-
description = "What this skill checks"
|
|
90
|
-
prompt = """
|
|
91
|
-
Analysis instructions here.
|
|
92
|
-
Look for specific issues.
|
|
93
|
-
"""
|
|
94
|
-
|
|
95
|
-
[skills.tools]
|
|
96
|
-
allowed = ["Read", "Grep", "Glob"] # Whitelist tools
|
|
97
|
-
denied = ["Write", "Edit", "Bash"] # Blacklist tools (optional)
|
|
98
|
-
```
|
|
99
|
-
|
|
100
83
|
## Severity Values
|
|
101
84
|
|
|
102
85
|
Used in `failOn` and `commentOn`:
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -7,6 +7,7 @@ on:
|
|
|
7
7
|
|
|
8
8
|
permissions:
|
|
9
9
|
contents: write
|
|
10
|
+
id-token: write
|
|
10
11
|
|
|
11
12
|
jobs:
|
|
12
13
|
release:
|
|
@@ -20,13 +21,17 @@ jobs:
|
|
|
20
21
|
|
|
21
22
|
- uses: actions/setup-node@v4
|
|
22
23
|
with:
|
|
23
|
-
node-version: '
|
|
24
|
+
node-version: '24'
|
|
24
25
|
cache: 'pnpm'
|
|
26
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
27
|
|
|
26
28
|
- run: pnpm install --frozen-lockfile
|
|
27
29
|
- run: pnpm build
|
|
28
30
|
- run: pnpm build:action
|
|
29
31
|
|
|
32
|
+
- name: Publish to npm
|
|
33
|
+
run: npm publish --provenance --access public
|
|
34
|
+
|
|
30
35
|
- name: Get version info
|
|
31
36
|
id: version
|
|
32
37
|
run: |
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
export const id = 159;
|
|
2
|
+
export const ids = [159];
|
|
3
|
+
export const modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 2159:
|
|
6
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
/* harmony export */ resolveRemoteSkill: () => (/* binding */ resolveRemoteSkill)
|
|
10
|
+
/* harmony export */ });
|
|
11
|
+
/* unused harmony exports parseRemoteRef, formatRemoteRef, getSkillsCacheDir, getRemotePath, getStatePath, loadState, saveState, getCacheTtlSeconds, shouldRefresh, fetchRemote, discoverRemoteSkills, removeRemote, listCachedRemotes */
|
|
12
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3024);
|
|
13
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
14
|
+
/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8161);
|
|
15
|
+
/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_os__WEBPACK_IMPORTED_MODULE_1__);
|
|
16
|
+
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6760);
|
|
17
|
+
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_2__);
|
|
18
|
+
/* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1421);
|
|
19
|
+
/* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(node_child_process__WEBPACK_IMPORTED_MODULE_3__);
|
|
20
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(606);
|
|
21
|
+
/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7081);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/** Default TTL for unpinned remote skills: 24 hours */
|
|
29
|
+
const DEFAULT_TTL_SECONDS = 86400;
|
|
30
|
+
/** Schema for a single remote entry in state.json */
|
|
31
|
+
const RemoteEntrySchema = zod__WEBPACK_IMPORTED_MODULE_5__/* .object */ .Ikc({
|
|
32
|
+
sha: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP(),
|
|
33
|
+
fetchedAt: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP().datetime(),
|
|
34
|
+
});
|
|
35
|
+
/** Schema for the entire state.json file */
|
|
36
|
+
const RemoteStateSchema = zod__WEBPACK_IMPORTED_MODULE_5__/* .object */ .Ikc({
|
|
37
|
+
remotes: zod__WEBPACK_IMPORTED_MODULE_5__/* .record */ .g1P(zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP(), RemoteEntrySchema),
|
|
38
|
+
});
|
|
39
|
+
/** Schema for a plugin in marketplace.json */
|
|
40
|
+
const MarketplacePluginSchema = zod__WEBPACK_IMPORTED_MODULE_5__/* .object */ .Ikc({
|
|
41
|
+
name: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP(),
|
|
42
|
+
source: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP(),
|
|
43
|
+
description: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP().optional(),
|
|
44
|
+
category: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP().optional(),
|
|
45
|
+
});
|
|
46
|
+
/** Schema for .claude-plugin/marketplace.json */
|
|
47
|
+
const MarketplaceConfigSchema = zod__WEBPACK_IMPORTED_MODULE_5__/* .object */ .Ikc({
|
|
48
|
+
$schema: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP().optional(),
|
|
49
|
+
name: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP(),
|
|
50
|
+
description: zod__WEBPACK_IMPORTED_MODULE_5__/* .string */ .YjP().optional(),
|
|
51
|
+
plugins: zod__WEBPACK_IMPORTED_MODULE_5__/* .array */ .YOg(MarketplacePluginSchema),
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Normalize a GitHub URL to owner/repo format.
|
|
55
|
+
* Returns null if the input is not a recognized GitHub URL.
|
|
56
|
+
*
|
|
57
|
+
* Supports:
|
|
58
|
+
* - https://github.com/owner/repo
|
|
59
|
+
* - https://github.com/owner/repo.git
|
|
60
|
+
* - git@github.com:owner/repo.git
|
|
61
|
+
*/
|
|
62
|
+
function normalizeGitHubUrl(input) {
|
|
63
|
+
// HTTPS URL: https://github.com/owner/repo or https://github.com/owner/repo.git
|
|
64
|
+
const httpsMatch = input.match(/^https?:\/\/github\.com\/([^/]+)\/([^/@]+?)(?:\.git)?$/);
|
|
65
|
+
if (httpsMatch) {
|
|
66
|
+
return `${httpsMatch[1]}/${httpsMatch[2]}`;
|
|
67
|
+
}
|
|
68
|
+
// SSH URL: git@github.com:owner/repo.git
|
|
69
|
+
const sshMatch = input.match(/^git@github\.com:([^/]+)\/([^/@]+?)(?:\.git)?$/);
|
|
70
|
+
if (sshMatch) {
|
|
71
|
+
return `${sshMatch[1]}/${sshMatch[2]}`;
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Parse a remote reference string into its components.
|
|
77
|
+
* Supports formats:
|
|
78
|
+
* - "owner/repo" or "owner/repo@sha"
|
|
79
|
+
* - "https://github.com/owner/repo" or "https://github.com/owner/repo@sha"
|
|
80
|
+
* - "https://github.com/owner/repo.git" or "https://github.com/owner/repo.git@sha"
|
|
81
|
+
* - "git@github.com:owner/repo.git" or "git@github.com:owner/repo.git@sha"
|
|
82
|
+
*/
|
|
83
|
+
function parseRemoteRef(ref) {
|
|
84
|
+
let inputRef = ref;
|
|
85
|
+
let sha;
|
|
86
|
+
// Extract SHA suffix from the input before URL normalization.
|
|
87
|
+
// The SHA is always at the end, after a @ that follows the repo name.
|
|
88
|
+
// For git@github.com URLs, we need to find the @ after the colon.
|
|
89
|
+
if (ref.startsWith('git@')) {
|
|
90
|
+
const colonIndex = ref.indexOf(':');
|
|
91
|
+
if (colonIndex !== -1) {
|
|
92
|
+
const afterColon = ref.slice(colonIndex + 1);
|
|
93
|
+
const shaAtIndex = afterColon.lastIndexOf('@');
|
|
94
|
+
if (shaAtIndex !== -1) {
|
|
95
|
+
sha = afterColon.slice(shaAtIndex + 1);
|
|
96
|
+
inputRef = ref.slice(0, colonIndex + 1 + shaAtIndex);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const lastAtIndex = ref.lastIndexOf('@');
|
|
102
|
+
if (lastAtIndex !== -1) {
|
|
103
|
+
const potentialSha = ref.slice(lastAtIndex + 1);
|
|
104
|
+
// SHA should not contain : or / (those would indicate URL structure)
|
|
105
|
+
if (!potentialSha.includes(':') && !potentialSha.includes('/')) {
|
|
106
|
+
if (!potentialSha) {
|
|
107
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (empty SHA after @)`);
|
|
108
|
+
}
|
|
109
|
+
sha = potentialSha;
|
|
110
|
+
inputRef = ref.slice(0, lastAtIndex);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Normalize GitHub URLs to owner/repo format
|
|
115
|
+
const repoPath = normalizeGitHubUrl(inputRef) ?? inputRef;
|
|
116
|
+
const slashIndex = repoPath.indexOf('/');
|
|
117
|
+
if (slashIndex === -1) {
|
|
118
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (expected owner/repo format)`);
|
|
119
|
+
}
|
|
120
|
+
const owner = repoPath.slice(0, slashIndex);
|
|
121
|
+
const repo = repoPath.slice(slashIndex + 1);
|
|
122
|
+
if (!owner || !repo) {
|
|
123
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (empty owner or repo)`);
|
|
124
|
+
}
|
|
125
|
+
if (repo.includes('/')) {
|
|
126
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (repo name cannot contain /)`);
|
|
127
|
+
}
|
|
128
|
+
// Security: Prevent git flag injection by rejecting values starting with '-'
|
|
129
|
+
if (owner.startsWith('-')) {
|
|
130
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (owner cannot start with -)`);
|
|
131
|
+
}
|
|
132
|
+
if (repo.startsWith('-')) {
|
|
133
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (repo cannot start with -)`);
|
|
134
|
+
}
|
|
135
|
+
if (sha?.startsWith('-')) {
|
|
136
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Invalid remote ref: ${ref} (SHA cannot start with -)`);
|
|
137
|
+
}
|
|
138
|
+
return { owner, repo, sha };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Format a parsed remote ref back to string format.
|
|
142
|
+
*/
|
|
143
|
+
function formatRemoteRef(parsed) {
|
|
144
|
+
const base = `${parsed.owner}/${parsed.repo}`;
|
|
145
|
+
return parsed.sha ? `${base}@${parsed.sha}` : base;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Get the base directory for caching remote skills.
|
|
149
|
+
* Respects WARDEN_STATE_DIR environment variable.
|
|
150
|
+
* Default: ~/.local/warden/skills/
|
|
151
|
+
*/
|
|
152
|
+
function getSkillsCacheDir() {
|
|
153
|
+
const stateDir = process.env['WARDEN_STATE_DIR'];
|
|
154
|
+
if (stateDir) {
|
|
155
|
+
return (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(stateDir, 'skills');
|
|
156
|
+
}
|
|
157
|
+
return (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)((0,node_os__WEBPACK_IMPORTED_MODULE_1__.homedir)(), '.local', 'warden', 'skills');
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get the cache path for a specific remote ref.
|
|
161
|
+
* - Unpinned: ~/.local/warden/skills/owner/repo/
|
|
162
|
+
* - Pinned: ~/.local/warden/skills/owner/repo@sha/
|
|
163
|
+
*/
|
|
164
|
+
function getRemotePath(ref) {
|
|
165
|
+
const parsed = parseRemoteRef(ref);
|
|
166
|
+
const cacheDir = getSkillsCacheDir();
|
|
167
|
+
if (parsed.sha) {
|
|
168
|
+
return (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(cacheDir, parsed.owner, `${parsed.repo}@${parsed.sha}`);
|
|
169
|
+
}
|
|
170
|
+
return (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(cacheDir, parsed.owner, parsed.repo);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Get the path to the state.json file.
|
|
174
|
+
*/
|
|
175
|
+
function getStatePath() {
|
|
176
|
+
return (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(getSkillsCacheDir(), 'state.json');
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Load the remote state from state.json.
|
|
180
|
+
* Returns an empty state if the file doesn't exist.
|
|
181
|
+
*/
|
|
182
|
+
function loadState() {
|
|
183
|
+
const statePath = getStatePath();
|
|
184
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(statePath)) {
|
|
185
|
+
return { remotes: {} };
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(statePath, 'utf-8');
|
|
189
|
+
const data = JSON.parse(content);
|
|
190
|
+
return RemoteStateSchema.parse(data);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// If state is corrupted, start fresh
|
|
194
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
195
|
+
console.warn(`Warning: Failed to load state.json, starting fresh: ${message}`);
|
|
196
|
+
return { remotes: {} };
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Save the remote state to state.json.
|
|
201
|
+
* Uses atomic write (write to temp, then rename).
|
|
202
|
+
*/
|
|
203
|
+
function saveState(state) {
|
|
204
|
+
const statePath = getStatePath();
|
|
205
|
+
const stateDir = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.dirname)(statePath);
|
|
206
|
+
// Ensure directory exists
|
|
207
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(stateDir)) {
|
|
208
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(stateDir, { recursive: true });
|
|
209
|
+
}
|
|
210
|
+
// Write atomically
|
|
211
|
+
const tempPath = `${statePath}.tmp`;
|
|
212
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync)(tempPath, JSON.stringify(state, null, 2), 'utf-8');
|
|
213
|
+
// Rename is atomic on most filesystems
|
|
214
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.renameSync)(tempPath, statePath);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get the TTL for remote skill cache in seconds.
|
|
218
|
+
* Respects WARDEN_SKILL_CACHE_TTL environment variable.
|
|
219
|
+
*/
|
|
220
|
+
function getCacheTtlSeconds() {
|
|
221
|
+
const envTtl = process.env['WARDEN_SKILL_CACHE_TTL'];
|
|
222
|
+
if (envTtl) {
|
|
223
|
+
const parsed = parseInt(envTtl, 10);
|
|
224
|
+
if (!isNaN(parsed) && parsed > 0) {
|
|
225
|
+
return parsed;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return DEFAULT_TTL_SECONDS;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Check if an unpinned remote ref needs to be refreshed.
|
|
232
|
+
* Pinned refs (with @sha) never need refresh.
|
|
233
|
+
*/
|
|
234
|
+
function shouldRefresh(ref, state) {
|
|
235
|
+
const parsed = parseRemoteRef(ref);
|
|
236
|
+
// Pinned refs are immutable - never refresh
|
|
237
|
+
if (parsed.sha) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
const entry = state.remotes[ref];
|
|
241
|
+
if (!entry) {
|
|
242
|
+
return true; // Not cached, needs fetch
|
|
243
|
+
}
|
|
244
|
+
const fetchedAt = new Date(entry.fetchedAt).getTime();
|
|
245
|
+
const now = Date.now();
|
|
246
|
+
const ttl = getCacheTtlSeconds() * 1000;
|
|
247
|
+
return now - fetchedAt > ttl;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Execute a git command and return stdout.
|
|
251
|
+
* Uses execFileSync to avoid shell injection vulnerabilities.
|
|
252
|
+
* Throws SkillLoaderError on failure.
|
|
253
|
+
*/
|
|
254
|
+
function execGit(args, options) {
|
|
255
|
+
try {
|
|
256
|
+
return (0,node_child_process__WEBPACK_IMPORTED_MODULE_3__.execFileSync)('git', args, {
|
|
257
|
+
encoding: 'utf-8',
|
|
258
|
+
cwd: options?.cwd,
|
|
259
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
260
|
+
}).trim();
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
264
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Git command failed: git ${args.join(' ')}: ${message}`);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Clone or update a remote repository to the cache.
|
|
269
|
+
* Returns the SHA of the fetched commit.
|
|
270
|
+
*/
|
|
271
|
+
async function fetchRemote(ref, options = {}) {
|
|
272
|
+
const { force = false, offline = false, onProgress } = options;
|
|
273
|
+
const parsed = parseRemoteRef(ref);
|
|
274
|
+
const remotePath = getRemotePath(ref);
|
|
275
|
+
const state = loadState();
|
|
276
|
+
const isPinned = !!parsed.sha;
|
|
277
|
+
const isCached = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(remotePath);
|
|
278
|
+
const needsRefresh = shouldRefresh(ref, state);
|
|
279
|
+
// Check if we have a valid cache (directory exists AND state entry exists)
|
|
280
|
+
const stateEntry = state.remotes[ref];
|
|
281
|
+
const hasValidCache = isCached && !!stateEntry;
|
|
282
|
+
// Handle offline mode
|
|
283
|
+
if (offline) {
|
|
284
|
+
if (hasValidCache) {
|
|
285
|
+
return stateEntry.sha;
|
|
286
|
+
}
|
|
287
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Remote skill not cached and offline mode enabled: ${ref}`);
|
|
288
|
+
}
|
|
289
|
+
// Pinned + valid cache = use cache (SHA is immutable)
|
|
290
|
+
if (isPinned && hasValidCache && !force && parsed.sha) {
|
|
291
|
+
return parsed.sha;
|
|
292
|
+
}
|
|
293
|
+
// Unpinned + valid cache + fresh = use cache
|
|
294
|
+
if (!isPinned && hasValidCache && !needsRefresh && !force) {
|
|
295
|
+
return stateEntry.sha;
|
|
296
|
+
}
|
|
297
|
+
const repoUrl = `https://github.com/${parsed.owner}/${parsed.repo}.git`;
|
|
298
|
+
// Clone or update
|
|
299
|
+
if (!isCached) {
|
|
300
|
+
onProgress?.(`Cloning ${ref}...`);
|
|
301
|
+
// Ensure parent directory exists
|
|
302
|
+
const parentDir = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.dirname)(remotePath);
|
|
303
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(parentDir)) {
|
|
304
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(parentDir, { recursive: true });
|
|
305
|
+
}
|
|
306
|
+
// Clone with minimal depth for unpinned refs
|
|
307
|
+
// Note: '--' separates flags from positional args to prevent flag injection
|
|
308
|
+
if (isPinned && parsed.sha) {
|
|
309
|
+
// For pinned refs, we need full history to checkout the specific SHA
|
|
310
|
+
// Use a shallow clone then deepen if needed
|
|
311
|
+
execGit(['clone', '--depth=1', '--', repoUrl, remotePath]);
|
|
312
|
+
try {
|
|
313
|
+
// Try to checkout the pinned SHA
|
|
314
|
+
// Note: 'checkout' without '--' treats arg as ref; with '--' it's a file path
|
|
315
|
+
execGit(['fetch', '--depth=1', 'origin', '--', parsed.sha], { cwd: remotePath });
|
|
316
|
+
execGit(['checkout', parsed.sha], { cwd: remotePath });
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
// If SHA not found, do a full fetch and retry
|
|
320
|
+
execGit(['fetch', '--unshallow'], { cwd: remotePath });
|
|
321
|
+
execGit(['checkout', parsed.sha], { cwd: remotePath });
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else if (!isPinned) {
|
|
325
|
+
// For unpinned refs, shallow clone of default branch
|
|
326
|
+
execGit(['clone', '--depth=1', '--', repoUrl, remotePath]);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
// Update existing cache
|
|
331
|
+
onProgress?.(`Updating ${ref}...`);
|
|
332
|
+
if (!isPinned) {
|
|
333
|
+
// For unpinned refs, pull latest
|
|
334
|
+
execGit(['fetch', '--depth=1', 'origin'], { cwd: remotePath });
|
|
335
|
+
execGit(['reset', '--hard', 'origin/HEAD'], { cwd: remotePath });
|
|
336
|
+
}
|
|
337
|
+
// Pinned refs don't need updates - SHA is immutable
|
|
338
|
+
}
|
|
339
|
+
// Get the current HEAD SHA
|
|
340
|
+
const sha = execGit(['rev-parse', 'HEAD'], { cwd: remotePath });
|
|
341
|
+
// Update state
|
|
342
|
+
state.remotes[ref] = {
|
|
343
|
+
sha,
|
|
344
|
+
fetchedAt: new Date().toISOString(),
|
|
345
|
+
};
|
|
346
|
+
saveState(state);
|
|
347
|
+
return sha;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Parse marketplace.json from a remote repository if it exists.
|
|
351
|
+
* Returns null if the file doesn't exist or is invalid.
|
|
352
|
+
*/
|
|
353
|
+
function parseMarketplaceConfig(remotePath) {
|
|
354
|
+
const marketplacePath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(remotePath, '.claude-plugin', 'marketplace.json');
|
|
355
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(marketplacePath)) {
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
try {
|
|
359
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(marketplacePath, 'utf-8');
|
|
360
|
+
const data = JSON.parse(content);
|
|
361
|
+
return MarketplaceConfigSchema.parse(data);
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
// Invalid or malformed marketplace.json - fall back to traditional discovery
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/** Directories to search for skills in remote repositories */
|
|
369
|
+
const REMOTE_SKILL_DIRECTORIES = [
|
|
370
|
+
'', // root level
|
|
371
|
+
'skills', // skills/ subdirectory
|
|
372
|
+
'.warden/skills', // Warden-specific
|
|
373
|
+
'.agents/skills', // General agent skills
|
|
374
|
+
'.claude/skills', // Claude Code skills
|
|
375
|
+
];
|
|
376
|
+
/**
|
|
377
|
+
* Discover skills using traditional directory layout.
|
|
378
|
+
* Searches root level, skills/, and conventional skill directories.
|
|
379
|
+
*/
|
|
380
|
+
async function discoverTraditionalSkills(remotePath) {
|
|
381
|
+
const skills = [];
|
|
382
|
+
const seenNames = new Set();
|
|
383
|
+
for (const subdir of REMOTE_SKILL_DIRECTORIES) {
|
|
384
|
+
const searchPath = subdir ? (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(remotePath, subdir) : remotePath;
|
|
385
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(searchPath))
|
|
386
|
+
continue;
|
|
387
|
+
const entries = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync)(searchPath);
|
|
388
|
+
for (const entry of entries) {
|
|
389
|
+
if (entry.startsWith('.'))
|
|
390
|
+
continue;
|
|
391
|
+
const entryPath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(searchPath, entry);
|
|
392
|
+
const stat = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.statSync)(entryPath);
|
|
393
|
+
if (stat.isDirectory()) {
|
|
394
|
+
const skillMdPath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(entryPath, 'SKILL.md');
|
|
395
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(skillMdPath)) {
|
|
396
|
+
try {
|
|
397
|
+
const skill = await (0,_loader_js__WEBPACK_IMPORTED_MODULE_4__/* .loadSkillFromMarkdown */ .hl)(skillMdPath);
|
|
398
|
+
// First occurrence wins (root takes precedence over skills/)
|
|
399
|
+
if (!seenNames.has(skill.name)) {
|
|
400
|
+
seenNames.add(skill.name);
|
|
401
|
+
skills.push({
|
|
402
|
+
name: skill.name,
|
|
403
|
+
description: skill.description,
|
|
404
|
+
path: entryPath,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
catch {
|
|
409
|
+
// Skip invalid skill directories
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return skills;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Discover skills using marketplace format.
|
|
419
|
+
* Searches plugins/{plugin}/skills/ for each plugin defined in marketplace.json.
|
|
420
|
+
*/
|
|
421
|
+
async function discoverMarketplaceSkills(remotePath, config) {
|
|
422
|
+
const skills = [];
|
|
423
|
+
const seenNames = new Set();
|
|
424
|
+
for (const plugin of config.plugins) {
|
|
425
|
+
// Resolve plugin source path (e.g., "./plugins/sentry-skills" -> "plugins/sentry-skills")
|
|
426
|
+
const pluginSource = plugin.source.replace(/^\.\//, '');
|
|
427
|
+
const skillsPath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(remotePath, pluginSource, 'skills');
|
|
428
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(skillsPath))
|
|
429
|
+
continue;
|
|
430
|
+
const entries = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync)(skillsPath);
|
|
431
|
+
for (const entry of entries) {
|
|
432
|
+
if (entry.startsWith('.'))
|
|
433
|
+
continue;
|
|
434
|
+
const entryPath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(skillsPath, entry);
|
|
435
|
+
const stat = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.statSync)(entryPath);
|
|
436
|
+
if (stat.isDirectory()) {
|
|
437
|
+
const skillMdPath = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(entryPath, 'SKILL.md');
|
|
438
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(skillMdPath)) {
|
|
439
|
+
try {
|
|
440
|
+
const skill = await (0,_loader_js__WEBPACK_IMPORTED_MODULE_4__/* .loadSkillFromMarkdown */ .hl)(skillMdPath);
|
|
441
|
+
// First plugin wins for duplicate skill names
|
|
442
|
+
if (!seenNames.has(skill.name)) {
|
|
443
|
+
seenNames.add(skill.name);
|
|
444
|
+
skills.push({
|
|
445
|
+
name: skill.name,
|
|
446
|
+
description: skill.description,
|
|
447
|
+
path: entryPath,
|
|
448
|
+
pluginName: plugin.name,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
catch {
|
|
453
|
+
// Skip invalid skill directories
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return skills;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Discover all skills in a cached remote repository.
|
|
463
|
+
* Detects format and delegates to appropriate discovery function:
|
|
464
|
+
* - If .claude-plugin/marketplace.json exists, uses marketplace discovery
|
|
465
|
+
* - Otherwise, uses traditional discovery (root, skills/, .warden/skills, etc.)
|
|
466
|
+
*/
|
|
467
|
+
async function discoverRemoteSkills(ref) {
|
|
468
|
+
const remotePath = getRemotePath(ref);
|
|
469
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(remotePath)) {
|
|
470
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Remote not cached: ${ref}. Run fetch first.`);
|
|
471
|
+
}
|
|
472
|
+
// Check for marketplace format
|
|
473
|
+
const marketplaceConfig = parseMarketplaceConfig(remotePath);
|
|
474
|
+
if (marketplaceConfig) {
|
|
475
|
+
return discoverMarketplaceSkills(remotePath, marketplaceConfig);
|
|
476
|
+
}
|
|
477
|
+
// Fall back to traditional discovery
|
|
478
|
+
return discoverTraditionalSkills(remotePath);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Resolve a skill from a remote repository.
|
|
482
|
+
* Ensures the remote is fetched/cached, then loads the skill.
|
|
483
|
+
* Matches by skill name (from SKILL.md), not directory name.
|
|
484
|
+
*/
|
|
485
|
+
async function resolveRemoteSkill(ref, skillName, options = {}) {
|
|
486
|
+
await fetchRemote(ref, options);
|
|
487
|
+
const availableSkills = await discoverRemoteSkills(ref);
|
|
488
|
+
const match = availableSkills.find((s) => s.name === skillName);
|
|
489
|
+
if (match) {
|
|
490
|
+
return (0,_loader_js__WEBPACK_IMPORTED_MODULE_4__/* .loadSkillFromMarkdown */ .hl)((0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(match.path, 'SKILL.md'));
|
|
491
|
+
}
|
|
492
|
+
if (availableSkills.length === 0) {
|
|
493
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`No skills found in remote: ${ref}`);
|
|
494
|
+
}
|
|
495
|
+
throw new _loader_js__WEBPACK_IMPORTED_MODULE_4__/* .SkillLoaderError */ .vN(`Skill '${skillName}' not found in remote: ${ref}. Available skills: ${availableSkills.map((s) => s.name).join(', ')}`);
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Remove a remote from the cache.
|
|
499
|
+
*/
|
|
500
|
+
function removeRemote(ref) {
|
|
501
|
+
const remotePath = getRemotePath(ref);
|
|
502
|
+
if (existsSync(remotePath)) {
|
|
503
|
+
rmSync(remotePath, { recursive: true, force: true });
|
|
504
|
+
}
|
|
505
|
+
const state = loadState();
|
|
506
|
+
const { [ref]: _removed, ...remainingRemotes } = state.remotes;
|
|
507
|
+
state.remotes = remainingRemotes;
|
|
508
|
+
saveState(state);
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* List all cached remotes with their metadata.
|
|
512
|
+
*/
|
|
513
|
+
function listCachedRemotes() {
|
|
514
|
+
const state = loadState();
|
|
515
|
+
return Object.entries(state.remotes).map(([ref, entry]) => ({ ref, entry }));
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
/***/ })
|
|
520
|
+
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
//# sourceMappingURL=159.index.js.map
|