@sensigo/realm-mcp 0.45.0 → 0.46.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/bin-identity.d.ts +11 -0
- package/dist/bin-identity.d.ts.map +1 -0
- package/dist/bin-identity.js +47 -0
- package/dist/bin-identity.js.map +1 -0
- package/dist/brand.d.ts +3 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +7 -0
- package/dist/brand.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/json-trace-buffer-store.d.ts +44 -31
- package/dist/json-trace-buffer-store.d.ts.map +1 -1
- package/dist/json-trace-buffer-store.js +72 -49
- package/dist/json-trace-buffer-store.js.map +1 -1
- package/dist/protocol/generator.js +2 -2
- package/dist/protocol/generator.js.map +1 -1
- package/dist/server.d.ts +13 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +30 -4
- package/dist/server.js.map +1 -1
- package/dist/test-support/declared.d.ts +2 -0
- package/dist/test-support/declared.d.ts.map +1 -0
- package/dist/test-support/declared.js +9 -0
- package/dist/test-support/declared.js.map +1 -0
- package/dist/tools/abandon-run.d.ts.map +1 -1
- package/dist/tools/abandon-run.js +2 -0
- package/dist/tools/abandon-run.js.map +1 -1
- package/dist/tools/append-trace.d.ts +2 -0
- package/dist/tools/append-trace.d.ts.map +1 -1
- package/dist/tools/append-trace.js +18 -70
- package/dist/tools/append-trace.js.map +1 -1
- package/dist/tools/assert-tool-stores.d.ts +26 -0
- package/dist/tools/assert-tool-stores.d.ts.map +1 -0
- package/dist/tools/assert-tool-stores.js +54 -0
- package/dist/tools/assert-tool-stores.js.map +1 -0
- package/dist/tools/create-workflow.d.ts.map +1 -1
- package/dist/tools/create-workflow.js +2 -0
- package/dist/tools/create-workflow.js.map +1 -1
- package/dist/tools/execute-step.d.ts.map +1 -1
- package/dist/tools/execute-step.js +15 -0
- package/dist/tools/execute-step.js.map +1 -1
- package/dist/tools/get-run-state.d.ts +27 -1
- package/dist/tools/get-run-state.d.ts.map +1 -1
- package/dist/tools/get-run-state.js +59 -2
- package/dist/tools/get-run-state.js.map +1 -1
- package/dist/tools/get-workflow-protocol.d.ts.map +1 -1
- package/dist/tools/get-workflow-protocol.js +2 -0
- package/dist/tools/get-workflow-protocol.js.map +1 -1
- package/dist/tools/list-workflows.d.ts.map +1 -1
- package/dist/tools/list-workflows.js +2 -0
- package/dist/tools/list-workflows.js.map +1 -1
- package/dist/tools/start-run-batch.d.ts.map +1 -1
- package/dist/tools/start-run-batch.js +7 -0
- package/dist/tools/start-run-batch.js.map +1 -1
- package/dist/tools/start-run.d.ts +8 -1
- package/dist/tools/start-run.d.ts.map +1 -1
- package/dist/tools/start-run.js +11 -2
- package/dist/tools/start-run.js.map +1 -1
- package/dist/tools/submit-human-response.d.ts +36 -0
- package/dist/tools/submit-human-response.d.ts.map +1 -1
- package/dist/tools/submit-human-response.js +101 -12
- package/dist/tools/submit-human-response.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +4 -4
package/dist/tools/start-run.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { validateRunParams, JsonWorkflowStore, JsonFileStore, executeChain, buildNextActions, findEligibleSteps, hashParams, WorkflowError, buildPreExecutionErrorEnvelope, unmetCapabilities, capabilityWarning, createDefaultRegistry, deriveRunPhase, } from '@sensigo/realm';
|
|
4
4
|
import { sseJsonStringify } from '../sse-json.js';
|
|
5
|
+
import { assertToolStores, markServedByTool, registryRole } from './assert-tool-stores.js';
|
|
6
|
+
import { assertRegistryLine, ExtensionRegistry as RealmExtensionRegistry } from '@sensigo/realm';
|
|
5
7
|
/** Lightweight structured telemetry. stderr is safe under the MCP stdio/SSE transport. */
|
|
6
8
|
function logDedup(fields) {
|
|
7
9
|
console.error(JSON.stringify({ event: 'idempotency_dedup', ...fields }));
|
|
@@ -13,6 +15,7 @@ const passthroughDispatcher = async () => ({});
|
|
|
13
15
|
* Creates a run and immediately chains through any leading auto steps.
|
|
14
16
|
*/
|
|
15
17
|
export async function handleStartRun(args, stores) {
|
|
18
|
+
assertToolStores(stores, 'handleStartRun');
|
|
16
19
|
const workflowStore = stores?.workflowStore ?? new JsonWorkflowStore();
|
|
17
20
|
const runStore = stores?.runStore ?? new JsonFileStore();
|
|
18
21
|
const definition = await workflowStore.get(args.workflow_id);
|
|
@@ -28,6 +31,9 @@ export async function handleStartRun(args, stores) {
|
|
|
28
31
|
const registry = stores?.registryProvider !== undefined
|
|
29
32
|
? await stores.registryProvider(definition)
|
|
30
33
|
: stores?.registry;
|
|
34
|
+
// issue #620 PR-C: the registry rule — refused only on proof (another realm version), before any
|
|
35
|
+
// write. Covers the provider's result and the construction-time registry alike.
|
|
36
|
+
assertRegistryLine(registry, registryRole(stores, 'start_run', 'handleStartRun'), RealmExtensionRegistry);
|
|
31
37
|
const { run, created } = await runStore.create({
|
|
32
38
|
workflowId: definition.id,
|
|
33
39
|
workflowVersion: definition.version,
|
|
@@ -81,6 +87,7 @@ export async function handleStartRun(args, stores) {
|
|
|
81
87
|
input: params,
|
|
82
88
|
dispatcher: passthroughDispatcher,
|
|
83
89
|
...(registry !== undefined ? { registry } : {}),
|
|
90
|
+
...(stores?.driver !== undefined ? { driver: stores.driver } : {}),
|
|
84
91
|
});
|
|
85
92
|
// Source run_phase from the final run so the spread can't drop it.
|
|
86
93
|
const finalRun = await runStore.get(run.id).catch(() => run);
|
|
@@ -127,6 +134,7 @@ export async function handleStartRun(args, stores) {
|
|
|
127
134
|
}
|
|
128
135
|
/** Registers the start_run MCP tool on the server. */
|
|
129
136
|
export function registerStartRun(server, opts) {
|
|
137
|
+
markServedByTool(opts);
|
|
130
138
|
server.tool('start_run', 'Create a new workflow run and chain through initial auto steps.', {
|
|
131
139
|
workflow_id: z.string(),
|
|
132
140
|
params: z.record(z.unknown()).optional().default({}),
|
|
@@ -136,12 +144,13 @@ export function registerStartRun(server, opts) {
|
|
|
136
144
|
}, async (args) => {
|
|
137
145
|
try {
|
|
138
146
|
const result = await handleStartRun(args, opts);
|
|
139
|
-
// Override command to 'start_run': MCP callers invoked start_run, not
|
|
140
|
-
// the first auto step that executeChain may have executed.
|
|
141
147
|
return {
|
|
142
148
|
content: [
|
|
143
149
|
{
|
|
144
150
|
type: 'text',
|
|
151
|
+
// Override command to 'start_run': MCP callers invoked start_run, not the first auto
|
|
152
|
+
// step executeChain may have run. The step a non-ok reply belongs to stays named in
|
|
153
|
+
// `stopped_step` (issue #676 review).
|
|
145
154
|
text: sseJsonStringify({ ...result, command: 'start_run' }),
|
|
146
155
|
},
|
|
147
156
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-run.js","sourceRoot":"","sources":["../../src/tools/start-run.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,
|
|
1
|
+
{"version":3,"file":"start-run.js","sourceRoot":"","sources":["../../src/tools/start-run.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,GAQf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EA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|
|
1
2
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
3
|
import { type ResponseEnvelope } from '@sensigo/realm';
|
|
3
4
|
import type { HandleRunStores } from './start-run.js';
|
|
5
|
+
/**
|
|
6
|
+
* Issue #625 (holder slice): one warning per argument this tool does not take, naming the near miss
|
|
7
|
+
* when there is one. `server.tool` strips unknown keys before the handler runs, so a misnamed
|
|
8
|
+
* `claimToken` used to vanish without a word and the answer read as "no claim_token passed".
|
|
9
|
+
*/
|
|
10
|
+
export declare function unknownKeyWarnings(args: Record<string, unknown>): string[];
|
|
11
|
+
/**
|
|
12
|
+
* The tool's input schema. Pass-through: `registerTool` hands the handler every key, where
|
|
13
|
+
* `server.tool` strips them first (the form `create_workflow` already uses and documents).
|
|
14
|
+
*
|
|
15
|
+
* `claim_token` has NO minimum length on purpose: with `.min(1)` the SDK would refuse an empty
|
|
16
|
+
* token with `MCP error -32602` and the answer would not be recorded — the damage this argument
|
|
17
|
+
* must never do. The engine judges an empty string as a wrong value (`mismatch`) and records the
|
|
18
|
+
* answer.
|
|
19
|
+
*/
|
|
20
|
+
export declare const submitHumanResponseArgsSchema: z.ZodObject<{
|
|
21
|
+
run_id: z.ZodString;
|
|
22
|
+
gate_id: z.ZodString;
|
|
23
|
+
choice: z.ZodString;
|
|
24
|
+
responded_by: z.ZodOptional<z.ZodString>;
|
|
25
|
+
claim_token: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
+
run_id: z.ZodString;
|
|
28
|
+
gate_id: z.ZodString;
|
|
29
|
+
choice: z.ZodString;
|
|
30
|
+
responded_by: z.ZodOptional<z.ZodString>;
|
|
31
|
+
claim_token: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
33
|
+
run_id: z.ZodString;
|
|
34
|
+
gate_id: z.ZodString;
|
|
35
|
+
choice: z.ZodString;
|
|
36
|
+
responded_by: z.ZodOptional<z.ZodString>;
|
|
37
|
+
claim_token: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4
39
|
/**
|
|
5
40
|
* Business logic for the submit_human_response tool.
|
|
6
41
|
* Validates the gate_id and choice, then advances the run past the gate.
|
|
@@ -10,6 +45,7 @@ export declare function handleSubmitHumanResponse(args: {
|
|
|
10
45
|
gate_id: string;
|
|
11
46
|
choice: string;
|
|
12
47
|
responded_by?: string | undefined;
|
|
48
|
+
claim_token?: string | undefined;
|
|
13
49
|
}, stores?: HandleRunStores): Promise<ResponseEnvelope>;
|
|
14
50
|
/** Registers the submit_human_response MCP tool on the server. */
|
|
15
51
|
export declare function registerSubmitHumanResponse(server: McpServer, opts?: HandleRunStores): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-human-response.d.ts","sourceRoot":"","sources":["../../src/tools/submit-human-response.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"submit-human-response.d.ts","sourceRoot":"","sources":["../../src/tools/submit-human-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EASL,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAiBtD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAS1E;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;gCAkB1B,CAAC;AAEjB;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE;IACJ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,EACD,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CA2D3B;AAED,kEAAkE;AAClE,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAiE3F"}
|
|
@@ -1,12 +1,85 @@
|
|
|
1
1
|
// submit-human-response tool — advances a gate-waiting run with a human choice.
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { JsonWorkflowStore, JsonFileStore, submitHumanResponse, WorkflowError, buildPreExecutionErrorEnvelope, getWorkflowForRun, } from '@sensigo/realm';
|
|
3
|
+
import { JsonWorkflowStore, JsonFileStore, submitHumanResponse, WorkflowError, boundStatedName, identityRefusalLine, buildPreExecutionErrorEnvelope, getWorkflowForRun, } from '@sensigo/realm';
|
|
4
4
|
import { sseJsonStringify } from '../sse-json.js';
|
|
5
|
+
import { assertToolStores, markServedByTool, registryRole } from './assert-tool-stores.js';
|
|
6
|
+
import { assertRegistryLine, ExtensionRegistry as RealmExtensionRegistry } from '@sensigo/realm';
|
|
7
|
+
/** The arguments this tool takes. Anything else is named in the reply's `warnings`, not dropped. */
|
|
8
|
+
const KNOWN_ARGS = ['run_id', 'gate_id', 'choice', 'responded_by', 'claim_token'];
|
|
9
|
+
/**
|
|
10
|
+
* Near misses for the one argument whose absence changes what a reply says. The house `closestKey`
|
|
11
|
+
* (threshold 2) cannot reach `token` or `claimToken` from `claim_token`, so the map is explicit.
|
|
12
|
+
*/
|
|
13
|
+
const NEAR_MISSES = {
|
|
14
|
+
claimToken: 'claim_token',
|
|
15
|
+
token: 'claim_token',
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Issue #625 (holder slice): one warning per argument this tool does not take, naming the near miss
|
|
19
|
+
* when there is one. `server.tool` strips unknown keys before the handler runs, so a misnamed
|
|
20
|
+
* `claimToken` used to vanish without a word and the answer read as "no claim_token passed".
|
|
21
|
+
*/
|
|
22
|
+
export function unknownKeyWarnings(args) {
|
|
23
|
+
return Object.keys(args)
|
|
24
|
+
.filter((key) => !KNOWN_ARGS.includes(key))
|
|
25
|
+
.map((key) => {
|
|
26
|
+
const near = NEAR_MISSES[key];
|
|
27
|
+
return near !== undefined
|
|
28
|
+
? `submit_human_response: unknown argument '${key}' was ignored — did you mean '${near}'?`
|
|
29
|
+
: `submit_human_response: unknown argument '${key}' was ignored.`;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The tool's input schema. Pass-through: `registerTool` hands the handler every key, where
|
|
34
|
+
* `server.tool` strips them first (the form `create_workflow` already uses and documents).
|
|
35
|
+
*
|
|
36
|
+
* `claim_token` has NO minimum length on purpose: with `.min(1)` the SDK would refuse an empty
|
|
37
|
+
* token with `MCP error -32602` and the answer would not be recorded — the damage this argument
|
|
38
|
+
* must never do. The engine judges an empty string as a wrong value (`mismatch`) and records the
|
|
39
|
+
* answer.
|
|
40
|
+
*/
|
|
41
|
+
export const submitHumanResponseArgsSchema = z
|
|
42
|
+
.object({
|
|
43
|
+
run_id: z.string(),
|
|
44
|
+
gate_id: z.string(),
|
|
45
|
+
choice: z.string(),
|
|
46
|
+
responded_by: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Who made the choice, as the caller states it — not verified. At most 200 characters, no control characters.'),
|
|
50
|
+
claim_token: z
|
|
51
|
+
.string()
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('The value from gate.claim_token on the reply that opened this question. Pass it back unchanged; it shows this answer comes from the conversation that opened the question. Never required.'),
|
|
54
|
+
})
|
|
55
|
+
.passthrough();
|
|
5
56
|
/**
|
|
6
57
|
* Business logic for the submit_human_response tool.
|
|
7
58
|
* Validates the gate_id and choice, then advances the run past the gate.
|
|
8
59
|
*/
|
|
9
60
|
export async function handleSubmitHumanResponse(args, stores) {
|
|
61
|
+
// issue #620 PR-C + the admission order (framework v1.27 §4): what the host handed in is checked
|
|
62
|
+
// first, then what this caller sent.
|
|
63
|
+
assertToolStores(stores, 'handleSubmitHumanResponse');
|
|
64
|
+
// Issue #625: `responded_by` is bounded exactly as `realm run respond --by` is — refused before
|
|
65
|
+
// anything is read or written, so nothing is recorded (#604's `responded_by` member: one helper
|
|
66
|
+
// guards both doors).
|
|
67
|
+
// The checked name (spaces at either end removed) is what is passed on and stored.
|
|
68
|
+
let respondedBy;
|
|
69
|
+
if (args.responded_by !== undefined) {
|
|
70
|
+
try {
|
|
71
|
+
respondedBy = boundStatedName(args.responded_by, 'responded_by');
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
throw new WorkflowError(identityRefusalLine('responded_by', err, 'nothing was recorded'), {
|
|
75
|
+
code: 'VALIDATION_ACTOR_INVALID',
|
|
76
|
+
category: 'VALIDATION',
|
|
77
|
+
agentAction: 'report_to_user',
|
|
78
|
+
retryable: false,
|
|
79
|
+
details: err instanceof WorkflowError ? err.details : {},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
10
83
|
const workflowStore = stores?.workflowStore ?? new JsonWorkflowStore();
|
|
11
84
|
const runStore = stores?.runStore ?? new JsonFileStore();
|
|
12
85
|
const run = await runStore.get(args.run_id);
|
|
@@ -22,32 +95,48 @@ export async function handleSubmitHumanResponse(args, stores) {
|
|
|
22
95
|
const registry = stores?.registryProvider !== undefined
|
|
23
96
|
? await stores.registryProvider(definition)
|
|
24
97
|
: stores?.registry;
|
|
98
|
+
// issue #620 PR-C: the registry rule — refused only on proof (another realm version), before any
|
|
99
|
+
// write. Covers the provider's result and the construction-time registry alike.
|
|
100
|
+
assertRegistryLine(registry, registryRole(stores, 'submit_human_response', 'handleSubmitHumanResponse'), RealmExtensionRegistry);
|
|
25
101
|
return submitHumanResponse(runStore, definition, {
|
|
26
102
|
runId: args.run_id,
|
|
27
103
|
gateId: args.gate_id,
|
|
28
104
|
choice: args.choice,
|
|
29
105
|
...(registry !== undefined ? { registry } : {}),
|
|
30
|
-
// issue #279 (increment 2, PR-D; design record D-5):
|
|
31
|
-
|
|
106
|
+
// issue #279 (increment 2, PR-D; design record D-5): stored as checked above (spaces at either
|
|
107
|
+
// end removed); never verified.
|
|
108
|
+
...(respondedBy !== undefined ? { respondedBy } : {}),
|
|
109
|
+
// issue #625: judged inside the answer's write, never a reason to refuse it.
|
|
110
|
+
...(args.claim_token !== undefined ? { claimToken: args.claim_token } : {}),
|
|
111
|
+
...(stores?.driver !== undefined ? { driver: stores.driver } : {}),
|
|
32
112
|
});
|
|
33
113
|
}
|
|
34
114
|
/** Registers the submit_human_response MCP tool on the server. */
|
|
35
115
|
export function registerSubmitHumanResponse(server, opts) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, async (
|
|
116
|
+
markServedByTool(opts);
|
|
117
|
+
// issue #625: `registerTool` with a pass-through schema — `server.tool` strips unknown keys before
|
|
118
|
+
// the handler sees them (see `create-workflow.ts`), so a misnamed `claimToken` would vanish
|
|
119
|
+
// without a word.
|
|
120
|
+
server.registerTool('submit_human_response', {
|
|
121
|
+
description: "Advance a gate-waiting run by submitting the human's choice.",
|
|
122
|
+
inputSchema: submitHumanResponseArgsSchema,
|
|
123
|
+
}, async (rawArgs) => {
|
|
124
|
+
const args = rawArgs;
|
|
44
125
|
try {
|
|
45
126
|
const result = await handleSubmitHumanResponse(args, opts);
|
|
127
|
+
const unknown = unknownKeyWarnings(args);
|
|
46
128
|
return {
|
|
47
129
|
content: [
|
|
48
130
|
{
|
|
49
131
|
type: 'text',
|
|
50
|
-
text: sseJsonStringify({
|
|
132
|
+
text: sseJsonStringify({
|
|
133
|
+
...result,
|
|
134
|
+
data: {},
|
|
135
|
+
evidence: [],
|
|
136
|
+
// An unknown argument is named FIRST: a caller that sent `claimToken` reads the
|
|
137
|
+
// did-you-mean before the reply's own "No claim_token was passed" sentence.
|
|
138
|
+
...(unknown.length > 0 ? { warnings: [...unknown, ...result.warnings] } : {}),
|
|
139
|
+
}),
|
|
51
140
|
},
|
|
52
141
|
],
|
|
53
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-human-response.js","sourceRoot":"","sources":["../../src/tools/submit-human-response.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"submit-human-response.js","sourceRoot":"","sources":["../../src/tools/submit-human-response.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,8BAA8B,EAC9B,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEjG,oGAAoG;AACpG,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,CAAU,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,GAA0D;IACzE,UAAU,EAAE,aAAa;IACzB,KAAK,E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,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensigo/realm-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"description": "MCP server for Realm
|
|
7
|
+
"description": "MCP server for Realm: lets an AI agent run Realm workflows.",
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/sensigo-hq/realm.git"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://realmengine.dev",
|
|
14
14
|
"keywords": [
|
|
15
15
|
"mcp",
|
|
16
16
|
"model-context-protocol",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
49
|
-
"@sensigo/realm": "
|
|
49
|
+
"@sensigo/realm": "0.46.0",
|
|
50
50
|
"proper-lockfile": "^4.1.2",
|
|
51
51
|
"zod": "^3.25.7"
|
|
52
52
|
},
|