@absolutejs/mcp 0.11.3 → 0.13.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/dist/manifest.js CHANGED
@@ -63,22 +63,22 @@ var TypeSystemPolicy;
63
63
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
64
64
  var exports_value = {};
65
65
  __export(exports_value, {
66
- IsUndefined: () => IsUndefined2,
67
- IsUint8Array: () => IsUint8Array,
68
- IsSymbol: () => IsSymbol,
69
- IsString: () => IsString,
70
- IsRegExp: () => IsRegExp,
71
- IsObject: () => IsObject2,
72
- IsNumber: () => IsNumber2,
73
- IsNull: () => IsNull,
74
- IsIterator: () => IsIterator,
75
- IsFunction: () => IsFunction,
76
- IsDate: () => IsDate,
77
- IsBoolean: () => IsBoolean,
78
- IsBigInt: () => IsBigInt,
79
- IsAsyncIterator: () => IsAsyncIterator,
66
+ HasPropertyKey: () => HasPropertyKey,
80
67
  IsArray: () => IsArray2,
81
- HasPropertyKey: () => HasPropertyKey
68
+ IsAsyncIterator: () => IsAsyncIterator,
69
+ IsBigInt: () => IsBigInt,
70
+ IsBoolean: () => IsBoolean,
71
+ IsDate: () => IsDate,
72
+ IsFunction: () => IsFunction,
73
+ IsIterator: () => IsIterator,
74
+ IsNull: () => IsNull,
75
+ IsNumber: () => IsNumber2,
76
+ IsObject: () => IsObject2,
77
+ IsRegExp: () => IsRegExp,
78
+ IsString: () => IsString,
79
+ IsSymbol: () => IsSymbol,
80
+ IsUint8Array: () => IsUint8Array,
81
+ IsUndefined: () => IsUndefined2
82
82
  });
83
83
  function HasPropertyKey(value, key) {
84
84
  return key in value;
@@ -683,7 +683,7 @@ function Literal(value, options) {
683
683
  }
684
684
 
685
685
  // node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
686
- function Boolean(options) {
686
+ function Boolean2(options) {
687
687
  return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
688
688
  }
689
689
 
@@ -705,7 +705,7 @@ function String2(options) {
705
705
  // node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
706
706
  function* FromUnion(syntax) {
707
707
  const trim = syntax.trim().replace(/"|'/g, "");
708
- return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
708
+ return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
709
709
  const literals = trim.split("|").map((literal) => Literal(literal.trim()));
710
710
  return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
711
711
  })();
@@ -1097,57 +1097,57 @@ function Unknown(options) {
1097
1097
  // node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
1098
1098
  var exports_type = {};
1099
1099
  __export(exports_type, {
1100
- TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError,
1101
- IsVoid: () => IsVoid2,
1102
- IsUnsafe: () => IsUnsafe2,
1103
- IsUnknown: () => IsUnknown2,
1104
- IsUnionLiteral: () => IsUnionLiteral,
1105
- IsUnion: () => IsUnion2,
1106
- IsUndefined: () => IsUndefined4,
1107
- IsUint8Array: () => IsUint8Array3,
1108
- IsTuple: () => IsTuple2,
1109
- IsTransform: () => IsTransform2,
1110
- IsThis: () => IsThis2,
1111
- IsTemplateLiteral: () => IsTemplateLiteral2,
1112
- IsSymbol: () => IsSymbol3,
1113
- IsString: () => IsString3,
1114
- IsSchema: () => IsSchema2,
1115
- IsRegExp: () => IsRegExp3,
1116
- IsRef: () => IsRef2,
1117
- IsRecursive: () => IsRecursive,
1118
- IsRecord: () => IsRecord2,
1119
- IsReadonly: () => IsReadonly2,
1120
- IsProperties: () => IsProperties,
1121
- IsPromise: () => IsPromise2,
1122
- IsOptional: () => IsOptional2,
1123
- IsObject: () => IsObject4,
1124
- IsNumber: () => IsNumber4,
1125
- IsNull: () => IsNull3,
1126
- IsNot: () => IsNot2,
1127
- IsNever: () => IsNever2,
1128
- IsMappedResult: () => IsMappedResult2,
1129
- IsMappedKey: () => IsMappedKey2,
1130
- IsLiteralValue: () => IsLiteralValue2,
1131
- IsLiteralString: () => IsLiteralString,
1132
- IsLiteralNumber: () => IsLiteralNumber,
1133
- IsLiteralBoolean: () => IsLiteralBoolean,
1134
- IsLiteral: () => IsLiteral2,
1135
- IsKindOf: () => IsKindOf2,
1136
- IsKind: () => IsKind2,
1137
- IsIterator: () => IsIterator3,
1138
- IsIntersect: () => IsIntersect2,
1139
- IsInteger: () => IsInteger2,
1140
- IsImport: () => IsImport,
1141
- IsFunction: () => IsFunction3,
1142
- IsDate: () => IsDate3,
1143
- IsConstructor: () => IsConstructor2,
1144
- IsComputed: () => IsComputed2,
1145
- IsBoolean: () => IsBoolean3,
1146
- IsBigInt: () => IsBigInt3,
1147
- IsAsyncIterator: () => IsAsyncIterator3,
1148
- IsArray: () => IsArray4,
1100
+ IsAny: () => IsAny2,
1149
1101
  IsArgument: () => IsArgument2,
1150
- IsAny: () => IsAny2
1102
+ IsArray: () => IsArray4,
1103
+ IsAsyncIterator: () => IsAsyncIterator3,
1104
+ IsBigInt: () => IsBigInt3,
1105
+ IsBoolean: () => IsBoolean3,
1106
+ IsComputed: () => IsComputed2,
1107
+ IsConstructor: () => IsConstructor2,
1108
+ IsDate: () => IsDate3,
1109
+ IsFunction: () => IsFunction3,
1110
+ IsImport: () => IsImport,
1111
+ IsInteger: () => IsInteger2,
1112
+ IsIntersect: () => IsIntersect2,
1113
+ IsIterator: () => IsIterator3,
1114
+ IsKind: () => IsKind2,
1115
+ IsKindOf: () => IsKindOf2,
1116
+ IsLiteral: () => IsLiteral2,
1117
+ IsLiteralBoolean: () => IsLiteralBoolean,
1118
+ IsLiteralNumber: () => IsLiteralNumber,
1119
+ IsLiteralString: () => IsLiteralString,
1120
+ IsLiteralValue: () => IsLiteralValue2,
1121
+ IsMappedKey: () => IsMappedKey2,
1122
+ IsMappedResult: () => IsMappedResult2,
1123
+ IsNever: () => IsNever2,
1124
+ IsNot: () => IsNot2,
1125
+ IsNull: () => IsNull3,
1126
+ IsNumber: () => IsNumber4,
1127
+ IsObject: () => IsObject4,
1128
+ IsOptional: () => IsOptional2,
1129
+ IsPromise: () => IsPromise2,
1130
+ IsProperties: () => IsProperties,
1131
+ IsReadonly: () => IsReadonly2,
1132
+ IsRecord: () => IsRecord2,
1133
+ IsRecursive: () => IsRecursive,
1134
+ IsRef: () => IsRef2,
1135
+ IsRegExp: () => IsRegExp3,
1136
+ IsSchema: () => IsSchema2,
1137
+ IsString: () => IsString3,
1138
+ IsSymbol: () => IsSymbol3,
1139
+ IsTemplateLiteral: () => IsTemplateLiteral2,
1140
+ IsThis: () => IsThis2,
1141
+ IsTransform: () => IsTransform2,
1142
+ IsTuple: () => IsTuple2,
1143
+ IsUint8Array: () => IsUint8Array3,
1144
+ IsUndefined: () => IsUndefined4,
1145
+ IsUnion: () => IsUnion2,
1146
+ IsUnionLiteral: () => IsUnionLiteral,
1147
+ IsUnknown: () => IsUnknown2,
1148
+ IsUnsafe: () => IsUnsafe2,
1149
+ IsVoid: () => IsVoid2,
1150
+ TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError
1151
1151
  });
1152
1152
  class TypeGuardUnknownTypeError extends TypeBoxError {
1153
1153
  }
@@ -2498,68 +2498,68 @@ function Void(options) {
2498
2498
  // node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
2499
2499
  var exports_type2 = {};
2500
2500
  __export(exports_type2, {
2501
- Void: () => Void,
2502
- Uppercase: () => Uppercase,
2503
- Unsafe: () => Unsafe,
2504
- Unknown: () => Unknown,
2505
- Union: () => Union,
2506
- Undefined: () => Undefined,
2507
- Uncapitalize: () => Uncapitalize,
2508
- Uint8Array: () => Uint8Array2,
2509
- Tuple: () => Tuple,
2510
- Transform: () => Transform,
2511
- TemplateLiteral: () => TemplateLiteral,
2512
- Symbol: () => Symbol2,
2513
- String: () => String2,
2514
- ReturnType: () => ReturnType,
2515
- Rest: () => Rest,
2516
- Required: () => Required,
2517
- RegExp: () => RegExp2,
2518
- Ref: () => Ref,
2519
- Recursive: () => Recursive,
2520
- Record: () => Record,
2521
- ReadonlyOptional: () => ReadonlyOptional,
2522
- Readonly: () => Readonly,
2523
- Promise: () => Promise2,
2524
- Pick: () => Pick,
2525
- Partial: () => Partial,
2526
- Parameters: () => Parameters,
2527
- Optional: () => Optional,
2528
- Omit: () => Omit,
2529
- Object: () => Object2,
2530
- Number: () => Number2,
2531
- Null: () => Null,
2532
- Not: () => Not,
2533
- Never: () => Never,
2534
- Module: () => Module,
2535
- Mapped: () => Mapped,
2536
- Lowercase: () => Lowercase,
2537
- Literal: () => Literal,
2538
- KeyOf: () => KeyOf,
2539
- Iterator: () => Iterator,
2540
- Intersect: () => Intersect,
2541
- Integer: () => Integer,
2542
- Instantiate: () => Instantiate,
2543
- InstanceType: () => InstanceType,
2544
- Index: () => Index,
2545
- Function: () => Function,
2546
- Extract: () => Extract,
2547
- Extends: () => Extends,
2548
- Exclude: () => Exclude,
2549
- Enum: () => Enum,
2550
- Date: () => Date2,
2551
- ConstructorParameters: () => ConstructorParameters,
2552
- Constructor: () => Constructor,
2553
- Const: () => Const,
2554
- Composite: () => Composite,
2555
- Capitalize: () => Capitalize,
2556
- Boolean: () => Boolean,
2557
- BigInt: () => BigInt,
2558
- Awaited: () => Awaited,
2559
- AsyncIterator: () => AsyncIterator,
2560
- Array: () => Array2,
2501
+ Any: () => Any,
2561
2502
  Argument: () => Argument,
2562
- Any: () => Any
2503
+ Array: () => Array2,
2504
+ AsyncIterator: () => AsyncIterator,
2505
+ Awaited: () => Awaited,
2506
+ BigInt: () => BigInt,
2507
+ Boolean: () => Boolean2,
2508
+ Capitalize: () => Capitalize,
2509
+ Composite: () => Composite,
2510
+ Const: () => Const,
2511
+ Constructor: () => Constructor,
2512
+ ConstructorParameters: () => ConstructorParameters,
2513
+ Date: () => Date2,
2514
+ Enum: () => Enum,
2515
+ Exclude: () => Exclude,
2516
+ Extends: () => Extends,
2517
+ Extract: () => Extract,
2518
+ Function: () => Function,
2519
+ Index: () => Index,
2520
+ InstanceType: () => InstanceType,
2521
+ Instantiate: () => Instantiate,
2522
+ Integer: () => Integer,
2523
+ Intersect: () => Intersect,
2524
+ Iterator: () => Iterator,
2525
+ KeyOf: () => KeyOf,
2526
+ Literal: () => Literal,
2527
+ Lowercase: () => Lowercase,
2528
+ Mapped: () => Mapped,
2529
+ Module: () => Module,
2530
+ Never: () => Never,
2531
+ Not: () => Not,
2532
+ Null: () => Null,
2533
+ Number: () => Number2,
2534
+ Object: () => Object2,
2535
+ Omit: () => Omit,
2536
+ Optional: () => Optional,
2537
+ Parameters: () => Parameters,
2538
+ Partial: () => Partial,
2539
+ Pick: () => Pick,
2540
+ Promise: () => Promise2,
2541
+ Readonly: () => Readonly,
2542
+ ReadonlyOptional: () => ReadonlyOptional,
2543
+ Record: () => Record,
2544
+ Recursive: () => Recursive,
2545
+ Ref: () => Ref,
2546
+ RegExp: () => RegExp2,
2547
+ Required: () => Required,
2548
+ Rest: () => Rest,
2549
+ ReturnType: () => ReturnType,
2550
+ String: () => String2,
2551
+ Symbol: () => Symbol2,
2552
+ TemplateLiteral: () => TemplateLiteral,
2553
+ Transform: () => Transform,
2554
+ Tuple: () => Tuple,
2555
+ Uint8Array: () => Uint8Array2,
2556
+ Uncapitalize: () => Uncapitalize,
2557
+ Undefined: () => Undefined,
2558
+ Union: () => Union,
2559
+ Unknown: () => Unknown,
2560
+ Unsafe: () => Unsafe,
2561
+ Uppercase: () => Uppercase,
2562
+ Void: () => Void
2563
2563
  });
2564
2564
 
2565
2565
  // node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
@@ -2718,6 +2718,79 @@ var serializedTool = Type.Object({
2718
2718
  input: jsonSchemaObject,
2719
2719
  kind: Type.Union([Type.Literal("runtime"), Type.Literal("workspace")])
2720
2720
  });
2721
+ var productId = Type.String({ pattern: "^[a-z][a-z0-9_-]{0,63}$" });
2722
+ var productCopy = {
2723
+ description: Type.String({ minLength: 1 }),
2724
+ id: productId,
2725
+ title: Type.String({ minLength: 1 })
2726
+ };
2727
+ var productOperation = Type.Union([
2728
+ Type.Literal("aggregate"),
2729
+ Type.Literal("create"),
2730
+ Type.Literal("delete"),
2731
+ Type.Literal("detail"),
2732
+ Type.Literal("list"),
2733
+ Type.Literal("update")
2734
+ ]);
2735
+ var productProjection = Type.Object({
2736
+ blocks: Type.Optional(Type.Array(Type.Object({
2737
+ ...productCopy,
2738
+ category: Type.String({ minLength: 1 }),
2739
+ componentExport: Type.String({ minLength: 1 }),
2740
+ frameworks: Type.Optional(Type.Array(Type.Union(clientFrameworks.map((framework) => Type.Literal(framework))))),
2741
+ props: jsonSchemaObject
2742
+ }))),
2743
+ connections: Type.Optional(Type.Array(Type.Object({
2744
+ ...productCopy,
2745
+ envKeys: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
2746
+ kind: Type.Union([
2747
+ Type.Literal("none"),
2748
+ Type.Literal("oauth"),
2749
+ Type.Literal("secret")
2750
+ ]),
2751
+ setupTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source })),
2752
+ testTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source }))
2753
+ }))),
2754
+ dataSources: Type.Optional(Type.Array(Type.Object({
2755
+ ...productCopy,
2756
+ operations: Type.Array(productOperation, { minItems: 1 }),
2757
+ schema: jsonSchemaObject,
2758
+ tools: Type.Optional(Type.Partial(Type.Object({
2759
+ aggregate: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
2760
+ create: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
2761
+ delete: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
2762
+ detail: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
2763
+ list: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
2764
+ update: Type.String({ pattern: TOOL_NAME_PATTERN.source })
2765
+ })))
2766
+ }))),
2767
+ events: Type.Optional(Type.Array(Type.Object({
2768
+ ...productCopy,
2769
+ schema: jsonSchemaObject,
2770
+ source: Type.Union([
2771
+ Type.Literal("data"),
2772
+ Type.Literal("package"),
2773
+ Type.Literal("ui"),
2774
+ Type.Literal("webhook")
2775
+ ])
2776
+ }))),
2777
+ healthChecks: Type.Optional(Type.Array(Type.Object({
2778
+ ...productCopy,
2779
+ tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
2780
+ }))),
2781
+ releaseChecks: Type.Optional(Type.Array(Type.Object({
2782
+ ...productCopy,
2783
+ healthCheckIds: Type.Optional(Type.Array(productId)),
2784
+ severity: Type.Union([
2785
+ Type.Literal("blocking"),
2786
+ Type.Literal("warning")
2787
+ ])
2788
+ }))),
2789
+ workflowActions: Type.Optional(Type.Array(Type.Object({
2790
+ ...productCopy,
2791
+ tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
2792
+ })))
2793
+ });
2721
2794
  var manifestSchema = Type.Object({
2722
2795
  contract: Type.Union([Type.Literal(1), Type.Literal(2)]),
2723
2796
  discovery: Type.Optional(Type.Object({
@@ -2743,6 +2816,14 @@ var manifestSchema = Type.Object({
2743
2816
  tagline: Type.String({ minLength: 1 })
2744
2817
  }),
2745
2818
  implements: Type.Optional(Type.Array(adapterImplementation)),
2819
+ integration: Type.Optional(Type.Object({
2820
+ description: Type.Optional(Type.String({ minLength: 1 })),
2821
+ mode: Type.Union([
2822
+ Type.Literal("adapter"),
2823
+ Type.Literal("code-first"),
2824
+ Type.Literal("recipe")
2825
+ ])
2826
+ })),
2746
2827
  lifecycle: Type.Optional(Type.Array(lifecycleStep)),
2747
2828
  presets: Type.Optional(Type.Array(Type.Object({
2748
2829
  description: Type.Optional(Type.String()),
@@ -2750,6 +2831,7 @@ var manifestSchema = Type.Object({
2750
2831
  title: Type.String(),
2751
2832
  values: Type.Record(Type.String(), Type.Unknown())
2752
2833
  }))),
2834
+ product: Type.Optional(productProjection),
2753
2835
  requires: Type.Optional(manifestRequirements),
2754
2836
  settings: jsonSchemaObject,
2755
2837
  slots: Type.Optional(Type.Record(Type.String(), adapterSlot)),
@@ -2779,7 +2861,9 @@ var manifest = defineManifest()({
2779
2861
  tagline: "Let AI assistants connect to your site and use its tools."
2780
2862
  },
2781
2863
  requires: {
2782
- peers: [{ name: "elysia", range: ">=1.1.0", reason: "plugin host" }]
2864
+ peers: [
2865
+ { name: "elysia", range: "^2.0.0-beta.6", reason: "plugin host" }
2866
+ ]
2783
2867
  },
2784
2868
  settings: Type.Object({
2785
2869
  instructions: Type.Optional(Type.String({
@@ -35,7 +35,7 @@
35
35
  "peers": [
36
36
  {
37
37
  "name": "elysia",
38
- "range": ">=1.1.0",
38
+ "range": "^2.0.0-beta.6",
39
39
  "reason": "plugin host"
40
40
  }
41
41
  ]
@@ -0,0 +1,50 @@
1
+ /** Host commerce eligibility, not payment authorization. All inputs are
2
+ * server-owned; never derive a permissive profile from clientInfo alone. */
3
+ export declare const COMMERCE_POLICY_VERSION = "2026-09-10.1";
4
+ export declare const COMMERCE_POLICY_SOURCES: Readonly<{
5
+ claude: "https://support.claude.com/en/articles/13454812-use-interactive-connectors-in-claude";
6
+ chatgpt: "https://developers.openai.com/plugins/app-guidelines#commerce-and-monetization";
7
+ chatgptCheckout: "https://developers.openai.com/plugins/build/monetization";
8
+ cursorMarketplace: "https://cursor.com/marketplace-publisher-terms";
9
+ }>;
10
+ export type CommerceAction = "entitlement_status" | "informational_link" | "paid_access" | "pricing" | "external_checkout" | "saved_method_purchase" | "new_method_collection" | "subscription" | "automatic_refill";
11
+ export type CommerceCategory = "physical_goods" | "digital_service" | "usage_credits" | "subscription";
12
+ export type CommerceProfile = "claude-interactive" | "chatgpt-plugin" | "cursor-marketplace" | "direct-mcp" | "self-hosted" | "unknown";
13
+ export type CommerceRequirement = {
14
+ action: CommerceAction;
15
+ /** All product categories this tool can expose, including every cart line.
16
+ * Dynamic catalogs must be classified by the server before registration. */
17
+ categories: readonly CommerceCategory[];
18
+ };
19
+ export type CommerceReview = {
20
+ id: string;
21
+ profile: CommerceProfile;
22
+ actions: readonly CommerceAction[];
23
+ categories: readonly CommerceCategory[];
24
+ reviewedAt: string;
25
+ expiresAt: string;
26
+ sourceUrls: readonly string[];
27
+ };
28
+ export type CommerceContext = {
29
+ /** Ambiguous channels are evaluated as the intersection of their rules. */
30
+ profiles: readonly CommerceProfile[];
31
+ reviews?: readonly CommerceReview[];
32
+ /** Reviewed and tested capabilities; these do not establish permission. */
33
+ capabilities?: {
34
+ externalLinks?: boolean;
35
+ interactiveUi?: boolean;
36
+ nativePaymentSheet?: boolean;
37
+ };
38
+ };
39
+ export type CommerceDecision = {
40
+ allowed: boolean;
41
+ status: "permitted" | "restricted" | "unverified";
42
+ reason: string;
43
+ policyVersion: string;
44
+ sourceUrls: string[];
45
+ reviewIds: string[];
46
+ };
47
+ /** Published restrictions cannot be overridden by a deployment review.
48
+ * Unverified paths need explicit, fresh server-side review evidence. */
49
+ export declare const evaluateCommerce: (req: CommerceRequirement, context: CommerceContext, now?: Date) => CommerceDecision;
50
+ export { createCreditBalanceTool, type McpCreditBalance } from "./creditStatus";
@@ -0,0 +1,13 @@
1
+ import type { McpTool } from "./types";
2
+ /** Service credits, not currency or the host model's token usage. */
3
+ export type McpCreditBalance = {
4
+ allowance: number;
5
+ consumed: number;
6
+ remaining: number;
7
+ periodEnd: string | null;
8
+ };
9
+ /** Account identity belongs in the bound reader, never model input. Keep this
10
+ * tool outside paid-work balance gates so exhausted users can recover. */
11
+ export declare const createCreditBalanceTool: (options: {
12
+ read: () => McpCreditBalance | Promise<McpCreditBalance>;
13
+ }) => McpTool;
@@ -42,3 +42,5 @@ export { createSessionRegistry, type SessionRegistry } from "./sessions";
42
42
  export { createMemoryMcpTaskStore, publicMcpTask } from "./tasks";
43
43
  export { createPostgresMcpSessionStore, createPostgresMcpTaskStore, mcpPostgresSchemaSql, type McpSqlClient, type McpSqlResult, } from "./postgres";
44
44
  export type { McpAgencyOptions, McpAudioContent, McpElicitAnswer, McpElicitationRequest, McpElicitBus, McpElicitResult, McpFormElicitationRequest, McpSessionStore, McpAuthResult, McpCallGate, McpCallMeta, McpContent, McpImageContent, McpPromptArgument, McpPromptDefinition, McpPrompts, McpResource, McpResourceLink, McpResources, McpServerConfig, McpServerInfo, McpTextContent, McpTask, McpTaskStatus, McpTaskStore, McpTasksOptions, McpTool, McpToolAnnotations, McpToolCallContext, McpToolContext, McpToolRegistry, McpToolResult, McpToolReturn, McpUrlElicitationRequest, } from "./types";
45
+ export * from "./commerce";
46
+ export { createCreditBalanceTool, type McpCreditBalance } from "./creditStatus";
@@ -1,3 +1,4 @@
1
+ import type { CommerceContext, CommerceRequirement } from "./commerce";
1
2
  import type { Agency, AgentActor } from "@absolutejs/agency";
2
3
  import type { ToolAuthorization } from "@absolutejs/manifest";
3
4
  /** MCP behaviour hints, passed straight through to the client on `tools/list`.
@@ -122,6 +123,8 @@ export type McpToolCallContext = {
122
123
  };
123
124
  /** One callable tool. `inputSchema` is a JSON Schema object. */
124
125
  export type McpTool = {
126
+ /** Server-owned commerce classification; fails closed without commerce context. */
127
+ commerce?: CommerceRequirement;
125
128
  annotations?: McpToolAnnotations;
126
129
  /** OpenID AuthZEN COAZ opt-in marker. When true, inputSchema MUST carry an
127
130
  * `x-coaz-mapping`; hosts should evaluate it before invoking the handler. */
@@ -265,6 +268,12 @@ export type McpServerInfo = {
265
268
  version: string;
266
269
  };
267
270
  export type McpServerConfig<Caller> = {
271
+ /** Resolve trusted deployment policy afresh for discovery and execution.
272
+ * Does not replace agency approval, ownership, or payment confirmation. */
273
+ commerce?: (context: {
274
+ caller: Caller;
275
+ name: string;
276
+ }) => CommerceContext | Promise<CommerceContext>;
268
277
  /** Per-tool action policy enforcement, approval, leases, and receipts. */
269
278
  agency?: McpAgencyOptions<Caller>;
270
279
  /** Resolve the request into a caller, or a reason for the 401. The package