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,336 @@
|
|
|
1
|
+
import type * as plugins from './plugins.js';
|
|
2
|
+
import type { IControllerFilesystemIdentity } from './interfaces.projects.js';
|
|
3
|
+
|
|
4
|
+
export type TGitReversionDirection = 'undo' | 'redo';
|
|
5
|
+
export type TGitReversionSideName = 'before' | 'after';
|
|
6
|
+
export type TGitReversionWalPhase =
|
|
7
|
+
| 'intent'
|
|
8
|
+
| 'preflighted'
|
|
9
|
+
| 'applying'
|
|
10
|
+
| 'targetVerified'
|
|
11
|
+
| 'decision'
|
|
12
|
+
| 'committed'
|
|
13
|
+
| 'compensating'
|
|
14
|
+
| 'compensated'
|
|
15
|
+
| 'fenced';
|
|
16
|
+
export type TGitReversionWorktreeState =
|
|
17
|
+
| 'intent'
|
|
18
|
+
| 'created'
|
|
19
|
+
| 'registered'
|
|
20
|
+
| 'active'
|
|
21
|
+
| 'removing'
|
|
22
|
+
| 'retainedDirty'
|
|
23
|
+
| 'removed'
|
|
24
|
+
| 'fenced';
|
|
25
|
+
export type TGitReversionFaultPoint =
|
|
26
|
+
| 'intent.before-fsync'
|
|
27
|
+
| 'intent.after-fsync'
|
|
28
|
+
| 'intent.before-ref-cas'
|
|
29
|
+
| 'intent.after-ref-cas'
|
|
30
|
+
| 'intent.before-commit-fsync'
|
|
31
|
+
| 'intent.after-commit-fsync'
|
|
32
|
+
| 'intent.before-remove'
|
|
33
|
+
| 'intent.after-remove'
|
|
34
|
+
| 'atomic.after-rename-before-directory-fsync'
|
|
35
|
+
| 'capture.after-before-scan'
|
|
36
|
+
| 'capture.before-finalize-record'
|
|
37
|
+
| 'capture.after-finalize-record-fsync'
|
|
38
|
+
| 'capture.after-staging-repository'
|
|
39
|
+
| 'capture.after-intent-repository'
|
|
40
|
+
| 'capture.after-state-repository'
|
|
41
|
+
| 'capture.after-manifest-repository'
|
|
42
|
+
| 'capture.before-store-create'
|
|
43
|
+
| 'capture.after-store-create'
|
|
44
|
+
| 'capture.before-generation-enrollment'
|
|
45
|
+
| 'capture.after-generation-enrollment'
|
|
46
|
+
| 'capture.after-publication-fsync'
|
|
47
|
+
| 'capture.before-root-delete'
|
|
48
|
+
| 'capture.after-root-delete'
|
|
49
|
+
| 'capture.after-root-delete-fsync'
|
|
50
|
+
| 'apply.after-intent'
|
|
51
|
+
| 'apply.after-preflight'
|
|
52
|
+
| 'apply.after-source-pack-import'
|
|
53
|
+
| 'apply.after-source-pack-fsync'
|
|
54
|
+
| 'apply.after-repository'
|
|
55
|
+
| 'apply.after-target-verification'
|
|
56
|
+
| 'apply.after-decision-repository'
|
|
57
|
+
| 'apply.after-decision'
|
|
58
|
+
| 'apply.after-state-repository'
|
|
59
|
+
| 'apply.during-compensation'
|
|
60
|
+
| 'apply.before-source-keep-remove'
|
|
61
|
+
| 'apply.after-source-keep-quarantine'
|
|
62
|
+
| 'apply.after-source-keep-remove'
|
|
63
|
+
| 'apply.after-source-keep-remove-fsync'
|
|
64
|
+
| 'worktree.after-intent'
|
|
65
|
+
| 'worktree.after-create'
|
|
66
|
+
| 'worktree.after-removed-record'
|
|
67
|
+
| 'worktree.record-read.after-open'
|
|
68
|
+
| 'index.before-sidecar-fsync'
|
|
69
|
+
| 'index.after-sidecar-fsync'
|
|
70
|
+
| 'index.after-link'
|
|
71
|
+
| 'index.after-link-fsync'
|
|
72
|
+
| 'index.after-rename'
|
|
73
|
+
| 'index.after-rename-fsync'
|
|
74
|
+
| 'index.after-cleanup'
|
|
75
|
+
| 'index.after-cleanup-fsync';
|
|
76
|
+
|
|
77
|
+
export type TGitReversionReference = {
|
|
78
|
+
schemaVersion: 1;
|
|
79
|
+
captureKey: string;
|
|
80
|
+
manifestId: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type TGitReversionFinalizedOutcome =
|
|
84
|
+
plugins.flexharness.TFlexTurnReversionFinalizedOutcome;
|
|
85
|
+
export type TGitReversionCaptureInspection =
|
|
86
|
+
plugins.flexharness.TFlexTurnReversionCaptureInspectionV2;
|
|
87
|
+
export type TGitReversionApplyInspection =
|
|
88
|
+
plugins.flexharness.IFlexTurnReversionApplyInspection;
|
|
89
|
+
|
|
90
|
+
export interface IGitReversionIdentity {
|
|
91
|
+
projectId: string;
|
|
92
|
+
sessionId: string;
|
|
93
|
+
runId: string;
|
|
94
|
+
captureId: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface IGitReversionCaptureRequest extends IGitReversionIdentity {
|
|
98
|
+
signal?: AbortSignal;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IGitReversionApplyRequest {
|
|
102
|
+
identity: IGitReversionIdentity;
|
|
103
|
+
reference: TGitReversionReference;
|
|
104
|
+
operationId: string;
|
|
105
|
+
direction: TGitReversionDirection;
|
|
106
|
+
signal?: AbortSignal;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface IGitReversionReleaseRequest {
|
|
110
|
+
identity: IGitReversionIdentity;
|
|
111
|
+
reference: TGitReversionReference;
|
|
112
|
+
signal?: AbortSignal;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface IGitReversionMetadataRequest {
|
|
116
|
+
identity: IGitReversionIdentity;
|
|
117
|
+
reference: TGitReversionReference;
|
|
118
|
+
signal?: AbortSignal;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface IGitReversionWorktreeRequest {
|
|
122
|
+
projectId: string;
|
|
123
|
+
sessionId: string;
|
|
124
|
+
signal?: AbortSignal;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface IGitReversionWorktreeRemoveRequest extends IGitReversionWorktreeRequest {
|
|
128
|
+
worktreeId: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface IGitReversionLimits {
|
|
132
|
+
maximumProjects: number;
|
|
133
|
+
maximumRepositories: number;
|
|
134
|
+
maximumScannedDirectories: number;
|
|
135
|
+
maximumScanDepth: number;
|
|
136
|
+
maximumPaths: number;
|
|
137
|
+
maximumPathBytes: number;
|
|
138
|
+
maximumMetadataBytes: number;
|
|
139
|
+
maximumPrivateRefs: number;
|
|
140
|
+
maximumPrivateMetadataAggregateBytes: number;
|
|
141
|
+
maximumIntentFiles: number;
|
|
142
|
+
maximumIntentEntries: number;
|
|
143
|
+
maximumIntentFileBytes: number;
|
|
144
|
+
maximumIntentAggregateBytes: number;
|
|
145
|
+
maximumScavengeEntries: number;
|
|
146
|
+
maximumIgnorePolicyFiles: number;
|
|
147
|
+
maximumIgnorePolicyBytes: number;
|
|
148
|
+
maximumWorktrees: number;
|
|
149
|
+
maximumCaptureRecords: number;
|
|
150
|
+
maximumCaptureRecordBytes: number;
|
|
151
|
+
maximumCaptureAggregateBytes: number;
|
|
152
|
+
maximumCaptures: number;
|
|
153
|
+
maximumGenerationsPerCapture: number;
|
|
154
|
+
maximumGenerationBytes: number;
|
|
155
|
+
maximumGenerationObjects: number;
|
|
156
|
+
maximumCaptureStoreBytes: number;
|
|
157
|
+
maximumCaptureStoreObjects: number;
|
|
158
|
+
maximumControllerStoreBytes: number;
|
|
159
|
+
maximumControllerStoreObjects: number;
|
|
160
|
+
maximumControllerGenerations: number;
|
|
161
|
+
maximumMetadataRecordsPerCapture: number;
|
|
162
|
+
maximumMetadataRecordBytes: number;
|
|
163
|
+
maximumMetadataAggregateBytes: number;
|
|
164
|
+
maximumLifecycleEntries: number;
|
|
165
|
+
maximumLifecycleRecordBytes: number;
|
|
166
|
+
maximumLifecycleAggregateBytes: number;
|
|
167
|
+
maximumPrivateRefsPerCapture: number;
|
|
168
|
+
commandTimeoutMs: number;
|
|
169
|
+
worktreeCommandTimeoutMs: number;
|
|
170
|
+
maximumCommandOutputBytes: number;
|
|
171
|
+
maximumConcurrentGitCommands: number;
|
|
172
|
+
maximumQueuedGitCommands: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface IGitReversionFaultContext {
|
|
176
|
+
point: TGitReversionFaultPoint;
|
|
177
|
+
captureKey?: string;
|
|
178
|
+
operationId?: string;
|
|
179
|
+
repositoryId?: string;
|
|
180
|
+
worktreeId?: string;
|
|
181
|
+
intentId?: string;
|
|
182
|
+
ref?: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface IGitReversionOptions {
|
|
186
|
+
ownerId: string;
|
|
187
|
+
/** This path must be exclusively owned by one live controller process. */
|
|
188
|
+
temporaryRoot?: string;
|
|
189
|
+
limits?: Partial<IGitReversionLimits>;
|
|
190
|
+
testOnlyFaultInjector?: (
|
|
191
|
+
context: IGitReversionFaultContext,
|
|
192
|
+
) => Promise<void> | void;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface IGitReversionRepositoryIdentity {
|
|
196
|
+
scope: 'project' | 'owned-worktree';
|
|
197
|
+
repositoryId: string;
|
|
198
|
+
commonId: string;
|
|
199
|
+
objectFormat: 'sha1' | 'sha256';
|
|
200
|
+
root: string;
|
|
201
|
+
rootIdentity: IControllerFilesystemIdentity;
|
|
202
|
+
gitEntryPath: string;
|
|
203
|
+
gitEntryIdentity: IControllerFilesystemIdentity;
|
|
204
|
+
gitDir: string;
|
|
205
|
+
gitDirIdentity: IControllerFilesystemIdentity;
|
|
206
|
+
commonDir: string;
|
|
207
|
+
commonDirIdentity: IControllerFilesystemIdentity;
|
|
208
|
+
objectDir: string;
|
|
209
|
+
objectDirIdentity: IControllerFilesystemIdentity;
|
|
210
|
+
indexPath: string;
|
|
211
|
+
indexParentIdentity: IControllerFilesystemIdentity;
|
|
212
|
+
label: string;
|
|
213
|
+
excludedRepositoryPaths: string[];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface IGitReversionSide {
|
|
217
|
+
objectGenerationId?: string;
|
|
218
|
+
worktreeTree: string;
|
|
219
|
+
indexTree: string;
|
|
220
|
+
headOid: string;
|
|
221
|
+
headRef: string | null;
|
|
222
|
+
refs: Record<string, string>;
|
|
223
|
+
symbolicRefs: Record<string, string>;
|
|
224
|
+
topologyHash: string;
|
|
225
|
+
ignorePolicyHash: string;
|
|
226
|
+
operationHash: string;
|
|
227
|
+
unsupportedReason?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface IGitReversionRepositoryCapture {
|
|
231
|
+
repository: IGitReversionRepositoryIdentity;
|
|
232
|
+
before: IGitReversionSide;
|
|
233
|
+
after?: IGitReversionSide;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface IGitReversionManifest {
|
|
237
|
+
schemaVersion: 1;
|
|
238
|
+
kind: 'manifest';
|
|
239
|
+
ownerKey: string;
|
|
240
|
+
captureKey: string;
|
|
241
|
+
identity: IGitReversionIdentity;
|
|
242
|
+
projectDirectory: string;
|
|
243
|
+
projectIdentity: IControllerFilesystemIdentity;
|
|
244
|
+
phase: 'prepared' | 'finalized';
|
|
245
|
+
repositories: IGitReversionRepositoryCapture[];
|
|
246
|
+
reasonCode?: string;
|
|
247
|
+
affectedWorkspaces: Array<{ id: string; label: string }>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface IGitReversionCaptureState {
|
|
251
|
+
schemaVersion: 1;
|
|
252
|
+
kind: 'capture-state';
|
|
253
|
+
captureKey: string;
|
|
254
|
+
manifestId: string;
|
|
255
|
+
currentSide: TGitReversionSideName;
|
|
256
|
+
revision: number;
|
|
257
|
+
outcome: TGitReversionFinalizedOutcome;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface IGitReversionSourcePack {
|
|
261
|
+
generationId: string;
|
|
262
|
+
packHash: string;
|
|
263
|
+
packBytes: number;
|
|
264
|
+
objectCount: number;
|
|
265
|
+
syntheticRootOid: string;
|
|
266
|
+
keepToken: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface IGitReversionApplyPlan {
|
|
270
|
+
captureKey: string;
|
|
271
|
+
repository: IGitReversionRepositoryIdentity;
|
|
272
|
+
initial: IGitReversionSide;
|
|
273
|
+
source: IGitReversionSide;
|
|
274
|
+
target: IGitReversionSide;
|
|
275
|
+
desiredWorktreeTree: string;
|
|
276
|
+
desiredIndexTree: string;
|
|
277
|
+
scopedRefs: string[];
|
|
278
|
+
sourcePack: IGitReversionSourcePack;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface IGitReversionApplyWal {
|
|
282
|
+
schemaVersion: 1;
|
|
283
|
+
kind: 'apply-wal';
|
|
284
|
+
captureKey: string;
|
|
285
|
+
manifestId: string;
|
|
286
|
+
operationId: string;
|
|
287
|
+
operationKey: string;
|
|
288
|
+
direction: TGitReversionDirection;
|
|
289
|
+
attempt: number;
|
|
290
|
+
sourceSide: TGitReversionSideName;
|
|
291
|
+
targetSide: TGitReversionSideName;
|
|
292
|
+
sourceRevision: number;
|
|
293
|
+
phase: TGitReversionWalPhase;
|
|
294
|
+
decision?: 'source' | 'target';
|
|
295
|
+
touchedRepositoryIds: string[];
|
|
296
|
+
plans: IGitReversionApplyPlan[];
|
|
297
|
+
generationIds: Record<string, string[]>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface IGitReversionWorktreeDescriptor {
|
|
301
|
+
worktreeId: string;
|
|
302
|
+
projectId: string;
|
|
303
|
+
sessionId: string;
|
|
304
|
+
path: string;
|
|
305
|
+
repositoryId: string;
|
|
306
|
+
createdAt: string;
|
|
307
|
+
state: Exclude<TGitReversionWorktreeState, 'intent' | 'created' | 'registered' | 'removed'>;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface IGitReversionWorktreeRecord {
|
|
311
|
+
schemaVersion: 1;
|
|
312
|
+
kind: 'worktree';
|
|
313
|
+
ownerKey: string;
|
|
314
|
+
worktreeId: string;
|
|
315
|
+
projectId: string;
|
|
316
|
+
sessionId: string;
|
|
317
|
+
path: string;
|
|
318
|
+
parentPath: string;
|
|
319
|
+
parentIdentity: IControllerFilesystemIdentity;
|
|
320
|
+
pathIdentity?: IControllerFilesystemIdentity;
|
|
321
|
+
sourceRoot: string;
|
|
322
|
+
sourceCommonDir: string;
|
|
323
|
+
sourceRepository: IGitReversionRepositoryIdentity;
|
|
324
|
+
repositoryId: string;
|
|
325
|
+
createdAt: string;
|
|
326
|
+
state: TGitReversionWorktreeState;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface IGitReversionMetadata {
|
|
330
|
+
reference: TGitReversionReference;
|
|
331
|
+
disposition: TGitReversionFinalizedOutcome['disposition'];
|
|
332
|
+
currentSide: TGitReversionSideName;
|
|
333
|
+
revision: number;
|
|
334
|
+
affectedWorkspaces: Array<{ id: string; label: string }>;
|
|
335
|
+
reasonCode?: string;
|
|
336
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IControllerStatus, TControllerProcessMode } from '../ts_interfaces/index.js';
|
|
2
|
+
import type { IControllerRuntimeOverrides } from './interfaces.config.js';
|
|
3
|
+
|
|
4
|
+
export interface IControllerStartOptions {
|
|
5
|
+
processMode: TControllerProcessMode;
|
|
6
|
+
runtimeOverrides: IControllerRuntimeOverrides;
|
|
7
|
+
/** Operator-provided first-start setup code; a random code is minted when absent. */
|
|
8
|
+
setupCode?: string;
|
|
9
|
+
/** Private upgrade transaction token received over parent IPC. */
|
|
10
|
+
upgradeToken?: string;
|
|
11
|
+
upgradeGlobalRoot?: string;
|
|
12
|
+
onStartupBlocked?: (errorArg: Error) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IControllerStartResult {
|
|
16
|
+
status: IControllerStatus;
|
|
17
|
+
publicUrl: string;
|
|
18
|
+
setupCode?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IControllerReadyIpcMessage {
|
|
22
|
+
type: 'ready';
|
|
23
|
+
status: IControllerStatus;
|
|
24
|
+
publicUrl: string;
|
|
25
|
+
setupCode?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IControllerStartupErrorIpcMessage {
|
|
29
|
+
type: 'startupError';
|
|
30
|
+
message: string;
|
|
31
|
+
retained?: true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IControllerStartIpcMessage {
|
|
35
|
+
type: 'start';
|
|
36
|
+
/** Transported over IPC so the code never appears in the detached child's argv. */
|
|
37
|
+
setupCode?: string;
|
|
38
|
+
/** Transported over IPC so the token never appears in the detached child's argv. */
|
|
39
|
+
upgradeToken?: string;
|
|
40
|
+
upgradeGlobalRoot?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type TControllerIpcMessage =
|
|
44
|
+
| IControllerReadyIpcMessage
|
|
45
|
+
| IControllerStartupErrorIpcMessage
|
|
46
|
+
| IControllerStartIpcMessage;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type * as plugins from './plugins.js';
|
|
2
|
+
import type {
|
|
3
|
+
IControllerEvent,
|
|
4
|
+
IControllerMessage,
|
|
5
|
+
IControllerReasoningUpdate,
|
|
6
|
+
IControllerRuntimeId,
|
|
7
|
+
IControllerTextUpdate,
|
|
8
|
+
IControllerToolExecution,
|
|
9
|
+
TControllerHarnessLifecycleState,
|
|
10
|
+
} from '../ts_interfaces/index.js';
|
|
11
|
+
|
|
12
|
+
export const openCodeExpectedVersion = '1.18.15' as const;
|
|
13
|
+
export const openCodeUsername = 'harness-controller' as const;
|
|
14
|
+
|
|
15
|
+
export interface IOpenCodeHealth {
|
|
16
|
+
healthy: true;
|
|
17
|
+
version: typeof openCodeExpectedVersion;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IOpenCodeLogEntry {
|
|
21
|
+
timestamp: number;
|
|
22
|
+
stream: 'stdout' | 'stderr';
|
|
23
|
+
line: string;
|
|
24
|
+
truncated: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IOpenCodeSupervisorStatus {
|
|
28
|
+
state: TControllerHarnessLifecycleState;
|
|
29
|
+
healthy: boolean;
|
|
30
|
+
pid?: number;
|
|
31
|
+
version?: string;
|
|
32
|
+
startedAt?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IOpenCodeConnectionConfig {
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
directory: string;
|
|
38
|
+
username: typeof openCodeUsername;
|
|
39
|
+
password: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IOpenCodeProcessGroupController {
|
|
43
|
+
isAlive(processGroupIdArg: number): boolean | Promise<boolean>;
|
|
44
|
+
signal(
|
|
45
|
+
processGroupIdArg: number,
|
|
46
|
+
signalArg: 'SIGTERM' | 'SIGKILL',
|
|
47
|
+
): void | Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface IOpenCodeSupervisorOptions {
|
|
51
|
+
directory: string;
|
|
52
|
+
port: number;
|
|
53
|
+
startupTimeoutMs?: number;
|
|
54
|
+
healthRequestTimeoutMs?: number;
|
|
55
|
+
healthPollIntervalMs?: number;
|
|
56
|
+
stopTimeoutMs?: number;
|
|
57
|
+
finalStopTimeoutMs?: number;
|
|
58
|
+
logEntryLimit?: number;
|
|
59
|
+
logLineByteLimit?: number;
|
|
60
|
+
spawnFactory?: typeof plugins.childProcess.spawn;
|
|
61
|
+
fetchImplementation?: typeof globalThis.fetch;
|
|
62
|
+
listenerOwnershipVerifier?: (
|
|
63
|
+
processId: number,
|
|
64
|
+
port: number
|
|
65
|
+
) => boolean | Promise<boolean>;
|
|
66
|
+
processGroupController?: IOpenCodeProcessGroupController;
|
|
67
|
+
/** Called after the owned child exits and can no longer access operation resources. */
|
|
68
|
+
onChildExit?: () => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type TOpenCodeSdkClient = ReturnType<typeof plugins.opencodeSdk.createOpencodeClient>;
|
|
72
|
+
|
|
73
|
+
export interface IOpenCodeClientOptions extends IOpenCodeConnectionConfig {
|
|
74
|
+
clientFactory?: typeof plugins.opencodeSdk.createOpencodeClient;
|
|
75
|
+
fetchImplementation?: typeof globalThis.fetch;
|
|
76
|
+
/** Current-generation lease held until each non-streaming SDK response body settles. */
|
|
77
|
+
acquireRuntimeLease?: () => () => void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Adapter-internal normalized entries derived from one OpenCode source message. */
|
|
81
|
+
export interface IOpenCodeNormalizedMessageBundle {
|
|
82
|
+
sourceMessageId: IControllerRuntimeId;
|
|
83
|
+
structuralDigest: string;
|
|
84
|
+
sourceRole: 'user' | 'assistant';
|
|
85
|
+
parentMessageId?: IControllerRuntimeId;
|
|
86
|
+
terminal: boolean;
|
|
87
|
+
messages: IControllerMessage[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IOpenCodeMessageLifecycle {
|
|
91
|
+
sessionId: IControllerRuntimeId;
|
|
92
|
+
messageId: IControllerRuntimeId;
|
|
93
|
+
role: 'user' | 'assistant';
|
|
94
|
+
parentMessageId?: IControllerRuntimeId;
|
|
95
|
+
terminal: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Adapter-internal page shape; cursors remain opaque OpenCode values. */
|
|
99
|
+
export interface IOpenCodeMessagePage {
|
|
100
|
+
bundles: IOpenCodeNormalizedMessageBundle[];
|
|
101
|
+
nextCursor?: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type TOpenCodeToolExecution = Omit<
|
|
105
|
+
IControllerToolExecution,
|
|
106
|
+
'revision' | 'streamEpoch'
|
|
107
|
+
>;
|
|
108
|
+
|
|
109
|
+
export type TOpenCodeReasoningUpdate = Omit<
|
|
110
|
+
IControllerReasoningUpdate,
|
|
111
|
+
'order' | 'revision' | 'streamEpoch'
|
|
112
|
+
>;
|
|
113
|
+
|
|
114
|
+
export type TOpenCodeTextUpdate = Omit<
|
|
115
|
+
IControllerTextUpdate,
|
|
116
|
+
'order' | 'revision' | 'streamEpoch'
|
|
117
|
+
>;
|
|
118
|
+
|
|
119
|
+
export interface IOpenCodeEventStreamOptions {
|
|
120
|
+
/** directory is the raw project worktree the event belongs to. */
|
|
121
|
+
onEvent: (event: IControllerEvent, directory: string) => void | Promise<void>;
|
|
122
|
+
/** Replace-only tool snapshot; the controller assigns delivery ordering. */
|
|
123
|
+
onToolExecution?: (
|
|
124
|
+
execution: TOpenCodeToolExecution,
|
|
125
|
+
directory: string,
|
|
126
|
+
timestamp: number,
|
|
127
|
+
) => void | Promise<void>;
|
|
128
|
+
/** Replace-only Assistant reasoning snapshot; the controller assigns ordering. */
|
|
129
|
+
onReasoningUpdate?: (
|
|
130
|
+
update: TOpenCodeReasoningUpdate,
|
|
131
|
+
directory: string,
|
|
132
|
+
) => void | Promise<void>;
|
|
133
|
+
/** Replace-only Assistant text snapshot; the controller assigns ordering. */
|
|
134
|
+
onTextUpdate?: (
|
|
135
|
+
update: TOpenCodeTextUpdate,
|
|
136
|
+
directory: string,
|
|
137
|
+
) => void | Promise<void>;
|
|
138
|
+
/** Exact source-message lifecycle used for controller-owned resource cleanup. */
|
|
139
|
+
onMessageLifecycle?: (
|
|
140
|
+
lifecycle: IOpenCodeMessageLifecycle,
|
|
141
|
+
directory: string,
|
|
142
|
+
) => void | Promise<void>;
|
|
143
|
+
/** Fires in stream order for the initial connection and every SDK reconnect. */
|
|
144
|
+
onConnected?: () => void | Promise<void>;
|
|
145
|
+
/** Signals that live snapshots may have been lost or could not be normalized. */
|
|
146
|
+
onToolStreamGap?: () => void | Promise<void>;
|
|
147
|
+
/** Signals that live Assistant snapshots may have been lost or could not be normalized. */
|
|
148
|
+
onMessageStreamGap?: () => void | Promise<void>;
|
|
149
|
+
/** Signals that the shared SDK stream ended and both snapshot streams were lost. */
|
|
150
|
+
onStreamGap?: () => void | Promise<void>;
|
|
151
|
+
onError?: (error: Error) => void;
|
|
152
|
+
signal?: AbortSignal;
|
|
153
|
+
}
|