@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.mjs CHANGED
@@ -1976,7 +1976,7 @@ var ToolManager = class {
1976
1976
  projectKey: "string",
1977
1977
  summary: "string",
1978
1978
  description: "string?",
1979
- issueType: "string",
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
- required_scopes: ["channels:read", "groups:read", "channels:history", "groups:history"],
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",
@@ -4772,7 +4800,10 @@ var ACTION_REGISTRY = {
4772
4800
  subject: { type: "string", minLength: 1 },
4773
4801
  body: { type: "string", minLength: 1 },
4774
4802
  cc: { type: "string" },
4775
- bcc: { type: "string" }
4803
+ bcc: { type: "string" },
4804
+ threadId: { type: "string" },
4805
+ inReplyTo: { type: "string" },
4806
+ references: { type: "string" }
4776
4807
  },
4777
4808
  required: ["to", "subject", "body"],
4778
4809
  additionalProperties: false
@@ -4802,7 +4833,10 @@ var ACTION_REGISTRY = {
4802
4833
  subject: { type: "string", minLength: 1 },
4803
4834
  body: { type: "string", minLength: 1 },
4804
4835
  cc: { type: "string" },
4805
- bcc: { type: "string" }
4836
+ bcc: { type: "string" },
4837
+ threadId: { type: "string" },
4838
+ inReplyTo: { type: "string" },
4839
+ references: { type: "string" }
4806
4840
  },
4807
4841
  required: ["to", "subject", "body"],
4808
4842
  additionalProperties: false
@@ -4919,10 +4953,10 @@ var ACTION_REGISTRY = {
4919
4953
  input_schema: {
4920
4954
  type: "object",
4921
4955
  properties: {
4922
- calendarId: { type: "string" },
4923
- timeMin: { type: "string" },
4924
- timeMax: { type: "string" },
4925
- maxResults: { type: "integer", minimum: 1, maximum: 2500 }
4956
+ calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
4957
+ timeMin: { type: "string", description: 'Lower bound (inclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-15T00:00:00Z"' },
4958
+ timeMax: { type: "string", description: 'Upper bound (exclusive) for event start time, as ISO 8601 datetime, e.g. "2025-01-16T00:00:00Z"' },
4959
+ maxResults: { type: "integer", minimum: 1, maximum: 2500, description: "Maximum number of events to return" }
4926
4960
  },
4927
4961
  additionalProperties: false
4928
4962
  },
@@ -4966,13 +5000,29 @@ var ACTION_REGISTRY = {
4966
5000
  input_schema: {
4967
5001
  type: "object",
4968
5002
  properties: {
4969
- calendarId: { type: "string" },
4970
- summary: { type: "string", minLength: 1 },
4971
- description: { type: "string" },
4972
- start: { type: "object" },
4973
- end: { type: "object" },
4974
- attendees: { type: "array" },
4975
- location: { type: "string" }
5003
+ calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
5004
+ summary: { type: "string", minLength: 1, description: "Event title" },
5005
+ description: { type: "string", description: "Event description" },
5006
+ start: {
5007
+ type: "object",
5008
+ description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
5009
+ properties: {
5010
+ dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
5011
+ date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
5012
+ timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
5013
+ }
5014
+ },
5015
+ end: {
5016
+ type: "object",
5017
+ description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
5018
+ properties: {
5019
+ dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
5020
+ date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
5021
+ timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
5022
+ }
5023
+ },
5024
+ attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
5025
+ location: { type: "string", description: "Event location" }
4976
5026
  },
4977
5027
  required: ["summary", "start", "end"],
4978
5028
  additionalProperties: false
@@ -4997,14 +5047,30 @@ var ACTION_REGISTRY = {
4997
5047
  input_schema: {
4998
5048
  type: "object",
4999
5049
  properties: {
5000
- calendarId: { type: "string" },
5001
- eventId: { type: "string", minLength: 1 },
5002
- summary: { type: "string" },
5003
- description: { type: "string" },
5004
- start: { type: "object" },
5005
- end: { type: "object" },
5006
- attendees: { type: "array" },
5007
- location: { type: "string" }
5050
+ calendarId: { type: "string", description: "Calendar ID (email address). Defaults to primary calendar." },
5051
+ eventId: { type: "string", minLength: 1, description: "Event ID to update" },
5052
+ summary: { type: "string", description: "Event title" },
5053
+ description: { type: "string", description: "Event description" },
5054
+ start: {
5055
+ type: "object",
5056
+ description: "Start time. Use dateTime + timeZone for timed events, or date for all-day events.",
5057
+ properties: {
5058
+ dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T10:00:00"' },
5059
+ date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-15"' },
5060
+ timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
5061
+ }
5062
+ },
5063
+ end: {
5064
+ type: "object",
5065
+ description: "End time. Use dateTime + timeZone for timed events, or date for all-day events.",
5066
+ properties: {
5067
+ dateTime: { type: "string", description: 'ISO 8601 datetime, e.g. "2025-01-15T11:00:00"' },
5068
+ date: { type: "string", description: 'Date for all-day event, e.g. "2025-01-16"' },
5069
+ timeZone: { type: "string", description: 'IANA time zone, e.g. "Asia/Tokyo"' }
5070
+ }
5071
+ },
5072
+ attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
5073
+ location: { type: "string", description: "Event location" }
5008
5074
  },
5009
5075
  required: ["eventId"],
5010
5076
  additionalProperties: false
@@ -5013,7 +5079,7 @@ var ACTION_REGISTRY = {
5013
5079
  effects: ["Update:Event"],
5014
5080
  risk: "medium",
5015
5081
  target_bindings: {
5016
- resource_id: { source: "param", param: "eventId" },
5082
+ resource_id: { source: "param", param: "calendarId", default: "primary" },
5017
5083
  secondary: [
5018
5084
  { name: "attendees", source: { source: "param", param: "attendees" }, type: "participant" }
5019
5085
  ]
@@ -5039,7 +5105,7 @@ var ACTION_REGISTRY = {
5039
5105
  effects: ["Delete:Event"],
5040
5106
  risk: "high",
5041
5107
  target_bindings: {
5042
- resource_id: { source: "param", param: "eventId" }
5108
+ resource_id: { source: "param", param: "calendarId", default: "primary" }
5043
5109
  },
5044
5110
  version: "1.0.0"
5045
5111
  },
@@ -5175,7 +5241,7 @@ var ACTION_REGISTRY = {
5175
5241
  effects: ["Read:Worklog"],
5176
5242
  risk: "low",
5177
5243
  target_bindings: {
5178
- resource_id: { source: "param", param: "issueIdOrKey" }
5244
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
5179
5245
  },
5180
5246
  version: "1.0.0"
5181
5247
  },
@@ -5197,13 +5263,13 @@ var ACTION_REGISTRY = {
5197
5263
  effects: ["Read:Issue"],
5198
5264
  risk: "low",
5199
5265
  target_bindings: {
5200
- resource_id: { source: "param", param: "issueIdOrKey" }
5266
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey" }
5201
5267
  },
5202
5268
  version: "1.0.0"
5203
5269
  },
5204
5270
  {
5205
5271
  action: "jira.issue.create",
5206
- resource_type: "jira:issue",
5272
+ resource_type: "jira:project",
5207
5273
  required_relations: ["editor", "act_as"],
5208
5274
  required_scopes: ["write:jira-work"],
5209
5275
  capability: "jira.write.basic",
@@ -5213,11 +5279,12 @@ var ACTION_REGISTRY = {
5213
5279
  projectKey: { type: "string", minLength: 1 },
5214
5280
  summary: { type: "string", minLength: 1 },
5215
5281
  description: { type: "string" },
5216
- issueType: { type: "string", minLength: 1 },
5282
+ issueTypeName: { type: "string", minLength: 1, description: "Issue type name (default: Task)" },
5217
5283
  priority: { type: "string" },
5218
- assignee: { type: "string" }
5284
+ assigneeAccountId: { type: "string" },
5285
+ labels: { type: "array", items: { type: "string" } }
5219
5286
  },
5220
- required: ["projectKey", "summary", "issueType"],
5287
+ required: ["projectKey", "summary"],
5221
5288
  additionalProperties: false
5222
5289
  },
5223
5290
  constraints: { rate_bucket: "jira.write" },
@@ -5230,7 +5297,7 @@ var ACTION_REGISTRY = {
5230
5297
  },
5231
5298
  {
5232
5299
  action: "jira.issue.update",
5233
- resource_type: "jira:issue",
5300
+ resource_type: "jira:project",
5234
5301
  required_relations: ["editor", "act_as"],
5235
5302
  required_scopes: ["write:jira-work"],
5236
5303
  capability: "jira.write.basic",
@@ -5240,9 +5307,9 @@ var ACTION_REGISTRY = {
5240
5307
  issueIdOrKey: { type: "string", minLength: 1 },
5241
5308
  summary: { type: "string" },
5242
5309
  description: { type: "string" },
5243
- status: { type: "string" },
5244
5310
  priority: { type: "string" },
5245
- assignee: { type: "string" }
5311
+ assigneeAccountId: { type: "string" },
5312
+ labels: { type: "array", items: { type: "string" } }
5246
5313
  },
5247
5314
  required: ["issueIdOrKey"],
5248
5315
  additionalProperties: false
@@ -5251,13 +5318,13 @@ var ACTION_REGISTRY = {
5251
5318
  effects: ["Update:Issue"],
5252
5319
  risk: "high",
5253
5320
  target_bindings: {
5254
- resource_id: { source: "param", param: "issueIdOrKey" }
5321
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5255
5322
  },
5256
5323
  version: "1.0.0"
5257
5324
  },
5258
5325
  {
5259
5326
  action: "jira.issue.delete",
5260
- resource_type: "jira:issue",
5327
+ resource_type: "jira:project",
5261
5328
  required_relations: ["admin", "owner", "act_as"],
5262
5329
  required_scopes: ["write:jira-work"],
5263
5330
  capability: "jira.write.basic",
@@ -5273,7 +5340,98 @@ var ACTION_REGISTRY = {
5273
5340
  effects: ["Delete:Issue"],
5274
5341
  risk: "high",
5275
5342
  target_bindings: {
5276
- resource_id: { source: "param", param: "issueIdOrKey" }
5343
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5344
+ },
5345
+ version: "1.0.0"
5346
+ },
5347
+ {
5348
+ action: "jira.comment.create",
5349
+ resource_type: "jira:project",
5350
+ required_relations: ["editor", "act_as"],
5351
+ required_scopes: ["write:jira-work"],
5352
+ capability: "jira.write.basic",
5353
+ input_schema: {
5354
+ type: "object",
5355
+ properties: {
5356
+ issueIdOrKey: { type: "string", minLength: 1 },
5357
+ body: { type: "string", minLength: 1 }
5358
+ },
5359
+ required: ["issueIdOrKey", "body"],
5360
+ additionalProperties: false
5361
+ },
5362
+ constraints: { rate_bucket: "jira.write" },
5363
+ effects: ["Create:Comment"],
5364
+ // high: comments are publicly visible to all project members, consistent with jira.issue.update
5365
+ risk: "high",
5366
+ target_bindings: {
5367
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5368
+ },
5369
+ version: "1.0.0"
5370
+ },
5371
+ {
5372
+ action: "jira.comment.read",
5373
+ resource_type: "jira:project",
5374
+ required_relations: ["viewer", "editor", "act_as"],
5375
+ required_scopes: ["read:jira-work"],
5376
+ capability: "jira.read.basic",
5377
+ input_schema: {
5378
+ type: "object",
5379
+ properties: {
5380
+ issueIdOrKey: { type: "string", minLength: 1 }
5381
+ },
5382
+ required: ["issueIdOrKey"],
5383
+ additionalProperties: false
5384
+ },
5385
+ constraints: { rate_bucket: "jira.read" },
5386
+ effects: ["Read:Comment"],
5387
+ risk: "low",
5388
+ target_bindings: {
5389
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5390
+ },
5391
+ version: "1.0.0"
5392
+ },
5393
+ {
5394
+ action: "jira.issue.transition",
5395
+ resource_type: "jira:project",
5396
+ required_relations: ["editor", "act_as"],
5397
+ required_scopes: ["write:jira-work"],
5398
+ capability: "jira.write.basic",
5399
+ input_schema: {
5400
+ type: "object",
5401
+ properties: {
5402
+ issueIdOrKey: { type: "string", minLength: 1 },
5403
+ transitionId: { type: "string", minLength: 1 }
5404
+ },
5405
+ required: ["issueIdOrKey", "transitionId"],
5406
+ additionalProperties: false
5407
+ },
5408
+ constraints: { rate_bucket: "jira.write" },
5409
+ effects: ["Update:IssueStatus"],
5410
+ risk: "high",
5411
+ target_bindings: {
5412
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5413
+ },
5414
+ version: "1.0.0"
5415
+ },
5416
+ {
5417
+ action: "jira.transition.list",
5418
+ resource_type: "jira:project",
5419
+ required_relations: ["viewer", "editor", "act_as"],
5420
+ required_scopes: ["read:jira-work"],
5421
+ capability: "jira.read.basic",
5422
+ input_schema: {
5423
+ type: "object",
5424
+ properties: {
5425
+ issueIdOrKey: { type: "string", minLength: 1 }
5426
+ },
5427
+ required: ["issueIdOrKey"],
5428
+ additionalProperties: false
5429
+ },
5430
+ constraints: { rate_bucket: "jira.read" },
5431
+ effects: ["Read:Transition"],
5432
+ risk: "low",
5433
+ target_bindings: {
5434
+ resource_id: { source: "param", param: "issueIdOrKey", fallback_param: "issueKey", derive: "project_key" }
5277
5435
  },
5278
5436
  version: "1.0.0"
5279
5437
  },
@@ -5390,7 +5548,7 @@ var ACTION_REGISTRY = {
5390
5548
  {
5391
5549
  capability: "slack.read.basic",
5392
5550
  description: "Read channels, messages, and user info",
5393
- includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.batch.read"],
5551
+ includes: ["slack.channel.read", "slack.user.read", "slack.message.read", "slack.message.read_paginated", "slack.batch.read"],
5394
5552
  version: "1.0.0"
5395
5553
  },
5396
5554
  {
@@ -5438,13 +5596,13 @@ var ACTION_REGISTRY = {
5438
5596
  {
5439
5597
  capability: "jira.read.basic",
5440
5598
  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"],
5599
+ 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
5600
  version: "1.0.0"
5443
5601
  },
5444
5602
  {
5445
5603
  capability: "jira.write.basic",
5446
5604
  description: "Create, update, and delete Jira issues",
5447
- includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete"],
5605
+ includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete", "jira.comment.create", "jira.issue.transition"],
5448
5606
  version: "1.0.0"
5449
5607
  }
5450
5608
  ]
@@ -5653,7 +5811,7 @@ var ACTION_DISPLAY_CONFIGS = {
5653
5811
  summaryTemplate: (p) => {
5654
5812
  const parts = [];
5655
5813
  if (p.summary) parts.push(p.summary);
5656
- if (p.start) parts.push(`(${p.start})`);
5814
+ if (p.start) parts.push(`(${formatValue(p.start)})`);
5657
5815
  return parts.join(" ");
5658
5816
  },
5659
5817
  displayFields: [
@@ -5667,7 +5825,7 @@ var ACTION_DISPLAY_CONFIGS = {
5667
5825
  summaryTemplate: (p) => {
5668
5826
  const parts = [];
5669
5827
  if (p.summary) parts.push(p.summary);
5670
- if (p.start) parts.push(`(${p.start})`);
5828
+ if (p.start) parts.push(`(${formatValue(p.start)})`);
5671
5829
  return parts.join(" ");
5672
5830
  },
5673
5831
  displayFields: [
@@ -5711,8 +5869,24 @@ function truncate(text, maxLength) {
5711
5869
  }
5712
5870
  function formatValue(value) {
5713
5871
  if (value === null || value === void 0) return "";
5714
- if (Array.isArray(value)) return value.map(String).join(", ");
5715
- if (typeof value === "object") return JSON.stringify(value);
5872
+ if (Array.isArray(value)) {
5873
+ return value.map((item) => {
5874
+ if (item && typeof item === "object") {
5875
+ const email = item.email;
5876
+ if (email) return String(email);
5877
+ return JSON.stringify(item);
5878
+ }
5879
+ return String(item);
5880
+ }).join(", ");
5881
+ }
5882
+ if (typeof value === "object") {
5883
+ const obj = value;
5884
+ if (obj.dateTime) {
5885
+ return obj.timeZone ? `${obj.dateTime} (${obj.timeZone})` : String(obj.dateTime);
5886
+ }
5887
+ if (obj.date) return String(obj.date);
5888
+ return JSON.stringify(value);
5889
+ }
5716
5890
  return String(value);
5717
5891
  }
5718
5892
  var ACTION_PARAMS_MAX_SIZE = 1e4;
@@ -5746,6 +5920,11 @@ function generateActionParamsDisplay(action, params) {
5746
5920
  }
5747
5921
 
5748
5922
  // src/resolver/target-resolver.ts
5923
+ var PROJECT_KEY_PATTERN = /^([A-Z][A-Z0-9_]+)-\d+$/;
5924
+ function extractProjectKey(value) {
5925
+ const match = value.match(PROJECT_KEY_PATTERN);
5926
+ return match ? match[1] : null;
5927
+ }
5749
5928
  var TargetResolver = class {
5750
5929
  /**
5751
5930
  * Resolve target bindings against tool invocation parameters.
@@ -5773,20 +5952,27 @@ var TargetResolver = class {
5773
5952
  }
5774
5953
  const paramBinding = binding;
5775
5954
  let rawValue = params[paramBinding.param];
5955
+ if (rawValue == null && paramBinding.fallback_param) {
5956
+ rawValue = params[paramBinding.fallback_param];
5957
+ }
5776
5958
  if (rawValue == null && paramBinding.default != null) {
5777
5959
  rawValue = paramBinding.default;
5778
5960
  }
5779
5961
  if (rawValue == null) return { value: null };
5780
5962
  if (typeof rawValue !== "string") return { value: null };
5963
+ let strValue = rawValue;
5964
+ if (paramBinding.derive === "project_key") {
5965
+ strValue = extractProjectKey(strValue) ?? strValue;
5966
+ }
5781
5967
  if (paramBinding.multi) {
5782
5968
  const separator = paramBinding.separator ?? ",";
5783
- const values = rawValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
5969
+ const values = strValue.split(separator).map((v) => v.trim()).filter((v) => v.length > 0);
5784
5970
  return {
5785
5971
  value: values[0] ?? null,
5786
5972
  values
5787
5973
  };
5788
5974
  }
5789
- return { value: rawValue };
5975
+ return { value: strValue };
5790
5976
  }
5791
5977
  resolveSecondary(secondary, params, context) {
5792
5978
  if (!secondary || secondary.length === 0) return [];
@@ -5904,6 +6090,7 @@ export {
5904
6090
  credentialStatusToVCStatus,
5905
6091
  defaultConstraintEvaluator,
5906
6092
  evaluateConstraints,
6093
+ extractProjectKey,
5907
6094
  extractPublicKey,
5908
6095
  extractPublicKeyFromDid,
5909
6096
  generateActionParamsDisplay,