@jigs.design/host 0.3.1 → 0.3.3

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.
@@ -83,6 +83,11 @@ export interface ActionDefinition<TInput extends z.ZodType | undefined = z.ZodTy
83
83
  * and replaces it there, so nothing refetches it.
84
84
  */
85
85
  export interface DataDefinition<TOutput extends z.ZodType = z.ZodType> {
86
+ /**
87
+ * What the prompt shows as `Data:` in place of the schema's type, for a
88
+ * slot whose shape is better said in words, such as one keyed by name.
89
+ */
90
+ dataText?: string;
86
91
  description: string;
87
92
  input: undefined;
88
93
  kind: "data";
@@ -164,6 +169,8 @@ export declare function action<TInput extends z.ZodType | undefined = undefined>
164
169
  * schema without changing a stored program.
165
170
  */
166
171
  export declare function data<TSchema extends z.ZodType>(definition: {
172
+ /** What the prompt shows as `Data:` instead of `schema`'s type. */
173
+ dataText?: string;
167
174
  description: string;
168
175
  schema: TSchema;
169
176
  }): DataDefinition<TSchema>;
@@ -68,12 +68,14 @@ function action(definition) {
68
68
  * schema without changing a stored program.
69
69
  */
70
70
  function data(definition) {
71
- return {
71
+ const slot = {
72
72
  description: definition.description,
73
73
  input: void 0,
74
74
  kind: "data",
75
75
  output: definition.schema
76
76
  };
77
+ if (definition.dataText !== void 0) slot.dataText = definition.dataText;
78
+ return slot;
77
79
  }
78
80
  //#endregion
79
81
  export { action, data, dataSchema, isCallPolicy, mutation, query };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jigs.design/host",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Define a host: the catalog a spec may draw, the procedures it may call, and the image hosts.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@jigs.design/protocol": "0.3.1"
28
+ "@jigs.design/protocol": "0.3.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "zod": "^4.0.0"