@23blocks/block-jarvis 5.0.0 → 5.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,309 @@
1
+ ## 5.1.0 (2026-03-05)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **@23blocks/block-jarvis:** add analytics service with 8 dashboard endpoints ([3738d58](https://github.com/23blocks-OS/frontend-sdk/commit/3738d58))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Claude Opus 4.6
10
+ - Juan Pelaez
11
+
12
+ ## 5.0.1 (2026-03-03)
13
+
14
+ ### 🧱 Updated Dependencies
15
+
16
+ - Updated @23blocks/jsonapi-codec to 3.3.2
17
+ - Updated @23blocks/contracts to 2.3.2
18
+
19
+ # 5.0.0 (2026-02-20)
20
+
21
+ ### 🚀 Features
22
+
23
+ - ⚠️ **@23blocks/block-jarvis:** add SSE streaming support with dedicated domain routing ([748482b](https://github.com/23blocks-OS/frontend-sdk/commit/748482b))
24
+
25
+ ### 🩹 Fixes
26
+
27
+ - ⚠️ replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
28
+ - resolve typecheck errors across all block packages ([6089324](https://github.com/23blocks-OS/frontend-sdk/commit/6089324))
29
+
30
+ ### ⚠️ Breaking Changes
31
+
32
+ - replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
33
+ Block config no longer accepts appId. Use apiKey instead.
34
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35
+ - **@23blocks/block-jarvis:** add SSE streaming support with dedicated domain routing ([748482b](https://github.com/23blocks-OS/frontend-sdk/commit/748482b))
36
+ entities.sendMessageStream() now returns
37
+ Promise<ReadableStream<string>> instead of Promise<unknown>
38
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39
+
40
+ ### 🧱 Updated Dependencies
41
+
42
+ - Updated @23blocks/jsonapi-codec to 3.3.1
43
+ - Updated @23blocks/contracts to 2.3.1
44
+
45
+ ### ❤️ Thank You
46
+
47
+ - Claude Opus 4.6
48
+ - Juan Pelaez
49
+
50
+ # 4.0.0 (2026-02-18)
51
+
52
+ ### 🚀 Features
53
+
54
+ - ⚠️ **@23blocks/block-jarvis:** rewrite all types, services, and mappers to match API strong params 1:1 ([de37ab1](https://github.com/23blocks-OS/frontend-sdk/commit/de37ab1))
55
+
56
+ ### ⚠️ Breaking Changes
57
+
58
+ - **@23blocks/block-jarvis:** rewrite all types, services, and mappers to match API strong params 1:1 ([de37ab1](https://github.com/23blocks-OS/frontend-sdk/commit/de37ab1))
59
+ Every type, mapper, and service in block-jarvis has been
60
+ rewritten to match the Rails API strong params exactly. This removes
61
+ fabricated fields (payload, IdentityCore, EntityStatus), adds missing
62
+ fields, fixes request body shapes, and adds 5 new services (tools,
63
+ agent-tools, agent-tool-assignments, conditions, step-transitions).
64
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65
+
66
+ ### ❤️ Thank You
67
+
68
+ - Claude Opus 4.6
69
+ - Juan Pelaez
70
+
71
+ ## 3.3.0 (2026-02-17)
72
+
73
+ ### 🚀 Features
74
+
75
+ - add health() method to all 18 blocks for service connectivity checks ([73514a3](https://github.com/23blocks-OS/frontend-sdk/commit/73514a3))
76
+
77
+ ### 🧱 Updated Dependencies
78
+
79
+ - Updated @23blocks/jsonapi-codec to 3.3.0
80
+ - Updated @23blocks/contracts to 2.3.0
81
+
82
+ ### ❤️ Thank You
83
+
84
+ - Claude Opus 4.6
85
+ - Juan Pelaez
86
+
87
+ ## 3.2.0 (2026-02-08)
88
+
89
+ ### 🚀 Features
90
+
91
+ - add comprehensive JSDoc documentation and llms.txt for AI agent consumption ([fd97df2](https://github.com/23blocks-OS/frontend-sdk/commit/fd97df2))
92
+
93
+ ### 🧱 Updated Dependencies
94
+
95
+ - Updated @23blocks/jsonapi-codec to 3.2.0
96
+ - Updated @23blocks/contracts to 2.2.0
97
+
98
+ ### ❤️ Thank You
99
+
100
+ - Claude Opus 4.6
101
+ - Juan Pelaez
102
+
103
+ ## 3.1.7 (2026-02-07)
104
+
105
+ ### 🧱 Updated Dependencies
106
+
107
+ - Updated @23blocks/jsonapi-codec to 3.1.3
108
+ - Updated @23blocks/contracts to 2.1.3
109
+
110
+ ## 3.1.6 (2026-02-06)
111
+
112
+ ### 🧱 Updated Dependencies
113
+
114
+ - Updated @23blocks/jsonapi-codec to 3.1.2
115
+ - Updated @23blocks/contracts to 2.1.2
116
+
117
+ ## 3.1.5 (2026-01-20)
118
+
119
+ ### 🩹 Fixes
120
+
121
+ - resolve TypeScript errors and add PostTemplate validation support ([250d284](https://github.com/23blocks-OS/frontend-sdk/commit/250d284))
122
+
123
+ ### 🧱 Updated Dependencies
124
+
125
+ - Updated @23blocks/jsonapi-codec to 3.1.1
126
+ - Updated @23blocks/contracts to 2.1.1
127
+
128
+ ### ❤️ Thank You
129
+
130
+ - Claude Opus 4.5
131
+ - Juan Pelaez
132
+
133
+ ## 3.1.4 (2026-01-18)
134
+
135
+ ### 🚀 Features
136
+
137
+ - **jarvis:** add nested placeholder support and pipe transforms for prompt rendering ([e1b1999](https://github.com/23blocks-OS/frontend-sdk/commit/e1b1999))
138
+
139
+ ### ❤️ Thank You
140
+
141
+ - Claude Opus 4.5
142
+ - Juan Pelaez
143
+
144
+ ## 3.1.3 (2026-01-16)
145
+
146
+ ### 🚀 Features
147
+
148
+ - **jarvis:** add prompt template system and render endpoint ([22fa1a4](https://github.com/23blocks-OS/frontend-sdk/commit/22fa1a4))
149
+
150
+ ### ❤️ Thank You
151
+
152
+ - Claude Opus 4.5
153
+ - Juan Pelaez
154
+
155
+ ## 3.1.2 (2026-01-16)
156
+
157
+ ### 🚀 Features
158
+
159
+ - **jarvis:** expand Prompt type with all API fields ([da90f89](https://github.com/23blocks-OS/frontend-sdk/commit/da90f89))
160
+
161
+ ### ❤️ Thank You
162
+
163
+ - Claude Opus 4.5
164
+ - Juan Pelaez
165
+
166
+ ## 3.1.1 (2026-01-16)
167
+
168
+ ### 🩹 Fixes
169
+
170
+ - **mappers:** remove dangerous uniqueId fallback to resource.id ([e96c555](https://github.com/23blocks-OS/frontend-sdk/commit/e96c555))
171
+
172
+ ### ❤️ Thank You
173
+
174
+ - Claude Opus 4.5
175
+ - Juan Pelaez
176
+
177
+ ## 3.1.0 (2026-01-01)
178
+
179
+ ### 🧱 Updated Dependencies
180
+
181
+ - Updated @23blocks/jsonapi-codec to 3.1.0
182
+ - Updated @23blocks/contracts to 2.1.0
183
+
184
+ ## 3.0.1 (2025-12-17)
185
+
186
+ ### 🧱 Updated Dependencies
187
+
188
+ - Updated @23blocks/jsonapi-codec to 3.0.1
189
+ - Updated @23blocks/contracts to 2.0.1
190
+
191
+ # 3.0.0 (2025-12-17)
192
+
193
+ ### 🧱 Updated Dependencies
194
+
195
+ - Updated @23blocks/jsonapi-codec to 3.0.0
196
+ - Updated @23blocks/contracts to 2.0.0
197
+
198
+ ## 2.1.0 (2025-12-15)
199
+
200
+ ### 🚀 Features
201
+
202
+ - add missing API services across 6 blocks ([cae5b8c](https://github.com/23blocks-OS/frontend-sdk/commit/cae5b8c))
203
+
204
+ ### ❤️ Thank You
205
+
206
+ - Claude Opus 4.5
207
+ - Juan Pelaez
208
+
209
+ # 2.0.0 (2025-12-15)
210
+
211
+ ### 🩹 Fixes
212
+
213
+ - ⚠️ wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
214
+
215
+ ### ⚠️ Breaking Changes
216
+
217
+ - wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
218
+ All service methods now correctly wrap request bodies
219
+ with Rails-expected parameter keys (e.g., `user:`, `contact:`, `order:`).
220
+ This fixes the critical issue where API requests were failing validation
221
+ because parameters were sent flat instead of wrapped.
222
+ Affected blocks:
223
+ - block-authentication: auth, users, guests, apps, subscriptions, api-keys, roles
224
+ - block-crm: contacts, accounts, leads, opportunities, meetings, quotes
225
+ - block-company: companies, departments, teams, team-members, quarters
226
+ - block-content: posts, comments, categories, tags
227
+ - block-products: products, cart, catalog
228
+ - block-sales: orders, order-details, payments, subscriptions
229
+ - block-conversations: messages, groups, draft-messages, notifications
230
+ - block-wallet: wallets, authorization-codes
231
+ - block-files: storage-files, entity-files, file-schemas
232
+ - block-forms: forms, form-schemas, form-sets, form-instances
233
+ - block-assets: assets, asset-events, asset-audits
234
+ - block-campaigns: campaigns, campaign-media, audiences, landing-pages
235
+ - block-geolocation: locations, addresses, areas, regions, routes, bookings, premises
236
+ - block-rewards: rewards, coupons, loyalty, badges
237
+ - block-onboarding: onboardings, flows, user-journeys, user-identities
238
+ - block-university: courses, lessons, enrollments, assignments, submissions
239
+ - block-jarvis: agents, prompts, workflows, conversations
240
+ Consumer API remains unchanged - this is an internal fix.
241
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
242
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
243
+
244
+ ### 🧱 Updated Dependencies
245
+
246
+ - Updated @23blocks/jsonapi-codec to 2.0.0
247
+
248
+ ### ❤️ Thank You
249
+
250
+ - Claude Opus 4.5
251
+ - Juan Pelaez
252
+
253
+ ## 1.0.4 (2025-12-14)
254
+
255
+ ### 🧱 Updated Dependencies
256
+
257
+ - Updated @23blocks/jsonapi-codec to 1.0.4
258
+ - Updated @23blocks/contracts to 1.0.4
259
+
260
+ ## 1.0.3 (2025-12-14)
261
+
262
+ ### 🧱 Updated Dependencies
263
+
264
+ - Updated @23blocks/jsonapi-codec to 1.0.3
265
+ - Updated @23blocks/contracts to 1.0.3
266
+
267
+ ## 1.0.2 (2025-12-14)
268
+
269
+ ### 🧱 Updated Dependencies
270
+
271
+ - Updated @23blocks/jsonapi-codec to 1.0.2
272
+ - Updated @23blocks/contracts to 1.0.2
273
+
274
+ ## 1.0.1 (2025-12-14)
275
+
276
+ ### 🧱 Updated Dependencies
277
+
278
+ - Updated @23blocks/jsonapi-codec to 1.0.1
279
+ - Updated @23blocks/contracts to 1.0.1
280
+
281
+ # 1.0.0 (2025-12-13)
282
+
283
+ ### 🧱 Updated Dependencies
284
+
285
+ - Updated @23blocks/jsonapi-codec to 1.0.0
286
+ - Updated @23blocks/contracts to 1.0.0
287
+
288
+ ## 0.2.1 (2025-12-13)
289
+
290
+ ### 🧱 Updated Dependencies
291
+
292
+ - Updated @23blocks/jsonapi-codec to 0.1.2
293
+ - Updated @23blocks/contracts to 0.1.2
294
+
295
+ ## 0.2.0 (2025-12-13)
296
+
297
+ ### 🚀 Features
298
+
299
+ - add all block packages with React and Angular bindings ([bbeecf7](https://github.com/23blocks-OS/frontend-sdk/commit/bbeecf7))
300
+
301
+ ### 🧱 Updated Dependencies
302
+
303
+ - Updated @23blocks/jsonapi-codec to 0.1.1
304
+ - Updated @23blocks/contracts to 0.1.1
305
+
306
+ ### ❤️ Thank You
307
+
308
+ - Claude Opus 4.5
309
+ - Juan Pelaez
package/dist/index.esm.js CHANGED
@@ -2308,6 +2308,79 @@ function createStepTransitionsService(transport, _config) {
2308
2308
  };
2309
2309
  }
2310
2310
 
2311
+ // ── Snake → camelCase helper ────────────────────────────────────────────────
2312
+ function camelCase(s) {
2313
+ return s.replace(/_([a-z])/g, (_, c)=>c.toUpperCase());
2314
+ }
2315
+ function mapKeys(obj) {
2316
+ if (Array.isArray(obj)) return obj.map(mapKeys);
2317
+ if (obj !== null && typeof obj === 'object') {
2318
+ const result = {};
2319
+ for (const [k, v] of Object.entries(obj)){
2320
+ result[camelCase(k)] = mapKeys(v);
2321
+ }
2322
+ return result;
2323
+ }
2324
+ return obj;
2325
+ }
2326
+ // ── Query param builders ────────────────────────────────────────────────────
2327
+ function dateParams(p) {
2328
+ return {
2329
+ start_date: p == null ? void 0 : p.startDate,
2330
+ end_date: p == null ? void 0 : p.endDate
2331
+ };
2332
+ }
2333
+ // ── Factory ─────────────────────────────────────────────────────────────────
2334
+ function createAnalyticsService(transport, _config) {
2335
+ async function singleton(path, params) {
2336
+ const response = await transport.get(path, {
2337
+ params
2338
+ });
2339
+ return mapKeys(response.data.attributes);
2340
+ }
2341
+ async function collection(path, params) {
2342
+ const response = await transport.get(path, {
2343
+ params
2344
+ });
2345
+ return response.data.map((item)=>mapKeys(item.attributes));
2346
+ }
2347
+ return {
2348
+ getOverview (params) {
2349
+ return singleton('/analytics/overview', dateParams(params));
2350
+ },
2351
+ getUsage (params) {
2352
+ return collection('/analytics/usage', _({}, dateParams(params), {
2353
+ granularity: params == null ? void 0 : params.granularity,
2354
+ model: params == null ? void 0 : params.model,
2355
+ agent: params == null ? void 0 : params.agent,
2356
+ prompt: params == null ? void 0 : params.prompt,
2357
+ trigger_type: params == null ? void 0 : params.triggerType
2358
+ }));
2359
+ },
2360
+ getCosts (params) {
2361
+ return collection('/analytics/costs', _({}, dateParams(params), {
2362
+ breakdown: params == null ? void 0 : params.breakdown,
2363
+ granularity: params == null ? void 0 : params.granularity
2364
+ }));
2365
+ },
2366
+ getFeedback (params) {
2367
+ return singleton('/analytics/feedback', dateParams(params));
2368
+ },
2369
+ getConversations (params) {
2370
+ return singleton('/analytics/conversations', dateParams(params));
2371
+ },
2372
+ getRag (params) {
2373
+ return singleton('/analytics/rag', dateParams(params));
2374
+ },
2375
+ getAgents (params) {
2376
+ return collection('/analytics/agents', dateParams(params));
2377
+ },
2378
+ async getTrace (requestId) {
2379
+ return singleton(`/analytics/trace/${requestId}`);
2380
+ }
2381
+ };
2382
+ }
2383
+
2311
2384
  function createJarvisBlock(transport, config) {
2312
2385
  return {
2313
2386
  agents: createAgentsService(transport),
@@ -2332,6 +2405,7 @@ function createJarvisBlock(transport, config) {
2332
2405
  agentToolAssignments: createAgentToolAssignmentsService(transport),
2333
2406
  conditions: createConditionsService(transport),
2334
2407
  stepTransitions: createStepTransitionsService(transport),
2408
+ analytics: createAnalyticsService(transport),
2335
2409
  health: ()=>transport.get('/health')
2336
2410
  };
2337
2411
  }
@@ -2348,4 +2422,4 @@ const jarvisBlockMetadata = {
2348
2422
  ]
2349
2423
  };
2350
2424
 
2351
- export { agentMapper, aiModelMapper, clusterMapper, conversationMapper, createAIModelsService, createAgentRuntimeService, createAgentsService, createClustersService, createConversationsService, createEntitiesService, createExecutionCommentsService, createExecutionsService, createJarvisBlock, createJarvisUsersService, createMailTemplatesService, createMarvinChatService, createPromptCommentsService, createPromptsService, createWorkflowInstancesService, createWorkflowParticipantsService, createWorkflowStepsService, createWorkflowsService, entityMapper, executionCommentMapper, executionMapper, jarvisBlockMetadata, jarvisUserMapper, mailTemplateMapper, promptCommentMapper, promptMapper, workflowInstanceMapper, workflowMapper, workflowParticipantMapper, workflowStepMapper };
2425
+ export { agentMapper, aiModelMapper, clusterMapper, conversationMapper, createAIModelsService, createAgentRuntimeService, createAgentsService, createAnalyticsService, createClustersService, createConversationsService, createEntitiesService, createExecutionCommentsService, createExecutionsService, createJarvisBlock, createJarvisUsersService, createMailTemplatesService, createMarvinChatService, createPromptCommentsService, createPromptsService, createWorkflowInstancesService, createWorkflowParticipantsService, createWorkflowStepsService, createWorkflowsService, entityMapper, executionCommentMapper, executionMapper, jarvisBlockMetadata, jarvisUserMapper, mailTemplateMapper, promptCommentMapper, promptMapper, workflowInstanceMapper, workflowMapper, workflowParticipantMapper, workflowStepMapper };
@@ -1,7 +1,7 @@
1
1
  export { createJarvisBlock, jarvisBlockMetadata } from './lib/jarvis.block.js';
2
2
  export type { JarvisBlock, JarvisBlockConfig } from './lib/jarvis.block.js';
3
- export type { Agent, CreateAgentRequest, UpdateAgentRequest, ListAgentsParams, Prompt, CreatePromptRequest, UpdatePromptRequest, ListPromptsParams, ExecutePromptRequest, ExecutePromptResponse, RenderPromptRequest, RenderPromptResponse, RenderPromptMeta, PlaceholderValue, Workflow, CreateWorkflowRequest, UpdateWorkflowRequest, ListWorkflowsParams, Execution, ListExecutionsParams, Conversation, ConversationMessage, CreateConversationRequest, SendMessageRequest, ListConversationsParams, AIModel, CreateAIModelRequest, UpdateAIModelRequest, ListAIModelsParams, Entity, RegisterEntityRequest, UpdateEntityRequest, ListEntitiesParams, Cluster, CreateClusterRequest, UpdateClusterRequest, ListClustersParams, JarvisUser, RegisterJarvisUserRequest, UpdateJarvisUserRequest, ListJarvisUsersParams, WorkflowParticipant, AddWorkflowParticipantRequest, UpdateWorkflowParticipantRequest, ListWorkflowParticipantsParams, WorkflowStep, AddWorkflowStepRequest, UpdateWorkflowStepRequest, AddStepPromptRequest, AddStepAgentRequest, WorkflowInstance, WorkflowStepLog, WorkflowInstanceDetails, WorkflowStepStatus, StartWorkflowRequest, StepWorkflowRequest, LogWorkflowStepRequest, AgentThread, AgentMessage, AgentMessageContent, AgentContext, CreateAgentThreadRequest, CreateAgentContextRequest, SendAgentMessageRequest, AgentRunExecution, ListAgentRunExecutionsParams, MailTemplate, CreateMailTemplateRequest, UpdateMailTemplateRequest, ListMailTemplatesParams, CreateMandrillTemplateRequest, UpdateMandrillTemplateRequest, MarvinContext, MarvinMessage, MarvinChatRequest, MarvinChatResponse, CreateMarvinContextRequest, SendMarvinMessageRequest, SendMarvinMessageResponse, PromptComment, CreatePromptCommentRequest, UpdatePromptCommentRequest, ListPromptCommentsParams, ReplyToCommentRequest, ExecutionComment, CreateExecutionCommentRequest, UpdateExecutionCommentRequest, ListExecutionCommentsParams, } from './lib/types/index.js';
4
- export type { AgentsService, PromptsService, WorkflowsService, ExecutionsService, ConversationsService, AIModelsService, EntitiesService, ClustersService, JarvisUsersService, WorkflowParticipantsService, WorkflowStepsService, WorkflowInstancesService, AgentRuntimeService, MailTemplatesService, MarvinChatService, PromptCommentsService, ExecutionCommentsService, } from './lib/services/index.js';
5
- export { createAgentsService, createPromptsService, createWorkflowsService, createExecutionsService, createConversationsService, createAIModelsService, createEntitiesService, createClustersService, createJarvisUsersService, createWorkflowParticipantsService, createWorkflowStepsService, createWorkflowInstancesService, createAgentRuntimeService, createMailTemplatesService, createMarvinChatService, createPromptCommentsService, createExecutionCommentsService, } from './lib/services/index.js';
3
+ export type { Agent, CreateAgentRequest, UpdateAgentRequest, ListAgentsParams, Prompt, CreatePromptRequest, UpdatePromptRequest, ListPromptsParams, ExecutePromptRequest, ExecutePromptResponse, RenderPromptRequest, RenderPromptResponse, RenderPromptMeta, PlaceholderValue, Workflow, CreateWorkflowRequest, UpdateWorkflowRequest, ListWorkflowsParams, Execution, ListExecutionsParams, Conversation, ConversationMessage, CreateConversationRequest, SendMessageRequest, ListConversationsParams, AIModel, CreateAIModelRequest, UpdateAIModelRequest, ListAIModelsParams, Entity, RegisterEntityRequest, UpdateEntityRequest, ListEntitiesParams, Cluster, CreateClusterRequest, UpdateClusterRequest, ListClustersParams, JarvisUser, RegisterJarvisUserRequest, UpdateJarvisUserRequest, ListJarvisUsersParams, WorkflowParticipant, AddWorkflowParticipantRequest, UpdateWorkflowParticipantRequest, ListWorkflowParticipantsParams, WorkflowStep, AddWorkflowStepRequest, UpdateWorkflowStepRequest, AddStepPromptRequest, AddStepAgentRequest, WorkflowInstance, WorkflowStepLog, WorkflowInstanceDetails, WorkflowStepStatus, StartWorkflowRequest, StepWorkflowRequest, LogWorkflowStepRequest, AgentThread, AgentMessage, AgentMessageContent, AgentContext, CreateAgentThreadRequest, CreateAgentContextRequest, SendAgentMessageRequest, AgentRunExecution, ListAgentRunExecutionsParams, MailTemplate, CreateMailTemplateRequest, UpdateMailTemplateRequest, ListMailTemplatesParams, CreateMandrillTemplateRequest, UpdateMandrillTemplateRequest, MarvinContext, MarvinMessage, MarvinChatRequest, MarvinChatResponse, CreateMarvinContextRequest, SendMarvinMessageRequest, SendMarvinMessageResponse, PromptComment, CreatePromptCommentRequest, UpdatePromptCommentRequest, ListPromptCommentsParams, ReplyToCommentRequest, ExecutionComment, CreateExecutionCommentRequest, UpdateExecutionCommentRequest, ListExecutionCommentsParams, AnalyticsDateRange, AnalyticsOverview, AnalyticsUsageParams, AnalyticsUsageItem, AnalyticsCostParams, AnalyticsCostItem, AnalyticsFeedback, AnalyticsConversations, AnalyticsRag, AnalyticsAgentItem, AnalyticsTrace, } from './lib/types/index.js';
4
+ export type { AgentsService, PromptsService, WorkflowsService, ExecutionsService, ConversationsService, AIModelsService, EntitiesService, ClustersService, JarvisUsersService, WorkflowParticipantsService, WorkflowStepsService, WorkflowInstancesService, AgentRuntimeService, MailTemplatesService, MarvinChatService, PromptCommentsService, ExecutionCommentsService, AnalyticsService, } from './lib/services/index.js';
5
+ export { createAgentsService, createPromptsService, createWorkflowsService, createExecutionsService, createConversationsService, createAIModelsService, createEntitiesService, createClustersService, createJarvisUsersService, createWorkflowParticipantsService, createWorkflowStepsService, createWorkflowInstancesService, createAgentRuntimeService, createMailTemplatesService, createMarvinChatService, createPromptCommentsService, createExecutionCommentsService, createAnalyticsService, } from './lib/services/index.js';
6
6
  export { agentMapper, promptMapper, workflowMapper, executionMapper, conversationMapper, aiModelMapper, entityMapper, clusterMapper, jarvisUserMapper, workflowParticipantMapper, workflowStepMapper, workflowInstanceMapper, mailTemplateMapper, promptCommentMapper, executionCommentMapper, } from './lib/mappers/index.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,YAAY,EAEV,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAEhB,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EAEnB,SAAS,EACT,oBAAoB,EAEpB,YAAY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CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,iCAAiC,EACjC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,YAAY,EAEV,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAEhB,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EAEnB,SAAS,EACT,oBAAoB,EAEpB,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EAEvB,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAElB,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAElB,OAAO,EACP,oBAAoB,EACp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B,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,iCAAiC,EACjC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Transport, BlockConfig, BlockMetadata, HealthCheckResponse } from '@23blocks/contracts';
2
- import { type AgentsService, type PromptsService, type WorkflowsService, type ExecutionsService, type ConversationsService, type AIModelsService, type EntitiesService, type ClustersService, type JarvisUsersService, type WorkflowParticipantsService, type WorkflowStepsService, type WorkflowInstancesService, type AgentRuntimeService, type MailTemplatesService, type MarvinChatService, type PromptCommentsService, type ExecutionCommentsService, type ToolsService, type AgentToolsService, type AgentToolAssignmentsService, type ConditionsService, type StepTransitionsService } from './services/index.js';
2
+ import { type AgentsService, type PromptsService, type WorkflowsService, type ExecutionsService, type ConversationsService, type AIModelsService, type EntitiesService, type ClustersService, type JarvisUsersService, type WorkflowParticipantsService, type WorkflowStepsService, type WorkflowInstancesService, type AgentRuntimeService, type MailTemplatesService, type MarvinChatService, type PromptCommentsService, type ExecutionCommentsService, type ToolsService, type AgentToolsService, type AgentToolAssignmentsService, type ConditionsService, type StepTransitionsService, type AnalyticsService } from './services/index.js';
3
3
  export interface JarvisBlockConfig extends BlockConfig {
4
4
  /**
5
5
  * Base URL for SSE streaming endpoints.
@@ -32,6 +32,7 @@ export interface JarvisBlock {
32
32
  agentToolAssignments: AgentToolAssignmentsService;
33
33
  conditions: ConditionsService;
34
34
  stepTransitions: StepTransitionsService;
35
+ analytics: AnalyticsService;
35
36
  health(): Promise<HealthCheckResponse>;
36
37
  }
37
38
  export declare function createJarvisBlock(transport: Transport, config: JarvisBlockConfig): JarvisBlock;
@@ -1 +1 @@
1
- {"version":3,"file":"jarvis.block.d.ts","sourceRoot":"","sources":["../../../src/lib/jarvis.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAuBL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IA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0 +1,14 @@
1
+ import type { Transport, BlockConfig } from '@23blocks/contracts';
2
+ import type { AnalyticsDateRange, AnalyticsOverview, AnalyticsUsageParams, AnalyticsUsageItem, AnalyticsCostParams, AnalyticsCostItem, AnalyticsFeedback, AnalyticsConversations, AnalyticsRag, AnalyticsAgentItem, AnalyticsTrace } from '../types/analytics.js';
3
+ export interface AnalyticsService {
4
+ getOverview(params?: AnalyticsDateRange): Promise<AnalyticsOverview>;
5
+ getUsage(params?: AnalyticsUsageParams): Promise<AnalyticsUsageItem[]>;
6
+ getCosts(params?: AnalyticsCostParams): Promise<AnalyticsCostItem[]>;
7
+ getFeedback(params?: AnalyticsDateRange): Promise<AnalyticsFeedback>;
8
+ getConversations(params?: AnalyticsDateRange): Promise<AnalyticsConversations>;
9
+ getRag(params?: AnalyticsDateRange): Promise<AnalyticsRag>;
10
+ getAgents(params?: AnalyticsDateRange): Promise<AnalyticsAgentItem[]>;
11
+ getTrace(requestId: string): Promise<AnalyticsTrace>;
12
+ }
13
+ export declare function createAnalyticsService(transport: Transport, _config: BlockConfig): AnalyticsService;
14
+ //# sourceMappingURL=analytics.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/analytics.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAyC/B,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACvE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACrE,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrE,gBAAgB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/E,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3D,SAAS,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACtE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACtD;AAID,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,WAAW,GACnB,gBAAgB,CAwDlB"}
@@ -20,4 +20,5 @@ export * from './agent-tools.service.js';
20
20
  export * from './agent-tool-assignments.service.js';
21
21
  export * from './conditions.service.js';
22
22
  export * from './step-transitions.service.js';
23
+ export * from './analytics.service.js';
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,153 @@
1
+ export interface AnalyticsDateRange {
2
+ startDate?: string;
3
+ endDate?: string;
4
+ }
5
+ export interface AnalyticsOverview {
6
+ totalExecutions: number;
7
+ totalCost: number;
8
+ avgLatencyMs: number;
9
+ errorCount: number;
10
+ errorRate: number;
11
+ feedback: {
12
+ likes: number;
13
+ dislikes: number;
14
+ comments: number;
15
+ };
16
+ activeAgents: number;
17
+ activePrompts: number;
18
+ }
19
+ export interface AnalyticsUsageParams extends AnalyticsDateRange {
20
+ granularity?: 'hour' | 'day' | 'week' | 'month';
21
+ model?: string;
22
+ agent?: string;
23
+ prompt?: string;
24
+ triggerType?: string;
25
+ }
26
+ export interface AnalyticsUsageItem {
27
+ period: string;
28
+ requestCount: number;
29
+ totalCost: number;
30
+ avgLatencyMs: number;
31
+ }
32
+ export interface AnalyticsCostParams extends AnalyticsDateRange {
33
+ breakdown?: 'model' | 'agent' | 'prompt' | 'time';
34
+ granularity?: 'hour' | 'day' | 'week' | 'month';
35
+ }
36
+ export interface AnalyticsCostItem {
37
+ model?: string;
38
+ agentUniqueId?: string;
39
+ agentName?: string | null;
40
+ promptUniqueId?: string;
41
+ promptName?: string | null;
42
+ period?: string;
43
+ inputCost?: number;
44
+ outputCost?: number;
45
+ executionCount?: number;
46
+ totalCost: number;
47
+ }
48
+ export interface AnalyticsFeedback {
49
+ totalLikes: number;
50
+ totalDislikes: number;
51
+ totalComments: number;
52
+ satisfactionRate: number;
53
+ byPrompt: Array<{
54
+ promptUniqueId: string;
55
+ promptName: string | null;
56
+ likes: number;
57
+ dislikes: number;
58
+ comments: number;
59
+ }>;
60
+ dailyTrend: Array<{
61
+ period: string;
62
+ likes: number;
63
+ }>;
64
+ }
65
+ export interface AnalyticsConversations {
66
+ totalConversations: number;
67
+ avgMessagesPerConversation: number;
68
+ maxMessages: number;
69
+ minMessages: number;
70
+ distribution: Array<{
71
+ messages: number;
72
+ conversations: number;
73
+ }>;
74
+ }
75
+ export interface AnalyticsRag {
76
+ totalQueries: number;
77
+ successfulQueries: number;
78
+ errorCount: number;
79
+ errorRate: number;
80
+ latency: {
81
+ avgTotalMs: number;
82
+ avgEmbeddingMs: number;
83
+ avgSearchMs: number;
84
+ avgRerankingMs: number;
85
+ };
86
+ relevance: {
87
+ avgTopScore: number;
88
+ avgAvgScore: number;
89
+ avgResultsReturned: number;
90
+ };
91
+ errorBreakdown: Array<{
92
+ errorType: string;
93
+ count: number;
94
+ }>;
95
+ }
96
+ export interface AnalyticsAgentItem {
97
+ agentUniqueId: string;
98
+ agentName: string | null;
99
+ executionCount: number;
100
+ totalCost: number;
101
+ avgLatencyMs: number;
102
+ errorCount: number;
103
+ successRate: number;
104
+ likes: number;
105
+ dislikes: number;
106
+ }
107
+ export interface AnalyticsTrace {
108
+ promptExecution: {
109
+ uniqueId: string;
110
+ promptUniqueId: string;
111
+ promptVersionUniqueId: string;
112
+ model: string;
113
+ status: string;
114
+ executionTime: number;
115
+ inputTokenCost: number;
116
+ outputTokenCost: number;
117
+ totalTokenCost: number;
118
+ triggerType: string;
119
+ triggerUniqueId: string;
120
+ threadId: string | null;
121
+ startedAt: string | null;
122
+ completedAt: string | null;
123
+ createdAt: string;
124
+ };
125
+ runExecution: {
126
+ uniqueId: string;
127
+ model: string;
128
+ status: string;
129
+ executionTime: number;
130
+ totalTokenCost: number;
131
+ threadId: string | null;
132
+ createdAt: string;
133
+ } | null;
134
+ ragQueries: Array<{
135
+ id: number;
136
+ queryText: string;
137
+ totalMs: number;
138
+ resultsReturned: number;
139
+ topScore: number | null;
140
+ errorType: string | null;
141
+ createdAt: string;
142
+ }>;
143
+ feedback: {
144
+ likes: number;
145
+ dislikes: number;
146
+ comments: Array<{
147
+ uniqueId: string;
148
+ content: string;
149
+ createdAt: string;
150
+ }>;
151
+ };
152
+ }
153
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/analytics.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,C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;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,KAAK,CAAC;YACd,QAAQ,EAAE,MAAM,CAAC;YACjB,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC;CACH"}
@@ -19,4 +19,5 @@ export * from './agent-tool.js';
19
19
  export * from './agent-tool-assignment.js';
20
20
  export * from './condition.js';
21
21
  export * from './step-transition.js';
22
+ export * from './analytics.js';
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@23blocks/block-jarvis",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Jarvis AI block for 23blocks SDK - agents, prompts, workflows, executions, conversations",
5
5
  "license": "MIT",
6
6
  "author": "23blocks <hello@23blocks.com>",
@@ -38,6 +38,8 @@
38
38
  },
39
39
  "files": [
40
40
  "dist",
41
+ "CHANGELOG.md",
42
+ "README.md",
41
43
  "!**/*.tsbuildinfo"
42
44
  ],
43
45
  "nx": {