@jigs.design/protocol 0.3.0 → 0.3.2
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/parse.js +1 -1
- package/dist/types.d.ts +12 -2
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -94,7 +94,7 @@ function parseComponentSchema(value) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
function parseProcedure(value) {
|
|
97
|
-
if (!isRecord(value) || value.kind !== "query" && value.kind !== "mutation" && value.kind !== "action" || !isStringList(value.invalidates)) return null;
|
|
97
|
+
if (!isRecord(value) || value.kind !== "query" && value.kind !== "mutation" && value.kind !== "action" && value.kind !== "data" || !isStringList(value.invalidates)) return null;
|
|
98
98
|
return {
|
|
99
99
|
invalidates: value.invalidates,
|
|
100
100
|
kind: value.kind
|
package/dist/types.d.ts
CHANGED
|
@@ -40,8 +40,11 @@ export interface ComponentSchema {
|
|
|
40
40
|
children: ChildrenKind;
|
|
41
41
|
props: Readonly<Record<string, PropSchema>>;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
44
|
-
|
|
43
|
+
/**
|
|
44
|
+
* `action` is a mutation the embedding page handles instead of the server;
|
|
45
|
+
* `data` is a slot the page provides, read with `useQuery` and never fetched.
|
|
46
|
+
*/
|
|
47
|
+
export type ProcedureKind = "action" | "data" | "mutation" | "query";
|
|
45
48
|
export interface ProcedureEntry {
|
|
46
49
|
invalidates: ReadonlyArray<string>;
|
|
47
50
|
kind: ProcedureKind;
|
|
@@ -193,6 +196,13 @@ export interface ChatBlock {
|
|
|
193
196
|
/** The checked source, with its pragma. Store this, not the program. */
|
|
194
197
|
source: string;
|
|
195
198
|
status: ChatBlockStatus;
|
|
199
|
+
/**
|
|
200
|
+
* Set when the block reads the `toolResults` slot (a server with
|
|
201
|
+
* `toolResults: true`): the tool names it reads, or `"all"` when it uses
|
|
202
|
+
* the results whole. `toolData` passes the block only these. Derived from
|
|
203
|
+
* the source on every compile, never trusted for more than trimming.
|
|
204
|
+
*/
|
|
205
|
+
toolKeys?: ReadonlyArray<string> | "all";
|
|
196
206
|
/** 1 for the first block with this name in the conversation, then 2, 3… */
|
|
197
207
|
version: number;
|
|
198
208
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigs.design/protocol",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "The program format, the diagnostics, and the types and messages the server, the browser and the sandbox share. No runtime and no dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|