@genesislcap/ai-assistant 15.89.0 → 15.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/custom-elements.json +1268 -1268
  2. package/package.json +17 -17
@@ -7149,578 +7149,890 @@
7149
7149
  },
7150
7150
  {
7151
7151
  "kind": "javascript-module",
7152
- "path": "src/headless/describe-interaction.ts",
7152
+ "path": "src/headless-server/compact.ts",
7153
7153
  "declarations": [
7154
7154
  {
7155
7155
  "kind": "function",
7156
- "name": "describeInteraction",
7156
+ "name": "firstLines",
7157
7157
  "return": {
7158
7158
  "type": {
7159
- "text": "InteractionDescription"
7159
+ "text": "{ text: string; chars?: number }"
7160
7160
  }
7161
7161
  },
7162
7162
  "parameters": [
7163
7163
  {
7164
- "name": "input",
7164
+ "name": "text",
7165
7165
  "type": {
7166
- "text": "DescribeInteractionInput"
7166
+ "text": "string"
7167
+ }
7168
+ },
7169
+ {
7170
+ "name": "lines",
7171
+ "type": {
7172
+ "text": "number"
7173
+ }
7174
+ },
7175
+ {
7176
+ "name": "chars",
7177
+ "type": {
7178
+ "text": "number"
7167
7179
  }
7168
7180
  }
7169
7181
  ],
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": [
7182
+ "description": "The first `lines` lines of `text`, at most `chars` characters, and its full length when it was cut."
7183
+ },
7174
7184
  {
7175
- "kind": "js",
7176
- "name": "describeInteraction",
7177
- "declaration": {
7178
- "name": "describeInteraction",
7179
- "module": "src/headless/describe-interaction.ts"
7180
- }
7181
- }
7182
- ]
7183
- },
7184
- {
7185
- "kind": "javascript-module",
7186
- "path": "src/headless/headless-debug.ts",
7187
- "declarations": [
7185
+ "kind": "function",
7186
+ "name": "present",
7187
+ "return": {
7188
+ "type": {
7189
+ "text": "Partial<T>"
7190
+ }
7191
+ },
7192
+ "parameters": [
7193
+ {
7194
+ "name": "source",
7195
+ "type": {
7196
+ "text": "T"
7197
+ }
7198
+ }
7199
+ ],
7200
+ "description": "The keys of `source` that are set, as a new object: a field with nothing to say is dropped."
7201
+ },
7188
7202
  {
7189
7203
  "kind": "function",
7190
- "name": "headlessMetaSnapshot",
7204
+ "name": "compactEvent",
7191
7205
  "return": {
7192
7206
  "type": {
7193
- "text": "DiagnosticEntry"
7207
+ "text": "CompactEvent | undefined"
7194
7208
  }
7195
7209
  },
7196
7210
  "parameters": [
7197
7211
  {
7198
- "name": "driver",
7212
+ "name": "event",
7199
7213
  "type": {
7200
- "text": "AiDriver"
7214
+ "text": "HeadlessEvent"
7201
7215
  }
7202
7216
  },
7203
7217
  {
7204
7218
  "name": "options",
7205
7219
  "default": "{}",
7206
7220
  "type": {
7207
- "text": "HeadlessDebugOptions"
7221
+ "text": "CompactOptions"
7208
7222
  }
7209
7223
  }
7210
7224
  ],
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."
7225
+ "description": "One session event, compact. `decision` and `working` are not reported as events: what the person is asked\nis the reply's `decision`, and what is working is its `working`. A message carries its first lines and\nits length; a probe event is the host's view of it (see `ServerOptions.probeEvent`)."
7212
7226
  },
7213
7227
  {
7214
7228
  "kind": "function",
7215
- "name": "headlessDiagnosticEntries",
7229
+ "name": "leanDecisionText",
7216
7230
  "return": {
7217
7231
  "type": {
7218
- "text": "DiagnosticEntry[]"
7232
+ "text": "string"
7219
7233
  }
7220
7234
  },
7221
7235
  "parameters": [
7222
7236
  {
7223
- "name": "driver",
7237
+ "name": "text",
7224
7238
  "type": {
7225
- "text": "AiDriver"
7239
+ "text": "string"
7226
7240
  }
7227
7241
  },
7228
7242
  {
7229
- "name": "stateKey",
7243
+ "name": "views",
7244
+ "optional": true,
7230
7245
  "type": {
7231
- "text": "string"
7246
+ "text": "Readonly<Record<string, string>>"
7247
+ }
7248
+ }
7249
+ ],
7250
+ "description": "A decision's text without its `Now: <the preview view as JSON>` line, and nothing else (`decisionText:\n\"lean\"`). `renderDecision` writes the preview as `Now: ${capRead(JSON.stringify(view))}`: `JSON.stringify`\nwith no indent never breaks a line, so the JSON is the one line, and `capRead` adds a second, `[Cut at …]`,\nonly when it cut it. Both go; in their place is a pointer to `read`. The line is found by position, not\nby prefix alone: it follows the Views list, whose entry for the preview ends `(shown below as Now)`, so a\ncard that itself has a line starting `Now: ` is not mistaken for it.\n\nThe text comes back as it was when there is no preview to find (a card with no preview view, or a short-form\ndecision, which shows no `Now:`), or when `views` does not name the one the Views list marks."
7251
+ },
7252
+ {
7253
+ "kind": "function",
7254
+ "name": "compactDecision",
7255
+ "return": {
7256
+ "type": {
7257
+ "text": "CompactDecision"
7258
+ }
7259
+ },
7260
+ "parameters": [
7261
+ {
7262
+ "name": "description",
7263
+ "type": {
7264
+ "text": "InteractionDescription"
7232
7265
  }
7233
7266
  },
7234
7267
  {
7235
- "name": "options",
7236
- "default": "{}",
7268
+ "name": "decisionText",
7269
+ "default": "'full'",
7237
7270
  "type": {
7238
- "text": "HeadlessDebugOptions"
7271
+ "text": "DecisionText"
7239
7272
  }
7240
7273
  }
7241
7274
  ],
7242
- "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
7275
+ "description": "A decision as the reply carries it: what to read and what to choose from, and nothing empty. With\n`decisionText: \"lean\"` its `text` leaves out the preview view's JSON (leanDecisionText); nothing\nelse about it changes."
7243
7276
  },
7244
7277
  {
7245
7278
  "kind": "function",
7246
- "name": "headlessCurrentDebugLog",
7279
+ "name": "shortDecision",
7247
7280
  "return": {
7248
7281
  "type": {
7249
- "text": "DebugLog"
7282
+ "text": "CompactDecision"
7250
7283
  }
7251
7284
  },
7252
7285
  "parameters": [
7253
7286
  {
7254
- "name": "driver",
7287
+ "name": "interactionId",
7255
7288
  "type": {
7256
- "text": "AiDriver"
7289
+ "text": "string"
7257
7290
  }
7258
7291
  },
7259
7292
  {
7260
- "name": "stateKey",
7293
+ "name": "component",
7261
7294
  "type": {
7262
7295
  "text": "string"
7263
7296
  }
7264
7297
  },
7265
7298
  {
7266
- "name": "options",
7267
- "default": "{}",
7299
+ "name": "actions",
7268
7300
  "type": {
7269
- "text": "HeadlessDebugOptions"
7301
+ "text": "ReadonlyArray<{ n?: number; name: string; enabled: boolean }>"
7270
7302
  }
7271
7303
  }
7272
7304
  ],
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."
7305
+ "description": "A decision cut to what a caller who has already read the card needs: which interaction, and the actions as\n`n`, `name`, `enabled`. For the reply to an edit, and to a refused action, where the card has not changed\nenough to be worth sending again."
7306
+ },
7307
+ {
7308
+ "kind": "function",
7309
+ "name": "capOutput",
7310
+ "return": {
7311
+ "type": {
7312
+ "text": "unknown"
7313
+ }
7314
+ },
7315
+ "parameters": [
7316
+ {
7317
+ "name": "output",
7318
+ "type": {
7319
+ "text": "unknown"
7320
+ }
7321
+ }
7322
+ ],
7323
+ "description": "What an editing action returned, as the reply carries it: whole when small, else its first characters."
7274
7324
  }
7275
7325
  ],
7276
7326
  "exports": [
7277
7327
  {
7278
7328
  "kind": "js",
7279
- "name": "headlessMetaSnapshot",
7329
+ "name": "firstLines",
7280
7330
  "declaration": {
7281
- "name": "headlessMetaSnapshot",
7282
- "module": "src/headless/headless-debug.ts"
7331
+ "name": "firstLines",
7332
+ "module": "src/headless-server/compact.ts"
7283
7333
  }
7284
7334
  },
7285
7335
  {
7286
7336
  "kind": "js",
7287
- "name": "headlessDiagnosticEntries",
7337
+ "name": "present",
7288
7338
  "declaration": {
7289
- "name": "headlessDiagnosticEntries",
7290
- "module": "src/headless/headless-debug.ts"
7339
+ "name": "present",
7340
+ "module": "src/headless-server/compact.ts"
7291
7341
  }
7292
7342
  },
7293
7343
  {
7294
7344
  "kind": "js",
7295
- "name": "headlessCurrentDebugLog",
7345
+ "name": "compactEvent",
7296
7346
  "declaration": {
7297
- "name": "headlessCurrentDebugLog",
7298
- "module": "src/headless/headless-debug.ts"
7347
+ "name": "compactEvent",
7348
+ "module": "src/headless-server/compact.ts"
7299
7349
  }
7300
- }
7301
- ]
7302
- },
7303
- {
7304
- "kind": "javascript-module",
7305
- "path": "src/headless/headless-persistence.ts",
7306
- "declarations": [
7350
+ },
7307
7351
  {
7308
- "kind": "function",
7309
- "name": "headlessPersistence",
7310
- "return": {
7311
- "type": {
7312
- "text": "HeadlessPersistence"
7313
- }
7314
- },
7315
- "parameters": [
7316
- {
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": [
7352
+ "kind": "js",
7353
+ "name": "leanDecisionText",
7354
+ "declaration": {
7355
+ "name": "leanDecisionText",
7356
+ "module": "src/headless-server/compact.ts"
7357
+ }
7358
+ },
7327
7359
  {
7328
7360
  "kind": "js",
7329
- "name": "headlessPersistence",
7361
+ "name": "compactDecision",
7330
7362
  "declaration": {
7331
- "name": "headlessPersistence",
7332
- "module": "src/headless/headless-persistence.ts"
7363
+ "name": "compactDecision",
7364
+ "module": "src/headless-server/compact.ts"
7365
+ }
7366
+ },
7367
+ {
7368
+ "kind": "js",
7369
+ "name": "shortDecision",
7370
+ "declaration": {
7371
+ "name": "shortDecision",
7372
+ "module": "src/headless-server/compact.ts"
7373
+ }
7374
+ },
7375
+ {
7376
+ "kind": "js",
7377
+ "name": "capOutput",
7378
+ "declaration": {
7379
+ "name": "capOutput",
7380
+ "module": "src/headless-server/compact.ts"
7333
7381
  }
7334
7382
  }
7335
7383
  ]
7336
7384
  },
7337
7385
  {
7338
7386
  "kind": "javascript-module",
7339
- "path": "src/headless/headless-session.ts",
7340
- "declarations": [
7387
+ "path": "src/headless-server/index.ts",
7388
+ "declarations": [],
7389
+ "exports": [
7341
7390
  {
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
- },
7391
+ "kind": "js",
7392
+ "name": "capOutput",
7393
+ "declaration": {
7394
+ "name": "capOutput",
7395
+ "module": "./compact"
7396
+ }
7397
+ },
7398
+ {
7399
+ "kind": "js",
7400
+ "name": "compactDecision",
7401
+ "declaration": {
7402
+ "name": "compactDecision",
7403
+ "module": "./compact"
7404
+ }
7405
+ },
7406
+ {
7407
+ "kind": "js",
7408
+ "name": "compactEvent",
7409
+ "declaration": {
7410
+ "name": "compactEvent",
7411
+ "module": "./compact"
7412
+ }
7413
+ },
7414
+ {
7415
+ "kind": "js",
7416
+ "name": "firstLines",
7417
+ "declaration": {
7418
+ "name": "firstLines",
7419
+ "module": "./compact"
7420
+ }
7421
+ },
7422
+ {
7423
+ "kind": "js",
7424
+ "name": "leanDecisionText",
7425
+ "declaration": {
7426
+ "name": "leanDecisionText",
7427
+ "module": "./compact"
7428
+ }
7429
+ },
7430
+ {
7431
+ "kind": "js",
7432
+ "name": "shortDecision",
7433
+ "declaration": {
7434
+ "name": "shortDecision",
7435
+ "module": "./compact"
7436
+ }
7437
+ },
7438
+ {
7439
+ "kind": "js",
7440
+ "name": "createHeadlessServer",
7441
+ "declaration": {
7442
+ "name": "createHeadlessServer",
7443
+ "module": "./server"
7444
+ }
7445
+ },
7446
+ {
7447
+ "kind": "js",
7448
+ "name": "DECISION_TEXTS",
7449
+ "declaration": {
7450
+ "name": "DECISION_TEXTS",
7451
+ "module": "./types"
7452
+ }
7453
+ },
7454
+ {
7455
+ "kind": "js",
7456
+ "name": "DEFAULT_DECISION_TEXT",
7457
+ "declaration": {
7458
+ "name": "DEFAULT_DECISION_TEXT",
7459
+ "module": "./types"
7460
+ }
7461
+ },
7462
+ {
7463
+ "kind": "js",
7464
+ "name": "Command",
7465
+ "declaration": {
7466
+ "name": "Command",
7467
+ "module": "./types"
7468
+ }
7469
+ },
7470
+ {
7471
+ "kind": "js",
7472
+ "name": "CompactAction",
7473
+ "declaration": {
7474
+ "name": "CompactAction",
7475
+ "module": "./types"
7476
+ }
7477
+ },
7478
+ {
7479
+ "kind": "js",
7480
+ "name": "CompactDecision",
7481
+ "declaration": {
7482
+ "name": "CompactDecision",
7483
+ "module": "./types"
7484
+ }
7485
+ },
7486
+ {
7487
+ "kind": "js",
7488
+ "name": "CompactEvent",
7489
+ "declaration": {
7490
+ "name": "CompactEvent",
7491
+ "module": "./types"
7492
+ }
7493
+ },
7494
+ {
7495
+ "kind": "js",
7496
+ "name": "Composer",
7497
+ "declaration": {
7498
+ "name": "Composer",
7499
+ "module": "./types"
7500
+ }
7501
+ },
7502
+ {
7503
+ "kind": "js",
7504
+ "name": "DecisionText",
7505
+ "declaration": {
7506
+ "name": "DecisionText",
7507
+ "module": "./types"
7508
+ }
7509
+ },
7510
+ {
7511
+ "kind": "js",
7512
+ "name": "ExtraOp",
7513
+ "declaration": {
7514
+ "name": "ExtraOp",
7515
+ "module": "./types"
7516
+ }
7517
+ },
7518
+ {
7519
+ "kind": "js",
7520
+ "name": "ExtraOpResult",
7521
+ "declaration": {
7522
+ "name": "ExtraOpResult",
7523
+ "module": "./types"
7524
+ }
7525
+ },
7526
+ {
7527
+ "kind": "js",
7528
+ "name": "HeadlessServer",
7529
+ "declaration": {
7530
+ "name": "HeadlessServer",
7531
+ "module": "./types"
7532
+ }
7533
+ },
7534
+ {
7535
+ "kind": "js",
7536
+ "name": "HeadlessServerHandle",
7537
+ "declaration": {
7538
+ "name": "HeadlessServerHandle",
7539
+ "module": "./types"
7540
+ }
7541
+ },
7542
+ {
7543
+ "kind": "js",
7544
+ "name": "Reply",
7545
+ "declaration": {
7546
+ "name": "Reply",
7547
+ "module": "./types"
7548
+ }
7549
+ },
7550
+ {
7551
+ "kind": "js",
7552
+ "name": "ServerOptions",
7553
+ "declaration": {
7554
+ "name": "ServerOptions",
7555
+ "module": "./types"
7556
+ }
7557
+ },
7558
+ {
7559
+ "kind": "js",
7560
+ "name": "Status",
7561
+ "declaration": {
7562
+ "name": "Status",
7563
+ "module": "./types"
7564
+ }
7565
+ },
7566
+ {
7567
+ "kind": "js",
7568
+ "name": "WorkingInfo",
7569
+ "declaration": {
7570
+ "name": "WorkingInfo",
7571
+ "module": "./types"
7572
+ }
7573
+ }
7574
+ ]
7575
+ },
7576
+ {
7577
+ "kind": "javascript-module",
7578
+ "path": "src/headless-server/server.ts",
7579
+ "declarations": [
7580
+ {
7581
+ "kind": "function",
7582
+ "name": "createHeadlessServer",
7583
+ "return": {
7584
+ "type": {
7585
+ "text": "HeadlessServer"
7586
+ }
7587
+ },
7588
+ "parameters": [
7424
7589
  {
7425
- "kind": "field",
7426
- "name": "teardown",
7590
+ "name": "options",
7427
7591
  "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
- },
7592
+ "text": "ServerOptions"
7593
+ }
7594
+ }
7595
+ ],
7596
+ "description": "The headless server (PLAN §5, D7): `node:http` on 127.0.0.1, `GET /health` and `POST /cmd`.\n\nEvery command is APPLIED and then LONG-POLLS (§5.5): the reply comes when the journey next needs the\nperson (an interaction is held by them and ready), a turn ends, the run ends, or something fails, or at\n`maxWaitMs` with `status: \"working\"`. Nothing is lost on a client timeout: the command was applied before\nthe wait, events carry `seq`, and `{op: \"wait\", since}` returns everything after it.\n\nThe session is the only thing it drives; what the host owns is reached through ServerOptions."
7597
+ }
7598
+ ],
7599
+ "exports": [
7600
+ {
7601
+ "kind": "js",
7602
+ "name": "createHeadlessServer",
7603
+ "declaration": {
7604
+ "name": "createHeadlessServer",
7605
+ "module": "src/headless-server/server.ts"
7606
+ }
7607
+ }
7608
+ ]
7609
+ },
7610
+ {
7611
+ "kind": "javascript-module",
7612
+ "path": "src/headless-server/types.ts",
7613
+ "declarations": [
7614
+ {
7615
+ "kind": "variable",
7616
+ "name": "DECISION_TEXTS",
7617
+ "type": {
7618
+ "text": "readonly DecisionText[]"
7619
+ },
7620
+ "default": "['full', 'lean']"
7621
+ },
7622
+ {
7623
+ "kind": "variable",
7624
+ "name": "DEFAULT_DECISION_TEXT",
7625
+ "type": {
7626
+ "text": "DecisionText"
7627
+ },
7628
+ "default": "'lean'",
7629
+ "description": "What the server uses when neither it nor the command says. Its readers are models that can `read` a view."
7630
+ }
7631
+ ],
7632
+ "exports": [
7633
+ {
7634
+ "kind": "js",
7635
+ "name": "DECISION_TEXTS",
7636
+ "declaration": {
7637
+ "name": "DECISION_TEXTS",
7638
+ "module": "src/headless-server/types.ts"
7639
+ }
7640
+ },
7641
+ {
7642
+ "kind": "js",
7643
+ "name": "DEFAULT_DECISION_TEXT",
7644
+ "declaration": {
7645
+ "name": "DEFAULT_DECISION_TEXT",
7646
+ "module": "src/headless-server/types.ts"
7647
+ }
7648
+ }
7649
+ ]
7650
+ },
7651
+ {
7652
+ "kind": "javascript-module",
7653
+ "path": "src/headless/describe-interaction.ts",
7654
+ "declarations": [
7655
+ {
7656
+ "kind": "function",
7657
+ "name": "describeInteraction",
7658
+ "return": {
7659
+ "type": {
7660
+ "text": "InteractionDescription"
7661
+ }
7662
+ },
7663
+ "parameters": [
7443
7664
  {
7444
- "kind": "field",
7445
- "name": "turn",
7665
+ "name": "input",
7446
7666
  "type": {
7447
- "text": "Promise<unknown> | undefined"
7448
- },
7449
- "privacy": "private",
7450
- "description": "The `send` in flight, if any."
7451
- },
7667
+ "text": "DescribeInteractionInput"
7668
+ }
7669
+ }
7670
+ ],
7671
+ "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."
7672
+ }
7673
+ ],
7674
+ "exports": [
7675
+ {
7676
+ "kind": "js",
7677
+ "name": "describeInteraction",
7678
+ "declaration": {
7679
+ "name": "describeInteraction",
7680
+ "module": "src/headless/describe-interaction.ts"
7681
+ }
7682
+ }
7683
+ ]
7684
+ },
7685
+ {
7686
+ "kind": "javascript-module",
7687
+ "path": "src/headless/headless-debug.ts",
7688
+ "declarations": [
7689
+ {
7690
+ "kind": "function",
7691
+ "name": "headlessMetaSnapshot",
7692
+ "return": {
7693
+ "type": {
7694
+ "text": "DiagnosticEntry"
7695
+ }
7696
+ },
7697
+ "parameters": [
7452
7698
  {
7453
- "kind": "field",
7454
- "name": "open",
7699
+ "name": "driver",
7455
7700
  "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."
7701
+ "text": "AiDriver"
7702
+ }
7460
7703
  },
7461
7704
  {
7462
- "kind": "field",
7463
- "name": "base",
7705
+ "name": "options",
7706
+ "default": "{}",
7464
7707
  "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
- },
7708
+ "text": "HeadlessDebugOptions"
7709
+ }
7710
+ }
7711
+ ],
7712
+ "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."
7713
+ },
7714
+ {
7715
+ "kind": "function",
7716
+ "name": "headlessDiagnosticEntries",
7717
+ "return": {
7718
+ "type": {
7719
+ "text": "DiagnosticEntry[]"
7720
+ }
7721
+ },
7722
+ "parameters": [
7470
7723
  {
7471
- "kind": "field",
7472
- "name": "quiesceTimer",
7724
+ "name": "driver",
7473
7725
  "type": {
7474
- "text": "ReturnType<typeof setTimeout> | undefined"
7475
- },
7476
- "privacy": "private"
7726
+ "text": "AiDriver"
7727
+ }
7477
7728
  },
7478
7729
  {
7479
- "kind": "field",
7480
- "name": "poller",
7730
+ "name": "stateKey",
7481
7731
  "type": {
7482
- "text": "ReturnType<typeof setInterval> | undefined"
7483
- },
7484
- "privacy": "private"
7732
+ "text": "string"
7733
+ }
7485
7734
  },
7486
7735
  {
7487
- "kind": "field",
7488
- "name": "persistence",
7736
+ "name": "options",
7737
+ "default": "{}",
7489
7738
  "type": {
7490
- "text": "HeadlessPersistenceBinding | undefined"
7491
- },
7492
- "privacy": "private",
7493
- "readonly": true
7494
- },
7739
+ "text": "HeadlessDebugOptions"
7740
+ }
7741
+ }
7742
+ ],
7743
+ "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
7744
+ },
7745
+ {
7746
+ "kind": "function",
7747
+ "name": "headlessCurrentDebugLog",
7748
+ "return": {
7749
+ "type": {
7750
+ "text": "DebugLog"
7751
+ }
7752
+ },
7753
+ "parameters": [
7495
7754
  {
7496
- "kind": "field",
7497
- "name": "lastProbe",
7755
+ "name": "driver",
7498
7756
  "type": {
7499
- "text": "Record<string, unknown>"
7500
- },
7501
- "privacy": "private",
7502
- "default": "{}"
7757
+ "text": "AiDriver"
7758
+ }
7503
7759
  },
7504
7760
  {
7505
- "kind": "field",
7506
- "name": "lastAutopilot",
7761
+ "name": "stateKey",
7507
7762
  "type": {
7508
7763
  "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"
7764
+ }
7521
7765
  },
7522
7766
  {
7523
- "kind": "field",
7524
- "name": "restoring",
7767
+ "name": "options",
7768
+ "default": "{}",
7525
7769
  "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
- },
7770
+ "text": "HeadlessDebugOptions"
7771
+ }
7772
+ }
7773
+ ],
7774
+ "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."
7775
+ }
7776
+ ],
7777
+ "exports": [
7778
+ {
7779
+ "kind": "js",
7780
+ "name": "headlessMetaSnapshot",
7781
+ "declaration": {
7782
+ "name": "headlessMetaSnapshot",
7783
+ "module": "src/headless/headless-debug.ts"
7784
+ }
7785
+ },
7786
+ {
7787
+ "kind": "js",
7788
+ "name": "headlessDiagnosticEntries",
7789
+ "declaration": {
7790
+ "name": "headlessDiagnosticEntries",
7791
+ "module": "src/headless/headless-debug.ts"
7792
+ }
7793
+ },
7794
+ {
7795
+ "kind": "js",
7796
+ "name": "headlessCurrentDebugLog",
7797
+ "declaration": {
7798
+ "name": "headlessCurrentDebugLog",
7799
+ "module": "src/headless/headless-debug.ts"
7800
+ }
7801
+ }
7802
+ ]
7803
+ },
7804
+ {
7805
+ "kind": "javascript-module",
7806
+ "path": "src/headless/headless-persistence.ts",
7807
+ "declarations": [
7808
+ {
7809
+ "kind": "function",
7810
+ "name": "headlessPersistence",
7811
+ "return": {
7812
+ "type": {
7813
+ "text": "HeadlessPersistence"
7814
+ }
7815
+ },
7816
+ "parameters": [
7588
7817
  {
7589
- "kind": "method",
7590
- "name": "resolve",
7591
- "return": {
7592
- "type": {
7593
- "text": "HeadlessResult"
7594
- }
7818
+ "name": "options",
7819
+ "type": {
7820
+ "text": "HeadlessPersistenceOptions"
7821
+ }
7822
+ }
7823
+ ],
7824
+ "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)`."
7825
+ }
7826
+ ],
7827
+ "exports": [
7828
+ {
7829
+ "kind": "js",
7830
+ "name": "headlessPersistence",
7831
+ "declaration": {
7832
+ "name": "headlessPersistence",
7833
+ "module": "src/headless/headless-persistence.ts"
7834
+ }
7835
+ }
7836
+ ]
7837
+ },
7838
+ {
7839
+ "kind": "javascript-module",
7840
+ "path": "src/headless/headless-session.ts",
7841
+ "declarations": [
7842
+ {
7843
+ "kind": "class",
7844
+ "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.",
7845
+ "name": "HeadlessSession",
7846
+ "members": [
7847
+ {
7848
+ "kind": "field",
7849
+ "name": "sessionKey",
7850
+ "type": {
7851
+ "text": "string"
7595
7852
  },
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."
7853
+ "privacy": "private",
7854
+ "readonly": true
7611
7855
  },
7612
7856
  {
7613
- "kind": "method",
7614
- "name": "read",
7615
- "return": {
7616
- "type": {
7617
- "text": "Promise<HeadlessReadResult>"
7618
- }
7857
+ "kind": "field",
7858
+ "name": "allowRaw",
7859
+ "type": {
7860
+ "text": "boolean"
7619
7861
  },
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."
7862
+ "privacy": "private",
7863
+ "readonly": true
7636
7864
  },
7637
7865
  {
7638
- "kind": "method",
7639
- "name": "wait",
7640
- "return": {
7641
- "type": {
7642
- "text": "Promise<HeadlessWaitResult>"
7643
- }
7866
+ "kind": "field",
7867
+ "name": "clock",
7868
+ "type": {
7869
+ "text": "() => number"
7644
7870
  },
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."
7871
+ "privacy": "private",
7872
+ "readonly": true
7654
7873
  },
7655
7874
  {
7656
- "kind": "method",
7657
- "name": "eventsSince",
7658
- "return": {
7659
- "type": {
7660
- "text": "readonly HeadlessEvent[]"
7661
- }
7875
+ "kind": "field",
7876
+ "name": "autopilotHost",
7877
+ "type": {
7878
+ "text": "AutopilotLike | undefined"
7662
7879
  },
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."
7880
+ "privacy": "private",
7881
+ "readonly": true,
7882
+ "default": "autopilot"
7670
7883
  },
7671
7884
  {
7672
- "kind": "method",
7673
- "name": "state",
7674
- "return": {
7675
- "type": {
7676
- "text": "HeadlessState"
7677
- }
7885
+ "kind": "field",
7886
+ "name": "events",
7887
+ "type": {
7888
+ "text": "HeadlessEvent[]"
7678
7889
  },
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."
7890
+ "privacy": "private",
7891
+ "readonly": true,
7892
+ "default": "[]"
7680
7893
  },
7681
7894
  {
7682
- "kind": "method",
7683
- "name": "restore",
7684
- "return": {
7685
- "type": {
7686
- "text": "Promise<HeadlessRestoreOutcome | undefined>"
7687
- }
7895
+ "kind": "field",
7896
+ "name": "seq",
7897
+ "type": {
7898
+ "text": "number"
7688
7899
  },
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`."
7900
+ "privacy": "private",
7901
+ "default": "0"
7690
7902
  },
7691
7903
  {
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`."
7904
+ "kind": "field",
7905
+ "name": "tracked",
7906
+ "privacy": "private",
7907
+ "readonly": true,
7908
+ "default": "new Map<string, Tracked>()"
7700
7909
  },
7701
7910
  {
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."
7911
+ "kind": "field",
7912
+ "name": "origin",
7913
+ "privacy": "private",
7914
+ "readonly": true,
7915
+ "default": "new Map<string, { auto?: boolean; raw?: boolean }>()",
7916
+ "description": "What the session did to an interaction itself, for `settled` to say when the driver reports it."
7710
7917
  },
7711
7918
  {
7712
- "kind": "method",
7713
- "name": "stop",
7714
- "return": {
7715
- "type": {
7716
- "text": "HeadlessResult"
7717
- }
7919
+ "kind": "field",
7920
+ "name": "waiters",
7921
+ "privacy": "private",
7922
+ "readonly": true,
7923
+ "default": "new Set<Waiter>()"
7924
+ },
7925
+ {
7926
+ "kind": "field",
7927
+ "name": "teardown",
7928
+ "type": {
7929
+ "text": "Array<() => void>"
7718
7930
  },
7719
- "description": "Stop the running turn, when the driver can."
7931
+ "privacy": "private",
7932
+ "readonly": true,
7933
+ "default": "[]"
7934
+ },
7935
+ {
7936
+ "kind": "field",
7937
+ "name": "seen",
7938
+ "type": {
7939
+ "text": "number"
7940
+ },
7941
+ "privacy": "private",
7942
+ "description": "How much of the driver's history has been reported as messages."
7943
+ },
7944
+ {
7945
+ "kind": "field",
7946
+ "name": "turn",
7947
+ "type": {
7948
+ "text": "Promise<unknown> | undefined"
7949
+ },
7950
+ "privacy": "private",
7951
+ "description": "The `send` in flight, if any."
7952
+ },
7953
+ {
7954
+ "kind": "field",
7955
+ "name": "open",
7956
+ "type": {
7957
+ "text": "{ start: number; reason?: string; failureReason?: string } | undefined"
7958
+ },
7959
+ "privacy": "private",
7960
+ "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."
7961
+ },
7962
+ {
7963
+ "kind": "field",
7964
+ "name": "base",
7965
+ "type": {
7966
+ "text": "number"
7967
+ },
7968
+ "privacy": "private",
7969
+ "description": "History length when the last turn closed: where a turn the session did not start begins."
7970
+ },
7971
+ {
7972
+ "kind": "field",
7973
+ "name": "quiesceTimer",
7974
+ "type": {
7975
+ "text": "ReturnType<typeof setTimeout> | undefined"
7976
+ },
7977
+ "privacy": "private"
7978
+ },
7979
+ {
7980
+ "kind": "field",
7981
+ "name": "poller",
7982
+ "type": {
7983
+ "text": "ReturnType<typeof setInterval> | undefined"
7984
+ },
7985
+ "privacy": "private"
7986
+ },
7987
+ {
7988
+ "kind": "field",
7989
+ "name": "persistence",
7990
+ "type": {
7991
+ "text": "HeadlessPersistenceBinding | undefined"
7992
+ },
7993
+ "privacy": "private",
7994
+ "readonly": true
7995
+ },
7996
+ {
7997
+ "kind": "field",
7998
+ "name": "lastProbe",
7999
+ "type": {
8000
+ "text": "Record<string, unknown>"
8001
+ },
8002
+ "privacy": "private",
8003
+ "default": "{}"
8004
+ },
8005
+ {
8006
+ "kind": "field",
8007
+ "name": "lastAutopilot",
8008
+ "type": {
8009
+ "text": "string"
8010
+ },
8011
+ "privacy": "private",
8012
+ "default": "''"
8013
+ },
8014
+ {
8015
+ "kind": "field",
8016
+ "name": "disposed",
8017
+ "type": {
8018
+ "text": "boolean"
8019
+ },
8020
+ "privacy": "private",
8021
+ "default": "false"
8022
+ },
8023
+ {
8024
+ "kind": "field",
8025
+ "name": "restoring",
8026
+ "type": {
8027
+ "text": "boolean"
8028
+ },
8029
+ "privacy": "private",
8030
+ "default": "false",
8031
+ "description": "While a restore loads the history, which is not new activity."
7720
8032
  },
7721
8033
  {
7722
8034
  "kind": "method",
7723
- "name": "autopilot",
8035
+ "name": "send",
7724
8036
  "return": {
7725
8037
  "type": {
7726
8038
  "text": "HeadlessResult"
@@ -7728,361 +8040,247 @@
7728
8040
  },
7729
8041
  "parameters": [
7730
8042
  {
7731
- "name": "mode",
8043
+ "name": "text",
7732
8044
  "type": {
7733
- "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
8045
+ "text": "string"
7734
8046
  }
7735
8047
  },
7736
8048
  {
7737
- "name": "interactionId",
7738
- "optional": true,
8049
+ "name": "options",
8050
+ "default": "{}",
7739
8051
  "type": {
7740
- "text": "string"
8052
+ "text": "HeadlessSendOptions"
7741
8053
  }
7742
8054
  }
7743
8055
  ],
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."
8056
+ "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."
7745
8057
  },
7746
8058
  {
7747
8059
  "kind": "method",
7748
- "name": "keepPaused",
7749
- "privacy": "private",
8060
+ "name": "act",
7750
8061
  "return": {
7751
8062
  "type": {
7752
- "text": "HeadlessResult"
8063
+ "text": "Promise<HeadlessActResult>"
7753
8064
  }
7754
8065
  },
7755
8066
  "parameters": [
7756
8067
  {
7757
- "name": "host",
8068
+ "name": "interactionId",
7758
8069
  "type": {
7759
- "text": "AutopilotLike"
8070
+ "text": "string"
7760
8071
  }
7761
8072
  },
7762
8073
  {
7763
- "name": "interactionId",
8074
+ "name": "action",
7764
8075
  "type": {
7765
- "text": "string | undefined"
8076
+ "text": "string | number"
8077
+ }
8078
+ },
8079
+ {
8080
+ "name": "args",
8081
+ "default": "{}",
8082
+ "type": {
8083
+ "text": "HeadlessActArgs"
7766
8084
  }
7767
8085
  }
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."
8086
+ ],
8087
+ "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."
7779
8088
  },
7780
8089
  {
7781
8090
  "kind": "method",
7782
- "name": "listen",
7783
- "privacy": "private",
8091
+ "name": "resolve",
7784
8092
  "return": {
7785
8093
  "type": {
7786
- "text": "void"
8094
+ "text": "HeadlessResult"
7787
8095
  }
7788
8096
  },
7789
8097
  "parameters": [
7790
8098
  {
7791
- "name": "type",
8099
+ "name": "interactionId",
7792
8100
  "type": {
7793
8101
  "text": "string"
7794
8102
  }
7795
8103
  },
7796
8104
  {
7797
- "name": "handler",
8105
+ "name": "result",
7798
8106
  "type": {
7799
- "text": "(e: Event) => void"
8107
+ "text": "unknown"
7800
8108
  }
7801
8109
  }
7802
- ]
7803
- },
7804
- {
7805
- "kind": "method",
7806
- "name": "history",
7807
- "privacy": "private",
7808
- "return": {
7809
- "type": {
7810
- "text": "readonly ChatMessage[]"
7811
- }
7812
- }
8110
+ ],
8111
+ "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."
7813
8112
  },
7814
8113
  {
7815
8114
  "kind": "method",
7816
- "name": "onOpened",
7817
- "privacy": "private",
8115
+ "name": "read",
7818
8116
  "return": {
7819
8117
  "type": {
7820
- "text": "void"
8118
+ "text": "Promise<HeadlessReadResult>"
7821
8119
  }
7822
8120
  },
7823
8121
  "parameters": [
7824
8122
  {
7825
- "name": "opened",
8123
+ "name": "interactionId",
7826
8124
  "type": {
7827
- "text": "InteractionOpened"
8125
+ "text": "string"
8126
+ }
8127
+ },
8128
+ {
8129
+ "name": "request",
8130
+ "default": "{}",
8131
+ "type": {
8132
+ "text": "HeadlessReadRequest"
7828
8133
  }
7829
8134
  }
7830
8135
  ],
7831
- "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
8136
+ "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."
7832
8137
  },
7833
8138
  {
7834
8139
  "kind": "method",
7835
- "name": "onSettled",
7836
- "privacy": "private",
8140
+ "name": "wait",
7837
8141
  "return": {
7838
8142
  "type": {
7839
- "text": "void"
8143
+ "text": "Promise<HeadlessWaitResult>"
7840
8144
  }
7841
8145
  },
7842
8146
  "parameters": [
7843
8147
  {
7844
- "name": "detail",
8148
+ "name": "request",
7845
8149
  "type": {
7846
- "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
8150
+ "text": "HeadlessWaitRequest"
7847
8151
  }
7848
8152
  }
7849
8153
  ],
7850
- "description": "The driver says an interaction settled, by whatever route."
8154
+ "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."
7851
8155
  },
7852
8156
  {
7853
8157
  "kind": "method",
7854
- "name": "onEnded",
7855
- "privacy": "private",
8158
+ "name": "eventsSince",
7856
8159
  "return": {
7857
8160
  "type": {
7858
- "text": "void"
8161
+ "text": "readonly HeadlessEvent[]"
7859
8162
  }
7860
8163
  },
7861
8164
  "parameters": [
7862
8165
  {
7863
- "name": "t",
7864
- "type": {
7865
- "text": "Tracked"
7866
- }
8166
+ "name": "since",
8167
+ "default": "0"
7867
8168
  }
7868
8169
  ],
7869
- "description": "The interaction's context was disposed: if nothing said it settled, say it did."
8170
+ "description": "Every event logged after `since` (default: all the log keeps), without waiting."
7870
8171
  },
7871
8172
  {
7872
8173
  "kind": "method",
7873
- "name": "settle",
7874
- "privacy": "private",
8174
+ "name": "state",
7875
8175
  "return": {
7876
8176
  "type": {
7877
- "text": "void"
8177
+ "text": "HeadlessState"
7878
8178
  }
7879
8179
  },
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
- ]
8180
+ "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."
7894
8181
  },
7895
8182
  {
7896
8183
  "kind": "method",
7897
- "name": "release",
7898
- "privacy": "private",
8184
+ "name": "restore",
7899
8185
  "return": {
7900
8186
  "type": {
7901
- "text": "void"
8187
+ "text": "Promise<HeadlessRestoreOutcome | undefined>"
7902
8188
  }
7903
8189
  },
7904
- "parameters": [
7905
- {
7906
- "name": "t",
7907
- "type": {
7908
- "text": "Tracked"
7909
- }
7910
- }
7911
- ]
8190
+ "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`."
7912
8191
  },
7913
8192
  {
7914
8193
  "kind": "method",
7915
- "name": "onHistory",
7916
- "privacy": "private",
8194
+ "name": "flush",
7917
8195
  "return": {
7918
8196
  "type": {
7919
- "text": "void"
8197
+ "text": "Promise<void>"
7920
8198
  }
7921
8199
  },
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
- }
8200
+ "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`."
7943
8201
  },
7944
8202
  {
7945
8203
  "kind": "method",
7946
- "name": "autopilotSignature",
7947
- "privacy": "private",
8204
+ "name": "debugLog",
7948
8205
  "return": {
7949
8206
  "type": {
7950
- "text": "string"
8207
+ "text": "Promise<DebugLog>"
7951
8208
  }
7952
- }
8209
+ },
8210
+ "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."
7953
8211
  },
7954
8212
  {
7955
8213
  "kind": "method",
7956
- "name": "describe",
7957
- "privacy": "private",
8214
+ "name": "stop",
7958
8215
  "return": {
7959
8216
  "type": {
7960
- "text": "InteractionDescription"
8217
+ "text": "HeadlessResult"
7961
8218
  }
7962
8219
  },
7963
- "parameters": [
7964
- {
7965
- "name": "t",
7966
- "type": {
7967
- "text": "Tracked"
7968
- }
7969
- }
7970
- ]
8220
+ "description": "Stop the running turn, when the driver can."
7971
8221
  },
7972
8222
  {
7973
8223
  "kind": "method",
7974
- "name": "evaluate",
7975
- "privacy": "private",
8224
+ "name": "autopilot",
7976
8225
  "return": {
7977
8226
  "type": {
7978
- "text": "void"
8227
+ "text": "HeadlessResult"
7979
8228
  }
7980
8229
  },
7981
8230
  "parameters": [
7982
8231
  {
7983
- "name": "t",
8232
+ "name": "mode",
7984
8233
  "type": {
7985
- "text": "Tracked"
8234
+ "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
7986
8235
  }
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": [
8236
+ },
8001
8237
  {
8002
- "name": "t",
8238
+ "name": "interactionId",
8239
+ "optional": true,
8003
8240
  "type": {
8004
- "text": "Tracked"
8241
+ "text": "string"
8005
8242
  }
8006
8243
  }
8007
8244
  ],
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."
8245
+ "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."
8009
8246
  },
8010
8247
  {
8011
8248
  "kind": "method",
8012
- "name": "readTool",
8249
+ "name": "keepPaused",
8013
8250
  "privacy": "private",
8014
8251
  "return": {
8015
8252
  "type": {
8016
- "text": "Promise<HeadlessReadResult>"
8253
+ "text": "HeadlessResult"
8017
8254
  }
8018
8255
  },
8019
8256
  "parameters": [
8020
8257
  {
8021
- "name": "t",
8022
- "type": {
8023
- "text": "Tracked"
8024
- }
8025
- },
8026
- {
8027
- "name": "name",
8258
+ "name": "host",
8028
8259
  "type": {
8029
- "text": "string"
8260
+ "text": "AutopilotLike"
8030
8261
  }
8031
8262
  },
8032
8263
  {
8033
- "name": "args",
8264
+ "name": "interactionId",
8034
8265
  "type": {
8035
- "text": "Record<string, unknown> | undefined"
8266
+ "text": "string | undefined"
8036
8267
  }
8037
8268
  }
8038
8269
  ]
8039
8270
  },
8040
8271
  {
8041
8272
  "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."
8050
- },
8051
- {
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
- },
8062
- {
8063
- "kind": "method",
8064
- "name": "startPolling",
8065
- "privacy": "private",
8273
+ "name": "dispose",
8066
8274
  "return": {
8067
8275
  "type": {
8068
8276
  "text": "void"
8069
8277
  }
8070
8278
  },
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
- }
8081
- }
8279
+ "description": "Detach: remove the interceptor and every subscription, and release anyone waiting."
8082
8280
  },
8083
8281
  {
8084
8282
  "kind": "method",
8085
- "name": "logTurn",
8283
+ "name": "listen",
8086
8284
  "privacy": "private",
8087
8285
  "return": {
8088
8286
  "type": {
@@ -8091,854 +8289,656 @@
8091
8289
  },
8092
8290
  "parameters": [
8093
8291
  {
8094
- "name": "reason",
8292
+ "name": "type",
8095
8293
  "type": {
8096
8294
  "text": "string"
8097
8295
  }
8098
8296
  },
8099
8297
  {
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",
8298
+ "name": "handler",
8143
8299
  "type": {
8144
- "text": "NewEvent"
8300
+ "text": "(e: Event) => void"
8145
8301
  }
8146
8302
  }
8147
8303
  ]
8148
8304
  },
8149
8305
  {
8150
8306
  "kind": "method",
8151
- "name": "readProbe",
8307
+ "name": "history",
8152
8308
  "privacy": "private",
8153
8309
  "return": {
8154
8310
  "type": {
8155
- "text": "Record<string, unknown>"
8311
+ "text": "readonly ChatMessage[]"
8156
8312
  }
8157
8313
  }
8158
8314
  },
8159
8315
  {
8160
8316
  "kind": "method",
8161
- "name": "checkProbe",
8317
+ "name": "onOpened",
8162
8318
  "privacy": "private",
8163
8319
  "return": {
8164
8320
  "type": {
8165
8321
  "text": "void"
8166
8322
  }
8167
8323
  },
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
8324
  "parameters": [
8180
8325
  {
8181
- "name": "since",
8182
- "type": {
8183
- "text": "number"
8184
- }
8185
- },
8186
- {
8187
- "name": "status",
8188
- "type": {
8189
- "text": "HeadlessWaitResult['status']"
8190
- }
8191
- }
8192
- ]
8193
- }
8194
- ]
8195
- }
8196
- ],
8197
- "exports": [
8198
- {
8199
- "kind": "js",
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",
8238
- "declaration": {
8239
- "name": "headlessDiagnosticEntries",
8240
- "module": "./headless-debug"
8241
- }
8242
- },
8243
- {
8244
- "kind": "js",
8245
- "name": "headlessMetaSnapshot",
8246
- "declaration": {
8247
- "name": "headlessMetaSnapshot",
8248
- "module": "./headless-debug"
8249
- }
8250
- },
8251
- {
8252
- "kind": "js",
8253
- "name": "HeadlessSession",
8254
- "declaration": {
8255
- "name": "HeadlessSession",
8256
- "module": "./headless-session"
8257
- }
8258
- },
8259
- {
8260
- "kind": "js",
8261
- "name": "AutopilotLike",
8262
- "declaration": {
8263
- "name": "AutopilotLike",
8264
- "module": "./headless.types"
8265
- }
8266
- },
8267
- {
8268
- "kind": "js",
8269
- "name": "DescribedAction",
8270
- "declaration": {
8271
- "name": "DescribedAction",
8272
- "module": "./headless.types"
8273
- }
8274
- },
8275
- {
8276
- "kind": "js",
8277
- "name": "DescribeInteractionInput",
8278
- "declaration": {
8279
- "name": "DescribeInteractionInput",
8280
- "module": "./headless.types"
8281
- }
8282
- },
8283
- {
8284
- "kind": "js",
8285
- "name": "HeadlessActArgs",
8286
- "declaration": {
8287
- "name": "HeadlessActArgs",
8288
- "module": "./headless.types"
8289
- }
8290
- },
8291
- {
8292
- "kind": "js",
8293
- "name": "HeadlessActResult",
8294
- "declaration": {
8295
- "name": "HeadlessActResult",
8296
- "module": "./headless.types"
8297
- }
8298
- },
8299
- {
8300
- "kind": "js",
8301
- "name": "HeadlessDebugOptions",
8302
- "declaration": {
8303
- "name": "HeadlessDebugOptions",
8304
- "module": "./headless.types"
8305
- }
8306
- },
8307
- {
8308
- "kind": "js",
8309
- "name": "HeadlessEvent",
8310
- "declaration": {
8311
- "name": "HeadlessEvent",
8312
- "module": "./headless.types"
8313
- }
8314
- },
8315
- {
8316
- "kind": "js",
8317
- "name": "HeadlessEventBase",
8318
- "declaration": {
8319
- "name": "HeadlessEventBase",
8320
- "module": "./headless.types"
8321
- }
8322
- },
8323
- {
8324
- "kind": "js",
8325
- "name": "HeadlessEventType",
8326
- "declaration": {
8327
- "name": "HeadlessEventType",
8328
- "module": "./headless.types"
8329
- }
8330
- },
8331
- {
8332
- "kind": "js",
8333
- "name": "HeadlessPersistence",
8334
- "declaration": {
8335
- "name": "HeadlessPersistence",
8336
- "module": "./headless.types"
8337
- }
8338
- },
8339
- {
8340
- "kind": "js",
8341
- "name": "HeadlessPersistenceBinding",
8342
- "declaration": {
8343
- "name": "HeadlessPersistenceBinding",
8344
- "module": "./headless.types"
8345
- }
8346
- },
8347
- {
8348
- "kind": "js",
8349
- "name": "HeadlessPersistenceHost",
8350
- "declaration": {
8351
- "name": "HeadlessPersistenceHost",
8352
- "module": "./headless.types"
8353
- }
8354
- },
8355
- {
8356
- "kind": "js",
8357
- "name": "HeadlessReadRequest",
8358
- "declaration": {
8359
- "name": "HeadlessReadRequest",
8360
- "module": "./headless.types"
8361
- }
8362
- },
8363
- {
8364
- "kind": "js",
8365
- "name": "HeadlessReadResult",
8366
- "declaration": {
8367
- "name": "HeadlessReadResult",
8368
- "module": "./headless.types"
8369
- }
8370
- },
8371
- {
8372
- "kind": "js",
8373
- "name": "HeadlessResult",
8374
- "declaration": {
8375
- "name": "HeadlessResult",
8376
- "module": "./headless.types"
8377
- }
8378
- },
8379
- {
8380
- "kind": "js",
8381
- "name": "HeadlessRestoreOutcome",
8382
- "declaration": {
8383
- "name": "HeadlessRestoreOutcome",
8384
- "module": "./headless.types"
8385
- }
8386
- },
8387
- {
8388
- "kind": "js",
8389
- "name": "HeadlessSendOptions",
8390
- "declaration": {
8391
- "name": "HeadlessSendOptions",
8392
- "module": "./headless.types"
8393
- }
8394
- },
8395
- {
8396
- "kind": "js",
8397
- "name": "HeadlessSessionOptions",
8398
- "declaration": {
8399
- "name": "HeadlessSessionOptions",
8400
- "module": "./headless.types"
8401
- }
8402
- },
8403
- {
8404
- "kind": "js",
8405
- "name": "HeadlessState",
8406
- "declaration": {
8407
- "name": "HeadlessState",
8408
- "module": "./headless.types"
8409
- }
8410
- },
8411
- {
8412
- "kind": "js",
8413
- "name": "HeadlessWaitRequest",
8414
- "declaration": {
8415
- "name": "HeadlessWaitRequest",
8416
- "module": "./headless.types"
8417
- }
8418
- },
8419
- {
8420
- "kind": "js",
8421
- "name": "HeadlessWaitResult",
8422
- "declaration": {
8423
- "name": "HeadlessWaitResult",
8424
- "module": "./headless.types"
8425
- }
8426
- },
8427
- {
8428
- "kind": "js",
8429
- "name": "InteractionDescription",
8430
- "declaration": {
8431
- "name": "InteractionDescription",
8432
- "module": "./headless.types"
8433
- }
8434
- },
8435
- {
8436
- "kind": "js",
8437
- "name": "PendingSummary",
8438
- "declaration": {
8439
- "name": "PendingSummary",
8440
- "module": "./headless.types"
8441
- }
8442
- }
8443
- ]
8444
- },
8445
- {
8446
- "kind": "javascript-module",
8447
- "path": "src/headless-server/compact.ts",
8448
- "declarations": [
8449
- {
8450
- "kind": "function",
8451
- "name": "firstLines",
8452
- "return": {
8453
- "type": {
8454
- "text": "{ text: string; chars?: number }"
8455
- }
8456
- },
8457
- "parameters": [
8326
+ "name": "opened",
8327
+ "type": {
8328
+ "text": "InteractionOpened"
8329
+ }
8330
+ }
8331
+ ],
8332
+ "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
8333
+ },
8458
8334
  {
8459
- "name": "text",
8460
- "type": {
8461
- "text": "string"
8462
- }
8335
+ "kind": "method",
8336
+ "name": "onSettled",
8337
+ "privacy": "private",
8338
+ "return": {
8339
+ "type": {
8340
+ "text": "void"
8341
+ }
8342
+ },
8343
+ "parameters": [
8344
+ {
8345
+ "name": "detail",
8346
+ "type": {
8347
+ "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
8348
+ }
8349
+ }
8350
+ ],
8351
+ "description": "The driver says an interaction settled, by whatever route."
8463
8352
  },
8464
8353
  {
8465
- "name": "lines",
8466
- "type": {
8467
- "text": "number"
8468
- }
8354
+ "kind": "method",
8355
+ "name": "onEnded",
8356
+ "privacy": "private",
8357
+ "return": {
8358
+ "type": {
8359
+ "text": "void"
8360
+ }
8361
+ },
8362
+ "parameters": [
8363
+ {
8364
+ "name": "t",
8365
+ "type": {
8366
+ "text": "Tracked"
8367
+ }
8368
+ }
8369
+ ],
8370
+ "description": "The interaction's context was disposed: if nothing said it settled, say it did."
8469
8371
  },
8470
8372
  {
8471
- "name": "chars",
8472
- "type": {
8473
- "text": "number"
8373
+ "kind": "method",
8374
+ "name": "settle",
8375
+ "privacy": "private",
8376
+ "return": {
8377
+ "type": {
8378
+ "text": "void"
8379
+ }
8380
+ },
8381
+ "parameters": [
8382
+ {
8383
+ "name": "t",
8384
+ "type": {
8385
+ "text": "Tracked"
8386
+ }
8387
+ },
8388
+ {
8389
+ "name": "how",
8390
+ "type": {
8391
+ "text": "{ answeredBy?: string; resolvedItself?: boolean; auto?: boolean; raw?: boolean }"
8392
+ }
8393
+ }
8394
+ ]
8395
+ },
8396
+ {
8397
+ "kind": "method",
8398
+ "name": "release",
8399
+ "privacy": "private",
8400
+ "return": {
8401
+ "type": {
8402
+ "text": "void"
8403
+ }
8404
+ },
8405
+ "parameters": [
8406
+ {
8407
+ "name": "t",
8408
+ "type": {
8409
+ "text": "Tracked"
8410
+ }
8411
+ }
8412
+ ]
8413
+ },
8414
+ {
8415
+ "kind": "method",
8416
+ "name": "onHistory",
8417
+ "privacy": "private",
8418
+ "return": {
8419
+ "type": {
8420
+ "text": "void"
8421
+ }
8422
+ },
8423
+ "description": "New messages in the driver's history: report what the person would see of them."
8424
+ },
8425
+ {
8426
+ "kind": "method",
8427
+ "name": "reportMessages",
8428
+ "privacy": "private",
8429
+ "return": {
8430
+ "type": {
8431
+ "text": "void"
8432
+ }
8474
8433
  }
8475
- }
8476
- ],
8477
- "description": "The first `lines` lines of `text`, at most `chars` characters, and its full length when it was cut."
8478
- },
8479
- {
8480
- "kind": "function",
8481
- "name": "present",
8482
- "return": {
8483
- "type": {
8484
- "text": "Partial<T>"
8485
- }
8486
- },
8487
- "parameters": [
8434
+ },
8488
8435
  {
8489
- "name": "source",
8490
- "type": {
8491
- "text": "T"
8436
+ "kind": "method",
8437
+ "name": "onAutopilot",
8438
+ "privacy": "private",
8439
+ "return": {
8440
+ "type": {
8441
+ "text": "void"
8442
+ }
8492
8443
  }
8493
- }
8494
- ],
8495
- "description": "The keys of `source` that are set, as a new object: a field with nothing to say is dropped."
8496
- },
8497
- {
8498
- "kind": "function",
8499
- "name": "compactEvent",
8500
- "return": {
8501
- "type": {
8502
- "text": "CompactEvent | undefined"
8503
- }
8504
- },
8505
- "parameters": [
8444
+ },
8506
8445
  {
8507
- "name": "event",
8508
- "type": {
8509
- "text": "HeadlessEvent"
8446
+ "kind": "method",
8447
+ "name": "autopilotSignature",
8448
+ "privacy": "private",
8449
+ "return": {
8450
+ "type": {
8451
+ "text": "string"
8452
+ }
8510
8453
  }
8511
8454
  },
8512
8455
  {
8513
- "name": "options",
8514
- "default": "{}",
8515
- "type": {
8516
- "text": "CompactOptions"
8517
- }
8518
- }
8519
- ],
8520
- "description": "One session event, compact. `decision` and `working` are not reported as events: what the person is asked\nis the reply's `decision`, and what is working is its `working`. A message carries its first lines and\nits length; a probe event is the host's view of it (see `ServerOptions.probeEvent`)."
8521
- },
8522
- {
8523
- "kind": "function",
8524
- "name": "leanDecisionText",
8525
- "return": {
8526
- "type": {
8527
- "text": "string"
8528
- }
8529
- },
8530
- "parameters": [
8456
+ "kind": "method",
8457
+ "name": "describe",
8458
+ "privacy": "private",
8459
+ "return": {
8460
+ "type": {
8461
+ "text": "InteractionDescription"
8462
+ }
8463
+ },
8464
+ "parameters": [
8465
+ {
8466
+ "name": "t",
8467
+ "type": {
8468
+ "text": "Tracked"
8469
+ }
8470
+ }
8471
+ ]
8472
+ },
8473
+ {
8474
+ "kind": "method",
8475
+ "name": "evaluate",
8476
+ "privacy": "private",
8477
+ "return": {
8478
+ "type": {
8479
+ "text": "void"
8480
+ }
8481
+ },
8482
+ "parameters": [
8483
+ {
8484
+ "name": "t",
8485
+ "type": {
8486
+ "text": "Tracked"
8487
+ }
8488
+ }
8489
+ ],
8490
+ "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."
8491
+ },
8492
+ {
8493
+ "kind": "method",
8494
+ "name": "autoSettle",
8495
+ "privacy": "private",
8496
+ "return": {
8497
+ "type": {
8498
+ "text": "boolean"
8499
+ }
8500
+ },
8501
+ "parameters": [
8502
+ {
8503
+ "name": "t",
8504
+ "type": {
8505
+ "text": "Tracked"
8506
+ }
8507
+ }
8508
+ ],
8509
+ "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."
8510
+ },
8511
+ {
8512
+ "kind": "method",
8513
+ "name": "readTool",
8514
+ "privacy": "private",
8515
+ "return": {
8516
+ "type": {
8517
+ "text": "Promise<HeadlessReadResult>"
8518
+ }
8519
+ },
8520
+ "parameters": [
8521
+ {
8522
+ "name": "t",
8523
+ "type": {
8524
+ "text": "Tracked"
8525
+ }
8526
+ },
8527
+ {
8528
+ "name": "name",
8529
+ "type": {
8530
+ "text": "string"
8531
+ }
8532
+ },
8533
+ {
8534
+ "name": "args",
8535
+ "type": {
8536
+ "text": "Record<string, unknown> | undefined"
8537
+ }
8538
+ }
8539
+ ]
8540
+ },
8541
+ {
8542
+ "kind": "method",
8543
+ "name": "observe",
8544
+ "privacy": "private",
8545
+ "return": {
8546
+ "type": {
8547
+ "text": "void"
8548
+ }
8549
+ },
8550
+ "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."
8551
+ },
8552
+ {
8553
+ "kind": "method",
8554
+ "name": "closeTurn",
8555
+ "privacy": "private",
8556
+ "return": {
8557
+ "type": {
8558
+ "text": "void"
8559
+ }
8560
+ },
8561
+ "description": "Report the open turn as ended, unless the driver is busy again."
8562
+ },
8531
8563
  {
8532
- "name": "text",
8533
- "type": {
8534
- "text": "string"
8535
- }
8564
+ "kind": "method",
8565
+ "name": "startPolling",
8566
+ "privacy": "private",
8567
+ "return": {
8568
+ "type": {
8569
+ "text": "void"
8570
+ }
8571
+ },
8572
+ "description": "Without a shared bus nothing says a turn ended, so while one is open the driver is asked."
8536
8573
  },
8537
8574
  {
8538
- "name": "views",
8539
- "optional": true,
8540
- "type": {
8541
- "text": "Readonly<Record<string, string>>"
8575
+ "kind": "method",
8576
+ "name": "stopPolling",
8577
+ "privacy": "private",
8578
+ "return": {
8579
+ "type": {
8580
+ "text": "void"
8581
+ }
8542
8582
  }
8543
- }
8544
- ],
8545
- "description": "A decision's text without its `Now: <the preview view as JSON>` line, and nothing else (`decisionText:\n\"lean\"`). `renderDecision` writes the preview as `Now: ${capRead(JSON.stringify(view))}`: `JSON.stringify`\nwith no indent never breaks a line, so the JSON is the one line, and `capRead` adds a second, `[Cut at …]`,\nonly when it cut it. Both go; in their place is a pointer to `read`. The line is found by position, not\nby prefix alone: it follows the Views list, whose entry for the preview ends `(shown below as Now)`, so a\ncard that itself has a line starting `Now: ` is not mistaken for it.\n\nThe text comes back as it was when there is no preview to find (a card with no preview view, or a short-form\ndecision, which shows no `Now:`), or when `views` does not name the one the Views list marks."
8546
- },
8547
- {
8548
- "kind": "function",
8549
- "name": "compactDecision",
8550
- "return": {
8551
- "type": {
8552
- "text": "CompactDecision"
8553
- }
8554
- },
8555
- "parameters": [
8583
+ },
8556
8584
  {
8557
- "name": "description",
8558
- "type": {
8559
- "text": "InteractionDescription"
8560
- }
8585
+ "kind": "method",
8586
+ "name": "logTurn",
8587
+ "privacy": "private",
8588
+ "return": {
8589
+ "type": {
8590
+ "text": "void"
8591
+ }
8592
+ },
8593
+ "parameters": [
8594
+ {
8595
+ "name": "reason",
8596
+ "type": {
8597
+ "text": "string"
8598
+ }
8599
+ },
8600
+ {
8601
+ "name": "failureReason",
8602
+ "type": {
8603
+ "text": "string | undefined"
8604
+ }
8605
+ },
8606
+ {
8607
+ "name": "start",
8608
+ "type": {
8609
+ "text": "number"
8610
+ }
8611
+ }
8612
+ ]
8561
8613
  },
8562
8614
  {
8563
- "name": "decisionText",
8564
- "default": "'full'",
8565
- "type": {
8566
- "text": "DecisionText"
8567
- }
8568
- }
8569
- ],
8570
- "description": "A decision as the reply carries it: what to read and what to choose from, and nothing empty. With\n`decisionText: \"lean\"` its `text` leaves out the preview view's JSON (leanDecisionText); nothing\nelse about it changes."
8571
- },
8572
- {
8573
- "kind": "function",
8574
- "name": "shortDecision",
8575
- "return": {
8576
- "type": {
8577
- "text": "CompactDecision"
8578
- }
8579
- },
8580
- "parameters": [
8615
+ "kind": "method",
8616
+ "name": "log",
8617
+ "privacy": "private",
8618
+ "return": {
8619
+ "type": {
8620
+ "text": "void"
8621
+ }
8622
+ },
8623
+ "parameters": [
8624
+ {
8625
+ "name": "event",
8626
+ "type": {
8627
+ "text": "NewEvent"
8628
+ }
8629
+ }
8630
+ ]
8631
+ },
8581
8632
  {
8582
- "name": "interactionId",
8583
- "type": {
8584
- "text": "string"
8585
- }
8633
+ "kind": "method",
8634
+ "name": "append",
8635
+ "privacy": "private",
8636
+ "return": {
8637
+ "type": {
8638
+ "text": "void"
8639
+ }
8640
+ },
8641
+ "parameters": [
8642
+ {
8643
+ "name": "event",
8644
+ "type": {
8645
+ "text": "NewEvent"
8646
+ }
8647
+ }
8648
+ ]
8586
8649
  },
8587
8650
  {
8588
- "name": "component",
8589
- "type": {
8590
- "text": "string"
8651
+ "kind": "method",
8652
+ "name": "readProbe",
8653
+ "privacy": "private",
8654
+ "return": {
8655
+ "type": {
8656
+ "text": "Record<string, unknown>"
8657
+ }
8591
8658
  }
8592
8659
  },
8593
8660
  {
8594
- "name": "actions",
8595
- "type": {
8596
- "text": "ReadonlyArray<{ n?: number; name: string; enabled: boolean }>"
8597
- }
8598
- }
8599
- ],
8600
- "description": "A decision cut to what a caller who has already read the card needs: which interaction, and the actions as\n`n`, `name`, `enabled`. For the reply to an edit, and to a refused action, where the card has not changed\nenough to be worth sending again."
8601
- },
8602
- {
8603
- "kind": "function",
8604
- "name": "capOutput",
8605
- "return": {
8606
- "type": {
8607
- "text": "unknown"
8608
- }
8609
- },
8610
- "parameters": [
8661
+ "kind": "method",
8662
+ "name": "checkProbe",
8663
+ "privacy": "private",
8664
+ "return": {
8665
+ "type": {
8666
+ "text": "void"
8667
+ }
8668
+ },
8669
+ "description": "Read the probe again; a change in any top-level value is a `probe` event."
8670
+ },
8611
8671
  {
8612
- "name": "output",
8613
- "type": {
8614
- "text": "unknown"
8615
- }
8616
- }
8617
- ],
8618
- "description": "What an editing action returned, as the reply carries it: whole when small, else its first characters."
8619
- }
8620
- ],
8621
- "exports": [
8622
- {
8623
- "kind": "js",
8624
- "name": "firstLines",
8625
- "declaration": {
8626
- "name": "firstLines",
8627
- "module": "src/headless-server/compact.ts"
8628
- }
8629
- },
8630
- {
8631
- "kind": "js",
8632
- "name": "present",
8633
- "declaration": {
8634
- "name": "present",
8635
- "module": "src/headless-server/compact.ts"
8636
- }
8637
- },
8638
- {
8639
- "kind": "js",
8640
- "name": "compactEvent",
8641
- "declaration": {
8642
- "name": "compactEvent",
8643
- "module": "src/headless-server/compact.ts"
8644
- }
8645
- },
8646
- {
8647
- "kind": "js",
8648
- "name": "leanDecisionText",
8649
- "declaration": {
8650
- "name": "leanDecisionText",
8651
- "module": "src/headless-server/compact.ts"
8652
- }
8653
- },
8654
- {
8655
- "kind": "js",
8656
- "name": "compactDecision",
8657
- "declaration": {
8658
- "name": "compactDecision",
8659
- "module": "src/headless-server/compact.ts"
8660
- }
8661
- },
8662
- {
8663
- "kind": "js",
8664
- "name": "shortDecision",
8665
- "declaration": {
8666
- "name": "shortDecision",
8667
- "module": "src/headless-server/compact.ts"
8668
- }
8669
- },
8672
+ "kind": "method",
8673
+ "name": "waited",
8674
+ "privacy": "private",
8675
+ "return": {
8676
+ "type": {
8677
+ "text": "HeadlessWaitResult"
8678
+ }
8679
+ },
8680
+ "parameters": [
8681
+ {
8682
+ "name": "since",
8683
+ "type": {
8684
+ "text": "number"
8685
+ }
8686
+ },
8687
+ {
8688
+ "name": "status",
8689
+ "type": {
8690
+ "text": "HeadlessWaitResult['status']"
8691
+ }
8692
+ }
8693
+ ]
8694
+ }
8695
+ ]
8696
+ }
8697
+ ],
8698
+ "exports": [
8670
8699
  {
8671
8700
  "kind": "js",
8672
- "name": "capOutput",
8701
+ "name": "HeadlessSession",
8673
8702
  "declaration": {
8674
- "name": "capOutput",
8675
- "module": "src/headless-server/compact.ts"
8703
+ "name": "HeadlessSession",
8704
+ "module": "src/headless/headless-session.ts"
8676
8705
  }
8677
8706
  }
8678
8707
  ]
8679
8708
  },
8680
8709
  {
8681
8710
  "kind": "javascript-module",
8682
- "path": "src/headless-server/index.ts",
8711
+ "path": "src/headless/headless.types.ts",
8712
+ "declarations": [],
8713
+ "exports": []
8714
+ },
8715
+ {
8716
+ "kind": "javascript-module",
8717
+ "path": "src/headless/index.ts",
8683
8718
  "declarations": [],
8684
8719
  "exports": [
8685
8720
  {
8686
8721
  "kind": "js",
8687
- "name": "capOutput",
8722
+ "name": "describeInteraction",
8688
8723
  "declaration": {
8689
- "name": "capOutput",
8690
- "module": "./compact"
8724
+ "name": "describeInteraction",
8725
+ "module": "./describe-interaction"
8691
8726
  }
8692
8727
  },
8693
8728
  {
8694
8729
  "kind": "js",
8695
- "name": "compactDecision",
8730
+ "name": "headlessCurrentDebugLog",
8696
8731
  "declaration": {
8697
- "name": "compactDecision",
8698
- "module": "./compact"
8732
+ "name": "headlessCurrentDebugLog",
8733
+ "module": "./headless-debug"
8699
8734
  }
8700
8735
  },
8701
8736
  {
8702
8737
  "kind": "js",
8703
- "name": "compactEvent",
8738
+ "name": "headlessDiagnosticEntries",
8704
8739
  "declaration": {
8705
- "name": "compactEvent",
8706
- "module": "./compact"
8740
+ "name": "headlessDiagnosticEntries",
8741
+ "module": "./headless-debug"
8707
8742
  }
8708
8743
  },
8709
8744
  {
8710
8745
  "kind": "js",
8711
- "name": "firstLines",
8746
+ "name": "headlessMetaSnapshot",
8712
8747
  "declaration": {
8713
- "name": "firstLines",
8714
- "module": "./compact"
8748
+ "name": "headlessMetaSnapshot",
8749
+ "module": "./headless-debug"
8715
8750
  }
8716
8751
  },
8717
8752
  {
8718
8753
  "kind": "js",
8719
- "name": "leanDecisionText",
8754
+ "name": "HeadlessSession",
8720
8755
  "declaration": {
8721
- "name": "leanDecisionText",
8722
- "module": "./compact"
8756
+ "name": "HeadlessSession",
8757
+ "module": "./headless-session"
8723
8758
  }
8724
8759
  },
8725
8760
  {
8726
8761
  "kind": "js",
8727
- "name": "shortDecision",
8762
+ "name": "AutopilotLike",
8728
8763
  "declaration": {
8729
- "name": "shortDecision",
8730
- "module": "./compact"
8764
+ "name": "AutopilotLike",
8765
+ "module": "./headless.types"
8731
8766
  }
8732
8767
  },
8733
8768
  {
8734
8769
  "kind": "js",
8735
- "name": "createHeadlessServer",
8770
+ "name": "DescribedAction",
8736
8771
  "declaration": {
8737
- "name": "createHeadlessServer",
8738
- "module": "./server"
8772
+ "name": "DescribedAction",
8773
+ "module": "./headless.types"
8739
8774
  }
8740
8775
  },
8741
8776
  {
8742
8777
  "kind": "js",
8743
- "name": "DECISION_TEXTS",
8778
+ "name": "DescribeInteractionInput",
8744
8779
  "declaration": {
8745
- "name": "DECISION_TEXTS",
8746
- "module": "./types"
8780
+ "name": "DescribeInteractionInput",
8781
+ "module": "./headless.types"
8747
8782
  }
8748
8783
  },
8749
8784
  {
8750
8785
  "kind": "js",
8751
- "name": "DEFAULT_DECISION_TEXT",
8786
+ "name": "HeadlessActArgs",
8752
8787
  "declaration": {
8753
- "name": "DEFAULT_DECISION_TEXT",
8754
- "module": "./types"
8788
+ "name": "HeadlessActArgs",
8789
+ "module": "./headless.types"
8755
8790
  }
8756
8791
  },
8757
8792
  {
8758
8793
  "kind": "js",
8759
- "name": "Command",
8794
+ "name": "HeadlessActResult",
8760
8795
  "declaration": {
8761
- "name": "Command",
8762
- "module": "./types"
8796
+ "name": "HeadlessActResult",
8797
+ "module": "./headless.types"
8763
8798
  }
8764
8799
  },
8765
8800
  {
8766
8801
  "kind": "js",
8767
- "name": "CompactAction",
8802
+ "name": "HeadlessDebugOptions",
8768
8803
  "declaration": {
8769
- "name": "CompactAction",
8770
- "module": "./types"
8804
+ "name": "HeadlessDebugOptions",
8805
+ "module": "./headless.types"
8771
8806
  }
8772
8807
  },
8773
8808
  {
8774
8809
  "kind": "js",
8775
- "name": "CompactDecision",
8810
+ "name": "HeadlessEvent",
8776
8811
  "declaration": {
8777
- "name": "CompactDecision",
8778
- "module": "./types"
8812
+ "name": "HeadlessEvent",
8813
+ "module": "./headless.types"
8779
8814
  }
8780
8815
  },
8781
8816
  {
8782
8817
  "kind": "js",
8783
- "name": "CompactEvent",
8818
+ "name": "HeadlessEventBase",
8784
8819
  "declaration": {
8785
- "name": "CompactEvent",
8786
- "module": "./types"
8820
+ "name": "HeadlessEventBase",
8821
+ "module": "./headless.types"
8787
8822
  }
8788
8823
  },
8789
8824
  {
8790
8825
  "kind": "js",
8791
- "name": "Composer",
8826
+ "name": "HeadlessEventType",
8792
8827
  "declaration": {
8793
- "name": "Composer",
8794
- "module": "./types"
8828
+ "name": "HeadlessEventType",
8829
+ "module": "./headless.types"
8795
8830
  }
8796
8831
  },
8797
8832
  {
8798
8833
  "kind": "js",
8799
- "name": "DecisionText",
8834
+ "name": "HeadlessPersistence",
8800
8835
  "declaration": {
8801
- "name": "DecisionText",
8802
- "module": "./types"
8836
+ "name": "HeadlessPersistence",
8837
+ "module": "./headless.types"
8803
8838
  }
8804
8839
  },
8805
8840
  {
8806
8841
  "kind": "js",
8807
- "name": "ExtraOp",
8842
+ "name": "HeadlessPersistenceBinding",
8808
8843
  "declaration": {
8809
- "name": "ExtraOp",
8810
- "module": "./types"
8844
+ "name": "HeadlessPersistenceBinding",
8845
+ "module": "./headless.types"
8811
8846
  }
8812
8847
  },
8813
8848
  {
8814
8849
  "kind": "js",
8815
- "name": "ExtraOpResult",
8850
+ "name": "HeadlessPersistenceHost",
8816
8851
  "declaration": {
8817
- "name": "ExtraOpResult",
8818
- "module": "./types"
8852
+ "name": "HeadlessPersistenceHost",
8853
+ "module": "./headless.types"
8819
8854
  }
8820
8855
  },
8821
8856
  {
8822
8857
  "kind": "js",
8823
- "name": "HeadlessServer",
8858
+ "name": "HeadlessReadRequest",
8824
8859
  "declaration": {
8825
- "name": "HeadlessServer",
8826
- "module": "./types"
8860
+ "name": "HeadlessReadRequest",
8861
+ "module": "./headless.types"
8827
8862
  }
8828
8863
  },
8829
8864
  {
8830
8865
  "kind": "js",
8831
- "name": "HeadlessServerHandle",
8866
+ "name": "HeadlessReadResult",
8832
8867
  "declaration": {
8833
- "name": "HeadlessServerHandle",
8834
- "module": "./types"
8868
+ "name": "HeadlessReadResult",
8869
+ "module": "./headless.types"
8835
8870
  }
8836
8871
  },
8837
8872
  {
8838
8873
  "kind": "js",
8839
- "name": "Reply",
8874
+ "name": "HeadlessResult",
8840
8875
  "declaration": {
8841
- "name": "Reply",
8842
- "module": "./types"
8876
+ "name": "HeadlessResult",
8877
+ "module": "./headless.types"
8843
8878
  }
8844
8879
  },
8845
8880
  {
8846
8881
  "kind": "js",
8847
- "name": "ServerOptions",
8882
+ "name": "HeadlessRestoreOutcome",
8848
8883
  "declaration": {
8849
- "name": "ServerOptions",
8850
- "module": "./types"
8884
+ "name": "HeadlessRestoreOutcome",
8885
+ "module": "./headless.types"
8851
8886
  }
8852
8887
  },
8853
8888
  {
8854
8889
  "kind": "js",
8855
- "name": "Status",
8890
+ "name": "HeadlessSendOptions",
8856
8891
  "declaration": {
8857
- "name": "Status",
8858
- "module": "./types"
8892
+ "name": "HeadlessSendOptions",
8893
+ "module": "./headless.types"
8859
8894
  }
8860
8895
  },
8861
8896
  {
8862
8897
  "kind": "js",
8863
- "name": "WorkingInfo",
8898
+ "name": "HeadlessSessionOptions",
8864
8899
  "declaration": {
8865
- "name": "WorkingInfo",
8866
- "module": "./types"
8900
+ "name": "HeadlessSessionOptions",
8901
+ "module": "./headless.types"
8867
8902
  }
8868
- }
8869
- ]
8870
- },
8871
- {
8872
- "kind": "javascript-module",
8873
- "path": "src/headless-server/server.ts",
8874
- "declarations": [
8875
- {
8876
- "kind": "function",
8877
- "name": "createHeadlessServer",
8878
- "return": {
8879
- "type": {
8880
- "text": "HeadlessServer"
8881
- }
8882
- },
8883
- "parameters": [
8884
- {
8885
- "name": "options",
8886
- "type": {
8887
- "text": "ServerOptions"
8888
- }
8889
- }
8890
- ],
8891
- "description": "The headless server (PLAN §5, D7): `node:http` on 127.0.0.1, `GET /health` and `POST /cmd`.\n\nEvery command is APPLIED and then LONG-POLLS (§5.5): the reply comes when the journey next needs the\nperson (an interaction is held by them and ready), a turn ends, the run ends, or something fails, or at\n`maxWaitMs` with `status: \"working\"`. Nothing is lost on a client timeout: the command was applied before\nthe wait, events carry `seq`, and `{op: \"wait\", since}` returns everything after it.\n\nThe session is the only thing it drives; what the host owns is reached through ServerOptions."
8892
- }
8893
- ],
8894
- "exports": [
8903
+ },
8895
8904
  {
8896
8905
  "kind": "js",
8897
- "name": "createHeadlessServer",
8906
+ "name": "HeadlessState",
8898
8907
  "declaration": {
8899
- "name": "createHeadlessServer",
8900
- "module": "src/headless-server/server.ts"
8908
+ "name": "HeadlessState",
8909
+ "module": "./headless.types"
8901
8910
  }
8902
- }
8903
- ]
8904
- },
8905
- {
8906
- "kind": "javascript-module",
8907
- "path": "src/headless-server/types.ts",
8908
- "declarations": [
8911
+ },
8909
8912
  {
8910
- "kind": "variable",
8911
- "name": "DECISION_TEXTS",
8912
- "type": {
8913
- "text": "readonly DecisionText[]"
8914
- },
8915
- "default": "['full', 'lean']"
8913
+ "kind": "js",
8914
+ "name": "HeadlessWaitRequest",
8915
+ "declaration": {
8916
+ "name": "HeadlessWaitRequest",
8917
+ "module": "./headless.types"
8918
+ }
8916
8919
  },
8917
8920
  {
8918
- "kind": "variable",
8919
- "name": "DEFAULT_DECISION_TEXT",
8920
- "type": {
8921
- "text": "DecisionText"
8922
- },
8923
- "default": "'lean'",
8924
- "description": "What the server uses when neither it nor the command says. Its readers are models that can `read` a view."
8925
- }
8926
- ],
8927
- "exports": [
8921
+ "kind": "js",
8922
+ "name": "HeadlessWaitResult",
8923
+ "declaration": {
8924
+ "name": "HeadlessWaitResult",
8925
+ "module": "./headless.types"
8926
+ }
8927
+ },
8928
8928
  {
8929
8929
  "kind": "js",
8930
- "name": "DECISION_TEXTS",
8930
+ "name": "InteractionDescription",
8931
8931
  "declaration": {
8932
- "name": "DECISION_TEXTS",
8933
- "module": "src/headless-server/types.ts"
8932
+ "name": "InteractionDescription",
8933
+ "module": "./headless.types"
8934
8934
  }
8935
8935
  },
8936
8936
  {
8937
8937
  "kind": "js",
8938
- "name": "DEFAULT_DECISION_TEXT",
8938
+ "name": "PendingSummary",
8939
8939
  "declaration": {
8940
- "name": "DEFAULT_DECISION_TEXT",
8941
- "module": "src/headless-server/types.ts"
8940
+ "name": "PendingSummary",
8941
+ "module": "./headless.types"
8942
8942
  }
8943
8943
  }
8944
8944
  ]