@gajae-code/coding-agent 0.11.3 → 0.11.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 (213) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/types/cli/notify-cli.d.ts +5 -1
  3. package/dist/types/cli/worktree-cli.d.ts +8 -25
  4. package/dist/types/commands/gc.d.ts +4 -0
  5. package/dist/types/commands/worktree.d.ts +7 -32
  6. package/dist/types/config/settings-schema.d.ts +20 -0
  7. package/dist/types/export/html/template.generated.d.ts +1 -1
  8. package/dist/types/gjc-runtime/deep-interview-state.d.ts +28 -0
  9. package/dist/types/gjc-runtime/gc-runtime.d.ts +9 -0
  10. package/dist/types/gjc-runtime/launch-tmux.d.ts +3 -0
  11. package/dist/types/gjc-runtime/managed-owner-admission.d.ts +42 -0
  12. package/dist/types/gjc-runtime/managed-owner-supervisor.d.ts +41 -0
  13. package/dist/types/gjc-runtime/state-argv.d.ts +38 -0
  14. package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +9 -0
  15. package/dist/types/gjc-runtime/ultragoal-owner-loss-recovery.d.ts +94 -0
  16. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +1 -0
  17. package/dist/types/harness-control-plane/owner.d.ts +3 -1
  18. package/dist/types/internal-urls/local-protocol.d.ts +18 -0
  19. package/dist/types/main.d.ts +2 -2
  20. package/dist/types/modes/components/ansi-display-validator.d.ts +2 -0
  21. package/dist/types/modes/components/custom-editor.d.ts +8 -3
  22. package/dist/types/modes/components/notifications-settings-editor.d.ts +4 -0
  23. package/dist/types/modes/components/session-observer-overlay.d.ts +3 -1
  24. package/dist/types/modes/components/settings-selector.d.ts +2 -0
  25. package/dist/types/modes/components/tool-transcript-format.d.ts +77 -0
  26. package/dist/types/modes/components/transcript-viewer-overlay.d.ts +3 -0
  27. package/dist/types/modes/controllers/goal-mode-controller.d.ts +8 -1
  28. package/dist/types/modes/controllers/input-controller.d.ts +8 -2
  29. package/dist/types/modes/controllers/selector-controller.d.ts +15 -0
  30. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +3 -0
  31. package/dist/types/modes/shared/agent-wire/workflow-gate-types.d.ts +16 -0
  32. package/dist/types/plan-mode/approved-plan.d.ts +1 -0
  33. package/dist/types/runtime-mcp/manager.d.ts +2 -0
  34. package/dist/types/runtime-mcp/oauth-discovery.d.ts +12 -1
  35. package/dist/types/sdk/broker/broker.d.ts +1 -0
  36. package/dist/types/sdk/broker/discovery.d.ts +10 -0
  37. package/dist/types/sdk/broker/ensure.d.ts +24 -1
  38. package/dist/types/sdk/broker/internal.d.ts +3 -0
  39. package/dist/types/sdk/broker/session-index.d.ts +12 -0
  40. package/dist/types/sdk/broker/state-version.d.ts +2 -1
  41. package/dist/types/sdk/bus/chat-daemon-cli.d.ts +3 -1
  42. package/dist/types/sdk/bus/chat-daemon-control.d.ts +39 -4
  43. package/dist/types/sdk/bus/config-commands.d.ts +8 -0
  44. package/dist/types/sdk/bus/config.d.ts +22 -0
  45. package/dist/types/sdk/bus/index.d.ts +162 -2
  46. package/dist/types/sdk/bus/notification-service.d.ts +71 -8
  47. package/dist/types/sdk/bus/session-control.d.ts +11 -8
  48. package/dist/types/sdk/bus/telegram-daemon-cli.d.ts +5 -0
  49. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -3
  50. package/dist/types/sdk/bus/telegram-daemon-control.d.ts +23 -4
  51. package/dist/types/sdk/bus/telegram-daemon.d.ts +214 -20
  52. package/dist/types/sdk/session.d.ts +16 -1
  53. package/dist/types/secrets/index.d.ts +4 -2
  54. package/dist/types/secrets/obfuscator.d.ts +1 -1
  55. package/dist/types/session/agent-session.d.ts +31 -2
  56. package/dist/types/session/artifacts.d.ts +30 -8
  57. package/dist/types/session/internal/managed-session-scope.d.ts +7 -0
  58. package/dist/types/session/internal/managed-session-storage.d.ts +63 -6
  59. package/dist/types/session/session-manager.d.ts +88 -18
  60. package/dist/types/session/session-storage.d.ts +27 -0
  61. package/dist/types/session/streaming-output.d.ts +4 -0
  62. package/dist/types/task/executor.d.ts +9 -0
  63. package/dist/types/tool-discovery/tool-index.d.ts +2 -0
  64. package/dist/types/tools/ask.d.ts +87 -12
  65. package/dist/types/tools/bash-skill-urls.d.ts +2 -2
  66. package/dist/types/tools/browser/screenshot-format.d.ts +8 -0
  67. package/dist/types/tools/browser/tab-protocol.d.ts +11 -0
  68. package/dist/types/tools/browser/tab-supervisor.d.ts +1 -1
  69. package/dist/types/tools/browser/tab-worker-path-resolver.d.ts +2 -0
  70. package/dist/types/tools/browser/tab-worker-smoke.d.ts +16 -0
  71. package/dist/types/tools/index.d.ts +4 -0
  72. package/dist/types/tools/path-utils.d.ts +9 -14
  73. package/dist/types/tools/render-utils.d.ts +1 -8
  74. package/dist/types/tools/resource-gc.d.ts +14 -0
  75. package/dist/types/utils/image-loading.d.ts +23 -0
  76. package/dist/types/utils/image-resize.d.ts +2 -0
  77. package/dist/types/utils/pasted-image-loading.d.ts +39 -0
  78. package/dist/types/utils/pasted-image-path.d.ts +21 -19
  79. package/dist/types/web/scrapers/html-to-markdown.d.ts +5 -0
  80. package/dist/types/web/scrapers/types.d.ts +1 -5
  81. package/package.json +25 -9
  82. package/scripts/generate-sdk-operation-inventory.ts +2 -0
  83. package/scripts/run-threat-model-check.ts +60 -0
  84. package/src/cli/notify-cli.ts +40 -18
  85. package/src/cli/worktree-cli.ts +9 -287
  86. package/src/cli.ts +10 -9
  87. package/src/commands/gc.ts +11 -1
  88. package/src/commands/sdk.ts +10 -4
  89. package/src/commands/worktree.ts +10 -53
  90. package/src/config/model-profiles.ts +15 -15
  91. package/src/config/settings-schema.ts +17 -0
  92. package/src/daemon/runtime.ts +2 -2
  93. package/src/defaults/gjc/skills/deep-interview/SKILL.md +70 -49
  94. package/src/defaults/gjc/skills/ralplan/SKILL.md +0 -6
  95. package/src/defaults/gjc/skills/team/SKILL.md +7 -9
  96. package/src/defaults/gjc/skills/ultragoal/SKILL.md +0 -2
  97. package/src/eval/js/shared/runtime.ts +1 -1
  98. package/src/eval/py/index.ts +2 -2
  99. package/src/export/html/template.generated.ts +1 -1
  100. package/src/extensibility/plugins/marketplace/manager.ts +94 -10
  101. package/src/gjc-runtime/deep-interview-recorder.ts +7 -0
  102. package/src/gjc-runtime/deep-interview-runtime.ts +10 -0
  103. package/src/gjc-runtime/deep-interview-state.ts +127 -3
  104. package/src/gjc-runtime/gc-render.ts +19 -1
  105. package/src/gjc-runtime/gc-runtime.ts +68 -3
  106. package/src/gjc-runtime/launch-tmux.ts +61 -6
  107. package/src/gjc-runtime/managed-owner-admission.ts +352 -0
  108. package/src/gjc-runtime/managed-owner-supervisor.ts +162 -0
  109. package/src/gjc-runtime/state-argv.ts +292 -0
  110. package/src/gjc-runtime/state-runtime.ts +80 -222
  111. package/src/gjc-runtime/team-runtime.ts +1 -1
  112. package/src/gjc-runtime/tmux-owner-isolation.ts +117 -0
  113. package/src/gjc-runtime/ultragoal-owner-loss-recovery.ts +328 -0
  114. package/src/gjc-runtime/ultragoal-runtime.ts +14 -0
  115. package/src/harness-control-plane/owner.ts +59 -3
  116. package/src/hindsight/client.ts +65 -2
  117. package/src/internal-urls/agent-protocol.ts +76 -5
  118. package/src/internal-urls/docs-index.generated.ts +7 -6
  119. package/src/internal-urls/local-protocol.ts +416 -18
  120. package/src/lsp/index.ts +4 -88
  121. package/src/main.ts +37 -13
  122. package/src/modes/acp/acp-agent.ts +8 -0
  123. package/src/modes/components/ansi-display-validator.ts +54 -0
  124. package/src/modes/components/custom-editor.ts +103 -32
  125. package/src/modes/components/custom-provider-wizard.ts +26 -1
  126. package/src/modes/components/notifications-settings-editor.ts +26 -2
  127. package/src/modes/components/session-observer-overlay.ts +40 -37
  128. package/src/modes/components/settings-selector.ts +3 -1
  129. package/src/modes/components/tool-transcript-format.ts +393 -0
  130. package/src/modes/components/transcript-viewer-overlay.ts +63 -1
  131. package/src/modes/controllers/goal-mode-controller.ts +20 -1
  132. package/src/modes/controllers/input-controller.ts +98 -37
  133. package/src/modes/controllers/plan-mode-controller.ts +2 -0
  134. package/src/modes/controllers/runtime-mcp-command-controller.ts +3 -0
  135. package/src/modes/controllers/selector-controller.ts +71 -9
  136. package/src/modes/interactive-mode.ts +14 -2
  137. package/src/modes/shared/agent-wire/deep-interview-gate.ts +31 -1
  138. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +17 -1
  139. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +4 -2
  140. package/src/modes/shared/agent-wire/workflow-gate-types.ts +120 -3
  141. package/src/plan-mode/approved-plan.ts +3 -1
  142. package/src/prompts/agents/architect.md +1 -0
  143. package/src/prompts/agents/critic.md +1 -0
  144. package/src/prompts/system/custom-system-prompt.md +1 -1
  145. package/src/prompts/system/system-prompt.md +2 -1
  146. package/src/prompts/tools/lsp.md +3 -3
  147. package/src/runtime-mcp/manager.ts +16 -1
  148. package/src/runtime-mcp/oauth-discovery.ts +116 -26
  149. package/src/sdk/broker/broker.ts +139 -32
  150. package/src/sdk/broker/discovery.ts +125 -0
  151. package/src/sdk/broker/ensure.ts +103 -19
  152. package/src/sdk/broker/internal.ts +10 -0
  153. package/src/sdk/broker/session-index.ts +309 -38
  154. package/src/sdk/broker/state-version.ts +5 -2
  155. package/src/sdk/bus/chat-daemon-cli.ts +72 -10
  156. package/src/sdk/bus/chat-daemon-control.ts +526 -130
  157. package/src/sdk/bus/chat-daemon-runtime.ts +1 -0
  158. package/src/sdk/bus/config-commands.ts +22 -0
  159. package/src/sdk/bus/config.ts +37 -0
  160. package/src/sdk/bus/index.ts +384 -92
  161. package/src/sdk/bus/lifecycle-control-runtime.ts +53 -3
  162. package/src/sdk/bus/notification-service.ts +284 -62
  163. package/src/sdk/bus/recent-activity.ts +14 -5
  164. package/src/sdk/bus/session-control.ts +150 -44
  165. package/src/sdk/bus/telegram-daemon-cli.ts +20 -14
  166. package/src/sdk/bus/telegram-daemon-contract.ts +6 -3
  167. package/src/sdk/bus/telegram-daemon-control.ts +294 -76
  168. package/src/sdk/bus/telegram-daemon.ts +1842 -281
  169. package/src/sdk/protocol/operation-inventory.generated.json +11 -0
  170. package/src/sdk/session.ts +155 -27
  171. package/src/secrets/index.ts +53 -10
  172. package/src/secrets/obfuscator.ts +21 -18
  173. package/src/secrets/regex.ts +2 -0
  174. package/src/session/agent-session.ts +495 -253
  175. package/src/session/artifacts.ts +188 -23
  176. package/src/session/context-estimation.ts +7 -2
  177. package/src/session/internal/managed-session-scope.ts +215 -39
  178. package/src/session/internal/managed-session-storage.ts +1152 -46
  179. package/src/session/session-manager.ts +1055 -148
  180. package/src/session/session-storage.ts +109 -11
  181. package/src/session/streaming-output.ts +6 -0
  182. package/src/task/executor.ts +71 -26
  183. package/src/task/index.ts +63 -20
  184. package/src/tool-discovery/tool-index.ts +18 -0
  185. package/src/tools/ask.ts +329 -57
  186. package/src/tools/bash-allowed-prefixes.ts +79 -29
  187. package/src/tools/bash-skill-urls.ts +14 -3
  188. package/src/tools/bash.ts +2 -2
  189. package/src/tools/browser/launch.ts +3 -1
  190. package/src/tools/browser/readable.ts +1 -1
  191. package/src/tools/browser/screenshot-format.ts +34 -0
  192. package/src/tools/browser/tab-protocol.ts +3 -0
  193. package/src/tools/browser/tab-supervisor.ts +125 -122
  194. package/src/tools/browser/tab-worker-entry.ts +33 -14
  195. package/src/tools/browser/tab-worker-path-resolver.ts +67 -0
  196. package/src/tools/browser/tab-worker-smoke.ts +87 -0
  197. package/src/tools/browser/tab-worker.ts +7 -5
  198. package/src/tools/index.ts +4 -0
  199. package/src/tools/path-utils.ts +42 -35
  200. package/src/tools/plan-mode-guard.ts +1 -0
  201. package/src/tools/read.ts +7 -1
  202. package/src/tools/render-utils.ts +1 -27
  203. package/src/tools/resource-gc.ts +123 -34
  204. package/src/tools/sqlite-reader.ts +3 -2
  205. package/src/tools/subagent.ts +2 -0
  206. package/src/utils/image-loading.ts +85 -34
  207. package/src/utils/image-resize.ts +16 -9
  208. package/src/utils/pasted-image-loading.ts +514 -0
  209. package/src/utils/pasted-image-path.ts +223 -98
  210. package/src/web/scrapers/html-to-markdown.ts +68 -0
  211. package/src/web/scrapers/readthedocs.ts +1 -1
  212. package/src/web/scrapers/types.ts +1 -68
  213. package/src/web/search/providers/openai-compatible.ts +76 -23
@@ -127,6 +127,34 @@ export declare function mergeDeepInterviewEnvelope(existing: unknown, incoming:
127
127
  }): DeepInterviewStateEnvelope;
128
128
  export declare const DEEP_INTERVIEW_INTENT_CATEGORIES: readonly ["artifact", "surface", "integration", "constraint"];
129
129
  export type DeepInterviewIntentCategory = (typeof DEEP_INTERVIEW_INTENT_CATEGORIES)[number];
130
+ /**
131
+ * User-input fields that legitimately carry prose (goals, prompts, descriptions,
132
+ * answers). Shell metacharacters (`;`, `|`, `&`, backticks, `$()`) are valid prose
133
+ * here and must NOT be rejected as structural injection. Structural fields (ids,
134
+ * categories, hashes) stay strictly validated by their own guards.
135
+ */
136
+ export declare const DEEP_INTERVIEW_FREETEXT_FIELDS: ReadonlySet<string>;
137
+ /** DoS-prevention character-count caps, matching ask-schema string-length semantics. */
138
+ export declare const MAX_INITIAL_CONTEXT_LENGTH = 50000;
139
+ export declare const MAX_USER_RESPONSE_LENGTH = 10000;
140
+ /** Maximum serialized JavaScript-string length for one LLM-produced structured response. */
141
+ export declare const MAX_DEEP_INTERVIEW_STRUCTURED_RESPONSE_LENGTH = 100000;
142
+ /** Count Unicode code points without allocating an intermediate character array. */
143
+ export declare function deepInterviewCharacterCount(value: string): number;
144
+ export declare function isDeepInterviewFreeTextField(name: string): boolean;
145
+ /**
146
+ * Assert that one structured deep-interview response is JSON-serializable and
147
+ * bounded by JavaScript string length. This deliberately does not measure or
148
+ * cap accumulated persisted interview state.
149
+ */
150
+ export declare function assertDeepInterviewStructuredResponseWithinLimit(value: unknown): void;
151
+ /**
152
+ * Assert a free-text input is within its size cap. Never inspects content for shell
153
+ * metacharacters — free-text fields accept prose verbatim; this only bounds length.
154
+ */
155
+ export declare function assertDeepInterviewInputWithinLimit(value: string, max: number, fieldName?: string): void;
156
+ /** Validate user-supplied deep-interview prose before an envelope is persisted. */
157
+ export declare function assertDeepInterviewEnvelopeInputLimits(envelope: Record<string, unknown>): void;
130
158
  export interface DeepInterviewIntentItem {
131
159
  id: string;
132
160
  category: DeepInterviewIntentCategory;
@@ -95,11 +95,20 @@ export interface GcCounts {
95
95
  failed: number;
96
96
  }>;
97
97
  }
98
+ export interface GcSessionIndexHealth {
99
+ status: "healthy" | "corrupt" | "repaired" | "unsupported" | "repair_failed";
100
+ valid_prefix_seq: number;
101
+ snapshot_seq?: number;
102
+ reason?: string;
103
+ quarantine_path?: string;
104
+ }
98
105
  export interface GcReport {
99
106
  dry_run: boolean;
107
+ operation?: "dry_run" | "prune" | "repair_session_index";
100
108
  stores: Record<GcStore, GcRecord[]>;
101
109
  counts: GcCounts;
102
110
  errors: GcError[];
111
+ session_index?: GcSessionIndexHealth;
103
112
  }
104
113
  export interface GcRunResult {
105
114
  stdout: string;
@@ -76,6 +76,9 @@ export interface TmuxLaunchPlan {
76
76
  sessionStateFile?: string | null;
77
77
  /** Immutable Linux-managed owner provenance, assigned immediately before creation. */
78
78
  ownerGeneration?: string;
79
+ /** Immutable run and endpoint identities bound into the supervised command. */
80
+ ownerRunId?: string;
81
+ ownerIncarnation?: string;
79
82
  /** Generation state captured before owner-isolation planning; required for publication CAS. */
80
83
  ownerGenerationBaseline?: import("./tmux-owner-isolation").OwnerGenerationBaseline;
81
84
  /** Native tmux session identity emitted atomically by `new-session -P -F`. */
@@ -0,0 +1,42 @@
1
+ import { type ManagedOwnerBinding, type ManagedOwnerSigabrtReceipt } from "./managed-owner-supervisor";
2
+ import { type UltragoalRecoveryDecision } from "./ultragoal-owner-loss-recovery";
3
+ export declare const MANAGED_OWNER_PREDECESSOR_TOKEN_ENV = "GJC_MANAGED_OWNER_PREDECESSOR_TOKEN";
4
+ export declare const MANAGED_OWNER_PREDECESSOR_GENERATION_ENV = "GJC_MANAGED_OWNER_PREDECESSOR_GENERATION";
5
+ export declare const MANAGED_OWNER_PREDECESSOR_RUN_ID_ENV = "GJC_MANAGED_OWNER_PREDECESSOR_RUN_ID";
6
+ export declare const MANAGED_OWNER_PREDECESSOR_INCARNATION_ENV = "GJC_MANAGED_OWNER_PREDECESSOR_INCARNATION";
7
+ export declare const MANAGED_OWNER_TRANSCRIPT_PATH_ENV = "GJC_MANAGED_OWNER_TRANSCRIPT_PATH";
8
+ export interface ManagedOwnerRecoveryContext {
9
+ root: string;
10
+ binding: ManagedOwnerBinding;
11
+ receipt: ManagedOwnerSigabrtReceipt;
12
+ admission: {
13
+ session_id: string;
14
+ endpoint_incarnation: string;
15
+ owner_generation: string;
16
+ admitted: true;
17
+ };
18
+ decision: UltragoalRecoveryDecision;
19
+ }
20
+ export type ManagedOwnerAdmission = {
21
+ kind: "fresh" | "supervised";
22
+ } | {
23
+ kind: "recovery";
24
+ context: ManagedOwnerRecoveryContext;
25
+ } | {
26
+ kind: "blocked";
27
+ };
28
+ /**
29
+ * This is the pre-CLI barrier. A replacement is identified only by the exact
30
+ * predecessor token supplied by its launch binding; directory enumeration is
31
+ * deliberately never an authority source.
32
+ */
33
+ export declare function admitManagedOwnerBeforeCli(): Promise<ManagedOwnerAdmission>;
34
+ /**
35
+ * The ordinary CLI factory has no recovery-owned writer-lease or exact-child
36
+ * reconciliation capability. Do not route a recovered owner through it: first
37
+ * revalidate the immutable evidence and B0, then publish a terminal handoff.
38
+ */
39
+ export declare function completeManagedOwnerRecovery(context: ManagedOwnerRecoveryContext): Promise<{
40
+ kind: "handoff";
41
+ exitCode: 75;
42
+ }>;
@@ -0,0 +1,41 @@
1
+ export declare const MANAGED_OWNER_SUPERVISOR_ARG = "--internal-managed-owner-supervisor";
2
+ export declare const MANAGED_OWNER_CHILD_TOKEN_ENV = "GJC_MANAGED_OWNER_CHILD_TOKEN";
3
+ export declare const MANAGED_OWNER_COMMAND_ENV = "GJC_MANAGED_OWNER_COMMAND_JSON";
4
+ export declare const MANAGED_OWNER_SESSION_ID_ENV = "GJC_COORDINATOR_SESSION_ID";
5
+ export declare const MANAGED_OWNER_GENERATION_ENV = "GJC_TMUX_OWNER_GENERATION";
6
+ export declare const MANAGED_OWNER_STATE_DIR_ENV = "GJC_TMUX_OWNER_STATE_DIR";
7
+ export declare const MANAGED_OWNER_RUN_ID_ENV = "GJC_MANAGED_OWNER_RUN_ID";
8
+ export declare const MANAGED_OWNER_INCARNATION_ENV = "GJC_MANAGED_OWNER_INCARNATION";
9
+ export interface ManagedOwnerBinding {
10
+ schema_version: 2;
11
+ generation: string;
12
+ session_id: string;
13
+ run_id: string;
14
+ endpoint_incarnation: string;
15
+ child_token: string;
16
+ command: string[];
17
+ command_sha256: string;
18
+ supervisor_pid: number;
19
+ supervisor_start_time: string;
20
+ created_at: string;
21
+ }
22
+ export interface ManagedOwnerSigabrtReceipt {
23
+ schema_version: 2;
24
+ generation: string;
25
+ session_id: string;
26
+ run_id: string;
27
+ endpoint_incarnation: string;
28
+ child_token: string;
29
+ command_sha256: string;
30
+ supervisor_pid: number;
31
+ supervisor_start_time: string;
32
+ child_pid: number;
33
+ child_start_time: string;
34
+ signal: "SIGABRT";
35
+ signal_number: 6;
36
+ exit_code: number | null;
37
+ received_at: string;
38
+ }
39
+ export declare function isManagedOwnerSupervisorArgv(args: readonly string[]): boolean;
40
+ /** Runs one exact child and publishes authority only for a directly observed Linux signal 6. */
41
+ export declare function runManagedOwnerSupervisor(): Promise<void>;
@@ -0,0 +1,38 @@
1
+ export type StateAction = "read" | "write" | "clear" | "contract" | "handoff" | "graph" | "prune" | "gc" | "migrate" | "status" | "doctor";
2
+ export declare const STATE_ACTION_NAMES: ReadonlySet<StateAction>;
3
+ export declare const STATE_FLAGS_WITH_VALUES: ReadonlySet<string>;
4
+ export declare const STATE_BOOLEAN_FLAGS: ReadonlySet<string>;
5
+ export interface StateFlagOccurrence {
6
+ name: string;
7
+ index: number;
8
+ value?: string;
9
+ arity: "boolean" | "value";
10
+ form: "separate" | "attached";
11
+ malformed: boolean;
12
+ }
13
+ export interface StateSelectorCandidate {
14
+ source: "mode" | "positional" | "input.mode" | "input.skill";
15
+ value: string | undefined;
16
+ index: number;
17
+ }
18
+ export type StateInputKind = "empty" | "inline" | "file" | "invalid";
19
+ export interface StateInputClassification {
20
+ index: number;
21
+ raw: string;
22
+ kind: StateInputKind;
23
+ selectors: StateSelectorCandidate[];
24
+ }
25
+ export interface StateArgvClassification {
26
+ argv: readonly string[];
27
+ action: StateAction;
28
+ effectiveAction: StateAction;
29
+ positionalSkill?: string;
30
+ positionals: readonly string[];
31
+ flags: readonly StateFlagOccurrence[];
32
+ unknownFlags: readonly string[];
33
+ inputs: readonly StateInputClassification[];
34
+ runtimeSelectorCandidates: readonly StateSelectorCandidate[];
35
+ selectorCandidates: readonly StateSelectorCandidate[];
36
+ }
37
+ export declare function firstStateFlagValue(classification: StateArgvClassification, name: string): string | undefined;
38
+ export declare function classifyStateArgv(argv: readonly string[]): StateArgvClassification;
@@ -277,6 +277,15 @@ export type OwnerGenerationBaseline = {
277
277
  session_id: string;
278
278
  published_at: string;
279
279
  };
280
+ export interface ManagedOwnerPredecessorEvidence {
281
+ generation: string;
282
+ sessionId: string;
283
+ runId: string;
284
+ incarnation: string;
285
+ predecessorToken: string;
286
+ }
287
+ /** Resolve one SIGABRT predecessor from the retained exact prior-generation root. */
288
+ export declare function resolveManagedOwnerPredecessorSync(stateDir: string, sessionId: string, baseline: OwnerGenerationBaseline): ManagedOwnerPredecessorEvidence | undefined;
280
289
  export declare function captureOwnerGenerationBaseline(stateDir: string, sessionId: string): Promise<OwnerGenerationBaseline>;
281
290
  /** Captures the full immutable generation record for a planned owner launch. */
282
291
  export declare function captureOwnerGenerationBaselineSync(stateDir: string, sessionId: string): OwnerGenerationBaseline;
@@ -0,0 +1,94 @@
1
+ import type { ManagedOwnerSigabrtReceipt } from "./managed-owner-supervisor";
2
+ /** Immutable identity supplied by the owner-loss monitor and coordinator admission. */
3
+ export interface UltragoalRecoveryBinding {
4
+ sessionId: string;
5
+ endpointIncarnation: string;
6
+ ownerGeneration: string;
7
+ cwd: string;
8
+ }
9
+ export interface UltragoalOwnerLossReceipt {
10
+ schema_version: 1;
11
+ session_id: string;
12
+ generation: string;
13
+ classification: "unexpected_owner_loss";
14
+ result: "signal" | "exit" | "unknown_terminal";
15
+ observed_at: string;
16
+ }
17
+ export type AuthoritativeOwnerLossReceipt = UltragoalOwnerLossReceipt | ManagedOwnerSigabrtReceipt;
18
+ export interface UltragoalRecoverySnapshot {
19
+ /** B0 is captured once before recovery writes. P is protected and never rewritten. */
20
+ b0: {
21
+ planSha256: string;
22
+ ledgerSha256: string;
23
+ capturedAt: string;
24
+ };
25
+ protectedPaths: string[];
26
+ /** Exact sanctioned deltas, never inferred from a worktree scan. */
27
+ sanctionedDeltas: string[];
28
+ /** Durable baseline-absent artifacts. */
29
+ absentArtifacts: string[];
30
+ /** Transient paths deliberately excluded from provenance. */
31
+ transientHistory: string[];
32
+ }
33
+ export type UltragoalRecoveryDisposition = "resume" | "handoff";
34
+ export interface UltragoalRecoveryDecision {
35
+ disposition: UltragoalRecoveryDisposition;
36
+ reason: string;
37
+ snapshot?: UltragoalRecoverySnapshot;
38
+ terminal?: {
39
+ yieldId: string;
40
+ result: Record<string, unknown>;
41
+ };
42
+ }
43
+ interface TranscriptYield {
44
+ type: "yield";
45
+ id: string;
46
+ parentId: string | null;
47
+ result: Record<string, unknown>;
48
+ }
49
+ /**
50
+ * Parse the complete transcript; partial rows, alternate terminal spellings, and
51
+ * duplicate/conflicting yields are intentionally invalid authority.
52
+ */
53
+ export declare function parseStrictTerminalTranscript(content: string): TranscriptYield | null;
54
+ /** Validate a path through a retained native root descriptor; path strings alone are never authority. */
55
+ export declare function validateRecoveryPath(root: string, candidate: string): Promise<string | null>;
56
+ export declare function validateOwnerLossBinding(binding: UltragoalRecoveryBinding, receipt: unknown): receipt is AuthoritativeOwnerLossReceipt;
57
+ /** Admission is valid only for this immutable coordinator endpoint incarnation. */
58
+ export declare function validateRecoveryAdmission(binding: UltragoalRecoveryBinding, admission: unknown): boolean;
59
+ /** Raw plan and ledger evidence must be complete before their B0 hashes are trusted. */
60
+ export declare function validateRawUltragoalEvidence(plan: Uint8Array, ledger: Uint8Array): boolean;
61
+ /** Build a B0 snapshot without consulting unrelated paths or mutable sidecars. */
62
+ export declare function captureUltragoalRecoverySnapshot(input: {
63
+ cwd: string;
64
+ sessionId: string;
65
+ protectedPaths: readonly string[];
66
+ sanctionedDeltas: readonly string[];
67
+ absentArtifacts: readonly string[];
68
+ transientHistory: readonly string[];
69
+ }): Promise<UltragoalRecoverySnapshot | null>;
70
+ /**
71
+ * Decide only from direct owner evidence plus a complete terminal transcript.
72
+ * All ambiguity maps to durable handoff; callers never guess a resume.
73
+ */
74
+ export declare function planUltragoalOwnerLossRecovery(input: {
75
+ binding: UltragoalRecoveryBinding;
76
+ receipt: unknown;
77
+ admission: unknown;
78
+ transcriptPath: string;
79
+ protectedPaths?: readonly string[];
80
+ sanctionedDeltas?: readonly string[];
81
+ absentArtifacts?: readonly string[];
82
+ transientHistory?: readonly string[];
83
+ }): Promise<UltragoalRecoveryDecision>;
84
+ /** Persist a monotonic replay journal and fail-closed handoff through sanctioned state writers. */
85
+ export declare function persistUltragoalRecoveryDecision(input: {
86
+ cwd: string;
87
+ sessionId: string;
88
+ binding: UltragoalRecoveryBinding;
89
+ decision: UltragoalRecoveryDecision;
90
+ }): Promise<{
91
+ handoffPath: string;
92
+ journalPath: string;
93
+ }>;
94
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { WorkflowHudSummary } from "../skill-state/active-state";
2
2
  export { computeUltragoalPlanGeneration, receiptRelevantGoals } from "./ultragoal-receipt-freshness";
3
+ export { captureUltragoalRecoverySnapshot, parseStrictTerminalTranscript, persistUltragoalRecoveryDecision, planUltragoalOwnerLossRecovery, type UltragoalOwnerLossReceipt, type UltragoalRecoveryBinding, type UltragoalRecoveryDecision, type UltragoalRecoverySnapshot, validateOwnerLossBinding, validateRawUltragoalEvidence, validateRecoveryAdmission, validateRecoveryPath, } from "./ultragoal-owner-loss-recovery";
3
4
  export type UltragoalGjcGoalMode = "aggregate" | "per-story";
4
5
  export type UltragoalGoalStatus = "pending" | "active" | "complete" | "failed" | "blocked" | "review_blocked" | "superseded";
5
6
  export type UltragoalPipelineMetadataSource = "original_plan_graph" | "legacy_brief_only" | "steering";
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { ControlServer, type EndpointHandler } from "./control-endpoint";
14
14
  import { type FinalizeChecks, type ValidationCommandSpec } from "./finalize";
15
- import { releaseLease, type SessionLease } from "./session-lease";
15
+ import { heartbeat, releaseLease, type SessionLease } from "./session-lease";
16
16
  import { type HarnessSessionTransport } from "./session-transport";
17
17
  import { appendEvent, writeSessionState } from "./storage";
18
18
  export interface OwnerOptions {
@@ -30,6 +30,8 @@ export interface OwnerOptions {
30
30
  controlServerFactory?: (socketPath: string, handler: EndpointHandler) => ControlServer;
31
31
  /** Test seam for deterministic lease-release teardown failures. */
32
32
  leaseRelease?: typeof releaseLease;
33
+ /** Test seam for deterministic lease-heartbeat behavior (e.g. renewal barriers). */
34
+ leaseHeartbeat?: typeof heartbeat;
33
35
  /** Test seams for frame persistence failures. */
34
36
  framePersistence?: {
35
37
  appendEvent?: typeof appendEvent;
@@ -1,8 +1,26 @@
1
+ import { type NativeDirectoryTreeSnapshot } from "@gajae-code/natives";
1
2
  import type { InternalResource, InternalUrl, ProtocolHandler } from "./types";
3
+ export interface ManagedLegacyLocalMigrationEntry {
4
+ readonly relativePath: string;
5
+ readonly kind: "directory" | "file";
6
+ readonly bytes?: Uint8Array;
7
+ readonly sha256?: string;
8
+ }
9
+ /** Opaque authority for a managed session's legacy `local` artifact tree. */
10
+ export interface ManagedLegacyLocalMigrationSource {
11
+ capture(): Promise<{
12
+ readonly snapshot: NativeDirectoryTreeSnapshot;
13
+ readonly entries: readonly ManagedLegacyLocalMigrationEntry[];
14
+ } | null>;
15
+ retire(snapshot: NativeDirectoryTreeSnapshot): void;
16
+ }
2
17
  export interface LocalProtocolOptions {
3
18
  getArtifactsDir?: () => string | null;
19
+ isManagedDestination?: () => boolean;
20
+ getManagedLegacyLocalMigrationSource?: () => ManagedLegacyLocalMigrationSource | null;
4
21
  getSessionId?: () => string | null;
5
22
  }
23
+ export declare function initializeLocalRoot(options: LocalProtocolOptions): Promise<string>;
6
24
  export declare function resolveLocalRoot(options: LocalProtocolOptions): string;
7
25
  export declare function resolveLocalUrlToPath(input: string | InternalUrl, options: LocalProtocolOptions): string;
8
26
  /**
@@ -18,7 +18,7 @@ import type { SubmittedUserInput } from "./modes/types";
18
18
  import type { MCPManager } from "./runtime-mcp";
19
19
  import { type CreateAgentSessionOptions, createAgentSession, discoverAuthStorage } from "./sdk";
20
20
  import type { AgentSession } from "./session/agent-session";
21
- import { type ResumeSessionIdentity, type SessionDirectoryMigrationPolicy, type SessionInfo, SessionManager, type StrictSessionOpenResult } from "./session/session-manager";
21
+ import { type ResumeSessionIdentity, type SessionDestination, type SessionDirectoryMigrationPolicy, type SessionInfo, SessionManager, type StrictSessionOpenResult } from "./session/session-manager";
22
22
  import { runStartupCredentialAutoImportIfNeeded } from "./setup/credential-auto-import";
23
23
  import type { LspStartupServerInfo } from "./tools";
24
24
  import type { EventBus } from "./utils/event-bus";
@@ -87,7 +87,7 @@ type CreateInteractiveMode = (options: InteractiveModeFactoryOptions) => Interac
87
87
  type ResumePickerTerminalCheck = () => boolean;
88
88
  type ListForResumePickerReadOnly = (cwd: string, sessionDir?: string) => Promise<SessionInfo[]>;
89
89
  type SelectResumeSession = (sessions: SessionInfo[]) => Promise<SessionSelectionResult>;
90
- type OpenExistingSessionStrict = (identity: ResumeSessionIdentity, sessionDir?: string, migrationPolicy?: SessionDirectoryMigrationPolicy) => Promise<StrictSessionOpenResult>;
90
+ type OpenExistingSessionStrict = (identity: ResumeSessionIdentity, destination: SessionDestination, storage?: undefined, migrationPolicy?: SessionDirectoryMigrationPolicy) => Promise<StrictSessionOpenResult>;
91
91
  export declare const BARE_RESUME_CONFLICT_ERROR = "--resume without a session cannot be combined with --continue, --fork, or --no-session.";
92
92
  export declare const BARE_RESUME_INTERACTIVE_ERROR = "--resume requires an interactive terminal; use --resume <id>.";
93
93
  export declare const BARE_RESUME_OPEN_ERROR = "Could not open the selected session. Use --resume <id>.";
@@ -0,0 +1,2 @@
1
+ /** Removes every terminal control sequence except bounded SGR parameters (0-255). */
2
+ export declare function validateDisplayLine(line: string): string;
@@ -2,6 +2,11 @@ import { Editor, type KeyId } from "@gajae-code/tui";
2
2
  import { type AppKeybinding } from "../../config/keybindings";
3
3
  type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "app.commandPalette.open" | "app.model.cycleForward" | "app.model.cycleBackward" | "app.model.select" | "app.model.selectTemporary" | "app.tools.expand" | "app.thinking.toggle" | "app.editor.external" | "app.history.search" | "app.message.dequeue" | "app.message.followUp" | "app.message.queue" | "app.clipboard.pasteImage" | "app.clipboard.copyPrompt">;
4
4
  type PastePendingClearReason = "timeout" | "queue-limit";
5
+ export interface PasteTextContext {
6
+ readonly signal: AbortSignal;
7
+ /** Run one synchronous composer mutation only while this paste transaction is current. */
8
+ commit(commit: () => boolean): boolean;
9
+ }
5
10
  /**
6
11
  * Custom editor that handles configurable app-level shortcuts for coding-agent.
7
12
  */
@@ -35,9 +40,9 @@ export declare class CustomEditor extends Editor {
35
40
  /** Called when the configured image-paste shortcut is pressed. */
36
41
  onPasteImage?: () => Promise<boolean>;
37
42
  /** Called before bracketed paste content is inserted. Return true to consume it. */
38
- onPasteText?: (text: string) => boolean | Promise<boolean>;
39
- /** Called when async paste handling drops queued input instead of replaying it. */
40
- onPastePendingInputCleared?: (reason: PastePendingClearReason, droppedInputCount: number) => void;
43
+ onPasteText?: (text: string, context: PasteTextContext) => boolean | Promise<boolean>;
44
+ /** Called when pending paste handling is cancelled after restoring queued input. */
45
+ onPastePendingInputCleared?: (reason: PastePendingClearReason, restoredInputCount: number) => void;
41
46
  /** Called when the configured dequeue shortcut is pressed. */
42
47
  onDequeue?: () => void;
43
48
  /** Called when the configured queue shortcut is pressed. */
@@ -10,6 +10,8 @@ export interface NotificationsEditorPreferences {
10
10
  sessionScope: "all" | "primary";
11
11
  richEnabled: boolean;
12
12
  richDraftEnabled: boolean;
13
+ toolActivityEnabled: boolean;
14
+ streamingEnabled: boolean;
13
15
  }
14
16
  /** Secret-safe snapshot used to render the Notifications tab. */
15
17
  export interface NotificationsEditorState {
@@ -28,6 +30,7 @@ export interface NotificationsEditorSetupInput {
28
30
  chatId?: string;
29
31
  richEnabled: boolean;
30
32
  richDraftEnabled: boolean;
33
+ streamingEnabled: boolean;
31
34
  }
32
35
  /**
33
36
  * Secret-safe setup draft. The adapter may retain its private credential while
@@ -39,6 +42,7 @@ export interface PreparedTelegramConfiguration {
39
42
  tokenFingerprint?: string;
40
43
  richEnabled: boolean;
41
44
  richDraftEnabled: boolean;
45
+ streamingEnabled: boolean;
42
46
  }
43
47
  export interface NotificationsPreflightResult {
44
48
  status: "ready" | "aborted" | "cancelled" | "error";
@@ -1,6 +1,7 @@
1
1
  import type { KeyId } from "../../config/keybindings";
2
+ import type { SessionMessageEntry } from "../../session/session-manager";
2
3
  import type { SessionObserverRegistry } from "../session-observer-registry";
3
- import { TranscriptViewerOverlay } from "./transcript-viewer-overlay";
4
+ import { type TranscriptViewerEntry, TranscriptViewerOverlay } from "./transcript-viewer-overlay";
4
5
  /** Session-observer adapter. The shared viewer owns navigation and fold state. */
5
6
  export declare class SessionObserverOverlayComponent extends TranscriptViewerOverlay {
6
7
  #private;
@@ -8,3 +9,4 @@ export declare class SessionObserverOverlayComponent extends TranscriptViewerOve
8
9
  refreshFromRegistry(): void;
9
10
  handleInput(keyData: string): void;
10
11
  }
12
+ export declare function entriesFromMessages(entries: readonly SessionMessageEntry[]): TranscriptViewerEntry[];
@@ -22,6 +22,8 @@ export interface SettingsRuntimeContext {
22
22
  cwd: string;
23
23
  /** Whether this terminal can render the pet overlay. */
24
24
  petAvailable?: boolean;
25
+ /** Terminal environment used to select unavailable-pet guidance. Omitted in production to use Bun.env. */
26
+ terminalEnv?: NodeJS.ProcessEnv;
25
27
  }
26
28
  /** Status line settings subset for preview */
27
29
  export interface StatusLinePreviewSettings {
@@ -0,0 +1,77 @@
1
+ import type { Theme } from "../theme/theme";
2
+ export declare const MAX_TOOL_ARGS_CHARS = 500;
3
+ export declare const TOOL_RESULT_MAX_EXPANDED_LINES = 100;
4
+ export declare const INPUT_MAX_SOURCE_BYTES = 1048576;
5
+ export declare const INPUT_MAX_SOURCE_LINES = 50000;
6
+ export declare const INPUT_MAX_SCALAR_LEN = 8192;
7
+ export declare const INPUT_MAX_JSON_DEPTH = 32;
8
+ export declare const INPUT_MAX_JSON_NODES = 20000;
9
+ export type ToolDisplaySections = {
10
+ callLines: string[];
11
+ statusLines: string[];
12
+ resultText: string;
13
+ };
14
+ /**
15
+ * Produces final, terminal-safe rich display lines for an expanded tool entry.
16
+ * It owns validation, width-aware wrapping, and the result-only visible cap.
17
+ */
18
+ export declare function renderToolDisplayLines(descriptor: ToolTranscriptRenderDescriptor, contentWidth: number, theme: Theme): string[];
19
+ export type ToolTranscriptRenderDescriptor = Readonly<{
20
+ name: string;
21
+ args: Record<string, unknown>;
22
+ intent?: string;
23
+ resultContent: string;
24
+ details?: string;
25
+ detailsData?: unknown;
26
+ isError: boolean;
27
+ isPartial: boolean;
28
+ hasResult: boolean;
29
+ inputTruncated: boolean;
30
+ }>;
31
+ export type BuildToolTranscriptEntryInput = {
32
+ canonicalPayload: import("../transcript-item-registry").TranscriptSourcePayload;
33
+ renderDescriptor: ToolTranscriptRenderDescriptor;
34
+ capabilities: import("../transcript-item-registry").TranscriptItemCapabilities;
35
+ identity: {
36
+ id: string;
37
+ label: string;
38
+ display?: "full";
39
+ };
40
+ };
41
+ /**
42
+ * Shared tool projection for the main transcript and session observer.
43
+ * `payload` is canonical/copyable source; display is derived only from the
44
+ * sanitized, frozen descriptor. The observer's whole-entry 100-line cap and
45
+ * the main view's tool-only result cap intentionally remain surface-specific.
46
+ */
47
+ export declare function buildToolTranscriptEntry(input: BuildToolTranscriptEntryInput): import("./transcript-viewer-overlay").TranscriptViewerEntry;
48
+ /** Sanitizes and freezes all display-only values before tool formatting. */
49
+ export declare function createToolTranscriptRenderDescriptor(input: {
50
+ name: unknown;
51
+ args: unknown;
52
+ intent?: unknown;
53
+ resultContent: unknown;
54
+ details?: unknown;
55
+ detailsData?: unknown;
56
+ isError?: unknown;
57
+ isPartial?: unknown;
58
+ hasResult?: unknown;
59
+ inputTruncated?: unknown;
60
+ }): ToolTranscriptRenderDescriptor;
61
+ type ToolCallFields = {
62
+ name: string;
63
+ args: Record<string, unknown>;
64
+ intent?: string;
65
+ };
66
+ type ToolResultFields = {
67
+ resultText: string;
68
+ isError: boolean;
69
+ hasResult: boolean;
70
+ };
71
+ export type ToolTranscriptFields = ToolCallFields & ToolResultFields;
72
+ export declare function formatToolArgs(name: string, args: Record<string, unknown>): string;
73
+ export declare function composeToolCall({ name, args, intent }: ToolCallFields): string;
74
+ export declare function composeToolResult({ resultText, isError, hasResult }: ToolResultFields): string;
75
+ export declare function composeToolText(fields: ToolTranscriptFields): string;
76
+ export declare function toolDisplayText(fields: ToolTranscriptFields, expanded: boolean): string;
77
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { Container, type MouseEvent } from "@gajae-code/tui";
2
2
  import type { TranscriptItemRegistry, TranscriptSourcePayload } from "../transcript-item-registry";
3
+ import { type ToolTranscriptRenderDescriptor } from "./tool-transcript-format";
3
4
  export type TranscriptViewerEntry = {
4
5
  id: string;
5
6
  kind: string;
@@ -9,6 +10,8 @@ export type TranscriptViewerEntry = {
9
10
  foldable?: boolean;
10
11
  rawViewable?: boolean;
11
12
  getDisplayText?: (expanded: boolean) => string;
13
+ renderDescriptor?: ToolTranscriptRenderDescriptor;
14
+ richRenderEligible?: boolean;
12
15
  };
13
16
  export type TranscriptViewerOverlayOptions = {
14
17
  title?: string;
@@ -45,7 +45,14 @@ export declare class GoalModeController {
45
45
  onPendingSubmissionFinished(customType?: string): void;
46
46
  onUserSubmission(): void;
47
47
  handleSessionEvent(event: AgentSessionEvent): Promise<void>;
48
- restoreFromSession(sessionContext: SessionContext): Promise<boolean>;
48
+ /**
49
+ * Restore durable goal state. Recovery hydration deliberately performs only
50
+ * in-memory restoration: it neither consumes a pending request nor repairs
51
+ * invalid persisted state by writing a fallback mode entry.
52
+ */
53
+ restoreFromSession(sessionContext: SessionContext, options?: {
54
+ recoveryHydration?: boolean;
55
+ }): Promise<boolean>;
49
56
  handleCommand(rest?: string): Promise<void>;
50
57
  enter(options: {
51
58
  objective?: string;
@@ -1,13 +1,18 @@
1
1
  import { type AutocompleteProvider, type SlashCommand } from "@gajae-code/tui";
2
2
  import { type ComposerSubmissionOptions, type InteractiveModeContext } from "../../modes/types";
3
+ import { loadPastedImageBatch } from "../../utils/pasted-image-loading";
3
4
  import { ActionRegistry } from "../action-registry";
5
+ import type { PasteTextContext } from "../components/custom-editor";
4
6
  export declare const INTERACTIVE_ABORT_CLEANUP_TIMEOUT_MS = 5000;
5
7
  export declare const BACKGROUND_FOLD_DOUBLE_PRESS_MS = 750;
8
+ interface InputControllerDependencies {
9
+ loadPastedImageBatch?: typeof loadPastedImageBatch;
10
+ }
6
11
  export declare class InputController {
7
12
  #private;
8
13
  private ctx;
9
14
  readonly actionRegistry: ActionRegistry<void>;
10
- constructor(ctx: InteractiveModeContext);
15
+ constructor(ctx: InteractiveModeContext, dependencies?: InputControllerDependencies);
11
16
  setupKeyHandlers(): void;
12
17
  setupEditorSubmitHandler(): void;
13
18
  submitText(text: string, composer: ComposerSubmissionOptions): Promise<void>;
@@ -28,7 +33,7 @@ export declare class InputController {
28
33
  }): number;
29
34
  handleBackgroundCommand(): void;
30
35
  handleForegroundToolBackgroundFold(): boolean;
31
- handleTextPaste(text: string): boolean | Promise<boolean>;
36
+ handleTextPaste(text: string, context: PasteTextContext): boolean | Promise<boolean>;
32
37
  handleImagePaste(): Promise<boolean>;
33
38
  createAutocompleteProvider(commands: SlashCommand[], basePath: string): AutocompleteProvider;
34
39
  /** Copy the current editor line to the system clipboard. */
@@ -47,3 +52,4 @@ export declare class InputController {
47
52
  openExternalEditor(): Promise<void>;
48
53
  registerExtensionShortcuts(): void;
49
54
  }
55
+ export {};
@@ -43,6 +43,21 @@ export interface NotificationsEditorOperationDependencies {
43
43
  saveTelegramInactive: typeof saveTelegramInactive;
44
44
  removeTelegramConfiguration: typeof removeTelegramConfiguration;
45
45
  unregisterNotificationRoot: typeof unregisterNotificationRoot;
46
+ reloadTelegramDaemon(settings: Settings): Promise<{
47
+ ok: boolean;
48
+ message: string;
49
+ }>;
50
+ restartTelegramDaemon(settings: Settings): Promise<{
51
+ ok: boolean;
52
+ message: string;
53
+ }>;
54
+ stopTelegramDaemon(settings: Settings): Promise<{
55
+ ok: boolean;
56
+ message: string;
57
+ before?: {
58
+ health?: string;
59
+ };
60
+ }>;
46
61
  }
47
62
  /**
48
63
  * Concrete service adapter for the direct Notifications settings tab. Secrets remain in this closure's
@@ -45,6 +45,9 @@ export interface NotificationGateResolutionOptions {
45
45
  resolveClaim(): void;
46
46
  closeClaimInvalid(reason: string): void;
47
47
  }
48
+ export declare class NotificationGatePolicyChangedError extends Error {
49
+ constructor();
50
+ }
48
51
  export interface AskSelectedAckRecoveryParticipant {
49
52
  requestRecoveredAskSelectedAck(input: {
50
53
  sessionId: string;