@raisindb/client 0.1.54 → 0.1.56

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.
Files changed (39) hide show
  1. package/dist/{chunk-WFBAWOVM.mjs → chunk-3A3ULBDO.mjs} +3 -3
  2. package/dist/{chunk-JRFBP4WK.mjs → chunk-4D45SBYO.mjs} +2 -2
  3. package/dist/{chunk-VZX3ACSO.mjs → chunk-BGU5L4PF.mjs} +3 -3
  4. package/dist/{chunk-OLJOZIIU.mjs → chunk-GRC5AZMU.mjs} +23 -4
  5. package/dist/chunk-GRC5AZMU.mjs.map +1 -0
  6. package/dist/{chunk-DJDP5CX6.mjs → chunk-T26GAHFZ.mjs} +2 -2
  7. package/dist/{conversation-list-store-CrmmmVKE.d.mts → conversation-list-store-ZtQuHSJ6.d.mts} +188 -4
  8. package/dist/{conversation-list-store-CrmmmVKE.d.ts → conversation-list-store-ZtQuHSJ6.d.ts} +188 -4
  9. package/dist/{index-DkVt51MH.d.mts → index-Dz2KIWoc.d.mts} +1 -1
  10. package/dist/{index-DcJiy1S6.d.ts → index-um2A-Myw.d.ts} +1 -1
  11. package/dist/index.d.mts +4 -4
  12. package/dist/index.d.ts +4 -4
  13. package/dist/index.js +142 -32
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +124 -34
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/react.d.mts +2 -2
  18. package/dist/react.d.ts +2 -2
  19. package/dist/react.js +22 -3
  20. package/dist/react.js.map +1 -1
  21. package/dist/react.mjs +3 -3
  22. package/dist/{svelte-sql-C0CmmhAL.d.ts → svelte-sql-CBExaUVi.d.ts} +1 -1
  23. package/dist/{svelte-sql-RNJfHu0B.d.mts → svelte-sql-i2ZwTvv2.d.mts} +1 -1
  24. package/dist/svelte.d.mts +2 -2
  25. package/dist/svelte.d.ts +2 -2
  26. package/dist/svelte.js +22 -3
  27. package/dist/svelte.js.map +1 -1
  28. package/dist/svelte.mjs +3 -3
  29. package/dist/vue.d.mts +2 -2
  30. package/dist/vue.d.ts +2 -2
  31. package/dist/vue.js +22 -3
  32. package/dist/vue.js.map +1 -1
  33. package/dist/vue.mjs +2 -2
  34. package/package.json +1 -1
  35. package/dist/chunk-OLJOZIIU.mjs.map +0 -1
  36. /package/dist/{chunk-WFBAWOVM.mjs.map → chunk-3A3ULBDO.mjs.map} +0 -0
  37. /package/dist/{chunk-JRFBP4WK.mjs.map → chunk-4D45SBYO.mjs.map} +0 -0
  38. /package/dist/{chunk-VZX3ACSO.mjs.map → chunk-BGU5L4PF.mjs.map} +0 -0
  39. /package/dist/{chunk-DJDP5CX6.mjs.map → chunk-T26GAHFZ.mjs.map} +0 -0
package/dist/react.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createRaisinReact
3
- } from "./chunk-WFBAWOVM.mjs";
4
- import "./chunk-DJDP5CX6.mjs";
5
- import "./chunk-OLJOZIIU.mjs";
3
+ } from "./chunk-3A3ULBDO.mjs";
4
+ import "./chunk-T26GAHFZ.mjs";
5
+ import "./chunk-GRC5AZMU.mjs";
6
6
  export {
7
7
  createRaisinReact
8
8
  };
@@ -1,4 +1,4 @@
1
- import { D as Database } from './conversation-list-store-CrmmmVKE.js';
1
+ import { D as Database } from './conversation-list-store-ZtQuHSJ6.js';
2
2
 
3
3
  interface SqlAdapterOptions {
4
4
  enabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { D as Database } from './conversation-list-store-CrmmmVKE.mjs';
1
+ import { D as Database } from './conversation-list-store-ZtQuHSJ6.mjs';
2
2
 
3
3
  interface SqlAdapterOptions {
4
4
  enabled?: boolean;
package/dist/svelte.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-CrmmmVKE.mjs';
2
- export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-RNJfHu0B.mjs';
1
+ import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-ZtQuHSJ6.mjs';
2
+ export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-i2ZwTvv2.mjs';
3
3
  import 'events';
4
4
  import 'fs/promises';
5
5
 
package/dist/svelte.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-CrmmmVKE.js';
2
- export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-C0CmmhAL.js';
1
+ import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-ZtQuHSJ6.js';
2
+ export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-CBExaUVi.js';
3
3
  import 'events';
4
4
  import 'fs/promises';
5
5
 
package/dist/svelte.js CHANGED
@@ -1415,6 +1415,15 @@ function parsePlanTasks(rawTasks) {
1415
1415
  };
1416
1416
  }).filter((task) => task !== null);
1417
1417
  }
1418
+ var TERMINAL_TASK_STATUSES = /* @__PURE__ */ new Set(["completed", "cancelled"]);
1419
+ var TERMINAL_PLAN_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
1420
+ function setPlanStatus(plan, nextStatus) {
1421
+ if (!nextStatus) return;
1422
+ if (TERMINAL_PLAN_STATUSES.has(plan.status) && !TERMINAL_PLAN_STATUSES.has(nextStatus)) {
1423
+ return;
1424
+ }
1425
+ plan.status = nextStatus;
1426
+ }
1418
1427
  function upsertTask(plan, nextTask) {
1419
1428
  const existingIndex = plan.tasks.findIndex(
1420
1429
  (task) => nextTask.taskId && task.taskId === nextTask.taskId || !nextTask.taskId && task.title === nextTask.title
@@ -1423,8 +1432,12 @@ function upsertTask(plan, nextTask) {
1423
1432
  plan.tasks.push(nextTask);
1424
1433
  return;
1425
1434
  }
1435
+ const existing = plan.tasks[existingIndex];
1436
+ if (TERMINAL_TASK_STATUSES.has(existing.status) && !TERMINAL_TASK_STATUSES.has(nextTask.status)) {
1437
+ return;
1438
+ }
1426
1439
  plan.tasks[existingIndex] = {
1427
- ...plan.tasks[existingIndex],
1440
+ ...existing,
1428
1441
  ...nextTask
1429
1442
  };
1430
1443
  }
@@ -1468,7 +1481,7 @@ function projectPlansFromMessages(messages) {
1468
1481
  plan.planPath = planPath ?? plan.planPath;
1469
1482
  plan.planId = planId ?? plan.planId;
1470
1483
  plan.title = asString(data.title) || plan.title;
1471
- plan.status = asString(data.status) || plan.status;
1484
+ setPlanStatus(plan, asString(data.status));
1472
1485
  plan.requiresApproval = Boolean(data.requires_approval) || plan.status === "pending_approval";
1473
1486
  plan.sourceMessagePath = message.path ?? plan.sourceMessagePath;
1474
1487
  const parsedTasks = parsePlanTasks(data.tasks);
@@ -1484,7 +1497,7 @@ function projectPlansFromMessages(messages) {
1484
1497
  const plan = ensurePlan(plans, key, "Plan", timestamp);
1485
1498
  plan.planPath = planPath ?? plan.planPath;
1486
1499
  plan.planId = planId ?? plan.planId;
1487
- plan.status = asString(data.plan_status) || plan.status;
1500
+ setPlanStatus(plan, asString(data.plan_status));
1488
1501
  plan.requiresApproval = plan.status === "pending_approval";
1489
1502
  const taskUpdate = {
1490
1503
  taskId: asString(data.task_id),
@@ -1511,6 +1524,12 @@ function projectPlansFromMessages(messages) {
1511
1524
  }
1512
1525
  }
1513
1526
  }
1527
+ for (const plan of plans.values()) {
1528
+ if (!TERMINAL_PLAN_STATUSES.has(plan.status) && plan.tasks.length > 0 && plan.tasks.every((task) => TERMINAL_TASK_STATUSES.has(task.status))) {
1529
+ plan.status = "completed";
1530
+ plan.requiresApproval = false;
1531
+ }
1532
+ }
1514
1533
  return [...plans.values()].sort((a, b) => {
1515
1534
  const aTime = Date.parse(a.updatedAt || "");
1516
1535
  const bTime = Date.parse(b.updatedAt || "");