llms-ink 0.7.1 → 0.7.2

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 CHANGED
@@ -307,7 +307,7 @@ JavaScript uses a 65-second total request deadline; pass `{ signal }` to cancel
307
307
  `llms-ink/guard/claude` binds one Claude Agent SDK conversation to one authenticated local Guard session. Install the optional peer separately:
308
308
 
309
309
  ```sh
310
- npm install llms-ink@0.7.1 @anthropic-ai/claude-agent-sdk@0.3.319
310
+ npm install llms-ink@0.7.2 @anthropic-ai/claude-agent-sdk@0.3.319
311
311
  ```
312
312
 
313
313
  First [start the Python 0.10.0 local service](https://llms.ink/guard/service/) with a reviewed gateway configuration and existing Claude authentication. Then try the bundled terminal host:
@@ -207,7 +207,7 @@ export async function createGuardedClaude(options) {
207
207
  }
208
208
  }
209
209
  async function elicit(request, context) {
210
- if (closing || !busy || context.signal.aborted || request.serverName !== 'guarded' || (request.mode ?? 'form') !== 'form'
210
+ if (closing || !initialized || !busy || context.signal.aborted || request.serverName !== 'guarded' || (request.mode ?? 'form') !== 'form'
211
211
  || typeof request.message !== 'string' || Buffer.byteLength(request.message) > 8192 || !sameShape(request.requestedSchema, reviewSchema))
212
212
  return { action: 'decline' };
213
213
  const lifetime = new AbortController();
@@ -294,6 +294,11 @@ export async function createGuardedClaude(options) {
294
294
  const code = message.subtype === 'error_max_turns' ? 'host_turn_limit' : message.subtype === 'error_max_budget_usd' ? 'host_budget_limit' : message.subtype === 'error_max_structured_output_retries' ? 'host_output_retry_limit' : 'host_result_error';
295
295
  fail(code);
296
296
  }
297
+ // Claude can emit subscription rate status before its initialization
298
+ // announcement. Discard it until the guard connection and tools are
299
+ // verified; it grants no authority and never reaches the callback.
300
+ if (!initialized && message.type === 'rate_limit_event')
301
+ continue;
297
302
  if (!initialized && message.type !== 'system')
298
303
  fail('host_not_initialized');
299
304
  if (onMessage) {
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { type InspectionReceipt } from './inspect.ts';
17
17
  export type { InspectionReceipt } from './inspect.ts';
18
- export declare const VERSION = "0.7.1";
18
+ export declare const VERSION = "0.7.2";
19
19
  export declare const DEFAULT_BASE_URL = "https://llms.ink";
20
20
  /** `llms` for the index (llms.txt), `full` for llms-full.txt. */
21
21
  export type Mode = 'llms' | 'full';
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { prepareInspection, inspectionJson, inspectionReceipt } from "./inspect.js";
17
17
  import { env } from "./env.js";
18
- export const VERSION = '0.7.1';
18
+ export const VERSION = '0.7.2';
19
19
  export const DEFAULT_BASE_URL = 'https://llms.ink';
20
20
  /**
21
21
  * An API error, or llms.ink couldn't be reached (then `status` and `code` are undefined).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llms-ink",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Turn any link — site, docs section, page, GitHub repo, PDF or video — into llms.txt and llms-full.txt. Typed client for llms.ink, plus a Vite plugin, an Astro integration and middleware that serve the files from your site, and Vercel AI SDK tools. No dependencies.",
5
5
  "type": "module",
6
6
  "exports": {