@ouispec/contract 0.7.0 → 0.9.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",
@@ -4050,6 +4265,10 @@ export const CONTRACT_SCHEMAS = {
4050
4265
  "description": "What each tool returns, for every scenario; a scenario's own stubs come first.",
4051
4266
  "$ref": "#/$defs/AgentEvalStubs"
4052
4267
  },
4268
+ "page": {
4269
+ "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.",
4270
+ "$ref": "#/$defs/AgentEvalPage"
4271
+ },
4053
4272
  "scenarios": {
4054
4273
  "type": "array",
4055
4274
  "items": {
@@ -4106,6 +4325,17 @@ export const CONTRACT_SCHEMAS = {
4106
4325
  "description": "What each tool returns in this scenario, before the suite's stubs.",
4107
4326
  "$ref": "#/$defs/AgentEvalStubs"
4108
4327
  },
4328
+ "page": {
4329
+ "description": "The page this scenario's turns are sent from, in place of the suite's; `false`: no page.",
4330
+ "oneOf": [
4331
+ {
4332
+ "const": false
4333
+ },
4334
+ {
4335
+ "$ref": "#/$defs/AgentEvalPage"
4336
+ }
4337
+ ]
4338
+ },
4109
4339
  "turns": {
4110
4340
  "type": "array",
4111
4341
  "items": {
@@ -4393,6 +4623,32 @@ export const CONTRACT_SCHEMAS = {
4393
4623
  "held": {
4394
4624
  "description": "`true`: the turn ran no model call, because a person held the conversation.",
4395
4625
  "type": "boolean"
4626
+ },
4627
+ "calls": {
4628
+ "description": "How many times each tool, or each of the page's actions, was called in the turn.",
4629
+ "type": "array",
4630
+ "items": {
4631
+ "$ref": "#/$defs/AgentEvalCallCount"
4632
+ }
4633
+ },
4634
+ "usage": {
4635
+ "description": "What the turn's model calls used, as the provider reported it.",
4636
+ "$ref": "#/$defs/AgentEvalUsage"
4637
+ },
4638
+ "choices": {
4639
+ "description": "The turn offered the person choice buttons (`present_options`) that match; `false`: it offered none.",
4640
+ "oneOf": [
4641
+ {
4642
+ "const": false
4643
+ },
4644
+ {
4645
+ "$ref": "#/$defs/AgentEvalChoicesExpectation"
4646
+ }
4647
+ ]
4648
+ },
4649
+ "page": {
4650
+ "description": "What the page did in the turn, read from the page itself.",
4651
+ "$ref": "#/$defs/AgentEvalPageExpectation"
4396
4652
  }
4397
4653
  },
4398
4654
  "additionalProperties": false
@@ -4444,6 +4700,526 @@ export const CONTRACT_SCHEMAS = {
4444
4700
  },
4445
4701
  "minItems": 1
4446
4702
  }
4703
+ },
4704
+ "AgentEvalPage": {
4705
+ "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.",
4706
+ "type": "object",
4707
+ "properties": {
4708
+ "at": {
4709
+ "description": "The address the first turn is sent from. Each later turn is sent from wherever the page is by then.",
4710
+ "type": "string",
4711
+ "pattern": "^/"
4712
+ },
4713
+ "routes": {
4714
+ "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`.",
4715
+ "type": "array",
4716
+ "items": {
4717
+ "type": "string",
4718
+ "pattern": "^/"
4719
+ },
4720
+ "uniqueItems": true
4721
+ },
4722
+ "navigation": {
4723
+ "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.",
4724
+ "type": "boolean"
4725
+ },
4726
+ "surfaces": {
4727
+ "description": "Surfaces declared here, each mounted while the page is at one of its routes.",
4728
+ "type": "array",
4729
+ "items": {
4730
+ "$ref": "#/$defs/AgentEvalPageSurface"
4731
+ }
4732
+ },
4733
+ "controls": {
4734
+ "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.",
4735
+ "type": "object",
4736
+ "additionalProperties": {
4737
+ "$ref": "#/$defs/AgentEvalPageControl"
4738
+ }
4739
+ },
4740
+ "allControls": {
4741
+ "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.",
4742
+ "type": "boolean"
4743
+ }
4744
+ },
4745
+ "required": [
4746
+ "at"
4747
+ ],
4748
+ "additionalProperties": false
4749
+ },
4750
+ "AgentEvalPageSurface": {
4751
+ "description": "A surface of the page: its actions, and what it reports.",
4752
+ "type": "object",
4753
+ "properties": {
4754
+ "id": {
4755
+ "type": "string",
4756
+ "minLength": 1
4757
+ },
4758
+ "name": {
4759
+ "type": "string",
4760
+ "minLength": 1
4761
+ },
4762
+ "description": {
4763
+ "type": "string",
4764
+ "minLength": 1
4765
+ },
4766
+ "routes": {
4767
+ "description": "Where it is mounted, as route patterns. Absent: on every page, as a shell is.",
4768
+ "type": "array",
4769
+ "items": {
4770
+ "type": "string",
4771
+ "pattern": "^/"
4772
+ },
4773
+ "uniqueItems": true
4774
+ },
4775
+ "state": {
4776
+ "description": "What it reports when the page opens, by observation id.",
4777
+ "type": "object",
4778
+ "additionalProperties": true
4779
+ },
4780
+ "actions": {
4781
+ "type": "array",
4782
+ "items": {
4783
+ "$ref": "#/$defs/AgentEvalPageAction"
4784
+ }
4785
+ }
4786
+ },
4787
+ "required": [
4788
+ "id",
4789
+ "name",
4790
+ "description",
4791
+ "actions"
4792
+ ],
4793
+ "additionalProperties": false
4794
+ },
4795
+ "AgentEvalPageAction": {
4796
+ "description": "An action of a declared surface, and what it does when it runs.",
4797
+ "type": "object",
4798
+ "properties": {
4799
+ "id": {
4800
+ "description": "As the page's index names it, and `ui_act` takes it.",
4801
+ "type": "string",
4802
+ "minLength": 1
4803
+ },
4804
+ "title": {
4805
+ "type": "string",
4806
+ "minLength": 1
4807
+ },
4808
+ "description": {
4809
+ "type": "string",
4810
+ "minLength": 1
4811
+ },
4812
+ "effect": {
4813
+ "description": "What it changes (oui-spec's effect kinds).",
4814
+ "enum": [
4815
+ "view",
4816
+ "selection",
4817
+ "navigate",
4818
+ "open",
4819
+ "edit",
4820
+ "file",
4821
+ "mutate",
4822
+ "job",
4823
+ "transaction"
4824
+ ]
4825
+ },
4826
+ "confirm": {
4827
+ "description": "It asks the person to approve it first.",
4828
+ "type": "boolean"
4829
+ },
4830
+ "input": {
4831
+ "description": "What it takes, as a JSON Schema. Default: nothing.",
4832
+ "type": "object"
4833
+ },
4834
+ "result": {
4835
+ "description": "What it answers. Default: it succeeds, returning nothing.",
4836
+ "type": "object",
4837
+ "properties": {
4838
+ "success": {
4839
+ "type": "boolean"
4840
+ },
4841
+ "data": {},
4842
+ "error": {
4843
+ "type": "string"
4844
+ }
4845
+ },
4846
+ "required": [
4847
+ "success"
4848
+ ],
4849
+ "additionalProperties": false
4850
+ },
4851
+ "state": {
4852
+ "description": "Its surface's observations once it has run, by observation id: each given replaces the one before.",
4853
+ "type": "object",
4854
+ "additionalProperties": true
4855
+ },
4856
+ "navigate": {
4857
+ "description": "The address the page goes to once it has run.",
4858
+ "type": "string",
4859
+ "pattern": "^/"
4860
+ },
4861
+ "cases": {
4862
+ "description": "What it does for a call whose input holds `when`, the first that matches; a call none matches gets the defaults beside them.",
4863
+ "type": "array",
4864
+ "items": {
4865
+ "type": "object",
4866
+ "properties": {
4867
+ "when": {
4868
+ "description": "A subset of its input; absent: any call.",
4869
+ "type": "object",
4870
+ "additionalProperties": true
4871
+ },
4872
+ "result": {
4873
+ "description": "What it answers. Default: it succeeds, returning nothing.",
4874
+ "type": "object",
4875
+ "properties": {
4876
+ "success": {
4877
+ "type": "boolean"
4878
+ },
4879
+ "data": {},
4880
+ "error": {
4881
+ "type": "string"
4882
+ }
4883
+ },
4884
+ "required": [
4885
+ "success"
4886
+ ],
4887
+ "additionalProperties": false
4888
+ },
4889
+ "state": {
4890
+ "description": "Its surface's observations once it has run, by observation id: each given replaces the one before.",
4891
+ "type": "object",
4892
+ "additionalProperties": true
4893
+ },
4894
+ "navigate": {
4895
+ "description": "The address the page goes to once it has run.",
4896
+ "type": "string",
4897
+ "pattern": "^/"
4898
+ }
4899
+ },
4900
+ "additionalProperties": false
4901
+ },
4902
+ "minItems": 1
4903
+ }
4904
+ },
4905
+ "required": [
4906
+ "id",
4907
+ "description"
4908
+ ],
4909
+ "additionalProperties": false
4910
+ },
4911
+ "AgentEvalPageControl": {
4912
+ "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).",
4913
+ "type": "object",
4914
+ "properties": {
4915
+ "value": {
4916
+ "description": "What it shows when the page opens. A run sets it to the value it was given."
4917
+ },
4918
+ "title": {
4919
+ "description": "What it is called on screen. Default: the manifest's title.",
4920
+ "type": "string",
4921
+ "minLength": 1
4922
+ },
4923
+ "valueSchema": {
4924
+ "description": "Its live value schema (its options, its range), within the manifest's.",
4925
+ "type": "object"
4926
+ },
4927
+ "disabled": {
4928
+ "description": "It cannot be used: it is not offered.",
4929
+ "type": "boolean"
4930
+ },
4931
+ "rows": {
4932
+ "description": "For a list's control: one per row shown.",
4933
+ "type": "array",
4934
+ "items": {
4935
+ "type": "object",
4936
+ "properties": {
4937
+ "key": {
4938
+ "type": "string",
4939
+ "minLength": 1
4940
+ },
4941
+ "title": {
4942
+ "type": "string",
4943
+ "minLength": 1
4944
+ },
4945
+ "description": {
4946
+ "type": "string"
4947
+ },
4948
+ "value": {}
4949
+ },
4950
+ "required": [
4951
+ "key",
4952
+ "title"
4953
+ ],
4954
+ "additionalProperties": false
4955
+ }
4956
+ },
4957
+ "routes": {
4958
+ "description": "Where it is mounted, when not wherever its surface is.",
4959
+ "type": "array",
4960
+ "items": {
4961
+ "type": "string",
4962
+ "pattern": "^/"
4963
+ },
4964
+ "uniqueItems": true
4965
+ },
4966
+ "result": {
4967
+ "description": "What it answers. Default: it succeeds, returning nothing.",
4968
+ "type": "object",
4969
+ "properties": {
4970
+ "success": {
4971
+ "type": "boolean"
4972
+ },
4973
+ "data": {},
4974
+ "error": {
4975
+ "type": "string"
4976
+ }
4977
+ },
4978
+ "required": [
4979
+ "success"
4980
+ ],
4981
+ "additionalProperties": false
4982
+ },
4983
+ "navigate": {
4984
+ "description": "The address the page goes to once it has run.",
4985
+ "type": "string",
4986
+ "pattern": "^/"
4987
+ },
4988
+ "cases": {
4989
+ "description": "What it does for a call whose input holds `when`, the first that matches; a call none matches gets the defaults beside them.",
4990
+ "type": "array",
4991
+ "items": {
4992
+ "type": "object",
4993
+ "properties": {
4994
+ "when": {
4995
+ "description": "A subset of its input; absent: any call.",
4996
+ "type": "object",
4997
+ "additionalProperties": true
4998
+ },
4999
+ "result": {
5000
+ "description": "What it answers. Default: it succeeds, returning nothing.",
5001
+ "type": "object",
5002
+ "properties": {
5003
+ "success": {
5004
+ "type": "boolean"
5005
+ },
5006
+ "data": {},
5007
+ "error": {
5008
+ "type": "string"
5009
+ }
5010
+ },
5011
+ "required": [
5012
+ "success"
5013
+ ],
5014
+ "additionalProperties": false
5015
+ },
5016
+ "navigate": {
5017
+ "description": "The address the page goes to once it has run.",
5018
+ "type": "string",
5019
+ "pattern": "^/"
5020
+ }
5021
+ },
5022
+ "additionalProperties": false
5023
+ },
5024
+ "minItems": 1
5025
+ }
5026
+ },
5027
+ "additionalProperties": false
5028
+ },
5029
+ "AgentEvalBound": {
5030
+ "description": "A number at least `min` and at most `max`.",
5031
+ "type": "object",
5032
+ "properties": {
5033
+ "min": {
5034
+ "type": "number",
5035
+ "minimum": 0
5036
+ },
5037
+ "max": {
5038
+ "type": "number",
5039
+ "minimum": 0
5040
+ }
5041
+ },
5042
+ "minProperties": 1,
5043
+ "additionalProperties": false
5044
+ },
5045
+ "AgentEvalShareBound": {
5046
+ "description": "A share, from 0 to 1, at least `min` and at most `max`.",
5047
+ "type": "object",
5048
+ "properties": {
5049
+ "min": {
5050
+ "type": "number",
5051
+ "minimum": 0,
5052
+ "maximum": 1
5053
+ },
5054
+ "max": {
5055
+ "type": "number",
5056
+ "minimum": 0,
5057
+ "maximum": 1
5058
+ }
5059
+ },
5060
+ "minProperties": 1,
5061
+ "additionalProperties": false
5062
+ },
5063
+ "AgentEvalCallCount": {
5064
+ "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.",
5065
+ "oneOf": [
5066
+ {
5067
+ "type": "object",
5068
+ "properties": {
5069
+ "tool": {
5070
+ "type": "string",
5071
+ "minLength": 1
5072
+ },
5073
+ "args": {
5074
+ "type": "object",
5075
+ "additionalProperties": true
5076
+ },
5077
+ "times": {
5078
+ "type": "integer",
5079
+ "minimum": 0
5080
+ },
5081
+ "min": {
5082
+ "type": "integer",
5083
+ "minimum": 0
5084
+ },
5085
+ "max": {
5086
+ "type": "integer",
5087
+ "minimum": 0
5088
+ }
5089
+ },
5090
+ "required": [
5091
+ "tool"
5092
+ ],
5093
+ "additionalProperties": false
5094
+ },
5095
+ {
5096
+ "type": "object",
5097
+ "properties": {
5098
+ "action": {
5099
+ "type": "string",
5100
+ "minLength": 1
5101
+ },
5102
+ "args": {
5103
+ "type": "object",
5104
+ "additionalProperties": true
5105
+ },
5106
+ "times": {
5107
+ "type": "integer",
5108
+ "minimum": 0
5109
+ },
5110
+ "min": {
5111
+ "type": "integer",
5112
+ "minimum": 0
5113
+ },
5114
+ "max": {
5115
+ "type": "integer",
5116
+ "minimum": 0
5117
+ }
5118
+ },
5119
+ "required": [
5120
+ "action"
5121
+ ],
5122
+ "additionalProperties": false
5123
+ }
5124
+ ]
5125
+ },
5126
+ "AgentEvalUsage": {
5127
+ "description": "Bounds on what the turn's model calls used, as the provider reported it. Every bound given must hold.",
5128
+ "type": "object",
5129
+ "properties": {
5130
+ "modelCalls": {
5131
+ "description": "How many model calls the turn made.",
5132
+ "$ref": "#/$defs/AgentEvalBound"
5133
+ },
5134
+ "firstCallInputTokens": {
5135
+ "description": "The input tokens of the turn's first model call: what the turn costs before it has done anything.",
5136
+ "$ref": "#/$defs/AgentEvalBound"
5137
+ },
5138
+ "callInputTokens": {
5139
+ "description": "The input tokens of every one of the turn's model calls: `max` holds the largest, `min` the smallest.",
5140
+ "$ref": "#/$defs/AgentEvalBound"
5141
+ },
5142
+ "inputTokens": {
5143
+ "description": "The input tokens of all the turn's model calls together.",
5144
+ "$ref": "#/$defs/AgentEvalBound"
5145
+ },
5146
+ "outputTokens": {
5147
+ "description": "The output tokens of all the turn's model calls together.",
5148
+ "$ref": "#/$defs/AgentEvalBound"
5149
+ },
5150
+ "cachedShare": {
5151
+ "description": "The share of the turn's input tokens read from the prompt cache.",
5152
+ "$ref": "#/$defs/AgentEvalShareBound"
5153
+ }
5154
+ },
5155
+ "minProperties": 1,
5156
+ "additionalProperties": false
5157
+ },
5158
+ "AgentEvalChoicesExpectation": {
5159
+ "description": "The choice buttons the turn offered (`present_options`).",
5160
+ "type": "object",
5161
+ "properties": {
5162
+ "options": {
5163
+ "description": "Each matches one option offered: its label, or its label and description.",
5164
+ "type": "array",
5165
+ "items": {
5166
+ "$ref": "#/$defs/AgentEvalTextMatcher"
5167
+ }
5168
+ },
5169
+ "question": {
5170
+ "description": "Each matches what is asked with them: the question, and what it says before it.",
5171
+ "type": "array",
5172
+ "items": {
5173
+ "$ref": "#/$defs/AgentEvalTextMatcher"
5174
+ }
5175
+ },
5176
+ "count": {
5177
+ "description": "How many options were offered.",
5178
+ "$ref": "#/$defs/AgentEvalBound"
5179
+ }
5180
+ },
5181
+ "additionalProperties": false
5182
+ },
5183
+ "AgentEvalPageExpectation": {
5184
+ "description": "What the page did in the turn: where it is, and what ran on it.",
5185
+ "type": "object",
5186
+ "properties": {
5187
+ "at": {
5188
+ "description": "Where the page is after the turn: this path, and each query parameter given with the value given.",
5189
+ "type": "string",
5190
+ "pattern": "^/"
5191
+ },
5192
+ "ran": {
5193
+ "description": "Each ran on the page in the turn (by its id or its index name), its input holding `input` as a subset.",
5194
+ "type": "array",
5195
+ "items": {
5196
+ "type": "object",
5197
+ "properties": {
5198
+ "action": {
5199
+ "type": "string",
5200
+ "minLength": 1
5201
+ },
5202
+ "input": {
5203
+ "type": "object",
5204
+ "additionalProperties": true
5205
+ }
5206
+ },
5207
+ "required": [
5208
+ "action"
5209
+ ],
5210
+ "additionalProperties": false
5211
+ }
5212
+ },
5213
+ "notRan": {
5214
+ "description": "None of these ran on the page in the turn; `*`: nothing did.",
5215
+ "type": "array",
5216
+ "items": {
5217
+ "type": "string",
5218
+ "minLength": 1
5219
+ }
5220
+ }
5221
+ },
5222
+ "additionalProperties": false
4447
5223
  }
4448
5224
  }
4449
5225
  },
@@ -4467,6 +5243,14 @@ export const CONTRACT_TYPES = {
4467
5243
  AgentItem: 'agent-binding.json#/$defs/AgentItem',
4468
5244
  NonAgentBinding: 'agent-binding.json#/$defs/NonAgentBinding',
4469
5245
  AgentProp: 'agent-binding.json#/$defs/AgentProp',
5246
+ PageQuery: 'page-query.json',
5247
+ QueryParam: 'page-query.json#/$defs/QueryParam',
5248
+ QueryText: 'page-query.json#/$defs/QueryText',
5249
+ QueryNumber: 'page-query.json#/$defs/QueryNumber',
5250
+ QueryFlag: 'page-query.json#/$defs/QueryFlag',
5251
+ QueryDate: 'page-query.json#/$defs/QueryDate',
5252
+ QueryChoice: 'page-query.json#/$defs/QueryChoice',
5253
+ QueryValue: 'page-query.json#/$defs/QueryValue',
4470
5254
  ControlKindRegistration: 'control-kind-registration.json',
4471
5255
  ControlKind: 'control-kind-registration.json#/$defs/ControlKind',
4472
5256
  RegisteredControlKind: 'control-kind-registration.json#/$defs/RegisteredControlKind',
@@ -4578,5 +5362,15 @@ export const CONTRACT_TYPES = {
4578
5362
  AgentEvalExpectationsByChannel: 'agent-evals.json#/$defs/AgentEvalExpectationsByChannel',
4579
5363
  AgentEvalStubCase: 'agent-evals.json#/$defs/AgentEvalStubCase',
4580
5364
  AgentEvalStubs: 'agent-evals.json#/$defs/AgentEvalStubs',
5365
+ AgentEvalPage: 'agent-evals.json#/$defs/AgentEvalPage',
5366
+ AgentEvalPageSurface: 'agent-evals.json#/$defs/AgentEvalPageSurface',
5367
+ AgentEvalPageAction: 'agent-evals.json#/$defs/AgentEvalPageAction',
5368
+ AgentEvalPageControl: 'agent-evals.json#/$defs/AgentEvalPageControl',
5369
+ AgentEvalBound: 'agent-evals.json#/$defs/AgentEvalBound',
5370
+ AgentEvalShareBound: 'agent-evals.json#/$defs/AgentEvalShareBound',
5371
+ AgentEvalCallCount: 'agent-evals.json#/$defs/AgentEvalCallCount',
5372
+ AgentEvalUsage: 'agent-evals.json#/$defs/AgentEvalUsage',
5373
+ AgentEvalChoicesExpectation: 'agent-evals.json#/$defs/AgentEvalChoicesExpectation',
5374
+ AgentEvalPageExpectation: 'agent-evals.json#/$defs/AgentEvalPageExpectation',
4581
5375
  };
4582
5376
  //# sourceMappingURL=schemas.js.map