@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,230 +1,211 @@
|
|
|
1
|
-
import {
|
|
2
|
-
groupModelsForSelector,
|
|
3
|
-
KubbisecModelSelectorComponent,
|
|
4
|
-
} from "../components/kubbisec-model-selector.js";
|
|
1
|
+
import { groupModelsForSelector, KubbisecModelSelectorComponent, } from "../components/kubbisec-model-selector.js";
|
|
5
2
|
import { syncAutodetectedLocalProviders } from "../config/detect-local-llm-providers.js";
|
|
6
|
-
import {
|
|
7
|
-
applyLlmConfigToPiSettings,
|
|
8
|
-
applyTemperatureToProviderPayload,
|
|
9
|
-
getRuntimeTemperature,
|
|
10
|
-
readLlmConfig,
|
|
11
|
-
setRuntimeTemperature,
|
|
12
|
-
writeLlmConfig,
|
|
13
|
-
} from "../config/llm-config.js";
|
|
3
|
+
import { applyLlmConfigToPiSettings, applyTemperatureToProviderPayload, getRuntimeTemperature, readLlmConfig, setRuntimeTemperature, writeLlmConfig, } from "../config/llm-config.js";
|
|
14
4
|
import { KUBBISEC_LLM_PROVIDER_ID } from "../config/llm-provider-catalog.js";
|
|
15
5
|
import { registerCustomLlmProviders } from "../config/register-custom-llm-providers.js";
|
|
16
6
|
import { registerKubbisecLlmProvider } from "../config/register-kubbisec-llm-provider.js";
|
|
17
7
|
import { requestKubbisecFooterRender } from "../theme/footer-render-hook.js";
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
const THINKING_LEVELS = [
|
|
9
|
+
"off",
|
|
10
|
+
"minimal",
|
|
11
|
+
"low",
|
|
12
|
+
"medium",
|
|
13
|
+
"high",
|
|
14
|
+
"xhigh",
|
|
15
|
+
];
|
|
20
16
|
function isThinkingLevel(value) {
|
|
21
|
-
|
|
17
|
+
return THINKING_LEVELS.includes(value);
|
|
22
18
|
}
|
|
23
19
|
async function refreshProviders(api, cwd) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
await syncAutodetectedLocalProviders(cwd);
|
|
21
|
+
registerKubbisecLlmProvider(api.registerProvider.bind(api), cwd);
|
|
22
|
+
registerCustomLlmProviders(api.registerProvider.bind(api), readLlmConfig(cwd));
|
|
27
23
|
}
|
|
28
24
|
async function applyDefaultModel(api, ctx) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
const config = readLlmConfig(ctx.cwd);
|
|
26
|
+
const provider = config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID;
|
|
27
|
+
const modelId = config.defaultModel?.trim();
|
|
28
|
+
if (!modelId)
|
|
29
|
+
return;
|
|
30
|
+
const model = ctx.modelRegistry.find(provider, modelId);
|
|
31
|
+
if (!model)
|
|
32
|
+
return;
|
|
33
|
+
const current = ctx.model;
|
|
34
|
+
if (current?.provider === model.provider && current.id === model.id)
|
|
35
|
+
return;
|
|
36
|
+
await api.setModel(model);
|
|
38
37
|
}
|
|
39
38
|
function applyDefaultThinking(api, ctx) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const config = readLlmConfig(ctx.cwd);
|
|
40
|
+
if (!config.defaultThinkingLevel)
|
|
41
|
+
return;
|
|
42
|
+
if (api.getThinkingLevel() === config.defaultThinkingLevel)
|
|
43
|
+
return;
|
|
44
|
+
api.setThinkingLevel(config.defaultThinkingLevel);
|
|
44
45
|
}
|
|
45
46
|
async function showGroupedModelSelector(api, ctx, initialSearch = "") {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
ctx.modelRegistry.getProviderDisplayName(provider)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
tui,
|
|
56
|
-
ctx.model,
|
|
57
|
-
groups,
|
|
58
|
-
theme,
|
|
59
|
-
async (model) => {
|
|
60
|
-
const ok = await api.setModel(model);
|
|
61
|
-
if (!ok) {
|
|
62
|
-
ctx.ui.notify(
|
|
63
|
-
"Chave de API não configurada para este provedor. Edite .kubbisec/llm.json ou use /login.",
|
|
64
|
-
"error",
|
|
65
|
-
);
|
|
47
|
+
if (!ctx.hasUI)
|
|
48
|
+
return;
|
|
49
|
+
ctx.modelRegistry.refresh();
|
|
50
|
+
const models = ctx.modelRegistry.getAvailable();
|
|
51
|
+
const groups = groupModelsForSelector(models, (provider) => ctx.modelRegistry.getProviderDisplayName(provider));
|
|
52
|
+
await ctx.ui.custom((tui, theme, _keybindings, done) => new KubbisecModelSelectorComponent(tui, ctx.model, groups, theme, async (model) => {
|
|
53
|
+
const ok = await api.setModel(model);
|
|
54
|
+
if (!ok) {
|
|
55
|
+
ctx.ui.notify("Chave de API não configurada para este provedor. Edite .kubbisec/llm.json ou use /login.", "error");
|
|
66
56
|
return;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
57
|
+
}
|
|
58
|
+
const config = readLlmConfig(ctx.cwd);
|
|
59
|
+
writeLlmConfig(ctx.cwd, {
|
|
70
60
|
...config,
|
|
71
61
|
defaultProvider: model.provider,
|
|
72
62
|
defaultModel: model.id,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
);
|
|
78
|
-
done(undefined);
|
|
79
|
-
},
|
|
80
|
-
() => done(undefined),
|
|
81
|
-
initialSearch,
|
|
82
|
-
),
|
|
83
|
-
);
|
|
63
|
+
});
|
|
64
|
+
ctx.ui.notify(`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`, "info");
|
|
65
|
+
done(undefined);
|
|
66
|
+
}, () => done(undefined), initialSearch));
|
|
84
67
|
}
|
|
85
68
|
async function handleModelCommand(api, args, ctx) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`,
|
|
116
|
-
"info",
|
|
117
|
-
);
|
|
69
|
+
const trimmed = args.trim();
|
|
70
|
+
if (!trimmed || trimmed === "list" || trimmed === "select") {
|
|
71
|
+
await showGroupedModelSelector(api, ctx, trimmed === "list" ? "" : "");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const slash = trimmed.indexOf("/");
|
|
75
|
+
const provider = slash >= 0 ? trimmed.slice(0, slash).trim() : KUBBISEC_LLM_PROVIDER_ID;
|
|
76
|
+
const modelId = slash >= 0 ? trimmed.slice(slash + 1).trim() : trimmed;
|
|
77
|
+
if (!modelId) {
|
|
78
|
+
ctx.ui?.notify("Uso: /model [provedor/]modelo-id ou /model para abrir o seletor.", "warning");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const model = ctx.modelRegistry.find(provider, modelId);
|
|
82
|
+
if (!model) {
|
|
83
|
+
ctx.ui?.notify(`Modelo não encontrado: ${provider}/${modelId}`, "error");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const ok = await api.setModel(model);
|
|
87
|
+
if (!ok) {
|
|
88
|
+
ctx.ui?.notify("Chave de API não configurada para este provedor.", "error");
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const config = readLlmConfig(ctx.cwd);
|
|
92
|
+
writeLlmConfig(ctx.cwd, {
|
|
93
|
+
...config,
|
|
94
|
+
defaultProvider: model.provider,
|
|
95
|
+
defaultModel: model.id,
|
|
96
|
+
});
|
|
97
|
+
ctx.ui?.notify(`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`, "info");
|
|
118
98
|
}
|
|
119
99
|
async function handleTemperatureCommand(args, ctx) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
100
|
+
const trimmed = args.trim().toLowerCase();
|
|
101
|
+
const config = readLlmConfig(ctx.cwd);
|
|
102
|
+
if (!trimmed || trimmed === "status") {
|
|
103
|
+
const value = getRuntimeTemperature(config);
|
|
104
|
+
ctx.ui?.notify(value == null
|
|
105
|
+
? "Temperatura: padrão do modelo (não definida em .kubbisec/llm.json)"
|
|
106
|
+
: `Temperatura: ${value}`, "info");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (trimmed === "reset" || trimmed === "default") {
|
|
110
|
+
setRuntimeTemperature(undefined, ctx.cwd);
|
|
111
|
+
const next = readLlmConfig(ctx.cwd);
|
|
112
|
+
writeLlmConfig(ctx.cwd, { ...next, temperature: config.temperature ?? 0.2 });
|
|
113
|
+
ctx.ui?.notify("Temperatura restaurada ao valor de .kubbisec/llm.json", "info");
|
|
114
|
+
requestKubbisecFooterRender();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const parsed = Number.parseFloat(trimmed);
|
|
118
|
+
if (!Number.isFinite(parsed)) {
|
|
119
|
+
ctx.ui?.notify("Uso: /temperature 0.2 · /temperature status · /temperature reset", "warning");
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
setRuntimeTemperature(parsed, ctx.cwd);
|
|
123
|
+
ctx.ui?.notify(`Temperatura: ${getRuntimeTemperature()}`, "info");
|
|
137
124
|
requestKubbisecFooterRender();
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const parsed = Number.parseFloat(trimmed);
|
|
141
|
-
if (!Number.isFinite(parsed)) {
|
|
142
|
-
ctx.ui?.notify("Uso: /temperature 0.2 · /temperature status · /temperature reset", "warning");
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
setRuntimeTemperature(parsed, ctx.cwd);
|
|
146
|
-
ctx.ui?.notify(`Temperatura: ${getRuntimeTemperature()}`, "info");
|
|
147
|
-
requestKubbisecFooterRender();
|
|
148
125
|
}
|
|
149
126
|
async function handleThinkingCommand(api, args, ctx) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
if (!isThinkingLevel(trimmed)) {
|
|
156
|
-
ctx.ui?.notify(`Uso: /thinking ${THINKING_LEVELS.join(" | ")}`, "warning");
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
api.setThinkingLevel(trimmed);
|
|
160
|
-
const config = readLlmConfig(ctx.cwd);
|
|
161
|
-
writeLlmConfig(ctx.cwd, { ...config, defaultThinkingLevel: trimmed });
|
|
162
|
-
ctx.ui?.notify(`Reasoning effort: ${trimmed}`, "info");
|
|
163
|
-
requestKubbisecFooterRender();
|
|
164
|
-
}
|
|
165
|
-
export default function kubbisecLlmConfig(api) {
|
|
166
|
-
registerKubbisecLlmProvider(api.registerProvider.bind(api));
|
|
167
|
-
const modelsCommand = {
|
|
168
|
-
description: "Selecionar modelo (agrupado por provedor)",
|
|
169
|
-
handler: (args, ctx) => handleModelCommand(api, args, ctx),
|
|
170
|
-
};
|
|
171
|
-
api.registerCommand("models", modelsCommand);
|
|
172
|
-
api.on("input", async (event, ctx) => {
|
|
173
|
-
if (event.source !== "interactive" || !ctx.hasUI) return;
|
|
174
|
-
const trimmed = event.text.trim();
|
|
175
|
-
if (!trimmed.startsWith("/model")) return;
|
|
176
|
-
if (trimmed.length > 6 && !trimmed.startsWith("/model ")) return;
|
|
177
|
-
const args = trimmed === "/model" ? "" : trimmed.slice("/model ".length);
|
|
178
|
-
await handleModelCommand(api, args, ctx);
|
|
179
|
-
return { action: "handled" };
|
|
180
|
-
});
|
|
181
|
-
api.registerCommand("temperature", {
|
|
182
|
-
description: "Ver ou definir temperatura (0–2)",
|
|
183
|
-
handler: handleTemperatureCommand,
|
|
184
|
-
});
|
|
185
|
-
api.registerCommand("thinking", {
|
|
186
|
-
description: "Ver ou definir reasoning effort (off … xhigh)",
|
|
187
|
-
handler: (args, ctx) => handleThinkingCommand(api, args, ctx),
|
|
188
|
-
});
|
|
189
|
-
api.registerCommand("detect-local", {
|
|
190
|
-
description: "Detectar Ollama e LM Studio nesta máquina",
|
|
191
|
-
handler: async (_args, ctx) => {
|
|
192
|
-
const { result } = await syncAutodetectedLocalProviders(ctx.cwd);
|
|
193
|
-
await refreshProviders(api, ctx.cwd);
|
|
194
|
-
const names = result.detected.map((provider) => provider.name ?? provider.id);
|
|
195
|
-
if (names.length === 0) {
|
|
196
|
-
ctx.ui?.notify("Nenhum servidor local detectado (Ollama / LM Studio).", "info");
|
|
127
|
+
const trimmed = args.trim().toLowerCase();
|
|
128
|
+
if (!trimmed || trimmed === "status") {
|
|
129
|
+
ctx.ui?.notify(`Reasoning effort: ${api.getThinkingLevel()}`, "info");
|
|
197
130
|
return;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
applyLlmConfigToPiSettings(ctx.cwd);
|
|
205
|
-
await applyDefaultModel(api, ctx);
|
|
206
|
-
applyDefaultThinking(api, ctx);
|
|
207
|
-
});
|
|
208
|
-
api.on("before_provider_request", async (event, ctx) => {
|
|
209
|
-
const temperature = getRuntimeTemperature(readLlmConfig(ctx.cwd));
|
|
210
|
-
return applyTemperatureToProviderPayload(event.payload, temperature);
|
|
211
|
-
});
|
|
212
|
-
api.on("model_select", async (_event, ctx) => {
|
|
213
|
-
const model = ctx.model;
|
|
214
|
-
if (!model) return;
|
|
131
|
+
}
|
|
132
|
+
if (!isThinkingLevel(trimmed)) {
|
|
133
|
+
ctx.ui?.notify(`Uso: /thinking ${THINKING_LEVELS.join(" | ")}`, "warning");
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
api.setThinkingLevel(trimmed);
|
|
215
137
|
const config = readLlmConfig(ctx.cwd);
|
|
216
|
-
writeLlmConfig(ctx.cwd, {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
138
|
+
writeLlmConfig(ctx.cwd, { ...config, defaultThinkingLevel: trimmed });
|
|
139
|
+
ctx.ui?.notify(`Reasoning effort: ${trimmed}`, "info");
|
|
140
|
+
requestKubbisecFooterRender();
|
|
141
|
+
}
|
|
142
|
+
export default function kubbisecLlmConfig(api) {
|
|
143
|
+
registerKubbisecLlmProvider(api.registerProvider.bind(api));
|
|
144
|
+
const modelsCommand = {
|
|
145
|
+
description: "Selecionar modelo (agrupado por provedor)",
|
|
146
|
+
handler: (args, ctx) => handleModelCommand(api, args, ctx),
|
|
147
|
+
};
|
|
148
|
+
api.registerCommand("models", modelsCommand);
|
|
149
|
+
api.on("input", async (event, ctx) => {
|
|
150
|
+
if (event.source !== "interactive" || !ctx.hasUI)
|
|
151
|
+
return;
|
|
152
|
+
const trimmed = event.text.trim();
|
|
153
|
+
if (!trimmed.startsWith("/model"))
|
|
154
|
+
return;
|
|
155
|
+
if (trimmed.length > 6 && !trimmed.startsWith("/model "))
|
|
156
|
+
return;
|
|
157
|
+
const args = trimmed === "/model" ? "" : trimmed.slice("/model ".length);
|
|
158
|
+
await handleModelCommand(api, args, ctx);
|
|
159
|
+
return { action: "handled" };
|
|
220
160
|
});
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
161
|
+
api.registerCommand("temperature", {
|
|
162
|
+
description: "Ver ou definir temperatura (0–2)",
|
|
163
|
+
handler: handleTemperatureCommand,
|
|
164
|
+
});
|
|
165
|
+
api.registerCommand("thinking", {
|
|
166
|
+
description: "Ver ou definir reasoning effort (off … xhigh)",
|
|
167
|
+
handler: (args, ctx) => handleThinkingCommand(api, args, ctx),
|
|
168
|
+
});
|
|
169
|
+
api.registerCommand("detect-local", {
|
|
170
|
+
description: "Detectar Ollama e LM Studio nesta máquina",
|
|
171
|
+
handler: async (_args, ctx) => {
|
|
172
|
+
const { result } = await syncAutodetectedLocalProviders(ctx.cwd);
|
|
173
|
+
await refreshProviders(api, ctx.cwd);
|
|
174
|
+
const names = result.detected.map((provider) => provider.name ?? provider.id);
|
|
175
|
+
if (names.length === 0) {
|
|
176
|
+
ctx.ui?.notify("Nenhum servidor local detectado (Ollama / LM Studio).", "info");
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
ctx.ui?.notify(`Detectados: ${names.join(", ")}`, "info");
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
api.on("session_start", async (_event, ctx) => {
|
|
183
|
+
await refreshProviders(api, ctx.cwd);
|
|
184
|
+
applyLlmConfigToPiSettings(ctx.cwd);
|
|
185
|
+
await applyDefaultModel(api, ctx);
|
|
186
|
+
applyDefaultThinking(api, ctx);
|
|
187
|
+
});
|
|
188
|
+
api.on("before_provider_request", async (event, ctx) => {
|
|
189
|
+
const temperature = getRuntimeTemperature(readLlmConfig(ctx.cwd));
|
|
190
|
+
return applyTemperatureToProviderPayload(event.payload, temperature);
|
|
191
|
+
});
|
|
192
|
+
api.on("model_select", async (_event, ctx) => {
|
|
193
|
+
const model = ctx.model;
|
|
194
|
+
if (!model)
|
|
195
|
+
return;
|
|
196
|
+
const config = readLlmConfig(ctx.cwd);
|
|
197
|
+
writeLlmConfig(ctx.cwd, {
|
|
198
|
+
...config,
|
|
199
|
+
defaultProvider: model.provider,
|
|
200
|
+
defaultModel: model.id,
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
api.on("thinking_level_select", async (_event, ctx) => {
|
|
204
|
+
const config = readLlmConfig(ctx.cwd);
|
|
205
|
+
writeLlmConfig(ctx.cwd, {
|
|
206
|
+
...config,
|
|
207
|
+
defaultThinkingLevel: api.getThinkingLevel(),
|
|
208
|
+
});
|
|
227
209
|
});
|
|
228
|
-
});
|
|
229
210
|
}
|
|
230
|
-
//# sourceMappingURL=kubbisec-llm-config.extension.js.map
|
|
211
|
+
//# sourceMappingURL=kubbisec-llm-config.extension.js.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
type ExtensionApi = {
|
|
2
|
-
|
|
3
|
-
event: string,
|
|
4
|
-
handler: (event: unknown, ctx: ExtensionContext) => undefined | Promise<unknown>,
|
|
5
|
-
) => void;
|
|
2
|
+
on: (event: string, handler: (event: unknown, ctx: ExtensionContext) => undefined | Promise<unknown>) => void;
|
|
6
3
|
};
|
|
7
4
|
type ExtensionContext = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
hasUI: boolean;
|
|
6
|
+
ui: {
|
|
7
|
+
setStatus: (key: string, text: string | undefined) => void;
|
|
8
|
+
};
|
|
12
9
|
};
|
|
13
10
|
export default function kubbisecMemory(api: ExtensionApi): void;
|
|
14
|
-
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=kubbisec-memory.extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubbisec-memory.extension.d.ts","sourceRoot":"","sources":["../../src/extensions/kubbisec-memory.extension.ts"],"names":[],"mappings":"AAYA,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,KAAK,
|
|
1
|
+
{"version":3,"file":"kubbisec-memory.extension.d.ts","sourceRoot":"","sources":["../../src/extensions/kubbisec-memory.extension.ts"],"names":[],"mappings":"AAYA,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,KAAK,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,KAC7E,IAAI,CAAC;CACX,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE;QACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;KAC5D,CAAC;CACH,CAAC;AAqDF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CA2E9D"}
|
|
@@ -1,100 +1,107 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* KubbiSec memory extension — recall before turn, remember after turn.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
addChatMemoryTurn,
|
|
6
|
-
buildMemoryInjectBlock,
|
|
7
|
-
extractRememberCandidates,
|
|
8
|
-
isMemoryEnabled,
|
|
9
|
-
searchChatMemory,
|
|
10
|
-
} from "@kubbisec/chat-memory";
|
|
11
|
-
|
|
4
|
+
import { addChatMemoryTurn, buildMemoryInjectBlock, extractRememberCandidates, isMemoryEnabled, searchChatMemory, } from "@kubbisec/chat-memory";
|
|
12
5
|
function resolveMemoryScope() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
const organizationId = process.env.KUBBISEC_ORG_ID?.trim();
|
|
7
|
+
const userId = process.env.KUBBISEC_USER_ID?.trim() ?? process.env.KUBBISEC_CLIENT_ID?.trim();
|
|
8
|
+
if (!organizationId || !userId)
|
|
9
|
+
return null;
|
|
10
|
+
const projectId = process.env.KUBBISEC_PROJECT_ID?.trim();
|
|
11
|
+
return {
|
|
12
|
+
organizationId,
|
|
13
|
+
userId,
|
|
14
|
+
...(projectId ? { projectId } : {}),
|
|
15
|
+
};
|
|
22
16
|
}
|
|
23
17
|
function extractTextContent(content) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
if (typeof content === "string")
|
|
19
|
+
return content;
|
|
20
|
+
if (!Array.isArray(content))
|
|
21
|
+
return "";
|
|
22
|
+
return content
|
|
23
|
+
.filter((block) => typeof block === "object" && block !== null)
|
|
24
|
+
.filter((block) => block.type === "text" && typeof block.text === "string")
|
|
25
|
+
.map((block) => block.text ?? "")
|
|
26
|
+
.join("\n");
|
|
31
27
|
}
|
|
32
28
|
function lastUserMessage(messages) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
for (let i = messages.length - 1; i >= 0; i -= 1) {
|
|
30
|
+
const msg = messages[i];
|
|
31
|
+
if (msg?.role === "user") {
|
|
32
|
+
return extractTextContent(msg.content);
|
|
33
|
+
}
|
|
37
34
|
}
|
|
38
|
-
|
|
39
|
-
return "";
|
|
35
|
+
return "";
|
|
40
36
|
}
|
|
41
37
|
export default function kubbisecMemory(api) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
38
|
+
let lastUserPrompt = "";
|
|
39
|
+
api.on("before_agent_start", async (event) => {
|
|
40
|
+
if (!isMemoryEnabled())
|
|
41
|
+
return undefined;
|
|
42
|
+
const scope = resolveMemoryScope();
|
|
43
|
+
if (!scope)
|
|
44
|
+
return undefined;
|
|
45
|
+
const { prompt } = event;
|
|
46
|
+
lastUserPrompt = prompt;
|
|
47
|
+
try {
|
|
48
|
+
const memories = await Promise.race([
|
|
49
|
+
searchChatMemory(scope, prompt, 5),
|
|
50
|
+
new Promise((_, reject) => {
|
|
51
|
+
setTimeout(() => reject(new Error("recall_timeout")), 3000);
|
|
52
|
+
}),
|
|
53
|
+
]);
|
|
54
|
+
const block = buildMemoryInjectBlock(memories);
|
|
55
|
+
if (!block)
|
|
56
|
+
return undefined;
|
|
57
|
+
return {
|
|
58
|
+
message: {
|
|
59
|
+
customType: "kubbisec-memory-inject",
|
|
60
|
+
content: block,
|
|
61
|
+
display: false,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
api.on("turn_end", async (event, ctx) => {
|
|
70
|
+
if (!isMemoryEnabled())
|
|
71
|
+
return;
|
|
72
|
+
if (!lastUserPrompt || lastUserPrompt.length < 20)
|
|
73
|
+
return;
|
|
74
|
+
const scope = resolveMemoryScope();
|
|
75
|
+
if (!scope)
|
|
76
|
+
return;
|
|
77
|
+
const turn = event;
|
|
78
|
+
if (turn.message.role !== "assistant")
|
|
79
|
+
return;
|
|
80
|
+
const assistantText = extractTextContent(turn.message.content);
|
|
81
|
+
const candidates = extractRememberCandidates(lastUserPrompt, assistantText);
|
|
82
|
+
for (const candidate of candidates) {
|
|
83
|
+
await addChatMemoryTurn(scope, candidate);
|
|
84
|
+
}
|
|
85
|
+
if (ctx.hasUI && candidates.length > 0) {
|
|
86
|
+
ctx.ui.setStatus("kubbisec-memory", `memory · ${candidates.length}`);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
api.on("agent_end", async (event) => {
|
|
90
|
+
if (!isMemoryEnabled())
|
|
91
|
+
return;
|
|
92
|
+
const scope = resolveMemoryScope();
|
|
93
|
+
if (!scope)
|
|
94
|
+
return;
|
|
95
|
+
const agentEnd = event;
|
|
96
|
+
const userText = lastUserMessage(agentEnd.messages);
|
|
97
|
+
const assistantMsg = [...agentEnd.messages].reverse().find((m) => m.role === "assistant");
|
|
98
|
+
const assistantText = assistantMsg ? extractTextContent(assistantMsg.content) : "";
|
|
99
|
+
if (!userText || userText.length < 20)
|
|
100
|
+
return;
|
|
101
|
+
const candidates = extractRememberCandidates(userText, assistantText);
|
|
102
|
+
for (const candidate of candidates) {
|
|
103
|
+
await addChatMemoryTurn(scope, candidate);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
99
106
|
}
|
|
100
|
-
//# sourceMappingURL=kubbisec-memory.extension.js.map
|
|
107
|
+
//# sourceMappingURL=kubbisec-memory.extension.js.map
|