@oh-my-pi/pi-ai 17.2.5 → 17.2.7
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/CHANGELOG.md +21 -0
- package/dist/types/auth-broker/client.d.ts +7 -0
- package/dist/types/auth-broker/server.d.ts +11 -0
- package/dist/types/auth-broker/wire-schema-resource.d.ts +1 -1
- package/dist/types/auth-broker/wire-schemas.d.ts +4 -2
- package/dist/types/dialect/examples.d.ts +8 -0
- package/dist/types/error/aws.d.ts +5 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/providers/anthropic-messages-server-schema.d.ts +695 -255
- package/dist/types/providers/aws-credentials.d.ts +5 -10
- package/dist/types/providers/bedrock-mantle.d.ts +13 -0
- package/dist/types/providers/openai-chat-server-schema.d.ts +909 -293
- package/dist/types/providers/openai-responses-server-schema.d.ts +980 -353
- package/dist/types/registry/amazon-bedrock.d.ts +7 -1
- package/dist/types/registry/aws.d.ts +13 -0
- package/dist/types/registry/bedrock-mantle.d.ts +22 -0
- package/dist/types/registry/registry.d.ts +25 -1
- package/dist/types/registry/types.d.ts +24 -0
- package/dist/types/types.d.ts +13 -5
- package/dist/types/usage.d.ts +152 -46
- package/dist/types/utils/aws-profile.d.ts +17 -0
- package/dist/types/utils/schema/wire.d.ts +1 -1
- package/dist/types/utils/validation.d.ts +24 -0
- package/package.json +5 -5
- package/src/auth-broker/client.ts +2 -1
- package/src/auth-broker/server.ts +2 -1
- package/src/auth-broker/wire-schema-resource.ts +1 -1
- package/src/dialect/examples.ts +34 -8
- package/src/dialect/inventory.ts +2 -2
- package/src/error/aws.ts +5 -1
- package/src/index.ts +1 -1
- package/src/providers/amazon-bedrock.ts +5 -5
- package/src/providers/anthropic-messages-server-schema.ts +1 -1
- package/src/providers/anthropic-messages-server.ts +1 -1
- package/src/providers/aws-credentials.ts +262 -76
- package/src/providers/bedrock-mantle.ts +110 -0
- package/src/providers/cursor.ts +31 -3
- package/src/providers/google-gemini-cli.ts +1 -1
- package/src/providers/ollama.ts +27 -1
- package/src/providers/openai-chat-server-schema.ts +1 -1
- package/src/providers/openai-chat-server.ts +1 -1
- package/src/providers/openai-codex-responses.ts +1 -1
- package/src/providers/openai-responses-server-schema.ts +1 -1
- package/src/providers/openai-responses-server.ts +1 -1
- package/src/registry/amazon-bedrock.ts +9 -14
- package/src/registry/aws.ts +57 -0
- package/src/registry/bedrock-mantle.ts +34 -0
- package/src/registry/google-vertex.ts +2 -2
- package/src/registry/registry.ts +2 -0
- package/src/registry/types.ts +30 -0
- package/src/stream.ts +46 -30
- package/src/types.ts +14 -6
- package/src/usage.ts +1 -1
- package/src/utils/aws-profile.ts +88 -0
- package/src/utils/schema/wire.ts +1 -1
- package/src/utils/validation.ts +2 -1
|
@@ -4,16 +4,11 @@
|
|
|
4
4
|
* Chain (first hit wins):
|
|
5
5
|
* 1. Static credentials from the environment
|
|
6
6
|
* (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` [+ `AWS_SESSION_TOKEN`]).
|
|
7
|
-
* 2.
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - `credential_process` — an external command emitting the AWS SDK
|
|
13
|
-
* `Version: 1` JSON envelope on stdout. Used by `aws-vault`, `granted`,
|
|
14
|
-
* in-house brokers, etc.
|
|
15
|
-
* 3. EC2 IMDSv2 (only when `AWS_EC2_METADATA_DISABLED` is unset / falsey and
|
|
16
|
-
* `169.254.169.254` is reachable within a 1 s timeout).
|
|
7
|
+
* 2. Web identity (`AWS_WEB_IDENTITY_TOKEN_FILE` + `AWS_ROLE_ARN`).
|
|
8
|
+
* 3. Profile in `~/.aws/credentials` (and `~/.aws/config` for SSO):
|
|
9
|
+
* - static keys, SSO, or `credential_process`.
|
|
10
|
+
* 4. ECS/container credentials from `AWS_CONTAINER_CREDENTIALS_*`.
|
|
11
|
+
* 5. EC2 IMDSv2 when metadata is enabled.
|
|
17
12
|
*
|
|
18
13
|
* Resolved credentials are cached process-wide per profile and refreshed
|
|
19
14
|
* 60 s before `Expiration` to absorb clock skew.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AwsBedrockProviderOptions } from "../registry/aws.js";
|
|
2
|
+
import type { FetchImpl, Model } from "../types.js";
|
|
3
|
+
import type { OpenAIResponsesOptions } from "./openai-responses.js";
|
|
4
|
+
export type BedrockMantleProviderOptions = AwsBedrockProviderOptions;
|
|
5
|
+
export interface BedrockMantleOptions extends OpenAIResponsesOptions {
|
|
6
|
+
providerOptions?: BedrockMantleProviderOptions;
|
|
7
|
+
}
|
|
8
|
+
export declare function createBedrockMantleAuthenticatedFetch(options?: BedrockMantleOptions): FetchImpl;
|
|
9
|
+
export interface PreparedBedrockMantleRequest {
|
|
10
|
+
model: Model<"openai-responses">;
|
|
11
|
+
options: OpenAIResponsesOptions;
|
|
12
|
+
}
|
|
13
|
+
export declare function prepareBedrockMantleRequest(model: Model<"openai-responses">, options: BedrockMantleOptions): PreparedBedrockMantleRequest;
|