@kubbisec/ai-linux-arm64 0.1.22 → 0.1.23
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/bin/kubbisec +0 -0
- package/bundled/components/kubbisec-model-selector.d.ts +34 -47
- package/bundled/components/kubbisec-model-selector.js +177 -187
- package/bundled/components/kubbisec-model-selector.js.map +1 -1
- package/bundled/config/config.d.ts +6 -6
- package/bundled/config/config.d.ts.map +1 -1
- package/bundled/config/config.js +52 -54
- package/bundled/config/config.js.map +1 -1
- package/bundled/config/detect-local-llm-providers.d.ts +16 -26
- package/bundled/config/detect-local-llm-providers.js +142 -130
- package/bundled/config/ensure-kbs-project-settings.d.ts +20 -0
- package/bundled/config/ensure-kbs-project-settings.d.ts.map +1 -0
- package/bundled/config/ensure-kbs-project-settings.js +46 -0
- package/bundled/config/ensure-kbs-project-settings.js.map +1 -0
- package/bundled/config/ensure-kubbisec-project-settings.d.ts +11 -9
- package/bundled/config/ensure-kubbisec-project-settings.d.ts.map +1 -1
- package/bundled/config/ensure-kubbisec-project-settings.js +72 -44
- package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
- package/bundled/config/extended-context.d.ts +6 -5
- package/bundled/config/extended-context.js +22 -23
- package/bundled/config/feature-flags.d.ts +2 -10
- package/bundled/config/feature-flags.js +2 -8
- package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
- package/bundled/config/format-kubbisec-footer-status.js +31 -26
- package/bundled/config/kubbisec-extension-manifest.d.ts +2 -22
- package/bundled/config/kubbisec-extension-manifest.d.ts.map +1 -1
- package/bundled/config/kubbisec-extension-manifest.js +19 -20
- package/bundled/config/kubbisec-extension-manifest.js.map +1 -1
- package/bundled/config/llm-config-mutations.d.ts +25 -51
- package/bundled/config/llm-config-mutations.js +182 -173
- package/bundled/config/llm-config.d.ts +41 -54
- package/bundled/config/llm-config.js +199 -199
- package/bundled/config/llm-provider-catalog.d.ts +15 -18
- package/bundled/config/llm-provider-catalog.js +46 -45
- package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
- package/bundled/config/materialize-kubbisec-pi-resources.d.ts.map +1 -1
- package/bundled/config/materialize-kubbisec-pi-resources.js +182 -174
- package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
- package/bundled/config/register-custom-llm-providers.d.ts +5 -11
- package/bundled/config/register-custom-llm-providers.js +15 -17
- package/bundled/config/register-kubbisec-llm-provider.d.ts +10 -14
- package/bundled/config/register-kubbisec-llm-provider.js +42 -50
- package/bundled/config/resolve-agents-context-file.d.ts +1 -1
- package/bundled/config/resolve-agents-context-file.js +34 -33
- package/bundled/config/resource-budget.d.ts +12 -12
- package/bundled/config/resource-budget.js +28 -28
- package/bundled/config/sync-kubbisec-pi-models.d.ts +3 -6
- package/bundled/config/sync-kubbisec-pi-models.js +58 -58
- package/bundled/copy/cli-reference-index.d.ts +2 -7
- package/bundled/copy/cli-reference-index.d.ts.map +1 -1
- package/bundled/copy/cli-reference-index.js +2 -62
- package/bundled/copy/cli-reference-index.js.map +1 -1
- package/bundled/copy/kubbisec-shell-copy.d.ts +6 -11
- package/bundled/copy/kubbisec-shell-copy.js +1 -1
- package/bundled/extensions/cli-local-shared.d.ts +36 -45
- package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
- package/bundled/extensions/cli-local-shared.js +129 -128
- package/bundled/extensions/cli-local-shared.js.map +1 -1
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +15 -18
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-aspm-local.extension.js +106 -121
- package/bundled/extensions/kubbisec-aspm-local.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-brand.extension.js +25 -25
- package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
- package/bundled/extensions/kubbisec-clarify.extension.d.ts +35 -64
- package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-clarify.extension.js +305 -323
- package/bundled/extensions/kubbisec-clarify.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-exit.extension.js +32 -29
- package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-extended-context.extension.js +43 -56
- package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
- package/bundled/extensions/kubbisec-footer.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-footer.extension.js +215 -205
- package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-github-local.extension.d.ts +18 -29
- package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-github-local.extension.js +457 -129
- package/bundled/extensions/kubbisec-github-local.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-llm-config.extension.js +181 -200
- package/bundled/extensions/kubbisec-memory.extension.d.ts +7 -9
- package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-memory.extension.js +95 -88
- package/bundled/extensions/kubbisec-naus-local.extension.d.ts +15 -18
- package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-naus-local.extension.js +103 -135
- package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +21 -31
- package/bundled/extensions/kubbisec-platform-tools.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
- package/bundled/extensions/kubbisec-platform-tools.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +8 -10
- package/bundled/extensions/kubbisec-runtime-status.extension.js +13 -15
- package/bundled/extensions/kubbisec-scope.extension.d.ts +7 -12
- package/bundled/extensions/kubbisec-scope.extension.js +13 -13
- package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +16 -27
- package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-skill-mentions.extension.js +64 -73
- package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +3 -2
- package/bundled/extensions/kubbisec-skill-telemetry.extension.js +64 -59
- package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-theme-lock.extension.js +34 -33
- package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-ui.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-ui.extension.js +122 -116
- package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-workflow.extension.d.ts +18 -20
- package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-workflow.extension.js +140 -138
- package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/ai/index.js +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts +7 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js +30 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts +7 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js +14 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts +6 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js +65 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts +8 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js +29 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts +7 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js +16 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js +36 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts +6 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js +32 -0
- package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts +12 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js +93 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts +13 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js +79 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts +4 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/index.js +20 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts +20 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js +78 -0
- package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts +19 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js +126 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts +1 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/assistant/index.js +1 -0
- package/bundled/node_modules/@aspm/shared/dist/assistant/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/index.js +18 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts +17 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js +30 -0
- package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts +42 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js +147 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts +12 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js +70 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts +4 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/index.js +20 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts +16 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js +45 -0
- package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts +1 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js +6 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts +5 -3
- package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/index.js +5 -3
- package/bundled/node_modules/@aspm/shared/dist/dto/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts +9 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js +52 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/enums.d.ts +3 -1
- package/bundled/node_modules/@aspm/shared/dist/enums.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/enums.js +4 -0
- package/bundled/node_modules/@aspm/shared/dist/enums.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/index.d.ts +8 -2
- package/bundled/node_modules/@aspm/shared/dist/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/index.js +8 -2
- package/bundled/node_modules/@aspm/shared/dist/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts +22 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js +52 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts +37 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js +51 -0
- package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts +7 -4
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js +15 -7
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts +1 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/index.js +1 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js +2 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js +2 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts +8 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js +19 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js +4 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts +1 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/redaction.js +1 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +2 -2
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +2 -2
- package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/index.js +2 -2
- package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts +4 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js +10 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts +4 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js +20 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js +9 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts +3 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js +18 -0
- package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/package.json +27 -5
- package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js +2 -2
- package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js.map +1 -1
- package/bundled/node_modules/@kubbisec/chat-memory/package.json +4 -4
- package/bundled/node_modules/@kubbisec/home/dist/migrate.d.ts.map +1 -1
- package/bundled/node_modules/@kubbisec/home/dist/migrate.js +1 -1
- package/bundled/node_modules/@kubbisec/home/dist/migrate.js.map +1 -1
- package/bundled/node_modules/@kubbisec/home/package.json +3 -3
- package/bundled/resolve-bundled-dist-root.js +130 -122
- package/bundled/resolve-bundled-dist-root.js.map +1 -1
- package/bundled/skills/aspm-platform/SKILL.md +3 -1
- package/bundled/skills/at-path-mentions.d.ts +1 -1
- package/bundled/skills/at-path-mentions.js +153 -146
- package/bundled/skills/chat-mention-render.d.ts +2 -2
- package/bundled/skills/chat-mention-render.js +126 -121
- package/bundled/skills/chat-mentions.d.ts +8 -17
- package/bundled/skills/chat-mentions.js +76 -76
- package/bundled/skills/github-local/SKILL.md +5 -5
- package/bundled/skills/kubbisec-resource-router/SKILL.md +3 -0
- package/bundled/skills/list-bundled-skills.d.ts +3 -3
- package/bundled/skills/list-bundled-skills.js +35 -33
- package/bundled/skills/naus-pipelines/SKILL.md +11 -10
- package/bundled/skills/remediation/SKILL.md +1 -1
- package/bundled/skills/skill-mention.d.ts +2 -10
- package/bundled/skills/skill-mention.js +2 -10
- package/bundled/theme/clear-terminal.d.ts +1 -1
- package/bundled/theme/clear-terminal.js +4 -3
- package/bundled/theme/footer-render-hook.d.ts +1 -1
- package/bundled/theme/footer-render-hook.js +3 -3
- package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
- package/bundled/theme/kubbisec-brand-fg.js +2 -2
- package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
- package/bundled/theme/kubbisec-menu-themes.js +31 -30
- package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
- package/bundled/theme/kubbisec-theme-name.js +1 -1
- package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
- package/bundled/theme/patch-pi-settings-theme.runtime.js +10 -11
- package/bundled/theme/render-compact-header.d.ts +5 -13
- package/bundled/theme/render-compact-header.js +128 -126
- package/bundled/theme/render-compact-header.js.map +1 -1
- package/bundled/workflow/session-workflow-mode.d.ts +1 -1
- package/bundled/workflow/session-workflow-mode.js +33 -33
- package/package.json +1 -1
- package/bundled/clarify/clarify-gate-state.d.ts +0 -3
- package/bundled/clarify/clarify-gate-state.d.ts.map +0 -1
- package/bundled/clarify/clarify-gate-state.js +0 -9
- package/bundled/clarify/clarify-gate-state.js.map +0 -1
- package/bundled/clarify/clarify-gate.d.ts +0 -35
- package/bundled/clarify/clarify-gate.d.ts.map +0 -1
- package/bundled/clarify/clarify-gate.js +0 -159
- package/bundled/clarify/clarify-gate.js.map +0 -1
- package/bundled/clarify/clarify-select-panel.d.ts +0 -21
- package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
- package/bundled/clarify/clarify-select-panel.js +0 -80
- package/bundled/clarify/clarify-select-panel.js.map +0 -1
- package/bundled/clarify/clarify-ui-state.d.ts +0 -23
- package/bundled/clarify/clarify-ui-state.d.ts.map +0 -1
- package/bundled/clarify/clarify-ui-state.js +0 -48
- package/bundled/clarify/clarify-ui-state.js.map +0 -1
- package/bundled/clarify/parse-clarify-answer.d.ts +0 -32
- package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
- package/bundled/clarify/parse-clarify-answer.js +0 -51
- package/bundled/clarify/parse-clarify-answer.js.map +0 -1
- package/bundled/clarify/question-format.d.ts +0 -50
- package/bundled/clarify/question-format.d.ts.map +0 -1
- package/bundled/clarify/question-format.js +0 -137
- package/bundled/clarify/question-format.js.map +0 -1
- package/bundled/clarify/questionnaire-tool.d.ts +0 -36
- package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
- package/bundled/clarify/questionnaire-tool.js +0 -197
- package/bundled/clarify/questionnaire-tool.js.map +0 -1
- package/bundled/clarify/scope-discovery.d.ts +0 -12
- package/bundled/clarify/scope-discovery.d.ts.map +0 -1
- package/bundled/clarify/scope-discovery.js +0 -122
- package/bundled/clarify/scope-discovery.js.map +0 -1
- package/bundled/clarify/session-questionnaire.d.ts +0 -61
- package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
- package/bundled/clarify/session-questionnaire.js +0 -364
- package/bundled/clarify/session-questionnaire.js.map +0 -1
- package/bundled/clarify/session-questionnaire.types.d.ts +0 -49
- package/bundled/clarify/session-questionnaire.types.d.ts.map +0 -1
- package/bundled/clarify/session-questionnaire.types.js +0 -13
- package/bundled/clarify/session-questionnaire.types.js.map +0 -1
|
@@ -1,177 +1,184 @@
|
|
|
1
1
|
import { readdirSync, statSync } from "node:fs";
|
|
2
2
|
import { basename, dirname, join, relative } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
extractAtPrefix,
|
|
5
|
-
parsePlanMentionPrefix,
|
|
6
|
-
parseSkillMentionPrefix,
|
|
7
|
-
} from "./chat-mentions.js";
|
|
8
|
-
|
|
3
|
+
import { extractAtPrefix, parsePlanMentionPrefix, parseSkillMentionPrefix, } from "./chat-mentions.js";
|
|
9
4
|
function toDisplayPath(value) {
|
|
10
|
-
|
|
5
|
+
return value.replace(/\\/g, "/");
|
|
11
6
|
}
|
|
12
7
|
function parsePathPrefix(prefix) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
if (prefix.startsWith('@"')) {
|
|
9
|
+
return { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };
|
|
10
|
+
}
|
|
11
|
+
if (prefix.startsWith('"')) {
|
|
12
|
+
return { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };
|
|
13
|
+
}
|
|
14
|
+
if (prefix.startsWith("@")) {
|
|
15
|
+
return { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };
|
|
16
|
+
}
|
|
17
|
+
return { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };
|
|
23
18
|
}
|
|
24
19
|
function buildCompletionValue(path, options) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
const needsQuotes = options.isQuotedPrefix || path.includes(" ");
|
|
21
|
+
const prefix = options.isAtPrefix ? "@" : "";
|
|
22
|
+
if (!needsQuotes) {
|
|
23
|
+
return `${prefix}${path}`;
|
|
24
|
+
}
|
|
25
|
+
const openQuote = `${prefix}"`;
|
|
26
|
+
return `${openQuote}${path}"`;
|
|
32
27
|
}
|
|
33
28
|
const DEPRIORITIZED_AT_PATH_NAMES = new Set([
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
"node_modules",
|
|
30
|
+
"dist",
|
|
31
|
+
"dist-bin",
|
|
32
|
+
".turbo",
|
|
33
|
+
".git",
|
|
34
|
+
"coverage",
|
|
35
|
+
"build",
|
|
36
|
+
".next",
|
|
37
|
+
".cache",
|
|
38
|
+
"tmp",
|
|
39
|
+
".venv",
|
|
40
|
+
"target",
|
|
46
41
|
]);
|
|
47
42
|
const PRIORITY_AT_PATH_DIRS = [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
"src",
|
|
44
|
+
"lib",
|
|
45
|
+
"apps",
|
|
46
|
+
"packages",
|
|
47
|
+
"scripts",
|
|
48
|
+
"test",
|
|
49
|
+
"tests",
|
|
50
|
+
"docs",
|
|
51
|
+
"spec",
|
|
57
52
|
];
|
|
58
53
|
const PRIORITY_AT_PATH_FILES = [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
"package.json",
|
|
55
|
+
"README.md",
|
|
56
|
+
"readme.md",
|
|
57
|
+
"tsconfig.json",
|
|
58
|
+
"vitest.config.ts",
|
|
59
|
+
"Cargo.toml",
|
|
60
|
+
"go.mod",
|
|
61
|
+
"pyproject.toml",
|
|
62
|
+
"Makefile",
|
|
68
63
|
];
|
|
69
64
|
function atPathSuggestionRank(label) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
const name = label.replace(/\/$/, "");
|
|
66
|
+
if (PRIORITY_AT_PATH_DIRS.includes(name) ||
|
|
67
|
+
PRIORITY_AT_PATH_FILES.includes(name)) {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
if (DEPRIORITIZED_AT_PATH_NAMES.has(name)) {
|
|
71
|
+
return 3;
|
|
72
|
+
}
|
|
73
|
+
if (label.endsWith("/")) {
|
|
74
|
+
return 1;
|
|
75
|
+
}
|
|
76
|
+
return 2;
|
|
81
77
|
}
|
|
82
78
|
function sortAtPathSuggestions(items, rawPrefix) {
|
|
83
|
-
|
|
79
|
+
if (rawPrefix !== "") {
|
|
80
|
+
return items.sort((a, b) => {
|
|
81
|
+
const aIsDir = a.label.endsWith("/");
|
|
82
|
+
const bIsDir = b.label.endsWith("/");
|
|
83
|
+
if (aIsDir && !bIsDir)
|
|
84
|
+
return -1;
|
|
85
|
+
if (!aIsDir && bIsDir)
|
|
86
|
+
return 1;
|
|
87
|
+
return a.label.localeCompare(b.label);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
84
90
|
return items.sort((a, b) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return a.label.localeCompare(b.label);
|
|
91
|
+
const rankDiff = atPathSuggestionRank(a.label) - atPathSuggestionRank(b.label);
|
|
92
|
+
if (rankDiff !== 0)
|
|
93
|
+
return rankDiff;
|
|
94
|
+
return a.label.localeCompare(b.label);
|
|
90
95
|
});
|
|
91
|
-
}
|
|
92
|
-
return items.sort((a, b) => {
|
|
93
|
-
const rankDiff = atPathSuggestionRank(a.label) - atPathSuggestionRank(b.label);
|
|
94
|
-
if (rankDiff !== 0) return rankDiff;
|
|
95
|
-
return a.label.localeCompare(b.label);
|
|
96
|
-
});
|
|
97
96
|
}
|
|
98
97
|
/** `@` file attachment (not `@skill` / `@plan`). */
|
|
99
98
|
export function isAtFileAttachmentPrefix(atPrefix) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
if (!atPrefix)
|
|
100
|
+
return false;
|
|
101
|
+
if (parseSkillMentionPrefix(atPrefix))
|
|
102
|
+
return false;
|
|
103
|
+
if (parsePlanMentionPrefix(atPrefix))
|
|
104
|
+
return false;
|
|
105
|
+
return atPrefix.startsWith("@");
|
|
104
106
|
}
|
|
105
107
|
/** List cwd-scoped entries for `@` / `@path` (Pi getFileSuggestions semantics). */
|
|
106
108
|
export function getAtPathFileSuggestions(cwd, atPrefix) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} else if (rawPrefix.endsWith("/")) {
|
|
123
|
-
searchDir = join(cwd, expandedPrefix);
|
|
124
|
-
searchPrefix = "";
|
|
125
|
-
} else {
|
|
126
|
-
searchDir = join(cwd, dirname(expandedPrefix));
|
|
127
|
-
searchPrefix = basename(expandedPrefix);
|
|
128
|
-
}
|
|
129
|
-
const entries = readdirSync(searchDir, { withFileTypes: true });
|
|
130
|
-
const suggestions = [];
|
|
131
|
-
const cwdLabel = toDisplayPath(relative(cwd, searchDir) || ".");
|
|
132
|
-
for (const entry of entries) {
|
|
133
|
-
if (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
let isDirectory = entry.isDirectory();
|
|
137
|
-
if (!isDirectory && entry.isSymbolicLink()) {
|
|
138
|
-
try {
|
|
139
|
-
isDirectory = statSync(join(searchDir, entry.name)).isDirectory();
|
|
140
|
-
} catch {
|
|
141
|
-
// broken symlink — treat as file
|
|
109
|
+
try {
|
|
110
|
+
const { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);
|
|
111
|
+
if (!isAtPrefix)
|
|
112
|
+
return [];
|
|
113
|
+
let searchDir;
|
|
114
|
+
let searchPrefix;
|
|
115
|
+
const expandedPrefix = rawPrefix;
|
|
116
|
+
const isRootPrefix = rawPrefix === "" ||
|
|
117
|
+
rawPrefix === "./" ||
|
|
118
|
+
rawPrefix === "../" ||
|
|
119
|
+
rawPrefix === "/" ||
|
|
120
|
+
(isAtPrefix && rawPrefix === "");
|
|
121
|
+
if (isRootPrefix) {
|
|
122
|
+
searchDir = join(cwd, expandedPrefix);
|
|
123
|
+
searchPrefix = "";
|
|
142
124
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const name = entry.name;
|
|
147
|
-
if (displayPrefix.endsWith("/")) {
|
|
148
|
-
relativePath = displayPrefix + name;
|
|
149
|
-
} else if (displayPrefix.includes("/")) {
|
|
150
|
-
relativePath = join(dirname(displayPrefix), name);
|
|
151
|
-
if (displayPrefix.startsWith("./") && !relativePath.startsWith("./")) {
|
|
152
|
-
relativePath = `./${relativePath}`;
|
|
125
|
+
else if (rawPrefix.endsWith("/")) {
|
|
126
|
+
searchDir = join(cwd, expandedPrefix);
|
|
127
|
+
searchPrefix = "";
|
|
153
128
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
129
|
+
else {
|
|
130
|
+
searchDir = join(cwd, dirname(expandedPrefix));
|
|
131
|
+
searchPrefix = basename(expandedPrefix);
|
|
132
|
+
}
|
|
133
|
+
const entries = readdirSync(searchDir, { withFileTypes: true });
|
|
134
|
+
const suggestions = [];
|
|
135
|
+
const cwdLabel = toDisplayPath(relative(cwd, searchDir) || ".");
|
|
136
|
+
for (const entry of entries) {
|
|
137
|
+
if (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
let isDirectory = entry.isDirectory();
|
|
141
|
+
if (!isDirectory && entry.isSymbolicLink()) {
|
|
142
|
+
try {
|
|
143
|
+
isDirectory = statSync(join(searchDir, entry.name)).isDirectory();
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// broken symlink — treat as file
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
let relativePath;
|
|
150
|
+
const displayPrefix = rawPrefix;
|
|
151
|
+
const name = entry.name;
|
|
152
|
+
if (displayPrefix.endsWith("/")) {
|
|
153
|
+
relativePath = displayPrefix + name;
|
|
154
|
+
}
|
|
155
|
+
else if (displayPrefix.includes("/")) {
|
|
156
|
+
relativePath = join(dirname(displayPrefix), name);
|
|
157
|
+
if (displayPrefix.startsWith("./") && !relativePath.startsWith("./")) {
|
|
158
|
+
relativePath = `./${relativePath}`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
relativePath = name;
|
|
163
|
+
}
|
|
164
|
+
relativePath = toDisplayPath(relativePath);
|
|
165
|
+
const pathValue = isDirectory ? `${relativePath}/` : relativePath;
|
|
166
|
+
const value = buildCompletionValue(pathValue, { isAtPrefix, isQuotedPrefix });
|
|
167
|
+
const entryRelative = toDisplayPath(relative(cwd, join(searchDir, entry.name)));
|
|
168
|
+
suggestions.push({
|
|
169
|
+
value,
|
|
170
|
+
label: name + (isDirectory ? "/" : ""),
|
|
171
|
+
description: searchDir === cwd && rawPrefix === "" ? entryRelative : `${cwdLabel}/${entryRelative}`,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return sortAtPathSuggestions(suggestions, rawPrefix);
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
return [];
|
|
167
178
|
}
|
|
168
|
-
return sortAtPathSuggestions(suggestions, rawPrefix);
|
|
169
|
-
} catch {
|
|
170
|
-
return [];
|
|
171
|
-
}
|
|
172
179
|
}
|
|
173
180
|
export function extractAtFilePrefix(textBeforeCursor) {
|
|
174
|
-
|
|
175
|
-
|
|
181
|
+
const atPrefix = extractAtPrefix(textBeforeCursor);
|
|
182
|
+
return isAtFileAttachmentPrefix(atPrefix) ? atPrefix : null;
|
|
176
183
|
}
|
|
177
|
-
//# sourceMappingURL=at-path-mentions.js.map
|
|
184
|
+
//# sourceMappingURL=at-path-mentions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type MentionChipTheme = {
|
|
2
|
-
|
|
2
|
+
fg: (role: string, text: string) => string;
|
|
3
3
|
};
|
|
4
4
|
export declare function renderLineWithMentionChips(line: string, theme: MentionChipTheme): string;
|
|
5
5
|
export declare function logicalToVisibleCol(line: string, logicalCol: number): number;
|
|
6
6
|
export declare function visibleToLogicalCol(line: string, visibleCol: number): number;
|
|
7
|
-
//# sourceMappingURL=chat-mention-render.d.ts.map
|
|
7
|
+
//# sourceMappingURL=chat-mention-render.d.ts.map
|
|
@@ -1,155 +1,160 @@
|
|
|
1
1
|
import { visibleWidth } from "@earendil-works/pi-tui";
|
|
2
2
|
import { PLAN_MENTION_ALIASES } from "./chat-mentions.js";
|
|
3
|
-
|
|
4
3
|
const SKILL_SLASH_RE = /\/skill:([a-z0-9_-]+)/gi;
|
|
5
4
|
const AT_SKILL_RE = /@skill\s+([^\s@/]+)/gi;
|
|
6
5
|
const PLAN_TOKEN_RE = /\/mode:plan\b/gi;
|
|
7
6
|
const AT_PLAN_PATTERN = PLAN_MENTION_ALIASES.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
.sort((a, b) => b.length - a.length)
|
|
8
|
+
.join("|");
|
|
10
9
|
const AT_PLAN_RE = new RegExp(`(?:^|[\\s"'=])(${AT_PLAN_PATTERN})(?=\\s|$)`, "gi");
|
|
11
10
|
const PLAN_VISIBLE_LABEL = "@plan";
|
|
12
11
|
function findNextMentionMatch(line, cursor) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
candidate.index < earliest.index ? candidate : earliest
|
|
56
|
-
);
|
|
12
|
+
const candidates = [];
|
|
13
|
+
SKILL_SLASH_RE.lastIndex = cursor;
|
|
14
|
+
const slashMatch = SKILL_SLASH_RE.exec(line);
|
|
15
|
+
if (slashMatch?.index !== undefined) {
|
|
16
|
+
candidates.push({
|
|
17
|
+
index: slashMatch.index,
|
|
18
|
+
length: slashMatch[0].length,
|
|
19
|
+
span: { kind: "skill", name: slashMatch[1] ?? "", source: "slash" },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
AT_SKILL_RE.lastIndex = cursor;
|
|
23
|
+
const atMatch = AT_SKILL_RE.exec(line);
|
|
24
|
+
if (atMatch?.index !== undefined) {
|
|
25
|
+
candidates.push({
|
|
26
|
+
index: atMatch.index,
|
|
27
|
+
length: atMatch[0].length,
|
|
28
|
+
span: { kind: "skill", name: atMatch[1] ?? "", source: "at" },
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
PLAN_TOKEN_RE.lastIndex = cursor;
|
|
32
|
+
const planMatch = PLAN_TOKEN_RE.exec(line);
|
|
33
|
+
if (planMatch?.index !== undefined) {
|
|
34
|
+
candidates.push({
|
|
35
|
+
index: planMatch.index,
|
|
36
|
+
length: planMatch[0].length,
|
|
37
|
+
span: { kind: "plan", logicalToken: planMatch[0] },
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
AT_PLAN_RE.lastIndex = cursor;
|
|
41
|
+
const atPlanMatch = AT_PLAN_RE.exec(line);
|
|
42
|
+
if (atPlanMatch?.index !== undefined) {
|
|
43
|
+
const token = atPlanMatch[1] ?? "@plan";
|
|
44
|
+
const leading = atPlanMatch[0].length - token.length;
|
|
45
|
+
const index = atPlanMatch.index + leading;
|
|
46
|
+
candidates.push({
|
|
47
|
+
index,
|
|
48
|
+
length: token.length,
|
|
49
|
+
span: { kind: "plan", logicalToken: token },
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (candidates.length === 0)
|
|
53
|
+
return null;
|
|
54
|
+
return candidates.reduce((earliest, candidate) => candidate.index < earliest.index ? candidate : earliest);
|
|
57
55
|
}
|
|
58
56
|
function parseMentionSpans(line) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
const spans = [];
|
|
58
|
+
let cursor = 0;
|
|
59
|
+
while (cursor < line.length) {
|
|
60
|
+
const nextMatch = findNextMentionMatch(line, cursor);
|
|
61
|
+
if (!nextMatch) {
|
|
62
|
+
spans.push({ kind: "text", value: line.slice(cursor) });
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
if (nextMatch.index > cursor) {
|
|
66
|
+
spans.push({ kind: "text", value: line.slice(cursor, nextMatch.index) });
|
|
67
|
+
}
|
|
68
|
+
spans.push(nextMatch.span);
|
|
69
|
+
cursor = nextMatch.index + nextMatch.length;
|
|
66
70
|
}
|
|
67
|
-
if (
|
|
68
|
-
|
|
71
|
+
if (spans.length === 0) {
|
|
72
|
+
spans.push({ kind: "text", value: line });
|
|
69
73
|
}
|
|
70
|
-
spans
|
|
71
|
-
cursor = nextMatch.index + nextMatch.length;
|
|
72
|
-
}
|
|
73
|
-
if (spans.length === 0) {
|
|
74
|
-
spans.push({ kind: "text", value: line });
|
|
75
|
-
}
|
|
76
|
-
return spans;
|
|
74
|
+
return spans;
|
|
77
75
|
}
|
|
78
76
|
function skillVisibleText(span) {
|
|
79
|
-
|
|
77
|
+
return span.source === "at" ? `@${span.name}` : span.name;
|
|
80
78
|
}
|
|
81
79
|
function skillLogicalText(span) {
|
|
82
|
-
|
|
80
|
+
return span.source === "at" ? `@skill ${span.name}` : `/skill:${span.name}`;
|
|
83
81
|
}
|
|
84
82
|
function renderSpan(span, theme) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
if (span.kind === "text")
|
|
84
|
+
return span.value;
|
|
85
|
+
if (span.kind === "skill") {
|
|
86
|
+
const text = skillVisibleText(span);
|
|
87
|
+
try {
|
|
88
|
+
return theme.fg("accent", text);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return theme.fg("text", text);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
88
94
|
try {
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
95
|
+
return theme.fg("planAccent", PLAN_VISIBLE_LABEL);
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return theme.fg("text", PLAN_VISIBLE_LABEL);
|
|
92
99
|
}
|
|
93
|
-
}
|
|
94
|
-
try {
|
|
95
|
-
return theme.fg("planAccent", PLAN_VISIBLE_LABEL);
|
|
96
|
-
} catch {
|
|
97
|
-
return theme.fg("text", PLAN_VISIBLE_LABEL);
|
|
98
|
-
}
|
|
99
100
|
}
|
|
100
101
|
function spanLogicalWidth(span) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
if (span.kind === "text")
|
|
103
|
+
return span.value.length;
|
|
104
|
+
if (span.kind === "skill")
|
|
105
|
+
return skillLogicalText(span).length;
|
|
106
|
+
return span.logicalToken.length;
|
|
104
107
|
}
|
|
105
108
|
function spanVisibleText(span) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
if (span.kind === "text")
|
|
110
|
+
return span.value;
|
|
111
|
+
if (span.kind === "skill")
|
|
112
|
+
return skillVisibleText(span);
|
|
113
|
+
return PLAN_VISIBLE_LABEL;
|
|
109
114
|
}
|
|
110
115
|
export function renderLineWithMentionChips(line, theme) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
return parseMentionSpans(line)
|
|
117
|
+
.map((span) => renderSpan(span, theme))
|
|
118
|
+
.join("");
|
|
114
119
|
}
|
|
115
120
|
export function logicalToVisibleCol(line, logicalCol) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
const clamped = Math.max(0, Math.min(logicalCol, line.length));
|
|
122
|
+
let logical = 0;
|
|
123
|
+
let visible = 0;
|
|
124
|
+
for (const span of parseMentionSpans(line)) {
|
|
125
|
+
const logicalLen = spanLogicalWidth(span);
|
|
126
|
+
const visibleLen = visibleWidth(spanVisibleText(span));
|
|
127
|
+
if (logical + logicalLen >= clamped) {
|
|
128
|
+
const offset = clamped - logical;
|
|
129
|
+
if (span.kind === "text") {
|
|
130
|
+
return visible + offset;
|
|
131
|
+
}
|
|
132
|
+
const ratio = logicalLen > 0 ? offset / logicalLen : 0;
|
|
133
|
+
return visible + Math.round(visibleLen * ratio);
|
|
134
|
+
}
|
|
135
|
+
logical += logicalLen;
|
|
136
|
+
visible += visibleLen;
|
|
129
137
|
}
|
|
130
|
-
|
|
131
|
-
visible += visibleLen;
|
|
132
|
-
}
|
|
133
|
-
return visible;
|
|
138
|
+
return visible;
|
|
134
139
|
}
|
|
135
140
|
export function visibleToLogicalCol(line, visibleCol) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
const clamped = Math.max(0, visibleCol);
|
|
142
|
+
let logical = 0;
|
|
143
|
+
let visible = 0;
|
|
144
|
+
for (const span of parseMentionSpans(line)) {
|
|
145
|
+
const logicalLen = spanLogicalWidth(span);
|
|
146
|
+
const visibleLen = visibleWidth(spanVisibleText(span));
|
|
147
|
+
if (visible + visibleLen >= clamped) {
|
|
148
|
+
const offset = clamped - visible;
|
|
149
|
+
if (span.kind === "text") {
|
|
150
|
+
return logical + offset;
|
|
151
|
+
}
|
|
152
|
+
const ratio = visibleLen > 0 ? offset / visibleLen : 0;
|
|
153
|
+
return logical + Math.round(logicalLen * ratio);
|
|
154
|
+
}
|
|
155
|
+
logical += logicalLen;
|
|
156
|
+
visible += visibleLen;
|
|
149
157
|
}
|
|
150
|
-
|
|
151
|
-
visible += visibleLen;
|
|
152
|
-
}
|
|
153
|
-
return line.length;
|
|
158
|
+
return line.length;
|
|
154
159
|
}
|
|
155
|
-
//# sourceMappingURL=chat-mention-render.js.map
|
|
160
|
+
//# sourceMappingURL=chat-mention-render.js.map
|
|
@@ -7,15 +7,12 @@ export declare function extractAtPrefix(textBeforeCursor: string): string | null
|
|
|
7
7
|
/** KubbiSec: `@skill` may include a space and partial name (not only the last @ token). */
|
|
8
8
|
export declare function extractSkillMentionPrefix(textBeforeCursor: string): string | null;
|
|
9
9
|
export declare function parseSkillMentionPrefix(atPrefix: string | null): {
|
|
10
|
-
|
|
10
|
+
query: string;
|
|
11
11
|
} | null;
|
|
12
12
|
export declare function parsePlanMentionPrefix(atPrefix: string | null): {
|
|
13
|
-
|
|
13
|
+
query: string;
|
|
14
14
|
} | null;
|
|
15
|
-
export declare function filterSkillSuggestions(
|
|
16
|
-
skills: KubbisecSkillEntry[],
|
|
17
|
-
query: string,
|
|
18
|
-
): AutocompleteItem[];
|
|
15
|
+
export declare function filterSkillSuggestions(skills: KubbisecSkillEntry[], query: string): AutocompleteItem[];
|
|
19
16
|
/** Pi expands `/skill:name` — map `@skill name` before submit. */
|
|
20
17
|
export declare function transformAtSkillMentions(text: string): string;
|
|
21
18
|
/** Legacy: map `@plan` / `@planejar` to `/mode:plan` (prefer session state + visible @plan). */
|
|
@@ -23,15 +20,9 @@ export declare function transformAtPlanMentions(text: string): string;
|
|
|
23
20
|
/** Apply @skill → /skill:name only. @plan stays visible; plan mode is set via session state. */
|
|
24
21
|
export declare function transformChatMentions(text: string): string;
|
|
25
22
|
export declare function messageActivatesPlanMode(text: string): boolean;
|
|
26
|
-
export declare function applySkillMentionCompletion(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
item: AutocompleteItem,
|
|
31
|
-
prefix: string,
|
|
32
|
-
): {
|
|
33
|
-
lines: string[];
|
|
34
|
-
cursorLine: number;
|
|
35
|
-
cursorCol: number;
|
|
23
|
+
export declare function applySkillMentionCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
|
|
24
|
+
lines: string[];
|
|
25
|
+
cursorLine: number;
|
|
26
|
+
cursorCol: number;
|
|
36
27
|
};
|
|
37
|
-
//# sourceMappingURL=chat-mentions.d.ts.map
|
|
28
|
+
//# sourceMappingURL=chat-mentions.d.ts.map
|