@antst/dashi 0.1.0-alpha.5

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 (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/lib/application.d.ts +43 -0
  4. package/lib/application.js +260 -0
  5. package/lib/at-trigger.d.ts +8 -0
  6. package/lib/at-trigger.js +13 -0
  7. package/lib/catalogs.d.ts +23 -0
  8. package/lib/catalogs.js +218 -0
  9. package/lib/clipboard-image.d.ts +3 -0
  10. package/lib/clipboard-image.js +74 -0
  11. package/lib/completion-trigger.d.ts +2 -0
  12. package/lib/completion-trigger.js +7 -0
  13. package/lib/external-editor.d.ts +2 -0
  14. package/lib/external-editor.js +39 -0
  15. package/lib/history-records.d.ts +4 -0
  16. package/lib/history-records.js +14 -0
  17. package/lib/image-input.d.ts +8 -0
  18. package/lib/image-input.js +37 -0
  19. package/lib/index.d.ts +4 -0
  20. package/lib/index.js +250 -0
  21. package/lib/input.d.ts +10 -0
  22. package/lib/input.js +220 -0
  23. package/lib/mouse-input.d.ts +1 -0
  24. package/lib/mouse-input.js +6 -0
  25. package/lib/presentation.d.ts +9 -0
  26. package/lib/presentation.js +54 -0
  27. package/lib/renderer.d.ts +19 -0
  28. package/lib/renderer.js +414 -0
  29. package/lib/rewind.d.ts +18 -0
  30. package/lib/rewind.js +84 -0
  31. package/lib/session-export.d.ts +3 -0
  32. package/lib/session-export.js +27 -0
  33. package/lib/session-list.d.ts +15 -0
  34. package/lib/session-list.js +65 -0
  35. package/lib/session-runtime.d.ts +35 -0
  36. package/lib/session-runtime.js +1027 -0
  37. package/lib/shell-command.d.ts +9 -0
  38. package/lib/shell-command.js +62 -0
  39. package/lib/state.d.ts +493 -0
  40. package/lib/state.js +641 -0
  41. package/lib/terminal-guard.d.ts +14 -0
  42. package/lib/terminal-guard.js +76 -0
  43. package/lib/tool-presentation.d.ts +14 -0
  44. package/lib/tool-presentation.js +156 -0
  45. package/lib/transcript.d.ts +12 -0
  46. package/lib/transcript.js +304 -0
  47. package/lib/tui-root.d.ts +20 -0
  48. package/lib/tui-root.js +25 -0
  49. package/package.json +65 -0
  50. package/validated-dsh-versions.json +3 -0
@@ -0,0 +1,35 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { ActivatableOverlayValue, DecisionAnswer, DraftAttachment, OverlayOption, PendingDecision, RootView, SendMode, TerminalCell, UiAction } from './state.js';
3
+ import type { TuiRoot } from './tui-root.js';
4
+ export interface RootLaunchOptions {
5
+ readonly continue: boolean;
6
+ readonly cwd: string;
7
+ readonly name?: string;
8
+ readonly images?: readonly string[];
9
+ readonly prompt?: string;
10
+ readonly resume?: string;
11
+ }
12
+ export interface SessionRuntime {
13
+ readonly initialAttachments: readonly DraftAttachment[];
14
+ readonly initialCells: readonly TerminalCell[];
15
+ readonly initialHasMore: boolean;
16
+ readonly initialPrompts: readonly string[];
17
+ readonly root: RootView;
18
+ readonly summary: string;
19
+ activate(value: ActivatableOverlayValue): Promise<void>;
20
+ attach(path: string): Promise<DraftAttachment | undefined>;
21
+ complete(query: string, caret: number): Promise<readonly OverlayOption[]>;
22
+ cyclePermission(): Promise<void>;
23
+ interrupt(): void;
24
+ loadHistory(rootId: string): Promise<void>;
25
+ search(query: string, rootId: string): Promise<void>;
26
+ shutdown(): Promise<void>;
27
+ start(): void;
28
+ submit(text: string, mode: SendMode, attachments: readonly DraftAttachment[]): Promise<void>;
29
+ }
30
+ export interface DecisionBindings {
31
+ readonly cancel: (id: string) => void;
32
+ readonly request: (decision: PendingDecision) => Promise<DecisionAnswer>;
33
+ }
34
+ /** Create or resume the exact current root and own its replaceable terminal binding. */
35
+ export declare function createSessionRuntime(ctx: Context, options: RootLaunchOptions, tuiRoot: TuiRoot, dispatch: (action: UiAction) => void, decisions?: DecisionBindings): Promise<SessionRuntime>;