@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,153 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { which, ownedCommand, resolvedPath } from '@fbincon/statusline-platform/commands';
|
|
4
|
+
import { chooseLauncher } from '@fbincon/statusline-platform/terminal/launchers';
|
|
5
|
+
import { text } from '@fbincon/statusline-core/i18n/messages';
|
|
6
|
+
import { ConfigError, object } from '@fbincon/statusline-core/config/validation';
|
|
7
|
+
import { safeInteger } from '@fbincon/statusline-core/json';
|
|
8
|
+
import { readJson } from '@fbincon/statusline-core/json-read';
|
|
9
|
+
import { SCHEMA_VERSION } from '@fbincon/statusline-core/config/display';
|
|
10
|
+
import { FEATURE_FILENAME } from '@fbincon/statusline-core/config/backend-preferences';
|
|
11
|
+
import { atLeast } from '../config/service.js';
|
|
12
|
+
import { readDisplay, readSettings, decodeUtf8 } from '../config/storage.js';
|
|
13
|
+
import { loadFeature, loadNative, loadRuntime } from '../config/backend-preferences.js';
|
|
14
|
+
import { localizedError } from '../errors.js';
|
|
15
|
+
import { SKILL, EXTERNAL, OWNER_FILE, HOOKS, SUBAGENT_HOOKS, NATIVE, RUNTIME, VERSION } from './model.js';
|
|
16
|
+
import { skillOwned } from './ownership.js';
|
|
17
|
+
import { owner, registered, cacheOwned } from './mod-ownership.js';
|
|
18
|
+
import { bundledFiles } from './resources.js';
|
|
19
|
+
import { bindingValues, bindingMatches, commandPreflight } from './mods.js';
|
|
20
|
+
import { pending, readJournal, refreshIntents } from '../recovery/journal.js';
|
|
21
|
+
export function pathCollisions(context, environment = process.env) {
|
|
22
|
+
const path = which('claude-statusline', environment);
|
|
23
|
+
if (!path || context.launch.args.some(arg => resolvedPath(arg) === resolvedPath(path)))
|
|
24
|
+
return [];
|
|
25
|
+
let python = false;
|
|
26
|
+
try {
|
|
27
|
+
const fd = fs.openSync(path, 'r'), bytes = Buffer.alloc(1024);
|
|
28
|
+
try {
|
|
29
|
+
const size = fs.readSync(fd, bytes, 0, bytes.length, 0);
|
|
30
|
+
python = /(?:python|pipx)/iu.test(bytes.subarray(0, size).toString('utf8')) || /pipx/iu.test(resolvedPath(path));
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
fs.closeSync(fd);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch { /* The path is still a collision even if unreadable. */ }
|
|
37
|
+
return [{ level: 'WARN', message: `PATH selects another ${python ? 'Python/pipx ' : ''}entry: ${path}. Integration uses the explicit Node/JS binding. Keep the Python environment available for rollback.` }];
|
|
38
|
+
}
|
|
39
|
+
export function schemaDiagnostic(source, supported = SCHEMA_VERSION) {
|
|
40
|
+
return { level: source < supported ? 'WARN' : 'OK', message: text(source < supported ? 'doctor.doctor.display_config_schema_v_is_valid_and' : 'doctor.doctor.display_config_schema_v', { display_source_schema: source, SCHEMA_VERSION: supported }) };
|
|
41
|
+
}
|
|
42
|
+
export function doctor(context) {
|
|
43
|
+
const { configDir, launch, version, io } = context, rows = [];
|
|
44
|
+
const add = (level, key, params = {}) => rows.push({ level, message: text(key, params) });
|
|
45
|
+
const capture = (action) => {
|
|
46
|
+
try {
|
|
47
|
+
action();
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
rows.push({ level: 'ERROR', message: error instanceof ConfigError ? localizedError(error) : String(error) });
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
capture(() => {
|
|
54
|
+
for (const id of refreshIntents(configDir))
|
|
55
|
+
add('ERROR', 'recovery.pending', { id, phase: 'restore-disabled' });
|
|
56
|
+
for (const path of pending(configDir)) {
|
|
57
|
+
const journal = readJournal(configDir, path);
|
|
58
|
+
add('ERROR', 'recovery.pending', { id: journal.id, phase: journal.phase });
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
rows.push({ level: process.versions.node.startsWith('24.') ? 'OK' : 'ERROR', message: `Node runtime: ${process.versions.node}; ${process.platform}/${process.arch}` }, ...pathCollisions(context));
|
|
62
|
+
capture(() => { fs.accessSync(launch.executable, process.platform === 'win32' ? fs.constants.F_OK : fs.constants.X_OK); add('OK', 'doctor.doctor.executable', { executable: launch.executable }); });
|
|
63
|
+
let settings = {};
|
|
64
|
+
capture(() => { [settings] = readSettings(configDir, io); });
|
|
65
|
+
const line = settings.statusLine;
|
|
66
|
+
rows.push({ level: object(line) && ownedCommand(line.command, 'render', launch) ? 'OK' : 'ERROR', message: object(line) && ownedCommand(line.command, 'render', launch) ? 'statusLine: enabled and owned' : 'statusLine: missing or bound to another installation' });
|
|
67
|
+
function actions(event) {
|
|
68
|
+
const groups = object(settings.hooks) ? settings.hooks[event] : [];
|
|
69
|
+
return Array.isArray(groups) ? groups.flatMap(group => object(group) && Array.isArray(group.hooks) ? group.hooks.filter(object) : []) : [];
|
|
70
|
+
}
|
|
71
|
+
for (const event of [...HOOKS, ...SUBAGENT_HOOKS]) {
|
|
72
|
+
const count = actions(event).filter(action => ownedCommand(action.command, 'hook', launch)).length, supported = HOOKS.includes(event) || atLeast(version, [2, 1, 205]);
|
|
73
|
+
add(count === Number(supported) ? 'OK' : 'ERROR', supported ? count === 1 ? 'doctor.doctor.hook_exactly_one' : 'doctor.doctor.hook_expected_one_found' : count ? 'doctor.doctor.hook_is_unsupported_but_owned_hook_s' : 'doctor.doctor.hook_suspended', { event, count });
|
|
74
|
+
}
|
|
75
|
+
capture(() => {
|
|
76
|
+
const [display, raw] = readDisplay(configDir, io);
|
|
77
|
+
if (raw === null)
|
|
78
|
+
add('OK', 'doctor.doctor.display_config_built_in_defaults');
|
|
79
|
+
else {
|
|
80
|
+
const schema = safeInteger(readJson(decodeUtf8(raw)).schema_version);
|
|
81
|
+
rows.push(schemaDiagnostic(schema));
|
|
82
|
+
}
|
|
83
|
+
const current = settings.subagentStatusLine, owned = object(current) && ownedCommand(current.command, 'render-subagents', launch);
|
|
84
|
+
if (display.subagents.enabled && atLeast(version, [2, 1, 205]))
|
|
85
|
+
add(owned ? 'OK' : 'ERROR', owned ? 'doctor.doctor.subagentstatusline_enabled_and_owned' : 'doctor.doctor.subagentstatusline_is_enabled_but_its_state_is', { state: current == null ? 'absent' : 'foreign' });
|
|
86
|
+
else
|
|
87
|
+
add(owned ? 'ERROR' : 'OK', owned ? 'doctor.doctor.subagentstatusline_is_disabled_but_an_owned_setting' : 'doctor.doctor.subagentstatusline_disabled', { value0: '' });
|
|
88
|
+
});
|
|
89
|
+
const primary = join(configDir, 'skills', SKILL);
|
|
90
|
+
capture(() => { const valid = io.read(join(primary, 'SKILL.md')) !== null && skillOwned(io.read(join(primary, OWNER_FILE))); add(valid ? 'OK' : 'ERROR', valid ? 'doctor.doctor.skill' : 'doctor.doctor.skill_is_missing_or_not_owned', { SLASH_COMMAND_NAME: SKILL }); });
|
|
91
|
+
capture(() => {
|
|
92
|
+
const enabled = loadFeature(configDir, VERSION, io), supported = atLeast(version, [2, 1, 258]), preferencePath = join(configDir, FEATURE_FILENAME), raw = io.read(preferencePath);
|
|
93
|
+
if (raw !== null && process.platform !== 'win32' && (fs.statSync(preferencePath).mode & 0o777) !== 0o600)
|
|
94
|
+
add('ERROR', 'doctor.doctor.experimental_feature_preferences_permissions_expected_0600_found', { preference_mode: (fs.statSync(preferencePath).mode & 0o777).toString(8) });
|
|
95
|
+
const root = join(configDir, 'skills', EXTERNAL), owned = skillOwned(io.read(join(root, OWNER_FILE)));
|
|
96
|
+
const groups = object(settings.hooks) && Array.isArray(settings.hooks.UserPromptExpansion) ? settings.hooks.UserPromptExpansion.filter(object) : [];
|
|
97
|
+
const matching = groups.filter(group => group.matcher === EXTERNAL), hooks = matching.flatMap(group => Array.isArray(group.hooks) ? group.hooks.filter(object) : []), count = hooks.filter(action => ownedCommand(action.command, 'slash-hook', launch) && (() => {
|
|
98
|
+
try {
|
|
99
|
+
return safeInteger(action.timeout) === 600;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
})()).length;
|
|
105
|
+
if (!enabled || !supported)
|
|
106
|
+
add(owned || count ? 'ERROR' : enabled ? 'WARN' : 'OK', owned || count ? enabled ? 'doctor.doctor.is_suspended_but_owned_artifacts_remain_rerun' : 'doctor.doctor.is_disabled_but_owned_artifacts_remain_rerun' : enabled ? 'doctor.doctor.suspended_on_claude_code_requires_2_1' : 'doctor.doctor.disabled', { EXPERIMENTAL_SLASH_COMMAND_NAME: EXTERNAL, version_text: version?.join('.') ?? 'unknown' });
|
|
107
|
+
else {
|
|
108
|
+
add(owned && io.read(join(root, 'SKILL.md')) !== null ? 'OK' : 'ERROR', owned ? 'doctor.doctor.skill_and_owner_marker' : 'doctor.doctor.skill_is_missing_or_not_owned_2', { EXPERIMENTAL_SLASH_COMMAND_NAME: EXTERNAL });
|
|
109
|
+
add(count === 1 && matching.length === 1 ? 'OK' : 'ERROR', count === 1 && matching.length === 1 ? 'doctor.doctor.hook_exactly_one_600s' : 'doctor.doctor.hook_expected_one_600s_hook_in_exactly', { EXPERIMENTAL_SLASH_COMMAND_NAME: EXTERNAL });
|
|
110
|
+
if (!chooseLauncher(process.env))
|
|
111
|
+
add('WARN', 'doctor.doctor.no_supported_interactive_launcher_is_installed_install');
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
for (const spec of [NATIVE, RUNTIME])
|
|
115
|
+
capture(() => modDiagnostics(context, spec, rows));
|
|
116
|
+
return rows;
|
|
117
|
+
}
|
|
118
|
+
function modDiagnostics(context, spec, rows) {
|
|
119
|
+
const { configDir, version, io } = context, modes = spec === RUNTIME ? loadRuntime(configDir, io) : null, requested = modes ? modes.native_timing || modes.live_metrics : loadNative(configDir, undefined, VERSION, io), prefix = spec === RUNTIME ? 'runtime.' : '';
|
|
120
|
+
const add = (level, key, params = {}) => rows.push({ level, message: text(prefix + 'doctor.native.' + key, params) });
|
|
121
|
+
add('OK', 'native_editor_preference', { value0: requested ? 'enabled' : 'disabled' });
|
|
122
|
+
const marker = owner(configDir, spec, io), compatible = atLeast(version, spec.minimum);
|
|
123
|
+
if (!compatible && requested)
|
|
124
|
+
add('WARN', 'native_editor_suspended_preference_retained_rerun_install');
|
|
125
|
+
if (!marker) {
|
|
126
|
+
add(requested && compatible ? 'WARN' : 'OK', 'native_plugin_on_disk_absent', { value0: '' });
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const [settings] = readSettings(configDir, io);
|
|
130
|
+
if (!compatible) {
|
|
131
|
+
if (object(settings.enabledPlugins) && settings.enabledPlugins[spec.plugin] === true)
|
|
132
|
+
add('ERROR', 'native_plugin_is_still_enabled_on_an');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const manifest = bundledFiles(spec).inventory;
|
|
136
|
+
if (marker.backend_version !== manifest.backend_version || marker.mod_version !== manifest.mod_version || marker.protocol_version !== manifest.protocol_version)
|
|
137
|
+
add('ERROR', 'native_mod_backend_version_or_protocol_differs');
|
|
138
|
+
const host = context.host(spec), [markets, plugins] = host.listing(), [registration, row] = registered(configDir, spec, markets, plugins, marker);
|
|
139
|
+
add(registration ? 'OK' : 'ERROR', 'native_marketplace_on_disk', { value0: registration ? 'registered' : 'missing' });
|
|
140
|
+
if (row) {
|
|
141
|
+
cacheOwned(configDir, spec, row, marker, io, true);
|
|
142
|
+
add(row.enabled ? 'OK' : 'WARN', 'native_plugin_on_disk_installed_enabled_tool', { value0: row.enabled, value1: marker.suspended });
|
|
143
|
+
const matches = bindingMatches(host.run(['configure', spec.plugin, '--json'], undefined, true), bindingValues(context, spec));
|
|
144
|
+
add(matches ? 'OK' : 'ERROR', 'native_backend_binding', { value0: matches ? 'matches' : 'differs; rerun install' });
|
|
145
|
+
}
|
|
146
|
+
else
|
|
147
|
+
add('ERROR', 'native_plugin_on_disk_missing_rerun_install');
|
|
148
|
+
commandPreflight(configDir, spec);
|
|
149
|
+
if (settings.disableAllHooks === true)
|
|
150
|
+
add('WARN', 'native_loading_restricted_by_disableallhooks_rerun_install');
|
|
151
|
+
add('WARN', 'native_session_loading_unverified_restart_in_a');
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/integration/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,wCAAwC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAA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,IAAI;QACjC,GAAG,CAAC,MAAM,EAAE,4DAA4D,CAAC,CAAC;IAC9E,GAAG,CAAC,MAAM,EAAE,gDAAgD,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
|
|
2
|
+
/** TS-04 supplies the terminal adapter; the backend owns this request/result boundary. */
|
|
3
|
+
export interface EditorRequest {
|
|
4
|
+
configDir: string;
|
|
5
|
+
backend: LaunchSpec;
|
|
6
|
+
cwd: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface EditorResult {
|
|
9
|
+
outcome: 'updated' | 'already-current' | 'cancelled' | 'interrupted' | 'timed-out' | 'error';
|
|
10
|
+
message?: unknown;
|
|
11
|
+
}
|
|
12
|
+
export type EditorLauncher = (request: EditorRequest) => EditorResult | Promise<EditorResult>;
|
|
13
|
+
export declare const UNAVAILABLE_MESSAGE = "Interactive status line configuration is unavailable here.\nRun `claude-statusline configure` in a terminal, or use `/statusline-config`.";
|
|
14
|
+
export declare const unavailableEditor: EditorLauncher;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const UNAVAILABLE_MESSAGE = 'Interactive status line configuration is unavailable here.\nRun `claude-statusline configure` in a terminal, or use `/statusline-config`.';
|
|
2
|
+
export const unavailableEditor = () => ({ outcome: 'error', message: UNAVAILABLE_MESSAGE });
|
|
3
|
+
//# sourceMappingURL=editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../src/integration/editor.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,mBAAmB,GAAG,2IAA2I,CAAC;AAC/K,MAAM,CAAC,MAAM,iBAAiB,GAAmB,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Storage } from '../config/storage.js';
|
|
2
|
+
import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
|
|
3
|
+
import { type InstallContext, type InstallOptions, type ChangeResult, type Host, type ModSpec } from './model.js';
|
|
4
|
+
export declare function installContext(configDir: string, launch: LaunchSpec, version: readonly number[] | null, io?: Storage, host?: (spec: ModSpec) => Host): InstallContext;
|
|
5
|
+
export declare function install(context: InstallContext, options?: InstallOptions): ChangeResult;
|
|
6
|
+
export declare function uninstall(context: InstallContext, options?: InstallOptions): ChangeResult;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { PluginHost } from '@fbincon/statusline-platform/plugin-host';
|
|
4
|
+
import { equalSettings } from '@fbincon/statusline-core/json-equality';
|
|
5
|
+
import { readJson } from '@fbincon/statusline-core/json-read';
|
|
6
|
+
import { CONFIG_FILENAME, SCHEMA_VERSION, isSchema } from '@fbincon/statusline-core/config/display';
|
|
7
|
+
import { FEATURE_FILENAME, NATIVE_FILENAME, RUNTIME_FILENAME } from '@fbincon/statusline-core/config/backend-preferences';
|
|
8
|
+
import { fail } from '@fbincon/statusline-core/config/validation';
|
|
9
|
+
import { text } from '@fbincon/statusline-core/i18n/messages';
|
|
10
|
+
import { atLeast } from '../config/service.js';
|
|
11
|
+
import { createStorage, decodeUtf8, jsonBytes, readSettings, readDisplay } from '../config/storage.js';
|
|
12
|
+
import { loadFeature, loadNative, loadRuntime } from '../config/backend-preferences.js';
|
|
13
|
+
import { OWNER, OWNER_FILE, SKILL, EXTERNAL, NATIVE, RUNTIME, VERSION } from './model.js';
|
|
14
|
+
import { BINDING_FILE, previousBinding, bindingRecord, skillOwned } from './ownership.js';
|
|
15
|
+
import { renderSkill } from './resources.js';
|
|
16
|
+
import { settingsPlan } from './plan.js';
|
|
17
|
+
import { commandPreflight, integrate } from './mods.js';
|
|
18
|
+
import { commit, safeTarget } from './transaction.js';
|
|
19
|
+
import { administration } from '../recovery/service.js';
|
|
20
|
+
export function installContext(configDir, launch, version, io = createStorage(), host = () => new PluginHost(configDir)) {
|
|
21
|
+
return { configDir, launch, version, io, host };
|
|
22
|
+
}
|
|
23
|
+
function prepare(context, options, uninstall) {
|
|
24
|
+
const { configDir, launch, version, io } = context, previous = previousBinding(configDir, io);
|
|
25
|
+
safeTarget(configDir, join(configDir, 'settings.json'));
|
|
26
|
+
const [settings, settingsRaw] = readSettings(configDir, io), [display, displayRaw] = readDisplay(configDir, io, uninstall);
|
|
27
|
+
const external = !uninstall && (options.external ?? loadFeature(configDir, VERSION, io)), active = external && atLeast(version, [2, 1, 258]);
|
|
28
|
+
const changes = [];
|
|
29
|
+
function add(name, desired, privateMode = false, knownRaw) {
|
|
30
|
+
const path = join(configDir, name);
|
|
31
|
+
safeTarget(configDir, path);
|
|
32
|
+
const raw = knownRaw === undefined ? io.read(path) : knownRaw;
|
|
33
|
+
const equal = raw === null ? desired === null : desired !== null && raw.equals(desired);
|
|
34
|
+
const modeChanged = privateMode && raw !== null && process.platform !== 'win32' && (fs.statSync(path).mode & 0o777) !== 0o600;
|
|
35
|
+
if (!equal || modeChanged)
|
|
36
|
+
changes.push({ name, path, raw, desired });
|
|
37
|
+
}
|
|
38
|
+
if (active) {
|
|
39
|
+
const collision = join(configDir, 'commands', EXTERNAL + '.md');
|
|
40
|
+
try {
|
|
41
|
+
fs.lstatSync(collision);
|
|
42
|
+
fail('errors.installer.foreign_statusline_configure_command_rename_it_before');
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error.code !== 'ENOENT')
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const updated = settingsPlan(settings, { directory: configDir, launch, previous, force: options.force ?? false, fast: atLeast(version, [2, 1, 258]), external: active, subagents: atLeast(version, [2, 1, 205]), rows: display.subagents.enabled }, uninstall);
|
|
50
|
+
if (!equalSettings(settings, updated))
|
|
51
|
+
add('settings.json', jsonBytes(updated), false, settingsRaw);
|
|
52
|
+
for (const name of [SKILL, EXTERNAL]) {
|
|
53
|
+
const base = 'skills/' + name, skill = join(configDir, base, 'SKILL.md'), ownerPath = join(configDir, base, OWNER_FILE);
|
|
54
|
+
safeTarget(configDir, skill);
|
|
55
|
+
safeTarget(configDir, ownerPath);
|
|
56
|
+
const raw = io.read(skill), marker = io.read(ownerPath), owned = skillOwned(marker);
|
|
57
|
+
if (uninstall || name === EXTERNAL && !active) {
|
|
58
|
+
if (owned) {
|
|
59
|
+
add(base + '/SKILL.md', null, false, raw);
|
|
60
|
+
add(base + '/' + OWNER_FILE, null, false, marker);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
if ((raw !== null || marker !== null) && !owned && !options.force)
|
|
65
|
+
fail('errors.installer.an_unrelated_skill_already_exists_rerun_with', { SLASH_COMMAND_NAME: name });
|
|
66
|
+
add(base + '/SKILL.md', renderSkill(launch, name === EXTERNAL), false, raw);
|
|
67
|
+
add(base + '/' + OWNER_FILE, jsonBytes({ owner: OWNER, schema_version: 1 }), false, marker);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (!uninstall) {
|
|
71
|
+
const featurePath = join(configDir, FEATURE_FILENAME), featureRaw = io.read(featurePath);
|
|
72
|
+
if (options.external !== undefined)
|
|
73
|
+
add(FEATURE_FILENAME, jsonBytes({ schema_version: 1, experimental_slash_tui: options.external }), true, featureRaw);
|
|
74
|
+
else if (featureRaw !== null)
|
|
75
|
+
add(FEATURE_FILENAME, featureRaw, true, featureRaw);
|
|
76
|
+
if (options.native !== undefined)
|
|
77
|
+
add(NATIVE_FILENAME, jsonBytes({ schema_version: 1, native_editor: options.native }), true);
|
|
78
|
+
if (displayRaw !== null && !isSchema(readJson(decodeUtf8(displayRaw)).schema_version, SCHEMA_VERSION))
|
|
79
|
+
add(CONFIG_FILENAME, jsonBytes(display), false, displayRaw);
|
|
80
|
+
const runtimeRaw = io.read(join(configDir, RUNTIME_FILENAME));
|
|
81
|
+
if (runtimeRaw !== null || options.liveMetrics !== undefined || options.nativeTiming !== undefined)
|
|
82
|
+
add(RUNTIME_FILENAME, jsonBytes(loadRuntime(configDir, io, options.liveMetrics, options.nativeTiming)), true, runtimeRaw);
|
|
83
|
+
const intents = bindingRecord(configDir, io)?.refresh_disabled;
|
|
84
|
+
add(BINDING_FILE, jsonBytes({ owner: OWNER, schema_version: 1, backend_version: VERSION, launch, ...(intents ? { refresh_disabled: intents } : {}) }));
|
|
85
|
+
}
|
|
86
|
+
else if (previous)
|
|
87
|
+
add(BINDING_FILE, null);
|
|
88
|
+
return changes;
|
|
89
|
+
}
|
|
90
|
+
function changeFiles(context, options, uninstall) {
|
|
91
|
+
const action = uninstall ? 'uninstall' : 'install', { configDir, io } = context;
|
|
92
|
+
function run() {
|
|
93
|
+
const changes = prepare(context, options, uninstall), backupDir = options.dryRun ? null : commit(configDir, action, changes, io);
|
|
94
|
+
if (!options.dryRun)
|
|
95
|
+
for (const name of [SKILL, EXTERNAL]) {
|
|
96
|
+
try {
|
|
97
|
+
fs.rmdirSync(join(configDir, 'skills', name));
|
|
98
|
+
}
|
|
99
|
+
catch { /* Owned files only; preserve unknown files. */ }
|
|
100
|
+
}
|
|
101
|
+
return { action, changed: !!changes.length, settingsPath: join(configDir, 'settings.json'), backupDir, changedPaths: changes.map(change => change.path), messages: [], failed: false };
|
|
102
|
+
}
|
|
103
|
+
return options.dryRun ? run() : io.lock(configDir, run);
|
|
104
|
+
}
|
|
105
|
+
function installImpl(context, options) {
|
|
106
|
+
const { configDir, version, io } = context;
|
|
107
|
+
const requested = loadNative(configDir, options.native, VERSION, io), modes = loadRuntime(configDir, io, options.liveMetrics, options.nativeTiming), runtime = modes.native_timing || modes.live_metrics;
|
|
108
|
+
const external = options.external ?? loadFeature(configDir, VERSION, io), compatible = atLeast(version, NATIVE.minimum);
|
|
109
|
+
if (requested && compatible)
|
|
110
|
+
commandPreflight(configDir, NATIVE);
|
|
111
|
+
const planned = changeFiles(context, { ...options, dryRun: true }, false);
|
|
112
|
+
const externalMessage = text(!external ? 'install.external_disabled' : atLeast(version, [2, 1, 258]) ? 'install.external_enabled' : 'install.external_suspended', { fallback: text('install.external_fallback') });
|
|
113
|
+
if (options.dryRun)
|
|
114
|
+
return { ...planned, nativeState: requested ? compatible ? 'requested' : 'suspended' : 'disabled', messages: [externalMessage, 'Plugin operations are not executed by dry-run.'] };
|
|
115
|
+
const result = changeFiles(context, options, false), native = integrate(context, NATIVE, requested), live = integrate(context, RUNTIME, runtime);
|
|
116
|
+
return { ...result, changed: result.changed || native.changed || live.changed, nativeState: native.state, messages: [externalMessage, ...native.messages, ...live.messages], failed: native.state === 'blocked' || live.state === 'blocked' || options.native === true && !native.active && !(native.state === 'suspended' && !compatible) || (options.liveMetrics === true || options.nativeTiming === true) && !live.active && live.state !== 'suspended' };
|
|
117
|
+
}
|
|
118
|
+
function uninstallImpl(context, options) {
|
|
119
|
+
const planned = changeFiles(context, { ...options, dryRun: true }, true);
|
|
120
|
+
if (options.dryRun)
|
|
121
|
+
return planned;
|
|
122
|
+
const runtime = integrate(context, RUNTIME, false, true);
|
|
123
|
+
if (runtime.state === 'blocked')
|
|
124
|
+
return { ...planned, changed: runtime.changed, changedPaths: [], messages: runtime.messages, failed: true };
|
|
125
|
+
const native = integrate(context, NATIVE, false, true);
|
|
126
|
+
if (native.state === 'blocked')
|
|
127
|
+
return { ...planned, changed: runtime.changed || native.changed, changedPaths: [], messages: [...runtime.messages, ...native.messages], failed: true };
|
|
128
|
+
const result = changeFiles(context, options, true);
|
|
129
|
+
return { ...result, changed: result.changed || runtime.changed || native.changed, nativeState: native.state, messages: [...native.messages, ...runtime.messages] };
|
|
130
|
+
}
|
|
131
|
+
export function install(context, options = {}) {
|
|
132
|
+
// Validation precedes even the administration lock file on invalid input.
|
|
133
|
+
if (!options.dryRun)
|
|
134
|
+
installImpl(context, { ...options, dryRun: true });
|
|
135
|
+
return administration(context, options.dryRun ?? false, tracked => installImpl(tracked, options));
|
|
136
|
+
}
|
|
137
|
+
export function uninstall(context, options = {}) {
|
|
138
|
+
if (!options.dryRun)
|
|
139
|
+
uninstallImpl(context, { ...options, dryRun: true });
|
|
140
|
+
return administration(context, options.dryRun ?? false, tracked => uninstallImpl(tracked, options));
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/integration/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,IAAI,EAAE,MAAM,4CAA4C,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,wCAAwC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAgB,MAAM,sBAAsB,CAAC;AACrH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAwF,MAAM,YAAY,CAAC;AAChL,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,UA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AE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1E,OAAO,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { start, type Launcher } from '@fbincon/statusline-platform/terminal/launchers';
|
|
2
|
+
import { type EditorRequest, type EditorResult } from './editor.js';
|
|
3
|
+
export interface LauncherEnvironment {
|
|
4
|
+
env?: NodeJS.ProcessEnv;
|
|
5
|
+
choose?: () => Launcher | null;
|
|
6
|
+
run?: typeof start;
|
|
7
|
+
now?: () => number;
|
|
8
|
+
sleep?: (ms: number) => Promise<void>;
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function stopEditor(identity: {
|
|
12
|
+
pid: number;
|
|
13
|
+
token: string;
|
|
14
|
+
} | null, sleep?: (ms: number) => Promise<void>): Promise<void>;
|
|
15
|
+
export declare function launchEditor(request: EditorRequest, environment?: LauncherEnvironment): Promise<EditorResult>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { prepare, readResult, started, cleanup, LAUNCH_TIMEOUT } from '@fbincon/statusline-platform/terminal/bridge';
|
|
4
|
+
import { chooseLauncher, bridgeEnvironment, workingDirectory, launcherArguments, start, startWindows } from '@fbincon/statusline-platform/terminal/launchers';
|
|
5
|
+
import { processMatches } from '@fbincon/statusline-platform/processes';
|
|
6
|
+
import { durableUnlink } from '@fbincon/statusline-platform/files';
|
|
7
|
+
import { UNAVAILABLE_MESSAGE } from './editor.js';
|
|
8
|
+
const pause = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
9
|
+
export async function stopEditor(identity, sleep = pause) {
|
|
10
|
+
if (!identity || identity.pid === process.pid || !processMatches(identity.pid, identity.token))
|
|
11
|
+
return;
|
|
12
|
+
try {
|
|
13
|
+
process.kill(identity.pid, 'SIGTERM');
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
for (let i = 0; i < 20 && processMatches(identity.pid, identity.token); i++)
|
|
19
|
+
await sleep(50);
|
|
20
|
+
if (processMatches(identity.pid, identity.token)) {
|
|
21
|
+
try {
|
|
22
|
+
process.kill(identity.pid, 'SIGKILL');
|
|
23
|
+
}
|
|
24
|
+
catch { /* Already exited. */ }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export async function launchEditor(request, environment = {}) {
|
|
28
|
+
const env = environment.env ?? process.env, launcher = (environment.choose ?? (() => chooseLauncher(env)))();
|
|
29
|
+
if (!launcher)
|
|
30
|
+
return { outcome: 'error', message: UNAVAILABLE_MESSAGE };
|
|
31
|
+
const cwd = workingDirectory(request.cwd), now = environment.now ?? (() => performance.now()), sleep = environment.sleep ?? pause;
|
|
32
|
+
let invocation, running, identity = null;
|
|
33
|
+
try {
|
|
34
|
+
invocation = prepare(request.configDir, request.backend, cwd);
|
|
35
|
+
const argv = launcherArguments(launcher, invocation.request, invocation.directory, env);
|
|
36
|
+
running = (environment.run ?? (launcher.kind === 'windows-console' ? startWindows : start))(argv, cwd, bridgeEnvironment(invocation.request, invocation.directory, env));
|
|
37
|
+
const expires = now() + (environment.timeoutMs ?? LAUNCH_TIMEOUT), startup = now() + 30000;
|
|
38
|
+
for (;;) {
|
|
39
|
+
const error = running.error();
|
|
40
|
+
if (error)
|
|
41
|
+
throw error;
|
|
42
|
+
if (!identity && existsSync(join(invocation.directory, 'started.json')))
|
|
43
|
+
identity = started(invocation.directory, request.configDir, invocation.request.nonce);
|
|
44
|
+
if (identity && existsSync(invocation.result)) {
|
|
45
|
+
const result = readResult(invocation.result, request.configDir), code = running.code();
|
|
46
|
+
if (code !== null && code !== result.exit_code && (launcher.kind !== 'macos-terminal' || code !== 0))
|
|
47
|
+
throw new Error('Editor result conflicts with launcher exit');
|
|
48
|
+
if (!processMatches(identity.pid, identity.token) && (launcher.kind === 'macos-terminal' || code !== null))
|
|
49
|
+
return { outcome: result.outcome, message: result.message };
|
|
50
|
+
}
|
|
51
|
+
if (now() >= expires)
|
|
52
|
+
throw new Error('Interactive editor timed out without a confirmed result');
|
|
53
|
+
if (!identity && now() >= startup)
|
|
54
|
+
throw new Error('Interactive terminal did not confirm startup');
|
|
55
|
+
if (!existsSync(invocation.result)) {
|
|
56
|
+
if (launcher.kind !== 'macos-terminal' && running.code() !== null)
|
|
57
|
+
throw new Error('Interactive editor closed without a confirmed result');
|
|
58
|
+
if (identity && !processMatches(identity.pid, identity.token))
|
|
59
|
+
throw new Error('Interactive editor ended without a confirmed result');
|
|
60
|
+
}
|
|
61
|
+
await sleep(50);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return { outcome: 'error', message: 'Interactive status line configuration failed: ' + (error instanceof Error ? error.message : String(error)) };
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
if (invocation) {
|
|
69
|
+
try {
|
|
70
|
+
durableUnlink(invocation.path);
|
|
71
|
+
}
|
|
72
|
+
catch { /* Stop the verified editor even if revocation failed. */ }
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
running?.stop();
|
|
76
|
+
}
|
|
77
|
+
catch { /* Preserve the result and still close native handles. */ }
|
|
78
|
+
await stopEditor(identity, sleep);
|
|
79
|
+
try {
|
|
80
|
+
running?.close();
|
|
81
|
+
}
|
|
82
|
+
catch { /* A failed reap is already an unconfirmed launcher result. */ }
|
|
83
|
+
if (invocation) {
|
|
84
|
+
try {
|
|
85
|
+
cleanup(invocation.directory);
|
|
86
|
+
}
|
|
87
|
+
catch { /* Leave a recoverable private invocation. */ }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=launcher.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AC,yDAAyD,CAAC,CAAC;QACnE,MAAM,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,CAAC;QACrB,CAAC;QACD,MAAM,CAAC,CAAC,8DAA8D,CAAC,CAAC;QACxE,IAAI,UAAU,EAAE,CAAC;YACb,IAAI,CAAC;gBACD,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAClC,CAAC;YACD,MAAM,CAAC,CAAC,6CAA6C,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Storage } from '../config/storage.js';
|
|
2
|
+
import { type ModSpec } from './model.js';
|
|
3
|
+
import { type Inventory } from './resources.js';
|
|
4
|
+
export interface Snapshot {
|
|
5
|
+
mod_version: string;
|
|
6
|
+
files: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export interface Marker extends Inventory {
|
|
9
|
+
owner: string;
|
|
10
|
+
suspended: boolean;
|
|
11
|
+
cache_inventories: Snapshot[];
|
|
12
|
+
}
|
|
13
|
+
export declare function ownedPath(root: string, name: string): string;
|
|
14
|
+
export declare function owner(directory: string, spec: ModSpec, io: Storage, allowMissing?: boolean): Marker | null;
|
|
15
|
+
export declare function registered(directory: string, spec: ModSpec, markets: Record<string, unknown>[], plugins: Record<string, unknown>[], marker: Marker | null): [
|
|
16
|
+
boolean,
|
|
17
|
+
Record<string, unknown> | null
|
|
18
|
+
];
|
|
19
|
+
export declare function cacheOwned(directory: string, spec: ModSpec, row: Record<string, unknown>, marker: Marker, io: Storage, current?: boolean): string;
|
|
20
|
+
export declare function prune(root: string, paths: string[]): void;
|