@vess-id/ai-identity 0.8.0 → 0.10.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.d.mts +831 -112
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +364 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +360 -40
- package/dist/index.mjs.map +1 -1
- package/dist/registry/action-registry-json.d.ts +795 -96
- package/dist/registry/action-registry-json.d.ts.map +1 -1
- package/dist/registry/action-summary.d.ts +8 -0
- package/dist/registry/action-summary.d.ts.map +1 -0
- package/dist/resolver/target-resolver.d.ts +8 -0
- package/dist/resolver/target-resolver.d.ts.map +1 -1
- package/dist/types/target-binding.d.ts +4 -0
- package/dist/types/target-binding.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1976,7 +1976,7 @@ var ToolManager = class {
|
|
|
1976
1976
|
projectKey: "string",
|
|
1977
1977
|
summary: "string",
|
|
1978
1978
|
description: "string?",
|
|
1979
|
-
|
|
1979
|
+
issueTypeName: "string",
|
|
1980
1980
|
priority: "string?",
|
|
1981
1981
|
assignee: "string?"
|
|
1982
1982
|
}
|
|
@@ -4543,11 +4543,39 @@ var ACTION_REGISTRY = {
|
|
|
4543
4543
|
},
|
|
4544
4544
|
version: "1.0.0"
|
|
4545
4545
|
},
|
|
4546
|
+
{
|
|
4547
|
+
action: "slack.message.read_paginated",
|
|
4548
|
+
resource_type: "slack:channel",
|
|
4549
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4550
|
+
required_scopes: ["channels:history", "groups:history"],
|
|
4551
|
+
capability: "slack.read.basic",
|
|
4552
|
+
input_schema: {
|
|
4553
|
+
type: "object",
|
|
4554
|
+
properties: {
|
|
4555
|
+
channel: { type: "string", description: "Channel ID, channel name, or channel name with # prefix" },
|
|
4556
|
+
cursor: { type: "string", description: "Pagination cursor from previous response" },
|
|
4557
|
+
limit: { type: "integer", minimum: 1, maximum: 30 }
|
|
4558
|
+
},
|
|
4559
|
+
required: ["channel"],
|
|
4560
|
+
additionalProperties: false
|
|
4561
|
+
},
|
|
4562
|
+
constraints: { rate_bucket: "slack.read" },
|
|
4563
|
+
effects: ["Read:Message"],
|
|
4564
|
+
risk: "low",
|
|
4565
|
+
target_bindings: {
|
|
4566
|
+
resource_id: { source: "param", param: "channel" }
|
|
4567
|
+
},
|
|
4568
|
+
version: "1.0.0"
|
|
4569
|
+
},
|
|
4546
4570
|
{
|
|
4547
4571
|
action: "slack.batch.read",
|
|
4548
4572
|
resource_type: "slack:channel",
|
|
4549
4573
|
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4550
|
-
|
|
4574
|
+
// Documentation only — NOT used for runtime access control.
|
|
4575
|
+
// Actual permission granting uses parseSlackScopes (oauth.service.ts) with OR-logic:
|
|
4576
|
+
// any read scope + any history scope grants slack.batch.read.
|
|
4577
|
+
// Tokens with partial scopes (e.g. channels:read + channels:history) will still receive this permission.
|
|
4578
|
+
required_scopes: ["channels:read", "groups:read", "im:read", "mpim:read", "channels:history", "groups:history", "im:history", "mpim:history"],
|
|
4551
4579
|
capability: "slack.read.basic",
|
|
4552
4580
|
input_schema: {
|
|
4553
4581
|
type: "object",
|
|
@@ -4919,10 +4947,10 @@ var ACTION_REGISTRY = {
|
|
|
4919
4947
|
input_schema: {
|
|
4920
4948
|
type: "object",
|
|
4921
4949
|
properties: {
|
|
4922
|
-
calendarId: { type: "string" },
|
|
4923
|
-
timeMin: { type: "string" },
|
|
4924
|
-
timeMax: { type: "string" },
|
|
4925
|
-
maxResults: { type: "integer", minimum: 1, maximum: 2500 }
|
|
4950
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
4951
|
+
timeMin: { type: "string", description: 'Lower bound (inclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-15T00:00:00Z"' },
|
|
4952
|
+
timeMax: { type: "string", description: 'Upper bound (exclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-16T00:00:00Z"' },
|
|
4953
|
+
maxResults: { type: "integer", minimum: 1, maximum: 2500, description: "Maximum number of events to return" }
|
|
4926
4954
|
},
|
|
4927
4955
|
additionalProperties: false
|
|
4928
4956
|
},
|
|
@@ -4966,13 +4994,29 @@ var ACTION_REGISTRY = {
|
|
|
4966
4994
|
input_schema: {
|
|
4967
4995
|
type: "object",
|
|
4968
4996
|
properties: {
|
|
4969
|
-
calendarId: { type: "string" },
|
|
4970
|
-
summary: { type: "string", minLength: 1 },
|
|
4971
|
-
description: { type: "string" },
|
|
4972
|
-
start: {
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4997
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
4998
|
+
summary: { type: "string", minLength: 1, description: "Event title" },
|
|
4999
|
+
description: { type: "string", description: "Event description" },
|
|
5000
|
+
start: {
|
|
5001
|
+
type: "object",
|
|
5002
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5003
|
+
properties: {
|
|
5004
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5005
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5006
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5007
|
+
}
|
|
5008
|
+
},
|
|
5009
|
+
end: {
|
|
5010
|
+
type: "object",
|
|
5011
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5012
|
+
properties: {
|
|
5013
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5014
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5015
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5016
|
+
}
|
|
5017
|
+
},
|
|
5018
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5019
|
+
location: { type: "string", description: "Event location" }
|
|
4976
5020
|
},
|
|
4977
5021
|
required: ["summary", "start", "end"],
|
|
4978
5022
|
additionalProperties: false
|
|
@@ -4997,14 +5041,30 @@ var ACTION_REGISTRY = {
|
|
|
4997
5041
|
input_schema: {
|
|
4998
5042
|
type: "object",
|
|
4999
5043
|
properties: {
|
|
5000
|
-
calendarId: { type: "string" },
|
|
5001
|
-
eventId: { type: "string", minLength: 1 },
|
|
5002
|
-
summary: { type: "string" },
|
|
5003
|
-
description: { type: "string" },
|
|
5004
|
-
start: {
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5044
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5045
|
+
eventId: { type: "string", minLength: 1, description: "Event ID to update" },
|
|
5046
|
+
summary: { type: "string", description: "Event title" },
|
|
5047
|
+
description: { type: "string", description: "Event description" },
|
|
5048
|
+
start: {
|
|
5049
|
+
type: "object",
|
|
5050
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5051
|
+
properties: {
|
|
5052
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5053
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5054
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5055
|
+
}
|
|
5056
|
+
},
|
|
5057
|
+
end: {
|
|
5058
|
+
type: "object",
|
|
5059
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5060
|
+
properties: {
|
|
5061
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5062
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5063
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5064
|
+
}
|
|
5065
|
+
},
|
|
5066
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5067
|
+
location: { type: "string", description: "Event location" }
|
|
5008
5068
|
},
|
|
5009
5069
|
required: ["eventId"],
|
|
5010
5070
|
additionalProperties: false
|
|
@@ -5013,7 +5073,7 @@ var ACTION_REGISTRY = {
|
|
|
5013
5073
|
effects: ["Update:Event"],
|
|
5014
5074
|
risk: "medium",
|
|
5015
5075
|
target_bindings: {
|
|
5016
|
-
resource_id: { source: "param", param: "
|
|
5076
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" },
|
|
5017
5077
|
secondary: [
|
|
5018
5078
|
{ name: "attendees", source: { source: "param", param: "attendees" }, type: "participant" }
|
|
5019
5079
|
]
|
|
@@ -5039,7 +5099,7 @@ var ACTION_REGISTRY = {
|
|
|
5039
5099
|
effects: ["Delete:Event"],
|
|
5040
5100
|
risk: "high",
|
|
5041
5101
|
target_bindings: {
|
|
5042
|
-
resource_id: { source: "param", param: "
|
|
5102
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" }
|
|
5043
5103
|
},
|
|
5044
5104
|
version: "1.0.0"
|
|
5045
5105
|
},
|
|
@@ -5175,7 +5235,7 @@ var ACTION_REGISTRY = {
|
|
|
5175
5235
|
effects: ["Read:Worklog"],
|
|
5176
5236
|
risk: "low",
|
|
5177
5237
|
target_bindings: {
|
|
5178
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5238
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5179
5239
|
},
|
|
5180
5240
|
version: "1.0.0"
|
|
5181
5241
|
},
|
|
@@ -5197,13 +5257,13 @@ var ACTION_REGISTRY = {
|
|
|
5197
5257
|
effects: ["Read:Issue"],
|
|
5198
5258
|
risk: "low",
|
|
5199
5259
|
target_bindings: {
|
|
5200
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5260
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5201
5261
|
},
|
|
5202
5262
|
version: "1.0.0"
|
|
5203
5263
|
},
|
|
5204
5264
|
{
|
|
5205
5265
|
action: "jira.issue.create",
|
|
5206
|
-
resource_type: "jira:
|
|
5266
|
+
resource_type: "jira:project",
|
|
5207
5267
|
required_relations: ["editor", "act_as"],
|
|
5208
5268
|
required_scopes: ["write:jira-work"],
|
|
5209
5269
|
capability: "jira.write.basic",
|
|
@@ -5213,11 +5273,12 @@ var ACTION_REGISTRY = {
|
|
|
5213
5273
|
projectKey: { type: "string", minLength: 1 },
|
|
5214
5274
|
summary: { type: "string", minLength: 1 },
|
|
5215
5275
|
description: { type: "string" },
|
|
5216
|
-
|
|
5276
|
+
issueTypeName: { type: "string", minLength: 1, description: "Issue type name (default: Task)" },
|
|
5217
5277
|
priority: { type: "string" },
|
|
5218
|
-
|
|
5278
|
+
assigneeAccountId: { type: "string" },
|
|
5279
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5219
5280
|
},
|
|
5220
|
-
required: ["projectKey", "summary"
|
|
5281
|
+
required: ["projectKey", "summary"],
|
|
5221
5282
|
additionalProperties: false
|
|
5222
5283
|
},
|
|
5223
5284
|
constraints: { rate_bucket: "jira.write" },
|
|
@@ -5230,7 +5291,7 @@ var ACTION_REGISTRY = {
|
|
|
5230
5291
|
},
|
|
5231
5292
|
{
|
|
5232
5293
|
action: "jira.issue.update",
|
|
5233
|
-
resource_type: "jira:
|
|
5294
|
+
resource_type: "jira:project",
|
|
5234
5295
|
required_relations: ["editor", "act_as"],
|
|
5235
5296
|
required_scopes: ["write:jira-work"],
|
|
5236
5297
|
capability: "jira.write.basic",
|
|
@@ -5240,9 +5301,9 @@ var ACTION_REGISTRY = {
|
|
|
5240
5301
|
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5241
5302
|
summary: { type: "string" },
|
|
5242
5303
|
description: { type: "string" },
|
|
5243
|
-
status: { type: "string" },
|
|
5244
5304
|
priority: { type: "string" },
|
|
5245
|
-
|
|
5305
|
+
assigneeAccountId: { type: "string" },
|
|
5306
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5246
5307
|
},
|
|
5247
5308
|
required: ["issueIdOrKey"],
|
|
5248
5309
|
additionalProperties: false
|
|
@@ -5251,13 +5312,13 @@ var ACTION_REGISTRY = {
|
|
|
5251
5312
|
effects: ["Update:Issue"],
|
|
5252
5313
|
risk: "high",
|
|
5253
5314
|
target_bindings: {
|
|
5254
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5315
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5255
5316
|
},
|
|
5256
5317
|
version: "1.0.0"
|
|
5257
5318
|
},
|
|
5258
5319
|
{
|
|
5259
5320
|
action: "jira.issue.delete",
|
|
5260
|
-
resource_type: "jira:
|
|
5321
|
+
resource_type: "jira:project",
|
|
5261
5322
|
required_relations: ["admin", "owner", "act_as"],
|
|
5262
5323
|
required_scopes: ["write:jira-work"],
|
|
5263
5324
|
capability: "jira.write.basic",
|
|
@@ -5273,7 +5334,98 @@ var ACTION_REGISTRY = {
|
|
|
5273
5334
|
effects: ["Delete:Issue"],
|
|
5274
5335
|
risk: "high",
|
|
5275
5336
|
target_bindings: {
|
|
5276
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5337
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5338
|
+
},
|
|
5339
|
+
version: "1.0.0"
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
action: "jira.comment.create",
|
|
5343
|
+
resource_type: "jira:project",
|
|
5344
|
+
required_relations: ["editor", "act_as"],
|
|
5345
|
+
required_scopes: ["write:jira-work"],
|
|
5346
|
+
capability: "jira.write.basic",
|
|
5347
|
+
input_schema: {
|
|
5348
|
+
type: "object",
|
|
5349
|
+
properties: {
|
|
5350
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5351
|
+
body: { type: "string", minLength: 1 }
|
|
5352
|
+
},
|
|
5353
|
+
required: ["issueIdOrKey", "body"],
|
|
5354
|
+
additionalProperties: false
|
|
5355
|
+
},
|
|
5356
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5357
|
+
effects: ["Create:Comment"],
|
|
5358
|
+
// high: comments are publicly visible to all project members, consistent with jira.issue.update
|
|
5359
|
+
risk: "high",
|
|
5360
|
+
target_bindings: {
|
|
5361
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5362
|
+
},
|
|
5363
|
+
version: "1.0.0"
|
|
5364
|
+
},
|
|
5365
|
+
{
|
|
5366
|
+
action: "jira.comment.read",
|
|
5367
|
+
resource_type: "jira:project",
|
|
5368
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5369
|
+
required_scopes: ["read:jira-work"],
|
|
5370
|
+
capability: "jira.read.basic",
|
|
5371
|
+
input_schema: {
|
|
5372
|
+
type: "object",
|
|
5373
|
+
properties: {
|
|
5374
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5375
|
+
},
|
|
5376
|
+
required: ["issueIdOrKey"],
|
|
5377
|
+
additionalProperties: false
|
|
5378
|
+
},
|
|
5379
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5380
|
+
effects: ["Read:Comment"],
|
|
5381
|
+
risk: "low",
|
|
5382
|
+
target_bindings: {
|
|
5383
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5384
|
+
},
|
|
5385
|
+
version: "1.0.0"
|
|
5386
|
+
},
|
|
5387
|
+
{
|
|
5388
|
+
action: "jira.issue.transition",
|
|
5389
|
+
resource_type: "jira:project",
|
|
5390
|
+
required_relations: ["editor", "act_as"],
|
|
5391
|
+
required_scopes: ["write:jira-work"],
|
|
5392
|
+
capability: "jira.write.basic",
|
|
5393
|
+
input_schema: {
|
|
5394
|
+
type: "object",
|
|
5395
|
+
properties: {
|
|
5396
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5397
|
+
transitionId: { type: "string", minLength: 1 }
|
|
5398
|
+
},
|
|
5399
|
+
required: ["issueIdOrKey", "transitionId"],
|
|
5400
|
+
additionalProperties: false
|
|
5401
|
+
},
|
|
5402
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5403
|
+
effects: ["Update:IssueStatus"],
|
|
5404
|
+
risk: "high",
|
|
5405
|
+
target_bindings: {
|
|
5406
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5407
|
+
},
|
|
5408
|
+
version: "1.0.0"
|
|
5409
|
+
},
|
|
5410
|
+
{
|
|
5411
|
+
action: "jira.transition.list",
|
|
5412
|
+
resource_type: "jira:project",
|
|
5413
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5414
|
+
required_scopes: ["read:jira-work"],
|
|
5415
|
+
capability: "jira.read.basic",
|
|
5416
|
+
input_schema: {
|
|
5417
|
+
type: "object",
|
|
5418
|
+
properties: {
|
|
5419
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5420
|
+
},
|
|
5421
|
+
required: ["issueIdOrKey"],
|
|
5422
|
+
additionalProperties: false
|
|
5423
|
+
},
|
|
5424
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5425
|
+
effects: ["Read:Transition"],
|
|
5426
|
+
risk: "low",
|
|
5427
|
+
target_bindings: {
|
|
5428
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5277
5429
|
},
|
|
5278
5430
|
version: "1.0.0"
|
|
5279
5431
|
},
|
|
@@ -5390,7 +5542,7 @@ var ACTION_REGISTRY = {
|
|
|
5390
5542
|
{
|
|
5391
5543
|
capability: "slack.read.basic",
|
|
5392
5544
|
description: "Read channels, messages, and user info",
|
|
5393
|
-
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.batch.read"],
|
|
5545
|
+
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.message.read_paginated", "slack.batch.read"],
|
|
5394
5546
|
version: "1.0.0"
|
|
5395
5547
|
},
|
|
5396
5548
|
{
|
|
@@ -5438,13 +5590,13 @@ var ACTION_REGISTRY = {
|
|
|
5438
5590
|
{
|
|
5439
5591
|
capability: "jira.read.basic",
|
|
5440
5592
|
description: "Read Jira issues, projects, boards, and sprints",
|
|
5441
|
-
includes: ["jira.project.read", "jira.board.read", "jira.sprint.read", "jira.issue.list", "jira.issue.search", "jira.worklog.read", "jira.issue.read", "jira.batch.read"],
|
|
5593
|
+
includes: ["jira.project.read", "jira.board.read", "jira.sprint.read", "jira.issue.list", "jira.issue.search", "jira.worklog.read", "jira.issue.read", "jira.batch.read", "jira.comment.read", "jira.transition.list"],
|
|
5442
5594
|
version: "1.0.0"
|
|
5443
5595
|
},
|
|
5444
5596
|
{
|
|
5445
5597
|
capability: "jira.write.basic",
|
|
5446
5598
|
description: "Create, update, and delete Jira issues",
|
|
5447
|
-
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete"],
|
|
5599
|
+
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete", "jira.comment.create", "jira.issue.transition"],
|
|
5448
5600
|
version: "1.0.0"
|
|
5449
5601
|
}
|
|
5450
5602
|
]
|
|
@@ -5609,7 +5761,164 @@ function normalizeMcpActionName(toolName, actionName) {
|
|
|
5609
5761
|
return actionName;
|
|
5610
5762
|
}
|
|
5611
5763
|
|
|
5764
|
+
// src/registry/action-summary.ts
|
|
5765
|
+
var ACTION_DISPLAY_CONFIGS = {
|
|
5766
|
+
"slack.message.post": {
|
|
5767
|
+
summaryTemplate: (p) => {
|
|
5768
|
+
const parts = [];
|
|
5769
|
+
if (p.channel) parts.push(p.channel + ":");
|
|
5770
|
+
if (p.text) parts.push(String(p.text));
|
|
5771
|
+
return parts.join(" ");
|
|
5772
|
+
},
|
|
5773
|
+
displayFields: [
|
|
5774
|
+
{ key: "channel", label: "Channel" },
|
|
5775
|
+
{ key: "text", label: "Message" }
|
|
5776
|
+
]
|
|
5777
|
+
},
|
|
5778
|
+
"gmail.message.send": {
|
|
5779
|
+
summaryTemplate: (p) => {
|
|
5780
|
+
const parts = [];
|
|
5781
|
+
if (p.to) parts.push(`To: ${p.to}`);
|
|
5782
|
+
if (p.subject) parts.push(`Subject: ${p.subject}`);
|
|
5783
|
+
return parts.join(", ");
|
|
5784
|
+
},
|
|
5785
|
+
displayFields: [
|
|
5786
|
+
{ key: "to", label: "To" },
|
|
5787
|
+
{ key: "subject", label: "Subject" },
|
|
5788
|
+
{ key: "body", label: "Body" }
|
|
5789
|
+
]
|
|
5790
|
+
},
|
|
5791
|
+
"gmail.draft.create": {
|
|
5792
|
+
summaryTemplate: (p) => {
|
|
5793
|
+
const parts = [];
|
|
5794
|
+
if (p.to) parts.push(`To: ${p.to}`);
|
|
5795
|
+
if (p.subject) parts.push(`Subject: ${p.subject}`);
|
|
5796
|
+
return parts.join(", ");
|
|
5797
|
+
},
|
|
5798
|
+
displayFields: [
|
|
5799
|
+
{ key: "to", label: "To" },
|
|
5800
|
+
{ key: "subject", label: "Subject" },
|
|
5801
|
+
{ key: "body", label: "Body" }
|
|
5802
|
+
]
|
|
5803
|
+
},
|
|
5804
|
+
"calendar.event.create": {
|
|
5805
|
+
summaryTemplate: (p) => {
|
|
5806
|
+
const parts = [];
|
|
5807
|
+
if (p.summary) parts.push(p.summary);
|
|
5808
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5809
|
+
return parts.join(" ");
|
|
5810
|
+
},
|
|
5811
|
+
displayFields: [
|
|
5812
|
+
{ key: "summary", label: "Event" },
|
|
5813
|
+
{ key: "start", label: "Start" },
|
|
5814
|
+
{ key: "end", label: "End" },
|
|
5815
|
+
{ key: "attendees", label: "Attendees" }
|
|
5816
|
+
]
|
|
5817
|
+
},
|
|
5818
|
+
"calendar.event.update": {
|
|
5819
|
+
summaryTemplate: (p) => {
|
|
5820
|
+
const parts = [];
|
|
5821
|
+
if (p.summary) parts.push(p.summary);
|
|
5822
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5823
|
+
return parts.join(" ");
|
|
5824
|
+
},
|
|
5825
|
+
displayFields: [
|
|
5826
|
+
{ key: "summary", label: "Event" },
|
|
5827
|
+
{ key: "start", label: "Start" },
|
|
5828
|
+
{ key: "end", label: "End" },
|
|
5829
|
+
{ key: "attendees", label: "Attendees" }
|
|
5830
|
+
]
|
|
5831
|
+
},
|
|
5832
|
+
"jira.issue.create": {
|
|
5833
|
+
summaryTemplate: (p) => {
|
|
5834
|
+
const parts = [];
|
|
5835
|
+
if (p.project) parts.push(`${p.project}:`);
|
|
5836
|
+
if (p.summary) parts.push(p.summary);
|
|
5837
|
+
return parts.join(" ");
|
|
5838
|
+
},
|
|
5839
|
+
displayFields: [
|
|
5840
|
+
{ key: "project", label: "Project" },
|
|
5841
|
+
{ key: "issuetype", label: "Type" },
|
|
5842
|
+
{ key: "summary", label: "Summary" },
|
|
5843
|
+
{ key: "description", label: "Description" }
|
|
5844
|
+
]
|
|
5845
|
+
},
|
|
5846
|
+
"jira.issue.update": {
|
|
5847
|
+
summaryTemplate: (p) => {
|
|
5848
|
+
const parts = [];
|
|
5849
|
+
if (p.issueKey) parts.push(`${p.issueKey}:`);
|
|
5850
|
+
if (p.summary) parts.push(p.summary);
|
|
5851
|
+
return parts.join(" ");
|
|
5852
|
+
},
|
|
5853
|
+
displayFields: [
|
|
5854
|
+
{ key: "issueKey", label: "Issue" },
|
|
5855
|
+
{ key: "summary", label: "Summary" },
|
|
5856
|
+
{ key: "description", label: "Description" }
|
|
5857
|
+
]
|
|
5858
|
+
}
|
|
5859
|
+
};
|
|
5860
|
+
function truncate(text, maxLength) {
|
|
5861
|
+
if (text.length <= maxLength) return text;
|
|
5862
|
+
return text.slice(0, maxLength - 3) + "...";
|
|
5863
|
+
}
|
|
5864
|
+
function formatValue(value) {
|
|
5865
|
+
if (value === null || value === void 0) return "";
|
|
5866
|
+
if (Array.isArray(value)) {
|
|
5867
|
+
return value.map((item) => {
|
|
5868
|
+
if (item && typeof item === "object") {
|
|
5869
|
+
const email = item.email;
|
|
5870
|
+
if (email) return String(email);
|
|
5871
|
+
return JSON.stringify(item);
|
|
5872
|
+
}
|
|
5873
|
+
return String(item);
|
|
5874
|
+
}).join(", ");
|
|
5875
|
+
}
|
|
5876
|
+
if (typeof value === "object") {
|
|
5877
|
+
const obj = value;
|
|
5878
|
+
if (obj.dateTime) {
|
|
5879
|
+
return obj.timeZone ? `${obj.dateTime} (${obj.timeZone})` : String(obj.dateTime);
|
|
5880
|
+
}
|
|
5881
|
+
if (obj.date) return String(obj.date);
|
|
5882
|
+
return JSON.stringify(value);
|
|
5883
|
+
}
|
|
5884
|
+
return String(value);
|
|
5885
|
+
}
|
|
5886
|
+
var ACTION_PARAMS_MAX_SIZE = 1e4;
|
|
5887
|
+
function generateActionSummary(action, params, maxLength = 50) {
|
|
5888
|
+
if (!params || Object.keys(params).length === 0) return "";
|
|
5889
|
+
const config = ACTION_DISPLAY_CONFIGS[action];
|
|
5890
|
+
if (config) {
|
|
5891
|
+
const raw = config.summaryTemplate(params);
|
|
5892
|
+
return raw ? truncate(raw, maxLength) : "";
|
|
5893
|
+
}
|
|
5894
|
+
for (const [key, val] of Object.entries(params)) {
|
|
5895
|
+
if (val !== null && val !== void 0 && typeof val !== "object") {
|
|
5896
|
+
return truncate(`${key}: ${String(val)}`, maxLength);
|
|
5897
|
+
}
|
|
5898
|
+
}
|
|
5899
|
+
return "";
|
|
5900
|
+
}
|
|
5901
|
+
function generateActionParamsDisplay(action, params) {
|
|
5902
|
+
if (!params || Object.keys(params).length === 0) return [];
|
|
5903
|
+
const config = ACTION_DISPLAY_CONFIGS[action];
|
|
5904
|
+
if (config) {
|
|
5905
|
+
return config.displayFields.filter((f) => params[f.key] !== void 0 && params[f.key] !== null).map((f) => ({
|
|
5906
|
+
label: f.label,
|
|
5907
|
+
value: formatValue(params[f.key])
|
|
5908
|
+
}));
|
|
5909
|
+
}
|
|
5910
|
+
return Object.entries(params).filter(([, v]) => v !== void 0 && v !== null).slice(0, 3).map(([key, val]) => ({
|
|
5911
|
+
label: key,
|
|
5912
|
+
value: formatValue(val)
|
|
5913
|
+
}));
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5612
5916
|
// src/resolver/target-resolver.ts
|
|
5917
|
+
var PROJECT_KEY_PATTERN = /^([A-Z][A-Z0-9_]+)-\d+$/;
|
|
5918
|
+
function extractProjectKey(value) {
|
|
5919
|
+
const match = value.match(PROJECT_KEY_PATTERN);
|
|
5920
|
+
return match ? match[1] : null;
|
|
5921
|
+
}
|
|
5613
5922
|
var TargetResolver = class {
|
|
5614
5923
|
/**
|
|
5615
5924
|
* Resolve target bindings against tool invocation parameters.
|
|
@@ -5637,20 +5946,27 @@ var TargetResolver = class {
|
|
|
5637
5946
|
}
|
|
5638
5947
|
const paramBinding = binding;
|
|
5639
5948
|
let rawValue = params[paramBinding.param];
|
|
5949
|
+
if (rawValue == null && paramBinding.fallback_param) {
|
|
5950
|
+
rawValue = params[paramBinding.fallback_param];
|
|
5951
|
+
}
|
|
5640
5952
|
if (rawValue == null && paramBinding.default != null) {
|
|
5641
5953
|
rawValue = paramBinding.default;
|
|
5642
5954
|
}
|
|
5643
5955
|
if (rawValue == null) return { value: null };
|
|
5644
5956
|
if (typeof rawValue !== "string") return { value: null };
|
|
5957
|
+
let strValue = rawValue;
|
|
5958
|
+
if (paramBinding.derive === "project_key") {
|
|
5959
|
+
strValue = extractProjectKey(strValue) ?? strValue;
|
|
5960
|
+
}
|
|
5645
5961
|
if (paramBinding.multi) {
|
|
5646
5962
|
const separator = paramBinding.separator ?? ",";
|
|
5647
|
-
const values =
|
|
5963
|
+
const values = strValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
|
|
5648
5964
|
return {
|
|
5649
5965
|
value: values[0] ?? null,
|
|
5650
5966
|
values
|
|
5651
5967
|
};
|
|
5652
5968
|
}
|
|
5653
|
-
return { value:
|
|
5969
|
+
return { value: strValue };
|
|
5654
5970
|
}
|
|
5655
5971
|
resolveSecondary(secondary, params, context) {
|
|
5656
5972
|
if (!secondary || secondary.length === 0) return [];
|
|
@@ -5702,6 +6018,7 @@ function getTierLimits(tier) {
|
|
|
5702
6018
|
// src/index.ts
|
|
5703
6019
|
var version = "0.0.1";
|
|
5704
6020
|
export {
|
|
6021
|
+
ACTION_PARAMS_MAX_SIZE,
|
|
5705
6022
|
ACTION_PREFIXES,
|
|
5706
6023
|
ACTION_REGISTRY,
|
|
5707
6024
|
AIdentityClient,
|
|
@@ -5767,8 +6084,11 @@ export {
|
|
|
5767
6084
|
credentialStatusToVCStatus,
|
|
5768
6085
|
defaultConstraintEvaluator,
|
|
5769
6086
|
evaluateConstraints,
|
|
6087
|
+
extractProjectKey,
|
|
5770
6088
|
extractPublicKey,
|
|
5771
6089
|
extractPublicKeyFromDid,
|
|
6090
|
+
generateActionParamsDisplay,
|
|
6091
|
+
generateActionSummary,
|
|
5772
6092
|
generateKeyPair,
|
|
5773
6093
|
generateNonce,
|
|
5774
6094
|
getActionAliases,
|