@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.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-
|
|
2
|
-
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-
|
|
1
|
+
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-Dz2KIWoc.mjs';
|
|
2
|
+
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-ZtQuHSJ6.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-
|
|
2
|
-
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-
|
|
1
|
+
export { F as FlowStatus, j as RaisinContextValue, i as RaisinProviderProps, g as RaisinReact, R as ReactLike, h as ReactLikeWithContext, k as UseAuthReturn, l as UseConnectionReturn, b as UseConversationListReturn, U as UseConversationReturn, d as UseFlowOptions, e as UseFlowReturn, m as UseSqlOptions, n as UseSqlReturn, o as UseSubscriptionOptions, f as createRaisinReact } from './index-um2A-Myw.js';
|
|
2
|
+
export { b as ChatMessage, d as ConversationListItem, h as ConversationListSnapshot, g as ConversationListStoreOptions, f as ConversationStoreOptions, a as ConversationStoreSnapshot, P as PlanProjection, k as PlanProjectionTask, T as ToolCallInfo } from './conversation-list-store-ZtQuHSJ6.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
package/dist/react.js
CHANGED
|
@@ -453,6 +453,15 @@ function parsePlanTasks(rawTasks) {
|
|
|
453
453
|
};
|
|
454
454
|
}).filter((task) => task !== null);
|
|
455
455
|
}
|
|
456
|
+
var TERMINAL_TASK_STATUSES = /* @__PURE__ */ new Set(["completed", "cancelled"]);
|
|
457
|
+
var TERMINAL_PLAN_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
|
|
458
|
+
function setPlanStatus(plan, nextStatus) {
|
|
459
|
+
if (!nextStatus) return;
|
|
460
|
+
if (TERMINAL_PLAN_STATUSES.has(plan.status) && !TERMINAL_PLAN_STATUSES.has(nextStatus)) {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
plan.status = nextStatus;
|
|
464
|
+
}
|
|
456
465
|
function upsertTask(plan, nextTask) {
|
|
457
466
|
const existingIndex = plan.tasks.findIndex(
|
|
458
467
|
(task) => nextTask.taskId && task.taskId === nextTask.taskId || !nextTask.taskId && task.title === nextTask.title
|
|
@@ -461,8 +470,12 @@ function upsertTask(plan, nextTask) {
|
|
|
461
470
|
plan.tasks.push(nextTask);
|
|
462
471
|
return;
|
|
463
472
|
}
|
|
473
|
+
const existing = plan.tasks[existingIndex];
|
|
474
|
+
if (TERMINAL_TASK_STATUSES.has(existing.status) && !TERMINAL_TASK_STATUSES.has(nextTask.status)) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
464
477
|
plan.tasks[existingIndex] = {
|
|
465
|
-
...
|
|
478
|
+
...existing,
|
|
466
479
|
...nextTask
|
|
467
480
|
};
|
|
468
481
|
}
|
|
@@ -506,7 +519,7 @@ function projectPlansFromMessages(messages) {
|
|
|
506
519
|
plan.planPath = planPath ?? plan.planPath;
|
|
507
520
|
plan.planId = planId ?? plan.planId;
|
|
508
521
|
plan.title = asString(data.title) || plan.title;
|
|
509
|
-
plan
|
|
522
|
+
setPlanStatus(plan, asString(data.status));
|
|
510
523
|
plan.requiresApproval = Boolean(data.requires_approval) || plan.status === "pending_approval";
|
|
511
524
|
plan.sourceMessagePath = message.path ?? plan.sourceMessagePath;
|
|
512
525
|
const parsedTasks = parsePlanTasks(data.tasks);
|
|
@@ -522,7 +535,7 @@ function projectPlansFromMessages(messages) {
|
|
|
522
535
|
const plan = ensurePlan(plans, key, "Plan", timestamp);
|
|
523
536
|
plan.planPath = planPath ?? plan.planPath;
|
|
524
537
|
plan.planId = planId ?? plan.planId;
|
|
525
|
-
plan
|
|
538
|
+
setPlanStatus(plan, asString(data.plan_status));
|
|
526
539
|
plan.requiresApproval = plan.status === "pending_approval";
|
|
527
540
|
const taskUpdate = {
|
|
528
541
|
taskId: asString(data.task_id),
|
|
@@ -549,6 +562,12 @@ function projectPlansFromMessages(messages) {
|
|
|
549
562
|
}
|
|
550
563
|
}
|
|
551
564
|
}
|
|
565
|
+
for (const plan of plans.values()) {
|
|
566
|
+
if (!TERMINAL_PLAN_STATUSES.has(plan.status) && plan.tasks.length > 0 && plan.tasks.every((task) => TERMINAL_TASK_STATUSES.has(task.status))) {
|
|
567
|
+
plan.status = "completed";
|
|
568
|
+
plan.requiresApproval = false;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
552
571
|
return [...plans.values()].sort((a, b) => {
|
|
553
572
|
const aTime = Date.parse(a.updatedAt || "");
|
|
554
573
|
const bTime = Date.parse(b.updatedAt || "");
|