@raisindb/client 0.1.55 → 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.
- package/dist/{chunk-WFBAWOVM.mjs → chunk-3A3ULBDO.mjs} +3 -3
- package/dist/{chunk-JRFBP4WK.mjs → chunk-4D45SBYO.mjs} +2 -2
- package/dist/{chunk-VZX3ACSO.mjs → chunk-BGU5L4PF.mjs} +3 -3
- package/dist/{chunk-OLJOZIIU.mjs → chunk-GRC5AZMU.mjs} +23 -4
- package/dist/chunk-GRC5AZMU.mjs.map +1 -0
- package/dist/{chunk-DJDP5CX6.mjs → chunk-T26GAHFZ.mjs} +2 -2
- package/dist/{conversation-list-store-CrmmmVKE.d.mts → conversation-list-store-ZtQuHSJ6.d.mts} +188 -4
- package/dist/{conversation-list-store-CrmmmVKE.d.ts → conversation-list-store-ZtQuHSJ6.d.ts} +188 -4
- package/dist/{index-DkVt51MH.d.mts → index-Dz2KIWoc.d.mts} +1 -1
- package/dist/{index-DcJiy1S6.d.ts → index-um2A-Myw.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +142 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -34
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +22 -3
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +3 -3
- package/dist/{svelte-sql-C0CmmhAL.d.ts → svelte-sql-CBExaUVi.d.ts} +1 -1
- package/dist/{svelte-sql-RNJfHu0B.d.mts → svelte-sql-i2ZwTvv2.d.mts} +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +22 -3
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +3 -3
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +22 -3
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-OLJOZIIU.mjs.map +0 -1
- /package/dist/{chunk-WFBAWOVM.mjs.map → chunk-3A3ULBDO.mjs.map} +0 -0
- /package/dist/{chunk-JRFBP4WK.mjs.map → chunk-4D45SBYO.mjs.map} +0 -0
- /package/dist/{chunk-VZX3ACSO.mjs.map → chunk-BGU5L4PF.mjs.map} +0 -0
- /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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3A3ULBDO.mjs";
|
|
4
|
+
import "./chunk-T26GAHFZ.mjs";
|
|
5
|
+
import "./chunk-GRC5AZMU.mjs";
|
|
6
6
|
export {
|
|
7
7
|
createRaisinReact
|
|
8
8
|
};
|
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-
|
|
2
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
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-
|
|
2
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
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
|
-
...
|
|
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
|
|
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
|
|
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 || "");
|