@demicodes/provider 0.2.1 → 0.3.1
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/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ProviderQuotaCapability, B as ProviderQuotaWindow, C as ProviderRuntimeState, D as CreateProviderQuotaOptions, E as ToolDefinition, F as ProviderQuotaProbeResult, G as severityFromUsedPercent, H as clampUsedPercent, I as ProviderQuotaSeverity, K as unixSecondsToIso, L as ProviderQuotaSnapshot, M as ProviderQuotaPlan, N as ProviderQuotaProbeCost, O as EnsureQuotaOptions, P as ProviderQuotaProbeOptions, R as ProviderQuotaSource, S as ProviderRuntimeFactory, T as ProviderServiceTier, U as createProviderQuota, V as ProviderQuotaWindowUnit, W as ensureQuota, _ as ProviderFactoryDefinition, a as ModelPolicy, b as ProviderModelList, c as ProviderAuthState, d as ProviderCredentialInfo, f as ProviderCredentialLoginOptions, g as ProviderEvent, h as ProviderCredentialsCapability, i as InferenceSteer, j as ProviderQuotaObserveInput, k as ProviderQuota, l as ProviderCredentialActive, m as ProviderCredentials, n as InferenceItem, o as Provider, p as ProviderCredentialLoginResult, q as usedPercentFromRatio, r as InferenceRequest, s as ProviderAuth, t as AgentProvider, u as ProviderCredentialAddInput, v as ProviderModel, w as ProviderSelection, x as ProviderRun, y as ProviderModelCost, z as ProviderQuotaUnsupportedError } from "./types-
|
|
1
|
+
import { A as ProviderQuotaCapability, B as ProviderQuotaWindow, C as ProviderRuntimeState, D as CreateProviderQuotaOptions, E as ToolDefinition, F as ProviderQuotaProbeResult, G as severityFromUsedPercent, H as clampUsedPercent, I as ProviderQuotaSeverity, K as unixSecondsToIso, L as ProviderQuotaSnapshot, M as ProviderQuotaPlan, N as ProviderQuotaProbeCost, O as EnsureQuotaOptions, P as ProviderQuotaProbeOptions, R as ProviderQuotaSource, S as ProviderRuntimeFactory, T as ProviderServiceTier, U as createProviderQuota, V as ProviderQuotaWindowUnit, W as ensureQuota, _ as ProviderFactoryDefinition, a as ModelPolicy, b as ProviderModelList, c as ProviderAuthState, d as ProviderCredentialInfo, f as ProviderCredentialLoginOptions, g as ProviderEvent, h as ProviderCredentialsCapability, i as InferenceSteer, j as ProviderQuotaObserveInput, k as ProviderQuota, l as ProviderCredentialActive, m as ProviderCredentials, n as InferenceItem, o as Provider, p as ProviderCredentialLoginResult, q as usedPercentFromRatio, r as InferenceRequest, s as ProviderAuth, t as AgentProvider, u as ProviderCredentialAddInput, v as ProviderModel, w as ProviderSelection, x as ProviderRun, y as ProviderModelCost, z as ProviderQuotaUnsupportedError } from "./types-C9tIelAP.mjs";
|
|
2
2
|
import { FileExtension, ModelSelection, ThinkingCapability, ThinkingConfig, ToolResultContentBlock } from "@demicodes/core";
|
|
3
3
|
//#region src/content.d.ts
|
|
4
4
|
/**
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ProviderEvent, i as InferenceSteer, r as InferenceRequest, t as AgentProvider, x as ProviderRun } from "./types-
|
|
1
|
+
import { g as ProviderEvent, i as InferenceSteer, r as InferenceRequest, t as AgentProvider, x as ProviderRun } from "./types-C9tIelAP.mjs";
|
|
2
2
|
//#region src/testing.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Scripted provider for testing. Each "turn" is a list of events to yield.
|
|
@@ -206,7 +206,16 @@ type ProviderEvent = {
|
|
|
206
206
|
toolUseId: string;
|
|
207
207
|
toolName: string;
|
|
208
208
|
input: unknown;
|
|
209
|
-
} |
|
|
209
|
+
} |
|
|
210
|
+
/**
|
|
211
|
+
* End of a model response. `usage` MUST be the usage of a single API request
|
|
212
|
+
* — the final one when the provider made several internally (e.g. a CLI turn
|
|
213
|
+
* with tool calls). The agent anchors its context-size estimation on it
|
|
214
|
+
* (input + output + cache reads/writes ≈ the context the next request will
|
|
215
|
+
* carry), so a turn-cumulative total here inflates the estimate and triggers
|
|
216
|
+
* spurious compaction.
|
|
217
|
+
*/
|
|
218
|
+
{
|
|
210
219
|
type: 'response';
|
|
211
220
|
usage: TokenUsage;
|
|
212
221
|
} | {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demicodes/provider",
|
|
3
3
|
"description": "Provider contract and shared building blocks for Demi inference adapters.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@demicodes/core": "^0.
|
|
26
|
-
"@demicodes/utils": "^0.
|
|
25
|
+
"@demicodes/core": "^0.3.1",
|
|
26
|
+
"@demicodes/utils": "^0.3.1"
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"main": "./dist/index.mjs",
|