@fbincon/claude-code-statusline 0.0.0-stage → 3.0.0
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/LICENSE +21 -0
- package/LICENSE-Unicode.txt +39 -0
- package/LICENSE-Wcwidth.txt +27 -0
- package/README.md +420 -2
- package/bin/claude-statusline.js +2 -0
- package/candidate.json +1244 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.d.ts +35 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js +228 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js +72 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js +140 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js +101 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js +96 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js +80 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.d.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js +99 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.d.ts +30 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js +134 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js +89 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.js +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.js +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js +67 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js +40 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js +63 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js +153 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.d.ts +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js +142 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js +91 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.d.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js +109 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.d.ts +60 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js +12 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js +234 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.d.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js +41 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.d.ts +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js +92 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.d.ts +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js +91 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js +94 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.d.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.d.ts +22 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js +197 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.d.ts +7 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js +134 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.d.ts +58 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js +144 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.d.ts +5 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js +125 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js +55 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js +95 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js +48 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.d.ts +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js +162 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.d.ts +37 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js +75 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.d.ts +9 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js +241 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js +69 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.d.ts +16 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js +90 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.d.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js +80 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js +40 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.d.ts +5 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js +59 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.d.ts +17 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js +69 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.d.ts +17 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js +70 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.d.ts +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js +75 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.d.ts +33 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js +227 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +144 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/package.json +17 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-config/SKILL.md +80 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-configure/SKILL.md +19 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +37 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/hooks.json +6 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +820 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +503 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/forms.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +198 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/messages.ts +101 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +218 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/appearance.ts +29 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +254 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts +167 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/guidance.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/import-review.ts +55 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/instances.ts +30 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/navigation.ts +98 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/numeric.ts +42 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/search.ts +114 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +276 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-unicode.ts +92 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +6842 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/index.ts +40 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/messages.ts +33 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/presentation.ts +62 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/launch.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preferences.ts +61 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preview-preferences.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/session.ts +124 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/unicode.ts +121 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +47 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/draw.ts +159 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/help.ts +84 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/surface.ts +89 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/catalog.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/preview.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/section.ts +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/shortcuts.ts +83 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/layout.ts +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/styled-text.ts +56 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/text.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/theme.ts +27 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/hooks.json +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/observe.ts +279 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/checklists.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/costs.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/generated-contracts.ts +18 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/identity.ts +14 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/launch.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/queue.ts +68 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/streams.ts +28 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/timing.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.d.ts +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js +72 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.d.ts +86 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js +3462 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js +17 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js +232 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js +48 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js +104 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.d.ts +11 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js +99 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js +80 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.d.ts +29 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js +159 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js +34 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.d.ts +15 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js +55 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.d.ts +33 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +663 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +401 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +251 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.d.ts +26 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js +146 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js +17 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.d.ts +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js +53 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.d.ts +37 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.d.ts +11 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.d.ts +22 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js +122 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js +30 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +6841 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +6841 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.d.ts +16 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js +38 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js +31 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.js +137 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.js +56 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.js +165 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.js +47 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.d.ts +21 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js +105 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.js +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js +50 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js +49 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js +58 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js +34 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.d.ts +49 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +399 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.d.ts +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js +176 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js +29 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js +93 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js +46 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.d.ts +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js +76 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.d.ts +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +98 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.d.ts +67 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js +116 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +305 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js +33 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js +52 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js +115 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js +104 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.d.ts +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js +196 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js +45 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js +228 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js +145 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js +70 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js +110 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js +75 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js +121 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.d.ts +43 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js +198 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js +192 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.d.ts +16 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js +245 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js +28 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.d.ts +26 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js +183 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.d.ts +64 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js +263 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js +103 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js +50 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.d.ts +22 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js +75 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.d.ts +12 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js +93 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js +178 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/package.json +8 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/languages.json +7 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-Hant.json +1367 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.d.ts +15 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js +22 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.d.ts +4 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js +102 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.d.ts +16 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.js +18 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.d.ts +12 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.js +160 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.d.ts +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.js +19 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.d.ts +8 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.js +164 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.js +5 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.js +14 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.d.ts +12 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.js +21 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js +31 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.d.ts +15 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.js +36 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.d.ts +17 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js +44 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.d.ts +4 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js +48 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js +67 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.d.ts +42 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js +180 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.d.ts +11 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js +81 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.d.ts +32 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js +157 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.d.ts +18 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js +150 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.d.ts +6 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js +39 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.d.ts +5 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js +82 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/package.json +8 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.d.ts +14 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +230 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.d.ts +30 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.js +34 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.d.ts +28 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js +126 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +52 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js +352 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.d.ts +7 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.js +5 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/package.json +16 -0
- package/node_modules/@koromix/koffi-darwin-arm64/README.md +6 -0
- package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-arm64/index.js +1 -0
- package/node_modules/@koromix/koffi-darwin-arm64/package.json +24 -0
- package/node_modules/@koromix/koffi-darwin-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-x64/index.js +1 -0
- package/node_modules/@koromix/koffi-darwin-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-linux-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-linux-x64/index.js +198 -0
- package/node_modules/@koromix/koffi-linux-x64/linux_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-linux-x64/musl_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-linux-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-win32-x64/index.js +1 -0
- package/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
- package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
- package/node_modules/koffi/LICENSE.txt +22 -0
- package/node_modules/koffi/README.md +46 -0
- package/node_modules/koffi/index.cjs +1 -0
- package/node_modules/koffi/index.d.ts +390 -0
- package/node_modules/koffi/index.js +2 -0
- package/node_modules/koffi/indirect.cjs +1 -0
- package/node_modules/koffi/indirect.js +2 -0
- package/node_modules/koffi/package.json +73 -0
- package/node_modules/koffi/src/koffi/index.cjs +327 -0
- package/node_modules/koffi/src/koffi/index.js +312 -0
- package/node_modules/koffi/src/koffi/indirect.cjs +326 -0
- package/node_modules/koffi/src/koffi/indirect.js +311 -0
- package/node_modules/koffi/src/koffi/src/static.cjs +170 -0
- package/node_modules/koffi/src/koffi/src/static.js +173 -0
- package/node_modules/lossless-json/LICENSE.md +9 -0
- package/node_modules/lossless-json/README.md +549 -0
- package/node_modules/lossless-json/lib/esm/LosslessNumber.js +92 -0
- package/node_modules/lossless-json/lib/esm/LosslessNumber.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/config.js +9 -0
- package/node_modules/lossless-json/lib/esm/config.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/index.js +9 -0
- package/node_modules/lossless-json/lib/esm/index.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/numberParsers.js +9 -0
- package/node_modules/lossless-json/lib/esm/numberParsers.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/package.json +3 -0
- package/node_modules/lossless-json/lib/esm/parse.js +346 -0
- package/node_modules/lossless-json/lib/esm/parse.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/revive.js +57 -0
- package/node_modules/lossless-json/lib/esm/revive.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/reviveDate.js +10 -0
- package/node_modules/lossless-json/lib/esm/reviveDate.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/stringify.js +166 -0
- package/node_modules/lossless-json/lib/esm/stringify.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/types.js +2 -0
- package/node_modules/lossless-json/lib/esm/types.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/utils.js +236 -0
- package/node_modules/lossless-json/lib/esm/utils.js.map +1 -0
- package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts +40 -0
- package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/config.d.ts +13 -0
- package/node_modules/lossless-json/lib/types/config.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/index.d.ts +9 -0
- package/node_modules/lossless-json/lib/types/index.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/numberParsers.d.ts +4 -0
- package/node_modules/lossless-json/lib/types/numberParsers.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/parse.d.ts +33 -0
- package/node_modules/lossless-json/lib/types/parse.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/revive.d.ts +13 -0
- package/node_modules/lossless-json/lib/types/revive.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/reviveDate.d.ts +5 -0
- package/node_modules/lossless-json/lib/types/reviveDate.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/stringify.d.ts +37 -0
- package/node_modules/lossless-json/lib/types/stringify.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/types.d.ts +61 -0
- package/node_modules/lossless-json/lib/types/types.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/utils.d.ts +79 -0
- package/node_modules/lossless-json/lib/types/utils.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/umd/lossless-json.js +1 -0
- package/node_modules/lossless-json/lib/umd/lossless-json.js.map +1 -0
- package/node_modules/lossless-json/lib/umd/package.json +3 -0
- package/node_modules/lossless-json/package.json +89 -0
- package/package.json +57 -4
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { commandFor } from '@fbincon/statusline-platform/commands';
|
|
3
|
+
import { clone, object, fail } from '@fbincon/statusline-core/config/validation';
|
|
4
|
+
import { safeInteger } from '@fbincon/statusline-core/json';
|
|
5
|
+
import { HOOKS, SUBAGENT_HOOKS, SKILL, EXTERNAL } from './model.js';
|
|
6
|
+
import { owns, legacy } from './ownership.js';
|
|
7
|
+
export function cleanHooks(groups, context, operations = ['hook'], removeLegacy = false) {
|
|
8
|
+
if (groups == null)
|
|
9
|
+
return [];
|
|
10
|
+
if (!Array.isArray(groups))
|
|
11
|
+
fail('errors.install_plan.each_configured_hook_event_must_contain_a');
|
|
12
|
+
return groups.flatMap(group => {
|
|
13
|
+
if (!object(group) || !Array.isArray(group.hooks))
|
|
14
|
+
return [clone(group)];
|
|
15
|
+
const hooks = group.hooks.filter(action => {
|
|
16
|
+
const command = object(action) ? action.command : null;
|
|
17
|
+
return !operations.some(op => owns(command, op, context.launch, context.previous)) && !(removeLegacy && legacy(command, join(context.directory, 'turn_state.py')));
|
|
18
|
+
});
|
|
19
|
+
return hooks.length ? [{ ...clone(group), hooks: clone(hooks) }] : [];
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function settingsPlan(settings, context, uninstall = false) {
|
|
23
|
+
const updated = clone(settings);
|
|
24
|
+
for (const [key, operation] of [['statusLine', 'render'], ['subagentStatusLine', 'render-subagents']]) {
|
|
25
|
+
const current = updated[key], command = object(current) ? current.command : null, owned = owns(command, operation, context.launch, context.previous);
|
|
26
|
+
if (uninstall) {
|
|
27
|
+
if (owned)
|
|
28
|
+
delete updated[key];
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (key === 'subagentStatusLine' && (!context.subagents || !context.rows)) {
|
|
32
|
+
if (owned)
|
|
33
|
+
delete updated[key];
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (current != null && !owned && !(key === 'statusLine' && legacy(command, join(context.directory, 'statusline.py'))) && !context.force)
|
|
37
|
+
fail(key === 'statusLine' ? 'errors.install_plan.an_unrelated_statusline_is_already_configured_rerun' : 'errors.install_plan.an_unrelated_subagentstatusline_is_already_configured_choose');
|
|
38
|
+
const desired = { type: 'command', command: commandFor(context.launch, operation) };
|
|
39
|
+
if (key === 'statusLine') {
|
|
40
|
+
if (!object(current))
|
|
41
|
+
desired.refreshInterval = 1;
|
|
42
|
+
else {
|
|
43
|
+
for (const [field, maximum] of [['padding', 32], ['refreshInterval', 3600]]) {
|
|
44
|
+
try {
|
|
45
|
+
desired[field] = safeInteger(current[field], 1, maximum);
|
|
46
|
+
}
|
|
47
|
+
catch { /* Invalid optional host values are omitted. */ }
|
|
48
|
+
}
|
|
49
|
+
if (current.hideVimModeIndicator === true)
|
|
50
|
+
desired.hideVimModeIndicator = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
updated[key] = desired;
|
|
54
|
+
}
|
|
55
|
+
if (uninstall) {
|
|
56
|
+
if (object(updated.hooks)) {
|
|
57
|
+
const hooks = Object.fromEntries(Object.entries(updated.hooks).map(([event, groups]) => [event, cleanHooks(groups, context, ['hook', 'slash-hook'])]).filter(([, groups]) => groups.length));
|
|
58
|
+
if (Object.keys(hooks).length)
|
|
59
|
+
updated.hooks = hooks;
|
|
60
|
+
else
|
|
61
|
+
delete updated.hooks;
|
|
62
|
+
}
|
|
63
|
+
return updated;
|
|
64
|
+
}
|
|
65
|
+
if (updated.hooks != null && !object(updated.hooks))
|
|
66
|
+
fail('errors.install_plan.the_hooks_setting_must_contain_a_json');
|
|
67
|
+
const hooks = (updated.hooks ?? {});
|
|
68
|
+
const action = { type: 'command', command: commandFor(context.launch, 'hook'), timeout: 5 };
|
|
69
|
+
for (const event of HOOKS)
|
|
70
|
+
hooks[event] = [...cleanHooks(hooks[event], context, ['hook'], true), { hooks: [action] }];
|
|
71
|
+
for (const event of SUBAGENT_HOOKS) {
|
|
72
|
+
const groups = cleanHooks(hooks[event], context);
|
|
73
|
+
if (context.subagents)
|
|
74
|
+
groups.push({ hooks: [action] });
|
|
75
|
+
if (groups.length)
|
|
76
|
+
hooks[event] = groups;
|
|
77
|
+
else
|
|
78
|
+
delete hooks[event];
|
|
79
|
+
}
|
|
80
|
+
const slash = cleanHooks(hooks.UserPromptExpansion, context, ['slash-hook']);
|
|
81
|
+
for (const [enabled, matcher, timeout] of [[context.fast, SKILL, 5], [context.external, EXTERNAL, 600]]) {
|
|
82
|
+
if (enabled)
|
|
83
|
+
slash.push({ matcher, hooks: [{ type: 'command', command: commandFor(context.launch, 'slash-hook'), timeout }] });
|
|
84
|
+
}
|
|
85
|
+
if (slash.length)
|
|
86
|
+
hooks.UserPromptExpansion = slash;
|
|
87
|
+
else
|
|
88
|
+
delete hooks.UserPromptExpansion;
|
|
89
|
+
updated.hooks = hooks;
|
|
90
|
+
return updated;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/integration/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,E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OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,mBAAmB,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAC7E,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAU,EAAE,CAAC;QAC/G,IAAI,OAAO;YACP,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1H,CAAC;IACD,IAAI,KAAK,CAAC,MAAM;QACZ,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC;;QAElC,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACrC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
|
|
2
|
+
import { type ModSpec } from './model.js';
|
|
3
|
+
export declare const digest: (value: Buffer | string) => string;
|
|
4
|
+
export declare function wizardGroups(): string;
|
|
5
|
+
export declare function renderSkill(launch: LaunchSpec, external?: boolean): Buffer;
|
|
6
|
+
export interface Inventory {
|
|
7
|
+
schema_version: 1;
|
|
8
|
+
backend_version: string;
|
|
9
|
+
mod_version: string;
|
|
10
|
+
protocol_version: number;
|
|
11
|
+
files: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export interface Bundle {
|
|
14
|
+
files: Map<string, Buffer>;
|
|
15
|
+
inventory: Inventory;
|
|
16
|
+
}
|
|
17
|
+
export declare function inventory(files: ReadonlyMap<string, Buffer>, spec: ModSpec): Inventory;
|
|
18
|
+
export declare function sourceFiles(root: string): Map<string, Buffer>;
|
|
19
|
+
export declare function bundledFiles(spec: ModSpec): Bundle;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { join, relative } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
5
|
+
import { quoteArgument } from '@fbincon/statusline-platform/commands';
|
|
6
|
+
import { isLinkOrReparse } from '@fbincon/statusline-platform/files';
|
|
7
|
+
import { BY_SCOPE } from '@fbincon/statusline-core/config/catalog';
|
|
8
|
+
import { LANGUAGES, LANGUAGE_NAMES } from '@fbincon/statusline-core/i18n/registry';
|
|
9
|
+
import { jsonBytes } from '../config/storage.js';
|
|
10
|
+
import { safeTarget } from './transaction.js';
|
|
11
|
+
import { SKILL, EXTERNAL, VERSION } from './model.js';
|
|
12
|
+
const resourceRoot = fileURLToPath(new URL('../../../resources/', import.meta.url));
|
|
13
|
+
export const digest = (value) => createHash('sha256').update(value).digest('hex');
|
|
14
|
+
export function wizardGroups() {
|
|
15
|
+
const lines = [];
|
|
16
|
+
for (const [scope, label] of [['main', 'Main'], ['subagent', 'Subagents']]) {
|
|
17
|
+
const items = [...BY_SCOPE[scope].values()].filter(item => !['text', 'spacer'].includes(item.id));
|
|
18
|
+
for (const group of new Set(items.map(item => item.group)))
|
|
19
|
+
lines.push(` - ${label} / ${group}: ` + items.filter(item => item.group === group).map(item => '`' + item.id + '`').join(', '));
|
|
20
|
+
}
|
|
21
|
+
lines.push(' Use default_enabled, format_options and excludes from the live listings; do not infer defaults from this grouping.');
|
|
22
|
+
return lines.join('\n');
|
|
23
|
+
}
|
|
24
|
+
export function renderSkill(launch, external = false) {
|
|
25
|
+
let template = fs.readFileSync(join(resourceRoot, external ? EXTERNAL : SKILL, 'SKILL.md'), 'utf8');
|
|
26
|
+
const token = /__CLAUDE_STATUSLINE_([A-Z_]+)__/gu;
|
|
27
|
+
if (template.replace(token, '').includes('__CLAUDE_STATUSLINE_') || external && template.includes('__CLAUDE_STATUSLINE_'))
|
|
28
|
+
throw new Error('Unresolved bundled skill placeholder');
|
|
29
|
+
if (!external) {
|
|
30
|
+
const bash = [launch.executable, ...launch.args].map(quoteArgument).join(' ');
|
|
31
|
+
const powershell = '& ' + [launch.executable, ...launch.args].map(value => "'" + value.replaceAll("'", "''") + "'").join(' ');
|
|
32
|
+
const command = process.platform === 'win32' ? powershell : bash;
|
|
33
|
+
const rules = [`Bash(${bash} config *)`];
|
|
34
|
+
if (process.platform === 'win32')
|
|
35
|
+
rules.push(`PowerShell(${powershell} config *)`);
|
|
36
|
+
const replacements = { ALLOWED_RULES: rules.map(rule => ' - ' + JSON.stringify(rule)).join('\n'), COMMAND: command, ITEM_GROUPS: wizardGroups(), LANGUAGES: LANGUAGES.map(code => `${code} (${LANGUAGE_NAMES[code]})`).join(', '), LANGUAGE_CHOICES: LANGUAGES.join('|') };
|
|
37
|
+
// Insert argv literally in one pass: replacement-string $&, $` and $'
|
|
38
|
+
// syntax, or a placeholder-looking path, must never expand as a template.
|
|
39
|
+
template = template.replace(token, (_match, key) => {
|
|
40
|
+
if (!Object.hasOwn(replacements, key))
|
|
41
|
+
throw new Error('Unresolved bundled skill placeholder');
|
|
42
|
+
return replacements[key];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return Buffer.from(template);
|
|
46
|
+
}
|
|
47
|
+
export function inventory(files, spec) {
|
|
48
|
+
const manifest = JSON.parse(files.get('.claude-plugin/plugin.json').toString('utf8'));
|
|
49
|
+
if (manifest.name !== spec.name || manifest.version !== VERSION)
|
|
50
|
+
throw new Error('Bundled Mod/backend identity or version mismatch');
|
|
51
|
+
return { schema_version: 1, backend_version: VERSION, mod_version: VERSION, protocol_version: spec.protocol, files: Object.fromEntries([...files].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([name, raw]) => [name, digest(raw)])) };
|
|
52
|
+
}
|
|
53
|
+
export function sourceFiles(root) {
|
|
54
|
+
const names = new Set(['.claude-plugin/plugin.json', 'hooks/hooks.json']);
|
|
55
|
+
function walk(path) {
|
|
56
|
+
if (isLinkOrReparse(path))
|
|
57
|
+
throw new Error('Bundled Mod contains a link or reparse point');
|
|
58
|
+
for (const entry of fs.readdirSync(path, { withFileTypes: true })) {
|
|
59
|
+
const target = join(path, entry.name);
|
|
60
|
+
safeTarget(root, target);
|
|
61
|
+
if (entry.isDirectory())
|
|
62
|
+
walk(target);
|
|
63
|
+
else if (entry.isFile() && entry.name.endsWith('.ts'))
|
|
64
|
+
names.add(relative(root, target).replaceAll('\\', '/'));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
for (const directory of ['hooks', 'lib', 'ui'])
|
|
68
|
+
if (fs.existsSync(join(root, directory)))
|
|
69
|
+
walk(join(root, directory));
|
|
70
|
+
return new Map([...names].sort().map(name => { const path = join(root, name); safeTarget(root, path); return [name, fs.readFileSync(path)]; }));
|
|
71
|
+
}
|
|
72
|
+
export function bundledFiles(spec) {
|
|
73
|
+
const root = join(resourceRoot, spec.name), path = join(root, 'resource-manifest.json');
|
|
74
|
+
let files, record;
|
|
75
|
+
if (fs.existsSync(path)) {
|
|
76
|
+
record = JSON.parse(fs.readFileSync(path, 'utf8'));
|
|
77
|
+
files = new Map(Object.keys(record.files).map(name => { safeTarget(root, join(root, name)); return [name, fs.readFileSync(join(root, name))]; }));
|
|
78
|
+
if (JSON.stringify(record) !== JSON.stringify(inventory(files, spec)))
|
|
79
|
+
throw new Error('Bundled resource inventory does not match');
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
const checkout = fileURLToPath(new URL('../../../../../', import.meta.url));
|
|
83
|
+
if (!fs.existsSync(join(checkout, 'tsconfig.tools.json')))
|
|
84
|
+
throw new Error('Bundled resources are missing; reinstall the package');
|
|
85
|
+
files = sourceFiles(join(checkout, 'mods', spec.name));
|
|
86
|
+
record = inventory(files, spec);
|
|
87
|
+
}
|
|
88
|
+
files.set('resource-manifest.json', jsonBytes(record));
|
|
89
|
+
return { files, inventory: record };
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/integration/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAgB,MAAM,YAAY,CAAC;AACpE,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,qBAAqB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAsB,EAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3G,MAAM,UAAU,YAAY;IACxB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAA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C,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;YACrD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC5E,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACvD,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,wBAAwB,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type LocalizedText } from '@fbincon/statusline-core/i18n/messages';
|
|
2
|
+
import type { CliEnvironment } from '../main.js';
|
|
3
|
+
export declare function safeErrorReason(message: unknown): string | LocalizedText;
|
|
4
|
+
export declare function experimentalReason(result: unknown): string | LocalizedText;
|
|
5
|
+
export declare function handlePayload(data: unknown, environment?: CliEnvironment): Promise<string | null>;
|
|
6
|
+
export declare function slashHook(read: () => string | Uint8Array, environment?: CliEnvironment): Promise<string>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { VERSION } from '@fbincon/statusline-core/release';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { object } from '@fbincon/statusline-core/runtime/values';
|
|
4
|
+
import { trim } from '@fbincon/statusline-core/runtime/transcript';
|
|
5
|
+
import { pythonJson } from '@fbincon/statusline-core/json-text';
|
|
6
|
+
import { ConfigError } from '@fbincon/statusline-core/config/validation';
|
|
7
|
+
import { text, renderMessage } from '@fbincon/statusline-core/i18n/messages';
|
|
8
|
+
import { detectClaudeVersion } from '@fbincon/statusline-platform/commands';
|
|
9
|
+
import { errorDescription } from '@fbincon/statusline-platform/errors';
|
|
10
|
+
import { ConfigurationService, atLeast } from '../config/service.js';
|
|
11
|
+
import { createStorage } from '../config/storage.js';
|
|
12
|
+
import { loadFeature } from '../config/backend-preferences.js';
|
|
13
|
+
import { readPreferences } from '../config/preferences.js';
|
|
14
|
+
import { executeConfig, parseSlashArguments } from '../config/commands.js';
|
|
15
|
+
import { ArgumentError } from '../config/arguments.js';
|
|
16
|
+
import { configDirectory, renderInput } from '../rendering/main.js';
|
|
17
|
+
import { localizedError } from '../errors.js';
|
|
18
|
+
import { UNAVAILABLE_MESSAGE } from './editor.js';
|
|
19
|
+
const cut = (value, length) => [...value].slice(0, length).join('');
|
|
20
|
+
export function safeErrorReason(message) {
|
|
21
|
+
if (typeof message !== 'string')
|
|
22
|
+
return 'Interactive status line configuration failed.';
|
|
23
|
+
if (message === UNAVAILABLE_MESSAGE)
|
|
24
|
+
return text('slash.unavailable');
|
|
25
|
+
return cut(message.split(/\r\n|[\n\r\v\f\x1c-\x1e\x85\u2028\u2029]/u).map(trim).find(Boolean) ?? 'Interactive status line configuration failed.', 500);
|
|
26
|
+
}
|
|
27
|
+
export function experimentalReason(result) {
|
|
28
|
+
const row = object(result) ? result : {}, outcome = row.outcome;
|
|
29
|
+
const fixed = { 'already-current': 'ui.session.status_line_configuration_already_current', cancelled: 'ui.session.status_line_configuration_unchanged', interrupted: 'ui.session.interactive_status_line_configuration_interrupted_no_changes', 'timed-out': 'ui.session.interactive_status_line_configuration_timed_out_no' };
|
|
30
|
+
if (outcome === 'updated' && typeof row.message === 'string')
|
|
31
|
+
return cut(row.message, 2000);
|
|
32
|
+
return typeof outcome === 'string' && Object.hasOwn(fixed, outcome) ? text(fixed[outcome]) : safeErrorReason(row.message);
|
|
33
|
+
}
|
|
34
|
+
export async function handlePayload(data, environment = {}) {
|
|
35
|
+
if (!object(data) || data.hook_event_name !== 'UserPromptExpansion' || data.expansion_type !== 'slash_command' || !['statusline-config', 'statusline-configure'].includes(data.command_name))
|
|
36
|
+
return null;
|
|
37
|
+
const configDir = configDirectory(environment.configDir), io = createStorage(environment.now);
|
|
38
|
+
const decision = (reason) => pythonJson({ decision: 'block', reason: renderMessage(reason, readPreferences(configDir, io).ui_language) }, { ensureAscii: false, compact: true });
|
|
39
|
+
const commandArgs = data.command_args ?? '', experimental = data.command_name === 'statusline-configure';
|
|
40
|
+
if (typeof commandArgs !== 'string')
|
|
41
|
+
return decision(text(experimental ? 'slash.tui_invalid_arguments' : 'slash.invalid_arguments'));
|
|
42
|
+
const args = trim(commandArgs);
|
|
43
|
+
if (!experimental && !args)
|
|
44
|
+
return null;
|
|
45
|
+
if (['help', '--help', '-h'].includes(args))
|
|
46
|
+
return decision(text(experimental ? 'slash.tui_usage' : 'slash.config_usage'));
|
|
47
|
+
const launch = () => environment.launch ?? { executable: process.execPath, args: [fileURLToPath(new URL('../entry.js', import.meta.url))] };
|
|
48
|
+
if (!experimental) {
|
|
49
|
+
let message;
|
|
50
|
+
try {
|
|
51
|
+
const parsed = parseSlashArguments(commandArgs), service = new ConfigurationService({ configDir, launch: launch(), hostVersion: environment.hostVersion ?? detectClaudeVersion }, io);
|
|
52
|
+
message = executeConfig(parsed, service, readPreferences(configDir, io).ui_language, environment.nextId);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (!(error instanceof ConfigError || error instanceof ArgumentError))
|
|
56
|
+
throw error;
|
|
57
|
+
message = text('slash.config_unchanged', { detail: error instanceof ConfigError ? localizedError(error) : error.message });
|
|
58
|
+
}
|
|
59
|
+
return decision(message);
|
|
60
|
+
}
|
|
61
|
+
if (args)
|
|
62
|
+
return decision(text('slash.tui_unsupported', { arguments: cut(args, 200) }));
|
|
63
|
+
try {
|
|
64
|
+
let enabled;
|
|
65
|
+
try {
|
|
66
|
+
enabled = loadFeature(configDir, VERSION, io);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
if (!(error instanceof ConfigError))
|
|
70
|
+
throw error;
|
|
71
|
+
return decision(text('slash.tui_preference_invalid', { detail: localizedError(error) }));
|
|
72
|
+
}
|
|
73
|
+
if (!enabled)
|
|
74
|
+
return decision(text('slash.tui_disabled'));
|
|
75
|
+
if (!atLeast((environment.hostVersion ?? detectClaudeVersion)(), [2, 1, 258]))
|
|
76
|
+
return decision(text('slash.tui_suspended'));
|
|
77
|
+
const editor = environment.editor ?? (await import('./launcher.js')).launchEditor;
|
|
78
|
+
const result = await editor({ configDir, backend: launch(), cwd: data.cwd });
|
|
79
|
+
return decision(experimentalReason(result));
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
return decision(safeErrorReason('Interactive status line configuration failed: ' + errorDescription(error)));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export async function slashHook(read, environment = {}) {
|
|
86
|
+
try {
|
|
87
|
+
const result = await handlePayload(renderInput(read), environment);
|
|
88
|
+
return result === null ? '' : result + '\n';
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return '';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=slash-hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-hook.js","sourceRoot":"","sources":["../../../src/integration/slash-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,6CAA6C,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAsB,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,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AAM,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC;QAClF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC7E,OAAO,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACX,OAAO,QAAQ,CAAC,eAAe,CAAC,gDAAgD,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjH,CAAC;AACL,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAA+B,EAAE,cAA8B,EAAE;IAC7F,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;QACnE,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;IAChD,CAAC;IACD,MAAM,CAAC;QACH,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/integration/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
|
|
2
|
+
import type { RuntimeContext } from './runtime/context.js';
|
|
3
|
+
import type { EditorLauncher } from './integration/editor.js';
|
|
4
|
+
import type { RenderEnvironment } from '@fbincon/statusline-core/rendering/context';
|
|
5
|
+
export interface CliEnvironment {
|
|
6
|
+
configDir?: string;
|
|
7
|
+
launch?: LaunchSpec;
|
|
8
|
+
hostVersion?: () => readonly number[] | null;
|
|
9
|
+
now?: () => Date;
|
|
10
|
+
nextId?: () => string;
|
|
11
|
+
stdin?: () => string;
|
|
12
|
+
stdout?: (text: string) => void;
|
|
13
|
+
stderr?: (text: string) => void;
|
|
14
|
+
runtime?: RuntimeContext;
|
|
15
|
+
editor?: EditorLauncher;
|
|
16
|
+
renderObservations?: Partial<RenderEnvironment>;
|
|
17
|
+
installation?: {
|
|
18
|
+
io?: import('./config/storage.js').Storage;
|
|
19
|
+
host?: (spec: import('./integration/model.js').ModSpec) => import('./integration/model.js').Host;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare function main(argv?: readonly string[], environment?: CliEnvironment): Promise<number>;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { VERSION } from '@fbincon/statusline-core/release';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { decodeUtf8 } from '@fbincon/statusline-platform/utf8';
|
|
6
|
+
import { errorDescription } from '@fbincon/statusline-platform/errors';
|
|
7
|
+
export async function main(argv = process.argv.slice(2), environment = {}) {
|
|
8
|
+
const stdout = environment.stdout ?? (text => { process.stdout.write(text); });
|
|
9
|
+
const stderr = environment.stderr ?? (text => { process.stderr.write(text); });
|
|
10
|
+
const stdin = environment.stdin ?? (() => decodeUtf8(readFileSync(0)));
|
|
11
|
+
const args = [...argv];
|
|
12
|
+
if (args.length === 1 && args[0] === '--version') {
|
|
13
|
+
stdout(`claude-statusline ${VERSION}\n`);
|
|
14
|
+
return 0;
|
|
15
|
+
}
|
|
16
|
+
if (args.length === 1 && args[0] === 'hook') {
|
|
17
|
+
const [{ hook }, { runtimeContext }] = await Promise.all([import('./runtime/hook.js'), import('./runtime/context.js')]);
|
|
18
|
+
await hook(environment.stdin ?? (() => readFileSync(0)), environment.runtime ?? runtimeContext(environment.configDir));
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
async function renderer(command) {
|
|
22
|
+
const read = environment.stdin ?? (() => readFileSync(0));
|
|
23
|
+
if (command === 'slash-hook') {
|
|
24
|
+
const { slashHook } = await import('./integration/slash-hook.js');
|
|
25
|
+
stdout(await slashHook(read, environment));
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const { render } = await import('./rendering/main.js');
|
|
29
|
+
stdout(await render(read, { configDir: environment.configDir, runtime: environment.runtime, now: environment.now ? () => environment.now().getTime() / 1000 : undefined, observations: environment.renderObservations }, command === 'render-subagents'));
|
|
30
|
+
}
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
if (args.length === 1 && ['render', 'render-subagents', 'slash-hook'].includes(args[0]))
|
|
34
|
+
return renderer(args[0]);
|
|
35
|
+
// Management translations and storage stay outside the rendering hot path.
|
|
36
|
+
const { ArgumentError, parseConfig, validateConfigHelp, optionToken } = await import('./config/arguments.js');
|
|
37
|
+
const { expandUser, detectClaudeVersion, resolvedPath } = await import('@fbincon/statusline-platform/commands');
|
|
38
|
+
const { isLinkOrReparse } = await import('@fbincon/statusline-platform/files');
|
|
39
|
+
const { ConfigurationService } = await import('./config/service.js');
|
|
40
|
+
const { createStorage } = await import('./config/storage.js');
|
|
41
|
+
const { readPreferences } = await import('./config/preferences.js');
|
|
42
|
+
const { ConfigError } = await import('@fbincon/statusline-core/config/validation');
|
|
43
|
+
const { t } = await import('@fbincon/statusline-core/i18n/messages');
|
|
44
|
+
const { LANGUAGES } = await import('@fbincon/statusline-core/i18n/registry');
|
|
45
|
+
const { localizedError } = await import('./errors.js');
|
|
46
|
+
let selectedLanguage;
|
|
47
|
+
let language = 'en';
|
|
48
|
+
try {
|
|
49
|
+
if (args[0] === '--language' || args[0]?.startsWith('--language=')) {
|
|
50
|
+
const flag = args.shift();
|
|
51
|
+
selectedLanguage = flag.includes('=') ? flag.slice(11) : args.shift();
|
|
52
|
+
if (!LANGUAGES.includes(selectedLanguage))
|
|
53
|
+
throw new ArgumentError('unsupported --language');
|
|
54
|
+
}
|
|
55
|
+
// Resolve preferences without creating files, including before help/parser errors.
|
|
56
|
+
// Only the command's own directory option selects storage. A literal
|
|
57
|
+
// item value after -- must never redirect a configuration write.
|
|
58
|
+
const administrative = ['install', 'uninstall', 'doctor', 'recover'].includes(args[0] ?? '');
|
|
59
|
+
const directoryIndex = administrative ? args.findIndex(arg => arg === '--config-dir' || arg.startsWith('--config-dir=')) : 1;
|
|
60
|
+
const directoryFlag = args[directoryIndex];
|
|
61
|
+
const requestedDirectory = directoryFlag === '--config-dir' ? args[directoryIndex + 1] : directoryFlag?.startsWith('--config-dir=') ? directoryFlag.slice(13) : undefined;
|
|
62
|
+
const rawDirectory = requestedDirectory ?? environment.configDir ?? process.env.CLAUDE_CONFIG_DIR;
|
|
63
|
+
let configDir = resolve(expandUser(rawDirectory?.trim() ? rawDirectory : '~/.claude'));
|
|
64
|
+
if (isLinkOrReparse(configDir))
|
|
65
|
+
configDir = resolvedPath(configDir);
|
|
66
|
+
const preferences = readPreferences(configDir, createStorage(environment.now));
|
|
67
|
+
language = (selectedLanguage ?? preferences.ui_language);
|
|
68
|
+
if (['install', 'uninstall', 'doctor', 'recover', 'config', 'ui', 'runtime', 'configure'].includes(args[0] ?? '') && directoryFlag === '--config-dir' && (requestedDirectory === undefined || optionToken(requestedDirectory)))
|
|
69
|
+
throw new ArgumentError('--config-dir requires a path');
|
|
70
|
+
const literal = args.indexOf('--'), optionArgs = literal < 0 ? args : args.slice(0, literal);
|
|
71
|
+
if (optionArgs.includes('--help') || optionArgs.includes('-h')) {
|
|
72
|
+
const command = args[0];
|
|
73
|
+
if (command && !command.startsWith('-') && !['install', 'uninstall', 'doctor', 'recover', 'config', 'ui', 'runtime', 'configure', 'hook', 'render', 'render-subagents', 'slash-hook'].includes(command))
|
|
74
|
+
throw new ArgumentError(`unknown command: ${command}`);
|
|
75
|
+
if (command === 'config') {
|
|
76
|
+
const offset = directoryFlag === '--config-dir' ? 3 : directoryFlag?.startsWith('--config-dir=') ? 2 : 1;
|
|
77
|
+
validateConfigHelp(args.slice(offset));
|
|
78
|
+
}
|
|
79
|
+
const { helpText } = await import('./help.js');
|
|
80
|
+
stdout(helpText(args[0], language));
|
|
81
|
+
return 0;
|
|
82
|
+
}
|
|
83
|
+
const command = args.shift();
|
|
84
|
+
if (!['install', 'uninstall', 'doctor', 'recover', 'config', 'ui', 'runtime', 'configure', 'hook', 'render', 'render-subagents', 'slash-hook'].includes(command ?? ''))
|
|
85
|
+
throw new ArgumentError(`unknown command: ${command ?? '(missing)'}`);
|
|
86
|
+
if (administrative) {
|
|
87
|
+
const { parseAdministration } = await import('./integration/arguments.js');
|
|
88
|
+
const options = parseAdministration(command, args);
|
|
89
|
+
const { installContext, install, uninstall } = await import('./integration/install.js');
|
|
90
|
+
const { renderMessage } = await import('@fbincon/statusline-core/i18n/messages');
|
|
91
|
+
const launch = environment.launch ?? { executable: process.execPath, args: [fileURLToPath(new URL('./entry.js', import.meta.url))] };
|
|
92
|
+
const context = installContext(configDir, launch, (environment.hostVersion ?? detectClaudeVersion)(), environment.installation?.io, environment.installation?.host);
|
|
93
|
+
if (command === 'recover') {
|
|
94
|
+
const { recover } = await import('./recovery/service.js');
|
|
95
|
+
const result = recover(context, options.dryRun);
|
|
96
|
+
if (!result.transactions.length)
|
|
97
|
+
stdout(t('recovery.none', language) + '\n');
|
|
98
|
+
for (const transaction of result.transactions)
|
|
99
|
+
stdout(t(options.dryRun ? 'recovery.preview' : 'recovery.result', language, transaction) + '\n');
|
|
100
|
+
return 0;
|
|
101
|
+
}
|
|
102
|
+
if (command === 'doctor') {
|
|
103
|
+
const { doctor } = await import('./integration/doctor.js');
|
|
104
|
+
const diagnostics = doctor(context);
|
|
105
|
+
for (const row of diagnostics)
|
|
106
|
+
stdout(`[${row.level}] ${renderMessage(row.message, language)}\n`);
|
|
107
|
+
return diagnostics.some(row => row.level === 'ERROR') ? 1 : 0;
|
|
108
|
+
}
|
|
109
|
+
const result = command === 'install' ? install(context, options) : uninstall(context, options);
|
|
110
|
+
stdout(t('cli.change', language, { action: command, state: result.changed ? options.dryRun ? t('state.would_change', language) : t('state.updated', language) : t('state.correct', language), path: result.settingsPath }) + '\n');
|
|
111
|
+
if (result.backupDir)
|
|
112
|
+
stdout(t('cli.backup', language, { path: result.backupDir }) + '\n');
|
|
113
|
+
for (const message of result.messages)
|
|
114
|
+
stdout(renderMessage(message, language) + '\n');
|
|
115
|
+
return result.failed ? 2 : 0;
|
|
116
|
+
}
|
|
117
|
+
if (['render', 'render-subagents', 'slash-hook'].includes(command)) {
|
|
118
|
+
if (args.length)
|
|
119
|
+
throw new ArgumentError(`${command} takes no arguments`);
|
|
120
|
+
return renderer(command);
|
|
121
|
+
}
|
|
122
|
+
let explicit;
|
|
123
|
+
if (args[0] === '--config-dir' || args[0]?.startsWith('--config-dir=')) {
|
|
124
|
+
const flag = args.shift();
|
|
125
|
+
explicit = flag.includes('=') ? flag.slice(13) : args.shift();
|
|
126
|
+
if (explicit === undefined)
|
|
127
|
+
throw new ArgumentError('--config-dir requires a path');
|
|
128
|
+
}
|
|
129
|
+
if (command === 'runtime' || command === 'hook') {
|
|
130
|
+
if (command === 'hook' && explicit !== undefined)
|
|
131
|
+
throw new ArgumentError('hook does not accept --config-dir');
|
|
132
|
+
if (args.length)
|
|
133
|
+
throw new ArgumentError(`${command} takes no positional arguments`);
|
|
134
|
+
const { runtimeContext } = await import('./runtime/context.js');
|
|
135
|
+
const context = environment.runtime ?? runtimeContext(configDir);
|
|
136
|
+
if (command === 'hook') {
|
|
137
|
+
const { hook } = await import('./runtime/hook.js');
|
|
138
|
+
await hook(environment.stdin ?? (() => readFileSync(0)), context);
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
const { RuntimeProtocol } = await import('./runtime/live/protocol.js');
|
|
142
|
+
const { readLimitedInput } = await import('@fbincon/statusline-platform/input');
|
|
143
|
+
const result = await new RuntimeProtocol(context).handle(environment.stdin ?? (() => readLimitedInput(1048576)));
|
|
144
|
+
stdout(result.stdout);
|
|
145
|
+
return result.status;
|
|
146
|
+
}
|
|
147
|
+
const launch = environment.launch ?? { executable: process.execPath, args: [fileURLToPath(new URL('./entry.js', import.meta.url))] };
|
|
148
|
+
const service = new ConfigurationService({ configDir, launch, hostVersion: environment.hostVersion ?? detectClaudeVersion }, createStorage(environment.now));
|
|
149
|
+
if (command === 'configure') {
|
|
150
|
+
if (args.length)
|
|
151
|
+
throw new ArgumentError('configure takes no positional arguments');
|
|
152
|
+
const { configure } = await import('./integration/configure.js');
|
|
153
|
+
return configure(service, language, stdout, stderr);
|
|
154
|
+
}
|
|
155
|
+
if (command === 'ui') {
|
|
156
|
+
if (args.length)
|
|
157
|
+
throw new ArgumentError('ui takes no positional arguments');
|
|
158
|
+
const { ConfigurationProtocol } = await import('./ui/protocol.js');
|
|
159
|
+
const { pythonJson } = await import('@fbincon/statusline-core/json-text');
|
|
160
|
+
const { previewAdapter } = await import('./rendering/preview.js');
|
|
161
|
+
const protocol = new ConfigurationProtocol(service, await previewAdapter(), environment.nextId);
|
|
162
|
+
let raw;
|
|
163
|
+
try {
|
|
164
|
+
raw = stdin();
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
stdout(pythonJson({ protocol_version: 11, error: { code: 'invalid_request', message: error instanceof Error ? error.message : String(error), localization: null } }, { ensureAscii: false }) + '\n');
|
|
168
|
+
return 2;
|
|
169
|
+
}
|
|
170
|
+
const { response, status } = protocol.handle(raw, error => stderr(String(error) + '\n'));
|
|
171
|
+
stdout(pythonJson(response, { ensureAscii: false }) + '\n');
|
|
172
|
+
return status;
|
|
173
|
+
}
|
|
174
|
+
const parsed = parseConfig(args);
|
|
175
|
+
if (preferences.warning)
|
|
176
|
+
stderr(t('cli.warning', language, { detail: preferences.warning }) + '\n');
|
|
177
|
+
try {
|
|
178
|
+
const { executeConfig } = await import('./config/commands.js');
|
|
179
|
+
stdout(executeConfig(parsed, service, language, environment.nextId) + '\n');
|
|
180
|
+
return 0;
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
const detail = error instanceof ConfigError ? localizedError(error) : errorDescription(error);
|
|
184
|
+
stderr(t('cli.error', language, { detail }) + '\n');
|
|
185
|
+
return 2;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
if (error instanceof ArgumentError) {
|
|
190
|
+
stderr(t('cli.parser_error', language, { prog: 'claude-statusline', detail: language === 'en' ? error.message : t(error.key, language, error.params) }));
|
|
191
|
+
return 2;
|
|
192
|
+
}
|
|
193
|
+
stderr(t('cli.error', language, { detail: error instanceof ConfigError ? localizedError(error) : String(error) }) + '\n');
|
|
194
|
+
return 2;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAmBvE,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,OAA0B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,cAA8B,EAAE;IACxG,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,MAAM,GA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AC,KAAK,CAAC,CAAC;YAC9F,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;YACpD,OAAO,CAAC,CAAC;QACb,CAAC;IACL,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACX,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACjC,MAAM,CAAC,CAAC,CAAC,kBAAkB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YACzJ,OAAO,CAAC,CAAC;QACb,CAAC;QACD,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QAC1H,OAAO,CAAC,CAAC;IACb,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Storage } from '../config/storage.js';
|
|
2
|
+
import type { Change } from '../integration/transaction.js';
|
|
3
|
+
import { type FileJournal } from './journal.js';
|
|
4
|
+
/** All targets and snapshots are checked before the first restoration write. */
|
|
5
|
+
export declare function recoverFiles(journal: FileJournal, io: Storage, dryRun?: boolean): 'rollback' | 'committed';
|
|
6
|
+
/** Called under the common installation lock. Immutable before-images precede the durable journal. */
|
|
7
|
+
export declare function commit(directory: string, action: string, changes: Change[], io: Storage, backupAbsent?: boolean): string | null;
|