@genesislcap/ai-assistant 15.90.3 → 15.90.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/custom-elements.json +1872 -1872
  2. package/package.json +17 -17
@@ -5966,1536 +5966,684 @@
5966
5966
  },
5967
5967
  {
5968
5968
  "kind": "javascript-module",
5969
- "path": "src/headless/describe-interaction.ts",
5969
+ "path": "src/genesis/calendar.ts",
5970
+ "declarations": [],
5971
+ "exports": []
5972
+ },
5973
+ {
5974
+ "kind": "javascript-module",
5975
+ "path": "src/genesis/config.ts",
5970
5976
  "declarations": [
5977
+ {
5978
+ "kind": "variable",
5979
+ "name": "DEFAULT_MAX_ROWS",
5980
+ "type": {
5981
+ "text": "number"
5982
+ },
5983
+ "default": "50",
5984
+ "description": "The default read cap, and the ceiling the config may raise it to."
5985
+ },
5986
+ {
5987
+ "kind": "variable",
5988
+ "name": "MAX_ROWS_CEILING",
5989
+ "type": {
5990
+ "text": "number"
5991
+ },
5992
+ "default": "1000"
5993
+ },
5971
5994
  {
5972
5995
  "kind": "function",
5973
- "name": "describeInteraction",
5996
+ "name": "toolNameOf",
5974
5997
  "return": {
5975
5998
  "type": {
5976
- "text": "InteractionDescription"
5999
+ "text": "string"
5977
6000
  }
5978
6001
  },
5979
6002
  "parameters": [
5980
6003
  {
5981
- "name": "input",
6004
+ "name": "resourceName",
5982
6005
  "type": {
5983
- "text": "DescribeInteractionInput"
6006
+ "text": "string"
5984
6007
  }
5985
6008
  }
5986
6009
  ],
5987
- "description": "What the person is being asked, as a compact JSON-serialisable record a model can read and\nanswer (GENC-1660): the same text the autopilot is sent for the decision (`renderDecision`,\nso there is one rendering of a decision, not two), and its actions as data, numbered as that text\nnumbers them, so \"1\" means the same option here and there.\n\nWith no surface — a widget with no controller, or one that has not exposed anything yet — there\nis nothing to act on: `controller` is `false` (or `true` and not `ready`, while a controller that\nwill expose a surface has not yet), `actions` is empty, and `text` is the widget as text alone.\n\nReads the surface fresh each time, so it describes the widget as it is now."
5988
- }
5989
- ],
5990
- "exports": [
5991
- {
5992
- "kind": "js",
5993
- "name": "describeInteraction",
5994
- "declaration": {
5995
- "name": "describeInteraction",
5996
- "module": "src/headless/describe-interaction.ts"
5997
- }
5998
- }
5999
- ]
6000
- },
6001
- {
6002
- "kind": "javascript-module",
6003
- "path": "src/headless/headless-debug.ts",
6004
- "declarations": [
6010
+ "description": "The model-facing tool name for a resource. Deterministic and collision-free (resource names\nare unique), and trivially mapped back to the resource in a debug log. What the tool is FOR\nreaches the model through its description, not its name."
6011
+ },
6005
6012
  {
6006
6013
  "kind": "function",
6007
- "name": "headlessMetaSnapshot",
6014
+ "name": "rowActionProblem",
6008
6015
  "return": {
6009
6016
  "type": {
6010
- "text": "DiagnosticEntry"
6017
+ "text": "string | undefined"
6011
6018
  }
6012
6019
  },
6013
6020
  "parameters": [
6014
6021
  {
6015
- "name": "driver",
6022
+ "name": "resource",
6016
6023
  "type": {
6017
- "text": "AiDriver"
6024
+ "text": "Partial<GenesisAiResource> | null"
6018
6025
  }
6019
6026
  },
6020
6027
  {
6021
- "name": "options",
6022
- "default": "{}",
6028
+ "name": "requestNames",
6023
6029
  "type": {
6024
- "text": "HeadlessDebugOptions"
6025
- }
6030
+ "text": "ReadonlySet<string>"
6031
+ },
6032
+ "description": "The request resources whose rows can be read. A row action reads its rows\nthrough `REQ_<entity>`, and without one there is no row to review."
6033
+ },
6034
+ {
6035
+ "name": "whyNotReadable",
6036
+ "default": "notReadableReason({})",
6037
+ "type": {
6038
+ "text": "(name: string) => string"
6039
+ },
6040
+ "description": "Why a request is not among `requestNames`, when the caller knows: it was\nleft out, has no read tool, or is a query. Without it, the request is said to be missing."
6026
6041
  }
6027
6042
  ],
6028
- "description": "The `meta-snapshot` entry for right now, gathered the way the assistant element gathers it\n(`buildMetaSnapshot` does the assembly; this reads what it reports): the live agent comes from\nthe DRIVER, the transcript from its raw history, and the figures from the transcript, so what a\nheadless host logs is what the browser would. The context window and model, which the element\nlearns from its provider registry, are the host's to say."
6043
+ "description": "What is wrong with a resource's row-action fields (contracts C-18.7.2), if anything."
6029
6044
  },
6030
6045
  {
6031
6046
  "kind": "function",
6032
- "name": "headlessDiagnosticEntries",
6047
+ "name": "validateGenesisAiConfig",
6033
6048
  "return": {
6034
6049
  "type": {
6035
- "text": "DiagnosticEntry[]"
6050
+ "text": "GenesisAiConfigCheck"
6036
6051
  }
6037
6052
  },
6038
6053
  "parameters": [
6039
6054
  {
6040
- "name": "driver",
6041
- "type": {
6042
- "text": "AiDriver"
6043
- }
6044
- },
6045
- {
6046
- "name": "stateKey",
6047
- "type": {
6048
- "text": "string"
6049
- }
6050
- },
6051
- {
6052
- "name": "options",
6053
- "default": "{}",
6055
+ "name": "config",
6054
6056
  "type": {
6055
- "text": "HeadlessDebugOptions"
6057
+ "text": "unknown"
6056
6058
  }
6057
6059
  }
6058
6060
  ],
6059
- "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
6061
+ "description": "Checks a generated AI config before anything is registered, and says what can be kept."
6060
6062
  },
6061
6063
  {
6062
6064
  "kind": "function",
6063
- "name": "headlessCurrentDebugLog",
6065
+ "name": "customCodeOf",
6064
6066
  "return": {
6065
6067
  "type": {
6066
- "text": "DebugLog"
6068
+ "text": "GenesisCustomCodeCheck"
6067
6069
  }
6068
6070
  },
6069
6071
  "parameters": [
6070
6072
  {
6071
- "name": "driver",
6072
- "type": {
6073
- "text": "AiDriver"
6074
- }
6075
- },
6076
- {
6077
- "name": "stateKey",
6078
- "type": {
6079
- "text": "string"
6080
- }
6081
- },
6082
- {
6083
- "name": "options",
6084
- "default": "{}",
6073
+ "name": "resource",
6085
6074
  "type": {
6086
- "text": "HeadlessDebugOptions"
6075
+ "text": "GenesisAiResource"
6087
6076
  }
6088
6077
  }
6089
6078
  ],
6090
- "description": "The current page's debug log: what `HeadlessSession.debugLog()` returns when nothing is\npersisted, and the fallback when the stored stream cannot be read."
6079
+ "description": "A resource's `customCode` as it is used: the one reader of the field."
6091
6080
  }
6092
6081
  ],
6093
6082
  "exports": [
6094
6083
  {
6095
6084
  "kind": "js",
6096
- "name": "headlessMetaSnapshot",
6085
+ "name": "DEFAULT_MAX_ROWS",
6097
6086
  "declaration": {
6098
- "name": "headlessMetaSnapshot",
6099
- "module": "src/headless/headless-debug.ts"
6087
+ "name": "DEFAULT_MAX_ROWS",
6088
+ "module": "src/genesis/config.ts"
6100
6089
  }
6101
6090
  },
6102
6091
  {
6103
6092
  "kind": "js",
6104
- "name": "headlessDiagnosticEntries",
6093
+ "name": "MAX_ROWS_CEILING",
6105
6094
  "declaration": {
6106
- "name": "headlessDiagnosticEntries",
6107
- "module": "src/headless/headless-debug.ts"
6095
+ "name": "MAX_ROWS_CEILING",
6096
+ "module": "src/genesis/config.ts"
6108
6097
  }
6109
6098
  },
6110
6099
  {
6111
6100
  "kind": "js",
6112
- "name": "headlessCurrentDebugLog",
6101
+ "name": "toolNameOf",
6113
6102
  "declaration": {
6114
- "name": "headlessCurrentDebugLog",
6115
- "module": "src/headless/headless-debug.ts"
6103
+ "name": "toolNameOf",
6104
+ "module": "src/genesis/config.ts"
6105
+ }
6106
+ },
6107
+ {
6108
+ "kind": "js",
6109
+ "name": "rowActionProblem",
6110
+ "declaration": {
6111
+ "name": "rowActionProblem",
6112
+ "module": "src/genesis/config.ts"
6113
+ }
6114
+ },
6115
+ {
6116
+ "kind": "js",
6117
+ "name": "validateGenesisAiConfig",
6118
+ "declaration": {
6119
+ "name": "validateGenesisAiConfig",
6120
+ "module": "src/genesis/config.ts"
6121
+ }
6122
+ },
6123
+ {
6124
+ "kind": "js",
6125
+ "name": "customCodeOf",
6126
+ "declaration": {
6127
+ "name": "customCodeOf",
6128
+ "module": "src/genesis/config.ts"
6116
6129
  }
6117
6130
  }
6118
6131
  ]
6119
6132
  },
6120
6133
  {
6121
6134
  "kind": "javascript-module",
6122
- "path": "src/headless/headless-persistence.ts",
6135
+ "path": "src/genesis/consumes.ts",
6123
6136
  "declarations": [
6124
6137
  {
6125
- "kind": "function",
6126
- "name": "headlessPersistence",
6127
- "return": {
6128
- "type": {
6129
- "text": "HeadlessPersistence"
6130
- }
6138
+ "kind": "variable",
6139
+ "name": "GENESIS_AI_CONSUMES",
6140
+ "type": {
6141
+ "text": "GenesisAiConsumes"
6131
6142
  },
6132
- "parameters": [
6133
- {
6134
- "name": "options",
6135
- "type": {
6136
- "text": "HeadlessPersistenceOptions"
6137
- }
6138
- }
6139
- ],
6140
- "description": "Persistence for a `HeadlessSession`: it writes exactly what the browser writes — the\n`sessions/<key>` snapshot and the `diag/<key>` stream — through the platform's\n`SessionPersister` and the host's `SessionPersistenceProvider`, and builds the lifetime debug log\nfrom the same code as the browser's Download.\n\nExported from the package's main entry only, NOT from the Node entry (`./chat-driver`): it\nreaches the session store, and through it `@genesislcap/foundation-redux`, which are not\nNode-clean. The `persister` it makes is the registry's, so a host can restore through\n`getPersister(stateKey)`."
6143
+ "description": "What this version of the assistant reads from a generated AI config: the resource kinds it\naccepts, the resource fields its validator or a tool reads, the `vendor` and `tier` values it\naccepts, and the row-action shapes it runs."
6141
6144
  }
6142
6145
  ],
6143
6146
  "exports": [
6144
6147
  {
6145
6148
  "kind": "js",
6146
- "name": "headlessPersistence",
6149
+ "name": "GenesisAiConsumes",
6147
6150
  "declaration": {
6148
- "name": "headlessPersistence",
6149
- "module": "src/headless/headless-persistence.ts"
6151
+ "name": "GenesisAiConsumes",
6152
+ "module": "./types"
6153
+ }
6154
+ },
6155
+ {
6156
+ "kind": "js",
6157
+ "name": "GENESIS_AI_CONSUMES",
6158
+ "declaration": {
6159
+ "name": "GENESIS_AI_CONSUMES",
6160
+ "module": "src/genesis/consumes.ts"
6150
6161
  }
6151
6162
  }
6152
6163
  ]
6153
6164
  },
6154
6165
  {
6155
6166
  "kind": "javascript-module",
6156
- "path": "src/headless/headless-session.ts",
6167
+ "path": "src/genesis/criteria.ts",
6157
6168
  "declarations": [
6158
6169
  {
6159
- "kind": "class",
6160
- "description": "A driver with no screen: a way for a host with no browser (a coding agent behind a small HTTP\nserver, a test) to run a whole assistant journey as the person (GENC-1660).\n\nIt watches the driver for interactions and turns the conversation into an append-only log of\nplain-data events (see HeadlessEvent): `decision` when the person has something to\nanswer, `working` when someone else has it, `settled`, the visible `message`s, the end of each\n`turn`, the autopilot's state, and the host's own `probe`. The caller reads the log with\nHeadlessSession.wait, a long poll cursored by `seq`, so nothing is lost between calls.\nIt answers with HeadlessSession.act, which runs a widget's action as a click would, with\nthe same numbered options the autopilot is shown.\n\nIt only observes: its interceptor never claims an interaction, so an autopilot on the same\ndriver works as it always does, and what the session reports as a `decision` is what the autopilot\nhas handed to the person. Plain classes only: no DOM, no FAST.",
6161
- "name": "HeadlessSession",
6162
- "members": [
6170
+ "kind": "function",
6171
+ "name": "dateFragment",
6172
+ "return": {
6173
+ "type": {
6174
+ "text": "string | undefined"
6175
+ }
6176
+ },
6177
+ "parameters": [
6163
6178
  {
6164
- "kind": "field",
6165
- "name": "sessionKey",
6179
+ "name": "field",
6166
6180
  "type": {
6167
6181
  "text": "string"
6168
- },
6169
- "privacy": "private",
6170
- "readonly": true
6182
+ }
6171
6183
  },
6172
6184
  {
6173
- "kind": "field",
6174
- "name": "allowRaw",
6185
+ "name": "op",
6175
6186
  "type": {
6176
- "text": "boolean"
6177
- },
6178
- "privacy": "private",
6179
- "readonly": true
6187
+ "text": "GenesisFilterOp"
6188
+ }
6180
6189
  },
6181
6190
  {
6182
- "kind": "field",
6183
- "name": "clock",
6191
+ "name": "date",
6184
6192
  "type": {
6185
- "text": "() => number"
6186
- },
6187
- "privacy": "private",
6188
- "readonly": true
6189
- },
6193
+ "text": "string"
6194
+ }
6195
+ }
6196
+ ]
6197
+ },
6198
+ {
6199
+ "kind": "function",
6200
+ "name": "dateTimeFragment",
6201
+ "return": {
6202
+ "type": {
6203
+ "text": "string | undefined"
6204
+ }
6205
+ },
6206
+ "parameters": [
6190
6207
  {
6191
- "kind": "field",
6192
- "name": "autopilotHost",
6193
- "type": {
6194
- "text": "AutopilotLike | undefined"
6195
- },
6196
- "privacy": "private",
6197
- "readonly": true,
6198
- "default": "autopilot"
6199
- },
6200
- {
6201
- "kind": "field",
6202
- "name": "events",
6203
- "type": {
6204
- "text": "HeadlessEvent[]"
6205
- },
6206
- "privacy": "private",
6207
- "readonly": true,
6208
- "default": "[]"
6209
- },
6210
- {
6211
- "kind": "field",
6212
- "name": "seq",
6213
- "type": {
6214
- "text": "number"
6215
- },
6216
- "privacy": "private",
6217
- "default": "0"
6218
- },
6219
- {
6220
- "kind": "field",
6221
- "name": "tracked",
6222
- "privacy": "private",
6223
- "readonly": true,
6224
- "default": "new Map<string, Tracked>()"
6225
- },
6226
- {
6227
- "kind": "field",
6228
- "name": "origin",
6229
- "privacy": "private",
6230
- "readonly": true,
6231
- "default": "new Map<string, { auto?: boolean; raw?: boolean }>()",
6232
- "description": "What the session did to an interaction itself, for `settled` to say when the driver reports it."
6233
- },
6234
- {
6235
- "kind": "field",
6236
- "name": "waiters",
6237
- "privacy": "private",
6238
- "readonly": true,
6239
- "default": "new Set<Waiter>()"
6240
- },
6241
- {
6242
- "kind": "field",
6243
- "name": "teardown",
6244
- "type": {
6245
- "text": "Array<() => void>"
6246
- },
6247
- "privacy": "private",
6248
- "readonly": true,
6249
- "default": "[]"
6250
- },
6251
- {
6252
- "kind": "field",
6253
- "name": "seen",
6254
- "type": {
6255
- "text": "number"
6256
- },
6257
- "privacy": "private",
6258
- "description": "How much of the driver's history has been reported as messages."
6259
- },
6260
- {
6261
- "kind": "field",
6262
- "name": "turn",
6263
- "type": {
6264
- "text": "Promise<unknown> | undefined"
6265
- },
6266
- "privacy": "private",
6267
- "description": "The `send` in flight, if any."
6268
- },
6269
- {
6270
- "kind": "field",
6271
- "name": "open",
6272
- "type": {
6273
- "text": "{ start: number; reason?: string; failureReason?: string } | undefined"
6274
- },
6275
- "privacy": "private",
6276
- "description": "The turn that is running, whoever started it, until the driver has been idle for a beat:\n`start` is where its messages begin in the history. Its `reason` and `failureReason` are what\nended it, when something said."
6277
- },
6278
- {
6279
- "kind": "field",
6280
- "name": "base",
6281
- "type": {
6282
- "text": "number"
6283
- },
6284
- "privacy": "private",
6285
- "description": "History length when the last turn closed: where a turn the session did not start begins."
6286
- },
6287
- {
6288
- "kind": "field",
6289
- "name": "quiesceTimer",
6290
- "type": {
6291
- "text": "ReturnType<typeof setTimeout> | undefined"
6292
- },
6293
- "privacy": "private"
6294
- },
6295
- {
6296
- "kind": "field",
6297
- "name": "poller",
6298
- "type": {
6299
- "text": "ReturnType<typeof setInterval> | undefined"
6300
- },
6301
- "privacy": "private"
6302
- },
6303
- {
6304
- "kind": "field",
6305
- "name": "persistence",
6306
- "type": {
6307
- "text": "HeadlessPersistenceBinding | undefined"
6308
- },
6309
- "privacy": "private",
6310
- "readonly": true
6311
- },
6312
- {
6313
- "kind": "field",
6314
- "name": "lastProbe",
6315
- "type": {
6316
- "text": "Record<string, unknown>"
6317
- },
6318
- "privacy": "private",
6319
- "default": "{}"
6320
- },
6321
- {
6322
- "kind": "field",
6323
- "name": "lastAutopilot",
6208
+ "name": "field",
6324
6209
  "type": {
6325
6210
  "text": "string"
6326
- },
6327
- "privacy": "private",
6328
- "default": "''"
6211
+ }
6329
6212
  },
6330
6213
  {
6331
- "kind": "field",
6332
- "name": "disposed",
6214
+ "name": "op",
6333
6215
  "type": {
6334
- "text": "boolean"
6335
- },
6336
- "privacy": "private",
6337
- "default": "false"
6216
+ "text": "GenesisFilterOp"
6217
+ }
6338
6218
  },
6339
6219
  {
6340
- "kind": "field",
6341
- "name": "restoring",
6220
+ "name": "bound",
6342
6221
  "type": {
6343
- "text": "boolean"
6344
- },
6345
- "privacy": "private",
6346
- "default": "false",
6347
- "description": "While a restore loads the history, which is not new activity."
6348
- },
6349
- {
6350
- "kind": "method",
6351
- "name": "send",
6352
- "return": {
6353
- "type": {
6354
- "text": "HeadlessResult"
6355
- }
6356
- },
6357
- "parameters": [
6358
- {
6359
- "name": "text",
6360
- "type": {
6361
- "text": "string"
6362
- }
6363
- },
6364
- {
6365
- "name": "options",
6366
- "default": "{}",
6367
- "type": {
6368
- "text": "HeadlessSendOptions"
6369
- }
6370
- }
6371
- ],
6372
- "description": "Send the person's message, and start the turn. Returns as soon as the turn has started, not\nwhen it ends: a turn includes every interaction parked on the person, so it can run as long as\nthe journey. Its end is the `turn` event.\n\nRefused, never thrown, when the message is empty, or a turn is already running."
6373
- },
6374
- {
6375
- "kind": "method",
6376
- "name": "act",
6377
- "return": {
6378
- "type": {
6379
- "text": "Promise<HeadlessActResult>"
6380
- }
6381
- },
6382
- "parameters": [
6383
- {
6384
- "name": "interactionId",
6385
- "type": {
6386
- "text": "string"
6387
- }
6388
- },
6389
- {
6390
- "name": "action",
6391
- "type": {
6392
- "text": "string | number"
6393
- }
6394
- },
6395
- {
6396
- "name": "args",
6397
- "default": "{}",
6398
- "type": {
6399
- "text": "HeadlessActArgs"
6400
- }
6401
- }
6402
- ],
6403
- "description": "Run one of a pending interaction's actions as the person, as a click would (the answer is\ncredited `answeredBy: 'user'`). `action` is a number from the description's actions, or an\naction's name; `args` carry the text, the options (numbers or labels) or the form's fields it\ntakes. Refused, with the reason and what is enabled, when a claimant holds the interaction,\nthe action is unknown or disabled, or its arguments do not fit: nothing runs then.\n\nThe result is the driver's `InvokeResult`, plus `description` of the interaction when it is\nstill open."
6404
- },
6405
- {
6406
- "kind": "method",
6407
- "name": "resolve",
6408
- "return": {
6409
- "type": {
6410
- "text": "HeadlessResult"
6411
- }
6412
- },
6413
- "parameters": [
6414
- {
6415
- "name": "interactionId",
6416
- "type": {
6417
- "text": "string"
6418
- }
6419
- },
6420
- {
6421
- "name": "result",
6422
- "type": {
6423
- "text": "unknown"
6424
- }
6425
- }
6426
- ],
6427
- "description": "Settle a pending interaction raw, with `result` as the widget would have resolved it,\nbypassing its actions and everything they check: an escape hatch for a widget with no\ncontroller, or one that cannot be acted on. Logs `settled` with `raw: true` and records\n`headless.raw-resolved`. Refused when `allowRaw` is `false`, when the interaction is not\npending, or when a claimant holds it: as for `act`, the person takes it back first."
6428
- },
6429
- {
6430
- "kind": "method",
6431
- "name": "read",
6432
- "return": {
6433
- "type": {
6434
- "text": "Promise<HeadlessReadResult>"
6435
- }
6436
- },
6437
- "parameters": [
6438
- {
6439
- "name": "interactionId",
6440
- "type": {
6441
- "text": "string"
6442
- }
6443
- },
6444
- {
6445
- "name": "request",
6446
- "default": "{}",
6447
- "type": {
6448
- "text": "HeadlessReadRequest"
6449
- }
6450
- }
6451
- ],
6452
- "description": "Read from a pending interaction without changing it: one of its views, or (with `tool`) one of\nthe widget tools given to the session. The text is capped. A view the surface does not list is\nrefused, naming those it does, as the autopilot's `widget_read` does."
6453
- },
6454
- {
6455
- "kind": "method",
6456
- "name": "wait",
6457
- "return": {
6458
- "type": {
6459
- "text": "Promise<HeadlessWaitResult>"
6460
- }
6461
- },
6462
- "parameters": [
6463
- {
6464
- "name": "request",
6465
- "type": {
6466
- "text": "HeadlessWaitRequest"
6467
- }
6468
- }
6469
- ],
6470
- "description": "Wait for the log to say something, then return what it said. Resolves as soon as an event in\n`until` is in the log after `since` (immediately, when one already is), or at `maxWaitMs` with\nstatus `'working'`. Either way it returns every event after `since`, and `nextSeq`, the cursor\nfor the next call: poll with it and nothing is lost."
6471
- },
6472
- {
6473
- "kind": "method",
6474
- "name": "eventsSince",
6475
- "return": {
6476
- "type": {
6477
- "text": "readonly HeadlessEvent[]"
6478
- }
6479
- },
6480
- "parameters": [
6481
- {
6482
- "name": "since",
6483
- "default": "0"
6484
- }
6485
- ],
6486
- "description": "Every event logged after `since` (default: all the log keeps), without waiting."
6487
- },
6488
- {
6489
- "kind": "method",
6490
- "name": "state",
6491
- "return": {
6492
- "type": {
6493
- "text": "HeadlessState"
6494
- }
6495
- },
6496
- "description": "What is going on now: whether a turn runs, the interaction the person should answer first (and\nthe others open behind it), the autopilot, what it has cost, and the host's probe."
6497
- },
6498
- {
6499
- "kind": "method",
6500
- "name": "restore",
6501
- "return": {
6502
- "type": {
6503
- "text": "Promise<HeadlessRestoreOutcome | undefined>"
6504
- }
6505
- },
6506
- "description": "Restore the saved session for this key, as the browser's element does on mount (see\n`HeadlessPersistenceBinding.restore`). Call it before the first `send`. The restored history is\nthe starting point, not news: it is not reported as `message` events or as a turn, and the\nevent log and its cursors carry on from where they are. A no-op without `persistence`."
6507
- },
6508
- {
6509
- "kind": "method",
6510
- "name": "flush",
6511
- "return": {
6512
- "type": {
6513
- "text": "Promise<void>"
6514
- }
6515
- },
6516
- "description": "Save the session now: the snapshot, and the diagnostics appended since the last flush, rather\nthan at the next throttled save. A no-op without `persistence`."
6517
- },
6518
- {
6519
- "kind": "method",
6520
- "name": "debugLog",
6521
- "return": {
6522
- "type": {
6523
- "text": "Promise<DebugLog>"
6524
- }
6525
- },
6526
- "description": "The debug log, the document the browser's Download gives. With `persistence`, the log of the\nwhole session stitched from the stored stream with a fresh `meta-snapshot` (`lifetimeDebugLog`,\nthe same code); without, the current page's, from `buildDiagnosticEntries`. Never throws."
6527
- },
6528
- {
6529
- "kind": "method",
6530
- "name": "stop",
6531
- "return": {
6532
- "type": {
6533
- "text": "HeadlessResult"
6534
- }
6535
- },
6536
- "description": "Stop the running turn, when the driver can."
6537
- },
6538
- {
6539
- "kind": "method",
6540
- "name": "autopilot",
6541
- "return": {
6542
- "type": {
6543
- "text": "HeadlessResult"
6544
- }
6545
- },
6546
- "parameters": [
6547
- {
6548
- "name": "mode",
6549
- "type": {
6550
- "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
6551
- }
6552
- },
6553
- {
6554
- "name": "interactionId",
6555
- "optional": true,
6556
- "type": {
6557
- "text": "string"
6558
- }
6559
- }
6560
- ],
6561
- "description": "Pause, resume or stop the autopilot, when there is one. Pausing hands what it holds to the\nperson, which then appears as a `decision`.\n\n`'keepPaused'` is the hand-back banner's \"Keep paused\": it turns the autopilot's own hand-back\nof one interaction into an ordinary pause, so it does not take the question back once it is\nanswered. `interactionId` names the interaction handed back; omitted, it is the one the\nautopilot's own pause is waiting on (`state().autopilot`'s hand-back, the `decision` it left\nwith the person). Refused, with why, when the autopilot has handed nothing back, when\n`interactionId` is not the one it handed back, or when the host cannot keep paused; the host's\nown `keepPaused` would do nothing in those cases without saying so."
6562
- },
6563
- {
6564
- "kind": "method",
6565
- "name": "keepPaused",
6566
- "privacy": "private",
6567
- "return": {
6568
- "type": {
6569
- "text": "HeadlessResult"
6570
- }
6571
- },
6572
- "parameters": [
6573
- {
6574
- "name": "host",
6575
- "type": {
6576
- "text": "AutopilotLike"
6577
- }
6578
- },
6579
- {
6580
- "name": "interactionId",
6581
- "type": {
6582
- "text": "string | undefined"
6583
- }
6584
- }
6585
- ]
6586
- },
6587
- {
6588
- "kind": "method",
6589
- "name": "dispose",
6590
- "return": {
6591
- "type": {
6592
- "text": "void"
6593
- }
6594
- },
6595
- "description": "Detach: remove the interceptor and every subscription, and release anyone waiting."
6596
- },
6597
- {
6598
- "kind": "method",
6599
- "name": "listen",
6600
- "privacy": "private",
6601
- "return": {
6602
- "type": {
6603
- "text": "void"
6604
- }
6605
- },
6606
- "parameters": [
6607
- {
6608
- "name": "type",
6609
- "type": {
6610
- "text": "string"
6611
- }
6612
- },
6613
- {
6614
- "name": "handler",
6615
- "type": {
6616
- "text": "(e: Event) => void"
6617
- }
6618
- }
6619
- ]
6620
- },
6621
- {
6622
- "kind": "method",
6623
- "name": "history",
6624
- "privacy": "private",
6625
- "return": {
6626
- "type": {
6627
- "text": "readonly ChatMessage[]"
6628
- }
6222
+ "text": "string"
6629
6223
  }
6630
- },
6631
- {
6632
- "kind": "method",
6633
- "name": "onOpened",
6634
- "privacy": "private",
6635
- "return": {
6636
- "type": {
6637
- "text": "void"
6638
- }
6639
- },
6640
- "parameters": [
6641
- {
6642
- "name": "opened",
6643
- "type": {
6644
- "text": "InteractionOpened"
6645
- }
6646
- }
6647
- ],
6648
- "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
6649
- },
6650
- {
6651
- "kind": "method",
6652
- "name": "onSettled",
6653
- "privacy": "private",
6654
- "return": {
6655
- "type": {
6656
- "text": "void"
6657
- }
6658
- },
6659
- "parameters": [
6660
- {
6661
- "name": "detail",
6662
- "type": {
6663
- "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
6664
- }
6665
- }
6666
- ],
6667
- "description": "The driver says an interaction settled, by whatever route."
6668
- },
6669
- {
6670
- "kind": "method",
6671
- "name": "onEnded",
6672
- "privacy": "private",
6673
- "return": {
6674
- "type": {
6675
- "text": "void"
6676
- }
6677
- },
6678
- "parameters": [
6679
- {
6680
- "name": "t",
6681
- "type": {
6682
- "text": "Tracked"
6683
- }
6684
- }
6685
- ],
6686
- "description": "The interaction's context was disposed: if nothing said it settled, say it did."
6687
- },
6688
- {
6689
- "kind": "method",
6690
- "name": "settle",
6691
- "privacy": "private",
6692
- "return": {
6693
- "type": {
6694
- "text": "void"
6695
- }
6696
- },
6697
- "parameters": [
6698
- {
6699
- "name": "t",
6700
- "type": {
6701
- "text": "Tracked"
6702
- }
6703
- },
6704
- {
6705
- "name": "how",
6706
- "type": {
6707
- "text": "{ answeredBy?: string; resolvedItself?: boolean; auto?: boolean; raw?: boolean }"
6708
- }
6709
- }
6710
- ]
6711
- },
6712
- {
6713
- "kind": "method",
6714
- "name": "release",
6715
- "privacy": "private",
6716
- "return": {
6717
- "type": {
6718
- "text": "void"
6719
- }
6720
- },
6721
- "parameters": [
6722
- {
6723
- "name": "t",
6724
- "type": {
6725
- "text": "Tracked"
6726
- }
6727
- }
6728
- ]
6729
- },
6730
- {
6731
- "kind": "method",
6732
- "name": "onHistory",
6733
- "privacy": "private",
6734
- "return": {
6735
- "type": {
6736
- "text": "void"
6737
- }
6738
- },
6739
- "description": "New messages in the driver's history: report what the person would see of them."
6740
- },
6741
- {
6742
- "kind": "method",
6743
- "name": "reportMessages",
6744
- "privacy": "private",
6745
- "return": {
6746
- "type": {
6747
- "text": "void"
6748
- }
6749
- }
6750
- },
6751
- {
6752
- "kind": "method",
6753
- "name": "onAutopilot",
6754
- "privacy": "private",
6755
- "return": {
6756
- "type": {
6757
- "text": "void"
6758
- }
6759
- }
6760
- },
6761
- {
6762
- "kind": "method",
6763
- "name": "autopilotSignature",
6764
- "privacy": "private",
6765
- "return": {
6766
- "type": {
6767
- "text": "string"
6768
- }
6769
- }
6770
- },
6771
- {
6772
- "kind": "method",
6773
- "name": "describe",
6774
- "privacy": "private",
6775
- "return": {
6776
- "type": {
6777
- "text": "InteractionDescription"
6778
- }
6779
- },
6780
- "parameters": [
6781
- {
6782
- "name": "t",
6783
- "type": {
6784
- "text": "Tracked"
6785
- }
6786
- }
6787
- ]
6788
- },
6789
- {
6790
- "kind": "method",
6791
- "name": "evaluate",
6792
- "privacy": "private",
6793
- "return": {
6794
- "type": {
6795
- "text": "void"
6796
- }
6797
- },
6798
- "parameters": [
6799
- {
6800
- "name": "t",
6801
- "type": {
6802
- "text": "Tracked"
6803
- }
6804
- }
6805
- ],
6806
- "description": "Report where an interaction stands, when that has changed. A `decision` when the person holds\nit and can act; `working` when a claimant holds it or it is not ready yet. A `decision` is\nlogged again only when its description changed materially: who holds it, whether it is ready\nor has a controller, or which actions are enabled. The text and facts alone do not count."
6807
- },
6808
- {
6809
- "kind": "method",
6810
- "name": "autoSettle",
6811
- "privacy": "private",
6812
- "return": {
6813
- "type": {
6814
- "text": "boolean"
6815
- }
6816
- },
6817
- "parameters": [
6818
- {
6819
- "name": "t",
6820
- "type": {
6821
- "text": "Tracked"
6822
- }
6823
- }
6824
- ],
6825
- "description": "Settle a widget that settles itself in a browser, as it would on mounting. Once, and only when\nthe person holds it. Returns whether it settled it."
6826
- },
6827
- {
6828
- "kind": "method",
6829
- "name": "readTool",
6830
- "privacy": "private",
6831
- "return": {
6832
- "type": {
6833
- "text": "Promise<HeadlessReadResult>"
6834
- }
6835
- },
6836
- "parameters": [
6837
- {
6838
- "name": "t",
6839
- "type": {
6840
- "text": "Tracked"
6841
- }
6842
- },
6843
- {
6844
- "name": "name",
6845
- "type": {
6846
- "text": "string"
6847
- }
6848
- },
6849
- {
6850
- "name": "args",
6851
- "type": {
6852
- "text": "Record<string, unknown> | undefined"
6853
- }
6854
- }
6855
- ]
6856
- },
6857
- {
6858
- "kind": "method",
6859
- "name": "observe",
6860
- "privacy": "private",
6861
- "return": {
6862
- "type": {
6863
- "text": "void"
6864
- }
6865
- },
6866
- "description": "Notice a turn begin or end, whoever started it. The driver being busy (or a `send` in flight)\nis a turn; once it has been idle for a beat the turn is over and is reported, once. The beat\ncovers the gaps inside one turn, such as a hand-off continuing it, which are a microtask long.\nA turn that begins the instant another ends, with no idle between, is reported as one."
6867
- },
6868
- {
6869
- "kind": "method",
6870
- "name": "closeTurn",
6871
- "privacy": "private",
6872
- "return": {
6873
- "type": {
6874
- "text": "void"
6875
- }
6876
- },
6877
- "description": "Report the open turn as ended, unless the driver is busy again."
6878
- },
6879
- {
6880
- "kind": "method",
6881
- "name": "startPolling",
6882
- "privacy": "private",
6883
- "return": {
6884
- "type": {
6885
- "text": "void"
6886
- }
6887
- },
6888
- "description": "Without a shared bus nothing says a turn ended, so while one is open the driver is asked."
6889
- },
6890
- {
6891
- "kind": "method",
6892
- "name": "stopPolling",
6893
- "privacy": "private",
6894
- "return": {
6895
- "type": {
6896
- "text": "void"
6897
- }
6898
- }
6899
- },
6900
- {
6901
- "kind": "method",
6902
- "name": "logTurn",
6903
- "privacy": "private",
6904
- "return": {
6905
- "type": {
6906
- "text": "void"
6907
- }
6908
- },
6909
- "parameters": [
6910
- {
6911
- "name": "reason",
6912
- "type": {
6913
- "text": "string"
6914
- }
6915
- },
6916
- {
6917
- "name": "failureReason",
6918
- "type": {
6919
- "text": "string | undefined"
6920
- }
6921
- },
6922
- {
6923
- "name": "start",
6924
- "type": {
6925
- "text": "number"
6926
- }
6927
- }
6928
- ]
6929
- },
6930
- {
6931
- "kind": "method",
6932
- "name": "log",
6933
- "privacy": "private",
6934
- "return": {
6935
- "type": {
6936
- "text": "void"
6937
- }
6938
- },
6939
- "parameters": [
6940
- {
6941
- "name": "event",
6942
- "type": {
6943
- "text": "NewEvent"
6944
- }
6945
- }
6946
- ]
6947
- },
6948
- {
6949
- "kind": "method",
6950
- "name": "append",
6951
- "privacy": "private",
6952
- "return": {
6953
- "type": {
6954
- "text": "void"
6955
- }
6956
- },
6957
- "parameters": [
6958
- {
6959
- "name": "event",
6960
- "type": {
6961
- "text": "NewEvent"
6962
- }
6963
- }
6964
- ]
6965
- },
6966
- {
6967
- "kind": "method",
6968
- "name": "readProbe",
6969
- "privacy": "private",
6970
- "return": {
6971
- "type": {
6972
- "text": "Record<string, unknown>"
6973
- }
6974
- }
6975
- },
6976
- {
6977
- "kind": "method",
6978
- "name": "checkProbe",
6979
- "privacy": "private",
6980
- "return": {
6981
- "type": {
6982
- "text": "void"
6983
- }
6984
- },
6985
- "description": "Read the probe again; a change in any top-level value is a `probe` event."
6986
- },
6987
- {
6988
- "kind": "method",
6989
- "name": "waited",
6990
- "privacy": "private",
6991
- "return": {
6992
- "type": {
6993
- "text": "HeadlessWaitResult"
6994
- }
6995
- },
6996
- "parameters": [
6997
- {
6998
- "name": "since",
6999
- "type": {
7000
- "text": "number"
7001
- }
7002
- },
7003
- {
7004
- "name": "status",
7005
- "type": {
7006
- "text": "HeadlessWaitResult['status']"
7007
- }
7008
- }
7009
- ]
7010
6224
  }
7011
- ]
6225
+ ],
6226
+ "description": "Timestamp columns get the dateTime helpers, which take a `yyyyMMdd-HH:mm:ss` bound."
7012
6227
  }
7013
6228
  ],
7014
6229
  "exports": [
7015
6230
  {
7016
6231
  "kind": "js",
7017
- "name": "HeadlessSession",
6232
+ "name": "dateFragment",
7018
6233
  "declaration": {
7019
- "name": "HeadlessSession",
7020
- "module": "src/headless/headless-session.ts"
6234
+ "name": "dateFragment",
6235
+ "module": "src/genesis/criteria.ts"
6236
+ }
6237
+ },
6238
+ {
6239
+ "kind": "js",
6240
+ "name": "dateTimeFragment",
6241
+ "declaration": {
6242
+ "name": "dateTimeFragment",
6243
+ "module": "src/genesis/criteria.ts"
7021
6244
  }
7022
6245
  }
7023
6246
  ]
7024
6247
  },
7025
6248
  {
7026
6249
  "kind": "javascript-module",
7027
- "path": "src/headless/headless.types.ts",
6250
+ "path": "src/genesis/event-fields.ts",
7028
6251
  "declarations": [],
7029
6252
  "exports": []
7030
6253
  },
7031
6254
  {
7032
6255
  "kind": "javascript-module",
7033
- "path": "src/headless/index.ts",
6256
+ "path": "src/genesis/filter-fields.ts",
6257
+ "declarations": [],
6258
+ "exports": []
6259
+ },
6260
+ {
6261
+ "kind": "javascript-module",
6262
+ "path": "src/genesis/index.ts",
7034
6263
  "declarations": [],
7035
6264
  "exports": [
7036
6265
  {
7037
6266
  "kind": "js",
7038
- "name": "describeInteraction",
6267
+ "name": "GENESIS_AGENT_NAME",
7039
6268
  "declaration": {
7040
- "name": "describeInteraction",
7041
- "module": "./describe-interaction"
6269
+ "name": "GENESIS_AGENT_NAME",
6270
+ "module": "./register-genesis-assistant"
7042
6271
  }
7043
6272
  },
7044
6273
  {
7045
6274
  "kind": "js",
7046
- "name": "headlessCurrentDebugLog",
6275
+ "name": "registerGenesisAssistant",
7047
6276
  "declaration": {
7048
- "name": "headlessCurrentDebugLog",
7049
- "module": "./headless-debug"
6277
+ "name": "registerGenesisAssistant",
6278
+ "module": "./register-genesis-assistant"
7050
6279
  }
7051
6280
  },
7052
6281
  {
7053
6282
  "kind": "js",
7054
- "name": "headlessDiagnosticEntries",
6283
+ "name": "customCodeOf",
7055
6284
  "declaration": {
7056
- "name": "headlessDiagnosticEntries",
7057
- "module": "./headless-debug"
6285
+ "name": "customCodeOf",
6286
+ "module": "./config"
7058
6287
  }
7059
6288
  },
7060
6289
  {
7061
6290
  "kind": "js",
7062
- "name": "headlessMetaSnapshot",
6291
+ "name": "rowActionProblem",
7063
6292
  "declaration": {
7064
- "name": "headlessMetaSnapshot",
7065
- "module": "./headless-debug"
6293
+ "name": "rowActionProblem",
6294
+ "module": "./config"
7066
6295
  }
7067
6296
  },
7068
6297
  {
7069
6298
  "kind": "js",
7070
- "name": "HeadlessSession",
6299
+ "name": "GENESIS_AI_CONSUMES",
7071
6300
  "declaration": {
7072
- "name": "HeadlessSession",
7073
- "module": "./headless-session"
6301
+ "name": "GENESIS_AI_CONSUMES",
6302
+ "module": "./consumes"
7074
6303
  }
7075
6304
  },
7076
6305
  {
7077
6306
  "kind": "js",
7078
- "name": "AutopilotLike",
6307
+ "name": "validateGenesisAiConfig",
7079
6308
  "declaration": {
7080
- "name": "AutopilotLike",
7081
- "module": "./headless.types"
6309
+ "name": "validateGenesisAiConfig",
6310
+ "module": "./config"
7082
6311
  }
7083
6312
  },
7084
6313
  {
7085
6314
  "kind": "js",
7086
- "name": "DescribedAction",
6315
+ "name": "DroppedResource",
7087
6316
  "declaration": {
7088
- "name": "DescribedAction",
7089
- "module": "./headless.types"
6317
+ "name": "DroppedResource",
6318
+ "module": "./config"
7090
6319
  }
7091
6320
  },
7092
6321
  {
7093
6322
  "kind": "js",
7094
- "name": "DescribeInteractionInput",
6323
+ "name": "GenesisAiConfigCheck",
7095
6324
  "declaration": {
7096
- "name": "DescribeInteractionInput",
7097
- "module": "./headless.types"
6325
+ "name": "GenesisAiConfigCheck",
6326
+ "module": "./config"
7098
6327
  }
7099
6328
  },
7100
6329
  {
7101
6330
  "kind": "js",
7102
- "name": "HeadlessActArgs",
6331
+ "name": "GenesisFilter",
7103
6332
  "declaration": {
7104
- "name": "HeadlessActArgs",
7105
- "module": "./headless.types"
6333
+ "name": "GenesisFilter",
6334
+ "module": "./criteria"
6335
+ }
6336
+ },
6337
+ {
6338
+ "kind": "js",
6339
+ "name": "GenesisFilterField",
6340
+ "declaration": {
6341
+ "name": "GenesisFilterField",
6342
+ "module": "./criteria"
6343
+ }
6344
+ },
6345
+ {
6346
+ "kind": "js",
6347
+ "name": "GenesisFilterOp",
6348
+ "declaration": {
6349
+ "name": "GenesisFilterOp",
6350
+ "module": "./criteria"
6351
+ }
6352
+ },
6353
+ {
6354
+ "kind": "js",
6355
+ "name": "createGenesisResourceTools",
6356
+ "declaration": {
6357
+ "name": "createGenesisResourceTools",
6358
+ "module": "./resource-tools"
6359
+ }
6360
+ },
6361
+ {
6362
+ "kind": "js",
6363
+ "name": "GENESIS_DATA_SOURCE",
6364
+ "declaration": {
6365
+ "name": "GENESIS_DATA_SOURCE",
6366
+ "module": "./resource-tools"
7106
6367
  }
7107
6368
  },
7108
6369
  {
7109
6370
  "kind": "js",
7110
- "name": "HeadlessActResult",
6371
+ "name": "createGenesisWriteTools",
7111
6372
  "declaration": {
7112
- "name": "HeadlessActResult",
7113
- "module": "./headless.types"
6373
+ "name": "createGenesisWriteTools",
6374
+ "module": "./write-tools"
7114
6375
  }
7115
6376
  },
7116
6377
  {
7117
6378
  "kind": "js",
7118
- "name": "HeadlessDebugOptions",
6379
+ "name": "GenesisWriteDecision",
7119
6380
  "declaration": {
7120
- "name": "HeadlessDebugOptions",
7121
- "module": "./headless.types"
6381
+ "name": "GenesisWriteDecision",
6382
+ "module": "./write-tools"
7122
6383
  }
7123
6384
  },
7124
6385
  {
7125
6386
  "kind": "js",
7126
- "name": "HeadlessEvent",
6387
+ "name": "GenesisWriteResult",
7127
6388
  "declaration": {
7128
- "name": "HeadlessEvent",
7129
- "module": "./headless.types"
6389
+ "name": "GenesisWriteResult",
6390
+ "module": "./write-tools"
7130
6391
  }
7131
6392
  },
7132
6393
  {
7133
6394
  "kind": "js",
7134
- "name": "HeadlessEventBase",
6395
+ "name": "GenesisWriteRowStatus",
7135
6396
  "declaration": {
7136
- "name": "HeadlessEventBase",
7137
- "module": "./headless.types"
6397
+ "name": "GenesisWriteRowStatus",
6398
+ "module": "./write-tools"
7138
6399
  }
7139
6400
  },
7140
6401
  {
7141
6402
  "kind": "js",
7142
- "name": "HeadlessEventType",
6403
+ "name": "GenesisWriteToolsOptions",
7143
6404
  "declaration": {
7144
- "name": "HeadlessEventType",
7145
- "module": "./headless.types"
6405
+ "name": "GenesisWriteToolsOptions",
6406
+ "module": "./write-tools"
7146
6407
  }
7147
6408
  },
7148
6409
  {
7149
6410
  "kind": "js",
7150
- "name": "HeadlessPersistence",
6411
+ "name": "GENESIS_WRITE_REVIEW",
7151
6412
  "declaration": {
7152
- "name": "HeadlessPersistence",
7153
- "module": "./headless.types"
6413
+ "name": "GENESIS_WRITE_REVIEW",
6414
+ "module": "./write-review/write-review"
7154
6415
  }
7155
6416
  },
7156
6417
  {
7157
6418
  "kind": "js",
7158
- "name": "HeadlessPersistenceBinding",
6419
+ "name": "GenesisWriteReview",
7159
6420
  "declaration": {
7160
- "name": "HeadlessPersistenceBinding",
7161
- "module": "./headless.types"
6421
+ "name": "GenesisWriteReview",
6422
+ "module": "./write-review/write-review"
7162
6423
  }
7163
6424
  },
7164
6425
  {
7165
6426
  "kind": "js",
7166
- "name": "HeadlessPersistenceHost",
6427
+ "name": "GenesisChangeRequest",
7167
6428
  "declaration": {
7168
- "name": "HeadlessPersistenceHost",
7169
- "module": "./headless.types"
6429
+ "name": "GenesisChangeRequest",
6430
+ "module": "./review-payload"
7170
6431
  }
7171
6432
  },
7172
6433
  {
7173
6434
  "kind": "js",
7174
- "name": "HeadlessReadRequest",
6435
+ "name": "GenesisReviewPayload",
7175
6436
  "declaration": {
7176
- "name": "HeadlessReadRequest",
7177
- "module": "./headless.types"
6437
+ "name": "GenesisReviewPayload",
6438
+ "module": "./review-payload"
7178
6439
  }
7179
6440
  },
7180
6441
  {
7181
6442
  "kind": "js",
7182
- "name": "HeadlessReadResult",
6443
+ "name": "GenesisWriteReviewCompletedEventDetail",
7183
6444
  "declaration": {
7184
- "name": "HeadlessReadResult",
7185
- "module": "./headless.types"
6445
+ "name": "GenesisWriteReviewCompletedEventDetail",
6446
+ "module": "./review-payload"
7186
6447
  }
7187
6448
  },
7188
6449
  {
7189
6450
  "kind": "js",
7190
- "name": "HeadlessResult",
6451
+ "name": "GenesisReadResult",
7191
6452
  "declaration": {
7192
- "name": "HeadlessResult",
7193
- "module": "./headless.types"
6453
+ "name": "GenesisReadResult",
6454
+ "module": "./resource-tools"
7194
6455
  }
7195
6456
  },
7196
6457
  {
7197
6458
  "kind": "js",
7198
- "name": "HeadlessRestoreOutcome",
6459
+ "name": "GenesisResourceTools",
7199
6460
  "declaration": {
7200
- "name": "HeadlessRestoreOutcome",
7201
- "module": "./headless.types"
6461
+ "name": "GenesisResourceTools",
6462
+ "module": "./resource-tools"
7202
6463
  }
7203
6464
  },
7204
6465
  {
7205
6466
  "kind": "js",
7206
- "name": "HeadlessSendOptions",
6467
+ "name": "GenesisResourceToolsOptions",
7207
6468
  "declaration": {
7208
- "name": "HeadlessSendOptions",
7209
- "module": "./headless.types"
6469
+ "name": "GenesisResourceToolsOptions",
6470
+ "module": "./resource-tools"
7210
6471
  }
7211
6472
  },
7212
6473
  {
7213
6474
  "kind": "js",
7214
- "name": "HeadlessSessionOptions",
6475
+ "name": "GenesisToolError",
7215
6476
  "declaration": {
7216
- "name": "HeadlessSessionOptions",
7217
- "module": "./headless.types"
6477
+ "name": "GenesisToolError",
6478
+ "module": "./resource-tools"
7218
6479
  }
7219
6480
  },
7220
6481
  {
7221
6482
  "kind": "js",
7222
- "name": "HeadlessState",
6483
+ "name": "GENESIS_EVENT_OPS",
7223
6484
  "declaration": {
7224
- "name": "HeadlessState",
7225
- "module": "./headless.types"
6485
+ "name": "GENESIS_EVENT_OPS",
6486
+ "module": "./types"
7226
6487
  }
7227
6488
  },
7228
6489
  {
7229
6490
  "kind": "js",
7230
- "name": "HeadlessWaitRequest",
6491
+ "name": "GenesisAiConfig",
7231
6492
  "declaration": {
7232
- "name": "HeadlessWaitRequest",
7233
- "module": "./headless.types"
6493
+ "name": "GenesisAiConfig",
6494
+ "module": "./types"
7234
6495
  }
7235
6496
  },
7236
6497
  {
7237
6498
  "kind": "js",
7238
- "name": "HeadlessWaitResult",
6499
+ "name": "GenesisAiConsumes",
7239
6500
  "declaration": {
7240
- "name": "HeadlessWaitResult",
7241
- "module": "./headless.types"
6501
+ "name": "GenesisAiConsumes",
6502
+ "module": "./types"
7242
6503
  }
7243
6504
  },
7244
6505
  {
7245
6506
  "kind": "js",
7246
- "name": "InteractionDescription",
6507
+ "name": "GenesisAiResource",
7247
6508
  "declaration": {
7248
- "name": "InteractionDescription",
7249
- "module": "./headless.types"
6509
+ "name": "GenesisAiResource",
6510
+ "module": "./types"
7250
6511
  }
7251
6512
  },
7252
6513
  {
7253
6514
  "kind": "js",
7254
- "name": "PendingSummary",
6515
+ "name": "GenesisAssistantExtensions",
7255
6516
  "declaration": {
7256
- "name": "PendingSummary",
7257
- "module": "./headless.types"
6517
+ "name": "GenesisAssistantExtensions",
6518
+ "module": "./types"
7258
6519
  }
7259
- }
7260
- ]
7261
- },
7262
- {
7263
- "kind": "javascript-module",
7264
- "path": "src/genesis/calendar.ts",
7265
- "declarations": [],
7266
- "exports": []
7267
- },
7268
- {
7269
- "kind": "javascript-module",
7270
- "path": "src/genesis/config.ts",
7271
- "declarations": [
7272
- {
7273
- "kind": "variable",
7274
- "name": "DEFAULT_MAX_ROWS",
7275
- "type": {
7276
- "text": "number"
7277
- },
7278
- "default": "50",
7279
- "description": "The default read cap, and the ceiling the config may raise it to."
7280
- },
7281
- {
7282
- "kind": "variable",
7283
- "name": "MAX_ROWS_CEILING",
7284
- "type": {
7285
- "text": "number"
7286
- },
7287
- "default": "1000"
7288
- },
7289
- {
7290
- "kind": "function",
7291
- "name": "toolNameOf",
7292
- "return": {
7293
- "type": {
7294
- "text": "string"
7295
- }
7296
- },
7297
- "parameters": [
7298
- {
7299
- "name": "resourceName",
7300
- "type": {
7301
- "text": "string"
7302
- }
7303
- }
7304
- ],
7305
- "description": "The model-facing tool name for a resource. Deterministic and collision-free (resource names\nare unique), and trivially mapped back to the resource in a debug log. What the tool is FOR\nreaches the model through its description, not its name."
7306
- },
7307
- {
7308
- "kind": "function",
7309
- "name": "rowActionProblem",
7310
- "return": {
7311
- "type": {
7312
- "text": "string | undefined"
7313
- }
7314
- },
7315
- "parameters": [
7316
- {
7317
- "name": "resource",
7318
- "type": {
7319
- "text": "Partial<GenesisAiResource> | null"
7320
- }
7321
- },
7322
- {
7323
- "name": "requestNames",
7324
- "type": {
7325
- "text": "ReadonlySet<string>"
7326
- },
7327
- "description": "The request resources whose rows can be read. A row action reads its rows\nthrough `REQ_<entity>`, and without one there is no row to review."
7328
- },
7329
- {
7330
- "name": "whyNotReadable",
7331
- "default": "notReadableReason({})",
7332
- "type": {
7333
- "text": "(name: string) => string"
7334
- },
7335
- "description": "Why a request is not among `requestNames`, when the caller knows: it was\nleft out, has no read tool, or is a query. Without it, the request is said to be missing."
7336
- }
7337
- ],
7338
- "description": "What is wrong with a resource's row-action fields (contracts C-18.7.2), if anything."
7339
6520
  },
7340
6521
  {
7341
- "kind": "function",
7342
- "name": "validateGenesisAiConfig",
7343
- "return": {
7344
- "type": {
7345
- "text": "GenesisAiConfigCheck"
7346
- }
7347
- },
7348
- "parameters": [
7349
- {
7350
- "name": "config",
7351
- "type": {
7352
- "text": "unknown"
7353
- }
7354
- }
7355
- ],
7356
- "description": "Checks a generated AI config before anything is registered, and says what can be kept."
6522
+ "kind": "js",
6523
+ "name": "GenesisAssistantRegistration",
6524
+ "declaration": {
6525
+ "name": "GenesisAssistantRegistration",
6526
+ "module": "./types"
6527
+ }
7357
6528
  },
7358
- {
7359
- "kind": "function",
7360
- "name": "customCodeOf",
7361
- "return": {
7362
- "type": {
7363
- "text": "GenesisCustomCodeCheck"
7364
- }
7365
- },
7366
- "parameters": [
7367
- {
7368
- "name": "resource",
7369
- "type": {
7370
- "text": "GenesisAiResource"
7371
- }
7372
- }
7373
- ],
7374
- "description": "A resource's `customCode` as it is used: the one reader of the field."
7375
- }
7376
- ],
7377
- "exports": [
7378
6529
  {
7379
6530
  "kind": "js",
7380
- "name": "DEFAULT_MAX_ROWS",
6531
+ "name": "GenesisCustomCode",
7381
6532
  "declaration": {
7382
- "name": "DEFAULT_MAX_ROWS",
7383
- "module": "src/genesis/config.ts"
6533
+ "name": "GenesisCustomCode",
6534
+ "module": "./types"
7384
6535
  }
7385
6536
  },
7386
6537
  {
7387
6538
  "kind": "js",
7388
- "name": "MAX_ROWS_CEILING",
6539
+ "name": "GenesisCustomCodeCheck",
7389
6540
  "declaration": {
7390
- "name": "MAX_ROWS_CEILING",
7391
- "module": "src/genesis/config.ts"
6541
+ "name": "GenesisCustomCodeCheck",
6542
+ "module": "./types"
7392
6543
  }
7393
6544
  },
7394
6545
  {
7395
6546
  "kind": "js",
7396
- "name": "toolNameOf",
6547
+ "name": "GenesisEventOp",
7397
6548
  "declaration": {
7398
- "name": "toolNameOf",
7399
- "module": "src/genesis/config.ts"
6549
+ "name": "GenesisEventOp",
6550
+ "module": "./types"
7400
6551
  }
7401
6552
  },
7402
6553
  {
7403
6554
  "kind": "js",
7404
- "name": "rowActionProblem",
6555
+ "name": "GenesisReference",
7405
6556
  "declaration": {
7406
- "name": "rowActionProblem",
7407
- "module": "src/genesis/config.ts"
6557
+ "name": "GenesisReference",
6558
+ "module": "./types"
7408
6559
  }
7409
6560
  },
7410
6561
  {
7411
6562
  "kind": "js",
7412
- "name": "validateGenesisAiConfig",
6563
+ "name": "GenesisResourceKind",
7413
6564
  "declaration": {
7414
- "name": "validateGenesisAiConfig",
7415
- "module": "src/genesis/config.ts"
6565
+ "name": "GenesisResourceKind",
6566
+ "module": "./types"
7416
6567
  }
7417
6568
  },
7418
6569
  {
7419
6570
  "kind": "js",
7420
- "name": "customCodeOf",
6571
+ "name": "GenesisRowEffect",
7421
6572
  "declaration": {
7422
- "name": "customCodeOf",
7423
- "module": "src/genesis/config.ts"
6573
+ "name": "GenesisRowEffect",
6574
+ "module": "./types"
7424
6575
  }
7425
- }
7426
- ]
7427
- },
7428
- {
7429
- "kind": "javascript-module",
7430
- "path": "src/genesis/consumes.ts",
7431
- "declarations": [
7432
- {
7433
- "kind": "variable",
7434
- "name": "GENESIS_AI_CONSUMES",
7435
- "type": {
7436
- "text": "GenesisAiConsumes"
7437
- },
7438
- "description": "What this version of the assistant reads from a generated AI config: the resource kinds it\naccepts, the resource fields its validator or a tool reads, the `vendor` and `tier` values it\naccepts, and the row-action shapes it runs."
7439
- }
7440
- ],
7441
- "exports": [
6576
+ },
7442
6577
  {
7443
6578
  "kind": "js",
7444
- "name": "GenesisAiConsumes",
6579
+ "name": "GenesisRowInput",
7445
6580
  "declaration": {
7446
- "name": "GenesisAiConsumes",
6581
+ "name": "GenesisRowInput",
7447
6582
  "module": "./types"
7448
6583
  }
7449
6584
  },
7450
6585
  {
7451
6586
  "kind": "js",
7452
- "name": "GENESIS_AI_CONSUMES",
6587
+ "name": "RegisterGenesisAssistantOptions",
7453
6588
  "declaration": {
7454
- "name": "GENESIS_AI_CONSUMES",
7455
- "module": "src/genesis/consumes.ts"
6589
+ "name": "RegisterGenesisAssistantOptions",
6590
+ "module": "./types"
7456
6591
  }
7457
6592
  }
7458
6593
  ]
7459
6594
  },
7460
6595
  {
7461
6596
  "kind": "javascript-module",
7462
- "path": "src/genesis/criteria.ts",
6597
+ "path": "src/genesis/reference-check.ts",
7463
6598
  "declarations": [
7464
6599
  {
7465
6600
  "kind": "function",
7466
- "name": "dateFragment",
6601
+ "name": "tableOf",
7467
6602
  "return": {
7468
6603
  "type": {
7469
- "text": "string | undefined"
6604
+ "text": "string"
7470
6605
  }
7471
6606
  },
7472
6607
  "parameters": [
7473
6608
  {
7474
- "name": "field",
6609
+ "name": "resource",
7475
6610
  "type": {
7476
6611
  "text": "string"
7477
6612
  }
7478
- },
6613
+ }
6614
+ ],
6615
+ "description": "The table a `REQ_<T>` reads."
6616
+ },
6617
+ {
6618
+ "kind": "function",
6619
+ "name": "notAcceptedHere",
6620
+ "return": {
6621
+ "type": {
6622
+ "text": "string"
6623
+ }
6624
+ },
6625
+ "parameters": [
7479
6626
  {
7480
- "name": "op",
6627
+ "name": "field",
7481
6628
  "type": {
7482
- "text": "GenesisFilterOp"
6629
+ "text": "string"
7483
6630
  }
7484
6631
  },
7485
6632
  {
7486
- "name": "date",
6633
+ "name": "{ resource, reason }",
7487
6634
  "type": {
7488
- "text": "string"
6635
+ "text": "UncheckedField"
7489
6636
  }
7490
6637
  }
7491
- ]
6638
+ ],
6639
+ "description": "What an insert says about a value it cannot check."
7492
6640
  },
7493
6641
  {
7494
6642
  "kind": "function",
7495
- "name": "dateTimeFragment",
6643
+ "name": "cannotBeChanged",
7496
6644
  "return": {
7497
6645
  "type": {
7498
- "text": "string | undefined"
6646
+ "text": "string"
7499
6647
  }
7500
6648
  },
7501
6649
  "parameters": [
@@ -7506,217 +6654,223 @@
7506
6654
  }
7507
6655
  },
7508
6656
  {
7509
- "name": "op",
7510
- "type": {
7511
- "text": "GenesisFilterOp"
7512
- }
7513
- },
7514
- {
7515
- "name": "bound",
6657
+ "name": "{ resource, reason }",
7516
6658
  "type": {
7517
- "text": "string"
6659
+ "text": "UncheckedField"
7518
6660
  }
7519
6661
  }
7520
6662
  ],
7521
- "description": "Timestamp columns get the dateTime helpers, which take a `yyyyMMdd-HH:mm:ss` bound."
6663
+ "description": "What a modify says about a new value it cannot check."
7522
6664
  }
7523
6665
  ],
7524
6666
  "exports": [
7525
6667
  {
7526
6668
  "kind": "js",
7527
- "name": "dateFragment",
7528
- "declaration": {
7529
- "name": "dateFragment",
7530
- "module": "src/genesis/criteria.ts"
7531
- }
7532
- },
7533
- {
7534
- "kind": "js",
7535
- "name": "dateTimeFragment",
7536
- "declaration": {
7537
- "name": "dateTimeFragment",
7538
- "module": "src/genesis/criteria.ts"
7539
- }
7540
- }
7541
- ]
7542
- },
7543
- {
7544
- "kind": "javascript-module",
7545
- "path": "src/genesis/event-fields.ts",
7546
- "declarations": [],
7547
- "exports": []
7548
- },
7549
- {
7550
- "kind": "javascript-module",
7551
- "path": "src/genesis/filter-fields.ts",
7552
- "declarations": [],
7553
- "exports": []
7554
- },
7555
- {
7556
- "kind": "javascript-module",
7557
- "path": "src/genesis/index.ts",
7558
- "declarations": [],
7559
- "exports": [
7560
- {
7561
- "kind": "js",
7562
- "name": "GENESIS_AGENT_NAME",
7563
- "declaration": {
7564
- "name": "GENESIS_AGENT_NAME",
7565
- "module": "./register-genesis-assistant"
7566
- }
7567
- },
7568
- {
7569
- "kind": "js",
7570
- "name": "registerGenesisAssistant",
7571
- "declaration": {
7572
- "name": "registerGenesisAssistant",
7573
- "module": "./register-genesis-assistant"
7574
- }
7575
- },
7576
- {
7577
- "kind": "js",
7578
- "name": "customCodeOf",
7579
- "declaration": {
7580
- "name": "customCodeOf",
7581
- "module": "./config"
7582
- }
7583
- },
7584
- {
7585
- "kind": "js",
7586
- "name": "rowActionProblem",
7587
- "declaration": {
7588
- "name": "rowActionProblem",
7589
- "module": "./config"
7590
- }
7591
- },
7592
- {
7593
- "kind": "js",
7594
- "name": "GENESIS_AI_CONSUMES",
7595
- "declaration": {
7596
- "name": "GENESIS_AI_CONSUMES",
7597
- "module": "./consumes"
7598
- }
7599
- },
7600
- {
7601
- "kind": "js",
7602
- "name": "validateGenesisAiConfig",
7603
- "declaration": {
7604
- "name": "validateGenesisAiConfig",
7605
- "module": "./config"
7606
- }
7607
- },
7608
- {
7609
- "kind": "js",
7610
- "name": "DroppedResource",
7611
- "declaration": {
7612
- "name": "DroppedResource",
7613
- "module": "./config"
7614
- }
7615
- },
7616
- {
7617
- "kind": "js",
7618
- "name": "GenesisAiConfigCheck",
6669
+ "name": "tableOf",
7619
6670
  "declaration": {
7620
- "name": "GenesisAiConfigCheck",
7621
- "module": "./config"
6671
+ "name": "tableOf",
6672
+ "module": "src/genesis/reference-check.ts"
7622
6673
  }
7623
6674
  },
7624
6675
  {
7625
6676
  "kind": "js",
7626
- "name": "GenesisFilter",
6677
+ "name": "notAcceptedHere",
7627
6678
  "declaration": {
7628
- "name": "GenesisFilter",
7629
- "module": "./criteria"
6679
+ "name": "notAcceptedHere",
6680
+ "module": "src/genesis/reference-check.ts"
7630
6681
  }
7631
6682
  },
7632
6683
  {
7633
6684
  "kind": "js",
7634
- "name": "GenesisFilterField",
6685
+ "name": "cannotBeChanged",
7635
6686
  "declaration": {
7636
- "name": "GenesisFilterField",
7637
- "module": "./criteria"
6687
+ "name": "cannotBeChanged",
6688
+ "module": "src/genesis/reference-check.ts"
7638
6689
  }
7639
- },
6690
+ }
6691
+ ]
6692
+ },
6693
+ {
6694
+ "kind": "javascript-module",
6695
+ "path": "src/genesis/reference-existence.ts",
6696
+ "declarations": [
7640
6697
  {
7641
- "kind": "js",
7642
- "name": "GenesisFilterOp",
7643
- "declaration": {
7644
- "name": "GenesisFilterOp",
7645
- "module": "./criteria"
7646
- }
6698
+ "kind": "variable",
6699
+ "name": "MAX_REFERENCE_CHECKS",
6700
+ "type": {
6701
+ "text": "number"
6702
+ },
6703
+ "default": "50",
6704
+ "description": "The most distinct values one call may check."
7647
6705
  },
7648
6706
  {
7649
- "kind": "js",
7650
- "name": "createGenesisResourceTools",
7651
- "declaration": {
7652
- "name": "createGenesisResourceTools",
7653
- "module": "./resource-tools"
7654
- }
7655
- },
6707
+ "kind": "function",
6708
+ "name": "withReferenceProblems",
6709
+ "return": {
6710
+ "type": {
6711
+ "text": "T[]"
6712
+ }
6713
+ },
6714
+ "parameters": [
6715
+ {
6716
+ "name": "rows",
6717
+ "type": {
6718
+ "text": "readonly T[]"
6719
+ }
6720
+ },
6721
+ {
6722
+ "name": "problems",
6723
+ "type": {
6724
+ "text": "ReadonlyMap<number, string[]>"
6725
+ }
6726
+ }
6727
+ ],
6728
+ "description": "The rows with what the check found added to their problems."
6729
+ }
6730
+ ],
6731
+ "exports": [
7656
6732
  {
7657
6733
  "kind": "js",
7658
- "name": "GENESIS_DATA_SOURCE",
6734
+ "name": "MAX_REFERENCE_CHECKS",
7659
6735
  "declaration": {
7660
- "name": "GENESIS_DATA_SOURCE",
7661
- "module": "./resource-tools"
6736
+ "name": "MAX_REFERENCE_CHECKS",
6737
+ "module": "src/genesis/reference-existence.ts"
7662
6738
  }
7663
6739
  },
7664
6740
  {
7665
6741
  "kind": "js",
7666
- "name": "createGenesisWriteTools",
6742
+ "name": "withReferenceProblems",
7667
6743
  "declaration": {
7668
- "name": "createGenesisWriteTools",
7669
- "module": "./write-tools"
6744
+ "name": "withReferenceProblems",
6745
+ "module": "src/genesis/reference-existence.ts"
7670
6746
  }
7671
- },
6747
+ }
6748
+ ]
6749
+ },
6750
+ {
6751
+ "kind": "javascript-module",
6752
+ "path": "src/genesis/register-genesis-assistant.ts",
6753
+ "declarations": [
7672
6754
  {
7673
- "kind": "js",
7674
- "name": "GenesisWriteDecision",
7675
- "declaration": {
7676
- "name": "GenesisWriteDecision",
7677
- "module": "./write-tools"
7678
- }
6755
+ "kind": "variable",
6756
+ "name": "GENESIS_AGENT_NAME",
6757
+ "type": {
6758
+ "text": "string"
6759
+ },
6760
+ "default": "'genesis-assistant'",
6761
+ "description": "The name of the agent registerGenesisAssistant builds."
7679
6762
  },
7680
6763
  {
7681
- "kind": "js",
7682
- "name": "GenesisWriteResult",
7683
- "declaration": {
7684
- "name": "GenesisWriteResult",
7685
- "module": "./write-tools"
7686
- }
7687
- },
6764
+ "kind": "function",
6765
+ "name": "registerGenesisAssistant",
6766
+ "return": {
6767
+ "type": {
6768
+ "text": "GenesisAssistantRegistration"
6769
+ }
6770
+ },
6771
+ "parameters": [
6772
+ {
6773
+ "name": "options",
6774
+ "type": {
6775
+ "text": "RegisterGenesisAssistantOptions"
6776
+ }
6777
+ }
6778
+ ],
6779
+ "description": "Sets up the AI assistant for a Genesis app from its generated AI config: providers by tier,\nand one agent whose tools read the app's resources."
6780
+ }
6781
+ ],
6782
+ "exports": [
7688
6783
  {
7689
6784
  "kind": "js",
7690
- "name": "GenesisWriteRowStatus",
6785
+ "name": "GENESIS_AGENT_NAME",
7691
6786
  "declaration": {
7692
- "name": "GenesisWriteRowStatus",
7693
- "module": "./write-tools"
6787
+ "name": "GENESIS_AGENT_NAME",
6788
+ "module": "src/genesis/register-genesis-assistant.ts"
7694
6789
  }
7695
6790
  },
7696
6791
  {
7697
6792
  "kind": "js",
7698
- "name": "GenesisWriteToolsOptions",
6793
+ "name": "registerGenesisAssistant",
7699
6794
  "declaration": {
7700
- "name": "GenesisWriteToolsOptions",
7701
- "module": "./write-tools"
6795
+ "name": "registerGenesisAssistant",
6796
+ "module": "src/genesis/register-genesis-assistant.ts"
7702
6797
  }
6798
+ }
6799
+ ]
6800
+ },
6801
+ {
6802
+ "kind": "javascript-module",
6803
+ "path": "src/genesis/resource-tools.ts",
6804
+ "declarations": [
6805
+ {
6806
+ "kind": "variable",
6807
+ "name": "GENESIS_DATA_SOURCE",
6808
+ "type": {
6809
+ "text": "string"
6810
+ },
6811
+ "default": "'app-database'",
6812
+ "description": "The provenance stamped on everything a tool returns from the app (ADR P9). Rows are written by\nthe app's other users, so the model must treat their text as data, never as instructions; the\nsystem prompt says the same thing in words."
7703
6813
  },
6814
+ {
6815
+ "kind": "function",
6816
+ "name": "createGenesisResourceTools",
6817
+ "return": {
6818
+ "type": {
6819
+ "text": "GenesisResourceTools"
6820
+ }
6821
+ },
6822
+ "parameters": [
6823
+ {
6824
+ "name": "resources",
6825
+ "type": {
6826
+ "text": "readonly GenesisAiResource[]"
6827
+ }
6828
+ },
6829
+ {
6830
+ "name": "options",
6831
+ "default": "{}",
6832
+ "type": {
6833
+ "text": "GenesisResourceToolsOptions"
6834
+ }
6835
+ }
6836
+ ],
6837
+ "description": "Builds the assistant's tools from an app's resources."
6838
+ }
6839
+ ],
6840
+ "exports": [
7704
6841
  {
7705
6842
  "kind": "js",
7706
- "name": "GENESIS_WRITE_REVIEW",
6843
+ "name": "GENESIS_DATA_SOURCE",
7707
6844
  "declaration": {
7708
- "name": "GENESIS_WRITE_REVIEW",
7709
- "module": "./write-review/write-review"
6845
+ "name": "GENESIS_DATA_SOURCE",
6846
+ "module": "src/genesis/resource-tools.ts"
7710
6847
  }
7711
6848
  },
7712
6849
  {
7713
6850
  "kind": "js",
7714
- "name": "GenesisWriteReview",
6851
+ "name": "createGenesisResourceTools",
7715
6852
  "declaration": {
7716
- "name": "GenesisWriteReview",
7717
- "module": "./write-review/write-review"
6853
+ "name": "createGenesisResourceTools",
6854
+ "module": "src/genesis/resource-tools.ts"
7718
6855
  }
7719
- },
6856
+ }
6857
+ ]
6858
+ },
6859
+ {
6860
+ "kind": "javascript-module",
6861
+ "path": "src/genesis/review-model.ts",
6862
+ "declarations": [
6863
+ {
6864
+ "kind": "variable",
6865
+ "name": "LONG_VALUE",
6866
+ "type": {
6867
+ "text": "number"
6868
+ },
6869
+ "default": "24",
6870
+ "description": "Past this many characters a value wraps; at or under it, it stays on one line."
6871
+ }
6872
+ ],
6873
+ "exports": [
7720
6874
  {
7721
6875
  "kind": "js",
7722
6876
  "name": "GenesisChangeRequest",
@@ -7735,713 +6889,1559 @@
7735
6889
  },
7736
6890
  {
7737
6891
  "kind": "js",
7738
- "name": "GenesisWriteReviewCompletedEventDetail",
6892
+ "name": "LONG_VALUE",
7739
6893
  "declaration": {
7740
- "name": "GenesisWriteReviewCompletedEventDetail",
7741
- "module": "./review-payload"
6894
+ "name": "LONG_VALUE",
6895
+ "module": "src/genesis/review-model.ts"
7742
6896
  }
7743
- },
6897
+ }
6898
+ ]
6899
+ },
6900
+ {
6901
+ "kind": "javascript-module",
6902
+ "path": "src/genesis/review-payload.ts",
6903
+ "declarations": [],
6904
+ "exports": []
6905
+ },
6906
+ {
6907
+ "kind": "javascript-module",
6908
+ "path": "src/genesis/row-source.ts",
6909
+ "declarations": [],
6910
+ "exports": []
6911
+ },
6912
+ {
6913
+ "kind": "javascript-module",
6914
+ "path": "src/genesis/serialisable.ts",
6915
+ "declarations": [],
6916
+ "exports": []
6917
+ },
6918
+ {
6919
+ "kind": "javascript-module",
6920
+ "path": "src/genesis/server-text.ts",
6921
+ "declarations": [
7744
6922
  {
7745
- "kind": "js",
7746
- "name": "GenesisReadResult",
7747
- "declaration": {
7748
- "name": "GenesisReadResult",
7749
- "module": "./resource-tools"
7750
- }
6923
+ "kind": "function",
6924
+ "name": "readsLikeFieldName",
6925
+ "return": {
6926
+ "type": {
6927
+ "text": "boolean"
6928
+ }
6929
+ },
6930
+ "parameters": [
6931
+ {
6932
+ "name": "text",
6933
+ "type": {
6934
+ "text": "string"
6935
+ }
6936
+ }
6937
+ ],
6938
+ "description": "Whether text is a Genesis identifier, the FIELD_NAME shape. @internal"
7751
6939
  },
7752
6940
  {
7753
- "kind": "js",
7754
- "name": "GenesisResourceTools",
7755
- "declaration": {
7756
- "name": "GenesisResourceTools",
7757
- "module": "./resource-tools"
7758
- }
7759
- },
6941
+ "kind": "function",
6942
+ "name": "describeFailure",
6943
+ "return": {
6944
+ "type": {
6945
+ "text": "string | undefined"
6946
+ }
6947
+ },
6948
+ "parameters": [
6949
+ {
6950
+ "name": "error",
6951
+ "type": {
6952
+ "text": "unknown"
6953
+ }
6954
+ }
6955
+ ],
6956
+ "description": "Whatever a rejection turns out to be, as a sentence."
6957
+ }
6958
+ ],
6959
+ "exports": [
7760
6960
  {
7761
6961
  "kind": "js",
7762
- "name": "GenesisResourceToolsOptions",
6962
+ "name": "readsLikeFieldName",
7763
6963
  "declaration": {
7764
- "name": "GenesisResourceToolsOptions",
7765
- "module": "./resource-tools"
6964
+ "name": "readsLikeFieldName",
6965
+ "module": "src/genesis/server-text.ts"
7766
6966
  }
7767
6967
  },
7768
6968
  {
7769
6969
  "kind": "js",
7770
- "name": "GenesisToolError",
6970
+ "name": "describeFailure",
7771
6971
  "declaration": {
7772
- "name": "GenesisToolError",
7773
- "module": "./resource-tools"
6972
+ "name": "describeFailure",
6973
+ "module": "src/genesis/server-text.ts"
7774
6974
  }
7775
- },
6975
+ }
6976
+ ]
6977
+ },
6978
+ {
6979
+ "kind": "javascript-module",
6980
+ "path": "src/genesis/type-name.ts",
6981
+ "declarations": [],
6982
+ "exports": []
6983
+ },
6984
+ {
6985
+ "kind": "javascript-module",
6986
+ "path": "src/genesis/types.ts",
6987
+ "declarations": [
6988
+ {
6989
+ "kind": "variable",
6990
+ "name": "GENESIS_EVENT_OPS",
6991
+ "type": {
6992
+ "text": "['insert', 'modify', 'delete', 'custom']"
6993
+ },
6994
+ "default": "['insert', 'modify', 'delete', 'custom']",
6995
+ "description": "The wire vocabulary for an event resource's operation. Custom handlers keep their own name."
6996
+ }
6997
+ ],
6998
+ "exports": [
7776
6999
  {
7777
7000
  "kind": "js",
7778
7001
  "name": "GENESIS_EVENT_OPS",
7779
7002
  "declaration": {
7780
7003
  "name": "GENESIS_EVENT_OPS",
7781
- "module": "./types"
7004
+ "module": "src/genesis/types.ts"
7782
7005
  }
7783
- },
7006
+ }
7007
+ ]
7008
+ },
7009
+ {
7010
+ "kind": "javascript-module",
7011
+ "path": "src/genesis/value-compare.ts",
7012
+ "declarations": [],
7013
+ "exports": []
7014
+ },
7015
+ {
7016
+ "kind": "javascript-module",
7017
+ "path": "src/genesis/write-commit.ts",
7018
+ "declarations": [],
7019
+ "exports": []
7020
+ },
7021
+ {
7022
+ "kind": "javascript-module",
7023
+ "path": "src/genesis/write-op.ts",
7024
+ "declarations": [],
7025
+ "exports": []
7026
+ },
7027
+ {
7028
+ "kind": "javascript-module",
7029
+ "path": "src/genesis/write-outcome.ts",
7030
+ "declarations": [],
7031
+ "exports": []
7032
+ },
7033
+ {
7034
+ "kind": "javascript-module",
7035
+ "path": "src/genesis/write-payload.ts",
7036
+ "declarations": [
7784
7037
  {
7785
- "kind": "js",
7786
- "name": "GenesisAiConfig",
7787
- "declaration": {
7788
- "name": "GenesisAiConfig",
7789
- "module": "./types"
7790
- }
7791
- },
7038
+ "kind": "function",
7039
+ "name": "buildEventPayload",
7040
+ "return": {
7041
+ "type": {
7042
+ "text": "PayloadResult"
7043
+ }
7044
+ },
7045
+ "parameters": [
7046
+ {
7047
+ "name": "fields",
7048
+ "type": {
7049
+ "text": "readonly GenesisEventField[]"
7050
+ }
7051
+ },
7052
+ {
7053
+ "name": "row",
7054
+ "type": {
7055
+ "text": "unknown"
7056
+ }
7057
+ },
7058
+ {
7059
+ "name": "{ op, preImage, unchecked }",
7060
+ "type": {
7061
+ "text": "BuildPayloadOptions"
7062
+ }
7063
+ }
7064
+ ]
7065
+ }
7066
+ ],
7067
+ "exports": [
7792
7068
  {
7793
7069
  "kind": "js",
7794
- "name": "GenesisAiConsumes",
7070
+ "name": "buildEventPayload",
7795
7071
  "declaration": {
7796
- "name": "GenesisAiConsumes",
7797
- "module": "./types"
7072
+ "name": "buildEventPayload",
7073
+ "module": "src/genesis/write-payload.ts"
7798
7074
  }
7799
- },
7075
+ }
7076
+ ]
7077
+ },
7078
+ {
7079
+ "kind": "javascript-module",
7080
+ "path": "src/genesis/write-plan.ts",
7081
+ "declarations": [
7800
7082
  {
7801
- "kind": "js",
7802
- "name": "GenesisAiResource",
7803
- "declaration": {
7804
- "name": "GenesisAiResource",
7805
- "module": "./types"
7806
- }
7807
- },
7083
+ "kind": "variable",
7084
+ "name": "MAX_WRITE_ROWS",
7085
+ "type": {
7086
+ "text": "number"
7087
+ },
7088
+ "default": "25",
7089
+ "description": "A batch a person can actually read before approving it."
7090
+ }
7091
+ ],
7092
+ "exports": [
7808
7093
  {
7809
7094
  "kind": "js",
7810
- "name": "GenesisAssistantExtensions",
7095
+ "name": "MAX_WRITE_ROWS",
7811
7096
  "declaration": {
7812
- "name": "GenesisAssistantExtensions",
7813
- "module": "./types"
7097
+ "name": "MAX_WRITE_ROWS",
7098
+ "module": "src/genesis/write-plan.ts"
7814
7099
  }
7815
- },
7100
+ }
7101
+ ]
7102
+ },
7103
+ {
7104
+ "kind": "javascript-module",
7105
+ "path": "src/genesis/write-tools.ts",
7106
+ "declarations": [
7816
7107
  {
7817
- "kind": "js",
7818
- "name": "GenesisAssistantRegistration",
7819
- "declaration": {
7820
- "name": "GenesisAssistantRegistration",
7821
- "module": "./types"
7822
- }
7823
- },
7108
+ "kind": "function",
7109
+ "name": "createGenesisWriteTools",
7110
+ "return": {
7111
+ "type": {
7112
+ "text": "{\n toolDefinitions: () => Promise<ChatToolDefinition[]>;\n toolHandlers: ChatToolHandlers;\n /**\n * The events that can get a write tool, as far as the config can tell: an event refused for its\n * op, its rowSources entry or a malformed references, or a modify or delete with no row source,\n * is not among them. Their metadata, read when the tools are first listed, can still withhold one.\n */\n writableEvents: readonly string[];\n}"
7113
+ }
7114
+ },
7115
+ "parameters": [
7116
+ {
7117
+ "name": "resources",
7118
+ "type": {
7119
+ "text": "readonly GenesisAiResource[]"
7120
+ }
7121
+ },
7122
+ {
7123
+ "name": "options",
7124
+ "default": "{}",
7125
+ "type": {
7126
+ "text": "GenesisWriteToolsOptions"
7127
+ }
7128
+ }
7129
+ ],
7130
+ "description": "Builds the assistant's write tools from an app's event resources."
7131
+ }
7132
+ ],
7133
+ "exports": [
7824
7134
  {
7825
7135
  "kind": "js",
7826
- "name": "GenesisCustomCode",
7136
+ "name": "createGenesisWriteTools",
7827
7137
  "declaration": {
7828
- "name": "GenesisCustomCode",
7829
- "module": "./types"
7138
+ "name": "createGenesisWriteTools",
7139
+ "module": "src/genesis/write-tools.ts"
7830
7140
  }
7831
- },
7141
+ }
7142
+ ]
7143
+ },
7144
+ {
7145
+ "kind": "javascript-module",
7146
+ "path": "src/genesis/write-turn.ts",
7147
+ "declarations": [],
7148
+ "exports": []
7149
+ },
7150
+ {
7151
+ "kind": "javascript-module",
7152
+ "path": "src/headless/describe-interaction.ts",
7153
+ "declarations": [
7832
7154
  {
7833
- "kind": "js",
7834
- "name": "GenesisCustomCodeCheck",
7835
- "declaration": {
7836
- "name": "GenesisCustomCodeCheck",
7837
- "module": "./types"
7838
- }
7839
- },
7155
+ "kind": "function",
7156
+ "name": "describeInteraction",
7157
+ "return": {
7158
+ "type": {
7159
+ "text": "InteractionDescription"
7160
+ }
7161
+ },
7162
+ "parameters": [
7163
+ {
7164
+ "name": "input",
7165
+ "type": {
7166
+ "text": "DescribeInteractionInput"
7167
+ }
7168
+ }
7169
+ ],
7170
+ "description": "What the person is being asked, as a compact JSON-serialisable record a model can read and\nanswer (GENC-1660): the same text the autopilot is sent for the decision (`renderDecision`,\nso there is one rendering of a decision, not two), and its actions as data, numbered as that text\nnumbers them, so \"1\" means the same option here and there.\n\nWith no surface — a widget with no controller, or one that has not exposed anything yet — there\nis nothing to act on: `controller` is `false` (or `true` and not `ready`, while a controller that\nwill expose a surface has not yet), `actions` is empty, and `text` is the widget as text alone.\n\nReads the surface fresh each time, so it describes the widget as it is now."
7171
+ }
7172
+ ],
7173
+ "exports": [
7840
7174
  {
7841
7175
  "kind": "js",
7842
- "name": "GenesisEventOp",
7176
+ "name": "describeInteraction",
7843
7177
  "declaration": {
7844
- "name": "GenesisEventOp",
7845
- "module": "./types"
7178
+ "name": "describeInteraction",
7179
+ "module": "src/headless/describe-interaction.ts"
7846
7180
  }
7181
+ }
7182
+ ]
7183
+ },
7184
+ {
7185
+ "kind": "javascript-module",
7186
+ "path": "src/headless/headless-debug.ts",
7187
+ "declarations": [
7188
+ {
7189
+ "kind": "function",
7190
+ "name": "headlessMetaSnapshot",
7191
+ "return": {
7192
+ "type": {
7193
+ "text": "DiagnosticEntry"
7194
+ }
7195
+ },
7196
+ "parameters": [
7197
+ {
7198
+ "name": "driver",
7199
+ "type": {
7200
+ "text": "AiDriver"
7201
+ }
7202
+ },
7203
+ {
7204
+ "name": "options",
7205
+ "default": "{}",
7206
+ "type": {
7207
+ "text": "HeadlessDebugOptions"
7208
+ }
7209
+ }
7210
+ ],
7211
+ "description": "The `meta-snapshot` entry for right now, gathered the way the assistant element gathers it\n(`buildMetaSnapshot` does the assembly; this reads what it reports): the live agent comes from\nthe DRIVER, the transcript from its raw history, and the figures from the transcript, so what a\nheadless host logs is what the browser would. The context window and model, which the element\nlearns from its provider registry, are the host's to say."
7847
7212
  },
7848
7213
  {
7849
- "kind": "js",
7850
- "name": "GenesisReference",
7851
- "declaration": {
7852
- "name": "GenesisReference",
7853
- "module": "./types"
7854
- }
7214
+ "kind": "function",
7215
+ "name": "headlessDiagnosticEntries",
7216
+ "return": {
7217
+ "type": {
7218
+ "text": "DiagnosticEntry[]"
7219
+ }
7220
+ },
7221
+ "parameters": [
7222
+ {
7223
+ "name": "driver",
7224
+ "type": {
7225
+ "text": "AiDriver"
7226
+ }
7227
+ },
7228
+ {
7229
+ "name": "stateKey",
7230
+ "type": {
7231
+ "text": "string"
7232
+ }
7233
+ },
7234
+ {
7235
+ "name": "options",
7236
+ "default": "{}",
7237
+ "type": {
7238
+ "text": "HeadlessDebugOptions"
7239
+ }
7240
+ }
7241
+ ],
7242
+ "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
7855
7243
  },
7856
7244
  {
7857
- "kind": "js",
7858
- "name": "GenesisResourceKind",
7859
- "declaration": {
7860
- "name": "GenesisResourceKind",
7861
- "module": "./types"
7862
- }
7863
- },
7245
+ "kind": "function",
7246
+ "name": "headlessCurrentDebugLog",
7247
+ "return": {
7248
+ "type": {
7249
+ "text": "DebugLog"
7250
+ }
7251
+ },
7252
+ "parameters": [
7253
+ {
7254
+ "name": "driver",
7255
+ "type": {
7256
+ "text": "AiDriver"
7257
+ }
7258
+ },
7259
+ {
7260
+ "name": "stateKey",
7261
+ "type": {
7262
+ "text": "string"
7263
+ }
7264
+ },
7265
+ {
7266
+ "name": "options",
7267
+ "default": "{}",
7268
+ "type": {
7269
+ "text": "HeadlessDebugOptions"
7270
+ }
7271
+ }
7272
+ ],
7273
+ "description": "The current page's debug log: what `HeadlessSession.debugLog()` returns when nothing is\npersisted, and the fallback when the stored stream cannot be read."
7274
+ }
7275
+ ],
7276
+ "exports": [
7864
7277
  {
7865
7278
  "kind": "js",
7866
- "name": "GenesisRowEffect",
7279
+ "name": "headlessMetaSnapshot",
7867
7280
  "declaration": {
7868
- "name": "GenesisRowEffect",
7869
- "module": "./types"
7281
+ "name": "headlessMetaSnapshot",
7282
+ "module": "src/headless/headless-debug.ts"
7870
7283
  }
7871
7284
  },
7872
7285
  {
7873
7286
  "kind": "js",
7874
- "name": "GenesisRowInput",
7287
+ "name": "headlessDiagnosticEntries",
7875
7288
  "declaration": {
7876
- "name": "GenesisRowInput",
7877
- "module": "./types"
7289
+ "name": "headlessDiagnosticEntries",
7290
+ "module": "src/headless/headless-debug.ts"
7878
7291
  }
7879
7292
  },
7880
7293
  {
7881
7294
  "kind": "js",
7882
- "name": "RegisterGenesisAssistantOptions",
7295
+ "name": "headlessCurrentDebugLog",
7883
7296
  "declaration": {
7884
- "name": "RegisterGenesisAssistantOptions",
7885
- "module": "./types"
7297
+ "name": "headlessCurrentDebugLog",
7298
+ "module": "src/headless/headless-debug.ts"
7886
7299
  }
7887
7300
  }
7888
7301
  ]
7889
7302
  },
7890
7303
  {
7891
7304
  "kind": "javascript-module",
7892
- "path": "src/genesis/reference-check.ts",
7305
+ "path": "src/headless/headless-persistence.ts",
7893
7306
  "declarations": [
7894
7307
  {
7895
7308
  "kind": "function",
7896
- "name": "tableOf",
7309
+ "name": "headlessPersistence",
7897
7310
  "return": {
7898
7311
  "type": {
7899
- "text": "string"
7312
+ "text": "HeadlessPersistence"
7900
7313
  }
7901
7314
  },
7902
7315
  "parameters": [
7903
7316
  {
7904
- "name": "resource",
7905
- "type": {
7906
- "text": "string"
7907
- }
7908
- }
7909
- ],
7910
- "description": "The table a `REQ_<T>` reads."
7911
- },
7912
- {
7913
- "kind": "function",
7914
- "name": "notAcceptedHere",
7915
- "return": {
7916
- "type": {
7917
- "text": "string"
7918
- }
7919
- },
7920
- "parameters": [
7317
+ "name": "options",
7318
+ "type": {
7319
+ "text": "HeadlessPersistenceOptions"
7320
+ }
7321
+ }
7322
+ ],
7323
+ "description": "Persistence for a `HeadlessSession`: it writes exactly what the browser writes — the\n`sessions/<key>` snapshot and the `diag/<key>` stream — through the platform's\n`SessionPersister` and the host's `SessionPersistenceProvider`, and builds the lifetime debug log\nfrom the same code as the browser's Download.\n\nExported from the package's main entry only, NOT from the Node entry (`./chat-driver`): it\nreaches the session store, and through it `@genesislcap/foundation-redux`, which are not\nNode-clean. The `persister` it makes is the registry's, so a host can restore through\n`getPersister(stateKey)`."
7324
+ }
7325
+ ],
7326
+ "exports": [
7327
+ {
7328
+ "kind": "js",
7329
+ "name": "headlessPersistence",
7330
+ "declaration": {
7331
+ "name": "headlessPersistence",
7332
+ "module": "src/headless/headless-persistence.ts"
7333
+ }
7334
+ }
7335
+ ]
7336
+ },
7337
+ {
7338
+ "kind": "javascript-module",
7339
+ "path": "src/headless/headless-session.ts",
7340
+ "declarations": [
7341
+ {
7342
+ "kind": "class",
7343
+ "description": "A driver with no screen: a way for a host with no browser (a coding agent behind a small HTTP\nserver, a test) to run a whole assistant journey as the person (GENC-1660).\n\nIt watches the driver for interactions and turns the conversation into an append-only log of\nplain-data events (see HeadlessEvent): `decision` when the person has something to\nanswer, `working` when someone else has it, `settled`, the visible `message`s, the end of each\n`turn`, the autopilot's state, and the host's own `probe`. The caller reads the log with\nHeadlessSession.wait, a long poll cursored by `seq`, so nothing is lost between calls.\nIt answers with HeadlessSession.act, which runs a widget's action as a click would, with\nthe same numbered options the autopilot is shown.\n\nIt only observes: its interceptor never claims an interaction, so an autopilot on the same\ndriver works as it always does, and what the session reports as a `decision` is what the autopilot\nhas handed to the person. Plain classes only: no DOM, no FAST.",
7344
+ "name": "HeadlessSession",
7345
+ "members": [
7346
+ {
7347
+ "kind": "field",
7348
+ "name": "sessionKey",
7349
+ "type": {
7350
+ "text": "string"
7351
+ },
7352
+ "privacy": "private",
7353
+ "readonly": true
7354
+ },
7355
+ {
7356
+ "kind": "field",
7357
+ "name": "allowRaw",
7358
+ "type": {
7359
+ "text": "boolean"
7360
+ },
7361
+ "privacy": "private",
7362
+ "readonly": true
7363
+ },
7364
+ {
7365
+ "kind": "field",
7366
+ "name": "clock",
7367
+ "type": {
7368
+ "text": "() => number"
7369
+ },
7370
+ "privacy": "private",
7371
+ "readonly": true
7372
+ },
7373
+ {
7374
+ "kind": "field",
7375
+ "name": "autopilotHost",
7376
+ "type": {
7377
+ "text": "AutopilotLike | undefined"
7378
+ },
7379
+ "privacy": "private",
7380
+ "readonly": true,
7381
+ "default": "autopilot"
7382
+ },
7383
+ {
7384
+ "kind": "field",
7385
+ "name": "events",
7386
+ "type": {
7387
+ "text": "HeadlessEvent[]"
7388
+ },
7389
+ "privacy": "private",
7390
+ "readonly": true,
7391
+ "default": "[]"
7392
+ },
7393
+ {
7394
+ "kind": "field",
7395
+ "name": "seq",
7396
+ "type": {
7397
+ "text": "number"
7398
+ },
7399
+ "privacy": "private",
7400
+ "default": "0"
7401
+ },
7402
+ {
7403
+ "kind": "field",
7404
+ "name": "tracked",
7405
+ "privacy": "private",
7406
+ "readonly": true,
7407
+ "default": "new Map<string, Tracked>()"
7408
+ },
7409
+ {
7410
+ "kind": "field",
7411
+ "name": "origin",
7412
+ "privacy": "private",
7413
+ "readonly": true,
7414
+ "default": "new Map<string, { auto?: boolean; raw?: boolean }>()",
7415
+ "description": "What the session did to an interaction itself, for `settled` to say when the driver reports it."
7416
+ },
7417
+ {
7418
+ "kind": "field",
7419
+ "name": "waiters",
7420
+ "privacy": "private",
7421
+ "readonly": true,
7422
+ "default": "new Set<Waiter>()"
7423
+ },
7424
+ {
7425
+ "kind": "field",
7426
+ "name": "teardown",
7427
+ "type": {
7428
+ "text": "Array<() => void>"
7429
+ },
7430
+ "privacy": "private",
7431
+ "readonly": true,
7432
+ "default": "[]"
7433
+ },
7434
+ {
7435
+ "kind": "field",
7436
+ "name": "seen",
7437
+ "type": {
7438
+ "text": "number"
7439
+ },
7440
+ "privacy": "private",
7441
+ "description": "How much of the driver's history has been reported as messages."
7442
+ },
7443
+ {
7444
+ "kind": "field",
7445
+ "name": "turn",
7446
+ "type": {
7447
+ "text": "Promise<unknown> | undefined"
7448
+ },
7449
+ "privacy": "private",
7450
+ "description": "The `send` in flight, if any."
7451
+ },
7452
+ {
7453
+ "kind": "field",
7454
+ "name": "open",
7455
+ "type": {
7456
+ "text": "{ start: number; reason?: string; failureReason?: string } | undefined"
7457
+ },
7458
+ "privacy": "private",
7459
+ "description": "The turn that is running, whoever started it, until the driver has been idle for a beat:\n`start` is where its messages begin in the history. Its `reason` and `failureReason` are what\nended it, when something said."
7460
+ },
7461
+ {
7462
+ "kind": "field",
7463
+ "name": "base",
7464
+ "type": {
7465
+ "text": "number"
7466
+ },
7467
+ "privacy": "private",
7468
+ "description": "History length when the last turn closed: where a turn the session did not start begins."
7469
+ },
7470
+ {
7471
+ "kind": "field",
7472
+ "name": "quiesceTimer",
7473
+ "type": {
7474
+ "text": "ReturnType<typeof setTimeout> | undefined"
7475
+ },
7476
+ "privacy": "private"
7477
+ },
7478
+ {
7479
+ "kind": "field",
7480
+ "name": "poller",
7481
+ "type": {
7482
+ "text": "ReturnType<typeof setInterval> | undefined"
7483
+ },
7484
+ "privacy": "private"
7485
+ },
7486
+ {
7487
+ "kind": "field",
7488
+ "name": "persistence",
7489
+ "type": {
7490
+ "text": "HeadlessPersistenceBinding | undefined"
7491
+ },
7492
+ "privacy": "private",
7493
+ "readonly": true
7494
+ },
7495
+ {
7496
+ "kind": "field",
7497
+ "name": "lastProbe",
7498
+ "type": {
7499
+ "text": "Record<string, unknown>"
7500
+ },
7501
+ "privacy": "private",
7502
+ "default": "{}"
7503
+ },
7504
+ {
7505
+ "kind": "field",
7506
+ "name": "lastAutopilot",
7507
+ "type": {
7508
+ "text": "string"
7509
+ },
7510
+ "privacy": "private",
7511
+ "default": "''"
7512
+ },
7513
+ {
7514
+ "kind": "field",
7515
+ "name": "disposed",
7516
+ "type": {
7517
+ "text": "boolean"
7518
+ },
7519
+ "privacy": "private",
7520
+ "default": "false"
7521
+ },
7522
+ {
7523
+ "kind": "field",
7524
+ "name": "restoring",
7525
+ "type": {
7526
+ "text": "boolean"
7527
+ },
7528
+ "privacy": "private",
7529
+ "default": "false",
7530
+ "description": "While a restore loads the history, which is not new activity."
7531
+ },
7532
+ {
7533
+ "kind": "method",
7534
+ "name": "send",
7535
+ "return": {
7536
+ "type": {
7537
+ "text": "HeadlessResult"
7538
+ }
7539
+ },
7540
+ "parameters": [
7541
+ {
7542
+ "name": "text",
7543
+ "type": {
7544
+ "text": "string"
7545
+ }
7546
+ },
7547
+ {
7548
+ "name": "options",
7549
+ "default": "{}",
7550
+ "type": {
7551
+ "text": "HeadlessSendOptions"
7552
+ }
7553
+ }
7554
+ ],
7555
+ "description": "Send the person's message, and start the turn. Returns as soon as the turn has started, not\nwhen it ends: a turn includes every interaction parked on the person, so it can run as long as\nthe journey. Its end is the `turn` event.\n\nRefused, never thrown, when the message is empty, or a turn is already running."
7556
+ },
7557
+ {
7558
+ "kind": "method",
7559
+ "name": "act",
7560
+ "return": {
7561
+ "type": {
7562
+ "text": "Promise<HeadlessActResult>"
7563
+ }
7564
+ },
7565
+ "parameters": [
7566
+ {
7567
+ "name": "interactionId",
7568
+ "type": {
7569
+ "text": "string"
7570
+ }
7571
+ },
7572
+ {
7573
+ "name": "action",
7574
+ "type": {
7575
+ "text": "string | number"
7576
+ }
7577
+ },
7578
+ {
7579
+ "name": "args",
7580
+ "default": "{}",
7581
+ "type": {
7582
+ "text": "HeadlessActArgs"
7583
+ }
7584
+ }
7585
+ ],
7586
+ "description": "Run one of a pending interaction's actions as the person, as a click would (the answer is\ncredited `answeredBy: 'user'`). `action` is a number from the description's actions, or an\naction's name; `args` carry the text, the options (numbers or labels) or the form's fields it\ntakes. Refused, with the reason and what is enabled, when a claimant holds the interaction,\nthe action is unknown or disabled, or its arguments do not fit: nothing runs then.\n\nThe result is the driver's `InvokeResult`, plus `description` of the interaction when it is\nstill open."
7587
+ },
7588
+ {
7589
+ "kind": "method",
7590
+ "name": "resolve",
7591
+ "return": {
7592
+ "type": {
7593
+ "text": "HeadlessResult"
7594
+ }
7595
+ },
7596
+ "parameters": [
7597
+ {
7598
+ "name": "interactionId",
7599
+ "type": {
7600
+ "text": "string"
7601
+ }
7602
+ },
7603
+ {
7604
+ "name": "result",
7605
+ "type": {
7606
+ "text": "unknown"
7607
+ }
7608
+ }
7609
+ ],
7610
+ "description": "Settle a pending interaction raw, with `result` as the widget would have resolved it,\nbypassing its actions and everything they check: an escape hatch for a widget with no\ncontroller, or one that cannot be acted on. Logs `settled` with `raw: true` and records\n`headless.raw-resolved`. Refused when `allowRaw` is `false`, when the interaction is not\npending, or when a claimant holds it: as for `act`, the person takes it back first."
7611
+ },
7612
+ {
7613
+ "kind": "method",
7614
+ "name": "read",
7615
+ "return": {
7616
+ "type": {
7617
+ "text": "Promise<HeadlessReadResult>"
7618
+ }
7619
+ },
7620
+ "parameters": [
7621
+ {
7622
+ "name": "interactionId",
7623
+ "type": {
7624
+ "text": "string"
7625
+ }
7626
+ },
7627
+ {
7628
+ "name": "request",
7629
+ "default": "{}",
7630
+ "type": {
7631
+ "text": "HeadlessReadRequest"
7632
+ }
7633
+ }
7634
+ ],
7635
+ "description": "Read from a pending interaction without changing it: one of its views, or (with `tool`) one of\nthe widget tools given to the session. The text is capped. A view the surface does not list is\nrefused, naming those it does, as the autopilot's `widget_read` does."
7636
+ },
7637
+ {
7638
+ "kind": "method",
7639
+ "name": "wait",
7640
+ "return": {
7641
+ "type": {
7642
+ "text": "Promise<HeadlessWaitResult>"
7643
+ }
7644
+ },
7645
+ "parameters": [
7646
+ {
7647
+ "name": "request",
7648
+ "type": {
7649
+ "text": "HeadlessWaitRequest"
7650
+ }
7651
+ }
7652
+ ],
7653
+ "description": "Wait for the log to say something, then return what it said. Resolves as soon as an event in\n`until` is in the log after `since` (immediately, when one already is), or at `maxWaitMs` with\nstatus `'working'`. Either way it returns every event after `since`, and `nextSeq`, the cursor\nfor the next call: poll with it and nothing is lost."
7654
+ },
7655
+ {
7656
+ "kind": "method",
7657
+ "name": "eventsSince",
7658
+ "return": {
7659
+ "type": {
7660
+ "text": "readonly HeadlessEvent[]"
7661
+ }
7662
+ },
7663
+ "parameters": [
7664
+ {
7665
+ "name": "since",
7666
+ "default": "0"
7667
+ }
7668
+ ],
7669
+ "description": "Every event logged after `since` (default: all the log keeps), without waiting."
7670
+ },
7671
+ {
7672
+ "kind": "method",
7673
+ "name": "state",
7674
+ "return": {
7675
+ "type": {
7676
+ "text": "HeadlessState"
7677
+ }
7678
+ },
7679
+ "description": "What is going on now: whether a turn runs, the interaction the person should answer first (and\nthe others open behind it), the autopilot, what it has cost, and the host's probe."
7680
+ },
7681
+ {
7682
+ "kind": "method",
7683
+ "name": "restore",
7684
+ "return": {
7685
+ "type": {
7686
+ "text": "Promise<HeadlessRestoreOutcome | undefined>"
7687
+ }
7688
+ },
7689
+ "description": "Restore the saved session for this key, as the browser's element does on mount (see\n`HeadlessPersistenceBinding.restore`). Call it before the first `send`. The restored history is\nthe starting point, not news: it is not reported as `message` events or as a turn, and the\nevent log and its cursors carry on from where they are. A no-op without `persistence`."
7690
+ },
7691
+ {
7692
+ "kind": "method",
7693
+ "name": "flush",
7694
+ "return": {
7695
+ "type": {
7696
+ "text": "Promise<void>"
7697
+ }
7698
+ },
7699
+ "description": "Save the session now: the snapshot, and the diagnostics appended since the last flush, rather\nthan at the next throttled save. A no-op without `persistence`."
7700
+ },
7701
+ {
7702
+ "kind": "method",
7703
+ "name": "debugLog",
7704
+ "return": {
7705
+ "type": {
7706
+ "text": "Promise<DebugLog>"
7707
+ }
7708
+ },
7709
+ "description": "The debug log, the document the browser's Download gives. With `persistence`, the log of the\nwhole session stitched from the stored stream with a fresh `meta-snapshot` (`lifetimeDebugLog`,\nthe same code); without, the current page's, from `buildDiagnosticEntries`. Never throws."
7710
+ },
7711
+ {
7712
+ "kind": "method",
7713
+ "name": "stop",
7714
+ "return": {
7715
+ "type": {
7716
+ "text": "HeadlessResult"
7717
+ }
7718
+ },
7719
+ "description": "Stop the running turn, when the driver can."
7720
+ },
7721
+ {
7722
+ "kind": "method",
7723
+ "name": "autopilot",
7724
+ "return": {
7725
+ "type": {
7726
+ "text": "HeadlessResult"
7727
+ }
7728
+ },
7729
+ "parameters": [
7730
+ {
7731
+ "name": "mode",
7732
+ "type": {
7733
+ "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
7734
+ }
7735
+ },
7736
+ {
7737
+ "name": "interactionId",
7738
+ "optional": true,
7739
+ "type": {
7740
+ "text": "string"
7741
+ }
7742
+ }
7743
+ ],
7744
+ "description": "Pause, resume or stop the autopilot, when there is one. Pausing hands what it holds to the\nperson, which then appears as a `decision`.\n\n`'keepPaused'` is the hand-back banner's \"Keep paused\": it turns the autopilot's own hand-back\nof one interaction into an ordinary pause, so it does not take the question back once it is\nanswered. `interactionId` names the interaction handed back; omitted, it is the one the\nautopilot's own pause is waiting on (`state().autopilot`'s hand-back, the `decision` it left\nwith the person). Refused, with why, when the autopilot has handed nothing back, when\n`interactionId` is not the one it handed back, or when the host cannot keep paused; the host's\nown `keepPaused` would do nothing in those cases without saying so."
7745
+ },
7746
+ {
7747
+ "kind": "method",
7748
+ "name": "keepPaused",
7749
+ "privacy": "private",
7750
+ "return": {
7751
+ "type": {
7752
+ "text": "HeadlessResult"
7753
+ }
7754
+ },
7755
+ "parameters": [
7756
+ {
7757
+ "name": "host",
7758
+ "type": {
7759
+ "text": "AutopilotLike"
7760
+ }
7761
+ },
7762
+ {
7763
+ "name": "interactionId",
7764
+ "type": {
7765
+ "text": "string | undefined"
7766
+ }
7767
+ }
7768
+ ]
7769
+ },
7770
+ {
7771
+ "kind": "method",
7772
+ "name": "dispose",
7773
+ "return": {
7774
+ "type": {
7775
+ "text": "void"
7776
+ }
7777
+ },
7778
+ "description": "Detach: remove the interceptor and every subscription, and release anyone waiting."
7779
+ },
7780
+ {
7781
+ "kind": "method",
7782
+ "name": "listen",
7783
+ "privacy": "private",
7784
+ "return": {
7785
+ "type": {
7786
+ "text": "void"
7787
+ }
7788
+ },
7789
+ "parameters": [
7790
+ {
7791
+ "name": "type",
7792
+ "type": {
7793
+ "text": "string"
7794
+ }
7795
+ },
7796
+ {
7797
+ "name": "handler",
7798
+ "type": {
7799
+ "text": "(e: Event) => void"
7800
+ }
7801
+ }
7802
+ ]
7803
+ },
7804
+ {
7805
+ "kind": "method",
7806
+ "name": "history",
7807
+ "privacy": "private",
7808
+ "return": {
7809
+ "type": {
7810
+ "text": "readonly ChatMessage[]"
7811
+ }
7812
+ }
7813
+ },
7814
+ {
7815
+ "kind": "method",
7816
+ "name": "onOpened",
7817
+ "privacy": "private",
7818
+ "return": {
7819
+ "type": {
7820
+ "text": "void"
7821
+ }
7822
+ },
7823
+ "parameters": [
7824
+ {
7825
+ "name": "opened",
7826
+ "type": {
7827
+ "text": "InteractionOpened"
7828
+ }
7829
+ }
7830
+ ],
7831
+ "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
7832
+ },
7833
+ {
7834
+ "kind": "method",
7835
+ "name": "onSettled",
7836
+ "privacy": "private",
7837
+ "return": {
7838
+ "type": {
7839
+ "text": "void"
7840
+ }
7841
+ },
7842
+ "parameters": [
7843
+ {
7844
+ "name": "detail",
7845
+ "type": {
7846
+ "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
7847
+ }
7848
+ }
7849
+ ],
7850
+ "description": "The driver says an interaction settled, by whatever route."
7851
+ },
7852
+ {
7853
+ "kind": "method",
7854
+ "name": "onEnded",
7855
+ "privacy": "private",
7856
+ "return": {
7857
+ "type": {
7858
+ "text": "void"
7859
+ }
7860
+ },
7861
+ "parameters": [
7862
+ {
7863
+ "name": "t",
7864
+ "type": {
7865
+ "text": "Tracked"
7866
+ }
7867
+ }
7868
+ ],
7869
+ "description": "The interaction's context was disposed: if nothing said it settled, say it did."
7870
+ },
7871
+ {
7872
+ "kind": "method",
7873
+ "name": "settle",
7874
+ "privacy": "private",
7875
+ "return": {
7876
+ "type": {
7877
+ "text": "void"
7878
+ }
7879
+ },
7880
+ "parameters": [
7881
+ {
7882
+ "name": "t",
7883
+ "type": {
7884
+ "text": "Tracked"
7885
+ }
7886
+ },
7887
+ {
7888
+ "name": "how",
7889
+ "type": {
7890
+ "text": "{ answeredBy?: string; resolvedItself?: boolean; auto?: boolean; raw?: boolean }"
7891
+ }
7892
+ }
7893
+ ]
7894
+ },
7895
+ {
7896
+ "kind": "method",
7897
+ "name": "release",
7898
+ "privacy": "private",
7899
+ "return": {
7900
+ "type": {
7901
+ "text": "void"
7902
+ }
7903
+ },
7904
+ "parameters": [
7905
+ {
7906
+ "name": "t",
7907
+ "type": {
7908
+ "text": "Tracked"
7909
+ }
7910
+ }
7911
+ ]
7912
+ },
7913
+ {
7914
+ "kind": "method",
7915
+ "name": "onHistory",
7916
+ "privacy": "private",
7917
+ "return": {
7918
+ "type": {
7919
+ "text": "void"
7920
+ }
7921
+ },
7922
+ "description": "New messages in the driver's history: report what the person would see of them."
7923
+ },
7924
+ {
7925
+ "kind": "method",
7926
+ "name": "reportMessages",
7927
+ "privacy": "private",
7928
+ "return": {
7929
+ "type": {
7930
+ "text": "void"
7931
+ }
7932
+ }
7933
+ },
7934
+ {
7935
+ "kind": "method",
7936
+ "name": "onAutopilot",
7937
+ "privacy": "private",
7938
+ "return": {
7939
+ "type": {
7940
+ "text": "void"
7941
+ }
7942
+ }
7943
+ },
7944
+ {
7945
+ "kind": "method",
7946
+ "name": "autopilotSignature",
7947
+ "privacy": "private",
7948
+ "return": {
7949
+ "type": {
7950
+ "text": "string"
7951
+ }
7952
+ }
7953
+ },
7954
+ {
7955
+ "kind": "method",
7956
+ "name": "describe",
7957
+ "privacy": "private",
7958
+ "return": {
7959
+ "type": {
7960
+ "text": "InteractionDescription"
7961
+ }
7962
+ },
7963
+ "parameters": [
7964
+ {
7965
+ "name": "t",
7966
+ "type": {
7967
+ "text": "Tracked"
7968
+ }
7969
+ }
7970
+ ]
7971
+ },
7972
+ {
7973
+ "kind": "method",
7974
+ "name": "evaluate",
7975
+ "privacy": "private",
7976
+ "return": {
7977
+ "type": {
7978
+ "text": "void"
7979
+ }
7980
+ },
7981
+ "parameters": [
7982
+ {
7983
+ "name": "t",
7984
+ "type": {
7985
+ "text": "Tracked"
7986
+ }
7987
+ }
7988
+ ],
7989
+ "description": "Report where an interaction stands, when that has changed. A `decision` when the person holds\nit and can act; `working` when a claimant holds it or it is not ready yet. A `decision` is\nlogged again only when its description changed materially: who holds it, whether it is ready\nor has a controller, or which actions are enabled. The text and facts alone do not count."
7990
+ },
7991
+ {
7992
+ "kind": "method",
7993
+ "name": "autoSettle",
7994
+ "privacy": "private",
7995
+ "return": {
7996
+ "type": {
7997
+ "text": "boolean"
7998
+ }
7999
+ },
8000
+ "parameters": [
8001
+ {
8002
+ "name": "t",
8003
+ "type": {
8004
+ "text": "Tracked"
8005
+ }
8006
+ }
8007
+ ],
8008
+ "description": "Settle a widget that settles itself in a browser, as it would on mounting. Once, and only when\nthe person holds it. Returns whether it settled it."
8009
+ },
8010
+ {
8011
+ "kind": "method",
8012
+ "name": "readTool",
8013
+ "privacy": "private",
8014
+ "return": {
8015
+ "type": {
8016
+ "text": "Promise<HeadlessReadResult>"
8017
+ }
8018
+ },
8019
+ "parameters": [
8020
+ {
8021
+ "name": "t",
8022
+ "type": {
8023
+ "text": "Tracked"
8024
+ }
8025
+ },
8026
+ {
8027
+ "name": "name",
8028
+ "type": {
8029
+ "text": "string"
8030
+ }
8031
+ },
8032
+ {
8033
+ "name": "args",
8034
+ "type": {
8035
+ "text": "Record<string, unknown> | undefined"
8036
+ }
8037
+ }
8038
+ ]
8039
+ },
7921
8040
  {
7922
- "name": "field",
7923
- "type": {
7924
- "text": "string"
7925
- }
8041
+ "kind": "method",
8042
+ "name": "observe",
8043
+ "privacy": "private",
8044
+ "return": {
8045
+ "type": {
8046
+ "text": "void"
8047
+ }
8048
+ },
8049
+ "description": "Notice a turn begin or end, whoever started it. The driver being busy (or a `send` in flight)\nis a turn; once it has been idle for a beat the turn is over and is reported, once. The beat\ncovers the gaps inside one turn, such as a hand-off continuing it, which are a microtask long.\nA turn that begins the instant another ends, with no idle between, is reported as one."
7926
8050
  },
7927
8051
  {
7928
- "name": "{ resource, reason }",
7929
- "type": {
7930
- "text": "UncheckedField"
7931
- }
7932
- }
7933
- ],
7934
- "description": "What an insert says about a value it cannot check."
7935
- },
7936
- {
7937
- "kind": "function",
7938
- "name": "cannotBeChanged",
7939
- "return": {
7940
- "type": {
7941
- "text": "string"
7942
- }
7943
- },
7944
- "parameters": [
8052
+ "kind": "method",
8053
+ "name": "closeTurn",
8054
+ "privacy": "private",
8055
+ "return": {
8056
+ "type": {
8057
+ "text": "void"
8058
+ }
8059
+ },
8060
+ "description": "Report the open turn as ended, unless the driver is busy again."
8061
+ },
7945
8062
  {
7946
- "name": "field",
7947
- "type": {
7948
- "text": "string"
8063
+ "kind": "method",
8064
+ "name": "startPolling",
8065
+ "privacy": "private",
8066
+ "return": {
8067
+ "type": {
8068
+ "text": "void"
8069
+ }
8070
+ },
8071
+ "description": "Without a shared bus nothing says a turn ended, so while one is open the driver is asked."
8072
+ },
8073
+ {
8074
+ "kind": "method",
8075
+ "name": "stopPolling",
8076
+ "privacy": "private",
8077
+ "return": {
8078
+ "type": {
8079
+ "text": "void"
8080
+ }
7949
8081
  }
7950
8082
  },
7951
8083
  {
7952
- "name": "{ resource, reason }",
7953
- "type": {
7954
- "text": "UncheckedField"
8084
+ "kind": "method",
8085
+ "name": "logTurn",
8086
+ "privacy": "private",
8087
+ "return": {
8088
+ "type": {
8089
+ "text": "void"
8090
+ }
8091
+ },
8092
+ "parameters": [
8093
+ {
8094
+ "name": "reason",
8095
+ "type": {
8096
+ "text": "string"
8097
+ }
8098
+ },
8099
+ {
8100
+ "name": "failureReason",
8101
+ "type": {
8102
+ "text": "string | undefined"
8103
+ }
8104
+ },
8105
+ {
8106
+ "name": "start",
8107
+ "type": {
8108
+ "text": "number"
8109
+ }
8110
+ }
8111
+ ]
8112
+ },
8113
+ {
8114
+ "kind": "method",
8115
+ "name": "log",
8116
+ "privacy": "private",
8117
+ "return": {
8118
+ "type": {
8119
+ "text": "void"
8120
+ }
8121
+ },
8122
+ "parameters": [
8123
+ {
8124
+ "name": "event",
8125
+ "type": {
8126
+ "text": "NewEvent"
8127
+ }
8128
+ }
8129
+ ]
8130
+ },
8131
+ {
8132
+ "kind": "method",
8133
+ "name": "append",
8134
+ "privacy": "private",
8135
+ "return": {
8136
+ "type": {
8137
+ "text": "void"
8138
+ }
8139
+ },
8140
+ "parameters": [
8141
+ {
8142
+ "name": "event",
8143
+ "type": {
8144
+ "text": "NewEvent"
8145
+ }
8146
+ }
8147
+ ]
8148
+ },
8149
+ {
8150
+ "kind": "method",
8151
+ "name": "readProbe",
8152
+ "privacy": "private",
8153
+ "return": {
8154
+ "type": {
8155
+ "text": "Record<string, unknown>"
8156
+ }
7955
8157
  }
8158
+ },
8159
+ {
8160
+ "kind": "method",
8161
+ "name": "checkProbe",
8162
+ "privacy": "private",
8163
+ "return": {
8164
+ "type": {
8165
+ "text": "void"
8166
+ }
8167
+ },
8168
+ "description": "Read the probe again; a change in any top-level value is a `probe` event."
8169
+ },
8170
+ {
8171
+ "kind": "method",
8172
+ "name": "waited",
8173
+ "privacy": "private",
8174
+ "return": {
8175
+ "type": {
8176
+ "text": "HeadlessWaitResult"
8177
+ }
8178
+ },
8179
+ "parameters": [
8180
+ {
8181
+ "name": "since",
8182
+ "type": {
8183
+ "text": "number"
8184
+ }
8185
+ },
8186
+ {
8187
+ "name": "status",
8188
+ "type": {
8189
+ "text": "HeadlessWaitResult['status']"
8190
+ }
8191
+ }
8192
+ ]
7956
8193
  }
7957
- ],
7958
- "description": "What a modify says about a new value it cannot check."
8194
+ ]
7959
8195
  }
7960
8196
  ],
7961
8197
  "exports": [
7962
8198
  {
7963
8199
  "kind": "js",
7964
- "name": "tableOf",
8200
+ "name": "HeadlessSession",
8201
+ "declaration": {
8202
+ "name": "HeadlessSession",
8203
+ "module": "src/headless/headless-session.ts"
8204
+ }
8205
+ }
8206
+ ]
8207
+ },
8208
+ {
8209
+ "kind": "javascript-module",
8210
+ "path": "src/headless/headless.types.ts",
8211
+ "declarations": [],
8212
+ "exports": []
8213
+ },
8214
+ {
8215
+ "kind": "javascript-module",
8216
+ "path": "src/headless/index.ts",
8217
+ "declarations": [],
8218
+ "exports": [
8219
+ {
8220
+ "kind": "js",
8221
+ "name": "describeInteraction",
8222
+ "declaration": {
8223
+ "name": "describeInteraction",
8224
+ "module": "./describe-interaction"
8225
+ }
8226
+ },
8227
+ {
8228
+ "kind": "js",
8229
+ "name": "headlessCurrentDebugLog",
8230
+ "declaration": {
8231
+ "name": "headlessCurrentDebugLog",
8232
+ "module": "./headless-debug"
8233
+ }
8234
+ },
8235
+ {
8236
+ "kind": "js",
8237
+ "name": "headlessDiagnosticEntries",
7965
8238
  "declaration": {
7966
- "name": "tableOf",
7967
- "module": "src/genesis/reference-check.ts"
8239
+ "name": "headlessDiagnosticEntries",
8240
+ "module": "./headless-debug"
7968
8241
  }
7969
8242
  },
7970
8243
  {
7971
8244
  "kind": "js",
7972
- "name": "notAcceptedHere",
8245
+ "name": "headlessMetaSnapshot",
7973
8246
  "declaration": {
7974
- "name": "notAcceptedHere",
7975
- "module": "src/genesis/reference-check.ts"
8247
+ "name": "headlessMetaSnapshot",
8248
+ "module": "./headless-debug"
7976
8249
  }
7977
8250
  },
7978
8251
  {
7979
8252
  "kind": "js",
7980
- "name": "cannotBeChanged",
8253
+ "name": "HeadlessSession",
7981
8254
  "declaration": {
7982
- "name": "cannotBeChanged",
7983
- "module": "src/genesis/reference-check.ts"
8255
+ "name": "HeadlessSession",
8256
+ "module": "./headless-session"
7984
8257
  }
7985
- }
7986
- ]
7987
- },
7988
- {
7989
- "kind": "javascript-module",
7990
- "path": "src/genesis/reference-existence.ts",
7991
- "declarations": [
8258
+ },
7992
8259
  {
7993
- "kind": "variable",
7994
- "name": "MAX_REFERENCE_CHECKS",
7995
- "type": {
7996
- "text": "number"
7997
- },
7998
- "default": "50",
7999
- "description": "The most distinct values one call may check."
8260
+ "kind": "js",
8261
+ "name": "AutopilotLike",
8262
+ "declaration": {
8263
+ "name": "AutopilotLike",
8264
+ "module": "./headless.types"
8265
+ }
8000
8266
  },
8001
8267
  {
8002
- "kind": "function",
8003
- "name": "withReferenceProblems",
8004
- "return": {
8005
- "type": {
8006
- "text": "T[]"
8007
- }
8008
- },
8009
- "parameters": [
8010
- {
8011
- "name": "rows",
8012
- "type": {
8013
- "text": "readonly T[]"
8014
- }
8015
- },
8016
- {
8017
- "name": "problems",
8018
- "type": {
8019
- "text": "ReadonlyMap<number, string[]>"
8020
- }
8021
- }
8022
- ],
8023
- "description": "The rows with what the check found added to their problems."
8024
- }
8025
- ],
8026
- "exports": [
8268
+ "kind": "js",
8269
+ "name": "DescribedAction",
8270
+ "declaration": {
8271
+ "name": "DescribedAction",
8272
+ "module": "./headless.types"
8273
+ }
8274
+ },
8027
8275
  {
8028
8276
  "kind": "js",
8029
- "name": "MAX_REFERENCE_CHECKS",
8277
+ "name": "DescribeInteractionInput",
8030
8278
  "declaration": {
8031
- "name": "MAX_REFERENCE_CHECKS",
8032
- "module": "src/genesis/reference-existence.ts"
8279
+ "name": "DescribeInteractionInput",
8280
+ "module": "./headless.types"
8033
8281
  }
8034
8282
  },
8035
8283
  {
8036
8284
  "kind": "js",
8037
- "name": "withReferenceProblems",
8285
+ "name": "HeadlessActArgs",
8038
8286
  "declaration": {
8039
- "name": "withReferenceProblems",
8040
- "module": "src/genesis/reference-existence.ts"
8287
+ "name": "HeadlessActArgs",
8288
+ "module": "./headless.types"
8041
8289
  }
8042
- }
8043
- ]
8044
- },
8045
- {
8046
- "kind": "javascript-module",
8047
- "path": "src/genesis/register-genesis-assistant.ts",
8048
- "declarations": [
8290
+ },
8049
8291
  {
8050
- "kind": "variable",
8051
- "name": "GENESIS_AGENT_NAME",
8052
- "type": {
8053
- "text": "string"
8054
- },
8055
- "default": "'genesis-assistant'",
8056
- "description": "The name of the agent registerGenesisAssistant builds."
8292
+ "kind": "js",
8293
+ "name": "HeadlessActResult",
8294
+ "declaration": {
8295
+ "name": "HeadlessActResult",
8296
+ "module": "./headless.types"
8297
+ }
8057
8298
  },
8058
8299
  {
8059
- "kind": "function",
8060
- "name": "registerGenesisAssistant",
8061
- "return": {
8062
- "type": {
8063
- "text": "GenesisAssistantRegistration"
8064
- }
8065
- },
8066
- "parameters": [
8067
- {
8068
- "name": "options",
8069
- "type": {
8070
- "text": "RegisterGenesisAssistantOptions"
8071
- }
8072
- }
8073
- ],
8074
- "description": "Sets up the AI assistant for a Genesis app from its generated AI config: providers by tier,\nand one agent whose tools read the app's resources."
8075
- }
8076
- ],
8077
- "exports": [
8300
+ "kind": "js",
8301
+ "name": "HeadlessDebugOptions",
8302
+ "declaration": {
8303
+ "name": "HeadlessDebugOptions",
8304
+ "module": "./headless.types"
8305
+ }
8306
+ },
8078
8307
  {
8079
8308
  "kind": "js",
8080
- "name": "GENESIS_AGENT_NAME",
8309
+ "name": "HeadlessEvent",
8081
8310
  "declaration": {
8082
- "name": "GENESIS_AGENT_NAME",
8083
- "module": "src/genesis/register-genesis-assistant.ts"
8311
+ "name": "HeadlessEvent",
8312
+ "module": "./headless.types"
8084
8313
  }
8085
8314
  },
8086
8315
  {
8087
8316
  "kind": "js",
8088
- "name": "registerGenesisAssistant",
8317
+ "name": "HeadlessEventBase",
8089
8318
  "declaration": {
8090
- "name": "registerGenesisAssistant",
8091
- "module": "src/genesis/register-genesis-assistant.ts"
8319
+ "name": "HeadlessEventBase",
8320
+ "module": "./headless.types"
8092
8321
  }
8093
- }
8094
- ]
8095
- },
8096
- {
8097
- "kind": "javascript-module",
8098
- "path": "src/genesis/resource-tools.ts",
8099
- "declarations": [
8322
+ },
8100
8323
  {
8101
- "kind": "variable",
8102
- "name": "GENESIS_DATA_SOURCE",
8103
- "type": {
8104
- "text": "string"
8105
- },
8106
- "default": "'app-database'",
8107
- "description": "The provenance stamped on everything a tool returns from the app (ADR P9). Rows are written by\nthe app's other users, so the model must treat their text as data, never as instructions; the\nsystem prompt says the same thing in words."
8324
+ "kind": "js",
8325
+ "name": "HeadlessEventType",
8326
+ "declaration": {
8327
+ "name": "HeadlessEventType",
8328
+ "module": "./headless.types"
8329
+ }
8108
8330
  },
8109
8331
  {
8110
- "kind": "function",
8111
- "name": "createGenesisResourceTools",
8112
- "return": {
8113
- "type": {
8114
- "text": "GenesisResourceTools"
8115
- }
8116
- },
8117
- "parameters": [
8118
- {
8119
- "name": "resources",
8120
- "type": {
8121
- "text": "readonly GenesisAiResource[]"
8122
- }
8123
- },
8124
- {
8125
- "name": "options",
8126
- "default": "{}",
8127
- "type": {
8128
- "text": "GenesisResourceToolsOptions"
8129
- }
8130
- }
8131
- ],
8132
- "description": "Builds the assistant's tools from an app's resources."
8133
- }
8134
- ],
8135
- "exports": [
8332
+ "kind": "js",
8333
+ "name": "HeadlessPersistence",
8334
+ "declaration": {
8335
+ "name": "HeadlessPersistence",
8336
+ "module": "./headless.types"
8337
+ }
8338
+ },
8136
8339
  {
8137
8340
  "kind": "js",
8138
- "name": "GENESIS_DATA_SOURCE",
8341
+ "name": "HeadlessPersistenceBinding",
8139
8342
  "declaration": {
8140
- "name": "GENESIS_DATA_SOURCE",
8141
- "module": "src/genesis/resource-tools.ts"
8343
+ "name": "HeadlessPersistenceBinding",
8344
+ "module": "./headless.types"
8142
8345
  }
8143
8346
  },
8144
8347
  {
8145
8348
  "kind": "js",
8146
- "name": "createGenesisResourceTools",
8349
+ "name": "HeadlessPersistenceHost",
8147
8350
  "declaration": {
8148
- "name": "createGenesisResourceTools",
8149
- "module": "src/genesis/resource-tools.ts"
8351
+ "name": "HeadlessPersistenceHost",
8352
+ "module": "./headless.types"
8150
8353
  }
8151
- }
8152
- ]
8153
- },
8154
- {
8155
- "kind": "javascript-module",
8156
- "path": "src/genesis/review-model.ts",
8157
- "declarations": [
8354
+ },
8158
8355
  {
8159
- "kind": "variable",
8160
- "name": "LONG_VALUE",
8161
- "type": {
8162
- "text": "number"
8163
- },
8164
- "default": "24",
8165
- "description": "Past this many characters a value wraps; at or under it, it stays on one line."
8166
- }
8167
- ],
8168
- "exports": [
8356
+ "kind": "js",
8357
+ "name": "HeadlessReadRequest",
8358
+ "declaration": {
8359
+ "name": "HeadlessReadRequest",
8360
+ "module": "./headless.types"
8361
+ }
8362
+ },
8169
8363
  {
8170
8364
  "kind": "js",
8171
- "name": "GenesisChangeRequest",
8365
+ "name": "HeadlessReadResult",
8172
8366
  "declaration": {
8173
- "name": "GenesisChangeRequest",
8174
- "module": "./review-payload"
8367
+ "name": "HeadlessReadResult",
8368
+ "module": "./headless.types"
8175
8369
  }
8176
8370
  },
8177
8371
  {
8178
8372
  "kind": "js",
8179
- "name": "GenesisReviewPayload",
8373
+ "name": "HeadlessResult",
8374
+ "declaration": {
8375
+ "name": "HeadlessResult",
8376
+ "module": "./headless.types"
8377
+ }
8378
+ },
8379
+ {
8380
+ "kind": "js",
8381
+ "name": "HeadlessRestoreOutcome",
8180
8382
  "declaration": {
8181
- "name": "GenesisReviewPayload",
8182
- "module": "./review-payload"
8383
+ "name": "HeadlessRestoreOutcome",
8384
+ "module": "./headless.types"
8183
8385
  }
8184
8386
  },
8185
8387
  {
8186
8388
  "kind": "js",
8187
- "name": "LONG_VALUE",
8389
+ "name": "HeadlessSendOptions",
8188
8390
  "declaration": {
8189
- "name": "LONG_VALUE",
8190
- "module": "src/genesis/review-model.ts"
8391
+ "name": "HeadlessSendOptions",
8392
+ "module": "./headless.types"
8191
8393
  }
8192
- }
8193
- ]
8194
- },
8195
- {
8196
- "kind": "javascript-module",
8197
- "path": "src/genesis/review-payload.ts",
8198
- "declarations": [],
8199
- "exports": []
8200
- },
8201
- {
8202
- "kind": "javascript-module",
8203
- "path": "src/genesis/row-source.ts",
8204
- "declarations": [],
8205
- "exports": []
8206
- },
8207
- {
8208
- "kind": "javascript-module",
8209
- "path": "src/genesis/serialisable.ts",
8210
- "declarations": [],
8211
- "exports": []
8212
- },
8213
- {
8214
- "kind": "javascript-module",
8215
- "path": "src/genesis/server-text.ts",
8216
- "declarations": [
8217
- {
8218
- "kind": "function",
8219
- "name": "readsLikeFieldName",
8220
- "return": {
8221
- "type": {
8222
- "text": "boolean"
8223
- }
8224
- },
8225
- "parameters": [
8226
- {
8227
- "name": "text",
8228
- "type": {
8229
- "text": "string"
8230
- }
8231
- }
8232
- ],
8233
- "description": "Whether text is a Genesis identifier, the FIELD_NAME shape. @internal"
8234
8394
  },
8235
- {
8236
- "kind": "function",
8237
- "name": "describeFailure",
8238
- "return": {
8239
- "type": {
8240
- "text": "string | undefined"
8241
- }
8242
- },
8243
- "parameters": [
8244
- {
8245
- "name": "error",
8246
- "type": {
8247
- "text": "unknown"
8248
- }
8249
- }
8250
- ],
8251
- "description": "Whatever a rejection turns out to be, as a sentence."
8252
- }
8253
- ],
8254
- "exports": [
8255
8395
  {
8256
8396
  "kind": "js",
8257
- "name": "readsLikeFieldName",
8397
+ "name": "HeadlessSessionOptions",
8258
8398
  "declaration": {
8259
- "name": "readsLikeFieldName",
8260
- "module": "src/genesis/server-text.ts"
8399
+ "name": "HeadlessSessionOptions",
8400
+ "module": "./headless.types"
8261
8401
  }
8262
8402
  },
8263
8403
  {
8264
8404
  "kind": "js",
8265
- "name": "describeFailure",
8405
+ "name": "HeadlessState",
8266
8406
  "declaration": {
8267
- "name": "describeFailure",
8268
- "module": "src/genesis/server-text.ts"
8407
+ "name": "HeadlessState",
8408
+ "module": "./headless.types"
8269
8409
  }
8270
- }
8271
- ]
8272
- },
8273
- {
8274
- "kind": "javascript-module",
8275
- "path": "src/genesis/type-name.ts",
8276
- "declarations": [],
8277
- "exports": []
8278
- },
8279
- {
8280
- "kind": "javascript-module",
8281
- "path": "src/genesis/types.ts",
8282
- "declarations": [
8283
- {
8284
- "kind": "variable",
8285
- "name": "GENESIS_EVENT_OPS",
8286
- "type": {
8287
- "text": "['insert', 'modify', 'delete', 'custom']"
8288
- },
8289
- "default": "['insert', 'modify', 'delete', 'custom']",
8290
- "description": "The wire vocabulary for an event resource's operation. Custom handlers keep their own name."
8291
- }
8292
- ],
8293
- "exports": [
8410
+ },
8294
8411
  {
8295
8412
  "kind": "js",
8296
- "name": "GENESIS_EVENT_OPS",
8413
+ "name": "HeadlessWaitRequest",
8297
8414
  "declaration": {
8298
- "name": "GENESIS_EVENT_OPS",
8299
- "module": "src/genesis/types.ts"
8415
+ "name": "HeadlessWaitRequest",
8416
+ "module": "./headless.types"
8300
8417
  }
8301
- }
8302
- ]
8303
- },
8304
- {
8305
- "kind": "javascript-module",
8306
- "path": "src/genesis/value-compare.ts",
8307
- "declarations": [],
8308
- "exports": []
8309
- },
8310
- {
8311
- "kind": "javascript-module",
8312
- "path": "src/genesis/write-commit.ts",
8313
- "declarations": [],
8314
- "exports": []
8315
- },
8316
- {
8317
- "kind": "javascript-module",
8318
- "path": "src/genesis/write-op.ts",
8319
- "declarations": [],
8320
- "exports": []
8321
- },
8322
- {
8323
- "kind": "javascript-module",
8324
- "path": "src/genesis/write-outcome.ts",
8325
- "declarations": [],
8326
- "exports": []
8327
- },
8328
- {
8329
- "kind": "javascript-module",
8330
- "path": "src/genesis/write-payload.ts",
8331
- "declarations": [
8332
- {
8333
- "kind": "function",
8334
- "name": "buildEventPayload",
8335
- "return": {
8336
- "type": {
8337
- "text": "PayloadResult"
8338
- }
8339
- },
8340
- "parameters": [
8341
- {
8342
- "name": "fields",
8343
- "type": {
8344
- "text": "readonly GenesisEventField[]"
8345
- }
8346
- },
8347
- {
8348
- "name": "row",
8349
- "type": {
8350
- "text": "unknown"
8351
- }
8352
- },
8353
- {
8354
- "name": "{ op, preImage, unchecked }",
8355
- "type": {
8356
- "text": "BuildPayloadOptions"
8357
- }
8358
- }
8359
- ]
8360
- }
8361
- ],
8362
- "exports": [
8418
+ },
8363
8419
  {
8364
8420
  "kind": "js",
8365
- "name": "buildEventPayload",
8421
+ "name": "HeadlessWaitResult",
8366
8422
  "declaration": {
8367
- "name": "buildEventPayload",
8368
- "module": "src/genesis/write-payload.ts"
8423
+ "name": "HeadlessWaitResult",
8424
+ "module": "./headless.types"
8369
8425
  }
8370
- }
8371
- ]
8372
- },
8373
- {
8374
- "kind": "javascript-module",
8375
- "path": "src/genesis/write-plan.ts",
8376
- "declarations": [
8377
- {
8378
- "kind": "variable",
8379
- "name": "MAX_WRITE_ROWS",
8380
- "type": {
8381
- "text": "number"
8382
- },
8383
- "default": "25",
8384
- "description": "A batch a person can actually read before approving it."
8385
- }
8386
- ],
8387
- "exports": [
8426
+ },
8388
8427
  {
8389
8428
  "kind": "js",
8390
- "name": "MAX_WRITE_ROWS",
8429
+ "name": "InteractionDescription",
8391
8430
  "declaration": {
8392
- "name": "MAX_WRITE_ROWS",
8393
- "module": "src/genesis/write-plan.ts"
8431
+ "name": "InteractionDescription",
8432
+ "module": "./headless.types"
8394
8433
  }
8395
- }
8396
- ]
8397
- },
8398
- {
8399
- "kind": "javascript-module",
8400
- "path": "src/genesis/write-tools.ts",
8401
- "declarations": [
8402
- {
8403
- "kind": "function",
8404
- "name": "createGenesisWriteTools",
8405
- "return": {
8406
- "type": {
8407
- "text": "{\n toolDefinitions: () => Promise<ChatToolDefinition[]>;\n toolHandlers: ChatToolHandlers;\n /**\n * The events that can get a write tool, as far as the config can tell: an event refused for its\n * op, its rowSources entry or a malformed references, or a modify or delete with no row source,\n * is not among them. Their metadata, read when the tools are first listed, can still withhold one.\n */\n writableEvents: readonly string[];\n}"
8408
- }
8409
- },
8410
- "parameters": [
8411
- {
8412
- "name": "resources",
8413
- "type": {
8414
- "text": "readonly GenesisAiResource[]"
8415
- }
8416
- },
8417
- {
8418
- "name": "options",
8419
- "default": "{}",
8420
- "type": {
8421
- "text": "GenesisWriteToolsOptions"
8422
- }
8423
- }
8424
- ],
8425
- "description": "Builds the assistant's write tools from an app's event resources."
8426
- }
8427
- ],
8428
- "exports": [
8434
+ },
8429
8435
  {
8430
8436
  "kind": "js",
8431
- "name": "createGenesisWriteTools",
8437
+ "name": "PendingSummary",
8432
8438
  "declaration": {
8433
- "name": "createGenesisWriteTools",
8434
- "module": "src/genesis/write-tools.ts"
8439
+ "name": "PendingSummary",
8440
+ "module": "./headless.types"
8435
8441
  }
8436
8442
  }
8437
8443
  ]
8438
8444
  },
8439
- {
8440
- "kind": "javascript-module",
8441
- "path": "src/genesis/write-turn.ts",
8442
- "declarations": [],
8443
- "exports": []
8444
- },
8445
8445
  {
8446
8446
  "kind": "javascript-module",
8447
8447
  "path": "src/headless-server/compact.ts",