@mesrai/cli 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +670 -0
- package/dist/agents/agent.interface.d.ts +41 -0
- package/dist/agents/agent.interface.d.ts.map +1 -0
- package/dist/agents/agent.interface.js +2 -0
- package/dist/agents/agent.interface.js.map +1 -0
- package/dist/agents/claude-code.agent.d.ts +14 -0
- package/dist/agents/claude-code.agent.d.ts.map +1 -0
- package/dist/agents/claude-code.agent.js +90 -0
- package/dist/agents/claude-code.agent.js.map +1 -0
- package/dist/agents/codex.agent.d.ts +14 -0
- package/dist/agents/codex.agent.d.ts.map +1 -0
- package/dist/agents/codex.agent.js +77 -0
- package/dist/agents/codex.agent.js.map +1 -0
- package/dist/agents/cursor.agent.d.ts +29 -0
- package/dist/agents/cursor.agent.d.ts.map +1 -0
- package/dist/agents/cursor.agent.js +85 -0
- package/dist/agents/cursor.agent.js.map +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +60 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +37 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +11 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +158 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +2 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +26 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +2 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +82 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/team-key.d.ts +5 -0
- package/dist/commands/auth/team-key.d.ts.map +1 -0
- package/dist/commands/auth/team-key.js +112 -0
- package/dist/commands/auth/team-key.js.map +1 -0
- package/dist/commands/auth/token.d.ts +2 -0
- package/dist/commands/auth/token.d.ts.map +1 -0
- package/dist/commands/auth/token.js +33 -0
- package/dist/commands/auth/token.js.map +1 -0
- package/dist/commands/config.d.ts +5 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +26 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/diff.d.ts +3 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +23 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/hook/index.d.ts +3 -0
- package/dist/commands/hook/index.d.ts.map +1 -0
- package/dist/commands/hook/index.js +24 -0
- package/dist/commands/hook/index.js.map +1 -0
- package/dist/commands/hook/install.d.ts +11 -0
- package/dist/commands/hook/install.d.ts.map +1 -0
- package/dist/commands/hook/install.js +149 -0
- package/dist/commands/hook/install.js.map +1 -0
- package/dist/commands/hook/status.d.ts +2 -0
- package/dist/commands/hook/status.d.ts.map +1 -0
- package/dist/commands/hook/status.js +36 -0
- package/dist/commands/hook/status.js.map +1 -0
- package/dist/commands/hook/uninstall.d.ts +5 -0
- package/dist/commands/hook/uninstall.d.ts.map +1 -0
- package/dist/commands/hook/uninstall.js +66 -0
- package/dist/commands/hook/uninstall.js.map +1 -0
- package/dist/commands/memory/capture.d.ts +8 -0
- package/dist/commands/memory/capture.d.ts.map +1 -0
- package/dist/commands/memory/capture.js +124 -0
- package/dist/commands/memory/capture.js.map +1 -0
- package/dist/commands/memory/disable.d.ts +5 -0
- package/dist/commands/memory/disable.d.ts.map +1 -0
- package/dist/commands/memory/disable.js +67 -0
- package/dist/commands/memory/disable.js.map +1 -0
- package/dist/commands/memory/enable.d.ts +7 -0
- package/dist/commands/memory/enable.d.ts.map +1 -0
- package/dist/commands/memory/enable.js +74 -0
- package/dist/commands/memory/enable.js.map +1 -0
- package/dist/commands/memory/hooks.d.ts +31 -0
- package/dist/commands/memory/hooks.d.ts.map +1 -0
- package/dist/commands/memory/hooks.js +283 -0
- package/dist/commands/memory/hooks.js.map +1 -0
- package/dist/commands/memory/index.d.ts +3 -0
- package/dist/commands/memory/index.d.ts.map +1 -0
- package/dist/commands/memory/index.js +36 -0
- package/dist/commands/memory/index.js.map +1 -0
- package/dist/commands/memory/session-hooks/claude-code.d.ts +2 -0
- package/dist/commands/memory/session-hooks/claude-code.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks/claude-code.js +24 -0
- package/dist/commands/memory/session-hooks/claude-code.js.map +1 -0
- package/dist/commands/memory/session-hooks/codex.d.ts +2 -0
- package/dist/commands/memory/session-hooks/codex.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks/codex.js +16 -0
- package/dist/commands/memory/session-hooks/codex.js.map +1 -0
- package/dist/commands/memory/session-hooks/cursor.d.ts +2 -0
- package/dist/commands/memory/session-hooks/cursor.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks/cursor.js +20 -0
- package/dist/commands/memory/session-hooks/cursor.js.map +1 -0
- package/dist/commands/memory/session-hooks/index.d.ts +3 -0
- package/dist/commands/memory/session-hooks/index.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks/index.js +21 -0
- package/dist/commands/memory/session-hooks/index.js.map +1 -0
- package/dist/commands/memory/session-hooks/shared.d.ts +7 -0
- package/dist/commands/memory/session-hooks/shared.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks/shared.js +52 -0
- package/dist/commands/memory/session-hooks/shared.js.map +1 -0
- package/dist/commands/memory/session-hooks-install-codex.d.ts +19 -0
- package/dist/commands/memory/session-hooks-install-codex.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks-install-codex.js +91 -0
- package/dist/commands/memory/session-hooks-install-codex.js.map +1 -0
- package/dist/commands/memory/session-hooks-install-cursor.d.ts +9 -0
- package/dist/commands/memory/session-hooks-install-cursor.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks-install-cursor.js +119 -0
- package/dist/commands/memory/session-hooks-install-cursor.js.map +1 -0
- package/dist/commands/memory/session-hooks-install.d.ts +9 -0
- package/dist/commands/memory/session-hooks-install.d.ts.map +1 -0
- package/dist/commands/memory/session-hooks-install.js +173 -0
- package/dist/commands/memory/session-hooks-install.js.map +1 -0
- package/dist/commands/pr.d.ts +2 -0
- package/dist/commands/pr.d.ts.map +1 -0
- package/dist/commands/pr.js +2 -0
- package/dist/commands/pr.js.map +1 -0
- package/dist/commands/review.d.ts +2 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +2 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/rules.d.ts +31 -0
- package/dist/commands/rules.d.ts.map +1 -0
- package/dist/commands/rules.js +159 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/commands/schema.d.ts +3 -0
- package/dist/commands/schema.d.ts.map +1 -0
- package/dist/commands/schema.js +62 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/skills.d.ts +3 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +85 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +99 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/subscribe.d.ts +4 -0
- package/dist/commands/subscribe.d.ts.map +1 -0
- package/dist/commands/subscribe.js +25 -0
- package/dist/commands/subscribe.js.map +1 -0
- package/dist/commands/update.d.ts +10 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +112 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +6 -0
- package/dist/constants.js.map +1 -0
- package/dist/features/centralized-config/actions.d.ts +20 -0
- package/dist/features/centralized-config/actions.d.ts.map +1 -0
- package/dist/features/centralized-config/actions.js +114 -0
- package/dist/features/centralized-config/actions.js.map +1 -0
- package/dist/features/centralized-config/command.d.ts +4 -0
- package/dist/features/centralized-config/command.d.ts.map +1 -0
- package/dist/features/centralized-config/command.js +43 -0
- package/dist/features/centralized-config/command.js.map +1 -0
- package/dist/features/pr/command.d.ts +4 -0
- package/dist/features/pr/command.d.ts.map +1 -0
- package/dist/features/pr/command.js +222 -0
- package/dist/features/pr/command.js.map +1 -0
- package/dist/features/repo-config/actions.d.ts +33 -0
- package/dist/features/repo-config/actions.d.ts.map +1 -0
- package/dist/features/repo-config/actions.js +271 -0
- package/dist/features/repo-config/actions.js.map +1 -0
- package/dist/features/repo-config/command.d.ts +15 -0
- package/dist/features/repo-config/command.d.ts.map +1 -0
- package/dist/features/repo-config/command.js +135 -0
- package/dist/features/repo-config/command.js.map +1 -0
- package/dist/features/review/command.d.ts +4 -0
- package/dist/features/review/command.d.ts.map +1 -0
- package/dist/features/review/command.js +404 -0
- package/dist/features/review/command.js.map +1 -0
- package/dist/features/review/diff.d.ts +23 -0
- package/dist/features/review/diff.d.ts.map +1 -0
- package/dist/features/review/diff.js +47 -0
- package/dist/features/review/diff.js.map +1 -0
- package/dist/features/review/errors.d.ts +3 -0
- package/dist/features/review/errors.d.ts.map +1 -0
- package/dist/features/review/errors.js +26 -0
- package/dist/features/review/errors.js.map +1 -0
- package/dist/features/review/hunk-context.d.ts +25 -0
- package/dist/features/review/hunk-context.d.ts.map +1 -0
- package/dist/features/review/hunk-context.js +158 -0
- package/dist/features/review/hunk-context.js.map +1 -0
- package/dist/features/review/hunk-viewer.d.ts +25 -0
- package/dist/features/review/hunk-viewer.d.ts.map +1 -0
- package/dist/features/review/hunk-viewer.js +59 -0
- package/dist/features/review/hunk-viewer.js.map +1 -0
- package/dist/features/review/no-changes.d.ts +6 -0
- package/dist/features/review/no-changes.d.ts.map +1 -0
- package/dist/features/review/no-changes.js +31 -0
- package/dist/features/review/no-changes.js.map +1 -0
- package/dist/features/review/options.d.ts +7 -0
- package/dist/features/review/options.d.ts.map +1 -0
- package/dist/features/review/options.js +18 -0
- package/dist/features/review/options.js.map +1 -0
- package/dist/features/review/result.d.ts +40 -0
- package/dist/features/review/result.d.ts.map +1 -0
- package/dist/features/review/result.js +95 -0
- package/dist/features/review/result.js.map +1 -0
- package/dist/formatters/json.d.ts +7 -0
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/json.js +7 -0
- package/dist/formatters/json.js.map +1 -0
- package/dist/formatters/markdown.d.ts +7 -0
- package/dist/formatters/markdown.d.ts.map +1 -0
- package/dist/formatters/markdown.js +93 -0
- package/dist/formatters/markdown.js.map +1 -0
- package/dist/formatters/prompt.d.ts +12 -0
- package/dist/formatters/prompt.d.ts.map +1 -0
- package/dist/formatters/prompt.js +90 -0
- package/dist/formatters/prompt.js.map +1 -0
- package/dist/formatters/repo-config.d.ts +7 -0
- package/dist/formatters/repo-config.d.ts.map +1 -0
- package/dist/formatters/repo-config.js +99 -0
- package/dist/formatters/repo-config.js.map +1 -0
- package/dist/formatters/terminal.d.ts +7 -0
- package/dist/formatters/terminal.d.ts.map +1 -0
- package/dist/formatters/terminal.js +130 -0
- package/dist/formatters/terminal.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/services/api/api-core.d.ts +27 -0
- package/dist/services/api/api-core.d.ts.map +1 -0
- package/dist/services/api/api-core.js +451 -0
- package/dist/services/api/api-core.js.map +1 -0
- package/dist/services/api/api.interface.d.ts +101 -0
- package/dist/services/api/api.interface.d.ts.map +1 -0
- package/dist/services/api/api.interface.js +2 -0
- package/dist/services/api/api.interface.js.map +1 -0
- package/dist/services/api/api.real.d.ts +19 -0
- package/dist/services/api/api.real.d.ts.map +1 -0
- package/dist/services/api/api.real.js +20 -0
- package/dist/services/api/api.real.js.map +1 -0
- package/dist/services/api/auth.api.d.ts +17 -0
- package/dist/services/api/auth.api.d.ts.map +1 -0
- package/dist/services/api/auth.api.js +73 -0
- package/dist/services/api/auth.api.js.map +1 -0
- package/dist/services/api/cli-auth.api.d.ts +29 -0
- package/dist/services/api/cli-auth.api.d.ts.map +1 -0
- package/dist/services/api/cli-auth.api.js +23 -0
- package/dist/services/api/cli-auth.api.js.map +1 -0
- package/dist/services/api/config.api.d.ts +34 -0
- package/dist/services/api/config.api.d.ts.map +1 -0
- package/dist/services/api/config.api.js +108 -0
- package/dist/services/api/config.api.js.map +1 -0
- package/dist/services/api/index.d.ts +4 -0
- package/dist/services/api/index.d.ts.map +1 -0
- package/dist/services/api/index.js +3 -0
- package/dist/services/api/index.js.map +1 -0
- package/dist/services/api/memory.api.d.ts +10 -0
- package/dist/services/api/memory.api.d.ts.map +1 -0
- package/dist/services/api/memory.api.js +19 -0
- package/dist/services/api/memory.api.js.map +1 -0
- package/dist/services/api/review.api.d.ts +27 -0
- package/dist/services/api/review.api.d.ts.map +1 -0
- package/dist/services/api/review.api.js +140 -0
- package/dist/services/api/review.api.js.map +1 -0
- package/dist/services/api/rules.api.d.ts +13 -0
- package/dist/services/api/rules.api.d.ts.map +1 -0
- package/dist/services/api/rules.api.js +41 -0
- package/dist/services/api/rules.api.js.map +1 -0
- package/dist/services/api/sessions.api.d.ts +6 -0
- package/dist/services/api/sessions.api.d.ts.map +1 -0
- package/dist/services/api/sessions.api.js +129 -0
- package/dist/services/api/sessions.api.js.map +1 -0
- package/dist/services/api/trial.api.d.ts +10 -0
- package/dist/services/api/trial.api.d.ts.map +1 -0
- package/dist/services/api/trial.api.js +11 -0
- package/dist/services/api/trial.api.js.map +1 -0
- package/dist/services/auth.service.d.ts +29 -0
- package/dist/services/auth.service.d.ts.map +1 -0
- package/dist/services/auth.service.js +190 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/browser-login.service.d.ts +23 -0
- package/dist/services/browser-login.service.d.ts.map +1 -0
- package/dist/services/browser-login.service.js +187 -0
- package/dist/services/browser-login.service.js.map +1 -0
- package/dist/services/centralized-config.service.d.ts +24 -0
- package/dist/services/centralized-config.service.d.ts.map +1 -0
- package/dist/services/centralized-config.service.js +112 -0
- package/dist/services/centralized-config.service.js.map +1 -0
- package/dist/services/context.service.d.ts +25 -0
- package/dist/services/context.service.d.ts.map +1 -0
- package/dist/services/context.service.js +134 -0
- package/dist/services/context.service.js.map +1 -0
- package/dist/services/device-login.service.d.ts +23 -0
- package/dist/services/device-login.service.d.ts.map +1 -0
- package/dist/services/device-login.service.js +70 -0
- package/dist/services/device-login.service.js.map +1 -0
- package/dist/services/fix.service.d.ts +31 -0
- package/dist/services/fix.service.d.ts.map +1 -0
- package/dist/services/fix.service.js +121 -0
- package/dist/services/fix.service.js.map +1 -0
- package/dist/services/git-hooks.service.d.ts +20 -0
- package/dist/services/git-hooks.service.d.ts.map +1 -0
- package/dist/services/git-hooks.service.js +126 -0
- package/dist/services/git-hooks.service.js.map +1 -0
- package/dist/services/git.service.d.ts +44 -0
- package/dist/services/git.service.d.ts.map +1 -0
- package/dist/services/git.service.js +321 -0
- package/dist/services/git.service.js.map +1 -0
- package/dist/services/hook-logger.service.d.ts +18 -0
- package/dist/services/hook-logger.service.d.ts.map +1 -0
- package/dist/services/hook-logger.service.js +48 -0
- package/dist/services/hook-logger.service.js.map +1 -0
- package/dist/services/lifecycle-events.d.ts +49 -0
- package/dist/services/lifecycle-events.d.ts.map +1 -0
- package/dist/services/lifecycle-events.js +86 -0
- package/dist/services/lifecycle-events.js.map +1 -0
- package/dist/services/lifecycle-git-context.d.ts +15 -0
- package/dist/services/lifecycle-git-context.d.ts.map +1 -0
- package/dist/services/lifecycle-git-context.js +23 -0
- package/dist/services/lifecycle-git-context.js.map +1 -0
- package/dist/services/lifecycle-local-turn-state.d.ts +14 -0
- package/dist/services/lifecycle-local-turn-state.d.ts.map +1 -0
- package/dist/services/lifecycle-local-turn-state.js +18 -0
- package/dist/services/lifecycle-local-turn-state.js.map +1 -0
- package/dist/services/lifecycle-transcript.d.ts +25 -0
- package/dist/services/lifecycle-transcript.d.ts.map +1 -0
- package/dist/services/lifecycle-transcript.js +29 -0
- package/dist/services/lifecycle-transcript.js.map +1 -0
- package/dist/services/lifecycle-turn-data.d.ts +11 -0
- package/dist/services/lifecycle-turn-data.d.ts.map +1 -0
- package/dist/services/lifecycle-turn-data.js +23 -0
- package/dist/services/lifecycle-turn-data.js.map +1 -0
- package/dist/services/lifecycle.service.d.ts +14 -0
- package/dist/services/lifecycle.service.d.ts.map +1 -0
- package/dist/services/lifecycle.service.js +276 -0
- package/dist/services/lifecycle.service.js.map +1 -0
- package/dist/services/repo-config.service.d.ts +22 -0
- package/dist/services/repo-config.service.d.ts.map +1 -0
- package/dist/services/repo-config.service.js +81 -0
- package/dist/services/repo-config.service.js.map +1 -0
- package/dist/services/repo-settings-wizard.service.d.ts +19 -0
- package/dist/services/repo-settings-wizard.service.d.ts.map +1 -0
- package/dist/services/repo-settings-wizard.service.js +260 -0
- package/dist/services/repo-settings-wizard.service.js.map +1 -0
- package/dist/services/repo-settings.service.d.ts +30 -0
- package/dist/services/repo-settings.service.d.ts.map +1 -0
- package/dist/services/repo-settings.service.js +99 -0
- package/dist/services/repo-settings.service.js.map +1 -0
- package/dist/services/review-auth-fallback.d.ts +7 -0
- package/dist/services/review-auth-fallback.d.ts.map +1 -0
- package/dist/services/review-auth-fallback.js +25 -0
- package/dist/services/review-auth-fallback.js.map +1 -0
- package/dist/services/review-config-builder.d.ts +19 -0
- package/dist/services/review-config-builder.d.ts.map +1 -0
- package/dist/services/review-config-builder.js +29 -0
- package/dist/services/review-config-builder.js.map +1 -0
- package/dist/services/review-file-filter.d.ts +3 -0
- package/dist/services/review-file-filter.d.ts.map +1 -0
- package/dist/services/review-file-filter.js +35 -0
- package/dist/services/review-file-filter.js.map +1 -0
- package/dist/services/review-normalizer.d.ts +6 -0
- package/dist/services/review-normalizer.d.ts.map +1 -0
- package/dist/services/review-normalizer.js +62 -0
- package/dist/services/review-normalizer.js.map +1 -0
- package/dist/services/review-verbose.d.ts +28 -0
- package/dist/services/review-verbose.d.ts.map +1 -0
- package/dist/services/review-verbose.js +52 -0
- package/dist/services/review-verbose.js.map +1 -0
- package/dist/services/review.service.d.ts +38 -0
- package/dist/services/review.service.d.ts.map +1 -0
- package/dist/services/review.service.js +152 -0
- package/dist/services/review.service.js.map +1 -0
- package/dist/services/rules.service.d.ts +16 -0
- package/dist/services/rules.service.d.ts.map +1 -0
- package/dist/services/rules.service.js +98 -0
- package/dist/services/rules.service.js.map +1 -0
- package/dist/services/session-local.service.d.ts +25 -0
- package/dist/services/session-local.service.d.ts.map +1 -0
- package/dist/services/session-local.service.js +79 -0
- package/dist/services/session-local.service.js.map +1 -0
- package/dist/services/transcript-parser.service.d.ts +10 -0
- package/dist/services/transcript-parser.service.d.ts.map +1 -0
- package/dist/services/transcript-parser.service.js +127 -0
- package/dist/services/transcript-parser.service.js.map +1 -0
- package/dist/services/transcript.service.d.ts +33 -0
- package/dist/services/transcript.service.d.ts.map +1 -0
- package/dist/services/transcript.service.js +264 -0
- package/dist/services/transcript.service.js.map +1 -0
- package/dist/types/auth.d.ts +18 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/auth.js +2 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/types/cli.d.ts +41 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +2 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/command-output.d.ts +29 -0
- package/dist/types/command-output.d.ts.map +1 -0
- package/dist/types/command-output.js +2 -0
- package/dist/types/command-output.js.map +1 -0
- package/dist/types/config.d.ts +68 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +8 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +15 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/memory.d.ts +39 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/memory.js +2 -0
- package/dist/types/memory.js.map +1 -0
- package/dist/types/repo-config.d.ts +24 -0
- package/dist/types/repo-config.d.ts.map +1 -0
- package/dist/types/repo-config.js +2 -0
- package/dist/types/repo-config.js.map +1 -0
- package/dist/types/review.d.ts +112 -0
- package/dist/types/review.d.ts.map +1 -0
- package/dist/types/review.js +2 -0
- package/dist/types/review.js.map +1 -0
- package/dist/types/rules.d.ts +42 -0
- package/dist/types/rules.d.ts.map +1 -0
- package/dist/types/rules.js +7 -0
- package/dist/types/rules.js.map +1 -0
- package/dist/types/session-events.d.ts +48 -0
- package/dist/types/session-events.d.ts.map +1 -0
- package/dist/types/session-events.js +2 -0
- package/dist/types/session-events.js.map +1 -0
- package/dist/types/session.d.ts +150 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +9 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/trial.d.ts +10 -0
- package/dist/types/trial.d.ts.map +1 -0
- package/dist/types/trial.js +2 -0
- package/dist/types/trial.js.map +1 -0
- package/dist/ui/interactive-formatters.d.ts +6 -0
- package/dist/ui/interactive-formatters.d.ts.map +1 -0
- package/dist/ui/interactive-formatters.js +61 -0
- package/dist/ui/interactive-formatters.js.map +1 -0
- package/dist/ui/interactive-helpers.d.ts +20 -0
- package/dist/ui/interactive-helpers.d.ts.map +1 -0
- package/dist/ui/interactive-helpers.js +82 -0
- package/dist/ui/interactive-helpers.js.map +1 -0
- package/dist/ui/interactive-renderers.d.ts +6 -0
- package/dist/ui/interactive-renderers.d.ts.map +1 -0
- package/dist/ui/interactive-renderers.js +82 -0
- package/dist/ui/interactive-renderers.js.map +1 -0
- package/dist/ui/interactive.d.ts +25 -0
- package/dist/ui/interactive.d.ts.map +1 -0
- package/dist/ui/interactive.js +228 -0
- package/dist/ui/interactive.js.map +1 -0
- package/dist/utils/auth-mode.d.ts +7 -0
- package/dist/utils/auth-mode.d.ts.map +1 -0
- package/dist/utils/auth-mode.js +42 -0
- package/dist/utils/auth-mode.js.map +1 -0
- package/dist/utils/banner.d.ts +2 -0
- package/dist/utils/banner.d.ts.map +1 -0
- package/dist/utils/banner.js +180 -0
- package/dist/utils/banner.js.map +1 -0
- package/dist/utils/cli-exit.d.ts +13 -0
- package/dist/utils/cli-exit.d.ts.map +1 -0
- package/dist/utils/cli-exit.js +29 -0
- package/dist/utils/cli-exit.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +11 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/command-context.d.ts +12 -0
- package/dist/utils/command-context.d.ts.map +1 -0
- package/dist/utils/command-context.js +15 -0
- package/dist/utils/command-context.js.map +1 -0
- package/dist/utils/command-errors.d.ts +12 -0
- package/dist/utils/command-errors.d.ts.map +1 -0
- package/dist/utils/command-errors.js +112 -0
- package/dist/utils/command-errors.js.map +1 -0
- package/dist/utils/command-output.d.ts +5 -0
- package/dist/utils/command-output.d.ts.map +1 -0
- package/dist/utils/command-output.js +46 -0
- package/dist/utils/command-output.js.map +1 -0
- package/dist/utils/command-schema.d.ts +29 -0
- package/dist/utils/command-schema.d.ts.map +1 -0
- package/dist/utils/command-schema.js +74 -0
- package/dist/utils/command-schema.js.map +1 -0
- package/dist/utils/commander-errors.d.ts +8 -0
- package/dist/utils/commander-errors.d.ts.map +1 -0
- package/dist/utils/commander-errors.js +79 -0
- package/dist/utils/commander-errors.js.map +1 -0
- package/dist/utils/commander-setup.d.ts +3 -0
- package/dist/utils/commander-setup.d.ts.map +1 -0
- package/dist/utils/commander-setup.js +10 -0
- package/dist/utils/commander-setup.js.map +1 -0
- package/dist/utils/config.d.ts +13 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +71 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/credentials.d.ts +6 -0
- package/dist/utils/credentials.d.ts.map +1 -0
- package/dist/utils/credentials.js +64 -0
- package/dist/utils/credentials.js.map +1 -0
- package/dist/utils/device.d.ts +7 -0
- package/dist/utils/device.d.ts.map +1 -0
- package/dist/utils/device.js +133 -0
- package/dist/utils/device.js.map +1 -0
- package/dist/utils/field-mask.d.ts +2 -0
- package/dist/utils/field-mask.d.ts.map +1 -0
- package/dist/utils/field-mask.js +93 -0
- package/dist/utils/field-mask.js.map +1 -0
- package/dist/utils/git-diff.d.ts +5 -0
- package/dist/utils/git-diff.d.ts.map +1 -0
- package/dist/utils/git-diff.js +14 -0
- package/dist/utils/git-diff.js.map +1 -0
- package/dist/utils/git-file-reader.d.ts +22 -0
- package/dist/utils/git-file-reader.d.ts.map +1 -0
- package/dist/utils/git-file-reader.js +45 -0
- package/dist/utils/git-file-reader.js.map +1 -0
- package/dist/utils/git-file-selection.d.ts +14 -0
- package/dist/utils/git-file-selection.d.ts.map +1 -0
- package/dist/utils/git-file-selection.js +20 -0
- package/dist/utils/git-file-selection.js.map +1 -0
- package/dist/utils/git-file-targets.d.ts +4 -0
- package/dist/utils/git-file-targets.d.ts.map +1 -0
- package/dist/utils/git-file-targets.js +11 -0
- package/dist/utils/git-file-targets.js.map +1 -0
- package/dist/utils/git-remote.d.ts +7 -0
- package/dist/utils/git-remote.d.ts.map +1 -0
- package/dist/utils/git-remote.js +94 -0
- package/dist/utils/git-remote.js.map +1 -0
- package/dist/utils/git-status.d.ts +7 -0
- package/dist/utils/git-status.d.ts.map +1 -0
- package/dist/utils/git-status.js +36 -0
- package/dist/utils/git-status.js.map +1 -0
- package/dist/utils/hunk.d.ts +15 -0
- package/dist/utils/hunk.d.ts.map +1 -0
- package/dist/utils/hunk.js +44 -0
- package/dist/utils/hunk.js.map +1 -0
- package/dist/utils/input-validation.d.ts +11 -0
- package/dist/utils/input-validation.d.ts.map +1 -0
- package/dist/utils/input-validation.js +73 -0
- package/dist/utils/input-validation.js.map +1 -0
- package/dist/utils/install-instructions.d.ts +6 -0
- package/dist/utils/install-instructions.d.ts.map +1 -0
- package/dist/utils/install-instructions.js +18 -0
- package/dist/utils/install-instructions.js.map +1 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +48 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/rate-limit.d.ts +5 -0
- package/dist/utils/rate-limit.d.ts.map +1 -0
- package/dist/utils/rate-limit.js +56 -0
- package/dist/utils/rate-limit.js.map +1 -0
- package/dist/utils/recent-activity.d.ts +9 -0
- package/dist/utils/recent-activity.d.ts.map +1 -0
- package/dist/utils/recent-activity.js +139 -0
- package/dist/utils/recent-activity.js.map +1 -0
- package/dist/utils/repo-settings-dashboard.d.ts +6 -0
- package/dist/utils/repo-settings-dashboard.d.ts.map +1 -0
- package/dist/utils/repo-settings-dashboard.js +36 -0
- package/dist/utils/repo-settings-dashboard.js.map +1 -0
- package/dist/utils/repo-settings-patterns.d.ts +7 -0
- package/dist/utils/repo-settings-patterns.d.ts.map +1 -0
- package/dist/utils/repo-settings-patterns.js +66 -0
- package/dist/utils/repo-settings-patterns.js.map +1 -0
- package/dist/utils/repo-settings-schema.d.ts +6 -0
- package/dist/utils/repo-settings-schema.d.ts.map +1 -0
- package/dist/utils/repo-settings-schema.js +70 -0
- package/dist/utils/repo-settings-schema.js.map +1 -0
- package/dist/utils/review-output.d.ts +4 -0
- package/dist/utils/review-output.d.ts.map +1 -0
- package/dist/utils/review-output.js +18 -0
- package/dist/utils/review-output.js.map +1 -0
- package/dist/utils/skills-sync-manifest.d.ts +5 -0
- package/dist/utils/skills-sync-manifest.d.ts.map +1 -0
- package/dist/utils/skills-sync-manifest.js +39 -0
- package/dist/utils/skills-sync-manifest.js.map +1 -0
- package/dist/utils/skills-sync-paths.d.ts +5 -0
- package/dist/utils/skills-sync-paths.d.ts.map +1 -0
- package/dist/utils/skills-sync-paths.js +60 -0
- package/dist/utils/skills-sync-paths.js.map +1 -0
- package/dist/utils/skills-sync-targets.d.ts +3 -0
- package/dist/utils/skills-sync-targets.d.ts.map +1 -0
- package/dist/utils/skills-sync-targets.js +218 -0
- package/dist/utils/skills-sync-targets.js.map +1 -0
- package/dist/utils/skills-sync.d.ts +39 -0
- package/dist/utils/skills-sync.d.ts.map +1 -0
- package/dist/utils/skills-sync.js +200 -0
- package/dist/utils/skills-sync.js.map +1 -0
- package/dist/utils/skills.d.ts +13 -0
- package/dist/utils/skills.d.ts.map +1 -0
- package/dist/utils/skills.js +117 -0
- package/dist/utils/skills.js.map +1 -0
- package/dist/utils/stream-input.d.ts +13 -0
- package/dist/utils/stream-input.d.ts.map +1 -0
- package/dist/utils/stream-input.js +36 -0
- package/dist/utils/stream-input.js.map +1 -0
- package/dist/utils/team-key-auth.d.ts +5 -0
- package/dist/utils/team-key-auth.d.ts.map +1 -0
- package/dist/utils/team-key-auth.js +14 -0
- package/dist/utils/team-key-auth.js.map +1 -0
- package/dist/utils/update-check.d.ts +2 -0
- package/dist/utils/update-check.d.ts.map +1 -0
- package/dist/utils/update-check.js +30 -0
- package/dist/utils/update-check.js.map +1 -0
- package/package.json +90 -0
- package/skills/README.md +64 -0
- package/skills/hunk-review/SKILL.md +154 -0
- package/skills/mesrai-business-rules-validation/SKILL.md +65 -0
- package/skills/mesrai-centralized-config/SKILL.md +102 -0
- package/skills/mesrai-mesrai-rules/SKILL.md +103 -0
- package/skills/mesrai-mesrai-rules/instructions/create-mesrai-rule.md +56 -0
- package/skills/mesrai-mesrai-rules/instructions/update-mesrai-rule.md +63 -0
- package/skills/mesrai-mesrai-rules/instructions/view-mesrai-rules.md +65 -0
- package/skills/mesrai-mesrai-rules/rules/create-mesrai-rule.md +48 -0
- package/skills/mesrai-mesrai-rules/rules/update-mesrai-rule.md +55 -0
- package/skills/mesrai-mesrai-rules/rules/view-mesrai-rules.md +56 -0
- package/skills/mesrai-pr-suggestions-resolver/SKILL.md +61 -0
- package/skills/mesrai-review/SKILL.md +53 -0
- package/skills/mesrai-review-dev/SKILL.md +55 -0
- package/skills/mesrai-review-dev/scripts/run-local-cli.sh +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
<!-- TODO: Add banner image/logo here -->
|
|
2
|
+
|
|
3
|
+
<h1 align="center">Mesrai CLI</h1>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Catch bugs before they reach your pull request — AI code review from the terminal.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/@mesrai/cli"><img src="https://img.shields.io/npm/v/@mesrai/cli.svg" alt="npm version"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@mesrai/cli"><img src="https://img.shields.io/npm/dm/@mesrai/cli.svg" alt="npm downloads"></a>
|
|
12
|
+
<a href="https://github.com/mesraiofficial/cli/blob/main/LICENSE"><img src="https://img.shields.io/github/license/mesraiofficial/cli" alt="license"></a>
|
|
13
|
+
<a href="https://github.com/mesraiofficial/cli"><img src="https://img.shields.io/github/stars/mesraiofficial/cli" alt="stars"></a>
|
|
14
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="node version"></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://mesrai.com">Website</a> ·
|
|
19
|
+
<a href="https://app.mesrai.com">Sign Up</a> ·
|
|
20
|
+
<a href="https://github.com/mesraiofficial/cli/issues">Issues</a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn global add @mesrai/cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# 1. Install
|
|
35
|
+
yarn global add @mesrai/cli
|
|
36
|
+
|
|
37
|
+
# 2. Authenticate (or skip for trial mode — no account needed)
|
|
38
|
+
mesrai auth login
|
|
39
|
+
|
|
40
|
+
# 3. Review your code
|
|
41
|
+
mesrai review
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
That's it. Mesrai analyzes your changes, finds issues, and lets you fix them interactively — or auto-fix everything at once with `mesrai review --fix`.
|
|
45
|
+
|
|
46
|
+
<!-- TODO: Add demo GIF showing interactive review in action -->
|
|
47
|
+
|
|
48
|
+
## What It Does
|
|
49
|
+
|
|
50
|
+
### Code Review
|
|
51
|
+
|
|
52
|
+
Analyze local changes, staged files, commits, or branch diffs. Mesrai finds bugs, security issues, performance problems, and style violations — then suggests fixes with real code.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
mesrai review # Review working tree changes (interactive)
|
|
56
|
+
mesrai review --staged # Only staged files
|
|
57
|
+
mesrai review --branch main # Compare against a branch
|
|
58
|
+
mesrai review --fix # Auto-apply all fixable issues
|
|
59
|
+
mesrai review --prompt-only # Structured output for AI agents
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Reviews are **context-aware** — Mesrai reads your `.cursorrules`, `claude.md`, and `.mesrai.md` so suggestions follow your team's standards. [More on review modes](#review-modes)
|
|
63
|
+
|
|
64
|
+
### Mesrai Rules
|
|
65
|
+
|
|
66
|
+
Create, update, and inspect the Mesrai Rules that guide Mesrai behavior for your team.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
mesrai rules create --title "Use async/await" --rule "Prefer async/await over raw promises" --repo-id global --severity high --scope file --path "**/*.ts"
|
|
70
|
+
mesrai rules update --uuid <uuid> --repo-id global --severity critical
|
|
71
|
+
mesrai rules view --repo-id global
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`mesrai rules update` requires `--uuid`.
|
|
75
|
+
|
|
76
|
+
Defaults:
|
|
77
|
+
|
|
78
|
+
- `repo-id` defaults to `global`
|
|
79
|
+
- `severity` defaults to `medium`
|
|
80
|
+
- `scope` defaults to `file`
|
|
81
|
+
- `path` is optional (omitted means all files)
|
|
82
|
+
|
|
83
|
+
### PR Suggestions
|
|
84
|
+
|
|
85
|
+
Fetch AI-powered suggestions for open pull requests directly from your terminal.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mesrai pr suggestions --pr-url https://github.com/org/repo/pull/42
|
|
89
|
+
mesrai pr suggestions --pr-number 42 --repo-id <id>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Filter by severity, export as JSON or Markdown, or pipe into an AI agent with `--prompt-only` for automated fixes.
|
|
93
|
+
|
|
94
|
+
### Business Validation (Local Diff vs Task)
|
|
95
|
+
|
|
96
|
+
Run Mesrai business-rules validation directly from your local diff with optional task reference.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Working tree diff (default)
|
|
100
|
+
mesrai pr business-validation
|
|
101
|
+
|
|
102
|
+
# Staged-only with explicit task reference
|
|
103
|
+
mesrai pr business-validation --staged --task-id KC-1441
|
|
104
|
+
|
|
105
|
+
# Branch or files scope
|
|
106
|
+
mesrai pr business-validation --branch main --task-id KC-1441
|
|
107
|
+
mesrai pr business-validation src/service.ts src/use-case.ts --task-id KC-1441
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Decision Memory
|
|
111
|
+
|
|
112
|
+
AI agents make dozens of decisions per session — architecture choices, trade-offs, why approach X was picked over Y. Without a record, that reasoning vanishes when the session ends.
|
|
113
|
+
|
|
114
|
+
Mesrai captures agent decisions into your repo as structured markdown. When you or another agent return to the code, the full context is there.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
mesrai decisions enable # Install hooks + initialize config
|
|
118
|
+
mesrai decisions status # See what's been captured
|
|
119
|
+
mesrai decisions show [name] # View PR or module memory
|
|
120
|
+
mesrai decisions promote # Promote decisions to long-term memory
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Stored in `.mesrai/pr/by-sha/<head-sha>.md` — versioned with your code, readable by humans and agents. [More on decision memory](#decision-memory-1)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Best With AI Agents
|
|
128
|
+
|
|
129
|
+
Mesrai is designed to work **inside AI coding agents**. While you can use it standalone, the real power comes when your agent runs reviews automatically and fixes issues in a loop — no manual intervention needed.
|
|
130
|
+
|
|
131
|
+
**Works with:** Claude Code, Cursor, Windsurf, GitHub Copilot, Gemini CLI, and 20+ more environments.
|
|
132
|
+
|
|
133
|
+
### Install the Skill (recommended)
|
|
134
|
+
|
|
135
|
+
The fastest way to get started. Auto-detects your installed IDEs and sets everything up:
|
|
136
|
+
|
|
137
|
+
macOS/Linux:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
curl -fsSL https://raw.githubusercontent.com/mesraiofficial/cli/main/install.sh | bash
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Windows PowerShell:
|
|
144
|
+
|
|
145
|
+
```powershell
|
|
146
|
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "$tmp = Join-Path $env:TEMP 'mesrai-install.ps1'; Invoke-WebRequest https://raw.githubusercontent.com/mesraiofficial/cli/main/install.ps1 -OutFile $tmp; & $tmp"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This installs the Mesrai CLI globally and deploys the review skill into every supported agent on your machine — Claude Code, Cursor, Windsurf, and others. One command, all environments.
|
|
150
|
+
|
|
151
|
+
### How It Works With Agents
|
|
152
|
+
|
|
153
|
+
Once installed, your AI agent can autonomously:
|
|
154
|
+
|
|
155
|
+
1. **Write code** as usual
|
|
156
|
+
2. **Run `mesrai review --prompt-only`** to analyze changes
|
|
157
|
+
3. **Read the structured output** and understand each issue
|
|
158
|
+
4. **Fix the issues** automatically
|
|
159
|
+
5. **Repeat** until the review is clean
|
|
160
|
+
|
|
161
|
+
This creates a tight feedback loop: the agent writes, reviews, and fixes — all without leaving your IDE.
|
|
162
|
+
|
|
163
|
+
Beyond reviews, Mesrai also captures **what your agent decided and why** via [Decision Memory](#decision-memory). Every reasoning step is saved into your repo — so when you (or another agent) pick up the work later, the full context is already there. No more re-explaining what was done or losing decisions between sessions.
|
|
164
|
+
|
|
165
|
+
### Setup: Claude Code
|
|
166
|
+
|
|
167
|
+
Add to your project's `CLAUDE.md`:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
## Code Review
|
|
171
|
+
|
|
172
|
+
After implementing changes, run `mesrai review --prompt-only` to check for issues.
|
|
173
|
+
If issues are found, fix them and re-run until clean.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Or use the skill directly — after installing via the command above, just ask Claude Code to review your code and it will use Mesrai automatically.
|
|
177
|
+
|
|
178
|
+
### Setup: Cursor / Windsurf
|
|
179
|
+
|
|
180
|
+
Add to your `.cursorrules` or equivalent:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
When writing code:
|
|
184
|
+
1. Implement the feature
|
|
185
|
+
2. Run: mesrai review --prompt-only
|
|
186
|
+
3. If issues are found, fix them automatically
|
|
187
|
+
4. Repeat until review is clean
|
|
188
|
+
5. Show final result
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Setup: Headless / Shared Environments
|
|
192
|
+
|
|
193
|
+
Set a team key so agents and shared machines are authenticated without individual logins:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
export MESRAI_TEAM_KEY=mesrai_xxxxx
|
|
197
|
+
mesrai review --prompt-only
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Works with Codex, CI runners, remote dev environments, and any context where personal login isn't practical. Get your key at [app.mesrai.com/organization/cli-keys](https://app.mesrai.com/organization/cli-keys).
|
|
201
|
+
|
|
202
|
+
### Copy & Paste Workflow (interactive)
|
|
203
|
+
|
|
204
|
+
If you prefer manual control:
|
|
205
|
+
|
|
206
|
+
1. Run `mesrai review`
|
|
207
|
+
2. Navigate to a file with issues
|
|
208
|
+
3. Select **"Copy fix prompt for AI agent"**
|
|
209
|
+
4. Paste into Claude Code or Cursor — the AI fixes it
|
|
210
|
+
|
|
211
|
+
The copied prompt includes file path, line numbers, severity, and detailed suggestions — optimized for AI agents.
|
|
212
|
+
|
|
213
|
+
## Installation
|
|
214
|
+
|
|
215
|
+
### Skill installer (recommended — CLI + all your agents)
|
|
216
|
+
|
|
217
|
+
macOS/Linux:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
curl -fsSL https://raw.githubusercontent.com/mesraiofficial/cli/main/install.sh | bash
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Windows PowerShell:
|
|
224
|
+
|
|
225
|
+
```powershell
|
|
226
|
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "$tmp = Join-Path $env:TEMP 'mesrai-install.ps1'; Invoke-WebRequest https://raw.githubusercontent.com/mesraiofficial/cli/main/install.ps1 -OutFile $tmp; & $tmp"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Installs the CLI and deploys the review skill to all detected agents in one step.
|
|
230
|
+
|
|
231
|
+
### Keep everything updated
|
|
232
|
+
|
|
233
|
+
`mesrai update` updates the CLI package.
|
|
234
|
+
|
|
235
|
+
For end users, the recommended way to refresh skills and agent integrations is:
|
|
236
|
+
|
|
237
|
+
macOS/Linux:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
curl -fsSL https://raw.githubusercontent.com/mesraiofficial/cli/main/install.sh | bash
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Windows PowerShell:
|
|
244
|
+
|
|
245
|
+
```powershell
|
|
246
|
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "$tmp = Join-Path $env:TEMP 'mesrai-install.ps1'; Invoke-WebRequest https://raw.githubusercontent.com/mesraiofficial/cli/main/install.ps1 -OutFile $tmp; & $tmp"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Fallback via CLI for common local agent roots:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
mesrai skills install # install into detected local agent roots
|
|
253
|
+
mesrai skills resync # re-sync/refresh managed skills
|
|
254
|
+
mesrai skills uninstall # remove managed skills from detected targets
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
If you want to inspect the script before execution:
|
|
258
|
+
|
|
259
|
+
macOS/Linux:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
curl -fsSL https://raw.githubusercontent.com/mesraiofficial/cli/main/install.sh -o /tmp/mesrai-install.sh
|
|
263
|
+
less /tmp/mesrai-install.sh
|
|
264
|
+
bash /tmp/mesrai-install.sh
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Windows PowerShell:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest https://raw.githubusercontent.com/mesraiofficial/cli/main/install.ps1 -OutFile install.ps1"
|
|
271
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### CLI only
|
|
275
|
+
|
|
276
|
+
<details>
|
|
277
|
+
<summary><strong>yarn</strong></summary>
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
yarn global add @mesrai/cli
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
</details>
|
|
284
|
+
|
|
285
|
+
<details>
|
|
286
|
+
<summary><strong>npx (no install)</strong></summary>
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
npx @mesrai/cli review
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
</details>
|
|
293
|
+
|
|
294
|
+
<details>
|
|
295
|
+
<summary><strong>curl</strong></summary>
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
curl -fsSL https://raw.githubusercontent.com/mesraiofficial/cli/main/install.sh | bash
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
</details>
|
|
302
|
+
|
|
303
|
+
<details>
|
|
304
|
+
<summary><strong>PowerShell</strong></summary>
|
|
305
|
+
|
|
306
|
+
```powershell
|
|
307
|
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "$tmp = Join-Path $env:TEMP 'mesrai-install.ps1'; Invoke-WebRequest https://raw.githubusercontent.com/mesraiofficial/cli/main/install.ps1 -OutFile $tmp; & $tmp"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
</details>
|
|
311
|
+
|
|
312
|
+
<details>
|
|
313
|
+
<summary><strong>Homebrew (coming soon)</strong></summary>
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
brew install mesrai/tap/mesrai
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
</details>
|
|
320
|
+
|
|
321
|
+
## Agent Mode
|
|
322
|
+
|
|
323
|
+
Mesrai now supports an explicit **agent mode** for deterministic automation output.
|
|
324
|
+
|
|
325
|
+
### Global flag
|
|
326
|
+
|
|
327
|
+
Use `--agent` on any command to return a stable JSON envelope:
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"ok": true,
|
|
332
|
+
"command": "review",
|
|
333
|
+
"data": {},
|
|
334
|
+
"error": null,
|
|
335
|
+
"meta": {
|
|
336
|
+
"schemaVersion": "1.0",
|
|
337
|
+
"cliVersion": "x.y.z",
|
|
338
|
+
"mode": "agent",
|
|
339
|
+
"durationMs": 123
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Command schema introspection
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
mesrai schema
|
|
348
|
+
mesrai schema --command "pr suggestions"
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Field selection for smaller payloads
|
|
352
|
+
|
|
353
|
+
Available on `review` and `pr suggestions`:
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
mesrai review --agent --fields summary,issues.file,issues.line
|
|
357
|
+
mesrai pr suggestions --agent --pr-url https://github.com/org/repo/pull/42 --fields summary,issues.file
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
`--fields` requires `--agent` or `--format json`.
|
|
361
|
+
|
|
362
|
+
### Dry-run for mutable commands
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
mesrai hook install --dry-run
|
|
366
|
+
mesrai hook uninstall --dry-run
|
|
367
|
+
mesrai decisions enable --dry-run
|
|
368
|
+
mesrai decisions disable --dry-run
|
|
369
|
+
mesrai decisions promote --dry-run
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Dry-run prints the planned actions and does not mutate local hooks/config/files.
|
|
373
|
+
|
|
374
|
+
## Review Modes
|
|
375
|
+
|
|
376
|
+
### Interactive (default)
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
mesrai review
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Navigate files with issue counts, preview fixes before applying, and copy AI-friendly prompts to paste into Claude Code or Cursor.
|
|
383
|
+
|
|
384
|
+
### Auto-fix
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
mesrai review --fix
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Applies all fixable issues at once. Shows a confirmation prompt before making changes.
|
|
391
|
+
|
|
392
|
+
### AI Agent
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
mesrai review --prompt-only
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Minimal, structured output designed for Claude Code, Cursor, and Windsurf. Perfect for autonomous generate-review-fix loops.
|
|
399
|
+
|
|
400
|
+
<details>
|
|
401
|
+
<summary><strong>More: output formats & flags</strong></summary>
|
|
402
|
+
|
|
403
|
+
#### Output Formats
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
mesrai review # Interactive (default)
|
|
407
|
+
mesrai review --format json # JSON output
|
|
408
|
+
mesrai review --format markdown # Markdown report
|
|
409
|
+
mesrai review --prompt-only # AI agent output
|
|
410
|
+
mesrai review --format markdown -o report.md # Save to file
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
#### Output Streams
|
|
414
|
+
|
|
415
|
+
- `stdout`: command result/payload (for example JSON/Markdown reports)
|
|
416
|
+
- `stderr`: debug traces (`--verbose`), spinner/progress messages, and errors
|
|
417
|
+
|
|
418
|
+
This keeps machine-readable output clean for piping:
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
mesrai review --format json > review.json
|
|
422
|
+
mesrai review --format json --verbose 1>review.json 2>review.debug.log
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
#### Diff Targets
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
mesrai review # Working tree changes
|
|
429
|
+
mesrai review --staged # Staged files only
|
|
430
|
+
mesrai review --commit HEAD~1 # Specific commit
|
|
431
|
+
mesrai review --branch main # Compare against branch
|
|
432
|
+
mesrai review src/index.ts src/utils.ts # Specific files
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
#### All Flags
|
|
436
|
+
|
|
437
|
+
| Flag | Description |
|
|
438
|
+
| ---------------------- | --------------------------------------------- |
|
|
439
|
+
| `--staged` | Analyze only staged files |
|
|
440
|
+
| `--commit <sha>` | Analyze a specific commit |
|
|
441
|
+
| `--branch <name>` | Compare against a branch |
|
|
442
|
+
| `--rules-only` | Only check configured rules |
|
|
443
|
+
| `--fast` | Faster analysis for large diffs |
|
|
444
|
+
| `--fix` | Auto-apply all fixable issues |
|
|
445
|
+
| `--prompt-only` | AI agent optimized output |
|
|
446
|
+
| `--context <file>` | Include custom context file |
|
|
447
|
+
| `--format <fmt>` | Output format: `terminal`, `json`, `markdown` |
|
|
448
|
+
| `--output <file>` | Save output to file |
|
|
449
|
+
| `--fail-on <severity>` | Exit code 1 if issues meet or exceed severity |
|
|
450
|
+
| `-i, --interactive` | Explicitly enable interactive mode |
|
|
451
|
+
|
|
452
|
+
</details>
|
|
453
|
+
|
|
454
|
+
## Decision Memory
|
|
455
|
+
|
|
456
|
+
Full reference for the decision capture system ([intro above](#decision-memory)).
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Enable with specific agents
|
|
460
|
+
mesrai decisions enable --agents claude,cursor,codex
|
|
461
|
+
|
|
462
|
+
# Custom Codex config path
|
|
463
|
+
mesrai decisions enable --agents codex --codex-config ~/.codex/config.toml
|
|
464
|
+
|
|
465
|
+
# Overwrite existing config
|
|
466
|
+
mesrai decisions enable --force
|
|
467
|
+
|
|
468
|
+
# Check what's been captured on current branch
|
|
469
|
+
mesrai decisions status
|
|
470
|
+
|
|
471
|
+
# View decisions for a PR or specific module
|
|
472
|
+
mesrai decisions show [name]
|
|
473
|
+
|
|
474
|
+
# Promote PR-level decisions to long-term module memory
|
|
475
|
+
mesrai decisions promote --branch feat/auth --modules auth,users
|
|
476
|
+
|
|
477
|
+
# Disable hooks (preserves all captured data in .mesrai/)
|
|
478
|
+
mesrai decisions disable
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
**How it works:** Hooks fire on agent turn-complete events and persist decisions to `.mesrai/pr/by-sha/<head-sha>.md`. Files are committed to your repo, versioned with your code, readable by humans and agents.
|
|
482
|
+
|
|
483
|
+
**Supported agents:** Claude Code, Cursor, Codex.
|
|
484
|
+
|
|
485
|
+
## CI/CD & Git Hooks
|
|
486
|
+
|
|
487
|
+
### Pre-push Hook
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
mesrai hook install --fail-on error # Block pushes with errors
|
|
491
|
+
mesrai hook status # Check hook status
|
|
492
|
+
mesrai hook uninstall # Remove hook
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### Pipeline Usage
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
# Strict rules check with JSON output
|
|
499
|
+
mesrai review --rules-only --format json --fail-on error
|
|
500
|
+
|
|
501
|
+
# Generate markdown report artifact
|
|
502
|
+
mesrai review --format markdown --output review-report.md
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
## Authentication
|
|
506
|
+
|
|
507
|
+
Mesrai supports multiple auth methods depending on your setup:
|
|
508
|
+
|
|
509
|
+
### Trial Mode (no account)
|
|
510
|
+
|
|
511
|
+
Just run `mesrai review`. No signup needed. You get 5 reviews/day with up to 10 files and 500 lines per file — enough to try it out. [Sign up free](https://app.mesrai.com) to remove limits.
|
|
512
|
+
|
|
513
|
+
### Personal Login
|
|
514
|
+
|
|
515
|
+
For individual developers. Creates a session with automatic token refresh.
|
|
516
|
+
|
|
517
|
+
```bash
|
|
518
|
+
mesrai auth login # Sign in with email/password
|
|
519
|
+
mesrai auth status # Check auth status and usage
|
|
520
|
+
mesrai auth logout # Sign out
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Credentials are stored locally in `~/.mesrai/credentials.json`.
|
|
524
|
+
|
|
525
|
+
### Team Key
|
|
526
|
+
|
|
527
|
+
For teams where not everyone needs their own account. A single shared key gives the whole team access — developers just set the key and start reviewing, no individual signup required.
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
mesrai auth team-key --key mesrai_xxxxx
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Or set it as an environment variable:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
export MESRAI_TEAM_KEY=mesrai_xxxxx
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Get your team key at [app.mesrai.com/organization/cli-keys](https://app.mesrai.com/organization/cli-keys). Team keys have configurable device limits managed from the dashboard.
|
|
540
|
+
|
|
541
|
+
This is also the recommended auth method for AI coding agents (Claude Code, Cursor, Codex) — set the env var once and every agent session is authenticated automatically.
|
|
542
|
+
|
|
543
|
+
### Repository Configuration
|
|
544
|
+
|
|
545
|
+
Repository configuration requires team-key auth:
|
|
546
|
+
|
|
547
|
+
- team keys work across `add`, `list`, `show`, `setup`, `set`, and pattern mutations through the CLI config endpoints
|
|
548
|
+
|
|
549
|
+
These commands always read and update the repository's current settings directly. There is no reset-to-default flow in the CLI.
|
|
550
|
+
|
|
551
|
+
`mesrai config -r` and `mesrai config --remote` are shortcuts for `mesrai config remote add`.
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
mesrai config -r . # Shortcut for: mesrai config remote add .
|
|
555
|
+
mesrai config --remote . # Shortcut for: mesrai config remote add .
|
|
556
|
+
mesrai config --remote . --json # Add and print machine-readable result
|
|
557
|
+
mesrai config --remote . --no-prompt # Add without starting setup
|
|
558
|
+
mesrai config remote add . # Add the current repository explicitly
|
|
559
|
+
mesrai config remote show . # Inspect current repository settings
|
|
560
|
+
mesrai config remote setup . # Run guided setup again
|
|
561
|
+
mesrai config remote setup . --json # Print structured setup result
|
|
562
|
+
mesrai config remote set . review.enabled true
|
|
563
|
+
mesrai config remote set . review.enabled true --json
|
|
564
|
+
mesrai config remote set . patterns.ignoreFiles "**/*.lock,dist/**"
|
|
565
|
+
mesrai config remote add-pattern . ignore-files "dist/**"
|
|
566
|
+
mesrai config remote add-ignore-file . "dist/**"
|
|
567
|
+
mesrai config remote remove-base-branch . "release/*"
|
|
568
|
+
mesrai config remote remove-pattern . base-branches "release/*"
|
|
569
|
+
mesrai config remote open . --section suggestion-control
|
|
570
|
+
mesrai config remote list --json
|
|
571
|
+
mesrai config remote list # List repositories already configured
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
When a repository is added from an interactive terminal, Mesrai offers a guided setup for:
|
|
575
|
+
|
|
576
|
+
- automated review
|
|
577
|
+
- auto approve
|
|
578
|
+
- minimum severity level
|
|
579
|
+
- ignored file patterns
|
|
580
|
+
- base branch patterns
|
|
581
|
+
- ignored title patterns
|
|
582
|
+
|
|
583
|
+
Pattern fields accept glob expressions such as `**/*.lock`, `dist/**`, `release/*`, and `draft*`.
|
|
584
|
+
|
|
585
|
+
Use `mesrai config remote open` when you need advanced repository settings that are still web-only. The CLI opens the Mesrai app and prints the repository/section path to navigate.
|
|
586
|
+
|
|
587
|
+
Use `--json` with `show`, `set`, `open`, `add-pattern`, `remove-pattern`, and the pattern aliases when you need stable machine-readable output for scripts or AI agents.
|
|
588
|
+
|
|
589
|
+
When targeting a repository that is different from your current working directory, pass `owner/repo` explicitly instead of `.`:
|
|
590
|
+
|
|
591
|
+
```bash
|
|
592
|
+
mesrai config -r Wellington01/mesrai-extension
|
|
593
|
+
mesrai config remote show Wellington01/mesrai-extension
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
#### Local API note
|
|
597
|
+
|
|
598
|
+
When testing against the local backend with `yarn start:local`, repository configuration works with a team key when the local API exposes:
|
|
599
|
+
|
|
600
|
+
- `GET /cli/config/repositories/available`
|
|
601
|
+
- `GET /cli/config/repositories/selected`
|
|
602
|
+
- `POST /cli/config/repositories`
|
|
603
|
+
- `GET /cli/config/repositories/:repositoryId/settings`
|
|
604
|
+
- `PATCH /cli/config/repositories/:repositoryId/settings`
|
|
605
|
+
|
|
606
|
+
```text
|
|
607
|
+
Repository configuration access denied: ...
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
Example local commands:
|
|
611
|
+
|
|
612
|
+
```bash
|
|
613
|
+
export MESRAI_TEAM_KEY=mesrai_xxxxx
|
|
614
|
+
yarn start:local config -r Wellington01/mesrai-extension --no-prompt
|
|
615
|
+
yarn start:local config remote list --json
|
|
616
|
+
yarn start:local config remote show Wellington01/mesrai-extension
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### CI/CD Token
|
|
620
|
+
|
|
621
|
+
For pipelines and automated environments. Generated from your personal login:
|
|
622
|
+
|
|
623
|
+
```bash
|
|
624
|
+
mesrai auth token # Generate a CI/CD token
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
Then use it in your pipeline:
|
|
628
|
+
|
|
629
|
+
```bash
|
|
630
|
+
export MESRAI_TOKEN=<your-token>
|
|
631
|
+
mesrai review --format json --fail-on error
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
> **Note:** For PR-level reviews in CI/CD, we recommend using the [Mesrai platform](https://app.mesrai.com) GitHub/GitLab integration instead of the CLI. It's purpose-built for PR workflows with inline comments, status checks, and team dashboards.
|
|
635
|
+
|
|
636
|
+
<details>
|
|
637
|
+
<summary><strong>Environment variables</strong></summary>
|
|
638
|
+
|
|
639
|
+
| Variable | Description |
|
|
640
|
+
| ---------------- | ------------------------------------------------------------------------------ |
|
|
641
|
+
| `MESRAI_API_URL` | API endpoint (default: `https://api.mesrai.com`). HTTPS only (except localhost). |
|
|
642
|
+
| `MESRAI_APP_URL` | Optional Mesrai app URL override for `mesrai config remote open`. |
|
|
643
|
+
| `MESRAI_TOKEN` | CI/CD token for automated pipelines (generated via `mesrai auth token`) |
|
|
644
|
+
| `MESRAI_TEAM_KEY` | Team key for shared team access and AI coding agents |
|
|
645
|
+
|
|
646
|
+
</details>
|
|
647
|
+
|
|
648
|
+
## Privacy & Security
|
|
649
|
+
|
|
650
|
+
Mesrai sends your code diffs to the Mesrai API for analysis. We take this seriously:
|
|
651
|
+
|
|
652
|
+
- **HTTPS only** — All API communication is encrypted. Custom API URLs are validated.
|
|
653
|
+
- **No training on your code** — Your code is not used to train models.
|
|
654
|
+
- **Minimal data** — Only diffs and context files are sent, not your entire codebase.
|
|
655
|
+
- **Credentials stored locally** — Auth tokens are kept in `~/.mesrai/credentials.json` on your machine.
|
|
656
|
+
|
|
657
|
+
## Contributing
|
|
658
|
+
|
|
659
|
+
We welcome contributions! Please see our [issues page](https://github.com/mesraiofficial/cli/issues) to get started.
|
|
660
|
+
|
|
661
|
+
```bash
|
|
662
|
+
yarn install # Install dependencies
|
|
663
|
+
yarn build # Build
|
|
664
|
+
yarn dev # Watch mode
|
|
665
|
+
yarn test # Run tests
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
## License
|
|
669
|
+
|
|
670
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { LifecycleEvent, AgentType, TokenUsage, TranscriptParseResult } from '../types/session.js';
|
|
2
|
+
/**
|
|
3
|
+
* Base interface for agent adapters.
|
|
4
|
+
* Each supported agent (Claude Code, Cursor, Codex) implements this
|
|
5
|
+
* to normalize hook payloads into LifecycleEvents.
|
|
6
|
+
*/
|
|
7
|
+
export interface AgentAdapter {
|
|
8
|
+
readonly agentType: AgentType;
|
|
9
|
+
/**
|
|
10
|
+
* Parse a raw hook payload into a normalized LifecycleEvent.
|
|
11
|
+
*/
|
|
12
|
+
parseHookEvent(hookName: string, payload: unknown): LifecycleEvent | null;
|
|
13
|
+
/**
|
|
14
|
+
* Read and parse the agent's transcript file.
|
|
15
|
+
* @param transcriptPath Path to the transcript file.
|
|
16
|
+
* @param fromOffset Start parsing from this byte offset (for incremental).
|
|
17
|
+
*/
|
|
18
|
+
readTranscript(transcriptPath: string, fromOffset?: number): Promise<TranscriptParseResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Extract prompts from a parsed transcript.
|
|
21
|
+
*/
|
|
22
|
+
extractPrompts(transcriptPath: string): Promise<string[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Extract the last assistant message as a summary.
|
|
25
|
+
*/
|
|
26
|
+
extractSummary(transcriptPath: string): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Extract modified files from tool_use blocks in the transcript.
|
|
29
|
+
*/
|
|
30
|
+
extractModifiedFiles(transcriptPath: string): Promise<string[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Calculate token usage from assistant messages in the transcript.
|
|
33
|
+
*/
|
|
34
|
+
calculateTokenUsage(transcriptPath: string): Promise<TokenUsage>;
|
|
35
|
+
/**
|
|
36
|
+
* Wait for the transcript to be flushed to disk after the agent finishes.
|
|
37
|
+
* Uses a sentinel detection approach (polling for no new writes).
|
|
38
|
+
*/
|
|
39
|
+
waitForTranscriptFlush(transcriptPath: string, timeoutMs?: number): Promise<boolean>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=agent.interface.d.ts.map
|