@antst/dashi 0.1.0-alpha.10

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 (56) 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 +273 -0
  5. package/lib/at-trigger.d.ts +8 -0
  6. package/lib/at-trigger.js +13 -0
  7. package/lib/catalogs.d.ts +25 -0
  8. package/lib/catalogs.js +235 -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/diff-view.d.ts +5 -0
  14. package/lib/diff-view.js +24 -0
  15. package/lib/external-editor.d.ts +3 -0
  16. package/lib/external-editor.js +39 -0
  17. package/lib/help.d.ts +2 -0
  18. package/lib/help.js +6 -0
  19. package/lib/history-records.d.ts +4 -0
  20. package/lib/history-records.js +14 -0
  21. package/lib/image-input.d.ts +8 -0
  22. package/lib/image-input.js +37 -0
  23. package/lib/index.d.ts +4 -0
  24. package/lib/index.js +301 -0
  25. package/lib/input.d.ts +10 -0
  26. package/lib/input.js +222 -0
  27. package/lib/memory.d.ts +3 -0
  28. package/lib/memory.js +27 -0
  29. package/lib/mouse-input.d.ts +1 -0
  30. package/lib/mouse-input.js +6 -0
  31. package/lib/presentation.d.ts +9 -0
  32. package/lib/presentation.js +54 -0
  33. package/lib/renderer.d.ts +20 -0
  34. package/lib/renderer.js +435 -0
  35. package/lib/rewind.d.ts +18 -0
  36. package/lib/rewind.js +84 -0
  37. package/lib/session-export.d.ts +3 -0
  38. package/lib/session-export.js +27 -0
  39. package/lib/session-list.d.ts +15 -0
  40. package/lib/session-list.js +65 -0
  41. package/lib/session-runtime.d.ts +46 -0
  42. package/lib/session-runtime.js +1293 -0
  43. package/lib/shell-command.d.ts +10 -0
  44. package/lib/shell-command.js +65 -0
  45. package/lib/state.d.ts +508 -0
  46. package/lib/state.js +667 -0
  47. package/lib/terminal-guard.d.ts +14 -0
  48. package/lib/terminal-guard.js +76 -0
  49. package/lib/tool-presentation.d.ts +14 -0
  50. package/lib/tool-presentation.js +156 -0
  51. package/lib/transcript.d.ts +12 -0
  52. package/lib/transcript.js +323 -0
  53. package/lib/tui-root.d.ts +20 -0
  54. package/lib/tui-root.js +25 -0
  55. package/package.json +73 -0
  56. package/validated-dsh-versions.json +3 -0
@@ -0,0 +1,46 @@
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 agentPreset?: string;
6
+ readonly continue: boolean;
7
+ readonly cwd: string;
8
+ readonly effort?: string;
9
+ readonly forkSession: boolean;
10
+ readonly name?: string;
11
+ readonly images?: readonly string[];
12
+ readonly model?: string;
13
+ readonly permission?: string;
14
+ readonly prompt?: string;
15
+ readonly provider?: string;
16
+ readonly tools?: readonly string[];
17
+ readonly disallowedTools?: readonly string[];
18
+ readonly resume?: string;
19
+ readonly sessionId?: string;
20
+ }
21
+ export declare class LaunchArgumentError extends Error {
22
+ }
23
+ export interface SessionRuntime {
24
+ readonly initialAttachments: readonly DraftAttachment[];
25
+ readonly initialCells: readonly TerminalCell[];
26
+ readonly initialHasMore: boolean;
27
+ readonly initialPrompts: readonly string[];
28
+ readonly root: RootView;
29
+ readonly summary: string;
30
+ activate(value: ActivatableOverlayValue): Promise<void>;
31
+ attach(path: string): Promise<DraftAttachment | undefined>;
32
+ complete(query: string, caret: number): Promise<readonly OverlayOption[]>;
33
+ cyclePermission(): Promise<void>;
34
+ interrupt(): void;
35
+ loadHistory(rootId: string): Promise<void>;
36
+ search(query: string, rootId: string): Promise<void>;
37
+ shutdown(): Promise<void>;
38
+ start(): void;
39
+ submit(text: string, mode: SendMode, attachments: readonly DraftAttachment[]): Promise<void>;
40
+ }
41
+ export interface DecisionBindings {
42
+ readonly cancel: (id: string) => void;
43
+ readonly request: (decision: PendingDecision) => Promise<DecisionAnswer>;
44
+ }
45
+ /** Create or resume the exact current root and own its replaceable terminal binding. */
46
+ export declare function createSessionRuntime(ctx: Context, options: RootLaunchOptions, tuiRoot: TuiRoot, dispatch: (action: UiAction) => void, decisions?: DecisionBindings): Promise<SessionRuntime>;