agl 43.13.0 → 44.0.0

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 (99) hide show
  1. package/changelog.md +28 -0
  2. package/dist_serve/bundle.js +4473 -4235
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +29 -29
  5. package/dist_serve/bundle.js.third-party-notices.txt +29 -29
  6. package/dist_ts/00_commitinfo_data.js +2 -2
  7. package/dist_ts/aglapi/aglapisurface.document.js +37 -4
  8. package/dist_ts/classes.authstore.d.ts +60 -3
  9. package/dist_ts/classes.authstore.js +161 -13
  10. package/dist_ts/classes.controller.d.ts +63 -0
  11. package/dist_ts/classes.controller.js +502 -43
  12. package/dist_ts/classes.embeddeddb.js +7 -2
  13. package/dist_ts/classes.flexmodels.private.d.ts +39 -0
  14. package/dist_ts/classes.flexmodels.private.js +127 -1
  15. package/dist_ts/classes.flexprojectpreparation.d.ts +21 -0
  16. package/dist_ts/classes.flexprojectpreparation.js +69 -0
  17. package/dist_ts/classes.flexpromptqueue.d.ts +21 -1
  18. package/dist_ts/classes.flexpromptqueue.js +67 -7
  19. package/dist_ts/classes.flexrequestqueue.d.ts +11 -0
  20. package/dist_ts/classes.flexrequestqueue.js +40 -0
  21. package/dist_ts/classes.flexservice.d.ts +46 -14
  22. package/dist_ts/classes.flexservice.js +179 -55
  23. package/dist_ts/classes.flexstore.d.ts +68 -3
  24. package/dist_ts/classes.flexstore.js +277 -11
  25. package/dist_ts/classes.flexsubmissionmodels.d.ts +58 -0
  26. package/dist_ts/classes.flexsubmissionmodels.js +162 -0
  27. package/dist_ts/classes.flexsubmissionstore.d.ts +70 -0
  28. package/dist_ts/classes.flexsubmissionstore.js +323 -0
  29. package/dist_ts/classes.flexsupervisor.d.ts +10 -0
  30. package/dist_ts/classes.flexsupervisor.js +27 -1
  31. package/dist_ts/classes.harnessoperationmanager.d.ts +31 -0
  32. package/dist_ts/classes.harnessoperationmanager.js +69 -7
  33. package/dist_ts/classes.mcpclient.js +4 -3
  34. package/dist_ts/classes.mcpcontrollerhost.js +3 -2
  35. package/dist_ts/classes.pendingpromptstore.d.ts +11 -3
  36. package/dist_ts/classes.pendingpromptstore.js +66 -10
  37. package/dist_ts/classes.sessionidentityservice.d.ts +18 -1
  38. package/dist_ts/classes.sessionidentityservice.js +34 -4
  39. package/dist_ts/classes.ticketstore.d.ts +5 -3
  40. package/dist_ts/classes.ticketstore.js +7 -2
  41. package/dist_ts/classes.validation.d.ts +3 -0
  42. package/dist_ts/classes.validation.js +50 -1
  43. package/dist_ts/functions.deviceapi.js +7 -3
  44. package/dist_ts/interfaces.auth.d.ts +3 -1
  45. package/dist_ts/interfaces.auth.js +1 -1
  46. package/dist_ts/interfaces.flexipc.d.ts +29 -5
  47. package/dist_ts/interfaces.flexipc.js +13 -4
  48. package/dist_ts_authswitch/classes.authoritydatabase.d.ts +1 -0
  49. package/dist_ts_authswitch/classes.authoritydatabase.js +17 -5
  50. package/dist_ts_interfaces/flexadmission.d.ts +69 -0
  51. package/dist_ts_interfaces/flexadmission.js +2 -0
  52. package/dist_ts_interfaces/index.d.ts +1 -0
  53. package/dist_ts_interfaces/index.js +2 -1
  54. package/dist_ts_interfaces/interfaces.d.ts +10 -1
  55. package/dist_ts_interfaces/interfaces.js +2 -2
  56. package/dist_ts_interfaces/requests.d.ts +2 -1
  57. package/dist_ts_interfaces/requests.js +1 -1
  58. package/dist_ts_interfaces/tickets.d.ts +9 -1
  59. package/dist_ts_interfaces/tickets.js +11 -2
  60. package/dist_ts_migration/v10_flexharnessv3migration.js +4 -1
  61. package/docs/nosqldb11-migration.md +59 -0
  62. package/package.json +10 -9
  63. package/readme.md +5 -1
  64. package/ts/00_commitinfo_data.ts +1 -1
  65. package/ts/aglapi/aglapisurface.document.ts +36 -3
  66. package/ts/classes.authstore.ts +179 -11
  67. package/ts/classes.controller.ts +498 -40
  68. package/ts/classes.embeddeddb.ts +6 -1
  69. package/ts/classes.flexmodels.private.ts +109 -0
  70. package/ts/classes.flexprojectpreparation.ts +69 -0
  71. package/ts/classes.flexpromptqueue.ts +69 -6
  72. package/ts/classes.flexrequestqueue.ts +47 -0
  73. package/ts/classes.flexservice.ts +187 -51
  74. package/ts/classes.flexstore.ts +352 -10
  75. package/ts/classes.flexsubmissionmodels.ts +89 -0
  76. package/ts/classes.flexsubmissionstore.ts +312 -0
  77. package/ts/classes.flexsupervisor.ts +26 -0
  78. package/ts/classes.harnessoperationmanager.ts +79 -6
  79. package/ts/classes.mcpclient.ts +3 -2
  80. package/ts/classes.mcpcontrollerhost.ts +2 -1
  81. package/ts/classes.pendingpromptstore.ts +55 -6
  82. package/ts/classes.sessionidentityservice.ts +33 -2
  83. package/ts/classes.ticketstore.ts +11 -4
  84. package/ts/classes.validation.ts +42 -0
  85. package/ts/functions.deviceapi.ts +6 -2
  86. package/ts/interfaces.auth.ts +3 -1
  87. package/ts/interfaces.flexipc.ts +38 -4
  88. package/ts_authswitch/classes.authoritydatabase.ts +19 -5
  89. package/ts_interfaces/flexadmission.ts +52 -0
  90. package/ts_interfaces/index.ts +2 -0
  91. package/ts_interfaces/interfaces.ts +10 -1
  92. package/ts_interfaces/requests.ts +3 -0
  93. package/ts_interfaces/tickets.ts +12 -2
  94. package/ts_migration/v10_flexharnessv3migration.ts +3 -0
  95. package/ts_web/00_commitinfo_data.ts +1 -1
  96. package/ts_web/classes.browsersubmissions.ts +279 -0
  97. package/ts_web/classes.sessiondraftsync.ts +64 -1
  98. package/ts_web/elements.harnesscontrollerapp.ts +340 -5
  99. package/ts_web/functions.flexsubmissions.ts +88 -0
@@ -92,6 +92,8 @@ export declare class OpenCodeController {
92
92
  private readonly finishedFlexSteerRuns;
93
93
  /** The messages the conversations have not taken in; set once the controller loaded them. */
94
94
  private pendingPromptStore?;
95
+ private readonly flexAdmissionCreationPending;
96
+ private readonly flexAdmissionCreationTasks;
95
97
  /** Removals of stored message files, run one after another. */
96
98
  private attachmentCollection;
97
99
  /** The engine that keeps the files of accepted messages; only this controller process runs it. */
@@ -819,6 +821,18 @@ export declare class OpenCodeController {
819
821
  /** Absolute existing directories only; a missing one is rejected instead of stored. */
820
822
  private resolveStandardProjectDirectories;
821
823
  private listSessionsForPrincipal;
824
+ /**
825
+ * The admitted Flex conversations whose native creation is unfinished, read from the store only
826
+ * while this controller knows of one (`flexAdmissionCreationPending`): lists never pay for it otherwise.
827
+ */
828
+ private listUnfinishedFlexAdmissions;
829
+ private provisionalFlexSession;
830
+ /**
831
+ * The detail of an admitted Flex conversation FlexHarness has not created yet. Only conversations
832
+ * whose creation is unfinished (`flexAdmissionCreationPending`) are looked up: every other read
833
+ * goes to the child as before, with no extra store read.
834
+ */
835
+ private provisionalFlexDetail;
822
836
  private readSessionForPrincipal;
823
837
  /** The limit-resume options and account limits a Flex session detail shows. */
824
838
  private flexLimitDetail;
@@ -861,6 +875,26 @@ export declare class OpenCodeController {
861
875
  private wakeOpenCodeTurnStartWaiters;
862
876
  private createProjectForPrincipal;
863
877
  private listModelsForPrincipal;
878
+ /**
879
+ * Commits immutable browser input before any native create/start/provider validation. Admission
880
+ * neither waits for nor refuses a Flex reconciliation or project readiness: it takes the auth
881
+ * store's project mutation lane, commits one transaction and answers. Dispatch waits instead.
882
+ */
883
+ private admitFlexSubmission;
884
+ /**
885
+ * Starts the native creation of an admitted conversation that is still `pending`, once per
886
+ * conversation at a time. Its messages wait in the queue meanwhile (`flexAdmissionCreationPending`).
887
+ */
888
+ private scheduleFlexAdmissionCreation;
889
+ /**
890
+ * Creates the native conversation an admission reserved: project readiness first (outside the
891
+ * creation's control budget), then the durable dispatch mark, then `session.create` under the
892
+ * reserved id and generation. A failure before the child could have taken the creation leaves the
893
+ * conversation `pending` (the next admission to it, or the next child generation, tries again);
894
+ * one after leaves it `uncertain` until the next generation's recovery reads the native catalog.
895
+ * The admitted messages are never held or resent by this: they stay queued for the conversation.
896
+ */
897
+ private materializeFlexAdmissionConversation;
864
898
  private createSessionForPrincipal;
865
899
  private updateSessionModelForPrincipal;
866
900
  private renameSessionForPrincipal;
@@ -1059,9 +1093,33 @@ export declare class OpenCodeController {
1059
1093
  private registerFlexProjectForReconciliation;
1060
1094
  private recoverOpenCodeManagedSessionDeletions;
1061
1095
  private recoverFlexManagedSessionDeletions;
1096
+ /**
1097
+ * What AGL ends of a Flex session's records after FlexHarness answered its generation-fenced
1098
+ * deletion of `obligationGenerationArg` (ruling 2026-11-18): `matched` ends them as before, and
1099
+ * FlexHarness's deletion already ended a document whose project-management record it held;
1100
+ * `absent` ends the session state in one mutation (`settleAbsentFlexSessionState`) unless a live
1101
+ * record of another generation holds the id; `superseded`, or that record, retires the obligation
1102
+ * with nothing keyed by the id touched, named in the controller log with both generations.
1103
+ */
1104
+ private settleFlexSessionDeletionAnswer;
1062
1105
  private completeRecoveredManagedSessionDeletion;
1063
1106
  private recoverOpenCodeManagedSessionCreations;
1107
+ /**
1108
+ * Settles the project's Flex creations a child generation left unfinished, from the native
1109
+ * catalog (`session.identities`, metadata only). A creation without admitted messages completes
1110
+ * when its conversation exists with the expected generation and retires otherwise. One that
1111
+ * admitted messages own is never retired here: it completes when the conversation exists; when it
1112
+ * does not, the creation never took effect (an earlier generation's request is over), so it is
1113
+ * `pending` again and the next creation attempt sends it under the same id and generation. A
1114
+ * conversation that exists under another generation stays `uncertain` for the user to inspect.
1115
+ */
1064
1116
  private recoverFlexManagedSessionCreations;
1117
+ /**
1118
+ * Once a project's session authority is reconciled, starts every admitted conversation creation
1119
+ * still `pending`. Conversations recovery found created are scheduled with the project's other
1120
+ * queues (`reconcileFlexPromptActivity`).
1121
+ */
1122
+ private resumeFlexAdmissionCreations;
1065
1123
  private ensureFlexProjectionReader;
1066
1124
  private canRestartOpenCode;
1067
1125
  private scheduleOpenCodeRestart;
@@ -1814,6 +1872,7 @@ export declare class OpenCodeController {
1814
1872
  private withSessionStateMutation;
1815
1873
  private withSessionCreationAdmission;
1816
1874
  private withActiveSessionMutation;
1875
+ /** `durableAdmissionArg`: a durable Flex admission, which a Flex reconciliation does not refuse. */
1817
1876
  private reserveHarnessSubmissionAdmission;
1818
1877
  private reserveAdmissionEntry;
1819
1878
  private withHarnessSubmissionAdmission;
@@ -1825,6 +1884,10 @@ export declare class OpenCodeController {
1825
1884
  private waitForFlexSessionHostRequestAdmissions;
1826
1885
  private waitForSessionHarnessSubmissionAdmissions;
1827
1886
  private waitForProjectArchiveAdmissions;
1887
+ /**
1888
+ * `durableAdmissionArg`: a durable Flex admission only commits records, so a Flex reconciliation
1889
+ * does not refuse it; the queue dispatches it once the reconciliation finished.
1890
+ */
1828
1891
  private assertSessionMutationAdmission;
1829
1892
  private startSessionBackgroundOperation;
1830
1893
  private abortSessionBackgroundOperation;