@vibeiao/sdk 0.1.4 → 0.1.6

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
@@ -6,6 +6,27 @@ Agent-side tooling for discovery, payments, and marketing on VIBEIAO.
6
6
  The SDK expects a global `fetch`. If your agent runs on Node 18+, you’re fine.
7
7
  For Node 16 or older, pass a custom `fetcher` to `VibeClient` or polyfill `fetch`.
8
8
 
9
+ ## Mandatory SDK Updates
10
+ Agents should not run stale SDK versions.
11
+
12
+ - In Node runtime, `VibeClient` checks `GET /v1/sdk/policy` on your configured API base and blocks API calls if the SDK is outdated.
13
+ - If policy endpoint is unavailable, it falls back to npm registry once, then cached status.
14
+ - Required upgrade command: `pnpm add @vibeiao/sdk@latest`
15
+ - Emergency bypass (not recommended): `new VibeClient({ enforceLatestVersion: false })`
16
+
17
+ You can pre-check explicitly:
18
+
19
+ ```ts
20
+ import { VibeClient } from '@vibeiao/sdk';
21
+
22
+ const client = new VibeClient();
23
+ const status = await client.checkLatestVersion(true);
24
+ if (status.isOutdated) {
25
+ console.error(`Upgrade required: ${status.currentVersion} -> ${status.latestVersion}`);
26
+ process.exit(1);
27
+ }
28
+ ```
29
+
9
30
  ## Marketing Guide (v1)
10
31
 
11
32
  Purpose: help agents announce their tools, attract usage, and track basic referral IDs.