@genesislcap/ai-assistant 15.94.0 → 15.94.1-alpha-6f4e61418f.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 +1519 -1519
  2. package/package.json +17 -17
@@ -5289,6 +5289,237 @@
5289
5289
  }
5290
5290
  ]
5291
5291
  },
5292
+ {
5293
+ "kind": "javascript-module",
5294
+ "path": "src/config/config.ts",
5295
+ "declarations": [
5296
+ {
5297
+ "kind": "function",
5298
+ "name": "defineAgent",
5299
+ "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5300
+ }
5301
+ ],
5302
+ "exports": [
5303
+ {
5304
+ "kind": "js",
5305
+ "name": "CachePolicy",
5306
+ "declaration": {
5307
+ "name": "CachePolicy",
5308
+ "module": "src/config/config.ts"
5309
+ }
5310
+ },
5311
+ {
5312
+ "kind": "js",
5313
+ "name": "ChatFallback",
5314
+ "declaration": {
5315
+ "name": "ChatFallback",
5316
+ "module": "src/config/config.ts"
5317
+ }
5318
+ },
5319
+ {
5320
+ "kind": "js",
5321
+ "name": "ChatInputDuringExecutionMode",
5322
+ "declaration": {
5323
+ "name": "ChatInputDuringExecutionMode",
5324
+ "module": "src/config/config.ts"
5325
+ }
5326
+ },
5327
+ {
5328
+ "kind": "js",
5329
+ "name": "ChatThinkingPolicy",
5330
+ "declaration": {
5331
+ "name": "ChatThinkingPolicy",
5332
+ "module": "src/config/config.ts"
5333
+ }
5334
+ },
5335
+ {
5336
+ "kind": "js",
5337
+ "name": "ChatToolChoice",
5338
+ "declaration": {
5339
+ "name": "ChatToolChoice",
5340
+ "module": "src/config/config.ts"
5341
+ }
5342
+ },
5343
+ {
5344
+ "kind": "js",
5345
+ "name": "defineAgent",
5346
+ "declaration": {
5347
+ "name": "defineAgent",
5348
+ "module": "src/config/config.ts"
5349
+ }
5350
+ }
5351
+ ]
5352
+ },
5353
+ {
5354
+ "kind": "javascript-module",
5355
+ "path": "src/config/define-stateful-agent.ts",
5356
+ "declarations": [
5357
+ {
5358
+ "kind": "function",
5359
+ "name": "restoreMachine",
5360
+ "return": {
5361
+ "type": {
5362
+ "text": "void"
5363
+ }
5364
+ },
5365
+ "parameters": [
5366
+ {
5367
+ "name": "machine",
5368
+ "type": {
5369
+ "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5370
+ },
5371
+ "description": "the machine to restore (already constructed/started)."
5372
+ },
5373
+ {
5374
+ "name": "restored",
5375
+ "type": {
5376
+ "text": "unknown"
5377
+ },
5378
+ "description": "the agent's serialized image (`ctx.restored` in `init`)."
5379
+ },
5380
+ {
5381
+ "name": "key",
5382
+ "default": "'machine'",
5383
+ "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5384
+ }
5385
+ ],
5386
+ "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5387
+ },
5388
+ {
5389
+ "kind": "function",
5390
+ "name": "defineStatefulAgent",
5391
+ "return": {
5392
+ "type": {
5393
+ "text": "AgentConfig"
5394
+ }
5395
+ },
5396
+ "parameters": [
5397
+ {
5398
+ "name": "opts",
5399
+ "type": {
5400
+ "text": "StatefulAgentInit<S>"
5401
+ }
5402
+ }
5403
+ ],
5404
+ "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5405
+ },
5406
+ {
5407
+ "kind": "function",
5408
+ "name": "defineAutopilot",
5409
+ "return": {
5410
+ "type": {
5411
+ "text": "AutopilotConfig<S>"
5412
+ }
5413
+ },
5414
+ "parameters": [
5415
+ {
5416
+ "name": "config",
5417
+ "type": {
5418
+ "text": "AutopilotConfig<S>"
5419
+ }
5420
+ }
5421
+ ],
5422
+ "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5423
+ }
5424
+ ],
5425
+ "exports": [
5426
+ {
5427
+ "kind": "js",
5428
+ "name": "restoreMachine",
5429
+ "declaration": {
5430
+ "name": "restoreMachine",
5431
+ "module": "src/config/define-stateful-agent.ts"
5432
+ }
5433
+ },
5434
+ {
5435
+ "kind": "js",
5436
+ "name": "defineStatefulAgent",
5437
+ "declaration": {
5438
+ "name": "defineStatefulAgent",
5439
+ "module": "src/config/define-stateful-agent.ts"
5440
+ }
5441
+ },
5442
+ {
5443
+ "kind": "js",
5444
+ "name": "defineAutopilot",
5445
+ "declaration": {
5446
+ "name": "defineAutopilot",
5447
+ "module": "src/config/define-stateful-agent.ts"
5448
+ }
5449
+ }
5450
+ ]
5451
+ },
5452
+ {
5453
+ "kind": "javascript-module",
5454
+ "path": "src/config/fallback-agents.ts",
5455
+ "declarations": [
5456
+ {
5457
+ "kind": "variable",
5458
+ "name": "friendlyFallbackAgent",
5459
+ "type": {
5460
+ "text": "FallbackAgentConfig"
5461
+ },
5462
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5463
+ "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5464
+ },
5465
+ {
5466
+ "kind": "variable",
5467
+ "name": "strictFallbackAgent",
5468
+ "type": {
5469
+ "text": "FallbackAgentConfig"
5470
+ },
5471
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5472
+ "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5473
+ }
5474
+ ],
5475
+ "exports": [
5476
+ {
5477
+ "kind": "js",
5478
+ "name": "friendlyFallbackAgent",
5479
+ "declaration": {
5480
+ "name": "friendlyFallbackAgent",
5481
+ "module": "src/config/fallback-agents.ts"
5482
+ }
5483
+ },
5484
+ {
5485
+ "kind": "js",
5486
+ "name": "strictFallbackAgent",
5487
+ "declaration": {
5488
+ "name": "strictFallbackAgent",
5489
+ "module": "src/config/fallback-agents.ts"
5490
+ }
5491
+ }
5492
+ ]
5493
+ },
5494
+ {
5495
+ "kind": "javascript-module",
5496
+ "path": "src/config/index.ts",
5497
+ "declarations": [],
5498
+ "exports": [
5499
+ {
5500
+ "kind": "js",
5501
+ "name": "*",
5502
+ "declaration": {
5503
+ "name": "*",
5504
+ "package": "./config"
5505
+ }
5506
+ },
5507
+ {
5508
+ "kind": "js",
5509
+ "name": "*",
5510
+ "declaration": {
5511
+ "name": "*",
5512
+ "package": "./fallback-agents"
5513
+ }
5514
+ }
5515
+ ]
5516
+ },
5517
+ {
5518
+ "kind": "javascript-module",
5519
+ "path": "src/config/validate-providers.ts",
5520
+ "declarations": [],
5521
+ "exports": []
5522
+ },
5292
5523
  {
5293
5524
  "kind": "javascript-module",
5294
5525
  "path": "src/components/flowing-waves-indicator.ts",
@@ -5815,254 +6046,23 @@
5815
6046
  },
5816
6047
  {
5817
6048
  "kind": "javascript-module",
5818
- "path": "src/config/config.ts",
6049
+ "path": "src/genesis/calendar.ts",
6050
+ "declarations": [],
6051
+ "exports": []
6052
+ },
6053
+ {
6054
+ "kind": "javascript-module",
6055
+ "path": "src/genesis/config.ts",
5819
6056
  "declarations": [
5820
6057
  {
5821
- "kind": "function",
5822
- "name": "defineAgent",
5823
- "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5824
- }
5825
- ],
5826
- "exports": [
5827
- {
5828
- "kind": "js",
5829
- "name": "CachePolicy",
5830
- "declaration": {
5831
- "name": "CachePolicy",
5832
- "module": "src/config/config.ts"
5833
- }
5834
- },
5835
- {
5836
- "kind": "js",
5837
- "name": "ChatFallback",
5838
- "declaration": {
5839
- "name": "ChatFallback",
5840
- "module": "src/config/config.ts"
5841
- }
5842
- },
5843
- {
5844
- "kind": "js",
5845
- "name": "ChatInputDuringExecutionMode",
5846
- "declaration": {
5847
- "name": "ChatInputDuringExecutionMode",
5848
- "module": "src/config/config.ts"
5849
- }
5850
- },
5851
- {
5852
- "kind": "js",
5853
- "name": "ChatThinkingPolicy",
5854
- "declaration": {
5855
- "name": "ChatThinkingPolicy",
5856
- "module": "src/config/config.ts"
5857
- }
5858
- },
5859
- {
5860
- "kind": "js",
5861
- "name": "ChatToolChoice",
5862
- "declaration": {
5863
- "name": "ChatToolChoice",
5864
- "module": "src/config/config.ts"
5865
- }
5866
- },
5867
- {
5868
- "kind": "js",
5869
- "name": "defineAgent",
5870
- "declaration": {
5871
- "name": "defineAgent",
5872
- "module": "src/config/config.ts"
5873
- }
5874
- }
5875
- ]
5876
- },
5877
- {
5878
- "kind": "javascript-module",
5879
- "path": "src/config/define-stateful-agent.ts",
5880
- "declarations": [
5881
- {
5882
- "kind": "function",
5883
- "name": "restoreMachine",
5884
- "return": {
5885
- "type": {
5886
- "text": "void"
5887
- }
5888
- },
5889
- "parameters": [
5890
- {
5891
- "name": "machine",
5892
- "type": {
5893
- "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5894
- },
5895
- "description": "the machine to restore (already constructed/started)."
5896
- },
5897
- {
5898
- "name": "restored",
5899
- "type": {
5900
- "text": "unknown"
5901
- },
5902
- "description": "the agent's serialized image (`ctx.restored` in `init`)."
5903
- },
5904
- {
5905
- "name": "key",
5906
- "default": "'machine'",
5907
- "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5908
- }
5909
- ],
5910
- "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5911
- },
5912
- {
5913
- "kind": "function",
5914
- "name": "defineStatefulAgent",
5915
- "return": {
5916
- "type": {
5917
- "text": "AgentConfig"
5918
- }
5919
- },
5920
- "parameters": [
5921
- {
5922
- "name": "opts",
5923
- "type": {
5924
- "text": "StatefulAgentInit<S>"
5925
- }
5926
- }
5927
- ],
5928
- "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5929
- },
5930
- {
5931
- "kind": "function",
5932
- "name": "defineAutopilot",
5933
- "return": {
5934
- "type": {
5935
- "text": "AutopilotConfig<S>"
5936
- }
5937
- },
5938
- "parameters": [
5939
- {
5940
- "name": "config",
5941
- "type": {
5942
- "text": "AutopilotConfig<S>"
5943
- }
5944
- }
5945
- ],
5946
- "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5947
- }
5948
- ],
5949
- "exports": [
5950
- {
5951
- "kind": "js",
5952
- "name": "restoreMachine",
5953
- "declaration": {
5954
- "name": "restoreMachine",
5955
- "module": "src/config/define-stateful-agent.ts"
5956
- }
5957
- },
5958
- {
5959
- "kind": "js",
5960
- "name": "defineStatefulAgent",
5961
- "declaration": {
5962
- "name": "defineStatefulAgent",
5963
- "module": "src/config/define-stateful-agent.ts"
5964
- }
5965
- },
5966
- {
5967
- "kind": "js",
5968
- "name": "defineAutopilot",
5969
- "declaration": {
5970
- "name": "defineAutopilot",
5971
- "module": "src/config/define-stateful-agent.ts"
5972
- }
5973
- }
5974
- ]
5975
- },
5976
- {
5977
- "kind": "javascript-module",
5978
- "path": "src/config/fallback-agents.ts",
5979
- "declarations": [
5980
- {
5981
- "kind": "variable",
5982
- "name": "friendlyFallbackAgent",
5983
- "type": {
5984
- "text": "FallbackAgentConfig"
5985
- },
5986
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5987
- "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5988
- },
5989
- {
5990
- "kind": "variable",
5991
- "name": "strictFallbackAgent",
5992
- "type": {
5993
- "text": "FallbackAgentConfig"
5994
- },
5995
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5996
- "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5997
- }
5998
- ],
5999
- "exports": [
6000
- {
6001
- "kind": "js",
6002
- "name": "friendlyFallbackAgent",
6003
- "declaration": {
6004
- "name": "friendlyFallbackAgent",
6005
- "module": "src/config/fallback-agents.ts"
6006
- }
6007
- },
6008
- {
6009
- "kind": "js",
6010
- "name": "strictFallbackAgent",
6011
- "declaration": {
6012
- "name": "strictFallbackAgent",
6013
- "module": "src/config/fallback-agents.ts"
6014
- }
6015
- }
6016
- ]
6017
- },
6018
- {
6019
- "kind": "javascript-module",
6020
- "path": "src/config/index.ts",
6021
- "declarations": [],
6022
- "exports": [
6023
- {
6024
- "kind": "js",
6025
- "name": "*",
6026
- "declaration": {
6027
- "name": "*",
6028
- "package": "./config"
6029
- }
6030
- },
6031
- {
6032
- "kind": "js",
6033
- "name": "*",
6034
- "declaration": {
6035
- "name": "*",
6036
- "package": "./fallback-agents"
6037
- }
6038
- }
6039
- ]
6040
- },
6041
- {
6042
- "kind": "javascript-module",
6043
- "path": "src/config/validate-providers.ts",
6044
- "declarations": [],
6045
- "exports": []
6046
- },
6047
- {
6048
- "kind": "javascript-module",
6049
- "path": "src/genesis/calendar.ts",
6050
- "declarations": [],
6051
- "exports": []
6052
- },
6053
- {
6054
- "kind": "javascript-module",
6055
- "path": "src/genesis/config.ts",
6056
- "declarations": [
6057
- {
6058
- "kind": "variable",
6059
- "name": "DEFAULT_MAX_ROWS",
6060
- "type": {
6061
- "text": "number"
6062
- },
6063
- "default": "50",
6064
- "description": "The default read cap, and the ceiling the config may raise it to."
6065
- },
6058
+ "kind": "variable",
6059
+ "name": "DEFAULT_MAX_ROWS",
6060
+ "type": {
6061
+ "text": "number"
6062
+ },
6063
+ "default": "50",
6064
+ "description": "The default read cap, and the ceiling the config may raise it to."
6065
+ },
6066
6066
  {
6067
6067
  "kind": "variable",
6068
6068
  "name": "MAX_ROWS_CEILING",
@@ -7229,578 +7229,890 @@
7229
7229
  },
7230
7230
  {
7231
7231
  "kind": "javascript-module",
7232
- "path": "src/headless/describe-interaction.ts",
7232
+ "path": "src/headless-server/compact.ts",
7233
7233
  "declarations": [
7234
7234
  {
7235
7235
  "kind": "function",
7236
- "name": "describeInteraction",
7236
+ "name": "firstLines",
7237
7237
  "return": {
7238
7238
  "type": {
7239
- "text": "InteractionDescription"
7239
+ "text": "{ text: string; chars?: number }"
7240
7240
  }
7241
7241
  },
7242
7242
  "parameters": [
7243
7243
  {
7244
- "name": "input",
7244
+ "name": "text",
7245
7245
  "type": {
7246
- "text": "DescribeInteractionInput"
7246
+ "text": "string"
7247
7247
  }
7248
- }
7249
- ],
7250
- "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."
7251
- }
7252
- ],
7253
- "exports": [
7254
- {
7255
- "kind": "js",
7256
- "name": "describeInteraction",
7257
- "declaration": {
7258
- "name": "describeInteraction",
7259
- "module": "src/headless/describe-interaction.ts"
7260
- }
7261
- }
7262
- ]
7263
- },
7264
- {
7265
- "kind": "javascript-module",
7266
- "path": "src/headless/headless-debug.ts",
7267
- "declarations": [
7248
+ },
7249
+ {
7250
+ "name": "lines",
7251
+ "type": {
7252
+ "text": "number"
7253
+ }
7254
+ },
7255
+ {
7256
+ "name": "chars",
7257
+ "type": {
7258
+ "text": "number"
7259
+ }
7260
+ }
7261
+ ],
7262
+ "description": "The first `lines` lines of `text`, at most `chars` characters, and its full length when it was cut."
7263
+ },
7268
7264
  {
7269
7265
  "kind": "function",
7270
- "name": "headlessMetaSnapshot",
7266
+ "name": "present",
7271
7267
  "return": {
7272
7268
  "type": {
7273
- "text": "DiagnosticEntry"
7269
+ "text": "Partial<T>"
7274
7270
  }
7275
7271
  },
7276
7272
  "parameters": [
7277
7273
  {
7278
- "name": "driver",
7274
+ "name": "source",
7279
7275
  "type": {
7280
- "text": "AiDriver"
7276
+ "text": "T"
7277
+ }
7278
+ }
7279
+ ],
7280
+ "description": "The keys of `source` that are set, as a new object: a field with nothing to say is dropped."
7281
+ },
7282
+ {
7283
+ "kind": "function",
7284
+ "name": "compactEvent",
7285
+ "return": {
7286
+ "type": {
7287
+ "text": "CompactEvent | undefined"
7288
+ }
7289
+ },
7290
+ "parameters": [
7291
+ {
7292
+ "name": "event",
7293
+ "type": {
7294
+ "text": "HeadlessEvent"
7281
7295
  }
7282
7296
  },
7283
7297
  {
7284
7298
  "name": "options",
7285
7299
  "default": "{}",
7286
7300
  "type": {
7287
- "text": "HeadlessDebugOptions"
7301
+ "text": "CompactOptions"
7288
7302
  }
7289
7303
  }
7290
7304
  ],
7291
- "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."
7305
+ "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`)."
7292
7306
  },
7293
7307
  {
7294
7308
  "kind": "function",
7295
- "name": "headlessDiagnosticEntries",
7309
+ "name": "leanDecisionText",
7296
7310
  "return": {
7297
7311
  "type": {
7298
- "text": "DiagnosticEntry[]"
7312
+ "text": "string"
7299
7313
  }
7300
7314
  },
7301
7315
  "parameters": [
7302
7316
  {
7303
- "name": "driver",
7317
+ "name": "text",
7304
7318
  "type": {
7305
- "text": "AiDriver"
7319
+ "text": "string"
7306
7320
  }
7307
7321
  },
7308
7322
  {
7309
- "name": "stateKey",
7323
+ "name": "views",
7324
+ "optional": true,
7310
7325
  "type": {
7311
- "text": "string"
7326
+ "text": "Readonly<Record<string, string>>"
7327
+ }
7328
+ }
7329
+ ],
7330
+ "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."
7331
+ },
7332
+ {
7333
+ "kind": "function",
7334
+ "name": "compactDecision",
7335
+ "return": {
7336
+ "type": {
7337
+ "text": "CompactDecision"
7338
+ }
7339
+ },
7340
+ "parameters": [
7341
+ {
7342
+ "name": "description",
7343
+ "type": {
7344
+ "text": "InteractionDescription"
7312
7345
  }
7313
7346
  },
7314
7347
  {
7315
- "name": "options",
7316
- "default": "{}",
7348
+ "name": "decisionText",
7349
+ "default": "'full'",
7317
7350
  "type": {
7318
- "text": "HeadlessDebugOptions"
7351
+ "text": "DecisionText"
7319
7352
  }
7320
7353
  }
7321
7354
  ],
7322
- "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
7355
+ "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."
7323
7356
  },
7324
7357
  {
7325
7358
  "kind": "function",
7326
- "name": "headlessCurrentDebugLog",
7359
+ "name": "shortDecision",
7327
7360
  "return": {
7328
7361
  "type": {
7329
- "text": "DebugLog"
7362
+ "text": "CompactDecision"
7330
7363
  }
7331
7364
  },
7332
7365
  "parameters": [
7333
7366
  {
7334
- "name": "driver",
7367
+ "name": "interactionId",
7335
7368
  "type": {
7336
- "text": "AiDriver"
7369
+ "text": "string"
7337
7370
  }
7338
7371
  },
7339
7372
  {
7340
- "name": "stateKey",
7373
+ "name": "component",
7341
7374
  "type": {
7342
7375
  "text": "string"
7343
7376
  }
7344
7377
  },
7345
7378
  {
7346
- "name": "options",
7347
- "default": "{}",
7379
+ "name": "actions",
7348
7380
  "type": {
7349
- "text": "HeadlessDebugOptions"
7381
+ "text": "ReadonlyArray<{ n?: number; name: string; enabled: boolean }>"
7350
7382
  }
7351
7383
  }
7352
7384
  ],
7353
- "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."
7385
+ "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."
7386
+ },
7387
+ {
7388
+ "kind": "function",
7389
+ "name": "capOutput",
7390
+ "return": {
7391
+ "type": {
7392
+ "text": "unknown"
7393
+ }
7394
+ },
7395
+ "parameters": [
7396
+ {
7397
+ "name": "output",
7398
+ "type": {
7399
+ "text": "unknown"
7400
+ }
7401
+ }
7402
+ ],
7403
+ "description": "What an editing action returned, as the reply carries it: whole when small, else its first characters."
7354
7404
  }
7355
7405
  ],
7356
7406
  "exports": [
7357
7407
  {
7358
7408
  "kind": "js",
7359
- "name": "headlessMetaSnapshot",
7409
+ "name": "firstLines",
7360
7410
  "declaration": {
7361
- "name": "headlessMetaSnapshot",
7362
- "module": "src/headless/headless-debug.ts"
7411
+ "name": "firstLines",
7412
+ "module": "src/headless-server/compact.ts"
7363
7413
  }
7364
7414
  },
7365
7415
  {
7366
7416
  "kind": "js",
7367
- "name": "headlessDiagnosticEntries",
7417
+ "name": "present",
7368
7418
  "declaration": {
7369
- "name": "headlessDiagnosticEntries",
7370
- "module": "src/headless/headless-debug.ts"
7419
+ "name": "present",
7420
+ "module": "src/headless-server/compact.ts"
7371
7421
  }
7372
7422
  },
7373
7423
  {
7374
7424
  "kind": "js",
7375
- "name": "headlessCurrentDebugLog",
7425
+ "name": "compactEvent",
7376
7426
  "declaration": {
7377
- "name": "headlessCurrentDebugLog",
7378
- "module": "src/headless/headless-debug.ts"
7427
+ "name": "compactEvent",
7428
+ "module": "src/headless-server/compact.ts"
7379
7429
  }
7380
- }
7381
- ]
7382
- },
7383
- {
7384
- "kind": "javascript-module",
7385
- "path": "src/headless/headless-persistence.ts",
7386
- "declarations": [
7430
+ },
7387
7431
  {
7388
- "kind": "function",
7389
- "name": "headlessPersistence",
7390
- "return": {
7391
- "type": {
7392
- "text": "HeadlessPersistence"
7393
- }
7394
- },
7395
- "parameters": [
7396
- {
7397
- "name": "options",
7398
- "type": {
7399
- "text": "HeadlessPersistenceOptions"
7400
- }
7401
- }
7402
- ],
7403
- "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)`."
7404
- }
7405
- ],
7406
- "exports": [
7432
+ "kind": "js",
7433
+ "name": "leanDecisionText",
7434
+ "declaration": {
7435
+ "name": "leanDecisionText",
7436
+ "module": "src/headless-server/compact.ts"
7437
+ }
7438
+ },
7407
7439
  {
7408
7440
  "kind": "js",
7409
- "name": "headlessPersistence",
7441
+ "name": "compactDecision",
7410
7442
  "declaration": {
7411
- "name": "headlessPersistence",
7412
- "module": "src/headless/headless-persistence.ts"
7443
+ "name": "compactDecision",
7444
+ "module": "src/headless-server/compact.ts"
7445
+ }
7446
+ },
7447
+ {
7448
+ "kind": "js",
7449
+ "name": "shortDecision",
7450
+ "declaration": {
7451
+ "name": "shortDecision",
7452
+ "module": "src/headless-server/compact.ts"
7453
+ }
7454
+ },
7455
+ {
7456
+ "kind": "js",
7457
+ "name": "capOutput",
7458
+ "declaration": {
7459
+ "name": "capOutput",
7460
+ "module": "src/headless-server/compact.ts"
7413
7461
  }
7414
7462
  }
7415
7463
  ]
7416
7464
  },
7417
7465
  {
7418
7466
  "kind": "javascript-module",
7419
- "path": "src/headless/headless-session.ts",
7420
- "declarations": [
7467
+ "path": "src/headless-server/index.ts",
7468
+ "declarations": [],
7469
+ "exports": [
7421
7470
  {
7422
- "kind": "class",
7423
- "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.",
7424
- "name": "HeadlessSession",
7425
- "members": [
7426
- {
7427
- "kind": "field",
7428
- "name": "sessionKey",
7429
- "type": {
7430
- "text": "string"
7431
- },
7432
- "privacy": "private",
7433
- "readonly": true
7434
- },
7435
- {
7436
- "kind": "field",
7437
- "name": "allowRaw",
7438
- "type": {
7439
- "text": "boolean"
7440
- },
7441
- "privacy": "private",
7442
- "readonly": true
7443
- },
7444
- {
7445
- "kind": "field",
7446
- "name": "clock",
7447
- "type": {
7448
- "text": "() => number"
7449
- },
7450
- "privacy": "private",
7451
- "readonly": true
7452
- },
7453
- {
7454
- "kind": "field",
7455
- "name": "autopilotHost",
7456
- "type": {
7457
- "text": "AutopilotLike | undefined"
7458
- },
7459
- "privacy": "private",
7460
- "readonly": true,
7461
- "default": "autopilot"
7462
- },
7463
- {
7464
- "kind": "field",
7465
- "name": "events",
7466
- "type": {
7467
- "text": "HeadlessEvent[]"
7468
- },
7469
- "privacy": "private",
7470
- "readonly": true,
7471
- "default": "[]"
7472
- },
7473
- {
7474
- "kind": "field",
7475
- "name": "seq",
7476
- "type": {
7477
- "text": "number"
7478
- },
7479
- "privacy": "private",
7480
- "default": "0"
7481
- },
7482
- {
7483
- "kind": "field",
7484
- "name": "tracked",
7485
- "privacy": "private",
7486
- "readonly": true,
7487
- "default": "new Map<string, Tracked>()"
7488
- },
7489
- {
7490
- "kind": "field",
7491
- "name": "origin",
7492
- "privacy": "private",
7493
- "readonly": true,
7494
- "default": "new Map<string, { auto?: boolean; raw?: boolean }>()",
7495
- "description": "What the session did to an interaction itself, for `settled` to say when the driver reports it."
7496
- },
7497
- {
7498
- "kind": "field",
7499
- "name": "waiters",
7500
- "privacy": "private",
7501
- "readonly": true,
7502
- "default": "new Set<Waiter>()"
7503
- },
7504
- {
7505
- "kind": "field",
7506
- "name": "teardown",
7507
- "type": {
7508
- "text": "Array<() => void>"
7509
- },
7510
- "privacy": "private",
7511
- "readonly": true,
7512
- "default": "[]"
7513
- },
7514
- {
7515
- "kind": "field",
7516
- "name": "seen",
7517
- "type": {
7518
- "text": "number"
7519
- },
7520
- "privacy": "private",
7521
- "description": "How much of the driver's history has been reported as messages."
7522
- },
7471
+ "kind": "js",
7472
+ "name": "capOutput",
7473
+ "declaration": {
7474
+ "name": "capOutput",
7475
+ "module": "./compact"
7476
+ }
7477
+ },
7478
+ {
7479
+ "kind": "js",
7480
+ "name": "compactDecision",
7481
+ "declaration": {
7482
+ "name": "compactDecision",
7483
+ "module": "./compact"
7484
+ }
7485
+ },
7486
+ {
7487
+ "kind": "js",
7488
+ "name": "compactEvent",
7489
+ "declaration": {
7490
+ "name": "compactEvent",
7491
+ "module": "./compact"
7492
+ }
7493
+ },
7494
+ {
7495
+ "kind": "js",
7496
+ "name": "firstLines",
7497
+ "declaration": {
7498
+ "name": "firstLines",
7499
+ "module": "./compact"
7500
+ }
7501
+ },
7502
+ {
7503
+ "kind": "js",
7504
+ "name": "leanDecisionText",
7505
+ "declaration": {
7506
+ "name": "leanDecisionText",
7507
+ "module": "./compact"
7508
+ }
7509
+ },
7510
+ {
7511
+ "kind": "js",
7512
+ "name": "shortDecision",
7513
+ "declaration": {
7514
+ "name": "shortDecision",
7515
+ "module": "./compact"
7516
+ }
7517
+ },
7518
+ {
7519
+ "kind": "js",
7520
+ "name": "createHeadlessServer",
7521
+ "declaration": {
7522
+ "name": "createHeadlessServer",
7523
+ "module": "./server"
7524
+ }
7525
+ },
7526
+ {
7527
+ "kind": "js",
7528
+ "name": "DECISION_TEXTS",
7529
+ "declaration": {
7530
+ "name": "DECISION_TEXTS",
7531
+ "module": "./types"
7532
+ }
7533
+ },
7534
+ {
7535
+ "kind": "js",
7536
+ "name": "DEFAULT_DECISION_TEXT",
7537
+ "declaration": {
7538
+ "name": "DEFAULT_DECISION_TEXT",
7539
+ "module": "./types"
7540
+ }
7541
+ },
7542
+ {
7543
+ "kind": "js",
7544
+ "name": "Command",
7545
+ "declaration": {
7546
+ "name": "Command",
7547
+ "module": "./types"
7548
+ }
7549
+ },
7550
+ {
7551
+ "kind": "js",
7552
+ "name": "CompactAction",
7553
+ "declaration": {
7554
+ "name": "CompactAction",
7555
+ "module": "./types"
7556
+ }
7557
+ },
7558
+ {
7559
+ "kind": "js",
7560
+ "name": "CompactDecision",
7561
+ "declaration": {
7562
+ "name": "CompactDecision",
7563
+ "module": "./types"
7564
+ }
7565
+ },
7566
+ {
7567
+ "kind": "js",
7568
+ "name": "CompactEvent",
7569
+ "declaration": {
7570
+ "name": "CompactEvent",
7571
+ "module": "./types"
7572
+ }
7573
+ },
7574
+ {
7575
+ "kind": "js",
7576
+ "name": "Composer",
7577
+ "declaration": {
7578
+ "name": "Composer",
7579
+ "module": "./types"
7580
+ }
7581
+ },
7582
+ {
7583
+ "kind": "js",
7584
+ "name": "DecisionText",
7585
+ "declaration": {
7586
+ "name": "DecisionText",
7587
+ "module": "./types"
7588
+ }
7589
+ },
7590
+ {
7591
+ "kind": "js",
7592
+ "name": "ExtraOp",
7593
+ "declaration": {
7594
+ "name": "ExtraOp",
7595
+ "module": "./types"
7596
+ }
7597
+ },
7598
+ {
7599
+ "kind": "js",
7600
+ "name": "ExtraOpResult",
7601
+ "declaration": {
7602
+ "name": "ExtraOpResult",
7603
+ "module": "./types"
7604
+ }
7605
+ },
7606
+ {
7607
+ "kind": "js",
7608
+ "name": "HeadlessServer",
7609
+ "declaration": {
7610
+ "name": "HeadlessServer",
7611
+ "module": "./types"
7612
+ }
7613
+ },
7614
+ {
7615
+ "kind": "js",
7616
+ "name": "HeadlessServerHandle",
7617
+ "declaration": {
7618
+ "name": "HeadlessServerHandle",
7619
+ "module": "./types"
7620
+ }
7621
+ },
7622
+ {
7623
+ "kind": "js",
7624
+ "name": "Reply",
7625
+ "declaration": {
7626
+ "name": "Reply",
7627
+ "module": "./types"
7628
+ }
7629
+ },
7630
+ {
7631
+ "kind": "js",
7632
+ "name": "ServerOptions",
7633
+ "declaration": {
7634
+ "name": "ServerOptions",
7635
+ "module": "./types"
7636
+ }
7637
+ },
7638
+ {
7639
+ "kind": "js",
7640
+ "name": "Status",
7641
+ "declaration": {
7642
+ "name": "Status",
7643
+ "module": "./types"
7644
+ }
7645
+ },
7646
+ {
7647
+ "kind": "js",
7648
+ "name": "WorkingInfo",
7649
+ "declaration": {
7650
+ "name": "WorkingInfo",
7651
+ "module": "./types"
7652
+ }
7653
+ }
7654
+ ]
7655
+ },
7656
+ {
7657
+ "kind": "javascript-module",
7658
+ "path": "src/headless-server/server.ts",
7659
+ "declarations": [
7660
+ {
7661
+ "kind": "function",
7662
+ "name": "createHeadlessServer",
7663
+ "return": {
7664
+ "type": {
7665
+ "text": "HeadlessServer"
7666
+ }
7667
+ },
7668
+ "parameters": [
7523
7669
  {
7524
- "kind": "field",
7525
- "name": "turn",
7670
+ "name": "options",
7526
7671
  "type": {
7527
- "text": "Promise<unknown> | undefined"
7528
- },
7529
- "privacy": "private",
7530
- "description": "The `send` in flight, if any."
7531
- },
7672
+ "text": "ServerOptions"
7673
+ }
7674
+ }
7675
+ ],
7676
+ "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."
7677
+ }
7678
+ ],
7679
+ "exports": [
7680
+ {
7681
+ "kind": "js",
7682
+ "name": "createHeadlessServer",
7683
+ "declaration": {
7684
+ "name": "createHeadlessServer",
7685
+ "module": "src/headless-server/server.ts"
7686
+ }
7687
+ }
7688
+ ]
7689
+ },
7690
+ {
7691
+ "kind": "javascript-module",
7692
+ "path": "src/headless-server/types.ts",
7693
+ "declarations": [
7694
+ {
7695
+ "kind": "variable",
7696
+ "name": "DECISION_TEXTS",
7697
+ "type": {
7698
+ "text": "readonly DecisionText[]"
7699
+ },
7700
+ "default": "['full', 'lean']"
7701
+ },
7702
+ {
7703
+ "kind": "variable",
7704
+ "name": "DEFAULT_DECISION_TEXT",
7705
+ "type": {
7706
+ "text": "DecisionText"
7707
+ },
7708
+ "default": "'lean'",
7709
+ "description": "What the server uses when neither it nor the command says. Its readers are models that can `read` a view."
7710
+ }
7711
+ ],
7712
+ "exports": [
7713
+ {
7714
+ "kind": "js",
7715
+ "name": "DECISION_TEXTS",
7716
+ "declaration": {
7717
+ "name": "DECISION_TEXTS",
7718
+ "module": "src/headless-server/types.ts"
7719
+ }
7720
+ },
7721
+ {
7722
+ "kind": "js",
7723
+ "name": "DEFAULT_DECISION_TEXT",
7724
+ "declaration": {
7725
+ "name": "DEFAULT_DECISION_TEXT",
7726
+ "module": "src/headless-server/types.ts"
7727
+ }
7728
+ }
7729
+ ]
7730
+ },
7731
+ {
7732
+ "kind": "javascript-module",
7733
+ "path": "src/headless/describe-interaction.ts",
7734
+ "declarations": [
7735
+ {
7736
+ "kind": "function",
7737
+ "name": "describeInteraction",
7738
+ "return": {
7739
+ "type": {
7740
+ "text": "InteractionDescription"
7741
+ }
7742
+ },
7743
+ "parameters": [
7532
7744
  {
7533
- "kind": "field",
7534
- "name": "open",
7745
+ "name": "input",
7535
7746
  "type": {
7536
- "text": "{ start: number; reason?: string; failureReason?: string } | undefined"
7537
- },
7538
- "privacy": "private",
7539
- "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."
7540
- },
7747
+ "text": "DescribeInteractionInput"
7748
+ }
7749
+ }
7750
+ ],
7751
+ "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."
7752
+ }
7753
+ ],
7754
+ "exports": [
7755
+ {
7756
+ "kind": "js",
7757
+ "name": "describeInteraction",
7758
+ "declaration": {
7759
+ "name": "describeInteraction",
7760
+ "module": "src/headless/describe-interaction.ts"
7761
+ }
7762
+ }
7763
+ ]
7764
+ },
7765
+ {
7766
+ "kind": "javascript-module",
7767
+ "path": "src/headless/headless-debug.ts",
7768
+ "declarations": [
7769
+ {
7770
+ "kind": "function",
7771
+ "name": "headlessMetaSnapshot",
7772
+ "return": {
7773
+ "type": {
7774
+ "text": "DiagnosticEntry"
7775
+ }
7776
+ },
7777
+ "parameters": [
7541
7778
  {
7542
- "kind": "field",
7543
- "name": "base",
7779
+ "name": "driver",
7544
7780
  "type": {
7545
- "text": "number"
7546
- },
7547
- "privacy": "private",
7548
- "description": "History length when the last turn closed: where a turn the session did not start begins."
7781
+ "text": "AiDriver"
7782
+ }
7549
7783
  },
7550
7784
  {
7551
- "kind": "field",
7552
- "name": "quiesceTimer",
7785
+ "name": "options",
7786
+ "default": "{}",
7553
7787
  "type": {
7554
- "text": "ReturnType<typeof setTimeout> | undefined"
7555
- },
7556
- "privacy": "private"
7557
- },
7788
+ "text": "HeadlessDebugOptions"
7789
+ }
7790
+ }
7791
+ ],
7792
+ "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."
7793
+ },
7794
+ {
7795
+ "kind": "function",
7796
+ "name": "headlessDiagnosticEntries",
7797
+ "return": {
7798
+ "type": {
7799
+ "text": "DiagnosticEntry[]"
7800
+ }
7801
+ },
7802
+ "parameters": [
7558
7803
  {
7559
- "kind": "field",
7560
- "name": "poller",
7804
+ "name": "driver",
7561
7805
  "type": {
7562
- "text": "ReturnType<typeof setInterval> | undefined"
7563
- },
7564
- "privacy": "private"
7806
+ "text": "AiDriver"
7807
+ }
7565
7808
  },
7566
7809
  {
7567
- "kind": "field",
7568
- "name": "persistence",
7810
+ "name": "stateKey",
7569
7811
  "type": {
7570
- "text": "HeadlessPersistenceBinding | undefined"
7571
- },
7572
- "privacy": "private",
7573
- "readonly": true
7812
+ "text": "string"
7813
+ }
7574
7814
  },
7575
7815
  {
7576
- "kind": "field",
7577
- "name": "lastProbe",
7816
+ "name": "options",
7817
+ "default": "{}",
7578
7818
  "type": {
7579
- "text": "Record<string, unknown>"
7580
- },
7581
- "privacy": "private",
7582
- "default": "{}"
7583
- },
7819
+ "text": "HeadlessDebugOptions"
7820
+ }
7821
+ }
7822
+ ],
7823
+ "description": "The diagnostic entries for the session so far, from the same `buildDiagnosticEntries` the\nbrowser's element and its persister use."
7824
+ },
7825
+ {
7826
+ "kind": "function",
7827
+ "name": "headlessCurrentDebugLog",
7828
+ "return": {
7829
+ "type": {
7830
+ "text": "DebugLog"
7831
+ }
7832
+ },
7833
+ "parameters": [
7584
7834
  {
7585
- "kind": "field",
7586
- "name": "lastAutopilot",
7835
+ "name": "driver",
7587
7836
  "type": {
7588
- "text": "string"
7589
- },
7590
- "privacy": "private",
7591
- "default": "''"
7837
+ "text": "AiDriver"
7838
+ }
7592
7839
  },
7593
7840
  {
7594
- "kind": "field",
7595
- "name": "disposed",
7841
+ "name": "stateKey",
7596
7842
  "type": {
7597
- "text": "boolean"
7598
- },
7599
- "privacy": "private",
7600
- "default": "false"
7843
+ "text": "string"
7844
+ }
7601
7845
  },
7602
7846
  {
7603
- "kind": "field",
7604
- "name": "restoring",
7847
+ "name": "options",
7848
+ "default": "{}",
7605
7849
  "type": {
7606
- "text": "boolean"
7607
- },
7608
- "privacy": "private",
7609
- "default": "false",
7610
- "description": "While a restore loads the history, which is not new activity."
7611
- },
7612
- {
7613
- "kind": "method",
7614
- "name": "send",
7615
- "return": {
7616
- "type": {
7617
- "text": "HeadlessResult"
7618
- }
7619
- },
7620
- "parameters": [
7621
- {
7622
- "name": "text",
7623
- "type": {
7624
- "text": "string"
7625
- }
7626
- },
7627
- {
7628
- "name": "options",
7629
- "default": "{}",
7630
- "type": {
7631
- "text": "HeadlessSendOptions"
7632
- }
7633
- }
7634
- ],
7635
- "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."
7636
- },
7637
- {
7638
- "kind": "method",
7639
- "name": "act",
7640
- "return": {
7641
- "type": {
7642
- "text": "Promise<HeadlessActResult>"
7643
- }
7644
- },
7645
- "parameters": [
7646
- {
7647
- "name": "interactionId",
7648
- "type": {
7649
- "text": "string"
7650
- }
7651
- },
7652
- {
7653
- "name": "action",
7654
- "type": {
7655
- "text": "string | number"
7656
- }
7657
- },
7658
- {
7659
- "name": "args",
7660
- "default": "{}",
7661
- "type": {
7662
- "text": "HeadlessActArgs"
7663
- }
7664
- }
7665
- ],
7666
- "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."
7667
- },
7850
+ "text": "HeadlessDebugOptions"
7851
+ }
7852
+ }
7853
+ ],
7854
+ "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."
7855
+ }
7856
+ ],
7857
+ "exports": [
7858
+ {
7859
+ "kind": "js",
7860
+ "name": "headlessMetaSnapshot",
7861
+ "declaration": {
7862
+ "name": "headlessMetaSnapshot",
7863
+ "module": "src/headless/headless-debug.ts"
7864
+ }
7865
+ },
7866
+ {
7867
+ "kind": "js",
7868
+ "name": "headlessDiagnosticEntries",
7869
+ "declaration": {
7870
+ "name": "headlessDiagnosticEntries",
7871
+ "module": "src/headless/headless-debug.ts"
7872
+ }
7873
+ },
7874
+ {
7875
+ "kind": "js",
7876
+ "name": "headlessCurrentDebugLog",
7877
+ "declaration": {
7878
+ "name": "headlessCurrentDebugLog",
7879
+ "module": "src/headless/headless-debug.ts"
7880
+ }
7881
+ }
7882
+ ]
7883
+ },
7884
+ {
7885
+ "kind": "javascript-module",
7886
+ "path": "src/headless/headless-persistence.ts",
7887
+ "declarations": [
7888
+ {
7889
+ "kind": "function",
7890
+ "name": "headlessPersistence",
7891
+ "return": {
7892
+ "type": {
7893
+ "text": "HeadlessPersistence"
7894
+ }
7895
+ },
7896
+ "parameters": [
7668
7897
  {
7669
- "kind": "method",
7670
- "name": "resolve",
7671
- "return": {
7672
- "type": {
7673
- "text": "HeadlessResult"
7674
- }
7898
+ "name": "options",
7899
+ "type": {
7900
+ "text": "HeadlessPersistenceOptions"
7901
+ }
7902
+ }
7903
+ ],
7904
+ "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)`."
7905
+ }
7906
+ ],
7907
+ "exports": [
7908
+ {
7909
+ "kind": "js",
7910
+ "name": "headlessPersistence",
7911
+ "declaration": {
7912
+ "name": "headlessPersistence",
7913
+ "module": "src/headless/headless-persistence.ts"
7914
+ }
7915
+ }
7916
+ ]
7917
+ },
7918
+ {
7919
+ "kind": "javascript-module",
7920
+ "path": "src/headless/headless-session.ts",
7921
+ "declarations": [
7922
+ {
7923
+ "kind": "class",
7924
+ "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.",
7925
+ "name": "HeadlessSession",
7926
+ "members": [
7927
+ {
7928
+ "kind": "field",
7929
+ "name": "sessionKey",
7930
+ "type": {
7931
+ "text": "string"
7675
7932
  },
7676
- "parameters": [
7677
- {
7678
- "name": "interactionId",
7679
- "type": {
7680
- "text": "string"
7681
- }
7682
- },
7683
- {
7684
- "name": "result",
7685
- "type": {
7686
- "text": "unknown"
7687
- }
7688
- }
7689
- ],
7690
- "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."
7933
+ "privacy": "private",
7934
+ "readonly": true
7691
7935
  },
7692
7936
  {
7693
- "kind": "method",
7694
- "name": "read",
7695
- "return": {
7696
- "type": {
7697
- "text": "Promise<HeadlessReadResult>"
7698
- }
7937
+ "kind": "field",
7938
+ "name": "allowRaw",
7939
+ "type": {
7940
+ "text": "boolean"
7699
7941
  },
7700
- "parameters": [
7701
- {
7702
- "name": "interactionId",
7703
- "type": {
7704
- "text": "string"
7705
- }
7706
- },
7707
- {
7708
- "name": "request",
7709
- "default": "{}",
7710
- "type": {
7711
- "text": "HeadlessReadRequest"
7712
- }
7713
- }
7714
- ],
7715
- "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."
7942
+ "privacy": "private",
7943
+ "readonly": true
7716
7944
  },
7717
7945
  {
7718
- "kind": "method",
7719
- "name": "wait",
7720
- "return": {
7721
- "type": {
7722
- "text": "Promise<HeadlessWaitResult>"
7723
- }
7946
+ "kind": "field",
7947
+ "name": "clock",
7948
+ "type": {
7949
+ "text": "() => number"
7724
7950
  },
7725
- "parameters": [
7726
- {
7727
- "name": "request",
7728
- "type": {
7729
- "text": "HeadlessWaitRequest"
7730
- }
7731
- }
7732
- ],
7733
- "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."
7951
+ "privacy": "private",
7952
+ "readonly": true
7734
7953
  },
7735
7954
  {
7736
- "kind": "method",
7737
- "name": "eventsSince",
7738
- "return": {
7739
- "type": {
7740
- "text": "readonly HeadlessEvent[]"
7741
- }
7955
+ "kind": "field",
7956
+ "name": "autopilotHost",
7957
+ "type": {
7958
+ "text": "AutopilotLike | undefined"
7742
7959
  },
7743
- "parameters": [
7744
- {
7745
- "name": "since",
7746
- "default": "0"
7747
- }
7748
- ],
7749
- "description": "Every event logged after `since` (default: all the log keeps), without waiting."
7960
+ "privacy": "private",
7961
+ "readonly": true,
7962
+ "default": "autopilot"
7750
7963
  },
7751
7964
  {
7752
- "kind": "method",
7753
- "name": "state",
7754
- "return": {
7755
- "type": {
7756
- "text": "HeadlessState"
7757
- }
7965
+ "kind": "field",
7966
+ "name": "events",
7967
+ "type": {
7968
+ "text": "HeadlessEvent[]"
7758
7969
  },
7759
- "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."
7970
+ "privacy": "private",
7971
+ "readonly": true,
7972
+ "default": "[]"
7760
7973
  },
7761
7974
  {
7762
- "kind": "method",
7763
- "name": "restore",
7764
- "return": {
7765
- "type": {
7766
- "text": "Promise<HeadlessRestoreOutcome | undefined>"
7767
- }
7975
+ "kind": "field",
7976
+ "name": "seq",
7977
+ "type": {
7978
+ "text": "number"
7768
7979
  },
7769
- "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`."
7980
+ "privacy": "private",
7981
+ "default": "0"
7770
7982
  },
7771
7983
  {
7772
- "kind": "method",
7773
- "name": "flush",
7774
- "return": {
7775
- "type": {
7776
- "text": "Promise<void>"
7777
- }
7778
- },
7779
- "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`."
7984
+ "kind": "field",
7985
+ "name": "tracked",
7986
+ "privacy": "private",
7987
+ "readonly": true,
7988
+ "default": "new Map<string, Tracked>()"
7780
7989
  },
7781
7990
  {
7782
- "kind": "method",
7783
- "name": "debugLog",
7784
- "return": {
7785
- "type": {
7786
- "text": "Promise<DebugLog>"
7787
- }
7788
- },
7789
- "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."
7991
+ "kind": "field",
7992
+ "name": "origin",
7993
+ "privacy": "private",
7994
+ "readonly": true,
7995
+ "default": "new Map<string, { auto?: boolean; raw?: boolean }>()",
7996
+ "description": "What the session did to an interaction itself, for `settled` to say when the driver reports it."
7790
7997
  },
7791
7998
  {
7792
- "kind": "method",
7793
- "name": "stop",
7794
- "return": {
7795
- "type": {
7796
- "text": "HeadlessResult"
7797
- }
7798
- },
7799
- "description": "Stop the running turn, when the driver can."
7999
+ "kind": "field",
8000
+ "name": "waiters",
8001
+ "privacy": "private",
8002
+ "readonly": true,
8003
+ "default": "new Set<Waiter>()"
8004
+ },
8005
+ {
8006
+ "kind": "field",
8007
+ "name": "teardown",
8008
+ "type": {
8009
+ "text": "Array<() => void>"
8010
+ },
8011
+ "privacy": "private",
8012
+ "readonly": true,
8013
+ "default": "[]"
8014
+ },
8015
+ {
8016
+ "kind": "field",
8017
+ "name": "seen",
8018
+ "type": {
8019
+ "text": "number"
8020
+ },
8021
+ "privacy": "private",
8022
+ "description": "How much of the driver's history has been reported as messages."
8023
+ },
8024
+ {
8025
+ "kind": "field",
8026
+ "name": "turn",
8027
+ "type": {
8028
+ "text": "Promise<unknown> | undefined"
8029
+ },
8030
+ "privacy": "private",
8031
+ "description": "The `send` in flight, if any."
8032
+ },
8033
+ {
8034
+ "kind": "field",
8035
+ "name": "open",
8036
+ "type": {
8037
+ "text": "{ start: number; reason?: string; failureReason?: string } | undefined"
8038
+ },
8039
+ "privacy": "private",
8040
+ "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."
8041
+ },
8042
+ {
8043
+ "kind": "field",
8044
+ "name": "base",
8045
+ "type": {
8046
+ "text": "number"
8047
+ },
8048
+ "privacy": "private",
8049
+ "description": "History length when the last turn closed: where a turn the session did not start begins."
8050
+ },
8051
+ {
8052
+ "kind": "field",
8053
+ "name": "quiesceTimer",
8054
+ "type": {
8055
+ "text": "ReturnType<typeof setTimeout> | undefined"
8056
+ },
8057
+ "privacy": "private"
8058
+ },
8059
+ {
8060
+ "kind": "field",
8061
+ "name": "poller",
8062
+ "type": {
8063
+ "text": "ReturnType<typeof setInterval> | undefined"
8064
+ },
8065
+ "privacy": "private"
8066
+ },
8067
+ {
8068
+ "kind": "field",
8069
+ "name": "persistence",
8070
+ "type": {
8071
+ "text": "HeadlessPersistenceBinding | undefined"
8072
+ },
8073
+ "privacy": "private",
8074
+ "readonly": true
8075
+ },
8076
+ {
8077
+ "kind": "field",
8078
+ "name": "lastProbe",
8079
+ "type": {
8080
+ "text": "Record<string, unknown>"
8081
+ },
8082
+ "privacy": "private",
8083
+ "default": "{}"
8084
+ },
8085
+ {
8086
+ "kind": "field",
8087
+ "name": "lastAutopilot",
8088
+ "type": {
8089
+ "text": "string"
8090
+ },
8091
+ "privacy": "private",
8092
+ "default": "''"
8093
+ },
8094
+ {
8095
+ "kind": "field",
8096
+ "name": "disposed",
8097
+ "type": {
8098
+ "text": "boolean"
8099
+ },
8100
+ "privacy": "private",
8101
+ "default": "false"
8102
+ },
8103
+ {
8104
+ "kind": "field",
8105
+ "name": "restoring",
8106
+ "type": {
8107
+ "text": "boolean"
8108
+ },
8109
+ "privacy": "private",
8110
+ "default": "false",
8111
+ "description": "While a restore loads the history, which is not new activity."
7800
8112
  },
7801
8113
  {
7802
8114
  "kind": "method",
7803
- "name": "autopilot",
8115
+ "name": "send",
7804
8116
  "return": {
7805
8117
  "type": {
7806
8118
  "text": "HeadlessResult"
@@ -7808,361 +8120,247 @@
7808
8120
  },
7809
8121
  "parameters": [
7810
8122
  {
7811
- "name": "mode",
8123
+ "name": "text",
7812
8124
  "type": {
7813
- "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
8125
+ "text": "string"
7814
8126
  }
7815
8127
  },
7816
8128
  {
7817
- "name": "interactionId",
7818
- "optional": true,
8129
+ "name": "options",
8130
+ "default": "{}",
7819
8131
  "type": {
7820
- "text": "string"
8132
+ "text": "HeadlessSendOptions"
7821
8133
  }
7822
8134
  }
7823
8135
  ],
7824
- "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."
8136
+ "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."
7825
8137
  },
7826
8138
  {
7827
8139
  "kind": "method",
7828
- "name": "keepPaused",
7829
- "privacy": "private",
8140
+ "name": "act",
7830
8141
  "return": {
7831
8142
  "type": {
7832
- "text": "HeadlessResult"
8143
+ "text": "Promise<HeadlessActResult>"
7833
8144
  }
7834
8145
  },
7835
8146
  "parameters": [
7836
8147
  {
7837
- "name": "host",
8148
+ "name": "interactionId",
7838
8149
  "type": {
7839
- "text": "AutopilotLike"
8150
+ "text": "string"
7840
8151
  }
7841
8152
  },
7842
8153
  {
7843
- "name": "interactionId",
8154
+ "name": "action",
7844
8155
  "type": {
7845
- "text": "string | undefined"
8156
+ "text": "string | number"
8157
+ }
8158
+ },
8159
+ {
8160
+ "name": "args",
8161
+ "default": "{}",
8162
+ "type": {
8163
+ "text": "HeadlessActArgs"
7846
8164
  }
7847
8165
  }
7848
- ]
7849
- },
7850
- {
7851
- "kind": "method",
7852
- "name": "dispose",
7853
- "return": {
7854
- "type": {
7855
- "text": "void"
7856
- }
7857
- },
7858
- "description": "Detach: remove the interceptor and every subscription, and release anyone waiting."
8166
+ ],
8167
+ "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."
7859
8168
  },
7860
8169
  {
7861
8170
  "kind": "method",
7862
- "name": "listen",
7863
- "privacy": "private",
8171
+ "name": "resolve",
7864
8172
  "return": {
7865
8173
  "type": {
7866
- "text": "void"
8174
+ "text": "HeadlessResult"
7867
8175
  }
7868
8176
  },
7869
8177
  "parameters": [
7870
8178
  {
7871
- "name": "type",
8179
+ "name": "interactionId",
7872
8180
  "type": {
7873
8181
  "text": "string"
7874
8182
  }
7875
8183
  },
7876
8184
  {
7877
- "name": "handler",
8185
+ "name": "result",
7878
8186
  "type": {
7879
- "text": "(e: Event) => void"
8187
+ "text": "unknown"
7880
8188
  }
7881
8189
  }
7882
- ]
7883
- },
7884
- {
7885
- "kind": "method",
7886
- "name": "history",
7887
- "privacy": "private",
7888
- "return": {
7889
- "type": {
7890
- "text": "readonly ChatMessage[]"
7891
- }
7892
- }
8190
+ ],
8191
+ "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."
7893
8192
  },
7894
8193
  {
7895
8194
  "kind": "method",
7896
- "name": "onOpened",
7897
- "privacy": "private",
8195
+ "name": "read",
7898
8196
  "return": {
7899
8197
  "type": {
7900
- "text": "void"
8198
+ "text": "Promise<HeadlessReadResult>"
7901
8199
  }
7902
8200
  },
7903
8201
  "parameters": [
7904
8202
  {
7905
- "name": "opened",
8203
+ "name": "interactionId",
7906
8204
  "type": {
7907
- "text": "InteractionOpened"
8205
+ "text": "string"
8206
+ }
8207
+ },
8208
+ {
8209
+ "name": "request",
8210
+ "default": "{}",
8211
+ "type": {
8212
+ "text": "HeadlessReadRequest"
7908
8213
  }
7909
8214
  }
7910
8215
  ],
7911
- "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
8216
+ "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."
7912
8217
  },
7913
8218
  {
7914
8219
  "kind": "method",
7915
- "name": "onSettled",
7916
- "privacy": "private",
8220
+ "name": "wait",
7917
8221
  "return": {
7918
8222
  "type": {
7919
- "text": "void"
8223
+ "text": "Promise<HeadlessWaitResult>"
7920
8224
  }
7921
8225
  },
7922
8226
  "parameters": [
7923
8227
  {
7924
- "name": "detail",
8228
+ "name": "request",
7925
8229
  "type": {
7926
- "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
8230
+ "text": "HeadlessWaitRequest"
7927
8231
  }
7928
8232
  }
7929
8233
  ],
7930
- "description": "The driver says an interaction settled, by whatever route."
8234
+ "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."
7931
8235
  },
7932
8236
  {
7933
8237
  "kind": "method",
7934
- "name": "onEnded",
7935
- "privacy": "private",
8238
+ "name": "eventsSince",
7936
8239
  "return": {
7937
8240
  "type": {
7938
- "text": "void"
8241
+ "text": "readonly HeadlessEvent[]"
7939
8242
  }
7940
8243
  },
7941
8244
  "parameters": [
7942
8245
  {
7943
- "name": "t",
7944
- "type": {
7945
- "text": "Tracked"
7946
- }
8246
+ "name": "since",
8247
+ "default": "0"
7947
8248
  }
7948
8249
  ],
7949
- "description": "The interaction's context was disposed: if nothing said it settled, say it did."
8250
+ "description": "Every event logged after `since` (default: all the log keeps), without waiting."
7950
8251
  },
7951
8252
  {
7952
8253
  "kind": "method",
7953
- "name": "settle",
7954
- "privacy": "private",
8254
+ "name": "state",
7955
8255
  "return": {
7956
8256
  "type": {
7957
- "text": "void"
8257
+ "text": "HeadlessState"
7958
8258
  }
7959
8259
  },
7960
- "parameters": [
7961
- {
7962
- "name": "t",
7963
- "type": {
7964
- "text": "Tracked"
7965
- }
7966
- },
7967
- {
7968
- "name": "how",
7969
- "type": {
7970
- "text": "{ answeredBy?: string; resolvedItself?: boolean; auto?: boolean; raw?: boolean }"
7971
- }
7972
- }
7973
- ]
8260
+ "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."
7974
8261
  },
7975
8262
  {
7976
8263
  "kind": "method",
7977
- "name": "release",
7978
- "privacy": "private",
8264
+ "name": "restore",
7979
8265
  "return": {
7980
8266
  "type": {
7981
- "text": "void"
8267
+ "text": "Promise<HeadlessRestoreOutcome | undefined>"
7982
8268
  }
7983
8269
  },
7984
- "parameters": [
7985
- {
7986
- "name": "t",
7987
- "type": {
7988
- "text": "Tracked"
7989
- }
7990
- }
7991
- ]
8270
+ "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`."
7992
8271
  },
7993
8272
  {
7994
8273
  "kind": "method",
7995
- "name": "onHistory",
7996
- "privacy": "private",
8274
+ "name": "flush",
7997
8275
  "return": {
7998
8276
  "type": {
7999
- "text": "void"
8277
+ "text": "Promise<void>"
8000
8278
  }
8001
8279
  },
8002
- "description": "New messages in the driver's history: report what the person would see of them."
8003
- },
8004
- {
8005
- "kind": "method",
8006
- "name": "reportMessages",
8007
- "privacy": "private",
8008
- "return": {
8009
- "type": {
8010
- "text": "void"
8011
- }
8012
- }
8013
- },
8014
- {
8015
- "kind": "method",
8016
- "name": "onAutopilot",
8017
- "privacy": "private",
8018
- "return": {
8019
- "type": {
8020
- "text": "void"
8021
- }
8022
- }
8280
+ "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`."
8023
8281
  },
8024
8282
  {
8025
8283
  "kind": "method",
8026
- "name": "autopilotSignature",
8027
- "privacy": "private",
8284
+ "name": "debugLog",
8028
8285
  "return": {
8029
8286
  "type": {
8030
- "text": "string"
8287
+ "text": "Promise<DebugLog>"
8031
8288
  }
8032
- }
8289
+ },
8290
+ "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."
8033
8291
  },
8034
8292
  {
8035
8293
  "kind": "method",
8036
- "name": "describe",
8037
- "privacy": "private",
8294
+ "name": "stop",
8038
8295
  "return": {
8039
8296
  "type": {
8040
- "text": "InteractionDescription"
8297
+ "text": "HeadlessResult"
8041
8298
  }
8042
8299
  },
8043
- "parameters": [
8044
- {
8045
- "name": "t",
8046
- "type": {
8047
- "text": "Tracked"
8048
- }
8049
- }
8050
- ]
8300
+ "description": "Stop the running turn, when the driver can."
8051
8301
  },
8052
8302
  {
8053
8303
  "kind": "method",
8054
- "name": "evaluate",
8055
- "privacy": "private",
8304
+ "name": "autopilot",
8056
8305
  "return": {
8057
8306
  "type": {
8058
- "text": "void"
8307
+ "text": "HeadlessResult"
8059
8308
  }
8060
8309
  },
8061
8310
  "parameters": [
8062
8311
  {
8063
- "name": "t",
8312
+ "name": "mode",
8064
8313
  "type": {
8065
- "text": "Tracked"
8314
+ "text": "'pause' | 'resume' | 'stop' | 'keepPaused'"
8066
8315
  }
8067
- }
8068
- ],
8069
- "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."
8070
- },
8071
- {
8072
- "kind": "method",
8073
- "name": "autoSettle",
8074
- "privacy": "private",
8075
- "return": {
8076
- "type": {
8077
- "text": "boolean"
8078
- }
8079
- },
8080
- "parameters": [
8316
+ },
8081
8317
  {
8082
- "name": "t",
8318
+ "name": "interactionId",
8319
+ "optional": true,
8083
8320
  "type": {
8084
- "text": "Tracked"
8321
+ "text": "string"
8085
8322
  }
8086
8323
  }
8087
8324
  ],
8088
- "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."
8325
+ "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."
8089
8326
  },
8090
8327
  {
8091
8328
  "kind": "method",
8092
- "name": "readTool",
8329
+ "name": "keepPaused",
8093
8330
  "privacy": "private",
8094
8331
  "return": {
8095
8332
  "type": {
8096
- "text": "Promise<HeadlessReadResult>"
8333
+ "text": "HeadlessResult"
8097
8334
  }
8098
8335
  },
8099
8336
  "parameters": [
8100
8337
  {
8101
- "name": "t",
8102
- "type": {
8103
- "text": "Tracked"
8104
- }
8105
- },
8106
- {
8107
- "name": "name",
8338
+ "name": "host",
8108
8339
  "type": {
8109
- "text": "string"
8340
+ "text": "AutopilotLike"
8110
8341
  }
8111
8342
  },
8112
8343
  {
8113
- "name": "args",
8344
+ "name": "interactionId",
8114
8345
  "type": {
8115
- "text": "Record<string, unknown> | undefined"
8346
+ "text": "string | undefined"
8116
8347
  }
8117
8348
  }
8118
8349
  ]
8119
8350
  },
8120
8351
  {
8121
8352
  "kind": "method",
8122
- "name": "observe",
8123
- "privacy": "private",
8124
- "return": {
8125
- "type": {
8126
- "text": "void"
8127
- }
8128
- },
8129
- "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."
8130
- },
8131
- {
8132
- "kind": "method",
8133
- "name": "closeTurn",
8134
- "privacy": "private",
8135
- "return": {
8136
- "type": {
8137
- "text": "void"
8138
- }
8139
- },
8140
- "description": "Report the open turn as ended, unless the driver is busy again."
8141
- },
8142
- {
8143
- "kind": "method",
8144
- "name": "startPolling",
8145
- "privacy": "private",
8353
+ "name": "dispose",
8146
8354
  "return": {
8147
8355
  "type": {
8148
8356
  "text": "void"
8149
8357
  }
8150
8358
  },
8151
- "description": "Without a shared bus nothing says a turn ended, so while one is open the driver is asked."
8152
- },
8153
- {
8154
- "kind": "method",
8155
- "name": "stopPolling",
8156
- "privacy": "private",
8157
- "return": {
8158
- "type": {
8159
- "text": "void"
8160
- }
8161
- }
8359
+ "description": "Detach: remove the interceptor and every subscription, and release anyone waiting."
8162
8360
  },
8163
8361
  {
8164
8362
  "kind": "method",
8165
- "name": "logTurn",
8363
+ "name": "listen",
8166
8364
  "privacy": "private",
8167
8365
  "return": {
8168
8366
  "type": {
@@ -8171,854 +8369,656 @@
8171
8369
  },
8172
8370
  "parameters": [
8173
8371
  {
8174
- "name": "reason",
8372
+ "name": "type",
8175
8373
  "type": {
8176
8374
  "text": "string"
8177
8375
  }
8178
8376
  },
8179
8377
  {
8180
- "name": "failureReason",
8181
- "type": {
8182
- "text": "string | undefined"
8183
- }
8184
- },
8185
- {
8186
- "name": "start",
8187
- "type": {
8188
- "text": "number"
8189
- }
8190
- }
8191
- ]
8192
- },
8193
- {
8194
- "kind": "method",
8195
- "name": "log",
8196
- "privacy": "private",
8197
- "return": {
8198
- "type": {
8199
- "text": "void"
8200
- }
8201
- },
8202
- "parameters": [
8203
- {
8204
- "name": "event",
8205
- "type": {
8206
- "text": "NewEvent"
8207
- }
8208
- }
8209
- ]
8210
- },
8211
- {
8212
- "kind": "method",
8213
- "name": "append",
8214
- "privacy": "private",
8215
- "return": {
8216
- "type": {
8217
- "text": "void"
8218
- }
8219
- },
8220
- "parameters": [
8221
- {
8222
- "name": "event",
8378
+ "name": "handler",
8223
8379
  "type": {
8224
- "text": "NewEvent"
8380
+ "text": "(e: Event) => void"
8225
8381
  }
8226
8382
  }
8227
8383
  ]
8228
8384
  },
8229
8385
  {
8230
8386
  "kind": "method",
8231
- "name": "readProbe",
8387
+ "name": "history",
8232
8388
  "privacy": "private",
8233
8389
  "return": {
8234
8390
  "type": {
8235
- "text": "Record<string, unknown>"
8391
+ "text": "readonly ChatMessage[]"
8236
8392
  }
8237
8393
  }
8238
8394
  },
8239
8395
  {
8240
8396
  "kind": "method",
8241
- "name": "checkProbe",
8397
+ "name": "onOpened",
8242
8398
  "privacy": "private",
8243
8399
  "return": {
8244
8400
  "type": {
8245
8401
  "text": "void"
8246
8402
  }
8247
8403
  },
8248
- "description": "Read the probe again; a change in any top-level value is a `probe` event."
8249
- },
8250
- {
8251
- "kind": "method",
8252
- "name": "waited",
8253
- "privacy": "private",
8254
- "return": {
8255
- "type": {
8256
- "text": "HeadlessWaitResult"
8257
- }
8258
- },
8259
8404
  "parameters": [
8260
8405
  {
8261
- "name": "since",
8262
- "type": {
8263
- "text": "number"
8264
- }
8265
- },
8266
- {
8267
- "name": "status",
8268
- "type": {
8269
- "text": "HeadlessWaitResult['status']"
8270
- }
8271
- }
8272
- ]
8273
- }
8274
- ]
8275
- }
8276
- ],
8277
- "exports": [
8278
- {
8279
- "kind": "js",
8280
- "name": "HeadlessSession",
8281
- "declaration": {
8282
- "name": "HeadlessSession",
8283
- "module": "src/headless/headless-session.ts"
8284
- }
8285
- }
8286
- ]
8287
- },
8288
- {
8289
- "kind": "javascript-module",
8290
- "path": "src/headless/headless.types.ts",
8291
- "declarations": [],
8292
- "exports": []
8293
- },
8294
- {
8295
- "kind": "javascript-module",
8296
- "path": "src/headless/index.ts",
8297
- "declarations": [],
8298
- "exports": [
8299
- {
8300
- "kind": "js",
8301
- "name": "describeInteraction",
8302
- "declaration": {
8303
- "name": "describeInteraction",
8304
- "module": "./describe-interaction"
8305
- }
8306
- },
8307
- {
8308
- "kind": "js",
8309
- "name": "headlessCurrentDebugLog",
8310
- "declaration": {
8311
- "name": "headlessCurrentDebugLog",
8312
- "module": "./headless-debug"
8313
- }
8314
- },
8315
- {
8316
- "kind": "js",
8317
- "name": "headlessDiagnosticEntries",
8318
- "declaration": {
8319
- "name": "headlessDiagnosticEntries",
8320
- "module": "./headless-debug"
8321
- }
8322
- },
8323
- {
8324
- "kind": "js",
8325
- "name": "headlessMetaSnapshot",
8326
- "declaration": {
8327
- "name": "headlessMetaSnapshot",
8328
- "module": "./headless-debug"
8329
- }
8330
- },
8331
- {
8332
- "kind": "js",
8333
- "name": "HeadlessSession",
8334
- "declaration": {
8335
- "name": "HeadlessSession",
8336
- "module": "./headless-session"
8337
- }
8338
- },
8339
- {
8340
- "kind": "js",
8341
- "name": "AutopilotLike",
8342
- "declaration": {
8343
- "name": "AutopilotLike",
8344
- "module": "./headless.types"
8345
- }
8346
- },
8347
- {
8348
- "kind": "js",
8349
- "name": "DescribedAction",
8350
- "declaration": {
8351
- "name": "DescribedAction",
8352
- "module": "./headless.types"
8353
- }
8354
- },
8355
- {
8356
- "kind": "js",
8357
- "name": "DescribeInteractionInput",
8358
- "declaration": {
8359
- "name": "DescribeInteractionInput",
8360
- "module": "./headless.types"
8361
- }
8362
- },
8363
- {
8364
- "kind": "js",
8365
- "name": "HeadlessActArgs",
8366
- "declaration": {
8367
- "name": "HeadlessActArgs",
8368
- "module": "./headless.types"
8369
- }
8370
- },
8371
- {
8372
- "kind": "js",
8373
- "name": "HeadlessActResult",
8374
- "declaration": {
8375
- "name": "HeadlessActResult",
8376
- "module": "./headless.types"
8377
- }
8378
- },
8379
- {
8380
- "kind": "js",
8381
- "name": "HeadlessDebugOptions",
8382
- "declaration": {
8383
- "name": "HeadlessDebugOptions",
8384
- "module": "./headless.types"
8385
- }
8386
- },
8387
- {
8388
- "kind": "js",
8389
- "name": "HeadlessEvent",
8390
- "declaration": {
8391
- "name": "HeadlessEvent",
8392
- "module": "./headless.types"
8393
- }
8394
- },
8395
- {
8396
- "kind": "js",
8397
- "name": "HeadlessEventBase",
8398
- "declaration": {
8399
- "name": "HeadlessEventBase",
8400
- "module": "./headless.types"
8401
- }
8402
- },
8403
- {
8404
- "kind": "js",
8405
- "name": "HeadlessEventType",
8406
- "declaration": {
8407
- "name": "HeadlessEventType",
8408
- "module": "./headless.types"
8409
- }
8410
- },
8411
- {
8412
- "kind": "js",
8413
- "name": "HeadlessPersistence",
8414
- "declaration": {
8415
- "name": "HeadlessPersistence",
8416
- "module": "./headless.types"
8417
- }
8418
- },
8419
- {
8420
- "kind": "js",
8421
- "name": "HeadlessPersistenceBinding",
8422
- "declaration": {
8423
- "name": "HeadlessPersistenceBinding",
8424
- "module": "./headless.types"
8425
- }
8426
- },
8427
- {
8428
- "kind": "js",
8429
- "name": "HeadlessPersistenceHost",
8430
- "declaration": {
8431
- "name": "HeadlessPersistenceHost",
8432
- "module": "./headless.types"
8433
- }
8434
- },
8435
- {
8436
- "kind": "js",
8437
- "name": "HeadlessReadRequest",
8438
- "declaration": {
8439
- "name": "HeadlessReadRequest",
8440
- "module": "./headless.types"
8441
- }
8442
- },
8443
- {
8444
- "kind": "js",
8445
- "name": "HeadlessReadResult",
8446
- "declaration": {
8447
- "name": "HeadlessReadResult",
8448
- "module": "./headless.types"
8449
- }
8450
- },
8451
- {
8452
- "kind": "js",
8453
- "name": "HeadlessResult",
8454
- "declaration": {
8455
- "name": "HeadlessResult",
8456
- "module": "./headless.types"
8457
- }
8458
- },
8459
- {
8460
- "kind": "js",
8461
- "name": "HeadlessRestoreOutcome",
8462
- "declaration": {
8463
- "name": "HeadlessRestoreOutcome",
8464
- "module": "./headless.types"
8465
- }
8466
- },
8467
- {
8468
- "kind": "js",
8469
- "name": "HeadlessSendOptions",
8470
- "declaration": {
8471
- "name": "HeadlessSendOptions",
8472
- "module": "./headless.types"
8473
- }
8474
- },
8475
- {
8476
- "kind": "js",
8477
- "name": "HeadlessSessionOptions",
8478
- "declaration": {
8479
- "name": "HeadlessSessionOptions",
8480
- "module": "./headless.types"
8481
- }
8482
- },
8483
- {
8484
- "kind": "js",
8485
- "name": "HeadlessState",
8486
- "declaration": {
8487
- "name": "HeadlessState",
8488
- "module": "./headless.types"
8489
- }
8490
- },
8491
- {
8492
- "kind": "js",
8493
- "name": "HeadlessWaitRequest",
8494
- "declaration": {
8495
- "name": "HeadlessWaitRequest",
8496
- "module": "./headless.types"
8497
- }
8498
- },
8499
- {
8500
- "kind": "js",
8501
- "name": "HeadlessWaitResult",
8502
- "declaration": {
8503
- "name": "HeadlessWaitResult",
8504
- "module": "./headless.types"
8505
- }
8506
- },
8507
- {
8508
- "kind": "js",
8509
- "name": "InteractionDescription",
8510
- "declaration": {
8511
- "name": "InteractionDescription",
8512
- "module": "./headless.types"
8513
- }
8514
- },
8515
- {
8516
- "kind": "js",
8517
- "name": "PendingSummary",
8518
- "declaration": {
8519
- "name": "PendingSummary",
8520
- "module": "./headless.types"
8521
- }
8522
- }
8523
- ]
8524
- },
8525
- {
8526
- "kind": "javascript-module",
8527
- "path": "src/headless-server/compact.ts",
8528
- "declarations": [
8529
- {
8530
- "kind": "function",
8531
- "name": "firstLines",
8532
- "return": {
8533
- "type": {
8534
- "text": "{ text: string; chars?: number }"
8535
- }
8536
- },
8537
- "parameters": [
8406
+ "name": "opened",
8407
+ "type": {
8408
+ "text": "InteractionOpened"
8409
+ }
8410
+ }
8411
+ ],
8412
+ "description": "An interaction opened: watch it. Who holds it is not decided yet, so it is reported later."
8413
+ },
8538
8414
  {
8539
- "name": "text",
8540
- "type": {
8541
- "text": "string"
8542
- }
8415
+ "kind": "method",
8416
+ "name": "onSettled",
8417
+ "privacy": "private",
8418
+ "return": {
8419
+ "type": {
8420
+ "text": "void"
8421
+ }
8422
+ },
8423
+ "parameters": [
8424
+ {
8425
+ "name": "detail",
8426
+ "type": {
8427
+ "text": "{\n interactionId: string;\n answeredBy?: string;\n resolvedItself?: boolean;\n }"
8428
+ }
8429
+ }
8430
+ ],
8431
+ "description": "The driver says an interaction settled, by whatever route."
8543
8432
  },
8544
8433
  {
8545
- "name": "lines",
8546
- "type": {
8547
- "text": "number"
8548
- }
8434
+ "kind": "method",
8435
+ "name": "onEnded",
8436
+ "privacy": "private",
8437
+ "return": {
8438
+ "type": {
8439
+ "text": "void"
8440
+ }
8441
+ },
8442
+ "parameters": [
8443
+ {
8444
+ "name": "t",
8445
+ "type": {
8446
+ "text": "Tracked"
8447
+ }
8448
+ }
8449
+ ],
8450
+ "description": "The interaction's context was disposed: if nothing said it settled, say it did."
8549
8451
  },
8550
8452
  {
8551
- "name": "chars",
8552
- "type": {
8553
- "text": "number"
8453
+ "kind": "method",
8454
+ "name": "settle",
8455
+ "privacy": "private",
8456
+ "return": {
8457
+ "type": {
8458
+ "text": "void"
8459
+ }
8460
+ },
8461
+ "parameters": [
8462
+ {
8463
+ "name": "t",
8464
+ "type": {
8465
+ "text": "Tracked"
8466
+ }
8467
+ },
8468
+ {
8469
+ "name": "how",
8470
+ "type": {
8471
+ "text": "{ answeredBy?: string; resolvedItself?: boolean; auto?: boolean; raw?: boolean }"
8472
+ }
8473
+ }
8474
+ ]
8475
+ },
8476
+ {
8477
+ "kind": "method",
8478
+ "name": "release",
8479
+ "privacy": "private",
8480
+ "return": {
8481
+ "type": {
8482
+ "text": "void"
8483
+ }
8484
+ },
8485
+ "parameters": [
8486
+ {
8487
+ "name": "t",
8488
+ "type": {
8489
+ "text": "Tracked"
8490
+ }
8491
+ }
8492
+ ]
8493
+ },
8494
+ {
8495
+ "kind": "method",
8496
+ "name": "onHistory",
8497
+ "privacy": "private",
8498
+ "return": {
8499
+ "type": {
8500
+ "text": "void"
8501
+ }
8502
+ },
8503
+ "description": "New messages in the driver's history: report what the person would see of them."
8504
+ },
8505
+ {
8506
+ "kind": "method",
8507
+ "name": "reportMessages",
8508
+ "privacy": "private",
8509
+ "return": {
8510
+ "type": {
8511
+ "text": "void"
8512
+ }
8554
8513
  }
8555
- }
8556
- ],
8557
- "description": "The first `lines` lines of `text`, at most `chars` characters, and its full length when it was cut."
8558
- },
8559
- {
8560
- "kind": "function",
8561
- "name": "present",
8562
- "return": {
8563
- "type": {
8564
- "text": "Partial<T>"
8565
- }
8566
- },
8567
- "parameters": [
8514
+ },
8568
8515
  {
8569
- "name": "source",
8570
- "type": {
8571
- "text": "T"
8516
+ "kind": "method",
8517
+ "name": "onAutopilot",
8518
+ "privacy": "private",
8519
+ "return": {
8520
+ "type": {
8521
+ "text": "void"
8522
+ }
8572
8523
  }
8573
- }
8574
- ],
8575
- "description": "The keys of `source` that are set, as a new object: a field with nothing to say is dropped."
8576
- },
8577
- {
8578
- "kind": "function",
8579
- "name": "compactEvent",
8580
- "return": {
8581
- "type": {
8582
- "text": "CompactEvent | undefined"
8583
- }
8584
- },
8585
- "parameters": [
8524
+ },
8586
8525
  {
8587
- "name": "event",
8588
- "type": {
8589
- "text": "HeadlessEvent"
8526
+ "kind": "method",
8527
+ "name": "autopilotSignature",
8528
+ "privacy": "private",
8529
+ "return": {
8530
+ "type": {
8531
+ "text": "string"
8532
+ }
8590
8533
  }
8591
8534
  },
8592
8535
  {
8593
- "name": "options",
8594
- "default": "{}",
8595
- "type": {
8596
- "text": "CompactOptions"
8597
- }
8598
- }
8599
- ],
8600
- "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`)."
8601
- },
8602
- {
8603
- "kind": "function",
8604
- "name": "leanDecisionText",
8605
- "return": {
8606
- "type": {
8607
- "text": "string"
8608
- }
8609
- },
8610
- "parameters": [
8536
+ "kind": "method",
8537
+ "name": "describe",
8538
+ "privacy": "private",
8539
+ "return": {
8540
+ "type": {
8541
+ "text": "InteractionDescription"
8542
+ }
8543
+ },
8544
+ "parameters": [
8545
+ {
8546
+ "name": "t",
8547
+ "type": {
8548
+ "text": "Tracked"
8549
+ }
8550
+ }
8551
+ ]
8552
+ },
8553
+ {
8554
+ "kind": "method",
8555
+ "name": "evaluate",
8556
+ "privacy": "private",
8557
+ "return": {
8558
+ "type": {
8559
+ "text": "void"
8560
+ }
8561
+ },
8562
+ "parameters": [
8563
+ {
8564
+ "name": "t",
8565
+ "type": {
8566
+ "text": "Tracked"
8567
+ }
8568
+ }
8569
+ ],
8570
+ "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."
8571
+ },
8572
+ {
8573
+ "kind": "method",
8574
+ "name": "autoSettle",
8575
+ "privacy": "private",
8576
+ "return": {
8577
+ "type": {
8578
+ "text": "boolean"
8579
+ }
8580
+ },
8581
+ "parameters": [
8582
+ {
8583
+ "name": "t",
8584
+ "type": {
8585
+ "text": "Tracked"
8586
+ }
8587
+ }
8588
+ ],
8589
+ "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."
8590
+ },
8591
+ {
8592
+ "kind": "method",
8593
+ "name": "readTool",
8594
+ "privacy": "private",
8595
+ "return": {
8596
+ "type": {
8597
+ "text": "Promise<HeadlessReadResult>"
8598
+ }
8599
+ },
8600
+ "parameters": [
8601
+ {
8602
+ "name": "t",
8603
+ "type": {
8604
+ "text": "Tracked"
8605
+ }
8606
+ },
8607
+ {
8608
+ "name": "name",
8609
+ "type": {
8610
+ "text": "string"
8611
+ }
8612
+ },
8613
+ {
8614
+ "name": "args",
8615
+ "type": {
8616
+ "text": "Record<string, unknown> | undefined"
8617
+ }
8618
+ }
8619
+ ]
8620
+ },
8621
+ {
8622
+ "kind": "method",
8623
+ "name": "observe",
8624
+ "privacy": "private",
8625
+ "return": {
8626
+ "type": {
8627
+ "text": "void"
8628
+ }
8629
+ },
8630
+ "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."
8631
+ },
8632
+ {
8633
+ "kind": "method",
8634
+ "name": "closeTurn",
8635
+ "privacy": "private",
8636
+ "return": {
8637
+ "type": {
8638
+ "text": "void"
8639
+ }
8640
+ },
8641
+ "description": "Report the open turn as ended, unless the driver is busy again."
8642
+ },
8611
8643
  {
8612
- "name": "text",
8613
- "type": {
8614
- "text": "string"
8615
- }
8644
+ "kind": "method",
8645
+ "name": "startPolling",
8646
+ "privacy": "private",
8647
+ "return": {
8648
+ "type": {
8649
+ "text": "void"
8650
+ }
8651
+ },
8652
+ "description": "Without a shared bus nothing says a turn ended, so while one is open the driver is asked."
8616
8653
  },
8617
8654
  {
8618
- "name": "views",
8619
- "optional": true,
8620
- "type": {
8621
- "text": "Readonly<Record<string, string>>"
8655
+ "kind": "method",
8656
+ "name": "stopPolling",
8657
+ "privacy": "private",
8658
+ "return": {
8659
+ "type": {
8660
+ "text": "void"
8661
+ }
8622
8662
  }
8623
- }
8624
- ],
8625
- "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."
8626
- },
8627
- {
8628
- "kind": "function",
8629
- "name": "compactDecision",
8630
- "return": {
8631
- "type": {
8632
- "text": "CompactDecision"
8633
- }
8634
- },
8635
- "parameters": [
8663
+ },
8636
8664
  {
8637
- "name": "description",
8638
- "type": {
8639
- "text": "InteractionDescription"
8640
- }
8665
+ "kind": "method",
8666
+ "name": "logTurn",
8667
+ "privacy": "private",
8668
+ "return": {
8669
+ "type": {
8670
+ "text": "void"
8671
+ }
8672
+ },
8673
+ "parameters": [
8674
+ {
8675
+ "name": "reason",
8676
+ "type": {
8677
+ "text": "string"
8678
+ }
8679
+ },
8680
+ {
8681
+ "name": "failureReason",
8682
+ "type": {
8683
+ "text": "string | undefined"
8684
+ }
8685
+ },
8686
+ {
8687
+ "name": "start",
8688
+ "type": {
8689
+ "text": "number"
8690
+ }
8691
+ }
8692
+ ]
8641
8693
  },
8642
8694
  {
8643
- "name": "decisionText",
8644
- "default": "'full'",
8645
- "type": {
8646
- "text": "DecisionText"
8647
- }
8648
- }
8649
- ],
8650
- "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."
8651
- },
8652
- {
8653
- "kind": "function",
8654
- "name": "shortDecision",
8655
- "return": {
8656
- "type": {
8657
- "text": "CompactDecision"
8658
- }
8659
- },
8660
- "parameters": [
8695
+ "kind": "method",
8696
+ "name": "log",
8697
+ "privacy": "private",
8698
+ "return": {
8699
+ "type": {
8700
+ "text": "void"
8701
+ }
8702
+ },
8703
+ "parameters": [
8704
+ {
8705
+ "name": "event",
8706
+ "type": {
8707
+ "text": "NewEvent"
8708
+ }
8709
+ }
8710
+ ]
8711
+ },
8661
8712
  {
8662
- "name": "interactionId",
8663
- "type": {
8664
- "text": "string"
8665
- }
8713
+ "kind": "method",
8714
+ "name": "append",
8715
+ "privacy": "private",
8716
+ "return": {
8717
+ "type": {
8718
+ "text": "void"
8719
+ }
8720
+ },
8721
+ "parameters": [
8722
+ {
8723
+ "name": "event",
8724
+ "type": {
8725
+ "text": "NewEvent"
8726
+ }
8727
+ }
8728
+ ]
8666
8729
  },
8667
8730
  {
8668
- "name": "component",
8669
- "type": {
8670
- "text": "string"
8731
+ "kind": "method",
8732
+ "name": "readProbe",
8733
+ "privacy": "private",
8734
+ "return": {
8735
+ "type": {
8736
+ "text": "Record<string, unknown>"
8737
+ }
8671
8738
  }
8672
8739
  },
8673
8740
  {
8674
- "name": "actions",
8675
- "type": {
8676
- "text": "ReadonlyArray<{ n?: number; name: string; enabled: boolean }>"
8677
- }
8678
- }
8679
- ],
8680
- "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."
8681
- },
8682
- {
8683
- "kind": "function",
8684
- "name": "capOutput",
8685
- "return": {
8686
- "type": {
8687
- "text": "unknown"
8688
- }
8689
- },
8690
- "parameters": [
8741
+ "kind": "method",
8742
+ "name": "checkProbe",
8743
+ "privacy": "private",
8744
+ "return": {
8745
+ "type": {
8746
+ "text": "void"
8747
+ }
8748
+ },
8749
+ "description": "Read the probe again; a change in any top-level value is a `probe` event."
8750
+ },
8691
8751
  {
8692
- "name": "output",
8693
- "type": {
8694
- "text": "unknown"
8695
- }
8696
- }
8697
- ],
8698
- "description": "What an editing action returned, as the reply carries it: whole when small, else its first characters."
8699
- }
8700
- ],
8701
- "exports": [
8702
- {
8703
- "kind": "js",
8704
- "name": "firstLines",
8705
- "declaration": {
8706
- "name": "firstLines",
8707
- "module": "src/headless-server/compact.ts"
8708
- }
8709
- },
8710
- {
8711
- "kind": "js",
8712
- "name": "present",
8713
- "declaration": {
8714
- "name": "present",
8715
- "module": "src/headless-server/compact.ts"
8716
- }
8717
- },
8718
- {
8719
- "kind": "js",
8720
- "name": "compactEvent",
8721
- "declaration": {
8722
- "name": "compactEvent",
8723
- "module": "src/headless-server/compact.ts"
8724
- }
8725
- },
8726
- {
8727
- "kind": "js",
8728
- "name": "leanDecisionText",
8729
- "declaration": {
8730
- "name": "leanDecisionText",
8731
- "module": "src/headless-server/compact.ts"
8732
- }
8733
- },
8734
- {
8735
- "kind": "js",
8736
- "name": "compactDecision",
8737
- "declaration": {
8738
- "name": "compactDecision",
8739
- "module": "src/headless-server/compact.ts"
8740
- }
8741
- },
8742
- {
8743
- "kind": "js",
8744
- "name": "shortDecision",
8745
- "declaration": {
8746
- "name": "shortDecision",
8747
- "module": "src/headless-server/compact.ts"
8748
- }
8749
- },
8752
+ "kind": "method",
8753
+ "name": "waited",
8754
+ "privacy": "private",
8755
+ "return": {
8756
+ "type": {
8757
+ "text": "HeadlessWaitResult"
8758
+ }
8759
+ },
8760
+ "parameters": [
8761
+ {
8762
+ "name": "since",
8763
+ "type": {
8764
+ "text": "number"
8765
+ }
8766
+ },
8767
+ {
8768
+ "name": "status",
8769
+ "type": {
8770
+ "text": "HeadlessWaitResult['status']"
8771
+ }
8772
+ }
8773
+ ]
8774
+ }
8775
+ ]
8776
+ }
8777
+ ],
8778
+ "exports": [
8750
8779
  {
8751
8780
  "kind": "js",
8752
- "name": "capOutput",
8781
+ "name": "HeadlessSession",
8753
8782
  "declaration": {
8754
- "name": "capOutput",
8755
- "module": "src/headless-server/compact.ts"
8783
+ "name": "HeadlessSession",
8784
+ "module": "src/headless/headless-session.ts"
8756
8785
  }
8757
8786
  }
8758
8787
  ]
8759
8788
  },
8760
8789
  {
8761
8790
  "kind": "javascript-module",
8762
- "path": "src/headless-server/index.ts",
8791
+ "path": "src/headless/headless.types.ts",
8792
+ "declarations": [],
8793
+ "exports": []
8794
+ },
8795
+ {
8796
+ "kind": "javascript-module",
8797
+ "path": "src/headless/index.ts",
8763
8798
  "declarations": [],
8764
8799
  "exports": [
8765
8800
  {
8766
8801
  "kind": "js",
8767
- "name": "capOutput",
8802
+ "name": "describeInteraction",
8768
8803
  "declaration": {
8769
- "name": "capOutput",
8770
- "module": "./compact"
8804
+ "name": "describeInteraction",
8805
+ "module": "./describe-interaction"
8771
8806
  }
8772
8807
  },
8773
8808
  {
8774
8809
  "kind": "js",
8775
- "name": "compactDecision",
8810
+ "name": "headlessCurrentDebugLog",
8776
8811
  "declaration": {
8777
- "name": "compactDecision",
8778
- "module": "./compact"
8812
+ "name": "headlessCurrentDebugLog",
8813
+ "module": "./headless-debug"
8779
8814
  }
8780
8815
  },
8781
8816
  {
8782
8817
  "kind": "js",
8783
- "name": "compactEvent",
8818
+ "name": "headlessDiagnosticEntries",
8784
8819
  "declaration": {
8785
- "name": "compactEvent",
8786
- "module": "./compact"
8820
+ "name": "headlessDiagnosticEntries",
8821
+ "module": "./headless-debug"
8787
8822
  }
8788
8823
  },
8789
8824
  {
8790
8825
  "kind": "js",
8791
- "name": "firstLines",
8826
+ "name": "headlessMetaSnapshot",
8792
8827
  "declaration": {
8793
- "name": "firstLines",
8794
- "module": "./compact"
8828
+ "name": "headlessMetaSnapshot",
8829
+ "module": "./headless-debug"
8795
8830
  }
8796
8831
  },
8797
8832
  {
8798
8833
  "kind": "js",
8799
- "name": "leanDecisionText",
8834
+ "name": "HeadlessSession",
8800
8835
  "declaration": {
8801
- "name": "leanDecisionText",
8802
- "module": "./compact"
8836
+ "name": "HeadlessSession",
8837
+ "module": "./headless-session"
8803
8838
  }
8804
8839
  },
8805
8840
  {
8806
8841
  "kind": "js",
8807
- "name": "shortDecision",
8842
+ "name": "AutopilotLike",
8808
8843
  "declaration": {
8809
- "name": "shortDecision",
8810
- "module": "./compact"
8844
+ "name": "AutopilotLike",
8845
+ "module": "./headless.types"
8811
8846
  }
8812
8847
  },
8813
8848
  {
8814
8849
  "kind": "js",
8815
- "name": "createHeadlessServer",
8850
+ "name": "DescribedAction",
8816
8851
  "declaration": {
8817
- "name": "createHeadlessServer",
8818
- "module": "./server"
8852
+ "name": "DescribedAction",
8853
+ "module": "./headless.types"
8819
8854
  }
8820
8855
  },
8821
8856
  {
8822
8857
  "kind": "js",
8823
- "name": "DECISION_TEXTS",
8858
+ "name": "DescribeInteractionInput",
8824
8859
  "declaration": {
8825
- "name": "DECISION_TEXTS",
8826
- "module": "./types"
8860
+ "name": "DescribeInteractionInput",
8861
+ "module": "./headless.types"
8827
8862
  }
8828
8863
  },
8829
8864
  {
8830
8865
  "kind": "js",
8831
- "name": "DEFAULT_DECISION_TEXT",
8866
+ "name": "HeadlessActArgs",
8832
8867
  "declaration": {
8833
- "name": "DEFAULT_DECISION_TEXT",
8834
- "module": "./types"
8868
+ "name": "HeadlessActArgs",
8869
+ "module": "./headless.types"
8835
8870
  }
8836
8871
  },
8837
8872
  {
8838
8873
  "kind": "js",
8839
- "name": "Command",
8874
+ "name": "HeadlessActResult",
8840
8875
  "declaration": {
8841
- "name": "Command",
8842
- "module": "./types"
8876
+ "name": "HeadlessActResult",
8877
+ "module": "./headless.types"
8843
8878
  }
8844
8879
  },
8845
8880
  {
8846
8881
  "kind": "js",
8847
- "name": "CompactAction",
8882
+ "name": "HeadlessDebugOptions",
8848
8883
  "declaration": {
8849
- "name": "CompactAction",
8850
- "module": "./types"
8884
+ "name": "HeadlessDebugOptions",
8885
+ "module": "./headless.types"
8851
8886
  }
8852
8887
  },
8853
8888
  {
8854
8889
  "kind": "js",
8855
- "name": "CompactDecision",
8890
+ "name": "HeadlessEvent",
8856
8891
  "declaration": {
8857
- "name": "CompactDecision",
8858
- "module": "./types"
8892
+ "name": "HeadlessEvent",
8893
+ "module": "./headless.types"
8859
8894
  }
8860
8895
  },
8861
8896
  {
8862
8897
  "kind": "js",
8863
- "name": "CompactEvent",
8898
+ "name": "HeadlessEventBase",
8864
8899
  "declaration": {
8865
- "name": "CompactEvent",
8866
- "module": "./types"
8900
+ "name": "HeadlessEventBase",
8901
+ "module": "./headless.types"
8867
8902
  }
8868
8903
  },
8869
8904
  {
8870
8905
  "kind": "js",
8871
- "name": "Composer",
8906
+ "name": "HeadlessEventType",
8872
8907
  "declaration": {
8873
- "name": "Composer",
8874
- "module": "./types"
8908
+ "name": "HeadlessEventType",
8909
+ "module": "./headless.types"
8875
8910
  }
8876
8911
  },
8877
8912
  {
8878
8913
  "kind": "js",
8879
- "name": "DecisionText",
8914
+ "name": "HeadlessPersistence",
8880
8915
  "declaration": {
8881
- "name": "DecisionText",
8882
- "module": "./types"
8916
+ "name": "HeadlessPersistence",
8917
+ "module": "./headless.types"
8883
8918
  }
8884
8919
  },
8885
8920
  {
8886
8921
  "kind": "js",
8887
- "name": "ExtraOp",
8922
+ "name": "HeadlessPersistenceBinding",
8888
8923
  "declaration": {
8889
- "name": "ExtraOp",
8890
- "module": "./types"
8924
+ "name": "HeadlessPersistenceBinding",
8925
+ "module": "./headless.types"
8891
8926
  }
8892
8927
  },
8893
8928
  {
8894
8929
  "kind": "js",
8895
- "name": "ExtraOpResult",
8930
+ "name": "HeadlessPersistenceHost",
8896
8931
  "declaration": {
8897
- "name": "ExtraOpResult",
8898
- "module": "./types"
8932
+ "name": "HeadlessPersistenceHost",
8933
+ "module": "./headless.types"
8899
8934
  }
8900
8935
  },
8901
8936
  {
8902
8937
  "kind": "js",
8903
- "name": "HeadlessServer",
8938
+ "name": "HeadlessReadRequest",
8904
8939
  "declaration": {
8905
- "name": "HeadlessServer",
8906
- "module": "./types"
8940
+ "name": "HeadlessReadRequest",
8941
+ "module": "./headless.types"
8907
8942
  }
8908
8943
  },
8909
8944
  {
8910
8945
  "kind": "js",
8911
- "name": "HeadlessServerHandle",
8946
+ "name": "HeadlessReadResult",
8912
8947
  "declaration": {
8913
- "name": "HeadlessServerHandle",
8914
- "module": "./types"
8948
+ "name": "HeadlessReadResult",
8949
+ "module": "./headless.types"
8915
8950
  }
8916
8951
  },
8917
8952
  {
8918
8953
  "kind": "js",
8919
- "name": "Reply",
8954
+ "name": "HeadlessResult",
8920
8955
  "declaration": {
8921
- "name": "Reply",
8922
- "module": "./types"
8956
+ "name": "HeadlessResult",
8957
+ "module": "./headless.types"
8923
8958
  }
8924
8959
  },
8925
8960
  {
8926
8961
  "kind": "js",
8927
- "name": "ServerOptions",
8962
+ "name": "HeadlessRestoreOutcome",
8928
8963
  "declaration": {
8929
- "name": "ServerOptions",
8930
- "module": "./types"
8964
+ "name": "HeadlessRestoreOutcome",
8965
+ "module": "./headless.types"
8931
8966
  }
8932
8967
  },
8933
8968
  {
8934
8969
  "kind": "js",
8935
- "name": "Status",
8970
+ "name": "HeadlessSendOptions",
8936
8971
  "declaration": {
8937
- "name": "Status",
8938
- "module": "./types"
8972
+ "name": "HeadlessSendOptions",
8973
+ "module": "./headless.types"
8939
8974
  }
8940
8975
  },
8941
8976
  {
8942
8977
  "kind": "js",
8943
- "name": "WorkingInfo",
8978
+ "name": "HeadlessSessionOptions",
8944
8979
  "declaration": {
8945
- "name": "WorkingInfo",
8946
- "module": "./types"
8980
+ "name": "HeadlessSessionOptions",
8981
+ "module": "./headless.types"
8947
8982
  }
8948
- }
8949
- ]
8950
- },
8951
- {
8952
- "kind": "javascript-module",
8953
- "path": "src/headless-server/server.ts",
8954
- "declarations": [
8955
- {
8956
- "kind": "function",
8957
- "name": "createHeadlessServer",
8958
- "return": {
8959
- "type": {
8960
- "text": "HeadlessServer"
8961
- }
8962
- },
8963
- "parameters": [
8964
- {
8965
- "name": "options",
8966
- "type": {
8967
- "text": "ServerOptions"
8968
- }
8969
- }
8970
- ],
8971
- "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."
8972
- }
8973
- ],
8974
- "exports": [
8983
+ },
8975
8984
  {
8976
8985
  "kind": "js",
8977
- "name": "createHeadlessServer",
8986
+ "name": "HeadlessState",
8978
8987
  "declaration": {
8979
- "name": "createHeadlessServer",
8980
- "module": "src/headless-server/server.ts"
8988
+ "name": "HeadlessState",
8989
+ "module": "./headless.types"
8981
8990
  }
8982
- }
8983
- ]
8984
- },
8985
- {
8986
- "kind": "javascript-module",
8987
- "path": "src/headless-server/types.ts",
8988
- "declarations": [
8991
+ },
8989
8992
  {
8990
- "kind": "variable",
8991
- "name": "DECISION_TEXTS",
8992
- "type": {
8993
- "text": "readonly DecisionText[]"
8994
- },
8995
- "default": "['full', 'lean']"
8993
+ "kind": "js",
8994
+ "name": "HeadlessWaitRequest",
8995
+ "declaration": {
8996
+ "name": "HeadlessWaitRequest",
8997
+ "module": "./headless.types"
8998
+ }
8996
8999
  },
8997
9000
  {
8998
- "kind": "variable",
8999
- "name": "DEFAULT_DECISION_TEXT",
9000
- "type": {
9001
- "text": "DecisionText"
9002
- },
9003
- "default": "'lean'",
9004
- "description": "What the server uses when neither it nor the command says. Its readers are models that can `read` a view."
9005
- }
9006
- ],
9007
- "exports": [
9001
+ "kind": "js",
9002
+ "name": "HeadlessWaitResult",
9003
+ "declaration": {
9004
+ "name": "HeadlessWaitResult",
9005
+ "module": "./headless.types"
9006
+ }
9007
+ },
9008
9008
  {
9009
9009
  "kind": "js",
9010
- "name": "DECISION_TEXTS",
9010
+ "name": "InteractionDescription",
9011
9011
  "declaration": {
9012
- "name": "DECISION_TEXTS",
9013
- "module": "src/headless-server/types.ts"
9012
+ "name": "InteractionDescription",
9013
+ "module": "./headless.types"
9014
9014
  }
9015
9015
  },
9016
9016
  {
9017
9017
  "kind": "js",
9018
- "name": "DEFAULT_DECISION_TEXT",
9018
+ "name": "PendingSummary",
9019
9019
  "declaration": {
9020
- "name": "DEFAULT_DECISION_TEXT",
9021
- "module": "src/headless-server/types.ts"
9020
+ "name": "PendingSummary",
9021
+ "module": "./headless.types"
9022
9022
  }
9023
9023
  }
9024
9024
  ]