@layers/amba-mcp 4.0.4 → 4.0.6

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.
@@ -80,13 +80,6 @@ export type ToolVerbClass = 'read' | 'destructive' | 'write';
80
80
  * `amba_` prefix. Exported for the test suite.
81
81
  */
82
82
  export declare function toolNameTokens(name: string): string[];
83
- /**
84
- * Classify a tool name into its behavioural class by PRECEDENCE
85
- * (destructive > read > write). Returns `null` if no token matches any
86
- * known verb — that should never happen for a real Amba tool and the
87
- * test suite asserts it doesn't, so a `null` at runtime means a new tool
88
- * used an unrecognised verb and needs a verb-set entry here.
89
- */
90
83
  export declare function classifyToolVerb(name: string): ToolVerbClass | null;
91
84
  /**
92
85
  * Derive a human-readable Title-Case title from the tool name. The
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Event catalog + control-plane webhook tools — discover what a project can
3
+ * emit, and subscribe webhooks to PLATFORM lifecycle events.
4
+ *
5
+ * amba_events_catalog GET /webhooks/catalog
6
+ * amba_control_webhooks_create POST /control-webhooks
7
+ * amba_control_webhooks_list GET /control-webhooks
8
+ * amba_control_webhooks_delete DELETE /control-webhooks/:id
9
+ *
10
+ * Tenant/app-event subscription tools live in `webhooks.ts` (those subscribe to
11
+ * APP events like `economy.currency.spent`). These cover CONTROL-plane events
12
+ * about the project itself — provisioning, deploys, domains, billing — which is
13
+ * what an autonomous provisioning agent wants to react to.
14
+ *
15
+ * Descriptions stay provider-neutral and nudge toward the production pattern
16
+ * (discover the catalog → wire the lifecycle events) without overclaiming.
17
+ */
18
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
19
+ import type { ApiClient } from '../api-client.js';
20
+ export declare function registerTools(server: McpServer, apiClient: ApiClient): void;
@@ -5,7 +5,7 @@
5
5
  * deploy a bundled script, list deployments, describe one, delete a
6
6
  * function (cascade), and full schedule lifecycle (create, pause,
7
7
  * resume, trigger now). Logs read is the last operation in the set —
8
- * Workers Logpush events for a single function over a bounded time
8
+ * Function logs for a single function over a bounded time
9
9
  * range.
10
10
  *
11
11
  * Wire details:
@@ -6,7 +6,7 @@ import type { ApiClient } from '../api-client.js';
6
6
  * cohorts that the rollover workflow reshuffles. These tools provision and
7
7
  * inspect leagues; the admin routes are mounted at
8
8
  * `/v1/admin/projects/:projectId/leagues`. Members are assigned by the weekly
9
- * rollover (the registered Temporal schedule) and score live off `xp_awarded`
9
+ * rollover (the scheduled weekly rollover) and score live off `xp_awarded`
10
10
  * engagement events.
11
11
  */
12
12
  export declare function registerTools(server: McpServer, apiClient: ApiClient): void;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Monetization control-plane tools (Phase 1 — read-only against RevenueCat).
3
+ *
4
+ * These let an agent reason about a project's subscription monetization as
5
+ * Infrastructure-as-Code: preview the gap between the declared config and
6
+ * what's live (plan), see what changed out-of-band (drift), snapshot the live
7
+ * config into a declarative bundle (export), adopt the live config as the
8
+ * managed baseline (adopt), and inspect the current declared definitions.
9
+ *
10
+ * Phase 1 is READ-ONLY against the upstream subscription provider: plan / drift
11
+ * / export only read; adopt writes Amba's own state (definitions + statefile),
12
+ * never the provider. Provisioning ("apply" — pushing declared changes back to
13
+ * the provider) is a later phase; these tools deliberately don't claim it.
14
+ *
15
+ * RevenueCat may be named here — it's a developer-chosen integration the
16
+ * developer configured themselves, not an Amba implementation detail.
17
+ */
18
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
19
+ import type { ApiClient } from '../api-client.js';
20
+ export declare function registerTools(server: McpServer, apiClient: ApiClient): void;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Operation-handle MCP tools — poll an async operation to done | failed.
3
+ *
4
+ * Several Amba actions kick off work that may take a moment (e.g. buying a
5
+ * domain). Those endpoints return an `operation_id`; pass it to
6
+ * `amba_operations_get` to read the current status without re-triggering the
7
+ * action. Poll until `status` is `succeeded` or `failed` — on `failed`,
8
+ * `failed_reason` explains why.
9
+ *
10
+ * Tools:
11
+ * - `amba_operations_get` — read one operation's status (poll to done).
12
+ * - `amba_operations_list` — list operations, optionally filtered by kind
13
+ * and/or status.
14
+ *
15
+ * Both are READ-ONLY — they never start or change an operation, only report
16
+ * it. The producing tool (e.g. `amba_domains_purchase`) is what creates the
17
+ * operation and returns its id.
18
+ *
19
+ * Authentication: every tool accepts an optional inline `pat` via the
20
+ * `registerTool` helper (see `../lib/with-pat.ts`).
21
+ */
22
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
23
+ import type { ApiClient } from '../api-client.js';
24
+ export declare function registerTools(server: McpServer, apiClient: ApiClient): void;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Amba Payments — Stripe Connect platform tools (tracker #10).
3
+ *
4
+ * Amba is the payments rail for the developer's app: the app is the seller,
5
+ * Amba takes a platform fee, Stripe carries money-transmission. These are
6
+ * the DEVELOPER-facing onboarding + configuration + reporting tools — the
7
+ * developer knowingly connects a Stripe account, so "Stripe" is named here
8
+ * (same posture as the existing developer-billing surface). The end-customer
9
+ * (app-user) payment surface lives in the SDK and stays neutral.
10
+ *
11
+ * Tools:
12
+ * - amba_payments_account_create — create the project's connected account
13
+ * - amba_payments_create_onboarding_link — hosted onboarding URL (copy box)
14
+ * - amba_payments_account_status — onboarding + capability flags
15
+ * - amba_payments_set_fee — set the default platform fee (basis points)
16
+ * - amba_payments_charge — destination charge with application fee
17
+ * - amba_payments_balance — connected-account balance
18
+ * - amba_payments_payouts — connected-account payouts
19
+ *
20
+ * Backend routes: POST/GET/PUT /v1/admin/projects/:id/payments/*. All live
21
+ * Stripe calls are gated by the platform's PAYMENTS_CONNECT_LIVE
22
+ * kill-switch — when off, the tools surface a clear PAYMENTS_NOT_ENABLED
23
+ * error via the standard AmbaApiError path (the platform owner enables it).
24
+ *
25
+ * No vendor leakage on the END-CUSTOMER surface; here, naming Stripe is by
26
+ * intent in the developer onboarding context.
27
+ */
28
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
29
+ import type { ApiClient } from '../api-client.js';
30
+ export declare function registerTools(server: McpServer, apiClient: ApiClient): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layers/amba-mcp",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "license": "Apache-2.0",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@modelcontextprotocol/sdk": "^1.12.1",
28
28
  "zod": "^3.25.0",
29
- "@layers/amba-shared": "4.0.3"
29
+ "@layers/amba-shared": "4.0.4"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.10.2",