@askalf/dario
Advanced tools
@@ -478,5 +478,24 @@ /** | ||
| * pre-fix behavior (always bare 5m) as the operator escape hatch. | ||
| * | ||
| * DARIO_CACHE_TTL_1H=1 is the opposite override: force `ttl:'1h'` on every | ||
| * breakpoint regardless of what the client sent, for a client that can't | ||
| * emit the 1h stamp itself (an SDK/agent harness that only stamps bare 5m — | ||
| * dario#678). The proxy adds the enabling `extended-cache-ttl-` beta to the | ||
| * outbound set so the 1h is honored. Deliberate override of the mirror | ||
| * guardrail: 1h cache *writes* bill ~2× the 5m rate, so it only wins when | ||
| * idle gaps routinely exceed the 5-minute window; on rapid back-to-back | ||
| * turns it costs more. 5M takes precedence if both are set. | ||
| */ | ||
| export declare function effectiveCacheControl(clientBody: Record<string, unknown>, clientBeta?: string): CacheControl; | ||
| /** The anthropic-beta flag that enables the 1-hour prompt-cache TTL. */ | ||
| export declare const EXTENDED_CACHE_TTL_BETA = "extended-cache-ttl-2025-04-11"; | ||
| /** | ||
| * When DARIO_CACHE_TTL_1H forces the 1h stamp, the outbound beta set must also | ||
| * carry `extended-cache-ttl-` or Anthropic ignores the ttl. Add it (idempotent) | ||
| * unless DARIO_CACHE_TTL_5M overrides (5M wins, matching effectiveCacheControl). | ||
| * Pure — `env` is injectable for tests. Returns `beta` unchanged when the flag | ||
| * is off or the beta is already present. | ||
| */ | ||
| export declare function withForced1hBeta(beta: string, env?: Record<string, string | undefined>): string; | ||
| /** | ||
| * Place CC-style prompt-cache breakpoints on the conversation. The system | ||
@@ -483,0 +502,0 @@ * prompt is already cached at build time (2 system breakpoints); this adds a |
+1
-1
| { | ||
| "name": "@askalf/dario", | ||
| "version": "5.2.3", | ||
| "version": "5.2.5", | ||
| "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential malware
Supply chain riskAI has identified this package as malware. This is a strong signal that the package may be malicious.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential malware
Supply chain riskAI has identified this package as malware. This is a strong signal that the package may be malicious.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1379176
0.23%26705
0.2%117
1.74%