@vess-id/ai-identity 0.9.0 → 0.11.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 +936 -111
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +234 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -46
- package/dist/index.mjs.map +1 -1
- package/dist/registry/action-registry-json.d.ts +910 -97
- 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.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type { ActionParamDisplay } from './registry/action-summary';
|
|
|
27
27
|
export { generateKeyPair, signJWT, verifyJWT, generateNonce } from './utils/crypto';
|
|
28
28
|
export { SDJwtClient } from './utils/sdjwt-client';
|
|
29
29
|
export { createDidJwk, extractPublicKey, extractPublicKeyFromDid, isValidDidJwk, getKeyIdFromDid, publicKeysMatch, } from './did/did-utils';
|
|
30
|
-
export { TargetResolver } from './resolver/target-resolver';
|
|
30
|
+
export { TargetResolver, extractProjectKey } from './resolver/target-resolver';
|
|
31
31
|
export * from './types';
|
|
32
32
|
export { isWriteAction, WRITE_ACTION_NAMES } from './utils/action-classifier';
|
|
33
33
|
export { resolveUserTier, getTierLimits, isUnlimited } from './utils/tier-utils';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGrD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAGrD,OA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,4BAA4B,CAAA;AAG9E,cAAc,SAAS,CAAA;AAGvB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAG7E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhF,eAAO,MAAM,OAAO,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ __export(index_exports, {
|
|
|
96
96
|
credentialStatusToVCStatus: () => credentialStatusToVCStatus,
|
|
97
97
|
defaultConstraintEvaluator: () => defaultConstraintEvaluator,
|
|
98
98
|
evaluateConstraints: () => evaluateConstraints,
|
|
99
|
+
extractProjectKey: () => extractProjectKey,
|
|
99
100
|
extractPublicKey: () => extractPublicKey,
|
|
100
101
|
extractPublicKeyFromDid: () => extractPublicKeyFromDid,
|
|
101
102
|
generateActionParamsDisplay: () => generateActionParamsDisplay,
|
|
@@ -2119,7 +2120,7 @@ var ToolManager = class {
|
|
|
2119
2120
|
projectKey: "string",
|
|
2120
2121
|
summary: "string",
|
|
2121
2122
|
description: "string?",
|
|
2122
|
-
|
|
2123
|
+
issueTypeName: "string",
|
|
2123
2124
|
priority: "string?",
|
|
2124
2125
|
assignee: "string?"
|
|
2125
2126
|
}
|
|
@@ -4686,11 +4687,39 @@ var ACTION_REGISTRY = {
|
|
|
4686
4687
|
},
|
|
4687
4688
|
version: "1.0.0"
|
|
4688
4689
|
},
|
|
4690
|
+
{
|
|
4691
|
+
action: "slack.message.read_paginated",
|
|
4692
|
+
resource_type: "slack:channel",
|
|
4693
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4694
|
+
required_scopes: ["channels:history", "groups:history"],
|
|
4695
|
+
capability: "slack.read.basic",
|
|
4696
|
+
input_schema: {
|
|
4697
|
+
type: "object",
|
|
4698
|
+
properties: {
|
|
4699
|
+
channel: { type: "string", description: "Channel ID, channel name, or channel name with # prefix" },
|
|
4700
|
+
cursor: { type: "string", description: "Pagination cursor from previous response" },
|
|
4701
|
+
limit: { type: "integer", minimum: 1, maximum: 30 }
|
|
4702
|
+
},
|
|
4703
|
+
required: ["channel"],
|
|
4704
|
+
additionalProperties: false
|
|
4705
|
+
},
|
|
4706
|
+
constraints: { rate_bucket: "slack.read" },
|
|
4707
|
+
effects: ["Read:Message"],
|
|
4708
|
+
risk: "low",
|
|
4709
|
+
target_bindings: {
|
|
4710
|
+
resource_id: { source: "param", param: "channel" }
|
|
4711
|
+
},
|
|
4712
|
+
version: "1.0.0"
|
|
4713
|
+
},
|
|
4689
4714
|
{
|
|
4690
4715
|
action: "slack.batch.read",
|
|
4691
4716
|
resource_type: "slack:channel",
|
|
4692
4717
|
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4693
|
-
|
|
4718
|
+
// Documentation only — NOT used for runtime access control.
|
|
4719
|
+
// Actual permission granting uses parseSlackScopes (oauth.service.ts) with OR-logic:
|
|
4720
|
+
// any read scope + any history scope grants slack.batch.read.
|
|
4721
|
+
// Tokens with partial scopes (e.g. channels:read + channels:history) will still receive this permission.
|
|
4722
|
+
required_scopes: ["channels:read", "groups:read", "im:read", "mpim:read", "channels:history", "groups:history", "im:history", "mpim:history"],
|
|
4694
4723
|
capability: "slack.read.basic",
|
|
4695
4724
|
input_schema: {
|
|
4696
4725
|
type: "object",
|
|
@@ -4915,7 +4944,10 @@ var ACTION_REGISTRY = {
|
|
|
4915
4944
|
subject: { type: "string", minLength: 1 },
|
|
4916
4945
|
body: { type: "string", minLength: 1 },
|
|
4917
4946
|
cc: { type: "string" },
|
|
4918
|
-
bcc: { type: "string" }
|
|
4947
|
+
bcc: { type: "string" },
|
|
4948
|
+
threadId: { type: "string" },
|
|
4949
|
+
inReplyTo: { type: "string" },
|
|
4950
|
+
references: { type: "string" }
|
|
4919
4951
|
},
|
|
4920
4952
|
required: ["to", "subject", "body"],
|
|
4921
4953
|
additionalProperties: false
|
|
@@ -4945,7 +4977,10 @@ var ACTION_REGISTRY = {
|
|
|
4945
4977
|
subject: { type: "string", minLength: 1 },
|
|
4946
4978
|
body: { type: "string", minLength: 1 },
|
|
4947
4979
|
cc: { type: "string" },
|
|
4948
|
-
bcc: { type: "string" }
|
|
4980
|
+
bcc: { type: "string" },
|
|
4981
|
+
threadId: { type: "string" },
|
|
4982
|
+
inReplyTo: { type: "string" },
|
|
4983
|
+
references: { type: "string" }
|
|
4949
4984
|
},
|
|
4950
4985
|
required: ["to", "subject", "body"],
|
|
4951
4986
|
additionalProperties: false
|
|
@@ -5062,10 +5097,10 @@ var ACTION_REGISTRY = {
|
|
|
5062
5097
|
input_schema: {
|
|
5063
5098
|
type: "object",
|
|
5064
5099
|
properties: {
|
|
5065
|
-
calendarId: { type: "string" },
|
|
5066
|
-
timeMin: { type: "string" },
|
|
5067
|
-
timeMax: { type: "string" },
|
|
5068
|
-
maxResults: { type: "integer", minimum: 1, maximum: 2500 }
|
|
5100
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5101
|
+
timeMin: { type: "string", description: 'Lower bound (inclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-15T00:00:00Z"' },
|
|
5102
|
+
timeMax: { type: "string", description: 'Upper bound (exclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-16T00:00:00Z"' },
|
|
5103
|
+
maxResults: { type: "integer", minimum: 1, maximum: 2500, description: "Maximum number of events to return" }
|
|
5069
5104
|
},
|
|
5070
5105
|
additionalProperties: false
|
|
5071
5106
|
},
|
|
@@ -5109,13 +5144,29 @@ var ACTION_REGISTRY = {
|
|
|
5109
5144
|
input_schema: {
|
|
5110
5145
|
type: "object",
|
|
5111
5146
|
properties: {
|
|
5112
|
-
calendarId: { type: "string" },
|
|
5113
|
-
summary: { type: "string", minLength: 1 },
|
|
5114
|
-
description: { type: "string" },
|
|
5115
|
-
start: {
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5147
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5148
|
+
summary: { type: "string", minLength: 1, description: "Event title" },
|
|
5149
|
+
description: { type: "string", description: "Event description" },
|
|
5150
|
+
start: {
|
|
5151
|
+
type: "object",
|
|
5152
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5153
|
+
properties: {
|
|
5154
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5155
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5156
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5157
|
+
}
|
|
5158
|
+
},
|
|
5159
|
+
end: {
|
|
5160
|
+
type: "object",
|
|
5161
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5162
|
+
properties: {
|
|
5163
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5164
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5165
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5166
|
+
}
|
|
5167
|
+
},
|
|
5168
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5169
|
+
location: { type: "string", description: "Event location" }
|
|
5119
5170
|
},
|
|
5120
5171
|
required: ["summary", "start", "end"],
|
|
5121
5172
|
additionalProperties: false
|
|
@@ -5140,14 +5191,30 @@ var ACTION_REGISTRY = {
|
|
|
5140
5191
|
input_schema: {
|
|
5141
5192
|
type: "object",
|
|
5142
5193
|
properties: {
|
|
5143
|
-
calendarId: { type: "string" },
|
|
5144
|
-
eventId: { type: "string", minLength: 1 },
|
|
5145
|
-
summary: { type: "string" },
|
|
5146
|
-
description: { type: "string" },
|
|
5147
|
-
start: {
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5194
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5195
|
+
eventId: { type: "string", minLength: 1, description: "Event ID to update" },
|
|
5196
|
+
summary: { type: "string", description: "Event title" },
|
|
5197
|
+
description: { type: "string", description: "Event description" },
|
|
5198
|
+
start: {
|
|
5199
|
+
type: "object",
|
|
5200
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5201
|
+
properties: {
|
|
5202
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5203
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5204
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5205
|
+
}
|
|
5206
|
+
},
|
|
5207
|
+
end: {
|
|
5208
|
+
type: "object",
|
|
5209
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5210
|
+
properties: {
|
|
5211
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5212
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5213
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5214
|
+
}
|
|
5215
|
+
},
|
|
5216
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5217
|
+
location: { type: "string", description: "Event location" }
|
|
5151
5218
|
},
|
|
5152
5219
|
required: ["eventId"],
|
|
5153
5220
|
additionalProperties: false
|
|
@@ -5156,7 +5223,7 @@ var ACTION_REGISTRY = {
|
|
|
5156
5223
|
effects: ["Update:Event"],
|
|
5157
5224
|
risk: "medium",
|
|
5158
5225
|
target_bindings: {
|
|
5159
|
-
resource_id: { source: "param", param: "
|
|
5226
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" },
|
|
5160
5227
|
secondary: [
|
|
5161
5228
|
{ name: "attendees", source: { source: "param", param: "attendees" }, type: "participant" }
|
|
5162
5229
|
]
|
|
@@ -5182,7 +5249,7 @@ var ACTION_REGISTRY = {
|
|
|
5182
5249
|
effects: ["Delete:Event"],
|
|
5183
5250
|
risk: "high",
|
|
5184
5251
|
target_bindings: {
|
|
5185
|
-
resource_id: { source: "param", param: "
|
|
5252
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" }
|
|
5186
5253
|
},
|
|
5187
5254
|
version: "1.0.0"
|
|
5188
5255
|
},
|
|
@@ -5318,7 +5385,7 @@ var ACTION_REGISTRY = {
|
|
|
5318
5385
|
effects: ["Read:Worklog"],
|
|
5319
5386
|
risk: "low",
|
|
5320
5387
|
target_bindings: {
|
|
5321
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5388
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5322
5389
|
},
|
|
5323
5390
|
version: "1.0.0"
|
|
5324
5391
|
},
|
|
@@ -5340,13 +5407,13 @@ var ACTION_REGISTRY = {
|
|
|
5340
5407
|
effects: ["Read:Issue"],
|
|
5341
5408
|
risk: "low",
|
|
5342
5409
|
target_bindings: {
|
|
5343
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5410
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5344
5411
|
},
|
|
5345
5412
|
version: "1.0.0"
|
|
5346
5413
|
},
|
|
5347
5414
|
{
|
|
5348
5415
|
action: "jira.issue.create",
|
|
5349
|
-
resource_type: "jira:
|
|
5416
|
+
resource_type: "jira:project",
|
|
5350
5417
|
required_relations: ["editor", "act_as"],
|
|
5351
5418
|
required_scopes: ["write:jira-work"],
|
|
5352
5419
|
capability: "jira.write.basic",
|
|
@@ -5356,11 +5423,12 @@ var ACTION_REGISTRY = {
|
|
|
5356
5423
|
projectKey: { type: "string", minLength: 1 },
|
|
5357
5424
|
summary: { type: "string", minLength: 1 },
|
|
5358
5425
|
description: { type: "string" },
|
|
5359
|
-
|
|
5426
|
+
issueTypeName: { type: "string", minLength: 1, description: "Issue type name (default: Task)" },
|
|
5360
5427
|
priority: { type: "string" },
|
|
5361
|
-
|
|
5428
|
+
assigneeAccountId: { type: "string" },
|
|
5429
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5362
5430
|
},
|
|
5363
|
-
required: ["projectKey", "summary"
|
|
5431
|
+
required: ["projectKey", "summary"],
|
|
5364
5432
|
additionalProperties: false
|
|
5365
5433
|
},
|
|
5366
5434
|
constraints: { rate_bucket: "jira.write" },
|
|
@@ -5373,7 +5441,7 @@ var ACTION_REGISTRY = {
|
|
|
5373
5441
|
},
|
|
5374
5442
|
{
|
|
5375
5443
|
action: "jira.issue.update",
|
|
5376
|
-
resource_type: "jira:
|
|
5444
|
+
resource_type: "jira:project",
|
|
5377
5445
|
required_relations: ["editor", "act_as"],
|
|
5378
5446
|
required_scopes: ["write:jira-work"],
|
|
5379
5447
|
capability: "jira.write.basic",
|
|
@@ -5383,9 +5451,9 @@ var ACTION_REGISTRY = {
|
|
|
5383
5451
|
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5384
5452
|
summary: { type: "string" },
|
|
5385
5453
|
description: { type: "string" },
|
|
5386
|
-
status: { type: "string" },
|
|
5387
5454
|
priority: { type: "string" },
|
|
5388
|
-
|
|
5455
|
+
assigneeAccountId: { type: "string" },
|
|
5456
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5389
5457
|
},
|
|
5390
5458
|
required: ["issueIdOrKey"],
|
|
5391
5459
|
additionalProperties: false
|
|
@@ -5394,13 +5462,13 @@ var ACTION_REGISTRY = {
|
|
|
5394
5462
|
effects: ["Update:Issue"],
|
|
5395
5463
|
risk: "high",
|
|
5396
5464
|
target_bindings: {
|
|
5397
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5465
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5398
5466
|
},
|
|
5399
5467
|
version: "1.0.0"
|
|
5400
5468
|
},
|
|
5401
5469
|
{
|
|
5402
5470
|
action: "jira.issue.delete",
|
|
5403
|
-
resource_type: "jira:
|
|
5471
|
+
resource_type: "jira:project",
|
|
5404
5472
|
required_relations: ["admin", "owner", "act_as"],
|
|
5405
5473
|
required_scopes: ["write:jira-work"],
|
|
5406
5474
|
capability: "jira.write.basic",
|
|
@@ -5416,7 +5484,98 @@ var ACTION_REGISTRY = {
|
|
|
5416
5484
|
effects: ["Delete:Issue"],
|
|
5417
5485
|
risk: "high",
|
|
5418
5486
|
target_bindings: {
|
|
5419
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5487
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5488
|
+
},
|
|
5489
|
+
version: "1.0.0"
|
|
5490
|
+
},
|
|
5491
|
+
{
|
|
5492
|
+
action: "jira.comment.create",
|
|
5493
|
+
resource_type: "jira:project",
|
|
5494
|
+
required_relations: ["editor", "act_as"],
|
|
5495
|
+
required_scopes: ["write:jira-work"],
|
|
5496
|
+
capability: "jira.write.basic",
|
|
5497
|
+
input_schema: {
|
|
5498
|
+
type: "object",
|
|
5499
|
+
properties: {
|
|
5500
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5501
|
+
body: { type: "string", minLength: 1 }
|
|
5502
|
+
},
|
|
5503
|
+
required: ["issueIdOrKey", "body"],
|
|
5504
|
+
additionalProperties: false
|
|
5505
|
+
},
|
|
5506
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5507
|
+
effects: ["Create:Comment"],
|
|
5508
|
+
// high: comments are publicly visible to all project members, consistent with jira.issue.update
|
|
5509
|
+
risk: "high",
|
|
5510
|
+
target_bindings: {
|
|
5511
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5512
|
+
},
|
|
5513
|
+
version: "1.0.0"
|
|
5514
|
+
},
|
|
5515
|
+
{
|
|
5516
|
+
action: "jira.comment.read",
|
|
5517
|
+
resource_type: "jira:project",
|
|
5518
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5519
|
+
required_scopes: ["read:jira-work"],
|
|
5520
|
+
capability: "jira.read.basic",
|
|
5521
|
+
input_schema: {
|
|
5522
|
+
type: "object",
|
|
5523
|
+
properties: {
|
|
5524
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5525
|
+
},
|
|
5526
|
+
required: ["issueIdOrKey"],
|
|
5527
|
+
additionalProperties: false
|
|
5528
|
+
},
|
|
5529
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5530
|
+
effects: ["Read:Comment"],
|
|
5531
|
+
risk: "low",
|
|
5532
|
+
target_bindings: {
|
|
5533
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5534
|
+
},
|
|
5535
|
+
version: "1.0.0"
|
|
5536
|
+
},
|
|
5537
|
+
{
|
|
5538
|
+
action: "jira.issue.transition",
|
|
5539
|
+
resource_type: "jira:project",
|
|
5540
|
+
required_relations: ["editor", "act_as"],
|
|
5541
|
+
required_scopes: ["write:jira-work"],
|
|
5542
|
+
capability: "jira.write.basic",
|
|
5543
|
+
input_schema: {
|
|
5544
|
+
type: "object",
|
|
5545
|
+
properties: {
|
|
5546
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5547
|
+
transitionId: { type: "string", minLength: 1 }
|
|
5548
|
+
},
|
|
5549
|
+
required: ["issueIdOrKey", "transitionId"],
|
|
5550
|
+
additionalProperties: false
|
|
5551
|
+
},
|
|
5552
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5553
|
+
effects: ["Update:IssueStatus"],
|
|
5554
|
+
risk: "high",
|
|
5555
|
+
target_bindings: {
|
|
5556
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5557
|
+
},
|
|
5558
|
+
version: "1.0.0"
|
|
5559
|
+
},
|
|
5560
|
+
{
|
|
5561
|
+
action: "jira.transition.list",
|
|
5562
|
+
resource_type: "jira:project",
|
|
5563
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5564
|
+
required_scopes: ["read:jira-work"],
|
|
5565
|
+
capability: "jira.read.basic",
|
|
5566
|
+
input_schema: {
|
|
5567
|
+
type: "object",
|
|
5568
|
+
properties: {
|
|
5569
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5570
|
+
},
|
|
5571
|
+
required: ["issueIdOrKey"],
|
|
5572
|
+
additionalProperties: false
|
|
5573
|
+
},
|
|
5574
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5575
|
+
effects: ["Read:Transition"],
|
|
5576
|
+
risk: "low",
|
|
5577
|
+
target_bindings: {
|
|
5578
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5420
5579
|
},
|
|
5421
5580
|
version: "1.0.0"
|
|
5422
5581
|
},
|
|
@@ -5533,7 +5692,7 @@ var ACTION_REGISTRY = {
|
|
|
5533
5692
|
{
|
|
5534
5693
|
capability: "slack.read.basic",
|
|
5535
5694
|
description: "Read channels, messages, and user info",
|
|
5536
|
-
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.batch.read"],
|
|
5695
|
+
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.message.read_paginated", "slack.batch.read"],
|
|
5537
5696
|
version: "1.0.0"
|
|
5538
5697
|
},
|
|
5539
5698
|
{
|
|
@@ -5581,13 +5740,13 @@ var ACTION_REGISTRY = {
|
|
|
5581
5740
|
{
|
|
5582
5741
|
capability: "jira.read.basic",
|
|
5583
5742
|
description: "Read Jira issues, projects, boards, and sprints",
|
|
5584
|
-
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"],
|
|
5743
|
+
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"],
|
|
5585
5744
|
version: "1.0.0"
|
|
5586
5745
|
},
|
|
5587
5746
|
{
|
|
5588
5747
|
capability: "jira.write.basic",
|
|
5589
5748
|
description: "Create, update, and delete Jira issues",
|
|
5590
|
-
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete"],
|
|
5749
|
+
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete", "jira.comment.create", "jira.issue.transition"],
|
|
5591
5750
|
version: "1.0.0"
|
|
5592
5751
|
}
|
|
5593
5752
|
]
|
|
@@ -5796,7 +5955,7 @@ var ACTION_DISPLAY_CONFIGS = {
|
|
|
5796
5955
|
summaryTemplate: (p) => {
|
|
5797
5956
|
const parts = [];
|
|
5798
5957
|
if (p.summary) parts.push(p.summary);
|
|
5799
|
-
if (p.start) parts.push(`(${p.start})`);
|
|
5958
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5800
5959
|
return parts.join(" ");
|
|
5801
5960
|
},
|
|
5802
5961
|
displayFields: [
|
|
@@ -5810,7 +5969,7 @@ var ACTION_DISPLAY_CONFIGS = {
|
|
|
5810
5969
|
summaryTemplate: (p) => {
|
|
5811
5970
|
const parts = [];
|
|
5812
5971
|
if (p.summary) parts.push(p.summary);
|
|
5813
|
-
if (p.start) parts.push(`(${p.start})`);
|
|
5972
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5814
5973
|
return parts.join(" ");
|
|
5815
5974
|
},
|
|
5816
5975
|
displayFields: [
|
|
@@ -5854,8 +6013,24 @@ function truncate(text, maxLength) {
|
|
|
5854
6013
|
}
|
|
5855
6014
|
function formatValue(value) {
|
|
5856
6015
|
if (value === null || value === void 0) return "";
|
|
5857
|
-
if (Array.isArray(value))
|
|
5858
|
-
|
|
6016
|
+
if (Array.isArray(value)) {
|
|
6017
|
+
return value.map((item) => {
|
|
6018
|
+
if (item && typeof item === "object") {
|
|
6019
|
+
const email = item.email;
|
|
6020
|
+
if (email) return String(email);
|
|
6021
|
+
return JSON.stringify(item);
|
|
6022
|
+
}
|
|
6023
|
+
return String(item);
|
|
6024
|
+
}).join(", ");
|
|
6025
|
+
}
|
|
6026
|
+
if (typeof value === "object") {
|
|
6027
|
+
const obj = value;
|
|
6028
|
+
if (obj.dateTime) {
|
|
6029
|
+
return obj.timeZone ? `${obj.dateTime} (${obj.timeZone})` : String(obj.dateTime);
|
|
6030
|
+
}
|
|
6031
|
+
if (obj.date) return String(obj.date);
|
|
6032
|
+
return JSON.stringify(value);
|
|
6033
|
+
}
|
|
5859
6034
|
return String(value);
|
|
5860
6035
|
}
|
|
5861
6036
|
var ACTION_PARAMS_MAX_SIZE = 1e4;
|
|
@@ -5889,6 +6064,11 @@ function generateActionParamsDisplay(action, params) {
|
|
|
5889
6064
|
}
|
|
5890
6065
|
|
|
5891
6066
|
// src/resolver/target-resolver.ts
|
|
6067
|
+
var PROJECT_KEY_PATTERN = /^([A-Z][A-Z0-9_]+)-\d+$/;
|
|
6068
|
+
function extractProjectKey(value) {
|
|
6069
|
+
const match = value.match(PROJECT_KEY_PATTERN);
|
|
6070
|
+
return match ? match[1] : null;
|
|
6071
|
+
}
|
|
5892
6072
|
var TargetResolver = class {
|
|
5893
6073
|
/**
|
|
5894
6074
|
* Resolve target bindings against tool invocation parameters.
|
|
@@ -5916,20 +6096,27 @@ var TargetResolver = class {
|
|
|
5916
6096
|
}
|
|
5917
6097
|
const paramBinding = binding;
|
|
5918
6098
|
let rawValue = params[paramBinding.param];
|
|
6099
|
+
if (rawValue == null && paramBinding.fallback_param) {
|
|
6100
|
+
rawValue = params[paramBinding.fallback_param];
|
|
6101
|
+
}
|
|
5919
6102
|
if (rawValue == null && paramBinding.default != null) {
|
|
5920
6103
|
rawValue = paramBinding.default;
|
|
5921
6104
|
}
|
|
5922
6105
|
if (rawValue == null) return { value: null };
|
|
5923
6106
|
if (typeof rawValue !== "string") return { value: null };
|
|
6107
|
+
let strValue = rawValue;
|
|
6108
|
+
if (paramBinding.derive === "project_key") {
|
|
6109
|
+
strValue = extractProjectKey(strValue) ?? strValue;
|
|
6110
|
+
}
|
|
5924
6111
|
if (paramBinding.multi) {
|
|
5925
6112
|
const separator = paramBinding.separator ?? ",";
|
|
5926
|
-
const values =
|
|
6113
|
+
const values = strValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
|
|
5927
6114
|
return {
|
|
5928
6115
|
value: values[0] ?? null,
|
|
5929
6116
|
values
|
|
5930
6117
|
};
|
|
5931
6118
|
}
|
|
5932
|
-
return { value:
|
|
6119
|
+
return { value: strValue };
|
|
5933
6120
|
}
|
|
5934
6121
|
resolveSecondary(secondary, params, context) {
|
|
5935
6122
|
if (!secondary || secondary.length === 0) return [];
|
|
@@ -6048,6 +6235,7 @@ var version = "0.0.1";
|
|
|
6048
6235
|
credentialStatusToVCStatus,
|
|
6049
6236
|
defaultConstraintEvaluator,
|
|
6050
6237
|
evaluateConstraints,
|
|
6238
|
+
extractProjectKey,
|
|
6051
6239
|
extractPublicKey,
|
|
6052
6240
|
extractPublicKeyFromDid,
|
|
6053
6241
|
generateActionParamsDisplay,
|