@amodalai/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/.last_build +0 -0
- package/dist/src/amodal-config.d.ts +194 -0
- package/dist/src/amodal-config.js +326 -0
- package/dist/src/amodal-config.js.map +1 -0
- package/dist/src/audit/audit-logger.d.ts +52 -0
- package/dist/src/audit/audit-logger.js +137 -0
- package/dist/src/audit/audit-logger.js.map +1 -0
- package/dist/src/audit/audit-outputs.d.ts +34 -0
- package/dist/src/audit/audit-outputs.js +73 -0
- package/dist/src/audit/audit-outputs.js.map +1 -0
- package/dist/src/audit/audit-redact.d.ts +14 -0
- package/dist/src/audit/audit-redact.js +55 -0
- package/dist/src/audit/audit-redact.js.map +1 -0
- package/dist/src/audit/audit-types.d.ts +122 -0
- package/dist/src/audit/audit-types.js +64 -0
- package/dist/src/audit/audit-types.js.map +1 -0
- package/dist/src/audit/index.d.ts +10 -0
- package/dist/src/audit/index.js +10 -0
- package/dist/src/audit/index.js.map +1 -0
- package/dist/src/eval/eval-cost.d.ts +33 -0
- package/dist/src/eval/eval-cost.js +73 -0
- package/dist/src/eval/eval-cost.js.map +1 -0
- package/dist/src/eval/eval-diff.d.ts +11 -0
- package/dist/src/eval/eval-diff.js +97 -0
- package/dist/src/eval/eval-diff.js.map +1 -0
- package/dist/src/eval/eval-formatter.d.ts +23 -0
- package/dist/src/eval/eval-formatter.js +221 -0
- package/dist/src/eval/eval-formatter.js.map +1 -0
- package/dist/src/eval/eval-judge.d.ts +26 -0
- package/dist/src/eval/eval-judge.js +76 -0
- package/dist/src/eval/eval-judge.js.map +1 -0
- package/dist/src/eval/eval-run-builder.d.ts +25 -0
- package/dist/src/eval/eval-run-builder.js +78 -0
- package/dist/src/eval/eval-run-builder.js.map +1 -0
- package/dist/src/eval/eval-runner.d.ts +36 -0
- package/dist/src/eval/eval-runner.js +92 -0
- package/dist/src/eval/eval-runner.js.map +1 -0
- package/dist/src/eval/eval-session-provider.d.ts +40 -0
- package/dist/src/eval/eval-session-provider.js +46 -0
- package/dist/src/eval/eval-session-provider.js.map +1 -0
- package/dist/src/eval/eval-types.d.ts +146 -0
- package/dist/src/eval/eval-types.js +7 -0
- package/dist/src/eval/eval-types.js.map +1 -0
- package/dist/src/eval/experiment-runner.d.ts +16 -0
- package/dist/src/eval/experiment-runner.js +73 -0
- package/dist/src/eval/experiment-runner.js.map +1 -0
- package/dist/src/eval/experiment-types.d.ts +56 -0
- package/dist/src/eval/experiment-types.js +7 -0
- package/dist/src/eval/experiment-types.js.map +1 -0
- package/dist/src/eval/index.d.ts +22 -0
- package/dist/src/eval/index.js +18 -0
- package/dist/src/eval/index.js.map +1 -0
- package/dist/src/eval/multi-model-runner.d.ts +42 -0
- package/dist/src/eval/multi-model-runner.js +70 -0
- package/dist/src/eval/multi-model-runner.js.map +1 -0
- package/dist/src/eval/platform-eval-client.d.ts +105 -0
- package/dist/src/eval/platform-eval-client.js +155 -0
- package/dist/src/eval/platform-eval-client.js.map +1 -0
- package/dist/src/index.d.ts +41 -0
- package/dist/src/index.js +68 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/knowledge/index.d.ts +11 -0
- package/dist/src/knowledge/index.js +12 -0
- package/dist/src/knowledge/index.js.map +1 -0
- package/dist/src/knowledge/kb-formatter.d.ts +15 -0
- package/dist/src/knowledge/kb-formatter.js +78 -0
- package/dist/src/knowledge/kb-formatter.js.map +1 -0
- package/dist/src/knowledge/kb-index.d.ts +27 -0
- package/dist/src/knowledge/kb-index.js +66 -0
- package/dist/src/knowledge/kb-index.js.map +1 -0
- package/dist/src/knowledge/kb-types.d.ts +54 -0
- package/dist/src/knowledge/kb-types.js +7 -0
- package/dist/src/knowledge/kb-types.js.map +1 -0
- package/dist/src/knowledge/knowledge-store.d.ts +56 -0
- package/dist/src/knowledge/knowledge-store.js +141 -0
- package/dist/src/knowledge/knowledge-store.js.map +1 -0
- package/dist/src/knowledge/load-knowledge.d.ts +30 -0
- package/dist/src/knowledge/load-knowledge.js +161 -0
- package/dist/src/knowledge/load-knowledge.js.map +1 -0
- package/dist/src/knowledge/propose-kb-update.d.ts +32 -0
- package/dist/src/knowledge/propose-kb-update.js +148 -0
- package/dist/src/knowledge/propose-kb-update.js.map +1 -0
- package/dist/src/knowledge/propose-knowledge.d.ts +34 -0
- package/dist/src/knowledge/propose-knowledge.js +163 -0
- package/dist/src/knowledge/propose-knowledge.js.map +1 -0
- package/dist/src/mcp/index.d.ts +7 -0
- package/dist/src/mcp/index.js +7 -0
- package/dist/src/mcp/index.js.map +1 -0
- package/dist/src/mcp/mcp-manager.d.ts +96 -0
- package/dist/src/mcp/mcp-manager.js +192 -0
- package/dist/src/mcp/mcp-manager.js.map +1 -0
- package/dist/src/packages/config-deps.d.ts +20 -0
- package/dist/src/packages/config-deps.js +77 -0
- package/dist/src/packages/config-deps.js.map +1 -0
- package/dist/src/packages/env-file.d.ts +28 -0
- package/dist/src/packages/env-file.js +143 -0
- package/dist/src/packages/env-file.js.map +1 -0
- package/dist/src/packages/frontmatter.d.ts +28 -0
- package/dist/src/packages/frontmatter.js +77 -0
- package/dist/src/packages/frontmatter.js.map +1 -0
- package/dist/src/packages/index.d.ts +16 -0
- package/dist/src/packages/index.js +17 -0
- package/dist/src/packages/index.js.map +1 -0
- package/dist/src/packages/lock-file.d.ts +35 -0
- package/dist/src/packages/lock-file.js +117 -0
- package/dist/src/packages/lock-file.js.map +1 -0
- package/dist/src/packages/manifest-reader.d.ts +19 -0
- package/dist/src/packages/manifest-reader.js +91 -0
- package/dist/src/packages/manifest-reader.js.map +1 -0
- package/dist/src/packages/merge-engine.d.ts +63 -0
- package/dist/src/packages/merge-engine.js +357 -0
- package/dist/src/packages/merge-engine.js.map +1 -0
- package/dist/src/packages/npm-context.d.ts +56 -0
- package/dist/src/packages/npm-context.js +235 -0
- package/dist/src/packages/npm-context.js.map +1 -0
- package/dist/src/packages/npm-registry.d.ts +35 -0
- package/dist/src/packages/npm-registry.js +107 -0
- package/dist/src/packages/npm-registry.js.map +1 -0
- package/dist/src/packages/package-error.d.ts +16 -0
- package/dist/src/packages/package-error.js +17 -0
- package/dist/src/packages/package-error.js.map +1 -0
- package/dist/src/packages/package-types.d.ts +477 -0
- package/dist/src/packages/package-types.js +156 -0
- package/dist/src/packages/package-types.js.map +1 -0
- package/dist/src/packages/resolver.d.ts +41 -0
- package/dist/src/packages/resolver.js +353 -0
- package/dist/src/packages/resolver.js.map +1 -0
- package/dist/src/platform/config-builder.d.ts +24 -0
- package/dist/src/platform/config-builder.js +70 -0
- package/dist/src/platform/config-builder.js.map +1 -0
- package/dist/src/platform/index.d.ts +8 -0
- package/dist/src/platform/index.js +9 -0
- package/dist/src/platform/index.js.map +1 -0
- package/dist/src/platform/platform-client.d.ts +160 -0
- package/dist/src/platform/platform-client.js +486 -0
- package/dist/src/platform/platform-client.js.map +1 -0
- package/dist/src/platform/platform-types.d.ts +81 -0
- package/dist/src/platform/platform-types.js +18 -0
- package/dist/src/platform/platform-types.js.map +1 -0
- package/dist/src/providers/content-generator/google-to-llm.d.ts +87 -0
- package/dist/src/providers/content-generator/google-to-llm.js +226 -0
- package/dist/src/providers/content-generator/google-to-llm.js.map +1 -0
- package/dist/src/providers/content-generator/index.d.ts +10 -0
- package/dist/src/providers/content-generator/index.js +9 -0
- package/dist/src/providers/content-generator/index.js.map +1 -0
- package/dist/src/providers/content-generator/llm-to-google.d.ts +59 -0
- package/dist/src/providers/content-generator/llm-to-google.js +178 -0
- package/dist/src/providers/content-generator/llm-to-google.js.map +1 -0
- package/dist/src/providers/content-generator/multi-provider-content-generator.d.ts +61 -0
- package/dist/src/providers/content-generator/multi-provider-content-generator.js +144 -0
- package/dist/src/providers/content-generator/multi-provider-content-generator.js.map +1 -0
- package/dist/src/providers/runtime/anthropic-provider.d.ts +18 -0
- package/dist/src/providers/runtime/anthropic-provider.js +253 -0
- package/dist/src/providers/runtime/anthropic-provider.js.map +1 -0
- package/dist/src/providers/runtime/azure-provider.d.ts +25 -0
- package/dist/src/providers/runtime/azure-provider.js +206 -0
- package/dist/src/providers/runtime/azure-provider.js.map +1 -0
- package/dist/src/providers/runtime/bedrock-provider.d.ts +22 -0
- package/dist/src/providers/runtime/bedrock-provider.js +276 -0
- package/dist/src/providers/runtime/bedrock-provider.js.map +1 -0
- package/dist/src/providers/runtime/failover-provider.d.ts +30 -0
- package/dist/src/providers/runtime/failover-provider.js +124 -0
- package/dist/src/providers/runtime/failover-provider.js.map +1 -0
- package/dist/src/providers/runtime/google-provider.d.ts +17 -0
- package/dist/src/providers/runtime/google-provider.js +239 -0
- package/dist/src/providers/runtime/google-provider.js.map +1 -0
- package/dist/src/providers/runtime/index.d.ts +16 -0
- package/dist/src/providers/runtime/index.js +16 -0
- package/dist/src/providers/runtime/index.js.map +1 -0
- package/dist/src/providers/runtime/openai-provider.d.ts +21 -0
- package/dist/src/providers/runtime/openai-provider.js +266 -0
- package/dist/src/providers/runtime/openai-provider.js.map +1 -0
- package/dist/src/providers/runtime/provider-errors.d.ts +39 -0
- package/dist/src/providers/runtime/provider-errors.js +50 -0
- package/dist/src/providers/runtime/provider-errors.js.map +1 -0
- package/dist/src/providers/runtime/provider-factory.d.ts +19 -0
- package/dist/src/providers/runtime/provider-factory.js +45 -0
- package/dist/src/providers/runtime/provider-factory.js.map +1 -0
- package/dist/src/providers/runtime/runtime-provider-types.d.ts +63 -0
- package/dist/src/providers/runtime/runtime-provider-types.js +7 -0
- package/dist/src/providers/runtime/runtime-provider-types.js.map +1 -0
- package/dist/src/providers/runtime/streaming-types.d.ts +40 -0
- package/dist/src/providers/runtime/streaming-types.js +7 -0
- package/dist/src/providers/runtime/streaming-types.js.map +1 -0
- package/dist/src/repo/config-schema.d.ts +238 -0
- package/dist/src/repo/config-schema.js +155 -0
- package/dist/src/repo/config-schema.js.map +1 -0
- package/dist/src/repo/connection-schemas.d.ts +449 -0
- package/dist/src/repo/connection-schemas.js +109 -0
- package/dist/src/repo/connection-schemas.js.map +1 -0
- package/dist/src/repo/connection-types.d.ts +29 -0
- package/dist/src/repo/connection-types.js +7 -0
- package/dist/src/repo/connection-types.js.map +1 -0
- package/dist/src/repo/drift-detector.d.ts +26 -0
- package/dist/src/repo/drift-detector.js +66 -0
- package/dist/src/repo/drift-detector.js.map +1 -0
- package/dist/src/repo/graphql-drift-detector.d.ts +27 -0
- package/dist/src/repo/graphql-drift-detector.js +66 -0
- package/dist/src/repo/graphql-drift-detector.js.map +1 -0
- package/dist/src/repo/graphql-parser.d.ts +30 -0
- package/dist/src/repo/graphql-parser.js +125 -0
- package/dist/src/repo/graphql-parser.js.map +1 -0
- package/dist/src/repo/graphql-surface-parser.d.ts +20 -0
- package/dist/src/repo/graphql-surface-parser.js +74 -0
- package/dist/src/repo/graphql-surface-parser.js.map +1 -0
- package/dist/src/repo/index.d.ts +30 -0
- package/dist/src/repo/index.js +29 -0
- package/dist/src/repo/index.js.map +1 -0
- package/dist/src/repo/local-reader.d.ts +10 -0
- package/dist/src/repo/local-reader.js +299 -0
- package/dist/src/repo/local-reader.js.map +1 -0
- package/dist/src/repo/openapi-parser.d.ts +35 -0
- package/dist/src/repo/openapi-parser.js +93 -0
- package/dist/src/repo/openapi-parser.js.map +1 -0
- package/dist/src/repo/parsers.d.ts +91 -0
- package/dist/src/repo/parsers.js +454 -0
- package/dist/src/repo/parsers.js.map +1 -0
- package/dist/src/repo/platform-reader.d.ts +10 -0
- package/dist/src/repo/platform-reader.js +206 -0
- package/dist/src/repo/platform-reader.js.map +1 -0
- package/dist/src/repo/repo-loader.d.ts +14 -0
- package/dist/src/repo/repo-loader.js +25 -0
- package/dist/src/repo/repo-loader.js.map +1 -0
- package/dist/src/repo/repo-types.d.ts +159 -0
- package/dist/src/repo/repo-types.js +17 -0
- package/dist/src/repo/repo-types.js.map +1 -0
- package/dist/src/repo/spec-syncer.d.ts +30 -0
- package/dist/src/repo/spec-syncer.js +85 -0
- package/dist/src/repo/spec-syncer.js.map +1 -0
- package/dist/src/repo/store-loader.d.ts +19 -0
- package/dist/src/repo/store-loader.js +94 -0
- package/dist/src/repo/store-loader.js.map +1 -0
- package/dist/src/repo/store-schemas.d.ts +313 -0
- package/dist/src/repo/store-schemas.js +103 -0
- package/dist/src/repo/store-schemas.js.map +1 -0
- package/dist/src/repo/store-tool-schema.d.ts +29 -0
- package/dist/src/repo/store-tool-schema.js +103 -0
- package/dist/src/repo/store-tool-schema.js.map +1 -0
- package/dist/src/repo/store-types.d.ts +91 -0
- package/dist/src/repo/store-types.js +7 -0
- package/dist/src/repo/store-types.js.map +1 -0
- package/dist/src/repo/surface-parser.d.ts +17 -0
- package/dist/src/repo/surface-parser.js +75 -0
- package/dist/src/repo/surface-parser.js.map +1 -0
- package/dist/src/repo/tool-loader.d.ts +33 -0
- package/dist/src/repo/tool-loader.js +240 -0
- package/dist/src/repo/tool-loader.js.map +1 -0
- package/dist/src/repo/tool-types.d.ts +205 -0
- package/dist/src/repo/tool-types.js +61 -0
- package/dist/src/repo/tool-types.js.map +1 -0
- package/dist/src/roles/index.d.ts +7 -0
- package/dist/src/roles/index.js +8 -0
- package/dist/src/roles/index.js.map +1 -0
- package/dist/src/roles/role-filter.d.ts +33 -0
- package/dist/src/roles/role-filter.js +55 -0
- package/dist/src/roles/role-filter.js.map +1 -0
- package/dist/src/roles/role-types.d.ts +76 -0
- package/dist/src/roles/role-types.js +38 -0
- package/dist/src/roles/role-types.js.map +1 -0
- package/dist/src/runtime/connection-bridge.d.ts +19 -0
- package/dist/src/runtime/connection-bridge.js +103 -0
- package/dist/src/runtime/connection-bridge.js.map +1 -0
- package/dist/src/runtime/context-compiler.d.ts +35 -0
- package/dist/src/runtime/context-compiler.js +183 -0
- package/dist/src/runtime/context-compiler.js.map +1 -0
- package/dist/src/runtime/default-prompt.d.ts +28 -0
- package/dist/src/runtime/default-prompt.js +71 -0
- package/dist/src/runtime/default-prompt.js.map +1 -0
- package/dist/src/runtime/explore-tool.d.ts +96 -0
- package/dist/src/runtime/explore-tool.js +111 -0
- package/dist/src/runtime/explore-tool.js.map +1 -0
- package/dist/src/runtime/index.d.ts +26 -0
- package/dist/src/runtime/index.js +19 -0
- package/dist/src/runtime/index.js.map +1 -0
- package/dist/src/runtime/output-pipeline.d.ts +62 -0
- package/dist/src/runtime/output-pipeline.js +69 -0
- package/dist/src/runtime/output-pipeline.js.map +1 -0
- package/dist/src/runtime/plan-mode.d.ts +39 -0
- package/dist/src/runtime/plan-mode.js +81 -0
- package/dist/src/runtime/plan-mode.js.map +1 -0
- package/dist/src/runtime/preference-client.d.ts +39 -0
- package/dist/src/runtime/preference-client.js +70 -0
- package/dist/src/runtime/preference-client.js.map +1 -0
- package/dist/src/runtime/preference-detector.d.ts +22 -0
- package/dist/src/runtime/preference-detector.js +95 -0
- package/dist/src/runtime/preference-detector.js.map +1 -0
- package/dist/src/runtime/request-integration.d.ts +18 -0
- package/dist/src/runtime/request-integration.js +36 -0
- package/dist/src/runtime/request-integration.js.map +1 -0
- package/dist/src/runtime/runtime-types.d.ts +48 -0
- package/dist/src/runtime/runtime-types.js +7 -0
- package/dist/src/runtime/runtime-types.js.map +1 -0
- package/dist/src/runtime/session-setup.d.ts +53 -0
- package/dist/src/runtime/session-setup.js +90 -0
- package/dist/src/runtime/session-setup.js.map +1 -0
- package/dist/src/runtime/telemetry-client.d.ts +39 -0
- package/dist/src/runtime/telemetry-client.js +87 -0
- package/dist/src/runtime/telemetry-client.js.map +1 -0
- package/dist/src/runtime/telemetry-hooks.d.ts +47 -0
- package/dist/src/runtime/telemetry-hooks.js +115 -0
- package/dist/src/runtime/telemetry-hooks.js.map +1 -0
- package/dist/src/runtime/token-allocator.d.ts +34 -0
- package/dist/src/runtime/token-allocator.js +86 -0
- package/dist/src/runtime/token-allocator.js.map +1 -0
- package/dist/src/runtime/user-context.d.ts +49 -0
- package/dist/src/runtime/user-context.js +135 -0
- package/dist/src/runtime/user-context.js.map +1 -0
- package/dist/src/sdk.d.ts +57 -0
- package/dist/src/sdk.js +377 -0
- package/dist/src/sdk.js.map +1 -0
- package/dist/src/security/action-gate.d.ts +23 -0
- package/dist/src/security/action-gate.js +78 -0
- package/dist/src/security/action-gate.js.map +1 -0
- package/dist/src/security/field-scrubber.d.ts +27 -0
- package/dist/src/security/field-scrubber.js +152 -0
- package/dist/src/security/field-scrubber.js.map +1 -0
- package/dist/src/security/index.d.ts +14 -0
- package/dist/src/security/index.js +15 -0
- package/dist/src/security/index.js.map +1 -0
- package/dist/src/security/leak-detector.d.ts +23 -0
- package/dist/src/security/leak-detector.js +51 -0
- package/dist/src/security/leak-detector.js.map +1 -0
- package/dist/src/security/output-guard.d.ts +33 -0
- package/dist/src/security/output-guard.js +118 -0
- package/dist/src/security/output-guard.js.map +1 -0
- package/dist/src/security/pattern-scanner.d.ts +19 -0
- package/dist/src/security/pattern-scanner.js +66 -0
- package/dist/src/security/pattern-scanner.js.map +1 -0
- package/dist/src/security/scope-checker.d.ts +27 -0
- package/dist/src/security/scope-checker.js +52 -0
- package/dist/src/security/scope-checker.js.map +1 -0
- package/dist/src/security/scrub-tracker.d.ts +21 -0
- package/dist/src/security/scrub-tracker.js +39 -0
- package/dist/src/security/scrub-tracker.js.map +1 -0
- package/dist/src/security/security-types.d.ts +69 -0
- package/dist/src/security/security-types.js +17 -0
- package/dist/src/security/security-types.js.map +1 -0
- package/dist/src/security/threshold-evaluator.d.ts +13 -0
- package/dist/src/security/threshold-evaluator.js +44 -0
- package/dist/src/security/threshold-evaluator.js.map +1 -0
- package/dist/src/snapshot/index.d.ts +8 -0
- package/dist/src/snapshot/index.js +9 -0
- package/dist/src/snapshot/index.js.map +1 -0
- package/dist/src/snapshot/snapshot-builder.d.ts +37 -0
- package/dist/src/snapshot/snapshot-builder.js +152 -0
- package/dist/src/snapshot/snapshot-builder.js.map +1 -0
- package/dist/src/snapshot/snapshot-loader.d.ts +29 -0
- package/dist/src/snapshot/snapshot-loader.js +188 -0
- package/dist/src/snapshot/snapshot-loader.js.map +1 -0
- package/dist/src/snapshot/snapshot-types.d.ts +1940 -0
- package/dist/src/snapshot/snapshot-types.js +145 -0
- package/dist/src/snapshot/snapshot-types.js.map +1 -0
- package/dist/src/stores/index.d.ts +6 -0
- package/dist/src/stores/index.js +7 -0
- package/dist/src/stores/index.js.map +1 -0
- package/dist/src/stores/store-backend.d.ts +135 -0
- package/dist/src/stores/store-backend.js +7 -0
- package/dist/src/stores/store-backend.js.map +1 -0
- package/dist/src/templates/connections.d.ts +14 -0
- package/dist/src/templates/connections.js +7 -0
- package/dist/src/templates/connections.js.map +1 -0
- package/dist/src/templates/index.d.ts +7 -0
- package/dist/src/templates/index.js +8 -0
- package/dist/src/templates/index.js.map +1 -0
- package/dist/src/templates/template-resolver.d.ts +45 -0
- package/dist/src/templates/template-resolver.js +121 -0
- package/dist/src/templates/template-resolver.js.map +1 -0
- package/dist/src/tool-context.d.ts +33 -0
- package/dist/src/tool-context.js +7 -0
- package/dist/src/tool-context.js.map +1 -0
- package/dist/src/tool-registration.d.ts +14 -0
- package/dist/src/tool-registration.js +51 -0
- package/dist/src/tool-registration.js.map +1 -0
- package/dist/src/tools/amodal-tool-errors.d.ts +24 -0
- package/dist/src/tools/amodal-tool-errors.js +28 -0
- package/dist/src/tools/amodal-tool-errors.js.map +1 -0
- package/dist/src/tools/amodal-tool-names.d.ts +14 -0
- package/dist/src/tools/amodal-tool-names.js +15 -0
- package/dist/src/tools/amodal-tool-names.js.map +1 -0
- package/dist/src/tools/chain-tool-registry.d.ts +20 -0
- package/dist/src/tools/chain-tool-registry.js +49 -0
- package/dist/src/tools/chain-tool-registry.js.map +1 -0
- package/dist/src/tools/chain-tool-types.d.ts +190 -0
- package/dist/src/tools/chain-tool-types.js +50 -0
- package/dist/src/tools/chain-tool-types.js.map +1 -0
- package/dist/src/tools/chain-tool.d.ts +34 -0
- package/dist/src/tools/chain-tool.js +294 -0
- package/dist/src/tools/chain-tool.js.map +1 -0
- package/dist/src/tools/custom-tool-registrar.d.ts +8 -0
- package/dist/src/tools/custom-tool-registrar.js +10 -0
- package/dist/src/tools/custom-tool-registrar.js.map +1 -0
- package/dist/src/tools/definitions/amodal-tools.d.ts +9 -0
- package/dist/src/tools/definitions/amodal-tools.js +192 -0
- package/dist/src/tools/definitions/amodal-tools.js.map +1 -0
- package/dist/src/tools/function-tool-registry.d.ts +22 -0
- package/dist/src/tools/function-tool-registry.js +45 -0
- package/dist/src/tools/function-tool-registry.js.map +1 -0
- package/dist/src/tools/function-tool-types.d.ts +76 -0
- package/dist/src/tools/function-tool-types.js +27 -0
- package/dist/src/tools/function-tool-types.js.map +1 -0
- package/dist/src/tools/function-tool.d.ts +34 -0
- package/dist/src/tools/function-tool.js +97 -0
- package/dist/src/tools/function-tool.js.map +1 -0
- package/dist/src/tools/http-tool-registry.d.ts +20 -0
- package/dist/src/tools/http-tool-registry.js +34 -0
- package/dist/src/tools/http-tool-registry.js.map +1 -0
- package/dist/src/tools/http-tool-types.d.ts +92 -0
- package/dist/src/tools/http-tool-types.js +44 -0
- package/dist/src/tools/http-tool-types.js.map +1 -0
- package/dist/src/tools/http-tool.d.ts +32 -0
- package/dist/src/tools/http-tool.js +176 -0
- package/dist/src/tools/http-tool.js.map +1 -0
- package/dist/src/tools/merge-template.d.ts +33 -0
- package/dist/src/tools/merge-template.js +65 -0
- package/dist/src/tools/merge-template.js.map +1 -0
- package/dist/src/tools/request-tool-types.d.ts +46 -0
- package/dist/src/tools/request-tool-types.js +20 -0
- package/dist/src/tools/request-tool-types.js.map +1 -0
- package/dist/src/tools/request-tool.d.ts +29 -0
- package/dist/src/tools/request-tool.js +268 -0
- package/dist/src/tools/request-tool.js.map +1 -0
- package/dist/src/tools/store-query-tool.d.ts +29 -0
- package/dist/src/tools/store-query-tool.js +82 -0
- package/dist/src/tools/store-query-tool.js.map +1 -0
- package/dist/src/tools/store-write-tool.d.ts +26 -0
- package/dist/src/tools/store-write-tool.js +84 -0
- package/dist/src/tools/store-write-tool.js.map +1 -0
- package/dist/src/tools/tool-definition-types.d.ts +21 -0
- package/dist/src/tools/tool-definition-types.js +7 -0
- package/dist/src/tools/tool-definition-types.js.map +1 -0
- package/dist/src/tools/tool-utils.d.ts +29 -0
- package/dist/src/tools/tool-utils.js +66 -0
- package/dist/src/tools/tool-utils.js.map +1 -0
- package/dist/src/versions/bundle-loader.d.ts +37 -0
- package/dist/src/versions/bundle-loader.js +99 -0
- package/dist/src/versions/bundle-loader.js.map +1 -0
- package/dist/src/versions/dependency-manager.d.ts +54 -0
- package/dist/src/versions/dependency-manager.js +132 -0
- package/dist/src/versions/dependency-manager.js.map +1 -0
- package/dist/src/versions/handler-loader.d.ts +27 -0
- package/dist/src/versions/handler-loader.js +62 -0
- package/dist/src/versions/handler-loader.js.map +1 -0
- package/dist/src/versions/index.d.ts +10 -0
- package/dist/src/versions/index.js +11 -0
- package/dist/src/versions/index.js.map +1 -0
- package/dist/src/versions/version-bundle-types.d.ts +1278 -0
- package/dist/src/versions/version-bundle-types.js +207 -0
- package/dist/src/versions/version-bundle-types.js.map +1 -0
- package/dist/src/versions/version-manager.d.ts +89 -0
- package/dist/src/versions/version-manager.js +124 -0
- package/dist/src/versions/version-manager.js.map +1 -0
- package/dist/src/widgets/index.d.ts +8 -0
- package/dist/src/widgets/index.js +8 -0
- package/dist/src/widgets/index.js.map +1 -0
- package/dist/src/widgets/present-tool.d.ts +21 -0
- package/dist/src/widgets/present-tool.js +107 -0
- package/dist/src/widgets/present-tool.js.map +1 -0
- package/dist/src/widgets/widget-types.d.ts +78 -0
- package/dist/src/widgets/widget-types.js +28 -0
- package/dist/src/widgets/widget-types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { runEvalSuite } from './eval-runner.js';
|
|
7
|
+
import { buildEvalRun } from './eval-run-builder.js';
|
|
8
|
+
import { SessionEvalQueryProvider } from './eval-session-provider.js';
|
|
9
|
+
/**
|
|
10
|
+
* Run the same eval suite against multiple models.
|
|
11
|
+
* Yields progress events and returns an EvalRunRecord per model.
|
|
12
|
+
*/
|
|
13
|
+
export async function* runMultiModelEval(repo, options) {
|
|
14
|
+
const runs = [];
|
|
15
|
+
for (let i = 0; i < options.models.length; i++) {
|
|
16
|
+
const modelConfig = options.models[i];
|
|
17
|
+
const modelInfo = {
|
|
18
|
+
provider: modelConfig.provider,
|
|
19
|
+
model: modelConfig.model,
|
|
20
|
+
};
|
|
21
|
+
yield {
|
|
22
|
+
type: 'model_start',
|
|
23
|
+
model: modelInfo,
|
|
24
|
+
currentModel: i + 1,
|
|
25
|
+
totalModels: options.models.length,
|
|
26
|
+
};
|
|
27
|
+
const queryProvider = new SessionEvalQueryProvider({
|
|
28
|
+
modelConfig,
|
|
29
|
+
systemPrompt: options.systemPrompt,
|
|
30
|
+
tools: options.tools,
|
|
31
|
+
maxTokens: options.maxTokens,
|
|
32
|
+
});
|
|
33
|
+
const runnerOptions = {
|
|
34
|
+
queryProvider,
|
|
35
|
+
judgeProvider: options.judgeProvider,
|
|
36
|
+
gitSha: options.gitSha,
|
|
37
|
+
filter: options.filter,
|
|
38
|
+
model: modelInfo,
|
|
39
|
+
};
|
|
40
|
+
const gen = runEvalSuite(repo, runnerOptions);
|
|
41
|
+
let suiteResult;
|
|
42
|
+
while (true) {
|
|
43
|
+
const next = await gen.next();
|
|
44
|
+
if (next.done) {
|
|
45
|
+
suiteResult = next.value;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const run = buildEvalRun(suiteResult, modelInfo, {
|
|
50
|
+
orgId: options.orgId,
|
|
51
|
+
appId: options.appId,
|
|
52
|
+
gitSha: options.gitSha,
|
|
53
|
+
label: options.label,
|
|
54
|
+
triggeredBy: options.triggeredBy,
|
|
55
|
+
});
|
|
56
|
+
runs.push(run);
|
|
57
|
+
const totalCases = suiteResult.results.length;
|
|
58
|
+
yield {
|
|
59
|
+
type: 'model_complete',
|
|
60
|
+
model: modelInfo,
|
|
61
|
+
currentModel: i + 1,
|
|
62
|
+
totalModels: options.models.length,
|
|
63
|
+
passRate: totalCases > 0 ? suiteResult.totalPassed / totalCases : 0,
|
|
64
|
+
costMicros: run.totalCost.estimatedCostMicros,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
yield { type: 'all_complete' };
|
|
68
|
+
return runs;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=multi-model-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-model-runner.js","sourceRoot":"","sources":["../../../src/eval/multi-model-runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AA+BpE;;;GAGG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,iBAAiB,CACtC,IAAgB,EAChB,OAA8B;IAE9B,MAAM,IAAI,GAAoB,EAAE,CAAC;IAEjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,SAAS,GAAkB;YAC/B,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,KAAK,EAAE,WAAW,CAAC,KAAK;SACzB,CAAC;QAEF,MAAM;YACJ,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,SAAS;YAChB,YAAY,EAAE,CAAC,GAAG,CAAC;YACnB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;SACnC,CA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,CAAC,WAAW,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACnE,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,mBAAmB;SAC9C,CAAC;IACJ,CAAC;IAED,MAAM,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { EvalBaseline, EvalSuiteResult, EvalTrendPoint } from './eval-types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Summary of an eval run (without full suite result JSONB).
|
|
9
|
+
*/
|
|
10
|
+
export interface EvalRunSummary {
|
|
11
|
+
id: string;
|
|
12
|
+
modelProvider: string;
|
|
13
|
+
modelName: string;
|
|
14
|
+
gitSha: string | null;
|
|
15
|
+
label: string | null;
|
|
16
|
+
triggeredBy: string;
|
|
17
|
+
passRate: number;
|
|
18
|
+
totalPassed: number;
|
|
19
|
+
totalFailed: number;
|
|
20
|
+
totalDurationMs: number;
|
|
21
|
+
estimatedCostMicros: number;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Comparison result from the platform API.
|
|
26
|
+
*/
|
|
27
|
+
export interface PlatformEvalComparison {
|
|
28
|
+
runA: Record<string, unknown>;
|
|
29
|
+
runB: Record<string, unknown>;
|
|
30
|
+
costDelta: {
|
|
31
|
+
totalMicros: number;
|
|
32
|
+
};
|
|
33
|
+
qualityDelta: {
|
|
34
|
+
passRateDelta: number;
|
|
35
|
+
durationDeltaMs: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Client for platform eval baseline and run storage.
|
|
40
|
+
*/
|
|
41
|
+
export declare class PlatformEvalClient {
|
|
42
|
+
private readonly url;
|
|
43
|
+
private readonly apiKey;
|
|
44
|
+
constructor(platformUrl: string, apiKey: string);
|
|
45
|
+
private get headers();
|
|
46
|
+
/**
|
|
47
|
+
* Get the latest production baseline.
|
|
48
|
+
*/
|
|
49
|
+
getProductionBaseline(): Promise<EvalBaseline | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Upload a new baseline.
|
|
52
|
+
*/
|
|
53
|
+
uploadBaseline(result: EvalSuiteResult, gitSha: string, isProduction: boolean): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Create a new eval run.
|
|
56
|
+
*/
|
|
57
|
+
createRun(data: {
|
|
58
|
+
orgId?: string;
|
|
59
|
+
appId?: string;
|
|
60
|
+
modelProvider: string;
|
|
61
|
+
modelName: string;
|
|
62
|
+
gitSha?: string;
|
|
63
|
+
label?: string;
|
|
64
|
+
triggeredBy?: string;
|
|
65
|
+
passRate: number;
|
|
66
|
+
totalPassed: number;
|
|
67
|
+
totalFailed: number;
|
|
68
|
+
totalDurationMs: number;
|
|
69
|
+
inputTokens: number;
|
|
70
|
+
outputTokens: number;
|
|
71
|
+
estimatedCostMicros: number;
|
|
72
|
+
suiteResult: Record<string, unknown>;
|
|
73
|
+
perCaseCosts: Array<Record<string, unknown>>;
|
|
74
|
+
}): Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* List eval runs for an org.
|
|
77
|
+
*/
|
|
78
|
+
listRuns(options?: {
|
|
79
|
+
orgId?: string;
|
|
80
|
+
model?: string;
|
|
81
|
+
label?: string;
|
|
82
|
+
from?: string;
|
|
83
|
+
to?: string;
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
}): Promise<EvalRunSummary[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Get a single eval run by ID.
|
|
89
|
+
*/
|
|
90
|
+
getRun(id: string): Promise<Record<string, unknown> | null>;
|
|
91
|
+
/**
|
|
92
|
+
* Compare two eval runs.
|
|
93
|
+
*/
|
|
94
|
+
compareRuns(runAId: string, runBId: string): Promise<PlatformEvalComparison>;
|
|
95
|
+
/**
|
|
96
|
+
* Get eval trend data for charting.
|
|
97
|
+
*/
|
|
98
|
+
getTrends(options?: {
|
|
99
|
+
orgId?: string;
|
|
100
|
+
model?: string;
|
|
101
|
+
limit?: number;
|
|
102
|
+
from?: string;
|
|
103
|
+
to?: string;
|
|
104
|
+
}): Promise<EvalTrendPoint[]>;
|
|
105
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Client for platform eval baseline and run storage.
|
|
8
|
+
*/
|
|
9
|
+
export class PlatformEvalClient {
|
|
10
|
+
url;
|
|
11
|
+
apiKey;
|
|
12
|
+
constructor(platformUrl, apiKey) {
|
|
13
|
+
this.url = platformUrl.replace(/\/$/, '');
|
|
14
|
+
this.apiKey = apiKey;
|
|
15
|
+
}
|
|
16
|
+
get headers() {
|
|
17
|
+
return {
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
// -------------------------------------------------------------------------
|
|
23
|
+
// Baselines
|
|
24
|
+
// -------------------------------------------------------------------------
|
|
25
|
+
/**
|
|
26
|
+
* Get the latest production baseline.
|
|
27
|
+
*/
|
|
28
|
+
async getProductionBaseline() {
|
|
29
|
+
const response = await fetch(`${this.url}/api/evals/baselines/production`, {
|
|
30
|
+
headers: this.headers,
|
|
31
|
+
});
|
|
32
|
+
if (response.status === 404)
|
|
33
|
+
return null;
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
throw new Error(`Failed to fetch baseline: ${response.status}`);
|
|
36
|
+
}
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
38
|
+
return await response.json();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Upload a new baseline.
|
|
42
|
+
*/
|
|
43
|
+
async uploadBaseline(result, gitSha, isProduction) {
|
|
44
|
+
const response = await fetch(`${this.url}/api/evals/baselines`, {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: this.headers,
|
|
47
|
+
body: JSON.stringify({ result, gitSha, isProduction }),
|
|
48
|
+
});
|
|
49
|
+
if (!response.ok) {
|
|
50
|
+
throw new Error(`Failed to upload baseline: ${response.status}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// -------------------------------------------------------------------------
|
|
54
|
+
// Eval Runs
|
|
55
|
+
// -------------------------------------------------------------------------
|
|
56
|
+
/**
|
|
57
|
+
* Create a new eval run.
|
|
58
|
+
*/
|
|
59
|
+
async createRun(data) {
|
|
60
|
+
const response = await fetch(`${this.url}/api/evals/runs`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
headers: this.headers,
|
|
63
|
+
body: JSON.stringify(data),
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) {
|
|
66
|
+
throw new Error(`Failed to create eval run: ${response.status}`);
|
|
67
|
+
}
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
69
|
+
const body = await response.json();
|
|
70
|
+
return body.id;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* List eval runs for an org.
|
|
74
|
+
*/
|
|
75
|
+
async listRuns(options) {
|
|
76
|
+
const params = new URLSearchParams();
|
|
77
|
+
if (options?.orgId)
|
|
78
|
+
params.set('orgId', options.orgId);
|
|
79
|
+
if (options?.model)
|
|
80
|
+
params.set('model', options.model);
|
|
81
|
+
if (options?.label)
|
|
82
|
+
params.set('label', options.label);
|
|
83
|
+
if (options?.from)
|
|
84
|
+
params.set('from', options.from);
|
|
85
|
+
if (options?.to)
|
|
86
|
+
params.set('to', options.to);
|
|
87
|
+
if (options?.limit)
|
|
88
|
+
params.set('limit', String(options.limit));
|
|
89
|
+
if (options?.offset)
|
|
90
|
+
params.set('offset', String(options.offset));
|
|
91
|
+
const qs = params.toString() ? `?${params.toString()}` : '';
|
|
92
|
+
const response = await fetch(`${this.url}/api/evals/runs${qs}`, {
|
|
93
|
+
headers: this.headers,
|
|
94
|
+
});
|
|
95
|
+
if (!response.ok) {
|
|
96
|
+
throw new Error(`Failed to list eval runs: ${response.status}`);
|
|
97
|
+
}
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
99
|
+
const body = await response.json();
|
|
100
|
+
return body.runs;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get a single eval run by ID.
|
|
104
|
+
*/
|
|
105
|
+
async getRun(id) {
|
|
106
|
+
const response = await fetch(`${this.url}/api/evals/runs/${encodeURIComponent(id)}`, {
|
|
107
|
+
headers: this.headers,
|
|
108
|
+
});
|
|
109
|
+
if (response.status === 404)
|
|
110
|
+
return null;
|
|
111
|
+
if (!response.ok) {
|
|
112
|
+
throw new Error(`Failed to get eval run: ${response.status}`);
|
|
113
|
+
}
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
115
|
+
return await response.json();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Compare two eval runs.
|
|
119
|
+
*/
|
|
120
|
+
async compareRuns(runAId, runBId) {
|
|
121
|
+
const response = await fetch(`${this.url}/api/evals/runs/compare?runA=${encodeURIComponent(runAId)}&runB=${encodeURIComponent(runBId)}`, { headers: this.headers });
|
|
122
|
+
if (!response.ok) {
|
|
123
|
+
throw new Error(`Failed to compare eval runs: ${response.status}`);
|
|
124
|
+
}
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
126
|
+
return await response.json();
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get eval trend data for charting.
|
|
130
|
+
*/
|
|
131
|
+
async getTrends(options) {
|
|
132
|
+
const params = new URLSearchParams();
|
|
133
|
+
if (options?.orgId)
|
|
134
|
+
params.set('orgId', options.orgId);
|
|
135
|
+
if (options?.model)
|
|
136
|
+
params.set('model', options.model);
|
|
137
|
+
if (options?.limit)
|
|
138
|
+
params.set('limit', String(options.limit));
|
|
139
|
+
if (options?.from)
|
|
140
|
+
params.set('from', options.from);
|
|
141
|
+
if (options?.to)
|
|
142
|
+
params.set('to', options.to);
|
|
143
|
+
const qs = params.toString() ? `?${params.toString()}` : '';
|
|
144
|
+
const response = await fetch(`${this.url}/api/evals/trends${qs}`, {
|
|
145
|
+
headers: this.headers,
|
|
146
|
+
});
|
|
147
|
+
if (!response.ok) {
|
|
148
|
+
throw new Error(`Failed to get eval trends: ${response.status}`);
|
|
149
|
+
}
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- platform response
|
|
151
|
+
const body = await response.json();
|
|
152
|
+
return body.trends;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=platform-eval-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-eval-client.js","sourceRoot":"","sources":["../../../src/eval/platform-eval-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgCH;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACZ,GAAG,CAAS;IACZ,MAAM,CAAS;IAEhC,YAAY,WAAmB,EAAE,MAAc;QAC7C,IAAI,CAAC,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,IAAY,OAAO;QACjB,OAAO;YACL,cAAc,EAAE,kBAAkB;YAClC,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;SACzC,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,YAAY;IACZ,4EAA4E;IAE5E;;OAEG;IACH,KAAK,CAAC,qBAAq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Q,CAAC,IAAI,EAAgC,CAAC;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
export * from '@google/gemini-cli-core';
|
|
7
|
+
export { AmodalConfig, type AmodalConfigParameters, type AmodalConfigExtensions, } from './amodal-config.js';
|
|
8
|
+
export type { ToolContext } from './tool-context.js';
|
|
9
|
+
export { registerAmodalTools } from './tool-registration.js';
|
|
10
|
+
export { PROPOSE_KNOWLEDGE_TOOL_NAME, LOAD_KNOWLEDGE_TOOL_NAME, PRESENT_TOOL_NAME, REQUEST_TOOL_NAME, DISPATCH_TOOL_NAME, } from './tools/amodal-tool-names.js';
|
|
11
|
+
export { getProposeKnowledgeDefinition, getPresentToolDefinition, getRequestToolDefinition, } from './tools/definitions/amodal-tools.js';
|
|
12
|
+
export type { ToolDefinition } from './tools/tool-definition-types.js';
|
|
13
|
+
export * from './knowledge/index.js';
|
|
14
|
+
export * from './widgets/index.js';
|
|
15
|
+
export * from './platform/index.js';
|
|
16
|
+
export * from './audit/index.js';
|
|
17
|
+
export * from './versions/index.js';
|
|
18
|
+
export * from './templates/index.js';
|
|
19
|
+
export * from './roles/index.js';
|
|
20
|
+
export * from './repo/index.js';
|
|
21
|
+
export * from './stores/index.js';
|
|
22
|
+
export * from './packages/index.js';
|
|
23
|
+
export * from './security/index.js';
|
|
24
|
+
export * from './runtime/index.js';
|
|
25
|
+
export * from './snapshot/index.js';
|
|
26
|
+
export * from './eval/index.js';
|
|
27
|
+
export * from './providers/runtime/index.js';
|
|
28
|
+
export * from './providers/content-generator/index.js';
|
|
29
|
+
export { buildDefaultPrompt } from './runtime/default-prompt.js';
|
|
30
|
+
export { StoreWriteTool } from './tools/store-write-tool.js';
|
|
31
|
+
export { StoreQueryTool, QUERY_STORE_TOOL_NAME } from './tools/store-query-tool.js';
|
|
32
|
+
export * from './tools/http-tool-types.js';
|
|
33
|
+
export * from './tools/chain-tool-types.js';
|
|
34
|
+
export * from './tools/function-tool-types.js';
|
|
35
|
+
export * from './tools/request-tool-types.js';
|
|
36
|
+
export { registerHttpTools } from './tools/http-tool-registry.js';
|
|
37
|
+
export { registerChainTools } from './tools/chain-tool-registry.js';
|
|
38
|
+
export { registerFunctionTools } from './tools/function-tool-registry.js';
|
|
39
|
+
export { RequestTool } from './tools/request-tool.js';
|
|
40
|
+
export * from './mcp/index.js';
|
|
41
|
+
export { AgentSDK } from './sdk.js';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
// Re-export ALL upstream symbols so consumers only need @amodalai/core
|
|
7
|
+
export * from '@google/gemini-cli-core';
|
|
8
|
+
// Our config wrapper
|
|
9
|
+
export { AmodalConfig, } from './amodal-config.js';
|
|
10
|
+
// Tool registration
|
|
11
|
+
export { registerAmodalTools } from './tool-registration.js';
|
|
12
|
+
// Amodal tool names
|
|
13
|
+
export { PROPOSE_KNOWLEDGE_TOOL_NAME, LOAD_KNOWLEDGE_TOOL_NAME, PRESENT_TOOL_NAME, REQUEST_TOOL_NAME, DISPATCH_TOOL_NAME, } from './tools/amodal-tool-names.js';
|
|
14
|
+
// Amodal tool definitions
|
|
15
|
+
export { getProposeKnowledgeDefinition, getPresentToolDefinition, getRequestToolDefinition, } from './tools/definitions/amodal-tools.js';
|
|
16
|
+
// Knowledge base
|
|
17
|
+
export * from './knowledge/index.js';
|
|
18
|
+
// Widgets
|
|
19
|
+
export * from './widgets/index.js';
|
|
20
|
+
// Platform client and config
|
|
21
|
+
export * from './platform/index.js';
|
|
22
|
+
// Audit logging
|
|
23
|
+
export * from './audit/index.js';
|
|
24
|
+
// Version bundle system
|
|
25
|
+
export * from './versions/index.js';
|
|
26
|
+
// Template engine and connection types
|
|
27
|
+
export * from './templates/index.js';
|
|
28
|
+
// Role definitions and filtering
|
|
29
|
+
export * from './roles/index.js';
|
|
30
|
+
// Repo reader and configuration
|
|
31
|
+
export * from './repo/index.js';
|
|
32
|
+
// Store persistence
|
|
33
|
+
export * from './stores/index.js';
|
|
34
|
+
// Package management
|
|
35
|
+
export * from './packages/index.js';
|
|
36
|
+
// Security infrastructure
|
|
37
|
+
export * from './security/index.js';
|
|
38
|
+
// Runtime assembly
|
|
39
|
+
export * from './runtime/index.js';
|
|
40
|
+
// Snapshot builder and loader
|
|
41
|
+
export * from './snapshot/index.js';
|
|
42
|
+
// Eval infrastructure
|
|
43
|
+
export * from './eval/index.js';
|
|
44
|
+
// Runtime provider abstraction
|
|
45
|
+
export * from './providers/runtime/index.js';
|
|
46
|
+
// Multi-provider content generator (bridges upstream ContentGenerator to RuntimeProvider)
|
|
47
|
+
export * from './providers/content-generator/index.js';
|
|
48
|
+
// Default system prompt
|
|
49
|
+
export { buildDefaultPrompt } from './runtime/default-prompt.js';
|
|
50
|
+
// Store tools
|
|
51
|
+
export { StoreWriteTool } from './tools/store-write-tool.js';
|
|
52
|
+
export { StoreQueryTool, QUERY_STORE_TOOL_NAME } from './tools/store-query-tool.js';
|
|
53
|
+
// Custom tool types
|
|
54
|
+
export * from './tools/http-tool-types.js';
|
|
55
|
+
export * from './tools/chain-tool-types.js';
|
|
56
|
+
export * from './tools/function-tool-types.js';
|
|
57
|
+
export * from './tools/request-tool-types.js';
|
|
58
|
+
// Custom tool registrars
|
|
59
|
+
export { registerHttpTools } from './tools/http-tool-registry.js';
|
|
60
|
+
export { registerChainTools } from './tools/chain-tool-registry.js';
|
|
61
|
+
export { registerFunctionTools } from './tools/function-tool-registry.js';
|
|
62
|
+
// Request tool
|
|
63
|
+
export { RequestTool } from './tools/request-tool.js';
|
|
64
|
+
// MCP client manager
|
|
65
|
+
export * from './mcp/index.js';
|
|
66
|
+
// AgentSDK
|
|
67
|
+
export { AgentSDK } from './sdk.js';
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,uEAAuE;AACvE,cAAc,yBAAyB,CAAC;AAExC,qBAAqB;AACrB,OAAO,EACL,YAAY,GAGb,MAAM,oBAAoB,CAAC;AAG5B,oBAAoB;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,oBAAoB;AACpB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC,0BAA0B;AAC1B,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,qCAAqC,CAAC;AAK7C,iBAAiB;AACjB,cAAc,sBAAsB,CAAC;AAErC,UAAU;AACV,cAAc,oBAAoB,CAAC;AAEnC,6BAA6B;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,gBAAgB;AAChB,cAAc,kBAAkB,CAAC;AAEjC,wBAAwB;AACxB,cAAc,qBAAqB,CAAC;AAEpC,uCAAuC;AACvC,cAAc,sBAAsB,CAAC;AAErC,iCAAiC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,gCAAgC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,oBAAoB;AACpB,cAAc,mBAAmB,CAAC;AAElC,qBAAqB;AACrB,cAAc,qBAAqB,CAAC;AAEpC,0BAA0B;AAC1B,cAAc,qBAAqB,CAAC;AAEpC,mBAAmB;AACnB,cAAc,oBAAoB,CAAC;AAEnC,8BAA8B;AAC9B,cAAc,qBAAqB,CAAC;AAEpC,sBAAsB;AACtB,cAAc,iBAAiB,CAAC;AAEhC,+BAA+B;AAC/B,cAAc,8BAA8B,CAAC;AAE7C,0FAA0F;AAC1F,cAAc,wCAAwC,CAAC;AAEvD,wBAAwB;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,cAAc;AACd,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpF,oBAAoB;AACpB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAE9C,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,qBAAqB;AACrB,cAAc,gBAAgB,CAAC;AAE/B,WAAW;AACX,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
export * from './kb-types.js';
|
|
7
|
+
export * from './kb-formatter.js';
|
|
8
|
+
export * from './kb-index.js';
|
|
9
|
+
export * from './knowledge-store.js';
|
|
10
|
+
export * from './load-knowledge.js';
|
|
11
|
+
export * from './propose-knowledge.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
export * from './kb-types.js';
|
|
7
|
+
export * from './kb-formatter.js';
|
|
8
|
+
export * from './kb-index.js';
|
|
9
|
+
export * from './knowledge-store.js';
|
|
10
|
+
export * from './load-knowledge.js';
|
|
11
|
+
export * from './propose-knowledge.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/knowledge/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { KBDocument } from './kb-types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Format org-level and segment-level knowledge base documents into a
|
|
9
|
+
* markdown string suitable for injection into the system prompt.
|
|
10
|
+
*
|
|
11
|
+
* Documents with legacy category names are automatically normalized.
|
|
12
|
+
* Empty categories are omitted.
|
|
13
|
+
* Returns empty string when no documents exist.
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatKnowledgeBase(appDocs: KBDocument[], tenantDocs: KBDocument[]): string;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Display order and names for document categories.
|
|
8
|
+
* Application-level first, then tenant-level.
|
|
9
|
+
*/
|
|
10
|
+
const CATEGORY_ORDER = [
|
|
11
|
+
// Application-level categories
|
|
12
|
+
'system_docs',
|
|
13
|
+
'methodology',
|
|
14
|
+
'patterns',
|
|
15
|
+
'false_positives',
|
|
16
|
+
'response_procedures',
|
|
17
|
+
// Tenant-level categories
|
|
18
|
+
'environment',
|
|
19
|
+
'baselines',
|
|
20
|
+
'team',
|
|
21
|
+
'incident_history',
|
|
22
|
+
'working_memory',
|
|
23
|
+
];
|
|
24
|
+
const CATEGORY_DISPLAY_NAMES = {
|
|
25
|
+
system_docs: 'System Documentation',
|
|
26
|
+
methodology: 'Methodology',
|
|
27
|
+
patterns: 'Patterns',
|
|
28
|
+
false_positives: 'False Positive Patterns',
|
|
29
|
+
response_procedures: 'Response Procedures',
|
|
30
|
+
environment: 'Environment',
|
|
31
|
+
baselines: 'Baselines',
|
|
32
|
+
team: 'Team',
|
|
33
|
+
incident_history: 'Incident History',
|
|
34
|
+
working_memory: 'Working Memory',
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Format documents grouped by category into a markdown section.
|
|
38
|
+
* Documents with legacy categories are normalized to new names before grouping.
|
|
39
|
+
*/
|
|
40
|
+
function formatDocsByCategory(docs) {
|
|
41
|
+
const sections = [];
|
|
42
|
+
for (const category of CATEGORY_ORDER) {
|
|
43
|
+
const categoryDocs = docs.filter((d) => d.category === category);
|
|
44
|
+
if (categoryDocs.length === 0)
|
|
45
|
+
continue;
|
|
46
|
+
const heading = CATEGORY_DISPLAY_NAMES[category];
|
|
47
|
+
const docEntries = categoryDocs
|
|
48
|
+
.map((d) => `### ${d.title}\n${d.body}`)
|
|
49
|
+
.join('\n\n');
|
|
50
|
+
sections.push(`## ${heading}\n${docEntries}`);
|
|
51
|
+
}
|
|
52
|
+
return sections.join('\n\n');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Format org-level and segment-level knowledge base documents into a
|
|
56
|
+
* markdown string suitable for injection into the system prompt.
|
|
57
|
+
*
|
|
58
|
+
* Documents with legacy category names are automatically normalized.
|
|
59
|
+
* Empty categories are omitted.
|
|
60
|
+
* Returns empty string when no documents exist.
|
|
61
|
+
*/
|
|
62
|
+
export function formatKnowledgeBase(appDocs, tenantDocs) {
|
|
63
|
+
const sections = [];
|
|
64
|
+
if (appDocs.length > 0) {
|
|
65
|
+
const appContent = formatDocsByCategory(appDocs);
|
|
66
|
+
if (appContent) {
|
|
67
|
+
sections.push(`# Application Knowledge\n(product-level domain expertise, shared across all tenants)\n\n${appContent}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (tenantDocs.length > 0) {
|
|
71
|
+
const tenantContent = formatDocsByCategory(tenantDocs);
|
|
72
|
+
if (tenantContent) {
|
|
73
|
+
sections.push(`# Tenant Knowledge\n(specific to this deployment)\n\n${tenantContent}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return sections.join('\n\n');
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=kb-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kb-formatter.js","sourceRoot":"","sources":["../../../src/knowledge/kb-formatter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,MAAM,cAAc,GAAuB;IACzC,+BAA+B;IAC/B,aAAa;IACb,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,qBAAqB;IACrB,0BAA0B;IAC1B,aAAa;IACb,WAAW;IACX,MAAM;IACN,kBAAkB;IAClB,gBAAgB;CACjB,CAAC;AAEF,MAAM,sBAAsB,GAAqC;IAC/D,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,yBAAyB;IAC1C,mBAAmB,EAAE,qBAAqB;IAC1C,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF;;;GAGG;AACH,SAAS,oBAAoB,CAAC,IAAkB;IAC9C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,M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|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { KBDocument, DocumentCategory, ScopeType } from './kb-types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A compact index entry for a KB document (used in the system prompt
|
|
9
|
+
* instead of loading the full body).
|
|
10
|
+
*/
|
|
11
|
+
export interface KBIndexEntry {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
category: DocumentCategory;
|
|
15
|
+
tags: string[];
|
|
16
|
+
scope_type: ScopeType;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Build a list of index entries from KB documents.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildKnowledgeIndex(docs: KBDocument[]): KBIndexEntry[];
|
|
22
|
+
/**
|
|
23
|
+
* Format KB documents as a compact index table for the system prompt.
|
|
24
|
+
* Groups by scope (application / tenant) and shows title, category, tags, and ID.
|
|
25
|
+
* The agent can then use `load_knowledge` to fetch full bodies on demand.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatKnowledgeIndex(appDocs: KBDocument[], tenantDocs: KBDocument[]): string;
|