@raisindb/client 0.5.3 → 0.5.4
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-3KMOXRTK.mjs → chunk-765DLJMZ.mjs} +24 -3
- package/dist/chunk-765DLJMZ.mjs.map +1 -0
- package/dist/{chunk-Q4IBPW2W.mjs → chunk-AULHRX5C.mjs} +2 -2
- package/dist/{chunk-QJKYNLT4.mjs → chunk-IFV4ECHC.mjs} +3 -3
- package/dist/{chunk-B6EFDYFS.mjs → chunk-VMUT6PIO.mjs} +2 -2
- package/dist/{chunk-P44XWTPA.mjs → chunk-ZUUSBLVP.mjs} +3 -3
- package/dist/{conversation-list-store-DVYgTaaA.d.mts → conversation-list-store-Bw1UwRL8.d.mts} +398 -173
- package/dist/{conversation-list-store-DVYgTaaA.d.ts → conversation-list-store-Bw1UwRL8.d.ts} +398 -173
- package/dist/{index-AKUurvWQ.d.ts → index-B1u8uo8e.d.ts} +1 -1
- package/dist/{index-BOO1gV6F.d.mts → index-C-K8H-PW.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +199 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +181 -6
- 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 +23 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +3 -3
- package/dist/{svelte-sql-B1nLVQuc.d.mts → svelte-sql-Ce8sVO7T.d.mts} +1 -1
- package/dist/{svelte-sql-ABIom_Bb.d.ts → svelte-sql-GOSaxlBv.d.ts} +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +23 -2
- 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 +23 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3KMOXRTK.mjs.map +0 -1
- /package/dist/{chunk-Q4IBPW2W.mjs.map → chunk-AULHRX5C.mjs.map} +0 -0
- /package/dist/{chunk-QJKYNLT4.mjs.map → chunk-IFV4ECHC.mjs.map} +0 -0
- /package/dist/{chunk-B6EFDYFS.mjs.map → chunk-VMUT6PIO.mjs.map} +0 -0
- /package/dist/{chunk-P44XWTPA.mjs.map → chunk-ZUUSBLVP.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as PropertyValue, m as RelationRef, N as Node, H as HttpClientOptions, n as ClientOptions, o as Credentials, p as RaisinHttpClient, R as RaisinClient, q as RetryOptions, U as UploadErrorCode, B as BatchUpload, r as UploaderConfig, s as FileSource, t as BatchUploadOptions, u as BatchUploadResult, v as BatchProgress, w as ReconnectOptions } from './conversation-list-store-
|
|
2
|
-
export {
|
|
3
|
-
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, u as useConversation, a as useConversationList, c as useFlow } from './index-
|
|
1
|
+
import { l as PropertyValue, m as RelationRef, N as Node, H as HttpClientOptions, n as ClientOptions, o as Credentials, p as RaisinHttpClient, R as RaisinClient, q as RetryOptions, U as UploadErrorCode, B as BatchUpload, r as UploaderConfig, s as FileSource, t as BatchUploadOptions, u as BatchUploadResult, v as BatchProgress, w as ReconnectOptions } from './conversation-list-store-Bw1UwRL8.mjs';
|
|
2
|
+
export { d0 as AiContainerConfig, c$ as AiErrorBehavior, c_ as AiToolMode, x as Answer, ag as Archetypes, y as AskOptions, b0 as AuditLogEntry, a$ as AuditQueryPayload, O as AuthEvent, A as AuthManager, ce as AuthProviders, Q as AuthStateChange, V as AuthStateChangeCallback, bf as AuthenticatePayload, bg as AuthenticateResponse, bM as BatchFileProgress, aj as BranchDiff, ak as BranchDivergence, ai as Branches, bV as BrowserFileSource, cU as CanonicalTaskType, du as ChatAssistantMessageEvent, dw as ChatCompletedEvent, dF as ChatConversationCreatedEvent, dy as ChatDoneEvent, dn as ChatEvent, dx as ChatFailedEvent, dI as ChatLogEvent, b as ChatMessage, dH as ChatMessageDeliveredEvent, dG as ChatMessageSavedEvent, cZ as ChatStepConfig, cY as ChatTerminationConfig, cX as ChatTerminationMode, dt as ChatTextChunkEvent, dB as ChatThoughtChunkEvent, dA as ChatToolCallCompletedEvent, dz as ChatToolCallStartedEvent, dv as ChatWaitingEvent, bI as ChunkUploadResponse, z as Citation, K as ClientMode, bK as CompleteUploadRequest, bL as CompleteUploadResponse, aF as Connection, aG as ConnectionOptions, C as ConnectionState, d4 as ContainerRule, cO as ContainerType, dp as Conversation, cJ as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dJ as ConversationManager, dR as ConversationManagerOptions, dr as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dO as ConversationSubscription, dq as ConversationType, dM as CreateConvoOptions, bG as CreateUploadRequest, bH as CreateUploadResponse, al as CrossBranchCopySummary, am as CrossBranchNodeChange, L as CurrentUser, bU as DEFAULT_BATCH_CONCURRENCY, bT as DEFAULT_BRANCH, bO as DEFAULT_CHUNK_SIZE, bP as DEFAULT_MAX_RETRIES, bS as DEFAULT_NODE_TYPE, bQ as DEFAULT_RETRY_BASE_DELAY, bR as DEFAULT_RETRY_MAX_DELAY, dK as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, a3 as DatabaseHttpOptions, ah as ElementTypes, aQ as ErrorInfo, aD as EventCallback, aB as EventHandler, E as EventMessage, aC as EventSubscriptions, d5 as FanOutConfig, c1 as FlowClient, F as FlowClientOptions, c3 as FlowCollectResult, cD as FlowCompletedEvent, da as FlowDefinition, d7 as FlowDefinitionContainer, d9 as FlowDefinitionNode, d1 as FlowDefinitionNodeBase, d3 as FlowDefinitionStep, cQ as FlowErrorStrategy, j as FlowExecutionEvent, cE as FlowFailedEvent, cu as FlowInstanceStatus, cv as FlowInstanceStatusResponse, cw as FlowMetrics, cC as FlowResumedEvent, ct as FlowRunResponse, c2 as FlowRunResult, d2 as FlowStepProperties, cB as FlowWaitingEvent, i as FlowsApi, cf as FunctionInvokeOptions, cg as FunctionInvokeResponse, ch as FunctionInvokeSyncResponse, c4 as FunctionsApi, cW as HandoffTarget, aw as HttpArchetypes, $ as HttpCurrentUser, Z as HttpDatabase, ax as HttpElementTypes, c5 as HttpFunctionsApi, av as HttpNodeTypes, a0 as HttpUserNode, _ as HttpWorkspaceClient, cT as HumanTaskType, c6 as IdentityAuthApi, aL as IdentityAuthError, aK as IdentityAuthResponse, c8 as IdentityAuthResult, c9 as IdentityAuthTransport, ca as IdentityInfo, cb as IdentityMe, I as IdentityUser, dj as InboxApi, dk as InboxApiOptions, db as InboxTask, dc as InboxTaskStatus, aS as IncomingRelation, dL as ListConversationsOptions, aq as ListInvocationsFilter, dl as ListTasksOptions, dm as ListTasksResponse, aI as LocalStorageTokenStorage, cL as LogEvent, bu as LogLevel, bA as LoggerConfig, d8 as LoopConfig, cd as MagicLinkOptions, cc as MagicLinkSent, co as McpCallToolResult, ci as McpClient, cn as McpContentBlock, ck as McpFrameStream, cl as McpJsonRpcFrame, cq as McpReadResourceResult, cp as McpResourceContents, cs as McpResourceSubscription, cr as McpResourceUpdate, cm as McpToolDescriptor, cj as McpTransport, aH as MemoryTokenStorage, d6 as MergeStrategy, ds as MessageBody, dD as MessageChild, cK as MessageSavedEvent, aa as NodeCreateDeepOptions, aV as NodeCreateDeepPayload, a9 as NodeCreateOptions, aU as NodeCreatePayload, aX as NodeDeletePayload, an as NodeDiffInfo, aO as NodeEventPayload, bW as NodeFileSource, aY as NodeGetPayload, aZ as NodeHistoryPayload, a8 as NodeOperations, ac as NodeQueryOptions, b1 as NodeQueryPayload, aT as NodeRelationships, af as NodeTypes, ab as NodeUpdateOptions, aW as NodeUpdatePayload, dQ as PlanActionOptions, dP as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, dE as PlanTask, de as RETRY_STRATEGIES, cN as RaisinReference, bt as ReconnectManager, bh as RefreshTokenPayload, b2 as RelationAddPayload, b3 as RelationRemovePayload, b4 as RelationsGetPayload, aP as RequestContext, aM as RequestEnvelope, bn as RequestType, aN as ResponseEnvelope, aR as ResponseMetadata, bo as ResponseStatus, cR as RetryConfig, cS as RetryStrategy, a_ as RevisionEntry, ar as ScheduleInvocationOptions, as as ScheduledInvocation, at as ScheduledInvocationRef, au as ScheduledInvocationTargetKind, ap as SchedulerApi, ay as SchemaCommit, G as SearchOptions, J as SearchPassage, dN as SendMessageOptions, a1 as SignAssetOptions, a2 as SignedAssetUrl, az as SqlQuery, b5 as SqlQueryPayload, b6 as SqlResult, cy as StepCompletedEvent, cP as StepErrorBehavior, cA as StepFailedEvent, cx as StepStartedEvent, cz as StepUsage, bc as SubscribePayload, aE as Subscription, S as SubscriptionFilters, be as SubscriptionResponse, ao as Tags, dd as TaskCompletionResult, cV as TaskOption, cF as TextChunkEvent, cI as ThoughtChunkEvent, aJ as TokenStorage, cH as ToolCallCompletedEvent, T as ToolCallInfo, dC as ToolCallRecord, cG as ToolCallStartedEvent, ad as Transaction, bi as TransactionBeginPayload, bj as TransactionBeginResponse, bk as TransactionCommitPayload, bl as TransactionCommitResponse, ae as TransactionOptions, bm as TransactionRollbackPayload, bd as UnsubscribePayload, bF as Upload, bN as UploadError, c0 as UploadManager, bC as UploadOptions, bD as UploadProgress, bE as UploadResult, bB as UploadStatus, bJ as UploadStatusResponse, b$ as Uploader, Y as UserChangeCallback, X as UserChangeEvent, M as UserNode, b7 as Workspace, a4 as WorkspaceClient, a6 as WorkspaceCreateOptions, b8 as WorkspaceCreatePayload, ba as WorkspaceDeletePayload, b9 as WorkspaceGetPayload, a5 as WorkspaceManager, W as WorkspaceScope, a7 as WorkspaceUpdateOptions, bb as WorkspaceUpdatePayload, bZ as calculateChunkCount, bw as configureLogger, bX as createFileSource, aA as createSqlHandler, bq as decodeMessage, bp as encodeMessage, b_ as getChunkRange, bY as getContentType, by as getLogLevel, bz as getLoggerConfig, df as getRefDisplayName, dg as getRefPath, br as isEventMessage, di as isFlowDefinitionContainer, dh as isFlowDefinitionStep, bs as isResponseEnvelope, cM as isTerminalEvent, bv as logger, dS as projectPlansFromMessages, c7 as readTokensFromFragment, bx as setLogLevel } from './conversation-list-store-Bw1UwRL8.mjs';
|
|
3
|
+
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, u as useConversation, a as useConversationList, c as useFlow } from './index-C-K8H-PW.mjs';
|
|
4
4
|
export { AuthAdapter, AuthSnapshot, ConnectionAdapter, ConnectionSnapshot, FlowAdapter, FlowAdapterOptions, FlowSnapshot, RAISIN_CONTEXT_KEY, RaisinContext, SubscriptionAdapter, FlowStatus as SvelteFlowStatus, createAuthAdapter, createConnectionAdapter, createConversationAdapter, createConversationListAdapter, createFlowAdapter, createSubscriptionAdapter } from './svelte.mjs';
|
|
5
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
5
|
+
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-Ce8sVO7T.mjs';
|
|
6
6
|
export { RaisinVue, VueComputedRef, VueLike, VueRef, createRaisinVue } from './vue.mjs';
|
|
7
7
|
import 'events';
|
|
8
8
|
import 'fs/promises';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as PropertyValue, m as RelationRef, N as Node, H as HttpClientOptions, n as ClientOptions, o as Credentials, p as RaisinHttpClient, R as RaisinClient, q as RetryOptions, U as UploadErrorCode, B as BatchUpload, r as UploaderConfig, s as FileSource, t as BatchUploadOptions, u as BatchUploadResult, v as BatchProgress, w as ReconnectOptions } from './conversation-list-store-
|
|
2
|
-
export {
|
|
3
|
-
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, u as useConversation, a as useConversationList, c as useFlow } from './index-
|
|
1
|
+
import { l as PropertyValue, m as RelationRef, N as Node, H as HttpClientOptions, n as ClientOptions, o as Credentials, p as RaisinHttpClient, R as RaisinClient, q as RetryOptions, U as UploadErrorCode, B as BatchUpload, r as UploaderConfig, s as FileSource, t as BatchUploadOptions, u as BatchUploadResult, v as BatchProgress, w as ReconnectOptions } from './conversation-list-store-Bw1UwRL8.js';
|
|
2
|
+
export { d0 as AiContainerConfig, c$ as AiErrorBehavior, c_ as AiToolMode, x as Answer, ag as Archetypes, y as AskOptions, b0 as AuditLogEntry, a$ as AuditQueryPayload, O as AuthEvent, A as AuthManager, ce as AuthProviders, Q as AuthStateChange, V as AuthStateChangeCallback, bf as AuthenticatePayload, bg as AuthenticateResponse, bM as BatchFileProgress, aj as BranchDiff, ak as BranchDivergence, ai as Branches, bV as BrowserFileSource, cU as CanonicalTaskType, du as ChatAssistantMessageEvent, dw as ChatCompletedEvent, dF as ChatConversationCreatedEvent, dy as ChatDoneEvent, dn as ChatEvent, dx as ChatFailedEvent, dI as ChatLogEvent, b as ChatMessage, dH as ChatMessageDeliveredEvent, dG as ChatMessageSavedEvent, cZ as ChatStepConfig, cY as ChatTerminationConfig, cX as ChatTerminationMode, dt as ChatTextChunkEvent, dB as ChatThoughtChunkEvent, dA as ChatToolCallCompletedEvent, dz as ChatToolCallStartedEvent, dv as ChatWaitingEvent, bI as ChunkUploadResponse, z as Citation, K as ClientMode, bK as CompleteUploadRequest, bL as CompleteUploadResponse, aF as Connection, aG as ConnectionOptions, C as ConnectionState, d4 as ContainerRule, cO as ContainerType, dp as Conversation, cJ as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dJ as ConversationManager, dR as ConversationManagerOptions, dr as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dO as ConversationSubscription, dq as ConversationType, dM as CreateConvoOptions, bG as CreateUploadRequest, bH as CreateUploadResponse, al as CrossBranchCopySummary, am as CrossBranchNodeChange, L as CurrentUser, bU as DEFAULT_BATCH_CONCURRENCY, bT as DEFAULT_BRANCH, bO as DEFAULT_CHUNK_SIZE, bP as DEFAULT_MAX_RETRIES, bS as DEFAULT_NODE_TYPE, bQ as DEFAULT_RETRY_BASE_DELAY, bR as DEFAULT_RETRY_MAX_DELAY, dK as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, a3 as DatabaseHttpOptions, ah as ElementTypes, aQ as ErrorInfo, aD as EventCallback, aB as EventHandler, E as EventMessage, aC as EventSubscriptions, d5 as FanOutConfig, c1 as FlowClient, F as FlowClientOptions, c3 as FlowCollectResult, cD as FlowCompletedEvent, da as FlowDefinition, d7 as FlowDefinitionContainer, d9 as FlowDefinitionNode, d1 as FlowDefinitionNodeBase, d3 as FlowDefinitionStep, cQ as FlowErrorStrategy, j as FlowExecutionEvent, cE as FlowFailedEvent, cu as FlowInstanceStatus, cv as FlowInstanceStatusResponse, cw as FlowMetrics, cC as FlowResumedEvent, ct as FlowRunResponse, c2 as FlowRunResult, d2 as FlowStepProperties, cB as FlowWaitingEvent, i as FlowsApi, cf as FunctionInvokeOptions, cg as FunctionInvokeResponse, ch as FunctionInvokeSyncResponse, c4 as FunctionsApi, cW as HandoffTarget, aw as HttpArchetypes, $ as HttpCurrentUser, Z as HttpDatabase, ax as HttpElementTypes, c5 as HttpFunctionsApi, av as HttpNodeTypes, a0 as HttpUserNode, _ as HttpWorkspaceClient, cT as HumanTaskType, c6 as IdentityAuthApi, aL as IdentityAuthError, aK as IdentityAuthResponse, c8 as IdentityAuthResult, c9 as IdentityAuthTransport, ca as IdentityInfo, cb as IdentityMe, I as IdentityUser, dj as InboxApi, dk as InboxApiOptions, db as InboxTask, dc as InboxTaskStatus, aS as IncomingRelation, dL as ListConversationsOptions, aq as ListInvocationsFilter, dl as ListTasksOptions, dm as ListTasksResponse, aI as LocalStorageTokenStorage, cL as LogEvent, bu as LogLevel, bA as LoggerConfig, d8 as LoopConfig, cd as MagicLinkOptions, cc as MagicLinkSent, co as McpCallToolResult, ci as McpClient, cn as McpContentBlock, ck as McpFrameStream, cl as McpJsonRpcFrame, cq as McpReadResourceResult, cp as McpResourceContents, cs as McpResourceSubscription, cr as McpResourceUpdate, cm as McpToolDescriptor, cj as McpTransport, aH as MemoryTokenStorage, d6 as MergeStrategy, ds as MessageBody, dD as MessageChild, cK as MessageSavedEvent, aa as NodeCreateDeepOptions, aV as NodeCreateDeepPayload, a9 as NodeCreateOptions, aU as NodeCreatePayload, aX as NodeDeletePayload, an as NodeDiffInfo, aO as NodeEventPayload, bW as NodeFileSource, aY as NodeGetPayload, aZ as NodeHistoryPayload, a8 as NodeOperations, ac as NodeQueryOptions, b1 as NodeQueryPayload, aT as NodeRelationships, af as NodeTypes, ab as NodeUpdateOptions, aW as NodeUpdatePayload, dQ as PlanActionOptions, dP as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, dE as PlanTask, de as RETRY_STRATEGIES, cN as RaisinReference, bt as ReconnectManager, bh as RefreshTokenPayload, b2 as RelationAddPayload, b3 as RelationRemovePayload, b4 as RelationsGetPayload, aP as RequestContext, aM as RequestEnvelope, bn as RequestType, aN as ResponseEnvelope, aR as ResponseMetadata, bo as ResponseStatus, cR as RetryConfig, cS as RetryStrategy, a_ as RevisionEntry, ar as ScheduleInvocationOptions, as as ScheduledInvocation, at as ScheduledInvocationRef, au as ScheduledInvocationTargetKind, ap as SchedulerApi, ay as SchemaCommit, G as SearchOptions, J as SearchPassage, dN as SendMessageOptions, a1 as SignAssetOptions, a2 as SignedAssetUrl, az as SqlQuery, b5 as SqlQueryPayload, b6 as SqlResult, cy as StepCompletedEvent, cP as StepErrorBehavior, cA as StepFailedEvent, cx as StepStartedEvent, cz as StepUsage, bc as SubscribePayload, aE as Subscription, S as SubscriptionFilters, be as SubscriptionResponse, ao as Tags, dd as TaskCompletionResult, cV as TaskOption, cF as TextChunkEvent, cI as ThoughtChunkEvent, aJ as TokenStorage, cH as ToolCallCompletedEvent, T as ToolCallInfo, dC as ToolCallRecord, cG as ToolCallStartedEvent, ad as Transaction, bi as TransactionBeginPayload, bj as TransactionBeginResponse, bk as TransactionCommitPayload, bl as TransactionCommitResponse, ae as TransactionOptions, bm as TransactionRollbackPayload, bd as UnsubscribePayload, bF as Upload, bN as UploadError, c0 as UploadManager, bC as UploadOptions, bD as UploadProgress, bE as UploadResult, bB as UploadStatus, bJ as UploadStatusResponse, b$ as Uploader, Y as UserChangeCallback, X as UserChangeEvent, M as UserNode, b7 as Workspace, a4 as WorkspaceClient, a6 as WorkspaceCreateOptions, b8 as WorkspaceCreatePayload, ba as WorkspaceDeletePayload, b9 as WorkspaceGetPayload, a5 as WorkspaceManager, W as WorkspaceScope, a7 as WorkspaceUpdateOptions, bb as WorkspaceUpdatePayload, bZ as calculateChunkCount, bw as configureLogger, bX as createFileSource, aA as createSqlHandler, bq as decodeMessage, bp as encodeMessage, b_ as getChunkRange, bY as getContentType, by as getLogLevel, bz as getLoggerConfig, df as getRefDisplayName, dg as getRefPath, br as isEventMessage, di as isFlowDefinitionContainer, dh as isFlowDefinitionStep, bs as isResponseEnvelope, cM as isTerminalEvent, bv as logger, dS as projectPlansFromMessages, c7 as readTokensFromFragment, bx as setLogLevel } from './conversation-list-store-Bw1UwRL8.js';
|
|
3
|
+
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, u as useConversation, a as useConversationList, c as useFlow } from './index-B1u8uo8e.js';
|
|
4
4
|
export { AuthAdapter, AuthSnapshot, ConnectionAdapter, ConnectionSnapshot, FlowAdapter, FlowAdapterOptions, FlowSnapshot, RAISIN_CONTEXT_KEY, RaisinContext, SubscriptionAdapter, FlowStatus as SvelteFlowStatus, createAuthAdapter, createConnectionAdapter, createConversationAdapter, createConversationListAdapter, createFlowAdapter, createSubscriptionAdapter } from './svelte.js';
|
|
5
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
5
|
+
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-GOSaxlBv.js';
|
|
6
6
|
export { RaisinVue, VueComputedRef, VueLike, VueRef, createRaisinVue } from './vue.js';
|
|
7
7
|
import 'events';
|
|
8
8
|
import 'fs/promises';
|
package/dist/index.js
CHANGED
|
@@ -3526,6 +3526,104 @@ var HttpFunctionsApi = class {
|
|
|
3526
3526
|
}
|
|
3527
3527
|
};
|
|
3528
3528
|
|
|
3529
|
+
// src/search-api.ts
|
|
3530
|
+
var ASK_FUNCTION = "ask";
|
|
3531
|
+
var DEFAULT_LIMIT = 8;
|
|
3532
|
+
var MAX_LIMIT = 50;
|
|
3533
|
+
var SearchApi = class {
|
|
3534
|
+
constructor(runSql, runFunction) {
|
|
3535
|
+
this.runSql = runSql;
|
|
3536
|
+
this.runFunction = runFunction;
|
|
3537
|
+
}
|
|
3538
|
+
/**
|
|
3539
|
+
* Find the passages that match a query, by meaning and by keyword at once.
|
|
3540
|
+
*
|
|
3541
|
+
* No model is involved, so this is the call for a search box, a "related
|
|
3542
|
+
* content" list, or anything assembling its own context.
|
|
3543
|
+
*/
|
|
3544
|
+
async search(query, options) {
|
|
3545
|
+
if (!query || !query.trim()) {
|
|
3546
|
+
throw new Error("search(query) requires a non-empty query");
|
|
3547
|
+
}
|
|
3548
|
+
if (!options || !options.workspaces || !options.workspaces.trim()) {
|
|
3549
|
+
throw new Error(
|
|
3550
|
+
"search() requires `workspaces` \u2014 name a workspace, a list, a glob, or 'ALL READABLE'. An unscoped search on a public site is how draft content reaches a visitor."
|
|
3551
|
+
);
|
|
3552
|
+
}
|
|
3553
|
+
const limit = Math.min(
|
|
3554
|
+
Math.max(Math.floor(options.limit ?? DEFAULT_LIMIT), 1),
|
|
3555
|
+
MAX_LIMIT
|
|
3556
|
+
);
|
|
3557
|
+
const distance = Number.isFinite(options.maxDistance) ? `, max_distance => ${Number(options.maxDistance)}` : "";
|
|
3558
|
+
const sql = `
|
|
3559
|
+
SELECT node_id, path, name, score, chunk_index, chunk_text, chunk_text_source
|
|
3560
|
+
FROM HYBRID_SEARCH($1, ${limit},
|
|
3561
|
+
workspaces => $2,
|
|
3562
|
+
granularity => 'chunk'${distance})
|
|
3563
|
+
`;
|
|
3564
|
+
const result = await this.runSql(sql, [query.trim(), options.workspaces.trim()]);
|
|
3565
|
+
const rows = result?.rows ?? [];
|
|
3566
|
+
return rows.map((row) => ({
|
|
3567
|
+
path: String(row.path ?? ""),
|
|
3568
|
+
nodeId: String(row.node_id ?? ""),
|
|
3569
|
+
name: String(row.name ?? ""),
|
|
3570
|
+
// `0` is a real chunk index — a document that was never split — so it
|
|
3571
|
+
// must not be collapsed into "missing" by a falsy check.
|
|
3572
|
+
chunkIndex: row.chunk_index == null ? 0 : Number(row.chunk_index),
|
|
3573
|
+
text: String(row.chunk_text ?? ""),
|
|
3574
|
+
textIsExact: row.chunk_text_source === "exact",
|
|
3575
|
+
score: Number(row.score ?? 0)
|
|
3576
|
+
})).filter((passage) => passage.text.length > 0);
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
* Answer a question from the stored content, with citations.
|
|
3580
|
+
*
|
|
3581
|
+
* Retrieves, judges whether what came back answers the question, rewrites the
|
|
3582
|
+
* query once if it does not, and answers from those passages only.
|
|
3583
|
+
*/
|
|
3584
|
+
async ask(question, options) {
|
|
3585
|
+
if (!question || !question.trim()) {
|
|
3586
|
+
throw new Error("ask(question) requires a non-empty question");
|
|
3587
|
+
}
|
|
3588
|
+
if (!options || !options.workspaces || !options.workspaces.trim()) {
|
|
3589
|
+
throw new Error(
|
|
3590
|
+
"ask() requires `workspaces` \u2014 name a workspace, a list, a glob, or 'ALL READABLE'. An answer is quoted back to whoever asked, so the corpus it may be drawn from is stated, never assumed."
|
|
3591
|
+
);
|
|
3592
|
+
}
|
|
3593
|
+
const raw = await this.runFunction(ASK_FUNCTION, {
|
|
3594
|
+
question: question.trim(),
|
|
3595
|
+
workspaces: options.workspaces.trim(),
|
|
3596
|
+
limit: options.limit,
|
|
3597
|
+
model: options.model,
|
|
3598
|
+
use_graph: options.useGraph
|
|
3599
|
+
});
|
|
3600
|
+
if (raw && typeof raw === "object" && "error" in raw && raw.error) {
|
|
3601
|
+
throw new Error(`ask failed: ${String(raw.error)}`);
|
|
3602
|
+
}
|
|
3603
|
+
const citations = Array.isArray(raw?.citations) ? raw.citations : [];
|
|
3604
|
+
return {
|
|
3605
|
+
answer: String(raw?.answer ?? ""),
|
|
3606
|
+
// Absent counts as NOT grounded. This flag is the one a caller branches
|
|
3607
|
+
// on before showing an answer, so an unexpected response shape must fail
|
|
3608
|
+
// towards "we found nothing", never towards "trust this".
|
|
3609
|
+
grounded: raw?.grounded === true,
|
|
3610
|
+
citations: citations.map((c) => ({
|
|
3611
|
+
marker: Number(c.marker ?? 0),
|
|
3612
|
+
path: String(c.path ?? ""),
|
|
3613
|
+
nodeId: String(c.node_id ?? ""),
|
|
3614
|
+
name: String(c.title ?? ""),
|
|
3615
|
+
chunkIndex: c.chunk_index == null ? 0 : Number(c.chunk_index),
|
|
3616
|
+
textIsExact: c.text_is_exact === true
|
|
3617
|
+
})),
|
|
3618
|
+
attempts: Array.isArray(raw?.attempts) ? raw.attempts.map((a) => ({
|
|
3619
|
+
query: String(a.query ?? ""),
|
|
3620
|
+
passages: Number(a.passages ?? 0)
|
|
3621
|
+
})) : [],
|
|
3622
|
+
model: String(raw?.model ?? "")
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3529
3627
|
// src/errors.ts
|
|
3530
3628
|
var RaisinError = class extends Error {
|
|
3531
3629
|
constructor(message, code, details) {
|
|
@@ -4468,7 +4566,17 @@ var ConversationManager = class {
|
|
|
4468
4566
|
tasks.push({
|
|
4469
4567
|
id: row.id,
|
|
4470
4568
|
title: row.properties?.title ?? row.name,
|
|
4471
|
-
status: row.properties?.status ?? "pending"
|
|
4569
|
+
status: row.properties?.status ?? "pending",
|
|
4570
|
+
delegation: row.properties?.delegation_id ? {
|
|
4571
|
+
id: row.properties.delegation_id,
|
|
4572
|
+
status: row.properties.delegation_status ?? "unknown",
|
|
4573
|
+
agentRef: row.properties.delegated_agent_ref?.["raisin:path"] ?? row.properties.delegated_agent_ref?.["raisin:ref"] ?? (typeof row.properties.delegated_agent_ref === "string" ? row.properties.delegated_agent_ref : void 0),
|
|
4574
|
+
flowInstanceId: row.properties.delegation_flow_instance_id ?? void 0,
|
|
4575
|
+
branch: row.properties.delegation_branch ?? void 0,
|
|
4576
|
+
baseBranch: row.properties.delegation_base_branch ?? void 0,
|
|
4577
|
+
result: row.properties.delegation_result,
|
|
4578
|
+
error: row.properties.delegation_error ?? void 0
|
|
4579
|
+
} : void 0
|
|
4472
4580
|
});
|
|
4473
4581
|
tasksByPlan.set(planPath, tasks);
|
|
4474
4582
|
continue;
|
|
@@ -5520,6 +5628,73 @@ var Database = class _Database {
|
|
|
5520
5628
|
}
|
|
5521
5629
|
return this._functionsApi;
|
|
5522
5630
|
}
|
|
5631
|
+
/**
|
|
5632
|
+
* The retrieval implementation behind {@link search} and {@link ask}.
|
|
5633
|
+
*
|
|
5634
|
+
* Private: callers get the two verbs, not the object, so how retrieval is
|
|
5635
|
+
* served stays ours to change.
|
|
5636
|
+
*/
|
|
5637
|
+
searchApi() {
|
|
5638
|
+
if (!this._searchApi) {
|
|
5639
|
+
this._searchApi = new SearchApi(
|
|
5640
|
+
(sql, params) => this.executeSql(sql, params),
|
|
5641
|
+
async (name, input) => {
|
|
5642
|
+
const run = await this.functions().invoke(name, input, {
|
|
5643
|
+
waitForResult: true
|
|
5644
|
+
});
|
|
5645
|
+
return run?.result ?? run;
|
|
5646
|
+
}
|
|
5647
|
+
);
|
|
5648
|
+
}
|
|
5649
|
+
return this._searchApi;
|
|
5650
|
+
}
|
|
5651
|
+
/**
|
|
5652
|
+
* Find the passages matching a query, by meaning and by keyword at once.
|
|
5653
|
+
*
|
|
5654
|
+
* No model is involved — this is the call for a search box or for assembling
|
|
5655
|
+
* your own context. Returns one entry per PASSAGE, so several may come from
|
|
5656
|
+
* one document.
|
|
5657
|
+
*
|
|
5658
|
+
* @example
|
|
5659
|
+
* ```typescript
|
|
5660
|
+
* const passages = await db.search('how much notice to terminate', {
|
|
5661
|
+
* workspaces: 'stories',
|
|
5662
|
+
* });
|
|
5663
|
+
* passages[0].text; // the passage itself
|
|
5664
|
+
* passages[0].chunkIndex; // where in the document it came from
|
|
5665
|
+
* ```
|
|
5666
|
+
*/
|
|
5667
|
+
async search(query, options) {
|
|
5668
|
+
return this.searchApi().search(query, options);
|
|
5669
|
+
}
|
|
5670
|
+
/**
|
|
5671
|
+
* Answer a question from the stored content, with citations.
|
|
5672
|
+
*
|
|
5673
|
+
* Retrieves, judges whether what came back answers the question, rewrites the
|
|
5674
|
+
* query once if it does not, and answers from those passages only. Check
|
|
5675
|
+
* `grounded` before showing the answer: when it is false nothing relevant was
|
|
5676
|
+
* found and the model was never asked.
|
|
5677
|
+
*
|
|
5678
|
+
* `workspaces` is required, the same as on {@link search}: an answer is
|
|
5679
|
+
* quoted back to whoever asked, so the corpus it may be drawn from is stated
|
|
5680
|
+
* rather than assumed. One name, a comma-separated list, a glob, or
|
|
5681
|
+
* `'ALL READABLE'`.
|
|
5682
|
+
*
|
|
5683
|
+
* A method rather than `functions().invoke('ask', ...)` on purpose — see the
|
|
5684
|
+
* note at the top of `search-api.ts`. `invoke` is the escape hatch for
|
|
5685
|
+
* functions YOU wrote.
|
|
5686
|
+
*
|
|
5687
|
+
* @example
|
|
5688
|
+
* ```typescript
|
|
5689
|
+
* const { answer, citations, grounded } = await db.ask(
|
|
5690
|
+
* 'How much notice do we have to give?',
|
|
5691
|
+
* { workspaces: 'stories, handbook' }, // one name, a list, a glob, or 'ALL READABLE'
|
|
5692
|
+
* );
|
|
5693
|
+
* ```
|
|
5694
|
+
*/
|
|
5695
|
+
async ask(question, options) {
|
|
5696
|
+
return this.searchApi().ask(question, options);
|
|
5697
|
+
}
|
|
5523
5698
|
/**
|
|
5524
5699
|
* Get a pre-configured ConversationManager for managing conversations.
|
|
5525
5700
|
*
|
|
@@ -10462,12 +10637,23 @@ function parsePlanTasks(rawTasks) {
|
|
|
10462
10637
|
}
|
|
10463
10638
|
const task = asRecord(rawTask);
|
|
10464
10639
|
if (!task) return null;
|
|
10640
|
+
const delegation = asRecord(task.delegation);
|
|
10465
10641
|
return {
|
|
10466
10642
|
taskId: asString(task.task_id) ?? asString(task.id),
|
|
10467
10643
|
title: asString(task.title) ?? `Task ${index + 1}`,
|
|
10468
10644
|
status: asString(task.status) ?? "pending",
|
|
10469
10645
|
description: asString(task.description),
|
|
10470
|
-
priority: asString(task.priority)
|
|
10646
|
+
priority: asString(task.priority),
|
|
10647
|
+
delegation: delegation ? {
|
|
10648
|
+
id: asString(delegation.id),
|
|
10649
|
+
status: asString(delegation.status) ?? "unknown",
|
|
10650
|
+
agentRef: asString(delegation.agent_ref) ?? asString(delegation.agentRef),
|
|
10651
|
+
flowInstanceId: asString(delegation.flow_instance_id) ?? asString(delegation.flowInstanceId),
|
|
10652
|
+
branch: asString(delegation.branch),
|
|
10653
|
+
baseBranch: asString(delegation.base_branch) ?? asString(delegation.baseBranch),
|
|
10654
|
+
result: delegation.result,
|
|
10655
|
+
error: asString(delegation.error)
|
|
10656
|
+
} : void 0
|
|
10471
10657
|
};
|
|
10472
10658
|
}).filter((task) => task !== null);
|
|
10473
10659
|
}
|
|
@@ -10574,7 +10760,17 @@ function projectPlansFromMessages(messages) {
|
|
|
10574
10760
|
plan.tasks = child.tasks.map((task) => ({
|
|
10575
10761
|
taskId: task.id,
|
|
10576
10762
|
title: task.title,
|
|
10577
|
-
status: task.status
|
|
10763
|
+
status: task.status,
|
|
10764
|
+
delegation: task.delegation ? {
|
|
10765
|
+
id: task.delegation.id,
|
|
10766
|
+
status: task.delegation.status,
|
|
10767
|
+
agentRef: task.delegation.agentRef,
|
|
10768
|
+
flowInstanceId: task.delegation.flowInstanceId,
|
|
10769
|
+
branch: task.delegation.branch,
|
|
10770
|
+
baseBranch: task.delegation.baseBranch,
|
|
10771
|
+
result: task.delegation.result,
|
|
10772
|
+
error: task.delegation.error
|
|
10773
|
+
} : void 0
|
|
10578
10774
|
}));
|
|
10579
10775
|
}
|
|
10580
10776
|
}
|