@absolutejs/mcp 0.18.0 → 0.19.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/CHANGELOG.md +6 -0
- package/changelog.json +10 -0
- package/dist/apps.js +89 -6
- package/dist/browser/setupSelection.d.ts +1 -0
- package/dist/index.js +165 -82
- package/dist/src/apps.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/setupSelection.d.ts +23 -0
- package/dist/src/setupSelection.generated.d.ts +1 -0
- package/docs/mcp-apps.md +19 -0
- package/package.json +1 -1
package/dist/src/apps.d.ts
CHANGED
|
@@ -35,3 +35,4 @@ export declare const appResourceContent: (resource: McpAppResource, uri: string)
|
|
|
35
35
|
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
|
+
export { createSetupSelectionTools, projectSetupSelection, type SetupSelection, type SetupConfirmation, type SetupOption, } from "./setupSelection";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -51,3 +51,4 @@ export { MCP_APP_MIME, clientSupportsMcpApps, withMcpApp, type McpAppResource, t
|
|
|
51
51
|
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
|
+
export { createSetupSelectionTools, projectSetupSelection, type SetupSelection, type SetupConfirmation, type SetupOption, } from "./setupSelection";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { McpToolRegistry } from "./types";
|
|
2
|
+
export type SetupOption = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type SetupSelection = {
|
|
7
|
+
revision: string;
|
|
8
|
+
selectedId: string | null;
|
|
9
|
+
options: SetupOption[];
|
|
10
|
+
};
|
|
11
|
+
export type SetupConfirmation = {
|
|
12
|
+
expectedRevision: string;
|
|
13
|
+
selectedId: string | null;
|
|
14
|
+
};
|
|
15
|
+
export declare const projectSetupSelection: (value: unknown) => SetupSelection;
|
|
16
|
+
/** Bind to the authenticated owner. confirm MUST atomically compare the revision,
|
|
17
|
+
* validate option ownership, change selection and advance the revision. All
|
|
18
|
+
* writers must advance it, including A→B→A. Retries with an old revision fail
|
|
19
|
+
* without effects. Recover by reading; never auto-retry against a new revision. */
|
|
20
|
+
export declare const createSetupSelectionTools: (adapter: {
|
|
21
|
+
read: () => Promise<SetupSelection>;
|
|
22
|
+
confirm: (request: SetupConfirmation) => Promise<SetupSelection>;
|
|
23
|
+
}) => McpToolRegistry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setupSelectionScript: string;
|
package/docs/mcp-apps.md
CHANGED
|
@@ -82,3 +82,22 @@ operation and budget. Errors clear stale eligibility and point back to the assis
|
|
|
82
82
|
Known affected VS Code builds retain the shared text fallback. The visible-browser
|
|
83
83
|
fixture is `bun test/fixtures/workflowServer.ts` (loopback port 4418); it uses zero
|
|
84
84
|
credits and no gateway or database.
|
|
85
|
+
|
|
86
|
+
### Reviewed setup selection
|
|
87
|
+
|
|
88
|
+
`createSetupSelectionTools({ read, confirm })` exposes `get_setup_options` and
|
|
89
|
+
`confirm_setup_selection`; `createWorkflowApps()` supplies the selection view.
|
|
90
|
+
The adapter returns `{ revision, selectedId, options: [{ id, label }] }`, with
|
|
91
|
+
`null` selecting all businesses. It must bind the authenticated account itself.
|
|
92
|
+
`confirm({ expectedRevision, selectedId })` must atomically compare the reviewed
|
|
93
|
+
revision, validate ownership, change selection, and advance the revision. Every
|
|
94
|
+
other selection writer must advance it too, including A → B → A. The package
|
|
95
|
+
validates and projects values but cannot provide database atomicity for adapters.
|
|
96
|
+
|
|
97
|
+
The view makes no call on mount. Review and Cancel are local; Confirm sends the
|
|
98
|
+
exact reviewed revision and selection once. Errors discard review state and
|
|
99
|
+
require a fresh read. Text-only hosts receive the same options/revision and must
|
|
100
|
+
obtain explicit approval before invoking the write tool. This is a reversible
|
|
101
|
+
setup action with no billing or outbound effects; it does not authorize paid
|
|
102
|
+
work. At most 200 options are supported; IDs/revisions are bounded at 128
|
|
103
|
+
characters and labels at 512. No account selector or credentials enter the view.
|
package/package.json
CHANGED