@gajae-code/coding-agent 0.11.10 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -2
- package/dist/types/cli/read-cli.d.ts +1 -0
- package/dist/types/cli.d.ts +8 -1
- package/dist/types/commands/deep-interview.d.ts +9 -0
- package/dist/types/commands/harness.d.ts +22 -0
- package/dist/types/commands/read.d.ts +6 -0
- package/dist/types/config/model-profile-activation.d.ts +1 -0
- package/dist/types/config/model-profile-contract.d.ts +2 -0
- package/dist/types/config/model-registry.d.ts +4 -0
- package/dist/types/config/provider-auth-health.d.ts +14 -0
- package/dist/types/config/provider-ranking.d.ts +59 -0
- package/dist/types/config/settings-schema.d.ts +86 -3
- package/dist/types/config/settings.d.ts +3 -0
- package/dist/types/extensibility/extensions/types.d.ts +43 -2
- package/dist/types/extensibility/shared-events.d.ts +6 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +5 -12
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +17 -32
- package/dist/types/gjc-runtime/deep-interview-stage.d.ts +37 -0
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +4 -135
- package/dist/types/gjc-runtime/gc-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/linux-proc.d.ts +22 -14
- package/dist/types/gjc-runtime/memory-guard-owner-claims.d.ts +47 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +112 -1
- package/dist/types/gjc-runtime/state-runtime.d.ts +3 -1
- package/dist/types/gjc-runtime/state-writer.d.ts +5 -46
- package/dist/types/gjc-runtime/team-launch.d.ts +1 -1
- package/dist/types/gjc-runtime/team-runtime.d.ts +2 -1
- package/dist/types/gjc-runtime/team-store.d.ts +12 -0
- package/dist/types/gjc-runtime/team-worker-memory-guard.d.ts +92 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +7 -0
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +8 -0
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +3 -5
- package/dist/types/internal-urls/local-root-gc.d.ts +2 -0
- package/dist/types/main.d.ts +1 -1
- package/dist/types/memories/index.d.ts +2 -0
- package/dist/types/modes/acp/acp-agent.d.ts +22 -9
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/irc-sidebar.d.ts +41 -0
- package/dist/types/modes/components/queue-pane.d.ts +8 -0
- package/dist/types/modes/components/queued-message-selector.d.ts +6 -0
- package/dist/types/modes/components/read-tool-group.d.ts +4 -4
- package/dist/types/modes/components/session-observer-overlay.d.ts +4 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +8 -0
- package/dist/types/modes/components/welcome.d.ts +1 -0
- package/dist/types/modes/controllers/event-controller.d.ts +3 -0
- package/dist/types/modes/interactive-mode.d.ts +7 -1
- package/dist/types/modes/irc-observation-ledger.d.ts +17 -1
- package/dist/types/modes/types.d.ts +2 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +16 -0
- package/dist/types/runtime/memory-domain.d.ts +9 -0
- package/dist/types/runtime/memory-guard-contract.d.ts +71 -0
- package/dist/types/runtime/memory-guard.d.ts +39 -0
- package/dist/types/runtime/memory-limit.d.ts +11 -0
- package/dist/types/runtime-mcp/manager.d.ts +8 -0
- package/dist/types/runtime-mcp/smithery-auth.d.ts +5 -0
- package/dist/types/sdk/acp/final-text.d.ts +19 -0
- package/dist/types/sdk/acp/mcp.d.ts +23 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +7 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +2 -1
- package/dist/types/sdk/bus/control-drain-lease.d.ts +52 -0
- package/dist/types/sdk/bus/index.d.ts +18 -2
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +37 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +2 -1
- package/dist/types/sdk/bus/rate-limit-pool.d.ts +2 -0
- package/dist/types/sdk/bus/reconciliation-store.d.ts +65 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -4
- package/dist/types/sdk/bus/telegram-daemon.d.ts +23 -3
- package/dist/types/sdk/host/control/operations.d.ts +2 -1
- package/dist/types/sdk/host/host.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +5 -0
- package/dist/types/sdk/lifecycle-session.d.ts +10 -1
- package/dist/types/sdk/startup-capability.d.ts +6 -0
- package/dist/types/session/agent-session.d.ts +51 -19
- package/dist/types/session/fallback-chain-controller.d.ts +18 -2
- package/dist/types/session/internal/managed-session-scope.d.ts +27 -0
- package/dist/types/session/memory-guard-checkpoint-participant.d.ts +69 -0
- package/dist/types/session/session-manager.d.ts +59 -13
- package/dist/types/session/streaming-output.d.ts +60 -5
- package/dist/types/skill-state/active-state.d.ts +0 -4
- package/dist/types/skill-state/workflow-hud.d.ts +3 -0
- package/dist/types/task/executor.d.ts +6 -0
- package/dist/types/task/types.d.ts +36 -0
- package/dist/types/task/ultragoal-redteam-activation.d.ts +33 -0
- package/dist/types/tools/browser/launch.d.ts +7 -0
- package/dist/types/tools/fetch.d.ts +17 -1
- package/dist/types/tools/output-meta.d.ts +21 -1
- package/dist/types/tools/read-internals.d.ts +12 -0
- package/dist/types/tools/read.d.ts +45 -1
- package/dist/types/tools/resource-gc.d.ts +23 -0
- package/dist/types/tools/tool-result.d.ts +7 -1
- package/package.json +9 -13
- package/scripts/benchmark-sticky-viewport-pr1.ts +239 -0
- package/scripts/capture-sticky-viewport-showcase.ts +292 -0
- package/scripts/generate-sdk-operation-inventory.ts +4 -0
- package/scripts/run-test-manifest.ts +6 -4
- package/scripts/verify-gjc-sdk-canonicalization.ts +122 -18
- package/scripts/verify-sticky-viewport-showcase.ts +611 -0
- package/src/capability/index.ts +8 -0
- package/src/cli/args.ts +14 -8
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/read-cli.ts +2 -1
- package/src/cli.ts +49 -2
- package/src/commands/deep-interview.ts +29 -9
- package/src/commands/harness.ts +35 -12
- package/src/commands/read.ts +11 -2
- package/src/commands/sdk.ts +91 -7
- package/src/commands/team.ts +1 -1
- package/src/config/model-profile-activation.ts +1 -0
- package/src/config/model-profile-contract.ts +13 -0
- package/src/config/model-profiles.ts +24 -0
- package/src/config/model-registry.ts +21 -2
- package/src/config/provider-auth-health.ts +42 -0
- package/src/config/provider-ranking.ts +119 -0
- package/src/config/settings-schema.ts +84 -3
- package/src/config/settings.ts +254 -108
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +229 -82
- package/src/defaults/gjc/skills/ralplan/SKILL.md +78 -26
- package/src/defaults/gjc/skills/team/SKILL.md +1 -1
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +26 -16
- package/src/eval/py/executor.ts +7 -2
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +42 -4
- package/src/extensibility/shared-events.ts +5 -0
- package/src/gjc-runtime/deep-interview-ambiguity.ts +47 -68
- package/src/gjc-runtime/deep-interview-recorder.ts +227 -310
- package/src/gjc-runtime/deep-interview-runtime.ts +109 -270
- package/src/gjc-runtime/deep-interview-stage.ts +1016 -0
- package/src/gjc-runtime/deep-interview-state.ts +12 -921
- package/src/gjc-runtime/gc-render.ts +1 -0
- package/src/gjc-runtime/gc-runtime.ts +11 -1
- package/src/gjc-runtime/linux-proc.ts +70 -36
- package/src/gjc-runtime/memory-guard-owner-claims.ts +389 -0
- package/src/gjc-runtime/ralplan-runtime.ts +979 -71
- package/src/gjc-runtime/state-runtime.ts +50 -12
- package/src/gjc-runtime/state-writer.ts +70 -222
- package/src/gjc-runtime/team-launch.ts +34 -5
- package/src/gjc-runtime/team-runtime.ts +970 -33
- package/src/gjc-runtime/team-store.ts +32 -0
- package/src/gjc-runtime/team-worker-memory-guard.ts +363 -0
- package/src/gjc-runtime/team-workers.ts +1 -0
- package/src/gjc-runtime/tmux-owner-isolation.ts +18 -0
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +20 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +13 -7
- package/src/gjc-runtime/workflow-manifest.generated.json +97 -350
- package/src/gjc-runtime/workflow-manifest.ts +34 -179
- package/src/hooks/native-skill-hook.ts +17 -4
- package/src/hooks/skill-state.ts +1 -23
- package/src/internal-urls/docs-index.generated.ts +10 -11
- package/src/internal-urls/local-protocol.ts +23 -4
- package/src/internal-urls/local-root-gc.ts +127 -0
- package/src/main.ts +9 -5
- package/src/memories/index.ts +10 -0
- package/src/modes/DESIGN.md +47 -0
- package/src/modes/acp/acp-agent.ts +597 -67
- package/src/modes/acp/acp-event-mapper.ts +106 -12
- package/src/modes/acp/acp-mode.ts +39 -3
- package/src/modes/components/assistant-message.ts +123 -22
- package/src/modes/components/irc-sidebar.ts +176 -62
- package/src/modes/components/model-selector.ts +76 -5
- package/src/modes/components/notifications-settings-editor.ts +1 -1
- package/src/modes/components/oauth-selector.ts +42 -12
- package/src/modes/components/queue-pane.ts +55 -9
- package/src/modes/components/queued-message-selector.ts +53 -10
- package/src/modes/components/read-tool-group.ts +82 -14
- package/src/modes/components/session-observer-overlay.ts +187 -32
- package/src/modes/components/settings-selector.ts +60 -18
- package/src/modes/components/tool-execution.ts +138 -27
- package/src/modes/components/tool-status-header.ts +1 -4
- package/src/modes/components/welcome.ts +18 -3
- package/src/modes/controllers/command-controller.ts +4 -0
- package/src/modes/controllers/event-controller.ts +109 -27
- package/src/modes/controllers/extension-ui-controller.ts +23 -12
- package/src/modes/controllers/input-controller.ts +62 -6
- package/src/modes/controllers/selector-controller.ts +83 -37
- package/src/modes/interactive-mode.ts +127 -29
- package/src/modes/irc-observation-ledger.ts +71 -15
- package/src/modes/runtime-init.ts +20 -2
- package/src/modes/types.ts +2 -0
- package/src/modes/utils/ui-helpers.ts +94 -1
- package/src/prompts/agents/architect.md +9 -1
- package/src/prompts/agents/critic.md +9 -0
- package/src/prompts/agents/executor.md +1 -1
- package/src/prompts/system/system-prompt.md +0 -1
- package/src/prompts/tools/read.md +4 -2
- package/src/runtime/memory-domain.ts +66 -0
- package/src/runtime/memory-guard-contract.ts +73 -0
- package/src/runtime/memory-guard.ts +292 -0
- package/src/runtime/memory-limit.ts +50 -0
- package/src/runtime-mcp/manager.ts +26 -6
- package/src/runtime-mcp/smithery-auth.ts +17 -2
- package/src/runtime-mcp/smithery-connect.ts +11 -1
- package/src/sdk/acp/adapter.ts +8 -1
- package/src/sdk/acp/final-text.ts +40 -0
- package/src/sdk/acp/mcp.ts +26 -0
- package/src/sdk/broker/lifecycle.ts +107 -7
- package/src/sdk/bus/chat-daemon-cli.ts +2 -2
- package/src/sdk/bus/chat-daemon-control.ts +4 -3
- package/src/sdk/bus/config.ts +1 -1
- package/src/sdk/bus/control-drain-lease.ts +104 -0
- package/src/sdk/bus/index.ts +503 -60
- package/src/sdk/bus/kind-aware-reconciliation.ts +242 -0
- package/src/sdk/bus/prompt-reconciliation.ts +2 -1
- package/src/sdk/bus/rate-limit-pool.ts +8 -0
- package/src/sdk/bus/reconciliation-store.ts +224 -0
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -4
- package/src/sdk/bus/telegram-daemon.ts +531 -53
- package/src/sdk/host/control/dispatch.ts +7 -1
- package/src/sdk/host/control/operations.ts +2 -1
- package/src/sdk/host/host.ts +25 -3
- package/src/sdk/host/query/handlers.ts +55 -0
- package/src/sdk/lifecycle-session.ts +19 -3
- package/src/sdk/mcp/server.ts +46 -18
- package/src/sdk/protocol/operation-inventory.generated.json +76 -0
- package/src/sdk/protocol/operation-registry.ts +8 -2
- package/src/sdk/session.ts +25 -2
- package/src/sdk/startup-capability.ts +6 -0
- package/src/session/agent-session.ts +720 -190
- package/src/session/fallback-chain-controller.ts +47 -8
- package/src/session/internal/managed-session-scope.ts +40 -10
- package/src/session/internal/native-publish-outcome.ts +8 -3
- package/src/session/memory-guard-checkpoint-participant.ts +131 -0
- package/src/session/session-manager.ts +1372 -42
- package/src/session/streaming-output.ts +262 -43
- package/src/setup/provider-onboarding.ts +19 -4
- package/src/skill-state/active-state.ts +0 -10
- package/src/skill-state/workflow-hud.ts +25 -2
- package/src/skill-state/workflow-mutation-guard.ts +65 -7
- package/src/task/executor.ts +11 -3
- package/src/task/index.ts +2 -0
- package/src/task/types.ts +22 -11
- package/src/task/ultragoal-redteam-activation.ts +75 -0
- package/src/tools/ask.ts +89 -69
- package/src/tools/browser/launch.ts +41 -6
- package/src/tools/fetch.ts +114 -23
- package/src/tools/output-meta.ts +176 -9
- package/src/tools/path-utils.ts +5 -1
- package/src/tools/read-internals.ts +44 -0
- package/src/tools/read.ts +1542 -310
- package/src/tools/resource-gc.ts +665 -125
- package/src/tools/tool-result.ts +14 -1
- package/src/web/search/providers/codex.ts +1 -1
- package/src/workflow/workflow-intent-diff.ts +4 -1
- package/dist/types/gjc-runtime/deep-interview-draft.d.ts +0 -8
- package/dist/types/gjc-runtime/deep-interview-payload.d.ts +0 -41
- package/dist/types/gjc-runtime/deep-interview-repair.d.ts +0 -17
- package/src/gjc-runtime/deep-interview-draft.ts +0 -843
- package/src/gjc-runtime/deep-interview-payload.ts +0 -262
- package/src/gjc-runtime/deep-interview-repair.ts +0 -1674
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared provider ordering used by every provider-facing selector (`/login`,
|
|
3
|
+
* `/model`, `/provider`).
|
|
4
|
+
*
|
|
5
|
+
* Providers the user already has come first, then a curated list of well-known
|
|
6
|
+
* providers, then everything else alphabetically. This is the single source of
|
|
7
|
+
* truth for that order — surfaces must not keep their own famous-provider list.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Auth/config state of a provider as seen by the calling surface.
|
|
12
|
+
*
|
|
13
|
+
* - `valid` — stored credentials that validated successfully.
|
|
14
|
+
* - `checking` — stored credentials whose async validation is still in flight.
|
|
15
|
+
* Ranked with `valid` so rows do not reflow when validation resolves.
|
|
16
|
+
* - `configured` — no OAuth record, but the provider is present in the model
|
|
17
|
+
* registry with a working API key (custom/API-compatible providers).
|
|
18
|
+
* - `invalid` — stored credentials that failed validation (problematic login).
|
|
19
|
+
* - `none` — nothing stored and nothing configured.
|
|
20
|
+
*/
|
|
21
|
+
export type ProviderAuthState = "valid" | "checking" | "configured" | "invalid" | "none";
|
|
22
|
+
|
|
23
|
+
export const PROVIDER_RANK_TIER = {
|
|
24
|
+
existing: 0,
|
|
25
|
+
problematic: 1,
|
|
26
|
+
famous: 2,
|
|
27
|
+
other: 3,
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
export type ProviderRankTier = (typeof PROVIDER_RANK_TIER)[keyof typeof PROVIDER_RANK_TIER];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Curated provider order for the famous tier. Regional and device variants sit
|
|
34
|
+
* immediately behind their primary so related entries stay grouped.
|
|
35
|
+
*/
|
|
36
|
+
export const FAMOUS_PROVIDER_ORDER: readonly string[] = [
|
|
37
|
+
"openai-codex",
|
|
38
|
+
"openai-codex-device",
|
|
39
|
+
"anthropic",
|
|
40
|
+
"xai",
|
|
41
|
+
"opencode-go",
|
|
42
|
+
"zai",
|
|
43
|
+
"glm-zcode",
|
|
44
|
+
"alibaba-token-plan",
|
|
45
|
+
"qwen-portal",
|
|
46
|
+
"kimi-code",
|
|
47
|
+
"moonshot",
|
|
48
|
+
"minimax-code",
|
|
49
|
+
"minimax-code-cn",
|
|
50
|
+
"xiaomi",
|
|
51
|
+
"xiaomi-token-plan-sgp",
|
|
52
|
+
"xiaomi-token-plan-ams",
|
|
53
|
+
"xiaomi-token-plan-cn",
|
|
54
|
+
"opengateway",
|
|
55
|
+
"bizrouter",
|
|
56
|
+
"github-copilot",
|
|
57
|
+
"cursor",
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
const FAMOUS_PROVIDER_INDEX = new Map(FAMOUS_PROVIDER_ORDER.map((id, index) => [id, index]));
|
|
61
|
+
|
|
62
|
+
/** A provider as ranked by a surface. `label` is what the user sees. */
|
|
63
|
+
export interface RankableProvider {
|
|
64
|
+
id: string;
|
|
65
|
+
label: string;
|
|
66
|
+
authState: ProviderAuthState;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** A provider's position in the ordering: its tier plus its rank inside that tier. */
|
|
70
|
+
export interface ProviderRank {
|
|
71
|
+
tier: ProviderRankTier;
|
|
72
|
+
intraTierRank: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The single ranking result for a provider. `intraTierRank` is the curated
|
|
77
|
+
* famous-list position, or `Number.MAX_SAFE_INTEGER` for providers that are not
|
|
78
|
+
* on the list and therefore order by display label.
|
|
79
|
+
*/
|
|
80
|
+
export function rankProvider(provider: RankableProvider): ProviderRank {
|
|
81
|
+
return {
|
|
82
|
+
tier: providerRankTier(provider.authState, provider.id),
|
|
83
|
+
intraTierRank: FAMOUS_PROVIDER_INDEX.get(provider.id) ?? Number.MAX_SAFE_INTEGER,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function providerRankTier(authState: ProviderAuthState, id: string): ProviderRankTier {
|
|
88
|
+
if (authState === "valid" || authState === "checking" || authState === "configured") {
|
|
89
|
+
return PROVIDER_RANK_TIER.existing;
|
|
90
|
+
}
|
|
91
|
+
if (authState === "invalid") return PROVIDER_RANK_TIER.problematic;
|
|
92
|
+
return FAMOUS_PROVIDER_INDEX.has(id) ? PROVIDER_RANK_TIER.famous : PROVIDER_RANK_TIER.other;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Position within the famous list, or `undefined` for providers not on it. */
|
|
96
|
+
export function famousProviderIndex(id: string): number | undefined {
|
|
97
|
+
return FAMOUS_PROVIDER_INDEX.get(id);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Total order over providers: tier, then famous-list position, then display
|
|
102
|
+
* label, then id. The trailing id comparison guarantees no ties.
|
|
103
|
+
*/
|
|
104
|
+
export function compareRankedProviders(left: RankableProvider, right: RankableProvider): number {
|
|
105
|
+
const leftRank = rankProvider(left);
|
|
106
|
+
const rightRank = rankProvider(right);
|
|
107
|
+
if (leftRank.tier !== rightRank.tier) return leftRank.tier - rightRank.tier;
|
|
108
|
+
if (leftRank.intraTierRank !== rightRank.intraTierRank) return leftRank.intraTierRank - rightRank.intraTierRank;
|
|
109
|
+
|
|
110
|
+
const label = left.label.localeCompare(right.label);
|
|
111
|
+
if (label !== 0) return label;
|
|
112
|
+
|
|
113
|
+
return left.id.localeCompare(right.id);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Convenience wrapper returning a new array in ranked order. */
|
|
117
|
+
export function sortRankedProviders<T extends RankableProvider>(providers: readonly T[]): T[] {
|
|
118
|
+
return [...providers].sort(compareRankedProviders);
|
|
119
|
+
}
|
|
@@ -309,7 +309,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
309
309
|
},
|
|
310
310
|
"notifications.telegram.toolActivity.enabled": {
|
|
311
311
|
type: "boolean",
|
|
312
|
-
default:
|
|
312
|
+
default: false,
|
|
313
313
|
ui: {
|
|
314
314
|
tab: "notifications",
|
|
315
315
|
label: "Telegram Tool Activity",
|
|
@@ -501,6 +501,16 @@ export const SETTINGS_SCHEMA = {
|
|
|
501
501
|
default: 0.05,
|
|
502
502
|
validate: (value: number) => Number.isFinite(value) && value > 0 && value <= 1,
|
|
503
503
|
},
|
|
504
|
+
"gjc.ralplan.maxIterations": {
|
|
505
|
+
type: "number",
|
|
506
|
+
default: 5,
|
|
507
|
+
validate: (value: number) => Number.isInteger(value) && value >= 1 && value <= 20,
|
|
508
|
+
},
|
|
509
|
+
"gjc.ralplan.maxReviewPassesPerLane": {
|
|
510
|
+
type: "number",
|
|
511
|
+
default: 1,
|
|
512
|
+
validate: (value: number) => Number.isInteger(value) && value >= 1 && value <= 10,
|
|
513
|
+
},
|
|
504
514
|
|
|
505
515
|
// ────────────────────────────────────────────────────────────────────────
|
|
506
516
|
// Appearance
|
|
@@ -1244,7 +1254,8 @@ export const SETTINGS_SCHEMA = {
|
|
|
1244
1254
|
ui: {
|
|
1245
1255
|
tab: "interaction",
|
|
1246
1256
|
label: "Mouse Support",
|
|
1247
|
-
description:
|
|
1257
|
+
description:
|
|
1258
|
+
"Enable GJC session scrolling, drag-to-copy text selection, and overlay row selection with the mouse. Disabled by default to preserve native terminal or tmux scrollback and selection.",
|
|
1248
1259
|
},
|
|
1249
1260
|
},
|
|
1250
1261
|
// Conversation flow
|
|
@@ -2048,7 +2059,8 @@ export const SETTINGS_SCHEMA = {
|
|
|
2048
2059
|
ui: {
|
|
2049
2060
|
tab: "editing",
|
|
2050
2061
|
label: "Default Read Limit",
|
|
2051
|
-
description:
|
|
2062
|
+
description:
|
|
2063
|
+
"Default collection/selection limit for read operations; bare local receipts use the separate 50-line / 10 KiB receipt budgets",
|
|
2052
2064
|
options: [
|
|
2053
2065
|
{ value: "200", label: "200 lines" },
|
|
2054
2066
|
{ value: "300", label: "300 lines" },
|
|
@@ -2088,6 +2100,22 @@ export const SETTINGS_SCHEMA = {
|
|
|
2088
2100
|
],
|
|
2089
2101
|
},
|
|
2090
2102
|
},
|
|
2103
|
+
"read.truncation": {
|
|
2104
|
+
type: "enum",
|
|
2105
|
+
values: ["head", "last", "both"] as const,
|
|
2106
|
+
default: "last",
|
|
2107
|
+
ui: {
|
|
2108
|
+
tab: "editing",
|
|
2109
|
+
label: "Read Truncation",
|
|
2110
|
+
description:
|
|
2111
|
+
"Configured default direction for routes that support directional truncation; bare local and archive reads use this value (factory default: last), while explicit truncation always wins",
|
|
2112
|
+
options: [
|
|
2113
|
+
{ value: "head", label: "Head", description: "Keep the first N lines" },
|
|
2114
|
+
{ value: "last", label: "Last", description: "Keep the last N lines (default)" },
|
|
2115
|
+
{ value: "both", label: "Both", description: "Keep the start and the end, elide the middle" },
|
|
2116
|
+
],
|
|
2117
|
+
},
|
|
2118
|
+
},
|
|
2091
2119
|
"read.summaryMaxBytes": {
|
|
2092
2120
|
type: "number",
|
|
2093
2121
|
default: 20,
|
|
@@ -2653,6 +2681,47 @@ export const SETTINGS_SCHEMA = {
|
|
|
2653
2681
|
description: "How often the resource GC sweeps browser tabs and stale screenshot directories.",
|
|
2654
2682
|
},
|
|
2655
2683
|
},
|
|
2684
|
+
"memoryGuard.enabled": {
|
|
2685
|
+
type: "boolean",
|
|
2686
|
+
default: false,
|
|
2687
|
+
},
|
|
2688
|
+
"memoryGuard.checkIntervalMs": {
|
|
2689
|
+
type: "number",
|
|
2690
|
+
default: 30_000,
|
|
2691
|
+
validate: (value: number) => Number.isFinite(value) && value > 0,
|
|
2692
|
+
},
|
|
2693
|
+
"memoryGuard.gcThresholdPercent": {
|
|
2694
|
+
type: "number",
|
|
2695
|
+
default: 70,
|
|
2696
|
+
validate: (value: number) => Number.isFinite(value) && value >= 0 && value <= 100,
|
|
2697
|
+
},
|
|
2698
|
+
"memoryGuard.restartThresholdPercent": {
|
|
2699
|
+
type: "number",
|
|
2700
|
+
default: 85,
|
|
2701
|
+
validate: (value: number) => Number.isFinite(value) && value >= 0 && value <= 100,
|
|
2702
|
+
},
|
|
2703
|
+
"memoryGuard.restartThresholdWindowMs": {
|
|
2704
|
+
type: "number",
|
|
2705
|
+
default: 90_000,
|
|
2706
|
+
validate: (value: number) => Number.isFinite(value) && value > 0,
|
|
2707
|
+
},
|
|
2708
|
+
"memoryGuard.cooldownMs": {
|
|
2709
|
+
type: "number",
|
|
2710
|
+
default: 600_000,
|
|
2711
|
+
validate: (value: number) => Number.isFinite(value) && value >= 0,
|
|
2712
|
+
},
|
|
2713
|
+
"memoryGuard.parentReserveMb": {
|
|
2714
|
+
type: "number",
|
|
2715
|
+
default: 1024,
|
|
2716
|
+
validate: (value: number) =>
|
|
2717
|
+
Number.isFinite(value) && value >= 0 && value <= Number.MAX_SAFE_INTEGER / (1024 * 1024),
|
|
2718
|
+
},
|
|
2719
|
+
"memoryGuard.policyLimitMb": {
|
|
2720
|
+
type: "number",
|
|
2721
|
+
default: 0,
|
|
2722
|
+
validate: (value: number) =>
|
|
2723
|
+
Number.isFinite(value) && value >= 0 && value <= Number.MAX_SAFE_INTEGER / (1024 * 1024),
|
|
2724
|
+
},
|
|
2656
2725
|
|
|
2657
2726
|
"computer.enabled": {
|
|
2658
2727
|
type: "boolean",
|
|
@@ -3844,6 +3913,17 @@ export interface ShellMinimizerSettings {
|
|
|
3844
3913
|
maxCaptureBytes: number;
|
|
3845
3914
|
}
|
|
3846
3915
|
|
|
3916
|
+
export interface MemoryGuardSettings {
|
|
3917
|
+
enabled: boolean;
|
|
3918
|
+
checkIntervalMs: number;
|
|
3919
|
+
gcThresholdPercent: number;
|
|
3920
|
+
restartThresholdPercent: number;
|
|
3921
|
+
restartThresholdWindowMs: number;
|
|
3922
|
+
cooldownMs: number;
|
|
3923
|
+
parentReserveMb: number;
|
|
3924
|
+
policyLimitMb: number;
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3847
3927
|
export interface NotificationsSettings {
|
|
3848
3928
|
enabled: boolean;
|
|
3849
3929
|
telegram: {
|
|
@@ -3902,6 +3982,7 @@ export interface GroupTypeMap {
|
|
|
3902
3982
|
statusLine: StatusLineSettings;
|
|
3903
3983
|
thinkingBudgets: ThinkingBudgetsSettings;
|
|
3904
3984
|
stt: SttSettings;
|
|
3985
|
+
memoryGuard: MemoryGuardSettings;
|
|
3905
3986
|
modelRoles: Record<string, ModelSelectorValue>;
|
|
3906
3987
|
modelTags: ModelTagsSettings;
|
|
3907
3988
|
cycleOrder: string[];
|