@tai42/api-client 30.0.1 → 31.1.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.
@@ -2699,7 +2699,16 @@ export const servedDocumentsJson = {
2699
2699
  "description": "The optional state subject a hook fire targets.\n\nCarries the conversation-target scope ``(target_kind, target_name)``, the subject ``kind`` (matching\n:data:`~tai42_contract.states.SUBJECT_KIND_RE`), and a ``key_expr`` — a templated text\ncarrying (inline or by stored id) a jq program evaluated over the event payload at\nfire — it must yield a non-empty string, else the fire fails loudly like any hook\nerror. Frozen; deposited as the ambient state context so a state write during the fire\nis keyed and attributed to the hook.",
2700
2700
  "properties": {
2701
2701
  "key_expr": {
2702
- "$ref": "#/$defs/TemplatedText"
2702
+ "$ref": "#/$defs/TemplatedText",
2703
+ "x-tai42-expression": {
2704
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
2705
+ "caveats": [
2706
+ "an empty, blank or non-string result fails the fire loudly"
2707
+ ],
2708
+ "label": "subject key expression",
2709
+ "language": "jq",
2710
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
2711
+ }
2703
2712
  },
2704
2713
  "kind": {
2705
2714
  "title": "Kind",
@@ -3267,7 +3276,16 @@ export const servedDocumentsJson = {
3267
3276
  "description": "The optional state subject a hook fire targets.\n\nCarries the conversation-target scope ``(target_kind, target_name)``, the subject ``kind`` (matching\n:data:`~tai42_contract.states.SUBJECT_KIND_RE`), and a ``key_expr`` — a templated text\ncarrying (inline or by stored id) a jq program evaluated over the event payload at\nfire — it must yield a non-empty string, else the fire fails loudly like any hook\nerror. Frozen; deposited as the ambient state context so a state write during the fire\nis keyed and attributed to the hook.",
3268
3277
  "properties": {
3269
3278
  "key_expr": {
3270
- "$ref": "#/$defs/TemplatedText"
3279
+ "$ref": "#/$defs/TemplatedText",
3280
+ "x-tai42-expression": {
3281
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
3282
+ "caveats": [
3283
+ "an empty, blank or non-string result fails the fire loudly"
3284
+ ],
3285
+ "label": "subject key expression",
3286
+ "language": "jq",
3287
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
3288
+ }
3271
3289
  },
3272
3290
  "kind": {
3273
3291
  "title": "Kind",
@@ -3868,7 +3886,16 @@ export const servedDocumentsJson = {
3868
3886
  "description": "The optional state subject a hook fire targets.\n\nCarries the conversation-target scope ``(target_kind, target_name)``, the subject ``kind`` (matching\n:data:`~tai42_contract.states.SUBJECT_KIND_RE`), and a ``key_expr`` — a templated text\ncarrying (inline or by stored id) a jq program evaluated over the event payload at\nfire — it must yield a non-empty string, else the fire fails loudly like any hook\nerror. Frozen; deposited as the ambient state context so a state write during the fire\nis keyed and attributed to the hook.",
3869
3887
  "properties": {
3870
3888
  "key_expr": {
3871
- "$ref": "#/$defs/TemplatedText"
3889
+ "$ref": "#/$defs/TemplatedText",
3890
+ "x-tai42-expression": {
3891
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
3892
+ "caveats": [
3893
+ "an empty, blank or non-string result fails the fire loudly"
3894
+ ],
3895
+ "label": "subject key expression",
3896
+ "language": "jq",
3897
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
3898
+ }
3872
3899
  },
3873
3900
  "kind": {
3874
3901
  "title": "Kind",
@@ -4251,7 +4278,28 @@ export const servedDocumentsJson = {
4251
4278
  }
4252
4279
  ],
4253
4280
  "default": null,
4254
- "title": "Input Map"
4281
+ "title": "Input Map",
4282
+ "x-tai42-expression": {
4283
+ "blurb": "the caller's object, validated against the preset's input_schema",
4284
+ "caveats": [
4285
+ "a key both the map result and fixed_kwargs set is refused, unless both values are objects, which merge key by key"
4286
+ ],
4287
+ "label": "input map",
4288
+ "language": "jq",
4289
+ "returns": "an object of the base tool's arguments, merged with fixed_kwargs",
4290
+ "sample": {
4291
+ "query": "status"
4292
+ },
4293
+ "variables": [
4294
+ {
4295
+ "blurb": "the preset's stored fixed_kwargs",
4296
+ "name": "fixed",
4297
+ "sample": {
4298
+ "limit": 10
4299
+ }
4300
+ }
4301
+ ]
4302
+ }
4255
4303
  },
4256
4304
  "input_schema": {
4257
4305
  "anyOf": [
@@ -4282,7 +4330,23 @@ export const servedDocumentsJson = {
4282
4330
  }
4283
4331
  ],
4284
4332
  "default": null,
4285
- "title": "Output Map"
4333
+ "title": "Output Map",
4334
+ "x-tai42-expression": {
4335
+ "blurb": "the base tool's result",
4336
+ "caveats": [
4337
+ "the map never runs over a result that carries a secret"
4338
+ ],
4339
+ "label": "output map",
4340
+ "language": "jq",
4341
+ "returns": "the mapped result, then validated against the preset's output_schema when one is set",
4342
+ "sample": {
4343
+ "items": [
4344
+ {
4345
+ "id": "a"
4346
+ }
4347
+ ]
4348
+ }
4349
+ }
4286
4350
  },
4287
4351
  "output_schema": {
4288
4352
  "anyOf": [
@@ -4700,7 +4764,28 @@ export const servedDocumentsJson = {
4700
4764
  }
4701
4765
  ],
4702
4766
  "default": null,
4703
- "title": "Input Map"
4767
+ "title": "Input Map",
4768
+ "x-tai42-expression": {
4769
+ "blurb": "the caller's object, validated against the preset's input_schema",
4770
+ "caveats": [
4771
+ "a key both the map result and fixed_kwargs set is refused, unless both values are objects, which merge key by key"
4772
+ ],
4773
+ "label": "input map",
4774
+ "language": "jq",
4775
+ "returns": "an object of the base tool's arguments, merged with fixed_kwargs",
4776
+ "sample": {
4777
+ "query": "status"
4778
+ },
4779
+ "variables": [
4780
+ {
4781
+ "blurb": "the preset's stored fixed_kwargs",
4782
+ "name": "fixed",
4783
+ "sample": {
4784
+ "limit": 10
4785
+ }
4786
+ }
4787
+ ]
4788
+ }
4704
4789
  },
4705
4790
  "input_schema": {
4706
4791
  "anyOf": [
@@ -4735,7 +4820,23 @@ export const servedDocumentsJson = {
4735
4820
  }
4736
4821
  ],
4737
4822
  "default": null,
4738
- "title": "Output Map"
4823
+ "title": "Output Map",
4824
+ "x-tai42-expression": {
4825
+ "blurb": "the base tool's result",
4826
+ "caveats": [
4827
+ "the map never runs over a result that carries a secret"
4828
+ ],
4829
+ "label": "output map",
4830
+ "language": "jq",
4831
+ "returns": "the mapped result, then validated against the preset's output_schema when one is set",
4832
+ "sample": {
4833
+ "items": [
4834
+ {
4835
+ "id": "a"
4836
+ }
4837
+ ]
4838
+ }
4839
+ }
4739
4840
  },
4740
4841
  "output_schema": {
4741
4842
  "anyOf": [
@@ -6797,7 +6898,33 @@ export const servedDocumentsJson = {
6797
6898
  "type": "null"
6798
6899
  }
6799
6900
  ],
6800
- "default": null
6901
+ "default": null,
6902
+ "x-tai42-expression": {
6903
+ "blurb": "the declarations (static values) an attachment stores",
6904
+ "caveats": [
6905
+ "any other result rejects the declarations"
6906
+ ],
6907
+ "label": "declarations check",
6908
+ "language": "jq",
6909
+ "returns": "exactly boolean true accepts the declarations; a string result is the rejection message",
6910
+ "sample": {
6911
+ "items": [
6912
+ {
6913
+ "id": "a",
6914
+ "label": "First item"
6915
+ }
6916
+ ]
6917
+ },
6918
+ "variables": [
6919
+ {
6920
+ "blurb": "the attachment's effective parameters",
6921
+ "name": "parameters",
6922
+ "sample": {
6923
+ "limit": 3
6924
+ }
6925
+ }
6926
+ ]
6927
+ }
6801
6928
  },
6802
6929
  "schema": {
6803
6930
  "additionalProperties": true,
@@ -6821,7 +6948,59 @@ export const servedDocumentsJson = {
6821
6948
  "type": "string"
6822
6949
  },
6823
6950
  "jq": {
6824
- "$ref": "#/$defs/TemplatedText"
6951
+ "$ref": "#/$defs/TemplatedText",
6952
+ "x-tai42-expression": {
6953
+ "blurb": "the record's attached subtree",
6954
+ "caveats": [
6955
+ "the template's input programs are callable as prelude functions named tjq_<name>"
6956
+ ],
6957
+ "label": "template jq program",
6958
+ "language": "jq",
6959
+ "returns": "for purpose input, the served value; for purpose update, a batch (list) of template-relative ops",
6960
+ "sample": {
6961
+ "items": {
6962
+ "a": {
6963
+ "done": false
6964
+ }
6965
+ }
6966
+ },
6967
+ "variables": [
6968
+ {
6969
+ "blurb": "the attachment's effective parameters",
6970
+ "name": "parameters",
6971
+ "sample": {
6972
+ "limit": 3
6973
+ }
6974
+ },
6975
+ {
6976
+ "blurb": "the attachment's declarations",
6977
+ "name": "declarations",
6978
+ "sample": {
6979
+ "items": [
6980
+ {
6981
+ "id": "a",
6982
+ "label": "First item"
6983
+ }
6984
+ ]
6985
+ }
6986
+ },
6987
+ {
6988
+ "blurb": "an input program's declared params object (bound only for purpose input)",
6989
+ "name": "params",
6990
+ "sample": {
6991
+ "id": "a"
6992
+ }
6993
+ },
6994
+ {
6995
+ "blurb": "an update program's input (bound only for purpose update)",
6996
+ "name": "input",
6997
+ "sample": {
6998
+ "done": true,
6999
+ "id": "a"
7000
+ }
7001
+ }
7002
+ ]
7003
+ }
6825
7004
  },
6826
7005
  "params": {
6827
7006
  "default": [],
@@ -6893,13 +7072,77 @@ export const servedDocumentsJson = {
6893
7072
  "description": "The ``reconcile`` section of a state-template document.\n\nThree jq programs the store runs to settle a state's OPEN records on a declarations edit —\n``orphans`` names the items a record subtree orphans against the new declarations,\n``resolutions`` names the not-done resolutions a close may name, and ``close`` returns the op\nbatch that closes one orphan. Each is a :class:`~tai42_contract.template.TemplatedText` (inline\n``content`` or a stored ``id``).",
6894
7073
  "properties": {
6895
7074
  "close": {
6896
- "$ref": "#/$defs/TemplatedText"
7075
+ "$ref": "#/$defs/TemplatedText",
7076
+ "x-tai42-expression": {
7077
+ "blurb": "the orphan's record subtree",
7078
+ "label": "close program",
7079
+ "language": "jq",
7080
+ "returns": "a batch (list) of template-relative ops that closes the orphan",
7081
+ "sample": {
7082
+ "done": false
7083
+ },
7084
+ "variables": [
7085
+ {
7086
+ "blurb": "the orphaned item's id",
7087
+ "name": "id",
7088
+ "sample": "a"
7089
+ },
7090
+ {
7091
+ "blurb": "the not-done resolution the close names",
7092
+ "name": "resolution",
7093
+ "sample": "dropped"
7094
+ }
7095
+ ]
7096
+ }
6897
7097
  },
6898
7098
  "orphans": {
6899
- "$ref": "#/$defs/TemplatedText"
7099
+ "$ref": "#/$defs/TemplatedText",
7100
+ "x-tai42-expression": {
7101
+ "blurb": "an open record's attached subtree",
7102
+ "label": "orphans program",
7103
+ "language": "jq",
7104
+ "returns": "a list of {id, label} objects naming the items the subtree orphans against the new declarations",
7105
+ "sample": {
7106
+ "items": {
7107
+ "a": {
7108
+ "done": false
7109
+ }
7110
+ }
7111
+ },
7112
+ "variables": [
7113
+ {
7114
+ "blurb": "the declarations before the edit",
7115
+ "name": "previous",
7116
+ "sample": {
7117
+ "items": [
7118
+ {
7119
+ "id": "a",
7120
+ "label": "First item"
7121
+ }
7122
+ ]
7123
+ }
7124
+ },
7125
+ {
7126
+ "blurb": "the declarations after the edit",
7127
+ "name": "new",
7128
+ "sample": {
7129
+ "items": []
7130
+ }
7131
+ }
7132
+ ]
7133
+ }
6900
7134
  },
6901
7135
  "resolutions": {
6902
- "$ref": "#/$defs/TemplatedText"
7136
+ "$ref": "#/$defs/TemplatedText",
7137
+ "x-tai42-expression": {
7138
+ "blurb": "the new declarations",
7139
+ "label": "resolutions program",
7140
+ "language": "jq",
7141
+ "returns": "a list of the not-done resolution names a close may name",
7142
+ "sample": {
7143
+ "items": []
7144
+ }
7145
+ }
6903
7146
  }
6904
7147
  },
6905
7148
  "required": [