@fbincon/claude-code-statusline 0.0.0-stage → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSE-Unicode.txt +39 -0
- package/LICENSE-Wcwidth.txt +27 -0
- package/README.md +90 -2
- package/bin/claude-statusline.js +2 -0
- package/candidate.json +1238 -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 +16 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +213 -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/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,35 @@
|
|
|
1
|
+
import type { Scope } from '@fbincon/statusline-core/contracts/ui';
|
|
2
|
+
export declare class ArgumentError extends Error {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly params: Record<string, unknown>;
|
|
5
|
+
readonly help?: {
|
|
6
|
+
unrecognizedOption?: string;
|
|
7
|
+
pending?: boolean;
|
|
8
|
+
} | undefined;
|
|
9
|
+
constructor(message: string, key?: string, params?: Record<string, unknown>, help?: {
|
|
10
|
+
unrecognizedOption?: string;
|
|
11
|
+
pending?: boolean;
|
|
12
|
+
} | undefined);
|
|
13
|
+
}
|
|
14
|
+
/** Help still rejects an invalid command path or an option missing its value.
|
|
15
|
+
* Required final arguments and unrecognized extras are checked after argparse's
|
|
16
|
+
* help action, so they do not prevent help from exiting successfully.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateConfigHelp(argv: readonly string[]): void;
|
|
19
|
+
export declare const optionToken: (value: string) => boolean;
|
|
20
|
+
export interface ConfigArguments {
|
|
21
|
+
action: string;
|
|
22
|
+
subaction?: string;
|
|
23
|
+
scope?: Scope;
|
|
24
|
+
items: string[];
|
|
25
|
+
option?: string;
|
|
26
|
+
value?: string;
|
|
27
|
+
id?: string;
|
|
28
|
+
type_id?: string;
|
|
29
|
+
mode?: string;
|
|
30
|
+
rows?: string[];
|
|
31
|
+
path?: string;
|
|
32
|
+
preset?: string;
|
|
33
|
+
flags: Record<string, string | string[] | boolean>;
|
|
34
|
+
}
|
|
35
|
+
export declare function parseConfig(argv: readonly string[]): ConfigArguments;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { OPTIONS } from './operations.js';
|
|
2
|
+
import { PALETTE_VALUES, DIRECTORYSTYLE_VALUES, SEPARATORSTYLE_VALUES, SCOPELABELS_VALUES, STATUSLINELANGUAGE_VALUES } from '@fbincon/statusline-core/contracts/ui';
|
|
3
|
+
import { ROWS } from '@fbincon/statusline-core/config/presets';
|
|
4
|
+
export class ArgumentError extends Error {
|
|
5
|
+
key;
|
|
6
|
+
params;
|
|
7
|
+
help;
|
|
8
|
+
constructor(message, key = 'cli.unrecognized', params = { arguments: message }, help) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.key = key;
|
|
11
|
+
this.params = params;
|
|
12
|
+
this.help = help;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/** Help still rejects an invalid command path or an option missing its value.
|
|
16
|
+
* Required final arguments and unrecognized extras are checked after argparse's
|
|
17
|
+
* help action, so they do not prevent help from exiting successfully.
|
|
18
|
+
*/
|
|
19
|
+
export function validateConfigHelp(argv) {
|
|
20
|
+
const end = argv.findIndex(value => value === '--help' || value === '-h');
|
|
21
|
+
let prefix = argv.slice(0, end < 0 ? argv.length : end);
|
|
22
|
+
for (;;) {
|
|
23
|
+
if (!prefix.length || ['language', 'subagents'].includes(prefix[0]) && prefix.length === 1 || prefix[0] === 'instance' && (prefix.length === 1 || prefix.length === 2 && ['main', 'subagent'].includes(prefix[1])))
|
|
24
|
+
return;
|
|
25
|
+
try {
|
|
26
|
+
parseConfig(prefix);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (!(error instanceof ArgumentError))
|
|
31
|
+
throw error;
|
|
32
|
+
if (error.help?.unrecognizedOption) {
|
|
33
|
+
const option = error.help.unrecognizedOption;
|
|
34
|
+
prefix = prefix.filter(value => value !== option && !value.startsWith(option + '='));
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (error.key === 'cli.required' || error.help?.pending)
|
|
38
|
+
return;
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function positionalChoices(action, selected, values) {
|
|
44
|
+
const first = values[0];
|
|
45
|
+
if (first === undefined)
|
|
46
|
+
return;
|
|
47
|
+
if (action === 'set' && !OPTIONS.includes(first))
|
|
48
|
+
throw new ArgumentError(`invalid option: ${first}`, 'cli.invalid_choice', { value: first, choices: OPTIONS.join(', ') });
|
|
49
|
+
if (action === 'item' && !['main', 'subagent'].includes(first))
|
|
50
|
+
throw new ArgumentError('scope must be main or subagent');
|
|
51
|
+
if (action === 'layout' && !['auto', 'explicit'].includes(first))
|
|
52
|
+
throw new ArgumentError('layout must be auto or explicit');
|
|
53
|
+
if (action === 'language' && selected === 'set' && !STATUSLINELANGUAGE_VALUES.includes(first))
|
|
54
|
+
throw new ArgumentError('unsupported language');
|
|
55
|
+
if (action === 'preset' && !Object.hasOwn(ROWS, first))
|
|
56
|
+
throw new ArgumentError('unknown preset');
|
|
57
|
+
}
|
|
58
|
+
function applyChoices(flags) {
|
|
59
|
+
const choices = { colors: ['on', 'off'], palette: PALETTE_VALUES, 'directory-style': DIRECTORYSTYLE_VALUES, 'separator-style': SEPARATORSTYLE_VALUES, 'scope-labels': SCOPELABELS_VALUES, 'statusline-language': STATUSLINELANGUAGE_VALUES, 'subagent-statusline': ['on', 'off'], 'hide-vim-mode-indicator': ['on', 'off'] };
|
|
60
|
+
for (const [key, values] of Object.entries(choices))
|
|
61
|
+
if (flags[key] !== undefined && !values.includes(flags[key]))
|
|
62
|
+
throw new ArgumentError(`invalid value for --${key}`);
|
|
63
|
+
}
|
|
64
|
+
function commandToken(value) {
|
|
65
|
+
if (value !== undefined && optionToken(value))
|
|
66
|
+
throw new ArgumentError(`unrecognized option: ${value}`, 'cli.unrecognized', { arguments: value }, { unrecognizedOption: value });
|
|
67
|
+
}
|
|
68
|
+
// Python 3.14 argparse uses a negative-looking prefix, not numeric validation.
|
|
69
|
+
// Business rules validate the entire value after parsing. Spaces also make an
|
|
70
|
+
// otherwise unknown option-looking token positional in the reference parser.
|
|
71
|
+
export const optionToken = (value) => value.length > 1 && value.startsWith('-') && !/^-\.?\p{Decimal_Number}/u.test(value) && !value.includes(' ');
|
|
72
|
+
export function parseConfig(argv) {
|
|
73
|
+
const args = [...argv], action = args.shift();
|
|
74
|
+
if (!action)
|
|
75
|
+
throw new ArgumentError('config requires a subcommand');
|
|
76
|
+
commandToken(action);
|
|
77
|
+
const result = { action, items: [], flags: {} };
|
|
78
|
+
let allowed = {}, minimum = 0, maximum = 0;
|
|
79
|
+
let positional = [];
|
|
80
|
+
if (action === 'subagents' || action === 'language')
|
|
81
|
+
result.subaction = args.shift();
|
|
82
|
+
if (action === 'instance') {
|
|
83
|
+
const scope = args.shift();
|
|
84
|
+
commandToken(scope);
|
|
85
|
+
if (!['main', 'subagent'].includes(scope ?? ''))
|
|
86
|
+
throw new ArgumentError('scope must be main or subagent');
|
|
87
|
+
result.scope = scope;
|
|
88
|
+
result.subaction = args.shift();
|
|
89
|
+
}
|
|
90
|
+
const selected = action === 'subagents' || action === 'instance' || action === 'language' ? result.subaction : action;
|
|
91
|
+
commandToken(selected);
|
|
92
|
+
if (action === 'language') {
|
|
93
|
+
if (selected === 'show')
|
|
94
|
+
allowed = { '--json': 'boolean' };
|
|
95
|
+
else if (selected === 'set')
|
|
96
|
+
minimum = maximum = 1;
|
|
97
|
+
else if (selected !== 'reset')
|
|
98
|
+
throw new ArgumentError('language requires show, set or reset');
|
|
99
|
+
}
|
|
100
|
+
else if (action === 'instance') {
|
|
101
|
+
if (selected === 'list')
|
|
102
|
+
allowed = { '--json': 'boolean' };
|
|
103
|
+
else if (selected === 'add') {
|
|
104
|
+
minimum = maximum = 1;
|
|
105
|
+
allowed = { '--after': 'one', '--text': 'one' };
|
|
106
|
+
}
|
|
107
|
+
else if (['copy', 'remove', 'enable', 'disable'].includes(selected ?? ''))
|
|
108
|
+
minimum = maximum = 1;
|
|
109
|
+
else if (selected === 'set')
|
|
110
|
+
minimum = maximum = 3;
|
|
111
|
+
else if (selected === 'move') {
|
|
112
|
+
minimum = maximum = 1;
|
|
113
|
+
allowed = { '--before': 'one', '--after': 'one' };
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
throw new ArgumentError('unknown instance subcommand');
|
|
117
|
+
}
|
|
118
|
+
else if (selected === 'show' && action !== 'subagents' || selected === 'list-items')
|
|
119
|
+
allowed = { '--json': 'boolean' };
|
|
120
|
+
else if (['set-items', 'enable', 'disable', 'order'].includes(selected ?? '')) {
|
|
121
|
+
minimum = ['enable', 'disable'].includes(selected) ? 1 : 0;
|
|
122
|
+
maximum = Infinity;
|
|
123
|
+
}
|
|
124
|
+
else if (action === 'set')
|
|
125
|
+
minimum = maximum = 2;
|
|
126
|
+
else if (action === 'apply') {
|
|
127
|
+
allowed = { '--items': 'many', '--colors': 'one', '--palette': 'one', '--directory-style': 'one', '--separator-style': 'one', '--padding': 'one', '--refresh-interval': 'one', '--hide-vim-mode-indicator': 'one', '--subagent-items': 'many', '--subagent-statusline': 'one', '--scope-labels': 'one', '--statusline-language': 'one' };
|
|
128
|
+
}
|
|
129
|
+
else if (['preset', 'import', 'export'].includes(action)) {
|
|
130
|
+
minimum = maximum = 1;
|
|
131
|
+
allowed = action === 'export' ? { '--overwrite': 'boolean' } : { '--dry-run': 'boolean' };
|
|
132
|
+
}
|
|
133
|
+
else if (action === 'item')
|
|
134
|
+
minimum = maximum = 4;
|
|
135
|
+
else if (action === 'layout') {
|
|
136
|
+
minimum = 1;
|
|
137
|
+
maximum = Infinity;
|
|
138
|
+
allowed = { '--by-instance': 'boolean' };
|
|
139
|
+
}
|
|
140
|
+
else if (action !== 'reset')
|
|
141
|
+
throw new ArgumentError(`unknown config subcommand: ${action}`);
|
|
142
|
+
let literal = false;
|
|
143
|
+
for (let i = 0; i < args.length; i++) {
|
|
144
|
+
const token = args[i];
|
|
145
|
+
if (!literal && token === '--') {
|
|
146
|
+
literal = true;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (!literal && token.startsWith('--')) {
|
|
150
|
+
const equals = token.indexOf('='), flag = equals < 0 ? token : token.slice(0, equals), inline = equals < 0 ? undefined : token.slice(equals + 1);
|
|
151
|
+
const kind = Object.hasOwn(allowed, flag) ? allowed[flag] : undefined;
|
|
152
|
+
if (!kind)
|
|
153
|
+
throw new ArgumentError(`unrecognized option: ${flag}`, 'cli.unrecognized', { arguments: flag }, { unrecognizedOption: flag });
|
|
154
|
+
const name = flag.slice(2);
|
|
155
|
+
if (kind === 'boolean') {
|
|
156
|
+
if (inline !== undefined)
|
|
157
|
+
throw new ArgumentError(`${flag} does not take a value`);
|
|
158
|
+
result.flags[name] = true;
|
|
159
|
+
}
|
|
160
|
+
else if (kind === 'one') {
|
|
161
|
+
const value = inline ?? args[++i];
|
|
162
|
+
if (value === undefined || inline === undefined && optionToken(value))
|
|
163
|
+
throw new ArgumentError(`${flag} requires a value`);
|
|
164
|
+
result.flags[name] = value;
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
const values = inline === undefined ? [] : [inline];
|
|
168
|
+
if (inline === undefined)
|
|
169
|
+
while (i + 1 < args.length && !optionToken(args[i + 1]))
|
|
170
|
+
values.push(args[++i]);
|
|
171
|
+
result.flags[name] = values;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else if (!literal && optionToken(token))
|
|
175
|
+
throw new ArgumentError(`unrecognized option: ${token}`, 'cli.unrecognized', { arguments: token }, { unrecognizedOption: token });
|
|
176
|
+
else
|
|
177
|
+
positional.push(token);
|
|
178
|
+
}
|
|
179
|
+
positionalChoices(action, selected, positional);
|
|
180
|
+
if (action === 'apply')
|
|
181
|
+
applyChoices(result.flags);
|
|
182
|
+
if (action === 'instance' && selected === 'move' && Object.hasOwn(result.flags, 'before') && Object.hasOwn(result.flags, 'after'))
|
|
183
|
+
throw new ArgumentError('move requires exactly one of --before and --after');
|
|
184
|
+
if (positional.length < minimum)
|
|
185
|
+
throw new ArgumentError(`invalid arguments for config ${selected}`, 'cli.required', { arguments: `config ${selected}` });
|
|
186
|
+
if (positional.length > maximum)
|
|
187
|
+
throw new ArgumentError(`invalid arguments for config ${selected}`, 'cli.unrecognized', { arguments: positional.slice(maximum).join(' ') }, { pending: true });
|
|
188
|
+
if (action === 'language')
|
|
189
|
+
result.value = positional[0];
|
|
190
|
+
else if (action === 'instance') {
|
|
191
|
+
if (selected === 'add')
|
|
192
|
+
result.type_id = positional[0];
|
|
193
|
+
else
|
|
194
|
+
result.id = positional[0];
|
|
195
|
+
if (selected === 'set') {
|
|
196
|
+
result.option = positional[1];
|
|
197
|
+
result.value = positional[2];
|
|
198
|
+
}
|
|
199
|
+
if (selected === 'move' && Object.hasOwn(result.flags, 'before') === Object.hasOwn(result.flags, 'after'))
|
|
200
|
+
throw new ArgumentError('move requires exactly one of --before and --after', 'cli.unrecognized', { arguments: 'move requires exactly one of --before and --after' }, { pending: !Object.hasOwn(result.flags, 'before') });
|
|
201
|
+
}
|
|
202
|
+
else if (action === 'set') {
|
|
203
|
+
result.option = positional[0];
|
|
204
|
+
result.value = positional[1];
|
|
205
|
+
}
|
|
206
|
+
else if (action === 'item') {
|
|
207
|
+
result.scope = positional[0];
|
|
208
|
+
result.id = positional[1];
|
|
209
|
+
result.option = positional[2];
|
|
210
|
+
result.value = positional[3];
|
|
211
|
+
}
|
|
212
|
+
else if (action === 'layout') {
|
|
213
|
+
result.mode = positional[0];
|
|
214
|
+
result.rows = positional.slice(1);
|
|
215
|
+
}
|
|
216
|
+
else if (action === 'preset')
|
|
217
|
+
result.preset = positional[0];
|
|
218
|
+
else if (action === 'import' || action === 'export')
|
|
219
|
+
result.path = positional[0];
|
|
220
|
+
else
|
|
221
|
+
result.items = positional;
|
|
222
|
+
if (action === 'apply')
|
|
223
|
+
for (const name of ['items', 'colors', 'palette', 'directory-style', 'separator-style', 'padding', 'refresh-interval', 'hide-vim-mode-indicator'])
|
|
224
|
+
if (!Object.hasOwn(result.flags, name))
|
|
225
|
+
throw new ArgumentError(`required option: --${name}`, 'cli.required', { arguments: '--' + name });
|
|
226
|
+
return result;
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arguments.js","sourceRoot":"","sources":["../../../src/config/arguments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AACpK,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAC/D,MAAM,OAAO,aAAc,SAAQ,KAAK;IACS;IAA0C;IAA0E;IAAjK,YAAY,OAAe,EAAkB,MAAM,kBAAkB,EAAkB,SAAkC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAkB,IAAyD;QACtN,KAAK,CAAC,OAAO,CAAC,CAAC;QAD0B,QAAG,GAAH,GAAG,CAAqB;QAAkB,WAAM,GAAN,MAAM,CAAkD;QAAkB,SAAI,GAAJ,IAAI,CAAqD;IAE1N,CAAC;CACJ;AACD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;IAC1E,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACxD,SAAS,CAAC;QACN,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,IAAI,MAAM,CAAC,MAAM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AAU,CAAC,CAAC,CAAU,CAAC;QACtC,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SACI,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;SACI,IAAI,MAAM,KAAK,QAAQ;QACxB,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;SAC7B,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,QAAQ;QAC/C,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;;QAE5B,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC;IAC9B,IAAI,MAAM,KAAK,OAAO;QAClB,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,yBAAyB,CAAC;YAC7I,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC;gBAClC,MAAM,IAAI,aAAa,CAAC,sBAAsB,IAAI,EAAE,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;IAC9G,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuntimePreferences } from '@fbincon/statusline-core/config/backend-preferences';
|
|
2
|
+
import { type Storage } from './storage.js';
|
|
3
|
+
export declare function loadRuntime(directory: string, io?: Storage, liveMetrics?: boolean, nativeTiming?: boolean): RuntimePreferences;
|
|
4
|
+
export declare function loadNative(directory: string, explicit?: boolean, version?: string, io?: Storage): boolean;
|
|
5
|
+
export declare function loadFeature(directory: string, version?: string, io?: Storage): boolean;
|
|
6
|
+
export declare function writeFeature(directory: string, enabled: boolean, io?: Storage): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { VERSION } from '@fbincon/statusline-core/release';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { DEFAULT_RUNTIME, FEATURE_FILENAME, NATIVE_FILENAME, RUNTIME_FILENAME, enabledByDefault, parseFeature, parseNative, parseRuntime } from '@fbincon/statusline-core/config/backend-preferences';
|
|
4
|
+
import { ConfigError } from '@fbincon/statusline-core/config/validation';
|
|
5
|
+
import { createStorage, decodeUtf8, jsonBytes, errorDetail } from './storage.js';
|
|
6
|
+
function optional(path, io) {
|
|
7
|
+
try {
|
|
8
|
+
return io.read(path);
|
|
9
|
+
}
|
|
10
|
+
catch (exc) {
|
|
11
|
+
throw new ConfigError('errors.storage.cannot_read_2', { path, exc: errorDetail(exc) });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function loadRuntime(directory, io = createStorage(), liveMetrics, nativeTiming) {
|
|
15
|
+
if (liveMetrics !== undefined)
|
|
16
|
+
return { schema_version: 2, native_timing: nativeTiming ?? liveMetrics, live_metrics: liveMetrics };
|
|
17
|
+
const raw = optional(join(directory, RUNTIME_FILENAME), io);
|
|
18
|
+
let base;
|
|
19
|
+
try {
|
|
20
|
+
base = raw === null ? { ...DEFAULT_RUNTIME } : parseRuntime(decodeUtf8(raw));
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (error instanceof ConfigError)
|
|
24
|
+
throw error;
|
|
25
|
+
throw new ConfigError('errors.runtime.invalid', { FILENAME: RUNTIME_FILENAME, error: errorDetail(error) });
|
|
26
|
+
}
|
|
27
|
+
return { ...base, native_timing: nativeTiming ?? base.native_timing };
|
|
28
|
+
}
|
|
29
|
+
export function loadNative(directory, explicit, version = VERSION, io = createStorage()) {
|
|
30
|
+
if (explicit !== undefined)
|
|
31
|
+
return explicit;
|
|
32
|
+
const raw = optional(join(directory, NATIVE_FILENAME), io);
|
|
33
|
+
try {
|
|
34
|
+
return raw === null ? enabledByDefault(version) : parseNative(decodeUtf8(raw));
|
|
35
|
+
}
|
|
36
|
+
catch (exc) {
|
|
37
|
+
if (exc instanceof ConfigError)
|
|
38
|
+
throw exc;
|
|
39
|
+
throw new ConfigError('errors.native.invalid', { FILENAME: NATIVE_FILENAME, exc: errorDetail(exc) });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function loadFeature(directory, version = VERSION, io = createStorage()) {
|
|
43
|
+
const path = join(directory, FEATURE_FILENAME);
|
|
44
|
+
let raw;
|
|
45
|
+
try {
|
|
46
|
+
raw = io.read(path);
|
|
47
|
+
}
|
|
48
|
+
catch (exc) {
|
|
49
|
+
throw new ConfigError('errors.features.cannot_read', { path, exc: errorDetail(exc) });
|
|
50
|
+
}
|
|
51
|
+
if (raw === null)
|
|
52
|
+
return enabledByDefault(version);
|
|
53
|
+
let source;
|
|
54
|
+
try {
|
|
55
|
+
source = decodeUtf8(raw);
|
|
56
|
+
}
|
|
57
|
+
catch (exc) {
|
|
58
|
+
throw new ConfigError('errors.features.invalid_json_in', { label: path, exc: errorDetail(exc) });
|
|
59
|
+
}
|
|
60
|
+
return parseFeature(source, path);
|
|
61
|
+
}
|
|
62
|
+
export function writeFeature(directory, enabled, io = createStorage()) {
|
|
63
|
+
const path = join(directory, FEATURE_FILENAME);
|
|
64
|
+
try {
|
|
65
|
+
io.write(path, jsonBytes({ schema_version: 1, experimental_slash_tui: enabled }));
|
|
66
|
+
}
|
|
67
|
+
catch (exc) {
|
|
68
|
+
throw new ConfigError('errors.features.cannot_write', { path, exc: errorDetail(exc) });
|
|
69
|
+
}
|
|
70
|
+
return path;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=backend-preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-preferences.js","sourceRoot":"","sources":["../../../src/config/backend-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAA2B,MAAM,qDAAqD,CAAC;AAC/N,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAC;AAC/F,SAAS,QAAQ,CAAC,IAAY,EAAE,EAAW;IACvC,IAAI,CAAC;QAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;IAC7B,OAAO,GAAG,EAAE,CAAC;QAAC,MAAM,IAAI,WAAW,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC3G,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,KAAc,aAAa,EAAE,EAAE,WAAqB,EAAE,YAAsB;IACvH,IAAI,WAAW,KAAK,SAAS;QACzB,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,aAAa,EAAE,YAAY,IAAI,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IACxG,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,IAAwB,CAAC;IAC7B,IAAI,CAAC;QAAC,IAAI,GAAG,GAAG,KAAK,IAAI,CAAC,CAA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|
|
1
|
+
import type { Scope } from '@fbincon/statusline-core/contracts/ui';
|
|
2
|
+
import { type Language } from '@fbincon/statusline-core/i18n/messages';
|
|
3
|
+
import { ConfigurationService, type EffectiveConfig, type MutationResult } from './service.js';
|
|
4
|
+
import { type ConfigArguments } from './arguments.js';
|
|
5
|
+
export declare function formatMutation(result: MutationResult, language: Language): string;
|
|
6
|
+
export declare function formatEffective(config: EffectiveConfig, language: Language): string;
|
|
7
|
+
export declare function itemListing(scope: Scope, config: EffectiveConfig): Record<string, unknown>[];
|
|
8
|
+
export declare function executeConfig(args: ConfigArguments, service: ConfigurationService, language?: Language, nextId?: () => string): string;
|
|
9
|
+
export declare function configCommand(argv: readonly string[], service: ConfigurationService, language?: Language): string;
|
|
10
|
+
export declare function parseSlashArguments(raw: string): ConfigArguments;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { DEFAULT_HOST } from '@fbincon/statusline-core/config/draft';
|
|
3
|
+
import { BY_SCOPE } from '@fbincon/statusline-core/config/catalog';
|
|
4
|
+
import { clone, ConfigError } from '@fbincon/statusline-core/config/validation';
|
|
5
|
+
import { validateItems } from '@fbincon/statusline-core/config/display';
|
|
6
|
+
import { edit, legacyId, scoped } from '@fbincon/statusline-core/config/instances';
|
|
7
|
+
import { editItem, editLayout } from '@fbincon/statusline-core/config/editor-fields';
|
|
8
|
+
import { pythonJson } from '@fbincon/statusline-core/json-text';
|
|
9
|
+
import { t } from '@fbincon/statusline-core/i18n/messages';
|
|
10
|
+
import { ConfigurationProtocol } from '../ui/protocol.js';
|
|
11
|
+
import { UNCHANGED, draft, publicConfig } from './service.js';
|
|
12
|
+
import { displayOption, legacyIds, selectedItems, selection, setOption } from './operations.js';
|
|
13
|
+
import { hostOption, installationIdentity, settingsWithHost } from './host.js';
|
|
14
|
+
import { readPreferences, setLanguage } from './preferences.js';
|
|
15
|
+
import { parseConfig } from './arguments.js';
|
|
16
|
+
import { splitCommand } from '@fbincon/statusline-platform/commands';
|
|
17
|
+
export function formatMutation(result, language) {
|
|
18
|
+
return t('config.changed', language, { state: t(result.changed ? 'state.updated' : 'state.current', language) }) + (result.backup_dir ? t('config.backup', language, { path: result.backup_dir }) : '');
|
|
19
|
+
}
|
|
20
|
+
export function formatEffective(config, language) {
|
|
21
|
+
const display = config.display, host = config.host;
|
|
22
|
+
const values = {
|
|
23
|
+
scope: 'user', config: config.config_path, installed: config.installed ? 'yes' : 'no',
|
|
24
|
+
items: display.instances.filter(node => node.enabled).map(node => node.id).join(', ') || '(none)',
|
|
25
|
+
colors: display.use_colors ? 'on' : 'off', palette: display.palette, theme: display.theme, powerline_glyph: display.powerline_glyph,
|
|
26
|
+
directory_style: display.directory_style, separator_style: display.separator_style, scope_labels: display.scope_labels, statusline_language: display.statusline_language,
|
|
27
|
+
subagent_items: display.subagents.instances.filter(node => node.enabled).map(node => node.id).join(', ') || '(none)', custom_subagent_rows: display.subagents.enabled ? 'on' : 'off',
|
|
28
|
+
subagent_statusline: config.subagent_statusline.state, padding: host.padding, refresh_interval: host.refresh_interval, hide_vim_indicator: host.hide_vim_mode_indicator ? 'yes' : 'no',
|
|
29
|
+
};
|
|
30
|
+
return Object.entries(values).map(([key, value]) => t(`config.show.${key}`, language, { value })).join('\n');
|
|
31
|
+
}
|
|
32
|
+
export function itemListing(scope, config) {
|
|
33
|
+
const nodes = scoped(config.display, scope).instances, ids = nodes.filter(node => node.enabled).map(node => node.id);
|
|
34
|
+
return [...BY_SCOPE[scope].values()].map(definition => {
|
|
35
|
+
const matching = nodes.filter(node => node.type_id === definition.id), enabled = matching.filter(node => node.enabled);
|
|
36
|
+
return { ...definition, enabled: Boolean(enabled.length), position: enabled.length === 1 ? ids.indexOf(enabled[0].id) : null, instance_ids: matching.map(node => node.id), enabled_instance_ids: enabled.map(node => node.id), instance_only: ['text', 'spacer'].includes(definition.id) };
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function pretty(value) { return pythonJson(value, { ensureAscii: false, indent: 2 }); }
|
|
40
|
+
function applyFlags(service, flags) {
|
|
41
|
+
validateItems(flags.items, 'main');
|
|
42
|
+
if (flags['subagent-items'] !== undefined)
|
|
43
|
+
validateItems(flags['subagent-items'], 'subagent');
|
|
44
|
+
let host = clone(DEFAULT_HOST);
|
|
45
|
+
for (const name of ['padding', 'refresh-interval', 'hide-vim-mode-indicator'])
|
|
46
|
+
host = hostOption(host, name, flags[name]);
|
|
47
|
+
return service.mutate('config-apply', (current, settings) => {
|
|
48
|
+
if (installationIdentity(settings, service.context.launch).subagentStatusLine.state === 'foreign')
|
|
49
|
+
throw new ConfigError('errors.service.claude_code_subagentstatusline_belongs_to_another_renderer', {}, 'ownership_mismatch');
|
|
50
|
+
let display = selectedItems(current, 'main', 'set-items', flags.items);
|
|
51
|
+
if (flags['subagent-items'] !== undefined)
|
|
52
|
+
display = selectedItems(display, 'subagent', 'set-items', flags['subagent-items']);
|
|
53
|
+
for (const name of ['colors', 'palette', 'directory-style', 'separator-style', 'subagent-statusline', 'scope-labels', 'statusline-language'])
|
|
54
|
+
if (flags[name] !== undefined)
|
|
55
|
+
display = displayOption(display, name, flags[name]);
|
|
56
|
+
return [display, settingsWithHost(settings, service.context.launch, host)];
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export function executeConfig(args, service, language = readPreferences(service.context.configDir, service.io).ui_language, nextId = () => randomUUID().replaceAll('-', '')) {
|
|
60
|
+
const { action, flags } = args;
|
|
61
|
+
if (action === 'language') {
|
|
62
|
+
if (args.subaction === 'show') {
|
|
63
|
+
const preference = readPreferences(service.context.configDir, service.io);
|
|
64
|
+
return flags.json ? pretty({ schema_version: 1, ui_language: preference.ui_language }) : t('cli.language', language, { language: preference.ui_language });
|
|
65
|
+
}
|
|
66
|
+
const preference = setLanguage(service.context.configDir, args.subaction === 'reset' ? 'en' : args.value, service.io);
|
|
67
|
+
return t('cli.language_saved', language, { language: preference.ui_language });
|
|
68
|
+
}
|
|
69
|
+
if (action === 'show') {
|
|
70
|
+
const effective = service.read();
|
|
71
|
+
return flags.json ? pretty(publicConfig(effective)) : formatEffective(effective, language);
|
|
72
|
+
}
|
|
73
|
+
if (action === 'list-items' || action === 'subagents' && args.subaction === 'list-items') {
|
|
74
|
+
const scope = action === 'subagents' ? 'subagent' : 'main', listing = itemListing(scope, service.read());
|
|
75
|
+
return flags.json ? pretty(listing) : listing.map(item => `${item.enabled ? '[x]' : '[ ]'} ${item.id}: ` + t(`items.${scope}.${item.id}.description`, language)).join('\n');
|
|
76
|
+
}
|
|
77
|
+
if (action === 'instance') {
|
|
78
|
+
if (args.subaction === 'list') {
|
|
79
|
+
const nodes = scoped(service.read().display, args.scope).instances;
|
|
80
|
+
return flags.json ? pretty(nodes) : nodes.map(node => `${node.enabled ? '[x]' : '[ ]'} ${node.id} ${node.type_id}`).join('\n');
|
|
81
|
+
}
|
|
82
|
+
let selected = null;
|
|
83
|
+
const result = service.mutate(`config-instance-${args.subaction}`, config => {
|
|
84
|
+
const changed = edit(config, args.scope, { action: args.subaction, id: args.id, type_id: args.type_id, option: args.option, value: args.value, after: flags.after, before: flags.before, text: flags.text }, nextId);
|
|
85
|
+
selected = changed.selected;
|
|
86
|
+
return [changed.config, UNCHANGED];
|
|
87
|
+
});
|
|
88
|
+
return formatMutation(result, language) + (selected === null ? '' : '\n' + selected);
|
|
89
|
+
}
|
|
90
|
+
if (action === 'subagents' || ['set-items', 'enable', 'disable', 'order'].includes(action))
|
|
91
|
+
return formatMutation(selection(service, action === 'subagents' ? 'subagent' : 'main', args.subaction ?? action, args.items), language);
|
|
92
|
+
if (action === 'set')
|
|
93
|
+
return formatMutation(setOption(service, args.option, args.value), language);
|
|
94
|
+
if (action === 'apply')
|
|
95
|
+
return formatMutation(applyFlags(service, flags), language);
|
|
96
|
+
if (action === 'preset' || action === 'import' || action === 'export') {
|
|
97
|
+
const current = service.read(), protocol = new ConfigurationProtocol(service, undefined, nextId);
|
|
98
|
+
const payload = { draft: draft(current) };
|
|
99
|
+
if (action === 'preset')
|
|
100
|
+
payload.preset = args.preset;
|
|
101
|
+
else
|
|
102
|
+
payload.path = args.path;
|
|
103
|
+
if (action === 'export')
|
|
104
|
+
payload.overwrite = Boolean(flags.overwrite);
|
|
105
|
+
const transformed = protocol.dispatch({ protocol_version: 11, operation: action, payload });
|
|
106
|
+
if (action === 'export')
|
|
107
|
+
return t('config.exported', language, { path: transformed.path });
|
|
108
|
+
if (flags['dry-run'])
|
|
109
|
+
return pretty(transformed.draft);
|
|
110
|
+
return formatMutation(service.apply(transformed.draft, current.revision), language);
|
|
111
|
+
}
|
|
112
|
+
if (action === 'item' || action === 'layout') {
|
|
113
|
+
const result = service.mutate(`config-${action}`, config => {
|
|
114
|
+
let updated;
|
|
115
|
+
if (action === 'item')
|
|
116
|
+
updated = editItem(config, args.scope, legacyId(config, args.scope, args.id, true), args.option, args.value);
|
|
117
|
+
else {
|
|
118
|
+
let rows = args.rows.map(row => row.split(','));
|
|
119
|
+
if (!flags['by-instance']) {
|
|
120
|
+
legacyIds(config, 'main', [], true);
|
|
121
|
+
rows = rows.map(row => row.map(type => legacyId(config, 'main', type)));
|
|
122
|
+
}
|
|
123
|
+
updated = editLayout(config, args.mode, rows);
|
|
124
|
+
}
|
|
125
|
+
return [updated, UNCHANGED];
|
|
126
|
+
});
|
|
127
|
+
return formatMutation(result, language);
|
|
128
|
+
}
|
|
129
|
+
if (action === 'reset')
|
|
130
|
+
return formatMutation(service.reset(), language);
|
|
131
|
+
throw new ConfigError('errors.commands.unknown_config_action', { action });
|
|
132
|
+
}
|
|
133
|
+
export function configCommand(argv, service, language) { return executeConfig(parseConfig(argv), service, language); }
|
|
134
|
+
export function parseSlashArguments(raw) {
|
|
135
|
+
const args = splitCommand(raw);
|
|
136
|
+
if (!args)
|
|
137
|
+
throw new ConfigError('errors.commands.invalid_command_arguments', { exc: 'No closing quotation' });
|
|
138
|
+
return parseConfig(args);
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=commands.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AE,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClL,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC3C,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,CAAC,IAAI;QACL,MAAM,IAAI,WAAW,CAAC,2CAA2C,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,CAAC,CAAC;IACxG,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostDraft } from '@fbincon/statusline-core/contracts/ui';
|
|
2
|
+
import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
|
|
3
|
+
export declare function installationIdentity(settings: Record<string, unknown>, launch: LaunchSpec): Record<string, Record<string, unknown>>;
|
|
4
|
+
export declare function hostFromSettings(settings: Record<string, unknown>, launch: LaunchSpec): {
|
|
5
|
+
host: HostDraft;
|
|
6
|
+
installed: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function settingsWithHost(settings: Record<string, unknown>, launch: LaunchSpec, host: HostDraft): Record<string, unknown>;
|
|
9
|
+
export declare function toggle(value: unknown, name: string): boolean;
|
|
10
|
+
export declare function hostOption(host: HostDraft, option: string, value: unknown): HostDraft;
|