@homeflare/alchemy 0.42.0 → 0.44.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/README.md +10 -1
- package/dist/caddy/index.js +35 -1
- package/dist/caddy/index.js.map +3 -3
- package/dist/launchd/index.js +35 -1
- package/dist/launchd/index.js.map +3 -3
- package/dist/linux/index.js +35 -1
- package/dist/linux/index.js.map +3 -3
- package/dist/litellm/access-group-form.d.ts +26 -0
- package/dist/litellm/access-group-form.d.ts.map +1 -0
- package/dist/litellm/access-group-operations.d.ts +37 -0
- package/dist/litellm/access-group-operations.d.ts.map +1 -0
- package/dist/litellm/access-group-types.d.ts +49 -0
- package/dist/litellm/access-group-types.d.ts.map +1 -0
- package/dist/litellm/access-group.d.ts +55 -0
- package/dist/litellm/access-group.d.ts.map +1 -0
- package/dist/litellm/budget-errors.d.ts +36 -0
- package/dist/litellm/budget-errors.d.ts.map +1 -0
- package/dist/litellm/budget-form.d.ts +50 -0
- package/dist/litellm/budget-form.d.ts.map +1 -0
- package/dist/litellm/budget-operations.d.ts +20 -0
- package/dist/litellm/budget-operations.d.ts.map +1 -0
- package/dist/litellm/budget.d.ts +61 -0
- package/dist/litellm/budget.d.ts.map +1 -0
- package/dist/litellm/credential-errors.d.ts +131 -0
- package/dist/litellm/credential-errors.d.ts.map +1 -0
- package/dist/litellm/credential-form.d.ts +79 -0
- package/dist/litellm/credential-form.d.ts.map +1 -0
- package/dist/litellm/credential-operations.d.ts +84 -0
- package/dist/litellm/credential-operations.d.ts.map +1 -0
- package/dist/litellm/credential-rewrite.d.ts +6 -0
- package/dist/litellm/credential-rewrite.d.ts.map +1 -0
- package/dist/litellm/credential-types.d.ts +87 -0
- package/dist/litellm/credential-types.d.ts.map +1 -0
- package/dist/litellm/credential-values.d.ts +53 -0
- package/dist/litellm/credential-values.d.ts.map +1 -0
- package/dist/litellm/credential.d.ts +83 -0
- package/dist/litellm/credential.d.ts.map +1 -0
- package/dist/litellm/fake-access-group-litellm.d.ts +34 -0
- package/dist/litellm/fake-access-group-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-credential-litellm.d.ts +54 -0
- package/dist/litellm/fake-credential-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-keys.d.ts +53 -0
- package/dist/litellm/fake-keys.d.ts.map +1 -0
- package/dist/litellm/fake-litellm.d.ts +9 -1
- package/dist/litellm/fake-litellm.d.ts.map +1 -1
- package/dist/litellm/fake-mcp-litellm.d.ts +67 -0
- package/dist/litellm/fake-mcp-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-model-litellm-post-update.d.ts +49 -0
- package/dist/litellm/fake-model-litellm-post-update.d.ts.map +1 -0
- package/dist/litellm/fake-model-litellm.d.ts +48 -0
- package/dist/litellm/fake-model-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-policy-attachment-litellm.d.ts +33 -0
- package/dist/litellm/fake-policy-attachment-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-policy-litellm.d.ts +32 -0
- package/dist/litellm/fake-policy-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-registry-base.d.ts +42 -0
- package/dist/litellm/fake-registry-base.d.ts.map +1 -0
- package/dist/litellm/fake-stack.d.ts +8 -1
- package/dist/litellm/fake-stack.d.ts.map +1 -1
- package/dist/litellm/fake-team-litellm.d.ts +47 -0
- package/dist/litellm/fake-team-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-tool-litellm.d.ts +28 -0
- package/dist/litellm/fake-tool-litellm.d.ts.map +1 -0
- package/dist/litellm/fake-toolset-litellm.d.ts +29 -0
- package/dist/litellm/fake-toolset-litellm.d.ts.map +1 -0
- package/dist/litellm/index.d.ts +20 -0
- package/dist/litellm/index.d.ts.map +1 -1
- package/dist/litellm/index.js +3201 -2
- package/dist/litellm/index.js.map +70 -5
- package/dist/litellm/key-errors.d.ts +169 -0
- package/dist/litellm/key-errors.d.ts.map +1 -0
- package/dist/litellm/key-form.d.ts +119 -0
- package/dist/litellm/key-form.d.ts.map +1 -0
- package/dist/litellm/key-harness.d.ts +41 -0
- package/dist/litellm/key-harness.d.ts.map +1 -0
- package/dist/litellm/key-metadata-errors.d.ts +30 -0
- package/dist/litellm/key-metadata-errors.d.ts.map +1 -0
- package/dist/litellm/key-metadata.d.ts +22 -0
- package/dist/litellm/key-metadata.d.ts.map +1 -0
- package/dist/litellm/key-operations.d.ts +63 -0
- package/dist/litellm/key-operations.d.ts.map +1 -0
- package/dist/litellm/key-secret.d.ts +33 -0
- package/dist/litellm/key-secret.d.ts.map +1 -0
- package/dist/litellm/key.d.ts +78 -0
- package/dist/litellm/key.d.ts.map +1 -0
- package/dist/litellm/mcp-server-credential.d.ts +50 -0
- package/dist/litellm/mcp-server-credential.d.ts.map +1 -0
- package/dist/litellm/mcp-server-errors.d.ts +101 -0
- package/dist/litellm/mcp-server-errors.d.ts.map +1 -0
- package/dist/litellm/mcp-server-form.d.ts +56 -0
- package/dist/litellm/mcp-server-form.d.ts.map +1 -0
- package/dist/litellm/mcp-server-locate.d.ts +26 -0
- package/dist/litellm/mcp-server-locate.d.ts.map +1 -0
- package/dist/litellm/mcp-server-operations.d.ts +63 -0
- package/dist/litellm/mcp-server-operations.d.ts.map +1 -0
- package/dist/litellm/mcp-server-shadow.d.ts +24 -0
- package/dist/litellm/mcp-server-shadow.d.ts.map +1 -0
- package/dist/litellm/mcp-server-types.d.ts +118 -0
- package/dist/litellm/mcp-server-types.d.ts.map +1 -0
- package/dist/litellm/mcp-server-url.d.ts +11 -0
- package/dist/litellm/mcp-server-url.d.ts.map +1 -0
- package/dist/litellm/mcp-server.d.ts +95 -0
- package/dist/litellm/mcp-server.d.ts.map +1 -0
- package/dist/litellm/model-claim.d.ts +24 -0
- package/dist/litellm/model-claim.d.ts.map +1 -0
- package/dist/litellm/model-credential.d.ts +12 -0
- package/dist/litellm/model-credential.d.ts.map +1 -0
- package/dist/litellm/model-errors.d.ts +119 -0
- package/dist/litellm/model-errors.d.ts.map +1 -0
- package/dist/litellm/model-form.d.ts +78 -0
- package/dist/litellm/model-form.d.ts.map +1 -0
- package/dist/litellm/model-locate.d.ts +13 -0
- package/dist/litellm/model-locate.d.ts.map +1 -0
- package/dist/litellm/model-operations.d.ts +59 -0
- package/dist/litellm/model-operations.d.ts.map +1 -0
- package/dist/litellm/model-types.d.ts +91 -0
- package/dist/litellm/model-types.d.ts.map +1 -0
- package/dist/litellm/model.d.ts +88 -0
- package/dist/litellm/model.d.ts.map +1 -0
- package/dist/litellm/operations.d.ts +22 -0
- package/dist/litellm/operations.d.ts.map +1 -1
- package/dist/litellm/policy-attachment-form.d.ts +19 -0
- package/dist/litellm/policy-attachment-form.d.ts.map +1 -0
- package/dist/litellm/policy-attachment-operations.d.ts +31 -0
- package/dist/litellm/policy-attachment-operations.d.ts.map +1 -0
- package/dist/litellm/policy-attachment-types.d.ts +48 -0
- package/dist/litellm/policy-attachment-types.d.ts.map +1 -0
- package/dist/litellm/policy-attachment.d.ts +61 -0
- package/dist/litellm/policy-attachment.d.ts.map +1 -0
- package/dist/litellm/policy-form.d.ts +22 -0
- package/dist/litellm/policy-form.d.ts.map +1 -0
- package/dist/litellm/policy-operations.d.ts +42 -0
- package/dist/litellm/policy-operations.d.ts.map +1 -0
- package/dist/litellm/policy-types.d.ts +57 -0
- package/dist/litellm/policy-types.d.ts.map +1 -0
- package/dist/litellm/policy.d.ts +65 -0
- package/dist/litellm/policy.d.ts.map +1 -0
- package/dist/litellm/providers.d.ts +1 -1
- package/dist/litellm/providers.d.ts.map +1 -1
- package/dist/litellm/registry-errors.d.ts +62 -0
- package/dist/litellm/registry-errors.d.ts.map +1 -0
- package/dist/litellm/registry-support.d.ts +42 -0
- package/dist/litellm/registry-support.d.ts.map +1 -0
- package/dist/litellm/team-form.d.ts +26 -0
- package/dist/litellm/team-form.d.ts.map +1 -0
- package/dist/litellm/team-members.d.ts +10 -0
- package/dist/litellm/team-members.d.ts.map +1 -0
- package/dist/litellm/team-operations.d.ts +38 -0
- package/dist/litellm/team-operations.d.ts.map +1 -0
- package/dist/litellm/team-permission.d.ts +35 -0
- package/dist/litellm/team-permission.d.ts.map +1 -0
- package/dist/litellm/team-types.d.ts +101 -0
- package/dist/litellm/team-types.d.ts.map +1 -0
- package/dist/litellm/team.d.ts +67 -0
- package/dist/litellm/team.d.ts.map +1 -0
- package/dist/litellm/tool-policy-form.d.ts +21 -0
- package/dist/litellm/tool-policy-form.d.ts.map +1 -0
- package/dist/litellm/tool-policy-operations.d.ts +30 -0
- package/dist/litellm/tool-policy-operations.d.ts.map +1 -0
- package/dist/litellm/tool-policy-types.d.ts +46 -0
- package/dist/litellm/tool-policy-types.d.ts.map +1 -0
- package/dist/litellm/tool-policy.d.ts +62 -0
- package/dist/litellm/tool-policy.d.ts.map +1 -0
- package/dist/litellm/toolset-form.d.ts +20 -0
- package/dist/litellm/toolset-form.d.ts.map +1 -0
- package/dist/litellm/toolset-operations.d.ts +39 -0
- package/dist/litellm/toolset-operations.d.ts.map +1 -0
- package/dist/litellm/toolset-types.d.ts +46 -0
- package/dist/litellm/toolset-types.d.ts.map +1 -0
- package/dist/litellm/toolset.d.ts +55 -0
- package/dist/litellm/toolset.d.ts.map +1 -0
- package/dist/openbao/auth-role-form.d.ts +9 -0
- package/dist/openbao/auth-role-form.d.ts.map +1 -1
- package/dist/openbao/auth-role-wire.d.ts.map +1 -1
- package/dist/openbao/fake-engines-roles.d.ts.map +1 -1
- package/dist/openbao/index.js +43 -6
- package/dist/openbao/index.js.map +5 -5
- package/dist/ownership/rows.d.ts +11 -0
- package/dist/ownership/rows.d.ts.map +1 -1
- package/dist/postgres/connection.d.ts +32 -2
- package/dist/postgres/connection.d.ts.map +1 -1
- package/dist/postgres/database-sql.d.ts +28 -9
- package/dist/postgres/database-sql.d.ts.map +1 -1
- package/dist/postgres/database.d.ts +1 -1
- package/dist/postgres/database.d.ts.map +1 -1
- package/dist/postgres/fake-grants-parse.d.ts +37 -0
- package/dist/postgres/fake-grants-parse.d.ts.map +1 -0
- package/dist/postgres/fake-grants-read.d.ts +61 -0
- package/dist/postgres/fake-grants-read.d.ts.map +1 -0
- package/dist/postgres/fake-grants-sql.d.ts +46 -0
- package/dist/postgres/fake-grants-sql.d.ts.map +1 -0
- package/dist/postgres/fake-grants-write.d.ts +29 -0
- package/dist/postgres/fake-grants-write.d.ts.map +1 -0
- package/dist/postgres/fake-role-sql.d.ts +40 -0
- package/dist/postgres/fake-role-sql.d.ts.map +1 -0
- package/dist/postgres/fake-schema-sql.d.ts +42 -0
- package/dist/postgres/fake-schema-sql.d.ts.map +1 -0
- package/dist/postgres/fake-sql-parse.d.ts +23 -0
- package/dist/postgres/fake-sql-parse.d.ts.map +1 -0
- package/dist/postgres/fake-sql-quote.d.ts +12 -0
- package/dist/postgres/fake-sql-quote.d.ts.map +1 -0
- package/dist/postgres/fake-sql.d.ts +42 -0
- package/dist/postgres/fake-sql.d.ts.map +1 -1
- package/dist/postgres/grants-attrs.d.ts +115 -0
- package/dist/postgres/grants-attrs.d.ts.map +1 -0
- package/dist/postgres/grants-declare.d.ts +88 -0
- package/dist/postgres/grants-declare.d.ts.map +1 -0
- package/dist/postgres/grants-diff.d.ts +25 -0
- package/dist/postgres/grants-diff.d.ts.map +1 -0
- package/dist/postgres/grants-errors.d.ts +137 -0
- package/dist/postgres/grants-errors.d.ts.map +1 -0
- package/dist/postgres/grants-existence.d.ts +14 -0
- package/dist/postgres/grants-existence.d.ts.map +1 -0
- package/dist/postgres/grants-ops.d.ts +65 -0
- package/dist/postgres/grants-ops.d.ts.map +1 -0
- package/dist/postgres/grants-ownership.d.ts +18 -0
- package/dist/postgres/grants-ownership.d.ts.map +1 -0
- package/dist/postgres/grants-plan-restore.d.ts +22 -0
- package/dist/postgres/grants-plan-restore.d.ts.map +1 -0
- package/dist/postgres/grants-plan.d.ts +65 -0
- package/dist/postgres/grants-plan.d.ts.map +1 -0
- package/dist/postgres/grants-read-defaults.d.ts +17 -0
- package/dist/postgres/grants-read-defaults.d.ts.map +1 -0
- package/dist/postgres/grants-read.d.ts +77 -0
- package/dist/postgres/grants-read.d.ts.map +1 -0
- package/dist/postgres/grants-refuse.d.ts +25 -0
- package/dist/postgres/grants-refuse.d.ts.map +1 -0
- package/dist/postgres/grants-sql.d.ts +42 -0
- package/dist/postgres/grants-sql.d.ts.map +1 -0
- package/dist/postgres/grants-words.d.ts +29 -0
- package/dist/postgres/grants-words.d.ts.map +1 -0
- package/dist/postgres/grants.d.ts +37 -0
- package/dist/postgres/grants.d.ts.map +1 -0
- package/dist/postgres/index.d.ts +35 -8
- package/dist/postgres/index.d.ts.map +1 -1
- package/dist/postgres/index.js +2063 -39
- package/dist/postgres/index.js.map +47 -7
- package/dist/postgres/installed-classifier.d.ts +13 -0
- package/dist/postgres/installed-classifier.d.ts.map +1 -0
- package/dist/postgres/providers.d.ts +17 -7
- package/dist/postgres/providers.d.ts.map +1 -1
- package/dist/postgres/psql-executor.d.ts +25 -0
- package/dist/postgres/psql-executor.d.ts.map +1 -0
- package/dist/postgres/role-attrs.d.ts +109 -0
- package/dist/postgres/role-attrs.d.ts.map +1 -0
- package/dist/postgres/role-diff.d.ts +22 -0
- package/dist/postgres/role-diff.d.ts.map +1 -0
- package/dist/postgres/role-errors.d.ts +126 -0
- package/dist/postgres/role-errors.d.ts.map +1 -0
- package/dist/postgres/role-membership-sql.d.ts +75 -0
- package/dist/postgres/role-membership-sql.d.ts.map +1 -0
- package/dist/postgres/role-provider.d.ts +11 -0
- package/dist/postgres/role-provider.d.ts.map +1 -0
- package/dist/postgres/role-scram.d.ts +6 -0
- package/dist/postgres/role-scram.d.ts.map +1 -0
- package/dist/postgres/role-secrets.d.ts +30 -0
- package/dist/postgres/role-secrets.d.ts.map +1 -0
- package/dist/postgres/role-sql.d.ts +68 -0
- package/dist/postgres/role-sql.d.ts.map +1 -0
- package/dist/postgres/role.d.ts +57 -0
- package/dist/postgres/role.d.ts.map +1 -0
- package/dist/postgres/schema-assert.d.ts +50 -0
- package/dist/postgres/schema-assert.d.ts.map +1 -0
- package/dist/postgres/schema-attrs.d.ts +51 -0
- package/dist/postgres/schema-attrs.d.ts.map +1 -0
- package/dist/postgres/schema-delete.d.ts +28 -0
- package/dist/postgres/schema-delete.d.ts.map +1 -0
- package/dist/postgres/schema-diff.d.ts +14 -0
- package/dist/postgres/schema-diff.d.ts.map +1 -0
- package/dist/postgres/schema-errors.d.ts +139 -0
- package/dist/postgres/schema-errors.d.ts.map +1 -0
- package/dist/postgres/schema-identity.d.ts +8 -0
- package/dist/postgres/schema-identity.d.ts.map +1 -0
- package/dist/postgres/schema-reconcile.d.ts +12 -0
- package/dist/postgres/schema-reconcile.d.ts.map +1 -0
- package/dist/postgres/schema-sql.d.ts +45 -0
- package/dist/postgres/schema-sql.d.ts.map +1 -0
- package/dist/postgres/schema-test-kit.d.ts +67 -0
- package/dist/postgres/schema-test-kit.d.ts.map +1 -0
- package/dist/postgres/schema.d.ts +54 -0
- package/dist/postgres/schema.d.ts.map +1 -0
- package/dist/proxmox/ceph-flag-types.d.ts +57 -0
- package/dist/proxmox/ceph-flag-types.d.ts.map +1 -0
- package/dist/proxmox/ceph-flag-wire.d.ts +77 -0
- package/dist/proxmox/ceph-flag-wire.d.ts.map +1 -0
- package/dist/proxmox/ceph-flag.d.ts +15 -50
- package/dist/proxmox/ceph-flag.d.ts.map +1 -1
- package/dist/proxmox/ceph-osd-write.d.ts +10 -13
- package/dist/proxmox/ceph-osd-write.d.ts.map +1 -1
- package/dist/proxmox/index.js +806 -740
- package/dist/proxmox/index.js.map +9 -8
- package/dist/release/fake-engine.d.ts +10 -0
- package/dist/release/fake-engine.d.ts.map +1 -1
- package/dist/release/index.js +35 -1
- package/dist/release/index.js.map +3 -3
- package/dist/valkey/acl-attrs.d.ts +94 -0
- package/dist/valkey/acl-attrs.d.ts.map +1 -0
- package/dist/valkey/acl-compare.d.ts +28 -0
- package/dist/valkey/acl-compare.d.ts.map +1 -0
- package/dist/valkey/acl-connection.d.ts +6 -0
- package/dist/valkey/acl-connection.d.ts.map +1 -0
- package/dist/valkey/acl-form.d.ts +62 -0
- package/dist/valkey/acl-form.d.ts.map +1 -0
- package/dist/valkey/acl-managed.d.ts +4 -0
- package/dist/valkey/acl-managed.d.ts.map +1 -0
- package/dist/valkey/acl-ops.d.ts +37 -0
- package/dist/valkey/acl-ops.d.ts.map +1 -0
- package/dist/valkey/acl-profiles.d.ts +53 -0
- package/dist/valkey/acl-profiles.d.ts.map +1 -0
- package/dist/valkey/acl-reconcile.d.ts +26 -0
- package/dist/valkey/acl-reconcile.d.ts.map +1 -0
- package/dist/valkey/acl.d.ts +24 -0
- package/dist/valkey/acl.d.ts.map +1 -0
- package/dist/valkey/connection-service.d.ts +22 -0
- package/dist/valkey/connection-service.d.ts.map +1 -0
- package/dist/valkey/connection.d.ts +59 -0
- package/dist/valkey/connection.d.ts.map +1 -0
- package/dist/valkey/errors.d.ts +165 -0
- package/dist/valkey/errors.d.ts.map +1 -0
- package/dist/valkey/fake-acl.d.ts +29 -0
- package/dist/valkey/fake-acl.d.ts.map +1 -0
- package/dist/valkey/fake-valkey.d.ts +35 -0
- package/dist/valkey/fake-valkey.d.ts.map +1 -0
- package/dist/valkey/handler-test-fixture.d.ts +20 -0
- package/dist/valkey/handler-test-fixture.d.ts.map +1 -0
- package/dist/valkey/index.d.ts +18 -0
- package/dist/valkey/index.d.ts.map +1 -0
- package/dist/valkey/index.js +964 -0
- package/dist/valkey/index.js.map +27 -0
- package/dist/valkey/instance-attrs.d.ts +46 -0
- package/dist/valkey/instance-attrs.d.ts.map +1 -0
- package/dist/valkey/instance-form.d.ts +22 -0
- package/dist/valkey/instance-form.d.ts.map +1 -0
- package/dist/valkey/instance.d.ts +48 -0
- package/dist/valkey/instance.d.ts.map +1 -0
- package/dist/valkey/provider-socket-fixture.d.ts +8 -0
- package/dist/valkey/provider-socket-fixture.d.ts.map +1 -0
- package/dist/valkey/providers.d.ts +16 -0
- package/dist/valkey/providers.d.ts.map +1 -0
- package/dist/valkey/resp.d.ts +38 -0
- package/dist/valkey/resp.d.ts.map +1 -0
- package/dist/valkey/transport-error.d.ts +36 -0
- package/dist/valkey/transport-error.d.ts.map +1 -0
- package/dist/valkey/transport.d.ts +50 -0
- package/dist/valkey/transport.d.ts.map +1 -0
- package/docs/litellm-access-group.md +105 -0
- package/docs/litellm-budget.md +55 -0
- package/docs/litellm-credential.md +60 -0
- package/docs/litellm-key-metadata.md +56 -0
- package/docs/litellm-key.md +194 -0
- package/docs/litellm-mcp.md +187 -0
- package/docs/litellm-model.md +111 -0
- package/docs/litellm-policy-attachment.md +86 -0
- package/docs/litellm-policy.md +103 -0
- package/docs/litellm-team.md +117 -0
- package/docs/litellm-tool-policy.md +90 -0
- package/docs/litellm-toolset.md +92 -0
- package/docs/litellm.md +16 -8
- package/docs/peers.md +15 -6
- package/docs/postgres-grants-example.md +55 -0
- package/docs/postgres-grants.md +157 -0
- package/docs/postgres-role.md +114 -0
- package/docs/postgres-schema.md +139 -0
- package/docs/postgres.md +39 -0
- package/docs/proxmox-sdk-migration.md +45 -0
- package/docs/valkey-transport.md +29 -0
- package/docs/valkey.md +187 -0
- package/package.json +7 -3
- package/src/litellm/access-group-form.ts +105 -0
- package/src/litellm/access-group-operations.ts +92 -0
- package/src/litellm/access-group-types.ts +49 -0
- package/src/litellm/access-group.test.ts +197 -0
- package/src/litellm/access-group.ts +151 -0
- package/src/litellm/budget-errors.ts +38 -0
- package/src/litellm/budget-form.ts +94 -0
- package/src/litellm/budget-operations.ts +51 -0
- package/src/litellm/budget.test.ts +105 -0
- package/src/litellm/budget.ts +127 -0
- package/src/litellm/credential-errors.ts +183 -0
- package/src/litellm/credential-form.test.ts +151 -0
- package/src/litellm/credential-form.ts +211 -0
- package/src/litellm/credential-guards.test.ts +241 -0
- package/src/litellm/credential-operations.ts +208 -0
- package/src/litellm/credential-recovery.test.ts +93 -0
- package/src/litellm/credential-rewrite.test.ts +164 -0
- package/src/litellm/credential-rewrite.ts +50 -0
- package/src/litellm/credential-types.ts +117 -0
- package/src/litellm/credential-values.ts +94 -0
- package/src/litellm/credential.test.ts +218 -0
- package/src/litellm/credential.ts +227 -0
- package/src/litellm/fake-access-group-litellm.ts +127 -0
- package/src/litellm/fake-credential-litellm.ts +216 -0
- package/src/litellm/fake-keys.ts +190 -0
- package/src/litellm/fake-litellm.ts +66 -7
- package/src/litellm/fake-mcp-litellm.ts +214 -0
- package/src/litellm/fake-model-litellm-post-update.ts +103 -0
- package/src/litellm/fake-model-litellm.ts +233 -0
- package/src/litellm/fake-policy-attachment-litellm.ts +97 -0
- package/src/litellm/fake-policy-litellm.ts +186 -0
- package/src/litellm/fake-registry-base.ts +69 -0
- package/src/litellm/fake-stack.ts +17 -1
- package/src/litellm/fake-team-litellm.ts +229 -0
- package/src/litellm/fake-tool-litellm.ts +88 -0
- package/src/litellm/fake-toolset-litellm.ts +110 -0
- package/src/litellm/index.ts +153 -0
- package/src/litellm/key-delete.test.ts +212 -0
- package/src/litellm/key-errors.ts +241 -0
- package/src/litellm/key-form.ts +200 -0
- package/src/litellm/key-harness.ts +121 -0
- package/src/litellm/key-metadata-errors.ts +49 -0
- package/src/litellm/key-metadata.test.ts +156 -0
- package/src/litellm/key-metadata.ts +74 -0
- package/src/litellm/key-operations.ts +184 -0
- package/src/litellm/key-rotation.test.ts +110 -0
- package/src/litellm/key-scope.test.ts +135 -0
- package/src/litellm/key-secret.test.ts +248 -0
- package/src/litellm/key-secret.ts +137 -0
- package/src/litellm/key-transport.test.ts +166 -0
- package/src/litellm/key.test.ts +231 -0
- package/src/litellm/key.ts +213 -0
- package/src/litellm/mcp-server-adopt.test.ts +86 -0
- package/src/litellm/mcp-server-alias.test.ts +184 -0
- package/src/litellm/mcp-server-credential.ts +85 -0
- package/src/litellm/mcp-server-errors.ts +141 -0
- package/src/litellm/mcp-server-exports.test.ts +15 -0
- package/src/litellm/mcp-server-form.test.ts +241 -0
- package/src/litellm/mcp-server-form.ts +233 -0
- package/src/litellm/mcp-server-handlers.test.ts +150 -0
- package/src/litellm/mcp-server-locate.ts +66 -0
- package/src/litellm/mcp-server-operations.ts +111 -0
- package/src/litellm/mcp-server-registry.test.ts +146 -0
- package/src/litellm/mcp-server-retype.test.ts +114 -0
- package/src/litellm/mcp-server-shadow.test.ts +91 -0
- package/src/litellm/mcp-server-shadow.ts +45 -0
- package/src/litellm/mcp-server-tools.test.ts +85 -0
- package/src/litellm/mcp-server-types.ts +143 -0
- package/src/litellm/mcp-server-url.ts +66 -0
- package/src/litellm/mcp-server.test.ts +213 -0
- package/src/litellm/mcp-server.ts +225 -0
- package/src/litellm/model-claim.ts +69 -0
- package/src/litellm/model-credential.ts +45 -0
- package/src/litellm/model-errors.ts +168 -0
- package/src/litellm/model-foreign-row.test.ts +173 -0
- package/src/litellm/model-form.test.ts +228 -0
- package/src/litellm/model-form.ts +223 -0
- package/src/litellm/model-locate.test.ts +128 -0
- package/src/litellm/model-locate.ts +67 -0
- package/src/litellm/model-operations.test.ts +93 -0
- package/src/litellm/model-operations.ts +146 -0
- package/src/litellm/model-params-preserve.test.ts +119 -0
- package/src/litellm/model-recovery.test.ts +57 -0
- package/src/litellm/model-types.ts +112 -0
- package/src/litellm/model.test.ts +222 -0
- package/src/litellm/model.ts +237 -0
- package/src/litellm/operations.ts +1 -1
- package/src/litellm/policy-attachment-form.ts +103 -0
- package/src/litellm/policy-attachment-operations.ts +74 -0
- package/src/litellm/policy-attachment-types.ts +48 -0
- package/src/litellm/policy-attachment.test.ts +198 -0
- package/src/litellm/policy-attachment.ts +178 -0
- package/src/litellm/policy-form.ts +122 -0
- package/src/litellm/policy-operations.ts +112 -0
- package/src/litellm/policy-types.ts +58 -0
- package/src/litellm/policy.test.ts +214 -0
- package/src/litellm/policy.ts +146 -0
- package/src/litellm/providers.ts +25 -1
- package/src/litellm/registry-errors.ts +88 -0
- package/src/litellm/registry-exports.test.ts +66 -0
- package/src/litellm/registry-support.ts +109 -0
- package/src/litellm/team-form.ts +140 -0
- package/src/litellm/team-members.test.ts +150 -0
- package/src/litellm/team-members.ts +58 -0
- package/src/litellm/team-operations.ts +90 -0
- package/src/litellm/team-permission.ts +159 -0
- package/src/litellm/team-read.test.ts +89 -0
- package/src/litellm/team-types.ts +106 -0
- package/src/litellm/team.test.ts +206 -0
- package/src/litellm/team.ts +159 -0
- package/src/litellm/tool-policy-form.ts +94 -0
- package/src/litellm/tool-policy-operations.ts +58 -0
- package/src/litellm/tool-policy-types.ts +48 -0
- package/src/litellm/tool-policy.test.ts +172 -0
- package/src/litellm/tool-policy.ts +125 -0
- package/src/litellm/toolset-form.ts +104 -0
- package/src/litellm/toolset-operations.ts +90 -0
- package/src/litellm/toolset-types.ts +47 -0
- package/src/litellm/toolset.test.ts +198 -0
- package/src/litellm/toolset.ts +151 -0
- package/src/openbao/auth-role-form.test.ts +37 -0
- package/src/openbao/auth-role-form.ts +12 -1
- package/src/openbao/auth-role-wire.test.ts +1 -0
- package/src/openbao/auth-role-wire.ts +13 -1
- package/src/openbao/distilled-retry.test.ts +1 -0
- package/src/openbao/fake-engines-roles.ts +7 -1
- package/src/ownership/ownership.test.ts +33 -1
- package/src/ownership/rows.ts +53 -0
- package/src/postgres/connection.ts +72 -3
- package/src/postgres/database-bigint-serialization.test.ts +1 -0
- package/src/postgres/database-refusals.test.ts +2 -2
- package/src/postgres/database-sql.ts +40 -12
- package/src/postgres/database.ts +3 -2
- package/src/postgres/fake-grants-parse.ts +189 -0
- package/src/postgres/fake-grants-read.ts +250 -0
- package/src/postgres/fake-grants-sql.ts +207 -0
- package/src/postgres/fake-grants-write.ts +90 -0
- package/src/postgres/fake-role-sql.ts +220 -0
- package/src/postgres/fake-schema-semantics.test.ts +36 -0
- package/src/postgres/fake-schema-sql.ts +146 -0
- package/src/postgres/fake-sql-parse.ts +86 -0
- package/src/postgres/fake-sql-quote.ts +36 -0
- package/src/postgres/fake-sql.ts +161 -46
- package/src/postgres/fixtures/pg-REL_18_6-acl.h.txt +147 -0
- package/src/postgres/fixtures/pg-REL_18_6-aclexplode-func.txt +31 -0
- package/src/postgres/fixtures/pg-REL_18_6-alter-default-privileges-synopsis.txt +82 -0
- package/src/postgres/fixtures/pg-REL_18_6-alter_role.sgml.txt +44 -0
- package/src/postgres/fixtures/pg-REL_18_6-create_role.sgml.txt +26 -0
- package/src/postgres/fixtures/pg-REL_18_6-grant-synopsis.txt +95 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_attribute.h.txt +24 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_auth_members.h.txt +62 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_authid.h.txt +70 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_class.h.txt +33 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_default_acl.h.txt +81 -0
- package/src/postgres/fixtures/pg-REL_18_6-pg_namespace.h.txt +28 -0
- package/src/postgres/fixtures/pg-REL_18_6-revoke-synopsis.txt +124 -0
- package/src/postgres/grants-acl.test.ts +61 -0
- package/src/postgres/grants-attrs.ts +185 -0
- package/src/postgres/grants-database.test.ts +158 -0
- package/src/postgres/grants-declare.ts +172 -0
- package/src/postgres/grants-delete-proof.test.ts +154 -0
- package/src/postgres/grants-diff.ts +101 -0
- package/src/postgres/grants-errors.ts +215 -0
- package/src/postgres/grants-existence-guards.test.ts +113 -0
- package/src/postgres/grants-existence.ts +101 -0
- package/src/postgres/grants-lifecycle-guards.test.ts +208 -0
- package/src/postgres/grants-lifecycle-repair.test.ts +208 -0
- package/src/postgres/grants-lifecycle.test.ts +181 -0
- package/src/postgres/grants-ops.ts +229 -0
- package/src/postgres/grants-owner-revoke.test.ts +121 -0
- package/src/postgres/grants-ownership.ts +49 -0
- package/src/postgres/grants-plan-collateral.test.ts +202 -0
- package/src/postgres/grants-plan-diff.test.ts +204 -0
- package/src/postgres/grants-plan-restore.ts +43 -0
- package/src/postgres/grants-plan-revocations.test.ts +69 -0
- package/src/postgres/grants-plan.test.ts +148 -0
- package/src/postgres/grants-plan.ts +245 -0
- package/src/postgres/grants-provenance.test.ts +134 -0
- package/src/postgres/grants-psql-lifecycle.test.ts +105 -0
- package/src/postgres/grants-read-absent.test.ts +91 -0
- package/src/postgres/grants-read-defaults.ts +51 -0
- package/src/postgres/grants-read.ts +250 -0
- package/src/postgres/grants-refusals.test.ts +136 -0
- package/src/postgres/grants-refuse.ts +119 -0
- package/src/postgres/grants-relkind-wire.test.ts +111 -0
- package/src/postgres/grants-repair-plan.test.ts +201 -0
- package/src/postgres/grants-sql.test.ts +128 -0
- package/src/postgres/grants-sql.ts +144 -0
- package/src/postgres/grants-words.ts +34 -0
- package/src/postgres/grants.ts +110 -0
- package/src/postgres/index.ts +137 -7
- package/src/postgres/installed-classifier.ts +36 -0
- package/src/postgres/providers.ts +44 -7
- package/src/postgres/psql-executor-escaping.test.ts +67 -0
- package/src/postgres/psql-executor.test.ts +167 -0
- package/src/postgres/psql-executor.ts +170 -0
- package/src/postgres/role-adopt.test.ts +98 -0
- package/src/postgres/role-attrs.ts +134 -0
- package/src/postgres/role-diff.ts +89 -0
- package/src/postgres/role-errors.ts +198 -0
- package/src/postgres/role-guard.test.ts +60 -0
- package/src/postgres/role-identity.test.ts +185 -0
- package/src/postgres/role-lifecycle.test.ts +228 -0
- package/src/postgres/role-membership-sql.ts +198 -0
- package/src/postgres/role-password.test.ts +158 -0
- package/src/postgres/role-privilege.test.ts +80 -0
- package/src/postgres/role-provenance.test.ts +200 -0
- package/src/postgres/role-provider.ts +104 -0
- package/src/postgres/role-refusals.test.ts +250 -0
- package/src/postgres/role-scram.test.ts +38 -0
- package/src/postgres/role-scram.ts +38 -0
- package/src/postgres/role-secrets.ts +46 -0
- package/src/postgres/role-sql.ts +211 -0
- package/src/postgres/role-valid-until.test.ts +68 -0
- package/src/postgres/role.ts +218 -0
- package/src/postgres/schema-assert.ts +139 -0
- package/src/postgres/schema-attrs.ts +71 -0
- package/src/postgres/schema-delete-proofs.test.ts +192 -0
- package/src/postgres/schema-delete.ts +96 -0
- package/src/postgres/schema-diff.ts +44 -0
- package/src/postgres/schema-drop-2bp01.test.ts +146 -0
- package/src/postgres/schema-errors.ts +209 -0
- package/src/postgres/schema-handlers.test.ts +193 -0
- package/src/postgres/schema-identity.ts +39 -0
- package/src/postgres/schema-lifecycle.test.ts +246 -0
- package/src/postgres/schema-race.test.ts +70 -0
- package/src/postgres/schema-reconcile.ts +100 -0
- package/src/postgres/schema-refusals.test.ts +144 -0
- package/src/postgres/schema-socket.test.ts +161 -0
- package/src/postgres/schema-sql.ts +130 -0
- package/src/postgres/schema-takeover.test.ts +149 -0
- package/src/postgres/schema-test-kit.ts +85 -0
- package/src/postgres/schema.ts +130 -0
- package/src/proxmox/ceph-flag-types.ts +70 -0
- package/src/proxmox/ceph-flag-wire.test.ts +72 -0
- package/src/proxmox/ceph-flag-wire.ts +123 -0
- package/src/proxmox/ceph-flag.ts +77 -130
- package/src/proxmox/ceph-osd-write.ts +10 -13
- package/src/release/binary-alias.test.ts +3 -3
- package/src/release/binary-claims.test.ts +3 -3
- package/src/release/binary-directory-umask.test.ts +65 -0
- package/src/release/fake-engine.ts +15 -0
- package/src/valkey/acl-attrs.ts +98 -0
- package/src/valkey/acl-compare.ts +57 -0
- package/src/valkey/acl-connection.ts +13 -0
- package/src/valkey/acl-delete.test.ts +127 -0
- package/src/valkey/acl-form.ts +239 -0
- package/src/valkey/acl-managed.ts +13 -0
- package/src/valkey/acl-ops.ts +122 -0
- package/src/valkey/acl-ownership.test.ts +118 -0
- package/src/valkey/acl-prefix.test.ts +38 -0
- package/src/valkey/acl-profiles.ts +81 -0
- package/src/valkey/acl-reconcile.ts +180 -0
- package/src/valkey/acl-reserved.test.ts +69 -0
- package/src/valkey/acl-revocation.test.ts +94 -0
- package/src/valkey/acl-seat-prefix.test.ts +111 -0
- package/src/valkey/acl-validation.test.ts +54 -0
- package/src/valkey/acl.test.ts +215 -0
- package/src/valkey/acl.ts +169 -0
- package/src/valkey/connection-service.ts +46 -0
- package/src/valkey/connection.ts +180 -0
- package/src/valkey/errors.ts +239 -0
- package/src/valkey/fake-acl.ts +128 -0
- package/src/valkey/fake-valkey.ts +224 -0
- package/src/valkey/handler-test-fixture.ts +43 -0
- package/src/valkey/handlers.test.ts +205 -0
- package/src/valkey/index.ts +54 -0
- package/src/valkey/instance-attrs.ts +48 -0
- package/src/valkey/instance-form.ts +104 -0
- package/src/valkey/instance.test.ts +108 -0
- package/src/valkey/instance.ts +160 -0
- package/src/valkey/provider-socket-fixture.ts +71 -0
- package/src/valkey/providers.test.ts +129 -0
- package/src/valkey/providers.ts +21 -0
- package/src/valkey/resp.ts +212 -0
- package/src/valkey/transport-bounds.test.ts +150 -0
- package/src/valkey/transport-error.ts +37 -0
- package/src/valkey/transport.test.ts +158 -0
- package/src/valkey/transport.ts +109 -0
- package/src/valkey/upstream-bounds.test.ts +14 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /model/update handler for the fake LiteLLM proxy.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `fake-model-litellm.ts` so each file stays under the repository line cap.
|
|
5
|
+
* See that file for context on what the fake is and what is measured vs. assumed.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row } from './fake-model-litellm.ts';
|
|
8
|
+
type PostUpdateOptions = Readonly<{
|
|
9
|
+
/** `POST /model/update` drops a `false` and an empty list, like a truthiness check would. */
|
|
10
|
+
readonly editIgnoresFalsy?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `POST /model/update` parses `litellm_params` the way v1.103.0 `updateLiteLLMParams` does:
|
|
13
|
+
* every unset field is filled with its pydantic default before the write. `None` keeps the
|
|
14
|
+
* stored value; a non-`None` default (`false` on the five flags below) overwrites it.
|
|
15
|
+
*/
|
|
16
|
+
readonly fillsParamDefaults?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* v1.103.0 `updateLiteLLMParams`: an omitted field takes its pydantic default. The five flags
|
|
20
|
+
* default to `False`, not `None`. An explicit `null` stays `null` (it was set, not omitted) so a
|
|
21
|
+
* later `exclude_none` can drop it and keep the stored value.
|
|
22
|
+
*/
|
|
23
|
+
export declare const withOmittedFalseDefaults: (sent: Row) => Row;
|
|
24
|
+
export interface PostModelUpdateResult {
|
|
25
|
+
readonly response: Response;
|
|
26
|
+
/** Merged row to write back into the table. */
|
|
27
|
+
readonly merged: Row;
|
|
28
|
+
/** Index into the original rows array that `merged` should replace. */
|
|
29
|
+
readonly at: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Handle `POST /model/update`.
|
|
33
|
+
*
|
|
34
|
+
* ⛔ v1.103.0 `update_model` REBUILDS `litellm_params`: it parses the request model
|
|
35
|
+
* (every unset field filled with its pydantic default, `None` keeps the stored value)
|
|
36
|
+
* and REPLACES the column, so a stored key the model does not declare is DELETED.
|
|
37
|
+
* `editIgnoresFalsy` models a proxy that REFUSES a `false` or an empty list: the edit
|
|
38
|
+
* never lands, so the row's current value survives. Drop the incoming falsy value
|
|
39
|
+
* BEFORE the rebuild — filtering after erases the field and hides the dropped edit.
|
|
40
|
+
*/
|
|
41
|
+
export declare const handlePostModelUpdate: (args: {
|
|
42
|
+
readonly body: Row;
|
|
43
|
+
readonly rows: readonly Row[];
|
|
44
|
+
readonly rowId: (row: Row) => string;
|
|
45
|
+
readonly json: (status: number, body: unknown) => Response;
|
|
46
|
+
readonly options: PostUpdateOptions;
|
|
47
|
+
}) => PostModelUpdateResult;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=fake-model-litellm-post-update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-model-litellm-post-update.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-model-litellm-post-update.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAEnD,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC,CAAC;AAkBH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,SAAU,GAAG,KAAG,GAMpD,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,SAAU;IAC1C,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,QAAQ,CAAC;IAC3D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACrC,KAAG,qBA8BH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** One request that reached the fake. Its own type, so this file depends on no other fake. */
|
|
2
|
+
export interface FakeModelRequest {
|
|
3
|
+
readonly method: string;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
}
|
|
6
|
+
export type Row = Record<string, unknown>;
|
|
7
|
+
export interface FakeModelLitellm {
|
|
8
|
+
readonly fetch: typeof globalThis.fetch;
|
|
9
|
+
/** Every stored row exactly as the proxy holds it, `litellm_params` included. */
|
|
10
|
+
readonly models: () => readonly Row[];
|
|
11
|
+
readonly requests: () => readonly FakeModelRequest[];
|
|
12
|
+
/** The JSON bodies of every `POST`, in order. */
|
|
13
|
+
readonly bodies: () => readonly Row[];
|
|
14
|
+
/**
|
|
15
|
+
* The next `count` successful `POST /model/new` calls each make the following `GET /model/info`
|
|
16
|
+
* answer 500 once — a read-back that fails after the row is committed.
|
|
17
|
+
*/
|
|
18
|
+
readonly failNextReadBacks: (count: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface FakeModelOptions {
|
|
21
|
+
readonly masterKey?: string;
|
|
22
|
+
readonly seed?: readonly Row[];
|
|
23
|
+
/** `POST /model/new` ignores the supplied `model_info.id` and issues its own. */
|
|
24
|
+
readonly issuesOwnId?: boolean;
|
|
25
|
+
/** Every `POST /model/delete` answers 400, whether or not the row exists (no rights). */
|
|
26
|
+
readonly forbidDelete?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Every by-id `GET /model/info` answers 400 even when the row is listed. Models "no rights" /
|
|
29
|
+
* a bad filter: a 400 is absence only when a re-list also lacks the id (model-operations.ts).
|
|
30
|
+
*/
|
|
31
|
+
readonly byIdRefused?: boolean;
|
|
32
|
+
/** `POST /model/update` drops a `false` and an empty list, like a truthiness check would. */
|
|
33
|
+
readonly editIgnoresFalsy?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* `POST /model/update` and `PATCH /model/{id}/update` parse `litellm_params` the way v1.103.0
|
|
36
|
+
* `updateLiteLLMParams` does: every unset field is filled with its pydantic default before the
|
|
37
|
+
* write. `None` keeps the stored value; a non-`None` default (`false` on the five flags) overwrites
|
|
38
|
+
* it. POST then REPLACES the column. PATCH merges after `exclude_none`, so an explicit JSON `null`
|
|
39
|
+
* is dropped and the stored value survives, while an omitted flag is written `false`.
|
|
40
|
+
*/
|
|
41
|
+
readonly fillsParamDefaults?: boolean;
|
|
42
|
+
/** Ids committed to the table that the list omits; the by-id read still answers them. */
|
|
43
|
+
readonly listOmits?: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
/** A minimal 1.103.0-shaped row, as the table holds it: the id lives in `model_info`. */
|
|
46
|
+
export declare const modelRow: (fields: Row) => Row;
|
|
47
|
+
export declare const startFakeModelLitellm: (options?: FakeModelOptions) => FakeModelLitellm;
|
|
48
|
+
//# sourceMappingURL=fake-model-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-model-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-model-litellm.ts"],"names":[],"mappings":"AA6BA,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACxC,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,SAAS,gBAAgB,EAAE,CAAC;IACrD,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,6FAA6F;IAC7F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,yFAAyF;IACzF,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAOD,yFAAyF;AACzF,eAAO,MAAM,QAAQ,WAAY,GAAG,KAAG,GAKrC,CAAC;AAQH,eAAO,MAAM,qBAAqB,aAAa,gBAAgB,KAAQ,gBAwItE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fake of LiteLLM's `/policies/attachments` routes for tests — TEST ONLY. Skeleton and the rules
|
|
3
|
+
* every fake follows: fake-registry-base.ts.
|
|
4
|
+
*
|
|
5
|
+
* ★ MEASURED FROM THE LIVE 1.103.0 CONTAINER'S SOURCE (2026-09-30, `policy_endpoints.py` and
|
|
6
|
+
* `attachment_registry.py`, read, not called): a create needs the policy to have a PRODUCTION version
|
|
7
|
+
* (404 otherwise), refuses a CONCRETE team, key or model selector that resolves to nothing (400;
|
|
8
|
+
* wildcards are let through), and answers the row with a proxy-issued id; the list merges in config.yaml
|
|
9
|
+
* attachments (`definition_location: "config"`, ids `config-<n>`); a delete of a missing id is a 404.
|
|
10
|
+
* There is NO update route, and the fake answers 405 to one so a resource that tried would fail.
|
|
11
|
+
* ⚠️ NOT MODELLED: the in-memory registry and how a request is matched (`policy_matcher.py`).
|
|
12
|
+
*/
|
|
13
|
+
import { type FakeRecord } from './fake-registry-base.ts';
|
|
14
|
+
import type { Row } from './registry-support.ts';
|
|
15
|
+
export interface FakePolicyAttachmentLitellm extends FakeRecord {
|
|
16
|
+
/** Every stored database attachment, exactly as the proxy holds it. */
|
|
17
|
+
readonly attachments: () => readonly Row[];
|
|
18
|
+
}
|
|
19
|
+
export interface FakePolicyAttachmentOptions {
|
|
20
|
+
readonly masterKey?: string;
|
|
21
|
+
readonly seed?: readonly Row[];
|
|
22
|
+
/** Policies that have a production version. A create for any other name is a 404. */
|
|
23
|
+
readonly policies?: readonly string[];
|
|
24
|
+
/** Team aliases that exist. A concrete (non-wildcard) `teams` entry outside this set is a 400. */
|
|
25
|
+
readonly knownTeams?: readonly string[];
|
|
26
|
+
/** Attachments defined in config.yaml: they appear in the list and can never be deleted. */
|
|
27
|
+
readonly configAttachments?: readonly Row[];
|
|
28
|
+
/** `DELETE` answers 403, as for a key that is not allowed. */
|
|
29
|
+
readonly forbidDelete?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const attachmentRow: (fields: Row) => Row;
|
|
32
|
+
export declare const startFakePolicyAttachmentLitellm: (options?: FakePolicyAttachmentOptions) => FakePolicyAttachmentLitellm;
|
|
33
|
+
//# sourceMappingURL=fake-policy-attachment-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-policy-attachment-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-policy-attachment-litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAY,KAAK,UAAU,EAAwB,MAAM,yBAAyB,CAAC;AAC1F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,WAAW,2BAA4B,SAAQ,UAAU;IAC7D,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,kGAAkG;IAClG,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,4FAA4F;IAC5F,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,WAAY,GAAG,KAAG,GAQ1C,CAAC;AAEH,eAAO,MAAM,gCAAgC,aAClC,2BAA2B,KACnC,2BAmDF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fake of LiteLLM's `/policies` routes for tests — TEST ONLY. Skeleton and the rules every fake
|
|
3
|
+
* follows: fake-registry-base.ts. (The attachment routes are `fake-policy-attachment-litellm.ts`.)
|
|
4
|
+
*
|
|
5
|
+
* ★ MEASURED FROM THE LIVE 1.103.0 CONTAINER'S SOURCE (2026-09-30, `policy_endpoints.py` and
|
|
6
|
+
* `policy_registry.py`, read, not called): a create makes version 1 AS PRODUCTION, and a second create
|
|
7
|
+
* of the name is a 400; the version list is a `find_many` by name (an unknown name is an empty list,
|
|
8
|
+
* 200); a new version is a DRAFT cloned from production (404 when there is no production) with the
|
|
9
|
+
* next version number; `PUT /policies/{id}` edits a DRAFT only (400 otherwise, 404 missing) and writes
|
|
10
|
+
* only fields that are not null; `draft → published` and `published → production` (which demotes the
|
|
11
|
+
* old production to `published`) are the only promotions, and `draft → production` is a 400;
|
|
12
|
+
* `DELETE …/all-versions` answers 200 whether or not anything existed; the list merges in
|
|
13
|
+
* config.yaml policies (`definition_location: "config"`).
|
|
14
|
+
* ⚠️ NOT MODELLED: `pipeline`, the in-memory registry, `is_latest` bookkeeping beyond what a test reads.
|
|
15
|
+
*/
|
|
16
|
+
import { type FakeRecord } from './fake-registry-base.ts';
|
|
17
|
+
import type { Row } from './registry-support.ts';
|
|
18
|
+
export interface FakePolicyLitellm extends FakeRecord {
|
|
19
|
+
/** Every stored version, exactly as the proxy holds it. */
|
|
20
|
+
readonly versions: () => readonly Row[];
|
|
21
|
+
}
|
|
22
|
+
export interface FakePolicyOptions {
|
|
23
|
+
readonly masterKey?: string;
|
|
24
|
+
readonly seed?: readonly Row[];
|
|
25
|
+
/** Policies defined in config.yaml: they appear in `/policies/list` with `definition_location: config`. */
|
|
26
|
+
readonly configPolicies?: readonly string[];
|
|
27
|
+
/** A `PUT /policies/{id}` drops an empty list instead of writing it. */
|
|
28
|
+
readonly editIgnoresEmpty?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const policyRow: (fields: Row) => Row;
|
|
31
|
+
export declare const startFakePolicyLitellm: (options?: FakePolicyOptions) => FakePolicyLitellm;
|
|
32
|
+
//# sourceMappingURL=fake-policy-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-policy-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-policy-litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAY,KAAK,UAAU,EAAwB,MAAM,yBAAyB,CAAC;AAC1F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,2GAA2G;IAC3G,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,SAAS,WAAY,GAAG,KAAG,GAWtC,CAAC;AAEH,eAAO,MAAM,sBAAsB,aAAa,iBAAiB,KAAQ,iBA4IxE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared skeleton of the registry fakes (`fake-team-litellm.ts`, `fake-access-group-litellm.ts`,
|
|
3
|
+
* `fake-toolset-litellm.ts`, `fake-policy-litellm.ts`, `fake-tool-litellm.ts`) — TEST ONLY, never
|
|
4
|
+
* imported by `index.ts`.
|
|
5
|
+
*
|
|
6
|
+
* ★ Like `fake-litellm.ts` this is a `fetch` function handed to Effect's real `FetchHttpClient`
|
|
7
|
+
* through its `Fetch` reference, so a test exercises distilled's REAL path assembly, JSON encoding
|
|
8
|
+
* and status-to-error matching. Only the wire responses a scenario needs are written by each fake.
|
|
9
|
+
* ★ ONE FAKE PER ROUTE FAMILY, each small, and this file is the part they would otherwise repeat:
|
|
10
|
+
* the bearer check, the request log, and the body log a test reads to see what was SENT.
|
|
11
|
+
* ⚠️ EVERY FAKE'S ANSWERS ARE ITS OWN CHOICE UNLESS ITS HEADER SAYS "MEASURED": shapes come from the
|
|
12
|
+
* generated 1.103.0 schema and from reading the 1.103.0 source, never from a live proxy. A test that
|
|
13
|
+
* leans on a choice says so.
|
|
14
|
+
* ⚠️ NEVER ANSWER 5xx. The SDK retries 5xx with backoff, which would cost a test tens of seconds for
|
|
15
|
+
* nothing; a failing write is a 400/403/409 here.
|
|
16
|
+
* ★ `FAKE-*` VALUES ONLY.
|
|
17
|
+
*/
|
|
18
|
+
import type { Row } from './registry-support.ts';
|
|
19
|
+
/** One request that reached a fake. */
|
|
20
|
+
export interface FakeRequest {
|
|
21
|
+
readonly method: string;
|
|
22
|
+
readonly path: string;
|
|
23
|
+
}
|
|
24
|
+
/** What every registry fake exposes besides its own rows. */
|
|
25
|
+
export interface FakeRecord {
|
|
26
|
+
readonly fetch: typeof globalThis.fetch;
|
|
27
|
+
readonly requests: () => readonly FakeRequest[];
|
|
28
|
+
/** The JSON bodies of every request that carried one, in order (`POST`/`PUT`/`PATCH`/`DELETE`). */
|
|
29
|
+
readonly bodies: () => readonly Row[];
|
|
30
|
+
}
|
|
31
|
+
export declare const FAKE_KEY = "sk-test-master";
|
|
32
|
+
export declare const json: (status: number, body: unknown) => Response;
|
|
33
|
+
/** A success with no body, as `DELETE` answers 202/204 on several routes. */
|
|
34
|
+
export declare const empty: (status: number) => Response;
|
|
35
|
+
export interface Call {
|
|
36
|
+
readonly request: Request;
|
|
37
|
+
readonly url: URL;
|
|
38
|
+
/** The parsed JSON body, or `{}` when the request had none. */
|
|
39
|
+
readonly body: Row;
|
|
40
|
+
}
|
|
41
|
+
export declare const recordingFetch: (masterKey: string, route: (call: Call) => Response | Promise<Response>) => FakeRecord;
|
|
42
|
+
//# sourceMappingURL=fake-registry-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-registry-base.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-registry-base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,uCAAuC;AACvC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,6DAA6D;AAC7D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,SAAS,WAAW,EAAE,CAAC;IAChD,mGAAmG;IACnG,QAAQ,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;CACvC;AAED,eAAO,MAAM,QAAQ,mBAAmB,CAAC;AAEzC,eAAO,MAAM,IAAI,WAAY,MAAM,QAAQ,OAAO,KAAG,QAC4C,CAAC;AAElG,6EAA6E;AAC7E,eAAO,MAAM,KAAK,WAAY,MAAM,KAAG,QAA0C,CAAC;AAElF,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,cACd,MAAM,SACV,CAAC,IAAI,EAAE,IAAI,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAClD,UAiBF,CAAC"}
|
|
@@ -10,6 +10,11 @@ export type DeployOptions = {
|
|
|
10
10
|
export interface FakeStack {
|
|
11
11
|
/** Plan, then apply, `body`. Resolves to the plan; rejects with the apply's failure. */
|
|
12
12
|
readonly deploy: (body: StackBody, options?: DeployOptions) => Promise<Planned>;
|
|
13
|
+
/**
|
|
14
|
+
* Everything the state store holds, as JSON, `Redacted` values REVEALED the way Alchemy persists
|
|
15
|
+
* them (`encodeState`). A test asserts a secret is nowhere in it.
|
|
16
|
+
*/
|
|
17
|
+
readonly snapshot: () => string;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* ⚠️ CREDENTIALS COME FROM `litellmProviders`, NOT AN OUTER `Effect.provide`. The handlers read
|
|
@@ -26,7 +31,9 @@ export interface FakeStack {
|
|
|
26
31
|
export declare const fakeStack: (creds: {
|
|
27
32
|
readonly apiKey: string;
|
|
28
33
|
readonly baseUrl: string;
|
|
29
|
-
}, fetchFn: typeof globalThis.fetch, name?: string
|
|
34
|
+
}, fetchFn: typeof globalThis.fetch, name?: string, settings?: {
|
|
35
|
+
readonly noRetry?: boolean;
|
|
36
|
+
}) => FakeStack;
|
|
30
37
|
/** Every call that changed something, as `METHOD path`, in order. */
|
|
31
38
|
export declare const writesOf: (requests: readonly {
|
|
32
39
|
readonly method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-stack.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-stack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fake-stack.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-stack.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,8EAA8E;AAC9E,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD,oFAAoF;AACpF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAEjE,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GAAG;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChF;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC;CACjC;AAiBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,UACb;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,WACnD,OAAO,UAAU,CAAC,KAAK,4BAEtB;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,KACvC,SA4CF,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,QAAQ,aACT,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KACtE,MAAM,EACsF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fake of LiteLLM's `/team/*` routes for tests — TEST ONLY. Skeleton and the rules every fake
|
|
3
|
+
* follows: fake-registry-base.ts.
|
|
4
|
+
*
|
|
5
|
+
* ★ MEASURED FROM THE LIVE 1.103.0 CONTAINER'S SOURCE (2026-09-30, `team_endpoints.py`,
|
|
6
|
+
* `object_permission_utils.py`, read, not called): `/team/new` refuses a taken id (400) and ADDS THE
|
|
7
|
+
* CALLER AS AN `admin` MEMBER (`_should_auto_add_team_creator`), which `autoAddsCreator` models;
|
|
8
|
+
* `/team/update` is partial (`exclude_unset`) and merges `object_permission` BY TOP-LEVEL FIELD (a
|
|
9
|
+
* field left out keeps its value, `[]` replaces it); `/team/info` answers a missing team 404 in the
|
|
10
|
+
* `ProxyException` envelope; `member_add` and `member_update` refuse an `admin` role on a proxy
|
|
11
|
+
* without a licence (400, `community`, the default); `/team/delete` 404s a missing team and DELETES THE
|
|
12
|
+
* TEAM'S KEYS (`deletedKeys` records that); `/team/member_delete` is not modelled because nothing here
|
|
13
|
+
* may call it, and any request to it is recorded so a test can assert none was made.
|
|
14
|
+
* ★ ALSO MEASURED: `/team/info` and `/team/delete` answer 404 for ANY exception on the lookup, database
|
|
15
|
+
* errors included, which `infoLies` and `deleteLies` model (the team exists and the answer is 404).
|
|
16
|
+
* ⚠️ NOT MODELLED: budgets, metadata, the Enterprise fields, `access_group` mirroring into groups.
|
|
17
|
+
*/
|
|
18
|
+
import { type FakeRecord } from './fake-registry-base.ts';
|
|
19
|
+
import type { Row } from './registry-support.ts';
|
|
20
|
+
export interface FakeTeamLitellm extends FakeRecord {
|
|
21
|
+
/** Every stored team, exactly as the proxy holds it (`object_permission` included). */
|
|
22
|
+
readonly teams: () => readonly Row[];
|
|
23
|
+
/** Team ids whose keys a `/team/delete` removed, in order. */
|
|
24
|
+
readonly deletedKeys: () => readonly string[];
|
|
25
|
+
}
|
|
26
|
+
export interface FakeTeamOptions {
|
|
27
|
+
readonly masterKey?: string;
|
|
28
|
+
readonly seed?: readonly Row[];
|
|
29
|
+
/** No licence: an `admin` role is a 400. Default `true`. */
|
|
30
|
+
readonly community?: boolean;
|
|
31
|
+
/** `/team/new` adds the caller as an admin member. Default `true` (measured). */
|
|
32
|
+
readonly autoAddsCreator?: boolean;
|
|
33
|
+
/** `/team/info` answers 404 whether or not the team exists (a swallowed database error). */
|
|
34
|
+
readonly infoLies?: boolean;
|
|
35
|
+
/** `/team/delete` answers 404 whether or not the team exists. */
|
|
36
|
+
readonly deleteLies?: boolean;
|
|
37
|
+
/** `mcp_tool_permissions` comes back as a JSON string, as the source says it can. */
|
|
38
|
+
readonly toolPermissionsAsString?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* `/team/info` also carries what a real one does and a resource must never copy: the team's KEYS
|
|
41
|
+
* (`FAKE-hashed-key`), its memberships, and metadata that can hold callback variables.
|
|
42
|
+
*/
|
|
43
|
+
readonly leaky?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const teamRow: (fields: Row) => Row;
|
|
46
|
+
export declare const startFakeTeamLitellm: (options?: FakeTeamOptions) => FakeTeamLitellm;
|
|
47
|
+
//# sourceMappingURL=fake-team-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-team-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-team-litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAY,KAAK,UAAU,EAAwB,MAAM,yBAAyB,CAAC;AAC1F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,uFAAuF;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;IACrC,8DAA8D;IAC9D,QAAQ,CAAC,WAAW,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,qFAAqF;IACrF,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,OAAO,WAAY,GAAG,KAAG,GAOpC,CAAC;AAoBH,eAAO,MAAM,oBAAoB,aAAa,eAAe,KAAQ,eA0JpE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fake of LiteLLM's `/v1/tool/{tool_name}` and `/v1/tool/policy` routes for tests — TEST ONLY.
|
|
3
|
+
* Skeleton and the rules every fake follows: fake-registry-base.ts.
|
|
4
|
+
*
|
|
5
|
+
* ★ MEASURED FROM THE LIVE 1.103.0 CONTAINER'S SOURCE (2026-09-30, `tool_management_endpoints.py` and
|
|
6
|
+
* `db/tool_registry_writer.py`, read, not called): the write is an UPSERT on `tool_name` (a new row
|
|
7
|
+
* takes a sent field, else `untrusted`; an existing row takes only the fields sent); neither field
|
|
8
|
+
* sent is a 400; a team or key id turns the write into an override of `blocked_tools`, which this
|
|
9
|
+
* fake does not model and answers 400 to (nothing here sends one); the read of an unknown tool is a
|
|
10
|
+
* 404; there is NO delete route for a row. `getSwallowsErrors` models `db_get_tool` catching every
|
|
11
|
+
* exception and answering `None`, which the route turns into a 404 for a tool that exists.
|
|
12
|
+
*/
|
|
13
|
+
import { type FakeRecord } from './fake-registry-base.ts';
|
|
14
|
+
import type { Row } from './registry-support.ts';
|
|
15
|
+
export interface FakeToolLitellm extends FakeRecord {
|
|
16
|
+
readonly tools: () => readonly Row[];
|
|
17
|
+
}
|
|
18
|
+
export interface FakeToolOptions {
|
|
19
|
+
readonly masterKey?: string;
|
|
20
|
+
readonly seed?: readonly Row[];
|
|
21
|
+
/** The by-name `GET` answers 404 whatever exists (a swallowed database error). */
|
|
22
|
+
readonly getSwallowsErrors?: boolean;
|
|
23
|
+
/** `POST /v1/tool/policy` ignores an `output_policy` (a proxy that drops one field). */
|
|
24
|
+
readonly dropsOutputPolicy?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const toolRow: (fields: Row) => Row;
|
|
27
|
+
export declare const startFakeToolLitellm: (options?: FakeToolOptions) => FakeToolLitellm;
|
|
28
|
+
//# sourceMappingURL=fake-tool-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-tool-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-tool-litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAY,KAAK,UAAU,EAAwB,MAAM,yBAAyB,CAAC;AAC1F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,wFAAwF;IACxF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,eAAO,MAAM,OAAO,WAAY,GAAG,KAAG,GAKpC,CAAC;AAEH,eAAO,MAAM,oBAAoB,aAAa,eAAe,KAAQ,eAoDpE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fake of LiteLLM's `/v1/mcp/toolset` routes for tests — TEST ONLY. Skeleton and the rules every
|
|
3
|
+
* fake follows: fake-registry-base.ts.
|
|
4
|
+
*
|
|
5
|
+
* ★ MEASURED FROM THE LIVE 1.103.0 CONTAINER'S SOURCE (2026-09-30, `mcp_management_endpoints.py` and
|
|
6
|
+
* `toolset_db.py`, read, not called): the id is a server-issued uuid (the create has no id field);
|
|
7
|
+
* the name is unique (create or rename onto a taken one is a 409); a create answers 201 with the
|
|
8
|
+
* row; the edit is partial — absent keeps, `null` clears, EXCEPT a `null` name or `tools`, which are
|
|
9
|
+
* no-ops; a delete answers 202 with NO BODY, a missing id is a 404; the by-id read is the table.
|
|
10
|
+
* ★ ALSO MEASURED: the LIST swallows a database error into `[]` (`list_mcp_toolsets`), which
|
|
11
|
+
* `listSwallowsErrors` models — the list then says nothing about what exists.
|
|
12
|
+
* ⚠️ NOT MODELLED: the caller-scoped narrowing of the list for a non-admin key.
|
|
13
|
+
*/
|
|
14
|
+
import { type FakeRecord } from './fake-registry-base.ts';
|
|
15
|
+
import type { Row } from './registry-support.ts';
|
|
16
|
+
export interface FakeToolsetLitellm extends FakeRecord {
|
|
17
|
+
readonly toolsets: () => readonly Row[];
|
|
18
|
+
}
|
|
19
|
+
export interface FakeToolsetOptions {
|
|
20
|
+
readonly masterKey?: string;
|
|
21
|
+
readonly seed?: readonly Row[];
|
|
22
|
+
/** `GET /v1/mcp/toolset` answers `[]` whatever exists (a swallowed database error). */
|
|
23
|
+
readonly listSwallowsErrors?: boolean;
|
|
24
|
+
/** `POST`/`PUT`/`DELETE` answer 403, as for a key that is not PROXY_ADMIN. */
|
|
25
|
+
readonly forbidWrites?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const toolsetRow: (fields: Row) => Row;
|
|
28
|
+
export declare const startFakeToolsetLitellm: (options?: FakeToolsetOptions) => FakeToolsetLitellm;
|
|
29
|
+
//# sourceMappingURL=fake-toolset-litellm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-toolset-litellm.d.ts","sourceRoot":"","sources":["../../src/litellm/fake-toolset-litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAY,KAAK,UAAU,EAA+B,MAAM,yBAAyB,CAAC;AACjG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,SAAS,GAAG,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,uFAAuF;IACvF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,WAAY,GAAG,KAAG,GAMvC,CAAC;AAEH,eAAO,MAAM,uBAAuB,aAAa,kBAAkB,KAAQ,kBAwE1E,CAAC"}
|
package/dist/litellm/index.d.ts
CHANGED
|
@@ -11,5 +11,25 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export type { PassThroughEndpointResponse, PassThroughGenericEndpoint, PassThroughGuardrailSettings, } from '@distilled.cloud/litellm/misc';
|
|
13
13
|
export { LiteLLMPassThroughEndpoint, LiteLLMPassThroughEndpointProvider, LitellmConfigPathConflictError, LitellmLiteralSecretHeaderError, LitellmUnaddressableRowError, isLiteLLMPassThroughEndpoint, type PassThroughEndpointAttributes, type PassThroughEndpointError, type PassThroughEndpointProps, } from './pass-through-endpoint.ts';
|
|
14
|
+
export { LiteLLMBudget, LiteLLMBudgetProvider, isLiteLLMBudget, type BudgetAttributes, type BudgetError, type BudgetProps, } from './budget.ts';
|
|
15
|
+
export { LitellmBudgetFieldNotClearedError, LitellmBudgetHardCapUnjustifiedError, LitellmBudgetUnreadableError, } from './budget-errors.ts';
|
|
16
|
+
export { LiteLLMCredential, LiteLLMCredentialProvider, isLiteLLMCredential, type CredentialAttributes, type CredentialError, type CredentialProps, } from './credential.ts';
|
|
17
|
+
export { LitellmCredentialAbsentAfterWriteError, LitellmCredentialEnvUnsetError, LitellmCredentialInvalidError, LitellmCredentialNotConvergedError, LitellmCredentialUnreadableError, } from './credential-errors.ts';
|
|
18
|
+
export { LiteLLMMCPServer, LiteLLMMCPServerProvider, isLiteLLMMCPServer, type McpServerAttributes, type McpServerError, type McpServerProps, } from './mcp-server.ts';
|
|
19
|
+
export { LitellmMcpServerAbsentAfterWriteError, LitellmMcpServerAmbiguousNameError, LitellmMcpServerCredentialEnvUnsetError, LitellmMcpServerDescriptionShadowedError, LitellmMcpServerInvalidError, LitellmMcpServerNotConvergedError, LitellmMcpServerUnreadableError, } from './mcp-server-errors.ts';
|
|
20
|
+
export type { McpAuthType, McpStaticAuthType, McpTransport } from './mcp-server-types.ts';
|
|
21
|
+
export { LiteLLMAccessGroup, LiteLLMAccessGroupProvider, isLiteLLMAccessGroup, type AccessGroupAttributes, type AccessGroupError, type AccessGroupProps, } from './access-group.ts';
|
|
22
|
+
export { LiteLLMPolicyAttachment, LiteLLMPolicyAttachmentProvider, isLiteLLMPolicyAttachment, type PolicyAttachmentAttributes, type PolicyAttachmentError, type PolicyAttachmentProps, } from './policy-attachment.ts';
|
|
23
|
+
export { LiteLLMPolicy, LiteLLMPolicyProvider, isLiteLLMPolicy, type PolicyAttributes, type PolicyError, type PolicyProps, } from './policy.ts';
|
|
24
|
+
export { LiteLLMTeam, LiteLLMTeamProvider, isLiteLLMTeam, type TeamAttributes, type TeamError, type TeamMember, type TeamMemberAttributes, type TeamObjectPermission, type TeamObjectPermissionAttributes, type TeamProps, } from './team.ts';
|
|
25
|
+
export { LiteLLMToolPolicy, LiteLLMToolPolicyProvider, isLiteLLMToolPolicy, type ToolInputPolicy, type ToolOutputPolicy, type ToolPolicyAttributes, type ToolPolicyError, type ToolPolicyProps, } from './tool-policy.ts';
|
|
26
|
+
export { LiteLLMToolset, LiteLLMToolsetProvider, isLiteLLMToolset, type ToolsetAttributes, type ToolsetError, type ToolsetProps, } from './toolset.ts';
|
|
27
|
+
export type { ToolsetTool } from './toolset-types.ts';
|
|
28
|
+
export { LiteLLMModel, LiteLLMModelProvider, isLiteLLMModel, type ModelAttributes, type ModelError, type ModelProps, } from './model.ts';
|
|
29
|
+
export { LitellmModelAbsentAfterWriteError, LitellmModelAmbiguousNameError, LitellmModelConfigFileRowError, LitellmModelForeignRowError, LitellmModelInvalidError, LitellmModelNotConvergedError, LitellmModelPriorGenerationError, LitellmModelUnreadableError, } from './model-errors.ts';
|
|
30
|
+
export { LitellmRegistryAbsentAfterWriteError, LitellmRegistryAmbiguousError, LitellmRegistryInvalidError, LitellmRegistryNotConvergedError, LitellmRegistryUnreadableError, type RegistryError, } from './registry-errors.ts';
|
|
31
|
+
export { LiteLLMKey, LiteLLMKeyProvider, isLiteLLMKey, type KeyAttributes, type KeyError, type KeyProps, } from './key.ts';
|
|
32
|
+
export { LitellmKeyAbsentAfterWriteError, LitellmKeyAliasChangedError, LitellmKeyAliasEmptyError, LitellmKeyDebugLoggingError, LitellmKeyAmbiguousAliasError, LitellmKeyFieldNotAppliedError, LitellmKeyTransportError, LitellmKeyUnreadableError, LitellmKeyValueMalformedError, LitellmKeyValueMissingError, LitellmKeyValueNotHonouredError, LitellmKeyValueRequiredError, } from './key-errors.ts';
|
|
33
|
+
export { LitellmKeyCallbackMetadataDeclaredError, LitellmKeyCallbackMetadataLiveError, } from './key-metadata-errors.ts';
|
|
14
34
|
export { litellmProviders } from './providers.ts';
|
|
15
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/litellm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/litellm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACpC,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sCAAsC,EACtC,8BAA8B,EAC9B,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qCAAqC,EACrC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,4BAA4B,EAC5B,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,yBAAyB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,SAAS,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iCAAiC,EACjC,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oCAAoC,EACpC,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,uCAAuC,EACvC,mCAAmC,GACpC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|