@kirkchinese/dsh-citeciter 0.5.0 → 0.8.0

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.
Files changed (101) hide show
  1. package/README.md +89 -70
  2. package/README.zh.md +91 -70
  3. package/lib/client.js +7028 -1167
  4. package/lib/index.js +1786 -587
  5. package/lib/{typert-common-DKqYKnRO.js → typert-common-DxE1_Bn_.js} +1 -1
  6. package/lib/typert.host.js +2 -2
  7. package/lib/typert.remote-client.js +1 -1
  8. package/lib/types/actions.d.ts +47 -0
  9. package/lib/types/board-capture.d.ts +11 -0
  10. package/lib/types/board.d.ts +4 -4
  11. package/lib/types/citation-mapping.d.ts +8 -0
  12. package/lib/types/citer-agent-registry.d.ts +21 -0
  13. package/lib/types/citer-session-access.d.ts +11 -0
  14. package/lib/types/citer-session-store.d.ts +7 -0
  15. package/lib/types/citer-session-world.d.ts +21 -0
  16. package/lib/types/client/action-controller.d.ts +61 -0
  17. package/lib/types/client/action-executor.d.ts +6 -0
  18. package/lib/types/client/board-capture-target.d.ts +8 -0
  19. package/lib/types/client/citer-session-face.d.ts +59 -0
  20. package/lib/types/client/compact-navigation.d.ts +3 -0
  21. package/lib/types/client/companion-controller.d.ts +19 -5
  22. package/lib/types/client/components/ActionWheel.d.ts +12 -0
  23. package/lib/types/client/components/BlackboardWorkspace.d.ts +7 -5
  24. package/lib/types/client/components/BoardCaptureSurface.d.ts +8 -0
  25. package/lib/types/client/components/BoardView.d.ts +5 -3
  26. package/lib/types/client/components/ChoicePopover.d.ts +8 -0
  27. package/lib/types/client/components/CiteCiterSettings.d.ts +12 -7
  28. package/lib/types/client/components/CiteLauncher.d.ts +9 -0
  29. package/lib/types/client/components/CitePanel.d.ts +15 -5
  30. package/lib/types/client/components/CompactBackButton.d.ts +4 -0
  31. package/lib/types/client/components/DocumentReader.d.ts +12 -3
  32. package/lib/types/client/components/FileAttachments.d.ts +9 -0
  33. package/lib/types/client/components/FileDropHint.d.ts +5 -0
  34. package/lib/types/client/components/LearningCards.d.ts +12 -0
  35. package/lib/types/client/components/LearningRoute.d.ts +7 -0
  36. package/lib/types/client/components/MessageAttachments.d.ts +12 -0
  37. package/lib/types/client/components/MessageFile.d.ts +8 -0
  38. package/lib/types/client/components/ModelChoice.d.ts +10 -0
  39. package/lib/types/client/components/NativeInteraction.d.ts +7 -0
  40. package/lib/types/client/components/NativeLearningDocument.d.ts +9 -0
  41. package/lib/types/client/components/NativeQueue.d.ts +6 -0
  42. package/lib/types/client/components/OverlayPortal.d.ts +10 -0
  43. package/lib/types/client/components/PermissionControl.d.ts +7 -0
  44. package/lib/types/client/components/QuestionCard.d.ts +10 -4
  45. package/lib/types/client/components/ReasoningDisclosure.d.ts +5 -0
  46. package/lib/types/client/components/ReferenceAttachments.d.ts +6 -0
  47. package/lib/types/client/components/TopicActions.d.ts +6 -0
  48. package/lib/types/client/components/TopicComposer.d.ts +36 -0
  49. package/lib/types/client/components/TopicHeader.d.ts +10 -0
  50. package/lib/types/client/components/TopicModelControls.d.ts +9 -0
  51. package/lib/types/client/components/TopicNavigation.d.ts +12 -0
  52. package/lib/types/client/components/TopicSettingsDialog.d.ts +21 -0
  53. package/lib/types/client/components/TopicTitle.d.ts +6 -0
  54. package/lib/types/client/components/UpdateNotice.d.ts +6 -3
  55. package/lib/types/client/components/UserMessageBody.d.ts +4 -0
  56. package/lib/types/client/components/WheelSettings.d.ts +7 -0
  57. package/lib/types/client/copy.d.ts +6 -0
  58. package/lib/types/client/dock-geometry.d.ts +23 -0
  59. package/lib/types/client/draft-references.d.ts +20 -0
  60. package/lib/types/client/entries.d.ts +3 -2
  61. package/lib/types/client/file-download.d.ts +16 -0
  62. package/lib/types/client/file-drop.d.ts +18 -0
  63. package/lib/types/client/host-dock.d.ts +18 -0
  64. package/lib/types/client/learning-route.d.ts +10 -0
  65. package/lib/types/client/native-composer.d.ts +18 -0
  66. package/lib/types/client/native-document.d.ts +13 -0
  67. package/lib/types/client/panel-drag.d.ts +10 -0
  68. package/lib/types/client/reader-controller.d.ts +7 -1
  69. package/lib/types/client/request-guard.d.ts +3 -2
  70. package/lib/types/client/selection.d.ts +1 -1
  71. package/lib/types/client/submission-preference.d.ts +5 -0
  72. package/lib/types/client/transcript-position.d.ts +6 -0
  73. package/lib/types/client/types.d.ts +6 -5
  74. package/lib/types/client/update-controller.d.ts +5 -3
  75. package/lib/types/client/view-actions.d.ts +26 -0
  76. package/lib/types/client/wheel-gesture.d.ts +13 -0
  77. package/lib/types/document-pages.d.ts +4 -0
  78. package/lib/types/documents.d.ts +7 -5
  79. package/lib/types/host-agent-modules.d.ts +15 -0
  80. package/lib/types/host-session-adapter.d.ts +31 -0
  81. package/lib/types/index.d.ts +6 -6
  82. package/lib/types/learning.d.ts +72 -0
  83. package/lib/types/native-attachment-read.d.ts +19 -0
  84. package/lib/types/native-session-contract.d.ts +198 -0
  85. package/lib/types/native-session-read.d.ts +4 -0
  86. package/lib/types/observer.d.ts +2 -1
  87. package/lib/types/owned-session-cleanup.d.ts +2 -0
  88. package/lib/types/service.d.ts +1 -1
  89. package/lib/types/session-migration.d.ts +3 -0
  90. package/lib/types/source-session.d.ts +7 -0
  91. package/lib/types/source-storage.d.ts +12 -0
  92. package/lib/types/topic-index.d.ts +75 -0
  93. package/lib/types/topic-runtime.d.ts +21 -57
  94. package/lib/types/topic-stream.d.ts +14 -0
  95. package/lib/types/topic.d.ts +301 -2
  96. package/lib/types/typert-common.d.ts +211 -1
  97. package/lib/types/typert.host.d.ts +456 -3
  98. package/lib/types/update.d.ts +1 -0
  99. package/lib/{update-u9-6c_qp.js → update-0LcFDvI5.js} +281 -14
  100. package/package.json +83 -70
  101. package/lib/types/client/components/SelectionMenu.d.ts +0 -13
@@ -1,10 +1,9 @@
1
1
  import { Context } from '@deepseek-ai/cordis';
2
- import { type SessionEvent, type SessionHeader } from '@deepseek-ai/dsh-session';
2
+ import { SessionLogOffset, type SessionEvent, type SessionHeader } from '@deepseek-ai/dsh-session';
3
3
  import { type SessionTitleProviderRequest } from '@deepseek-ai/dsh-session-title';
4
- import { z } from 'zod';
5
4
  import { type BoardSnapshot } from './board.ts';
6
5
  import { type ObserverSourceSnapshot } from './observer.ts';
7
- import { type CiteCiterRequest, type CiteCiterResponse, type CiteCiterSettings, type CitationRecord, type TopicMessage, type TopicMetadata, type TopicMode, type TopicScenario, type TopicSummary } from './topic.ts';
6
+ import { type CiteCiterRequest, type CiteCiterResponse, type CiteCiterSettings, type CitationRecord, type TopicMessage, type TopicMode, type TopicScenario, type TopicSummary } from './topic.ts';
8
7
  type CreateRequest = Extract<CiteCiterRequest, {
9
8
  action: 'create';
10
9
  }>;
@@ -246,54 +245,9 @@ export declare function selectTopicTitleMessage(request: SessionTitleProviderReq
246
245
  export interface RuntimeTopicLog {
247
246
  readonly header: SessionHeader;
248
247
  readonly events: readonly SessionEvent[];
249
- }
250
- /**
251
- * Remove one artifact from a caller-owned JSONL root without following links.
252
- * @param root - fixed private JSONL root owned by the caller.
253
- * @param artifact - location returned by that exact JSONL backend.
254
- * @returns when the file/link and its empty per-session directory are absent.
255
- */
256
- export declare function removeOwnedJsonlArtifact(root: string, artifact: {
257
- readonly kind: string;
258
- readonly path: string;
259
- } | undefined): Promise<void>;
260
- declare const topicDeletionMarkerSchema: z.ZodObject<{
261
- schemaVersion: z.ZodLiteral<1>;
262
- sessionId: z.ZodString;
263
- sourceSessionId: z.ZodString;
264
- topicId: z.ZodNumber;
265
- sessionHeader: z.ZodObject<{
266
- version: z.ZodNumber;
267
- id: z.ZodString;
268
- createdAt: z.ZodNumber;
269
- cwd: z.ZodOptional<z.ZodString>;
270
- }, z.core.$strict>;
271
- }, z.core.$strict>;
272
- type TopicDeletionMarker = Omit<z.infer<typeof topicDeletionMarkerSchema>, 'sessionHeader'> & {
273
- readonly sessionHeader: SessionHeader;
274
- };
275
- /** Minimal on-disk navigation index; Session history stays in standard DSH JSONL. */
276
- export declare class TopicIndex {
277
- private readonly root;
278
- /** @param root - private Topic index root. */
279
- constructor(root?: string);
280
- reserve(sourceSessionId: string): Promise<{
281
- topicId: number;
282
- directory: string;
283
- }>;
284
- save(metadata: TopicMetadata): Promise<void>;
285
- loadBySessionId(sessionId: string): Promise<TopicMetadata>;
286
- list(sourceSessionId: string): Promise<TopicMetadata[]>;
287
- /** Commit a minimal deletion marker before making Topic metadata unreachable. */
288
- markDeleting(metadata: TopicMetadata, sessionHeader: SessionHeader): Promise<TopicDeletionMarker>;
289
- /** Discover committed deletion markers without following linked directories. */
290
- listDeleting(): Promise<TopicDeletionMarker[]>;
291
- /** Remove the marker and its now-empty Topic directory after artifact cleanup. */
292
- finishDeleting(marker: TopicDeletionMarker): Promise<void>;
293
- private directory;
294
- private read;
295
- private readIfPresent;
296
- private deletionMarkerIfPresent;
248
+ readonly inheritedEventCount: SessionLogOffset;
249
+ readonly liveMessage?: TopicMessage | undefined;
250
+ readonly renderKeys?: ReadonlyMap<number, string> | undefined;
297
251
  }
298
252
  /**
299
253
  * Project transcript rows and the latest turn's active failure banner.
@@ -323,8 +277,12 @@ export declare function firstPostSeedUserQuestion(log: RuntimeTopicLog): string
323
277
  * @returns the matching question, or `null` when the request is not committed.
324
278
  */
325
279
  export declare function postSeedUserQuestionById(log: RuntimeTopicLog, messageId: string): string | null;
326
- /** Fold only titles created inside the private Topic, excluding inherited fork titles. */
327
- export declare function foldTopicTitle(metadata: TopicMetadata, events: readonly SessionEvent[]): import("@deepseek-ai/dsh-session-title").SessionTitleSnapshot | undefined;
280
+ /**
281
+ * Fold child-owned titles using the restored logical prefix, including after migration.
282
+ * @param log - restored Topic events and the host-owned inherited event count.
283
+ * @returns the latest Topic title projection, or undefined before any title is recorded.
284
+ */
285
+ export declare function foldTopicTitle(log: RuntimeTopicLog): import("@deepseek-ai/dsh-session-title").SessionTitleSnapshot | undefined;
328
286
  /** Resolve the actual Topic mode without forking through an open DSH turn. */
329
287
  export declare function resolveTopicModeAndSeed(requested: CreateRequest, source: ObserverSourceSnapshot, anchorSeq: number): {
330
288
  mode: TopicMode;
@@ -336,7 +294,9 @@ export declare class TopicRuntime {
336
294
  private readonly host;
337
295
  private readonly settings;
338
296
  private readonly runtime;
297
+ private readonly native;
339
298
  private readonly index;
299
+ private readonly sourceStorage;
340
300
  private readonly documents;
341
301
  private readonly lifecycleAbort;
342
302
  private readonly fibers;
@@ -357,13 +317,12 @@ export declare class TopicRuntime {
357
317
  private readonly sourceAvailabilityChecks;
358
318
  private readonly ready;
359
319
  private readonly topicListeners;
320
+ private readonly streams;
360
321
  private disposal;
361
322
  private releasing;
362
323
  private releaseLlm;
363
324
  private releaseFs;
364
325
  private releaseSubprocess;
365
- private releaseSandboxPolicy;
366
- private releaseQuestionProvider;
367
326
  private hasSourceFiles;
368
327
  private closed;
369
328
  /** @param host - owning DSH context. @param settings - current user preferences. */
@@ -378,6 +337,7 @@ export declare class TopicRuntime {
378
337
  * @returns disposer removing the exact listener.
379
338
  */
380
339
  onTopicChange(listener: TopicChangeListener): () => void;
340
+ private readonly boardCapture;
381
341
  private executeRequest;
382
342
  /** Stop every owned Agent and plugin fiber before releasing bridged services. */
383
343
  dispose(): Promise<void>;
@@ -385,6 +345,8 @@ export declare class TopicRuntime {
385
345
  private beginClosing;
386
346
  private assertOpen;
387
347
  private start;
348
+ /** Adopt existing Citer histories into each source directory without deleting or rewriting their original logs. */
349
+ private migrateStorage;
388
350
  private releaseRuntime;
389
351
  private releaseOwnedRuntime;
390
352
  private settleOwnedOperations;
@@ -394,8 +356,10 @@ export declare class TopicRuntime {
394
356
  private createIdempotent;
395
357
  private resumeOrCreate;
396
358
  private createHandle;
359
+ private setupHostedAgent;
397
360
  private setupAgent;
398
361
  private globTool;
362
+ private learningCardsTool;
399
363
  private blackboardApplyTool;
400
364
  private readDocumentTool;
401
365
  private searchDocumentTool;
@@ -416,9 +380,9 @@ export declare class TopicRuntime {
416
380
  private archive;
417
381
  private delete;
418
382
  private deleteAdmitted;
419
- /** Await rc.2 JSONL retirement without populating its prepared-session cache. */
383
+ /** Observe the retired Session after its Agent has released write ownership. */
420
384
  private readRetiredSessionHeader;
421
- /** Remove one artifact only from CiteCiter's fixed private JSONL backend. */
385
+ /** Remove every retired generation only from CiteCiter's fixed private JSONL backend. */
422
386
  private removeSessionArtifact;
423
387
  private finishDeletion;
424
388
  private recoverDeletions;
@@ -0,0 +1,14 @@
1
+ /** Process-local Topic output; durable settlements remain owned by DSH Session. */
2
+ import type { AssistantStreamFrame } from '@deepseek-ai/dsh-agent';
3
+ import type { TopicMessage } from './topic.ts';
4
+ /** One Agent's ordered live stream. Dispose the instance with that Agent. */
5
+ export declare class TopicStreamProjection {
6
+ private active;
7
+ private readonly settled;
8
+ /** Exact end-frame receipts keep an existing UI row mounted after durable settlement; aliases expire with this Agent. */
9
+ get renderKeys(): ReadonlyMap<number, string>;
10
+ /** @param frame - scoped Agent publication. @param nextSeq - current Session event count. */
11
+ accept(frame: AssistantStreamFrame, nextSeq: number): void;
12
+ /** @returns a detached display row, absent before visible output or after settlement. */
13
+ snapshot(): TopicMessage | undefined;
14
+ }
@@ -54,7 +54,38 @@ export declare const citeCiterSettingsSchema: z.ZodObject<{
54
54
  }, z.core.$strict>>>;
55
55
  shortcutOpenPanel: z.ZodOptional<z.ZodString>;
56
56
  boardAnimations: z.ZodOptional<z.ZodBoolean>;
57
+ activeRecall: z.ZodOptional<z.ZodBoolean>;
57
58
  updateNotifications: z.ZodOptional<z.ZodBoolean>;
59
+ wheelSlots: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodObject<{
60
+ label: z.ZodString;
61
+ prompt: z.ZodString;
62
+ ask: z.ZodBoolean;
63
+ scenario: z.ZodEnum<{
64
+ qa: "qa";
65
+ present: "present";
66
+ }>;
67
+ presentation: z.ZodEnum<{
68
+ side: "side";
69
+ floating: "floating";
70
+ }>;
71
+ }, z.core.$strict>>>>;
72
+ wheelTrigger: z.ZodOptional<z.ZodEnum<{
73
+ "right-button": "right-button";
74
+ Alt: "Alt";
75
+ Control: "Control";
76
+ Shift: "Shift";
77
+ Meta: "Meta";
78
+ }>>;
79
+ defaultCiterModel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
80
+ provider: z.ZodString;
81
+ model: z.ZodString;
82
+ }, z.core.$strict>>>;
83
+ defaultPermission: z.ZodOptional<z.ZodEnum<{
84
+ "read-only": "read-only";
85
+ "workspace-write": "workspace-write";
86
+ "danger-full-access": "danger-full-access";
87
+ }>>;
88
+ learningRoute: z.ZodOptional<z.ZodBoolean>;
58
89
  }, z.core.$strict>;
59
90
  export type CiteCiterSettings = z.infer<typeof citeCiterSettingsSchema>;
60
91
  /** Settings used before an optional DSH settings provider becomes available. */
@@ -261,6 +292,8 @@ export declare const topicMetadataSchema: z.ZodObject<{
261
292
  investigate: "investigate";
262
293
  }>;
263
294
  documentId: z.ZodNullable<z.ZodString>;
295
+ hosted: z.ZodOptional<z.ZodBoolean>;
296
+ storage: z.ZodOptional<z.ZodLiteral<"source">>;
264
297
  topicId: z.ZodNumber;
265
298
  createRequestId: z.ZodOptional<z.ZodString>;
266
299
  sessionId: z.ZodString;
@@ -303,7 +336,19 @@ export type TopicMetadata = z.infer<typeof topicMetadataSchema>;
303
336
  * @returns canonical TopicMetadata.
304
337
  */
305
338
  export declare function parseTopicMetadataFile(raw: unknown): TopicMetadata;
339
+ export declare const permissionSchema: z.ZodEnum<{
340
+ "read-only": "read-only";
341
+ "workspace-write": "workspace-write";
342
+ "danger-full-access": "danger-full-access";
343
+ }>;
306
344
  export declare const topicSummarySchema: z.ZodObject<{
345
+ permission: z.ZodOptional<z.ZodEnum<{
346
+ "read-only": "read-only";
347
+ "workspace-write": "workspace-write";
348
+ "danger-full-access": "danger-full-access";
349
+ }>>;
350
+ hosted: z.ZodOptional<z.ZodBoolean>;
351
+ storage: z.ZodOptional<z.ZodLiteral<"source">>;
307
352
  topicId: z.ZodNumber;
308
353
  sessionId: z.ZodString;
309
354
  sourceSessionId: z.ZodString;
@@ -375,11 +420,20 @@ export declare const topicSummarySchema: z.ZodObject<{
375
420
  export type TopicSummary = z.infer<typeof topicSummarySchema>;
376
421
  export declare const topicMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
377
422
  role: z.ZodLiteral<"user">;
423
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
424
+ kind: z.ZodEnum<{
425
+ image: "image";
426
+ file: "file";
427
+ }>;
428
+ id: z.ZodString;
429
+ name: z.ZodString;
430
+ }, z.core.$strict>>>;
378
431
  text: z.ZodString;
379
432
  id: z.ZodString;
380
433
  seq: z.ZodNumber;
381
434
  }, z.core.$strict>, z.ZodObject<{
382
435
  role: z.ZodLiteral<"assistant">;
436
+ renderKey: z.ZodOptional<z.ZodString>;
383
437
  text: z.ZodString;
384
438
  reasoning: z.ZodNullable<z.ZodString>;
385
439
  streaming: z.ZodBoolean;
@@ -393,6 +447,14 @@ export declare const topicMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
393
447
  seq: z.ZodNumber;
394
448
  }, z.core.$strict>, z.ZodObject<{
395
449
  role: z.ZodLiteral<"tool">;
450
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
+ kind: z.ZodEnum<{
452
+ image: "image";
453
+ file: "file";
454
+ }>;
455
+ id: z.ZodString;
456
+ name: z.ZodString;
457
+ }, z.core.$strict>>>;
396
458
  name: z.ZodString;
397
459
  arguments: z.ZodString;
398
460
  result: z.ZodNullable<z.ZodString>;
@@ -450,7 +512,16 @@ export declare const pendingQuestionSchema: z.ZodObject<{
450
512
  }, z.core.$strict>;
451
513
  export type PendingQuestion = z.infer<typeof pendingQuestionSchema>;
452
514
  export declare const topicSnapshotSchema: z.ZodObject<{
515
+ captureId: z.ZodOptional<z.ZodString>;
516
+ documentTitle: z.ZodOptional<z.ZodString>;
453
517
  topic: z.ZodObject<{
518
+ permission: z.ZodOptional<z.ZodEnum<{
519
+ "read-only": "read-only";
520
+ "workspace-write": "workspace-write";
521
+ "danger-full-access": "danger-full-access";
522
+ }>>;
523
+ hosted: z.ZodOptional<z.ZodBoolean>;
524
+ storage: z.ZodOptional<z.ZodLiteral<"source">>;
454
525
  topicId: z.ZodNumber;
455
526
  sessionId: z.ZodString;
456
527
  sourceSessionId: z.ZodString;
@@ -521,11 +592,20 @@ export declare const topicSnapshotSchema: z.ZodObject<{
521
592
  }, z.core.$strict>;
522
593
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
523
594
  role: z.ZodLiteral<"user">;
595
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
596
+ kind: z.ZodEnum<{
597
+ image: "image";
598
+ file: "file";
599
+ }>;
600
+ id: z.ZodString;
601
+ name: z.ZodString;
602
+ }, z.core.$strict>>>;
524
603
  text: z.ZodString;
525
604
  id: z.ZodString;
526
605
  seq: z.ZodNumber;
527
606
  }, z.core.$strict>, z.ZodObject<{
528
607
  role: z.ZodLiteral<"assistant">;
608
+ renderKey: z.ZodOptional<z.ZodString>;
529
609
  text: z.ZodString;
530
610
  reasoning: z.ZodNullable<z.ZodString>;
531
611
  streaming: z.ZodBoolean;
@@ -539,6 +619,14 @@ export declare const topicSnapshotSchema: z.ZodObject<{
539
619
  seq: z.ZodNumber;
540
620
  }, z.core.$strict>, z.ZodObject<{
541
621
  role: z.ZodLiteral<"tool">;
622
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
623
+ kind: z.ZodEnum<{
624
+ image: "image";
625
+ file: "file";
626
+ }>;
627
+ id: z.ZodString;
628
+ name: z.ZodString;
629
+ }, z.core.$strict>>>;
542
630
  name: z.ZodString;
543
631
  arguments: z.ZodString;
544
632
  result: z.ZodNullable<z.ZodString>;
@@ -578,12 +666,12 @@ export declare const topicSnapshotSchema: z.ZodObject<{
578
666
  elements: z.ZodArray<z.ZodObject<{
579
667
  id: z.ZodString;
580
668
  kind: z.ZodEnum<{
669
+ image: "image";
581
670
  text: "text";
582
671
  markdown: "markdown";
583
672
  math: "math";
584
673
  svg: "svg";
585
674
  html: "html";
586
- image: "image";
587
675
  table: "table";
588
676
  }>;
589
677
  content: z.ZodString;
@@ -686,11 +774,17 @@ export declare const documentContentSchema: z.ZodObject<{
686
774
  }>;
687
775
  content: z.ZodString;
688
776
  truncated: z.ZodBoolean;
777
+ page: z.ZodDefault<z.ZodNumber>;
778
+ pageCount: z.ZodDefault<z.ZodNumber>;
689
779
  }, z.core.$strict>;
690
780
  export type DocumentContent = z.infer<typeof documentContentSchema>;
691
781
  /** One strict direct-RPC command for the private CiteCiter runtime. */
692
782
  export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
693
783
  action: z.ZodLiteral<"create">;
784
+ modelRoute: z.ZodOptional<z.ZodObject<{
785
+ provider: z.ZodString;
786
+ model: z.ZodString;
787
+ }, z.core.$strict>>;
694
788
  requestId: z.ZodString;
695
789
  sourceSessionId: z.ZodString;
696
790
  question: z.ZodString;
@@ -701,6 +795,10 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
701
795
  }>>;
702
796
  }, z.core.$strict>, z.ZodObject<{
703
797
  action: z.ZodLiteral<"create">;
798
+ modelRoute: z.ZodOptional<z.ZodObject<{
799
+ provider: z.ZodString;
800
+ model: z.ZodString;
801
+ }, z.core.$strict>>;
704
802
  requestId: z.ZodString;
705
803
  citation: z.ZodObject<{
706
804
  sourceSessionId: z.ZodString;
@@ -727,6 +825,10 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
727
825
  }>>;
728
826
  }, z.core.$strict>, z.ZodObject<{
729
827
  action: z.ZodLiteral<"create">;
828
+ modelRoute: z.ZodOptional<z.ZodObject<{
829
+ provider: z.ZodString;
830
+ model: z.ZodString;
831
+ }, z.core.$strict>>;
730
832
  requestId: z.ZodString;
731
833
  selectionClaim: z.ZodObject<{
732
834
  sourceSessionId: z.ZodString;
@@ -750,6 +852,10 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
750
852
  }>>;
751
853
  }, z.core.$strict>, z.ZodObject<{
752
854
  action: z.ZodLiteral<"create">;
855
+ modelRoute: z.ZodOptional<z.ZodObject<{
856
+ provider: z.ZodString;
857
+ model: z.ZodString;
858
+ }, z.core.$strict>>;
753
859
  requestId: z.ZodString;
754
860
  toolClaim: z.ZodObject<{
755
861
  sourceSessionId: z.ZodString;
@@ -775,6 +881,10 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
775
881
  }>>;
776
882
  }, z.core.$strict>, z.ZodObject<{
777
883
  action: z.ZodLiteral<"create">;
884
+ modelRoute: z.ZodOptional<z.ZodObject<{
885
+ provider: z.ZodString;
886
+ model: z.ZodString;
887
+ }, z.core.$strict>>;
778
888
  requestId: z.ZodString;
779
889
  documentClaim: z.ZodObject<{
780
890
  sourceSessionId: z.ZodString;
@@ -799,9 +909,23 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
799
909
  action: z.ZodLiteral<"list">;
800
910
  sourceSessionId: z.ZodString;
801
911
  includeArchived: z.ZodOptional<z.ZodBoolean>;
912
+ }, z.core.$strict>, z.ZodObject<{
913
+ action: z.ZodLiteral<"board-capture">;
914
+ topicSessionId: z.ZodString;
915
+ id: z.ZodString;
916
+ png: z.ZodOptional<z.ZodString>;
917
+ error: z.ZodOptional<z.ZodString>;
802
918
  }, z.core.$strict>, z.ZodObject<{
803
919
  action: z.ZodLiteral<"get">;
804
920
  topicSessionId: z.ZodString;
921
+ }, z.core.$strict>, z.ZodObject<{
922
+ action: z.ZodLiteral<"native-state">;
923
+ topicSessionId: z.ZodString;
924
+ requestIds: z.ZodArray<z.ZodString>;
925
+ }, z.core.$strict>, z.ZodObject<{
926
+ action: z.ZodLiteral<"native-attachment">;
927
+ topicSessionId: z.ZodString;
928
+ attachmentId: z.ZodString;
805
929
  }, z.core.$strict>, z.ZodObject<{
806
930
  action: z.ZodLiteral<"ask">;
807
931
  requestId: z.ZodOptional<z.ZodString>;
@@ -839,6 +963,14 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
839
963
  confirmSessionId: z.ZodString;
840
964
  }, z.core.$strict>, z.ZodObject<{
841
965
  action: z.ZodLiteral<"models">;
966
+ }, z.core.$strict>, z.ZodObject<{
967
+ action: z.ZodLiteral<"set-permission">;
968
+ topicSessionId: z.ZodString;
969
+ mode: z.ZodEnum<{
970
+ "read-only": "read-only";
971
+ "workspace-write": "workspace-write";
972
+ "danger-full-access": "danger-full-access";
973
+ }>;
842
974
  }, z.core.$strict>, z.ZodObject<{
843
975
  action: z.ZodLiteral<"set-model-route">;
844
976
  topicSessionId: z.ZodString;
@@ -868,13 +1000,154 @@ export declare const citeCiterRequestSchema: z.ZodUnion<readonly [z.ZodUnion<rea
868
1000
  }, z.core.$strict>, z.ZodObject<{
869
1001
  action: z.ZodLiteral<"document-get">;
870
1002
  documentId: z.ZodString;
1003
+ page: z.ZodOptional<z.ZodNumber>;
871
1004
  }, z.core.$strict>], "action">]>;
872
1005
  export type CiteCiterRequest = z.infer<typeof citeCiterRequestSchema>;
873
1006
  /** Strict response union returned by the single Remote command endpoint. */
874
1007
  export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1008
+ kind: z.ZodLiteral<"native-state">;
1009
+ state: z.ZodObject<{
1010
+ running: z.ZodBoolean;
1011
+ blank: z.ZodBoolean;
1012
+ error: z.ZodNullable<z.ZodString>;
1013
+ queue: z.ZodArray<z.ZodObject<{
1014
+ id: z.ZodString;
1015
+ placement: z.ZodEnum<{
1016
+ queued: "queued";
1017
+ steering: "steering";
1018
+ context: "context";
1019
+ }>;
1020
+ rpcId: z.ZodOptional<z.ZodString>;
1021
+ text: z.ZodString;
1022
+ attachments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1023
+ type: z.ZodLiteral<"image">;
1024
+ attachment: z.ZodPipe<z.ZodObject<{
1025
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1026
+ mediaType: z.ZodEnum<{
1027
+ "image/png": "image/png";
1028
+ "image/jpeg": "image/jpeg";
1029
+ "image/webp": "image/webp";
1030
+ "image/gif": "image/gif";
1031
+ }>;
1032
+ bytes: z.ZodNumber;
1033
+ width: z.ZodNumber;
1034
+ height: z.ZodNumber;
1035
+ name: z.ZodOptional<z.ZodString>;
1036
+ originalDimensions: z.ZodOptional<z.ZodObject<{
1037
+ width: z.ZodNumber;
1038
+ height: z.ZodNumber;
1039
+ }, z.core.$strict>>;
1040
+ }, z.core.$strict>, z.ZodTransform<import("@deepseek-ai/dsh-attachment").ImageAttachmentRef, {
1041
+ attachmentId: import("@deepseek-ai/dsh-attachment").AttachmentId;
1042
+ mediaType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
1043
+ bytes: number;
1044
+ width: number;
1045
+ height: number;
1046
+ name?: string | undefined;
1047
+ originalDimensions?: {
1048
+ width: number;
1049
+ height: number;
1050
+ } | undefined;
1051
+ }>>;
1052
+ }, z.core.$strict>, z.ZodObject<{
1053
+ type: z.ZodLiteral<"file">;
1054
+ attachment: z.ZodObject<{
1055
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1056
+ name: z.ZodString;
1057
+ bytes: z.ZodNumber;
1058
+ }, z.core.$strict>;
1059
+ }, z.core.$strict>], "type">>;
1060
+ }, z.core.$strict>>;
1061
+ receipts: z.ZodArray<z.ZodObject<{
1062
+ requestId: z.ZodString;
1063
+ attachments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1064
+ type: z.ZodLiteral<"image">;
1065
+ attachment: z.ZodPipe<z.ZodObject<{
1066
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1067
+ mediaType: z.ZodEnum<{
1068
+ "image/png": "image/png";
1069
+ "image/jpeg": "image/jpeg";
1070
+ "image/webp": "image/webp";
1071
+ "image/gif": "image/gif";
1072
+ }>;
1073
+ bytes: z.ZodNumber;
1074
+ width: z.ZodNumber;
1075
+ height: z.ZodNumber;
1076
+ name: z.ZodOptional<z.ZodString>;
1077
+ originalDimensions: z.ZodOptional<z.ZodObject<{
1078
+ width: z.ZodNumber;
1079
+ height: z.ZodNumber;
1080
+ }, z.core.$strict>>;
1081
+ }, z.core.$strict>, z.ZodTransform<import("@deepseek-ai/dsh-attachment").ImageAttachmentRef, {
1082
+ attachmentId: import("@deepseek-ai/dsh-attachment").AttachmentId;
1083
+ mediaType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
1084
+ bytes: number;
1085
+ width: number;
1086
+ height: number;
1087
+ name?: string | undefined;
1088
+ originalDimensions?: {
1089
+ width: number;
1090
+ height: number;
1091
+ } | undefined;
1092
+ }>>;
1093
+ }, z.core.$strict>, z.ZodObject<{
1094
+ type: z.ZodLiteral<"file">;
1095
+ attachment: z.ZodObject<{
1096
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1097
+ name: z.ZodString;
1098
+ bytes: z.ZodNumber;
1099
+ }, z.core.$strict>;
1100
+ }, z.core.$strict>], "type">>;
1101
+ }, z.core.$strict>>;
1102
+ }, z.core.$strict>;
1103
+ }, z.core.$strict>, z.ZodObject<{
1104
+ kind: z.ZodLiteral<"native-attachment">;
1105
+ attachment: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
1106
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1107
+ mediaType: z.ZodEnum<{
1108
+ "image/png": "image/png";
1109
+ "image/jpeg": "image/jpeg";
1110
+ "image/webp": "image/webp";
1111
+ "image/gif": "image/gif";
1112
+ }>;
1113
+ bytes: z.ZodNumber;
1114
+ width: z.ZodNumber;
1115
+ height: z.ZodNumber;
1116
+ name: z.ZodOptional<z.ZodString>;
1117
+ originalDimensions: z.ZodOptional<z.ZodObject<{
1118
+ width: z.ZodNumber;
1119
+ height: z.ZodNumber;
1120
+ }, z.core.$strict>>;
1121
+ }, z.core.$strict>, z.ZodTransform<import("@deepseek-ai/dsh-attachment").ImageAttachmentRef, {
1122
+ attachmentId: import("@deepseek-ai/dsh-attachment").AttachmentId;
1123
+ mediaType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
1124
+ bytes: number;
1125
+ width: number;
1126
+ height: number;
1127
+ name?: string | undefined;
1128
+ originalDimensions?: {
1129
+ width: number;
1130
+ height: number;
1131
+ } | undefined;
1132
+ }>>, z.ZodObject<{
1133
+ attachmentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@deepseek-ai/dsh-attachment").AttachmentId, string>>;
1134
+ name: z.ZodString;
1135
+ bytes: z.ZodNumber;
1136
+ }, z.core.$strict>]>;
1137
+ data: z.ZodString;
1138
+ }, z.core.$strict>, z.ZodObject<{
875
1139
  kind: z.ZodLiteral<"topic">;
876
1140
  topic: z.ZodObject<{
1141
+ captureId: z.ZodOptional<z.ZodString>;
1142
+ documentTitle: z.ZodOptional<z.ZodString>;
877
1143
  topic: z.ZodObject<{
1144
+ permission: z.ZodOptional<z.ZodEnum<{
1145
+ "read-only": "read-only";
1146
+ "workspace-write": "workspace-write";
1147
+ "danger-full-access": "danger-full-access";
1148
+ }>>;
1149
+ hosted: z.ZodOptional<z.ZodBoolean>;
1150
+ storage: z.ZodOptional<z.ZodLiteral<"source">>;
878
1151
  topicId: z.ZodNumber;
879
1152
  sessionId: z.ZodString;
880
1153
  sourceSessionId: z.ZodString;
@@ -945,11 +1218,20 @@ export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
945
1218
  }, z.core.$strict>;
946
1219
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
947
1220
  role: z.ZodLiteral<"user">;
1221
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1222
+ kind: z.ZodEnum<{
1223
+ image: "image";
1224
+ file: "file";
1225
+ }>;
1226
+ id: z.ZodString;
1227
+ name: z.ZodString;
1228
+ }, z.core.$strict>>>;
948
1229
  text: z.ZodString;
949
1230
  id: z.ZodString;
950
1231
  seq: z.ZodNumber;
951
1232
  }, z.core.$strict>, z.ZodObject<{
952
1233
  role: z.ZodLiteral<"assistant">;
1234
+ renderKey: z.ZodOptional<z.ZodString>;
953
1235
  text: z.ZodString;
954
1236
  reasoning: z.ZodNullable<z.ZodString>;
955
1237
  streaming: z.ZodBoolean;
@@ -963,6 +1245,14 @@ export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
963
1245
  seq: z.ZodNumber;
964
1246
  }, z.core.$strict>, z.ZodObject<{
965
1247
  role: z.ZodLiteral<"tool">;
1248
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1249
+ kind: z.ZodEnum<{
1250
+ image: "image";
1251
+ file: "file";
1252
+ }>;
1253
+ id: z.ZodString;
1254
+ name: z.ZodString;
1255
+ }, z.core.$strict>>>;
966
1256
  name: z.ZodString;
967
1257
  arguments: z.ZodString;
968
1258
  result: z.ZodNullable<z.ZodString>;
@@ -1002,12 +1292,12 @@ export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
1002
1292
  elements: z.ZodArray<z.ZodObject<{
1003
1293
  id: z.ZodString;
1004
1294
  kind: z.ZodEnum<{
1295
+ image: "image";
1005
1296
  text: "text";
1006
1297
  markdown: "markdown";
1007
1298
  math: "math";
1008
1299
  svg: "svg";
1009
1300
  html: "html";
1010
- image: "image";
1011
1301
  table: "table";
1012
1302
  }>;
1013
1303
  content: z.ZodString;
@@ -1038,6 +1328,13 @@ export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
1038
1328
  }, z.core.$strict>, z.ZodObject<{
1039
1329
  kind: z.ZodLiteral<"topics">;
1040
1330
  topics: z.ZodArray<z.ZodObject<{
1331
+ permission: z.ZodOptional<z.ZodEnum<{
1332
+ "read-only": "read-only";
1333
+ "workspace-write": "workspace-write";
1334
+ "danger-full-access": "danger-full-access";
1335
+ }>>;
1336
+ hosted: z.ZodOptional<z.ZodBoolean>;
1337
+ storage: z.ZodOptional<z.ZodLiteral<"source">>;
1041
1338
  topicId: z.ZodNumber;
1042
1339
  sessionId: z.ZodString;
1043
1340
  sourceSessionId: z.ZodString;
@@ -1165,6 +1462,8 @@ export declare const citeCiterResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
1165
1462
  }>;
1166
1463
  content: z.ZodString;
1167
1464
  truncated: z.ZodBoolean;
1465
+ page: z.ZodDefault<z.ZodNumber>;
1466
+ pageCount: z.ZodDefault<z.ZodNumber>;
1168
1467
  }, z.core.$strict>;
1169
1468
  }, z.core.$strict>], "kind">;
1170
1469
  export type CiteCiterResponse = z.infer<typeof citeCiterResponseSchema>;