agl 1.0.17 → 21.0.2
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/.smartconfig.json +55 -0
- package/changelog.md +1026 -0
- package/cli.js +14 -0
- package/dist_serve/bundle.js +44778 -0
- package/dist_serve/index.html +13 -0
- package/dist_ts/00_commitinfo_data.d.ts +8 -0
- package/dist_ts/00_commitinfo_data.js +9 -0
- package/dist_ts/classes.authmodels.d.ts +126 -0
- package/dist_ts/classes.authmodels.js +1422 -0
- package/dist_ts/classes.authstore.d.ts +160 -0
- package/dist_ts/classes.authstore.js +2483 -0
- package/dist_ts/classes.browserresourcehost.d.ts +85 -0
- package/dist_ts/classes.browserresourcehost.js +912 -0
- package/dist_ts/classes.cli.d.ts +21 -0
- package/dist_ts/classes.cli.js +1082 -0
- package/dist_ts/classes.config.d.ts +23 -0
- package/dist_ts/classes.config.js +267 -0
- package/dist_ts/classes.controller.d.ts +523 -0
- package/dist_ts/classes.controller.js +10611 -0
- package/dist_ts/classes.controllermanagement.d.ts +32 -0
- package/dist_ts/classes.controllermanagement.js +222 -0
- package/dist_ts/classes.draftmanager.d.ts +30 -0
- package/dist_ts/classes.draftmanager.js +179 -0
- package/dist_ts/classes.embeddeddb.d.ts +30 -0
- package/dist_ts/classes.embeddeddb.js +159 -0
- package/dist_ts/classes.flexframedtransport.d.ts +56 -0
- package/dist_ts/classes.flexframedtransport.js +275 -0
- package/dist_ts/classes.flexmodels.private.d.ts +231 -0
- package/dist_ts/classes.flexmodels.private.js +985 -0
- package/dist_ts/classes.flexmodels.public.d.ts +207 -0
- package/dist_ts/classes.flexmodels.public.js +885 -0
- package/dist_ts/classes.flexprojectionreader.d.ts +89 -0
- package/dist_ts/classes.flexprojectionreader.js +580 -0
- package/dist_ts/classes.flexservice.d.ts +196 -0
- package/dist_ts/classes.flexservice.js +3704 -0
- package/dist_ts/classes.flexstore.d.ts +174 -0
- package/dist_ts/classes.flexstore.js +3400 -0
- package/dist_ts/classes.flexsupervisor.d.ts +105 -0
- package/dist_ts/classes.flexsupervisor.js +1191 -0
- package/dist_ts/classes.gitreversion.d.ts +431 -0
- package/dist_ts/classes.gitreversion.js +10592 -0
- package/dist_ts/classes.harnessoperationmanager.d.ts +113 -0
- package/dist_ts/classes.harnessoperationmanager.js +602 -0
- package/dist_ts/classes.opencodeclient.d.ts +146 -0
- package/dist_ts/classes.opencodeclient.js +3003 -0
- package/dist_ts/classes.opencodesupervisor.d.ts +60 -0
- package/dist_ts/classes.opencodesupervisor.js +1003 -0
- package/dist_ts/classes.passkeymanager.d.ts +34 -0
- package/dist_ts/classes.passkeymanager.js +456 -0
- package/dist_ts/classes.processinspection.d.ts +50 -0
- package/dist_ts/classes.processinspection.js +484 -0
- package/dist_ts/classes.resourcecoordinator.d.ts +64 -0
- package/dist_ts/classes.resourcecoordinator.js +294 -0
- package/dist_ts/classes.sessionintelligencereader.d.ts +13 -0
- package/dist_ts/classes.sessionintelligencereader.js +40 -0
- package/dist_ts/classes.systemmetricssampler.d.ts +53 -0
- package/dist_ts/classes.systemmetricssampler.js +168 -0
- package/dist_ts/classes.terminalmanager.d.ts +95 -0
- package/dist_ts/classes.terminalmanager.js +981 -0
- package/dist_ts/classes.terminalresourcehost.d.ts +20 -0
- package/dist_ts/classes.terminalresourcehost.js +84 -0
- package/dist_ts/classes.upgradecoordinator.d.ts +244 -0
- package/dist_ts/classes.upgradecoordinator.js +2155 -0
- package/dist_ts/classes.upgradetransaction.d.ts +92 -0
- package/dist_ts/classes.upgradetransaction.js +2125 -0
- package/dist_ts/classes.uploadmanager.d.ts +24 -0
- package/dist_ts/classes.uploadmanager.js +210 -0
- package/dist_ts/classes.validation.d.ts +91 -0
- package/dist_ts/classes.validation.js +1087 -0
- package/dist_ts/flexharness.child.d.ts +1 -0
- package/dist_ts/flexharness.child.js +28 -0
- package/dist_ts/functions.canonicaldirectory.d.ts +21 -0
- package/dist_ts/functions.canonicaldirectory.js +144 -0
- package/dist_ts/functions.controllerdataroot.d.ts +15 -0
- package/dist_ts/functions.controllerdataroot.js +76 -0
- package/dist_ts/functions.embeddeddb.d.ts +2 -0
- package/dist_ts/functions.embeddeddb.js +21 -0
- package/dist_ts/functions.flexcredentialstore.d.ts +16 -0
- package/dist_ts/functions.flexcredentialstore.js +93 -0
- package/dist_ts/functions.opencodeauth.d.ts +3 -0
- package/dist_ts/functions.opencodeauth.js +31 -0
- package/dist_ts/functions.runtimeenvironment.d.ts +2 -0
- package/dist_ts/functions.runtimeenvironment.js +79 -0
- package/dist_ts/functions.upgradefollower.d.ts +3 -0
- package/dist_ts/functions.upgradefollower.js +95 -0
- package/dist_ts/index.d.ts +24 -0
- package/dist_ts/index.js +25 -0
- package/dist_ts/interfaces.auth.d.ts +181 -0
- package/dist_ts/interfaces.auth.js +82 -0
- package/dist_ts/interfaces.config.d.ts +34 -0
- package/dist_ts/interfaces.config.js +2 -0
- package/dist_ts/interfaces.flexipc.d.ts +939 -0
- package/dist_ts/interfaces.flexipc.js +1492 -0
- package/dist_ts/interfaces.gitreversion.d.ts +246 -0
- package/dist_ts/interfaces.gitreversion.js +2 -0
- package/dist_ts/interfaces.lifecycle.d.ts +37 -0
- package/dist_ts/interfaces.lifecycle.js +2 -0
- package/dist_ts/interfaces.opencode.d.ts +101 -0
- package/dist_ts/interfaces.opencode.js +3 -0
- package/dist_ts/interfaces.projects.d.ts +156 -0
- package/dist_ts/interfaces.projects.js +5 -0
- package/dist_ts/plugins.d.ts +36 -0
- package/dist_ts/plugins.js +40 -0
- package/dist_ts_interfaces/index.d.ts +2 -0
- package/dist_ts_interfaces/index.js +3 -0
- package/dist_ts_interfaces/interfaces.d.ts +747 -0
- package/dist_ts_interfaces/interfaces.js +47 -0
- package/dist_ts_interfaces/plugins.d.ts +4 -0
- package/dist_ts_interfaces/plugins.js +3 -0
- package/dist_ts_interfaces/requests.d.ts +806 -0
- package/dist_ts_interfaces/requests.js +2 -0
- package/dist_ts_migration/classes.documentmigrationrunner.d.ts +8 -0
- package/dist_ts_migration/classes.documentmigrationrunner.js +24 -0
- package/dist_ts_migration/classes.flexmigrationrunner.d.ts +11 -0
- package/dist_ts_migration/classes.flexmigrationrunner.js +25 -0
- package/dist_ts_migration/classes.flexpostharnessmigrationrunner.d.ts +10 -0
- package/dist_ts_migration/classes.flexpostharnessmigrationrunner.js +15 -0
- package/dist_ts_migration/classes.migrationrunner.d.ts +8 -0
- package/dist_ts_migration/classes.migrationrunner.js +34 -0
- package/dist_ts_migration/index.d.ts +12 -0
- package/dist_ts_migration/index.js +13 -0
- package/dist_ts_migration/v10_flexharnessv3migration.d.ts +11 -0
- package/dist_ts_migration/v10_flexharnessv3migration.js +23 -0
- package/dist_ts_migration/v13_flexprojectionorder.d.ts +11 -0
- package/dist_ts_migration/v13_flexprojectionorder.js +23 -0
- package/dist_ts_migration/v16_flexprovidercredentials.d.ts +22 -0
- package/dist_ts_migration/v16_flexprovidercredentials.js +149 -0
- package/dist_ts_migration/v18_resourcelayout.d.ts +22 -0
- package/dist_ts_migration/v18_resourcelayout.js +23 -0
- package/dist_ts_migration/v18_resourcelayoutmigration.d.ts +6 -0
- package/dist_ts_migration/v18_resourcelayoutmigration.js +61 -0
- package/dist_ts_migration/v19_flexprojectmanagement.d.ts +11 -0
- package/dist_ts_migration/v19_flexprojectmanagement.js +21 -0
- package/dist_ts_migration/v1_embeddeddatabaselocation.d.ts +28 -0
- package/dist_ts_migration/v1_embeddeddatabaselocation.js +415 -0
- package/dist_ts_migration/v22_projectfilesystemidentitymigration.d.ts +7 -0
- package/dist_ts_migration/v22_projectfilesystemidentitymigration.js +105 -0
- package/dist_ts_migration/v2_controllerdataroot.d.ts +130 -0
- package/dist_ts_migration/v2_controllerdataroot.js +1887 -0
- package/dist_ts_migration/v6_protocoldocumentmigration.d.ts +7 -0
- package/dist_ts_migration/v6_protocoldocumentmigration.js +100 -0
- package/dist_ts_migration/v6_protocoldocuments.d.ts +7 -0
- package/dist_ts_migration/v6_protocoldocuments.js +138 -0
- package/html/index.html +13 -0
- package/{LICENSE → license.md} +2 -2
- package/package.json +86 -48
- package/readme.md +480 -0
- package/readme.plan.md +188 -0
- package/ts/00_commitinfo_data.ts +8 -0
- package/ts/classes.authmodels.ts +1245 -0
- package/ts/classes.authstore.ts +3274 -0
- package/ts/classes.browserresourcehost.ts +1205 -0
- package/ts/classes.cli.ts +1254 -0
- package/ts/classes.config.ts +351 -0
- package/ts/classes.controller.ts +14426 -0
- package/ts/classes.controllermanagement.ts +330 -0
- package/ts/classes.draftmanager.ts +232 -0
- package/ts/classes.embeddeddb.ts +166 -0
- package/ts/classes.flexframedtransport.ts +283 -0
- package/ts/classes.flexmodels.private.ts +823 -0
- package/ts/classes.flexmodels.public.ts +732 -0
- package/ts/classes.flexprojectionreader.ts +816 -0
- package/ts/classes.flexservice.ts +4302 -0
- package/ts/classes.flexstore.ts +4565 -0
- package/ts/classes.flexsupervisor.ts +1453 -0
- package/ts/classes.gitreversion.ts +13353 -0
- package/ts/classes.harnessoperationmanager.ts +870 -0
- package/ts/classes.opencodeclient.ts +4110 -0
- package/ts/classes.opencodesupervisor.ts +1280 -0
- package/ts/classes.passkeymanager.ts +570 -0
- package/ts/classes.processinspection.ts +623 -0
- package/ts/classes.resourcecoordinator.ts +436 -0
- package/ts/classes.sessionintelligencereader.ts +52 -0
- package/ts/classes.systemmetricssampler.ts +215 -0
- package/ts/classes.terminalmanager.ts +1207 -0
- package/ts/classes.terminalresourcehost.ts +122 -0
- package/ts/classes.upgradecoordinator.ts +2675 -0
- package/ts/classes.upgradetransaction.ts +2900 -0
- package/ts/classes.uploadmanager.ts +240 -0
- package/ts/classes.validation.ts +1409 -0
- package/ts/flexharness.child.ts +35 -0
- package/ts/functions.canonicaldirectory.ts +213 -0
- package/ts/functions.controllerdataroot.ts +107 -0
- package/ts/functions.embeddeddb.ts +22 -0
- package/ts/functions.flexcredentialstore.ts +128 -0
- package/ts/functions.opencodeauth.ts +34 -0
- package/ts/functions.runtimeenvironment.ts +90 -0
- package/ts/functions.upgradefollower.ts +115 -0
- package/ts/index.ts +36 -6
- package/ts/interfaces.auth.ts +316 -0
- package/ts/interfaces.config.ts +37 -0
- package/ts/interfaces.flexipc.ts +2586 -0
- package/ts/interfaces.gitreversion.ts +336 -0
- package/ts/interfaces.lifecycle.ts +46 -0
- package/ts/interfaces.opencode.ts +153 -0
- package/ts/interfaces.projects.ts +182 -0
- package/ts/plugins.ts +64 -0
- package/ts_interfaces/index.ts +2 -0
- package/ts_interfaces/interfaces.ts +827 -0
- package/ts_interfaces/plugins.ts +15 -0
- package/ts_interfaces/requests.ts +1186 -0
- package/ts_migration/classes.documentmigrationrunner.ts +32 -0
- package/ts_migration/classes.flexmigrationrunner.ts +33 -0
- package/ts_migration/classes.flexpostharnessmigrationrunner.ts +22 -0
- package/ts_migration/classes.migrationrunner.ts +40 -0
- package/ts_migration/index.ts +12 -0
- package/ts_migration/v10_flexharnessv3migration.ts +35 -0
- package/ts_migration/v13_flexprojectionorder.ts +33 -0
- package/ts_migration/v16_flexprovidercredentials.ts +196 -0
- package/ts_migration/v18_resourcelayout.ts +55 -0
- package/ts_migration/v18_resourcelayoutmigration.ts +68 -0
- package/ts_migration/v19_flexprojectmanagement.ts +28 -0
- package/ts_migration/v1_embeddeddatabaselocation.ts +560 -0
- package/ts_migration/v22_projectfilesystemidentitymigration.ts +121 -0
- package/ts_migration/v2_controllerdataroot.ts +2349 -0
- package/ts_migration/v6_protocoldocumentmigration.ts +144 -0
- package/ts_migration/v6_protocoldocuments.ts +198 -0
- package/ts_web/00_commitinfo_data.ts +8 -0
- package/ts_web/classes.controllersocketclient.ts +517 -0
- package/ts_web/classes.sessiondraftsync.ts +390 -0
- package/ts_web/elements.harnesscontrollerapp.ts +11494 -0
- package/ts_web/index.ts +2 -0
- package/ts_web/plugins.ts +31 -0
- package/.gitlab-ci.yml +0 -71
- package/.npmignore +0 -5
- package/README.md +0 -40
- package/dist/cli.js +0 -2
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -9
- package/dist/mod_bundle/index.d.ts +0 -1
- package/dist/mod_bundle/index.js +0 -18
- package/dist/mod_bundle/mod.plugins.d.ts +0 -4
- package/dist/mod_bundle/mod.plugins.js +0 -11
- package/dist/mod_install/index.d.ts +0 -4
- package/dist/mod_install/index.js +0 -21
- package/dist/mod_install/mod.plugins.d.ts +0 -1
- package/dist/mod_install/mod.plugins.js +0 -7
- package/dist/mod_standard/index.d.ts +0 -4
- package/dist/mod_standard/index.js +0 -21
- package/dist/mod_standard/mod.browser.d.ts +0 -6
- package/dist/mod_standard/mod.browser.js +0 -14
- package/dist/mod_standard/mod.clean.d.ts +0 -4
- package/dist/mod_standard/mod.clean.js +0 -12
- package/dist/mod_standard/mod.compile.d.ts +0 -4
- package/dist/mod_standard/mod.compile.js +0 -21
- package/dist/mod_standard/mod.plugins.d.ts +0 -8
- package/dist/mod_standard/mod.plugins.js +0 -19
- package/dist/mod_standard/mod.test.d.ts +0 -4
- package/dist/mod_standard/mod.test.js +0 -12
- package/dist/plr.cli.d.ts +0 -3
- package/dist/plr.cli.js +0 -57
- package/dist/plr.config.d.ts +0 -11
- package/dist/plr.config.js +0 -26
- package/dist/plr.mods.d.ts +0 -17
- package/dist/plr.mods.js +0 -17
- package/dist/plr.paths.d.ts +0 -19
- package/dist/plr.paths.js +0 -26
- package/dist/plr.plugins.d.ts +0 -8
- package/dist/plr.plugins.js +0 -16
- package/npmextra.json +0 -10
- package/ts/mod_bundle/index.ts +0 -20
- package/ts/mod_bundle/mod.plugins.ts +0 -9
- package/ts/mod_install/index.ts +0 -20
- package/ts/mod_install/mod.plugins.ts +0 -1
- package/ts/mod_standard/index.ts +0 -23
- package/ts/mod_standard/mod.browser.ts +0 -17
- package/ts/mod_standard/mod.clean.ts +0 -13
- package/ts/mod_standard/mod.compile.ts +0 -23
- package/ts/mod_standard/mod.plugins.ts +0 -17
- package/ts/mod_standard/mod.test.ts +0 -13
- package/ts/plr.cli.ts +0 -60
- package/ts/plr.config.ts +0 -36
- package/ts/plr.mods.ts +0 -25
- package/ts/plr.paths.ts +0 -29
- package/ts/plr.plugins.ts +0 -17
- package/tslint.json +0 -3
- package/yarn.lock +0 -3464
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
import * as plugins from './plugins.js';
|
|
2
|
+
import { type IControllerProjectFilesystemIdentity } from './interfaces.projects.js';
|
|
3
|
+
type TFlexCreateSessionOptions = plugins.flexharness.IFlexCreateSessionOptions;
|
|
4
|
+
type TFlexMessage = plugins.flexharness.IFlexMessage;
|
|
5
|
+
type TFlexMessagePage = plugins.flexharness.IFlexMessagePage;
|
|
6
|
+
type TFlexPermissionRequest = plugins.flexharness.IFlexPermissionRequest;
|
|
7
|
+
export type TFlexPromptQueueEntry = plugins.flexharness.IFlexPromptQueueEntry;
|
|
8
|
+
type TFlexPromptOptions = plugins.flexharness.IFlexPromptOptions;
|
|
9
|
+
type TFlexSession = plugins.flexharness.IFlexSession;
|
|
10
|
+
type TFlexToolMessagePart = plugins.flexharness.IFlexToolMessagePart;
|
|
11
|
+
type TFlexReasoningMessagePart = Extract<plugins.flexharness.TFlexMessagePart, {
|
|
12
|
+
type: 'reasoning';
|
|
13
|
+
}>;
|
|
14
|
+
type TFlexTextMessagePart = Extract<plugins.flexharness.TFlexMessagePart, {
|
|
15
|
+
type: 'text';
|
|
16
|
+
}>;
|
|
17
|
+
type TFlexUpdateSessionOptions = plugins.flexharness.IFlexUpdateSessionOptions;
|
|
18
|
+
type TFlexPermissionDecision = plugins.flexharness.TFlexPermissionDecision;
|
|
19
|
+
type TFlexPrompt = plugins.flexharness.TFlexPrompt;
|
|
20
|
+
type TFlexProjectManagementRecord = plugins.flexharness.TFlexProjectManagementRecord;
|
|
21
|
+
type TFlexProjectManagementSnapshot = plugins.flexharness.IFlexProjectManagementSnapshot;
|
|
22
|
+
type TFlexProjectManagementTombstone = plugins.flexharness.IFlexProjectManagementTombstone;
|
|
23
|
+
type TFlexProjectManagementWriteContext = plugins.flexharness.IFlexProjectManagementWriteContext;
|
|
24
|
+
type TFlexJsonValue = plugins.flexharness.TJsonValue;
|
|
25
|
+
export type TFlexSlashCommandDescriptor = plugins.flexharness.IFlexSlashCommandDescriptor;
|
|
26
|
+
export type TFlexSessionReversionInfo = plugins.flexharness.IFlexSessionReversionInfo;
|
|
27
|
+
export type TFlexTurnReversionFinalizedOutcome = plugins.flexharness.TFlexTurnReversionFinalizedOutcome;
|
|
28
|
+
export type TFlexTurnReversionCaptureInspectionV2 = plugins.flexharness.TFlexTurnReversionCaptureInspectionV2;
|
|
29
|
+
export type TFlexTurnReversionApplyInspection = plugins.flexharness.IFlexTurnReversionApplyInspection;
|
|
30
|
+
export declare const flexIpcProtocolVersion: 14;
|
|
31
|
+
export declare const flexIpcMaximumFrameBytes: number;
|
|
32
|
+
export declare const flexIpcMaximumPendingRequests = 64;
|
|
33
|
+
export declare const flexIpcMaximumBrowserChannels = 128;
|
|
34
|
+
export declare const flexIpcMaximumBrowserFrameBytes: number;
|
|
35
|
+
export declare const flexIpcMaximumPendingBrowserFrames = 128;
|
|
36
|
+
export declare const flexIpcMaximumPendingBrowserFrameBytes: number;
|
|
37
|
+
export declare const flexIpcMaximumChildJobs = 64;
|
|
38
|
+
export declare const flexIpcMaximumPromptQueueEntries = 128;
|
|
39
|
+
export declare const flexIpcMaximumQueuedSessionChanges = 256;
|
|
40
|
+
export declare const flexIpcMaximumQueuedSessionChangeBytes: number;
|
|
41
|
+
export declare const flexIpcControlTimeoutMs = 35000;
|
|
42
|
+
export declare const flexIpcStartupTimeoutMs = 180000;
|
|
43
|
+
export declare const flexIpcDisposeTimeoutMs = 10000;
|
|
44
|
+
export declare const flexIpcSlashTimeoutMs: number;
|
|
45
|
+
export declare const flexIpcMaximumHostTimeoutMs: number;
|
|
46
|
+
export declare const flexIpcCancellationGraceTimeoutMs = 2000;
|
|
47
|
+
export interface IFlexProjectRecord {
|
|
48
|
+
projectId: string;
|
|
49
|
+
directory: string;
|
|
50
|
+
directoryIdentity?: IControllerProjectFilesystemIdentity;
|
|
51
|
+
}
|
|
52
|
+
export interface IFlexIdentityBoundProjectRecord extends IFlexProjectRecord {
|
|
53
|
+
directoryIdentity: IControllerProjectFilesystemIdentity;
|
|
54
|
+
}
|
|
55
|
+
export interface IFlexDatabaseDescriptor {
|
|
56
|
+
mongoDbUrl: string;
|
|
57
|
+
mongoDbName: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IFlexServiceInit {
|
|
60
|
+
controllerId: string;
|
|
61
|
+
database: IFlexDatabaseDescriptor;
|
|
62
|
+
flexCredentialDirectory: string;
|
|
63
|
+
projects: IFlexProjectRecord[];
|
|
64
|
+
}
|
|
65
|
+
export interface IFlexBrowserResourceDescriptor {
|
|
66
|
+
resourceId: string;
|
|
67
|
+
attachmentRevision: number;
|
|
68
|
+
}
|
|
69
|
+
export interface IFlexBrowserChannelBinding {
|
|
70
|
+
projectId: string;
|
|
71
|
+
browserResourceId: string;
|
|
72
|
+
attachmentAuthorityId: string;
|
|
73
|
+
attachmentRevision: number;
|
|
74
|
+
actorId: string;
|
|
75
|
+
peerId: string;
|
|
76
|
+
role: 'agent';
|
|
77
|
+
source: 'flex';
|
|
78
|
+
scopeId: string;
|
|
79
|
+
channelId: string;
|
|
80
|
+
runId: string;
|
|
81
|
+
sessionId: {
|
|
82
|
+
harnessId: 'flex';
|
|
83
|
+
nativeId: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export interface IFlexIntelligenceSessionId {
|
|
87
|
+
harnessId: 'opencode' | 'flex';
|
|
88
|
+
nativeId: string;
|
|
89
|
+
}
|
|
90
|
+
export interface IFlexIntelligenceChatSummary {
|
|
91
|
+
sessionId: IFlexIntelligenceSessionId;
|
|
92
|
+
title: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
isActive?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface IFlexIntelligenceChatMessage {
|
|
97
|
+
role: string;
|
|
98
|
+
text: string;
|
|
99
|
+
timestamp?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface IFlexIntelligenceChatTranscript {
|
|
102
|
+
sessionId: IFlexIntelligenceSessionId;
|
|
103
|
+
title: string;
|
|
104
|
+
messages: IFlexIntelligenceChatMessage[];
|
|
105
|
+
totalMessages?: number;
|
|
106
|
+
}
|
|
107
|
+
export interface IFlexIntelligenceResult {
|
|
108
|
+
answer: string;
|
|
109
|
+
scratchpad: string;
|
|
110
|
+
model: string;
|
|
111
|
+
}
|
|
112
|
+
export interface IFlexTurnReversionBaseRequest {
|
|
113
|
+
scopeId: string;
|
|
114
|
+
storageKey: string;
|
|
115
|
+
sessionId: string;
|
|
116
|
+
runId: string;
|
|
117
|
+
captureId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface IFlexTurnReversionApplyRequest extends IFlexTurnReversionBaseRequest {
|
|
120
|
+
reference: TFlexJsonValue;
|
|
121
|
+
operationId: string;
|
|
122
|
+
direction: 'undo' | 'redo';
|
|
123
|
+
}
|
|
124
|
+
export interface IFlexTurnReversionReleaseRequest extends IFlexTurnReversionBaseRequest {
|
|
125
|
+
reference: TFlexJsonValue;
|
|
126
|
+
}
|
|
127
|
+
export interface IFlexGitWorktreeDescriptor {
|
|
128
|
+
worktreeId: string;
|
|
129
|
+
projectId: string;
|
|
130
|
+
sessionId: string;
|
|
131
|
+
path: string;
|
|
132
|
+
repositoryId: string;
|
|
133
|
+
createdAt: string;
|
|
134
|
+
}
|
|
135
|
+
export type TFlexIntelligenceJobStatus = 'running' | 'completed' | 'failed' | 'cancelled';
|
|
136
|
+
export interface IFlexHostRequestMap {
|
|
137
|
+
'reversion.prepare': {
|
|
138
|
+
request: IFlexTurnReversionBaseRequest;
|
|
139
|
+
response: {
|
|
140
|
+
prepared: true;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
'reversion.inspect-capture': {
|
|
144
|
+
request: IFlexTurnReversionBaseRequest;
|
|
145
|
+
response: TFlexTurnReversionCaptureInspectionV2;
|
|
146
|
+
};
|
|
147
|
+
'reversion.finalize': {
|
|
148
|
+
request: IFlexTurnReversionBaseRequest;
|
|
149
|
+
response: TFlexTurnReversionFinalizedOutcome;
|
|
150
|
+
};
|
|
151
|
+
'reversion.inspect-apply': {
|
|
152
|
+
request: IFlexTurnReversionApplyRequest;
|
|
153
|
+
response: TFlexTurnReversionApplyInspection;
|
|
154
|
+
};
|
|
155
|
+
'reversion.apply': {
|
|
156
|
+
request: IFlexTurnReversionApplyRequest;
|
|
157
|
+
response: {
|
|
158
|
+
applied: true;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
'reversion.release': {
|
|
162
|
+
request: IFlexTurnReversionReleaseRequest;
|
|
163
|
+
response: {
|
|
164
|
+
released: true;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
'git.worktree.create': {
|
|
168
|
+
request: {
|
|
169
|
+
scopeId: string;
|
|
170
|
+
sessionId: string;
|
|
171
|
+
};
|
|
172
|
+
response: {
|
|
173
|
+
worktree: IFlexGitWorktreeDescriptor;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
'git.worktree.list': {
|
|
177
|
+
request: {
|
|
178
|
+
scopeId: string;
|
|
179
|
+
sessionId: string;
|
|
180
|
+
};
|
|
181
|
+
response: {
|
|
182
|
+
worktrees: IFlexGitWorktreeDescriptor[];
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
'git.worktree.remove': {
|
|
186
|
+
request: {
|
|
187
|
+
scopeId: string;
|
|
188
|
+
sessionId: string;
|
|
189
|
+
worktreeId: string;
|
|
190
|
+
compensate?: true;
|
|
191
|
+
};
|
|
192
|
+
response: {
|
|
193
|
+
removed: true;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
'crossharness.chats.list': {
|
|
197
|
+
request: {
|
|
198
|
+
capabilityToken: string;
|
|
199
|
+
limit: number;
|
|
200
|
+
};
|
|
201
|
+
response: {
|
|
202
|
+
chats: IFlexIntelligenceChatSummary[];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
'crossharness.chat.read': {
|
|
206
|
+
request: {
|
|
207
|
+
capabilityToken: string;
|
|
208
|
+
sessionId: IFlexIntelligenceSessionId;
|
|
209
|
+
limit: number;
|
|
210
|
+
maxChars: number;
|
|
211
|
+
};
|
|
212
|
+
response: {
|
|
213
|
+
transcript: IFlexIntelligenceChatTranscript;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
'project-management.load': {
|
|
217
|
+
request: {
|
|
218
|
+
storageKey: string;
|
|
219
|
+
sessionId: string;
|
|
220
|
+
sessionGenerationId: string;
|
|
221
|
+
sessionGenerationSequence: number;
|
|
222
|
+
};
|
|
223
|
+
response: {
|
|
224
|
+
record: TFlexProjectManagementRecord | null;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
'project-management.save': {
|
|
228
|
+
request: {
|
|
229
|
+
storageKey: string;
|
|
230
|
+
sessionId: string;
|
|
231
|
+
snapshot: TFlexProjectManagementSnapshot;
|
|
232
|
+
expectedRevision: number;
|
|
233
|
+
writeContext: TFlexProjectManagementWriteContext;
|
|
234
|
+
};
|
|
235
|
+
response: TFlexProjectManagementCommitResult;
|
|
236
|
+
};
|
|
237
|
+
'project-management.tombstone': {
|
|
238
|
+
request: {
|
|
239
|
+
storageKey: string;
|
|
240
|
+
sessionId: string;
|
|
241
|
+
tombstone: TFlexProjectManagementTombstone;
|
|
242
|
+
expectedRevision: number;
|
|
243
|
+
};
|
|
244
|
+
response: TFlexProjectManagementCommitResult;
|
|
245
|
+
};
|
|
246
|
+
'project-management.purge': {
|
|
247
|
+
request: {
|
|
248
|
+
storageKey: string;
|
|
249
|
+
};
|
|
250
|
+
response: {
|
|
251
|
+
purged: true;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
'browser.resources.resolve': {
|
|
255
|
+
request: {
|
|
256
|
+
scopeId: string;
|
|
257
|
+
sessionId: string;
|
|
258
|
+
runId: string;
|
|
259
|
+
};
|
|
260
|
+
response: {
|
|
261
|
+
resources: IFlexBrowserResourceDescriptor[];
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
'browser.channel.open': {
|
|
265
|
+
request: {
|
|
266
|
+
scopeId: string;
|
|
267
|
+
sessionId: string;
|
|
268
|
+
runId: string;
|
|
269
|
+
resourceId: string;
|
|
270
|
+
attachmentRevision: number;
|
|
271
|
+
channelId: string;
|
|
272
|
+
};
|
|
273
|
+
response: {
|
|
274
|
+
binding: IFlexBrowserChannelBinding;
|
|
275
|
+
capabilityToken: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
'browser.channel.close': {
|
|
279
|
+
request: {
|
|
280
|
+
channelId: string;
|
|
281
|
+
};
|
|
282
|
+
response: {
|
|
283
|
+
closed: true;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
export type TFlexProjectManagementCommitResult = {
|
|
288
|
+
committed: true;
|
|
289
|
+
} | {
|
|
290
|
+
committed: false;
|
|
291
|
+
actualRevision: number;
|
|
292
|
+
};
|
|
293
|
+
export type TFlexHostRequestMethod = keyof IFlexHostRequestMap;
|
|
294
|
+
export type TFlexHostRequest<TMethod extends TFlexHostRequestMethod> = IFlexHostRequestMap[TMethod]['request'];
|
|
295
|
+
export type TFlexHostResponse<TMethod extends TFlexHostRequestMethod> = IFlexHostRequestMap[TMethod]['response'];
|
|
296
|
+
export type TFlexServiceState = 'starting' | 'ready' | 'unsupported' | 'failed' | 'stopping' | 'stopped';
|
|
297
|
+
export type TFlexServiceStatusCode = 'UNSUPPORTED_RUNTIME' | 'INITIALIZATION_FAILED' | 'SERVICE_STOPPED';
|
|
298
|
+
export interface IFlexServiceStatus {
|
|
299
|
+
state: TFlexServiceState;
|
|
300
|
+
ready: boolean;
|
|
301
|
+
code?: TFlexServiceStatusCode;
|
|
302
|
+
startedAt?: string;
|
|
303
|
+
}
|
|
304
|
+
export type TFlexPublicConnectionState = 'pending' | 'active' | 'deleting' | 'reauthRequired';
|
|
305
|
+
export interface IFlexPublicAccountSummary {
|
|
306
|
+
providerId: string;
|
|
307
|
+
authKind: 'chatgptOAuth';
|
|
308
|
+
accountId?: string;
|
|
309
|
+
email?: string;
|
|
310
|
+
plan?: string;
|
|
311
|
+
}
|
|
312
|
+
export interface IFlexPublicProviderConnection {
|
|
313
|
+
loginId: string;
|
|
314
|
+
providerId: 'openai';
|
|
315
|
+
status: TFlexPublicConnectionState;
|
|
316
|
+
account?: IFlexPublicAccountSummary;
|
|
317
|
+
}
|
|
318
|
+
/** Private child-to-controller projection. It is never exposed by controller RPC. */
|
|
319
|
+
export interface IFlexOpenCodeOAuthAuth {
|
|
320
|
+
type: 'oauth';
|
|
321
|
+
access: string;
|
|
322
|
+
refresh: string;
|
|
323
|
+
expires: number;
|
|
324
|
+
accountId?: string;
|
|
325
|
+
}
|
|
326
|
+
export interface IFlexPublicProviderModel {
|
|
327
|
+
providerId: 'openai';
|
|
328
|
+
modelId: string;
|
|
329
|
+
displayName: string;
|
|
330
|
+
description: string;
|
|
331
|
+
hidden: boolean;
|
|
332
|
+
reasoningEfforts: Array<{
|
|
333
|
+
effort: string;
|
|
334
|
+
description: string;
|
|
335
|
+
}>;
|
|
336
|
+
defaultReasoningEffort: string;
|
|
337
|
+
inputModalities: Array<'text' | 'image' | 'audio'>;
|
|
338
|
+
supportsPersonality: boolean;
|
|
339
|
+
serviceTiers: Array<{
|
|
340
|
+
id: string;
|
|
341
|
+
name: string;
|
|
342
|
+
description: string;
|
|
343
|
+
}>;
|
|
344
|
+
defaultServiceTier?: string;
|
|
345
|
+
isDefault: boolean;
|
|
346
|
+
}
|
|
347
|
+
export interface IFlexPublicProviderRateLimitWindow {
|
|
348
|
+
usedPercent: number;
|
|
349
|
+
limitWindowSeconds: number;
|
|
350
|
+
resetAfterSeconds: number;
|
|
351
|
+
resetsAt: number;
|
|
352
|
+
}
|
|
353
|
+
export interface IFlexPublicProviderRateLimitDetails {
|
|
354
|
+
allowed: boolean;
|
|
355
|
+
limitReached: boolean;
|
|
356
|
+
primaryWindow?: IFlexPublicProviderRateLimitWindow;
|
|
357
|
+
secondaryWindow?: IFlexPublicProviderRateLimitWindow;
|
|
358
|
+
}
|
|
359
|
+
export interface IFlexPublicProviderAdditionalRateLimit {
|
|
360
|
+
limitName: string;
|
|
361
|
+
meteredFeature: string;
|
|
362
|
+
rateLimit?: IFlexPublicProviderRateLimitDetails;
|
|
363
|
+
}
|
|
364
|
+
export interface IFlexPublicProviderAccountRateLimits {
|
|
365
|
+
providerId: 'openai';
|
|
366
|
+
plan: string;
|
|
367
|
+
observedAt: string;
|
|
368
|
+
rateLimit?: IFlexPublicProviderRateLimitDetails;
|
|
369
|
+
additionalRateLimits: IFlexPublicProviderAdditionalRateLimit[];
|
|
370
|
+
rateLimitReachedType?: string;
|
|
371
|
+
rateLimitResetCreditsAvailableCount?: number;
|
|
372
|
+
}
|
|
373
|
+
export interface IFlexModelChoice {
|
|
374
|
+
providerConnectionId: string;
|
|
375
|
+
modelId: string;
|
|
376
|
+
variant?: string;
|
|
377
|
+
}
|
|
378
|
+
export interface IFlexJobAdmission {
|
|
379
|
+
jobId: string;
|
|
380
|
+
}
|
|
381
|
+
export interface IFlexSessionListResult {
|
|
382
|
+
sessions: TFlexSession[];
|
|
383
|
+
total: number;
|
|
384
|
+
truncated: boolean;
|
|
385
|
+
}
|
|
386
|
+
export type TFlexSlashExecutionResult = plugins.flexharness.IFlexSlashCommandNotCommandResult | plugins.flexharness.IFlexSlashCommandMalformedResult | plugins.flexharness.IFlexSlashCommandUnknownResult | plugins.flexharness.IFlexSlashCommandOperationResult | plugins.flexharness.IFlexSlashCommandHandlerResult | {
|
|
387
|
+
type: 'prompt-admission';
|
|
388
|
+
name: string;
|
|
389
|
+
admission: {
|
|
390
|
+
queueId: string;
|
|
391
|
+
runId: string;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
export interface IFlexRequestMap {
|
|
395
|
+
'service.status': {
|
|
396
|
+
request: Record<string, never>;
|
|
397
|
+
response: IFlexServiceStatus;
|
|
398
|
+
};
|
|
399
|
+
'project.replaceAll': {
|
|
400
|
+
request: {
|
|
401
|
+
projects: IFlexProjectRecord[];
|
|
402
|
+
};
|
|
403
|
+
response: {
|
|
404
|
+
replaced: true;
|
|
405
|
+
retired: number;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
'project.register': {
|
|
409
|
+
request: {
|
|
410
|
+
project: IFlexIdentityBoundProjectRecord;
|
|
411
|
+
};
|
|
412
|
+
response: {
|
|
413
|
+
registered: true;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
'project.remove': {
|
|
417
|
+
request: {
|
|
418
|
+
project: IFlexIdentityBoundProjectRecord;
|
|
419
|
+
};
|
|
420
|
+
response: {
|
|
421
|
+
removed: true;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
'intelligence.start': {
|
|
425
|
+
request: {
|
|
426
|
+
scopeId: string;
|
|
427
|
+
sourceSessionId: IFlexIntelligenceSessionId;
|
|
428
|
+
question: string;
|
|
429
|
+
scratchpad: string;
|
|
430
|
+
model: IFlexModelChoice;
|
|
431
|
+
capabilityToken: string;
|
|
432
|
+
};
|
|
433
|
+
response: {
|
|
434
|
+
jobId: string;
|
|
435
|
+
workerSessionId: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
'intelligence.get': {
|
|
439
|
+
request: {
|
|
440
|
+
scopeId: string;
|
|
441
|
+
jobId: string;
|
|
442
|
+
capabilityToken: string;
|
|
443
|
+
};
|
|
444
|
+
response: {
|
|
445
|
+
status: TFlexIntelligenceJobStatus;
|
|
446
|
+
workerSessionId: string;
|
|
447
|
+
result?: IFlexIntelligenceResult;
|
|
448
|
+
error?: string;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
'intelligence.cancel': {
|
|
452
|
+
request: {
|
|
453
|
+
scopeId: string;
|
|
454
|
+
capabilityToken: string;
|
|
455
|
+
};
|
|
456
|
+
response: {
|
|
457
|
+
cancelled: boolean;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
'session.list': {
|
|
461
|
+
request: {
|
|
462
|
+
scopeId: string;
|
|
463
|
+
offset?: number;
|
|
464
|
+
limit?: number;
|
|
465
|
+
};
|
|
466
|
+
response: IFlexSessionListResult;
|
|
467
|
+
};
|
|
468
|
+
'session.create': {
|
|
469
|
+
request: {
|
|
470
|
+
scopeId: string;
|
|
471
|
+
options?: TFlexCreateSessionOptions;
|
|
472
|
+
};
|
|
473
|
+
response: TFlexSession;
|
|
474
|
+
};
|
|
475
|
+
'session.get': {
|
|
476
|
+
request: {
|
|
477
|
+
scopeId: string;
|
|
478
|
+
sessionId: string;
|
|
479
|
+
};
|
|
480
|
+
response: TFlexSession;
|
|
481
|
+
};
|
|
482
|
+
'session.update': {
|
|
483
|
+
request: {
|
|
484
|
+
scopeId: string;
|
|
485
|
+
sessionId: string;
|
|
486
|
+
options: TFlexUpdateSessionOptions;
|
|
487
|
+
};
|
|
488
|
+
response: TFlexSession;
|
|
489
|
+
};
|
|
490
|
+
'session.delete': {
|
|
491
|
+
request: {
|
|
492
|
+
scopeId: string;
|
|
493
|
+
sessionId: string;
|
|
494
|
+
};
|
|
495
|
+
response: {
|
|
496
|
+
deleted: true;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
'session.compact': {
|
|
500
|
+
request: {
|
|
501
|
+
scopeId: string;
|
|
502
|
+
sessionId: string;
|
|
503
|
+
model?: IFlexModelChoice;
|
|
504
|
+
};
|
|
505
|
+
response: {
|
|
506
|
+
compacted: true;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
'session.reversion.info': {
|
|
510
|
+
request: {
|
|
511
|
+
scopeId: string;
|
|
512
|
+
sessionId: string;
|
|
513
|
+
};
|
|
514
|
+
response: TFlexSessionReversionInfo;
|
|
515
|
+
};
|
|
516
|
+
'slash.list': {
|
|
517
|
+
request: {
|
|
518
|
+
scopeId: string;
|
|
519
|
+
sessionId: string;
|
|
520
|
+
};
|
|
521
|
+
response: {
|
|
522
|
+
commands: TFlexSlashCommandDescriptor[];
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
'slash.execute': {
|
|
526
|
+
request: {
|
|
527
|
+
scopeId: string;
|
|
528
|
+
sessionId: string;
|
|
529
|
+
input: string;
|
|
530
|
+
model?: IFlexModelChoice;
|
|
531
|
+
};
|
|
532
|
+
response: TFlexSlashExecutionResult;
|
|
533
|
+
};
|
|
534
|
+
'message.page': {
|
|
535
|
+
request: {
|
|
536
|
+
scopeId: string;
|
|
537
|
+
sessionId: string;
|
|
538
|
+
limit?: number;
|
|
539
|
+
before?: string;
|
|
540
|
+
};
|
|
541
|
+
response: TFlexMessagePage;
|
|
542
|
+
};
|
|
543
|
+
'message.get': {
|
|
544
|
+
request: {
|
|
545
|
+
scopeId: string;
|
|
546
|
+
sessionId: string;
|
|
547
|
+
messageId: string;
|
|
548
|
+
};
|
|
549
|
+
response: TFlexMessage;
|
|
550
|
+
};
|
|
551
|
+
'prompt.start': {
|
|
552
|
+
request: {
|
|
553
|
+
scopeId: string;
|
|
554
|
+
sessionId: string;
|
|
555
|
+
prompt: TFlexPrompt;
|
|
556
|
+
options?: TFlexPromptOptions;
|
|
557
|
+
model?: IFlexModelChoice;
|
|
558
|
+
upload?: {
|
|
559
|
+
operationId: string;
|
|
560
|
+
directory: string;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
response: {
|
|
564
|
+
queueId: string;
|
|
565
|
+
runId: string;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
'prompt.acknowledge': {
|
|
569
|
+
request: {
|
|
570
|
+
scopeId: string;
|
|
571
|
+
sessionId: string;
|
|
572
|
+
queueId: string;
|
|
573
|
+
runId: string;
|
|
574
|
+
};
|
|
575
|
+
response: {
|
|
576
|
+
acknowledged: true;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
'prompt.get': {
|
|
580
|
+
request: {
|
|
581
|
+
scopeId: string;
|
|
582
|
+
sessionId: string;
|
|
583
|
+
queueId: string;
|
|
584
|
+
};
|
|
585
|
+
response: {
|
|
586
|
+
entry: TFlexPromptQueueEntry;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
'prompt.list': {
|
|
590
|
+
request: {
|
|
591
|
+
scopeId: string;
|
|
592
|
+
sessionId: string;
|
|
593
|
+
};
|
|
594
|
+
response: {
|
|
595
|
+
entries: TFlexPromptQueueEntry[];
|
|
596
|
+
};
|
|
597
|
+
};
|
|
598
|
+
'prompt.cancel': {
|
|
599
|
+
request: {
|
|
600
|
+
scopeId: string;
|
|
601
|
+
sessionId: string;
|
|
602
|
+
queueId: string;
|
|
603
|
+
};
|
|
604
|
+
response: {
|
|
605
|
+
accepted: boolean;
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
'permission.list': {
|
|
609
|
+
request: {
|
|
610
|
+
scopeId: string;
|
|
611
|
+
sessionId?: string;
|
|
612
|
+
familyRootSessionId?: string;
|
|
613
|
+
};
|
|
614
|
+
response: {
|
|
615
|
+
permissions: TFlexPermissionRequest[];
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
'permission.respond': {
|
|
619
|
+
request: {
|
|
620
|
+
scopeId: string;
|
|
621
|
+
sessionId: string;
|
|
622
|
+
permissionId: string;
|
|
623
|
+
decision: TFlexPermissionDecision;
|
|
624
|
+
};
|
|
625
|
+
response: {
|
|
626
|
+
accepted: true;
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
'provider.list': {
|
|
630
|
+
request: Record<string, never>;
|
|
631
|
+
response: {
|
|
632
|
+
providers: Array<{
|
|
633
|
+
providerId: 'openai';
|
|
634
|
+
displayName: string;
|
|
635
|
+
loginFlow: 'device';
|
|
636
|
+
}>;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
'provider.login.begin': {
|
|
640
|
+
request: {
|
|
641
|
+
providerId: 'openai';
|
|
642
|
+
};
|
|
643
|
+
response: {
|
|
644
|
+
loginId: string;
|
|
645
|
+
verificationUrl: string;
|
|
646
|
+
userCode: string;
|
|
647
|
+
status: 'pending';
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
'provider.login.status': {
|
|
651
|
+
request: {
|
|
652
|
+
loginId: string;
|
|
653
|
+
};
|
|
654
|
+
response: IFlexPublicProviderConnection;
|
|
655
|
+
};
|
|
656
|
+
'provider.login.cancel': {
|
|
657
|
+
request: {
|
|
658
|
+
loginId: string;
|
|
659
|
+
};
|
|
660
|
+
response: {
|
|
661
|
+
canceled: boolean;
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
'provider.connection.list': {
|
|
665
|
+
request: Record<string, never>;
|
|
666
|
+
response: {
|
|
667
|
+
connections: IFlexPublicProviderConnection[];
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
'provider.connection.opencode-auth.get': {
|
|
671
|
+
request: {
|
|
672
|
+
providerConnectionId: string;
|
|
673
|
+
};
|
|
674
|
+
response: {
|
|
675
|
+
auth: IFlexOpenCodeOAuthAuth;
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
'provider.connection.logout.prepare': {
|
|
679
|
+
request: {
|
|
680
|
+
providerConnectionId: string;
|
|
681
|
+
};
|
|
682
|
+
response: {
|
|
683
|
+
accepted: true;
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
'provider.connection.logout': {
|
|
687
|
+
request: {
|
|
688
|
+
providerConnectionId: string;
|
|
689
|
+
};
|
|
690
|
+
response: {
|
|
691
|
+
accepted: true;
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
'provider.connection.ratelimits.get': {
|
|
695
|
+
request: {
|
|
696
|
+
providerConnectionId: string;
|
|
697
|
+
};
|
|
698
|
+
response: {
|
|
699
|
+
rateLimits: IFlexPublicProviderAccountRateLimits;
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
'provider.models.refresh': {
|
|
703
|
+
request: {
|
|
704
|
+
providerConnectionId: string;
|
|
705
|
+
};
|
|
706
|
+
response: IFlexJobAdmission;
|
|
707
|
+
};
|
|
708
|
+
'model.choice.get': {
|
|
709
|
+
request: {
|
|
710
|
+
scopeId: string;
|
|
711
|
+
};
|
|
712
|
+
response: {
|
|
713
|
+
choice: IFlexModelChoice | null;
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
'model.choice.set': {
|
|
717
|
+
request: {
|
|
718
|
+
scopeId: string;
|
|
719
|
+
choice: IFlexModelChoice;
|
|
720
|
+
};
|
|
721
|
+
response: {
|
|
722
|
+
choice: IFlexModelChoice;
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
'model.choice.validate': {
|
|
726
|
+
request: {
|
|
727
|
+
choice: IFlexModelChoice;
|
|
728
|
+
};
|
|
729
|
+
response: {
|
|
730
|
+
valid: true;
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
export type TFlexRequestMethod = keyof IFlexRequestMap;
|
|
735
|
+
export type TFlexRequest<TMethod extends TFlexRequestMethod> = IFlexRequestMap[TMethod]['request'];
|
|
736
|
+
export type TFlexResponse<TMethod extends TFlexRequestMethod> = IFlexRequestMap[TMethod]['response'];
|
|
737
|
+
export interface IFlexIpcInitMessage {
|
|
738
|
+
version: typeof flexIpcProtocolVersion;
|
|
739
|
+
type: 'init';
|
|
740
|
+
init: IFlexServiceInit;
|
|
741
|
+
}
|
|
742
|
+
export interface IFlexIpcRequestMessage {
|
|
743
|
+
version: typeof flexIpcProtocolVersion;
|
|
744
|
+
type: 'request';
|
|
745
|
+
requestId: string;
|
|
746
|
+
method: TFlexRequestMethod;
|
|
747
|
+
payload: unknown;
|
|
748
|
+
}
|
|
749
|
+
export interface IFlexIpcRequestCancelMessage {
|
|
750
|
+
version: typeof flexIpcProtocolVersion;
|
|
751
|
+
type: 'request.cancel';
|
|
752
|
+
requestId: string;
|
|
753
|
+
}
|
|
754
|
+
export interface IFlexIpcDisposeMessage {
|
|
755
|
+
version: typeof flexIpcProtocolVersion;
|
|
756
|
+
type: 'dispose';
|
|
757
|
+
requestId: string;
|
|
758
|
+
}
|
|
759
|
+
export type TFlexIpcHostResponseMessage = {
|
|
760
|
+
version: typeof flexIpcProtocolVersion;
|
|
761
|
+
type: 'host.response';
|
|
762
|
+
requestId: string;
|
|
763
|
+
} & ({
|
|
764
|
+
ok: true;
|
|
765
|
+
result: unknown;
|
|
766
|
+
} | {
|
|
767
|
+
ok: false;
|
|
768
|
+
error: IFlexServiceError;
|
|
769
|
+
});
|
|
770
|
+
export interface IFlexIpcParentBrowserFrameMessage {
|
|
771
|
+
version: typeof flexIpcProtocolVersion;
|
|
772
|
+
type: 'browser.channel.frame';
|
|
773
|
+
channelId: string;
|
|
774
|
+
dataBase64: string;
|
|
775
|
+
}
|
|
776
|
+
export interface IFlexIpcBrowserChannelClosedMessage {
|
|
777
|
+
version: typeof flexIpcProtocolVersion;
|
|
778
|
+
type: 'browser.channel.closed';
|
|
779
|
+
channelId: string;
|
|
780
|
+
}
|
|
781
|
+
export type TFlexParentMessage = IFlexIpcInitMessage | IFlexIpcRequestMessage | IFlexIpcRequestCancelMessage | IFlexIpcDisposeMessage | TFlexIpcHostResponseMessage | IFlexIpcParentBrowserFrameMessage | IFlexIpcBrowserChannelClosedMessage;
|
|
782
|
+
export type TFlexServiceErrorCode = 'INVALID_REQUEST' | 'NOT_READY' | 'NOT_FOUND' | 'CONFLICT' | 'BUSY' | 'TIMEOUT' | 'ABORTED' | 'OUTCOME_UNKNOWN' | 'SLASH_UNAVAILABLE' | 'LIMIT_EXCEEDED' | 'STALE_RUN' | 'PROVIDER_LOGIN_FAILED' | 'PROVIDER_REAUTH_REQUIRED' | 'MODEL_CATALOG_REQUIRED' | 'UNSUPPORTED_RUNTIME' | 'INTERNAL';
|
|
783
|
+
export declare const flexServiceErrorMessages: Readonly<Record<TFlexServiceErrorCode, string>>;
|
|
784
|
+
export interface IFlexServiceError {
|
|
785
|
+
name: 'FlexServiceError';
|
|
786
|
+
code: TFlexServiceErrorCode;
|
|
787
|
+
message: string;
|
|
788
|
+
}
|
|
789
|
+
export interface IFlexIpcStatusMessage {
|
|
790
|
+
version: typeof flexIpcProtocolVersion;
|
|
791
|
+
type: 'status';
|
|
792
|
+
status: IFlexServiceStatus;
|
|
793
|
+
}
|
|
794
|
+
export type TFlexIpcResponseMessage = {
|
|
795
|
+
version: typeof flexIpcProtocolVersion;
|
|
796
|
+
type: 'response';
|
|
797
|
+
requestId: string;
|
|
798
|
+
} & ({
|
|
799
|
+
ok: true;
|
|
800
|
+
result: unknown;
|
|
801
|
+
} | {
|
|
802
|
+
ok: false;
|
|
803
|
+
error: IFlexServiceError;
|
|
804
|
+
});
|
|
805
|
+
export type TFlexJobKind = 'provider.models';
|
|
806
|
+
export type TFlexChildEvent = {
|
|
807
|
+
type: 'session.history.changed';
|
|
808
|
+
scopeId: string;
|
|
809
|
+
sessionId: string;
|
|
810
|
+
direction: 'undo' | 'redo' | 'branch';
|
|
811
|
+
runId?: string;
|
|
812
|
+
} | {
|
|
813
|
+
type: 'sessions.changed';
|
|
814
|
+
scopeId?: string;
|
|
815
|
+
sessionId?: string;
|
|
816
|
+
coalesced: boolean;
|
|
817
|
+
} | {
|
|
818
|
+
type: 'permissions.changed';
|
|
819
|
+
scopeId: string;
|
|
820
|
+
sessionId: string;
|
|
821
|
+
} | {
|
|
822
|
+
type: 'tool.updated';
|
|
823
|
+
scopeId: string;
|
|
824
|
+
sessionId: string;
|
|
825
|
+
runId: string;
|
|
826
|
+
messageId: string;
|
|
827
|
+
messageIndex: number;
|
|
828
|
+
partIndex: number;
|
|
829
|
+
sequence: number;
|
|
830
|
+
timestamp: string;
|
|
831
|
+
part: TFlexToolMessagePart;
|
|
832
|
+
} | {
|
|
833
|
+
type: 'reasoning.updated';
|
|
834
|
+
scopeId: string;
|
|
835
|
+
sessionId: string;
|
|
836
|
+
runId: string;
|
|
837
|
+
messageId: string;
|
|
838
|
+
messageIndex: number;
|
|
839
|
+
partIndex: number;
|
|
840
|
+
sequence: number;
|
|
841
|
+
timestamp: string;
|
|
842
|
+
part: TFlexReasoningMessagePart;
|
|
843
|
+
} | {
|
|
844
|
+
type: 'text.updated';
|
|
845
|
+
scopeId: string;
|
|
846
|
+
sessionId: string;
|
|
847
|
+
runId: string;
|
|
848
|
+
messageId: string;
|
|
849
|
+
messageIndex: number;
|
|
850
|
+
partIndex: number;
|
|
851
|
+
sequence: number;
|
|
852
|
+
timestamp: string;
|
|
853
|
+
status: 'running' | 'completed';
|
|
854
|
+
part: TFlexTextMessagePart;
|
|
855
|
+
} | {
|
|
856
|
+
type: 'prompt.queued';
|
|
857
|
+
scopeId: string;
|
|
858
|
+
sessionId: string;
|
|
859
|
+
queueId: string;
|
|
860
|
+
runId?: never;
|
|
861
|
+
entry: TFlexPromptQueueEntry;
|
|
862
|
+
} | {
|
|
863
|
+
type: 'prompt.started' | 'prompt.running' | 'prompt.finished';
|
|
864
|
+
scopeId: string;
|
|
865
|
+
sessionId: string;
|
|
866
|
+
queueId: string;
|
|
867
|
+
runId: string;
|
|
868
|
+
entry: TFlexPromptQueueEntry;
|
|
869
|
+
} | {
|
|
870
|
+
type: 'prompt.message-bound';
|
|
871
|
+
scopeId: string;
|
|
872
|
+
sessionId: string;
|
|
873
|
+
queueId: string;
|
|
874
|
+
runId: string;
|
|
875
|
+
messageId: string;
|
|
876
|
+
} | {
|
|
877
|
+
type: 'job.finished';
|
|
878
|
+
jobId: string;
|
|
879
|
+
kind: TFlexJobKind;
|
|
880
|
+
status: 'completed' | 'failed' | 'cancelled';
|
|
881
|
+
models?: IFlexPublicProviderModel[];
|
|
882
|
+
} | {
|
|
883
|
+
type: 'provider.connection.changed';
|
|
884
|
+
connection: IFlexPublicProviderConnection;
|
|
885
|
+
};
|
|
886
|
+
export interface IFlexIpcEventMessage {
|
|
887
|
+
version: typeof flexIpcProtocolVersion;
|
|
888
|
+
type: 'event';
|
|
889
|
+
event: TFlexChildEvent;
|
|
890
|
+
}
|
|
891
|
+
export interface IFlexIpcHostRequestMessage {
|
|
892
|
+
version: typeof flexIpcProtocolVersion;
|
|
893
|
+
type: 'host.request';
|
|
894
|
+
requestId: string;
|
|
895
|
+
method: TFlexHostRequestMethod;
|
|
896
|
+
payload: unknown;
|
|
897
|
+
timeoutMs: number;
|
|
898
|
+
}
|
|
899
|
+
export interface IFlexIpcHostCancelMessage {
|
|
900
|
+
version: typeof flexIpcProtocolVersion;
|
|
901
|
+
type: 'host.cancel';
|
|
902
|
+
requestId: string;
|
|
903
|
+
}
|
|
904
|
+
export interface IFlexIpcHostResponseAcknowledgementMessage {
|
|
905
|
+
version: typeof flexIpcProtocolVersion;
|
|
906
|
+
type: 'host.response.acknowledge';
|
|
907
|
+
requestId: string;
|
|
908
|
+
}
|
|
909
|
+
export interface IFlexIpcChildBrowserFrameMessage {
|
|
910
|
+
version: typeof flexIpcProtocolVersion;
|
|
911
|
+
type: 'browser.channel.frame';
|
|
912
|
+
channelId: string;
|
|
913
|
+
dataBase64: string;
|
|
914
|
+
}
|
|
915
|
+
export type TFlexChildMessage = IFlexIpcStatusMessage | TFlexIpcResponseMessage | IFlexIpcEventMessage | IFlexIpcHostRequestMessage | IFlexIpcHostCancelMessage | IFlexIpcHostResponseAcknowledgementMessage | IFlexIpcChildBrowserFrameMessage;
|
|
916
|
+
export declare const isFlexPlainObject: (valueArg: unknown) => valueArg is Record<string, unknown>;
|
|
917
|
+
export declare const hasFlexExactKeys: (valueArg: Record<string, unknown>, requiredKeysArg: readonly string[], optionalKeysArg?: readonly string[]) => boolean;
|
|
918
|
+
export declare const isFlexProjectRecord: (valueArg: unknown) => valueArg is IFlexProjectRecord;
|
|
919
|
+
export declare const isFlexIdentityBoundProjectRecord: (valueArg: unknown) => valueArg is IFlexIdentityBoundProjectRecord;
|
|
920
|
+
export declare const isFlexDatabaseDescriptor: (valueArg: unknown) => valueArg is IFlexDatabaseDescriptor;
|
|
921
|
+
export declare const isFlexServiceInit: (valueArg: unknown) => valueArg is IFlexServiceInit;
|
|
922
|
+
export declare const isFlexServiceStatus: (valueArg: unknown) => valueArg is IFlexServiceStatus;
|
|
923
|
+
export declare const isFlexPublicProviderConnection: (valueArg: unknown) => valueArg is IFlexPublicProviderConnection;
|
|
924
|
+
export declare const isFlexPublicMessage: (valueArg: unknown) => valueArg is TFlexMessage;
|
|
925
|
+
export declare const isFlexPublicSession: (valueArg: unknown) => valueArg is TFlexSession;
|
|
926
|
+
export declare const isFlexRequestPayload: <TMethod extends TFlexRequestMethod>(methodArg: TMethod, valueArg: unknown) => valueArg is TFlexRequest<TMethod>;
|
|
927
|
+
export declare const isFlexHostRequestPayload: <TMethod extends TFlexHostRequestMethod>(methodArg: TMethod, valueArg: unknown) => valueArg is TFlexHostRequest<TMethod>;
|
|
928
|
+
export declare const isFlexHostResponseResult: <TMethod extends TFlexHostRequestMethod>(methodArg: TMethod, valueArg: unknown) => valueArg is TFlexHostResponse<TMethod>;
|
|
929
|
+
export declare const isFlexResponseResult: <TMethod extends TFlexRequestMethod>(methodArg: TMethod, valueArg: unknown) => valueArg is TFlexResponse<TMethod>;
|
|
930
|
+
export declare const isFlexServiceError: (valueArg: unknown) => valueArg is IFlexServiceError;
|
|
931
|
+
export declare const parseFlexParentMessage: (valueArg: unknown) => TFlexParentMessage;
|
|
932
|
+
export declare const parseFlexChildMessage: (valueArg: unknown) => TFlexChildMessage;
|
|
933
|
+
export declare const createFlexServiceError: (codeArg: TFlexServiceErrorCode) => IFlexServiceError;
|
|
934
|
+
export declare class FlexServiceError extends Error {
|
|
935
|
+
readonly code: TFlexServiceErrorCode;
|
|
936
|
+
readonly name = "FlexServiceError";
|
|
937
|
+
constructor(code: TFlexServiceErrorCode);
|
|
938
|
+
}
|
|
939
|
+
export {};
|