@raisindb/client 0.2.5 → 0.2.6

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.
@@ -1203,12 +1203,29 @@ declare class NodeOperations {
1203
1203
  */
1204
1204
  getChildrenByPath(parentPath: string, limit?: number): Promise<Node[]>;
1205
1205
  /**
1206
- * List children of a parent node
1206
+ * List children of a parent node, in editorial (drag-and-drop) order.
1207
1207
  *
1208
1208
  * @param parentPath - Path of the parent node
1209
1209
  * @returns Array of child nodes
1210
1210
  */
1211
1211
  listChildren(parentPath: string): Promise<Node[]>;
1212
+ /**
1213
+ * List one page of a parent's children, in editorial order.
1214
+ *
1215
+ * Pagination is keyset-based: pass the previous response's `nextCursor` back as
1216
+ * `cursor` to get the following page. `nextCursor` is `null` on the last page.
1217
+ * Treat the cursor as opaque — do not parse or construct it.
1218
+ *
1219
+ * @param parentPath - Path of the parent node
1220
+ * @param options - `cursor` from a previous page, and page `limit`
1221
+ */
1222
+ listChildrenPage(parentPath: string, options?: {
1223
+ cursor?: string;
1224
+ limit?: number;
1225
+ }): Promise<{
1226
+ items: Node[];
1227
+ nextCursor: string | null;
1228
+ }>;
1212
1229
  /**
1213
1230
  * Get a node tree starting from a root node
1214
1231
  *
@@ -1260,31 +1277,33 @@ declare class NodeOperations {
1260
1277
  */
1261
1278
  copyTree(fromPath: string, toParentPath: string, newName?: string): Promise<Node>;
1262
1279
  /**
1263
- * Reorder a node by setting a new order key
1280
+ * Move a child to a specific position among its siblings.
1264
1281
  *
1265
- * @param nodePath - Node path
1266
- * @param orderKey - New order key (base62-encoded fractional index)
1267
- * @returns Reordered node
1282
+ * Positions are 0-based; a position past the end appends. The server owns the
1283
+ * fractional order key — you name a position, it mints the key.
1284
+ *
1285
+ * @param parentPath - Parent node path
1286
+ * @param childName - Name of the child to move (not a full path)
1287
+ * @param position - Target 0-based position among the parent's children
1288
+ * @returns The reordered node, carrying its newly assigned `order_key`
1268
1289
  */
1269
- reorder(nodePath: string, orderKey: string): Promise<Node>;
1290
+ reorder(parentPath: string, childName: string, position: number): Promise<Node>;
1270
1291
  /**
1271
- * Move a child node before a reference sibling
1292
+ * Move a child so it sits immediately before one of its siblings.
1272
1293
  *
1273
1294
  * @param parentPath - Parent node path
1274
- * @param childPath - Child node path to move
1275
- * @param referencePath - Reference sibling path to position before
1276
- * @returns Moved node
1295
+ * @param childName - Name of the child to move (not a full path)
1296
+ * @param beforeChildName - Name of the sibling to sit before
1277
1297
  */
1278
- moveChildBefore(parentPath: string, childPath: string, referencePath: string): Promise<Node>;
1298
+ moveChildBefore(parentPath: string, childName: string, beforeChildName: string): Promise<void>;
1279
1299
  /**
1280
- * Move a child node after a reference sibling
1300
+ * Move a child so it sits immediately after one of its siblings.
1281
1301
  *
1282
1302
  * @param parentPath - Parent node path
1283
- * @param childPath - Child node path to move
1284
- * @param referencePath - Reference sibling path to position after
1285
- * @returns Moved node
1303
+ * @param childName - Name of the child to move (not a full path)
1304
+ * @param afterChildName - Name of the sibling to sit after
1286
1305
  */
1287
- moveChildAfter(parentPath: string, childPath: string, referencePath: string): Promise<Node>;
1306
+ moveChildAfter(parentPath: string, childName: string, afterChildName: string): Promise<void>;
1288
1307
  /**
1289
1308
  * Replay a parent's child order from another branch onto the current branch.
1290
1309
  *
@@ -1203,12 +1203,29 @@ declare class NodeOperations {
1203
1203
  */
1204
1204
  getChildrenByPath(parentPath: string, limit?: number): Promise<Node[]>;
1205
1205
  /**
1206
- * List children of a parent node
1206
+ * List children of a parent node, in editorial (drag-and-drop) order.
1207
1207
  *
1208
1208
  * @param parentPath - Path of the parent node
1209
1209
  * @returns Array of child nodes
1210
1210
  */
1211
1211
  listChildren(parentPath: string): Promise<Node[]>;
1212
+ /**
1213
+ * List one page of a parent's children, in editorial order.
1214
+ *
1215
+ * Pagination is keyset-based: pass the previous response's `nextCursor` back as
1216
+ * `cursor` to get the following page. `nextCursor` is `null` on the last page.
1217
+ * Treat the cursor as opaque — do not parse or construct it.
1218
+ *
1219
+ * @param parentPath - Path of the parent node
1220
+ * @param options - `cursor` from a previous page, and page `limit`
1221
+ */
1222
+ listChildrenPage(parentPath: string, options?: {
1223
+ cursor?: string;
1224
+ limit?: number;
1225
+ }): Promise<{
1226
+ items: Node[];
1227
+ nextCursor: string | null;
1228
+ }>;
1212
1229
  /**
1213
1230
  * Get a node tree starting from a root node
1214
1231
  *
@@ -1260,31 +1277,33 @@ declare class NodeOperations {
1260
1277
  */
1261
1278
  copyTree(fromPath: string, toParentPath: string, newName?: string): Promise<Node>;
1262
1279
  /**
1263
- * Reorder a node by setting a new order key
1280
+ * Move a child to a specific position among its siblings.
1264
1281
  *
1265
- * @param nodePath - Node path
1266
- * @param orderKey - New order key (base62-encoded fractional index)
1267
- * @returns Reordered node
1282
+ * Positions are 0-based; a position past the end appends. The server owns the
1283
+ * fractional order key — you name a position, it mints the key.
1284
+ *
1285
+ * @param parentPath - Parent node path
1286
+ * @param childName - Name of the child to move (not a full path)
1287
+ * @param position - Target 0-based position among the parent's children
1288
+ * @returns The reordered node, carrying its newly assigned `order_key`
1268
1289
  */
1269
- reorder(nodePath: string, orderKey: string): Promise<Node>;
1290
+ reorder(parentPath: string, childName: string, position: number): Promise<Node>;
1270
1291
  /**
1271
- * Move a child node before a reference sibling
1292
+ * Move a child so it sits immediately before one of its siblings.
1272
1293
  *
1273
1294
  * @param parentPath - Parent node path
1274
- * @param childPath - Child node path to move
1275
- * @param referencePath - Reference sibling path to position before
1276
- * @returns Moved node
1295
+ * @param childName - Name of the child to move (not a full path)
1296
+ * @param beforeChildName - Name of the sibling to sit before
1277
1297
  */
1278
- moveChildBefore(parentPath: string, childPath: string, referencePath: string): Promise<Node>;
1298
+ moveChildBefore(parentPath: string, childName: string, beforeChildName: string): Promise<void>;
1279
1299
  /**
1280
- * Move a child node after a reference sibling
1300
+ * Move a child so it sits immediately after one of its siblings.
1281
1301
  *
1282
1302
  * @param parentPath - Parent node path
1283
- * @param childPath - Child node path to move
1284
- * @param referencePath - Reference sibling path to position after
1285
- * @returns Moved node
1303
+ * @param childName - Name of the child to move (not a full path)
1304
+ * @param afterChildName - Name of the sibling to sit after
1286
1305
  */
1287
- moveChildAfter(parentPath: string, childPath: string, referencePath: string): Promise<Node>;
1306
+ moveChildAfter(parentPath: string, childName: string, afterChildName: string): Promise<void>;
1288
1307
  /**
1289
1308
  * Replay a parent's child order from another branch onto the current branch.
1290
1309
  *
@@ -1,4 +1,4 @@
1
- import { f as ConversationStoreOptions, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, S as SubscriptionFilters, D as Database, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent, E as EventMessage } from './conversation-list-store-S5MPSqoB.mjs';
1
+ import { f as ConversationStoreOptions, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, S as SubscriptionFilters, D as Database, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent, E as EventMessage } from './conversation-list-store-CU5mi_PE.mjs';
2
2
 
3
3
  /**
4
4
  * React adapters for the RaisinDB conversation stores.
@@ -1,4 +1,4 @@
1
- import { f as ConversationStoreOptions, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, S as SubscriptionFilters, D as Database, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent, E as EventMessage } from './conversation-list-store-S5MPSqoB.js';
1
+ import { f as ConversationStoreOptions, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, S as SubscriptionFilters, D as Database, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent, E as EventMessage } from './conversation-list-store-CU5mi_PE.js';
2
2
 
3
3
  /**
4
4
  * React adapters for the RaisinDB conversation stores.
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-S5MPSqoB.mjs';
2
- export { cK as AiContainerConfig, cJ as AiErrorBehavior, cI as AiToolMode, aa as Archetypes, aW as AuditLogEntry, aV as AuditQueryPayload, G as AuthEvent, A as AuthManager, J as AuthStateChange, K as AuthStateChangeCallback, b9 as AuthenticatePayload, ba as AuthenticateResponse, bG as BatchFileProgress, ad as BranchDiff, ae as BranchDivergence, ac as Branches, bP as BrowserFileSource, d8 as ChatAssistantMessageEvent, da as ChatCompletedEvent, dj as ChatConversationCreatedEvent, dc as ChatDoneEvent, d2 as ChatEvent, db as ChatFailedEvent, dm as ChatLogEvent, b as ChatMessage, dl as ChatMessageDeliveredEvent, dk as ChatMessageSavedEvent, cH as ChatStepConfig, cG as ChatTerminationConfig, cF as ChatTerminationMode, d7 as ChatTextChunkEvent, df as ChatThoughtChunkEvent, de as ChatToolCallCompletedEvent, dd as ChatToolCallStartedEvent, d9 as ChatWaitingEvent, bC as ChunkUploadResponse, x as ClientMode, bE as CompleteUploadRequest, bF as CompleteUploadResponse, az as Connection, aA as ConnectionOptions, C as ConnectionState, cO as ContainerRule, cx as ContainerType, d3 as Conversation, cs as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dn as ConversationManager, dw as ConversationManagerOptions, d5 as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dt as ConversationSubscription, d4 as ConversationType, dr as CreateConvoOptions, bA as CreateUploadRequest, bB as CreateUploadResponse, af as CrossBranchCopySummary, ag as CrossBranchNodeChange, y as CurrentUser, bO as DEFAULT_BATCH_CONCURRENCY, bN as DEFAULT_BRANCH, bI as DEFAULT_CHUNK_SIZE, bJ as DEFAULT_MAX_RETRIES, bM as DEFAULT_NODE_TYPE, bK as DEFAULT_RETRY_BASE_DELAY, bL as DEFAULT_RETRY_MAX_DELAY, dp as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, Z as DatabaseHttpOptions, ab as ElementTypes, aK as ErrorInfo, ax as EventCallback, av as EventHandler, E as EventMessage, aw as EventSubscriptions, bX as FlowClient, F as FlowClientOptions, bZ as FlowCollectResult, cm as FlowCompletedEvent, cR as FlowDefinition, cP as FlowDefinitionContainer, cQ as FlowDefinitionNode, cL as FlowDefinitionNodeBase, cN as FlowDefinitionStep, cz as FlowErrorStrategy, j as FlowExecutionEvent, cn as FlowFailedEvent, cf as FlowInstanceStatus, cg as FlowInstanceStatusResponse, cl as FlowResumedEvent, ce as FlowRunResponse, bY as FlowRunResult, cM as FlowStepProperties, ck as FlowWaitingEvent, i as FlowsApi, c0 as FunctionInvokeOptions, c1 as FunctionInvokeResponse, c2 as FunctionInvokeSyncResponse, b_ as FunctionsApi, cE as HandoffTarget, aq as HttpArchetypes, V as HttpCurrentUser, O as HttpDatabase, ar as HttpElementTypes, b$ as HttpFunctionsApi, ap as HttpNodeTypes, W as HttpUserNode, Q as HttpWorkspaceClient, cC as HumanTaskType, aF as IdentityAuthError, aE as IdentityAuthResponse, I as IdentityUser, c_ as InboxApi, c$ as InboxApiOptions, cS as InboxTask, cT as InboxTaskStatus, aM as IncomingRelation, dq as ListConversationsOptions, ak as ListInvocationsFilter, d0 as ListTasksOptions, d1 as ListTasksResponse, aC as LocalStorageTokenStorage, cu as LogEvent, bo as LogLevel, bu as LoggerConfig, c9 as McpCallToolResult, c3 as McpClient, c8 as McpContentBlock, c5 as McpFrameStream, c6 as McpJsonRpcFrame, cb as McpReadResourceResult, ca as McpResourceContents, cd as McpResourceSubscription, cc as McpResourceUpdate, c7 as McpToolDescriptor, c4 as McpTransport, aB as MemoryTokenStorage, d6 as MessageBody, dh as MessageChild, ct as MessageSavedEvent, a4 as NodeCreateDeepOptions, aP as NodeCreateDeepPayload, a3 as NodeCreateOptions, aO as NodeCreatePayload, aR as NodeDeletePayload, ah as NodeDiffInfo, aI as NodeEventPayload, bQ as NodeFileSource, aS as NodeGetPayload, aT as NodeHistoryPayload, a2 as NodeOperations, a6 as NodeQueryOptions, aX as NodeQueryPayload, aN as NodeRelationships, a9 as NodeTypes, a5 as NodeUpdateOptions, aQ as NodeUpdatePayload, dv as PlanActionOptions, du as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, di as PlanTask, cV as RETRY_STRATEGIES, cw as RaisinReference, bn as ReconnectManager, bb as RefreshTokenPayload, aY as RelationAddPayload, aZ as RelationRemovePayload, a_ as RelationsGetPayload, aJ as RequestContext, aG as RequestEnvelope, bh as RequestType, aH as ResponseEnvelope, aL as ResponseMetadata, bi as ResponseStatus, cA as RetryConfig, cB as RetryStrategy, aU as RevisionEntry, al as ScheduleInvocationOptions, am as ScheduledInvocation, an as ScheduledInvocationRef, ao as ScheduledInvocationTargetKind, aj as SchedulerApi, as as SchemaCommit, ds as SendMessageOptions, X as SignAssetOptions, Y as SignedAssetUrl, at as SqlQuery, a$ as SqlQueryPayload, b0 as SqlResult, ci as StepCompletedEvent, cy as StepErrorBehavior, cj as StepFailedEvent, ch as StepStartedEvent, b6 as SubscribePayload, ay as Subscription, S as SubscriptionFilters, b8 as SubscriptionResponse, ai as Tags, cU as TaskCompletionResult, cD as TaskOption, co as TextChunkEvent, cr as ThoughtChunkEvent, aD as TokenStorage, cq as ToolCallCompletedEvent, T as ToolCallInfo, dg as ToolCallRecord, cp as ToolCallStartedEvent, a7 as Transaction, bc as TransactionBeginPayload, bd as TransactionBeginResponse, be as TransactionCommitPayload, bf as TransactionCommitResponse, a8 as TransactionOptions, bg as TransactionRollbackPayload, b7 as UnsubscribePayload, bz as Upload, bH as UploadError, bW as UploadManager, bw as UploadOptions, bx as UploadProgress, by as UploadResult, bv as UploadStatus, bD as UploadStatusResponse, bV as Uploader, M as UserChangeCallback, L as UserChangeEvent, z as UserNode, b1 as Workspace, _ as WorkspaceClient, a0 as WorkspaceCreateOptions, b2 as WorkspaceCreatePayload, b4 as WorkspaceDeletePayload, b3 as WorkspaceGetPayload, $ as WorkspaceManager, a1 as WorkspaceUpdateOptions, b5 as WorkspaceUpdatePayload, bT as calculateChunkCount, bq as configureLogger, bR as createFileSource, au as createSqlHandler, bk as decodeMessage, bj as encodeMessage, bU as getChunkRange, bS as getContentType, bs as getLogLevel, bt as getLoggerConfig, cW as getRefDisplayName, cX as getRefPath, bl as isEventMessage, cZ as isFlowDefinitionContainer, cY as isFlowDefinitionStep, bm as isResponseEnvelope, cv as isTerminalEvent, bp as logger, dx as projectPlansFromMessages, br as setLogLevel } from './conversation-list-store-S5MPSqoB.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-3-fS4i8b.mjs';
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-CU5mi_PE.mjs';
2
+ export { cK as AiContainerConfig, cJ as AiErrorBehavior, cI as AiToolMode, aa as Archetypes, aW as AuditLogEntry, aV as AuditQueryPayload, G as AuthEvent, A as AuthManager, J as AuthStateChange, K as AuthStateChangeCallback, b9 as AuthenticatePayload, ba as AuthenticateResponse, bG as BatchFileProgress, ad as BranchDiff, ae as BranchDivergence, ac as Branches, bP as BrowserFileSource, d8 as ChatAssistantMessageEvent, da as ChatCompletedEvent, dj as ChatConversationCreatedEvent, dc as ChatDoneEvent, d2 as ChatEvent, db as ChatFailedEvent, dm as ChatLogEvent, b as ChatMessage, dl as ChatMessageDeliveredEvent, dk as ChatMessageSavedEvent, cH as ChatStepConfig, cG as ChatTerminationConfig, cF as ChatTerminationMode, d7 as ChatTextChunkEvent, df as ChatThoughtChunkEvent, de as ChatToolCallCompletedEvent, dd as ChatToolCallStartedEvent, d9 as ChatWaitingEvent, bC as ChunkUploadResponse, x as ClientMode, bE as CompleteUploadRequest, bF as CompleteUploadResponse, az as Connection, aA as ConnectionOptions, C as ConnectionState, cO as ContainerRule, cx as ContainerType, d3 as Conversation, cs as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dn as ConversationManager, dw as ConversationManagerOptions, d5 as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dt as ConversationSubscription, d4 as ConversationType, dr as CreateConvoOptions, bA as CreateUploadRequest, bB as CreateUploadResponse, af as CrossBranchCopySummary, ag as CrossBranchNodeChange, y as CurrentUser, bO as DEFAULT_BATCH_CONCURRENCY, bN as DEFAULT_BRANCH, bI as DEFAULT_CHUNK_SIZE, bJ as DEFAULT_MAX_RETRIES, bM as DEFAULT_NODE_TYPE, bK as DEFAULT_RETRY_BASE_DELAY, bL as DEFAULT_RETRY_MAX_DELAY, dp as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, Z as DatabaseHttpOptions, ab as ElementTypes, aK as ErrorInfo, ax as EventCallback, av as EventHandler, E as EventMessage, aw as EventSubscriptions, bX as FlowClient, F as FlowClientOptions, bZ as FlowCollectResult, cm as FlowCompletedEvent, cR as FlowDefinition, cP as FlowDefinitionContainer, cQ as FlowDefinitionNode, cL as FlowDefinitionNodeBase, cN as FlowDefinitionStep, cz as FlowErrorStrategy, j as FlowExecutionEvent, cn as FlowFailedEvent, cf as FlowInstanceStatus, cg as FlowInstanceStatusResponse, cl as FlowResumedEvent, ce as FlowRunResponse, bY as FlowRunResult, cM as FlowStepProperties, ck as FlowWaitingEvent, i as FlowsApi, c0 as FunctionInvokeOptions, c1 as FunctionInvokeResponse, c2 as FunctionInvokeSyncResponse, b_ as FunctionsApi, cE as HandoffTarget, aq as HttpArchetypes, V as HttpCurrentUser, O as HttpDatabase, ar as HttpElementTypes, b$ as HttpFunctionsApi, ap as HttpNodeTypes, W as HttpUserNode, Q as HttpWorkspaceClient, cC as HumanTaskType, aF as IdentityAuthError, aE as IdentityAuthResponse, I as IdentityUser, c_ as InboxApi, c$ as InboxApiOptions, cS as InboxTask, cT as InboxTaskStatus, aM as IncomingRelation, dq as ListConversationsOptions, ak as ListInvocationsFilter, d0 as ListTasksOptions, d1 as ListTasksResponse, aC as LocalStorageTokenStorage, cu as LogEvent, bo as LogLevel, bu as LoggerConfig, c9 as McpCallToolResult, c3 as McpClient, c8 as McpContentBlock, c5 as McpFrameStream, c6 as McpJsonRpcFrame, cb as McpReadResourceResult, ca as McpResourceContents, cd as McpResourceSubscription, cc as McpResourceUpdate, c7 as McpToolDescriptor, c4 as McpTransport, aB as MemoryTokenStorage, d6 as MessageBody, dh as MessageChild, ct as MessageSavedEvent, a4 as NodeCreateDeepOptions, aP as NodeCreateDeepPayload, a3 as NodeCreateOptions, aO as NodeCreatePayload, aR as NodeDeletePayload, ah as NodeDiffInfo, aI as NodeEventPayload, bQ as NodeFileSource, aS as NodeGetPayload, aT as NodeHistoryPayload, a2 as NodeOperations, a6 as NodeQueryOptions, aX as NodeQueryPayload, aN as NodeRelationships, a9 as NodeTypes, a5 as NodeUpdateOptions, aQ as NodeUpdatePayload, dv as PlanActionOptions, du as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, di as PlanTask, cV as RETRY_STRATEGIES, cw as RaisinReference, bn as ReconnectManager, bb as RefreshTokenPayload, aY as RelationAddPayload, aZ as RelationRemovePayload, a_ as RelationsGetPayload, aJ as RequestContext, aG as RequestEnvelope, bh as RequestType, aH as ResponseEnvelope, aL as ResponseMetadata, bi as ResponseStatus, cA as RetryConfig, cB as RetryStrategy, aU as RevisionEntry, al as ScheduleInvocationOptions, am as ScheduledInvocation, an as ScheduledInvocationRef, ao as ScheduledInvocationTargetKind, aj as SchedulerApi, as as SchemaCommit, ds as SendMessageOptions, X as SignAssetOptions, Y as SignedAssetUrl, at as SqlQuery, a$ as SqlQueryPayload, b0 as SqlResult, ci as StepCompletedEvent, cy as StepErrorBehavior, cj as StepFailedEvent, ch as StepStartedEvent, b6 as SubscribePayload, ay as Subscription, S as SubscriptionFilters, b8 as SubscriptionResponse, ai as Tags, cU as TaskCompletionResult, cD as TaskOption, co as TextChunkEvent, cr as ThoughtChunkEvent, aD as TokenStorage, cq as ToolCallCompletedEvent, T as ToolCallInfo, dg as ToolCallRecord, cp as ToolCallStartedEvent, a7 as Transaction, bc as TransactionBeginPayload, bd as TransactionBeginResponse, be as TransactionCommitPayload, bf as TransactionCommitResponse, a8 as TransactionOptions, bg as TransactionRollbackPayload, b7 as UnsubscribePayload, bz as Upload, bH as UploadError, bW as UploadManager, bw as UploadOptions, bx as UploadProgress, by as UploadResult, bv as UploadStatus, bD as UploadStatusResponse, bV as Uploader, M as UserChangeCallback, L as UserChangeEvent, z as UserNode, b1 as Workspace, _ as WorkspaceClient, a0 as WorkspaceCreateOptions, b2 as WorkspaceCreatePayload, b4 as WorkspaceDeletePayload, b3 as WorkspaceGetPayload, $ as WorkspaceManager, a1 as WorkspaceUpdateOptions, b5 as WorkspaceUpdatePayload, bT as calculateChunkCount, bq as configureLogger, bR as createFileSource, au as createSqlHandler, bk as decodeMessage, bj as encodeMessage, bU as getChunkRange, bS as getContentType, bs as getLogLevel, bt as getLoggerConfig, cW as getRefDisplayName, cX as getRefPath, bl as isEventMessage, cZ as isFlowDefinitionContainer, cY as isFlowDefinitionStep, bm as isResponseEnvelope, cv as isTerminalEvent, bp as logger, dx as projectPlansFromMessages, br as setLogLevel } from './conversation-list-store-CU5mi_PE.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-DDus5a7P.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-BCuXrg8L.mjs';
5
+ export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-CpXHXg34.mjs';
6
6
  export { RaisinVue, VueComputedRef, VueLike, VueRef, createRaisinVue } from './vue.mjs';
7
7
  import 'events';
8
8
  import 'fs/promises';
@@ -65,7 +65,12 @@ declare class NodeBuilder {
65
65
  */
66
66
  children(children: string[]): this;
67
67
  /**
68
- * Set the order key
68
+ * Set the order key.
69
+ *
70
+ * @deprecated The server owns editorial ordering: the order key is assigned by
71
+ * the ordering index on write, so any value set here is overwritten. To place a
72
+ * node, create it (it appends to the end of its parent) then call
73
+ * `nodes.reorder()`, `nodes.moveChildBefore()` or `nodes.moveChildAfter()`.
69
74
  */
70
75
  orderKey(orderKey: string): this;
71
76
  /**
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-S5MPSqoB.js';
2
- export { cK as AiContainerConfig, cJ as AiErrorBehavior, cI as AiToolMode, aa as Archetypes, aW as AuditLogEntry, aV as AuditQueryPayload, G as AuthEvent, A as AuthManager, J as AuthStateChange, K as AuthStateChangeCallback, b9 as AuthenticatePayload, ba as AuthenticateResponse, bG as BatchFileProgress, ad as BranchDiff, ae as BranchDivergence, ac as Branches, bP as BrowserFileSource, d8 as ChatAssistantMessageEvent, da as ChatCompletedEvent, dj as ChatConversationCreatedEvent, dc as ChatDoneEvent, d2 as ChatEvent, db as ChatFailedEvent, dm as ChatLogEvent, b as ChatMessage, dl as ChatMessageDeliveredEvent, dk as ChatMessageSavedEvent, cH as ChatStepConfig, cG as ChatTerminationConfig, cF as ChatTerminationMode, d7 as ChatTextChunkEvent, df as ChatThoughtChunkEvent, de as ChatToolCallCompletedEvent, dd as ChatToolCallStartedEvent, d9 as ChatWaitingEvent, bC as ChunkUploadResponse, x as ClientMode, bE as CompleteUploadRequest, bF as CompleteUploadResponse, az as Connection, aA as ConnectionOptions, C as ConnectionState, cO as ContainerRule, cx as ContainerType, d3 as Conversation, cs as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dn as ConversationManager, dw as ConversationManagerOptions, d5 as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dt as ConversationSubscription, d4 as ConversationType, dr as CreateConvoOptions, bA as CreateUploadRequest, bB as CreateUploadResponse, af as CrossBranchCopySummary, ag as CrossBranchNodeChange, y as CurrentUser, bO as DEFAULT_BATCH_CONCURRENCY, bN as DEFAULT_BRANCH, bI as DEFAULT_CHUNK_SIZE, bJ as DEFAULT_MAX_RETRIES, bM as DEFAULT_NODE_TYPE, bK as DEFAULT_RETRY_BASE_DELAY, bL as DEFAULT_RETRY_MAX_DELAY, dp as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, Z as DatabaseHttpOptions, ab as ElementTypes, aK as ErrorInfo, ax as EventCallback, av as EventHandler, E as EventMessage, aw as EventSubscriptions, bX as FlowClient, F as FlowClientOptions, bZ as FlowCollectResult, cm as FlowCompletedEvent, cR as FlowDefinition, cP as FlowDefinitionContainer, cQ as FlowDefinitionNode, cL as FlowDefinitionNodeBase, cN as FlowDefinitionStep, cz as FlowErrorStrategy, j as FlowExecutionEvent, cn as FlowFailedEvent, cf as FlowInstanceStatus, cg as FlowInstanceStatusResponse, cl as FlowResumedEvent, ce as FlowRunResponse, bY as FlowRunResult, cM as FlowStepProperties, ck as FlowWaitingEvent, i as FlowsApi, c0 as FunctionInvokeOptions, c1 as FunctionInvokeResponse, c2 as FunctionInvokeSyncResponse, b_ as FunctionsApi, cE as HandoffTarget, aq as HttpArchetypes, V as HttpCurrentUser, O as HttpDatabase, ar as HttpElementTypes, b$ as HttpFunctionsApi, ap as HttpNodeTypes, W as HttpUserNode, Q as HttpWorkspaceClient, cC as HumanTaskType, aF as IdentityAuthError, aE as IdentityAuthResponse, I as IdentityUser, c_ as InboxApi, c$ as InboxApiOptions, cS as InboxTask, cT as InboxTaskStatus, aM as IncomingRelation, dq as ListConversationsOptions, ak as ListInvocationsFilter, d0 as ListTasksOptions, d1 as ListTasksResponse, aC as LocalStorageTokenStorage, cu as LogEvent, bo as LogLevel, bu as LoggerConfig, c9 as McpCallToolResult, c3 as McpClient, c8 as McpContentBlock, c5 as McpFrameStream, c6 as McpJsonRpcFrame, cb as McpReadResourceResult, ca as McpResourceContents, cd as McpResourceSubscription, cc as McpResourceUpdate, c7 as McpToolDescriptor, c4 as McpTransport, aB as MemoryTokenStorage, d6 as MessageBody, dh as MessageChild, ct as MessageSavedEvent, a4 as NodeCreateDeepOptions, aP as NodeCreateDeepPayload, a3 as NodeCreateOptions, aO as NodeCreatePayload, aR as NodeDeletePayload, ah as NodeDiffInfo, aI as NodeEventPayload, bQ as NodeFileSource, aS as NodeGetPayload, aT as NodeHistoryPayload, a2 as NodeOperations, a6 as NodeQueryOptions, aX as NodeQueryPayload, aN as NodeRelationships, a9 as NodeTypes, a5 as NodeUpdateOptions, aQ as NodeUpdatePayload, dv as PlanActionOptions, du as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, di as PlanTask, cV as RETRY_STRATEGIES, cw as RaisinReference, bn as ReconnectManager, bb as RefreshTokenPayload, aY as RelationAddPayload, aZ as RelationRemovePayload, a_ as RelationsGetPayload, aJ as RequestContext, aG as RequestEnvelope, bh as RequestType, aH as ResponseEnvelope, aL as ResponseMetadata, bi as ResponseStatus, cA as RetryConfig, cB as RetryStrategy, aU as RevisionEntry, al as ScheduleInvocationOptions, am as ScheduledInvocation, an as ScheduledInvocationRef, ao as ScheduledInvocationTargetKind, aj as SchedulerApi, as as SchemaCommit, ds as SendMessageOptions, X as SignAssetOptions, Y as SignedAssetUrl, at as SqlQuery, a$ as SqlQueryPayload, b0 as SqlResult, ci as StepCompletedEvent, cy as StepErrorBehavior, cj as StepFailedEvent, ch as StepStartedEvent, b6 as SubscribePayload, ay as Subscription, S as SubscriptionFilters, b8 as SubscriptionResponse, ai as Tags, cU as TaskCompletionResult, cD as TaskOption, co as TextChunkEvent, cr as ThoughtChunkEvent, aD as TokenStorage, cq as ToolCallCompletedEvent, T as ToolCallInfo, dg as ToolCallRecord, cp as ToolCallStartedEvent, a7 as Transaction, bc as TransactionBeginPayload, bd as TransactionBeginResponse, be as TransactionCommitPayload, bf as TransactionCommitResponse, a8 as TransactionOptions, bg as TransactionRollbackPayload, b7 as UnsubscribePayload, bz as Upload, bH as UploadError, bW as UploadManager, bw as UploadOptions, bx as UploadProgress, by as UploadResult, bv as UploadStatus, bD as UploadStatusResponse, bV as Uploader, M as UserChangeCallback, L as UserChangeEvent, z as UserNode, b1 as Workspace, _ as WorkspaceClient, a0 as WorkspaceCreateOptions, b2 as WorkspaceCreatePayload, b4 as WorkspaceDeletePayload, b3 as WorkspaceGetPayload, $ as WorkspaceManager, a1 as WorkspaceUpdateOptions, b5 as WorkspaceUpdatePayload, bT as calculateChunkCount, bq as configureLogger, bR as createFileSource, au as createSqlHandler, bk as decodeMessage, bj as encodeMessage, bU as getChunkRange, bS as getContentType, bs as getLogLevel, bt as getLoggerConfig, cW as getRefDisplayName, cX as getRefPath, bl as isEventMessage, cZ as isFlowDefinitionContainer, cY as isFlowDefinitionStep, bm as isResponseEnvelope, cv as isTerminalEvent, bp as logger, dx as projectPlansFromMessages, br as setLogLevel } from './conversation-list-store-S5MPSqoB.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-Bs7UkpRs.js';
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-CU5mi_PE.js';
2
+ export { cK as AiContainerConfig, cJ as AiErrorBehavior, cI as AiToolMode, aa as Archetypes, aW as AuditLogEntry, aV as AuditQueryPayload, G as AuthEvent, A as AuthManager, J as AuthStateChange, K as AuthStateChangeCallback, b9 as AuthenticatePayload, ba as AuthenticateResponse, bG as BatchFileProgress, ad as BranchDiff, ae as BranchDivergence, ac as Branches, bP as BrowserFileSource, d8 as ChatAssistantMessageEvent, da as ChatCompletedEvent, dj as ChatConversationCreatedEvent, dc as ChatDoneEvent, d2 as ChatEvent, db as ChatFailedEvent, dm as ChatLogEvent, b as ChatMessage, dl as ChatMessageDeliveredEvent, dk as ChatMessageSavedEvent, cH as ChatStepConfig, cG as ChatTerminationConfig, cF as ChatTerminationMode, d7 as ChatTextChunkEvent, df as ChatThoughtChunkEvent, de as ChatToolCallCompletedEvent, dd as ChatToolCallStartedEvent, d9 as ChatWaitingEvent, bC as ChunkUploadResponse, x as ClientMode, bE as CompleteUploadRequest, bF as CompleteUploadResponse, az as Connection, aA as ConnectionOptions, C as ConnectionState, cO as ContainerRule, cx as ContainerType, d3 as Conversation, cs as ConversationCreatedEvent, d as ConversationListItem, h as ConversationListSnapshot, e as ConversationListStore, g as ConversationListStoreOptions, dn as ConversationManager, dw as ConversationManagerOptions, d5 as ConversationStatus, c as ConversationStore, f as ConversationStoreOptions, a as ConversationStoreSnapshot, dt as ConversationSubscription, d4 as ConversationType, dr as CreateConvoOptions, bA as CreateUploadRequest, bB as CreateUploadResponse, af as CrossBranchCopySummary, ag as CrossBranchNodeChange, y as CurrentUser, bO as DEFAULT_BATCH_CONCURRENCY, bN as DEFAULT_BRANCH, bI as DEFAULT_CHUNK_SIZE, bJ as DEFAULT_MAX_RETRIES, bM as DEFAULT_NODE_TYPE, bK as DEFAULT_RETRY_BASE_DELAY, bL as DEFAULT_RETRY_MAX_DELAY, dp as DEFAULT_SEND_MESSAGE_INACTIVITY_TIMEOUT_MS, D as Database, Z as DatabaseHttpOptions, ab as ElementTypes, aK as ErrorInfo, ax as EventCallback, av as EventHandler, E as EventMessage, aw as EventSubscriptions, bX as FlowClient, F as FlowClientOptions, bZ as FlowCollectResult, cm as FlowCompletedEvent, cR as FlowDefinition, cP as FlowDefinitionContainer, cQ as FlowDefinitionNode, cL as FlowDefinitionNodeBase, cN as FlowDefinitionStep, cz as FlowErrorStrategy, j as FlowExecutionEvent, cn as FlowFailedEvent, cf as FlowInstanceStatus, cg as FlowInstanceStatusResponse, cl as FlowResumedEvent, ce as FlowRunResponse, bY as FlowRunResult, cM as FlowStepProperties, ck as FlowWaitingEvent, i as FlowsApi, c0 as FunctionInvokeOptions, c1 as FunctionInvokeResponse, c2 as FunctionInvokeSyncResponse, b_ as FunctionsApi, cE as HandoffTarget, aq as HttpArchetypes, V as HttpCurrentUser, O as HttpDatabase, ar as HttpElementTypes, b$ as HttpFunctionsApi, ap as HttpNodeTypes, W as HttpUserNode, Q as HttpWorkspaceClient, cC as HumanTaskType, aF as IdentityAuthError, aE as IdentityAuthResponse, I as IdentityUser, c_ as InboxApi, c$ as InboxApiOptions, cS as InboxTask, cT as InboxTaskStatus, aM as IncomingRelation, dq as ListConversationsOptions, ak as ListInvocationsFilter, d0 as ListTasksOptions, d1 as ListTasksResponse, aC as LocalStorageTokenStorage, cu as LogEvent, bo as LogLevel, bu as LoggerConfig, c9 as McpCallToolResult, c3 as McpClient, c8 as McpContentBlock, c5 as McpFrameStream, c6 as McpJsonRpcFrame, cb as McpReadResourceResult, ca as McpResourceContents, cd as McpResourceSubscription, cc as McpResourceUpdate, c7 as McpToolDescriptor, c4 as McpTransport, aB as MemoryTokenStorage, d6 as MessageBody, dh as MessageChild, ct as MessageSavedEvent, a4 as NodeCreateDeepOptions, aP as NodeCreateDeepPayload, a3 as NodeCreateOptions, aO as NodeCreatePayload, aR as NodeDeletePayload, ah as NodeDiffInfo, aI as NodeEventPayload, bQ as NodeFileSource, aS as NodeGetPayload, aT as NodeHistoryPayload, a2 as NodeOperations, a6 as NodeQueryOptions, aX as NodeQueryPayload, aN as NodeRelationships, a9 as NodeTypes, a5 as NodeUpdateOptions, aQ as NodeUpdatePayload, dv as PlanActionOptions, du as PlanActionReceipt, P as PlanProjection, k as PlanProjectionTask, di as PlanTask, cV as RETRY_STRATEGIES, cw as RaisinReference, bn as ReconnectManager, bb as RefreshTokenPayload, aY as RelationAddPayload, aZ as RelationRemovePayload, a_ as RelationsGetPayload, aJ as RequestContext, aG as RequestEnvelope, bh as RequestType, aH as ResponseEnvelope, aL as ResponseMetadata, bi as ResponseStatus, cA as RetryConfig, cB as RetryStrategy, aU as RevisionEntry, al as ScheduleInvocationOptions, am as ScheduledInvocation, an as ScheduledInvocationRef, ao as ScheduledInvocationTargetKind, aj as SchedulerApi, as as SchemaCommit, ds as SendMessageOptions, X as SignAssetOptions, Y as SignedAssetUrl, at as SqlQuery, a$ as SqlQueryPayload, b0 as SqlResult, ci as StepCompletedEvent, cy as StepErrorBehavior, cj as StepFailedEvent, ch as StepStartedEvent, b6 as SubscribePayload, ay as Subscription, S as SubscriptionFilters, b8 as SubscriptionResponse, ai as Tags, cU as TaskCompletionResult, cD as TaskOption, co as TextChunkEvent, cr as ThoughtChunkEvent, aD as TokenStorage, cq as ToolCallCompletedEvent, T as ToolCallInfo, dg as ToolCallRecord, cp as ToolCallStartedEvent, a7 as Transaction, bc as TransactionBeginPayload, bd as TransactionBeginResponse, be as TransactionCommitPayload, bf as TransactionCommitResponse, a8 as TransactionOptions, bg as TransactionRollbackPayload, b7 as UnsubscribePayload, bz as Upload, bH as UploadError, bW as UploadManager, bw as UploadOptions, bx as UploadProgress, by as UploadResult, bv as UploadStatus, bD as UploadStatusResponse, bV as Uploader, M as UserChangeCallback, L as UserChangeEvent, z as UserNode, b1 as Workspace, _ as WorkspaceClient, a0 as WorkspaceCreateOptions, b2 as WorkspaceCreatePayload, b4 as WorkspaceDeletePayload, b3 as WorkspaceGetPayload, $ as WorkspaceManager, a1 as WorkspaceUpdateOptions, b5 as WorkspaceUpdatePayload, bT as calculateChunkCount, bq as configureLogger, bR as createFileSource, au as createSqlHandler, bk as decodeMessage, bj as encodeMessage, bU as getChunkRange, bS as getContentType, bs as getLogLevel, bt as getLoggerConfig, cW as getRefDisplayName, cX as getRefPath, bl as isEventMessage, cZ as isFlowDefinitionContainer, cY as isFlowDefinitionStep, bm as isResponseEnvelope, cv as isTerminalEvent, bp as logger, dx as projectPlansFromMessages, br as setLogLevel } from './conversation-list-store-CU5mi_PE.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-sFvMihQA.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-DO1X-WO3.js';
5
+ export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-B2G94Q9p.js';
6
6
  export { RaisinVue, VueComputedRef, VueLike, VueRef, createRaisinVue } from './vue.js';
7
7
  import 'events';
8
8
  import 'fs/promises';
@@ -65,7 +65,12 @@ declare class NodeBuilder {
65
65
  */
66
66
  children(children: string[]): this;
67
67
  /**
68
- * Set the order key
68
+ * Set the order key.
69
+ *
70
+ * @deprecated The server owns editorial ordering: the order key is assigned by
71
+ * the ordering index on write, so any value set here is overwritten. To place a
72
+ * node, create it (it appends to the end of its parent) then call
73
+ * `nodes.reorder()`, `nodes.moveChildBefore()` or `nodes.moveChildAfter()`.
69
74
  */
70
75
  orderKey(orderKey: string): this;
71
76
  /**
package/dist/index.js CHANGED
@@ -1622,17 +1622,40 @@ var NodeOperations = class {
1622
1622
  // Tree Operations
1623
1623
  // ========================================================================
1624
1624
  /**
1625
- * List children of a parent node
1625
+ * List children of a parent node, in editorial (drag-and-drop) order.
1626
1626
  *
1627
1627
  * @param parentPath - Path of the parent node
1628
1628
  * @returns Array of child nodes
1629
1629
  */
1630
1630
  async listChildren(parentPath) {
1631
+ const { items } = await this.listChildrenPage(parentPath);
1632
+ return items;
1633
+ }
1634
+ /**
1635
+ * List one page of a parent's children, in editorial order.
1636
+ *
1637
+ * Pagination is keyset-based: pass the previous response's `nextCursor` back as
1638
+ * `cursor` to get the following page. `nextCursor` is `null` on the last page.
1639
+ * Treat the cursor as opaque — do not parse or construct it.
1640
+ *
1641
+ * @param parentPath - Path of the parent node
1642
+ * @param options - `cursor` from a previous page, and page `limit`
1643
+ */
1644
+ async listChildrenPage(parentPath, options = {}) {
1631
1645
  const payload = {
1632
1646
  parent_path: parentPath
1633
1647
  };
1648
+ if (options.cursor !== void 0) payload.cursor = options.cursor;
1649
+ if (options.limit !== void 0) payload.limit = options.limit;
1634
1650
  const result = await this.sendRequest(payload, "node_list_children");
1635
- return result;
1651
+ if (Array.isArray(result)) {
1652
+ return { items: result, nextCursor: null };
1653
+ }
1654
+ const page = result;
1655
+ return {
1656
+ items: page.nodes ?? [],
1657
+ nextCursor: page.next_cursor == null ? null : JSON.stringify(page.next_cursor)
1658
+ };
1636
1659
  }
1637
1660
  /**
1638
1661
  * Get a node tree starting from a root node
@@ -1740,53 +1763,54 @@ var NodeOperations = class {
1740
1763
  return result;
1741
1764
  }
1742
1765
  /**
1743
- * Reorder a node by setting a new order key
1766
+ * Move a child to a specific position among its siblings.
1744
1767
  *
1745
- * @param nodePath - Node path
1746
- * @param orderKey - New order key (base62-encoded fractional index)
1747
- * @returns Reordered node
1768
+ * Positions are 0-based; a position past the end appends. The server owns the
1769
+ * fractional order key — you name a position, it mints the key.
1770
+ *
1771
+ * @param parentPath - Parent node path
1772
+ * @param childName - Name of the child to move (not a full path)
1773
+ * @param position - Target 0-based position among the parent's children
1774
+ * @returns The reordered node, carrying its newly assigned `order_key`
1748
1775
  */
1749
- async reorder(nodePath, orderKey) {
1776
+ async reorder(parentPath, childName, position) {
1750
1777
  const payload = {
1751
- node_path: nodePath,
1752
- order_key: orderKey
1778
+ parent_path: parentPath,
1779
+ child_name: childName,
1780
+ position
1753
1781
  };
1754
1782
  const result = await this.sendRequest(payload, "node_reorder");
1755
1783
  return result;
1756
1784
  }
1757
1785
  /**
1758
- * Move a child node before a reference sibling
1786
+ * Move a child so it sits immediately before one of its siblings.
1759
1787
  *
1760
1788
  * @param parentPath - Parent node path
1761
- * @param childPath - Child node path to move
1762
- * @param referencePath - Reference sibling path to position before
1763
- * @returns Moved node
1789
+ * @param childName - Name of the child to move (not a full path)
1790
+ * @param beforeChildName - Name of the sibling to sit before
1764
1791
  */
1765
- async moveChildBefore(parentPath, childPath, referencePath) {
1792
+ async moveChildBefore(parentPath, childName, beforeChildName) {
1766
1793
  const payload = {
1767
1794
  parent_path: parentPath,
1768
- child_path: childPath,
1769
- reference_path: referencePath
1795
+ child_name: childName,
1796
+ before_child_name: beforeChildName
1770
1797
  };
1771
- const result = await this.sendRequest(payload, "node_move_child_before");
1772
- return result;
1798
+ await this.sendRequest(payload, "node_move_child_before");
1773
1799
  }
1774
1800
  /**
1775
- * Move a child node after a reference sibling
1801
+ * Move a child so it sits immediately after one of its siblings.
1776
1802
  *
1777
1803
  * @param parentPath - Parent node path
1778
- * @param childPath - Child node path to move
1779
- * @param referencePath - Reference sibling path to position after
1780
- * @returns Moved node
1804
+ * @param childName - Name of the child to move (not a full path)
1805
+ * @param afterChildName - Name of the sibling to sit after
1781
1806
  */
1782
- async moveChildAfter(parentPath, childPath, referencePath) {
1807
+ async moveChildAfter(parentPath, childName, afterChildName) {
1783
1808
  const payload = {
1784
1809
  parent_path: parentPath,
1785
- child_path: childPath,
1786
- reference_path: referencePath
1810
+ child_name: childName,
1811
+ after_child_name: afterChildName
1787
1812
  };
1788
- const result = await this.sendRequest(payload, "node_move_child_after");
1789
- return result;
1813
+ await this.sendRequest(payload, "node_move_child_after");
1790
1814
  }
1791
1815
  /**
1792
1816
  * Replay a parent's child order from another branch onto the current branch.
@@ -9933,7 +9957,12 @@ var NodeBuilder = class _NodeBuilder {
9933
9957
  return this;
9934
9958
  }
9935
9959
  /**
9936
- * Set the order key
9960
+ * Set the order key.
9961
+ *
9962
+ * @deprecated The server owns editorial ordering: the order key is assigned by
9963
+ * the ordering index on write, so any value set here is overwritten. To place a
9964
+ * node, create it (it appends to the end of its parent) then call
9965
+ * `nodes.reorder()`, `nodes.moveChildBefore()` or `nodes.moveChildAfter()`.
9937
9966
  */
9938
9967
  orderKey(orderKey) {
9939
9968
  this.node.order_key = orderKey;
@@ -10013,10 +10042,10 @@ var NodeBuilder = class _NodeBuilder {
10013
10042
  if (!this.node.node_type) {
10014
10043
  throw new Error("Node type is required");
10015
10044
  }
10045
+ if (this.node.order_key === void 0) this.node.order_key = "";
10016
10046
  if (!this.node.children) this.node.children = [];
10017
10047
  if (!this.node.relations) this.node.relations = [];
10018
10048
  if (!this.node.properties) this.node.properties = {};
10019
- if (!this.node.order_key) this.node.order_key = "a";
10020
10049
  if (typeof this.node.version !== "number") this.node.version = 1;
10021
10050
  return this.node;
10022
10051
  }
@@ -10098,8 +10127,8 @@ var NodeHelpers = class {
10098
10127
  node_type: "MockType",
10099
10128
  properties: {},
10100
10129
  children: [],
10130
+ order_key: "",
10101
10131
  relations: [],
10102
- order_key: "a",
10103
10132
  version: 1,
10104
10133
  ...overrides
10105
10134
  };