@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/svelte.mjs
CHANGED
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
createConversationAdapter,
|
|
4
4
|
createConversationListAdapter,
|
|
5
5
|
createFlowAdapter
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-BGU5L4PF.mjs";
|
|
7
|
+
import "./chunk-T26GAHFZ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createAuthAdapter,
|
|
10
10
|
createConnectionAdapter,
|
|
11
11
|
createSqlAdapter,
|
|
12
12
|
createSubscriptionAdapter
|
|
13
13
|
} from "./chunk-T2ZSNYFG.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-GRC5AZMU.mjs";
|
|
15
15
|
export {
|
|
16
16
|
RAISIN_CONTEXT_KEY,
|
|
17
17
|
createAuthAdapter,
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-
|
|
2
|
-
import { S as SqlAdapterOptions } from './svelte-sql-
|
|
1
|
+
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-ZtQuHSJ6.mjs';
|
|
2
|
+
import { S as SqlAdapterOptions } from './svelte-sql-i2ZwTvv2.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-
|
|
2
|
-
import { S as SqlAdapterOptions } from './svelte-sql-
|
|
1
|
+
import { I as IdentityUser, C as ConnectionState, a as ConversationStoreSnapshot, b as ChatMessage, T as ToolCallInfo, P as PlanProjection, c as ConversationStore, d as ConversationListItem, e as ConversationListStore, R as RaisinClient, D as Database, S as SubscriptionFilters, E as EventMessage, f as ConversationStoreOptions, g as ConversationListStoreOptions } from './conversation-list-store-ZtQuHSJ6.js';
|
|
2
|
+
import { S as SqlAdapterOptions } from './svelte-sql-CBExaUVi.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/vue.js
CHANGED
|
@@ -426,6 +426,15 @@ function parsePlanTasks(rawTasks) {
|
|
|
426
426
|
};
|
|
427
427
|
}).filter((task) => task !== null);
|
|
428
428
|
}
|
|
429
|
+
var TERMINAL_TASK_STATUSES = /* @__PURE__ */ new Set(["completed", "cancelled"]);
|
|
430
|
+
var TERMINAL_PLAN_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
|
|
431
|
+
function setPlanStatus(plan, nextStatus) {
|
|
432
|
+
if (!nextStatus) return;
|
|
433
|
+
if (TERMINAL_PLAN_STATUSES.has(plan.status) && !TERMINAL_PLAN_STATUSES.has(nextStatus)) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
plan.status = nextStatus;
|
|
437
|
+
}
|
|
429
438
|
function upsertTask(plan, nextTask) {
|
|
430
439
|
const existingIndex = plan.tasks.findIndex(
|
|
431
440
|
(task) => nextTask.taskId && task.taskId === nextTask.taskId || !nextTask.taskId && task.title === nextTask.title
|
|
@@ -434,8 +443,12 @@ function upsertTask(plan, nextTask) {
|
|
|
434
443
|
plan.tasks.push(nextTask);
|
|
435
444
|
return;
|
|
436
445
|
}
|
|
446
|
+
const existing = plan.tasks[existingIndex];
|
|
447
|
+
if (TERMINAL_TASK_STATUSES.has(existing.status) && !TERMINAL_TASK_STATUSES.has(nextTask.status)) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
437
450
|
plan.tasks[existingIndex] = {
|
|
438
|
-
...
|
|
451
|
+
...existing,
|
|
439
452
|
...nextTask
|
|
440
453
|
};
|
|
441
454
|
}
|
|
@@ -479,7 +492,7 @@ function projectPlansFromMessages(messages) {
|
|
|
479
492
|
plan.planPath = planPath ?? plan.planPath;
|
|
480
493
|
plan.planId = planId ?? plan.planId;
|
|
481
494
|
plan.title = asString(data.title) || plan.title;
|
|
482
|
-
plan
|
|
495
|
+
setPlanStatus(plan, asString(data.status));
|
|
483
496
|
plan.requiresApproval = Boolean(data.requires_approval) || plan.status === "pending_approval";
|
|
484
497
|
plan.sourceMessagePath = message.path ?? plan.sourceMessagePath;
|
|
485
498
|
const parsedTasks = parsePlanTasks(data.tasks);
|
|
@@ -495,7 +508,7 @@ function projectPlansFromMessages(messages) {
|
|
|
495
508
|
const plan = ensurePlan(plans, key, "Plan", timestamp);
|
|
496
509
|
plan.planPath = planPath ?? plan.planPath;
|
|
497
510
|
plan.planId = planId ?? plan.planId;
|
|
498
|
-
plan
|
|
511
|
+
setPlanStatus(plan, asString(data.plan_status));
|
|
499
512
|
plan.requiresApproval = plan.status === "pending_approval";
|
|
500
513
|
const taskUpdate = {
|
|
501
514
|
taskId: asString(data.task_id),
|
|
@@ -522,6 +535,12 @@ function projectPlansFromMessages(messages) {
|
|
|
522
535
|
}
|
|
523
536
|
}
|
|
524
537
|
}
|
|
538
|
+
for (const plan of plans.values()) {
|
|
539
|
+
if (!TERMINAL_PLAN_STATUSES.has(plan.status) && plan.tasks.length > 0 && plan.tasks.every((task) => TERMINAL_TASK_STATUSES.has(task.status))) {
|
|
540
|
+
plan.status = "completed";
|
|
541
|
+
plan.requiresApproval = false;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
525
544
|
return [...plans.values()].sort((a, b) => {
|
|
526
545
|
const aTime = Date.parse(a.updatedAt || "");
|
|
527
546
|
const bTime = Date.parse(b.updatedAt || "");
|