@vess-id/vess 0.0.0-dev-20261015114836 → 0.0.0-dev-20261015223024

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.
Files changed (55) hide show
  1. package/dist/adapter/mcp/mcp-adapter.d.ts +0 -20
  2. package/dist/adapter/mcp/mcp-adapter.d.ts.map +1 -1
  3. package/dist/adapter/mcp/mcp-adapter.js +3 -30
  4. package/dist/adapter/mcp/mcp-adapter.js.map +1 -1
  5. package/dist/adapter/mcp/mcp-server.factory.d.ts +1 -22
  6. package/dist/adapter/mcp/mcp-server.factory.d.ts.map +1 -1
  7. package/dist/adapter/mcp/mcp-server.factory.js +5 -81
  8. package/dist/adapter/mcp/mcp-server.factory.js.map +1 -1
  9. package/dist/core/approval-pull.d.ts +4 -1
  10. package/dist/core/approval-pull.d.ts.map +1 -1
  11. package/dist/core/approval-pull.js.map +1 -1
  12. package/dist/core/call-budget.d.ts +1 -1
  13. package/dist/core/call-budget.js +1 -1
  14. package/dist/core/execution-engine.d.ts +35 -173
  15. package/dist/core/execution-engine.d.ts.map +1 -1
  16. package/dist/core/execution-engine.js +212 -1627
  17. package/dist/core/execution-engine.js.map +1 -1
  18. package/dist/core/local-invoke.d.ts +50 -0
  19. package/dist/core/local-invoke.d.ts.map +1 -0
  20. package/dist/core/local-invoke.js +266 -0
  21. package/dist/core/local-invoke.js.map +1 -0
  22. package/dist/core/runtime.d.ts +1 -1
  23. package/dist/core/runtime.d.ts.map +1 -1
  24. package/dist/core/runtime.js +6 -19
  25. package/dist/core/runtime.js.map +1 -1
  26. package/dist/core/sync-scheduler.d.ts +4 -6
  27. package/dist/core/sync-scheduler.d.ts.map +1 -1
  28. package/dist/core/sync-scheduler.js +14 -38
  29. package/dist/core/sync-scheduler.js.map +1 -1
  30. package/dist/core/types.d.ts +0 -62
  31. package/dist/core/types.d.ts.map +1 -1
  32. package/dist/executor/secret-file.d.ts.map +1 -1
  33. package/dist/executor/secret-file.js +49 -2
  34. package/dist/executor/secret-file.js.map +1 -1
  35. package/dist/gateway/gateway-client.d.ts +58 -228
  36. package/dist/gateway/gateway-client.d.ts.map +1 -1
  37. package/dist/gateway/gateway-client.js +56 -259
  38. package/dist/gateway/gateway-client.js.map +1 -1
  39. package/dist/utils/credential-errors.d.ts +4 -3
  40. package/dist/utils/credential-errors.d.ts.map +1 -1
  41. package/dist/utils/credential-errors.js.map +1 -1
  42. package/package.json +2 -2
  43. package/required-sdk-symbols.json +0 -2
  44. package/dist/approval/approval-token.d.ts +0 -23
  45. package/dist/approval/approval-token.d.ts.map +0 -1
  46. package/dist/approval/approval-token.js +0 -81
  47. package/dist/approval/approval-token.js.map +0 -1
  48. package/dist/utils/vc-utils.d.ts +0 -23
  49. package/dist/utils/vc-utils.d.ts.map +0 -1
  50. package/dist/utils/vc-utils.js +0 -53
  51. package/dist/utils/vc-utils.js.map +0 -1
  52. package/dist/wallet/wallet.d.ts +0 -64
  53. package/dist/wallet/wallet.d.ts.map +0 -1
  54. package/dist/wallet/wallet.js +0 -179
  55. package/dist/wallet/wallet.js.map +0 -1
@@ -8,32 +8,12 @@ export declare class McpAdapter implements MCPToolHandler {
8
8
  tool: string;
9
9
  action: string;
10
10
  parameters?: Record<string, any>;
11
- approval?: {
12
- token: string;
13
- choice: string;
14
- vcTTLMinutes?: number;
15
- request_id?: string;
16
- outcome_id?: string;
17
- granted_at?: string;
18
- granted_by?: string;
19
- };
20
- pendingRequestId?: string;
21
11
  }): Promise<{
22
12
  success: boolean;
23
13
  data?: any;
24
14
  error?: string;
25
- approvalRequired?: any;
26
- waitingForApproval?: any;
27
15
  reauthRequired?: ReauthRequiredExecutionInfo;
28
16
  }>;
29
- issueToolPermission(args: {
30
- tool: string;
31
- actions: string[];
32
- }): Promise<{
33
- success: boolean;
34
- data?: any;
35
- error?: string;
36
- }>;
37
17
  /**
38
18
  * `aidentity_get_result`: read the outcome of a `pending` / `in_flight` call. Read-only — only the
39
19
  * request id reaches the engine (there is no action or parameters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,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAiBvF,kBAAkB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAGtF"}
@@ -31,36 +31,9 @@ class McpAdapter {
31
31
  };
32
32
  }
33
33
  const action = (0, ai_identity_1.normalizeMcpActionName)(args.tool, args.action);
34
- return this.engine.execute({
35
- action,
36
- input: args.parameters || {},
37
- approval: args.approval
38
- ? {
39
- token: args.approval.token,
40
- choice: args.approval.choice,
41
- vcTTLMinutes: args.approval.vcTTLMinutes,
42
- // Thread the Cedar retry-path context through so the engine can
43
- // consume the single-use ledger token (Step 3.5). All optional — the
44
- // engine only takes the retry path when request_id + outcome_id +
45
- // granted_at + granted_by are all present.
46
- request_id: args.approval.request_id,
47
- outcome_id: args.approval.outcome_id,
48
- granted_at: args.approval.granted_at,
49
- granted_by: args.approval.granted_by,
50
- }
51
- : undefined,
52
- pendingRequestId: args.pendingRequestId,
53
- });
54
- }
55
- async issueToolPermission(args) {
56
- if (!args.tool || !Array.isArray(args.actions) || args.actions.length === 0) {
57
- return {
58
- success: false,
59
- error: '"tool" and at least one "action" are required for issueToolPermission.',
60
- };
61
- }
62
- const actions = args.actions.map(a => (0, ai_identity_1.normalizeMcpActionName)(args.tool, a));
63
- return this.engine.requestPermissions(actions);
34
+ // 🔴 Only the action and its parameters: there is no approval hand-off through the tool call
35
+ // (plan B, PR B4).
36
+ return this.engine.execute({ action, input: args.parameters || {} });
64
37
  }
65
38
  /**
66
39
  * `aidentity_get_result`: read the outcome of a `pending` / `in_flight` call. Read-only — only the
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-adapter.js","sourceRoot":"","sources":["../../../src/adapter/mcp/mcp-adapter.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,sDAA6D;AA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A;QACH,CAAC;QACD,MAAM,MAAM,GAAG,IAAA,oCAAsB,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAC7D,6FAA6F;QAC7F,sBAAsB;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS,CAAC,SAAiB;QAC/B,uEAAuE;QACvE,IACE,OAAO,SAAS,KAAK,QAAQ;YAC7B,SAAS,KAAK,EAAE;YAChB,SAAS,KAAK,GAAG;YACjB,SAAS,KAAK,IAAI,EAClB,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EACH,wFAAwF;aAC3F,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IACzC,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAA;IACzC,CAAC;CACF;AArDD,gCAqDC"}
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { ReauthRequiredExecutionInfo } from '../../core/types';
3
- export declare const CALL_TOOL_DESCRIPTION = "Execute an action on an external service or local resource on behalf of the user.\nThis is the PRIMARY tool \u2014 always use this to perform actions. Permission is handled in-band:\n- Actions the user has delegated run immediately.\n- External-service actions that need the user's approval return status \"pending\" with a request_id and an approval URL. Present the URL to the user. Do NOT call this tool again for the same action: once the user approves, the call runs with exactly the arguments you sent. Read the outcome with aidentity_get_result { request_id }.\n- Local actions (os.*) that need approval return waiting_for_approval with an approval URL and a requestId; after the user approves in the browser, call this tool again with the same action and pendingRequestId.\n- Actions the user's settings do not permit are refused; approving case by case is not possible for those.\nDo NOT call aidentity_request_permission first; just call this tool directly.\n\nSupported tools and common actions:\n\n**os** \u2014 Read/write local secret files (.env, credentials, etc.)\n Actions: os.secret.read, os.secret.write\n Example: tool=\"os\", action=\"os.secret.read\", parameters={\"file_path\": \"~/projects/app/.env\"}\n\n**slack** \u2014 Post/read/update/delete messages, list channels, get user info.\n Common actions: slack.message.post, slack.message.read, slack.channel.read, slack.batch.read\n The \"channel\" parameter accepts channel ID (e.g. \"C0A159PP6QM\"), channel name (e.g. \"general\"), or #-prefixed name (e.g. \"#general\"). Responses are compact by default (essential fields only). Set compact=false for full Slack API response.\n Example: tool=\"slack\", action=\"slack.message.post\", parameters={\"channel\": \"C01ABCD2EFG\", \"text\": \"Hello!\"}\n Example: tool=\"slack\", action=\"slack.message.read\", parameters={\"channel\": \"C01ABCD2EFG\", \"limit\": 10}\n\n**github** \u2014 Create/read/update/list issues, pull requests, repositories, contents, labels, Actions workflows, stars, users, notifications and gists.\n Common actions: github.issue.create, github.issue.list, github.issue.read, github.issue.search, github.issue.comment.create, github.pr.create, github.pr.list, github.pr.read, github.pr.merge, github.repo.search, github.content.get, github.content.createOrUpdate, github.branch.list, github.branch.create, github.commit.list, github.code.search, github.repo.create, github.repo.fork, github.label.list, github.label.write, github.workflow.list, github.workflow.run, github.workflow.jobLogs.get, github.repo.starred.list, github.repo.star, github.user.me.get, github.org.teams.list, github.team.members.list, github.user.search, github.notification.list, github.notification.get, github.notification.markRead, github.notification.markAllRead, github.gist.create, github.gist.get, github.gist.list, github.gist.update\n Example: tool=\"github\", action=\"github.issue.create\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"title\": \"Bug report\", \"body\": \"Details...\"}\n Example: tool=\"github\", action=\"github.pr.create\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"title\": \"Fix bug\", \"head\": \"feature-branch\", \"base\": \"main\"}\n Example: tool=\"github\", action=\"github.content.get\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"path\": \"README.md\"}\n\n**jira** \u2014 Manage issues, projects, boards, sprints.\n Common actions: jira.issue.create, jira.issue.search, jira.project.read\n\n**gmail** \u2014 Search/read/send/draft/delete emails, list labels.\n Common actions: gmail.message.search, gmail.message.read, gmail.message.send, gmail.draft.create, gmail.label.read\n Example (new email): tool=\"gmail\", action=\"gmail.message.send\", parameters={\"to\": \"user@example.com\", \"subject\": \"Hello\", \"body\": \"Message content\"}\n Example (draft): tool=\"gmail\", action=\"gmail.draft.create\", parameters={\"to\": \"user@example.com\", \"subject\": \"Draft subject\", \"body\": \"Draft content\"}\n Example (search): tool=\"gmail\", action=\"gmail.message.search\", parameters={\"query\": \"from:boss subject:urgent\"}\n **Replying to emails**: When replying, you MUST include threading parameters to ensure the reply is properly threaded:\n 1. First read the original message with gmail.message.read to get its threadId and Message-ID header (look for {name: \"Message-ID\", value: \"...\"} in the payload.headers array).\n 2. Then send with: threadId (from the read response top-level field), inReplyTo (the Message-ID header value), references (space-separated Message-IDs for the full thread chain; for a first reply, just the single Message-ID).\n Example (reply): tool=\"gmail\", action=\"gmail.message.send\", parameters={\"to\": \"sender@example.com\", \"subject\": \"Re: Original Subject\", \"body\": \"Reply content\", \"threadId\": \"18e1234abcd\", \"inReplyTo\": \"<CABx...@mail.gmail.com>\", \"references\": \"<CABx...@mail.gmail.com>\"}\n\n**outlook** \u2014 Search/read/send/draft Outlook (Microsoft 365) email, list mail folders, trash or permanently delete messages. This is a SEPARATE tool from gmail \u2014 for a user connected via Microsoft, use tool=\"outlook\" with outlook.* actions; do not send gmail.* actions to it.\n Common actions: outlook.message.search, outlook.message.read, outlook.message.send, outlook.draft.create, outlook.folder.read, outlook.message.trash, outlook.message.delete, outlook.batch.read\n Example (new email): tool=\"outlook\", action=\"outlook.message.send\", parameters={\"to\": \"user@example.com\", \"subject\": \"Hello\", \"body\": \"Message content\"}\n Example (search): tool=\"outlook\", action=\"outlook.message.search\", parameters={\"query\": \"from:boss subject:urgent\"}\n Example (read): tool=\"outlook\", action=\"outlook.message.read\", parameters={\"messageId\": \"<id from a search result>\"}\n Example (draft): tool=\"outlook\", action=\"outlook.draft.create\", parameters={\"to\": \"user@example.com\", \"subject\": \"Draft subject\", \"body\": \"Draft content\"}\n Recipients (to/cc/bcc) are comma-separated address strings. The body is plain text. Read/search results are compacted (decoded body text, key headers, flags \u2014 no attachment binaries). Use outlook.message.trash to move a message to Deleted Items (recoverable) and outlook.message.delete only for a permanent, irreversible delete.\n\n**calendar** \u2014 List/create/update/delete calendar events. Works with whichever calendar the user connected \u2014 Google Calendar or Microsoft Outlook; the actions, parameters and response shape are identical for both, so never assume a provider.\n Common actions: calendar.event.list, calendar.event.create\n IMPORTANT: start and end MUST be objects with dateTime property, not flat strings.\n Example: tool=\"calendar\", action=\"calendar.event.create\", parameters={\"summary\": \"Meeting\", \"start\": {\"dateTime\": \"2026-07-15T10:00:00\", \"timeZone\": \"Asia/Tokyo\"}, \"end\": {\"dateTime\": \"2026-07-15T11:00:00\", \"timeZone\": \"Asia/Tokyo\"}}\n Example (with an online meeting): tool=\"calendar\", action=\"calendar.event.create\", parameters={\"summary\": \"Sync\", \"start\": {\"dateTime\": \"2026-07-15T10:00:00\", \"timeZone\": \"Asia/Tokyo\"}, \"end\": {\"dateTime\": \"2026-07-15T10:30:00\", \"timeZone\": \"Asia/Tokyo\"}, \"attendees\": [{\"email\": \"them@example.com\"}], \"addMeet\": true, \"meetRequestId\": \"<stable unique id>\"}\n To attach an online meeting link, use addMeet/meetRequestId \u2014 the provider mints it (Google Meet on Google, Teams on Outlook). Raw conferenceData/conferenceDataVersion parameters are NOT supported and will be ignored.\n Events come back in one provider-neutral shape: id, summary, start/end, attendees, location, conferenceUrl (the meeting join URL), htmlLink. Read the join URL from conferenceUrl \u2014 provider-specific fields such as hangoutLink are not returned.\n\n**hubspot** \u2014 Read/search/create CRM objects (contacts, companies, deals), properties, associations, engagements.\n Common actions: hubspot.crm.objects.search, hubspot.crm.objects.list, hubspot.crm.objects.batchCreate, hubspot.crm.properties.list, hubspot.crm.engagements.create, hubspot.crm.associations.list, hubspot.account.userDetails.get\n Most CRM actions require an \"objectType\" parameter (e.g. \"contacts\", \"companies\", \"deals\", or a custom object type ID).\n Example (search): tool=\"hubspot\", action=\"hubspot.crm.objects.search\", parameters={\"objectType\": \"contacts\", \"query\": \"acme\"}\n Example (create): tool=\"hubspot\", action=\"hubspot.crm.objects.batchCreate\", parameters={\"objectType\": \"contacts\", \"inputs\": [{\"properties\": {\"email\": \"jane@example.com\", \"firstname\": \"Jane\"}}]}\n For hubspot.crm.engagements.create use parameter key \"type\" (not \"engagementType\"); values \"NOTE\"/\"TASK\". ownerId comes from hubspot.account.userDetails.get.\n\n**linear** \u2014 Linear issue tracker with full CRUD for issues, comments, projects, and more.\n Issue operations: linear.issue.list, linear.issue.read, linear.issue.search, linear.issue.create, linear.issue.update, linear.issue.archive, linear.issue.unarchive, linear.issue.delete, linear.issue.addLabel, linear.issue.removeLabel, linear.issue.subscribe\n Comment management: linear.comment.create, linear.comment.list, linear.comment.update, linear.comment.delete, linear.comment.resolve, linear.comment.unresolve\n Issue relations: linear.issueRelation.create, linear.issueRelation.list, linear.issueRelation.delete\n Cycles/Sprints: linear.cycle.list, linear.cycle.read, linear.cycle.create, linear.cycle.update\n Labels: linear.label.list, linear.label.create, linear.label.update\n Attachments: linear.attachment.create, linear.attachment.list, linear.attachment.delete\n Projects: linear.project.list, linear.project.read, linear.project.create, linear.project.update\n Other: linear.team.list, linear.workflowState.list, linear.viewer.read, linear.user.list\n Example: { \"tool\": \"linear\", \"action\": \"linear.issue.list\", \"parameters\": { \"teamId\": \"<team-id>\", \"limit\": 20 } }\n Example (create): { \"tool\": \"linear\", \"action\": \"linear.issue.create\", \"parameters\": { \"teamId\": \"<team-id>\", \"title\": \"Bug report\" } }\n Use linear.team.list to discover teamIds, and linear.workflowState.list to find valid state IDs.\n\n\nCall aidentity_list_available_tools for detailed parameter schemas of each action.";
3
+ export declare const CALL_TOOL_DESCRIPTION = "Execute an action on an external service or local resource on behalf of the user.\nThis is the PRIMARY tool \u2014 always use this to perform actions. Permission is handled in-band:\n- Actions the user has delegated run immediately.\n- Actions that need the user's approval return status \"pending\" with a request_id and an approval URL. Present the URL to the user. Do NOT call this tool again for the same action: once the user approves, the call runs by itself with exactly the arguments you sent. Read the outcome with aidentity_get_result { request_id }.\n- Actions the user's settings do not permit are refused; approving case by case is not possible for those.\nThere is no separate permission tool.\n\nSupported tools and common actions:\n\n**os** \u2014 Read/write local secret files (.env, credentials, etc.)\n Actions: os.secret.read, os.secret.write\n Example: tool=\"os\", action=\"os.secret.read\", parameters={\"file_path\": \"~/projects/app/.env\"}\n\n**slack** \u2014 Post/read/update/delete messages, list channels, get user info.\n Common actions: slack.message.post, slack.message.read, slack.channel.read, slack.batch.read\n The \"channel\" parameter accepts channel ID (e.g. \"C0A159PP6QM\"), channel name (e.g. \"general\"), or #-prefixed name (e.g. \"#general\"). Responses are compact by default (essential fields only). Set compact=false for full Slack API response.\n Example: tool=\"slack\", action=\"slack.message.post\", parameters={\"channel\": \"C01ABCD2EFG\", \"text\": \"Hello!\"}\n Example: tool=\"slack\", action=\"slack.message.read\", parameters={\"channel\": \"C01ABCD2EFG\", \"limit\": 10}\n\n**github** \u2014 Create/read/update/list issues, pull requests, repositories, contents, labels, Actions workflows, stars, users, notifications and gists.\n Common actions: github.issue.create, github.issue.list, github.issue.read, github.issue.search, github.issue.comment.create, github.pr.create, github.pr.list, github.pr.read, github.pr.merge, github.repo.search, github.content.get, github.content.createOrUpdate, github.branch.list, github.branch.create, github.commit.list, github.code.search, github.repo.create, github.repo.fork, github.label.list, github.label.write, github.workflow.list, github.workflow.run, github.workflow.jobLogs.get, github.repo.starred.list, github.repo.star, github.user.me.get, github.org.teams.list, github.team.members.list, github.user.search, github.notification.list, github.notification.get, github.notification.markRead, github.notification.markAllRead, github.gist.create, github.gist.get, github.gist.list, github.gist.update\n Example: tool=\"github\", action=\"github.issue.create\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"title\": \"Bug report\", \"body\": \"Details...\"}\n Example: tool=\"github\", action=\"github.pr.create\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"title\": \"Fix bug\", \"head\": \"feature-branch\", \"base\": \"main\"}\n Example: tool=\"github\", action=\"github.content.get\", parameters={\"owner\": \"org\", \"repo\": \"repo\", \"path\": \"README.md\"}\n\n**jira** \u2014 Manage issues, projects, boards, sprints.\n Common actions: jira.issue.create, jira.issue.search, jira.project.read\n\n**gmail** \u2014 Search/read/send/draft/delete emails, list labels.\n Common actions: gmail.message.search, gmail.message.read, gmail.message.send, gmail.draft.create, gmail.label.read\n Example (new email): tool=\"gmail\", action=\"gmail.message.send\", parameters={\"to\": \"user@example.com\", \"subject\": \"Hello\", \"body\": \"Message content\"}\n Example (draft): tool=\"gmail\", action=\"gmail.draft.create\", parameters={\"to\": \"user@example.com\", \"subject\": \"Draft subject\", \"body\": \"Draft content\"}\n Example (search): tool=\"gmail\", action=\"gmail.message.search\", parameters={\"query\": \"from:boss subject:urgent\"}\n **Replying to emails**: When replying, you MUST include threading parameters to ensure the reply is properly threaded:\n 1. First read the original message with gmail.message.read to get its threadId and Message-ID header (look for {name: \"Message-ID\", value: \"...\"} in the payload.headers array).\n 2. Then send with: threadId (from the read response top-level field), inReplyTo (the Message-ID header value), references (space-separated Message-IDs for the full thread chain; for a first reply, just the single Message-ID).\n Example (reply): tool=\"gmail\", action=\"gmail.message.send\", parameters={\"to\": \"sender@example.com\", \"subject\": \"Re: Original Subject\", \"body\": \"Reply content\", \"threadId\": \"18e1234abcd\", \"inReplyTo\": \"<CABx...@mail.gmail.com>\", \"references\": \"<CABx...@mail.gmail.com>\"}\n\n**outlook** \u2014 Search/read/send/draft Outlook (Microsoft 365) email, list mail folders, trash or permanently delete messages. This is a SEPARATE tool from gmail \u2014 for a user connected via Microsoft, use tool=\"outlook\" with outlook.* actions; do not send gmail.* actions to it.\n Common actions: outlook.message.search, outlook.message.read, outlook.message.send, outlook.draft.create, outlook.folder.read, outlook.message.trash, outlook.message.delete, outlook.batch.read\n Example (new email): tool=\"outlook\", action=\"outlook.message.send\", parameters={\"to\": \"user@example.com\", \"subject\": \"Hello\", \"body\": \"Message content\"}\n Example (search): tool=\"outlook\", action=\"outlook.message.search\", parameters={\"query\": \"from:boss subject:urgent\"}\n Example (read): tool=\"outlook\", action=\"outlook.message.read\", parameters={\"messageId\": \"<id from a search result>\"}\n Example (draft): tool=\"outlook\", action=\"outlook.draft.create\", parameters={\"to\": \"user@example.com\", \"subject\": \"Draft subject\", \"body\": \"Draft content\"}\n Recipients (to/cc/bcc) are comma-separated address strings. The body is plain text. Read/search results are compacted (decoded body text, key headers, flags \u2014 no attachment binaries). Use outlook.message.trash to move a message to Deleted Items (recoverable) and outlook.message.delete only for a permanent, irreversible delete.\n\n**calendar** \u2014 List/create/update/delete calendar events. Works with whichever calendar the user connected \u2014 Google Calendar or Microsoft Outlook; the actions, parameters and response shape are identical for both, so never assume a provider.\n Common actions: calendar.event.list, calendar.event.create\n IMPORTANT: start and end MUST be objects with dateTime property, not flat strings.\n Example: tool=\"calendar\", action=\"calendar.event.create\", parameters={\"summary\": \"Meeting\", \"start\": {\"dateTime\": \"2026-07-15T10:00:00\", \"timeZone\": \"Asia/Tokyo\"}, \"end\": {\"dateTime\": \"2026-07-15T11:00:00\", \"timeZone\": \"Asia/Tokyo\"}}\n Example (with an online meeting): tool=\"calendar\", action=\"calendar.event.create\", parameters={\"summary\": \"Sync\", \"start\": {\"dateTime\": \"2026-07-15T10:00:00\", \"timeZone\": \"Asia/Tokyo\"}, \"end\": {\"dateTime\": \"2026-07-15T10:30:00\", \"timeZone\": \"Asia/Tokyo\"}, \"attendees\": [{\"email\": \"them@example.com\"}], \"addMeet\": true, \"meetRequestId\": \"<stable unique id>\"}\n To attach an online meeting link, use addMeet/meetRequestId \u2014 the provider mints it (Google Meet on Google, Teams on Outlook). Raw conferenceData/conferenceDataVersion parameters are NOT supported and will be ignored.\n Events come back in one provider-neutral shape: id, summary, start/end, attendees, location, conferenceUrl (the meeting join URL), htmlLink. Read the join URL from conferenceUrl \u2014 provider-specific fields such as hangoutLink are not returned.\n\n**hubspot** \u2014 Read/search/create CRM objects (contacts, companies, deals), properties, associations, engagements.\n Common actions: hubspot.crm.objects.search, hubspot.crm.objects.list, hubspot.crm.objects.batchCreate, hubspot.crm.properties.list, hubspot.crm.engagements.create, hubspot.crm.associations.list, hubspot.account.userDetails.get\n Most CRM actions require an \"objectType\" parameter (e.g. \"contacts\", \"companies\", \"deals\", or a custom object type ID).\n Example (search): tool=\"hubspot\", action=\"hubspot.crm.objects.search\", parameters={\"objectType\": \"contacts\", \"query\": \"acme\"}\n Example (create): tool=\"hubspot\", action=\"hubspot.crm.objects.batchCreate\", parameters={\"objectType\": \"contacts\", \"inputs\": [{\"properties\": {\"email\": \"jane@example.com\", \"firstname\": \"Jane\"}}]}\n For hubspot.crm.engagements.create use parameter key \"type\" (not \"engagementType\"); values \"NOTE\"/\"TASK\". ownerId comes from hubspot.account.userDetails.get.\n\n**linear** \u2014 Linear issue tracker with full CRUD for issues, comments, projects, and more.\n Issue operations: linear.issue.list, linear.issue.read, linear.issue.search, linear.issue.create, linear.issue.update, linear.issue.archive, linear.issue.unarchive, linear.issue.delete, linear.issue.addLabel, linear.issue.removeLabel, linear.issue.subscribe\n Comment management: linear.comment.create, linear.comment.list, linear.comment.update, linear.comment.delete, linear.comment.resolve, linear.comment.unresolve\n Issue relations: linear.issueRelation.create, linear.issueRelation.list, linear.issueRelation.delete\n Cycles/Sprints: linear.cycle.list, linear.cycle.read, linear.cycle.create, linear.cycle.update\n Labels: linear.label.list, linear.label.create, linear.label.update\n Attachments: linear.attachment.create, linear.attachment.list, linear.attachment.delete\n Projects: linear.project.list, linear.project.read, linear.project.create, linear.project.update\n Other: linear.team.list, linear.workflowState.list, linear.viewer.read, linear.user.list\n Example: { \"tool\": \"linear\", \"action\": \"linear.issue.list\", \"parameters\": { \"teamId\": \"<team-id>\", \"limit\": 20 } }\n Example (create): { \"tool\": \"linear\", \"action\": \"linear.issue.create\", \"parameters\": { \"teamId\": \"<team-id>\", \"title\": \"Bug report\" } }\n Use linear.team.list to discover teamIds, and linear.workflowState.list to find valid state IDs.\n\n\nCall aidentity_list_available_tools for detailed parameter schemas of each action.";
4
4
  export declare const SERVER_INSTRUCTIONS = "This server provides identity-verified tool execution (VESS AIDENTITY).\nCalendar: if the user gives a specific agreed time, create the calendar event directly\n(calendar.event.create).\nTool calls are authorized with verifiable credentials.";
5
5
  /** Same text as remote-mcp's `GET_RESULT_DESCRIPTION`. */
6
6
  export declare const GET_RESULT_DESCRIPTION: string;
@@ -9,33 +9,12 @@ export interface MCPToolHandler {
9
9
  tool: string;
10
10
  action: string;
11
11
  parameters?: Record<string, any>;
12
- approval?: {
13
- token: string;
14
- choice: string;
15
- vcTTLMinutes?: number;
16
- request_id?: string;
17
- outcome_id?: string;
18
- granted?: boolean;
19
- granted_at?: string;
20
- granted_by?: string;
21
- };
22
- pendingRequestId?: string;
23
12
  }): Promise<{
24
13
  success: boolean;
25
14
  data?: any;
26
15
  error?: string;
27
- approvalRequired?: any;
28
- waitingForApproval?: any;
29
16
  reauthRequired?: ReauthRequiredExecutionInfo;
30
17
  }>;
31
- issueToolPermission(args: {
32
- tool: string;
33
- actions: string[];
34
- }): Promise<{
35
- success: boolean;
36
- data?: any;
37
- error?: string;
38
- }>;
39
18
  listAvailableTools(): Promise<{
40
19
  success: boolean;
41
20
  data?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.factory.d.ts","sourceRoot":"","sources":["../../../src/adapter/mcp/mcp-server.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAInE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAUnE,eAAO,MAAM,qBAAqB,4xUA4EiD,CAAA;AAEnF,eAAO,MAAM,mBAAmB,sPAGuB,CAAA;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,QAG8D,CAAA;AA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CAAA;CACxF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAiHlE"}
@@ -14,10 +14,9 @@ const ACTION_FORMAT_DESC = 'Action in provider.resource.operation format. Valid
14
14
  exports.CALL_TOOL_DESCRIPTION = `Execute an action on an external service or local resource on behalf of the user.
15
15
  This is the PRIMARY tool — always use this to perform actions. Permission is handled in-band:
16
16
  - Actions the user has delegated run immediately.
17
- - External-service actions that need the user's approval return status "pending" with a request_id and an approval URL. Present the URL to the user. Do NOT call this tool again for the same action: once the user approves, the call runs with exactly the arguments you sent. Read the outcome with aidentity_get_result { request_id }.
18
- - Local actions (os.*) that need approval return waiting_for_approval with an approval URL and a requestId; after the user approves in the browser, call this tool again with the same action and pendingRequestId.
17
+ - Actions that need the user's approval return status "pending" with a request_id and an approval URL. Present the URL to the user. Do NOT call this tool again for the same action: once the user approves, the call runs by itself with exactly the arguments you sent. Read the outcome with aidentity_get_result { request_id }.
19
18
  - Actions the user's settings do not permit are refused; approving case by case is not possible for those.
20
- Do NOT call aidentity_request_permission first; just call this tool directly.
19
+ There is no separate permission tool.
21
20
 
22
21
  Supported tools and common actions:
23
22
 
@@ -120,25 +119,6 @@ function createMcpServer(handler) {
120
119
  // running `pnpm --filter @vess-id/vess typecheck`.
121
120
  const registerTool = server.registerTool.bind(server);
122
121
  const formatResult = (result) => {
123
- if (result.waitingForApproval) {
124
- return {
125
- content: [
126
- {
127
- type: 'text',
128
- text: JSON.stringify(result.waitingForApproval, null, 2),
129
- },
130
- ],
131
- isError: false,
132
- };
133
- }
134
- if (result.approvalRequired) {
135
- return {
136
- content: [
137
- { type: 'text', text: JSON.stringify(result.approvalRequired, null, 2) },
138
- ],
139
- isError: false,
140
- };
141
- }
142
122
  if (result.reauthRequired) {
143
123
  return {
144
124
  content: [{ type: 'text', text: JSON.stringify(result.reauthRequired, null, 2) }],
@@ -161,55 +141,15 @@ function createMcpServer(handler) {
161
141
  tool: toolEnum,
162
142
  action: zod_1.z.string().describe(ACTION_FORMAT_DESC),
163
143
  parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional().describe('Tool-specific parameters'),
164
- approval: zod_1.z
165
- .object({
166
- token: zod_1.z
167
- .string()
168
- .describe('HMAC-signed approval token from a previous approval_required response'),
169
- choice: zod_1.z
170
- .enum(['one_time', 'persistent', 'deny_once', 'deny_persistent'])
171
- .describe('User approval choice'),
172
- vcTTLMinutes: zod_1.z
173
- .number()
174
- .min(5)
175
- .max(1440)
176
- .optional()
177
- .describe('Custom VC TTL in minutes (5-1440)'),
178
- // Cedar 一元化 Step 3.5 retry-path context, handed back by the
179
- // approval-outcome page after the user clicked 承認. Optional; when
180
- // all four are present the engine consumes the single-use ledger
181
- // token and lifts a prior Cedar `auth_required` → `permit`.
182
- request_id: zod_1.z
183
- .string()
184
- .optional()
185
- .describe('Approval-request id (`req_<uuid>`) from the prior auth_required response'),
186
- outcome_id: zod_1.z
187
- .string()
188
- .optional()
189
- .describe('Approval-outcome id (`outcome_<uuid>`) emitted when the user clicked 承認'),
190
- // deny intent flows via `choice` (deny_once | deny_persistent); the
191
- // `granted` boolean is not used for redeem (the ledger CAS is
192
- // authoritative), so it was removed as dead schema surface.
193
- granted_at: zod_1.z.string().optional().describe('ISO-8601 timestamp of the approval action'),
194
- granted_by: zod_1.z
195
- .string()
196
- .optional()
197
- .describe('User id, or the literal "system" for auto-approve'),
198
- })
199
- .optional()
200
- .describe('Deprecated: refused for every action (there is no approval hand-off through the tool call). Removed in a later release.'),
201
- pendingRequestId: zod_1.z
202
- .string()
203
- .optional()
204
- .describe('Local (os.*) actions only: the requestId from a previous waiting_for_approval response, to run the call after the user approved it in the browser. Refused for other actions — use aidentity_get_result with the request_id instead.'),
205
144
  },
206
145
  }, async (args) => {
146
+ // 🔴 Only these three keys reach the engine. A host that still sends the removed `approval` /
147
+ // `pendingRequestId` (plan B, PR B4) gets them dropped here (and by the MCP SDK's zod parse,
148
+ // which strips unknown keys): the call runs as an ordinary call through the issuer.
207
149
  const result = await handler.callTool({
208
150
  tool: args.tool,
209
151
  action: args.action,
210
152
  parameters: args.parameters,
211
- approval: args.approval,
212
- pendingRequestId: args.pendingRequestId,
213
153
  });
214
154
  return formatResult(result);
215
155
  });
@@ -226,22 +166,6 @@ function createMcpServer(handler) {
226
166
  const result = await handler.getResult(String(args?.request_id ?? ''));
227
167
  return formatResult(result);
228
168
  });
229
- registerTool('aidentity_request_permission', {
230
- description: 'OPTIONAL: Pre-request permission for multiple actions at once. ' +
231
- 'In most cases, use aidentity_call_tool directly instead — it handles permissions automatically.',
232
- inputSchema: {
233
- tool: toolEnum,
234
- actions: zod_1.z
235
- .array(zod_1.z.string().describe(ACTION_FORMAT_DESC))
236
- .describe('One or more actions to request permission for'),
237
- },
238
- }, async (args) => {
239
- const result = await handler.issueToolPermission({
240
- tool: args.tool,
241
- actions: args.actions,
242
- });
243
- return formatResult(result);
244
- });
245
169
  registerTool('aidentity_list_available_tools', {
246
170
  description: 'List all available tools and their supported actions.',
247
171
  // Explicit empty shape mirrors the same pattern at
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.factory.js","sourceRoot":"","sources":["../../../src/adapter/mcp/mcp-server.factory.ts"],"names":[],"mappings":";;;AA0IA,0CAoNC;AA9VD,oEAAmE;AACnE,sDAAiF;AACjF,6BAAuB;AACvB,kDAAkD;AAGlD,oEAAoE;AACpE,MAAM,QAAQ,GAAG,OAAC,CAAC,IAAI,CAAC,6BAAwC,CAAC,CAAA;AAEjE,4DAA4D;AAC5D,MAAM,kBAAkB,GACtB,+DAA+D;IAC/D,IAAA,uCAAyB,GAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAE3B,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFA4E8C,CAAA;AAEtE,QAAA,mBAAmB,GAAG;;;uDAGoB,CAAA;AAEvD,0DAA0D;AAC7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CACP,sFAAsF,CACvF;SACJ;KACF,EACD,KAAK,EAAE,IAAS,EAAE,EAAE;QAClB,8FAA8F;QAC9F,sCAAsC;QACtC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,CAAA;QACtE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CACF,CAAA;IAED,YAAY,CACV,8BAA8B,EAC9B;QACE,WAAW,EACT,iEAAiE;YACjE,iGAAiG;QACnG,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,OAAC;iBACP,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;iBAC9C,QAAQ,CAAC,+CAA+C,CAAC;SAC7D;KACF,EACD,KAAK,EAAE,IAAS,EAAE,EAAE;QAClB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,mBAAmB,CAAC;YAC/C,IAAI,EAAE,IAAI,CAAC,IAAc;YACzB,OAAO,EAAE,IAAI,CAAC,OAAmB;SAClC,CAAC,CAAA;QACF,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CACF,CAAA;IAED,YAAY,CACV,gCAAgC,EAChC;QACE,WAAW,EAAE,uDAAuD;QACpE,mDAAmD;QACnD,gEAAgE;QAChE,+DAA+D;QAC/D,gEAAgE;QAChE,wDAAwD;QACxD,yBAAyB;QACzB,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAA;QACjD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
1
+ {"version":3,"file":"mcp-server.factory.js","sourceRoot":"","sources":["../../../src/adapter/mcp/mcp-server.factory.ts"],"names":[],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W,EAAE,8BAAsB;QACnC,WAAW,EAAE;YACX,UAAU,EAAE,OAAC;iBACV,MAAM,EAAE;iBACR,QAAQ,CACP,sFAAsF,CACvF;SACJ;KACF,EACD,KAAK,EAAE,IAAS,EAAE,EAAE;QAClB,8FAA8F;QAC9F,sCAAsC;QACtC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,CAAA;QACtE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CACF,CAAA;IAED,YAAY,CACV,gCAAgC,EAChC;QACE,WAAW,EAAE,uDAAuD;QACpE,mDAAmD;QACnD,gEAAgE;QAChE,+DAA+D;QAC/D,gEAAgE;QAChE,wDAAwD;QACxD,yBAAyB;QACzB,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAA;QACjD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -23,7 +23,10 @@
23
23
  import type { AgentdGatewayClient, DelegatedApprovalView } from '../gateway/gateway-client';
24
24
  /** What the pull hands to a holder: the API's row, nothing from an LLM. */
25
25
  export type ApprovedRow = Pick<DelegatedApprovalView, 'id' | 'action' | 'actionParams'>;
26
- /** `executed` = the PEP ran it; `failed` = presented and failed; `skipped` = nothing was run. */
26
+ /**
27
+ * `executed` = it ran; `failed` = it was issued but did not run successfully (presented and failed, or
28
+ * refused at presentation); `skipped` = nothing was asked or run.
29
+ */
27
30
  export type PullOutcome = 'executed' | 'failed' | 'skipped';
28
31
  /** A holder that runs in this process (an `ExecutionEngine`). */
29
32
  export interface PullHolder {
@@ -1 +1 @@
1
- {"version":3,"file":"approval-pull.d.ts","sourceRoot":"","sources":["../../src/core/approval-pull.ts"],"names":[],"mappings":"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AAE;oBACV,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,YAAY,EAAE,GAAG,CAAC,YAAY;iBAC/B,CAAC,CAAA;gBACF,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,OAAO,OAAO,EAAE,CAAC,CAAA;YACnE,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,aAAa,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YAC9E,CAAC;QACH,CAAC;IACH,CAAC;;AAjEH,oCAkEC"}
@@ -4,7 +4,7 @@
4
4
  * MCP hosts (Claude Code / Claude Desktop / Cursor …) cut a tool call at 60 seconds (a host-side constant).
5
5
  * Inside that, agentd uses 45 seconds and keeps 25 of them for the execution itself
6
6
  * (nonce → VP → PEP → connector). ⇒ the owner's approval can be **awaited for the remaining 20 seconds**.
7
- * If that is not enough the call returns `waiting_for_approval` and the outcome is read later with
7
+ * If that is not enough the call returns `pending` + `request_id` and the outcome is read later with
8
8
  * `aidentity_get_result` (two-stage delivery). Same numbers as remote-mcp (`server/call-budget.ts`).
9
9
  */
10
10
  export declare const CALL_TOOL_BUDGET_MS = 45000;
@@ -8,7 +8,7 @@ exports.waitSecondsAvailable = waitSecondsAvailable;
8
8
  * MCP hosts (Claude Code / Claude Desktop / Cursor …) cut a tool call at 60 seconds (a host-side constant).
9
9
  * Inside that, agentd uses 45 seconds and keeps 25 of them for the execution itself
10
10
  * (nonce → VP → PEP → connector). ⇒ the owner's approval can be **awaited for the remaining 20 seconds**.
11
- * If that is not enough the call returns `waiting_for_approval` and the outcome is read later with
11
+ * If that is not enough the call returns `pending` + `request_id` and the outcome is read later with
12
12
  * `aidentity_get_result` (two-stage delivery). Same numbers as remote-mcp (`server/call-budget.ts`).
13
13
  */
14
14
  exports.CALL_TOOL_BUDGET_MS = 45_000;