pi-commandcode-provider 0.5.1 → 0.6.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/CHANGELOG.md +30 -0
- package/CONTRIBUTING.md +10 -0
- package/README.md +38 -12
- package/index.ts +72 -36
- package/package.json +13 -4
- package/scripts/live-e2e-profile.mjs +87 -0
- package/scripts/pi-authenticated.mjs +1 -0
- package/scripts/pi-isolated.mjs +1 -0
- package/src/api-key.ts +69 -0
- package/src/auth-server.ts +7 -0
- package/src/commandcode-catalog.ts +141 -0
- package/src/converters.ts +72 -16
- package/src/core.ts +117 -23
- package/src/models.ts +50 -97
- package/src/oauth.ts +84 -22
- package/src/pricing.ts +53 -45
- package/src/quota-command.ts +66 -0
- package/src/quota-format.ts +111 -0
- package/src/quota-types.ts +47 -0
- package/src/quota.ts +335 -0
- package/src/runtime.ts +10 -5
- package/src/transport.ts +140 -0
- package/src/types.ts +9 -0
package/src/types.ts
CHANGED
|
@@ -110,7 +110,10 @@ export interface StreamOptions {
|
|
|
110
110
|
apiKey?: string
|
|
111
111
|
signal?: AbortSignal
|
|
112
112
|
headers?: Record<string, string>
|
|
113
|
+
fetch?: typeof fetch
|
|
113
114
|
maxTokens?: number
|
|
115
|
+
temperature?: number
|
|
116
|
+
sessionId?: string
|
|
114
117
|
/** Resolved pi thinking level; forwarded only through the model's map. */
|
|
115
118
|
reasoning?: string
|
|
116
119
|
onPayload?: (payload: unknown, model: ModelLike) => unknown | Promise<unknown>
|
|
@@ -171,6 +174,12 @@ export type AssistantMessageEvent =
|
|
|
171
174
|
contentIndex: number
|
|
172
175
|
partial: AssistantMessageLike
|
|
173
176
|
}
|
|
177
|
+
| {
|
|
178
|
+
type: "toolcall_delta"
|
|
179
|
+
contentIndex: number
|
|
180
|
+
delta: string
|
|
181
|
+
partial: AssistantMessageLike
|
|
182
|
+
}
|
|
174
183
|
| {
|
|
175
184
|
type: "toolcall_end"
|
|
176
185
|
contentIndex: number
|