@posthog/ai 8.12.0 → 8.12.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/adk/index.cjs +1 -1
- package/dist/adk/index.mjs +1 -1
- package/dist/anthropic/index.cjs +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/claude-agent-sdk/index.cjs +1 -1
- package/dist/claude-agent-sdk/index.mjs +1 -1
- package/dist/gemini/index.cjs +1 -1
- package/dist/gemini/index.mjs +1 -1
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +1 -1
- package/dist/langchain/index.mjs +1 -1
- package/dist/langchain/middleware/index.cjs +1 -1
- package/dist/langchain/middleware/index.mjs +1 -1
- package/dist/openai/index.cjs +1 -1
- package/dist/openai/index.mjs +1 -1
- package/dist/openai-agents/index.cjs +1 -1
- package/dist/openai-agents/index.mjs +1 -1
- package/dist/vercel/index.cjs +1 -1
- package/dist/vercel/index.mjs +1 -1
- package/package.json +3 -3
package/dist/adk/index.cjs
CHANGED
package/dist/adk/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { BasePlugin } from "@google/adk";
|
|
|
2
2
|
import { v4 } from "uuid";
|
|
3
3
|
import { toJsonSafeValue, uuidv7 } from "@posthog/core";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var version = "8.12.
|
|
5
|
+
var version = "8.12.1";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/captureAiEvent.ts
|
|
8
8
|
/** @internal */
|
package/dist/anthropic/index.cjs
CHANGED
package/dist/anthropic/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ let _anthropic_ai_claude_agent_sdk = require("@anthropic-ai/claude-agent-sdk");
|
|
|
3
3
|
let uuid = require("uuid");
|
|
4
4
|
let _posthog_core = require("@posthog/core");
|
|
5
5
|
//#region package.json
|
|
6
|
-
var version = "8.12.
|
|
6
|
+
var version = "8.12.1";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/captureAiEvent.ts
|
|
9
9
|
/** @internal */
|
|
@@ -2,7 +2,7 @@ import { SYSTEM_PROMPT_DYNAMIC_BOUNDARY, query as query$1 } from "@anthropic-ai/
|
|
|
2
2
|
import { v4 } from "uuid";
|
|
3
3
|
import { toJsonSafeValue, uuidv7 } from "@posthog/core";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var version = "8.12.
|
|
5
|
+
var version = "8.12.1";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/captureAiEvent.ts
|
|
8
8
|
/** @internal */
|
package/dist/gemini/index.cjs
CHANGED
package/dist/gemini/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -396,7 +396,7 @@ function sanitizeValues(obj) {
|
|
|
396
396
|
}
|
|
397
397
|
//#endregion
|
|
398
398
|
//#region package.json
|
|
399
|
-
var version = "8.12.
|
|
399
|
+
var version = "8.12.1";
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/serializeError.ts
|
|
402
402
|
const DEFAULT_MAX_DEPTH = 3;
|
|
@@ -1265,9 +1265,12 @@ var Prompts = class {
|
|
|
1265
1265
|
* with many prompts can call this once per cache cycle instead of making one
|
|
1266
1266
|
* `get()` request per prompt.
|
|
1267
1267
|
*
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1268
|
+
* Unlike `get()`, there is no `fallback` option, so callers should handle
|
|
1269
|
+
* the error themselves.
|
|
1270
|
+
*
|
|
1271
|
+
* @throws {Error} When the request fails, when the response is malformed,
|
|
1272
|
+
* or when the server does not support fetching prompts by label on the list
|
|
1273
|
+
* endpoint (PostHog releases from before September 2026).
|
|
1271
1274
|
*/
|
|
1272
1275
|
async getAll(options) {
|
|
1273
1276
|
const label = options.label;
|
|
@@ -1284,6 +1287,7 @@ var Prompts = class {
|
|
|
1284
1287
|
}
|
|
1285
1288
|
resolvedRows.push(row);
|
|
1286
1289
|
}
|
|
1290
|
+
if (rows.length > 0 && resolvedRows.length === 0) throw new Error(`[PostHog Prompts] The server returned prompts, but none resolve label "${label}". It may not support fetching prompts by label on the list endpoint yet. Upgrade PostHog, or fetch prompts one by one with get().`);
|
|
1287
1291
|
const now = Date.now();
|
|
1288
1292
|
const results = /* @__PURE__ */ new Map();
|
|
1289
1293
|
for (const row of resolvedRows) {
|