@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"159.index.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;;;;;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAWA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAUA;;;AAGA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;AAGA;AACA;AAIA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;;;AAKA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;;AAIA;AACA;AAKA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAGA;AAEA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA","sources":[".././src/skills/remote.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync, rmSync, renameSync, readdirSync, statSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, join } from 'node:path';\nimport { execFileSync } from 'node:child_process';\nimport { z } from 'zod';\nimport { loadSkillFromMarkdown, SkillLoaderError } from './loader.js';\nimport type { SkillDefinition } from '../config/schema.js';\n\n/** Default TTL for unpinned remote skills: 24 hours */\nconst DEFAULT_TTL_SECONDS = 86400;\n\n/** Schema for a single remote entry in state.json */\nconst RemoteEntrySchema = z.object({\n sha: z.string(),\n fetchedAt: z.string().datetime(),\n});\n\n/** Schema for the entire state.json file */\nconst RemoteStateSchema = z.object({\n remotes: z.record(z.string(), RemoteEntrySchema),\n});\n\nexport type RemoteEntry = z.infer<typeof RemoteEntrySchema>;\nexport type RemoteState = z.infer<typeof RemoteStateSchema>;\n\n/** Schema for a plugin in marketplace.json */\nconst MarketplacePluginSchema = z.object({\n name: z.string(),\n source: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n});\n\n/** Schema for .claude-plugin/marketplace.json */\nconst MarketplaceConfigSchema = z.object({\n $schema: z.string().optional(),\n name: z.string(),\n description: z.string().optional(),\n plugins: z.array(MarketplacePluginSchema),\n});\n\ntype MarketplaceConfig = z.infer<typeof MarketplaceConfigSchema>;\n\n/** Parsed remote reference */\nexport interface ParsedRemoteRef {\n owner: string;\n repo: string;\n sha?: string;\n}\n\n/**\n * Normalize a GitHub URL to owner/repo format.\n * Returns null if the input is not a recognized GitHub URL.\n *\n * Supports:\n * - https://github.com/owner/repo\n * - https://github.com/owner/repo.git\n * - git@github.com:owner/repo.git\n */\nfunction normalizeGitHubUrl(input: string): string | null {\n // HTTPS URL: https://github.com/owner/repo or https://github.com/owner/repo.git\n const httpsMatch = input.match(/^https?:\\/\\/github\\.com\\/([^/]+)\\/([^/@]+?)(?:\\.git)?$/);\n if (httpsMatch) {\n return `${httpsMatch[1]}/${httpsMatch[2]}`;\n }\n\n // SSH URL: git@github.com:owner/repo.git\n const sshMatch = input.match(/^git@github\\.com:([^/]+)\\/([^/@]+?)(?:\\.git)?$/);\n if (sshMatch) {\n return `${sshMatch[1]}/${sshMatch[2]}`;\n }\n\n return null;\n}\n\n/**\n * Parse a remote reference string into its components.\n * Supports formats:\n * - \"owner/repo\" or \"owner/repo@sha\"\n * - \"https://github.com/owner/repo\" or \"https://github.com/owner/repo@sha\"\n * - \"https://github.com/owner/repo.git\" or \"https://github.com/owner/repo.git@sha\"\n * - \"git@github.com:owner/repo.git\" or \"git@github.com:owner/repo.git@sha\"\n */\nexport function parseRemoteRef(ref: string): ParsedRemoteRef {\n let inputRef = ref;\n let sha: string | undefined;\n\n // Extract SHA suffix from the input before URL normalization.\n // The SHA is always at the end, after a @ that follows the repo name.\n // For git@github.com URLs, we need to find the @ after the colon.\n if (ref.startsWith('git@')) {\n const colonIndex = ref.indexOf(':');\n if (colonIndex !== -1) {\n const afterColon = ref.slice(colonIndex + 1);\n const shaAtIndex = afterColon.lastIndexOf('@');\n if (shaAtIndex !== -1) {\n sha = afterColon.slice(shaAtIndex + 1);\n inputRef = ref.slice(0, colonIndex + 1 + shaAtIndex);\n }\n }\n } else {\n const lastAtIndex = ref.lastIndexOf('@');\n if (lastAtIndex !== -1) {\n const potentialSha = ref.slice(lastAtIndex + 1);\n // SHA should not contain : or / (those would indicate URL structure)\n if (!potentialSha.includes(':') && !potentialSha.includes('/')) {\n if (!potentialSha) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (empty SHA after @)`);\n }\n sha = potentialSha;\n inputRef = ref.slice(0, lastAtIndex);\n }\n }\n }\n\n // Normalize GitHub URLs to owner/repo format\n const repoPath = normalizeGitHubUrl(inputRef) ?? inputRef;\n\n const slashIndex = repoPath.indexOf('/');\n if (slashIndex === -1) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (expected owner/repo format)`);\n }\n\n const owner = repoPath.slice(0, slashIndex);\n const repo = repoPath.slice(slashIndex + 1);\n\n if (!owner || !repo) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (empty owner or repo)`);\n }\n\n if (repo.includes('/')) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (repo name cannot contain /)`);\n }\n\n // Security: Prevent git flag injection by rejecting values starting with '-'\n if (owner.startsWith('-')) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (owner cannot start with -)`);\n }\n if (repo.startsWith('-')) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (repo cannot start with -)`);\n }\n if (sha?.startsWith('-')) {\n throw new SkillLoaderError(`Invalid remote ref: ${ref} (SHA cannot start with -)`);\n }\n\n return { owner, repo, sha };\n}\n\n/**\n * Format a parsed remote ref back to string format.\n */\nexport function formatRemoteRef(parsed: ParsedRemoteRef): string {\n const base = `${parsed.owner}/${parsed.repo}`;\n return parsed.sha ? `${base}@${parsed.sha}` : base;\n}\n\n/**\n * Get the base directory for caching remote skills.\n * Respects WARDEN_STATE_DIR environment variable.\n * Default: ~/.local/warden/skills/\n */\nexport function getSkillsCacheDir(): string {\n const stateDir = process.env['WARDEN_STATE_DIR'];\n if (stateDir) {\n return join(stateDir, 'skills');\n }\n return join(homedir(), '.local', 'warden', 'skills');\n}\n\n/**\n * Get the cache path for a specific remote ref.\n * - Unpinned: ~/.local/warden/skills/owner/repo/\n * - Pinned: ~/.local/warden/skills/owner/repo@sha/\n */\nexport function getRemotePath(ref: string): string {\n const parsed = parseRemoteRef(ref);\n const cacheDir = getSkillsCacheDir();\n\n if (parsed.sha) {\n return join(cacheDir, parsed.owner, `${parsed.repo}@${parsed.sha}`);\n }\n return join(cacheDir, parsed.owner, parsed.repo);\n}\n\n/**\n * Get the path to the state.json file.\n */\nexport function getStatePath(): string {\n return join(getSkillsCacheDir(), 'state.json');\n}\n\n/**\n * Load the remote state from state.json.\n * Returns an empty state if the file doesn't exist.\n */\nexport function loadState(): RemoteState {\n const statePath = getStatePath();\n\n if (!existsSync(statePath)) {\n return { remotes: {} };\n }\n\n try {\n const content = readFileSync(statePath, 'utf-8');\n const data = JSON.parse(content);\n return RemoteStateSchema.parse(data);\n } catch (error) {\n // If state is corrupted, start fresh\n const message = error instanceof Error ? error.message : String(error);\n console.warn(`Warning: Failed to load state.json, starting fresh: ${message}`);\n return { remotes: {} };\n }\n}\n\n/**\n * Save the remote state to state.json.\n * Uses atomic write (write to temp, then rename).\n */\nexport function saveState(state: RemoteState): void {\n const statePath = getStatePath();\n const stateDir = dirname(statePath);\n\n // Ensure directory exists\n if (!existsSync(stateDir)) {\n mkdirSync(stateDir, { recursive: true });\n }\n\n // Write atomically\n const tempPath = `${statePath}.tmp`;\n writeFileSync(tempPath, JSON.stringify(state, null, 2), 'utf-8');\n\n // Rename is atomic on most filesystems\n renameSync(tempPath, statePath);\n}\n\n/**\n * Get the TTL for remote skill cache in seconds.\n * Respects WARDEN_SKILL_CACHE_TTL environment variable.\n */\nexport function getCacheTtlSeconds(): number {\n const envTtl = process.env['WARDEN_SKILL_CACHE_TTL'];\n if (envTtl) {\n const parsed = parseInt(envTtl, 10);\n if (!isNaN(parsed) && parsed > 0) {\n return parsed;\n }\n }\n return DEFAULT_TTL_SECONDS;\n}\n\n/**\n * Check if an unpinned remote ref needs to be refreshed.\n * Pinned refs (with @sha) never need refresh.\n */\nexport function shouldRefresh(ref: string, state: RemoteState): boolean {\n const parsed = parseRemoteRef(ref);\n\n // Pinned refs are immutable - never refresh\n if (parsed.sha) {\n return false;\n }\n\n const entry = state.remotes[ref];\n if (!entry) {\n return true; // Not cached, needs fetch\n }\n\n const fetchedAt = new Date(entry.fetchedAt).getTime();\n const now = Date.now();\n const ttl = getCacheTtlSeconds() * 1000;\n\n return now - fetchedAt > ttl;\n}\n\nexport interface FetchRemoteOptions {\n /** Force refresh even if cache is valid */\n force?: boolean;\n /** Skip network operations - only use cache */\n offline?: boolean;\n /** Callback for progress messages */\n onProgress?: (message: string) => void;\n}\n\n/**\n * Execute a git command and return stdout.\n * Uses execFileSync to avoid shell injection vulnerabilities.\n * Throws SkillLoaderError on failure.\n */\nfunction execGit(args: string[], options?: { cwd?: string }): string {\n try {\n return execFileSync('git', args, {\n encoding: 'utf-8',\n cwd: options?.cwd,\n stdio: ['pipe', 'pipe', 'pipe'],\n }).trim();\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new SkillLoaderError(`Git command failed: git ${args.join(' ')}: ${message}`);\n }\n}\n\n/**\n * Clone or update a remote repository to the cache.\n * Returns the SHA of the fetched commit.\n */\nexport async function fetchRemote(ref: string, options: FetchRemoteOptions = {}): Promise<string> {\n const { force = false, offline = false, onProgress } = options;\n const parsed = parseRemoteRef(ref);\n const remotePath = getRemotePath(ref);\n const state = loadState();\n\n const isPinned = !!parsed.sha;\n const isCached = existsSync(remotePath);\n const needsRefresh = shouldRefresh(ref, state);\n\n // Check if we have a valid cache (directory exists AND state entry exists)\n const stateEntry = state.remotes[ref];\n const hasValidCache = isCached && !!stateEntry;\n\n // Handle offline mode\n if (offline) {\n if (hasValidCache) {\n return stateEntry.sha;\n }\n throw new SkillLoaderError(`Remote skill not cached and offline mode enabled: ${ref}`);\n }\n\n // Pinned + valid cache = use cache (SHA is immutable)\n if (isPinned && hasValidCache && !force && parsed.sha) {\n return parsed.sha;\n }\n\n // Unpinned + valid cache + fresh = use cache\n if (!isPinned && hasValidCache && !needsRefresh && !force) {\n return stateEntry.sha;\n }\n\n const repoUrl = `https://github.com/${parsed.owner}/${parsed.repo}.git`;\n\n // Clone or update\n if (!isCached) {\n onProgress?.(`Cloning ${ref}...`);\n\n // Ensure parent directory exists\n const parentDir = dirname(remotePath);\n if (!existsSync(parentDir)) {\n mkdirSync(parentDir, { recursive: true });\n }\n\n // Clone with minimal depth for unpinned refs\n // Note: '--' separates flags from positional args to prevent flag injection\n if (isPinned && parsed.sha) {\n // For pinned refs, we need full history to checkout the specific SHA\n // Use a shallow clone then deepen if needed\n execGit(['clone', '--depth=1', '--', repoUrl, remotePath]);\n\n try {\n // Try to checkout the pinned SHA\n // Note: 'checkout' without '--' treats arg as ref; with '--' it's a file path\n execGit(['fetch', '--depth=1', 'origin', '--', parsed.sha], { cwd: remotePath });\n execGit(['checkout', parsed.sha], { cwd: remotePath });\n } catch {\n // If SHA not found, do a full fetch and retry\n execGit(['fetch', '--unshallow'], { cwd: remotePath });\n execGit(['checkout', parsed.sha], { cwd: remotePath });\n }\n } else if (!isPinned) {\n // For unpinned refs, shallow clone of default branch\n execGit(['clone', '--depth=1', '--', repoUrl, remotePath]);\n }\n } else {\n // Update existing cache\n onProgress?.(`Updating ${ref}...`);\n\n if (!isPinned) {\n // For unpinned refs, pull latest\n execGit(['fetch', '--depth=1', 'origin'], { cwd: remotePath });\n execGit(['reset', '--hard', 'origin/HEAD'], { cwd: remotePath });\n }\n // Pinned refs don't need updates - SHA is immutable\n }\n\n // Get the current HEAD SHA\n const sha = execGit(['rev-parse', 'HEAD'], { cwd: remotePath });\n\n // Update state\n state.remotes[ref] = {\n sha,\n fetchedAt: new Date().toISOString(),\n };\n saveState(state);\n\n return sha;\n}\n\nexport interface DiscoveredRemoteSkill {\n name: string;\n description: string;\n path: string;\n /** Plugin name for marketplace format skills */\n pluginName?: string;\n}\n\n/**\n * Parse marketplace.json from a remote repository if it exists.\n * Returns null if the file doesn't exist or is invalid.\n */\nfunction parseMarketplaceConfig(remotePath: string): MarketplaceConfig | null {\n const marketplacePath = join(remotePath, '.claude-plugin', 'marketplace.json');\n\n if (!existsSync(marketplacePath)) {\n return null;\n }\n\n try {\n const content = readFileSync(marketplacePath, 'utf-8');\n const data = JSON.parse(content);\n return MarketplaceConfigSchema.parse(data);\n } catch {\n // Invalid or malformed marketplace.json - fall back to traditional discovery\n return null;\n }\n}\n\n/** Directories to search for skills in remote repositories */\nconst REMOTE_SKILL_DIRECTORIES = [\n '', // root level\n 'skills', // skills/ subdirectory\n '.warden/skills', // Warden-specific\n '.agents/skills', // General agent skills\n '.claude/skills', // Claude Code skills\n];\n\n/**\n * Discover skills using traditional directory layout.\n * Searches root level, skills/, and conventional skill directories.\n */\nasync function discoverTraditionalSkills(remotePath: string): Promise<DiscoveredRemoteSkill[]> {\n const skills: DiscoveredRemoteSkill[] = [];\n const seenNames = new Set<string>();\n\n for (const subdir of REMOTE_SKILL_DIRECTORIES) {\n const searchPath = subdir ? join(remotePath, subdir) : remotePath;\n if (!existsSync(searchPath)) continue;\n\n const entries = readdirSync(searchPath);\n\n for (const entry of entries) {\n if (entry.startsWith('.')) continue;\n\n const entryPath = join(searchPath, entry);\n const stat = statSync(entryPath);\n\n if (stat.isDirectory()) {\n const skillMdPath = join(entryPath, 'SKILL.md');\n if (existsSync(skillMdPath)) {\n try {\n const skill = await loadSkillFromMarkdown(skillMdPath);\n // First occurrence wins (root takes precedence over skills/)\n if (!seenNames.has(skill.name)) {\n seenNames.add(skill.name);\n skills.push({\n name: skill.name,\n description: skill.description,\n path: entryPath,\n });\n }\n } catch {\n // Skip invalid skill directories\n }\n }\n }\n }\n }\n\n return skills;\n}\n\n/**\n * Discover skills using marketplace format.\n * Searches plugins/{plugin}/skills/ for each plugin defined in marketplace.json.\n */\nasync function discoverMarketplaceSkills(\n remotePath: string,\n config: MarketplaceConfig\n): Promise<DiscoveredRemoteSkill[]> {\n const skills: DiscoveredRemoteSkill[] = [];\n const seenNames = new Set<string>();\n\n for (const plugin of config.plugins) {\n // Resolve plugin source path (e.g., \"./plugins/sentry-skills\" -> \"plugins/sentry-skills\")\n const pluginSource = plugin.source.replace(/^\\.\\//, '');\n const skillsPath = join(remotePath, pluginSource, 'skills');\n\n if (!existsSync(skillsPath)) continue;\n\n const entries = readdirSync(skillsPath);\n\n for (const entry of entries) {\n if (entry.startsWith('.')) continue;\n\n const entryPath = join(skillsPath, entry);\n const stat = statSync(entryPath);\n\n if (stat.isDirectory()) {\n const skillMdPath = join(entryPath, 'SKILL.md');\n if (existsSync(skillMdPath)) {\n try {\n const skill = await loadSkillFromMarkdown(skillMdPath);\n // First plugin wins for duplicate skill names\n if (!seenNames.has(skill.name)) {\n seenNames.add(skill.name);\n skills.push({\n name: skill.name,\n description: skill.description,\n path: entryPath,\n pluginName: plugin.name,\n });\n }\n } catch {\n // Skip invalid skill directories\n }\n }\n }\n }\n }\n\n return skills;\n}\n\n/**\n * Discover all skills in a cached remote repository.\n * Detects format and delegates to appropriate discovery function:\n * - If .claude-plugin/marketplace.json exists, uses marketplace discovery\n * - Otherwise, uses traditional discovery (root, skills/, .warden/skills, etc.)\n */\nexport async function discoverRemoteSkills(ref: string): Promise<DiscoveredRemoteSkill[]> {\n const remotePath = getRemotePath(ref);\n\n if (!existsSync(remotePath)) {\n throw new SkillLoaderError(`Remote not cached: ${ref}. Run fetch first.`);\n }\n\n // Check for marketplace format\n const marketplaceConfig = parseMarketplaceConfig(remotePath);\n if (marketplaceConfig) {\n return discoverMarketplaceSkills(remotePath, marketplaceConfig);\n }\n\n // Fall back to traditional discovery\n return discoverTraditionalSkills(remotePath);\n}\n\n/**\n * Resolve a skill from a remote repository.\n * Ensures the remote is fetched/cached, then loads the skill.\n * Matches by skill name (from SKILL.md), not directory name.\n */\nexport async function resolveRemoteSkill(\n ref: string,\n skillName: string,\n options: FetchRemoteOptions = {}\n): Promise<SkillDefinition> {\n await fetchRemote(ref, options);\n\n const availableSkills = await discoverRemoteSkills(ref);\n const match = availableSkills.find((s) => s.name === skillName);\n\n if (match) {\n return loadSkillFromMarkdown(join(match.path, 'SKILL.md'));\n }\n\n if (availableSkills.length === 0) {\n throw new SkillLoaderError(`No skills found in remote: ${ref}`);\n }\n\n throw new SkillLoaderError(\n `Skill '${skillName}' not found in remote: ${ref}. Available skills: ${availableSkills.map((s) => s.name).join(', ')}`\n );\n}\n\n/**\n * Remove a remote from the cache.\n */\nexport function removeRemote(ref: string): void {\n const remotePath = getRemotePath(ref);\n\n if (existsSync(remotePath)) {\n rmSync(remotePath, { recursive: true, force: true });\n }\n\n const state = loadState();\n const { [ref]: _removed, ...remainingRemotes } = state.remotes;\n state.remotes = remainingRemotes;\n saveState(state);\n}\n\n/**\n * List all cached remotes with their metadata.\n */\nexport function listCachedRemotes(): { ref: string; entry: RemoteEntry }[] {\n const state = loadState();\n return Object.entries(state.remotes).map(([ref, entry]) => ({ ref, entry }));\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/action/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/action/main.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CLIOptionsSchema: z.ZodObject<{
|
|
3
|
+
targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
5
|
+
config: z.ZodOptional<z.ZodString>;
|
|
6
|
+
json: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
output: z.ZodOptional<z.ZodString>;
|
|
8
|
+
failOn: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
critical: "critical";
|
|
10
|
+
high: "high";
|
|
11
|
+
medium: "medium";
|
|
12
|
+
low: "low";
|
|
13
|
+
info: "info";
|
|
14
|
+
off: "off";
|
|
15
|
+
}>>;
|
|
16
|
+
commentOn: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
critical: "critical";
|
|
18
|
+
high: "high";
|
|
19
|
+
medium: "medium";
|
|
20
|
+
low: "low";
|
|
21
|
+
info: "info";
|
|
22
|
+
off: "off";
|
|
23
|
+
}>>;
|
|
24
|
+
help: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
parallel: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
model: z.ZodOptional<z.ZodString>;
|
|
27
|
+
quiet: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
verbose: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
color: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
fix: z.ZodDefault<z.ZodBoolean>;
|
|
31
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
list: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
git: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
35
|
+
offline: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type CLIOptions = z.infer<typeof CLIOptionsSchema>;
|
|
38
|
+
export interface SetupAppOptions {
|
|
39
|
+
org?: string;
|
|
40
|
+
port: number;
|
|
41
|
+
timeout: number;
|
|
42
|
+
name?: string;
|
|
43
|
+
open: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ParsedArgs {
|
|
46
|
+
command: 'run' | 'help' | 'init' | 'add' | 'version' | 'setup-app' | 'sync';
|
|
47
|
+
options: CLIOptions;
|
|
48
|
+
setupAppOptions?: SetupAppOptions;
|
|
49
|
+
}
|
|
50
|
+
export declare function showVersion(): void;
|
|
51
|
+
export declare function showHelp(): void;
|
|
52
|
+
export interface DetectTargetTypeOptions {
|
|
53
|
+
/** Current working directory for filesystem checks */
|
|
54
|
+
cwd?: string;
|
|
55
|
+
/** Force git ref interpretation for ambiguous targets */
|
|
56
|
+
forceGit?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Detect if a target looks like a git ref vs a file path.
|
|
60
|
+
* Returns 'git' for git refs, 'file' for file paths.
|
|
61
|
+
*
|
|
62
|
+
* For ambiguous targets (no path separators, no extension), checks
|
|
63
|
+
* if a file/directory exists at that path before defaulting to git ref.
|
|
64
|
+
*/
|
|
65
|
+
export declare function detectTargetType(target: string, options?: DetectTargetTypeOptions): 'git' | 'file';
|
|
66
|
+
/**
|
|
67
|
+
* Classify targets into git refs and file patterns.
|
|
68
|
+
*/
|
|
69
|
+
export declare function classifyTargets(targets: string[], options?: DetectTargetTypeOptions): {
|
|
70
|
+
gitRefs: string[];
|
|
71
|
+
filePatterns: string[];
|
|
72
|
+
};
|
|
73
|
+
export declare function parseCliArgs(argv?: string[]): ParsedArgs;
|
|
74
|
+
//# sourceMappingURL=args.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/args.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+B3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IAC5E,OAAO,EAAE,UAAU,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAmFD,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,GAAG,KAAK,GAAG,MAAM,CA0CtG;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,uBAA4B,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAavI;AAgBD,wBAAgB,YAAY,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,UAAU,CAkL/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.test.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/args.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/add.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAoT7C;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAwHrF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Reporter } from '../output/reporter.js';
|
|
2
|
+
import type { CLIOptions } from '../args.js';
|
|
3
|
+
export interface InitOptions {
|
|
4
|
+
force: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Run the init command to scaffold warden configuration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function runInit(options: CLIOptions, reporter: Reporter): Promise<number>;
|
|
10
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsD7C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAmEtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.test.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/init.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-platform browser opener.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Open a URL in the default browser.
|
|
6
|
+
* Returns a promise that resolves when the browser open command has been executed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function openBrowser(url: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/setup-app/browser.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BtD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exchange temporary code for GitHub App credentials via GitHub API.
|
|
3
|
+
*/
|
|
4
|
+
export interface AppCredentials {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
pem: string;
|
|
8
|
+
htmlUrl: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Exchange a temporary code for GitHub App credentials.
|
|
12
|
+
* This uses the GitHub API to convert the code into full app credentials.
|
|
13
|
+
*/
|
|
14
|
+
export declare function exchangeCodeForCredentials(code: string): Promise<AppCredentials>;
|
|
15
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/setup-app/credentials.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA6BtF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub App manifest builder for the setup-app flow.
|
|
3
|
+
*/
|
|
4
|
+
export interface ManifestOptions {
|
|
5
|
+
name?: string;
|
|
6
|
+
port: number;
|
|
7
|
+
}
|
|
8
|
+
export interface GitHubAppManifest {
|
|
9
|
+
name: string;
|
|
10
|
+
url: string;
|
|
11
|
+
hook_attributes: {
|
|
12
|
+
url: string;
|
|
13
|
+
active: boolean;
|
|
14
|
+
};
|
|
15
|
+
redirect_url: string;
|
|
16
|
+
public: boolean;
|
|
17
|
+
default_permissions: Record<string, string>;
|
|
18
|
+
default_events: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Build a GitHub App manifest for Warden.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildManifest(options: ManifestOptions): GitHubAppManifest;
|
|
24
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/setup-app/manifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAsBzE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local HTTP server for GitHub App manifest flow.
|
|
3
|
+
* Serves a form that POSTs the manifest to GitHub, then receives the callback.
|
|
4
|
+
*/
|
|
5
|
+
import { type Server } from 'node:http';
|
|
6
|
+
import type { GitHubAppManifest } from './manifest.js';
|
|
7
|
+
export interface CallbackResult {
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ServerOptions {
|
|
11
|
+
port: number;
|
|
12
|
+
expectedState: string;
|
|
13
|
+
timeoutMs: number;
|
|
14
|
+
manifest: GitHubAppManifest;
|
|
15
|
+
org?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create and start a local HTTP server for the manifest flow.
|
|
19
|
+
* - GET / or /start: Serves the form that POSTs to GitHub
|
|
20
|
+
* - GET /callback: Receives the callback from GitHub with the code
|
|
21
|
+
*/
|
|
22
|
+
export declare function startCallbackServer(options: ServerOptions): {
|
|
23
|
+
server: Server;
|
|
24
|
+
waitForCallback: Promise<CallbackResult>;
|
|
25
|
+
close: () => void;
|
|
26
|
+
startUrl: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/setup-app/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,KAAK,MAAM,EAA6C,MAAM,WAAW,CAAC;AAEjG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAwCD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAsGA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Setup GitHub App command.
|
|
3
|
+
* Creates a GitHub App via the manifest flow for Warden to post as a custom bot.
|
|
4
|
+
*/
|
|
5
|
+
import type { SetupAppOptions } from '../args.js';
|
|
6
|
+
import type { Reporter } from '../output/reporter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Run the setup-app command.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runSetupApp(options: SetupAppOptions, reporter: Reporter): Promise<number>;
|
|
11
|
+
//# sourceMappingURL=setup-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-app.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/setup-app.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOtD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAyI/F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Reporter } from '../output/reporter.js';
|
|
2
|
+
import type { CLIOptions } from '../args.js';
|
|
3
|
+
/**
|
|
4
|
+
* Run the sync command.
|
|
5
|
+
* Updates cached remote skills to their latest versions.
|
|
6
|
+
* Pinned skills (with @sha) are skipped as they're immutable.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runSync(options: CLIOptions, reporter: Reporter): Promise<number>;
|
|
9
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/commands/sync.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAmGtF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { EventContext } from '../types/index.js';
|
|
2
|
+
export interface LocalContextOptions {
|
|
3
|
+
base?: string;
|
|
4
|
+
head?: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
/** Override auto-detected default branch (from config) */
|
|
7
|
+
defaultBranch?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Build an EventContext from local git repository state.
|
|
11
|
+
* Creates a synthetic pull_request event from git diff.
|
|
12
|
+
*
|
|
13
|
+
* When analyzing a specific commit (head is set), uses the actual commit
|
|
14
|
+
* message as title/body to provide intent context to the LLM.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildLocalEventContext(options?: LocalContextOptions): EventContext;
|
|
17
|
+
export interface FileContextOptions {
|
|
18
|
+
patterns: string[];
|
|
19
|
+
cwd?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build an EventContext from a list of files or glob patterns.
|
|
23
|
+
* Creates a synthetic pull_request event treating files as newly added.
|
|
24
|
+
* This allows analysis without requiring git or a warden.toml config.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildFileEventContext(options: FileContextOptions): Promise<EventContext>;
|
|
27
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,mBAAmB,CAAC;AA4BlE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,CA+CtF;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CA2B9F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FileChange } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Expand glob patterns to a list of file paths.
|
|
4
|
+
*/
|
|
5
|
+
export declare function expandFileGlobs(patterns: string[], cwd?: string): Promise<string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Create a unified diff patch for a file, treating entire content as added.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createPatchFromContent(content: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Read a file and create a synthetic FileChange treating it as newly added.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createSyntheticFileChange(absolutePath: string, basePath: string): FileChange;
|
|
14
|
+
/**
|
|
15
|
+
* Process a list of file paths into FileChange objects.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSyntheticFileChanges(absolutePaths: string[], basePath: string): FileChange[];
|
|
18
|
+
/**
|
|
19
|
+
* Expand glob patterns and create FileChange objects for all matching files.
|
|
20
|
+
*/
|
|
21
|
+
export declare function expandAndCreateFileChanges(patterns: string[], cwd?: string): Promise<FileChange[]>;
|
|
22
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/files.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CASnB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiB9D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GACf,UAAU,CAeZ;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EAAE,EACvB,QAAQ,EAAE,MAAM,GACf,UAAU,EAAE,CAEd;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAAE,EAClB,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,UAAU,EAAE,CAAC,CAIvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.test.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/files.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fix application functionality for the warden CLI.
|
|
3
|
+
*/
|
|
4
|
+
import type { Finding, SkillReport } from '../types/index.js';
|
|
5
|
+
import { type Reporter } from './output/index.js';
|
|
6
|
+
export interface FixResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
finding: Finding;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FixSummary {
|
|
12
|
+
applied: number;
|
|
13
|
+
skipped: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
results: FixResult[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Apply a unified diff to a file.
|
|
19
|
+
* Hunks are applied in reverse order by line number to prevent line shift issues.
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyUnifiedDiff(filePath: string, diff: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Collect all fixable findings from skill reports.
|
|
24
|
+
* A finding is fixable if it has both a suggestedFix.diff and a location.path.
|
|
25
|
+
* Findings are sorted by file, then by line number (descending).
|
|
26
|
+
*/
|
|
27
|
+
export declare function collectFixableFindings(reports: SkillReport[]): Finding[];
|
|
28
|
+
/**
|
|
29
|
+
* Apply all fixes without prompting.
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyAllFixes(findings: Finding[]): FixSummary;
|
|
32
|
+
/**
|
|
33
|
+
* Run the interactive fix flow.
|
|
34
|
+
* Displays each fix with a colored diff and prompts the user.
|
|
35
|
+
*/
|
|
36
|
+
export declare function runInteractiveFixFlow(findings: Finding[], reporter: Reporter): Promise<FixSummary>;
|
|
37
|
+
/**
|
|
38
|
+
* Render the fix summary.
|
|
39
|
+
*/
|
|
40
|
+
export declare function renderFixSummary(summary: FixSummary, reporter: Reporter): void;
|
|
41
|
+
//# sourceMappingURL=fix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAqBrE;AAgDD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE,CAsBxE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CA2B7D;AA+ED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,UAAU,CAAC,CAkGrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAuC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.test.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/fix.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export interface GitFileChange {
|
|
2
|
+
filename: string;
|
|
3
|
+
status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied';
|
|
4
|
+
additions: number;
|
|
5
|
+
deletions: number;
|
|
6
|
+
patch?: string;
|
|
7
|
+
chunks?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get the current branch name.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCurrentBranch(cwd?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Get the HEAD commit SHA.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getHeadSha(cwd?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Detect the default branch by checking common branch names locally.
|
|
19
|
+
* Does not perform any remote operations to avoid SSH prompts.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getDefaultBranch(cwd?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the repository root path.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getRepoRoot(cwd?: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the repository name from the git remote or directory name.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getRepoName(cwd?: string): {
|
|
30
|
+
owner: string;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Get the GitHub repository URL if the remote is on GitHub.
|
|
35
|
+
* Returns null if the remote is not GitHub or not configured.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getGitHubRepoUrl(cwd?: string): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Get list of changed files between two refs.
|
|
40
|
+
* If head is undefined, compares against the working tree.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getChangedFiles(base: string, head?: string, cwd?: string): GitFileChange[];
|
|
43
|
+
/**
|
|
44
|
+
* Get the patch for a specific file.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getFilePatch(base: string, head: string | undefined, filename: string, cwd?: string): string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Get patches for all changed files in a single git command.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getChangedFilesWithPatches(base: string, head?: string, cwd?: string): GitFileChange[];
|
|
51
|
+
/**
|
|
52
|
+
* Check if there are uncommitted changes in the working tree.
|
|
53
|
+
*/
|
|
54
|
+
export declare function hasUncommittedChanges(cwd?: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Check if a ref exists.
|
|
57
|
+
*/
|
|
58
|
+
export declare function refExists(ref: string, cwd?: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Commit message with subject and body separated.
|
|
61
|
+
*/
|
|
62
|
+
export interface CommitMessage {
|
|
63
|
+
/** First line of the commit message */
|
|
64
|
+
subject: string;
|
|
65
|
+
/** Remaining lines after the subject (may be empty) */
|
|
66
|
+
body: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get the commit message for a specific ref.
|
|
70
|
+
* Returns subject (first line) and body (remaining lines) separately.
|
|
71
|
+
*/
|
|
72
|
+
export declare function getCommitMessage(ref: string, cwd?: string): CommitMessage;
|
|
73
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/git.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAsBpE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAE/D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAiBxF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAiB3E;AAsBD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,GAAE,MAAsB,GAC1B,aAAa,EAAE,CA8CjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAsB,GAC1B,MAAM,GAAG,SAAS,CAOpB;AA6BD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,GAAE,MAAsB,GAC1B,aAAa,EAAE,CA0BjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAG1E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAO3E;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,aAAa,CAKxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.test.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/git.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["file:///home/runner/work/warden/warden/src/cli/main.ts"],"names":[],"mappings":"AAoCA;;;GAGG;AACH,eAAO,MAAM,eAAe,iBAAwB,CAAC;AAokBrD,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmD1C"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { OutputMode } from './tty.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for creating a box.
|
|
4
|
+
*/
|
|
5
|
+
export interface BoxOptions {
|
|
6
|
+
/** Title displayed in the header (left side) */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Badge displayed in the header (right side, e.g., duration) */
|
|
9
|
+
badge?: string;
|
|
10
|
+
/** Output mode for TTY vs non-TTY rendering */
|
|
11
|
+
mode: OutputMode;
|
|
12
|
+
/** Minimum width for the box (default: 50) */
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders box-style containers for terminal output.
|
|
17
|
+
* Supports TTY mode with Unicode box characters and CI mode with plain text.
|
|
18
|
+
*/
|
|
19
|
+
export declare class BoxRenderer {
|
|
20
|
+
private readonly title;
|
|
21
|
+
private readonly badge;
|
|
22
|
+
private readonly mode;
|
|
23
|
+
private readonly width;
|
|
24
|
+
private readonly lines;
|
|
25
|
+
constructor(options: BoxOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Render the top border with title and optional badge.
|
|
28
|
+
* TTY: ┌─ title ─────────────────────── badge ─┐
|
|
29
|
+
* CI: === title (badge) ===
|
|
30
|
+
*/
|
|
31
|
+
header(): this;
|
|
32
|
+
/**
|
|
33
|
+
* Get the available content width (excluding borders and padding).
|
|
34
|
+
*/
|
|
35
|
+
get contentWidth(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Add content lines with side borders (TTY) or plain (CI).
|
|
38
|
+
* Long lines are automatically wrapped to fit within the box.
|
|
39
|
+
*/
|
|
40
|
+
content(contentLines: string | string[]): this;
|
|
41
|
+
/**
|
|
42
|
+
* Wrap a line to fit within the content width.
|
|
43
|
+
* Preserves leading indentation on wrapped lines.
|
|
44
|
+
*/
|
|
45
|
+
private wrapLine;
|
|
46
|
+
/**
|
|
47
|
+
* Add an empty content line.
|
|
48
|
+
*/
|
|
49
|
+
blank(): this;
|
|
50
|
+
/**
|
|
51
|
+
* Render a horizontal divider.
|
|
52
|
+
* TTY: ├─────────────────────────────────────────────┤
|
|
53
|
+
* CI: ---
|
|
54
|
+
*/
|
|
55
|
+
divider(): this;
|
|
56
|
+
/**
|
|
57
|
+
* Render the bottom border.
|
|
58
|
+
* TTY: └─────────────────────────────────────────────┘
|
|
59
|
+
* CI: (nothing in CI mode - just ends)
|
|
60
|
+
*/
|
|
61
|
+
footer(): this;
|
|
62
|
+
/**
|
|
63
|
+
* Get all rendered lines.
|
|
64
|
+
*/
|
|
65
|
+
render(): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Get the rendered output as a single string.
|
|
68
|
+
*/
|
|
69
|
+
toString(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Strip ANSI escape codes from a string for length calculation.
|
|
72
|
+
*/
|
|
73
|
+
private stripAnsi;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=box.d.ts.map
|