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.
Files changed (277) hide show
  1. package/.smartconfig.json +55 -0
  2. package/changelog.md +1026 -0
  3. package/cli.js +14 -0
  4. package/dist_serve/bundle.js +44778 -0
  5. package/dist_serve/index.html +13 -0
  6. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  7. package/dist_ts/00_commitinfo_data.js +9 -0
  8. package/dist_ts/classes.authmodels.d.ts +126 -0
  9. package/dist_ts/classes.authmodels.js +1422 -0
  10. package/dist_ts/classes.authstore.d.ts +160 -0
  11. package/dist_ts/classes.authstore.js +2483 -0
  12. package/dist_ts/classes.browserresourcehost.d.ts +85 -0
  13. package/dist_ts/classes.browserresourcehost.js +912 -0
  14. package/dist_ts/classes.cli.d.ts +21 -0
  15. package/dist_ts/classes.cli.js +1082 -0
  16. package/dist_ts/classes.config.d.ts +23 -0
  17. package/dist_ts/classes.config.js +267 -0
  18. package/dist_ts/classes.controller.d.ts +523 -0
  19. package/dist_ts/classes.controller.js +10611 -0
  20. package/dist_ts/classes.controllermanagement.d.ts +32 -0
  21. package/dist_ts/classes.controllermanagement.js +222 -0
  22. package/dist_ts/classes.draftmanager.d.ts +30 -0
  23. package/dist_ts/classes.draftmanager.js +179 -0
  24. package/dist_ts/classes.embeddeddb.d.ts +30 -0
  25. package/dist_ts/classes.embeddeddb.js +159 -0
  26. package/dist_ts/classes.flexframedtransport.d.ts +56 -0
  27. package/dist_ts/classes.flexframedtransport.js +275 -0
  28. package/dist_ts/classes.flexmodels.private.d.ts +231 -0
  29. package/dist_ts/classes.flexmodels.private.js +985 -0
  30. package/dist_ts/classes.flexmodels.public.d.ts +207 -0
  31. package/dist_ts/classes.flexmodels.public.js +885 -0
  32. package/dist_ts/classes.flexprojectionreader.d.ts +89 -0
  33. package/dist_ts/classes.flexprojectionreader.js +580 -0
  34. package/dist_ts/classes.flexservice.d.ts +196 -0
  35. package/dist_ts/classes.flexservice.js +3704 -0
  36. package/dist_ts/classes.flexstore.d.ts +174 -0
  37. package/dist_ts/classes.flexstore.js +3400 -0
  38. package/dist_ts/classes.flexsupervisor.d.ts +105 -0
  39. package/dist_ts/classes.flexsupervisor.js +1191 -0
  40. package/dist_ts/classes.gitreversion.d.ts +431 -0
  41. package/dist_ts/classes.gitreversion.js +10592 -0
  42. package/dist_ts/classes.harnessoperationmanager.d.ts +113 -0
  43. package/dist_ts/classes.harnessoperationmanager.js +602 -0
  44. package/dist_ts/classes.opencodeclient.d.ts +146 -0
  45. package/dist_ts/classes.opencodeclient.js +3003 -0
  46. package/dist_ts/classes.opencodesupervisor.d.ts +60 -0
  47. package/dist_ts/classes.opencodesupervisor.js +1003 -0
  48. package/dist_ts/classes.passkeymanager.d.ts +34 -0
  49. package/dist_ts/classes.passkeymanager.js +456 -0
  50. package/dist_ts/classes.processinspection.d.ts +50 -0
  51. package/dist_ts/classes.processinspection.js +484 -0
  52. package/dist_ts/classes.resourcecoordinator.d.ts +64 -0
  53. package/dist_ts/classes.resourcecoordinator.js +294 -0
  54. package/dist_ts/classes.sessionintelligencereader.d.ts +13 -0
  55. package/dist_ts/classes.sessionintelligencereader.js +40 -0
  56. package/dist_ts/classes.systemmetricssampler.d.ts +53 -0
  57. package/dist_ts/classes.systemmetricssampler.js +168 -0
  58. package/dist_ts/classes.terminalmanager.d.ts +95 -0
  59. package/dist_ts/classes.terminalmanager.js +981 -0
  60. package/dist_ts/classes.terminalresourcehost.d.ts +20 -0
  61. package/dist_ts/classes.terminalresourcehost.js +84 -0
  62. package/dist_ts/classes.upgradecoordinator.d.ts +244 -0
  63. package/dist_ts/classes.upgradecoordinator.js +2155 -0
  64. package/dist_ts/classes.upgradetransaction.d.ts +92 -0
  65. package/dist_ts/classes.upgradetransaction.js +2125 -0
  66. package/dist_ts/classes.uploadmanager.d.ts +24 -0
  67. package/dist_ts/classes.uploadmanager.js +210 -0
  68. package/dist_ts/classes.validation.d.ts +91 -0
  69. package/dist_ts/classes.validation.js +1087 -0
  70. package/dist_ts/flexharness.child.d.ts +1 -0
  71. package/dist_ts/flexharness.child.js +28 -0
  72. package/dist_ts/functions.canonicaldirectory.d.ts +21 -0
  73. package/dist_ts/functions.canonicaldirectory.js +144 -0
  74. package/dist_ts/functions.controllerdataroot.d.ts +15 -0
  75. package/dist_ts/functions.controllerdataroot.js +76 -0
  76. package/dist_ts/functions.embeddeddb.d.ts +2 -0
  77. package/dist_ts/functions.embeddeddb.js +21 -0
  78. package/dist_ts/functions.flexcredentialstore.d.ts +16 -0
  79. package/dist_ts/functions.flexcredentialstore.js +93 -0
  80. package/dist_ts/functions.opencodeauth.d.ts +3 -0
  81. package/dist_ts/functions.opencodeauth.js +31 -0
  82. package/dist_ts/functions.runtimeenvironment.d.ts +2 -0
  83. package/dist_ts/functions.runtimeenvironment.js +79 -0
  84. package/dist_ts/functions.upgradefollower.d.ts +3 -0
  85. package/dist_ts/functions.upgradefollower.js +95 -0
  86. package/dist_ts/index.d.ts +24 -0
  87. package/dist_ts/index.js +25 -0
  88. package/dist_ts/interfaces.auth.d.ts +181 -0
  89. package/dist_ts/interfaces.auth.js +82 -0
  90. package/dist_ts/interfaces.config.d.ts +34 -0
  91. package/dist_ts/interfaces.config.js +2 -0
  92. package/dist_ts/interfaces.flexipc.d.ts +939 -0
  93. package/dist_ts/interfaces.flexipc.js +1492 -0
  94. package/dist_ts/interfaces.gitreversion.d.ts +246 -0
  95. package/dist_ts/interfaces.gitreversion.js +2 -0
  96. package/dist_ts/interfaces.lifecycle.d.ts +37 -0
  97. package/dist_ts/interfaces.lifecycle.js +2 -0
  98. package/dist_ts/interfaces.opencode.d.ts +101 -0
  99. package/dist_ts/interfaces.opencode.js +3 -0
  100. package/dist_ts/interfaces.projects.d.ts +156 -0
  101. package/dist_ts/interfaces.projects.js +5 -0
  102. package/dist_ts/plugins.d.ts +36 -0
  103. package/dist_ts/plugins.js +40 -0
  104. package/dist_ts_interfaces/index.d.ts +2 -0
  105. package/dist_ts_interfaces/index.js +3 -0
  106. package/dist_ts_interfaces/interfaces.d.ts +747 -0
  107. package/dist_ts_interfaces/interfaces.js +47 -0
  108. package/dist_ts_interfaces/plugins.d.ts +4 -0
  109. package/dist_ts_interfaces/plugins.js +3 -0
  110. package/dist_ts_interfaces/requests.d.ts +806 -0
  111. package/dist_ts_interfaces/requests.js +2 -0
  112. package/dist_ts_migration/classes.documentmigrationrunner.d.ts +8 -0
  113. package/dist_ts_migration/classes.documentmigrationrunner.js +24 -0
  114. package/dist_ts_migration/classes.flexmigrationrunner.d.ts +11 -0
  115. package/dist_ts_migration/classes.flexmigrationrunner.js +25 -0
  116. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.d.ts +10 -0
  117. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.js +15 -0
  118. package/dist_ts_migration/classes.migrationrunner.d.ts +8 -0
  119. package/dist_ts_migration/classes.migrationrunner.js +34 -0
  120. package/dist_ts_migration/index.d.ts +12 -0
  121. package/dist_ts_migration/index.js +13 -0
  122. package/dist_ts_migration/v10_flexharnessv3migration.d.ts +11 -0
  123. package/dist_ts_migration/v10_flexharnessv3migration.js +23 -0
  124. package/dist_ts_migration/v13_flexprojectionorder.d.ts +11 -0
  125. package/dist_ts_migration/v13_flexprojectionorder.js +23 -0
  126. package/dist_ts_migration/v16_flexprovidercredentials.d.ts +22 -0
  127. package/dist_ts_migration/v16_flexprovidercredentials.js +149 -0
  128. package/dist_ts_migration/v18_resourcelayout.d.ts +22 -0
  129. package/dist_ts_migration/v18_resourcelayout.js +23 -0
  130. package/dist_ts_migration/v18_resourcelayoutmigration.d.ts +6 -0
  131. package/dist_ts_migration/v18_resourcelayoutmigration.js +61 -0
  132. package/dist_ts_migration/v19_flexprojectmanagement.d.ts +11 -0
  133. package/dist_ts_migration/v19_flexprojectmanagement.js +21 -0
  134. package/dist_ts_migration/v1_embeddeddatabaselocation.d.ts +28 -0
  135. package/dist_ts_migration/v1_embeddeddatabaselocation.js +415 -0
  136. package/dist_ts_migration/v22_projectfilesystemidentitymigration.d.ts +7 -0
  137. package/dist_ts_migration/v22_projectfilesystemidentitymigration.js +105 -0
  138. package/dist_ts_migration/v2_controllerdataroot.d.ts +130 -0
  139. package/dist_ts_migration/v2_controllerdataroot.js +1887 -0
  140. package/dist_ts_migration/v6_protocoldocumentmigration.d.ts +7 -0
  141. package/dist_ts_migration/v6_protocoldocumentmigration.js +100 -0
  142. package/dist_ts_migration/v6_protocoldocuments.d.ts +7 -0
  143. package/dist_ts_migration/v6_protocoldocuments.js +138 -0
  144. package/html/index.html +13 -0
  145. package/{LICENSE → license.md} +2 -2
  146. package/package.json +86 -48
  147. package/readme.md +480 -0
  148. package/readme.plan.md +188 -0
  149. package/ts/00_commitinfo_data.ts +8 -0
  150. package/ts/classes.authmodels.ts +1245 -0
  151. package/ts/classes.authstore.ts +3274 -0
  152. package/ts/classes.browserresourcehost.ts +1205 -0
  153. package/ts/classes.cli.ts +1254 -0
  154. package/ts/classes.config.ts +351 -0
  155. package/ts/classes.controller.ts +14426 -0
  156. package/ts/classes.controllermanagement.ts +330 -0
  157. package/ts/classes.draftmanager.ts +232 -0
  158. package/ts/classes.embeddeddb.ts +166 -0
  159. package/ts/classes.flexframedtransport.ts +283 -0
  160. package/ts/classes.flexmodels.private.ts +823 -0
  161. package/ts/classes.flexmodels.public.ts +732 -0
  162. package/ts/classes.flexprojectionreader.ts +816 -0
  163. package/ts/classes.flexservice.ts +4302 -0
  164. package/ts/classes.flexstore.ts +4565 -0
  165. package/ts/classes.flexsupervisor.ts +1453 -0
  166. package/ts/classes.gitreversion.ts +13353 -0
  167. package/ts/classes.harnessoperationmanager.ts +870 -0
  168. package/ts/classes.opencodeclient.ts +4110 -0
  169. package/ts/classes.opencodesupervisor.ts +1280 -0
  170. package/ts/classes.passkeymanager.ts +570 -0
  171. package/ts/classes.processinspection.ts +623 -0
  172. package/ts/classes.resourcecoordinator.ts +436 -0
  173. package/ts/classes.sessionintelligencereader.ts +52 -0
  174. package/ts/classes.systemmetricssampler.ts +215 -0
  175. package/ts/classes.terminalmanager.ts +1207 -0
  176. package/ts/classes.terminalresourcehost.ts +122 -0
  177. package/ts/classes.upgradecoordinator.ts +2675 -0
  178. package/ts/classes.upgradetransaction.ts +2900 -0
  179. package/ts/classes.uploadmanager.ts +240 -0
  180. package/ts/classes.validation.ts +1409 -0
  181. package/ts/flexharness.child.ts +35 -0
  182. package/ts/functions.canonicaldirectory.ts +213 -0
  183. package/ts/functions.controllerdataroot.ts +107 -0
  184. package/ts/functions.embeddeddb.ts +22 -0
  185. package/ts/functions.flexcredentialstore.ts +128 -0
  186. package/ts/functions.opencodeauth.ts +34 -0
  187. package/ts/functions.runtimeenvironment.ts +90 -0
  188. package/ts/functions.upgradefollower.ts +115 -0
  189. package/ts/index.ts +36 -6
  190. package/ts/interfaces.auth.ts +316 -0
  191. package/ts/interfaces.config.ts +37 -0
  192. package/ts/interfaces.flexipc.ts +2586 -0
  193. package/ts/interfaces.gitreversion.ts +336 -0
  194. package/ts/interfaces.lifecycle.ts +46 -0
  195. package/ts/interfaces.opencode.ts +153 -0
  196. package/ts/interfaces.projects.ts +182 -0
  197. package/ts/plugins.ts +64 -0
  198. package/ts_interfaces/index.ts +2 -0
  199. package/ts_interfaces/interfaces.ts +827 -0
  200. package/ts_interfaces/plugins.ts +15 -0
  201. package/ts_interfaces/requests.ts +1186 -0
  202. package/ts_migration/classes.documentmigrationrunner.ts +32 -0
  203. package/ts_migration/classes.flexmigrationrunner.ts +33 -0
  204. package/ts_migration/classes.flexpostharnessmigrationrunner.ts +22 -0
  205. package/ts_migration/classes.migrationrunner.ts +40 -0
  206. package/ts_migration/index.ts +12 -0
  207. package/ts_migration/v10_flexharnessv3migration.ts +35 -0
  208. package/ts_migration/v13_flexprojectionorder.ts +33 -0
  209. package/ts_migration/v16_flexprovidercredentials.ts +196 -0
  210. package/ts_migration/v18_resourcelayout.ts +55 -0
  211. package/ts_migration/v18_resourcelayoutmigration.ts +68 -0
  212. package/ts_migration/v19_flexprojectmanagement.ts +28 -0
  213. package/ts_migration/v1_embeddeddatabaselocation.ts +560 -0
  214. package/ts_migration/v22_projectfilesystemidentitymigration.ts +121 -0
  215. package/ts_migration/v2_controllerdataroot.ts +2349 -0
  216. package/ts_migration/v6_protocoldocumentmigration.ts +144 -0
  217. package/ts_migration/v6_protocoldocuments.ts +198 -0
  218. package/ts_web/00_commitinfo_data.ts +8 -0
  219. package/ts_web/classes.controllersocketclient.ts +517 -0
  220. package/ts_web/classes.sessiondraftsync.ts +390 -0
  221. package/ts_web/elements.harnesscontrollerapp.ts +11494 -0
  222. package/ts_web/index.ts +2 -0
  223. package/ts_web/plugins.ts +31 -0
  224. package/.gitlab-ci.yml +0 -71
  225. package/.npmignore +0 -5
  226. package/README.md +0 -40
  227. package/dist/cli.js +0 -2
  228. package/dist/index.d.ts +0 -0
  229. package/dist/index.js +0 -9
  230. package/dist/mod_bundle/index.d.ts +0 -1
  231. package/dist/mod_bundle/index.js +0 -18
  232. package/dist/mod_bundle/mod.plugins.d.ts +0 -4
  233. package/dist/mod_bundle/mod.plugins.js +0 -11
  234. package/dist/mod_install/index.d.ts +0 -4
  235. package/dist/mod_install/index.js +0 -21
  236. package/dist/mod_install/mod.plugins.d.ts +0 -1
  237. package/dist/mod_install/mod.plugins.js +0 -7
  238. package/dist/mod_standard/index.d.ts +0 -4
  239. package/dist/mod_standard/index.js +0 -21
  240. package/dist/mod_standard/mod.browser.d.ts +0 -6
  241. package/dist/mod_standard/mod.browser.js +0 -14
  242. package/dist/mod_standard/mod.clean.d.ts +0 -4
  243. package/dist/mod_standard/mod.clean.js +0 -12
  244. package/dist/mod_standard/mod.compile.d.ts +0 -4
  245. package/dist/mod_standard/mod.compile.js +0 -21
  246. package/dist/mod_standard/mod.plugins.d.ts +0 -8
  247. package/dist/mod_standard/mod.plugins.js +0 -19
  248. package/dist/mod_standard/mod.test.d.ts +0 -4
  249. package/dist/mod_standard/mod.test.js +0 -12
  250. package/dist/plr.cli.d.ts +0 -3
  251. package/dist/plr.cli.js +0 -57
  252. package/dist/plr.config.d.ts +0 -11
  253. package/dist/plr.config.js +0 -26
  254. package/dist/plr.mods.d.ts +0 -17
  255. package/dist/plr.mods.js +0 -17
  256. package/dist/plr.paths.d.ts +0 -19
  257. package/dist/plr.paths.js +0 -26
  258. package/dist/plr.plugins.d.ts +0 -8
  259. package/dist/plr.plugins.js +0 -16
  260. package/npmextra.json +0 -10
  261. package/ts/mod_bundle/index.ts +0 -20
  262. package/ts/mod_bundle/mod.plugins.ts +0 -9
  263. package/ts/mod_install/index.ts +0 -20
  264. package/ts/mod_install/mod.plugins.ts +0 -1
  265. package/ts/mod_standard/index.ts +0 -23
  266. package/ts/mod_standard/mod.browser.ts +0 -17
  267. package/ts/mod_standard/mod.clean.ts +0 -13
  268. package/ts/mod_standard/mod.compile.ts +0 -23
  269. package/ts/mod_standard/mod.plugins.ts +0 -17
  270. package/ts/mod_standard/mod.test.ts +0 -13
  271. package/ts/plr.cli.ts +0 -60
  272. package/ts/plr.config.ts +0 -36
  273. package/ts/plr.mods.ts +0 -25
  274. package/ts/plr.paths.ts +0 -29
  275. package/ts/plr.plugins.ts +0 -17
  276. package/tslint.json +0 -3
  277. package/yarn.lock +0 -3464
package/readme.plan.md ADDED
@@ -0,0 +1,188 @@
1
+ # AGL Package Transition Plan
2
+
3
+ ## Outcome
4
+
5
+ Move the published pnpm-global installation from
6
+ `@modelprofile.com/harness-controller@20.0.2` to the bridge
7
+ `@modelprofile.com/harness-controller@20.0.3`, then to the exact unscoped target
8
+ `agl@21.0.0`. The operator runs two separate commands and waits for each to
9
+ finish:
10
+
11
+ ```sh
12
+ hcon upgrade --port 4097
13
+ hcon upgrade --port 4097
14
+ ```
15
+
16
+ The first command remains a same-package `hcon` upgrade. The second is the
17
+ bridge-owned cross-package transition. After both succeed, the management
18
+ command is `agl`.
19
+
20
+ ## Exact Identities
21
+
22
+ | Role | Package | Version | CLI | Management | Transaction responsibility |
23
+ | --- | --- | --- | --- | --- | --- |
24
+ | Published source | `@modelprofile.com/harness-controller` | `20.0.2` | `hcon` | v1 | Creates format 2 |
25
+ | Bridge | `@modelprofile.com/harness-controller` | `20.0.3` | `hcon` | v1 | Completes format 2 and creates format 3 |
26
+ | Target | `agl` | `21.0.0` | `agl` | v2 | Inherits and completes format 3 |
27
+
28
+ The repository is `modelprofile.com/agl`. During the bridge release,
29
+ `.smartconfig.json` points Git operations at `agl` while npm publication remains
30
+ `@modelprofile.com/harness-controller` with the existing registries and release
31
+ targets.
32
+
33
+ ## Stable Contracts
34
+
35
+ - Preserve controller IDs, database and collection names, passkey RP/origin and
36
+ credential records, SmartSecret service/store/account identities, harness
37
+ IDs, audit vocabulary, browser storage keys, and persisted protocol fields.
38
+ - Preserve existing `HARNESS_CONTROLLER_*` environment variables, private IPC
39
+ identities, log locations, and management coordination paths.
40
+ - Preserve user projects, workspaces, controller runtime configuration, session
41
+ state, Flex credentials, Git captures, and controller-owned worktrees.
42
+ - Keep the current installed data root at `$XDG_CONFIG_HOME/hcon` (default
43
+ `~/.config/hcon`). Its migration is already committed; neither upgrade phase
44
+ performs another data-root move or imports the old root again.
45
+ - Development checkouts continue to use `.nogit`. Package and CLI branding may
46
+ change only at the public target boundary, not inside persisted identities.
47
+
48
+ ## Coordination Compatibility
49
+
50
+ The coordination envelope remains version 2 across all three artifacts. Owner
51
+ records, start and upgrade admission, worker payloads, launch and action grants,
52
+ transaction mutation guards, and token metadata retain that shared envelope.
53
+
54
+ Format-2 transactions describe a same-package transition with source version,
55
+ optional target version, and optional `targetStartupInvoked`. The 20.0.2 worker
56
+ creates this format. Bridge 20.0.3 must read and mutate the inherited transaction
57
+ exactly and must not add format-3 package fields to it.
58
+
59
+ Format-3 transactions are created only by the exact bridge identity. They pin
60
+ both package names, versions, management versions, CLI names, and direct CLI
61
+ paths. The source side remains management v1; the target side is management v2.
62
+ Target startup validates the exact target-only pnpm topology, global root,
63
+ direct CLI path, package/version identity, management version, and inherited
64
+ startup authority before registering itself in the transaction.
65
+
66
+ ## Phase 1: Source To Bridge
67
+
68
+ 1. The active 20.0.2 `hcon` creates a format-2 transaction and detached worker.
69
+ 2. The old package's `latest` tag must resolve to exact 20.0.3. Normal semver
70
+ comparison still refuses a downgrade.
71
+ 3. For a running controller, the worker verifies the exact source process,
72
+ durably prepares the bounded session cohort through management v1, stops the
73
+ controller, installs 20.0.3, records `targetStartupInvoked`, invokes the exact
74
+ bridge CLI, then finalizes or reopens the cohort.
75
+ 4. For a stopped controller, the worker installs and verifies 20.0.3, records
76
+ terminal package success without `targetStartupInvoked`, and leaves the
77
+ controller stopped.
78
+ 5. Before target startup, a same-package failure may restore exact 20.0.2 and
79
+ compensate the prepared cohort. After target startup is invoked, recovery is
80
+ forward-only because startup may have applied forward migrations.
81
+
82
+ ## Phase 2: Bridge To AGL
83
+
84
+ The exact 20.0.3 bridge creates a format-3 transaction. Before controller
85
+ preparation, shutdown, or global package mutation, its worker resolves
86
+ `agl@21.0.0` from the configured registry and validates the exact package name,
87
+ version, and sole `agl: ./cli.js` binary. Missing, malformed, or mismatched target
88
+ metadata aborts safely while bridge ownership remains intact.
89
+
90
+ The package transition then uses these durable checkpoints in order:
91
+
92
+ 1. `packageTransitionStarted` is committed immediately before the prepared
93
+ grouped add of exact bridge and target packages.
94
+ 2. `groupedTargetVerified` follows verification that both exact package roots
95
+ share one pnpm group and that the `hcon` and `agl` shims point to their
96
+ respective direct CLIs.
97
+ 3. `targetPackageCommitStarted` is the irreversible package boundary, committed
98
+ immediately before the prepared exact-target add.
99
+ 4. `targetPackageCommitted` follows target-only verification: the bridge and
100
+ `hcon` shim are absent, and exact `agl@21.0.0` owns the `agl` shim.
101
+ 5. `targetStartupInvoked` is used only when the controller was running. The
102
+ target start command is prepared first, the marker is committed immediately
103
+ before execution, and AGL then proves management v2 identity before session
104
+ finalization.
105
+
106
+ Before `targetPackageCommitStarted`, failure and stalled-worker recovery
107
+ normalize to exact bridge-only ownership, restart the bridge when it was
108
+ previously running, and compensate sessions. From that checkpoint onward,
109
+ recovery only normalizes toward exact target-only ownership and never restores
110
+ the bridge. Recovery refuses to adopt an unmarked target process, avoids a
111
+ duplicate start while retained target authority is alive, and preserves the
112
+ transaction for bounded forward recovery after the startup marker.
113
+
114
+ ## Running And Stopped Paths
115
+
116
+ For both phases, a running controller seals prompt admission, records and
117
+ prepares the exact bounded cohort, verifies that source writers and the source
118
+ port have quiesced, changes packages, starts the authorized target, and finalizes
119
+ once. `--continue-sessions` controls continuation; without it, successful target
120
+ startup only reopens admission. Uncertain pause cleanup remains fail-closed.
121
+
122
+ A stopped controller has no inherited cohort. Package verification and recovery
123
+ still apply, but no target startup marker is written and no controller is
124
+ started. After phase 1 the next command remains `hcon`; after phase 2 the next
125
+ command is `agl`.
126
+
127
+ ## Git Startup Fixes
128
+
129
+ - Before SmartData or runtime initialization, validate the committed data root
130
+ and create its `git-reversion` parent with mode 0700, or validate an existing
131
+ parent as a same-user, non-symlink directory with no group or world access. Do
132
+ not create missing data-root ancestors or replace an unsafe existing entry.
133
+ - Keep controller-specific Git roots keyed by the existing controller ID hash;
134
+ the package rename does not rename or relocate Git state.
135
+ - On pristine projects, and projects containing only exact durable
136
+ discovery-limit barriers, recover by validating project identity and durable
137
+ records without traversing the project tree.
138
+ - When a definitively new capture in otherwise pristine or barrier-only state
139
+ exceeds repository or directory discovery bounds, publish a crash-recoverable
140
+ empty `git.discovery-limit` non-revertible barrier. Existing repository-bearing
141
+ or ambiguous state must instead fail closed without mutation or rediscovery.
142
+ - Enforce repository candidate limits during discovery so scanning stops at the
143
+ first provable overflow rather than traversing later paths.
144
+
145
+ ## Candidate And Publication Sequence
146
+
147
+ 1. Freeze a 20.0.3 bridge candidate under the old npm identity, `hcon` binary,
148
+ and management v1. Verify its packed artifact and both upgrade formats in an
149
+ isolated pnpm global home and controlled registry.
150
+ 2. Preserve that exact source as the `v20.0.3` commit and tag before making any
151
+ target identity change.
152
+ 3. Publish phase 1 as `@modelprofile.com/harness-controller@20.0.3` to the
153
+ existing registries and confirm that the old package's `latest` tag resolves
154
+ exactly to 20.0.3. Verify the first invocation from actual published 20.0.2.
155
+ 4. From the bridge tag, prepare and verify the target candidate with package
156
+ `agl`, version 21.0.0, CLI `agl`, and management v2 while preserving every
157
+ stable contract and the shared coordination envelope.
158
+ 5. Preserve the target as the `v21.0.0` commit and tag, then publish phase 2 as
159
+ exact unscoped `agl@21.0.0`. Until this publication exists, bridge preflight
160
+ must fail without stopping the controller or mutating packages.
161
+ 6. Run the final public-registry E2E from published 20.0.2 through both explicit
162
+ `hcon upgrade` invocations and verify that only `agl` remains installed and
163
+ `agl` is the final command.
164
+
165
+ Do not deprecate any legacy package version before both publications and the
166
+ final public-registry E2E succeed. After success, deprecation may direct users to
167
+ the two-command bridge path; published bridge artifacts must remain installable
168
+ for recovery.
169
+
170
+ ## Verification
171
+
172
+ - Build, production type checking, test type checking, focused management and
173
+ package-transition tests, the full Node/browser suite, and diff sanity checks.
174
+ - Immutable format-2 fixtures proving 20.0.3 consumes and mutates 20.0.2 state
175
+ without format-3 fields.
176
+ - Format-3 validation for exact identities, checkpoint implication order,
177
+ management v1 to v2 handoff, direct CLI ownership, and inherited startup.
178
+ - Target-resolution failures proving no controller preparation, shutdown, or
179
+ package mutation occurs before exact `agl@21.0.0` metadata is accepted.
180
+ - Real pnpm grouped, source-only, and target-only topology tests, including
181
+ command interruption and recovery at every package checkpoint.
182
+ - Running and stopped paths for both invocations, with session continuation both
183
+ enabled and disabled, plus worker-loss and retained-target recovery.
184
+ - Git startup tests for secure parent creation, unsafe-parent rejection, pristine
185
+ no-traversal recovery, bounded discovery barriers, and crash-safe replay.
186
+ - Final E2E from actual published 20.0.2 to bridge 20.0.3 to target 21.0.0,
187
+ confirming data, credentials, sessions, Git state, command ownership, and the
188
+ unchanged `~/.config/hcon` root.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * autocreated commitinfo by @push.rocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: 'agl',
6
+ version: '21.0.2',
7
+ description: 'Agent Gateway Layer for OpenCode and FlexHarness sessions'
8
+ }