@agentica/chat 0.16.4 → 0.16.7

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.
@@ -0,0 +1,477 @@
1
+ import{j as m,o as v,r as f,T as b}from"../client-B3aq8qpT.js";import{v as I,A as B,d as T,_ as y,V as g,c as C,F as A,T as j,B as w}from"../VendorConfigurationMovie-BmSWtiom.js";import{a as u,_ as p}from"../_isFormatUri-YqTfGpHo.js";import{D as x}from"../Divider-DX1xhf0M.js";class R{constructor(){this.articles=[]}index(){return this.articles}create(c){const d={id:I(),title:c.input.title,body:c.input.body,thumbnail:c.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(d),d}update(c){const d=this.articles.find(s=>s.id===c.id);if(d===void 0)throw new Error("Unable to find the matched article.");c.input.title!==void 0&&(d.title=c.input.title),c.input.body!==void 0&&(d.body=c.input.body),c.input.thumbnail!==void 0&&(d.thumbnail=c.input.thumbnail),d.updated_at=new Date().toISOString()}erase(c){const d=this.articles.findIndex(s=>s.id===c.id);if(d===-1)throw new Error("Unable to find the matched article.");this.articles.splice(d,1)}}const U={chatgpt:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{description:"",type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
2
+
3
+ > Article entity.
4
+ >
5
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
6
+
7
+
8
+ @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.
9
+
10
+
11
+ @format date-time`,type:"string"},updated_at:{title:"Last updated time of the article",description:`Last updated time of the article.
12
+
13
+
14
+ @format date-time`,type:"string"},title:{title:"Title of the article",description:`Title of the article.
15
+
16
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
17
+
18
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
19
+
20
+ Thumbnail image URI which can represent the article.
21
+
22
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
23
+ @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
24
+
25
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
26
+
27
+ ------------------------------
28
+
29
+ Description of the current {@link IBbsArticle.ICreate} type:
30
+
31
+ > Information of the article to create.
32
+
33
+ ------------------------------
34
+
35
+ Description of the parent {@link IBbsArticle} type:
36
+
37
+ > Article entity.
38
+ >
39
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
40
+
41
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
42
+
43
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
44
+
45
+ Thumbnail image URI which can represent the article.
46
+
47
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
48
+ @contentMediaType image/*`}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
49
+
50
+ > Article entity.
51
+ >
52
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
53
+
54
+
55
+ @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.
56
+
57
+
58
+ @format date-time`,type:"string"},updated_at:{title:"Last updated time of the article",description:`Last updated time of the article.
59
+
60
+
61
+ @format date-time`,type:"string"},title:{title:"Title of the article",description:`Title of the article.
62
+
63
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
64
+
65
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
66
+
67
+ Thumbnail image URI which can represent the article.
68
+
69
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
70
+ @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
71
+
72
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
73
+
74
+
75
+ @format uuid`,type:"string"},input:{description:`New content to update.
76
+
77
+ ------------------------------
78
+
79
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
80
+
81
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
82
+
83
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
84
+
85
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
86
+
87
+ Thumbnail image URI which can represent the article.
88
+
89
+ If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
90
+ @contentMediaType image/*`}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
91
+
92
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
93
+
94
+
95
+ @format uuid`,type:"string"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
96
+
97
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},claude:{model:"claude",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
98
+
99
+ > Article entity.
100
+ >
101
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
102
+
103
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
104
+
105
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
106
+
107
+ Thumbnail image URI which can represent the article.
108
+
109
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
110
+
111
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
112
+
113
+ ------------------------------
114
+
115
+ Description of the current {@link IBbsArticle.ICreate} type:
116
+
117
+ > Information of the article to create.
118
+
119
+ ------------------------------
120
+
121
+ Description of the parent {@link IBbsArticle} type:
122
+
123
+ > Article entity.
124
+ >
125
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
126
+
127
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
128
+
129
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
130
+
131
+ Thumbnail image URI which can represent the article.
132
+
133
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
134
+
135
+ > Article entity.
136
+ >
137
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
138
+
139
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
140
+
141
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
142
+
143
+ Thumbnail image URI which can represent the article.
144
+
145
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
146
+
147
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
148
+
149
+ ------------------------------
150
+
151
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
152
+
153
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
154
+
155
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
156
+
157
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
158
+
159
+ Thumbnail image URI which can represent the article.
160
+
161
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
162
+
163
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
164
+
165
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},gemini:{model:"gemini",options:{recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",description:`Primary Key.
166
+
167
+
168
+ @format uuid`},created_at:{type:"string",description:`Creation time of the article.
169
+
170
+
171
+ @format date-time`},updated_at:{type:"string",description:`Last updated time of the article.
172
+
173
+
174
+ @format date-time`},title:{type:"string",description:`Title of the article.
175
+
176
+ Representative title of the article.`},body:{type:"string",description:`Content body.
177
+
178
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",nullable:!0,description:`Thumbnail image URI.
179
+
180
+ Thumbnail image URI which can represent the article.
181
+
182
+ If configured as \`null\`, it means that no thumbnail image in the article.
183
+
184
+
185
+ @format uri
186
+ @contentMediaType image/*`}},required:["id","created_at","updated_at","title","body","thumbnail"],description:`Description of the current {@link IBbsArticle} type:
187
+
188
+ > Article entity.
189
+ >
190
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`},description:"List of every articles"},description:`Get all articles.
191
+
192
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",description:`Title of the article.
193
+
194
+ Representative title of the article.`},body:{type:"string",description:`Content body.
195
+
196
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",nullable:!0,description:`Thumbnail image URI.
197
+
198
+ Thumbnail image URI which can represent the article.
199
+
200
+ If configured as \`null\`, it means that no thumbnail image in the article.
201
+
202
+
203
+ @format uri
204
+ @contentMediaType image/*`}},required:["title","body","thumbnail"],description:`Information of the article to create
205
+
206
+ ------------------------------
207
+
208
+ Description of the current {@link IBbsArticle.ICreate} type:
209
+
210
+ > Information of the article to create.
211
+
212
+ ------------------------------
213
+
214
+ Description of the parent {@link IBbsArticle} type:
215
+
216
+ > Article entity.
217
+ >
218
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`}},required:["input"],description:" Properties of create function"},output:{type:"object",properties:{id:{type:"string",description:`Primary Key.
219
+
220
+
221
+ @format uuid`},created_at:{type:"string",description:`Creation time of the article.
222
+
223
+
224
+ @format date-time`},updated_at:{type:"string",description:`Last updated time of the article.
225
+
226
+
227
+ @format date-time`},title:{type:"string",description:`Title of the article.
228
+
229
+ Representative title of the article.`},body:{type:"string",description:`Content body.
230
+
231
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",nullable:!0,description:`Thumbnail image URI.
232
+
233
+ Thumbnail image URI which can represent the article.
234
+
235
+ If configured as \`null\`, it means that no thumbnail image in the article.
236
+
237
+
238
+ @format uri
239
+ @contentMediaType image/*`}},required:["id","created_at","updated_at","title","body","thumbnail"],description:`Description of the current {@link IBbsArticle} type:
240
+
241
+ > Article entity.
242
+ >
243
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`},description:`Create a new article.
244
+
245
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
246
+
247
+
248
+ @format uuid`},input:{type:"object",properties:{title:{type:"string",description:`Title of the article.
249
+
250
+ Representative title of the article.`},body:{type:"string",description:`Content body.
251
+
252
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",nullable:!0,description:`Thumbnail image URI.
253
+
254
+ Thumbnail image URI which can represent the article.
255
+
256
+ If configured as \`null\`, it means that no thumbnail image in the article.
257
+
258
+
259
+ @format uri
260
+ @contentMediaType image/*`}},required:[],description:`New content to update.
261
+
262
+ ------------------------------
263
+
264
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
265
+
266
+ > Make all properties in T optional`}},required:["id","input"],description:" Properties of update function"},description:`Update an article.
267
+
268
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
269
+
270
+
271
+ @format uuid`}},required:["id"],description:" Properties of erase function"},description:`Erase an article.
272
+
273
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},llama:{model:"llama",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
274
+
275
+ > Article entity.
276
+ >
277
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
278
+
279
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
280
+
281
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
282
+
283
+ Thumbnail image URI which can represent the article.
284
+
285
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
286
+
287
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
288
+
289
+ ------------------------------
290
+
291
+ Description of the current {@link IBbsArticle.ICreate} type:
292
+
293
+ > Information of the article to create.
294
+
295
+ ------------------------------
296
+
297
+ Description of the parent {@link IBbsArticle} type:
298
+
299
+ > Article entity.
300
+ >
301
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
302
+
303
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
304
+
305
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
306
+
307
+ Thumbnail image URI which can represent the article.
308
+
309
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
310
+
311
+ > Article entity.
312
+ >
313
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
314
+
315
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
316
+
317
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
318
+
319
+ Thumbnail image URI which can represent the article.
320
+
321
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
322
+
323
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
324
+
325
+ ------------------------------
326
+
327
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
328
+
329
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
330
+
331
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
332
+
333
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
334
+
335
+ Thumbnail image URI which can represent the article.
336
+
337
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
338
+
339
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
340
+
341
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.0":{model:"3.0",options:{constraint:!0,recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Primary Key",description:"Primary Key."},created_at:{type:"string",format:"date-time",title:"Creation time of the article",description:"Creation time of the article."},updated_at:{type:"string",format:"date-time",title:"Last updated time of the article",description:"Last updated time of the article."},title:{type:"string",title:"Title of the article",description:`Title of the article.
342
+
343
+ Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
344
+
345
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",format:"uri",contentMediaType:"image/*",nullable:!0,title:"Thumbnail image URI",description:`Thumbnail image URI.
346
+
347
+ Thumbnail image URI which can represent the article.
348
+
349
+ If configured as \`null\`, it means that no thumbnail image in the article.`}},required:["id","created_at","updated_at","title","body","thumbnail"],description:`Description of the current {@link IBbsArticle} type:
350
+
351
+ > Article entity.
352
+ >
353
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,additionalProperties:!1},description:"List of every articles"},description:`Get all articles.
354
+
355
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
356
+
357
+ Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
358
+
359
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",format:"uri",contentMediaType:"image/*",nullable:!0,title:"Thumbnail image URI",description:`Thumbnail image URI.
360
+
361
+ Thumbnail image URI which can represent the article.
362
+
363
+ If configured as \`null\`, it means that no thumbnail image in the article.`}},required:["title","body","thumbnail"],description:`Information of the article to create
364
+
365
+ ------------------------------
366
+
367
+ Description of the current {@link IBbsArticle.ICreate} type:
368
+
369
+ > Information of the article to create.
370
+
371
+ ------------------------------
372
+
373
+ Description of the parent {@link IBbsArticle} type:
374
+
375
+ > Article entity.
376
+ >
377
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,additionalProperties:!1}},required:["input"],description:" Properties of create function",additionalProperties:!1},output:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Primary Key",description:"Primary Key."},created_at:{type:"string",format:"date-time",title:"Creation time of the article",description:"Creation time of the article."},updated_at:{type:"string",format:"date-time",title:"Last updated time of the article",description:"Last updated time of the article."},title:{type:"string",title:"Title of the article",description:`Title of the article.
378
+
379
+ Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
380
+
381
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",format:"uri",contentMediaType:"image/*",nullable:!0,title:"Thumbnail image URI",description:`Thumbnail image URI.
382
+
383
+ Thumbnail image URI which can represent the article.
384
+
385
+ If configured as \`null\`, it means that no thumbnail image in the article.`}},required:["id","created_at","updated_at","title","body","thumbnail"],description:`Description of the current {@link IBbsArticle} type:
386
+
387
+ > Article entity.
388
+ >
389
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,additionalProperties:!1},description:`Create a new article.
390
+
391
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."},input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
392
+
393
+ Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
394
+
395
+ Content body of the article writtn in the markdown format.`},thumbnail:{type:"string",format:"uri",contentMediaType:"image/*",nullable:!0,title:"Thumbnail image URI",description:`Thumbnail image URI.
396
+
397
+ Thumbnail image URI which can represent the article.
398
+
399
+ If configured as \`null\`, it means that no thumbnail image in the article.`}},required:[],description:`New content to update.
400
+
401
+ ------------------------------
402
+
403
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
404
+
405
+ > Make all properties in T optional`,additionalProperties:!1}},required:["id","input"],description:" Properties of update function",additionalProperties:!1},description:`Update an article.
406
+
407
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."}},required:["id"],description:" Properties of erase function",additionalProperties:!1},description:`Erase an article.
408
+
409
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.1":{model:"3.1",options:{constraint:!0,reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
410
+
411
+ > Article entity.
412
+ >
413
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
414
+
415
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
416
+
417
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
418
+
419
+ Thumbnail image URI which can represent the article.
420
+
421
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
422
+
423
+ List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
424
+
425
+ ------------------------------
426
+
427
+ Description of the current {@link IBbsArticle.ICreate} type:
428
+
429
+ > Information of the article to create.
430
+
431
+ ------------------------------
432
+
433
+ Description of the parent {@link IBbsArticle} type:
434
+
435
+ > Article entity.
436
+ >
437
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
438
+
439
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
440
+
441
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
442
+
443
+ Thumbnail image URI which can represent the article.
444
+
445
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
446
+
447
+ > Article entity.
448
+ >
449
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
450
+
451
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
452
+
453
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
454
+
455
+ Thumbnail image URI which can represent the article.
456
+
457
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
458
+
459
+ Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
460
+
461
+ ------------------------------
462
+
463
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
464
+
465
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
466
+
467
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
468
+
469
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
470
+
471
+ Thumbnail image URI which can represent the article.
472
+
473
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
474
+
475
+ Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
476
+
477
+ Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]}};function k(o){const c=new R,d=new B({model:"chatgpt",vendor:{api:o.api,model:o.vendorModel},controllers:[{protocol:"class",name:"bbs",application:U[o.schemaModel],execute:c}],config:{locale:o.locale,timezone:o.timezone,executor:{initialize:null}}});return m.jsx(T,{agent:d})}function P(){const[o,c]=f.useState(g.defaultConfig()),[d,s]=f.useState(window.navigator.language),[l,n]=f.useState(!1);return m.jsx("div",{style:{width:"100%",height:"100%",overflow:l===!0?void 0:"auto"},children:l===!0?m.jsx(k,{api:new C({apiKey:o.apiKey,baseURL:o.baseURL,dangerouslyAllowBrowser:!0}),vendorModel:o.vendorModel,schemaModel:o.schemaModel,locale:d}):m.jsxs(A,{style:{width:"calc(100% - 60px)",padding:15,margin:15},children:[m.jsx(b,{variant:"h6",children:"BBS AI Chatbot"}),m.jsx("br",{}),m.jsx(x,{}),m.jsx("br",{}),"Demonstration of Agentica with TypeScript Controller Class.",m.jsx("br",{}),m.jsx("br",{}),m.jsx(b,{variant:"h6",children:" OpenAI Configuration "}),m.jsx("br",{}),m.jsx(g,{config:o,onChange:c}),m.jsx("br",{}),m.jsx(b,{variant:"h6",children:" Membership Information "}),m.jsx("br",{}),m.jsx(j,{onChange:r=>s(r.target.value),defaultValue:d,label:"Locale",variant:"outlined",error:d.length===0}),m.jsx("br",{}),m.jsx("br",{}),m.jsx(w,{component:"a",fullWidth:!0,variant:"contained",color:"info",size:"large",disabled:o.apiKey.length===0||o.vendorModel.length===0||o.schemaModel.length===0||d.length===0,onClick:()=>n(!0),children:"Start AI Chatbot"})]})})}v(window.document.getElementById("root")).render(m.jsx(P,{}));