@gajae-code/coding-agent 0.7.1 → 0.7.3
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.
- package/CHANGELOG.md +57 -0
- package/dist/types/cli/mcp-cli.d.ts +25 -0
- package/dist/types/cli/notify-cli.d.ts +2 -0
- package/dist/types/cli.d.ts +6 -0
- package/dist/types/commands/mcp.d.ts +70 -0
- package/dist/types/config/keybindings.d.ts +2 -2
- package/dist/types/config/settings-schema.d.ts +39 -2
- package/dist/types/deep-interview/plaintext-gate-guard.d.ts +11 -0
- package/dist/types/extensibility/shared-events.d.ts +1 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +1 -1
- package/dist/types/lsp/types.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +2 -0
- package/dist/types/modes/components/status-line/git-utils.d.ts +6 -0
- package/dist/types/modes/theme/defaults/index.d.ts +99 -0
- package/dist/types/notifications/attachment-registry.d.ts +17 -0
- package/dist/types/notifications/chat-adapters.d.ts +9 -0
- package/dist/types/notifications/config.d.ts +9 -1
- package/dist/types/notifications/engine.d.ts +59 -0
- package/dist/types/notifications/managed-daemon.d.ts +48 -0
- package/dist/types/notifications/operator-runtime.d.ts +52 -0
- package/dist/types/notifications/telegram-daemon.d.ts +73 -16
- package/dist/types/notifications/threaded-inbound.d.ts +19 -0
- package/dist/types/notifications/threaded-render.d.ts +6 -1
- package/dist/types/notifications/topic-registry.d.ts +2 -0
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/tools/composer-bash-policy.d.ts +14 -0
- package/dist/types/tools/fetch.d.ts +23 -0
- package/dist/types/tools/index.d.ts +1 -0
- package/dist/types/tools/telegram-send.d.ts +32 -0
- package/dist/types/web/insane/bridge.d.ts +103 -0
- package/dist/types/web/insane/url-guard.d.ts +25 -0
- package/dist/types/web/scrapers/types.d.ts +5 -0
- package/dist/types/web/scrapers/utils.d.ts +7 -1
- package/dist/types/web/search/provider.d.ts +18 -1
- package/dist/types/web/search/providers/insane.d.ts +53 -0
- package/dist/types/web/search/providers/text-citations.d.ts +23 -0
- package/dist/types/web/search/types.d.ts +12 -4
- package/package.json +10 -8
- package/scripts/verify-insane-vendor.ts +132 -0
- package/src/cli/args.ts +1 -1
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/mcp-cli.ts +272 -0
- package/src/cli/notify-cli.ts +152 -5
- package/src/cli.ts +6 -2
- package/src/commands/mcp.ts +117 -0
- package/src/commands/team.ts +1 -1
- package/src/config/keybindings.ts +2 -2
- package/src/config/settings-schema.ts +30 -1
- package/src/deep-interview/plaintext-gate-guard.ts +94 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +4 -3
- package/src/defaults/gjc/skills/ralplan/SKILL.md +11 -4
- package/src/defaults/gjc/skills/team/SKILL.md +3 -2
- package/src/extensibility/extensions/runner.ts +1 -0
- package/src/extensibility/shared-events.ts +1 -0
- package/src/gjc-runtime/launch-tmux.ts +17 -3
- package/src/gjc-runtime/ledger-event-renderer.ts +1 -0
- package/src/gjc-runtime/ralplan-runtime.ts +2 -2
- package/src/gjc-runtime/tmux-common.ts +3 -1
- package/src/gjc-runtime/ultragoal-guard.ts +25 -8
- package/src/gjc-runtime/workflow-manifest.generated.json +29 -0
- package/src/gjc-runtime/workflow-manifest.ts +7 -2
- package/src/hooks/skill-state.ts +57 -0
- package/src/internal-urls/docs-index.generated.ts +14 -11
- package/src/lsp/config.ts +16 -3
- package/src/lsp/defaults.json +7 -0
- package/src/lsp/types.ts +2 -0
- package/src/modes/bridge/bridge-mode.ts +11 -0
- package/src/modes/components/custom-editor.ts +2 -0
- package/src/modes/components/footer.ts +2 -3
- package/src/modes/components/model-selector.ts +12 -0
- package/src/modes/components/status-line/git-utils.ts +25 -0
- package/src/modes/components/status-line.ts +10 -11
- package/src/modes/components/welcome.ts +2 -3
- package/src/modes/controllers/event-controller.ts +15 -0
- package/src/modes/controllers/selector-controller.ts +3 -0
- package/src/modes/interactive-mode.ts +48 -3
- package/src/modes/shared/agent-wire/scopes.ts +1 -1
- package/src/modes/theme/defaults/gruvbox-dark.json +99 -0
- package/src/modes/theme/defaults/index.ts +2 -0
- package/src/modes/utils/context-usage.ts +2 -2
- package/src/notifications/attachment-registry.ts +23 -0
- package/src/notifications/chat-adapters.ts +147 -0
- package/src/notifications/config.ts +23 -2
- package/src/notifications/engine.ts +100 -0
- package/src/notifications/index.ts +180 -38
- package/src/notifications/managed-daemon.ts +163 -0
- package/src/notifications/operator-runtime.ts +171 -0
- package/src/notifications/telegram-daemon.ts +553 -236
- package/src/notifications/threaded-inbound.ts +60 -4
- package/src/notifications/threaded-render.ts +20 -2
- package/src/notifications/topic-registry.ts +5 -0
- package/src/session/agent-session.ts +82 -51
- package/src/slash-commands/helpers/parse.ts +2 -1
- package/src/tools/bash.ts +9 -0
- package/src/tools/composer-bash-policy.ts +96 -0
- package/src/tools/fetch.ts +94 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/telegram-send.ts +137 -0
- package/src/web/insane/bridge.ts +350 -0
- package/src/web/insane/url-guard.ts +159 -0
- package/src/web/scrapers/types.ts +143 -45
- package/src/web/scrapers/utils.ts +70 -19
- package/src/web/search/provider.ts +77 -18
- package/src/web/search/providers/anthropic.ts +70 -3
- package/src/web/search/providers/codex.ts +1 -119
- package/src/web/search/providers/gemini.ts +99 -0
- package/src/web/search/providers/insane.ts +551 -0
- package/src/web/search/providers/openai-compatible.ts +66 -32
- package/src/web/search/providers/text-citations.ts +111 -0
- package/src/web/search/types.ts +13 -2
- package/vendor/insane-search/LICENSE +21 -0
- package/vendor/insane-search/MANIFEST.json +24 -0
- package/vendor/insane-search/engine/__init__.py +23 -0
- package/vendor/insane-search/engine/__main__.py +128 -0
- package/vendor/insane-search/engine/bias_check.py +183 -0
- package/vendor/insane-search/engine/executor.py +254 -0
- package/vendor/insane-search/engine/fetch_chain.py +725 -0
- package/vendor/insane-search/engine/learning.py +175 -0
- package/vendor/insane-search/engine/phase0.py +214 -0
- package/vendor/insane-search/engine/safety.py +91 -0
- package/vendor/insane-search/engine/templates/package.json +11 -0
- package/vendor/insane-search/engine/templates/playwright_mobile_chrome.js +188 -0
- package/vendor/insane-search/engine/templates/playwright_real_chrome.js +243 -0
- package/vendor/insane-search/engine/tests/test_hardening.py +57 -0
- package/vendor/insane-search/engine/tests/test_smoke.py +152 -0
- package/vendor/insane-search/engine/tests/test_u1.py +200 -0
- package/vendor/insane-search/engine/tests/test_u4.py +131 -0
- package/vendor/insane-search/engine/tests/test_u5.py +163 -0
- package/vendor/insane-search/engine/tests/test_u7.py +124 -0
- package/vendor/insane-search/engine/transport.py +211 -0
- package/vendor/insane-search/engine/url_transforms.py +98 -0
- package/vendor/insane-search/engine/validators.py +331 -0
- package/vendor/insane-search/engine/waf_detector.py +214 -0
- package/vendor/insane-search/engine/waf_profiles.yaml +162 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.7.3] - 2026-06-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added the `gruvbox-dark` built-in theme: the canonical Gruvbox dark palette mapped across every GJC theme token, selectable via `/theme`.
|
|
10
|
+
- Added a standalone MCP registration command: `gjc mcp add|list|remove` writes explicit user-provided MCP server definitions (stdio/http/sse) into GJC config without importing or inheriting other tools' live MCP configs, with env/header/auth values redacted in output (#1095).
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Refined the interactive composer chrome so the input box, status rail, and welcome banner share one visual language: the composer now uses a rounded border (matching the rounded welcome banner) instead of a sharp rectangle, and the status rail uses the subtle elevated `userMessageBg` surface tone instead of the heavy `statusLineBg` block, so it reads as a quiet layered zone rather than a solid bar. Both resolve through existing semantic theme slots, so every bundled theme tracks automatically.
|
|
15
|
+
- When a Composer harness model is active, the `bash` tool now hard-blocks repository file I/O — pipes, process/heredoc/command substitution, redirection, `tee`, file read/discovery (`cat`/`head`/`tail`/`grep`/`find`/`ls`), file mutation (`cp`/`mv`/`rm`/`touch`/`mkdir`/`chmod`/`ln`), `sed`/`awk`, git file-read subcommands, and script file I/O — unless the command is on a strict allowlist (`bun test`/`run check|test|build`, `cargo test|check|build`, `git status`/`rev-parse`, package version queries), forcing Composer models to use the dedicated find/search/read/edit tools for file discovery and mutation (#1027).
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
- Documented the docs-only Aside evaluation boundary as an opt-in search/context retrieval sidecar using explicit user-provided MCP configuration, with browser actions, login flows, payments, internal tools, secrets, and raw browser/session payload logging out of scope by default (#1097).
|
|
19
|
+
- Added a UI design and visual QA contract governing future TUI/dashboard/terminal visual work (#1101).
|
|
20
|
+
- Added a CodeGraph custom-tool integration guide (#1073).
|
|
21
|
+
- Documented the Windows psmux namespace boundary for `gjc --tmux`, `gjc session`, and `gjc team`: cwd/`-c` is now called out as a start directory rather than server isolation, `-L <namespace>` is identified as the psmux namespace primitive, and tmux command overrides are documented as executable names rather than shell command lines (#1118).
|
|
22
|
+
- Clarified the Telegram Threaded Mode fallback documentation (#1122).
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Expanded the initial GJC forge welcome box to the live terminal viewport width and pinned the status/composer area to the bottom when the startup layout is shorter than the screen (#1120).
|
|
27
|
+
|
|
28
|
+
- Deep Interview Restate/option gates now recover through the ask selector path instead of waiting on plaintext `Options:` output.
|
|
29
|
+
- Widened the forge splash on wide terminals so it no longer clips (#1110).
|
|
30
|
+
- Parse quoted SSH remote host names in the slash-command host parser (#1104).
|
|
31
|
+
- Tolerate an unreadable git HEAD in the status chrome instead of throwing (#1072).
|
|
32
|
+
- Registered the `plugin` command in the CLI command registry so `gjc plugin …` (install/uninstall/list/marketplace/enable/disable/doctor) resolves instead of silently falling through to the default launch/chat command — the command was implemented and tested but was never registered (#1071).
|
|
33
|
+
- Keybinding/Ctrl+Enter newline-handling sweep across the editor and input controller (#1111).
|
|
34
|
+
- Fixed model-profile default badge precedence in the `/model` selector so the correct default-profile badge wins (#1117).
|
|
35
|
+
- Prevented duplicate Telegram topics being created for transient sessions (#1125).
|
|
36
|
+
|
|
37
|
+
### Security
|
|
38
|
+
|
|
39
|
+
- User-supplied URL reads now share the public HTTP(S) network guard that was previously insane-fallback-only: the initial target, the redirect chain, and binary-conversion redirects are all revalidated against private-network blocking before any request is opened or followed, closing an SSRF path through the normal read-tool fetch pipeline (#1114).
|
|
40
|
+
- Bridge workflow-gate responses now require the claimed controller token before the unattended control plane may resolve a gate, and the `workflow_gate_response` RPC command was raised from prompt scope to control scope, so prompt-only clients can no longer answer lifecycle workflow gates (#1116).
|
|
41
|
+
|
|
42
|
+
## [0.7.2] - 2026-06-24
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Added a keyless `insane` web search provider that safely ports upstream insane-search public-route fallbacks without TLS impersonation, browser/cookie bypasses, credential storage, or auto-installed dependencies (#1011).
|
|
46
|
+
- `web_search` `auto` mode now drives native provider search over proxies/custom endpoints by reusing the active model's own credential + baseUrl when canonical native creds are absent: `activeContextNativeId()` matches the model's wire api (+ model-id family) to `anthropic` (anthropic-messages), `openai-compatible` (openai-responses/completions), or `gemini` (google-generative-ai Generative Language), each falling back to DuckDuckGo if the endpoint does not support web search.
|
|
47
|
+
- Added built-in C# LSP detection for `csharp-ls`, with `omnisharp` preserved as a fallback when `csharp-ls` is unavailable (#1054).
|
|
48
|
+
- Added Discord and Slack notification adapters alongside the existing Telegram surface, so action-needed signals and replies can be routed to those clients (#1043).
|
|
49
|
+
- Telegram daemon now supports inbound and outbound photo/file attachments, forwarding agent images and accepting user-sent media (#1053).
|
|
50
|
+
- `gjc` verifies Telegram Threaded Mode during notification setup and falls back to a flat private chat when topics are unavailable (#1029).
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Hardened context-overflow recovery so automatic maintenance clears the TUI loader, surfaces overflow completion/skip status, retries resumable tails safely, and falls back to the synthetic auto-continue prompt for non-resumable tails when enabled.
|
|
55
|
+
- `web_search` native providers no longer discard genuinely grounded answers that omit structured `url_citation` annotations: when a search demonstrably ran — Responses `web_search_call` / `tool_usage.web_search`, a Chat Completions search request, or Anthropic `web_search_tool_result` / `server_tool_use` / `server_tool_use.web_search_requests` — sources are recovered from inline markdown links and bare URLs. Inline recovery is gated on that real-search signal so a stray prose URL in a non-search answer is never promoted to a citation, and Anthropic now fails closed to DuckDuckGo when Claude answers from stable knowledge without searching. Inline-citation helpers are shared via `providers/text-citations.ts`.
|
|
56
|
+
- Preserve GJC-managed tmux sessions on attach/disconnect instead of tearing them down, and stop implicitly attaching on launch (#1063).
|
|
57
|
+
- Corrected the auto-compaction output reserve so post-compaction responses keep adequate headroom (#1021).
|
|
58
|
+
- Improved active-input shortcut hints and the busy-input queueing hint for clearer in-session guidance (#1022, #1024).
|
|
59
|
+
- Fixed the Ultragoal ask guard blocking the `ask` tool when no GJC session can be resolved. `ultragoalReadPaths` falls back to the legacy/global `.gjc/ultragoal` directory when neither `GJC_SESSION_ID` nor an auto-detectable active session is present, but the follow-up `readUltragoalPlan`/`readUltragoalLedger` reads ignored that resolution and re-ran session detection, throwing `no active GJC session found` and surfacing `durable_state_unreadable` — which blocked `ask` for every agent even with no active Ultragoal run. `ultragoalReadPaths` now returns the resolved session id (or `null`); the ask guard treats a null session as inactive and falls open, and threads the resolved id into the plan/ledger reads so they no longer re-resolve. An inconsistent state (state dir present but `goals.json` missing/empty) still fails closed so the pause guard keeps blocking give-ups.
|
|
60
|
+
|
|
5
61
|
## [0.7.1] - 2026-06-23
|
|
6
62
|
### Fixed
|
|
7
63
|
|
|
@@ -136,6 +192,7 @@
|
|
|
136
192
|
- Added an opt-in `gjc rlm` research mode (v1, interactive): a Jupyter-notebook-style research session over the existing agent loop, backed by the shared persistent Python kernel. It loads a distinct research system prompt, restricts the toolset to a hard-gated allowlist (`python` + `read` + `web_search`, asserted after tool-registry assembly — no `bash`/edit/arbitrary mutation), optionally loads a project-root `DATA.md` (overridable via `--data <path>`), aggregates every executed cell live into `.gjc/rlm/<session>/notebook.ipynb` (single-queue atomic temp-rename writes with post-write validation), and synthesizes `.gjc/rlm/<session>/report.md` on session exit. Autonomous goal-arg runs, `--resume`, managed per-workspace venv provisioning, and the optional `>=N` completion gate are deferred follow-ups.
|
|
137
193
|
- Added an experimental opt-in `computer` desktop-control tool surface for local macOS screenshot/input coordination, backed by native `ComputerController`/`computerScreenshot` bindings and gated through settings/tool registration so it can continue stabilizing on `dev` outside the 0.5.4 patch release.
|
|
138
194
|
- Dropped deprecated GitHub Actions Intel macOS (`macos-13` / `darwin-x64`) release-binary coverage after the runner pool repeatedly blocked v0.6.0 publish; Intel macOS users should install through npm/Bun or build from source.
|
|
195
|
+
- Re-enabled GitHub Actions Intel macOS (`darwin-x64`) release-binary coverage using the `macos-15-intel` runner, so standalone `gjc-darwin-x64` binaries ship again alongside Apple Silicon.
|
|
139
196
|
|
|
140
197
|
## [0.5.4] - 2026-06-17
|
|
141
198
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MCPServerConfig } from "../runtime-mcp/types";
|
|
2
|
+
export type MCPAction = "add" | "list" | "remove";
|
|
3
|
+
export interface MCPCommandArgs {
|
|
4
|
+
action: MCPAction;
|
|
5
|
+
name?: string;
|
|
6
|
+
commandArgs?: string[];
|
|
7
|
+
flags: {
|
|
8
|
+
project?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
json?: boolean;
|
|
11
|
+
type?: "stdio" | "http" | "sse";
|
|
12
|
+
command?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
arg?: string[];
|
|
15
|
+
env?: string[];
|
|
16
|
+
header?: string[];
|
|
17
|
+
cwd?: string;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
};
|
|
20
|
+
cwd?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class MCPArgsError extends Error {
|
|
23
|
+
}
|
|
24
|
+
export declare function redactMCPServerConfig(config: MCPServerConfig): MCPServerConfig;
|
|
25
|
+
export declare function runMCPCommand(args: MCPCommandArgs): Promise<void>;
|
|
@@ -17,6 +17,8 @@ export interface NotifyCommandDeps {
|
|
|
17
17
|
pollIntervalMs?: number;
|
|
18
18
|
setupChatId?: string;
|
|
19
19
|
setupRedact?: boolean;
|
|
20
|
+
setupInteractive?: boolean;
|
|
21
|
+
threadedModePrompt?: (message: string) => Promise<string>;
|
|
20
22
|
}
|
|
21
23
|
export declare function parseNotifyArgs(args: string[]): NotifyCommandArgs | undefined;
|
|
22
24
|
export declare function runNotifyCommand(cmd: NotifyCommandArgs, deps?: NotifyCommandDeps): Promise<void>;
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* CLI entry point — registers all commands explicitly and delegates to the
|
|
4
|
+
* lightweight CLI runner from pi-utils.
|
|
5
|
+
*/
|
|
6
|
+
import { type CommandEntry } from "@gajae-code/utils/cli";
|
|
7
|
+
export declare const commands: CommandEntry[];
|
|
2
8
|
/** Run the CLI with the given argv (no `process.argv` prefix). */
|
|
3
9
|
export declare function runCli(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct MCP server registration for standalone GJC.
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
5
|
+
import { type MCPAction } from "../cli/mcp-cli";
|
|
6
|
+
export default class MCP extends Command {
|
|
7
|
+
static description: string;
|
|
8
|
+
static delegateHelp: boolean;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
action: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
12
|
+
description: string;
|
|
13
|
+
required: false;
|
|
14
|
+
options: MCPAction[];
|
|
15
|
+
};
|
|
16
|
+
name: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
17
|
+
description: string;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
commandArgs: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
21
|
+
description: string;
|
|
22
|
+
required: false;
|
|
23
|
+
multiple: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
static flags: {
|
|
27
|
+
project: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
force: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
35
|
+
char: string;
|
|
36
|
+
description: string;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
type: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
40
|
+
description: string;
|
|
41
|
+
options: string[];
|
|
42
|
+
};
|
|
43
|
+
command: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
url: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
arg: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
50
|
+
description: string;
|
|
51
|
+
multiple: true;
|
|
52
|
+
};
|
|
53
|
+
env: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
54
|
+
description: string;
|
|
55
|
+
multiple: true;
|
|
56
|
+
};
|
|
57
|
+
header: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
58
|
+
description: string;
|
|
59
|
+
multiple: true;
|
|
60
|
+
};
|
|
61
|
+
cwd: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
timeout: import("@gajae-code/utils/cli").FlagDescriptor<"integer"> & {
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
run(): Promise<void>;
|
|
69
|
+
private printHelp;
|
|
70
|
+
}
|
|
@@ -230,8 +230,8 @@ export declare const KEYBINDINGS: {
|
|
|
230
230
|
readonly description: "Open external editor";
|
|
231
231
|
};
|
|
232
232
|
readonly "app.message.followUp": {
|
|
233
|
-
readonly defaultKeys:
|
|
234
|
-
readonly description: "Send follow-up message";
|
|
233
|
+
readonly defaultKeys: [];
|
|
234
|
+
readonly description: "Send follow-up message (no default; Ctrl+Enter inserts a newline)";
|
|
235
235
|
};
|
|
236
236
|
readonly "app.message.queue": {
|
|
237
237
|
readonly defaultKeys: "alt+enter";
|
|
@@ -130,6 +130,22 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
130
130
|
readonly type: "string";
|
|
131
131
|
readonly default: undefined;
|
|
132
132
|
};
|
|
133
|
+
readonly "notifications.discord.botToken": {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly default: undefined;
|
|
136
|
+
};
|
|
137
|
+
readonly "notifications.discord.channelId": {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly default: undefined;
|
|
140
|
+
};
|
|
141
|
+
readonly "notifications.slack.botToken": {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly default: undefined;
|
|
144
|
+
};
|
|
145
|
+
readonly "notifications.slack.channelId": {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly default: undefined;
|
|
148
|
+
};
|
|
133
149
|
readonly "notifications.redact": {
|
|
134
150
|
readonly type: "boolean";
|
|
135
151
|
readonly default: false;
|
|
@@ -2469,6 +2485,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2469
2485
|
readonly description: "Allow the read tool to fetch and process URLs";
|
|
2470
2486
|
};
|
|
2471
2487
|
};
|
|
2488
|
+
readonly "web.insaneFallback": {
|
|
2489
|
+
readonly type: "boolean";
|
|
2490
|
+
readonly default: false;
|
|
2491
|
+
readonly ui: {
|
|
2492
|
+
readonly tab: "tools";
|
|
2493
|
+
readonly label: "Insane Search Fallback";
|
|
2494
|
+
readonly description: "Opt in to the vendored insane-search escalation for blocked public URL reads (403/WAF/JS-gated). Off by default. Requires preinstalled python3 + curl_cffi (and node + playwright/stealth for the browser phase); changes network posture by enabling TLS/browser impersonation for public pages.";
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2472
2497
|
readonly "github.enabled": {
|
|
2473
2498
|
readonly type: "boolean";
|
|
2474
2499
|
readonly default: false;
|
|
@@ -2518,7 +2543,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2518
2543
|
readonly type: "array";
|
|
2519
2544
|
readonly default: string[];
|
|
2520
2545
|
readonly items: {
|
|
2521
|
-
readonly enum: readonly ["duckduckgo", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2546
|
+
readonly enum: readonly ["duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2522
2547
|
};
|
|
2523
2548
|
readonly ui: {
|
|
2524
2549
|
readonly tab: "tools";
|
|
@@ -3121,7 +3146,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3121
3146
|
};
|
|
3122
3147
|
readonly "providers.webSearch": {
|
|
3123
3148
|
readonly type: "enum";
|
|
3124
|
-
readonly values: readonly ["auto", "duckduckgo", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3149
|
+
readonly values: readonly ["auto", "duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3125
3150
|
readonly default: "auto";
|
|
3126
3151
|
readonly ui: {
|
|
3127
3152
|
readonly tab: "providers";
|
|
@@ -3135,6 +3160,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3135
3160
|
readonly value: "duckduckgo";
|
|
3136
3161
|
readonly label: "DuckDuckGo";
|
|
3137
3162
|
readonly description: "Keyless default \u2014 no API key or OAuth required";
|
|
3163
|
+
}, {
|
|
3164
|
+
readonly value: "insane";
|
|
3165
|
+
readonly label: "Insane";
|
|
3166
|
+
readonly description: "Keyless safe public-route fallback inspired by upstream insane-search";
|
|
3138
3167
|
}, {
|
|
3139
3168
|
readonly value: "exa";
|
|
3140
3169
|
readonly label: "Exa";
|
|
@@ -3574,6 +3603,14 @@ export interface NotificationsSettings {
|
|
|
3574
3603
|
botToken: string | undefined;
|
|
3575
3604
|
chatId: string | undefined;
|
|
3576
3605
|
};
|
|
3606
|
+
discord: {
|
|
3607
|
+
botToken: string | undefined;
|
|
3608
|
+
channelId: string | undefined;
|
|
3609
|
+
};
|
|
3610
|
+
slack: {
|
|
3611
|
+
botToken: string | undefined;
|
|
3612
|
+
channelId: string | undefined;
|
|
3613
|
+
};
|
|
3577
3614
|
redact: boolean;
|
|
3578
3615
|
daemon: {
|
|
3579
3616
|
idleTimeoutMs: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type DeepInterviewPlaintextAskLeakOption = "Yes, crystallize" | "Adjust wording" | "Missing scope";
|
|
2
|
+
export type DeepInterviewPlaintextAskLeakResult = {
|
|
3
|
+
kind: "deep_interview_plaintext_ask_leak";
|
|
4
|
+
matchedOptions: DeepInterviewPlaintextAskLeakOption[];
|
|
5
|
+
signals: {
|
|
6
|
+
optionsHeading: true;
|
|
7
|
+
restateIntent: true;
|
|
8
|
+
deepInterviewContext: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function detectDeepInterviewPlaintextAskLeak(text: string): DeepInterviewPlaintextAskLeakResult | null;
|
|
@@ -172,6 +172,7 @@ export interface AutoCompactionEndEvent {
|
|
|
172
172
|
errorMessage?: string;
|
|
173
173
|
/** True when compaction was skipped for a benign reason (no model, no candidates, nothing to compact). */
|
|
174
174
|
skipped?: boolean;
|
|
175
|
+
continuationSkipReason?: "auto_continue_disabled_non_resumable_tail";
|
|
175
176
|
}
|
|
176
177
|
/** Fired when auto-retry starts */
|
|
177
178
|
export interface AutoRetryStartEvent {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* 2. **Artifact write**: `gjc ralplan --write --stage <type> --stage_n <N> --artifact
|
|
14
14
|
* <path-or-string> [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
|
|
15
|
-
* / Critic / revision / ADR / final markdown under `.gjc/plans/ralplan/<run-id>/`, maintains
|
|
15
|
+
* / Critic / revision / post-interview / ADR / final markdown under `.gjc/plans/ralplan/<run-id>/`, maintains
|
|
16
16
|
* an `index.jsonl` audit log, copies `final` stages to `pending-approval.md`, and advances
|
|
17
17
|
* the HUD chip to reflect the latest persisted stage.
|
|
18
18
|
*/
|
|
@@ -224,6 +224,8 @@ export interface ServerConfig {
|
|
|
224
224
|
/** Per-server warmup timeout in milliseconds. Overrides the global WARMUP_TIMEOUT_MS for this server during startup. */
|
|
225
225
|
warmupTimeoutMs?: number;
|
|
226
226
|
capabilities?: ServerCapabilities;
|
|
227
|
+
/** Names of lower-precedence servers to drop when this server is available. */
|
|
228
|
+
supersedes?: string[];
|
|
227
229
|
/** If true, this is a linter/formatter server (e.g., Biome) - used only for diagnostics/actions, not type intelligence */
|
|
228
230
|
isLinter?: boolean;
|
|
229
231
|
/** Resolved absolute path to the command binary (set during config loading) */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Editor, type KeyId } from "@gajae-code/tui";
|
|
2
2
|
import { type AppKeybinding } from "../../config/keybindings";
|
|
3
|
-
type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "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.queue" | "app.clipboard.pasteImage" | "app.clipboard.copyPrompt">;
|
|
3
|
+
type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "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
5
|
/**
|
|
6
6
|
* Custom editor that handles configurable app-level shortcuts for coding-agent.
|
|
@@ -35,6 +35,8 @@ export declare class ModelSelectorComponent extends Container {
|
|
|
35
35
|
sessionId?: string;
|
|
36
36
|
isFastForProvider?: (provider?: string) => boolean;
|
|
37
37
|
isFastForSubagentProvider?: (provider?: string) => boolean;
|
|
38
|
+
currentThinkingLevel?: ThinkingLevel;
|
|
39
|
+
activeModelProfile?: string;
|
|
38
40
|
});
|
|
39
41
|
handleInput(keyData: string): void;
|
|
40
42
|
getSearchInput(): Input;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GitHeadState } from "../../../utils/git";
|
|
1
2
|
/**
|
|
2
3
|
* Extract "owner/repo" from a GitHub remote URL.
|
|
3
4
|
* Handles HTTPS, SSH (scp-style), and git:// protocols.
|
|
@@ -20,3 +21,8 @@ export declare function canReuseCachedPr(cachedPr: {
|
|
|
20
21
|
number: number;
|
|
21
22
|
url: string;
|
|
22
23
|
} | null | undefined, cachedContext: PrCacheContext | undefined, currentContext: PrCacheContext | null): boolean;
|
|
24
|
+
export interface CurrentBranchState {
|
|
25
|
+
readonly branch: string | null;
|
|
26
|
+
readonly repoId: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function resolveCurrentBranch(cwd: string, resolveHead?: (cwd: string) => GitHeadState | null): CurrentBranchState;
|
|
@@ -325,6 +325,105 @@ export declare const defaultThemes: {
|
|
|
325
325
|
"preset": string;
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
|
+
"gruvbox-dark": {
|
|
329
|
+
$schema: string;
|
|
330
|
+
name: string;
|
|
331
|
+
vars: {
|
|
332
|
+
"bgHard": string;
|
|
333
|
+
"surface": string;
|
|
334
|
+
"surfaceBright": string;
|
|
335
|
+
"borderNeutral": string;
|
|
336
|
+
"borderSubtle": string;
|
|
337
|
+
"fg": string;
|
|
338
|
+
"muted": string;
|
|
339
|
+
"dim": string;
|
|
340
|
+
"gray": string;
|
|
341
|
+
"red": string;
|
|
342
|
+
"green": string;
|
|
343
|
+
"yellow": string;
|
|
344
|
+
"blue": string;
|
|
345
|
+
"purple": string;
|
|
346
|
+
"aqua": string;
|
|
347
|
+
"orange": string;
|
|
348
|
+
"diffRemovalRed": string;
|
|
349
|
+
};
|
|
350
|
+
colors: {
|
|
351
|
+
"accent": string;
|
|
352
|
+
"border": string;
|
|
353
|
+
"borderAccent": string;
|
|
354
|
+
"borderMuted": string;
|
|
355
|
+
"success": string;
|
|
356
|
+
"error": string;
|
|
357
|
+
"warning": string;
|
|
358
|
+
"muted": string;
|
|
359
|
+
"dim": string;
|
|
360
|
+
"text": string;
|
|
361
|
+
"thinkingText": string;
|
|
362
|
+
"selectedBg": string;
|
|
363
|
+
"userMessageBg": string;
|
|
364
|
+
"userMessageText": string;
|
|
365
|
+
"customMessageBg": string;
|
|
366
|
+
"customMessageText": string;
|
|
367
|
+
"customMessageLabel": string;
|
|
368
|
+
"toolPendingBg": string;
|
|
369
|
+
"toolSuccessBg": string;
|
|
370
|
+
"toolErrorBg": string;
|
|
371
|
+
"toolTitle": string;
|
|
372
|
+
"toolOutput": string;
|
|
373
|
+
"mdHeading": string;
|
|
374
|
+
"mdLink": string;
|
|
375
|
+
"mdLinkUrl": string;
|
|
376
|
+
"mdCode": string;
|
|
377
|
+
"mdCodeBlock": string;
|
|
378
|
+
"mdCodeBlockBorder": string;
|
|
379
|
+
"mdQuote": string;
|
|
380
|
+
"mdQuoteBorder": string;
|
|
381
|
+
"mdHr": string;
|
|
382
|
+
"mdListBullet": string;
|
|
383
|
+
"toolDiffAdded": string;
|
|
384
|
+
"toolDiffRemoved": string;
|
|
385
|
+
"toolDiffContext": string;
|
|
386
|
+
"syntaxComment": string;
|
|
387
|
+
"syntaxKeyword": string;
|
|
388
|
+
"syntaxFunction": string;
|
|
389
|
+
"syntaxVariable": string;
|
|
390
|
+
"syntaxString": string;
|
|
391
|
+
"syntaxNumber": string;
|
|
392
|
+
"syntaxType": string;
|
|
393
|
+
"syntaxOperator": string;
|
|
394
|
+
"syntaxPunctuation": string;
|
|
395
|
+
"thinkingOff": string;
|
|
396
|
+
"thinkingMinimal": string;
|
|
397
|
+
"thinkingLow": string;
|
|
398
|
+
"thinkingMedium": string;
|
|
399
|
+
"thinkingHigh": string;
|
|
400
|
+
"thinkingXhigh": string;
|
|
401
|
+
"bashMode": string;
|
|
402
|
+
"pythonMode": string;
|
|
403
|
+
"statusLineBg": string;
|
|
404
|
+
"statusLineSep": string;
|
|
405
|
+
"statusLineModel": string;
|
|
406
|
+
"statusLinePath": string;
|
|
407
|
+
"statusLineGitClean": string;
|
|
408
|
+
"statusLineGitDirty": string;
|
|
409
|
+
"statusLineContext": string;
|
|
410
|
+
"statusLineSpend": string;
|
|
411
|
+
"statusLineStaged": string;
|
|
412
|
+
"statusLineDirty": string;
|
|
413
|
+
"statusLineUntracked": string;
|
|
414
|
+
"statusLineOutput": string;
|
|
415
|
+
"statusLineCost": string;
|
|
416
|
+
"statusLineSubagents": string;
|
|
417
|
+
};
|
|
418
|
+
export: {
|
|
419
|
+
"pageBg": string;
|
|
420
|
+
"cardBg": string;
|
|
421
|
+
"infoBg": string;
|
|
422
|
+
};
|
|
423
|
+
symbols: {
|
|
424
|
+
"preset": string;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
328
427
|
opencode: {
|
|
329
428
|
$schema: string;
|
|
330
429
|
name: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process-wide registry mapping a session id to a sink that delivers a local
|
|
3
|
+
* file to the session's connected Telegram chat as a document. Registered by
|
|
4
|
+
* the notifications extension; consumed by the telegram_send tool.
|
|
5
|
+
*/
|
|
6
|
+
/** Delivers a local file to the session's Telegram chat. */
|
|
7
|
+
export type TelegramFileSink = (file: {
|
|
8
|
+
path: string;
|
|
9
|
+
caption?: string;
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
ok: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** Register `sink` for `sessionId`. Returns a disposer that clears it. */
|
|
15
|
+
export declare function registerTelegramFileSink(sessionId: string, sink: TelegramFileSink): () => void;
|
|
16
|
+
/** The Telegram file sink for `sessionId`, if one is registered. */
|
|
17
|
+
export declare function getTelegramFileSink(sessionId: string): TelegramFileSink | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationPresentationAdapter } from "./engine";
|
|
2
|
+
type AdapterKind = "discord" | "slack";
|
|
3
|
+
interface ChatAdapterOptions {
|
|
4
|
+
kind: AdapterKind;
|
|
5
|
+
channelId?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createDiscordAdapter(opts?: Omit<ChatAdapterOptions, "kind">): NotificationPresentationAdapter;
|
|
8
|
+
export declare function createSlackAdapter(opts?: Omit<ChatAdapterOptions, "kind">): NotificationPresentationAdapter;
|
|
9
|
+
export {};
|
|
@@ -3,13 +3,21 @@ export interface NotificationConfig {
|
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
botToken?: string;
|
|
5
5
|
chatId?: string;
|
|
6
|
+
discord: {
|
|
7
|
+
botToken?: string;
|
|
8
|
+
channelId?: string;
|
|
9
|
+
};
|
|
10
|
+
slack: {
|
|
11
|
+
botToken?: string;
|
|
12
|
+
channelId?: string;
|
|
13
|
+
};
|
|
6
14
|
redact: boolean;
|
|
7
15
|
verbosity: "lean" | "verbose";
|
|
8
16
|
idleTimeoutMs: number;
|
|
9
17
|
}
|
|
10
18
|
/** Read typed config from Settings. */
|
|
11
19
|
export declare function getNotificationConfig(settings: Settings): NotificationConfig;
|
|
12
|
-
/** Is global config sufficient for auto-on (enabled +
|
|
20
|
+
/** Is global config sufficient for auto-on (enabled + at least one configured adapter)? */
|
|
13
21
|
export declare function isGloballyConfigured(cfg: NotificationConfig): boolean;
|
|
14
22
|
/** Resolve whether the notifications extension should be registered at SDK startup. */
|
|
15
23
|
export declare function shouldRegisterNotificationsExtension(input: {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type RedactableAction } from "./config";
|
|
2
|
+
export type NotificationEvent = ({
|
|
3
|
+
type: "action_needed";
|
|
4
|
+
} & RedactableAction) | {
|
|
5
|
+
type: "action_resolved";
|
|
6
|
+
id: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
resolvedBy?: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: "frame";
|
|
11
|
+
sessionId: string;
|
|
12
|
+
frame: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
export interface NotificationReplyRoute {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
actionId: string;
|
|
17
|
+
answer: number | string | {
|
|
18
|
+
selected?: Array<number | string>;
|
|
19
|
+
custom?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface NotificationAdapterPayload {
|
|
23
|
+
adapter: string;
|
|
24
|
+
channelKey?: string;
|
|
25
|
+
body: unknown;
|
|
26
|
+
route?: Omit<NotificationReplyRoute, "answer">;
|
|
27
|
+
}
|
|
28
|
+
export interface NotificationPresentationAdapter {
|
|
29
|
+
readonly kind: "telegram" | "discord" | "slack";
|
|
30
|
+
render(event: NotificationEvent): NotificationAdapterPayload[];
|
|
31
|
+
mapInbound(input: unknown): NotificationReplyRoute | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface EngineSessionSink {
|
|
34
|
+
sendReply(route: NotificationReplyRoute): void;
|
|
35
|
+
}
|
|
36
|
+
export interface NotificationEngineOptions {
|
|
37
|
+
redact: boolean;
|
|
38
|
+
sessionTag: (sessionId: string) => string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Shared presentation engine for managed notification clients.
|
|
42
|
+
*
|
|
43
|
+
* It owns fanout, redaction boundaries, pending-action routing, and reply
|
|
44
|
+
* delivery into session sinks. Transport adapters stay pure: render an internal
|
|
45
|
+
* event into a public-safe payload and map an inbound transport interaction
|
|
46
|
+
* back into a session/action answer.
|
|
47
|
+
*/
|
|
48
|
+
export declare class NotificationPresentationEngine {
|
|
49
|
+
private readonly opts;
|
|
50
|
+
readonly adapters: readonly NotificationPresentationAdapter[];
|
|
51
|
+
private readonly sessions;
|
|
52
|
+
private readonly pending;
|
|
53
|
+
constructor(adapters: readonly NotificationPresentationAdapter[], opts: NotificationEngineOptions);
|
|
54
|
+
connectSession(sessionId: string, sink: EngineSessionSink): void;
|
|
55
|
+
dropSession(sessionId: string): void;
|
|
56
|
+
fanout(event: NotificationEvent): NotificationAdapterPayload[];
|
|
57
|
+
routeInbound(adapterKind: NotificationPresentationAdapter["kind"], input: unknown): boolean;
|
|
58
|
+
private redactEvent;
|
|
59
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Settings } from "../config/settings";
|
|
2
|
+
import { RateLimitPool } from "./rate-limit-pool";
|
|
3
|
+
import { type ThreadedSend } from "./threaded-render";
|
|
4
|
+
export interface ManagedNotificationDaemonFs {
|
|
5
|
+
readdir(path: string): Promise<string[]>;
|
|
6
|
+
}
|
|
7
|
+
export interface ManagedSessionSocket {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
token: string;
|
|
10
|
+
ws: WebSocket;
|
|
11
|
+
pending: Map<string, {
|
|
12
|
+
sessionId: string;
|
|
13
|
+
actionId: string;
|
|
14
|
+
}>;
|
|
15
|
+
capable: boolean;
|
|
16
|
+
lastPongAt: number;
|
|
17
|
+
awaitingNonce: string | undefined;
|
|
18
|
+
pingTimer: ReturnType<typeof setInterval> | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface ManagedNotificationDaemonOptions {
|
|
21
|
+
settings: Settings;
|
|
22
|
+
fs: ManagedNotificationDaemonFs;
|
|
23
|
+
WebSocketImpl?: typeof WebSocket;
|
|
24
|
+
now?: () => number;
|
|
25
|
+
setIntervalImpl?: typeof setInterval;
|
|
26
|
+
clearIntervalImpl?: typeof clearInterval;
|
|
27
|
+
rateLimitPool?: RateLimitPool<{
|
|
28
|
+
send: ThreadedSend;
|
|
29
|
+
topicId?: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export declare abstract class ManagedNotificationDaemon {
|
|
33
|
+
protected readonly opts: ManagedNotificationDaemonOptions;
|
|
34
|
+
readonly sessions: Map<string, ManagedSessionSocket>;
|
|
35
|
+
readonly pool: RateLimitPool<{
|
|
36
|
+
send: ThreadedSend;
|
|
37
|
+
topicId?: string;
|
|
38
|
+
}>;
|
|
39
|
+
protected constructor(opts: ManagedNotificationDaemonOptions);
|
|
40
|
+
scanRoots(): Promise<void>;
|
|
41
|
+
connectSession(sessionId: string, url: string, token: string): ManagedSessionSocket;
|
|
42
|
+
protected handleSessionMessage(session: ManagedSessionSocket, msg: Record<string, unknown>): Promise<boolean>;
|
|
43
|
+
protected renderFrame(frame: Record<string, unknown>): ThreadedSend | undefined;
|
|
44
|
+
protected dropSession(session: ManagedSessionSocket): void;
|
|
45
|
+
protected abstract readRoots(): Promise<string[]>;
|
|
46
|
+
private sendHello;
|
|
47
|
+
private startLiveness;
|
|
48
|
+
}
|