@decionis/mcp 0.1.4 → 0.3.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.
@@ -128,11 +128,59 @@ interface EvaluateResult {
128
128
  status: number;
129
129
  body: Record<string, unknown>;
130
130
  }
131
+ /** One entry of the policy-pack catalogue the in-process protocol ships. */
132
+ interface PolicyPackSummary {
133
+ key: string;
134
+ display_name: string;
135
+ description: string;
136
+ default_domain: string | null;
137
+ policy_bundle_version: string;
138
+ workflow_keys: string[];
139
+ }
140
+ type SeedPackResult = {
141
+ ok: true;
142
+ key: string;
143
+ version: string;
144
+ bundleId: string;
145
+ ruleCount: number;
146
+ seeded: boolean;
147
+ } | {
148
+ ok: false;
149
+ reason: "unknown_pack" | "pack_rejected";
150
+ errors: string[];
151
+ };
131
152
  declare class LocalDecionisGateway {
132
153
  private app;
154
+ private store;
155
+ private hostedTools;
133
156
  private publishedVersion;
157
+ private readonly seededPacks;
134
158
  private ready;
135
159
  close(): Promise<void>;
160
+ /**
161
+ * The policy packs the in-process protocol ships — the same catalogue the
162
+ * hosted service serves at GET /v1/protocol/verticals/packs. Read-only.
163
+ */
164
+ listPolicyPacks(): Promise<PolicyPackSummary[]>;
165
+ /**
166
+ * Seed a policy pack's bundle for the local sandbox org through the
167
+ * protocol's own seed route (schema-validated, like the file policy).
168
+ * Idempotent per pack: the bundle is minted once per process and its exact
169
+ * version is what every later evaluation pins.
170
+ */
171
+ seedPolicyPack(key: string): Promise<SeedPackResult>;
172
+ /**
173
+ * The hosted MCP tool set, bound to the same in-process app and store. The
174
+ * Presence tools reuse it verbatim so the local hold → verify → re-evaluate
175
+ * loop is the hosted loop, not a re-implementation.
176
+ */
177
+ callHostedTool(name: string, args: Record<string, unknown>): Promise<{
178
+ content: Array<{
179
+ type: "text";
180
+ text: string;
181
+ }>;
182
+ isError?: boolean;
183
+ }>;
136
184
  /** Compile the policy source; does not publish. */
137
185
  compile(source: string, opts?: {
138
186
  workflowKey?: string | null;
@@ -155,6 +203,15 @@ declare class LocalDecionisGateway {
155
203
  payload: Record<string, unknown>;
156
204
  workflowKey?: string | null;
157
205
  mode?: "shadow" | "enforce";
206
+ /**
207
+ * The exact bundle version to decide under. Always pinned by the tools:
208
+ * with a file policy and a seeded pack in the same in-memory org, "newest
209
+ * active" would otherwise be a silent substitute for the policy the
210
+ * caller named.
211
+ */
212
+ policyVersion?: string | null;
213
+ /** A policy-pack key, when the evaluation runs under a seeded pack. */
214
+ verticalPack?: string | null;
158
215
  }): Promise<EvaluateResult>;
159
216
  }
160
217
 
@@ -13,10 +13,10 @@ import {
13
13
  CopilotHookAdapter,
14
14
  LocalAgentGate,
15
15
  RemoteAgentGate
16
- } from "../chunk-MJVKY7PZ.js";
16
+ } from "../chunk-ABHNQFWI.js";
17
17
  import {
18
18
  PolicyFileRepository
19
- } from "../chunk-YVRIRS6H.js";
19
+ } from "../chunk-LIVLO4MV.js";
20
20
  export {
21
21
  AgentDecisionMapper,
22
22
  AgentGateConfigurationError,
@@ -3,7 +3,7 @@ import {
3
3
  LocalDecionisGateway,
4
4
  PolicyFileRepository,
5
5
  normalizeVerdict
6
- } from "./chunk-YVRIRS6H.js";
6
+ } from "./chunk-LIVLO4MV.js";
7
7
 
8
8
  // src/agent/AgentContracts.ts
9
9
  var AgentHookInputError = class extends Error {
@@ -498,4 +498,4 @@ export {
498
498
  AgentHostRegistry,
499
499
  AgentHookCommand
500
500
  };
501
- //# sourceMappingURL=chunk-MJVKY7PZ.js.map
501
+ //# sourceMappingURL=chunk-ABHNQFWI.js.map