@ouispec/contract 0.7.0 → 0.10.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.
@@ -8,7 +8,7 @@ export const CONTRACT_SCHEMAS = {
8
8
  "$schema": "https://json-schema.org/draft/2020-12/schema",
9
9
  "$id": "https://schemas.closurestudio.ai/oui/v1/json-schema.json",
10
10
  "title": "JsonSchema",
11
- "description": "The subset of JSON Schema (draft 2020-12) every capability declares its input and values in. It is what assistant tool inputs are written in, so a declared or derived schema is used as is. `x-unit` names the unit a number is in: `px`, `%`, `°`; `x-space` names the frame it is measured in; `x-rows` and `x-ref` say which lists hold addressable rows and which inputs address them.",
11
+ "description": "The subset of JSON Schema (draft 2020-12) every capability declares its input and values in. It is what assistant tool inputs are written in, so a declared or derived schema is used as is. `x-unit` names the unit a number is in: `px`, `%`, `°`; `x-space` names the frame it is measured in; `x-rows` and `x-ref` say which lists hold addressable rows and which inputs address them; `x-routes` says which pages a navigation query belongs to.",
12
12
  "type": "object",
13
13
  "properties": {
14
14
  "type": {
@@ -155,6 +155,15 @@ export const CONTRACT_SCHEMAS = {
155
155
  },
156
156
  "minItems": 1
157
157
  },
158
+ "x-routes": {
159
+ "description": "On one alternative of the generated `app.navigate` action's `query`: the routes whose page takes that query (`/dashboard/service-lane`). The page declares it (`page-query.json`); the navigation runtime checks a call's query against the alternative of the route it goes to.",
160
+ "type": "array",
161
+ "items": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "minItems": 1
166
+ },
158
167
  "x-enum-omitted": {
159
168
  "description": "How many allowed values a shortened `enum` leaves out. Only in the page state, where a row's options are summarised; a tool's input schema always lists every value.",
160
169
  "type": "number"
@@ -190,17 +199,17 @@ export const CONTRACT_SCHEMAS = {
190
199
  "type": "object",
191
200
  "properties": {
192
201
  "ref": {
193
- "description": "The property of a row that actions address it by (`id`).",
202
+ "description": "The property of a row that actions address it by (`id`), or a dotted path to it (`item.key`).",
194
203
  "type": "string",
195
204
  "minLength": 1
196
205
  },
197
206
  "title": {
198
- "description": "The property of a row a person calls it by (`name`).",
207
+ "description": "The property of a row a person calls it by (`name`), or a dotted path to it (`item.title`).",
199
208
  "type": "string",
200
209
  "minLength": 1
201
210
  },
202
211
  "index": {
203
- "description": "The other properties an index row keeps: the few that tell rows apart (a layer's kind, the artboard it is on).",
212
+ "description": "The other properties an index row keeps, each a property or a dotted path: the few that tell rows apart (a layer's kind, the artboard it is on, the display a fact row belongs to).",
204
213
  "type": "array",
205
214
  "items": {
206
215
  "type": "string"
@@ -578,6 +587,212 @@ export const CONTRACT_SCHEMAS = {
578
587
  }
579
588
  }
580
589
  },
590
+ 'page-query.json': {
591
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
592
+ "$id": "https://schemas.closurestudio.ai/oui/v1/page-query.json",
593
+ "title": "PageQuery",
594
+ "description": "The query parameters a page reads from its address (`?view=declined&period=this_month`), each by name, declared once with `defineQuery` and read with `readQuery` (`@ouispec/bindings`). The generator reads the declaration where the page, a component it renders or an app hook they call reads it, and the generated `app.navigate` takes it, so the assistant opens the page already filtered to a question, in one call. A page that declares none takes its address as before.\n\n**Every value is a build-time constant**, as a binding's are: a literal, a `const` it can follow (an imported option list too), a property of a constant object, or a template literal or `+` over those.",
595
+ "type": "object",
596
+ "propertyNames": {
597
+ "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
598
+ },
599
+ "additionalProperties": {
600
+ "$ref": "#/$defs/QueryParam"
601
+ },
602
+ "minProperties": 1,
603
+ "$defs": {
604
+ "QueryParam": {
605
+ "description": "One query parameter: free text, a number, an on/off flag, a day, or one of a list of values.",
606
+ "oneOf": [
607
+ {
608
+ "$ref": "#/$defs/QueryText"
609
+ },
610
+ {
611
+ "$ref": "#/$defs/QueryNumber"
612
+ },
613
+ {
614
+ "$ref": "#/$defs/QueryFlag"
615
+ },
616
+ {
617
+ "$ref": "#/$defs/QueryDate"
618
+ },
619
+ {
620
+ "$ref": "#/$defs/QueryChoice"
621
+ }
622
+ ]
623
+ },
624
+ "QueryText": {
625
+ "description": "Free text: a name as the page shows it, a search.",
626
+ "type": "object",
627
+ "properties": {
628
+ "type": {
629
+ "const": "string"
630
+ },
631
+ "description": {
632
+ "description": "What the value picks, for someone who cannot see the screen: what to pass and where it comes from.",
633
+ "type": "string",
634
+ "minLength": 1
635
+ },
636
+ "default": {
637
+ "description": "What the page shows when the address leaves it out.",
638
+ "type": "string"
639
+ },
640
+ "maxLength": {
641
+ "type": "integer",
642
+ "minimum": 1
643
+ },
644
+ "multiple": {
645
+ "description": "It takes several values, written comma-separated in the address (`?tags=a,b`). A value cannot hold a comma.",
646
+ "type": "boolean"
647
+ }
648
+ },
649
+ "required": [
650
+ "type",
651
+ "description"
652
+ ],
653
+ "additionalProperties": false
654
+ },
655
+ "QueryNumber": {
656
+ "description": "A number: a page of a list (`integer`, from 1), a minimum score.",
657
+ "type": "object",
658
+ "properties": {
659
+ "type": {
660
+ "enum": [
661
+ "integer",
662
+ "number"
663
+ ]
664
+ },
665
+ "description": {
666
+ "type": "string",
667
+ "minLength": 1
668
+ },
669
+ "default": {
670
+ "type": "number"
671
+ },
672
+ "minimum": {
673
+ "type": "number"
674
+ },
675
+ "maximum": {
676
+ "type": "number"
677
+ },
678
+ "unit": {
679
+ "description": "The unit the number is in (`%`, `days`, `$`), as `x-unit` names it.",
680
+ "type": "string",
681
+ "minLength": 1
682
+ }
683
+ },
684
+ "required": [
685
+ "type",
686
+ "description"
687
+ ],
688
+ "additionalProperties": false
689
+ },
690
+ "QueryFlag": {
691
+ "description": "On or off: `1` in the address is on, `0` or nothing is off (unless its default is on).",
692
+ "type": "object",
693
+ "properties": {
694
+ "type": {
695
+ "const": "boolean"
696
+ },
697
+ "description": {
698
+ "type": "string",
699
+ "minLength": 1
700
+ },
701
+ "default": {
702
+ "type": "boolean"
703
+ }
704
+ },
705
+ "required": [
706
+ "type",
707
+ "description"
708
+ ],
709
+ "additionalProperties": false
710
+ },
711
+ "QueryDate": {
712
+ "description": "A day, `YYYY-MM-DD`.",
713
+ "type": "object",
714
+ "properties": {
715
+ "type": {
716
+ "const": "date"
717
+ },
718
+ "description": {
719
+ "type": "string",
720
+ "minLength": 1
721
+ },
722
+ "default": {
723
+ "description": "`YYYY-MM-DD`.",
724
+ "type": "string",
725
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
726
+ }
727
+ },
728
+ "required": [
729
+ "type",
730
+ "description"
731
+ ],
732
+ "additionalProperties": false
733
+ },
734
+ "QueryChoice": {
735
+ "description": "One of a list of values (a view, a period, a status): the list a select or tabs already show, by value and label.",
736
+ "type": "object",
737
+ "properties": {
738
+ "values": {
739
+ "description": "Every value the page takes, each a string or `{ value, label, description }`: the same option list its control renders.",
740
+ "type": "array",
741
+ "items": {
742
+ "$ref": "#/$defs/QueryValue"
743
+ },
744
+ "minItems": 1
745
+ },
746
+ "description": {
747
+ "type": "string",
748
+ "minLength": 1
749
+ },
750
+ "default": {
751
+ "description": "One of `values`: what the page shows when the address leaves it out.",
752
+ "type": "string"
753
+ },
754
+ "multiple": {
755
+ "description": "It takes several of the values, comma-separated in the address (`?signals=a,b`).",
756
+ "type": "boolean"
757
+ }
758
+ },
759
+ "required": [
760
+ "values",
761
+ "description"
762
+ ],
763
+ "additionalProperties": false
764
+ },
765
+ "QueryValue": {
766
+ "description": "One value of a choice: the value, or the value with what a person calls it and what it means.",
767
+ "anyOf": [
768
+ {
769
+ "type": "string",
770
+ "minLength": 1
771
+ },
772
+ {
773
+ "type": "object",
774
+ "properties": {
775
+ "value": {
776
+ "type": "string",
777
+ "minLength": 1
778
+ },
779
+ "label": {
780
+ "description": "What a person calls it (`Declined work`).",
781
+ "type": "string"
782
+ },
783
+ "description": {
784
+ "description": "What it means, when its label does not say.",
785
+ "type": "string"
786
+ }
787
+ },
788
+ "required": [
789
+ "value"
790
+ ]
791
+ }
792
+ ]
793
+ }
794
+ }
795
+ },
581
796
  'control-kind-registration.json': {
582
797
  "$schema": "https://json-schema.org/draft/2020-12/schema",
583
798
  "$id": "https://schemas.closurestudio.ai/oui/v1/control-kind-registration.json",
@@ -2043,6 +2258,39 @@ export const CONTRACT_SCHEMAS = {
2043
2258
  "navigation"
2044
2259
  ]
2045
2260
  },
2261
+ "ManifestDisplay": {
2262
+ "description": "One display a page shows: what reports its facts under the page state's `shown`.",
2263
+ "type": "object",
2264
+ "properties": {
2265
+ "id": {
2266
+ "description": "Its binding id: the `id` of its entries in `shown`.",
2267
+ "type": "string",
2268
+ "minLength": 1
2269
+ },
2270
+ "title": {
2271
+ "description": "Its heading, as the build reads it.",
2272
+ "type": "string"
2273
+ },
2274
+ "description": {
2275
+ "description": "What it shows, from its binding.",
2276
+ "type": "string"
2277
+ },
2278
+ "labels": {
2279
+ "description": "The labels of its facts the build can read.",
2280
+ "type": "array",
2281
+ "items": {
2282
+ "type": "string"
2283
+ }
2284
+ }
2285
+ },
2286
+ "required": [
2287
+ "id",
2288
+ "title",
2289
+ "description",
2290
+ "labels"
2291
+ ],
2292
+ "additionalProperties": false
2293
+ },
2046
2294
  "ManifestSurface": {
2047
2295
  "description": "One surface: what it offers, where it can be mounted, and what it reports.",
2048
2296
  "type": "object",
@@ -2079,6 +2327,13 @@ export const CONTRACT_SCHEMAS = {
2079
2327
  "items": {
2080
2328
  "$ref": "#/$defs/ManifestObservation"
2081
2329
  }
2330
+ },
2331
+ "displays": {
2332
+ "description": "What a page or shell shows that is not a control (`useAgentFacts`): each display it renders, by binding id, whose facts its state reports under `shown`. Absent when it renders none, and in a manifest generated before 0.10.",
2333
+ "type": "array",
2334
+ "items": {
2335
+ "$ref": "#/$defs/ManifestDisplay"
2336
+ }
2082
2337
  }
2083
2338
  },
2084
2339
  "required": [
@@ -4050,6 +4305,10 @@ export const CONTRACT_SCHEMAS = {
4050
4305
  "description": "What each tool returns, for every scenario; a scenario's own stubs come first.",
4051
4306
  "$ref": "#/$defs/AgentEvalStubs"
4052
4307
  },
4308
+ "page": {
4309
+ "description": "The person's page, scripted, for every scenario: what it offers at each address and what its actions do. Each turn is sent from it, and the agent's page actions are answered by it. A scenario's own `page` replaces it.",
4310
+ "$ref": "#/$defs/AgentEvalPage"
4311
+ },
4053
4312
  "scenarios": {
4054
4313
  "type": "array",
4055
4314
  "items": {
@@ -4106,6 +4365,17 @@ export const CONTRACT_SCHEMAS = {
4106
4365
  "description": "What each tool returns in this scenario, before the suite's stubs.",
4107
4366
  "$ref": "#/$defs/AgentEvalStubs"
4108
4367
  },
4368
+ "page": {
4369
+ "description": "The page this scenario's turns are sent from, in place of the suite's; `false`: no page.",
4370
+ "oneOf": [
4371
+ {
4372
+ "const": false
4373
+ },
4374
+ {
4375
+ "$ref": "#/$defs/AgentEvalPage"
4376
+ }
4377
+ ]
4378
+ },
4109
4379
  "turns": {
4110
4380
  "type": "array",
4111
4381
  "items": {
@@ -4393,6 +4663,32 @@ export const CONTRACT_SCHEMAS = {
4393
4663
  "held": {
4394
4664
  "description": "`true`: the turn ran no model call, because a person held the conversation.",
4395
4665
  "type": "boolean"
4666
+ },
4667
+ "calls": {
4668
+ "description": "How many times each tool, or each of the page's actions, was called in the turn.",
4669
+ "type": "array",
4670
+ "items": {
4671
+ "$ref": "#/$defs/AgentEvalCallCount"
4672
+ }
4673
+ },
4674
+ "usage": {
4675
+ "description": "What the turn's model calls used, as the provider reported it.",
4676
+ "$ref": "#/$defs/AgentEvalUsage"
4677
+ },
4678
+ "choices": {
4679
+ "description": "The turn offered the person choice buttons (`present_options`) that match; `false`: it offered none.",
4680
+ "oneOf": [
4681
+ {
4682
+ "const": false
4683
+ },
4684
+ {
4685
+ "$ref": "#/$defs/AgentEvalChoicesExpectation"
4686
+ }
4687
+ ]
4688
+ },
4689
+ "page": {
4690
+ "description": "What the page did in the turn, read from the page itself.",
4691
+ "$ref": "#/$defs/AgentEvalPageExpectation"
4396
4692
  }
4397
4693
  },
4398
4694
  "additionalProperties": false
@@ -4444,6 +4740,660 @@ export const CONTRACT_SCHEMAS = {
4444
4740
  },
4445
4741
  "minItems": 1
4446
4742
  }
4743
+ },
4744
+ "AgentEvalPage": {
4745
+ "description": "The person's page, scripted. The harness runs it on a real oui-spec surface runtime in index form, sends each turn from where it is (its address and its snapshot, as the person's tab sends them), and answers the agent's page actions (`ui_act`, `ui_describe`, `ui_read`) from it. Its surfaces are declared here, or are the product's own: the controls of its generated manifest, given to the configuration (`page.manifest`), mounted as its tab mounts them.",
4746
+ "type": "object",
4747
+ "properties": {
4748
+ "at": {
4749
+ "description": "The address the first turn is sent from. Each later turn is sent from wherever the page is by then.",
4750
+ "type": "string",
4751
+ "pattern": "^/"
4752
+ },
4753
+ "routes": {
4754
+ "description": "The addresses going to a page accepts, as route patterns (`/leads/:id`), when the manifest declares no navigation surface of its own. Default: every surface's routes, the manifest's pages, and `at`.",
4755
+ "type": "array",
4756
+ "items": {
4757
+ "type": "string",
4758
+ "pattern": "^/"
4759
+ },
4760
+ "uniqueItems": true
4761
+ },
4762
+ "navigation": {
4763
+ "description": "Whether the page offers going to a page by its address (`app.navigate`), as a generated app does: the manifest's navigation surface, or one made from `routes`, run by the bindings as the product's tab runs it. Default: true.",
4764
+ "type": "boolean"
4765
+ },
4766
+ "surfaces": {
4767
+ "description": "Surfaces declared here, each mounted while the page is at one of its routes.",
4768
+ "type": "array",
4769
+ "items": {
4770
+ "$ref": "#/$defs/AgentEvalPageSurface"
4771
+ }
4772
+ },
4773
+ "controls": {
4774
+ "description": "The product's own controls, by binding id in the configuration's manifest: each is mounted while the page is on its surface, with what it shows and what it does.",
4775
+ "type": "object",
4776
+ "additionalProperties": {
4777
+ "$ref": "#/$defs/AgentEvalPageControl"
4778
+ }
4779
+ },
4780
+ "allControls": {
4781
+ "description": "Also mount every other control the manifest declares on a surface that is mounted, with no value, as an empty form shows them. A list's per-row controls are not: no row is rendered. Default: false.",
4782
+ "type": "boolean"
4783
+ },
4784
+ "shown": {
4785
+ "description": "What the product's pages show that is not a control (`useAgentFacts`): each display's facts, one entry per card of a list, registered with the binding registry as the product's displays register them, so the page state reports them under `shown` (indexed by `x-rows`, read further with `ui_read`) exactly as the product's tab does. Each is shown while the page is on its `routes` and its address holds its `query`; with no `routes`, where the manifest records the display, else on every page.",
4786
+ "type": "array",
4787
+ "items": {
4788
+ "$ref": "#/$defs/AgentEvalShown"
4789
+ }
4790
+ },
4791
+ "problems": {
4792
+ "description": "Problems the product's pages show (`useAgentProblems`), registered as the product's page areas register them, so the page reports them in its `problems` observation, or the navigation surface does when no page is open to report them.",
4793
+ "type": "array",
4794
+ "items": {
4795
+ "$ref": "#/$defs/AgentEvalProblems"
4796
+ }
4797
+ }
4798
+ },
4799
+ "required": [
4800
+ "at"
4801
+ ],
4802
+ "additionalProperties": false
4803
+ },
4804
+ "AgentEvalShown": {
4805
+ "description": "One display's facts, in the shape the runtime reports them under the page state's `shown`, and where the page shows them.",
4806
+ "type": "object",
4807
+ "properties": {
4808
+ "id": {
4809
+ "description": "The display's binding id.",
4810
+ "type": "string",
4811
+ "minLength": 1
4812
+ },
4813
+ "title": {
4814
+ "description": "Its heading, as the page shows it. Default: the title the manifest records for the display, else its id.",
4815
+ "type": "string",
4816
+ "minLength": 1
4817
+ },
4818
+ "facts": {
4819
+ "description": "Each fact by its label. Reported as text, as `useAgentFacts` reports it: a number or flag is written out, and an empty one is left out.",
4820
+ "type": "object",
4821
+ "additionalProperties": {
4822
+ "anyOf": [
4823
+ {
4824
+ "type": "string"
4825
+ },
4826
+ {
4827
+ "type": "number"
4828
+ },
4829
+ {
4830
+ "type": "boolean"
4831
+ }
4832
+ ]
4833
+ }
4834
+ },
4835
+ "item": {
4836
+ "description": "The row of a list it describes, when it is one of many (a card each): how the page state's `x-rows` addresses and indexes it.",
4837
+ "$ref": "agent-binding.json#/$defs/AgentItem"
4838
+ },
4839
+ "routes": {
4840
+ "$ref": "#/$defs/AgentEvalShownRoutes"
4841
+ },
4842
+ "query": {
4843
+ "$ref": "#/$defs/AgentEvalShownQuery"
4844
+ }
4845
+ },
4846
+ "required": [
4847
+ "id",
4848
+ "facts"
4849
+ ],
4850
+ "additionalProperties": false
4851
+ },
4852
+ "AgentEvalProblems": {
4853
+ "description": "Problems one area of the page shows, in the shape the runtime reports them, and where the page shows them.",
4854
+ "type": "object",
4855
+ "properties": {
4856
+ "source": {
4857
+ "description": "The binding id of the page area that shows them (`useAgentProblems(source, …)`). Default: `page`.",
4858
+ "type": "string",
4859
+ "minLength": 1
4860
+ },
4861
+ "problems": {
4862
+ "type": "array",
4863
+ "items": {
4864
+ "$ref": "room-catalog-data.json#/$defs/RoomProblem"
4865
+ }
4866
+ },
4867
+ "routes": {
4868
+ "$ref": "#/$defs/AgentEvalShownRoutes"
4869
+ },
4870
+ "query": {
4871
+ "$ref": "#/$defs/AgentEvalShownQuery"
4872
+ }
4873
+ },
4874
+ "required": [
4875
+ "problems"
4876
+ ],
4877
+ "additionalProperties": false
4878
+ },
4879
+ "AgentEvalShownRoutes": {
4880
+ "description": "Where the page shows it, as route patterns.",
4881
+ "type": "array",
4882
+ "items": {
4883
+ "type": "string",
4884
+ "pattern": "^/"
4885
+ },
4886
+ "uniqueItems": true
4887
+ },
4888
+ "AgentEvalShownQuery": {
4889
+ "description": "Shown only while the page's address holds these query parameters, each read as the page's declared query reads it (`readQuery`, its default for one the address leaves out), or as written when the page declares none. A list of several values is written comma-separated.",
4890
+ "type": "object",
4891
+ "additionalProperties": {
4892
+ "anyOf": [
4893
+ {
4894
+ "type": "string"
4895
+ },
4896
+ {
4897
+ "type": "number"
4898
+ },
4899
+ {
4900
+ "type": "boolean"
4901
+ }
4902
+ ]
4903
+ }
4904
+ },
4905
+ "AgentEvalPageSurface": {
4906
+ "description": "A surface of the page: its actions, and what it reports.",
4907
+ "type": "object",
4908
+ "properties": {
4909
+ "id": {
4910
+ "type": "string",
4911
+ "minLength": 1
4912
+ },
4913
+ "name": {
4914
+ "type": "string",
4915
+ "minLength": 1
4916
+ },
4917
+ "description": {
4918
+ "type": "string",
4919
+ "minLength": 1
4920
+ },
4921
+ "routes": {
4922
+ "description": "Where it is mounted, as route patterns. Absent: on every page, as a shell is.",
4923
+ "type": "array",
4924
+ "items": {
4925
+ "type": "string",
4926
+ "pattern": "^/"
4927
+ },
4928
+ "uniqueItems": true
4929
+ },
4930
+ "state": {
4931
+ "description": "What it reports when the page opens, by observation id.",
4932
+ "type": "object",
4933
+ "additionalProperties": true
4934
+ },
4935
+ "shown": {
4936
+ "description": "What it shows that is not an action, as a page's displays report it: its `state` observation's `shown`, declared with `x-rows` as a generated page's is, so a long list keeps an index of its rows and the rest is read with `ui_read`. A `shown` its `state` gives itself, or an action leaves, is reported instead.",
4937
+ "type": "array",
4938
+ "items": {
4939
+ "$ref": "#/$defs/AgentEvalShown"
4940
+ }
4941
+ },
4942
+ "problems": {
4943
+ "description": "The problems it shows: its `problems` observation, as a page's. One its `state` gives, or an action leaves, is reported instead.",
4944
+ "type": "array",
4945
+ "items": {
4946
+ "$ref": "#/$defs/AgentEvalProblems"
4947
+ }
4948
+ },
4949
+ "actions": {
4950
+ "type": "array",
4951
+ "items": {
4952
+ "$ref": "#/$defs/AgentEvalPageAction"
4953
+ }
4954
+ }
4955
+ },
4956
+ "required": [
4957
+ "id",
4958
+ "name",
4959
+ "description",
4960
+ "actions"
4961
+ ],
4962
+ "additionalProperties": false
4963
+ },
4964
+ "AgentEvalPageAction": {
4965
+ "description": "An action of a declared surface, and what it does when it runs.",
4966
+ "type": "object",
4967
+ "properties": {
4968
+ "id": {
4969
+ "description": "As the page's index names it, and `ui_act` takes it.",
4970
+ "type": "string",
4971
+ "minLength": 1
4972
+ },
4973
+ "title": {
4974
+ "type": "string",
4975
+ "minLength": 1
4976
+ },
4977
+ "description": {
4978
+ "type": "string",
4979
+ "minLength": 1
4980
+ },
4981
+ "effect": {
4982
+ "description": "What it changes (oui-spec's effect kinds).",
4983
+ "enum": [
4984
+ "view",
4985
+ "selection",
4986
+ "navigate",
4987
+ "open",
4988
+ "edit",
4989
+ "file",
4990
+ "mutate",
4991
+ "job",
4992
+ "transaction"
4993
+ ]
4994
+ },
4995
+ "confirm": {
4996
+ "description": "It asks the person to approve it first.",
4997
+ "type": "boolean"
4998
+ },
4999
+ "input": {
5000
+ "description": "What it takes, as a JSON Schema. Default: nothing.",
5001
+ "type": "object"
5002
+ },
5003
+ "result": {
5004
+ "description": "What it answers. Default: it succeeds, returning nothing.",
5005
+ "type": "object",
5006
+ "properties": {
5007
+ "success": {
5008
+ "type": "boolean"
5009
+ },
5010
+ "data": {},
5011
+ "error": {
5012
+ "type": "string"
5013
+ }
5014
+ },
5015
+ "required": [
5016
+ "success"
5017
+ ],
5018
+ "additionalProperties": false
5019
+ },
5020
+ "state": {
5021
+ "description": "Its surface's observations once it has run, by observation id: each given replaces the one before.",
5022
+ "type": "object",
5023
+ "additionalProperties": true
5024
+ },
5025
+ "navigate": {
5026
+ "description": "The address the page goes to once it has run.",
5027
+ "type": "string",
5028
+ "pattern": "^/"
5029
+ },
5030
+ "cases": {
5031
+ "description": "What it does for a call whose input holds `when`, the first that matches; a call none matches gets the defaults beside them.",
5032
+ "type": "array",
5033
+ "items": {
5034
+ "type": "object",
5035
+ "properties": {
5036
+ "when": {
5037
+ "description": "A subset of its input; absent: any call.",
5038
+ "type": "object",
5039
+ "additionalProperties": true
5040
+ },
5041
+ "result": {
5042
+ "description": "What it answers. Default: it succeeds, returning nothing.",
5043
+ "type": "object",
5044
+ "properties": {
5045
+ "success": {
5046
+ "type": "boolean"
5047
+ },
5048
+ "data": {},
5049
+ "error": {
5050
+ "type": "string"
5051
+ }
5052
+ },
5053
+ "required": [
5054
+ "success"
5055
+ ],
5056
+ "additionalProperties": false
5057
+ },
5058
+ "state": {
5059
+ "description": "Its surface's observations once it has run, by observation id: each given replaces the one before.",
5060
+ "type": "object",
5061
+ "additionalProperties": true
5062
+ },
5063
+ "navigate": {
5064
+ "description": "The address the page goes to once it has run.",
5065
+ "type": "string",
5066
+ "pattern": "^/"
5067
+ }
5068
+ },
5069
+ "additionalProperties": false
5070
+ },
5071
+ "minItems": 1
5072
+ }
5073
+ },
5074
+ "required": [
5075
+ "id",
5076
+ "description"
5077
+ ],
5078
+ "additionalProperties": false
5079
+ },
5080
+ "AgentEvalPageControl": {
5081
+ "description": "One of the product's controls, as the page shows it, and what it does when it runs (default: it takes the value it is given, and succeeds).",
5082
+ "type": "object",
5083
+ "properties": {
5084
+ "value": {
5085
+ "description": "What it shows when the page opens. A run sets it to the value it was given."
5086
+ },
5087
+ "query": {
5088
+ "description": "The query parameter of the page's address it shows, as a page that reads its filters with `readQuery` and writes them with `writeQuery` does: on a page whose declared query (the manifest's `app.navigate`) takes it, its value is the address's, read as the declaration reads it (its default when the address leaves it out; `value` when there is none), it follows the address whenever the page goes to another, and a run writes the value it is given to the address. Not for a list's control (`rows`).",
5089
+ "type": "string",
5090
+ "minLength": 1
5091
+ },
5092
+ "title": {
5093
+ "description": "What it is called on screen. Default: the manifest's title.",
5094
+ "type": "string",
5095
+ "minLength": 1
5096
+ },
5097
+ "valueSchema": {
5098
+ "description": "Its live value schema (its options, its range), within the manifest's.",
5099
+ "type": "object"
5100
+ },
5101
+ "disabled": {
5102
+ "description": "It cannot be used: it is not offered.",
5103
+ "type": "boolean"
5104
+ },
5105
+ "rows": {
5106
+ "description": "For a list's control: one per row shown.",
5107
+ "type": "array",
5108
+ "items": {
5109
+ "type": "object",
5110
+ "properties": {
5111
+ "key": {
5112
+ "type": "string",
5113
+ "minLength": 1
5114
+ },
5115
+ "title": {
5116
+ "type": "string",
5117
+ "minLength": 1
5118
+ },
5119
+ "description": {
5120
+ "type": "string"
5121
+ },
5122
+ "value": {}
5123
+ },
5124
+ "required": [
5125
+ "key",
5126
+ "title"
5127
+ ],
5128
+ "additionalProperties": false
5129
+ }
5130
+ },
5131
+ "routes": {
5132
+ "description": "Where it is mounted, when not wherever its surface is.",
5133
+ "type": "array",
5134
+ "items": {
5135
+ "type": "string",
5136
+ "pattern": "^/"
5137
+ },
5138
+ "uniqueItems": true
5139
+ },
5140
+ "result": {
5141
+ "description": "What it answers. Default: it succeeds, returning nothing.",
5142
+ "type": "object",
5143
+ "properties": {
5144
+ "success": {
5145
+ "type": "boolean"
5146
+ },
5147
+ "data": {},
5148
+ "error": {
5149
+ "type": "string"
5150
+ }
5151
+ },
5152
+ "required": [
5153
+ "success"
5154
+ ],
5155
+ "additionalProperties": false
5156
+ },
5157
+ "navigate": {
5158
+ "description": "The address the page goes to once it has run.",
5159
+ "type": "string",
5160
+ "pattern": "^/"
5161
+ },
5162
+ "cases": {
5163
+ "description": "What it does for a call whose input holds `when`, the first that matches; a call none matches gets the defaults beside them.",
5164
+ "type": "array",
5165
+ "items": {
5166
+ "type": "object",
5167
+ "properties": {
5168
+ "when": {
5169
+ "description": "A subset of its input; absent: any call.",
5170
+ "type": "object",
5171
+ "additionalProperties": true
5172
+ },
5173
+ "result": {
5174
+ "description": "What it answers. Default: it succeeds, returning nothing.",
5175
+ "type": "object",
5176
+ "properties": {
5177
+ "success": {
5178
+ "type": "boolean"
5179
+ },
5180
+ "data": {},
5181
+ "error": {
5182
+ "type": "string"
5183
+ }
5184
+ },
5185
+ "required": [
5186
+ "success"
5187
+ ],
5188
+ "additionalProperties": false
5189
+ },
5190
+ "navigate": {
5191
+ "description": "The address the page goes to once it has run.",
5192
+ "type": "string",
5193
+ "pattern": "^/"
5194
+ }
5195
+ },
5196
+ "additionalProperties": false
5197
+ },
5198
+ "minItems": 1
5199
+ }
5200
+ },
5201
+ "additionalProperties": false
5202
+ },
5203
+ "AgentEvalBound": {
5204
+ "description": "A number at least `min` and at most `max`.",
5205
+ "type": "object",
5206
+ "properties": {
5207
+ "min": {
5208
+ "type": "number",
5209
+ "minimum": 0
5210
+ },
5211
+ "max": {
5212
+ "type": "number",
5213
+ "minimum": 0
5214
+ }
5215
+ },
5216
+ "minProperties": 1,
5217
+ "additionalProperties": false
5218
+ },
5219
+ "AgentEvalShareBound": {
5220
+ "description": "A share, from 0 to 1, at least `min` and at most `max`.",
5221
+ "type": "object",
5222
+ "properties": {
5223
+ "min": {
5224
+ "type": "number",
5225
+ "minimum": 0,
5226
+ "maximum": 1
5227
+ },
5228
+ "max": {
5229
+ "type": "number",
5230
+ "minimum": 0,
5231
+ "maximum": 1
5232
+ }
5233
+ },
5234
+ "minProperties": 1,
5235
+ "additionalProperties": false
5236
+ },
5237
+ "AgentEvalCallCount": {
5238
+ "description": "The calls of one tool (`tool`), or of one of the page's actions run through `ui_act` (`action`, by its id or the name the page's index gives it), whose arguments (a tool's) or input (an action's) hold `args` as a subset, counted: exactly `times`, or at least `min` and at most `max`. With none of the three: at least once.",
5239
+ "oneOf": [
5240
+ {
5241
+ "type": "object",
5242
+ "properties": {
5243
+ "tool": {
5244
+ "type": "string",
5245
+ "minLength": 1
5246
+ },
5247
+ "args": {
5248
+ "type": "object",
5249
+ "additionalProperties": true
5250
+ },
5251
+ "times": {
5252
+ "type": "integer",
5253
+ "minimum": 0
5254
+ },
5255
+ "min": {
5256
+ "type": "integer",
5257
+ "minimum": 0
5258
+ },
5259
+ "max": {
5260
+ "type": "integer",
5261
+ "minimum": 0
5262
+ }
5263
+ },
5264
+ "required": [
5265
+ "tool"
5266
+ ],
5267
+ "additionalProperties": false
5268
+ },
5269
+ {
5270
+ "type": "object",
5271
+ "properties": {
5272
+ "action": {
5273
+ "type": "string",
5274
+ "minLength": 1
5275
+ },
5276
+ "args": {
5277
+ "type": "object",
5278
+ "additionalProperties": true
5279
+ },
5280
+ "times": {
5281
+ "type": "integer",
5282
+ "minimum": 0
5283
+ },
5284
+ "min": {
5285
+ "type": "integer",
5286
+ "minimum": 0
5287
+ },
5288
+ "max": {
5289
+ "type": "integer",
5290
+ "minimum": 0
5291
+ }
5292
+ },
5293
+ "required": [
5294
+ "action"
5295
+ ],
5296
+ "additionalProperties": false
5297
+ }
5298
+ ]
5299
+ },
5300
+ "AgentEvalUsage": {
5301
+ "description": "Bounds on what the turn's model calls used, as the provider reported it. Every bound given must hold.",
5302
+ "type": "object",
5303
+ "properties": {
5304
+ "modelCalls": {
5305
+ "description": "How many model calls the turn made.",
5306
+ "$ref": "#/$defs/AgentEvalBound"
5307
+ },
5308
+ "firstCallInputTokens": {
5309
+ "description": "The input tokens of the turn's first model call: what the turn costs before it has done anything.",
5310
+ "$ref": "#/$defs/AgentEvalBound"
5311
+ },
5312
+ "callInputTokens": {
5313
+ "description": "The input tokens of every one of the turn's model calls: `max` holds the largest, `min` the smallest.",
5314
+ "$ref": "#/$defs/AgentEvalBound"
5315
+ },
5316
+ "inputTokens": {
5317
+ "description": "The input tokens of all the turn's model calls together.",
5318
+ "$ref": "#/$defs/AgentEvalBound"
5319
+ },
5320
+ "outputTokens": {
5321
+ "description": "The output tokens of all the turn's model calls together.",
5322
+ "$ref": "#/$defs/AgentEvalBound"
5323
+ },
5324
+ "cachedShare": {
5325
+ "description": "The share of the turn's input tokens read from the prompt cache.",
5326
+ "$ref": "#/$defs/AgentEvalShareBound"
5327
+ }
5328
+ },
5329
+ "minProperties": 1,
5330
+ "additionalProperties": false
5331
+ },
5332
+ "AgentEvalChoicesExpectation": {
5333
+ "description": "The choice buttons the turn offered (`present_options`).",
5334
+ "type": "object",
5335
+ "properties": {
5336
+ "options": {
5337
+ "description": "Each matches one option offered: its label, or its label and description.",
5338
+ "type": "array",
5339
+ "items": {
5340
+ "$ref": "#/$defs/AgentEvalTextMatcher"
5341
+ }
5342
+ },
5343
+ "question": {
5344
+ "description": "Each matches what is asked with them: the question, and what it says before it.",
5345
+ "type": "array",
5346
+ "items": {
5347
+ "$ref": "#/$defs/AgentEvalTextMatcher"
5348
+ }
5349
+ },
5350
+ "count": {
5351
+ "description": "How many options were offered.",
5352
+ "$ref": "#/$defs/AgentEvalBound"
5353
+ }
5354
+ },
5355
+ "additionalProperties": false
5356
+ },
5357
+ "AgentEvalPageExpectation": {
5358
+ "description": "What the page did in the turn: where it is, and what ran on it.",
5359
+ "type": "object",
5360
+ "properties": {
5361
+ "at": {
5362
+ "description": "Where the page is after the turn: this path, and each query parameter given with the value given.",
5363
+ "type": "string",
5364
+ "pattern": "^/"
5365
+ },
5366
+ "ran": {
5367
+ "description": "Each ran on the page in the turn (by its id or its index name), its input holding `input` as a subset.",
5368
+ "type": "array",
5369
+ "items": {
5370
+ "type": "object",
5371
+ "properties": {
5372
+ "action": {
5373
+ "type": "string",
5374
+ "minLength": 1
5375
+ },
5376
+ "input": {
5377
+ "type": "object",
5378
+ "additionalProperties": true
5379
+ }
5380
+ },
5381
+ "required": [
5382
+ "action"
5383
+ ],
5384
+ "additionalProperties": false
5385
+ }
5386
+ },
5387
+ "notRan": {
5388
+ "description": "None of these ran on the page in the turn; `*`: nothing did.",
5389
+ "type": "array",
5390
+ "items": {
5391
+ "type": "string",
5392
+ "minLength": 1
5393
+ }
5394
+ }
5395
+ },
5396
+ "additionalProperties": false
4447
5397
  }
4448
5398
  }
4449
5399
  },
@@ -4467,6 +5417,14 @@ export const CONTRACT_TYPES = {
4467
5417
  AgentItem: 'agent-binding.json#/$defs/AgentItem',
4468
5418
  NonAgentBinding: 'agent-binding.json#/$defs/NonAgentBinding',
4469
5419
  AgentProp: 'agent-binding.json#/$defs/AgentProp',
5420
+ PageQuery: 'page-query.json',
5421
+ QueryParam: 'page-query.json#/$defs/QueryParam',
5422
+ QueryText: 'page-query.json#/$defs/QueryText',
5423
+ QueryNumber: 'page-query.json#/$defs/QueryNumber',
5424
+ QueryFlag: 'page-query.json#/$defs/QueryFlag',
5425
+ QueryDate: 'page-query.json#/$defs/QueryDate',
5426
+ QueryChoice: 'page-query.json#/$defs/QueryChoice',
5427
+ QueryValue: 'page-query.json#/$defs/QueryValue',
4470
5428
  ControlKindRegistration: 'control-kind-registration.json',
4471
5429
  ControlKind: 'control-kind-registration.json#/$defs/ControlKind',
4472
5430
  RegisteredControlKind: 'control-kind-registration.json#/$defs/RegisteredControlKind',
@@ -4507,6 +5465,7 @@ export const CONTRACT_TYPES = {
4507
5465
  ManifestAction: 'oui-manifest.json#/$defs/ManifestAction',
4508
5466
  ManifestObservation: 'oui-manifest.json#/$defs/ManifestObservation',
4509
5467
  ManifestSurfaceKind: 'oui-manifest.json#/$defs/ManifestSurfaceKind',
5468
+ ManifestDisplay: 'oui-manifest.json#/$defs/ManifestDisplay',
4510
5469
  ManifestSurface: 'oui-manifest.json#/$defs/ManifestSurface',
4511
5470
  GeneratedKnowledge: 'generated-knowledge.json',
4512
5471
  KnowledgeEntry: 'generated-knowledge.json#/$defs/KnowledgeEntry',
@@ -4578,5 +5537,19 @@ export const CONTRACT_TYPES = {
4578
5537
  AgentEvalExpectationsByChannel: 'agent-evals.json#/$defs/AgentEvalExpectationsByChannel',
4579
5538
  AgentEvalStubCase: 'agent-evals.json#/$defs/AgentEvalStubCase',
4580
5539
  AgentEvalStubs: 'agent-evals.json#/$defs/AgentEvalStubs',
5540
+ AgentEvalPage: 'agent-evals.json#/$defs/AgentEvalPage',
5541
+ AgentEvalShown: 'agent-evals.json#/$defs/AgentEvalShown',
5542
+ AgentEvalProblems: 'agent-evals.json#/$defs/AgentEvalProblems',
5543
+ AgentEvalShownRoutes: 'agent-evals.json#/$defs/AgentEvalShownRoutes',
5544
+ AgentEvalShownQuery: 'agent-evals.json#/$defs/AgentEvalShownQuery',
5545
+ AgentEvalPageSurface: 'agent-evals.json#/$defs/AgentEvalPageSurface',
5546
+ AgentEvalPageAction: 'agent-evals.json#/$defs/AgentEvalPageAction',
5547
+ AgentEvalPageControl: 'agent-evals.json#/$defs/AgentEvalPageControl',
5548
+ AgentEvalBound: 'agent-evals.json#/$defs/AgentEvalBound',
5549
+ AgentEvalShareBound: 'agent-evals.json#/$defs/AgentEvalShareBound',
5550
+ AgentEvalCallCount: 'agent-evals.json#/$defs/AgentEvalCallCount',
5551
+ AgentEvalUsage: 'agent-evals.json#/$defs/AgentEvalUsage',
5552
+ AgentEvalChoicesExpectation: 'agent-evals.json#/$defs/AgentEvalChoicesExpectation',
5553
+ AgentEvalPageExpectation: 'agent-evals.json#/$defs/AgentEvalPageExpectation',
4581
5554
  };
4582
5555
  //# sourceMappingURL=schemas.js.map