@jigs.design/prompt 0.1.2 → 0.2.0
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/repair.d.ts +1 -1
- package/dist/system-prompt.js +2 -1
- package/package.json +4 -4
package/dist/repair.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Diagnostic } from "@jigs.design/
|
|
1
|
+
import { Diagnostic } from "@jigs.design/protocol";
|
|
2
2
|
//#region src/repair.d.ts
|
|
3
3
|
/** Whether a diagnostic is worth a repair round: something the compiler had to change. */
|
|
4
4
|
export declare function needsRepair(diagnostics: ReadonlyArray<Diagnostic>): boolean;
|
package/dist/system-prompt.js
CHANGED
|
@@ -33,6 +33,7 @@ const OUTPUT = {
|
|
|
33
33
|
\`\`\`
|
|
34
34
|
- Keep explanation outside the block, in Markdown. Do not repeat in prose what the UI shows.
|
|
35
35
|
- You never see what a query returns: the UI reads it when it runs, after your reply. So your prose must not state figures, totals or conclusions about the user's data; say what the UI shows instead.
|
|
36
|
+
- When the user's data would answer the ask, the block that reads it goes in this reply. Never reply with a promise to check, compare or look something up: there is no later turn to do it in.
|
|
36
37
|
- Tags, recipes and \`{@body}\` lines work only inside a block. Outside one, write plain Markdown: no tags, no HTML and no tool-call markup, which would show as text.
|
|
37
38
|
- A reply may hold several blocks, each with its own id. Each block is a separate UI: it cannot see another block's state.
|
|
38
39
|
- Never put Jigs in any other fence, and never put a fence inside a block.
|
|
@@ -83,7 +84,7 @@ const HOOKS = `## Data and actions
|
|
|
83
84
|
- After a mutation succeeds, the queries listed under "Refreshes" reload by themselves. Write nothing to make that happen.
|
|
84
85
|
- An action listed below is called the same way, with \`useMutation("name")\` and \`mutate(input)\` in a handler. The page handles it instead of the server, for example by sending a message; its handle has the same \`status\`, \`data\` and \`error\`.
|
|
85
86
|
- The first argument is always the name as a string literal. Never write \`useQuery({ queryKey, queryFn })\`.
|
|
86
|
-
- Only use the queries and mutations listed below.
|
|
87
|
+
- Only use the queries and mutations listed below. When one returns data the ask needs, read it with \`useQuery\` and show what it returns. Never write those values into the UI yourself, not even as an example.
|
|
87
88
|
- Inputs and data are TypeScript-like types. A \`//\` comment gives a field's meaning and limits; follow them when you build an input.`;
|
|
88
89
|
const COMPONENTS_INTRO = `## Components
|
|
89
90
|
Each prop is \`name: type = default\`, then what it does. Leave a prop out to get its default.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigs.design/prompt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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/compiler": "0.
|
|
29
|
-
"@jigs.design/
|
|
30
|
-
"@jigs.design/
|
|
28
|
+
"@jigs.design/compiler": "0.2.0",
|
|
29
|
+
"@jigs.design/protocol": "0.2.0",
|
|
30
|
+
"@jigs.design/host": "0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"zod": "^4.0.0"
|