@kazzle/app 0.1.727 → 0.1.729
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/tools.d.ts +11 -1
- package/dist/tools.js +9 -0
- package/package.json +1 -1
package/dist/tools.d.ts
CHANGED
|
@@ -30,6 +30,16 @@ export interface ToolRequestSpec {
|
|
|
30
30
|
headers?: Record<string, string>;
|
|
31
31
|
body?: unknown;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Native client-device tools that an app may reference.
|
|
35
|
+
*
|
|
36
|
+
* Adding one requires the matching definition in `server/tools/client-device`,
|
|
37
|
+
* this SDK name, and coverage in the native-tool catalog drift test.
|
|
38
|
+
*/
|
|
39
|
+
export declare const NativeToolName: {
|
|
40
|
+
readonly HEALTH: "health";
|
|
41
|
+
};
|
|
42
|
+
export type NativeToolName = typeof NativeToolName[keyof typeof NativeToolName];
|
|
33
43
|
export type KazzleTarget = ({
|
|
34
44
|
type: 'app';
|
|
35
45
|
component: string;
|
|
@@ -39,7 +49,7 @@ export type KazzleTarget = ({
|
|
|
39
49
|
url: string;
|
|
40
50
|
} & ToolRequestSpec) | {
|
|
41
51
|
type: 'kazzle';
|
|
42
|
-
name:
|
|
52
|
+
name: NativeToolName;
|
|
43
53
|
};
|
|
44
54
|
export interface ToolActionButtonElement {
|
|
45
55
|
type: 'button';
|
package/dist/tools.js
CHANGED
|
@@ -64,6 +64,15 @@ export function toolContext(req) {
|
|
|
64
64
|
export function isThreadToolInvocation(context) {
|
|
65
65
|
return context.source === ToolInvocationSource.THREAD;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Native client-device tools that an app may reference.
|
|
69
|
+
*
|
|
70
|
+
* Adding one requires the matching definition in `server/tools/client-device`,
|
|
71
|
+
* this SDK name, and coverage in the native-tool catalog drift test.
|
|
72
|
+
*/
|
|
73
|
+
export const NativeToolName = {
|
|
74
|
+
HEALTH: 'health',
|
|
75
|
+
};
|
|
67
76
|
/** Type-safe tools helper. Use: export const tools = defineTools([...]) */
|
|
68
77
|
export function defineTools(tools) {
|
|
69
78
|
return tools;
|