@tai42/api-client 31.0.0 → 32.0.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.
@@ -2791,7 +2791,16 @@ export const servedDocumentsJson = {
2791
2791
  "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.",
2792
2792
  "properties": {
2793
2793
  "key_expr": {
2794
- "$ref": "#/$defs/TemplatedText"
2794
+ "$ref": "#/$defs/TemplatedText",
2795
+ "x-tai42-expression": {
2796
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
2797
+ "caveats": [
2798
+ "an empty, blank or non-string result fails the fire loudly"
2799
+ ],
2800
+ "label": "subject key expression",
2801
+ "language": "jq",
2802
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
2803
+ }
2795
2804
  },
2796
2805
  "kind": {
2797
2806
  "title": "Kind",
@@ -3359,7 +3368,16 @@ export const servedDocumentsJson = {
3359
3368
  "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.",
3360
3369
  "properties": {
3361
3370
  "key_expr": {
3362
- "$ref": "#/$defs/TemplatedText"
3371
+ "$ref": "#/$defs/TemplatedText",
3372
+ "x-tai42-expression": {
3373
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
3374
+ "caveats": [
3375
+ "an empty, blank or non-string result fails the fire loudly"
3376
+ ],
3377
+ "label": "subject key expression",
3378
+ "language": "jq",
3379
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
3380
+ }
3363
3381
  },
3364
3382
  "kind": {
3365
3383
  "title": "Kind",
@@ -3960,7 +3978,16 @@ export const servedDocumentsJson = {
3960
3978
  "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.",
3961
3979
  "properties": {
3962
3980
  "key_expr": {
3963
- "$ref": "#/$defs/TemplatedText"
3981
+ "$ref": "#/$defs/TemplatedText",
3982
+ "x-tai42-expression": {
3983
+ "blurb": "the parsed webhook delivery (structured bodies merged top-level with query params; arbitrary text under raw_body)",
3984
+ "caveats": [
3985
+ "an empty, blank or non-string result fails the fire loudly"
3986
+ ],
3987
+ "label": "subject key expression",
3988
+ "language": "jq",
3989
+ "returns": "a non-empty string: the subject key the fire's state reads and writes use"
3990
+ }
3964
3991
  },
3965
3992
  "kind": {
3966
3993
  "title": "Kind",
@@ -4343,7 +4370,28 @@ export const servedDocumentsJson = {
4343
4370
  }
4344
4371
  ],
4345
4372
  "default": null,
4346
- "title": "Input Map"
4373
+ "title": "Input Map",
4374
+ "x-tai42-expression": {
4375
+ "blurb": "the caller's object, validated against the preset's input_schema",
4376
+ "caveats": [
4377
+ "a key both the map result and fixed_kwargs set is refused, unless both values are objects, which merge key by key"
4378
+ ],
4379
+ "label": "input map",
4380
+ "language": "jq",
4381
+ "returns": "an object of the base tool's arguments, merged with fixed_kwargs",
4382
+ "sample": {
4383
+ "query": "status"
4384
+ },
4385
+ "variables": [
4386
+ {
4387
+ "blurb": "the preset's stored fixed_kwargs",
4388
+ "name": "fixed",
4389
+ "sample": {
4390
+ "limit": 10
4391
+ }
4392
+ }
4393
+ ]
4394
+ }
4347
4395
  },
4348
4396
  "input_schema": {
4349
4397
  "anyOf": [
@@ -4374,7 +4422,23 @@ export const servedDocumentsJson = {
4374
4422
  }
4375
4423
  ],
4376
4424
  "default": null,
4377
- "title": "Output Map"
4425
+ "title": "Output Map",
4426
+ "x-tai42-expression": {
4427
+ "blurb": "the base tool's result",
4428
+ "caveats": [
4429
+ "the map never runs over a result that carries a secret"
4430
+ ],
4431
+ "label": "output map",
4432
+ "language": "jq",
4433
+ "returns": "the mapped result, then validated against the preset's output_schema when one is set",
4434
+ "sample": {
4435
+ "items": [
4436
+ {
4437
+ "id": "a"
4438
+ }
4439
+ ]
4440
+ }
4441
+ }
4378
4442
  },
4379
4443
  "output_schema": {
4380
4444
  "anyOf": [
@@ -4792,7 +4856,28 @@ export const servedDocumentsJson = {
4792
4856
  }
4793
4857
  ],
4794
4858
  "default": null,
4795
- "title": "Input Map"
4859
+ "title": "Input Map",
4860
+ "x-tai42-expression": {
4861
+ "blurb": "the caller's object, validated against the preset's input_schema",
4862
+ "caveats": [
4863
+ "a key both the map result and fixed_kwargs set is refused, unless both values are objects, which merge key by key"
4864
+ ],
4865
+ "label": "input map",
4866
+ "language": "jq",
4867
+ "returns": "an object of the base tool's arguments, merged with fixed_kwargs",
4868
+ "sample": {
4869
+ "query": "status"
4870
+ },
4871
+ "variables": [
4872
+ {
4873
+ "blurb": "the preset's stored fixed_kwargs",
4874
+ "name": "fixed",
4875
+ "sample": {
4876
+ "limit": 10
4877
+ }
4878
+ }
4879
+ ]
4880
+ }
4796
4881
  },
4797
4882
  "input_schema": {
4798
4883
  "anyOf": [
@@ -4827,7 +4912,23 @@ export const servedDocumentsJson = {
4827
4912
  }
4828
4913
  ],
4829
4914
  "default": null,
4830
- "title": "Output Map"
4915
+ "title": "Output Map",
4916
+ "x-tai42-expression": {
4917
+ "blurb": "the base tool's result",
4918
+ "caveats": [
4919
+ "the map never runs over a result that carries a secret"
4920
+ ],
4921
+ "label": "output map",
4922
+ "language": "jq",
4923
+ "returns": "the mapped result, then validated against the preset's output_schema when one is set",
4924
+ "sample": {
4925
+ "items": [
4926
+ {
4927
+ "id": "a"
4928
+ }
4929
+ ]
4930
+ }
4931
+ }
4831
4932
  },
4832
4933
  "output_schema": {
4833
4934
  "anyOf": [
@@ -6889,7 +6990,33 @@ export const servedDocumentsJson = {
6889
6990
  "type": "null"
6890
6991
  }
6891
6992
  ],
6892
- "default": null
6993
+ "default": null,
6994
+ "x-tai42-expression": {
6995
+ "blurb": "the declarations (static values) an attachment stores",
6996
+ "caveats": [
6997
+ "any other result rejects the declarations"
6998
+ ],
6999
+ "label": "declarations check",
7000
+ "language": "jq",
7001
+ "returns": "exactly boolean true accepts the declarations; a string result is the rejection message",
7002
+ "sample": {
7003
+ "items": [
7004
+ {
7005
+ "id": "a",
7006
+ "label": "First item"
7007
+ }
7008
+ ]
7009
+ },
7010
+ "variables": [
7011
+ {
7012
+ "blurb": "the attachment's effective parameters",
7013
+ "name": "parameters",
7014
+ "sample": {
7015
+ "limit": 3
7016
+ }
7017
+ }
7018
+ ]
7019
+ }
6893
7020
  },
6894
7021
  "schema": {
6895
7022
  "additionalProperties": true,
@@ -6913,7 +7040,59 @@ export const servedDocumentsJson = {
6913
7040
  "type": "string"
6914
7041
  },
6915
7042
  "jq": {
6916
- "$ref": "#/$defs/TemplatedText"
7043
+ "$ref": "#/$defs/TemplatedText",
7044
+ "x-tai42-expression": {
7045
+ "blurb": "the record's attached subtree",
7046
+ "caveats": [
7047
+ "the template's input programs are callable as prelude functions named tjq_<name>"
7048
+ ],
7049
+ "label": "template jq program",
7050
+ "language": "jq",
7051
+ "returns": "for purpose input, the served value; for purpose update, a batch (list) of template-relative ops",
7052
+ "sample": {
7053
+ "items": {
7054
+ "a": {
7055
+ "done": false
7056
+ }
7057
+ }
7058
+ },
7059
+ "variables": [
7060
+ {
7061
+ "blurb": "the attachment's effective parameters",
7062
+ "name": "parameters",
7063
+ "sample": {
7064
+ "limit": 3
7065
+ }
7066
+ },
7067
+ {
7068
+ "blurb": "the attachment's declarations",
7069
+ "name": "declarations",
7070
+ "sample": {
7071
+ "items": [
7072
+ {
7073
+ "id": "a",
7074
+ "label": "First item"
7075
+ }
7076
+ ]
7077
+ }
7078
+ },
7079
+ {
7080
+ "blurb": "an input program's declared params object (bound only for purpose input)",
7081
+ "name": "params",
7082
+ "sample": {
7083
+ "id": "a"
7084
+ }
7085
+ },
7086
+ {
7087
+ "blurb": "an update program's input (bound only for purpose update)",
7088
+ "name": "input",
7089
+ "sample": {
7090
+ "done": true,
7091
+ "id": "a"
7092
+ }
7093
+ }
7094
+ ]
7095
+ }
6917
7096
  },
6918
7097
  "params": {
6919
7098
  "default": [],
@@ -6985,13 +7164,77 @@ export const servedDocumentsJson = {
6985
7164
  "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``).",
6986
7165
  "properties": {
6987
7166
  "close": {
6988
- "$ref": "#/$defs/TemplatedText"
7167
+ "$ref": "#/$defs/TemplatedText",
7168
+ "x-tai42-expression": {
7169
+ "blurb": "the orphan's record subtree",
7170
+ "label": "close program",
7171
+ "language": "jq",
7172
+ "returns": "a batch (list) of template-relative ops that closes the orphan",
7173
+ "sample": {
7174
+ "done": false
7175
+ },
7176
+ "variables": [
7177
+ {
7178
+ "blurb": "the orphaned item's id",
7179
+ "name": "id",
7180
+ "sample": "a"
7181
+ },
7182
+ {
7183
+ "blurb": "the not-done resolution the close names",
7184
+ "name": "resolution",
7185
+ "sample": "dropped"
7186
+ }
7187
+ ]
7188
+ }
6989
7189
  },
6990
7190
  "orphans": {
6991
- "$ref": "#/$defs/TemplatedText"
7191
+ "$ref": "#/$defs/TemplatedText",
7192
+ "x-tai42-expression": {
7193
+ "blurb": "an open record's attached subtree",
7194
+ "label": "orphans program",
7195
+ "language": "jq",
7196
+ "returns": "a list of {id, label} objects naming the items the subtree orphans against the new declarations",
7197
+ "sample": {
7198
+ "items": {
7199
+ "a": {
7200
+ "done": false
7201
+ }
7202
+ }
7203
+ },
7204
+ "variables": [
7205
+ {
7206
+ "blurb": "the declarations before the edit",
7207
+ "name": "previous",
7208
+ "sample": {
7209
+ "items": [
7210
+ {
7211
+ "id": "a",
7212
+ "label": "First item"
7213
+ }
7214
+ ]
7215
+ }
7216
+ },
7217
+ {
7218
+ "blurb": "the declarations after the edit",
7219
+ "name": "new",
7220
+ "sample": {
7221
+ "items": []
7222
+ }
7223
+ }
7224
+ ]
7225
+ }
6992
7226
  },
6993
7227
  "resolutions": {
6994
- "$ref": "#/$defs/TemplatedText"
7228
+ "$ref": "#/$defs/TemplatedText",
7229
+ "x-tai42-expression": {
7230
+ "blurb": "the new declarations",
7231
+ "label": "resolutions program",
7232
+ "language": "jq",
7233
+ "returns": "a list of the not-done resolution names a close may name",
7234
+ "sample": {
7235
+ "items": []
7236
+ }
7237
+ }
6995
7238
  }
6996
7239
  },
6997
7240
  "required": [