@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.d.ts
CHANGED
|
@@ -22,10 +22,12 @@ export type { GatewayEvent, GetEventsResponse, GetEventsOptions, AckEventRespons
|
|
|
22
22
|
export { AuthProvider } from './auth/auth-provider';
|
|
23
23
|
export type { AuthState } from './auth/auth-provider';
|
|
24
24
|
export * from './registry';
|
|
25
|
+
export { generateActionSummary, generateActionParamsDisplay, ACTION_PARAMS_MAX_SIZE } from './registry/action-summary';
|
|
26
|
+
export type { ActionParamDisplay } from './registry/action-summary';
|
|
25
27
|
export { generateKeyPair, signJWT, verifyJWT, generateNonce } from './utils/crypto';
|
|
26
28
|
export { SDJwtClient } from './utils/sdjwt-client';
|
|
27
29
|
export { createDidJwk, extractPublicKey, extractPublicKeyFromDid, isValidDidJwk, getKeyIdFromDid, publicKeysMatch, } from './did/did-utils';
|
|
28
|
-
export { TargetResolver } from './resolver/target-resolver';
|
|
30
|
+
export { TargetResolver, extractProjectKey } from './resolver/target-resolver';
|
|
29
31
|
export * from './types';
|
|
30
32
|
export { isWriteAction, WRITE_ACTION_NAMES } from './utils/action-classifier';
|
|
31
33
|
export { resolveUserTier, getTierLimits, isUnlimited } from './utils/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,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,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
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
ACTION_PARAMS_MAX_SIZE: () => ACTION_PARAMS_MAX_SIZE,
|
|
33
34
|
ACTION_PREFIXES: () => ACTION_PREFIXES,
|
|
34
35
|
ACTION_REGISTRY: () => ACTION_REGISTRY,
|
|
35
36
|
AIdentityClient: () => AIdentityClient,
|
|
@@ -95,8 +96,11 @@ __export(index_exports, {
|
|
|
95
96
|
credentialStatusToVCStatus: () => credentialStatusToVCStatus,
|
|
96
97
|
defaultConstraintEvaluator: () => defaultConstraintEvaluator,
|
|
97
98
|
evaluateConstraints: () => evaluateConstraints,
|
|
99
|
+
extractProjectKey: () => extractProjectKey,
|
|
98
100
|
extractPublicKey: () => extractPublicKey,
|
|
99
101
|
extractPublicKeyFromDid: () => extractPublicKeyFromDid,
|
|
102
|
+
generateActionParamsDisplay: () => generateActionParamsDisplay,
|
|
103
|
+
generateActionSummary: () => generateActionSummary,
|
|
100
104
|
generateKeyPair: () => generateKeyPair,
|
|
101
105
|
generateNonce: () => generateNonce,
|
|
102
106
|
getActionAliases: () => getActionAliases,
|
|
@@ -2116,7 +2120,7 @@ var ToolManager = class {
|
|
|
2116
2120
|
projectKey: "string",
|
|
2117
2121
|
summary: "string",
|
|
2118
2122
|
description: "string?",
|
|
2119
|
-
|
|
2123
|
+
issueTypeName: "string",
|
|
2120
2124
|
priority: "string?",
|
|
2121
2125
|
assignee: "string?"
|
|
2122
2126
|
}
|
|
@@ -4683,11 +4687,39 @@ var ACTION_REGISTRY = {
|
|
|
4683
4687
|
},
|
|
4684
4688
|
version: "1.0.0"
|
|
4685
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
|
+
},
|
|
4686
4714
|
{
|
|
4687
4715
|
action: "slack.batch.read",
|
|
4688
4716
|
resource_type: "slack:channel",
|
|
4689
4717
|
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4690
|
-
|
|
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"],
|
|
4691
4723
|
capability: "slack.read.basic",
|
|
4692
4724
|
input_schema: {
|
|
4693
4725
|
type: "object",
|
|
@@ -5059,10 +5091,10 @@ var ACTION_REGISTRY = {
|
|
|
5059
5091
|
input_schema: {
|
|
5060
5092
|
type: "object",
|
|
5061
5093
|
properties: {
|
|
5062
|
-
calendarId: { type: "string" },
|
|
5063
|
-
timeMin: { type: "string" },
|
|
5064
|
-
timeMax: { type: "string" },
|
|
5065
|
-
maxResults: { type: "integer", minimum: 1, maximum: 2500 }
|
|
5094
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5095
|
+
timeMin: { type: "string", description: 'Lower bound (inclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-15T00:00:00Z"' },
|
|
5096
|
+
timeMax: { type: "string", description: 'Upper bound (exclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-16T00:00:00Z"' },
|
|
5097
|
+
maxResults: { type: "integer", minimum: 1, maximum: 2500, description: "Maximum number of events to return" }
|
|
5066
5098
|
},
|
|
5067
5099
|
additionalProperties: false
|
|
5068
5100
|
},
|
|
@@ -5106,13 +5138,29 @@ var ACTION_REGISTRY = {
|
|
|
5106
5138
|
input_schema: {
|
|
5107
5139
|
type: "object",
|
|
5108
5140
|
properties: {
|
|
5109
|
-
calendarId: { type: "string" },
|
|
5110
|
-
summary: { type: "string", minLength: 1 },
|
|
5111
|
-
description: { type: "string" },
|
|
5112
|
-
start: {
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5141
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5142
|
+
summary: { type: "string", minLength: 1, description: "Event title" },
|
|
5143
|
+
description: { type: "string", description: "Event description" },
|
|
5144
|
+
start: {
|
|
5145
|
+
type: "object",
|
|
5146
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5147
|
+
properties: {
|
|
5148
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5149
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5150
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5151
|
+
}
|
|
5152
|
+
},
|
|
5153
|
+
end: {
|
|
5154
|
+
type: "object",
|
|
5155
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5156
|
+
properties: {
|
|
5157
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5158
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5159
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5160
|
+
}
|
|
5161
|
+
},
|
|
5162
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5163
|
+
location: { type: "string", description: "Event location" }
|
|
5116
5164
|
},
|
|
5117
5165
|
required: ["summary", "start", "end"],
|
|
5118
5166
|
additionalProperties: false
|
|
@@ -5137,14 +5185,30 @@ var ACTION_REGISTRY = {
|
|
|
5137
5185
|
input_schema: {
|
|
5138
5186
|
type: "object",
|
|
5139
5187
|
properties: {
|
|
5140
|
-
calendarId: { type: "string" },
|
|
5141
|
-
eventId: { type: "string", minLength: 1 },
|
|
5142
|
-
summary: { type: "string" },
|
|
5143
|
-
description: { type: "string" },
|
|
5144
|
-
start: {
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5188
|
+
calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
|
|
5189
|
+
eventId: { type: "string", minLength: 1, description: "Event ID to update" },
|
|
5190
|
+
summary: { type: "string", description: "Event title" },
|
|
5191
|
+
description: { type: "string", description: "Event description" },
|
|
5192
|
+
start: {
|
|
5193
|
+
type: "object",
|
|
5194
|
+
description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5195
|
+
properties: {
|
|
5196
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
|
|
5197
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
|
|
5198
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5199
|
+
}
|
|
5200
|
+
},
|
|
5201
|
+
end: {
|
|
5202
|
+
type: "object",
|
|
5203
|
+
description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
|
|
5204
|
+
properties: {
|
|
5205
|
+
dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
|
|
5206
|
+
date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
|
|
5207
|
+
timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
|
|
5208
|
+
}
|
|
5209
|
+
},
|
|
5210
|
+
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
5211
|
+
location: { type: "string", description: "Event location" }
|
|
5148
5212
|
},
|
|
5149
5213
|
required: ["eventId"],
|
|
5150
5214
|
additionalProperties: false
|
|
@@ -5153,7 +5217,7 @@ var ACTION_REGISTRY = {
|
|
|
5153
5217
|
effects: ["Update:Event"],
|
|
5154
5218
|
risk: "medium",
|
|
5155
5219
|
target_bindings: {
|
|
5156
|
-
resource_id: { source: "param", param: "
|
|
5220
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" },
|
|
5157
5221
|
secondary: [
|
|
5158
5222
|
{ name: "attendees", source: { source: "param", param: "attendees" }, type: "participant" }
|
|
5159
5223
|
]
|
|
@@ -5179,7 +5243,7 @@ var ACTION_REGISTRY = {
|
|
|
5179
5243
|
effects: ["Delete:Event"],
|
|
5180
5244
|
risk: "high",
|
|
5181
5245
|
target_bindings: {
|
|
5182
|
-
resource_id: { source: "param", param: "
|
|
5246
|
+
resource_id: { source: "param", param: "calendarId", default: "primary" }
|
|
5183
5247
|
},
|
|
5184
5248
|
version: "1.0.0"
|
|
5185
5249
|
},
|
|
@@ -5315,7 +5379,7 @@ var ACTION_REGISTRY = {
|
|
|
5315
5379
|
effects: ["Read:Worklog"],
|
|
5316
5380
|
risk: "low",
|
|
5317
5381
|
target_bindings: {
|
|
5318
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5382
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5319
5383
|
},
|
|
5320
5384
|
version: "1.0.0"
|
|
5321
5385
|
},
|
|
@@ -5337,13 +5401,13 @@ var ACTION_REGISTRY = {
|
|
|
5337
5401
|
effects: ["Read:Issue"],
|
|
5338
5402
|
risk: "low",
|
|
5339
5403
|
target_bindings: {
|
|
5340
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5404
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
|
|
5341
5405
|
},
|
|
5342
5406
|
version: "1.0.0"
|
|
5343
5407
|
},
|
|
5344
5408
|
{
|
|
5345
5409
|
action: "jira.issue.create",
|
|
5346
|
-
resource_type: "jira:
|
|
5410
|
+
resource_type: "jira:project",
|
|
5347
5411
|
required_relations: ["editor", "act_as"],
|
|
5348
5412
|
required_scopes: ["write:jira-work"],
|
|
5349
5413
|
capability: "jira.write.basic",
|
|
@@ -5353,11 +5417,12 @@ var ACTION_REGISTRY = {
|
|
|
5353
5417
|
projectKey: { type: "string", minLength: 1 },
|
|
5354
5418
|
summary: { type: "string", minLength: 1 },
|
|
5355
5419
|
description: { type: "string" },
|
|
5356
|
-
|
|
5420
|
+
issueTypeName: { type: "string", minLength: 1, description: "Issue type name (default: Task)" },
|
|
5357
5421
|
priority: { type: "string" },
|
|
5358
|
-
|
|
5422
|
+
assigneeAccountId: { type: "string" },
|
|
5423
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5359
5424
|
},
|
|
5360
|
-
required: ["projectKey", "summary"
|
|
5425
|
+
required: ["projectKey", "summary"],
|
|
5361
5426
|
additionalProperties: false
|
|
5362
5427
|
},
|
|
5363
5428
|
constraints: { rate_bucket: "jira.write" },
|
|
@@ -5370,7 +5435,7 @@ var ACTION_REGISTRY = {
|
|
|
5370
5435
|
},
|
|
5371
5436
|
{
|
|
5372
5437
|
action: "jira.issue.update",
|
|
5373
|
-
resource_type: "jira:
|
|
5438
|
+
resource_type: "jira:project",
|
|
5374
5439
|
required_relations: ["editor", "act_as"],
|
|
5375
5440
|
required_scopes: ["write:jira-work"],
|
|
5376
5441
|
capability: "jira.write.basic",
|
|
@@ -5380,9 +5445,9 @@ var ACTION_REGISTRY = {
|
|
|
5380
5445
|
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5381
5446
|
summary: { type: "string" },
|
|
5382
5447
|
description: { type: "string" },
|
|
5383
|
-
status: { type: "string" },
|
|
5384
5448
|
priority: { type: "string" },
|
|
5385
|
-
|
|
5449
|
+
assigneeAccountId: { type: "string" },
|
|
5450
|
+
labels: { type: "array", items: { type: "string" } }
|
|
5386
5451
|
},
|
|
5387
5452
|
required: ["issueIdOrKey"],
|
|
5388
5453
|
additionalProperties: false
|
|
@@ -5391,13 +5456,13 @@ var ACTION_REGISTRY = {
|
|
|
5391
5456
|
effects: ["Update:Issue"],
|
|
5392
5457
|
risk: "high",
|
|
5393
5458
|
target_bindings: {
|
|
5394
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5459
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5395
5460
|
},
|
|
5396
5461
|
version: "1.0.0"
|
|
5397
5462
|
},
|
|
5398
5463
|
{
|
|
5399
5464
|
action: "jira.issue.delete",
|
|
5400
|
-
resource_type: "jira:
|
|
5465
|
+
resource_type: "jira:project",
|
|
5401
5466
|
required_relations: ["admin", "owner", "act_as"],
|
|
5402
5467
|
required_scopes: ["write:jira-work"],
|
|
5403
5468
|
capability: "jira.write.basic",
|
|
@@ -5413,7 +5478,98 @@ var ACTION_REGISTRY = {
|
|
|
5413
5478
|
effects: ["Delete:Issue"],
|
|
5414
5479
|
risk: "high",
|
|
5415
5480
|
target_bindings: {
|
|
5416
|
-
resource_id: { source: "param", param: "issueIdOrKey" }
|
|
5481
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5482
|
+
},
|
|
5483
|
+
version: "1.0.0"
|
|
5484
|
+
},
|
|
5485
|
+
{
|
|
5486
|
+
action: "jira.comment.create",
|
|
5487
|
+
resource_type: "jira:project",
|
|
5488
|
+
required_relations: ["editor", "act_as"],
|
|
5489
|
+
required_scopes: ["write:jira-work"],
|
|
5490
|
+
capability: "jira.write.basic",
|
|
5491
|
+
input_schema: {
|
|
5492
|
+
type: "object",
|
|
5493
|
+
properties: {
|
|
5494
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5495
|
+
body: { type: "string", minLength: 1 }
|
|
5496
|
+
},
|
|
5497
|
+
required: ["issueIdOrKey", "body"],
|
|
5498
|
+
additionalProperties: false
|
|
5499
|
+
},
|
|
5500
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5501
|
+
effects: ["Create:Comment"],
|
|
5502
|
+
// high: comments are publicly visible to all project members, consistent with jira.issue.update
|
|
5503
|
+
risk: "high",
|
|
5504
|
+
target_bindings: {
|
|
5505
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5506
|
+
},
|
|
5507
|
+
version: "1.0.0"
|
|
5508
|
+
},
|
|
5509
|
+
{
|
|
5510
|
+
action: "jira.comment.read",
|
|
5511
|
+
resource_type: "jira:project",
|
|
5512
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5513
|
+
required_scopes: ["read:jira-work"],
|
|
5514
|
+
capability: "jira.read.basic",
|
|
5515
|
+
input_schema: {
|
|
5516
|
+
type: "object",
|
|
5517
|
+
properties: {
|
|
5518
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5519
|
+
},
|
|
5520
|
+
required: ["issueIdOrKey"],
|
|
5521
|
+
additionalProperties: false
|
|
5522
|
+
},
|
|
5523
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5524
|
+
effects: ["Read:Comment"],
|
|
5525
|
+
risk: "low",
|
|
5526
|
+
target_bindings: {
|
|
5527
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5528
|
+
},
|
|
5529
|
+
version: "1.0.0"
|
|
5530
|
+
},
|
|
5531
|
+
{
|
|
5532
|
+
action: "jira.issue.transition",
|
|
5533
|
+
resource_type: "jira:project",
|
|
5534
|
+
required_relations: ["editor", "act_as"],
|
|
5535
|
+
required_scopes: ["write:jira-work"],
|
|
5536
|
+
capability: "jira.write.basic",
|
|
5537
|
+
input_schema: {
|
|
5538
|
+
type: "object",
|
|
5539
|
+
properties: {
|
|
5540
|
+
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5541
|
+
transitionId: { type: "string", minLength: 1 }
|
|
5542
|
+
},
|
|
5543
|
+
required: ["issueIdOrKey", "transitionId"],
|
|
5544
|
+
additionalProperties: false
|
|
5545
|
+
},
|
|
5546
|
+
constraints: { rate_bucket: "jira.write" },
|
|
5547
|
+
effects: ["Update:IssueStatus"],
|
|
5548
|
+
risk: "high",
|
|
5549
|
+
target_bindings: {
|
|
5550
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5551
|
+
},
|
|
5552
|
+
version: "1.0.0"
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
action: "jira.transition.list",
|
|
5556
|
+
resource_type: "jira:project",
|
|
5557
|
+
required_relations: ["viewer", "editor", "act_as"],
|
|
5558
|
+
required_scopes: ["read:jira-work"],
|
|
5559
|
+
capability: "jira.read.basic",
|
|
5560
|
+
input_schema: {
|
|
5561
|
+
type: "object",
|
|
5562
|
+
properties: {
|
|
5563
|
+
issueIdOrKey: { type: "string", minLength: 1 }
|
|
5564
|
+
},
|
|
5565
|
+
required: ["issueIdOrKey"],
|
|
5566
|
+
additionalProperties: false
|
|
5567
|
+
},
|
|
5568
|
+
constraints: { rate_bucket: "jira.read" },
|
|
5569
|
+
effects: ["Read:Transition"],
|
|
5570
|
+
risk: "low",
|
|
5571
|
+
target_bindings: {
|
|
5572
|
+
resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
|
|
5417
5573
|
},
|
|
5418
5574
|
version: "1.0.0"
|
|
5419
5575
|
},
|
|
@@ -5530,7 +5686,7 @@ var ACTION_REGISTRY = {
|
|
|
5530
5686
|
{
|
|
5531
5687
|
capability: "slack.read.basic",
|
|
5532
5688
|
description: "Read channels, messages, and user info",
|
|
5533
|
-
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.batch.read"],
|
|
5689
|
+
includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.message.read_paginated", "slack.batch.read"],
|
|
5534
5690
|
version: "1.0.0"
|
|
5535
5691
|
},
|
|
5536
5692
|
{
|
|
@@ -5578,13 +5734,13 @@ var ACTION_REGISTRY = {
|
|
|
5578
5734
|
{
|
|
5579
5735
|
capability: "jira.read.basic",
|
|
5580
5736
|
description: "Read Jira issues, projects, boards, and sprints",
|
|
5581
|
-
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"],
|
|
5737
|
+
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"],
|
|
5582
5738
|
version: "1.0.0"
|
|
5583
5739
|
},
|
|
5584
5740
|
{
|
|
5585
5741
|
capability: "jira.write.basic",
|
|
5586
5742
|
description: "Create, update, and delete Jira issues",
|
|
5587
|
-
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete"],
|
|
5743
|
+
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete", "jira.comment.create", "jira.issue.transition"],
|
|
5588
5744
|
version: "1.0.0"
|
|
5589
5745
|
}
|
|
5590
5746
|
]
|
|
@@ -5749,7 +5905,164 @@ function normalizeMcpActionName(toolName, actionName) {
|
|
|
5749
5905
|
return actionName;
|
|
5750
5906
|
}
|
|
5751
5907
|
|
|
5908
|
+
// src/registry/action-summary.ts
|
|
5909
|
+
var ACTION_DISPLAY_CONFIGS = {
|
|
5910
|
+
"slack.message.post": {
|
|
5911
|
+
summaryTemplate: (p) => {
|
|
5912
|
+
const parts = [];
|
|
5913
|
+
if (p.channel) parts.push(p.channel + ":");
|
|
5914
|
+
if (p.text) parts.push(String(p.text));
|
|
5915
|
+
return parts.join(" ");
|
|
5916
|
+
},
|
|
5917
|
+
displayFields: [
|
|
5918
|
+
{ key: "channel", label: "Channel" },
|
|
5919
|
+
{ key: "text", label: "Message" }
|
|
5920
|
+
]
|
|
5921
|
+
},
|
|
5922
|
+
"gmail.message.send": {
|
|
5923
|
+
summaryTemplate: (p) => {
|
|
5924
|
+
const parts = [];
|
|
5925
|
+
if (p.to) parts.push(`To: ${p.to}`);
|
|
5926
|
+
if (p.subject) parts.push(`Subject: ${p.subject}`);
|
|
5927
|
+
return parts.join(", ");
|
|
5928
|
+
},
|
|
5929
|
+
displayFields: [
|
|
5930
|
+
{ key: "to", label: "To" },
|
|
5931
|
+
{ key: "subject", label: "Subject" },
|
|
5932
|
+
{ key: "body", label: "Body" }
|
|
5933
|
+
]
|
|
5934
|
+
},
|
|
5935
|
+
"gmail.draft.create": {
|
|
5936
|
+
summaryTemplate: (p) => {
|
|
5937
|
+
const parts = [];
|
|
5938
|
+
if (p.to) parts.push(`To: ${p.to}`);
|
|
5939
|
+
if (p.subject) parts.push(`Subject: ${p.subject}`);
|
|
5940
|
+
return parts.join(", ");
|
|
5941
|
+
},
|
|
5942
|
+
displayFields: [
|
|
5943
|
+
{ key: "to", label: "To" },
|
|
5944
|
+
{ key: "subject", label: "Subject" },
|
|
5945
|
+
{ key: "body", label: "Body" }
|
|
5946
|
+
]
|
|
5947
|
+
},
|
|
5948
|
+
"calendar.event.create": {
|
|
5949
|
+
summaryTemplate: (p) => {
|
|
5950
|
+
const parts = [];
|
|
5951
|
+
if (p.summary) parts.push(p.summary);
|
|
5952
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5953
|
+
return parts.join(" ");
|
|
5954
|
+
},
|
|
5955
|
+
displayFields: [
|
|
5956
|
+
{ key: "summary", label: "Event" },
|
|
5957
|
+
{ key: "start", label: "Start" },
|
|
5958
|
+
{ key: "end", label: "End" },
|
|
5959
|
+
{ key: "attendees", label: "Attendees" }
|
|
5960
|
+
]
|
|
5961
|
+
},
|
|
5962
|
+
"calendar.event.update": {
|
|
5963
|
+
summaryTemplate: (p) => {
|
|
5964
|
+
const parts = [];
|
|
5965
|
+
if (p.summary) parts.push(p.summary);
|
|
5966
|
+
if (p.start) parts.push(`(${formatValue(p.start)})`);
|
|
5967
|
+
return parts.join(" ");
|
|
5968
|
+
},
|
|
5969
|
+
displayFields: [
|
|
5970
|
+
{ key: "summary", label: "Event" },
|
|
5971
|
+
{ key: "start", label: "Start" },
|
|
5972
|
+
{ key: "end", label: "End" },
|
|
5973
|
+
{ key: "attendees", label: "Attendees" }
|
|
5974
|
+
]
|
|
5975
|
+
},
|
|
5976
|
+
"jira.issue.create": {
|
|
5977
|
+
summaryTemplate: (p) => {
|
|
5978
|
+
const parts = [];
|
|
5979
|
+
if (p.project) parts.push(`${p.project}:`);
|
|
5980
|
+
if (p.summary) parts.push(p.summary);
|
|
5981
|
+
return parts.join(" ");
|
|
5982
|
+
},
|
|
5983
|
+
displayFields: [
|
|
5984
|
+
{ key: "project", label: "Project" },
|
|
5985
|
+
{ key: "issuetype", label: "Type" },
|
|
5986
|
+
{ key: "summary", label: "Summary" },
|
|
5987
|
+
{ key: "description", label: "Description" }
|
|
5988
|
+
]
|
|
5989
|
+
},
|
|
5990
|
+
"jira.issue.update": {
|
|
5991
|
+
summaryTemplate: (p) => {
|
|
5992
|
+
const parts = [];
|
|
5993
|
+
if (p.issueKey) parts.push(`${p.issueKey}:`);
|
|
5994
|
+
if (p.summary) parts.push(p.summary);
|
|
5995
|
+
return parts.join(" ");
|
|
5996
|
+
},
|
|
5997
|
+
displayFields: [
|
|
5998
|
+
{ key: "issueKey", label: "Issue" },
|
|
5999
|
+
{ key: "summary", label: "Summary" },
|
|
6000
|
+
{ key: "description", label: "Description" }
|
|
6001
|
+
]
|
|
6002
|
+
}
|
|
6003
|
+
};
|
|
6004
|
+
function truncate(text, maxLength) {
|
|
6005
|
+
if (text.length <= maxLength) return text;
|
|
6006
|
+
return text.slice(0, maxLength - 3) + "...";
|
|
6007
|
+
}
|
|
6008
|
+
function formatValue(value) {
|
|
6009
|
+
if (value === null || value === void 0) return "";
|
|
6010
|
+
if (Array.isArray(value)) {
|
|
6011
|
+
return value.map((item) => {
|
|
6012
|
+
if (item && typeof item === "object") {
|
|
6013
|
+
const email = item.email;
|
|
6014
|
+
if (email) return String(email);
|
|
6015
|
+
return JSON.stringify(item);
|
|
6016
|
+
}
|
|
6017
|
+
return String(item);
|
|
6018
|
+
}).join(", ");
|
|
6019
|
+
}
|
|
6020
|
+
if (typeof value === "object") {
|
|
6021
|
+
const obj = value;
|
|
6022
|
+
if (obj.dateTime) {
|
|
6023
|
+
return obj.timeZone ? `${obj.dateTime} (${obj.timeZone})` : String(obj.dateTime);
|
|
6024
|
+
}
|
|
6025
|
+
if (obj.date) return String(obj.date);
|
|
6026
|
+
return JSON.stringify(value);
|
|
6027
|
+
}
|
|
6028
|
+
return String(value);
|
|
6029
|
+
}
|
|
6030
|
+
var ACTION_PARAMS_MAX_SIZE = 1e4;
|
|
6031
|
+
function generateActionSummary(action, params, maxLength = 50) {
|
|
6032
|
+
if (!params || Object.keys(params).length === 0) return "";
|
|
6033
|
+
const config = ACTION_DISPLAY_CONFIGS[action];
|
|
6034
|
+
if (config) {
|
|
6035
|
+
const raw = config.summaryTemplate(params);
|
|
6036
|
+
return raw ? truncate(raw, maxLength) : "";
|
|
6037
|
+
}
|
|
6038
|
+
for (const [key, val] of Object.entries(params)) {
|
|
6039
|
+
if (val !== null && val !== void 0 && typeof val !== "object") {
|
|
6040
|
+
return truncate(`${key}: ${String(val)}`, maxLength);
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
6043
|
+
return "";
|
|
6044
|
+
}
|
|
6045
|
+
function generateActionParamsDisplay(action, params) {
|
|
6046
|
+
if (!params || Object.keys(params).length === 0) return [];
|
|
6047
|
+
const config = ACTION_DISPLAY_CONFIGS[action];
|
|
6048
|
+
if (config) {
|
|
6049
|
+
return config.displayFields.filter((f) => params[f.key] !== void 0 && params[f.key] !== null).map((f) => ({
|
|
6050
|
+
label: f.label,
|
|
6051
|
+
value: formatValue(params[f.key])
|
|
6052
|
+
}));
|
|
6053
|
+
}
|
|
6054
|
+
return Object.entries(params).filter(([, v]) => v !== void 0 && v !== null).slice(0, 3).map(([key, val]) => ({
|
|
6055
|
+
label: key,
|
|
6056
|
+
value: formatValue(val)
|
|
6057
|
+
}));
|
|
6058
|
+
}
|
|
6059
|
+
|
|
5752
6060
|
// src/resolver/target-resolver.ts
|
|
6061
|
+
var PROJECT_KEY_PATTERN = /^([A-Z][A-Z0-9_]+)-\d+$/;
|
|
6062
|
+
function extractProjectKey(value) {
|
|
6063
|
+
const match = value.match(PROJECT_KEY_PATTERN);
|
|
6064
|
+
return match ? match[1] : null;
|
|
6065
|
+
}
|
|
5753
6066
|
var TargetResolver = class {
|
|
5754
6067
|
/**
|
|
5755
6068
|
* Resolve target bindings against tool invocation parameters.
|
|
@@ -5777,20 +6090,27 @@ var TargetResolver = class {
|
|
|
5777
6090
|
}
|
|
5778
6091
|
const paramBinding = binding;
|
|
5779
6092
|
let rawValue = params[paramBinding.param];
|
|
6093
|
+
if (rawValue == null && paramBinding.fallback_param) {
|
|
6094
|
+
rawValue = params[paramBinding.fallback_param];
|
|
6095
|
+
}
|
|
5780
6096
|
if (rawValue == null && paramBinding.default != null) {
|
|
5781
6097
|
rawValue = paramBinding.default;
|
|
5782
6098
|
}
|
|
5783
6099
|
if (rawValue == null) return { value: null };
|
|
5784
6100
|
if (typeof rawValue !== "string") return { value: null };
|
|
6101
|
+
let strValue = rawValue;
|
|
6102
|
+
if (paramBinding.derive === "project_key") {
|
|
6103
|
+
strValue = extractProjectKey(strValue) ?? strValue;
|
|
6104
|
+
}
|
|
5785
6105
|
if (paramBinding.multi) {
|
|
5786
6106
|
const separator = paramBinding.separator ?? ",";
|
|
5787
|
-
const values =
|
|
6107
|
+
const values = strValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
|
|
5788
6108
|
return {
|
|
5789
6109
|
value: values[0] ?? null,
|
|
5790
6110
|
values
|
|
5791
6111
|
};
|
|
5792
6112
|
}
|
|
5793
|
-
return { value:
|
|
6113
|
+
return { value: strValue };
|
|
5794
6114
|
}
|
|
5795
6115
|
resolveSecondary(secondary, params, context) {
|
|
5796
6116
|
if (!secondary || secondary.length === 0) return [];
|
|
@@ -5843,6 +6163,7 @@ function getTierLimits(tier) {
|
|
|
5843
6163
|
var version = "0.0.1";
|
|
5844
6164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5845
6165
|
0 && (module.exports = {
|
|
6166
|
+
ACTION_PARAMS_MAX_SIZE,
|
|
5846
6167
|
ACTION_PREFIXES,
|
|
5847
6168
|
ACTION_REGISTRY,
|
|
5848
6169
|
AIdentityClient,
|
|
@@ -5908,8 +6229,11 @@ var version = "0.0.1";
|
|
|
5908
6229
|
credentialStatusToVCStatus,
|
|
5909
6230
|
defaultConstraintEvaluator,
|
|
5910
6231
|
evaluateConstraints,
|
|
6232
|
+
extractProjectKey,
|
|
5911
6233
|
extractPublicKey,
|
|
5912
6234
|
extractPublicKeyFromDid,
|
|
6235
|
+
generateActionParamsDisplay,
|
|
6236
|
+
generateActionSummary,
|
|
5913
6237
|
generateKeyPair,
|
|
5914
6238
|
generateNonce,
|
|
5915
6239
|
getActionAliases,
|