@vess-id/ai-identity 0.21.0 → 0.22.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/index.mjs CHANGED
@@ -4692,6 +4692,19 @@ var actionMetaSchema = {
4692
4692
  minLength: 1
4693
4693
  }
4694
4694
  },
4695
+ // OAuth provider 名 → その provider でのスコープ集合。
4696
+ required_scopes_by_provider: {
4697
+ type: "object",
4698
+ minProperties: 1,
4699
+ additionalProperties: {
4700
+ type: "array",
4701
+ minItems: 1,
4702
+ items: {
4703
+ type: "string",
4704
+ minLength: 1
4705
+ }
4706
+ }
4707
+ },
4695
4708
  capability: {
4696
4709
  type: "string"
4697
4710
  },
@@ -4923,6 +4936,15 @@ function getRequiredScopes(regIndex, action) {
4923
4936
  return regIndex.get(action)?.required_scopes ?? [];
4924
4937
  }
4925
4938
  __name(getRequiredScopes, "getRequiredScopes");
4939
+ function getRequiredScopesForProvider(regIndex, action, provider) {
4940
+ const meta = regIndex.get(action);
4941
+ if (!meta) return [];
4942
+ const map = meta.required_scopes_by_provider;
4943
+ const key = provider?.toLowerCase();
4944
+ const byProvider = map && key && Object.prototype.hasOwnProperty.call(map, key) ? map[key] : void 0;
4945
+ return Array.isArray(byProvider) ? byProvider : meta.required_scopes ?? [];
4946
+ }
4947
+ __name(getRequiredScopesForProvider, "getRequiredScopesForProvider");
4926
4948
  function getRequiredRelations(regIndex, action) {
4927
4949
  return regIndex.get(action)?.required_relations ?? [];
4928
4950
  }
@@ -9858,6 +9880,434 @@ var ACTION_REGISTRY = {
9858
9880
  ],
9859
9881
  version: "1.0.0"
9860
9882
  },
9883
+ // ─── 🔴 #1209 Outlook Mail Actions (Graph; peer of the Gmail block) ───
9884
+ // provider = microsoft; scopes = Mail.ReadWrite (read/draft) + Mail.Send
9885
+ // (send). Shapes mirror the Gmail entries above so the policy / approval /
9886
+ // target-binding engine treats Outlook mail identically.
9887
+ {
9888
+ action: "outlook.message.search",
9889
+ resource_type: "outlook:message",
9890
+ required_relations: [
9891
+ "viewer",
9892
+ "editor",
9893
+ "admin",
9894
+ "owner"
9895
+ ],
9896
+ required_scopes: [
9897
+ "Mail.ReadWrite"
9898
+ ],
9899
+ capability: "outlook.read.basic",
9900
+ input_schema: {
9901
+ type: "object",
9902
+ properties: {
9903
+ query: {
9904
+ type: "string",
9905
+ minLength: 1
9906
+ },
9907
+ maxResults: {
9908
+ type: "integer",
9909
+ minimum: 1,
9910
+ maximum: 50
9911
+ }
9912
+ },
9913
+ required: [
9914
+ "query"
9915
+ ],
9916
+ additionalProperties: false
9917
+ },
9918
+ constraints: {
9919
+ rate_bucket: "outlook.read"
9920
+ },
9921
+ effects: [
9922
+ "Read:MessageList"
9923
+ ],
9924
+ risk: "low",
9925
+ target_bindings: {
9926
+ resource_id: {
9927
+ source: "param",
9928
+ param: "query",
9929
+ required: false
9930
+ }
9931
+ },
9932
+ version: "1.0.0"
9933
+ },
9934
+ {
9935
+ action: "outlook.message.read",
9936
+ resource_type: "outlook:message",
9937
+ required_relations: [
9938
+ "viewer",
9939
+ "editor",
9940
+ "admin",
9941
+ "owner"
9942
+ ],
9943
+ required_scopes: [
9944
+ "Mail.ReadWrite"
9945
+ ],
9946
+ capability: "outlook.read.basic",
9947
+ input_schema: {
9948
+ type: "object",
9949
+ properties: {
9950
+ messageId: {
9951
+ type: "string",
9952
+ minLength: 1
9953
+ }
9954
+ },
9955
+ required: [
9956
+ "messageId"
9957
+ ],
9958
+ additionalProperties: false
9959
+ },
9960
+ constraints: {
9961
+ rate_bucket: "outlook.read"
9962
+ },
9963
+ effects: [
9964
+ "Read:Message"
9965
+ ],
9966
+ risk: "low",
9967
+ target_bindings: {
9968
+ resource_id: {
9969
+ source: "param",
9970
+ param: "messageId"
9971
+ }
9972
+ },
9973
+ version: "1.0.0"
9974
+ },
9975
+ {
9976
+ action: "outlook.message.send",
9977
+ resource_type: "outlook:message",
9978
+ required_relations: [
9979
+ "editor",
9980
+ "act_as"
9981
+ ],
9982
+ required_scopes: [
9983
+ "Mail.Send"
9984
+ ],
9985
+ capability: "outlook.compose",
9986
+ input_schema: {
9987
+ type: "object",
9988
+ properties: {
9989
+ to: {
9990
+ type: "string",
9991
+ minLength: 1
9992
+ },
9993
+ subject: {
9994
+ type: "string",
9995
+ minLength: 1
9996
+ },
9997
+ body: {
9998
+ type: "string",
9999
+ minLength: 1
10000
+ },
10001
+ cc: {
10002
+ type: "string"
10003
+ },
10004
+ bcc: {
10005
+ type: "string"
10006
+ }
10007
+ },
10008
+ required: [
10009
+ "to",
10010
+ "subject",
10011
+ "body"
10012
+ ],
10013
+ additionalProperties: false
10014
+ },
10015
+ constraints: {
10016
+ rate_bucket: "outlook.write"
10017
+ },
10018
+ effects: [
10019
+ "Create:Email"
10020
+ ],
10021
+ risk: "high",
10022
+ target_bindings: {
10023
+ resource_id: {
10024
+ source: "param",
10025
+ param: "to",
10026
+ multi: true,
10027
+ separator: ","
10028
+ },
10029
+ secondary: [
10030
+ {
10031
+ name: "cc",
10032
+ source: {
10033
+ source: "param",
10034
+ param: "cc"
10035
+ },
10036
+ type: "recipient"
10037
+ },
10038
+ {
10039
+ name: "bcc",
10040
+ source: {
10041
+ source: "param",
10042
+ param: "bcc"
10043
+ },
10044
+ type: "recipient"
10045
+ }
10046
+ ]
10047
+ },
10048
+ approval_salient_fields: [
10049
+ "to",
10050
+ "cc",
10051
+ "bcc",
10052
+ "subject",
10053
+ "body"
10054
+ ],
10055
+ version: "1.0.0"
10056
+ },
10057
+ {
10058
+ action: "outlook.draft.create",
10059
+ resource_type: "outlook:message",
10060
+ required_relations: [
10061
+ "editor",
10062
+ "act_as"
10063
+ ],
10064
+ required_scopes: [
10065
+ "Mail.ReadWrite"
10066
+ ],
10067
+ capability: "outlook.compose",
10068
+ input_schema: {
10069
+ type: "object",
10070
+ properties: {
10071
+ to: {
10072
+ type: "string",
10073
+ minLength: 1
10074
+ },
10075
+ subject: {
10076
+ type: "string",
10077
+ minLength: 1
10078
+ },
10079
+ body: {
10080
+ type: "string",
10081
+ minLength: 1
10082
+ },
10083
+ cc: {
10084
+ type: "string"
10085
+ },
10086
+ bcc: {
10087
+ type: "string"
10088
+ }
10089
+ },
10090
+ required: [
10091
+ "to",
10092
+ "subject",
10093
+ "body"
10094
+ ],
10095
+ additionalProperties: false
10096
+ },
10097
+ constraints: {
10098
+ rate_bucket: "outlook.write"
10099
+ },
10100
+ effects: [
10101
+ "Create:Draft"
10102
+ ],
10103
+ risk: "high",
10104
+ target_bindings: {
10105
+ resource_id: {
10106
+ source: "param",
10107
+ param: "to",
10108
+ multi: true,
10109
+ separator: ","
10110
+ },
10111
+ secondary: [
10112
+ {
10113
+ name: "cc",
10114
+ source: {
10115
+ source: "param",
10116
+ param: "cc"
10117
+ },
10118
+ type: "recipient"
10119
+ },
10120
+ {
10121
+ name: "bcc",
10122
+ source: {
10123
+ source: "param",
10124
+ param: "bcc"
10125
+ },
10126
+ type: "recipient"
10127
+ }
10128
+ ]
10129
+ },
10130
+ approval_salient_fields: [
10131
+ "to",
10132
+ "cc",
10133
+ "bcc",
10134
+ "subject",
10135
+ "body"
10136
+ ],
10137
+ version: "1.0.0"
10138
+ },
10139
+ {
10140
+ action: "outlook.folder.read",
10141
+ resource_type: "outlook:folder",
10142
+ required_relations: [
10143
+ "viewer",
10144
+ "editor",
10145
+ "admin",
10146
+ "owner"
10147
+ ],
10148
+ required_scopes: [
10149
+ "Mail.ReadWrite"
10150
+ ],
10151
+ capability: "outlook.read.basic",
10152
+ input_schema: {
10153
+ type: "object",
10154
+ properties: {
10155
+ // Optional scope: a specific folder id, else the full folder list.
10156
+ // Declared so the target_binding below references a real param.
10157
+ folderId: {
10158
+ type: "string"
10159
+ }
10160
+ },
10161
+ additionalProperties: false
10162
+ },
10163
+ constraints: {
10164
+ rate_bucket: "outlook.read"
10165
+ },
10166
+ effects: [
10167
+ "Read:FolderList"
10168
+ ],
10169
+ risk: "low",
10170
+ target_bindings: {
10171
+ resource_id: {
10172
+ source: "param",
10173
+ param: "folderId",
10174
+ required: false
10175
+ }
10176
+ },
10177
+ version: "1.0.0"
10178
+ },
10179
+ {
10180
+ action: "outlook.batch.read",
10181
+ resource_type: "outlook:message",
10182
+ required_relations: [
10183
+ "viewer",
10184
+ "editor",
10185
+ "admin",
10186
+ "owner"
10187
+ ],
10188
+ required_scopes: [
10189
+ "Mail.ReadWrite"
10190
+ ],
10191
+ capability: "outlook.read.basic",
10192
+ input_schema: {
10193
+ type: "object",
10194
+ properties: {
10195
+ messageIds: {
10196
+ type: "array",
10197
+ items: {
10198
+ type: "string",
10199
+ minLength: 1
10200
+ },
10201
+ minItems: 1,
10202
+ maxItems: 20
10203
+ }
10204
+ },
10205
+ required: [
10206
+ "messageIds"
10207
+ ],
10208
+ additionalProperties: false
10209
+ },
10210
+ constraints: {
10211
+ rate_bucket: "outlook.read"
10212
+ },
10213
+ effects: [
10214
+ "Read:MessageBatch"
10215
+ ],
10216
+ risk: "low",
10217
+ target_bindings: {
10218
+ resource_id: {
10219
+ source: "param",
10220
+ param: "messageIds",
10221
+ required: false
10222
+ }
10223
+ },
10224
+ version: "1.0.0"
10225
+ },
10226
+ {
10227
+ action: "outlook.message.trash",
10228
+ resource_type: "outlook:message",
10229
+ required_relations: [
10230
+ "editor",
10231
+ "act_as"
10232
+ ],
10233
+ required_scopes: [
10234
+ "Mail.ReadWrite"
10235
+ ],
10236
+ capability: "outlook.manage",
10237
+ input_schema: {
10238
+ type: "object",
10239
+ properties: {
10240
+ messageId: {
10241
+ type: "string",
10242
+ minLength: 1
10243
+ }
10244
+ },
10245
+ required: [
10246
+ "messageId"
10247
+ ],
10248
+ additionalProperties: false
10249
+ },
10250
+ constraints: {
10251
+ rate_bucket: "outlook.write"
10252
+ },
10253
+ effects: [
10254
+ "Update:Message"
10255
+ ],
10256
+ risk: "high",
10257
+ target_bindings: {
10258
+ resource_id: {
10259
+ source: "param",
10260
+ param: "messageId"
10261
+ }
10262
+ },
10263
+ approval_salient_fields: [
10264
+ "messageId"
10265
+ ],
10266
+ version: "1.0.0"
10267
+ },
10268
+ {
10269
+ action: "outlook.message.delete",
10270
+ resource_type: "outlook:message",
10271
+ required_relations: [
10272
+ "admin",
10273
+ "owner",
10274
+ "act_as"
10275
+ ],
10276
+ required_scopes: [
10277
+ "Mail.ReadWrite"
10278
+ ],
10279
+ capability: "outlook.manage",
10280
+ input_schema: {
10281
+ type: "object",
10282
+ properties: {
10283
+ messageId: {
10284
+ type: "string",
10285
+ minLength: 1
10286
+ }
10287
+ },
10288
+ required: [
10289
+ "messageId"
10290
+ ],
10291
+ additionalProperties: false
10292
+ },
10293
+ constraints: {
10294
+ rate_bucket: "outlook.write"
10295
+ },
10296
+ effects: [
10297
+ "Delete:Message"
10298
+ ],
10299
+ risk: "high",
10300
+ target_bindings: {
10301
+ resource_id: {
10302
+ source: "param",
10303
+ param: "messageId"
10304
+ }
10305
+ },
10306
+ approval_salient_fields: [
10307
+ "messageId"
10308
+ ],
10309
+ version: "1.0.0"
10310
+ },
9861
10311
  // ─── Calendar Actions ───
9862
10312
  {
9863
10313
  action: "calendar.event.list",
@@ -9871,6 +10321,16 @@ var ACTION_REGISTRY = {
9871
10321
  required_scopes: [
9872
10322
  "https://www.googleapis.com/auth/calendar.readonly"
9873
10323
  ],
10324
+ // Microsoft 接続で同じ action を実行するときのスコープ。Calendars.Read は
10325
+ // Calendars.ReadWrite に含意されるため、write 権限だけを付与された接続でも満たされる。
10326
+ required_scopes_by_provider: {
10327
+ google: [
10328
+ "https://www.googleapis.com/auth/calendar.readonly"
10329
+ ],
10330
+ microsoft: [
10331
+ "Calendars.Read"
10332
+ ]
10333
+ },
9874
10334
  capability: "calendar.read.basic",
9875
10335
  input_schema: {
9876
10336
  type: "object",
@@ -9925,6 +10385,16 @@ var ACTION_REGISTRY = {
9925
10385
  required_scopes: [
9926
10386
  "https://www.googleapis.com/auth/calendar.readonly"
9927
10387
  ],
10388
+ // Microsoft 接続で同じ action を実行するときのスコープ。Calendars.Read は
10389
+ // Calendars.ReadWrite に含意されるため、write 権限だけを付与された接続でも満たされる。
10390
+ required_scopes_by_provider: {
10391
+ google: [
10392
+ "https://www.googleapis.com/auth/calendar.readonly"
10393
+ ],
10394
+ microsoft: [
10395
+ "Calendars.Read"
10396
+ ]
10397
+ },
9928
10398
  capability: "calendar.read.basic",
9929
10399
  input_schema: {
9930
10400
  type: "object",
@@ -9969,6 +10439,16 @@ var ACTION_REGISTRY = {
9969
10439
  required_scopes: [
9970
10440
  "https://www.googleapis.com/auth/calendar.readonly"
9971
10441
  ],
10442
+ // Microsoft 接続で同じ action を実行するときのスコープ。Calendars.Read は
10443
+ // Calendars.ReadWrite に含意されるため、write 権限だけを付与された接続でも満たされる。
10444
+ required_scopes_by_provider: {
10445
+ google: [
10446
+ "https://www.googleapis.com/auth/calendar.readonly"
10447
+ ],
10448
+ microsoft: [
10449
+ "Calendars.Read"
10450
+ ]
10451
+ },
9972
10452
  capability: "calendar.read.basic",
9973
10453
  // Availability probe used to check a calendar's busy/free intervals before
9974
10454
  // proposing meeting slots. Returns only busy time ranges — never event
@@ -10022,6 +10502,14 @@ var ACTION_REGISTRY = {
10022
10502
  required_scopes: [
10023
10503
  "https://www.googleapis.com/auth/calendar"
10024
10504
  ],
10505
+ required_scopes_by_provider: {
10506
+ google: [
10507
+ "https://www.googleapis.com/auth/calendar"
10508
+ ],
10509
+ microsoft: [
10510
+ "Calendars.ReadWrite"
10511
+ ]
10512
+ },
10025
10513
  capability: "calendar.write",
10026
10514
  input_schema: {
10027
10515
  type: "object",
@@ -10093,11 +10581,11 @@ var ACTION_REGISTRY = {
10093
10581
  },
10094
10582
  addMeet: {
10095
10583
  type: "boolean",
10096
- description: "Opt-in: attach a Google Meet link (default: false)"
10584
+ description: "Opt-in: attach an online-meeting link (default: false). Google Meet on a Google connection, Microsoft Teams on an Outlook one \u2014 the join URL comes back as conferenceUrl either way."
10097
10585
  },
10098
10586
  meetRequestId: {
10099
10587
  type: "string",
10100
- description: "Stable idempotency key for the Meet request (used only when addMeet is true)"
10588
+ description: "Stable idempotency key for the online-meeting request (used only when addMeet is true)"
10101
10589
  }
10102
10590
  },
10103
10591
  required: [
@@ -10155,6 +10643,14 @@ var ACTION_REGISTRY = {
10155
10643
  required_scopes: [
10156
10644
  "https://www.googleapis.com/auth/calendar"
10157
10645
  ],
10646
+ required_scopes_by_provider: {
10647
+ google: [
10648
+ "https://www.googleapis.com/auth/calendar"
10649
+ ],
10650
+ microsoft: [
10651
+ "Calendars.ReadWrite"
10652
+ ]
10653
+ },
10158
10654
  capability: "calendar.write",
10159
10655
  input_schema: {
10160
10656
  type: "object",
@@ -10230,11 +10726,11 @@ var ACTION_REGISTRY = {
10230
10726
  },
10231
10727
  addMeet: {
10232
10728
  type: "boolean",
10233
- description: "Opt-in: attach a Google Meet link (default: false)"
10729
+ description: "Opt-in: attach an online-meeting link (default: false). Google Meet on a Google connection, Microsoft Teams on an Outlook one \u2014 the join URL comes back as conferenceUrl either way."
10234
10730
  },
10235
10731
  meetRequestId: {
10236
10732
  type: "string",
10237
- description: "Stable idempotency key for the Meet request (used only when addMeet is true)"
10733
+ description: "Stable idempotency key for the online-meeting request (used only when addMeet is true)"
10238
10734
  }
10239
10735
  },
10240
10736
  required: [
@@ -10292,6 +10788,14 @@ var ACTION_REGISTRY = {
10292
10788
  required_scopes: [
10293
10789
  "https://www.googleapis.com/auth/calendar"
10294
10790
  ],
10791
+ required_scopes_by_provider: {
10792
+ google: [
10793
+ "https://www.googleapis.com/auth/calendar"
10794
+ ],
10795
+ microsoft: [
10796
+ "Calendars.ReadWrite"
10797
+ ]
10798
+ },
10295
10799
  capability: "calendar.write",
10296
10800
  input_schema: {
10297
10801
  type: "object",
@@ -14883,7 +15387,7 @@ var ACTION_REGISTRY = {
14883
15387
  type: "array",
14884
15388
  minItems: 1,
14885
15389
  maxItems: 10,
14886
- description: "Explicit candidate slots computed by the agent from the user calendar. The server validates them AND (when Google Calendar is connected) filters out any that conflict with the sender's calendar. Mutually exclusive with candidateWindow \u2014 supply exactly one.",
15390
+ description: "Explicit candidate slots computed by the agent from the user calendar. The server validates them AND (when a calendar is connected) filters out any that conflict with the sender's calendar. Mutually exclusive with candidateWindow \u2014 supply exactly one.",
14887
15391
  items: {
14888
15392
  type: "object",
14889
15393
  properties: {
@@ -14920,7 +15424,7 @@ var ACTION_REGISTRY = {
14920
15424
  "object",
14921
15425
  "array"
14922
15426
  ],
14923
- description: 'A search window OR an ARRAY of search windows the server fills with busy-free candidate slots from the sender\'s Google Calendar. Each range is `{ start, end }` (ISO 8601) \u2014 an independent contiguous interval the server searches within, spreading candidates across ranges. "\u5E73\u65E5\u5348\u5F8C" = one range per business day (Mon 13-18 / Tue 13-18 / \u2026); "\u6708\u66DC\u5348\u524D or \u6728\u66DC\u5348\u5F8C" = two ranges. A single contiguous span = one range. Max 5 ranges, total span \u2264 62 days. Mutually exclusive with candidates \u2014 supply exactly one. Requires a connected Google Calendar.',
15427
+ description: 'A search window OR an ARRAY of search windows the server fills with busy-free candidate slots from the sender\'s connected calendar(s) (Google Calendar or Microsoft Outlook; busy time is the union of all of them). Each range is `{ start, end }` (ISO 8601) \u2014 an independent contiguous interval the server searches within, spreading candidates across ranges. "\u5E73\u65E5\u5348\u5F8C" = one range per business day (Mon 13-18 / Tue 13-18 / \u2026); "\u6708\u66DC\u5348\u524D or \u6728\u66DC\u5348\u5F8C" = two ranges. A single contiguous span = one range. Max 5 ranges, total span \u2264 62 days. Mutually exclusive with candidates \u2014 supply exactly one. Requires at least one connected calendar.',
14924
15428
  properties: {
14925
15429
  start: {
14926
15430
  type: "string",
@@ -15804,9 +16308,39 @@ var ACTION_REGISTRY = {
15804
16308
  ],
15805
16309
  version: "1.0.0"
15806
16310
  },
16311
+ // 🔴 #1209 Outlook mail capabilities (peer of the three Gmail ones above).
16312
+ {
16313
+ capability: "outlook.read.basic",
16314
+ description: "Read and search Outlook mail messages and folders",
16315
+ includes: [
16316
+ "outlook.message.search",
16317
+ "outlook.message.read",
16318
+ "outlook.folder.read",
16319
+ "outlook.batch.read"
16320
+ ],
16321
+ version: "1.0.0"
16322
+ },
16323
+ {
16324
+ capability: "outlook.compose",
16325
+ description: "Send emails and create drafts via Outlook",
16326
+ includes: [
16327
+ "outlook.message.send",
16328
+ "outlook.draft.create"
16329
+ ],
16330
+ version: "1.0.0"
16331
+ },
16332
+ {
16333
+ capability: "outlook.manage",
16334
+ description: "Trash and permanently delete Outlook messages",
16335
+ includes: [
16336
+ "outlook.message.trash",
16337
+ "outlook.message.delete"
16338
+ ],
16339
+ version: "1.0.0"
16340
+ },
15807
16341
  {
15808
16342
  capability: "calendar.read.basic",
15809
- description: "Read and list Google Calendar events, and check free/busy availability",
16343
+ description: "Read and list calendar events (Google Calendar or Microsoft Outlook), and check free/busy availability",
15810
16344
  includes: [
15811
16345
  "calendar.event.list",
15812
16346
  "calendar.event.read",
@@ -15816,7 +16350,7 @@ var ACTION_REGISTRY = {
15816
16350
  },
15817
16351
  {
15818
16352
  capability: "calendar.write",
15819
- description: "Create, update, and delete Google Calendar events",
16353
+ description: "Create, update, and delete calendar events (Google Calendar or Microsoft Outlook)",
15820
16354
  includes: [
15821
16355
  "calendar.event.create",
15822
16356
  "calendar.event.update",
@@ -18765,6 +19299,7 @@ export {
18765
19299
  getKeyIdFromDid,
18766
19300
  getRequiredRelations,
18767
19301
  getRequiredScopes,
19302
+ getRequiredScopesForProvider,
18768
19303
  getTierLimits,
18769
19304
  getValidMcpActionNames,
18770
19305
  grantConstraintsToPermissionConstraints,