@puku-ai/sdk 4.0.0 → 4.0.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/README.md +29 -10
- package/package.json +1 -1
- package/sdk.cjs +5 -5
- package/sdk.cjs.map +17 -17
- package/sdk.d.ts +9 -9
- package/sdk.mjs +21 -21
- package/sdk.mjs.map +17 -17
package/sdk.d.ts
CHANGED
|
@@ -419,7 +419,7 @@ import * as z from 'zod/v4';
|
|
|
419
419
|
|
|
420
420
|
/**
|
|
421
421
|
* Legacy base-error type alias for source compatibility with code that
|
|
422
|
-
* imports the
|
|
422
|
+
* imports the SDK's base error type by its old name. Throw sites
|
|
423
423
|
* should always throw `PukuError` directly; the legacy alias exists only
|
|
424
424
|
* so consumers' `instanceof` checks keep working across the rename.
|
|
425
425
|
*
|
|
@@ -1002,7 +1002,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1002
1002
|
*
|
|
1003
1003
|
* const tools = await mcpClient.listTools();
|
|
1004
1004
|
* const runner = await puku.beta.messages.toolRunner({
|
|
1005
|
-
* model: "puku-
|
|
1005
|
+
* model: "puku-ai-2.8",
|
|
1006
1006
|
* max_tokens: 1024,
|
|
1007
1007
|
* tools: tools.tools.map(tool => mcpTool(tool, mcpClient)),
|
|
1008
1008
|
* messages: [{ role: "user", content: "Use the available tools" }],
|
|
@@ -1023,7 +1023,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1023
1023
|
* ```ts
|
|
1024
1024
|
* const { tools } = await mcpClient.listTools();
|
|
1025
1025
|
* const runner = await puku.beta.messages.toolRunner({
|
|
1026
|
-
* model: "puku-
|
|
1026
|
+
* model: "puku-ai-2.8",
|
|
1027
1027
|
* max_tokens: 1024,
|
|
1028
1028
|
* tools: mcpTools(tools, mcpClient),
|
|
1029
1029
|
* messages: [{ role: "user", content: "Use the available tools" }],
|
|
@@ -1057,7 +1057,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1057
1057
|
* });
|
|
1058
1058
|
*
|
|
1059
1059
|
* await puku.beta.messages.create({
|
|
1060
|
-
* model: "puku-
|
|
1060
|
+
* model: "puku-ai-2.8",
|
|
1061
1061
|
* max_tokens: 1024,
|
|
1062
1062
|
* messages: prompt.messages.map(msg => mcpMessage(msg)),
|
|
1063
1063
|
* });
|
|
@@ -1079,7 +1079,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1079
1079
|
* ```ts
|
|
1080
1080
|
* const { messages } = await mcpClient.getPrompt({ name: "example-prompt" });
|
|
1081
1081
|
* await puku.beta.messages.create({
|
|
1082
|
-
* model: "puku-
|
|
1082
|
+
* model: "puku-ai-2.8",
|
|
1083
1083
|
* max_tokens: 1024,
|
|
1084
1084
|
* messages: mcpMessages(messages),
|
|
1085
1085
|
* });
|
|
@@ -1102,7 +1102,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1102
1102
|
* const { messages } = await mcpClient.getPrompt({ name: "my-prompt" });
|
|
1103
1103
|
* // If you need to mix MCP content with other content:
|
|
1104
1104
|
* await puku.beta.messages.create({
|
|
1105
|
-
* model: "puku-
|
|
1105
|
+
* model: "puku-ai-2.8",
|
|
1106
1106
|
* max_tokens: 1024,
|
|
1107
1107
|
* messages: [{
|
|
1108
1108
|
* role: "user",
|
|
@@ -1139,7 +1139,7 @@ type NoInfer<T> = T extends infer R ? R : never;
|
|
|
1139
1139
|
*
|
|
1140
1140
|
* const resource = await mcpClient.readResource({ uri: "file:///example.txt" });
|
|
1141
1141
|
* await puku.beta.messages.create({
|
|
1142
|
-
* model: "puku-
|
|
1142
|
+
* model: "puku-ai-2.8",
|
|
1143
1143
|
* max_tokens: 1024,
|
|
1144
1144
|
* messages: [{
|
|
1145
1145
|
* role: "user",
|
|
@@ -1419,7 +1419,7 @@ type Command = BetaMemoryTool20250818Command['command'];
|
|
|
1419
1419
|
* @example
|
|
1420
1420
|
* ```ts
|
|
1421
1421
|
* const client = new PukuAI({
|
|
1422
|
-
* middleware: [betaRefusalFallbackMiddleware([{ model: '
|
|
1422
|
+
* middleware: [betaRefusalFallbackMiddleware([{ model: 'opus-4.8' }])],
|
|
1423
1423
|
* });
|
|
1424
1424
|
*
|
|
1425
1425
|
* const fallbackState = new BetaFallbackState();
|
|
@@ -1611,7 +1611,7 @@ type AutoParseableOutputConfig = Omit<OutputConfig, 'format'> & {
|
|
|
1611
1611
|
* const betaMessageTokensCount =
|
|
1612
1612
|
* await client.beta.messages.countTokens({
|
|
1613
1613
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
1614
|
-
* model: 'puku-
|
|
1614
|
+
* model: 'puku-ai-2.8,
|
|
1615
1615
|
* });
|
|
1616
1616
|
* ```
|
|
1617
1617
|
*/
|