@gajae-code/coding-agent 0.19.3-nightly.20261030094347.41301593972.gf536b1010d4e → 0.19.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 +238 -0
- package/dist/types/async/job-manager.d.ts +56 -18
- package/dist/types/cli/auth-token-file.d.ts +9 -0
- package/dist/types/cli/doctor/install-repairs.d.ts +1 -0
- package/dist/types/cli/doctor/types.d.ts +1 -0
- package/dist/types/cli/install-activation.d.ts +10 -1
- package/dist/types/cli/malloc-env-guard.d.ts +8 -0
- package/dist/types/cli/update-cli.d.ts +4 -1
- package/dist/types/config/atomic-yaml-patch.d.ts +34 -1
- package/dist/types/config/model-profile-activation.d.ts +40 -13
- package/dist/types/config/model-registry.d.ts +3 -0
- package/dist/types/config/models-config-schema.d.ts +4 -0
- package/dist/types/config/settings-schema.d.ts +49 -8
- package/dist/types/config/settings.d.ts +39 -5
- package/dist/types/config/task-delegation.d.ts +2 -0
- package/dist/types/extensibility/extensions/runner.d.ts +2 -0
- package/dist/types/extensibility/slash-commands.d.ts +14 -1
- package/dist/types/gjc-runtime/managed-owner-admission.d.ts +4 -12
- package/dist/types/gjc-runtime/managed-owner-binding.d.ts +164 -0
- package/dist/types/gjc-runtime/managed-owner-supervisor.d.ts +26 -33
- package/dist/types/gjc-runtime/owner-lifecycle-path.d.ts +21 -0
- package/dist/types/gjc-runtime/owner-lifecycle-root.d.ts +7 -0
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +8 -1
- package/dist/types/gjc-runtime/tmux-common.d.ts +10 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +131 -5
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +46 -0
- package/dist/types/gjc-runtime/ultragoal-owner-loss-recovery.d.ts +1 -1
- package/dist/types/harness-control-plane/session-lease.d.ts +29 -2
- package/dist/types/harness-control-plane/storage.d.ts +8 -0
- package/dist/types/main.d.ts +12 -0
- package/dist/types/memories/index.d.ts +7 -1
- package/dist/types/memories/storage.d.ts +1 -0
- package/dist/types/memory-backend/types.d.ts +6 -1
- package/dist/types/modes/components/model-selector.d.ts +11 -4
- package/dist/types/modes/components/notifications-settings-editor.d.ts +2 -166
- package/dist/types/modes/components/settings-defs.d.ts +2 -1
- package/dist/types/modes/components/settings-selector.d.ts +5 -2
- package/dist/types/modes/components/smart-routing-panel.d.ts +19 -14
- package/dist/types/modes/components/tool-execution.d.ts +6 -0
- package/dist/types/modes/controllers/goal-mode-controller.d.ts +5 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +7 -59
- package/dist/types/plan-mode/state.d.ts +7 -0
- package/dist/types/runtime-mcp/config.d.ts +8 -0
- package/dist/types/runtime-mcp/manager.d.ts +43 -0
- package/dist/types/runtime-mcp/session-controls-grant.d.ts +7 -0
- package/dist/types/sdk/broker/broker.d.ts +33 -7
- package/dist/types/sdk/broker/lifecycle.d.ts +1 -0
- package/dist/types/sdk/broker/session-index.d.ts +2 -0
- package/dist/types/sdk/broker/session-scope.d.ts +31 -1
- package/dist/types/sdk/broker/spawn-authority.d.ts +19 -0
- package/dist/types/sdk/broker/spawn-substrate.d.ts +12 -1
- package/dist/types/sdk/bus/index.d.ts +5 -0
- package/dist/types/sdk/bus/notification-orchestration.d.ts +21 -3
- package/dist/types/sdk/bus/notification-service.d.ts +2 -1
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +1 -1
- package/dist/types/sdk/cli/rows.d.ts +7 -0
- package/dist/types/sdk/extension-interaction.d.ts +108 -0
- package/dist/types/sdk/host/control/btw-ask.d.ts +19 -0
- package/dist/types/sdk/host/control/dispatch.d.ts +2 -0
- package/dist/types/sdk/host/control/index.d.ts +1 -0
- package/dist/types/sdk/host/control/operations.d.ts +7 -0
- package/dist/types/sdk/host/external-permissions.d.ts +47 -0
- package/dist/types/sdk/host/host.d.ts +8 -2
- package/dist/types/sdk/host/query/handlers.d.ts +1 -0
- package/dist/types/sdk/host/session-runtime.d.ts +13 -1
- package/dist/types/sdk/host/surface-policy.d.ts +2 -1
- package/dist/types/sdk/index.d.ts +11 -0
- package/dist/types/sdk/job-observation.d.ts +51 -0
- package/dist/types/sdk/lifecycle/service.d.ts +6 -1
- package/dist/types/sdk/notification-setup-contract.d.ts +169 -0
- package/dist/types/sdk/notification-setup.d.ts +54 -0
- package/dist/types/sdk/protocol/adapter-validation.d.ts +2 -0
- package/dist/types/sdk/router/session-router.d.ts +5 -0
- package/dist/types/sdk/routing-settings.d.ts +57 -0
- package/dist/types/sdk/session-list.d.ts +5 -0
- package/dist/types/sdk/session-recap.d.ts +50 -0
- package/dist/types/sdk/session.d.ts +14 -0
- package/dist/types/sdk/settings-catalog.d.ts +52 -0
- package/dist/types/sdk/workflow-gates.d.ts +9 -0
- package/dist/types/session/agent-session.d.ts +129 -15
- package/dist/types/session/client-bridge.d.ts +1 -0
- package/dist/types/session/internal/managed-session-storage.d.ts +6 -0
- package/dist/types/session/recap.d.ts +104 -0
- package/dist/types/session/session-manager.d.ts +51 -1
- package/dist/types/session/streaming-output.d.ts +9 -1
- package/dist/types/session/workflow-recovery-field-fence.d.ts +4 -0
- package/dist/types/session/yield-queue.d.ts +16 -0
- package/dist/types/task/executor.d.ts +2 -0
- package/dist/types/tools/auto-generated-guard.d.ts +8 -1
- package/dist/types/tools/bash.d.ts +1 -1
- package/dist/types/tools/grouped-file-tree.d.ts +21 -0
- package/dist/types/tools/image-gen.d.ts +6 -1
- package/dist/types/tools/index.d.ts +7 -0
- package/dist/types/tui/file-list.d.ts +0 -3
- package/dist/types/utils/gh.d.ts +5 -0
- package/dist/types/utils/herdr-core-status.d.ts +31 -0
- package/dist/types/utils/herdr-pane.d.ts +7 -0
- package/dist/types/utils/recap-generator.d.ts +41 -0
- package/dist/types/web/hardened-http.d.ts +41 -0
- package/dist/types/web/insane/url-guard.d.ts +2 -0
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +28 -1
- package/src/async/job-manager.ts +381 -41
- package/src/cli/auth-broker-cli.ts +11 -53
- package/src/cli/auth-gateway-cli.ts +13 -56
- package/src/cli/auth-token-file.ts +56 -0
- package/src/cli/customize-doctor.ts +40 -27
- package/src/cli/doctor/install-repairs.ts +36 -2
- package/src/cli/doctor/repairs.ts +1 -0
- package/src/cli/doctor/report.ts +2 -0
- package/src/cli/doctor/types.ts +1 -0
- package/src/cli/install-activation.ts +58 -1
- package/src/cli/malloc-env-guard.ts +11 -0
- package/src/cli/session-picker.ts +8 -2
- package/src/cli/setup-cli.ts +2 -0
- package/src/cli/update-cli.ts +48 -3
- package/src/cli-main.ts +2 -2
- package/src/cli-ordinary.ts +2 -2
- package/src/commands/harness.ts +16 -3
- package/src/config/atomic-yaml-patch.ts +439 -141
- package/src/config/machine-identity.ts +6 -2
- package/src/config/mcp-schema.json +1 -1
- package/src/config/model-profile-activation.ts +505 -248
- package/src/config/model-registry.ts +54 -2
- package/src/config/models-config-schema.ts +2 -0
- package/src/config/settings-schema.ts +52 -8
- package/src/config/settings.ts +640 -237
- package/src/config/task-delegation.ts +4 -1
- package/src/coordinator-mcp/question-gate-codec.ts +17 -5
- package/src/coordinator-mcp/server.ts +2 -0
- package/src/extensibility/extensions/runner.ts +6 -0
- package/src/extensibility/gjc-plugins/installer.ts +2 -1
- package/src/extensibility/plugins/marketplace/fetcher.ts +28 -119
- package/src/extensibility/slash-commands.ts +90 -16
- package/src/gjc-runtime/launch-tmux.ts +79 -23
- package/src/gjc-runtime/launch-worktree.ts +15 -3
- package/src/gjc-runtime/managed-owner-admission.ts +298 -212
- package/src/gjc-runtime/managed-owner-binding.ts +410 -0
- package/src/gjc-runtime/managed-owner-supervisor.ts +265 -112
- package/src/gjc-runtime/owner-lifecycle-path.ts +82 -0
- package/src/gjc-runtime/owner-lifecycle-root.ts +26 -0
- package/src/gjc-runtime/ralplan-current-final.ts +35 -15
- package/src/gjc-runtime/ralplan-runtime.ts +3 -0
- package/src/gjc-runtime/session-state-sidecar.ts +61 -28
- package/src/gjc-runtime/tmux-common.ts +28 -0
- package/src/gjc-runtime/tmux-owner-isolation.ts +1100 -111
- package/src/gjc-runtime/tmux-sessions.ts +293 -58
- package/src/gjc-runtime/ultragoal-change-set.ts +8 -1
- package/src/gjc-runtime/ultragoal-owner-loss-recovery.ts +1 -1
- package/src/harness-control-plane/finalize.ts +2 -0
- package/src/harness-control-plane/owner.ts +23 -1
- package/src/harness-control-plane/preserve.ts +7 -1
- package/src/harness-control-plane/session-lease.ts +357 -3
- package/src/harness-control-plane/storage.ts +61 -10
- package/src/hashline/execute.ts +13 -1
- package/src/internal-urls/docs-index.generated.ts +12 -12
- package/src/lsp/lspmux.ts +4 -0
- package/src/main.ts +44 -3
- package/src/master-mode/snapshot.ts +13 -1
- package/src/memories/index.ts +8 -1
- package/src/memories/storage.ts +1 -0
- package/src/memory-backend/types.ts +6 -1
- package/src/modes/acp/acp-agent.ts +28 -4
- package/src/modes/components/gjc-bundle-settings.ts +56 -14
- package/src/modes/components/model-selector.ts +98 -18
- package/src/modes/components/notifications-settings-editor.ts +68 -188
- package/src/modes/components/session-selector.ts +27 -5
- package/src/modes/components/settings-defs.ts +4 -10
- package/src/modes/components/settings-selector.ts +93 -66
- package/src/modes/components/smart-routing-panel.ts +363 -48
- package/src/modes/components/tool-execution.ts +388 -9
- package/src/modes/controllers/event-controller.ts +2 -1
- package/src/modes/controllers/extension-ui-controller.ts +2 -1
- package/src/modes/controllers/goal-mode-controller.ts +24 -0
- package/src/modes/controllers/plan-mode-controller.ts +11 -3
- package/src/modes/controllers/selector-controller.ts +127 -1242
- package/src/modes/interactive-mode.ts +44 -3
- package/src/modes/runtime-init.ts +2 -1
- package/src/modes/shared/agent-wire/approval-gate.ts +13 -2
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +2 -4
- package/src/plan-mode/state.ts +17 -0
- package/src/prompts/system/master-mode.md +2 -0
- package/src/prompts/system/recap-system.md +5 -0
- package/src/prompts/system/system-prompt.md +5 -1
- package/src/prompts/tools/ask.md +4 -3
- package/src/runtime-mcp/config.ts +20 -1
- package/src/runtime-mcp/manager.ts +588 -45
- package/src/runtime-mcp/session-controls-grant.ts +24 -0
- package/src/sdk/acp/adapter.ts +14 -3
- package/src/sdk/broker/broker.ts +237 -23
- package/src/sdk/broker/lifecycle.ts +2 -0
- package/src/sdk/broker/session-index.ts +93 -19
- package/src/sdk/broker/session-scope.ts +81 -2
- package/src/sdk/broker/spawn-authority.ts +34 -5
- package/src/sdk/broker/spawn-substrate.ts +117 -18
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +77 -11
- package/src/sdk/bus/notification-orchestration.ts +141 -59
- package/src/sdk/bus/notification-service.ts +25 -23
- package/src/sdk/bus/telegram-daemon-contract.ts +1 -1
- package/src/sdk/cli/master-cli.ts +2 -2
- package/src/sdk/cli/rows.ts +9 -0
- package/src/sdk/cli/session-cli.ts +29 -4
- package/src/sdk/extension-interaction.ts +533 -0
- package/src/sdk/host/control/btw-ask.ts +49 -0
- package/src/sdk/host/control/dispatch.ts +12 -0
- package/src/sdk/host/control/index.ts +1 -0
- package/src/sdk/host/control/operations.ts +7 -0
- package/src/sdk/host/external-permissions.ts +332 -0
- package/src/sdk/host/host.ts +8 -2
- package/src/sdk/host/query/handlers.ts +9 -0
- package/src/sdk/host/sdk-surface-parity.test.ts +55 -1
- package/src/sdk/host/session-runtime.test.ts +142 -1
- package/src/sdk/host/session-runtime.ts +108 -28
- package/src/sdk/host/surface-policy.ts +11 -0
- package/src/sdk/index.ts +15 -0
- package/src/sdk/job-observation.ts +157 -0
- package/src/sdk/lifecycle/service.ts +15 -2
- package/src/sdk/notification-setup-contract.ts +181 -0
- package/src/sdk/notification-setup.ts +1151 -0
- package/src/sdk/protocol/adapter-validation.ts +6 -1
- package/src/sdk/protocol/operation-inventory.generated.json +239 -6
- package/src/sdk/protocol/operation-registry.ts +21 -3
- package/src/sdk/router/session-router.ts +12 -1
- package/src/sdk/routing-settings.ts +395 -0
- package/src/sdk/session-list.ts +37 -0
- package/src/sdk/session-recap.ts +121 -0
- package/src/sdk/session.ts +335 -23
- package/src/sdk/settings-catalog.ts +119 -0
- package/src/sdk/workflow-gates.ts +30 -0
- package/src/session/agent-session.ts +1880 -238
- package/src/session/client-bridge.ts +1 -1
- package/src/session/contribution-prep.ts +8 -1
- package/src/session/internal/managed-session-storage.ts +17 -3
- package/src/session/recap.ts +298 -0
- package/src/session/session-manager.ts +776 -121
- package/src/session/streaming-output.ts +69 -9
- package/src/session/workflow-recovery-field-fence.ts +27 -0
- package/src/session/yield-queue.ts +52 -1
- package/src/setup/provider-presets.json +3 -1
- package/src/slash-commands/builtin-registry.ts +124 -4
- package/src/ssh/connection-manager.ts +3 -2
- package/src/ssh/ssh-executor.ts +3 -0
- package/src/ssh/sshfs-mount.ts +5 -4
- package/src/task/executor.ts +3 -0
- package/src/task/index.ts +48 -19
- package/src/tools/ast-edit.ts +10 -47
- package/src/tools/ast-grep.ts +10 -45
- package/src/tools/auto-generated-guard.ts +21 -1
- package/src/tools/bash-allowed-prefixes.ts +2 -0
- package/src/tools/bash.ts +10 -4
- package/src/tools/bisect.ts +5 -0
- package/src/tools/browser/launch.ts +7 -2
- package/src/tools/browser/registry.ts +5 -0
- package/src/tools/grouped-file-tree.ts +86 -0
- package/src/tools/image-gen.ts +180 -174
- package/src/tools/index.ts +7 -0
- package/src/tools/json-tree.ts +2 -2
- package/src/tools/recipe/runners/cargo.ts +3 -0
- package/src/tools/recipe/runners/just.ts +3 -0
- package/src/tools/recipe/runners/task.ts +3 -0
- package/src/tools/search.ts +9 -48
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tui/file-list.ts +14 -3
- package/src/utils/gh.ts +14 -1
- package/src/utils/git.ts +1 -8
- package/src/utils/herdr-core-status.ts +156 -0
- package/src/utils/herdr-pane.ts +38 -26
- package/src/utils/recap-generator.ts +191 -0
- package/src/web/hardened-http.ts +183 -0
- package/src/web/insane/bridge.ts +2 -1
- package/src/web/insane/url-guard.ts +7 -2
- package/src/web/scrapers/youtube.ts +3 -0
|
@@ -1,169 +1,5 @@
|
|
|
1
|
-
import { type Component, type Focusable
|
|
2
|
-
import type {
|
|
3
|
-
import type { NotificationProvider, ProviderSecretDisposition } from "../../sdk/bus/config";
|
|
4
|
-
import type { BlockedTelegramRestoreResult, ProposedTelegramIdentity, TelegramDaemonReconnectOutcome } from "../../sdk/bus/notification-orchestration";
|
|
5
|
-
import type { NotificationHealthReport, NotificationRecoveryReport, NotificationStatusReport, NotificationTestResult } from "../../sdk/bus/notification-service";
|
|
6
|
-
import type { NotificationSessionReconcileResult, NotificationSessionStatus } from "../../sdk/bus/session-control";
|
|
7
|
-
/** Safe scalar notification preferences. Credentials and destination IDs are deliberately absent. */
|
|
8
|
-
export interface NotificationsEditorPreferences {
|
|
9
|
-
redact: boolean;
|
|
10
|
-
verbosity: "lean" | "verbose";
|
|
11
|
-
sessionScope: "all" | "primary";
|
|
12
|
-
richEnabled: boolean;
|
|
13
|
-
richDraftEnabled: boolean;
|
|
14
|
-
toolActivityEnabled: boolean;
|
|
15
|
-
streamingEnabled: boolean;
|
|
16
|
-
sound: "all" | "important" | "none";
|
|
17
|
-
}
|
|
18
|
-
/** Secret-safe snapshot used to render the Notifications tab. */
|
|
19
|
-
export interface NotificationsEditorState {
|
|
20
|
-
status: NotificationStatusReport;
|
|
21
|
-
session: NotificationSessionStatus;
|
|
22
|
-
preferences: NotificationsEditorPreferences;
|
|
23
|
-
health?: NotificationHealthReport;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A one-way setup value accepted from the masked input. The operation adapter
|
|
27
|
-
* consumes the secret and returns a safe-to-render prepared draft.
|
|
28
|
-
*/
|
|
29
|
-
export interface NotificationsEditorSetupInput {
|
|
30
|
-
token: SecretValue;
|
|
31
|
-
/** Optional: omit to use daemon-aware private-chat discovery when polling is safe. */
|
|
32
|
-
chatId?: string;
|
|
33
|
-
richEnabled: boolean;
|
|
34
|
-
richDraftEnabled: boolean;
|
|
35
|
-
streamingEnabled: boolean;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Secret-safe setup draft. The adapter may retain its private credential while
|
|
39
|
-
* this object is live, but no raw token is exposed through this contract.
|
|
40
|
-
*/
|
|
41
|
-
export interface PreparedTelegramConfiguration {
|
|
42
|
-
chatId: string;
|
|
43
|
-
tokenMask: string;
|
|
44
|
-
tokenFingerprint?: string;
|
|
45
|
-
richEnabled: boolean;
|
|
46
|
-
richDraftEnabled: boolean;
|
|
47
|
-
streamingEnabled: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface ProviderSecretActionInput {
|
|
50
|
-
action: ProviderSecretDisposition;
|
|
51
|
-
value?: SecretValue;
|
|
52
|
-
}
|
|
53
|
-
export interface NotificationsProviderSetupInput {
|
|
54
|
-
provider: "discord" | "slack";
|
|
55
|
-
botToken: ProviderSecretActionInput;
|
|
56
|
-
appToken?: ProviderSecretActionInput;
|
|
57
|
-
applicationId?: string;
|
|
58
|
-
guildId?: string;
|
|
59
|
-
parentChannelId?: string;
|
|
60
|
-
workspaceId?: string;
|
|
61
|
-
channelId?: string;
|
|
62
|
-
authorizedUserId?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface PreparedNotificationProviderConfiguration {
|
|
65
|
-
provider: "discord" | "slack";
|
|
66
|
-
botTokenDisposition: ProviderSecretDisposition;
|
|
67
|
-
botTokenMask: string;
|
|
68
|
-
appTokenDisposition?: ProviderSecretDisposition;
|
|
69
|
-
appTokenMask?: string;
|
|
70
|
-
applicationId?: string;
|
|
71
|
-
guildId?: string;
|
|
72
|
-
parentChannelId?: string;
|
|
73
|
-
workspaceId?: string;
|
|
74
|
-
channelId?: string;
|
|
75
|
-
authorizedUserId?: string;
|
|
76
|
-
applicationIdDisplay?: string;
|
|
77
|
-
guildIdDisplay?: string;
|
|
78
|
-
parentChannelIdDisplay?: string;
|
|
79
|
-
workspaceIdDisplay?: string;
|
|
80
|
-
channelIdDisplay?: string;
|
|
81
|
-
authorizedUserIdDisplay?: string;
|
|
82
|
-
}
|
|
83
|
-
export interface NotificationsPreflightResult {
|
|
84
|
-
status: "ready" | "aborted" | "cancelled" | "error";
|
|
85
|
-
identity: ProposedTelegramIdentity;
|
|
86
|
-
message: string;
|
|
87
|
-
pairingSource?: "discovered" | "provided" | "reused";
|
|
88
|
-
draft?: PreparedTelegramConfiguration;
|
|
89
|
-
}
|
|
90
|
-
/** A successful configuration save always carries an opaque CAS receipt. */
|
|
91
|
-
export type NotificationsConfigureCommitResult = {
|
|
92
|
-
status: "saved";
|
|
93
|
-
receipt: CasReceipt;
|
|
94
|
-
message: string;
|
|
95
|
-
} | {
|
|
96
|
-
status: "activation_failed" | "observer_failed";
|
|
97
|
-
receipt: CasReceipt;
|
|
98
|
-
message: string;
|
|
99
|
-
} | {
|
|
100
|
-
status: "blocked_identity";
|
|
101
|
-
receipt: CasReceipt;
|
|
102
|
-
message: string;
|
|
103
|
-
restore(): Promise<BlockedTelegramRestoreResult>;
|
|
104
|
-
retainCommitted(): void;
|
|
105
|
-
};
|
|
106
|
-
export interface NotificationsMutationResult {
|
|
107
|
-
message: string;
|
|
108
|
-
receipt?: CasReceipt;
|
|
109
|
-
outcome?: "success" | "degraded" | "failed";
|
|
110
|
-
}
|
|
111
|
-
export type NotificationsSaveInactiveResult = {
|
|
112
|
-
status: "saved_inactive";
|
|
113
|
-
receipt: CasReceipt;
|
|
114
|
-
message: string;
|
|
115
|
-
} | {
|
|
116
|
-
status: "observer_failed";
|
|
117
|
-
receipt: CasReceipt;
|
|
118
|
-
message: string;
|
|
119
|
-
} | {
|
|
120
|
-
status: "unavailable";
|
|
121
|
-
guidance: string;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Controller-injected boundary for the direct Notifications editor.
|
|
125
|
-
*
|
|
126
|
-
* The component only renders this contract and sends user intent through it:
|
|
127
|
-
* it never reads Settings, starts a daemon, or calls notification services.
|
|
128
|
-
*/
|
|
129
|
-
export interface NotificationsEditorOperations {
|
|
130
|
-
/** Combines a buildNotificationStatusReport-shaped status snapshot with the current session-control query. */
|
|
131
|
-
loadState(): Promise<NotificationsEditorState>;
|
|
132
|
-
/** Performs offline or selected REST-only health refresh. */
|
|
133
|
-
refreshHealth(input: {
|
|
134
|
-
probe: boolean;
|
|
135
|
-
provider?: NotificationProvider;
|
|
136
|
-
signal?: AbortSignal;
|
|
137
|
-
}): Promise<NotificationHealthReport>;
|
|
138
|
-
sendTest(provider?: NotificationProvider): Promise<NotificationTestResult>;
|
|
139
|
-
recover(): Promise<NotificationRecoveryReport>;
|
|
140
|
-
reconnect(): Promise<TelegramDaemonReconnectOutcome>;
|
|
141
|
-
/** Validates/discovers a Telegram destination and returns a secret-safe prepared draft. */
|
|
142
|
-
preflightProposedIdentity(input: NotificationsEditorSetupInput, signal: AbortSignal): Promise<NotificationsPreflightResult>;
|
|
143
|
-
/** Atomically persists a prepared Telegram configuration and returns its CAS-backed receipt. */
|
|
144
|
-
commitConfigure(draft: PreparedTelegramConfiguration): Promise<NotificationsConfigureCommitResult>;
|
|
145
|
-
/** Stores a prepared Telegram configuration inactive when the mixed-adapter rule permits it. */
|
|
146
|
-
saveInactive(draft: PreparedTelegramConfiguration): Promise<NotificationsSaveInactiveResult>;
|
|
147
|
-
/** Clears adapter-local ephemeral credential material for a prepared setup draft. Idempotent. */
|
|
148
|
-
discardConfigureDraft(draft: PreparedTelegramConfiguration): void;
|
|
149
|
-
prepareProviderConfiguration(input: NotificationsProviderSetupInput): Promise<PreparedNotificationProviderConfiguration>;
|
|
150
|
-
commitProviderConfiguration(draft: PreparedNotificationProviderConfiguration): Promise<NotificationsMutationResult>;
|
|
151
|
-
discardProviderConfiguration(draft: PreparedNotificationProviderConfiguration): void;
|
|
152
|
-
setProviderDesired(provider: NotificationProvider, enabled: boolean): Promise<NotificationsMutationResult>;
|
|
153
|
-
removeProvider(provider: NotificationProvider): Promise<NotificationsMutationResult>;
|
|
154
|
-
/** Enables globally without requesting or exposing a credential. */
|
|
155
|
-
enableGlobally(): Promise<NotificationsMutationResult>;
|
|
156
|
-
disableGlobally(): Promise<NotificationsMutationResult>;
|
|
157
|
-
/** Removes only Telegram configuration; the adapter preserves Discord/Slack when configured. */
|
|
158
|
-
removeTelegram(): Promise<NotificationsMutationResult & {
|
|
159
|
-
globallyDisabled?: boolean;
|
|
160
|
-
}>;
|
|
161
|
-
setSessionLocal(enabled: boolean): Promise<NotificationSessionReconcileResult>;
|
|
162
|
-
/** Atomically persists the scalar preference draft. */
|
|
163
|
-
commitPreferences(preferences: NotificationsEditorPreferences): Promise<NotificationsMutationResult>;
|
|
164
|
-
/** Reconciles the current session after durable global configuration changes. */
|
|
165
|
-
reconcileCurrentSession(): Promise<NotificationSessionReconcileResult>;
|
|
166
|
-
}
|
|
1
|
+
import { type Component, type Focusable } from "@gajae-code/tui";
|
|
2
|
+
import type { NotificationsEditorOperations } from "../../sdk/notification-setup-contract";
|
|
167
3
|
export interface NotificationsSettingsEditorCallbacks {
|
|
168
4
|
onCancel?: () => void;
|
|
169
5
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* with a `ui` block. If it needs a submenu, include `options: [...]`
|
|
8
8
|
* (or `options: "runtime"` for runtime-injected lists like themes).
|
|
9
9
|
*/
|
|
10
|
+
import type { Settings } from "../../config/settings";
|
|
10
11
|
import { type SettingPath, type SettingTab, type SubmenuOption } from "../../config/settings-schema";
|
|
11
12
|
export type SettingValue = boolean | string;
|
|
12
13
|
interface BaseSettingDef {
|
|
@@ -19,7 +20,7 @@ interface BaseSettingDef {
|
|
|
19
20
|
* setting is hidden from the UI. Applies to every variant — booleans,
|
|
20
21
|
* enums, submenus, and text inputs.
|
|
21
22
|
*/
|
|
22
|
-
condition?: () => boolean;
|
|
23
|
+
condition?: (settings: Settings) => boolean;
|
|
23
24
|
}
|
|
24
25
|
export interface BooleanSettingDef extends BaseSettingDef {
|
|
25
26
|
type: "boolean";
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { type ThinkingLevel as ThinkingLevelValue } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Effort } from "@gajae-code/ai/core";
|
|
3
3
|
import { type Component, Container } from "@gajae-code/tui";
|
|
4
|
-
import {
|
|
4
|
+
import type { SettingPath, Settings } from "../../config/settings";
|
|
5
5
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
6
6
|
import type { GjcRuntimeSnapshotProvider } from "../../extensibility/gjc-plugins/runtime-quarantine";
|
|
7
|
-
import {
|
|
7
|
+
import type { NotificationsEditorOperations } from "../../sdk/notification-setup-contract";
|
|
8
8
|
import type { StatusLinePreviewParts, StatusLineSegmentOptions } from "./tool-status-header";
|
|
9
9
|
/**
|
|
10
10
|
* Dynamic context for settings that need runtime data.
|
|
11
11
|
* Some settings (like thinking level) are managed by the session, not Settings.
|
|
12
12
|
*/
|
|
13
13
|
export interface SettingsRuntimeContext {
|
|
14
|
+
/** Settings owned by the active session. */
|
|
15
|
+
settings: Settings;
|
|
14
16
|
/** Available thinking levels (from session) */
|
|
15
17
|
availableThinkingLevels: Effort[];
|
|
16
18
|
/** Current thinking level (from session) */
|
|
@@ -99,6 +101,7 @@ export declare class SettingsSelectorComponent extends Container {
|
|
|
99
101
|
private readonly context;
|
|
100
102
|
private readonly callbacks;
|
|
101
103
|
private readonly notificationsOperations?;
|
|
104
|
+
get settings(): Settings;
|
|
102
105
|
constructor(context: SettingsRuntimeContext, callbacks: SettingsCallbacks, notificationsOperations?: NotificationsEditorOperations | undefined);
|
|
103
106
|
getFocusComponent(): Component;
|
|
104
107
|
/** Refresh saved rows and model-profile choices without replacing active editors. */
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { Container } from "@gajae-code/tui";
|
|
2
2
|
import type { AutoroutingProvenance, AutoroutingProviderOrderHint, AutoroutingSetup, TierMap } from "../../config/autorouting-contract";
|
|
3
|
-
import type
|
|
3
|
+
import { type RoutingSettingsPreview } from "../../sdk/routing-settings";
|
|
4
4
|
/** Longest rendered panel line before truncation. */
|
|
5
5
|
export declare const MAX_PANEL_LINE_WIDTH = 200;
|
|
6
|
-
export type SmartRoutingPreview = {
|
|
7
|
-
readonly setup: AutoroutingSetup;
|
|
8
|
-
readonly tiers: TierMap;
|
|
9
|
-
readonly provenance: AutoroutingProvenance;
|
|
10
|
-
readonly sourceIdentity: AutoroutingSourceIdentity;
|
|
11
|
-
};
|
|
12
6
|
export type SmartRoutingIntent = {
|
|
13
7
|
kind: "apply";
|
|
14
8
|
draft: AutoroutingSetup;
|
|
15
|
-
preview:
|
|
9
|
+
preview: RoutingSettingsPreview;
|
|
16
10
|
confirmHandEdit?: boolean;
|
|
17
11
|
} | {
|
|
18
12
|
kind: "refresh";
|
|
13
|
+
preview?: RoutingSettingsPreview;
|
|
19
14
|
confirmHandEdit?: boolean;
|
|
20
15
|
} | {
|
|
21
16
|
kind: "clear";
|
|
@@ -32,11 +27,15 @@ export interface SmartRoutingPanelOptions {
|
|
|
32
27
|
/** Advisory drift between the recorded declaration and current provider priority. */
|
|
33
28
|
providerOrderHint?: AutoroutingProviderOrderHint;
|
|
34
29
|
enabled: boolean;
|
|
30
|
+
effectiveGeneratedSetup?: boolean;
|
|
35
31
|
readOnly: boolean;
|
|
32
|
+
isStateUnknown?: () => boolean;
|
|
36
33
|
stale: boolean;
|
|
37
|
-
preview:
|
|
38
|
-
generatePreview: (draft: AutoroutingSetup) =>
|
|
39
|
-
|
|
34
|
+
preview: RoutingSettingsPreview;
|
|
35
|
+
generatePreview: (draft: AutoroutingSetup) => RoutingSettingsPreview;
|
|
36
|
+
discardPreview?: (preview: RoutingSettingsPreview) => void;
|
|
37
|
+
effectiveDiffersFromSaved?: boolean;
|
|
38
|
+
onSelect: (intent: SmartRoutingIntent) => undefined | Promise<RoutingSettingsPreview | undefined>;
|
|
40
39
|
onCancel: () => void;
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
@@ -49,7 +48,8 @@ export declare class SmartRoutingPanelComponent extends Container {
|
|
|
49
48
|
get mode(): SmartRoutingPanelMode;
|
|
50
49
|
get confirmation(): SmartRoutingConfirmation;
|
|
51
50
|
getDraft(): AutoroutingSetup;
|
|
52
|
-
|
|
51
|
+
/** Detached display data only; apply intents retain the service-issued identity internally. */
|
|
52
|
+
getPreviewPayload(): RoutingSettingsPreview;
|
|
53
53
|
getProviderOrder(): readonly string[];
|
|
54
54
|
/**
|
|
55
55
|
* Advisory-only, non-destructive hint update.
|
|
@@ -61,21 +61,26 @@ export declare class SmartRoutingPanelComponent extends Container {
|
|
|
61
61
|
* else.
|
|
62
62
|
*/
|
|
63
63
|
updateProviderOrderHint(hint: AutoroutingProviderOrderHint | undefined): void;
|
|
64
|
+
/** Forget effective indicators when a committed result cannot be presented reliably. */
|
|
65
|
+
markEffectiveStateUnknown(): void;
|
|
66
|
+
render(width: number): string[];
|
|
64
67
|
/** Replace the panel's persisted snapshot after a controller mutation. */
|
|
65
68
|
refreshState(options: {
|
|
66
69
|
setup: AutoroutingSetup;
|
|
67
70
|
tiers?: TierMap;
|
|
68
71
|
provenance?: AutoroutingProvenance;
|
|
69
72
|
enabled: boolean;
|
|
73
|
+
effectiveGeneratedSetup: boolean;
|
|
70
74
|
providerOrderHint?: AutoroutingProviderOrderHint;
|
|
71
75
|
stale: boolean;
|
|
72
|
-
preview
|
|
76
|
+
preview?: RoutingSettingsPreview;
|
|
77
|
+
effectiveDiffersFromSaved?: boolean;
|
|
73
78
|
}): void;
|
|
74
79
|
handleInput(data: string): void;
|
|
75
80
|
__testApply(): Promise<void>;
|
|
76
81
|
/** Test hook mirroring an in-panel provider reorder/edit: mutates the draft and re-previews. */
|
|
77
82
|
__testSetProviders(providers: string[]): void;
|
|
78
|
-
__testRefresh(
|
|
83
|
+
__testRefresh(): Promise<void>;
|
|
79
84
|
__testToggle(enabled?: boolean): Promise<void>;
|
|
80
85
|
__testClear(): Promise<void>;
|
|
81
86
|
__testConfirm(): Promise<void>;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type AgentTool } from "@gajae-code/agent-core";
|
|
2
2
|
import { Container, type TUI } from "@gajae-code/tui";
|
|
3
|
+
/**
|
|
4
|
+
* Drop terminal controls from one painted tool line.
|
|
5
|
+
* SGR color and a renderer file hyperlink stay. The child render already
|
|
6
|
+
* chose the edit operation from the original path.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sanitizePaintedToolLine(line: string): string;
|
|
3
9
|
export interface ToolExecutionOptions {
|
|
4
10
|
showImages?: boolean;
|
|
5
11
|
editFuzzyThreshold?: number;
|
|
@@ -39,6 +39,11 @@ export declare class GoalModeController {
|
|
|
39
39
|
get paused(): boolean;
|
|
40
40
|
setEnabledForCompatibility(enabled: boolean): void;
|
|
41
41
|
setPausedForCompatibility(paused: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* Drop the predecessor goal binding after a committed switch to a different
|
|
44
|
+
* session file. No mode entry is written: the predecessor file keeps its goal.
|
|
45
|
+
*/
|
|
46
|
+
detachForSessionSwitch(): Promise<void>;
|
|
42
47
|
beforeGetUserInput(): Promise<void>;
|
|
43
48
|
scheduleContinuation(): void;
|
|
44
49
|
cancelContinuation(): void;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import type { Component, SlashCommand } from "@gajae-code/tui";
|
|
2
|
-
import {
|
|
2
|
+
import type { AutoroutingSetup } from "../../config/autorouting-contract";
|
|
3
3
|
import type { ModelProfileConfig } from "../../config/models-config-schema";
|
|
4
4
|
import { type Settings } from "../../config/settings";
|
|
5
5
|
import { type InteractiveModeContext, type OAuthSelectorOptions } from "../../modes/types";
|
|
6
|
-
import {
|
|
7
|
-
import { type NotificationProviderRuntimeAuthority, proposedTelegramIdentity, reconcileCommittedTelegramConfiguration, removeTelegramConfiguration, saveTelegramInactive } from "../../sdk/bus/notification-orchestration";
|
|
8
|
-
import { buildNotificationStatusReport, checkNotificationHealth, recoverNotifications, sanitizeDiagnostic, sendNotificationTest } from "../../sdk/bus/notification-service";
|
|
9
|
-
import { ensureTelegramDaemonRunningDetailed, resolveTelegramSetupPreflight } from "../../sdk/bus/telegram-daemon";
|
|
10
|
-
import { runTelegramSetup } from "../../sdk/bus/telegram-setup";
|
|
6
|
+
import { type RoutingSettingsPreview } from "../../sdk/routing-settings";
|
|
11
7
|
import { type CredentialAutoImportStateStore } from "../../setup/credential-auto-import";
|
|
12
8
|
import { type CommandPaletteAction } from "../components/command-palette";
|
|
13
|
-
import type { NotificationsEditorOperations } from "../components/notifications-settings-editor";
|
|
14
9
|
import { type PlanPreviewOptions, type PlanPreviewResult } from "../components/plan-preview-overlay";
|
|
15
|
-
import type { SmartRoutingPreview } from "../components/smart-routing-panel";
|
|
16
10
|
import type { StatusLineSettings } from "../components/tool-status-header";
|
|
17
11
|
import type { JobsObserver } from "../jobs-observer";
|
|
18
12
|
import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
@@ -24,51 +18,6 @@ import type { TranscriptItemRegistry } from "../transcript-item-registry";
|
|
|
24
18
|
* previewed row count (and every other field) can never drift out of sync.
|
|
25
19
|
*/
|
|
26
20
|
export declare function buildStatusLineSettings(settingsInstance: Settings): StatusLineSettings;
|
|
27
|
-
export interface NotificationsEditorAdapterContext {
|
|
28
|
-
settings: Settings;
|
|
29
|
-
session: Pick<InteractiveModeContext["session"], "notificationSessionController">;
|
|
30
|
-
sessionManager: Pick<InteractiveModeContext["sessionManager"], "getCwd" | "getSessionId">;
|
|
31
|
-
notifyConfigChanged?: () => Promise<void> | void;
|
|
32
|
-
}
|
|
33
|
-
type TelegramDaemonStopResult = {
|
|
34
|
-
ok: boolean;
|
|
35
|
-
message: string;
|
|
36
|
-
before?: {
|
|
37
|
-
health?: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export interface NotificationsEditorOperationDependencies {
|
|
41
|
-
getNotificationConfig: typeof getNotificationConfig;
|
|
42
|
-
getCurrentTelegramActivationMarker: typeof getCurrentTelegramActivationMarker;
|
|
43
|
-
maskToken: typeof maskToken;
|
|
44
|
-
buildNotificationStatusReport: typeof buildNotificationStatusReport;
|
|
45
|
-
checkNotificationHealth: typeof checkNotificationHealth;
|
|
46
|
-
sendNotificationTest: typeof sendNotificationTest;
|
|
47
|
-
recoverNotifications: typeof recoverNotifications;
|
|
48
|
-
sanitizeDiagnostic: typeof sanitizeDiagnostic;
|
|
49
|
-
ensureTelegramDaemonRunningDetailed: typeof ensureTelegramDaemonRunningDetailed;
|
|
50
|
-
runTelegramSetup: typeof runTelegramSetup;
|
|
51
|
-
resolveTelegramSetupPreflight: typeof resolveTelegramSetupPreflight;
|
|
52
|
-
proposedTelegramIdentity: typeof proposedTelegramIdentity;
|
|
53
|
-
reconcileCommittedTelegramConfiguration: typeof reconcileCommittedTelegramConfiguration;
|
|
54
|
-
saveTelegramInactive: typeof saveTelegramInactive;
|
|
55
|
-
removeTelegramConfiguration: typeof removeTelegramConfiguration;
|
|
56
|
-
reloadTelegramDaemon(settings: Settings): Promise<{
|
|
57
|
-
ok: boolean;
|
|
58
|
-
message: string;
|
|
59
|
-
}>;
|
|
60
|
-
restartTelegramDaemon(settings: Settings): Promise<{
|
|
61
|
-
ok: boolean;
|
|
62
|
-
message: string;
|
|
63
|
-
}>;
|
|
64
|
-
stopTelegramDaemon(settings: Settings): Promise<TelegramDaemonStopResult>;
|
|
65
|
-
providerRuntime?: NotificationProviderRuntimeAuthority;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Concrete service adapter for the direct Notifications settings tab. Secrets remain in this closure's
|
|
69
|
-
* WeakMap and are never exposed through the editor's safe draft contract.
|
|
70
|
-
*/
|
|
71
|
-
export declare function createNotificationsEditorOperations(ctx: NotificationsEditorAdapterContext, overrides?: Partial<NotificationsEditorOperationDependencies>): NotificationsEditorOperations;
|
|
72
21
|
export declare class SelectorController {
|
|
73
22
|
#private;
|
|
74
23
|
private ctx;
|
|
@@ -117,15 +66,15 @@ export declare class SelectorController {
|
|
|
117
66
|
* This handles side effects and session-specific settings.
|
|
118
67
|
*/
|
|
119
68
|
handleSettingChange(id: string, value: unknown): void;
|
|
120
|
-
|
|
121
|
-
previewSmartRouting(draft: AutoroutingSetup): SmartRoutingPreview;
|
|
69
|
+
previewSmartRouting(draft: AutoroutingSetup): RoutingSettingsPreview;
|
|
122
70
|
applySmartRouting(draft: AutoroutingSetup, options?: {
|
|
123
|
-
preview?:
|
|
71
|
+
preview?: RoutingSettingsPreview;
|
|
124
72
|
confirmHandEdit?: boolean;
|
|
125
|
-
}): Promise<
|
|
73
|
+
}): Promise<RoutingSettingsPreview>;
|
|
126
74
|
refreshSmartRouting(options?: {
|
|
75
|
+
preview?: RoutingSettingsPreview;
|
|
127
76
|
confirmHandEdit?: boolean;
|
|
128
|
-
}): Promise<
|
|
77
|
+
}): Promise<RoutingSettingsPreview>;
|
|
129
78
|
clearGeneratedSetup(): Promise<void>;
|
|
130
79
|
setAutoroutingEnabled(enabled: boolean): Promise<void>;
|
|
131
80
|
showModelSelector(options?: {
|
|
@@ -153,4 +102,3 @@ export declare class SelectorController {
|
|
|
153
102
|
showJobsOverlay(observer: JobsObserver): void;
|
|
154
103
|
showTasksPane(aggregator: TasksAggregator): void;
|
|
155
104
|
}
|
|
156
|
-
export {};
|
|
@@ -4,3 +4,10 @@ export interface PlanModeState {
|
|
|
4
4
|
workflow?: "parallel" | "iterative";
|
|
5
5
|
reentry?: boolean;
|
|
6
6
|
}
|
|
7
|
+
export declare const DEFAULT_PLAN_FILE_PATH = "local://PLAN.md";
|
|
8
|
+
/**
|
|
9
|
+
* A persisted plan path becomes the plan-mode write target. Accept only a
|
|
10
|
+
* relative path under the session `local:` root; any other saved value,
|
|
11
|
+
* including an absolute or `..` path, falls back to the default plan file.
|
|
12
|
+
*/
|
|
13
|
+
export declare function restoredPlanFilePath(value: unknown): string;
|
|
@@ -18,6 +18,8 @@ export interface LoadMCPConfigsOptions {
|
|
|
18
18
|
filterBrowser?: boolean;
|
|
19
19
|
/** Only include startup-eligible servers; exact-config sessions always enforce autoload !== false. */
|
|
20
20
|
autoloadOnly?: boolean;
|
|
21
|
+
/** Include disabled native declarations for session-local status and controls. */
|
|
22
|
+
includeDisabled?: boolean;
|
|
21
23
|
/**
|
|
22
24
|
* Restrict discovery to GJC's own native config (`.gjc/` project and
|
|
23
25
|
* `~/.gjc/agent/` user scopes). Conventional standalone sessions use this
|
|
@@ -48,6 +50,12 @@ export interface LoadMCPConfigsResult {
|
|
|
48
50
|
configurationWarning: boolean;
|
|
49
51
|
/** Provider warnings surfaced during discovery (parse/skip diagnostics). */
|
|
50
52
|
warnings: string[];
|
|
53
|
+
/** Native declarations skipped because they cannot be connected. */
|
|
54
|
+
disabled?: Record<string, {
|
|
55
|
+
source: SourceMeta;
|
|
56
|
+
reason: "enabled-false" | "disabled-servers";
|
|
57
|
+
autoload: boolean;
|
|
58
|
+
}>;
|
|
51
59
|
}
|
|
52
60
|
/**
|
|
53
61
|
* Load all MCP server configs from standard locations.
|
|
@@ -126,6 +126,33 @@ export interface MCPManagerOptions {
|
|
|
126
126
|
/** Test seam for fencing the acquisition-to-registration replacement race. */
|
|
127
127
|
afterLeaseAcquiredForTests?: (name: string, lease: MCPPoolLease) => void | Promise<void>;
|
|
128
128
|
}
|
|
129
|
+
/** Manager-issued CAS identity. Binding is SDK authority, not browser data. */
|
|
130
|
+
export interface MCPServerControlTarget {
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly generation: number;
|
|
133
|
+
readonly binding: string;
|
|
134
|
+
}
|
|
135
|
+
export type MCPServerControlAction = "suspend" | "resume" | "reconnect";
|
|
136
|
+
export type MCPServerControlErrorCode = "invalid_target" | "stale_target" | "busy" | "unsupported" | "unavailable" | "unknown_effect";
|
|
137
|
+
export declare class MCPServerControlError extends Error {
|
|
138
|
+
readonly code: MCPServerControlErrorCode;
|
|
139
|
+
constructor(code: MCPServerControlErrorCode);
|
|
140
|
+
}
|
|
141
|
+
export interface MCPServerControlSnapshot {
|
|
142
|
+
readonly target: MCPServerControlTarget;
|
|
143
|
+
readonly state: "connected" | "connecting" | "disconnected" | "suspended" | "unknown";
|
|
144
|
+
readonly transport: "stdio" | "http" | "sse" | "unknown";
|
|
145
|
+
readonly scope: "manager";
|
|
146
|
+
readonly sharing: "shared" | "per-session" | "unknown";
|
|
147
|
+
readonly toolCount: number;
|
|
148
|
+
readonly controls: readonly MCPServerControlAction[];
|
|
149
|
+
}
|
|
150
|
+
export interface MCPServerControlResult {
|
|
151
|
+
/** Completion of the manager's connection/catalog operation, not remote termination or session-registry publication. */
|
|
152
|
+
readonly status: "suspended" | "resumed" | "reconnected";
|
|
153
|
+
readonly cleanup: "not_certified";
|
|
154
|
+
readonly target: MCPServerControlTarget;
|
|
155
|
+
}
|
|
129
156
|
export type ExactMcpServerControlStatus = "suspended" | "already-suspended" | "resumed" | "not-suspended" | "reconnected" | "unavailable" | "unknown-server";
|
|
130
157
|
export interface ExactMcpServerControlResult {
|
|
131
158
|
readonly name: string;
|
|
@@ -236,6 +263,18 @@ export declare class MCPManager {
|
|
|
236
263
|
prepareExactServerControl(action: "suspend" | "resume" | "reconnect", name: string): Promise<PreparedExactMcpServerControl>;
|
|
237
264
|
/** Clear all session-local suppression before this owner adopts a new identity. */
|
|
238
265
|
prepareExactServerControlReset(): Promise<PreparedExactMcpCatalog>;
|
|
266
|
+
/** Payload-free wakeups. Consumers must read a fresh snapshot. */
|
|
267
|
+
subscribeToServerControlsChanged(listener: () => void): () => void;
|
|
268
|
+
/** Read-only, including while session prompt admission is occupied. No resolved config is returned. */
|
|
269
|
+
getServerControlSnapshot(): readonly MCPServerControlSnapshot[];
|
|
270
|
+
/**
|
|
271
|
+
* Atomic target validation and reservation, before the first await. Existing
|
|
272
|
+
* disconnect/reconnect/pool machinery remains the only physical mutation path.
|
|
273
|
+
* Failure is not rollback proof; read the resulting state before retrying.
|
|
274
|
+
*/
|
|
275
|
+
controlServer(expected: MCPServerControlTarget, action: MCPServerControlAction, options?: {
|
|
276
|
+
signal?: AbortSignal;
|
|
277
|
+
}): Promise<MCPServerControlResult>;
|
|
239
278
|
/**
|
|
240
279
|
* Get a specific connection.
|
|
241
280
|
*/
|
|
@@ -305,6 +344,10 @@ export declare class MCPManager {
|
|
|
305
344
|
* Throws a retryable cleanup failure while the previous transport owner remains incomplete.
|
|
306
345
|
*/
|
|
307
346
|
reconnectServer(name: string): Promise<MCPServerConnection | null>;
|
|
347
|
+
/** Connect one ordinary session server without the startup cache fallback. */
|
|
348
|
+
connectSessionServer(name: string, config: MCPServerConfig, source: SourceMeta, options?: {
|
|
349
|
+
restart?: boolean;
|
|
350
|
+
}): Promise<MCPServerConnection>;
|
|
308
351
|
/**
|
|
309
352
|
* Refresh tools from a specific server.
|
|
310
353
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface SessionMcpControlGrant {
|
|
2
|
+
readonly grantSource: "root-interactive-cli";
|
|
3
|
+
}
|
|
4
|
+
/** Mint a grant. Only the root interactive CLI entry point calls this. */
|
|
5
|
+
export declare function issueSessionMcpControlGrant(): SessionMcpControlGrant;
|
|
6
|
+
/** True only for a token minted by {@link issueSessionMcpControlGrant}. */
|
|
7
|
+
export declare function isIssuedSessionMcpControlGrant(value: unknown): value is SessionMcpControlGrant;
|
|
@@ -7,7 +7,7 @@ import { type BrokerExitMode, type BrokerExitReason, type BrokerStopRequest } fr
|
|
|
7
7
|
import { type BrokerDiscovery, type BrokerPublicationObservation, type RedactedBrokerDiscovery } from "./discovery";
|
|
8
8
|
import { type LifecycleDurableEffectsReceipt, LifecycleLedger, type LifecycleStartupFailureReceipt } from "./lifecycle-ledger";
|
|
9
9
|
import { type IndexedSession, SessionIndex } from "./session-index";
|
|
10
|
-
import { type MasterCapabilityVerifier, type SpawnSubstrateFailure, type SpawnSubstrateProvider } from "./spawn-authority";
|
|
10
|
+
import { type MasterCapabilityVerifier, type SpawnLifecycleOwner, type SpawnSubstrateFailure, type SpawnSubstrateProvider } from "./spawn-authority";
|
|
11
11
|
import type { BrokerTaskArtifactOwnerRetirementDisposition } from "./task-artifact-owner-validation";
|
|
12
12
|
export interface BrokerSettings {
|
|
13
13
|
agentDir: string;
|
|
@@ -26,6 +26,12 @@ export interface BrokerSettings {
|
|
|
26
26
|
masterCapabilityVerifier?: MasterCapabilityVerifier;
|
|
27
27
|
/** Grace before an orphaned spawn child closes; schema-bounded in production. */
|
|
28
28
|
masterOrphanGraceMs?: number;
|
|
29
|
+
/**
|
|
30
|
+
* How long a headless spawn host that acknowledged an endpoint `session.close`
|
|
31
|
+
* may take to exit before the substrate close escalates. Defaults to the host's
|
|
32
|
+
* own postmortem cleanup deadline.
|
|
33
|
+
*/
|
|
34
|
+
spawnHostCloseGraceMs?: number;
|
|
29
35
|
/**
|
|
30
36
|
* Grace before a broker nobody is left to use exits on its own. The clock only
|
|
31
37
|
* runs while the index proves no live session host and no open spawn authority,
|
|
@@ -77,6 +83,7 @@ type ResolvedBrokerSettings = {
|
|
|
77
83
|
spawnSubstrateProvider?: SpawnSubstrateProvider;
|
|
78
84
|
spawnPromptLayer?: SpawnPromptLayer;
|
|
79
85
|
masterOrphanGraceMs: number;
|
|
86
|
+
spawnHostCloseGraceMs: number;
|
|
80
87
|
abandonedGraceMs: number;
|
|
81
88
|
reapWhenAbandoned: boolean;
|
|
82
89
|
restartRequestId?: string;
|
|
@@ -226,15 +233,23 @@ export type SpawnQ26Reconciliation = {
|
|
|
226
233
|
turnId?: string;
|
|
227
234
|
acceptedAt?: number;
|
|
228
235
|
};
|
|
236
|
+
/** Exact registration a spawn waits for, bounded by the original readiness deadline. */
|
|
237
|
+
export interface SpawnRegistrationRequest {
|
|
238
|
+
childId: string;
|
|
239
|
+
cwd: string;
|
|
240
|
+
stateRoot: string;
|
|
241
|
+
/** Resolved SDK host (not the managed supervisor); registration must match it exactly. */
|
|
242
|
+
owner: SpawnLifecycleOwner;
|
|
243
|
+
effectMarker: string;
|
|
244
|
+
deadlineAt: number;
|
|
245
|
+
}
|
|
229
246
|
/** Q26-only host control seam. It never receives or returns durable request material. */
|
|
230
247
|
export interface SpawnPromptLayer {
|
|
231
|
-
awaitRegistration(input: {
|
|
232
|
-
childId: string;
|
|
233
|
-
cwd: string;
|
|
234
|
-
stateRoot: string;
|
|
235
|
-
}): Promise<{
|
|
248
|
+
awaitRegistration(input: SpawnRegistrationRequest): Promise<{
|
|
236
249
|
ok: true;
|
|
237
|
-
registration: SpawnHostRegistration
|
|
250
|
+
registration: SpawnHostRegistration & {
|
|
251
|
+
lifecycleRequestId: string;
|
|
252
|
+
};
|
|
238
253
|
} | {
|
|
239
254
|
ok: false;
|
|
240
255
|
}>;
|
|
@@ -250,12 +265,23 @@ export interface SpawnPromptLayer {
|
|
|
250
265
|
clientRef: string;
|
|
251
266
|
pinned: SpawnHostRegistration;
|
|
252
267
|
}): Promise<SpawnQ26Reconciliation>;
|
|
268
|
+
/**
|
|
269
|
+
* Ask the exact pinned host to close itself through its authenticated endpoint.
|
|
270
|
+
* `accepted` means the host acknowledged `session.close`; anything else leaves the
|
|
271
|
+
* close to the substrate provider. Production uses the endpoint attachment.
|
|
272
|
+
*/
|
|
273
|
+
close?(input: {
|
|
274
|
+
sessionId: string;
|
|
275
|
+
pinned: SpawnHostRegistration;
|
|
276
|
+
}): Promise<"accepted" | "unavailable">;
|
|
253
277
|
}
|
|
254
278
|
/** Exact admission predicate for the child host row published after launch. */
|
|
255
279
|
export declare function spawnRegistrationMatches(candidate: IndexedSession, expected: {
|
|
256
280
|
childId: string;
|
|
257
281
|
cwd: string;
|
|
258
282
|
stateRoot: string;
|
|
283
|
+
owner: SpawnLifecycleOwner;
|
|
284
|
+
effectMarker: string;
|
|
259
285
|
}): boolean;
|
|
260
286
|
export declare function normalizeBrokerInput(operation: string, input: Record<string, unknown>): InputNormalization;
|
|
261
287
|
/** Test seam for lifecycle serialization identity. */
|
|
@@ -177,6 +177,7 @@ export type SpawnChildHostLaunch = {
|
|
|
177
177
|
inheritedEnv: Readonly<Record<string, string>>;
|
|
178
178
|
env: Readonly<Record<string, string>>;
|
|
179
179
|
effectMarker: string;
|
|
180
|
+
semanticReadyDeadlineAt: number;
|
|
180
181
|
};
|
|
181
182
|
export declare function prepareSpawnChildHostLaunch(broker: Broker, input: {
|
|
182
183
|
cwd: string;
|
|
@@ -22,6 +22,8 @@ export interface RetentionPolicy {
|
|
|
22
22
|
maxAgeMs?: number;
|
|
23
23
|
maxRows?: number;
|
|
24
24
|
tombstoneRule?: SessionTombstoneRule;
|
|
25
|
+
/** Rejection-audit size past which the next write rotates it to `index-audit.jsonl.1`. */
|
|
26
|
+
auditRotateBytes?: number;
|
|
25
27
|
}
|
|
26
28
|
export interface SessionIndexObservationDeps {
|
|
27
29
|
/** Test seam for an exact retained process-identity observation. */
|