@absolutejs/mcp 0.19.0 → 0.20.1

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.
@@ -0,0 +1,35 @@
1
+ import type { McpToolRegistry } from "./types";
2
+ export type ActionReview = {
3
+ /** Set by the tool factory from the available confirmation capability. */
4
+ canConfirm?: boolean;
5
+ actionId: string;
6
+ revision: string;
7
+ title: string;
8
+ expiresAt: string;
9
+ recipients: string[];
10
+ subject: string;
11
+ body: string;
12
+ consequence: string;
13
+ };
14
+ export type ActionConfirmation = {
15
+ actionId: string;
16
+ expectedRevision: string;
17
+ };
18
+ export type ActionJob = {
19
+ actionId: string;
20
+ status: "awaiting_approval" | "queued" | "running" | "succeeded" | "failed" | "unknown" | "denied" | "expired";
21
+ title: string;
22
+ summary: string;
23
+ };
24
+ export declare const projectActionReview: (value: unknown) => ActionReview;
25
+ export declare const projectActionJob: (value: unknown) => ActionJob;
26
+ /** Bind readers and confirmation to the authenticated owner. confirm must compare
27
+ * the exact reviewed revision and expiry under a database lock, authorize the
28
+ * immutable payload, and commit its decision plus durable outbox atomically.
29
+ * Every draft writer must refuse edits after that claim. Never send inline.
30
+ * Job reads/resume only reattach to saved work, including ambiguous outcomes. */
31
+ export declare const createActionWorkflowTools: (adapter: {
32
+ review: (actionId: string) => Promise<ActionReview>;
33
+ job: (actionId: string) => Promise<ActionJob>;
34
+ confirm?: (request: ActionConfirmation) => Promise<ActionJob>;
35
+ }) => McpToolRegistry;
@@ -0,0 +1 @@
1
+ export declare const actionWorkflowScript: string;
@@ -36,3 +36,4 @@ export { createBillingApps } from "./billingApps";
36
36
  export { createWorkflowApps } from "./workflowApps";
37
37
  export { createWorkflowTools, projectSetupStatus, projectWorkPreview, type McpSetupStatus, type McpWorkPreview, type McpWorkPreviewRequest, } from "./workflowTools";
38
38
  export { createSetupSelectionTools, projectSetupSelection, type SetupSelection, type SetupConfirmation, type SetupOption, } from "./setupSelection";
39
+ export { createActionWorkflowTools, projectActionReview, projectActionJob, type ActionReview, type ActionConfirmation, type ActionJob } from "./actionWorkflow";
@@ -52,3 +52,4 @@ export { createBillingApps } from "./billingApps";
52
52
  export { createWorkflowApps } from "./workflowApps";
53
53
  export { createWorkflowTools, projectSetupStatus, projectWorkPreview, type McpSetupStatus, type McpWorkPreview, type McpWorkPreviewRequest, } from "./workflowTools";
54
54
  export { createSetupSelectionTools, projectSetupSelection, type SetupSelection, type SetupConfirmation, type SetupOption, } from "./setupSelection";
55
+ export { createActionWorkflowTools, projectActionReview, projectActionJob, type ActionReview, type ActionConfirmation, type ActionJob } from "./actionWorkflow";
@@ -172,3 +172,28 @@ aggregate evidence. The separate rich-view startup issue is unchanged.
172
172
  The [individual Copilot external-checkout review](reviews/vscode-individual-external-checkout.md)
173
173
  records the exact eligible deployment scope and activation conditions; the
174
174
  synthetic fixture is not a real merchant/OAuth acceptance test.
175
+
176
+ ### September 12 Claude workflow and selection observation
177
+
178
+ Native Windows Chrome/Claude rendered MCP 0.18.0 setup and preview views from a
179
+ verified onSpark staging connector. One explicit refresh per view produced one
180
+ additional read each; conversation reload remounted both without extra calls.
181
+ MCP 0.19.0's business selector subsequently rendered after one successful
182
+ `get_setup_options` call. Reload left its audit at one read and no mutations.
183
+ These were desktop/light-theme checks on an existing account. Local visible
184
+ bridge fixtures separately covered 390px/light/dark layout and synthetic
185
+ Review/Cancel (zero calls), Confirm (one call/one fixture write), and no replay.
186
+ Native confirmation against a real business was not tested.
187
+
188
+ After a server release, Claude retained its previous tool list. The connector's
189
+ **More options → Refresh tools list** exposed the new tools without reconnecting.
190
+ Chat discovery still chose the separate production connector until production
191
+ was temporarily disabled in that test chat's **Connectors** submenu. Then the
192
+ explicit staging-only read resolved and rendered. Restore prior toggles after a
193
+ test. The stopped discovery attempts made no server calls. This is qualified
194
+ operational evidence, not a proven general indexing defect: verify the native
195
+ tool list and enabled connector scope before concluding that a deployed tool is
196
+ missing, and do not stack authorization requests to troubleshoot discovery.
197
+
198
+ Rendering evidence does not expand host commerce eligibility or authorize paid
199
+ work, checkout, outbound actions, or real account mutations.
package/docs/mcp-apps.md CHANGED
@@ -101,3 +101,29 @@ obtain explicit approval before invoking the write tool. This is a reversible
101
101
  setup action with no billing or outbound effects; it does not authorize paid
102
102
  work. At most 200 options are supported; IDs/revisions are bounded at 128
103
103
  characters and labels at 512. No account selector or credentials enter the view.
104
+
105
+ ### Durable action status and reviewed outbound approval
106
+
107
+ `createActionWorkflowTools({ review, job, confirm? })` provides
108
+ `get_action_review`, `get_action_job`, `resume_action_job`, and (only with a
109
+ confirmation adapter) `confirm_action_review`. `createWorkflowApps()` supplies
110
+ the shared action view. The review contains the full recipients, subject, body,
111
+ consequences, exact revision, and expiry. The view separates local review/cancel
112
+ from explicit **Approve and queue**, marks that tool as an external destructive
113
+ write, and never calls tools on mount. Host theme changes are applied explicitly.
114
+
115
+ Bind identity in the adapter. Under a database lock, compare the reviewed
116
+ revision and expiry, authorize the immutable payload, and commit the decision
117
+ and durable outbox together. All draft writers must refuse edits after claim.
118
+ Use a stable effect identity and retain ambiguous outcomes for reconciliation;
119
+ never make provider calls inside this confirmation tool. Returned job identity
120
+ must match the requested action. Error responses require a saved-status read,
121
+ not an automatic approval retry or a newly invented action ID.
122
+
123
+ `resume_action_job` resumes **tracking**, by reading the existing durable job.
124
+ It does not restart work, grant a new lease, retry, resend, or reconcile an
125
+ unknown outcome. The worker owns safe retries. Project only user-facing status
126
+ and summaries; do not expose raw provider errors, credentials or queue internals.
127
+ The text-only path carries the same review and status; host support does not
128
+ expand authorization or commerce eligibility. Review bodies are bounded at
129
+ 100,000 characters, subjects at 2,000, and recipient lists at 100.
package/package.json CHANGED
@@ -90,5 +90,5 @@
90
90
  "canary:checkout": "bun canary/checkout.ts"
91
91
  },
92
92
  "types": "./dist/src/index.d.ts",
93
- "version": "0.19.0"
93
+ "version": "0.20.1"
94
94
  }