@vess-id/ai-identity 0.9.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 +808 -97
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +226 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -44
- 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.map +1 -1
- 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
|
]
|
|
@@ -5653,7 +5805,7 @@ var ACTION_DISPLAY_CONFIGS = {
|
|
|
5653
5805
|
summaryTemplate: (p) => {
|
|
5654
5806
|
const parts = [];
|
|
5655
5807
|
if (p.summary) parts.push(p.summary);
|
|
5656
|
-
if (p.start) parts.push(`(${p.start})`);
|
|
5808
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5657
5809
|
return parts.join(" ");
|
|
5658
5810
|
},
|
|
5659
5811
|
displayFields: [
|
|
@@ -5667,7 +5819,7 @@ var ACTION_DISPLAY_CONFIGS = {
|
|
|
5667
5819
|
summaryTemplate: (p) => {
|
|
5668
5820
|
const parts = [];
|
|
5669
5821
|
if (p.summary) parts.push(p.summary);
|
|
5670
|
-
if (p.start) parts.push(`(${p.start})`);
|
|
5822
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5671
5823
|
return parts.join(" ");
|
|
5672
5824
|
},
|
|
5673
5825
|
displayFields: [
|
|
@@ -5711,8 +5863,24 @@ function truncate(text, maxLength) {
|
|
|
5711
5863
|
}
|
|
5712
5864
|
function formatValue(value) {
|
|
5713
5865
|
if (value === null || value === void 0) return "";
|
|
5714
|
-
if (Array.isArray(value))
|
|
5715
|
-
|
|
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
|
+
}
|
|
5716
5884
|
return String(value);
|
|
5717
5885
|
}
|
|
5718
5886
|
var ACTION_PARAMS_MAX_SIZE = 1e4;
|
|
@@ -5746,6 +5914,11 @@ function generateActionParamsDisplay(action, params) {
|
|
|
5746
5914
|
}
|
|
5747
5915
|
|
|
5748
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
|
+
}
|
|
5749
5922
|
var TargetResolver = class {
|
|
5750
5923
|
/**
|
|
5751
5924
|
* Resolve target bindings against tool invocation parameters.
|
|
@@ -5773,20 +5946,27 @@ var TargetResolver = class {
|
|
|
5773
5946
|
}
|
|
5774
5947
|
const paramBinding = binding;
|
|
5775
5948
|
let rawValue = params[paramBinding.param];
|
|
5949
|
+
if (rawValue == null && paramBinding.fallback_param) {
|
|
5950
|
+
rawValue = params[paramBinding.fallback_param];
|
|
5951
|
+
}
|
|
5776
5952
|
if (rawValue == null && paramBinding.default != null) {
|
|
5777
5953
|
rawValue = paramBinding.default;
|
|
5778
5954
|
}
|
|
5779
5955
|
if (rawValue == null) return { value: null };
|
|
5780
5956
|
if (typeof rawValue !== "string") return { value: null };
|
|
5957
|
+
let strValue = rawValue;
|
|
5958
|
+
if (paramBinding.derive === "project_key") {
|
|
5959
|
+
strValue = extractProjectKey(strValue) ?? strValue;
|
|
5960
|
+
}
|
|
5781
5961
|
if (paramBinding.multi) {
|
|
5782
5962
|
const separator = paramBinding.separator ?? ",";
|
|
5783
|
-
const values =
|
|
5963
|
+
const values = strValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
|
|
5784
5964
|
return {
|
|
5785
5965
|
value: values[0] ?? null,
|
|
5786
5966
|
values
|
|
5787
5967
|
};
|
|
5788
5968
|
}
|
|
5789
|
-
return { value:
|
|
5969
|
+
return { value: strValue };
|
|
5790
5970
|
}
|
|
5791
5971
|
resolveSecondary(secondary, params, context) {
|
|
5792
5972
|
if (!secondary || secondary.length === 0) return [];
|
|
@@ -5904,6 +6084,7 @@ export {
|
|
|
5904
6084
|
credentialStatusToVCStatus,
|
|
5905
6085
|
defaultConstraintEvaluator,
|
|
5906
6086
|
evaluateConstraints,
|
|
6087
|
+
extractProjectKey,
|
|
5907
6088
|
extractPublicKey,
|
|
5908
6089
|
extractPublicKeyFromDid,
|
|
5909
6090
|
generateActionParamsDisplay,
|