@vess-id/ai-identity 0.14.0 → 0.15.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 +5640 -53
- package/dist/index.js +927 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +926 -11
- package/dist/index.mjs.map +1 -1
- package/dist/registry/__tests__/action-input-validator.spec.d.ts +10 -0
- package/dist/registry/__tests__/action-input-validator.spec.d.ts.map +1 -0
- package/dist/registry/__tests__/action-registry-inbox.spec.d.ts +9 -0
- package/dist/registry/__tests__/action-registry-inbox.spec.d.ts.map +1 -0
- package/dist/registry/__tests__/action-registry-scheduling.spec.d.ts +13 -0
- package/dist/registry/__tests__/action-registry-scheduling.spec.d.ts.map +1 -0
- package/dist/registry/__tests__/guidance-examples.spec.d.ts +2 -0
- package/dist/registry/__tests__/guidance-examples.spec.d.ts.map +1 -0
- package/dist/registry/action-input-validator.d.ts +19 -0
- package/dist/registry/action-input-validator.d.ts.map +1 -0
- package/dist/registry/action-registry-json.d.ts +5578 -45
- package/dist/registry/action-registry-json.d.ts.map +1 -1
- package/dist/registry/action-summary.d.ts.map +1 -1
- package/dist/registry/index.d.ts +2 -0
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/providers.d.ts +1 -1
- package/dist/registry/providers.d.ts.map +1 -1
- package/dist/registry/resource-types.d.ts +7 -0
- package/dist/registry/resource-types.d.ts.map +1 -1
- package/dist/types/connector-plugin.d.ts +21 -0
- package/dist/types/connector-plugin.d.ts.map +1 -1
- package/dist/types/grant.d.ts +7 -0
- package/dist/types/grant.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2753,6 +2753,13 @@ var GrantResourceType = /* @__PURE__ */ ((GrantResourceType2) => {
|
|
|
2753
2753
|
GrantResourceType2["JIRA_PROJECT"] = "jira:project";
|
|
2754
2754
|
GrantResourceType2["JIRA_BOARD"] = "jira:board";
|
|
2755
2755
|
GrantResourceType2["JIRA_ISSUE"] = "jira:issue";
|
|
2756
|
+
GrantResourceType2["HUBSPOT_OBJECT"] = "hubspot:object";
|
|
2757
|
+
GrantResourceType2["HUBSPOT_PROPERTY"] = "hubspot:property";
|
|
2758
|
+
GrantResourceType2["HUBSPOT_SCHEMA"] = "hubspot:schema";
|
|
2759
|
+
GrantResourceType2["HUBSPOT_ASSOCIATION"] = "hubspot:association";
|
|
2760
|
+
GrantResourceType2["HUBSPOT_ENGAGEMENT"] = "hubspot:engagement";
|
|
2761
|
+
GrantResourceType2["HUBSPOT_WORKFLOW"] = "hubspot:workflow";
|
|
2762
|
+
GrantResourceType2["HUBSPOT_ACCOUNT"] = "hubspot:account";
|
|
2756
2763
|
GrantResourceType2["OS_SECRET"] = "os:secret";
|
|
2757
2764
|
GrantResourceType2["ANY"] = "*";
|
|
2758
2765
|
return GrantResourceType2;
|
|
@@ -4086,6 +4093,7 @@ var CANONICAL_PROVIDERS = [
|
|
|
4086
4093
|
"gmail",
|
|
4087
4094
|
"calendar",
|
|
4088
4095
|
"jira",
|
|
4096
|
+
"hubspot",
|
|
4089
4097
|
"os"
|
|
4090
4098
|
];
|
|
4091
4099
|
var PROVIDER_ALIASES = {};
|
|
@@ -4329,6 +4337,15 @@ var DummyVpVerifier = class {
|
|
|
4329
4337
|
var ACTION_REGISTRY = {
|
|
4330
4338
|
registry_version: "2025-09-28",
|
|
4331
4339
|
actions: [
|
|
4340
|
+
// ─── Resource binding principle (high-risk CREATE actions) ───
|
|
4341
|
+
// A high-risk CREATE action's target_bindings.resource_id MUST bind to the
|
|
4342
|
+
// container/parent that already exists at approval + invoke time — never to
|
|
4343
|
+
// the not-yet-created resource's id (which does not exist until after the
|
|
4344
|
+
// call and is absent from input_schema). Cedar must resolve the resource at
|
|
4345
|
+
// evaluation time, and the server enforces a specific non-wildcard target,
|
|
4346
|
+
// so an unresolvable binding makes the action impossible to approve.
|
|
4347
|
+
// Examples: slack.message.post → channel, jira.issue.create → projectKey,
|
|
4348
|
+
// hubspot objects.batchCreate → objectType, engagements.create → type.
|
|
4332
4349
|
// ─── Slack Actions ───
|
|
4333
4350
|
{
|
|
4334
4351
|
action: "slack.message.post",
|
|
@@ -4528,15 +4545,21 @@ var ACTION_REGISTRY = {
|
|
|
4528
4545
|
required_relations: ["editor", "act_as"],
|
|
4529
4546
|
required_scopes: ["repo", "write:issues"],
|
|
4530
4547
|
capability: "github.issues.triage",
|
|
4548
|
+
// Schema mirrors the server contract (GitHubConnectorAdapter
|
|
4549
|
+
// getSupportedActions inputSchema — packages/api/src/tool/adapters/
|
|
4550
|
+
// github.adapter.ts): owner/repo are required params.
|
|
4531
4551
|
input_schema: {
|
|
4532
4552
|
type: "object",
|
|
4533
4553
|
properties: {
|
|
4554
|
+
owner: { type: "string", minLength: 1, description: "Repository owner (username or organization)" },
|
|
4555
|
+
repo: { type: "string", minLength: 1, description: "Repository name" },
|
|
4534
4556
|
title: { type: "string", minLength: 1 },
|
|
4535
4557
|
body: { type: "string" },
|
|
4536
4558
|
labels: { type: "array", items: { type: "string" } },
|
|
4537
|
-
assignees: { type: "array", items: { type: "string" } }
|
|
4559
|
+
assignees: { type: "array", items: { type: "string" } },
|
|
4560
|
+
milestone: { type: "integer", minimum: 1, description: "Milestone number to associate with the issue" }
|
|
4538
4561
|
},
|
|
4539
|
-
required: ["title"],
|
|
4562
|
+
required: ["owner", "repo", "title"],
|
|
4540
4563
|
additionalProperties: false
|
|
4541
4564
|
},
|
|
4542
4565
|
constraints: { rate_bucket: "github.write" },
|
|
@@ -4553,9 +4576,13 @@ var ACTION_REGISTRY = {
|
|
|
4553
4576
|
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4554
4577
|
required_scopes: ["repo", "read:issues"],
|
|
4555
4578
|
capability: "github.read.basic",
|
|
4579
|
+
// Schema mirrors the server contract (GitHubConnectorAdapter):
|
|
4580
|
+
// owner/repo are required params.
|
|
4556
4581
|
input_schema: {
|
|
4557
4582
|
type: "object",
|
|
4558
4583
|
properties: {
|
|
4584
|
+
owner: { type: "string", minLength: 1, description: "Repository owner (username or organization)" },
|
|
4585
|
+
repo: { type: "string", minLength: 1, description: "Repository name" },
|
|
4559
4586
|
state: { type: "string", enum: ["open", "closed", "all"] },
|
|
4560
4587
|
labels: { type: "string" },
|
|
4561
4588
|
sort: { type: "string", enum: ["created", "updated", "comments"] },
|
|
@@ -4563,6 +4590,7 @@ var ACTION_REGISTRY = {
|
|
|
4563
4590
|
per_page: { type: "integer", minimum: 1, maximum: 100 },
|
|
4564
4591
|
page: { type: "integer", minimum: 1 }
|
|
4565
4592
|
},
|
|
4593
|
+
required: ["owner", "repo"],
|
|
4566
4594
|
additionalProperties: false
|
|
4567
4595
|
},
|
|
4568
4596
|
constraints: { rate_bucket: "github.read" },
|
|
@@ -4579,12 +4607,17 @@ var ACTION_REGISTRY = {
|
|
|
4579
4607
|
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
4580
4608
|
required_scopes: ["repo", "read:issues"],
|
|
4581
4609
|
capability: "github.read.basic",
|
|
4610
|
+
// Schema mirrors the server contract (GitHubConnectorAdapter):
|
|
4611
|
+
// owner/repo required, camelCase issueNumber (the adapter reads
|
|
4612
|
+
// params.issueNumber — snake_case issue_number was a drift).
|
|
4582
4613
|
input_schema: {
|
|
4583
4614
|
type: "object",
|
|
4584
4615
|
properties: {
|
|
4585
|
-
|
|
4616
|
+
owner: { type: "string", minLength: 1, description: "Repository owner (username or organization)" },
|
|
4617
|
+
repo: { type: "string", minLength: 1, description: "Repository name" },
|
|
4618
|
+
issueNumber: { type: "integer", minimum: 1, description: "Issue number" }
|
|
4586
4619
|
},
|
|
4587
|
-
required: ["
|
|
4620
|
+
required: ["owner", "repo", "issueNumber"],
|
|
4588
4621
|
additionalProperties: false
|
|
4589
4622
|
},
|
|
4590
4623
|
constraints: { rate_bucket: "github.read" },
|
|
@@ -4601,17 +4634,22 @@ var ACTION_REGISTRY = {
|
|
|
4601
4634
|
required_relations: ["editor", "act_as"],
|
|
4602
4635
|
required_scopes: ["repo", "write:issues"],
|
|
4603
4636
|
capability: "github.issues.triage",
|
|
4637
|
+
// Schema mirrors the server contract (GitHubConnectorAdapter):
|
|
4638
|
+
// owner/repo required, camelCase issueNumber (the adapter reads
|
|
4639
|
+
// params.issueNumber — snake_case issue_number was a drift).
|
|
4604
4640
|
input_schema: {
|
|
4605
4641
|
type: "object",
|
|
4606
4642
|
properties: {
|
|
4607
|
-
|
|
4643
|
+
owner: { type: "string", minLength: 1, description: "Repository owner (username or organization)" },
|
|
4644
|
+
repo: { type: "string", minLength: 1, description: "Repository name" },
|
|
4645
|
+
issueNumber: { type: "integer", minimum: 1, description: "Issue number to update" },
|
|
4608
4646
|
title: { type: "string" },
|
|
4609
4647
|
body: { type: "string" },
|
|
4610
4648
|
state: { type: "string", enum: ["open", "closed"] },
|
|
4611
4649
|
labels: { type: "array", items: { type: "string" } },
|
|
4612
4650
|
assignees: { type: "array", items: { type: "string" } }
|
|
4613
4651
|
},
|
|
4614
|
-
required: ["
|
|
4652
|
+
required: ["owner", "repo", "issueNumber"],
|
|
4615
4653
|
additionalProperties: false
|
|
4616
4654
|
},
|
|
4617
4655
|
constraints: { rate_bucket: "github.write" },
|
|
@@ -4903,7 +4941,9 @@ var ACTION_REGISTRY = {
|
|
|
4903
4941
|
}
|
|
4904
4942
|
},
|
|
4905
4943
|
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
4906
|
-
location: { type: "string", description: "Event location" }
|
|
4944
|
+
location: { type: "string", description: "Event location" },
|
|
4945
|
+
addMeet: { type: "boolean", description: "Opt-in: attach a Google Meet link (default: false)" },
|
|
4946
|
+
meetRequestId: { type: "string", description: "Stable idempotency key for the Meet request (used only when addMeet is true)" }
|
|
4907
4947
|
},
|
|
4908
4948
|
required: ["summary", "start", "end"],
|
|
4909
4949
|
additionalProperties: false
|
|
@@ -4951,7 +4991,9 @@ var ACTION_REGISTRY = {
|
|
|
4951
4991
|
}
|
|
4952
4992
|
},
|
|
4953
4993
|
attendees: { type: "array", description: "List of attendee objects with email field", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
4954
|
-
location: { type: "string", description: "Event location" }
|
|
4994
|
+
location: { type: "string", description: "Event location" },
|
|
4995
|
+
addMeet: { type: "boolean", description: "Opt-in: attach a Google Meet link (default: false)" },
|
|
4996
|
+
meetRequestId: { type: "string", description: "Stable idempotency key for the Meet request (used only when addMeet is true)" }
|
|
4955
4997
|
},
|
|
4956
4998
|
required: ["eventId"],
|
|
4957
4999
|
additionalProperties: false
|
|
@@ -5159,7 +5201,13 @@ var ACTION_REGISTRY = {
|
|
|
5159
5201
|
properties: {
|
|
5160
5202
|
projectKey: { type: "string", minLength: 1 },
|
|
5161
5203
|
summary: { type: "string", minLength: 1 },
|
|
5162
|
-
description: {
|
|
5204
|
+
description: {
|
|
5205
|
+
oneOf: [
|
|
5206
|
+
{ type: "string", description: "Plain text description." },
|
|
5207
|
+
{ type: "object", description: 'ADF document object for rich formatting: {type:"doc", version:1, content:[...]}.' }
|
|
5208
|
+
],
|
|
5209
|
+
description: 'Issue description. Pass a plain string, OR an ADF document object ({type:"doc",version:1,content:[...]}) for rich formatting (headings, lists, code, links).'
|
|
5210
|
+
},
|
|
5163
5211
|
issueTypeName: { type: "string", minLength: 1, description: "Issue type name (default: Task)" },
|
|
5164
5212
|
priority: { type: "string" },
|
|
5165
5213
|
assigneeAccountId: { type: "string" },
|
|
@@ -5187,7 +5235,13 @@ var ACTION_REGISTRY = {
|
|
|
5187
5235
|
properties: {
|
|
5188
5236
|
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5189
5237
|
summary: { type: "string" },
|
|
5190
|
-
description: {
|
|
5238
|
+
description: {
|
|
5239
|
+
oneOf: [
|
|
5240
|
+
{ type: "string", description: "Plain text description." },
|
|
5241
|
+
{ type: "object", description: 'ADF document object for rich formatting: {type:"doc", version:1, content:[...]}.' }
|
|
5242
|
+
],
|
|
5243
|
+
description: 'Issue description. Pass a plain string, OR an ADF document object ({type:"doc",version:1,content:[...]}) for rich formatting (headings, lists, code, links).'
|
|
5244
|
+
},
|
|
5191
5245
|
priority: { type: "string" },
|
|
5192
5246
|
assigneeAccountId: { type: "string" },
|
|
5193
5247
|
labels: { type: "array", items: { type: "string" } }
|
|
@@ -5235,7 +5289,13 @@ var ACTION_REGISTRY = {
|
|
|
5235
5289
|
type: "object",
|
|
5236
5290
|
properties: {
|
|
5237
5291
|
issueIdOrKey: { type: "string", minLength: 1 },
|
|
5238
|
-
body: {
|
|
5292
|
+
body: {
|
|
5293
|
+
oneOf: [
|
|
5294
|
+
{ type: "string", minLength: 1, description: "Plain text comment body." },
|
|
5295
|
+
{ type: "object", description: 'ADF document object for rich formatting: {type:"doc", version:1, content:[...]}.' }
|
|
5296
|
+
],
|
|
5297
|
+
description: 'Comment body. Pass a plain string, OR an ADF document object ({type:"doc",version:1,content:[...]}) for rich formatting (headings, lists, code, links).'
|
|
5298
|
+
}
|
|
5239
5299
|
},
|
|
5240
5300
|
required: ["issueIdOrKey", "body"],
|
|
5241
5301
|
additionalProperties: false
|
|
@@ -5491,6 +5551,665 @@ var ACTION_REGISTRY = {
|
|
|
5491
5551
|
resource_id: { source: "param", param: "command" }
|
|
5492
5552
|
},
|
|
5493
5553
|
version: "1.0.0"
|
|
5554
|
+
},
|
|
5555
|
+
// ─── HubSpot CRM Objects (objectType 汎用) ───
|
|
5556
|
+
// 公式 MCP (@hubspot/mcp-server) のツール集合を写像。object 系は objectType
|
|
5557
|
+
// パラメータ化された汎用エンドポイント。scope は objectType ごとに HubSpot 側で
|
|
5558
|
+
// 実行時強制されるため、required_scopes には代表 scope を宣言する (実際の許可範囲は
|
|
5559
|
+
// DEFAULT_SCOPES の固定 union)。
|
|
5560
|
+
{
|
|
5561
|
+
action: "hubspot.crm.objects.list",
|
|
5562
|
+
resource_type: "hubspot:object",
|
|
5563
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5564
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5565
|
+
capability: "hubspot.crm.read",
|
|
5566
|
+
input_schema: {
|
|
5567
|
+
type: "object",
|
|
5568
|
+
properties: {
|
|
5569
|
+
objectType: { type: "string", description: "CRM object type (e.g. contacts, companies, deals) or custom object type ID" },
|
|
5570
|
+
limit: { type: "integer", minimum: 1, maximum: 100 },
|
|
5571
|
+
after: { type: "string" },
|
|
5572
|
+
properties: { type: "array", items: { type: "string" } },
|
|
5573
|
+
archived: { type: "boolean" }
|
|
5574
|
+
},
|
|
5575
|
+
required: ["objectType"],
|
|
5576
|
+
additionalProperties: false
|
|
5577
|
+
},
|
|
5578
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5579
|
+
effects: ["Read:CrmObject"],
|
|
5580
|
+
risk: "low",
|
|
5581
|
+
target_bindings: {
|
|
5582
|
+
resource_id: { source: "param", param: "objectType" }
|
|
5583
|
+
},
|
|
5584
|
+
version: "1.0.0"
|
|
5585
|
+
},
|
|
5586
|
+
{
|
|
5587
|
+
action: "hubspot.crm.objects.search",
|
|
5588
|
+
resource_type: "hubspot:object",
|
|
5589
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5590
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5591
|
+
capability: "hubspot.crm.read",
|
|
5592
|
+
input_schema: {
|
|
5593
|
+
type: "object",
|
|
5594
|
+
properties: {
|
|
5595
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5596
|
+
query: { type: "string", maxLength: 3e3 },
|
|
5597
|
+
filterGroups: { type: "array" },
|
|
5598
|
+
properties: { type: "array", items: { type: "string" } },
|
|
5599
|
+
sorts: { type: "array", items: { type: "string" } },
|
|
5600
|
+
limit: { type: "integer", minimum: 1, maximum: 100 },
|
|
5601
|
+
after: { type: "string" }
|
|
5602
|
+
},
|
|
5603
|
+
required: ["objectType"],
|
|
5604
|
+
additionalProperties: false
|
|
5605
|
+
},
|
|
5606
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5607
|
+
effects: ["Read:CrmObject"],
|
|
5608
|
+
risk: "low",
|
|
5609
|
+
target_bindings: {
|
|
5610
|
+
resource_id: { source: "param", param: "objectType" }
|
|
5611
|
+
},
|
|
5612
|
+
version: "1.0.0"
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
action: "hubspot.crm.objects.batchRead",
|
|
5616
|
+
resource_type: "hubspot:object",
|
|
5617
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5618
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5619
|
+
capability: "hubspot.crm.read",
|
|
5620
|
+
input_schema: {
|
|
5621
|
+
type: "object",
|
|
5622
|
+
properties: {
|
|
5623
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5624
|
+
inputs: {
|
|
5625
|
+
type: "array",
|
|
5626
|
+
minItems: 1,
|
|
5627
|
+
items: { type: "object", properties: { id: { type: "string" } }, required: ["id"], additionalProperties: false }
|
|
5628
|
+
},
|
|
5629
|
+
properties: { type: "array", items: { type: "string" } },
|
|
5630
|
+
idProperty: { type: "string" }
|
|
5631
|
+
},
|
|
5632
|
+
required: ["objectType", "inputs"],
|
|
5633
|
+
additionalProperties: false
|
|
5634
|
+
},
|
|
5635
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5636
|
+
effects: ["Read:CrmObject"],
|
|
5637
|
+
risk: "low",
|
|
5638
|
+
target_bindings: {
|
|
5639
|
+
resource_id: { source: "param", param: "objectType" }
|
|
5640
|
+
},
|
|
5641
|
+
version: "1.0.0"
|
|
5642
|
+
},
|
|
5643
|
+
{
|
|
5644
|
+
action: "hubspot.crm.objects.batchCreate",
|
|
5645
|
+
resource_type: "hubspot:object",
|
|
5646
|
+
required_relations: ["editor", "act_as"],
|
|
5647
|
+
required_scopes: ["crm.objects.contacts.write"],
|
|
5648
|
+
capability: "hubspot.crm.write",
|
|
5649
|
+
input_schema: {
|
|
5650
|
+
type: "object",
|
|
5651
|
+
properties: {
|
|
5652
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5653
|
+
inputs: {
|
|
5654
|
+
type: "array",
|
|
5655
|
+
minItems: 1,
|
|
5656
|
+
items: {
|
|
5657
|
+
type: "object",
|
|
5658
|
+
properties: { properties: { type: "object" }, associations: { type: "array" } },
|
|
5659
|
+
required: ["properties"],
|
|
5660
|
+
additionalProperties: false
|
|
5661
|
+
}
|
|
5662
|
+
}
|
|
5663
|
+
},
|
|
5664
|
+
required: ["objectType", "inputs"],
|
|
5665
|
+
additionalProperties: false
|
|
5666
|
+
},
|
|
5667
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5668
|
+
effects: ["Create:CrmObject"],
|
|
5669
|
+
risk: "high",
|
|
5670
|
+
target_bindings: {
|
|
5671
|
+
resource_id: { source: "param", param: "objectType" }
|
|
5672
|
+
},
|
|
5673
|
+
version: "1.0.0"
|
|
5674
|
+
},
|
|
5675
|
+
{
|
|
5676
|
+
action: "hubspot.crm.objects.batchUpdate",
|
|
5677
|
+
resource_type: "hubspot:object",
|
|
5678
|
+
required_relations: ["editor", "act_as"],
|
|
5679
|
+
required_scopes: ["crm.objects.contacts.write"],
|
|
5680
|
+
capability: "hubspot.crm.write",
|
|
5681
|
+
input_schema: {
|
|
5682
|
+
type: "object",
|
|
5683
|
+
properties: {
|
|
5684
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5685
|
+
inputs: {
|
|
5686
|
+
type: "array",
|
|
5687
|
+
minItems: 1,
|
|
5688
|
+
items: {
|
|
5689
|
+
type: "object",
|
|
5690
|
+
properties: { id: { type: "string" }, properties: { type: "object" } },
|
|
5691
|
+
required: ["id", "properties"],
|
|
5692
|
+
additionalProperties: false
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5695
|
+
},
|
|
5696
|
+
required: ["objectType", "inputs"],
|
|
5697
|
+
additionalProperties: false
|
|
5698
|
+
},
|
|
5699
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5700
|
+
effects: ["Update:CrmObject"],
|
|
5701
|
+
risk: "high",
|
|
5702
|
+
target_bindings: {
|
|
5703
|
+
resource_id: { source: "param", param: "objectType" }
|
|
5704
|
+
},
|
|
5705
|
+
version: "1.0.0"
|
|
5706
|
+
},
|
|
5707
|
+
{
|
|
5708
|
+
action: "hubspot.crm.schemas.get",
|
|
5709
|
+
resource_type: "hubspot:schema",
|
|
5710
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5711
|
+
required_scopes: ["crm.schemas.custom.read"],
|
|
5712
|
+
capability: "hubspot.crm.read",
|
|
5713
|
+
input_schema: {
|
|
5714
|
+
type: "object",
|
|
5715
|
+
properties: {},
|
|
5716
|
+
additionalProperties: false
|
|
5717
|
+
},
|
|
5718
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5719
|
+
effects: ["Read:CrmSchema"],
|
|
5720
|
+
risk: "low",
|
|
5721
|
+
target_bindings: {
|
|
5722
|
+
resource_id: { source: "param", param: "objectType", required: false }
|
|
5723
|
+
},
|
|
5724
|
+
version: "1.0.0"
|
|
5725
|
+
},
|
|
5726
|
+
// ─── HubSpot Properties ───
|
|
5727
|
+
{
|
|
5728
|
+
action: "hubspot.crm.properties.list",
|
|
5729
|
+
resource_type: "hubspot:property",
|
|
5730
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5731
|
+
required_scopes: ["crm.schemas.contacts.read"],
|
|
5732
|
+
capability: "hubspot.crm.read",
|
|
5733
|
+
input_schema: {
|
|
5734
|
+
type: "object",
|
|
5735
|
+
properties: {
|
|
5736
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5737
|
+
archived: { type: "boolean" }
|
|
5738
|
+
},
|
|
5739
|
+
required: ["objectType"],
|
|
5740
|
+
additionalProperties: false
|
|
5741
|
+
},
|
|
5742
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5743
|
+
effects: ["Read:CrmProperty"],
|
|
5744
|
+
risk: "low",
|
|
5745
|
+
target_bindings: { resource_id: { source: "param", param: "objectType" } },
|
|
5746
|
+
version: "1.0.0"
|
|
5747
|
+
},
|
|
5748
|
+
{
|
|
5749
|
+
action: "hubspot.crm.properties.get",
|
|
5750
|
+
resource_type: "hubspot:property",
|
|
5751
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5752
|
+
required_scopes: ["crm.schemas.contacts.read"],
|
|
5753
|
+
capability: "hubspot.crm.read",
|
|
5754
|
+
input_schema: {
|
|
5755
|
+
type: "object",
|
|
5756
|
+
properties: {
|
|
5757
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5758
|
+
propertyName: { type: "string", description: "Internal property name" }
|
|
5759
|
+
},
|
|
5760
|
+
required: ["objectType", "propertyName"],
|
|
5761
|
+
additionalProperties: false
|
|
5762
|
+
},
|
|
5763
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5764
|
+
effects: ["Read:CrmProperty"],
|
|
5765
|
+
risk: "low",
|
|
5766
|
+
target_bindings: { resource_id: { source: "param", param: "objectType" } },
|
|
5767
|
+
version: "1.0.0"
|
|
5768
|
+
},
|
|
5769
|
+
{
|
|
5770
|
+
action: "hubspot.crm.properties.create",
|
|
5771
|
+
resource_type: "hubspot:property",
|
|
5772
|
+
required_relations: ["editor", "act_as"],
|
|
5773
|
+
required_scopes: ["crm.schemas.contacts.write"],
|
|
5774
|
+
capability: "hubspot.crm.write",
|
|
5775
|
+
input_schema: {
|
|
5776
|
+
type: "object",
|
|
5777
|
+
properties: {
|
|
5778
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5779
|
+
name: { type: "string" },
|
|
5780
|
+
label: { type: "string" },
|
|
5781
|
+
type: { type: "string" },
|
|
5782
|
+
fieldType: { type: "string" },
|
|
5783
|
+
groupName: { type: "string" },
|
|
5784
|
+
description: { type: "string" },
|
|
5785
|
+
options: { type: "array" }
|
|
5786
|
+
},
|
|
5787
|
+
required: ["objectType", "name", "label", "type", "fieldType", "groupName"],
|
|
5788
|
+
additionalProperties: false
|
|
5789
|
+
},
|
|
5790
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5791
|
+
effects: ["Create:CrmProperty"],
|
|
5792
|
+
risk: "high",
|
|
5793
|
+
target_bindings: { resource_id: { source: "param", param: "objectType" } },
|
|
5794
|
+
version: "1.0.0"
|
|
5795
|
+
},
|
|
5796
|
+
{
|
|
5797
|
+
action: "hubspot.crm.properties.update",
|
|
5798
|
+
resource_type: "hubspot:property",
|
|
5799
|
+
required_relations: ["editor", "act_as"],
|
|
5800
|
+
required_scopes: ["crm.schemas.contacts.write"],
|
|
5801
|
+
capability: "hubspot.crm.write",
|
|
5802
|
+
input_schema: {
|
|
5803
|
+
type: "object",
|
|
5804
|
+
properties: {
|
|
5805
|
+
objectType: { type: "string", description: "CRM object type or custom object type ID" },
|
|
5806
|
+
propertyName: { type: "string" },
|
|
5807
|
+
label: { type: "string" },
|
|
5808
|
+
type: { type: "string" },
|
|
5809
|
+
fieldType: { type: "string" },
|
|
5810
|
+
groupName: { type: "string" },
|
|
5811
|
+
description: { type: "string" },
|
|
5812
|
+
options: { type: "array" }
|
|
5813
|
+
},
|
|
5814
|
+
required: ["objectType", "propertyName"],
|
|
5815
|
+
additionalProperties: false
|
|
5816
|
+
},
|
|
5817
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5818
|
+
effects: ["Update:CrmProperty"],
|
|
5819
|
+
risk: "high",
|
|
5820
|
+
target_bindings: { resource_id: { source: "param", param: "objectType" } },
|
|
5821
|
+
version: "1.0.0"
|
|
5822
|
+
},
|
|
5823
|
+
// ─── HubSpot Associations (v4) ───
|
|
5824
|
+
{
|
|
5825
|
+
action: "hubspot.crm.associations.list",
|
|
5826
|
+
resource_type: "hubspot:association",
|
|
5827
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5828
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5829
|
+
capability: "hubspot.crm.read",
|
|
5830
|
+
input_schema: {
|
|
5831
|
+
type: "object",
|
|
5832
|
+
properties: {
|
|
5833
|
+
objectType: { type: "string" },
|
|
5834
|
+
objectId: { type: "string" },
|
|
5835
|
+
toObjectType: { type: "string" },
|
|
5836
|
+
after: { type: "string" },
|
|
5837
|
+
limit: { type: "integer", minimum: 1, maximum: 100 }
|
|
5838
|
+
},
|
|
5839
|
+
required: ["objectType", "objectId", "toObjectType"],
|
|
5840
|
+
additionalProperties: false
|
|
5841
|
+
},
|
|
5842
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5843
|
+
effects: ["Read:CrmAssociation"],
|
|
5844
|
+
risk: "low",
|
|
5845
|
+
target_bindings: { resource_id: { source: "param", param: "objectType" } },
|
|
5846
|
+
version: "1.0.0"
|
|
5847
|
+
},
|
|
5848
|
+
{
|
|
5849
|
+
action: "hubspot.crm.associations.getDefinitions",
|
|
5850
|
+
resource_type: "hubspot:association",
|
|
5851
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5852
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5853
|
+
capability: "hubspot.crm.read",
|
|
5854
|
+
input_schema: {
|
|
5855
|
+
type: "object",
|
|
5856
|
+
properties: {
|
|
5857
|
+
fromObjectType: { type: "string" },
|
|
5858
|
+
toObjectType: { type: "string" }
|
|
5859
|
+
},
|
|
5860
|
+
required: ["fromObjectType", "toObjectType"],
|
|
5861
|
+
additionalProperties: false
|
|
5862
|
+
},
|
|
5863
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5864
|
+
effects: ["Read:CrmAssociation"],
|
|
5865
|
+
risk: "low",
|
|
5866
|
+
target_bindings: { resource_id: { source: "param", param: "fromObjectType" } },
|
|
5867
|
+
version: "1.0.0"
|
|
5868
|
+
},
|
|
5869
|
+
{
|
|
5870
|
+
action: "hubspot.crm.associations.batchCreate",
|
|
5871
|
+
resource_type: "hubspot:association",
|
|
5872
|
+
required_relations: ["editor", "act_as"],
|
|
5873
|
+
required_scopes: ["crm.objects.contacts.write"],
|
|
5874
|
+
capability: "hubspot.crm.write",
|
|
5875
|
+
input_schema: {
|
|
5876
|
+
type: "object",
|
|
5877
|
+
properties: {
|
|
5878
|
+
fromObjectType: { type: "string" },
|
|
5879
|
+
toObjectType: { type: "string" },
|
|
5880
|
+
inputs: { type: "array", minItems: 1 }
|
|
5881
|
+
},
|
|
5882
|
+
required: ["fromObjectType", "toObjectType", "inputs"],
|
|
5883
|
+
additionalProperties: false
|
|
5884
|
+
},
|
|
5885
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5886
|
+
effects: ["Create:CrmAssociation"],
|
|
5887
|
+
risk: "high",
|
|
5888
|
+
target_bindings: { resource_id: { source: "param", param: "fromObjectType" } },
|
|
5889
|
+
version: "1.0.0"
|
|
5890
|
+
},
|
|
5891
|
+
// ─── HubSpot Engagements (legacy v1: NOTE / TASK) ───
|
|
5892
|
+
{
|
|
5893
|
+
action: "hubspot.crm.engagements.get",
|
|
5894
|
+
resource_type: "hubspot:engagement",
|
|
5895
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5896
|
+
required_scopes: ["crm.objects.contacts.read"],
|
|
5897
|
+
capability: "hubspot.crm.read",
|
|
5898
|
+
input_schema: {
|
|
5899
|
+
type: "object",
|
|
5900
|
+
properties: { engagementId: { type: "string" } },
|
|
5901
|
+
required: ["engagementId"],
|
|
5902
|
+
additionalProperties: false
|
|
5903
|
+
},
|
|
5904
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5905
|
+
effects: ["Read:CrmEngagement"],
|
|
5906
|
+
risk: "low",
|
|
5907
|
+
target_bindings: { resource_id: { source: "param", param: "engagementId" } },
|
|
5908
|
+
version: "1.0.0"
|
|
5909
|
+
},
|
|
5910
|
+
{
|
|
5911
|
+
action: "hubspot.crm.engagements.create",
|
|
5912
|
+
resource_type: "hubspot:engagement",
|
|
5913
|
+
required_relations: ["editor", "act_as"],
|
|
5914
|
+
required_scopes: ["crm.objects.contacts.write"],
|
|
5915
|
+
capability: "hubspot.crm.write",
|
|
5916
|
+
input_schema: {
|
|
5917
|
+
type: "object",
|
|
5918
|
+
properties: {
|
|
5919
|
+
type: { type: "string", enum: ["NOTE", "TASK"] },
|
|
5920
|
+
ownerId: { type: "number" },
|
|
5921
|
+
timestamp: { type: "number" },
|
|
5922
|
+
associations: { type: "object" },
|
|
5923
|
+
metadata: { type: "object" }
|
|
5924
|
+
},
|
|
5925
|
+
required: ["type", "ownerId", "metadata"],
|
|
5926
|
+
additionalProperties: false
|
|
5927
|
+
},
|
|
5928
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5929
|
+
effects: ["Create:CrmEngagement"],
|
|
5930
|
+
risk: "high",
|
|
5931
|
+
// Bind to the engagement type (NOTE/TASK) as the container that exists at
|
|
5932
|
+
// call time, consistent with other create actions (see CREATE-binding note above).
|
|
5933
|
+
target_bindings: { resource_id: { source: "param", param: "type" } },
|
|
5934
|
+
version: "1.0.0"
|
|
5935
|
+
},
|
|
5936
|
+
{
|
|
5937
|
+
action: "hubspot.crm.engagements.update",
|
|
5938
|
+
resource_type: "hubspot:engagement",
|
|
5939
|
+
required_relations: ["editor", "act_as"],
|
|
5940
|
+
required_scopes: ["crm.objects.contacts.write"],
|
|
5941
|
+
capability: "hubspot.crm.write",
|
|
5942
|
+
input_schema: {
|
|
5943
|
+
type: "object",
|
|
5944
|
+
properties: {
|
|
5945
|
+
engagementId: { type: "string" },
|
|
5946
|
+
ownerId: { type: "number" },
|
|
5947
|
+
timestamp: { type: "number" },
|
|
5948
|
+
associations: { type: "object" },
|
|
5949
|
+
metadata: { type: "object" }
|
|
5950
|
+
},
|
|
5951
|
+
required: ["engagementId"],
|
|
5952
|
+
additionalProperties: false
|
|
5953
|
+
},
|
|
5954
|
+
constraints: { rate_bucket: "hubspot.write" },
|
|
5955
|
+
effects: ["Update:CrmEngagement"],
|
|
5956
|
+
risk: "high",
|
|
5957
|
+
target_bindings: { resource_id: { source: "param", param: "engagementId" } },
|
|
5958
|
+
version: "1.0.0"
|
|
5959
|
+
},
|
|
5960
|
+
// ─── HubSpot Workflows (automation v4 flows, read-only) ───
|
|
5961
|
+
{
|
|
5962
|
+
action: "hubspot.automation.workflows.list",
|
|
5963
|
+
resource_type: "hubspot:workflow",
|
|
5964
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5965
|
+
required_scopes: ["automation"],
|
|
5966
|
+
capability: "hubspot.automation.read",
|
|
5967
|
+
input_schema: {
|
|
5968
|
+
type: "object",
|
|
5969
|
+
properties: {
|
|
5970
|
+
after: { type: "string" },
|
|
5971
|
+
limit: { type: "integer", minimum: 1, maximum: 100 }
|
|
5972
|
+
},
|
|
5973
|
+
additionalProperties: false
|
|
5974
|
+
},
|
|
5975
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5976
|
+
effects: ["Read:Workflow"],
|
|
5977
|
+
risk: "low",
|
|
5978
|
+
target_bindings: { resource_id: { source: "param", param: "flowId", required: false } },
|
|
5979
|
+
version: "1.0.0"
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
action: "hubspot.automation.workflows.get",
|
|
5983
|
+
resource_type: "hubspot:workflow",
|
|
5984
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
5985
|
+
required_scopes: ["automation"],
|
|
5986
|
+
capability: "hubspot.automation.read",
|
|
5987
|
+
input_schema: {
|
|
5988
|
+
type: "object",
|
|
5989
|
+
properties: { flowId: { type: "string" } },
|
|
5990
|
+
required: ["flowId"],
|
|
5991
|
+
additionalProperties: false
|
|
5992
|
+
},
|
|
5993
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
5994
|
+
effects: ["Read:Workflow"],
|
|
5995
|
+
risk: "low",
|
|
5996
|
+
target_bindings: { resource_id: { source: "param", param: "flowId" } },
|
|
5997
|
+
version: "1.0.0"
|
|
5998
|
+
},
|
|
5999
|
+
// ─── HubSpot Account / utility ───
|
|
6000
|
+
{
|
|
6001
|
+
action: "hubspot.account.userDetails.get",
|
|
6002
|
+
resource_type: "hubspot:account",
|
|
6003
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
6004
|
+
required_scopes: ["oauth"],
|
|
6005
|
+
capability: "hubspot.account.read",
|
|
6006
|
+
input_schema: {
|
|
6007
|
+
type: "object",
|
|
6008
|
+
properties: {},
|
|
6009
|
+
additionalProperties: false
|
|
6010
|
+
},
|
|
6011
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
6012
|
+
effects: ["Read:Account"],
|
|
6013
|
+
risk: "low",
|
|
6014
|
+
target_bindings: { resource_id: { source: "param", param: "hubId", required: false } },
|
|
6015
|
+
version: "1.0.0"
|
|
6016
|
+
},
|
|
6017
|
+
{
|
|
6018
|
+
action: "hubspot.account.link.get",
|
|
6019
|
+
resource_type: "hubspot:account",
|
|
6020
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
6021
|
+
// Pure URL builder; nominal base scope (always granted) keeps it
|
|
6022
|
+
// grantable and satisfies the registry's minItems:1 contract.
|
|
6023
|
+
required_scopes: ["oauth"],
|
|
6024
|
+
capability: "hubspot.account.read",
|
|
6025
|
+
input_schema: {
|
|
6026
|
+
type: "object",
|
|
6027
|
+
properties: {
|
|
6028
|
+
portalId: { type: "string" },
|
|
6029
|
+
uiDomain: { type: "string" },
|
|
6030
|
+
pageRequests: { type: "array", minItems: 1 }
|
|
6031
|
+
},
|
|
6032
|
+
required: ["portalId", "uiDomain", "pageRequests"],
|
|
6033
|
+
additionalProperties: false
|
|
6034
|
+
},
|
|
6035
|
+
constraints: { rate_bucket: "hubspot.read" },
|
|
6036
|
+
effects: ["Read:Account"],
|
|
6037
|
+
risk: "low",
|
|
6038
|
+
target_bindings: { resource_id: { source: "param", param: "portalId" } },
|
|
6039
|
+
version: "1.0.0"
|
|
6040
|
+
},
|
|
6041
|
+
// ─── Agent Inbox Actions (internal) ───
|
|
6042
|
+
// Inbox actions back the Agent Inbox MCP tools (task delegation between
|
|
6043
|
+
// agents/people). They are internal (no external OAuth provider), so they
|
|
6044
|
+
// carry a single nominal base scope `inbox` to satisfy the registry
|
|
6045
|
+
// meta-schema's `minItems: 1` (same pattern as hubspot.account.link.get).
|
|
6046
|
+
{
|
|
6047
|
+
action: "inbox.send",
|
|
6048
|
+
resource_type: "inbox:item",
|
|
6049
|
+
required_relations: ["editor", "act_as"],
|
|
6050
|
+
required_scopes: ["inbox"],
|
|
6051
|
+
capability: "inbox.write",
|
|
6052
|
+
input_schema: {
|
|
6053
|
+
type: "object",
|
|
6054
|
+
properties: {
|
|
6055
|
+
to: { type: "string", minLength: 1, description: "Recipient (user id / handle) the task request is sent to" },
|
|
6056
|
+
taskType: { type: "string", minLength: 1, description: "Type of task being requested" },
|
|
6057
|
+
payload: { type: "object", description: "Task-specific payload data" },
|
|
6058
|
+
message: { type: "string", description: "Optional human-readable message" }
|
|
6059
|
+
},
|
|
6060
|
+
required: ["to", "taskType", "payload"],
|
|
6061
|
+
additionalProperties: false
|
|
6062
|
+
},
|
|
6063
|
+
constraints: { rate_bucket: "inbox.write" },
|
|
6064
|
+
effects: ["Create:InboxItem"],
|
|
6065
|
+
risk: "high",
|
|
6066
|
+
target_bindings: {
|
|
6067
|
+
resource_id: { source: "param", param: "to" }
|
|
6068
|
+
},
|
|
6069
|
+
version: "1.0.0"
|
|
6070
|
+
},
|
|
6071
|
+
{
|
|
6072
|
+
action: "inbox.respond",
|
|
6073
|
+
resource_type: "inbox:item",
|
|
6074
|
+
required_relations: ["editor", "act_as"],
|
|
6075
|
+
required_scopes: ["inbox"],
|
|
6076
|
+
capability: "inbox.write",
|
|
6077
|
+
input_schema: {
|
|
6078
|
+
type: "object",
|
|
6079
|
+
properties: {
|
|
6080
|
+
id: { type: "string", minLength: 1, description: "Inbox item id being responded to" },
|
|
6081
|
+
action: { type: "string", enum: ["accept", "decline", "counter"], description: "Response action" },
|
|
6082
|
+
data: { type: "object", description: "Optional response data (e.g. counter-proposal)" }
|
|
6083
|
+
},
|
|
6084
|
+
required: ["id", "action"],
|
|
6085
|
+
additionalProperties: false
|
|
6086
|
+
},
|
|
6087
|
+
constraints: { rate_bucket: "inbox.write" },
|
|
6088
|
+
effects: ["Update:InboxItem"],
|
|
6089
|
+
// high (not medium): an agent-mediated response (MCP invoke) must always
|
|
6090
|
+
// go through human approval — the Phase 1 "always confirm" guarantee made
|
|
6091
|
+
// enforceable. target_bindings below binds the concrete inbox item id so
|
|
6092
|
+
// the high-risk approval has a specific resource constraint (the public
|
|
6093
|
+
// /scheduling/:token link flow does NOT go through this gate — it calls
|
|
6094
|
+
// InboxService.respond directly, system-key-signed).
|
|
6095
|
+
risk: "high",
|
|
6096
|
+
target_bindings: {
|
|
6097
|
+
resource_id: { source: "param", param: "id" }
|
|
6098
|
+
},
|
|
6099
|
+
version: "1.0.0"
|
|
6100
|
+
},
|
|
6101
|
+
{
|
|
6102
|
+
action: "inbox.check",
|
|
6103
|
+
resource_type: "inbox:item",
|
|
6104
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
6105
|
+
required_scopes: ["inbox"],
|
|
6106
|
+
capability: "inbox.read",
|
|
6107
|
+
input_schema: {
|
|
6108
|
+
type: "object",
|
|
6109
|
+
properties: {
|
|
6110
|
+
types: { type: "array", items: { type: "string" }, description: "Filter by task types" },
|
|
6111
|
+
status: { type: "string", description: "Filter by item status" }
|
|
6112
|
+
},
|
|
6113
|
+
additionalProperties: false
|
|
6114
|
+
},
|
|
6115
|
+
constraints: { rate_bucket: "inbox.read" },
|
|
6116
|
+
effects: ["Read:InboxItem"],
|
|
6117
|
+
risk: "low",
|
|
6118
|
+
target_bindings: {
|
|
6119
|
+
resource_id: { source: "param", param: "id", required: false }
|
|
6120
|
+
},
|
|
6121
|
+
version: "1.0.0"
|
|
6122
|
+
},
|
|
6123
|
+
{
|
|
6124
|
+
action: "inbox.checkByToken",
|
|
6125
|
+
resource_type: "inbox:item",
|
|
6126
|
+
required_relations: ["viewer", "editor", "admin", "owner"],
|
|
6127
|
+
required_scopes: ["inbox"],
|
|
6128
|
+
capability: "inbox.read",
|
|
6129
|
+
input_schema: {
|
|
6130
|
+
type: "object",
|
|
6131
|
+
properties: {
|
|
6132
|
+
token: { type: "string", minLength: 1, description: "Opaque access token for a single inbox item" }
|
|
6133
|
+
},
|
|
6134
|
+
required: ["token"],
|
|
6135
|
+
additionalProperties: false
|
|
6136
|
+
},
|
|
6137
|
+
constraints: { rate_bucket: "inbox.read" },
|
|
6138
|
+
effects: ["Read:InboxItem"],
|
|
6139
|
+
risk: "low",
|
|
6140
|
+
target_bindings: {
|
|
6141
|
+
resource_id: { source: "param", param: "token" }
|
|
6142
|
+
},
|
|
6143
|
+
version: "1.0.0"
|
|
6144
|
+
},
|
|
6145
|
+
{
|
|
6146
|
+
action: "inbox.complete",
|
|
6147
|
+
resource_type: "inbox:item",
|
|
6148
|
+
required_relations: ["editor", "act_as"],
|
|
6149
|
+
required_scopes: ["inbox"],
|
|
6150
|
+
capability: "inbox.write",
|
|
6151
|
+
input_schema: {
|
|
6152
|
+
type: "object",
|
|
6153
|
+
properties: {
|
|
6154
|
+
id: { type: "string", minLength: 1, description: "Inbox item id being completed" },
|
|
6155
|
+
result: { type: "object", description: "Result payload for the completed task" }
|
|
6156
|
+
},
|
|
6157
|
+
required: ["id", "result"],
|
|
6158
|
+
additionalProperties: false
|
|
6159
|
+
},
|
|
6160
|
+
constraints: { rate_bucket: "inbox.write" },
|
|
6161
|
+
effects: ["Update:InboxItem"],
|
|
6162
|
+
risk: "low",
|
|
6163
|
+
target_bindings: {
|
|
6164
|
+
resource_id: { source: "param", param: "id" }
|
|
6165
|
+
},
|
|
6166
|
+
version: "1.0.0"
|
|
6167
|
+
},
|
|
6168
|
+
// ─── Scheduling Actions (internal) ───
|
|
6169
|
+
// scheduling.request is a meeting-time negotiation façade over inbox.send.
|
|
6170
|
+
// Candidate slots are computed LLM-side from the user calendar; the server
|
|
6171
|
+
// only validates them. Like the inbox actions it is internal (no external
|
|
6172
|
+
// OAuth provider), so it carries the single nominal base scope `inbox`.
|
|
6173
|
+
// Spec: docs/specs/2026-06-10-inbox-intent-routing-design.md §2.1
|
|
6174
|
+
{
|
|
6175
|
+
action: "scheduling.request",
|
|
6176
|
+
resource_type: "inbox:item",
|
|
6177
|
+
required_relations: ["editor", "act_as"],
|
|
6178
|
+
required_scopes: ["inbox"],
|
|
6179
|
+
capability: "inbox.write",
|
|
6180
|
+
input_schema: {
|
|
6181
|
+
type: "object",
|
|
6182
|
+
properties: {
|
|
6183
|
+
to: { type: "string", minLength: 1, description: "Counterpart (user id / email) to negotiate a meeting time with" },
|
|
6184
|
+
topic: { type: "string", minLength: 1, description: "Meeting topic shown to the counterpart" },
|
|
6185
|
+
durationMinutes: { type: "integer", minimum: 5, maximum: 480, description: "Meeting length in minutes" },
|
|
6186
|
+
candidates: {
|
|
6187
|
+
type: "array",
|
|
6188
|
+
minItems: 1,
|
|
6189
|
+
maxItems: 10,
|
|
6190
|
+
description: "Candidate slots computed by the agent from the user calendar (LLM-side computation; the server only validates)",
|
|
6191
|
+
items: {
|
|
6192
|
+
type: "object",
|
|
6193
|
+
properties: {
|
|
6194
|
+
start: { type: "string", description: "ISO 8601 start" },
|
|
6195
|
+
end: { type: "string", description: "ISO 8601 end" }
|
|
6196
|
+
},
|
|
6197
|
+
required: ["start", "end"],
|
|
6198
|
+
additionalProperties: false
|
|
6199
|
+
}
|
|
6200
|
+
},
|
|
6201
|
+
message: { type: "string", description: "Optional human-readable message" }
|
|
6202
|
+
},
|
|
6203
|
+
required: ["to", "topic", "durationMinutes", "candidates"],
|
|
6204
|
+
additionalProperties: false
|
|
6205
|
+
},
|
|
6206
|
+
constraints: { rate_bucket: "inbox.write" },
|
|
6207
|
+
effects: ["Create:InboxItem"],
|
|
6208
|
+
risk: "high",
|
|
6209
|
+
target_bindings: {
|
|
6210
|
+
resource_id: { source: "param", param: "to" }
|
|
6211
|
+
},
|
|
6212
|
+
version: "1.0.0"
|
|
5494
6213
|
}
|
|
5495
6214
|
],
|
|
5496
6215
|
capabilities: [
|
|
@@ -5559,10 +6278,140 @@ var ACTION_REGISTRY = {
|
|
|
5559
6278
|
description: "Create, update, delete Jira issues, and manage issue links",
|
|
5560
6279
|
includes: ["jira.issue.create", "jira.issue.update", "jira.issue.delete", "jira.comment.create", "jira.issue.transition", "jira.issuelink.create", "jira.issuelink.delete"],
|
|
5561
6280
|
version: "1.0.0"
|
|
6281
|
+
},
|
|
6282
|
+
{
|
|
6283
|
+
capability: "inbox.write",
|
|
6284
|
+
description: "Send and respond to agent inbox tasks",
|
|
6285
|
+
includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request"],
|
|
6286
|
+
version: "1.0.0"
|
|
6287
|
+
},
|
|
6288
|
+
{
|
|
6289
|
+
capability: "inbox.read",
|
|
6290
|
+
description: "Read agent inbox tasks",
|
|
6291
|
+
includes: ["inbox.check", "inbox.checkByToken"],
|
|
6292
|
+
version: "1.0.0"
|
|
5562
6293
|
}
|
|
5563
6294
|
]
|
|
5564
6295
|
};
|
|
5565
6296
|
|
|
6297
|
+
// src/registry/action-input-validator.ts
|
|
6298
|
+
var SCHEMA_INDEX = (() => {
|
|
6299
|
+
const map = /* @__PURE__ */ new Map();
|
|
6300
|
+
for (const a of ACTION_REGISTRY.actions) {
|
|
6301
|
+
if (a && typeof a.action === "string" && a.input_schema) {
|
|
6302
|
+
map.set(a.action, a.input_schema);
|
|
6303
|
+
}
|
|
6304
|
+
}
|
|
6305
|
+
return map;
|
|
6306
|
+
})();
|
|
6307
|
+
function describeExpectedShape(schema) {
|
|
6308
|
+
const props = schema.properties ?? {};
|
|
6309
|
+
const required = Array.isArray(schema.required) ? schema.required : [];
|
|
6310
|
+
const requiredSet = new Set(required);
|
|
6311
|
+
const parts = [];
|
|
6312
|
+
const orderedKeys = [
|
|
6313
|
+
...required.filter((k) => k in props),
|
|
6314
|
+
...Object.keys(props).filter((k) => !requiredSet.has(k))
|
|
6315
|
+
];
|
|
6316
|
+
for (const key of orderedKeys) {
|
|
6317
|
+
const prop = props[key] || {};
|
|
6318
|
+
const optionalMark = requiredSet.has(key) ? "" : "?";
|
|
6319
|
+
const enumVals = Array.isArray(prop.enum) ? prop.enum : void 0;
|
|
6320
|
+
if (enumVals && enumVals.length > 0) {
|
|
6321
|
+
const rendered = enumVals.map((v) => typeof v === "string" ? `'${v}'` : String(v)).join(" | ");
|
|
6322
|
+
parts.push(`${key}${optionalMark}: ${rendered}`);
|
|
6323
|
+
} else {
|
|
6324
|
+
parts.push(`${key}${optionalMark}`);
|
|
6325
|
+
}
|
|
6326
|
+
}
|
|
6327
|
+
return `{ ${parts.join(", ")} }`;
|
|
6328
|
+
}
|
|
6329
|
+
function matchesType(value, type) {
|
|
6330
|
+
if (!type) return true;
|
|
6331
|
+
switch (type) {
|
|
6332
|
+
case "string":
|
|
6333
|
+
return typeof value === "string";
|
|
6334
|
+
case "integer":
|
|
6335
|
+
return typeof value === "number" && Number.isInteger(value);
|
|
6336
|
+
case "number":
|
|
6337
|
+
return typeof value === "number";
|
|
6338
|
+
case "boolean":
|
|
6339
|
+
return typeof value === "boolean";
|
|
6340
|
+
case "array":
|
|
6341
|
+
return Array.isArray(value);
|
|
6342
|
+
case "object":
|
|
6343
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6344
|
+
default:
|
|
6345
|
+
return true;
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
function validateActionInput(action, params) {
|
|
6349
|
+
const schema = SCHEMA_INDEX.get(action);
|
|
6350
|
+
if (!schema) {
|
|
6351
|
+
return { valid: true };
|
|
6352
|
+
}
|
|
6353
|
+
const props = schema.properties ?? {};
|
|
6354
|
+
const required = Array.isArray(schema.required) ? schema.required : [];
|
|
6355
|
+
const additionalProps = schema.additionalProperties;
|
|
6356
|
+
const safeParams = params && typeof params === "object" && !Array.isArray(params) ? params : {};
|
|
6357
|
+
const missing = [];
|
|
6358
|
+
const unknown = [];
|
|
6359
|
+
const enumErrors = [];
|
|
6360
|
+
const typeErrors = [];
|
|
6361
|
+
for (const key of required) {
|
|
6362
|
+
if (!(key in safeParams) || safeParams[key] === void 0 || safeParams[key] === null) {
|
|
6363
|
+
missing.push(key);
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
if (additionalProps === false) {
|
|
6367
|
+
for (const key of Object.keys(safeParams)) {
|
|
6368
|
+
if (!(key in props)) {
|
|
6369
|
+
unknown.push(key);
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
}
|
|
6373
|
+
for (const key of Object.keys(props)) {
|
|
6374
|
+
if (!(key in safeParams)) continue;
|
|
6375
|
+
const value = safeParams[key];
|
|
6376
|
+
if (value === void 0 || value === null) continue;
|
|
6377
|
+
const prop = props[key] || {};
|
|
6378
|
+
const enumVals = Array.isArray(prop.enum) ? prop.enum : void 0;
|
|
6379
|
+
if (enumVals && enumVals.length > 0) {
|
|
6380
|
+
if (!enumVals.includes(value)) {
|
|
6381
|
+
enumErrors.push(key);
|
|
6382
|
+
continue;
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6385
|
+
if (!matchesType(value, prop.type)) {
|
|
6386
|
+
typeErrors.push(key);
|
|
6387
|
+
}
|
|
6388
|
+
}
|
|
6389
|
+
if (missing.length === 0 && unknown.length === 0 && enumErrors.length === 0 && typeErrors.length === 0) {
|
|
6390
|
+
return { valid: true };
|
|
6391
|
+
}
|
|
6392
|
+
const segments = [];
|
|
6393
|
+
if (missing.length > 0) {
|
|
6394
|
+
segments.push(`missing required parameter(s) [${missing.join(", ")}]`);
|
|
6395
|
+
}
|
|
6396
|
+
if (unknown.length > 0) {
|
|
6397
|
+
segments.push(`unknown parameter(s) [${unknown.join(", ")}]`);
|
|
6398
|
+
}
|
|
6399
|
+
if (enumErrors.length > 0) {
|
|
6400
|
+
const details = enumErrors.map((key) => {
|
|
6401
|
+
const enumVals = props[key]?.enum || [];
|
|
6402
|
+
const rendered = enumVals.map((v) => typeof v === "string" ? `'${v}'` : String(v)).join(" | ");
|
|
6403
|
+
return `${key} (allowed: ${rendered})`;
|
|
6404
|
+
}).join(", ");
|
|
6405
|
+
segments.push(`invalid value for enum parameter(s) [${details}]`);
|
|
6406
|
+
}
|
|
6407
|
+
if (typeErrors.length > 0) {
|
|
6408
|
+
const details = typeErrors.map((key) => `${key} (expected ${props[key]?.type})`).join(", ");
|
|
6409
|
+
segments.push(`wrong type for parameter(s) [${details}]`);
|
|
6410
|
+
}
|
|
6411
|
+
const message = `${action}: ${segments.join("; ")}. Expected shape: ${describeExpectedShape(schema)}`;
|
|
6412
|
+
return { valid: false, errors: [message] };
|
|
6413
|
+
}
|
|
6414
|
+
|
|
5566
6415
|
// src/registry/resource-types.ts
|
|
5567
6416
|
var RESOURCE_TYPES = {
|
|
5568
6417
|
// Slack
|
|
@@ -5584,6 +6433,14 @@ var RESOURCE_TYPES = {
|
|
|
5584
6433
|
JIRA_BOARD: "jira:board",
|
|
5585
6434
|
JIRA_ISSUE: "jira:issue",
|
|
5586
6435
|
JIRA_SPRINT: "jira:sprint",
|
|
6436
|
+
// HubSpot
|
|
6437
|
+
HUBSPOT_OBJECT: "hubspot:object",
|
|
6438
|
+
HUBSPOT_PROPERTY: "hubspot:property",
|
|
6439
|
+
HUBSPOT_SCHEMA: "hubspot:schema",
|
|
6440
|
+
HUBSPOT_ASSOCIATION: "hubspot:association",
|
|
6441
|
+
HUBSPOT_ENGAGEMENT: "hubspot:engagement",
|
|
6442
|
+
HUBSPOT_WORKFLOW: "hubspot:workflow",
|
|
6443
|
+
HUBSPOT_ACCOUNT: "hubspot:account",
|
|
5587
6444
|
// OS (local)
|
|
5588
6445
|
OS_SECRET: "os:secret",
|
|
5589
6446
|
OS_PROCESS: "os:process",
|
|
@@ -5610,6 +6467,13 @@ var LEGACY_RESOURCE_TYPE_MAP = {
|
|
|
5610
6467
|
"jira:board": RESOURCE_TYPES.JIRA_BOARD,
|
|
5611
6468
|
"jira:issue": RESOURCE_TYPES.JIRA_ISSUE,
|
|
5612
6469
|
"jira:sprint": RESOURCE_TYPES.JIRA_SPRINT,
|
|
6470
|
+
"hubspot:object": RESOURCE_TYPES.HUBSPOT_OBJECT,
|
|
6471
|
+
"hubspot:property": RESOURCE_TYPES.HUBSPOT_PROPERTY,
|
|
6472
|
+
"hubspot:schema": RESOURCE_TYPES.HUBSPOT_SCHEMA,
|
|
6473
|
+
"hubspot:association": RESOURCE_TYPES.HUBSPOT_ASSOCIATION,
|
|
6474
|
+
"hubspot:engagement": RESOURCE_TYPES.HUBSPOT_ENGAGEMENT,
|
|
6475
|
+
"hubspot:workflow": RESOURCE_TYPES.HUBSPOT_WORKFLOW,
|
|
6476
|
+
"hubspot:account": RESOURCE_TYPES.HUBSPOT_ACCOUNT,
|
|
5613
6477
|
"os:secret": RESOURCE_TYPES.OS_SECRET,
|
|
5614
6478
|
"os:process": RESOURCE_TYPES.OS_PROCESS,
|
|
5615
6479
|
// Legacy formats with old provider prefixes
|
|
@@ -5960,6 +6824,56 @@ var ACTION_DISPLAY_CONFIGS = {
|
|
|
5960
6824
|
displayFields: [
|
|
5961
6825
|
{ key: "linkId", label: "Link" }
|
|
5962
6826
|
]
|
|
6827
|
+
},
|
|
6828
|
+
// ─── Agent Inbox ───
|
|
6829
|
+
"inbox.send": {
|
|
6830
|
+
summaryTemplate: (p) => {
|
|
6831
|
+
const parts = [];
|
|
6832
|
+
if (p.to) parts.push(`To: ${p.to}`);
|
|
6833
|
+
if (p.taskType) parts.push(`Task: ${p.taskType}`);
|
|
6834
|
+
return parts.join(", ");
|
|
6835
|
+
},
|
|
6836
|
+
displayFields: [
|
|
6837
|
+
{ key: "to", label: "To" },
|
|
6838
|
+
{ key: "taskType", label: "Task" },
|
|
6839
|
+
{ key: "message", label: "Message" }
|
|
6840
|
+
]
|
|
6841
|
+
},
|
|
6842
|
+
"inbox.respond": {
|
|
6843
|
+
summaryTemplate: (p) => {
|
|
6844
|
+
const parts = [];
|
|
6845
|
+
if (p.action) parts.push(String(p.action));
|
|
6846
|
+
if (p.id) parts.push(`#${p.id}`);
|
|
6847
|
+
return parts.join(" ");
|
|
6848
|
+
},
|
|
6849
|
+
displayFields: [
|
|
6850
|
+
{ key: "id", label: "Item" },
|
|
6851
|
+
{ key: "action", label: "Action" }
|
|
6852
|
+
]
|
|
6853
|
+
},
|
|
6854
|
+
"inbox.check": {
|
|
6855
|
+
summaryTemplate: (p) => {
|
|
6856
|
+
const parts = [];
|
|
6857
|
+
if (p.status) parts.push(`Status: ${p.status}`);
|
|
6858
|
+
if (Array.isArray(p.types) && p.types.length > 0) parts.push(`Types: ${p.types.join(", ")}`);
|
|
6859
|
+
return parts.join(", ");
|
|
6860
|
+
},
|
|
6861
|
+
displayFields: [
|
|
6862
|
+
{ key: "status", label: "Status" },
|
|
6863
|
+
{ key: "types", label: "Types" }
|
|
6864
|
+
]
|
|
6865
|
+
},
|
|
6866
|
+
"inbox.checkByToken": {
|
|
6867
|
+
summaryTemplate: (p) => p.token ? `Token: ${p.token}` : "",
|
|
6868
|
+
displayFields: [
|
|
6869
|
+
{ key: "token", label: "Token" }
|
|
6870
|
+
]
|
|
6871
|
+
},
|
|
6872
|
+
"inbox.complete": {
|
|
6873
|
+
summaryTemplate: (p) => p.id ? `Complete #${p.id}` : "",
|
|
6874
|
+
displayFields: [
|
|
6875
|
+
{ key: "id", label: "Item" }
|
|
6876
|
+
]
|
|
5963
6877
|
}
|
|
5964
6878
|
};
|
|
5965
6879
|
function truncate(text, maxLength) {
|
|
@@ -6662,6 +7576,7 @@ export {
|
|
|
6662
7576
|
sha256Hex,
|
|
6663
7577
|
signJWT,
|
|
6664
7578
|
signRequest,
|
|
7579
|
+
validateActionInput,
|
|
6665
7580
|
validateRegistryObject,
|
|
6666
7581
|
vcStatusToCredentialStatus,
|
|
6667
7582
|
verifyJWT,
|