@absolutejs/mcp 0.21.0 → 0.23.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 +12 -0
- package/README.md +24 -0
- package/changelog.json +275 -248
- package/dist/apps.js +19 -5
- package/dist/index.js +49 -5
- package/dist/src/actionWorkflow.d.ts +5 -0
- package/dist/src/creditWorkResult.d.ts +13 -0
- package/dist/src/index.d.ts +2 -1
- package/docs/mcp-apps.md +13 -0
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { McpToolRegistry } from "./types";
|
|
2
2
|
export type ActionReview = {
|
|
3
|
+
/** Complete action-specific terms; adapters bind these to the reviewed revision. */
|
|
4
|
+
details?: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}>;
|
|
3
8
|
maxCredits?: number;
|
|
4
9
|
/** Set by the tool factory from the available confirmation capability. */
|
|
5
10
|
canConfirm?: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { McpToolResult } from "./types";
|
|
2
|
+
/** Public projection of account-bound, persisted work. Never pass an unfiltered
|
|
3
|
+
* database row or provider response as the saved result. */
|
|
4
|
+
export type McpCreditWorkSnapshot = {
|
|
5
|
+
budget: number;
|
|
6
|
+
charged: number;
|
|
7
|
+
status: "running" | "completed" | "failed";
|
|
8
|
+
result: string | null;
|
|
9
|
+
};
|
|
10
|
+
/** Keep text-only and structured-only hosts on the same result contract. This
|
|
11
|
+
* pure formatter never starts, retries, approves, or settles work. Use it for
|
|
12
|
+
* initial completion, duplicate requests, and read-only recovery alike. */
|
|
13
|
+
export declare const createCreditWorkResult: (requestId: string, work: McpCreditWorkSnapshot) => McpToolResult;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -52,4 +52,5 @@ 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";
|
|
55
|
+
export { createActionWorkflowTools, projectActionReview, projectActionJob, type ActionReview, type ActionConfirmation, type ActionJob, } from "./actionWorkflow";
|
|
56
|
+
export { createCreditWorkResult, type McpCreditWorkSnapshot, } from "./creditWorkResult";
|
package/docs/mcp-apps.md
CHANGED
|
@@ -142,3 +142,16 @@ The shared App displays the hold, charge ceiling and uncertain-outcome behavior
|
|
|
142
142
|
before approval, then carries the budget unchanged to confirmation. Job results
|
|
143
143
|
may show projected `creditUsage` (work ID, maximum, charged amount and reserved or
|
|
144
144
|
settled state). Read/resume/refresh never reserve, settle or retry execution.
|
|
145
|
+
|
|
146
|
+
### Action-specific approval terms
|
|
147
|
+
|
|
148
|
+
`ActionReview.details` carries bounded, labeled terms such as a calendar's exact
|
|
149
|
+
start/end times, target calendar and conference choice. Both structured/text
|
|
150
|
+
results and the shared review App include every term. Labels and values render
|
|
151
|
+
as text. The adapter must bind these terms to `revision` and use the same terms
|
|
152
|
+
at execution; the App cannot validate a provider-specific action for it.
|
|
153
|
+
|
|
154
|
+
An adapter may return `canConfirm: false` for an individual action even when it
|
|
155
|
+
implements confirmation for other kinds. The factory preserves that restriction
|
|
156
|
+
and still enforces the adapter's general capability and explicit prepaid budget.
|
|
157
|
+
The adapter must independently reject disabled kinds at confirmation time.
|
package/package.json
CHANGED