@cortexkit/aft-opencode 0.62.0 → 0.63.4
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/dist/bash-wait-detach.d.ts +1 -0
- package/dist/bash-wait-detach.d.ts.map +1 -1
- package/dist/bg-notifications.d.ts +30 -11
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/bridge-bootstrap.d.ts +1 -1
- package/dist/bridge-bootstrap.d.ts.map +1 -1
- package/dist/config-live-reload.d.ts +14 -2
- package/dist/config-live-reload.d.ts.map +1 -1
- package/dist/config.d.ts +37 -8
- package/dist/config.d.ts.map +1 -1
- package/dist/entry/server.js +4015 -1382
- package/dist/hooks/auto-update-checker/index.d.ts +5 -1
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3294 -1243
- package/dist/logger.d.ts +6 -10
- package/dist/logger.d.ts.map +1 -1
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp.d.ts +1 -0
- package/dist/lsp.d.ts.map +1 -1
- package/dist/shared/rpc-client.d.ts.map +1 -1
- package/dist/shared/rpc-notifications.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts +2 -0
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/session-cleanup.d.ts +6 -0
- package/dist/shared/session-cleanup.d.ts.map +1 -0
- package/dist/shared/session-directory.d.ts +24 -0
- package/dist/shared/session-directory.d.ts.map +1 -1
- package/dist/shared/status.d.ts +12 -1
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/shared/subagent-detect.d.ts +24 -8
- package/dist/shared/subagent-detect.d.ts.map +1 -1
- package/dist/shared/wake-admission.d.ts +68 -0
- package/dist/shared/wake-admission.d.ts.map +1 -0
- package/dist/shutdown-hooks.d.ts +2 -0
- package/dist/shutdown-hooks.d.ts.map +1 -1
- package/dist/subc-tool-schemas.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts +5 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +1 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +4 -0
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/dist/tools/definitions/v2.d.ts +2 -1
- package/dist/tools/definitions/v2.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/metadata.d.ts +7 -0
- package/dist/tools/metadata.d.ts.map +1 -0
- package/dist/tools/outside-permissions.d.ts +35 -0
- package/dist/tools/outside-permissions.d.ts.map +1 -0
- package/dist/tools/permissions.d.ts +9 -11
- package/dist/tools/permissions.d.ts.map +1 -1
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/semantic.d.ts.map +1 -1
- package/dist/tui/notification-socket.d.ts.map +1 -1
- package/dist/tui/preferences.d.ts +11 -0
- package/dist/tui/preferences.d.ts.map +1 -1
- package/dist/v2-session-lifecycle.d.ts +7 -0
- package/dist/v2-session-lifecycle.d.ts.map +1 -1
- package/dist/v2-tool-hooks.d.ts.map +1 -1
- package/dist/wakes/runtime-consumer.d.ts +9 -3
- package/dist/wakes/runtime-consumer.d.ts.map +1 -1
- package/dist/wakes/session-delivery.d.ts +22 -4
- package/dist/wakes/session-delivery.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/entry/server-runtime.mjs +53 -18
- package/src/logger.ts +12 -5
- package/src/shared/rpc-client.ts +35 -28
- package/src/shared/rpc-notifications.ts +5 -3
- package/src/shared/rpc-server.ts +65 -7
- package/src/shared/session-cleanup.ts +13 -0
- package/src/shared/session-directory.ts +59 -3
- package/src/shared/status.ts +32 -2
- package/src/shared/subagent-detect.ts +53 -25
- package/src/shared/wake-admission.ts +340 -0
- package/src/tui/notification-socket.ts +30 -4
- package/src/tui/preferences.ts +66 -29
- package/src/tui/sidebar-view.tsx +1 -0
- package/src/tui/v2.tsx +49 -1
- package/src/tui-compiled/notification-socket.ts +30 -4
- package/src/tui-compiled/preferences.ts +66 -29
- package/src/tui-compiled/sidebar-view.tsx +2 -1
- package/src/tui-compiled/v2.tsx +54 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/tools/permissions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAYjD,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,eAAe,GAAG,UAAU,CAAC;AAEpF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA2BF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,eAAe,SAAuB,GACrC,oBAAoB,CAgCtB;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9E;AAwBD,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,GAAG;IACrE,UAAU,EAAE,qBAAqB,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAoCF;;;;;;;;;;;;GAYG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGhF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB3E;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnF;AA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Root":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAe,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAInF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAe,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAInF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA2CjD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAsBD,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAqW/E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CAyBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyGjD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BrD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyGjD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BrD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAkM9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA+GjD,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAsJhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-socket.d.ts","sourceRoot":"","sources":["../../src/tui/notification-socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA8C,MAAM,sBAAsB,CAAC;AAGhG,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAA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AC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,GAC5C,MAAM,IAAI,CAKZ;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACnC,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAoB/C;AA6QD,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,IAAI,CAMvF;AAED,wBAAgB,0BAA0B,IAAI,IAAI,CAiBjD"}
|
|
@@ -9,6 +9,12 @@ export interface AftTuiPrefs {
|
|
|
9
9
|
startCollapsed: boolean;
|
|
10
10
|
rememberCollapsed: boolean;
|
|
11
11
|
collapsed: boolean | null;
|
|
12
|
+
/**
|
|
13
|
+
* Whether OpenCode 2 shows AFT's health line (`AFT E0 W0 | D0 U0 C0 | T0`)
|
|
14
|
+
* in the prompt footer. Off hides it entirely; the sidebar and the status
|
|
15
|
+
* dialog are unaffected.
|
|
16
|
+
*/
|
|
17
|
+
footer: boolean;
|
|
12
18
|
header: {
|
|
13
19
|
label: string;
|
|
14
20
|
showVersion: boolean;
|
|
@@ -27,6 +33,11 @@ export declare function resolveAftPrefs(root: Record<string, unknown>): AftTuiPr
|
|
|
27
33
|
export declare function computeEffectiveOrder(root: Record<string, unknown>, pluginKey: string, defaultOrder: number): number;
|
|
28
34
|
type JsonValue = string | number | boolean | null;
|
|
29
35
|
export declare function queueTuiPreferenceUpdate(pluginKey: string, path: string[], value: JsonValue): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Calls `onChange` after the preferences file's content changes, including
|
|
38
|
+
* when the file is deleted (callers then read defaults) and when it is
|
|
39
|
+
* created again.
|
|
40
|
+
*/
|
|
30
41
|
export declare function watchTuiPreferences(onChange: () => void): () => void;
|
|
31
42
|
export declare function persistCollapsedIfEnabled(prefs: AftTuiPrefs, collapsed: boolean): void;
|
|
32
43
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/tui/preferences.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAGlE,wBAAgB,qBAAqB,IAAI,MAAM,CAO9C;AAMD,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQ/E;AAED,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,QAAQ,EAAE;QACR,WAAW,EAAE,OAAO,CAAC;QACrB,aAAa,EAAE,OAAO,CAAC;QACvB,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;CACH;AAED,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/tui/preferences.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAGlE,wBAAgB,qBAAqB,IAAI,MAAM,CAO9C;AAMD,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQ/E;AAED,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,MAAM,WAAW,WAAW;I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import type { PluginContext } from "./types.js";
|
|
|
3
3
|
/** Hold a racing wake until the host classifies an interrupted tool's execution. */
|
|
4
4
|
export declare function noteV2ToolAbort(client: unknown, sessionID: string): void;
|
|
5
5
|
export declare function awaitV2ExecutionSettlement(client: unknown, sessionID: string): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* True once the host has deleted this session in this Location. Wake routes
|
|
8
|
+
* use it to drop a late completion without recreating per-session state.
|
|
9
|
+
*/
|
|
10
|
+
export declare function v2SessionDeleted(client: unknown, sessionID: string): boolean;
|
|
11
|
+
/** Test-only visibility into retained session entries, including task-kill closures. */
|
|
12
|
+
export declare function _v2SessionCountForTest(client: object): number;
|
|
6
13
|
export declare function v2SubagentStopped(client: unknown, sessionID: string): boolean;
|
|
7
14
|
export declare function v2StopEpoch(client: unknown, sessionID: string): number;
|
|
8
15
|
/** Only a command's spawning call records ownership; watching another session's task does not. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-session-lifecycle.d.ts","sourceRoot":"","sources":["../src/v2-session-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"v2-session-lifecycle.d.ts","sourceRoot":"","sources":["../src/v2-session-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAU,MAAM,QAAQ,CAAC;AAM/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAWhD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAQxE;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAiBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAE5E;AAeD,wFAAwF;AACxF,wBAAgB,s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AAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"v2-tool-hooks.d.ts","sourceRoot":"","sources":["../src/v2-tool-hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAOxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAsDhD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IACP,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D,EACD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,eAAe,CAAC,EAAE,MAAM,4DAsHzB"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import type { AftTransportFactoryOptions, AftTransportPool, BridgeOptions } from "@cortexkit/aft-bridge";
|
|
1
|
+
import type { AftProjectTransport, AftTransportFactoryOptions, AftTransportPool, BridgeOptions } from "@cortexkit/aft-bridge";
|
|
2
2
|
import type { AftConfig } from "../config.js";
|
|
3
3
|
import type { V2ToolConsumers } from "../tools/definitions/v2.js";
|
|
4
4
|
import { type V2SessionAdmission } from "./session-delivery.js";
|
|
5
5
|
export interface V2WakeHostContext {
|
|
6
6
|
readonly session: V2SessionAdmission;
|
|
7
7
|
}
|
|
8
|
+
export interface V2RuntimeConsumerOptions {
|
|
9
|
+
/** Delays before each automatic retry of a failed standalone wake; tests shorten them. */
|
|
10
|
+
readonly standaloneRetryDelaysMs?: readonly number[];
|
|
11
|
+
}
|
|
8
12
|
/** Test-only: forget every route and held completion in the process-wide table. */
|
|
9
13
|
export declare function __resetV2WakeRoutesForTests(): void;
|
|
10
|
-
declare const sharedBridgeOptions: Pick<BridgeOptions, "onBashCompletion" | "onBashLongRunning">;
|
|
14
|
+
declare const sharedBridgeOptions: Pick<BridgeOptions, "onBashCompletion" | "onBashLongRunning" | "onBashPatternMatch">;
|
|
15
|
+
declare const sharedTransportOptions: Pick<AftTransportFactoryOptions, "onBgEventsNudge">;
|
|
11
16
|
export interface V2RuntimeConsumer extends V2ToolConsumers {
|
|
12
17
|
readonly bridgeOptions: typeof sharedBridgeOptions;
|
|
18
|
+
readonly transportOptions: typeof sharedTransportOptions;
|
|
13
19
|
dispose(): void;
|
|
14
20
|
subcWakes(getPool: () => AftTransportPool, directory: string): {
|
|
15
21
|
handlers: Pick<AftTransportFactoryOptions, "onBgEventsNudge" | "onBgEventsNudgeRef">;
|
|
@@ -26,6 +32,6 @@ export interface V2RuntimeConsumer extends V2ToolConsumers {
|
|
|
26
32
|
* replaces it); it decides whether an admitted completion detaches the
|
|
27
33
|
* session's waits.
|
|
28
34
|
*/
|
|
29
|
-
export declare function createV2RuntimeConsumer(context: V2WakeHostContext, getConfig?: () => AftConfig): V2RuntimeConsumer;
|
|
35
|
+
export declare function createV2RuntimeConsumer(context: V2WakeHostContext, getConfig?: () => AftConfig, getBridge?: (root?: string) => AftProjectTransport, options?: V2RuntimeConsumerOptions): V2RuntimeConsumer;
|
|
30
36
|
export {};
|
|
31
37
|
//# sourceMappingURL=runtime-consumer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-consumer.d.ts","sourceRoot":"","sources":["../../src/wakes/runtime-consumer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"runtime-consumer.d.ts","sourceRoot":"","sources":["../../src/wakes/runtime-consumer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAMhB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAoB/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;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GAAE,wBAA6B,GACrC,iBAAiB,CA8wBnB"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
+
export declare const MAX_ADMITTED_WAKES = 4096;
|
|
3
|
+
export declare class WakeDeliveryOverflow extends Error {
|
|
4
|
+
readonly type = "wake_delivery_overflow";
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* The `metadata.source` marker for AFT-written session input. Synthetic wakes
|
|
4
9
|
* retain it, and the prompt hook recognises it on machine-originated prompts
|
|
@@ -39,6 +44,12 @@ export interface CompletionWake {
|
|
|
39
44
|
/** Distinguish a watch match from the later terminal completion of the same task. */
|
|
40
45
|
readonly notificationID?: string;
|
|
41
46
|
}
|
|
47
|
+
export type WakeAdmission = "delivered" | "already-delivered" | "not-delivered";
|
|
48
|
+
export interface PatternMatchWake extends CompletionWake {
|
|
49
|
+
readonly watchID: string;
|
|
50
|
+
readonly matchOffset: number;
|
|
51
|
+
readonly reason?: string;
|
|
52
|
+
}
|
|
42
53
|
export interface StatusOnlyUpdate {
|
|
43
54
|
readonly sessionID: string;
|
|
44
55
|
readonly text: string;
|
|
@@ -47,14 +58,21 @@ export interface StatusOnlyUpdate {
|
|
|
47
58
|
}
|
|
48
59
|
/**
|
|
49
60
|
* Admit V2 session updates as synthetic input so machine-written notices are
|
|
50
|
-
* not rendered as user turns. Completions wake execution;
|
|
61
|
+
* not rendered as user turns. Completions and pattern matches wake execution;
|
|
62
|
+
* status does not.
|
|
51
63
|
*/
|
|
52
64
|
export declare class V2SessionDelivery {
|
|
53
65
|
private readonly session;
|
|
54
|
-
private readonly
|
|
66
|
+
private readonly retainedWakeLimit;
|
|
67
|
+
private readonly admittedWakes;
|
|
55
68
|
private disposed;
|
|
56
|
-
constructor(session: V2SessionAdmission);
|
|
57
|
-
completion(input: CompletionWake): Effect.Effect<
|
|
69
|
+
constructor(session: V2SessionAdmission, retainedWakeLimit?: number);
|
|
70
|
+
completion(input: CompletionWake): Effect.Effect<WakeAdmission, unknown>;
|
|
71
|
+
patternMatch(input: PatternMatchWake): Effect.Effect<WakeAdmission, unknown>;
|
|
72
|
+
private patternKey;
|
|
73
|
+
retirePatternMatch(input: PatternMatchWake): void;
|
|
74
|
+
retireCompletion(input: Pick<CompletionWake, "sessionID" | "taskIDs" | "notificationID">): void;
|
|
75
|
+
private admitWake;
|
|
58
76
|
status(input: StatusOnlyUpdate): Effect.Effect<void, unknown>;
|
|
59
77
|
dispose(): void;
|
|
60
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-delivery.d.ts","sourceRoot":"","sources":["../../src/wakes/session-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"session-delivery.d.ts","sourceRoot":"","sources":["../../src/wakes/session-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;AAGtC,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,4BAA4B;;CAI1C;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAMhE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,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
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@clack/prompts": "^1.6.0",
|
|
42
|
-
"@cortexkit/aft-bridge": "0.
|
|
42
|
+
"@cortexkit/aft-bridge": "0.63.4",
|
|
43
43
|
"@opentui/core": "0.4.3",
|
|
44
44
|
"@opentui/solid": "0.4.3",
|
|
45
45
|
"comment-json": "^4.6.2",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"zod": "^4.4.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
53
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
54
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
55
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
56
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
57
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
52
|
+
"@cortexkit/aft-darwin-arm64": "0.63.4",
|
|
53
|
+
"@cortexkit/aft-darwin-x64": "0.63.4",
|
|
54
|
+
"@cortexkit/aft-linux-arm64": "0.63.4",
|
|
55
|
+
"@cortexkit/aft-linux-x64": "0.63.4",
|
|
56
|
+
"@cortexkit/aft-win32-arm64": "0.63.4",
|
|
57
|
+
"@cortexkit/aft-win32-x64": "0.63.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@opencode-ai/plugin": "^1.17.11",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { acquireBridge, releaseBridge } from "@cortexkit/aft-bridge";
|
|
2
|
-
import { Effect } from "effect";
|
|
2
|
+
import { Cause, Effect } from "effect";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
applyToolSurfaceOverrides,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { resolveBridgePoolTransportOptions } from "../config.js";
|
|
15
15
|
import { buildConfigErrorToolMap } from "../config-error-surface.js";
|
|
16
16
|
import { startOpenCodeLiveConfigReload } from "../config-live-reload.js";
|
|
17
|
-
import { debug, log, warn } from "../logger.js";
|
|
17
|
+
import { debug, error, log, warn } from "../logger.js";
|
|
18
18
|
import { resolvePluginVersion } from "../plugin-version.js";
|
|
19
19
|
import { registerAftConfigErrorRpc, registerAftRpc } from "../rpc/register.js";
|
|
20
20
|
import { hoistedV2ToolConsumers } from "../tools/hoisted/v2.js";
|
|
@@ -49,9 +49,9 @@ const defaults = {
|
|
|
49
49
|
registerWorkflowHints: registerV2WorkflowHints,
|
|
50
50
|
// `getConfig` returns the Location's current config, which a live reload
|
|
51
51
|
// replaces; the wake consumer reads it when a completion arrives.
|
|
52
|
-
toolConsumers: (context, config, getConfig = () => config) => ({
|
|
52
|
+
toolConsumers: (context, config, getConfig = () => config, getBridge) => ({
|
|
53
53
|
...hoistedV2ToolConsumers(context),
|
|
54
|
-
...createV2RuntimeConsumer(context, getConfig),
|
|
54
|
+
...createV2RuntimeConsumer(context, getConfig, getBridge),
|
|
55
55
|
}),
|
|
56
56
|
acquireBridge,
|
|
57
57
|
releaseBridge,
|
|
@@ -89,9 +89,13 @@ async function bootLocation(context, location, dependencies) {
|
|
|
89
89
|
{ configRoot: directory, lspDirectory: directory, config, pluginVersion, notify },
|
|
90
90
|
dependencies,
|
|
91
91
|
);
|
|
92
|
-
const canonicalDirectory = location.project?.canonical ?? directory;
|
|
93
92
|
let liveConfig = config;
|
|
94
|
-
const consumers = dependencies.toolConsumers(
|
|
93
|
+
const consumers = dependencies.toolConsumers(
|
|
94
|
+
context,
|
|
95
|
+
config,
|
|
96
|
+
() => liveConfig,
|
|
97
|
+
(root = directory) => pool.getBridge(root),
|
|
98
|
+
);
|
|
95
99
|
// Only a rejected configuration keeps AFT out of a project; there is no
|
|
96
100
|
// config switch that turns it off.
|
|
97
101
|
const isProjectEnabled = createProjectAcceptance(directory, dependencies);
|
|
@@ -99,7 +103,10 @@ async function bootLocation(context, location, dependencies) {
|
|
|
99
103
|
? consumers.subcWakes?.(() => pool, directory)
|
|
100
104
|
: undefined;
|
|
101
105
|
// getPool is only called on a version mismatch, after the pool exists.
|
|
102
|
-
|
|
106
|
+
let pool;
|
|
107
|
+
let liveConfigReload;
|
|
108
|
+
try {
|
|
109
|
+
pool = await dependencies.acquireBridge(directory, {
|
|
103
110
|
harness: "opencode",
|
|
104
111
|
binaryPath: environment.binaryPath,
|
|
105
112
|
poolOptions: {
|
|
@@ -115,6 +122,7 @@ async function bootLocation(context, location, dependencies) {
|
|
|
115
122
|
},
|
|
116
123
|
configOverrides: environment.configOverrides,
|
|
117
124
|
subcConnectionFile: config.subc?.connection_file,
|
|
125
|
+
...consumers.transportOptions,
|
|
118
126
|
...subcWakes?.handlers,
|
|
119
127
|
});
|
|
120
128
|
environment.attach(pool);
|
|
@@ -147,7 +155,7 @@ async function bootLocation(context, location, dependencies) {
|
|
|
147
155
|
const hintsBlock = hints === null ? null : renameV2ToolReferences(hints);
|
|
148
156
|
// Keep this Location's live config keys current when a config file changes.
|
|
149
157
|
// The finalizer that releases the bridge also stops the watch.
|
|
150
|
-
|
|
158
|
+
liveConfigReload = dependencies.startLiveConfigReload({
|
|
151
159
|
directory,
|
|
152
160
|
initialSources: bootstrap.sources ?? [],
|
|
153
161
|
initialSourceTexts: bootstrap.sourceTexts,
|
|
@@ -159,6 +167,15 @@ async function bootLocation(context, location, dependencies) {
|
|
|
159
167
|
notify,
|
|
160
168
|
});
|
|
161
169
|
return { consumers, pool, tools, liveConfigReload, toolContext, directory, hintsBlock, subcWakes };
|
|
170
|
+
} catch (error) {
|
|
171
|
+
// Boot failures precede finalizer ownership, so unwind every acquired resource here.
|
|
172
|
+
await Promise.allSettled([
|
|
173
|
+
Promise.resolve().then(() => liveConfigReload?.stop()),
|
|
174
|
+
Promise.resolve().then(() => consumers.dispose?.()),
|
|
175
|
+
Promise.resolve().then(() => pool && dependencies.releaseBridge(pool)),
|
|
176
|
+
]);
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
162
179
|
}
|
|
163
180
|
|
|
164
181
|
/**
|
|
@@ -222,7 +239,32 @@ export function makeServerEffect(overrides = {}) {
|
|
|
222
239
|
// finalizer logs when the host disposes the Location.
|
|
223
240
|
const logRuntimeStop = logRuntimeStart(location);
|
|
224
241
|
yield* Effect.addFinalizer(() => Effect.sync(logRuntimeStop));
|
|
225
|
-
|
|
242
|
+
// The host runs this program under Effect.ignoreCause, so a rejected boot
|
|
243
|
+
// would otherwise leave the Location without AFT and without any log.
|
|
244
|
+
// Interruption is the host disposing the Location mid-boot, not a failure.
|
|
245
|
+
const runtime = yield* Effect.acquireRelease(
|
|
246
|
+
Effect.promise(() => bootLocation(context, location, dependencies)),
|
|
247
|
+
(runtime) => Effect.promise(async () => {
|
|
248
|
+
try {
|
|
249
|
+
runtime.liveConfigReload?.stop();
|
|
250
|
+
} finally {
|
|
251
|
+
try {
|
|
252
|
+
runtime.consumers.dispose?.();
|
|
253
|
+
} finally {
|
|
254
|
+
if (runtime.pool) await dependencies.releaseBridge(runtime.pool);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}),
|
|
258
|
+
).pipe(
|
|
259
|
+
Effect.tapCause((cause) =>
|
|
260
|
+
Effect.sync(() => {
|
|
261
|
+
if (Cause.hasInterruptsOnly(cause)) return;
|
|
262
|
+
error(
|
|
263
|
+
`AFT V2 boot failed for Location ${location.id ?? "(no id)"} at ${location.directory}: ${Cause.pretty(cause)}`,
|
|
264
|
+
);
|
|
265
|
+
}),
|
|
266
|
+
),
|
|
267
|
+
);
|
|
226
268
|
if (!runtime) return;
|
|
227
269
|
|
|
228
270
|
if (runtime.configError !== undefined) {
|
|
@@ -232,13 +274,6 @@ export function makeServerEffect(overrides = {}) {
|
|
|
232
274
|
return;
|
|
233
275
|
}
|
|
234
276
|
|
|
235
|
-
yield* Effect.addFinalizer(() =>
|
|
236
|
-
Effect.promise(async () => {
|
|
237
|
-
runtime.liveConfigReload?.stop();
|
|
238
|
-
runtime.consumers.dispose?.();
|
|
239
|
-
await dependencies.releaseBridge(runtime.pool);
|
|
240
|
-
}),
|
|
241
|
-
);
|
|
242
277
|
const rpc = yield* dependencies.registerRpc(context, location, runtime.pool);
|
|
243
278
|
yield* Effect.addFinalizer(() => Effect.promise(() => rpc.dispose()));
|
|
244
279
|
yield* registerV2SessionLifecycle(context, runtime.toolContext);
|
|
@@ -247,8 +282,8 @@ export function makeServerEffect(overrides = {}) {
|
|
|
247
282
|
// The config is read through the tool context so live reloads apply.
|
|
248
283
|
// The bridge asked first is the one this Location's tools run on, the
|
|
249
284
|
// Location's own directory; for a Location in a linked git worktree that
|
|
250
|
-
// is the worktree, not the canonical main checkout
|
|
251
|
-
//
|
|
285
|
+
// is the worktree, not the canonical main checkout. Other bridges are
|
|
286
|
+
// still tried after it.
|
|
252
287
|
yield* dependencies.registerPromptHook(context, {
|
|
253
288
|
pool: runtime.pool,
|
|
254
289
|
projectRoot: runtime.directory,
|
package/src/logger.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RotatingLogSink, resolvePluginLogPath } from "@cortexkit/aft-bridge";
|
|
1
|
+
import { type LogMeta, RotatingLogSink, resolvePluginLogPath } from "@cortexkit/aft-bridge";
|
|
2
2
|
|
|
3
3
|
const TAG = "[aft-plugin]";
|
|
4
4
|
|
|
@@ -125,17 +125,24 @@ export function flushLog(): void {
|
|
|
125
125
|
/**
|
|
126
126
|
* Adapter that exposes this logger as a {@link import("@cortexkit/aft-bridge").Logger}
|
|
127
127
|
* for the shared bridge package. The bridge package never knows about this log
|
|
128
|
-
* file or the `[aft-plugin]` tag — it just calls `log/warn/error` and we map
|
|
128
|
+
* file or the `[aft-plugin]` tag — it just calls `log/debug/warn/error` and we map
|
|
129
129
|
* its `LogMeta.sessionId` into our internal session-prefix shape.
|
|
130
130
|
*/
|
|
131
131
|
export const bridgeLogger = {
|
|
132
|
-
|
|
132
|
+
debug(message: string, meta?: LogMeta) {
|
|
133
|
+
if (meta?.engineRecord) return;
|
|
134
|
+
sessionDebug(meta?.sessionId, message);
|
|
135
|
+
},
|
|
136
|
+
log(message: string, meta?: LogMeta) {
|
|
137
|
+
if (meta?.engineRecord) return;
|
|
133
138
|
sessionLog(meta?.sessionId, message);
|
|
134
139
|
},
|
|
135
|
-
warn(message: string, meta?:
|
|
140
|
+
warn(message: string, meta?: LogMeta) {
|
|
141
|
+
if (meta?.engineRecord) return;
|
|
136
142
|
sessionWarn(meta?.sessionId, message);
|
|
137
143
|
},
|
|
138
|
-
error(message: string, meta?:
|
|
144
|
+
error(message: string, meta?: LogMeta) {
|
|
145
|
+
if (meta?.engineRecord) return;
|
|
139
146
|
sessionError(meta?.sessionId, message);
|
|
140
147
|
},
|
|
141
148
|
getLogFilePath: () => logFile,
|
package/src/shared/rpc-client.ts
CHANGED
|
@@ -250,7 +250,7 @@ export class AftRpcClient {
|
|
|
250
250
|
info: PortInfo,
|
|
251
251
|
signal?: AbortSignal,
|
|
252
252
|
): Promise<T> {
|
|
253
|
-
|
|
253
|
+
return this.fetchWithTimeout(
|
|
254
254
|
`http://127.0.0.1:${info.port}/rpc/${method}`,
|
|
255
255
|
{
|
|
256
256
|
method: "POST",
|
|
@@ -258,12 +258,14 @@ export class AftRpcClient {
|
|
|
258
258
|
body: JSON.stringify({ ...params, token: info.token }),
|
|
259
259
|
},
|
|
260
260
|
signal,
|
|
261
|
+
async (response) => {
|
|
262
|
+
if (!response.ok) {
|
|
263
|
+
const text = await response.text();
|
|
264
|
+
throw new Error(`RPC ${method} failed (${response.status}): ${text}`);
|
|
265
|
+
}
|
|
266
|
+
return (await response.json()) as T;
|
|
267
|
+
},
|
|
261
268
|
);
|
|
262
|
-
if (!response.ok) {
|
|
263
|
-
const text = await response.text();
|
|
264
|
-
throw new Error(`RPC ${method} failed (${response.status}): ${text}`);
|
|
265
|
-
}
|
|
266
|
-
return (await response.json()) as T;
|
|
267
269
|
}
|
|
268
270
|
|
|
269
271
|
/**
|
|
@@ -467,39 +469,43 @@ export class AftRpcClient {
|
|
|
467
469
|
signal?: AbortSignal,
|
|
468
470
|
): Promise<boolean> {
|
|
469
471
|
try {
|
|
470
|
-
|
|
472
|
+
return await this.fetchWithTimeout(
|
|
471
473
|
`http://127.0.0.1:${port}/health`,
|
|
472
474
|
{ method: "GET" },
|
|
473
475
|
signal,
|
|
476
|
+
async (response) => {
|
|
477
|
+
if (!response.ok) return false;
|
|
478
|
+
// Identity check: the port file records the owning pid and `/health`
|
|
479
|
+
// echoes the live server's pid. If they disagree, the port was recycled
|
|
480
|
+
// by a *different* AFT server (or an unrelated localhost service that
|
|
481
|
+
// happens to answer /health), so this port file is stale — reject it so
|
|
482
|
+
// we don't POST this file's token to the wrong server. Only enforced when
|
|
483
|
+
// both sides expose a pid (older port files omit it).
|
|
484
|
+
if (expectedPid !== undefined) {
|
|
485
|
+
try {
|
|
486
|
+
const body = (await response.json()) as { pid?: unknown };
|
|
487
|
+
if (typeof body?.pid === "number" && body.pid !== expectedPid) return false;
|
|
488
|
+
} catch {
|
|
489
|
+
// Non-JSON / unexpected body: not a healthy AFT server we trust.
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if (expectedPid === undefined) await response.body?.cancel();
|
|
494
|
+
return true;
|
|
495
|
+
},
|
|
474
496
|
);
|
|
475
|
-
if (!response.ok) return false;
|
|
476
|
-
// Identity check: the port file records the owning pid and `/health`
|
|
477
|
-
// echoes the live server's pid. If they disagree, the port was recycled
|
|
478
|
-
// by a *different* AFT server (or an unrelated localhost service that
|
|
479
|
-
// happens to answer /health), so this port file is stale — reject it so
|
|
480
|
-
// we don't POST this file's token to the wrong server. Only enforced when
|
|
481
|
-
// both sides expose a pid (older port files omit it).
|
|
482
|
-
if (expectedPid !== undefined) {
|
|
483
|
-
try {
|
|
484
|
-
const body = (await response.json()) as { pid?: unknown };
|
|
485
|
-
if (typeof body?.pid === "number" && body.pid !== expectedPid) return false;
|
|
486
|
-
} catch {
|
|
487
|
-
// Non-JSON / unexpected body: not a healthy AFT server we trust.
|
|
488
|
-
return false;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
return true;
|
|
492
497
|
} catch {
|
|
493
498
|
throwIfAborted(signal);
|
|
494
499
|
return false;
|
|
495
500
|
}
|
|
496
501
|
}
|
|
497
502
|
|
|
498
|
-
private async fetchWithTimeout(
|
|
503
|
+
private async fetchWithTimeout<T>(
|
|
499
504
|
url: string,
|
|
500
505
|
options: RequestInit,
|
|
501
|
-
signal
|
|
502
|
-
|
|
506
|
+
signal: AbortSignal | undefined,
|
|
507
|
+
consume: (response: Response) => Promise<T>,
|
|
508
|
+
): Promise<T> {
|
|
503
509
|
throwIfAborted(signal);
|
|
504
510
|
|
|
505
511
|
const controller = new AbortController();
|
|
@@ -507,7 +513,8 @@ export class AftRpcClient {
|
|
|
507
513
|
const onAbort = () => controller.abort();
|
|
508
514
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
509
515
|
try {
|
|
510
|
-
|
|
516
|
+
const response = await fetch(url, { ...options, signal: controller.signal });
|
|
517
|
+
return await consume(response);
|
|
511
518
|
} finally {
|
|
512
519
|
clearTimeout(timeout);
|
|
513
520
|
signal?.removeEventListener("abort", onAbort);
|
|
@@ -102,12 +102,14 @@ export function pushNotification(
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
const mustKeep = new Set(newestPerSession.values());
|
|
105
|
-
const byNewest = [...queue].sort((a, b) => b.id - a.id);
|
|
106
105
|
const kept: RpcNotification[] = [];
|
|
107
|
-
|
|
106
|
+
// Push assigns monotonic ids and pruning preserves order, so walking backwards is newest-first.
|
|
107
|
+
for (let index = queue.length - 1; index >= 0; index--) {
|
|
108
|
+
const notification = queue[index];
|
|
109
|
+
if (!notification) continue;
|
|
108
110
|
if (kept.length < 50 || mustKeep.has(notification.id)) kept.push(notification);
|
|
109
111
|
}
|
|
110
|
-
queue = kept.
|
|
112
|
+
queue = kept.reverse();
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|