@pushwoosh/rpc-gateway-ai-assistant 0.1.142 → 0.1.143
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/data.js +4 -12
- package/package.json +1 -1
- package/pushwoosh_aigen_v1.d.ts +17 -6
package/data.js
CHANGED
|
@@ -704,24 +704,16 @@ export const data = {
|
|
|
704
704
|
"generateImages": {
|
|
705
705
|
"type": "boolean"
|
|
706
706
|
},
|
|
707
|
-
"settings": {
|
|
708
|
-
"type": "pushwoosh.aibuilder.v1.DocumentSettings",
|
|
709
|
-
"optional": true
|
|
710
|
-
},
|
|
711
|
-
"textVariants": {
|
|
712
|
-
"type": "pushwoosh.aibuilder.v1.TextVariantStyle",
|
|
713
|
-
"mapKeyType": "string"
|
|
714
|
-
},
|
|
715
|
-
"colorScheme": {
|
|
716
|
-
"type": "pushwoosh.aibuilder.v1.ColorSchemeItem",
|
|
717
|
-
"mapKeyType": "string"
|
|
718
|
-
},
|
|
719
707
|
"addBlock": {
|
|
720
708
|
"type": "pushwoosh.aigen.v1.AiGenAddBlock",
|
|
721
709
|
"optional": true
|
|
722
710
|
},
|
|
723
711
|
"mode": {
|
|
724
712
|
"type": "pushwoosh.aigen.v1.AiGenMode"
|
|
713
|
+
},
|
|
714
|
+
"template": {
|
|
715
|
+
"type": "pushwoosh.aibuilder.v1.AiBuilderDocument",
|
|
716
|
+
"optional": true
|
|
725
717
|
}
|
|
726
718
|
}
|
|
727
719
|
},
|
package/package.json
CHANGED
package/pushwoosh_aigen_v1.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { AiBuilderBlock as pushwoosh_aibuilder_v1_AiBuilderBlock } from './pushw
|
|
|
6
6
|
/**
|
|
7
7
|
* AiGenService unifies document create / edit / per-block regeneration and
|
|
8
8
|
* targeted block insertion into a single streaming RPC. Dispatch rules:
|
|
9
|
-
* - document empty
|
|
9
|
+
* - document empty (template required) → create a new document from the template
|
|
10
10
|
* - document set → edit existing document (diff planner)
|
|
11
11
|
* - document set + block_path → regenerate only that block; planner
|
|
12
12
|
* skipped, structure_diff NOT emitted
|
|
@@ -78,7 +78,12 @@ export type AiGenBlockPath = {
|
|
|
78
78
|
};
|
|
79
79
|
export type AiGenRequest = {
|
|
80
80
|
prompt: string;
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Edit mode: the existing document to mutate. Empty on create — use
|
|
83
|
+
* `template` instead. Mutually exclusive with `template`. On edit the
|
|
84
|
+
* document's styling (settings, text_variants, color_scheme) is read
|
|
85
|
+
* from here.
|
|
86
|
+
*/
|
|
82
87
|
document?: pushwoosh_aibuilder_v1_AiBuilderDocument;
|
|
83
88
|
/**
|
|
84
89
|
* Bypass mode: path `[page_id, block_id]` of the block to regenerate.
|
|
@@ -88,10 +93,6 @@ export type AiGenRequest = {
|
|
|
88
93
|
blockPath: string[];
|
|
89
94
|
application: string;
|
|
90
95
|
generateImages: boolean;
|
|
91
|
-
/** Used on create; in edit taken from document. */
|
|
92
|
-
settings?: pushwoosh_aibuilder_v1_DocumentSettings;
|
|
93
|
-
textVariants: Record<string, pushwoosh_aibuilder_v1_TextVariantStyle>;
|
|
94
|
-
colorScheme: Record<string, pushwoosh_aibuilder_v1_ColorSchemeItem>;
|
|
95
96
|
/**
|
|
96
97
|
* Set → add-block mode: insert a single new block into `document` at a
|
|
97
98
|
* client-specified position, skipping the planner. Mutually exclusive
|
|
@@ -103,6 +104,16 @@ export type AiGenRequest = {
|
|
|
103
104
|
* rejects UNSPECIFIED with InvalidArgument.
|
|
104
105
|
*/
|
|
105
106
|
mode: AiGenMode;
|
|
107
|
+
/**
|
|
108
|
+
* Create mode: the prototype document the new document is generated
|
|
109
|
+
* from. Required when `document` is empty; mutually exclusive with
|
|
110
|
+
* `document`. The generator preserves the template's styling (settings,
|
|
111
|
+
* text_variants, color_scheme are read from here on create) and
|
|
112
|
+
* imitates the layout / tone of its blocks while writing fresh content
|
|
113
|
+
* for the user's prompt. A template with no blocks degenerates to a
|
|
114
|
+
* free create (styling only, no structural reference).
|
|
115
|
+
*/
|
|
116
|
+
template?: pushwoosh_aibuilder_v1_AiBuilderDocument;
|
|
106
117
|
};
|
|
107
118
|
/**
|
|
108
119
|
* AiGenAddBlock triggers add-block mode on Generate. The server emits a
|