@kubbisec/ai-linux-x64 0.1.21 → 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 +47 -34
- package/bundled/components/kubbisec-model-selector.js +187 -177
- 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 +55 -55
- package/bundled/config/config.js.map +1 -1
- package/bundled/config/detect-local-llm-providers.d.ts +26 -16
- package/bundled/config/detect-local-llm-providers.js +130 -142
- 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 +45 -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 +67 -48
- package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
- package/bundled/config/extended-context.d.ts +5 -6
- package/bundled/config/extended-context.js +23 -22
- package/bundled/config/feature-flags.d.ts +10 -2
- package/bundled/config/feature-flags.js +8 -2
- package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
- package/bundled/config/format-kubbisec-footer-status.js +26 -31
- package/bundled/config/kubbisec-extension-manifest.d.ts +21 -2
- 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 +51 -25
- package/bundled/config/llm-config-mutations.js +173 -182
- package/bundled/config/llm-config.d.ts +54 -41
- package/bundled/config/llm-config.js +199 -199
- package/bundled/config/llm-provider-catalog.d.ts +18 -15
- package/bundled/config/llm-provider-catalog.js +45 -46
- 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 +173 -183
- package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
- package/bundled/config/register-custom-llm-providers.d.ts +11 -5
- package/bundled/config/register-custom-llm-providers.js +17 -15
- package/bundled/config/register-kubbisec-llm-provider.d.ts +14 -10
- package/bundled/config/register-kubbisec-llm-provider.js +50 -42
- package/bundled/config/resolve-agents-context-file.d.ts +1 -1
- package/bundled/config/resolve-agents-context-file.js +33 -34
- 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 +6 -3
- package/bundled/config/sync-kubbisec-pi-models.js +58 -58
- package/bundled/copy/cli-reference-index.d.ts +2 -6
- 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 +11 -6
- package/bundled/copy/kubbisec-shell-copy.js +1 -1
- package/bundled/extensions/cli-local-shared.d.ts +60 -26
- package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
- package/bundled/extensions/cli-local-shared.js +139 -118
- package/bundled/extensions/cli-local-shared.js.map +1 -1
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-aspm-local.extension.js +109 -117
- 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 +64 -35
- package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-clarify.extension.js +323 -305
- 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 +29 -32
- package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-extended-context.extension.js +56 -43
- 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 +205 -215
- package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-github-local.extension.d.ts +26 -21
- package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-github-local.extension.js +470 -122
- 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 +200 -181
- package/bundled/extensions/kubbisec-memory.extension.d.ts +9 -7
- package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-memory.extension.js +88 -95
- package/bundled/extensions/kubbisec-naus-local.extension.d.ts +18 -15
- package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-naus-local.extension.js +123 -114
- package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +31 -21
- 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 +10 -8
- package/bundled/extensions/kubbisec-runtime-status.extension.js +15 -13
- package/bundled/extensions/kubbisec-scope.extension.d.ts +12 -7
- package/bundled/extensions/kubbisec-scope.extension.js +13 -13
- package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +27 -16
- package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-skill-mentions.extension.js +74 -63
- package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +2 -3
- package/bundled/extensions/kubbisec-skill-telemetry.extension.js +59 -64
- package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-theme-lock.extension.js +33 -34
- 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 +118 -109
- package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
- package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
- package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
- package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
- 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 +54 -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/redaction.test.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.js +626 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.js.map +1 -0
- 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 +121 -131
- 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 +146 -153
- package/bundled/skills/chat-mention-render.d.ts +2 -2
- package/bundled/skills/chat-mention-render.js +121 -126
- package/bundled/skills/chat-mentions.d.ts +17 -8
- 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 +33 -35
- package/bundled/skills/naus-pipelines/SKILL.md +11 -10
- package/bundled/skills/remediation/SKILL.md +1 -1
- package/bundled/skills/skill-mention.d.ts +10 -2
- package/bundled/skills/skill-mention.js +10 -2
- package/bundled/theme/clear-terminal.d.ts +1 -1
- package/bundled/theme/clear-terminal.js +3 -4
- 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 +30 -31
- 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 +11 -10
- package/bundled/theme/render-compact-header.d.ts +13 -5
- package/bundled/theme/render-compact-header.js +127 -129
- 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 -28
- package/bundled/clarify/clarify-gate.d.ts.map +0 -1
- package/bundled/clarify/clarify-gate.js +0 -152
- package/bundled/clarify/clarify-gate.js.map +0 -1
- package/bundled/clarify/clarify-select-panel.d.ts +0 -14
- package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
- package/bundled/clarify/clarify-select-panel.js +0 -82
- package/bundled/clarify/clarify-select-panel.js.map +0 -1
- package/bundled/clarify/clarify-ui-state.d.ts +0 -21
- 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 -21
- package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
- package/bundled/clarify/parse-clarify-answer.js +0 -57
- package/bundled/clarify/parse-clarify-answer.js.map +0 -1
- package/bundled/clarify/question-format.d.ts +0 -39
- package/bundled/clarify/question-format.d.ts.map +0 -1
- package/bundled/clarify/question-format.js +0 -144
- package/bundled/clarify/question-format.js.map +0 -1
- package/bundled/clarify/questionnaire-tool.d.ts +0 -25
- package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
- package/bundled/clarify/questionnaire-tool.js +0 -161
- package/bundled/clarify/questionnaire-tool.js.map +0 -1
- package/bundled/clarify/scope-discovery.d.ts +0 -9
- package/bundled/clarify/scope-discovery.d.ts.map +0 -1
- package/bundled/clarify/scope-discovery.js +0 -130
- package/bundled/clarify/scope-discovery.js.map +0 -1
- package/bundled/clarify/session-questionnaire.d.ts +0 -26
- package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
- package/bundled/clarify/session-questionnaire.js +0 -372
- package/bundled/clarify/session-questionnaire.js.map +0 -1
- package/bundled/clarify/session-questionnaire.types.d.ts +0 -47
- 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
|
@@ -2,245 +2,245 @@ import * as fs from "node:fs";
|
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { KUBBISEC_PROJECT_CONFIG_DIR } from "./ensure-kubbisec-project-settings.js";
|
|
4
4
|
import { KUBBISEC_LLM_PROVIDER_ID, mergeKubbisecModelCatalog } from "./llm-provider-catalog.js";
|
|
5
|
+
|
|
5
6
|
const LLM_CONFIG_FILE = "llm.json";
|
|
6
7
|
const DEFAULT_LLM_CONFIG = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
|
|
9
|
+
defaultThinkingLevel: "medium",
|
|
10
|
+
temperature: 0.2,
|
|
10
11
|
};
|
|
11
12
|
export function resolveLlmConfigPath(cwd = process.cwd()) {
|
|
12
|
-
|
|
13
|
+
return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, LLM_CONFIG_FILE);
|
|
13
14
|
}
|
|
14
15
|
function readJsonFile(filePath) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
18
|
+
} catch {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
21
|
}
|
|
22
22
|
export function parseLlmConfig(raw) {
|
|
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
|
-
|
|
56
|
-
? { baseUrl: local.ollama.baseUrl.trim() }
|
|
57
|
-
: {}),
|
|
58
|
-
},
|
|
59
|
-
}
|
|
23
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
24
|
+
return { ...DEFAULT_LLM_CONFIG };
|
|
25
|
+
}
|
|
26
|
+
const input = raw;
|
|
27
|
+
const next = { ...DEFAULT_LLM_CONFIG };
|
|
28
|
+
if (typeof input.defaultProvider === "string" && input.defaultProvider.trim()) {
|
|
29
|
+
next.defaultProvider = input.defaultProvider.trim();
|
|
30
|
+
}
|
|
31
|
+
if (typeof input.defaultModel === "string" && input.defaultModel.trim()) {
|
|
32
|
+
next.defaultModel = input.defaultModel.trim();
|
|
33
|
+
}
|
|
34
|
+
if (
|
|
35
|
+
input.defaultThinkingLevel === "off" ||
|
|
36
|
+
input.defaultThinkingLevel === "minimal" ||
|
|
37
|
+
input.defaultThinkingLevel === "low" ||
|
|
38
|
+
input.defaultThinkingLevel === "medium" ||
|
|
39
|
+
input.defaultThinkingLevel === "high" ||
|
|
40
|
+
input.defaultThinkingLevel === "xhigh"
|
|
41
|
+
) {
|
|
42
|
+
next.defaultThinkingLevel = input.defaultThinkingLevel;
|
|
43
|
+
}
|
|
44
|
+
if (typeof input.temperature === "number" && Number.isFinite(input.temperature)) {
|
|
45
|
+
next.temperature = Math.min(2, Math.max(0, input.temperature));
|
|
46
|
+
}
|
|
47
|
+
if (input.localLlm && typeof input.localLlm === "object" && !Array.isArray(input.localLlm)) {
|
|
48
|
+
const local = input.localLlm;
|
|
49
|
+
next.localLlm = {
|
|
50
|
+
...(typeof local?.autoDetect === "boolean" ? { autoDetect: local.autoDetect } : {}),
|
|
51
|
+
...(local?.ollama && typeof local.ollama === "object"
|
|
52
|
+
? {
|
|
53
|
+
ollama: {
|
|
54
|
+
...(local.ollama.enabled !== undefined
|
|
55
|
+
? { enabled: local.ollama.enabled === true }
|
|
60
56
|
: {}),
|
|
61
|
-
|
|
62
|
-
? {
|
|
63
|
-
lmstudio: {
|
|
64
|
-
...(local.lmstudio.enabled !== undefined
|
|
65
|
-
? { enabled: local.lmstudio.enabled === true }
|
|
66
|
-
: {}),
|
|
67
|
-
...(typeof local.lmstudio.baseUrl === "string" && local.lmstudio.baseUrl.trim()
|
|
68
|
-
? { baseUrl: local.lmstudio.baseUrl.trim() }
|
|
69
|
-
: {}),
|
|
70
|
-
},
|
|
71
|
-
}
|
|
57
|
+
...(typeof local.ollama.baseUrl === "string" && local.ollama.baseUrl.trim()
|
|
58
|
+
? { baseUrl: local.ollama.baseUrl.trim() }
|
|
72
59
|
: {}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.map((m) => ({ ...m, id: m.id.trim() }))
|
|
82
|
-
.filter((m) => m.id.length > 0),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (Array.isArray(input.providers)) {
|
|
87
|
-
next.providers = input.providers
|
|
88
|
-
.filter((p) => {
|
|
89
|
-
return Boolean(p &&
|
|
90
|
-
typeof p === "object" &&
|
|
91
|
-
typeof p.id === "string" &&
|
|
92
|
-
typeof p.baseUrl === "string" &&
|
|
93
|
-
Array.isArray(p.models));
|
|
94
|
-
})
|
|
95
|
-
.map((p) => ({
|
|
96
|
-
...p,
|
|
97
|
-
id: p.id.trim(),
|
|
98
|
-
baseUrl: p.baseUrl.trim(),
|
|
99
|
-
...(p.autodetected === true ? { autodetected: true } : {}),
|
|
100
|
-
...(p.detectSource === "ollama" || p.detectSource === "lmstudio"
|
|
101
|
-
? { detectSource: p.detectSource }
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
: {}),
|
|
63
|
+
...(local?.lmstudio && typeof local.lmstudio === "object"
|
|
64
|
+
? {
|
|
65
|
+
lmstudio: {
|
|
66
|
+
...(local.lmstudio.enabled !== undefined
|
|
67
|
+
? { enabled: local.lmstudio.enabled === true }
|
|
102
68
|
: {}),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
69
|
+
...(typeof local.lmstudio.baseUrl === "string" && local.lmstudio.baseUrl.trim()
|
|
70
|
+
? { baseUrl: local.lmstudio.baseUrl.trim() }
|
|
71
|
+
: {}),
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
: {}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (input.kubbisec && typeof input.kubbisec === "object" && !Array.isArray(input.kubbisec)) {
|
|
78
|
+
const kub = input.kubbisec;
|
|
79
|
+
if (Array.isArray(kub.models)) {
|
|
80
|
+
next.kubbisec = {
|
|
81
|
+
models: kub.models
|
|
82
|
+
.filter((m) => Boolean(m && typeof m === "object" && typeof m.id === "string"))
|
|
83
|
+
.map((m) => ({ ...m, id: m.id.trim() }))
|
|
84
|
+
.filter((m) => m.id.length > 0),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (Array.isArray(input.providers)) {
|
|
89
|
+
next.providers = input.providers
|
|
90
|
+
.filter((p) => {
|
|
91
|
+
return Boolean(
|
|
92
|
+
p &&
|
|
93
|
+
typeof p === "object" &&
|
|
94
|
+
typeof p.id === "string" &&
|
|
95
|
+
typeof p.baseUrl === "string" &&
|
|
96
|
+
Array.isArray(p.models),
|
|
97
|
+
);
|
|
98
|
+
})
|
|
99
|
+
.map((p) => ({
|
|
100
|
+
...p,
|
|
101
|
+
id: p.id.trim(),
|
|
102
|
+
baseUrl: p.baseUrl.trim(),
|
|
103
|
+
...(p.autodetected === true ? { autodetected: true } : {}),
|
|
104
|
+
...(p.detectSource === "ollama" || p.detectSource === "lmstudio"
|
|
105
|
+
? { detectSource: p.detectSource }
|
|
106
|
+
: {}),
|
|
107
|
+
models: p.models.filter((m) => m.id?.trim()).map((m) => ({ ...m, id: m.id.trim() })),
|
|
108
|
+
}))
|
|
109
|
+
.filter((p) => p.id.length > 0 && p.baseUrl.length > 0 && p.models.length > 0);
|
|
110
|
+
}
|
|
111
|
+
return next;
|
|
108
112
|
}
|
|
109
113
|
export function readLlmConfig(cwd = process.cwd()) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
const filePath = resolveLlmConfigPath(cwd);
|
|
115
|
+
const parsed = parseLlmConfig(readJsonFile(filePath));
|
|
116
|
+
return parsed;
|
|
113
117
|
}
|
|
114
118
|
export function writeLlmConfig(cwd, config) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
const filePath = resolveLlmConfigPath(cwd);
|
|
120
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true, mode: 0o755 });
|
|
121
|
+
fs.writeFileSync(filePath, `${JSON.stringify(config, null, 2)}\n`, {
|
|
122
|
+
encoding: "utf8",
|
|
123
|
+
mode: 0o600,
|
|
124
|
+
});
|
|
121
125
|
}
|
|
122
126
|
export function ensureLlmConfigFromOrg(cwd, options) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
const current = readLlmConfig(cwd);
|
|
128
|
+
const orgModel = options.model?.trim();
|
|
129
|
+
const merged = {
|
|
130
|
+
...current,
|
|
131
|
+
defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
|
|
132
|
+
...(orgModel ? { defaultModel: orgModel } : {}),
|
|
133
|
+
kubbisec: {
|
|
134
|
+
models: mergeKubbisecModelCatalog(orgModel, current.kubbisec?.models),
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
writeLlmConfig(cwd, merged);
|
|
138
|
+
return merged;
|
|
135
139
|
}
|
|
136
140
|
function resolveAgentProjectSettingsPath(cwd) {
|
|
137
|
-
|
|
141
|
+
return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, "settings.json");
|
|
138
142
|
}
|
|
139
143
|
export function applyLlmConfigToAgentSettings(cwd = process.cwd(), config = readLlmConfig(cwd)) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
144
|
+
const settingsPath = resolveAgentProjectSettingsPath(cwd);
|
|
145
|
+
fs.mkdirSync(path.dirname(settingsPath), { recursive: true, mode: 0o755 });
|
|
146
|
+
let existing = {};
|
|
147
|
+
try {
|
|
148
|
+
const raw = readJsonFile(settingsPath);
|
|
149
|
+
if (raw && typeof raw === "object" && !Array.isArray(raw)) {
|
|
150
|
+
existing = raw;
|
|
151
|
+
}
|
|
152
|
+
} catch {
|
|
153
|
+
/* fresh */
|
|
154
|
+
}
|
|
155
|
+
const merged = {
|
|
156
|
+
...existing,
|
|
157
|
+
defaultProvider: config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID,
|
|
158
|
+
...(config.defaultModel ? { defaultModel: config.defaultModel } : {}),
|
|
159
|
+
...(config.defaultThinkingLevel ? { defaultThinkingLevel: config.defaultThinkingLevel } : {}),
|
|
160
|
+
};
|
|
161
|
+
fs.writeFileSync(settingsPath, `${JSON.stringify(merged, null, 2)}\n`, {
|
|
162
|
+
encoding: "utf8",
|
|
163
|
+
mode: 0o600,
|
|
164
|
+
});
|
|
162
165
|
}
|
|
163
166
|
/** @deprecated Use applyLlmConfigToAgentSettings */
|
|
164
167
|
export const applyLlmConfigToPiSettings = applyLlmConfigToAgentSettings;
|
|
165
168
|
export function resolveApiKeyValue(apiKey) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return raw;
|
|
169
|
+
const raw = apiKey?.trim();
|
|
170
|
+
if (!raw) return undefined;
|
|
171
|
+
if (/^[A-Z][A-Z0-9_]*$/.test(raw)) {
|
|
172
|
+
const fromEnv = process.env[raw]?.trim();
|
|
173
|
+
return fromEnv || undefined;
|
|
174
|
+
}
|
|
175
|
+
return raw;
|
|
174
176
|
}
|
|
175
177
|
let runtimeTemperature;
|
|
176
178
|
export function getRuntimeTemperature(config = readLlmConfig()) {
|
|
177
|
-
|
|
179
|
+
return runtimeTemperature ?? config.temperature;
|
|
178
180
|
}
|
|
179
181
|
export function setRuntimeTemperature(value, cwd = process.cwd()) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
if (value == null || !Number.isFinite(value)) {
|
|
183
|
+
runtimeTemperature = undefined;
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
runtimeTemperature = Math.min(2, Math.max(0, value));
|
|
187
|
+
const config = readLlmConfig(cwd);
|
|
188
|
+
writeLlmConfig(cwd, { ...config, temperature: runtimeTemperature });
|
|
187
189
|
}
|
|
188
190
|
export function applyTemperatureToProviderPayload(payload, temperature) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const body = payload;
|
|
194
|
-
if ("temperature" in body) {
|
|
195
|
-
return { ...body, temperature };
|
|
196
|
-
}
|
|
197
|
-
if (typeof body.body === "string") {
|
|
198
|
-
try {
|
|
199
|
-
const parsed = JSON.parse(body.body);
|
|
200
|
-
return { ...body, body: JSON.stringify({ ...parsed, temperature }) };
|
|
201
|
-
}
|
|
202
|
-
catch {
|
|
203
|
-
return payload;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (body.body && typeof body.body === "object" && !Array.isArray(body.body)) {
|
|
207
|
-
return {
|
|
208
|
-
...body,
|
|
209
|
-
body: { ...body.body, temperature },
|
|
210
|
-
};
|
|
211
|
-
}
|
|
191
|
+
if (temperature == null || !Number.isFinite(temperature)) return payload;
|
|
192
|
+
if (!payload || typeof payload !== "object") return payload;
|
|
193
|
+
const body = payload;
|
|
194
|
+
if ("temperature" in body) {
|
|
212
195
|
return { ...body, temperature };
|
|
196
|
+
}
|
|
197
|
+
if (typeof body.body === "string") {
|
|
198
|
+
try {
|
|
199
|
+
const parsed = JSON.parse(body.body);
|
|
200
|
+
return { ...body, body: JSON.stringify({ ...parsed, temperature }) };
|
|
201
|
+
} catch {
|
|
202
|
+
return payload;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (body.body && typeof body.body === "object" && !Array.isArray(body.body)) {
|
|
206
|
+
return {
|
|
207
|
+
...body,
|
|
208
|
+
body: { ...body.body, temperature },
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return { ...body, temperature };
|
|
213
212
|
}
|
|
214
213
|
export function resolveChatModelId(cwd = process.cwd(), orgModel) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
214
|
+
const config = readLlmConfig(cwd);
|
|
215
|
+
return (
|
|
216
|
+
config.defaultModel?.trim() ||
|
|
217
|
+
process.env.KUBBISEC_AI_MODEL_ID?.trim() ||
|
|
218
|
+
process.env.KUBBISEC_AI_MODEL?.trim() ||
|
|
219
|
+
process.env.KUBBISEC_PI_MODEL?.trim() ||
|
|
220
|
+
process.env.NAUS_PI_MODEL?.trim() ||
|
|
221
|
+
orgModel?.trim() ||
|
|
222
|
+
"gpt-4o"
|
|
223
|
+
);
|
|
223
224
|
}
|
|
224
225
|
export function resolveChatProviderId(cwd = process.cwd()) {
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
const config = readLlmConfig(cwd);
|
|
227
|
+
return config.defaultProvider?.trim() || KUBBISEC_LLM_PROVIDER_ID;
|
|
227
228
|
}
|
|
228
229
|
export const FOOTER_INFERENCE_UNSET = "—";
|
|
229
230
|
/** Footer model ref: `provider/id` (no provider display name or KubbiSec branding). */
|
|
230
231
|
export function formatModelFooterLabel(provider, modelId) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
const providerId = provider.trim() || KUBBISEC_LLM_PROVIDER_ID;
|
|
237
|
-
return `${providerId}/${id}`;
|
|
232
|
+
const id = modelId.trim();
|
|
233
|
+
if (!id) return "no-model";
|
|
234
|
+
if (id.includes("/")) return id;
|
|
235
|
+
const providerId = provider.trim() || KUBBISEC_LLM_PROVIDER_ID;
|
|
236
|
+
return `${providerId}/${id}`;
|
|
238
237
|
}
|
|
239
238
|
export function formatModelFooterWithInferenceSettings(modelRef, thinkingLevel, temperature) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
239
|
+
const thinking = thinkingLevel?.trim() || FOOTER_INFERENCE_UNSET;
|
|
240
|
+
const temp =
|
|
241
|
+
temperature != null && Number.isFinite(temperature)
|
|
242
|
+
? String(temperature)
|
|
243
|
+
: FOOTER_INFERENCE_UNSET;
|
|
244
|
+
return `${modelRef} · ${thinking} · ${temp}`;
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=llm-config.js.map
|
|
@@ -3,20 +3,23 @@ export declare const KUBBISEC_LLM_PROVIDER_ID = "kubbisec";
|
|
|
3
3
|
export declare const KUBBISEC_LLM_PROVIDER_NAME = "KubbiSec";
|
|
4
4
|
export declare const KUBBISEC_BUILTIN_MODELS: KubbisecLlmModelDef[];
|
|
5
5
|
export type ProviderModelConfigShape = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
api: "openai-completions";
|
|
9
|
+
reasoning: boolean;
|
|
10
|
+
input: ("text" | "image")[];
|
|
11
|
+
cost: {
|
|
12
|
+
input: number;
|
|
13
|
+
output: number;
|
|
14
|
+
cacheRead: number;
|
|
15
|
+
cacheWrite: number;
|
|
16
|
+
};
|
|
17
|
+
contextWindow: number;
|
|
18
|
+
maxTokens: number;
|
|
19
19
|
};
|
|
20
20
|
export declare function toProviderModelConfig(def: KubbisecLlmModelDef): ProviderModelConfigShape;
|
|
21
|
-
export declare function mergeKubbisecModelCatalog(
|
|
22
|
-
|
|
21
|
+
export declare function mergeKubbisecModelCatalog(
|
|
22
|
+
orgModel?: string | null,
|
|
23
|
+
extra?: KubbisecLlmModelDef[],
|
|
24
|
+
): KubbisecLlmModelDef[];
|
|
25
|
+
//# sourceMappingURL=llm-provider-catalog.d.ts.map
|
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
export const KUBBISEC_LLM_PROVIDER_ID = "kubbisec";
|
|
2
2
|
export const KUBBISEC_LLM_PROVIDER_NAME = "KubbiSec";
|
|
3
3
|
export const KUBBISEC_BUILTIN_MODELS = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
{ id: "gpt-4o", name: "GPT-4o", reasoning: false, contextWindow: 128_000, maxTokens: 16_384 },
|
|
5
|
+
{
|
|
6
|
+
id: "gpt-4o-mini",
|
|
7
|
+
name: "GPT-4o Mini",
|
|
8
|
+
reasoning: false,
|
|
9
|
+
contextWindow: 128_000,
|
|
10
|
+
maxTokens: 16_384,
|
|
11
|
+
},
|
|
12
|
+
{ id: "o3-mini", name: "O3 Mini", reasoning: true, contextWindow: 200_000, maxTokens: 100_000 },
|
|
13
|
+
{
|
|
14
|
+
id: "claude-sonnet-4-20250514",
|
|
15
|
+
name: "Claude Sonnet 4",
|
|
16
|
+
reasoning: true,
|
|
17
|
+
contextWindow: 200_000,
|
|
18
|
+
maxTokens: 16_384,
|
|
19
|
+
},
|
|
20
20
|
];
|
|
21
21
|
export function toProviderModelConfig(def) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
return {
|
|
23
|
+
id: def.id,
|
|
24
|
+
name: def.name?.trim() || def.id,
|
|
25
|
+
api: "openai-completions",
|
|
26
|
+
reasoning: def.reasoning === true,
|
|
27
|
+
input: ["text"],
|
|
28
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
29
|
+
contextWindow: def.contextWindow ?? 128_000,
|
|
30
|
+
maxTokens: def.maxTokens ?? 8_192,
|
|
31
|
+
};
|
|
32
32
|
}
|
|
33
33
|
export function mergeKubbisecModelCatalog(orgModel, extra) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return ordered;
|
|
34
|
+
const byId = new Map();
|
|
35
|
+
for (const model of KUBBISEC_BUILTIN_MODELS) {
|
|
36
|
+
byId.set(model.id, model);
|
|
37
|
+
}
|
|
38
|
+
for (const model of extra ?? []) {
|
|
39
|
+
if (model.id?.trim()) byId.set(model.id.trim(), { ...model, id: model.id.trim() });
|
|
40
|
+
}
|
|
41
|
+
const org = orgModel?.trim();
|
|
42
|
+
if (org && !byId.has(org)) {
|
|
43
|
+
byId.set(org, { id: org, name: org, reasoning: org.startsWith("o") });
|
|
44
|
+
}
|
|
45
|
+
const ordered = [];
|
|
46
|
+
if (org && byId.has(org)) {
|
|
47
|
+
ordered.push(byId.get(org));
|
|
48
|
+
byId.delete(org);
|
|
49
|
+
}
|
|
50
|
+
ordered.push(...byId.values());
|
|
51
|
+
return ordered;
|
|
53
52
|
}
|
|
54
|
-
//# sourceMappingURL=llm-provider-catalog.js.map
|
|
53
|
+
//# sourceMappingURL=llm-provider-catalog.js.map
|
|
@@ -16,4 +16,4 @@ export declare const materializeKubbisecPiExtensions: typeof materializeKubbisec
|
|
|
16
16
|
export declare const materializeKubbisecPiTheme: typeof materializeKubbisecAgentTheme;
|
|
17
17
|
/** @deprecated Use resolveKubbisecAgentExtensionPaths */
|
|
18
18
|
export declare const resolveKubbisecPiExtensionPaths: typeof resolveKubbisecAgentExtensionPaths;
|
|
19
|
-
//# sourceMappingURL=materialize-kubbisec-pi-resources.d.ts.map
|
|
19
|
+
//# sourceMappingURL=materialize-kubbisec-pi-resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialize-kubbisec-pi-resources.d.ts","sourceRoot":"","sources":["../../src/config/materialize-kubbisec-pi-resources.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"materialize-kubbisec-pi-resources.d.ts","sourceRoot":"","sources":["../../src/config/materialize-kubbisec-pi-resources.ts"],"names":[],"mappings":"AAoMA;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAiChF;AAED,wFAAwF;AACxF,wBAAgB,6BAA6B,CAAC,GAAG,SAAgB,GAAG,IAAI,CAOvE;AAED,wEAAwE;AACxE,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAOhF;AAED,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC;AAElF,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,sCAAgC,CAAC;AAExE,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC"}
|