@jigs.design/prompt 0.3.3 → 0.3.4
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/tool-results.d.ts +3 -2
- package/dist/tool-results.js +5 -4
- package/package.json +4 -4
package/dist/tool-results.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ export declare const TOOL_RESULTS = "toolResults";
|
|
|
5
5
|
/**
|
|
6
6
|
* The `toolResults` slot as a server with `toolResults: true` adds it: the
|
|
7
7
|
* page passes each block the results of the tools called before it in the
|
|
8
|
-
* conversation, keyed by tool name
|
|
9
|
-
* live here with the rules
|
|
8
|
+
* conversation, keyed by tool name, and each call of a reply by its
|
|
9
|
+
* number. Its words are the prompt's, so they live here with the rules
|
|
10
|
+
* that name it.
|
|
10
11
|
*/
|
|
11
12
|
export declare const toolResultsSlot: import("@jigs.design/host").DataDefinition<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
12
13
|
//#endregion
|
package/dist/tool-results.js
CHANGED
|
@@ -6,17 +6,18 @@ const TOOL_RESULTS = "toolResults";
|
|
|
6
6
|
/**
|
|
7
7
|
* The `toolResults` slot as a server with `toolResults: true` adds it: the
|
|
8
8
|
* page passes each block the results of the tools called before it in the
|
|
9
|
-
* conversation, keyed by tool name
|
|
10
|
-
* live here with the rules
|
|
9
|
+
* conversation, keyed by tool name, and each call of a reply by its
|
|
10
|
+
* number. Its words are the prompt's, so they live here with the rules
|
|
11
|
+
* that name it.
|
|
11
12
|
*/
|
|
12
13
|
const toolResultsSlot = data({
|
|
13
|
-
dataText: `{ [toolName: string]: the tool's latest result, as you were shown it }. A tool not yet called, or whose call failed or was refused, has no entry. Read one as \`results.data?.["searchFlights"]?.flights\`, with the tool's name as a quoted key and \`?.\` at each step.`,
|
|
14
|
+
dataText: `{ [toolName: string]: the tool's latest result, as you were shown it }. A tool not yet called, or whose call failed or was refused, has no entry. Read one as \`results.data?.["searchFlights"]?.flights\`, with the tool's name as a quoted key and \`?.\` at each step. Each call of the latest reply that called a tool is also under its number: \`["searchFlights#1"]\` its first call's result, \`["searchFlights#2"]\` its second.`,
|
|
14
15
|
description: "The results of the tools called in this conversation, by tool name. A page opened from a block keeps the results it had.",
|
|
15
16
|
schema: z.record(z.string(), z.json())
|
|
16
17
|
});
|
|
17
18
|
/** Added after the chat rule that the model never sees what a query returns. */
|
|
18
19
|
const CHAT_TOOL_RULE = `- You have seen what a tool returned. You may state a figure or a conclusion from it in prose, in a sentence. A UI that shows it reads \`${TOOL_RESULTS}\`, never a copy of its values.`;
|
|
19
20
|
/** Added after the rule on where a UI's data comes from. */
|
|
20
|
-
const HOOKS_TOOL_RULE = `- A listed query that covers the ask comes before \`${TOOL_RESULTS}\`: its data stays live. If you call a tool more than once
|
|
21
|
+
const HOOKS_TOOL_RULE = `- A listed query that covers the ask comes before \`${TOOL_RESULTS}\`: its data stays live. If you call a tool more than once in a reply, a block that shows one call's result reads it by number, \`["searchFlights#2"]\` for the second: \`["searchFlights"]\` is only the latest.`;
|
|
21
22
|
//#endregion
|
|
22
23
|
export { CHAT_TOOL_RULE, HOOKS_TOOL_RULE, TOOL_RESULTS, toolResultsSlot };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigs.design/prompt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "The system prompt and the repair text, rendered from a host and from diagnostics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@jigs.design/
|
|
29
|
-
"@jigs.design/
|
|
30
|
-
"@jigs.design/protocol": "0.3.
|
|
28
|
+
"@jigs.design/compiler": "0.3.4",
|
|
29
|
+
"@jigs.design/host": "0.3.4",
|
|
30
|
+
"@jigs.design/protocol": "0.3.4"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"zod": "^4.0.0"
|