@proteos/sdk 0.75.0 → 0.77.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.
- package/dist/{chunk-3VQQEJV6.js → chunk-C5642XOH.js} +12 -4
- package/dist/chunk-C5642XOH.js.map +1 -0
- package/dist/{chunk-C4CH6CEY.cjs → chunk-Z773P4RO.cjs} +13 -3
- package/dist/chunk-Z773P4RO.cjs.map +1 -0
- package/dist/index.cjs +130 -122
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +2 -2
- package/dist/meta/index.cjs +102 -94
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-Dp-AB2QZ.d.cts → types-Bn5y5wHZ.d.cts} +206 -23
- package/dist/{types-Dp-AB2QZ.d.ts → types-Bn5y5wHZ.d.ts} +206 -23
- package/package.json +3 -3
- package/src/conversation/types.ts +8 -6
- package/src/index.ts +3 -0
- package/src/meta/index.ts +3 -0
- package/src/meta/types.ts +52 -5
- package/dist/chunk-3VQQEJV6.js.map +0 -1
- package/dist/chunk-C4CH6CEY.cjs.map +0 -1
|
@@ -3809,11 +3809,40 @@ interface SortConfig {
|
|
|
3809
3809
|
* persisted before `kind` existed).
|
|
3810
3810
|
*/
|
|
3811
3811
|
type PageActionKind = 'action' | 'workflow' | 'agent' | 'intent' | 'link';
|
|
3812
|
-
/** What a `kind: intent` button
|
|
3813
|
-
|
|
3812
|
+
/** What a `kind: intent` button has the model prepare — a record proposal
|
|
3813
|
+
* (`*_record`) or an action's / workflow's inputs (`invoke_*`). */
|
|
3814
|
+
type PageActionIntent = 'create_record' | 'update_record' | 'upsert_record' | 'invoke_action' | 'invoke_workflow';
|
|
3815
|
+
/** Most candidates an `upsert_record` button hands the model. */
|
|
3816
|
+
declare const PAGE_ACTION_MATCH_MAX_LIMIT = 25;
|
|
3817
|
+
/**
|
|
3818
|
+
* The list query an `upsert_record` button finds its candidate records with —
|
|
3819
|
+
* a page of `entity` records, fetched when the button is pressed. `filter`
|
|
3820
|
+
* has the list endpoint's `_filter` shape; every element's `value` is a
|
|
3821
|
+
* Liquid template, and a value that renders empty yields NO candidates (never
|
|
3822
|
+
* a wider query). `sort` is `field:asc|desc`; `limit` defaults to 10.
|
|
3823
|
+
*/
|
|
3824
|
+
interface PageActionMatch {
|
|
3825
|
+
filter?: FilterGroup;
|
|
3826
|
+
sort?: string;
|
|
3827
|
+
limit?: number;
|
|
3828
|
+
}
|
|
3829
|
+
declare const PageActionMatchSchema: z.ZodObject<{
|
|
3830
|
+
filter: z.ZodOptional<z.ZodType<FilterGroup, z.ZodTypeDef, FilterGroup>>;
|
|
3831
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
3832
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
3833
|
+
}, "strip", z.ZodTypeAny, {
|
|
3834
|
+
sort?: string | undefined;
|
|
3835
|
+
filter?: FilterGroup | undefined;
|
|
3836
|
+
limit?: number | undefined;
|
|
3837
|
+
}, {
|
|
3838
|
+
sort?: string | undefined;
|
|
3839
|
+
filter?: FilterGroup | undefined;
|
|
3840
|
+
limit?: number | undefined;
|
|
3841
|
+
}>;
|
|
3814
3842
|
/**
|
|
3815
3843
|
* One action button — a page's or a list's toolbar button, or a conversation
|
|
3816
|
-
* type's
|
|
3844
|
+
* type's action (the strip in the call or meeting surface's footer, during
|
|
3845
|
+
* and after the conversation).
|
|
3817
3846
|
* Which target it invokes follows from `kind`:
|
|
3818
3847
|
*
|
|
3819
3848
|
* - `action` → `action` (slug) + `params`
|
|
@@ -3821,10 +3850,18 @@ type PageActionIntent = 'create_record' | 'update_record';
|
|
|
3821
3850
|
* - `agent` → `agent` (key) + `prompt` + `context`: opens an Ava chat with
|
|
3822
3851
|
* that agent; `prompt` becomes the visible first message (the label when
|
|
3823
3852
|
* empty), `context` is handed to the model alongside it and never shown.
|
|
3824
|
-
* - `intent` → `intent` + `entity` (+ `record`) + `prompt` + `context`:
|
|
3853
|
+
* - `intent` → `intent` + `entity` (+ `record` | `match`) + `prompt` + `context`:
|
|
3825
3854
|
* prepares a record proposal (one model call), shows it as an editable
|
|
3826
3855
|
* review and saves only what the person confirms. `update_record` targets
|
|
3827
3856
|
* `record` when set, else the surface's linked record of `entity`.
|
|
3857
|
+
* `upsert_record` hands the model the records `match` finds and lets it
|
|
3858
|
+
* change one of them or prepare a new record — `prompt` says how to choose.
|
|
3859
|
+
* `field_scope` (any intent) lists the attributes the proposal may fill,
|
|
3860
|
+
* replacing the app's bound create / edit page.
|
|
3861
|
+
* `invoke_action` / `invoke_workflow` open the invoke dialog of `action` /
|
|
3862
|
+
* `workflow` with the model's values in the fields `params` / `inputs`
|
|
3863
|
+
* (Liquid, locked) left open — always reviewed, never run unseen; on a
|
|
3864
|
+
* call surface it opens as a workspace tab instead of a modal.
|
|
3828
3865
|
* - `link` → `url`: opens the rendered address in a new browser tab
|
|
3829
3866
|
* (http, https, mailto and tel only). Renders synchronously on the press,
|
|
3830
3867
|
* so `| summarize` renders '' there.
|
|
@@ -3853,6 +3890,12 @@ interface PageAction {
|
|
|
3853
3890
|
intent?: PageActionIntent;
|
|
3854
3891
|
entity?: string;
|
|
3855
3892
|
record?: string;
|
|
3893
|
+
/** `upsert_record` only: how the candidate records are found. */
|
|
3894
|
+
match?: PageActionMatch;
|
|
3895
|
+
/** Intent only: the attribute names the proposal may fill (plain names).
|
|
3896
|
+
* Replaces the app's bound create / edit page as the scope; required
|
|
3897
|
+
* attributes without a default are always added. */
|
|
3898
|
+
field_scope?: string[];
|
|
3856
3899
|
url?: string;
|
|
3857
3900
|
params?: Record<string, string>;
|
|
3858
3901
|
inputs?: Record<string, string>;
|
|
@@ -3870,9 +3913,23 @@ declare const PageActionSchema: z.ZodObject<{
|
|
|
3870
3913
|
action: z.ZodOptional<z.ZodString>;
|
|
3871
3914
|
workflow: z.ZodOptional<z.ZodString>;
|
|
3872
3915
|
agent: z.ZodOptional<z.ZodString>;
|
|
3873
|
-
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record"]>>;
|
|
3916
|
+
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record", "upsert_record", "invoke_action", "invoke_workflow"]>>;
|
|
3874
3917
|
entity: z.ZodOptional<z.ZodString>;
|
|
3875
3918
|
record: z.ZodOptional<z.ZodString>;
|
|
3919
|
+
match: z.ZodOptional<z.ZodObject<{
|
|
3920
|
+
filter: z.ZodOptional<z.ZodType<FilterGroup, z.ZodTypeDef, FilterGroup>>;
|
|
3921
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
3922
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
3923
|
+
}, "strip", z.ZodTypeAny, {
|
|
3924
|
+
sort?: string | undefined;
|
|
3925
|
+
filter?: FilterGroup | undefined;
|
|
3926
|
+
limit?: number | undefined;
|
|
3927
|
+
}, {
|
|
3928
|
+
sort?: string | undefined;
|
|
3929
|
+
filter?: FilterGroup | undefined;
|
|
3930
|
+
limit?: number | undefined;
|
|
3931
|
+
}>>;
|
|
3932
|
+
field_scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3876
3933
|
url: z.ZodOptional<z.ZodString>;
|
|
3877
3934
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3878
3935
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -3893,9 +3950,15 @@ declare const PageActionSchema: z.ZodObject<{
|
|
|
3893
3950
|
skip_confirmation?: boolean | undefined;
|
|
3894
3951
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
3895
3952
|
action?: string | undefined;
|
|
3896
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
3953
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
3897
3954
|
entity?: string | undefined;
|
|
3898
3955
|
record?: string | undefined;
|
|
3956
|
+
match?: {
|
|
3957
|
+
sort?: string | undefined;
|
|
3958
|
+
filter?: FilterGroup | undefined;
|
|
3959
|
+
limit?: number | undefined;
|
|
3960
|
+
} | undefined;
|
|
3961
|
+
field_scope?: string[] | undefined;
|
|
3899
3962
|
url?: string | undefined;
|
|
3900
3963
|
prompt?: string | undefined;
|
|
3901
3964
|
context?: string | undefined;
|
|
@@ -3911,9 +3974,15 @@ declare const PageActionSchema: z.ZodObject<{
|
|
|
3911
3974
|
skip_confirmation?: boolean | undefined;
|
|
3912
3975
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
3913
3976
|
action?: string | undefined;
|
|
3914
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
3977
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
3915
3978
|
entity?: string | undefined;
|
|
3916
3979
|
record?: string | undefined;
|
|
3980
|
+
match?: {
|
|
3981
|
+
sort?: string | undefined;
|
|
3982
|
+
filter?: FilterGroup | undefined;
|
|
3983
|
+
limit?: number | undefined;
|
|
3984
|
+
} | undefined;
|
|
3985
|
+
field_scope?: string[] | undefined;
|
|
3917
3986
|
url?: string | undefined;
|
|
3918
3987
|
prompt?: string | undefined;
|
|
3919
3988
|
context?: string | undefined;
|
|
@@ -4028,9 +4097,23 @@ declare const ListSchema: z.ZodObject<{
|
|
|
4028
4097
|
action: z.ZodOptional<z.ZodString>;
|
|
4029
4098
|
workflow: z.ZodOptional<z.ZodString>;
|
|
4030
4099
|
agent: z.ZodOptional<z.ZodString>;
|
|
4031
|
-
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record"]>>;
|
|
4100
|
+
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record", "upsert_record", "invoke_action", "invoke_workflow"]>>;
|
|
4032
4101
|
entity: z.ZodOptional<z.ZodString>;
|
|
4033
4102
|
record: z.ZodOptional<z.ZodString>;
|
|
4103
|
+
match: z.ZodOptional<z.ZodObject<{
|
|
4104
|
+
filter: z.ZodOptional<z.ZodType<FilterGroup, z.ZodTypeDef, FilterGroup>>;
|
|
4105
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
4106
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4107
|
+
}, "strip", z.ZodTypeAny, {
|
|
4108
|
+
sort?: string | undefined;
|
|
4109
|
+
filter?: FilterGroup | undefined;
|
|
4110
|
+
limit?: number | undefined;
|
|
4111
|
+
}, {
|
|
4112
|
+
sort?: string | undefined;
|
|
4113
|
+
filter?: FilterGroup | undefined;
|
|
4114
|
+
limit?: number | undefined;
|
|
4115
|
+
}>>;
|
|
4116
|
+
field_scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4034
4117
|
url: z.ZodOptional<z.ZodString>;
|
|
4035
4118
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4036
4119
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -4051,9 +4134,15 @@ declare const ListSchema: z.ZodObject<{
|
|
|
4051
4134
|
skip_confirmation?: boolean | undefined;
|
|
4052
4135
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4053
4136
|
action?: string | undefined;
|
|
4054
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4137
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4055
4138
|
entity?: string | undefined;
|
|
4056
4139
|
record?: string | undefined;
|
|
4140
|
+
match?: {
|
|
4141
|
+
sort?: string | undefined;
|
|
4142
|
+
filter?: FilterGroup | undefined;
|
|
4143
|
+
limit?: number | undefined;
|
|
4144
|
+
} | undefined;
|
|
4145
|
+
field_scope?: string[] | undefined;
|
|
4057
4146
|
url?: string | undefined;
|
|
4058
4147
|
prompt?: string | undefined;
|
|
4059
4148
|
context?: string | undefined;
|
|
@@ -4069,9 +4158,15 @@ declare const ListSchema: z.ZodObject<{
|
|
|
4069
4158
|
skip_confirmation?: boolean | undefined;
|
|
4070
4159
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4071
4160
|
action?: string | undefined;
|
|
4072
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4161
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4073
4162
|
entity?: string | undefined;
|
|
4074
4163
|
record?: string | undefined;
|
|
4164
|
+
match?: {
|
|
4165
|
+
sort?: string | undefined;
|
|
4166
|
+
filter?: FilterGroup | undefined;
|
|
4167
|
+
limit?: number | undefined;
|
|
4168
|
+
} | undefined;
|
|
4169
|
+
field_scope?: string[] | undefined;
|
|
4075
4170
|
url?: string | undefined;
|
|
4076
4171
|
prompt?: string | undefined;
|
|
4077
4172
|
context?: string | undefined;
|
|
@@ -4126,9 +4221,15 @@ declare const ListSchema: z.ZodObject<{
|
|
|
4126
4221
|
skip_confirmation?: boolean | undefined;
|
|
4127
4222
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4128
4223
|
action?: string | undefined;
|
|
4129
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4224
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4130
4225
|
entity?: string | undefined;
|
|
4131
4226
|
record?: string | undefined;
|
|
4227
|
+
match?: {
|
|
4228
|
+
sort?: string | undefined;
|
|
4229
|
+
filter?: FilterGroup | undefined;
|
|
4230
|
+
limit?: number | undefined;
|
|
4231
|
+
} | undefined;
|
|
4232
|
+
field_scope?: string[] | undefined;
|
|
4132
4233
|
url?: string | undefined;
|
|
4133
4234
|
prompt?: string | undefined;
|
|
4134
4235
|
context?: string | undefined;
|
|
@@ -4172,9 +4273,15 @@ declare const ListSchema: z.ZodObject<{
|
|
|
4172
4273
|
skip_confirmation?: boolean | undefined;
|
|
4173
4274
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4174
4275
|
action?: string | undefined;
|
|
4175
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4276
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4176
4277
|
entity?: string | undefined;
|
|
4177
4278
|
record?: string | undefined;
|
|
4279
|
+
match?: {
|
|
4280
|
+
sort?: string | undefined;
|
|
4281
|
+
filter?: FilterGroup | undefined;
|
|
4282
|
+
limit?: number | undefined;
|
|
4283
|
+
} | undefined;
|
|
4284
|
+
field_scope?: string[] | undefined;
|
|
4178
4285
|
url?: string | undefined;
|
|
4179
4286
|
prompt?: string | undefined;
|
|
4180
4287
|
context?: string | undefined;
|
|
@@ -4479,9 +4586,23 @@ declare const PageSchema: z.ZodObject<{
|
|
|
4479
4586
|
action: z.ZodOptional<z.ZodString>;
|
|
4480
4587
|
workflow: z.ZodOptional<z.ZodString>;
|
|
4481
4588
|
agent: z.ZodOptional<z.ZodString>;
|
|
4482
|
-
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record"]>>;
|
|
4589
|
+
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record", "upsert_record", "invoke_action", "invoke_workflow"]>>;
|
|
4483
4590
|
entity: z.ZodOptional<z.ZodString>;
|
|
4484
4591
|
record: z.ZodOptional<z.ZodString>;
|
|
4592
|
+
match: z.ZodOptional<z.ZodObject<{
|
|
4593
|
+
filter: z.ZodOptional<z.ZodType<FilterGroup, z.ZodTypeDef, FilterGroup>>;
|
|
4594
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
4595
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4596
|
+
}, "strip", z.ZodTypeAny, {
|
|
4597
|
+
sort?: string | undefined;
|
|
4598
|
+
filter?: FilterGroup | undefined;
|
|
4599
|
+
limit?: number | undefined;
|
|
4600
|
+
}, {
|
|
4601
|
+
sort?: string | undefined;
|
|
4602
|
+
filter?: FilterGroup | undefined;
|
|
4603
|
+
limit?: number | undefined;
|
|
4604
|
+
}>>;
|
|
4605
|
+
field_scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4485
4606
|
url: z.ZodOptional<z.ZodString>;
|
|
4486
4607
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4487
4608
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -4502,9 +4623,15 @@ declare const PageSchema: z.ZodObject<{
|
|
|
4502
4623
|
skip_confirmation?: boolean | undefined;
|
|
4503
4624
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4504
4625
|
action?: string | undefined;
|
|
4505
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4626
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4506
4627
|
entity?: string | undefined;
|
|
4507
4628
|
record?: string | undefined;
|
|
4629
|
+
match?: {
|
|
4630
|
+
sort?: string | undefined;
|
|
4631
|
+
filter?: FilterGroup | undefined;
|
|
4632
|
+
limit?: number | undefined;
|
|
4633
|
+
} | undefined;
|
|
4634
|
+
field_scope?: string[] | undefined;
|
|
4508
4635
|
url?: string | undefined;
|
|
4509
4636
|
prompt?: string | undefined;
|
|
4510
4637
|
context?: string | undefined;
|
|
@@ -4520,9 +4647,15 @@ declare const PageSchema: z.ZodObject<{
|
|
|
4520
4647
|
skip_confirmation?: boolean | undefined;
|
|
4521
4648
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4522
4649
|
action?: string | undefined;
|
|
4523
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4650
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4524
4651
|
entity?: string | undefined;
|
|
4525
4652
|
record?: string | undefined;
|
|
4653
|
+
match?: {
|
|
4654
|
+
sort?: string | undefined;
|
|
4655
|
+
filter?: FilterGroup | undefined;
|
|
4656
|
+
limit?: number | undefined;
|
|
4657
|
+
} | undefined;
|
|
4658
|
+
field_scope?: string[] | undefined;
|
|
4526
4659
|
url?: string | undefined;
|
|
4527
4660
|
prompt?: string | undefined;
|
|
4528
4661
|
context?: string | undefined;
|
|
@@ -4620,9 +4753,15 @@ declare const PageSchema: z.ZodObject<{
|
|
|
4620
4753
|
skip_confirmation?: boolean | undefined;
|
|
4621
4754
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4622
4755
|
action?: string | undefined;
|
|
4623
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4756
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4624
4757
|
entity?: string | undefined;
|
|
4625
4758
|
record?: string | undefined;
|
|
4759
|
+
match?: {
|
|
4760
|
+
sort?: string | undefined;
|
|
4761
|
+
filter?: FilterGroup | undefined;
|
|
4762
|
+
limit?: number | undefined;
|
|
4763
|
+
} | undefined;
|
|
4764
|
+
field_scope?: string[] | undefined;
|
|
4626
4765
|
url?: string | undefined;
|
|
4627
4766
|
prompt?: string | undefined;
|
|
4628
4767
|
context?: string | undefined;
|
|
@@ -4673,9 +4812,15 @@ declare const PageSchema: z.ZodObject<{
|
|
|
4673
4812
|
skip_confirmation?: boolean | undefined;
|
|
4674
4813
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
4675
4814
|
action?: string | undefined;
|
|
4676
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
4815
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
4677
4816
|
entity?: string | undefined;
|
|
4678
4817
|
record?: string | undefined;
|
|
4818
|
+
match?: {
|
|
4819
|
+
sort?: string | undefined;
|
|
4820
|
+
filter?: FilterGroup | undefined;
|
|
4821
|
+
limit?: number | undefined;
|
|
4822
|
+
} | undefined;
|
|
4823
|
+
field_scope?: string[] | undefined;
|
|
4679
4824
|
url?: string | undefined;
|
|
4680
4825
|
prompt?: string | undefined;
|
|
4681
4826
|
context?: string | undefined;
|
|
@@ -5661,9 +5806,23 @@ declare const ListExtensionSchema: z.ZodObject<{
|
|
|
5661
5806
|
action: z.ZodOptional<z.ZodString>;
|
|
5662
5807
|
workflow: z.ZodOptional<z.ZodString>;
|
|
5663
5808
|
agent: z.ZodOptional<z.ZodString>;
|
|
5664
|
-
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record"]>>;
|
|
5809
|
+
intent: z.ZodOptional<z.ZodEnum<["create_record", "update_record", "upsert_record", "invoke_action", "invoke_workflow"]>>;
|
|
5665
5810
|
entity: z.ZodOptional<z.ZodString>;
|
|
5666
5811
|
record: z.ZodOptional<z.ZodString>;
|
|
5812
|
+
match: z.ZodOptional<z.ZodObject<{
|
|
5813
|
+
filter: z.ZodOptional<z.ZodType<FilterGroup, z.ZodTypeDef, FilterGroup>>;
|
|
5814
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
5815
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
5816
|
+
}, "strip", z.ZodTypeAny, {
|
|
5817
|
+
sort?: string | undefined;
|
|
5818
|
+
filter?: FilterGroup | undefined;
|
|
5819
|
+
limit?: number | undefined;
|
|
5820
|
+
}, {
|
|
5821
|
+
sort?: string | undefined;
|
|
5822
|
+
filter?: FilterGroup | undefined;
|
|
5823
|
+
limit?: number | undefined;
|
|
5824
|
+
}>>;
|
|
5825
|
+
field_scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5667
5826
|
url: z.ZodOptional<z.ZodString>;
|
|
5668
5827
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5669
5828
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -5684,9 +5843,15 @@ declare const ListExtensionSchema: z.ZodObject<{
|
|
|
5684
5843
|
skip_confirmation?: boolean | undefined;
|
|
5685
5844
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
5686
5845
|
action?: string | undefined;
|
|
5687
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
5846
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
5688
5847
|
entity?: string | undefined;
|
|
5689
5848
|
record?: string | undefined;
|
|
5849
|
+
match?: {
|
|
5850
|
+
sort?: string | undefined;
|
|
5851
|
+
filter?: FilterGroup | undefined;
|
|
5852
|
+
limit?: number | undefined;
|
|
5853
|
+
} | undefined;
|
|
5854
|
+
field_scope?: string[] | undefined;
|
|
5690
5855
|
url?: string | undefined;
|
|
5691
5856
|
prompt?: string | undefined;
|
|
5692
5857
|
context?: string | undefined;
|
|
@@ -5702,9 +5867,15 @@ declare const ListExtensionSchema: z.ZodObject<{
|
|
|
5702
5867
|
skip_confirmation?: boolean | undefined;
|
|
5703
5868
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
5704
5869
|
action?: string | undefined;
|
|
5705
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
5870
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
5706
5871
|
entity?: string | undefined;
|
|
5707
5872
|
record?: string | undefined;
|
|
5873
|
+
match?: {
|
|
5874
|
+
sort?: string | undefined;
|
|
5875
|
+
filter?: FilterGroup | undefined;
|
|
5876
|
+
limit?: number | undefined;
|
|
5877
|
+
} | undefined;
|
|
5878
|
+
field_scope?: string[] | undefined;
|
|
5708
5879
|
url?: string | undefined;
|
|
5709
5880
|
prompt?: string | undefined;
|
|
5710
5881
|
context?: string | undefined;
|
|
@@ -5747,9 +5918,15 @@ declare const ListExtensionSchema: z.ZodObject<{
|
|
|
5747
5918
|
skip_confirmation?: boolean | undefined;
|
|
5748
5919
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
5749
5920
|
action?: string | undefined;
|
|
5750
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
5921
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
5751
5922
|
entity?: string | undefined;
|
|
5752
5923
|
record?: string | undefined;
|
|
5924
|
+
match?: {
|
|
5925
|
+
sort?: string | undefined;
|
|
5926
|
+
filter?: FilterGroup | undefined;
|
|
5927
|
+
limit?: number | undefined;
|
|
5928
|
+
} | undefined;
|
|
5929
|
+
field_scope?: string[] | undefined;
|
|
5753
5930
|
url?: string | undefined;
|
|
5754
5931
|
prompt?: string | undefined;
|
|
5755
5932
|
context?: string | undefined;
|
|
@@ -5793,9 +5970,15 @@ declare const ListExtensionSchema: z.ZodObject<{
|
|
|
5793
5970
|
skip_confirmation?: boolean | undefined;
|
|
5794
5971
|
kind?: "agent" | "workflow" | "action" | "intent" | "link" | undefined;
|
|
5795
5972
|
action?: string | undefined;
|
|
5796
|
-
intent?: "create_record" | "update_record" | undefined;
|
|
5973
|
+
intent?: "create_record" | "update_record" | "upsert_record" | "invoke_action" | "invoke_workflow" | undefined;
|
|
5797
5974
|
entity?: string | undefined;
|
|
5798
5975
|
record?: string | undefined;
|
|
5976
|
+
match?: {
|
|
5977
|
+
sort?: string | undefined;
|
|
5978
|
+
filter?: FilterGroup | undefined;
|
|
5979
|
+
limit?: number | undefined;
|
|
5980
|
+
} | undefined;
|
|
5981
|
+
field_scope?: string[] | undefined;
|
|
5799
5982
|
url?: string | undefined;
|
|
5800
5983
|
prompt?: string | undefined;
|
|
5801
5984
|
context?: string | undefined;
|
|
@@ -6378,4 +6561,4 @@ declare function isCurrentUserDefault(value: unknown): value is CurrentUserDefau
|
|
|
6378
6561
|
/** Only the identity-valued attribute types can carry the sentinel. */
|
|
6379
6562
|
declare function acceptsCurrentUserDefault(type: AttributeType): boolean;
|
|
6380
6563
|
|
|
6381
|
-
export { type CreateVariableRequest as $, type AuditFields as A, type Component as B, CURRENT_USER as C, ComponentSchema as D, type ComponentService as E, type FileRef as F, type ContactAddressAttributeKind as G, type ContactAddressAttributeMeta as H, ContactAddressAttributeMetaSchema as I, type ContactBindingDuplicatePolicy as J, type CreateAppConfigurationRequest as K, type ListOptions as L, type CreateAppRequest as M, type CreateComponentRequest as N, type CreateDesignReferenceRequest as O, PageIterator as P, type CreateEntityExtensionRequest as Q, type ResponseMeta as R, type CreateEntityRequest as S, type CreateListExtensionRequest as T, type UserRef as U, type CreateListRequest as V, type CreateListViewRequest as W, type CreateMenuConfigurationExtensionRequest as X, type CreateMenuConfigurationRequest as Y, type CreatePageExtensionRequest as Z, type CreatePageRequest as _, type Attribute as a, type MenuConfiguration as a$, type CurrencyAttributeMeta as a0, CurrencyAttributeMetaSchema as a1, type CurrencySymbolSide as a2, type CurrencyValue as a3, type CurrentUserDefault as a4, DEFAULT_OPTIONS as a5, DEFAULT_PAGE_SIZE as a6, DONE as a7, type DeployModuleRequest as a8, type DesignReference as a9, type ListAppsOptions as aA, type ListComponentsOptions as aB, type ListDesignReferencesOptions as aC, type ListEntitiesOptions as aD, type ListEntityExtensionsOptions as aE, type ListExtension as aF, type ListExtensionColumnPlacement as aG, ListExtensionColumnPlacementSchema as aH, ListExtensionSchema as aI, type ListExtensionService as aJ, type ListFn as aK, type ListListExtensionsOptions as aL, type ListListViewsOptions as aM, type ListListsOptions as aN, type ListMenuConfigurationExtensionsOptions as aO, type ListMenuConfigurationsOptions as aP, type ListModulesOptions as aQ, type ListPageExtensionsOptions as aR, type ListPagesOptions as aS, ListSchema as aT, type ListService as aU, type ListVariablesOptions as aV, type ListView as aW, ListViewSchema as aX, type ListViewService as aY, type LogicalOperator as aZ, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS as a_, type DesignReferenceContent as aa, DesignReferenceSchema as ab, type DesignReferenceService as ac, type Done as ad, type Entity as ae, type EntityContactBinding as af, EntityContactBindingSchema as ag, type EntityExtension as ah, EntityExtensionSchema as ai, type EntityExtensionService as aj, EntitySchema as ak, type EntityService as al, type EntityWithSchema as am, EntityWithSchemaSchema as an, type EnumAttributeMeta as ao, type EnumValue as ap, type ExtensionPosition as aq, ExtensionPositionSchema as ar, type FileAttributeMeta as as, FileRefSchema as at, type FilterElement as au, FilterElementSchema as av, type FilterGroup as aw, FilterGroupSchema as ax, type List as ay, type ListAppConfigurationsOptions as az, type ListResult as b, type
|
|
6564
|
+
export { type CreateVariableRequest as $, type AuditFields as A, type Component as B, CURRENT_USER as C, ComponentSchema as D, type ComponentService as E, type FileRef as F, type ContactAddressAttributeKind as G, type ContactAddressAttributeMeta as H, ContactAddressAttributeMetaSchema as I, type ContactBindingDuplicatePolicy as J, type CreateAppConfigurationRequest as K, type ListOptions as L, type CreateAppRequest as M, type CreateComponentRequest as N, type CreateDesignReferenceRequest as O, PageIterator as P, type CreateEntityExtensionRequest as Q, type ResponseMeta as R, type CreateEntityRequest as S, type CreateListExtensionRequest as T, type UserRef as U, type CreateListRequest as V, type CreateListViewRequest as W, type CreateMenuConfigurationExtensionRequest as X, type CreateMenuConfigurationRequest as Y, type CreatePageExtensionRequest as Z, type CreatePageRequest as _, type Attribute as a, type MenuConfiguration as a$, type CurrencyAttributeMeta as a0, CurrencyAttributeMetaSchema as a1, type CurrencySymbolSide as a2, type CurrencyValue as a3, type CurrentUserDefault as a4, DEFAULT_OPTIONS as a5, DEFAULT_PAGE_SIZE as a6, DONE as a7, type DeployModuleRequest as a8, type DesignReference as a9, type ListAppsOptions as aA, type ListComponentsOptions as aB, type ListDesignReferencesOptions as aC, type ListEntitiesOptions as aD, type ListEntityExtensionsOptions as aE, type ListExtension as aF, type ListExtensionColumnPlacement as aG, ListExtensionColumnPlacementSchema as aH, ListExtensionSchema as aI, type ListExtensionService as aJ, type ListFn as aK, type ListListExtensionsOptions as aL, type ListListViewsOptions as aM, type ListListsOptions as aN, type ListMenuConfigurationExtensionsOptions as aO, type ListMenuConfigurationsOptions as aP, type ListModulesOptions as aQ, type ListPageExtensionsOptions as aR, type ListPagesOptions as aS, ListSchema as aT, type ListService as aU, type ListVariablesOptions as aV, type ListView as aW, ListViewSchema as aX, type ListViewService as aY, type LogicalOperator as aZ, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS as a_, type DesignReferenceContent as aa, DesignReferenceSchema as ab, type DesignReferenceService as ac, type Done as ad, type Entity as ae, type EntityContactBinding as af, EntityContactBindingSchema as ag, type EntityExtension as ah, EntityExtensionSchema as ai, type EntityExtensionService as aj, EntitySchema as ak, type EntityService as al, type EntityWithSchema as am, EntityWithSchemaSchema as an, type EnumAttributeMeta as ao, type EnumValue as ap, type ExtensionPosition as aq, ExtensionPositionSchema as ar, type FileAttributeMeta as as, FileRefSchema as at, type FilterElement as au, FilterElementSchema as av, type FilterGroup as aw, FilterGroupSchema as ax, type List as ay, type ListAppConfigurationsOptions as az, type ListResult as b, type UpdateEntityExtensionRequest as b$, type MenuConfigurationExtension as b0, type MenuConfigurationExtensionPlacement as b1, MenuConfigurationExtensionPlacementSchema as b2, type MenuConfigurationExtensionPosition as b3, MenuConfigurationExtensionPositionSchema as b4, MenuConfigurationExtensionSchema as b5, type MenuConfigurationExtensionService as b6, MenuConfigurationSchema as b7, type MenuConfigurationService as b8, type MenuItem as b9, type PageLayout as bA, PageLayoutSchema as bB, type PageMode as bC, PageSchema as bD, type PageService as bE, type PageType as bF, type PublicPageComponent as bG, type PublicPageResponse as bH, type RecordPageBinding as bI, RecordPageBindingSchema as bJ, type RelationAttributeMeta as bK, RelationAttributeMetaSchema as bL, type RequestOptions as bM, type ResolvedClientOptions as bN, ResponseMetaSchema as bO, type SortConfig as bP, SortConfigSchema as bQ, type SortDirection as bR, type Timestamps as bS, type TokenProvider as bT, type TriggerPageBinding as bU, TriggerPageBindingSchema as bV, type TriggerPhase as bW, type UpdateAppConfigurationRequest as bX, type UpdateAppRequest as bY, type UpdateComponentRequest as bZ, type UpdateDesignReferenceRequest as b_, MenuItemSchema as ba, MenuItemType as bb, MetaClient as bc, type MetaListOptions as bd, type Module as be, ModuleSchema as bf, type ModuleService as bg, type ModuleStatus as bh, type OnDeleteAction as bi, OnDeleteActionSchema as bj, PAGE_ACTION_MATCH_MAX_LIMIT as bk, PAGE_EXTENSION_ANCHOR_MAIN as bl, PAGE_EXTENSION_ANCHOR_SIDE_PANEL as bm, PLATFORM_ATTRIBUTE_NAMES as bn, PLATFORM_USER_ID as bo, type Page as bp, type PageActionIntent as bq, type PageActionKind as br, type PageActionMatch as bs, PageActionMatchSchema as bt, PageActionSchema as bu, type PageExtension as bv, type PageExtensionPlacement as bw, PageExtensionPlacementSchema as bx, PageExtensionSchema as by, type PageExtensionService as bz, ProteosClient as c, type LengthValue as c$, type UpdateEntityRequest as c0, type UpdateListExtensionRequest as c1, type UpdateListRequest as c2, type UpdateListViewRequest as c3, type UpdateMenuConfigurationExtensionRequest as c4, type UpdateMenuConfigurationRequest as c5, type UpdatePageExtensionRequest as c6, type UpdatePageRequest as c7, type UpdateVariableRequest as c8, UserRefSchema as c9, type AttributeMeta as cA, BUILT_IN_CONTROLS as cB, type BuiltInControlSlug as cC, CALENDAR_MAX_OVERLAY_USERS as cD, CALENDAR_VIEW_KINDS as cE, type CalendarElement as cF, type CalendarViewKind as cG, type CardElement as cH, type ColumnElement as cI, type CommonProps as cJ, type ComponentElement as cK, type ControlBucket as cL, type DatetimeAttributeMeta as cM, type DatetimeFormat as cN, type DividerElement as cO, type FieldElement as cP, FileAttributeMetaSchema as cQ, type LayoutAlign as cR, type LayoutElement as cS, LayoutElementSchema as cT, LayoutElementType as cU, type LayoutGap as cV, type LayoutJustify as cW, type LayoutStep as cX, LayoutStepSchema as cY, type LayoutTab as cZ, LayoutTabSchema as c_, type UserType as ca, type Variable as cb, VariableSchema as cc, type VariableService as cd, acceptsCurrentUserDefault as ce, allCurrencyCodes as cf, bundleVersionOf as cg, createIterator as ch, createListResultSchema as ci, currencyLabel as cj, currencySymbol as ck, currencySymbolSide as cl, formatAmount as cm, formatMoney as cn, isCurrentUser as co, isCurrentUserDefault as cp, isPlatformAttributeName as cq, localeNumberSeparators as cr, parseAmount as cs, parseContactAddressMeta as ct, parseCurrencyMeta as cu, parseFileMeta as cv, parseRelationMeta as cw, platformAttributes as cx, resolveOptions as cy, type AttributeForLookup as cz, type PrincipalRef as d, LengthValueSchema as d0, type ListElement as d1, type NumberAttributeMeta as d2, type ObjectAttributeMeta as d3, PAGE_BACKGROUND_COLOR_RE as d4, PAGE_BACKGROUND_TOKENS as d5, PAGE_HEADERS as d6, type PageBackgroundToken as d7, type PageHeader as d8, type PageLayoutSidePanel as d9, UserAttributeMetaSchema as dA, type WorkflowTriggerElement as dB, isBuiltInControl as dC, isLengthValue as dD, isPageBackground as dE, isReservedAttributeName as dF, isStyleSizeValue as dG, isTitleQueryable as dH, lookupCompatibleControls as dI, lookupControls as dJ, lookupPrimaryControl as dK, parsePrincipalMeta as dL, parseUserMeta as dM, titleTemplateVariables as dN, PageLayoutSidePanelSchema as da, type PageStyle as db, PageStyleSchema as dc, type PrincipalAttributeMeta as dd, type PrincipalType as de, RECORD_TITLE_FIELD as df, type RecordFilterElement as dg, type RelatedListElement as dh, type RelatedRecordElement as di, type ResponsiveSizing as dj, type RowElement as dk, type SchedulingPickerElement as dl, type SectionElement as dm, type SizeValue as dn, SizeValueSchema as dp, type SizingProps as dq, type StepperElement as dr, type StringAttributeMeta as ds, type StringFormat as dt, type StyleSizeValue as du, StyleSizeValueSchema as dv, type TabsElement as dw, type TextElement as dx, type TextVariant as dy, type UserAttributeMeta as dz, type PageAction as e, type PublicAccessOperation as f, type App as g, type AppConfiguration as h, AppConfigurationSchema as i, type AppConfigurationService as j, type AppHome as k, AppHomeSchema as l, type AppHomeType as m, AppSchema as n, type AppService as o, type ArrayAttributeMeta as p, type AttributeAccessRule as q, type AttributeRestrictions as r, AttributeSchema as s, type AttributeType as t, AuditFieldsSchema as u, CURRENT_USER_DEFAULT as v, type ClientOptions as w, type Column as x, ColumnSchema as y, type ComparisonOperator as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteos/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "TypeScript SDK for the Proteos platform",
|
|
6
6
|
"repository": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"tsup": "^8.3.0",
|
|
67
67
|
"typescript": "^5.7.0",
|
|
68
68
|
"vitest": "^3.0.0",
|
|
69
|
-
"@proteos/
|
|
70
|
-
"@proteos/
|
|
69
|
+
"@proteos/biome-config": "0.0.0",
|
|
70
|
+
"@proteos/tsconfig": "0.0.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsup",
|
|
@@ -953,12 +953,14 @@ export interface ConversationType {
|
|
|
953
953
|
/** Ordered; empty = the type tracks no phases. */
|
|
954
954
|
phases: ConversationPhase[]
|
|
955
955
|
/**
|
|
956
|
-
* The type's
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
* the
|
|
960
|
-
* `
|
|
961
|
-
*
|
|
956
|
+
* The type's action buttons — one strip in the footer of the call or
|
|
957
|
+
* meeting surface, the same place during the conversation and in its
|
|
958
|
+
* wrap-up. Same contract as `Page.actions`; each button's `visible_when`
|
|
959
|
+
* reads the conversation scope (`conversation.status` for the stage,
|
|
960
|
+
* `conversation.outcome_key`, `records_by_entity.<slug>`,
|
|
961
|
+
* `tags_by_definition.<key>`, …); no rule = offered throughout. The rule
|
|
962
|
+
* decides when a button appears; once pressed it stays for the rest of
|
|
963
|
+
* the conversation. Ordered; empty = none.
|
|
962
964
|
*/
|
|
963
965
|
actions: PageAction[]
|
|
964
966
|
/** Module that deployed the type; absent when not module-owned. */
|
package/src/index.ts
CHANGED
|
@@ -803,6 +803,7 @@ export type {
|
|
|
803
803
|
PageAction,
|
|
804
804
|
PageActionIntent,
|
|
805
805
|
PageActionKind,
|
|
806
|
+
PageActionMatch,
|
|
806
807
|
PageExtension,
|
|
807
808
|
PageExtensionPlacement,
|
|
808
809
|
PageExtensionService,
|
|
@@ -886,8 +887,10 @@ export {
|
|
|
886
887
|
MetaClient,
|
|
887
888
|
ModuleSchema,
|
|
888
889
|
OnDeleteActionSchema,
|
|
890
|
+
PAGE_ACTION_MATCH_MAX_LIMIT,
|
|
889
891
|
PAGE_EXTENSION_ANCHOR_MAIN,
|
|
890
892
|
PAGE_EXTENSION_ANCHOR_SIDE_PANEL,
|
|
893
|
+
PageActionMatchSchema,
|
|
891
894
|
PageActionSchema,
|
|
892
895
|
PageExtensionPlacementSchema,
|
|
893
896
|
PageExtensionSchema,
|
package/src/meta/index.ts
CHANGED
|
@@ -272,6 +272,7 @@ export type {
|
|
|
272
272
|
PageAction,
|
|
273
273
|
PageActionIntent,
|
|
274
274
|
PageActionKind,
|
|
275
|
+
PageActionMatch,
|
|
275
276
|
// PageExtension types
|
|
276
277
|
PageExtension,
|
|
277
278
|
PageExtensionPlacement,
|
|
@@ -354,6 +355,8 @@ export {
|
|
|
354
355
|
OnDeleteActionSchema,
|
|
355
356
|
PAGE_EXTENSION_ANCHOR_MAIN,
|
|
356
357
|
PAGE_EXTENSION_ANCHOR_SIDE_PANEL,
|
|
358
|
+
PAGE_ACTION_MATCH_MAX_LIMIT,
|
|
359
|
+
PageActionMatchSchema,
|
|
357
360
|
PageActionSchema,
|
|
358
361
|
PageExtensionPlacementSchema,
|
|
359
362
|
PageExtensionSchema,
|
package/src/meta/types.ts
CHANGED
|
@@ -1091,12 +1091,41 @@ export type PageActionKind = 'action' | 'workflow' | 'agent' | 'intent' | 'link'
|
|
|
1091
1091
|
|
|
1092
1092
|
export const PageActionKindSchema = z.enum(['action', 'workflow', 'agent', 'intent', 'link'])
|
|
1093
1093
|
|
|
1094
|
-
/** What a `kind: intent` button
|
|
1095
|
-
|
|
1094
|
+
/** What a `kind: intent` button has the model prepare — a record proposal
|
|
1095
|
+
* (`*_record`) or an action's / workflow's inputs (`invoke_*`). */
|
|
1096
|
+
export type PageActionIntent =
|
|
1097
|
+
| 'create_record'
|
|
1098
|
+
| 'update_record'
|
|
1099
|
+
| 'upsert_record'
|
|
1100
|
+
| 'invoke_action'
|
|
1101
|
+
| 'invoke_workflow'
|
|
1102
|
+
|
|
1103
|
+
/** Most candidates an `upsert_record` button hands the model. */
|
|
1104
|
+
export const PAGE_ACTION_MATCH_MAX_LIMIT = 25
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* The list query an `upsert_record` button finds its candidate records with —
|
|
1108
|
+
* a page of `entity` records, fetched when the button is pressed. `filter`
|
|
1109
|
+
* has the list endpoint's `_filter` shape; every element's `value` is a
|
|
1110
|
+
* Liquid template, and a value that renders empty yields NO candidates (never
|
|
1111
|
+
* a wider query). `sort` is `field:asc|desc`; `limit` defaults to 10.
|
|
1112
|
+
*/
|
|
1113
|
+
export interface PageActionMatch {
|
|
1114
|
+
filter?: FilterGroup
|
|
1115
|
+
sort?: string
|
|
1116
|
+
limit?: number
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
export const PageActionMatchSchema = z.object({
|
|
1120
|
+
filter: FilterGroupSchema.optional(),
|
|
1121
|
+
sort: z.string().optional(),
|
|
1122
|
+
limit: z.number().int().min(1).max(PAGE_ACTION_MATCH_MAX_LIMIT).optional(),
|
|
1123
|
+
})
|
|
1096
1124
|
|
|
1097
1125
|
/**
|
|
1098
1126
|
* One action button — a page's or a list's toolbar button, or a conversation
|
|
1099
|
-
* type's
|
|
1127
|
+
* type's action (the strip in the call or meeting surface's footer, during
|
|
1128
|
+
* and after the conversation).
|
|
1100
1129
|
* Which target it invokes follows from `kind`:
|
|
1101
1130
|
*
|
|
1102
1131
|
* - `action` → `action` (slug) + `params`
|
|
@@ -1104,10 +1133,18 @@ export type PageActionIntent = 'create_record' | 'update_record'
|
|
|
1104
1133
|
* - `agent` → `agent` (key) + `prompt` + `context`: opens an Ava chat with
|
|
1105
1134
|
* that agent; `prompt` becomes the visible first message (the label when
|
|
1106
1135
|
* empty), `context` is handed to the model alongside it and never shown.
|
|
1107
|
-
* - `intent` → `intent` + `entity` (+ `record`) + `prompt` + `context`:
|
|
1136
|
+
* - `intent` → `intent` + `entity` (+ `record` | `match`) + `prompt` + `context`:
|
|
1108
1137
|
* prepares a record proposal (one model call), shows it as an editable
|
|
1109
1138
|
* review and saves only what the person confirms. `update_record` targets
|
|
1110
1139
|
* `record` when set, else the surface's linked record of `entity`.
|
|
1140
|
+
* `upsert_record` hands the model the records `match` finds and lets it
|
|
1141
|
+
* change one of them or prepare a new record — `prompt` says how to choose.
|
|
1142
|
+
* `field_scope` (any intent) lists the attributes the proposal may fill,
|
|
1143
|
+
* replacing the app's bound create / edit page.
|
|
1144
|
+
* `invoke_action` / `invoke_workflow` open the invoke dialog of `action` /
|
|
1145
|
+
* `workflow` with the model's values in the fields `params` / `inputs`
|
|
1146
|
+
* (Liquid, locked) left open — always reviewed, never run unseen; on a
|
|
1147
|
+
* call surface it opens as a workspace tab instead of a modal.
|
|
1111
1148
|
* - `link` → `url`: opens the rendered address in a new browser tab
|
|
1112
1149
|
* (http, https, mailto and tel only). Renders synchronously on the press,
|
|
1113
1150
|
* so `| summarize` renders '' there.
|
|
@@ -1136,6 +1173,12 @@ export interface PageAction {
|
|
|
1136
1173
|
intent?: PageActionIntent
|
|
1137
1174
|
entity?: string
|
|
1138
1175
|
record?: string
|
|
1176
|
+
/** `upsert_record` only: how the candidate records are found. */
|
|
1177
|
+
match?: PageActionMatch
|
|
1178
|
+
/** Intent only: the attribute names the proposal may fill (plain names).
|
|
1179
|
+
* Replaces the app's bound create / edit page as the scope; required
|
|
1180
|
+
* attributes without a default are always added. */
|
|
1181
|
+
field_scope?: string[]
|
|
1139
1182
|
url?: string
|
|
1140
1183
|
params?: Record<string, string>
|
|
1141
1184
|
inputs?: Record<string, string>
|
|
@@ -1154,9 +1197,13 @@ export const PageActionSchema = z.object({
|
|
|
1154
1197
|
action: z.string().optional(),
|
|
1155
1198
|
workflow: z.string().optional(),
|
|
1156
1199
|
agent: z.string().optional(),
|
|
1157
|
-
intent: z
|
|
1200
|
+
intent: z
|
|
1201
|
+
.enum(['create_record', 'update_record', 'upsert_record', 'invoke_action', 'invoke_workflow'])
|
|
1202
|
+
.optional(),
|
|
1158
1203
|
entity: z.string().optional(),
|
|
1159
1204
|
record: z.string().optional(),
|
|
1205
|
+
match: PageActionMatchSchema.optional(),
|
|
1206
|
+
field_scope: z.array(z.string()).optional(),
|
|
1160
1207
|
url: z.string().optional(),
|
|
1161
1208
|
params: z.record(z.string()).optional(),
|
|
1162
1209
|
inputs: z.record(z.string()).optional(),
|