@subseam/mcp 0.4.38 → 0.4.39
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/main.js +27 -8
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -30660,10 +30660,15 @@ var compileError = external_exports.object({
|
|
|
30660
30660
|
repair: external_exports.object({ hint: external_exports.string(), candidates: external_exports.array(external_exports.string()).optional() }).optional()
|
|
30661
30661
|
});
|
|
30662
30662
|
var compileErrors = external_exports.array(compileError);
|
|
30663
|
-
var
|
|
30663
|
+
var compiledBody = external_exports.discriminatedUnion("ok", [
|
|
30664
30664
|
external_exports.object({ ok: external_exports.literal(true), boundAtCommit: external_exports.string(), draft: definitionDraft.optional() }),
|
|
30665
30665
|
external_exports.object({ ok: external_exports.literal(false), errors: compileErrors })
|
|
30666
30666
|
]);
|
|
30667
|
+
var compileJobBody = external_exports.discriminatedUnion("status", [
|
|
30668
|
+
external_exports.object({ jobId: external_exports.string(), status: external_exports.literal("running"), wait: external_exports.string().optional() }),
|
|
30669
|
+
external_exports.object({ jobId: external_exports.string(), status: external_exports.literal("failed"), error: external_exports.string() })
|
|
30670
|
+
]);
|
|
30671
|
+
var compileBody = external_exports.union([compiledBody, compileJobBody]);
|
|
30667
30672
|
var sayBody = external_exports.discriminatedUnion("ok", [
|
|
30668
30673
|
external_exports.object({ ok: external_exports.literal(true), canonicalHash: external_exports.string(), deferred: external_exports.tuple([external_exports.literal("bind"), external_exports.literal("capability"), external_exports.literal("strength")]) }),
|
|
30669
30674
|
external_exports.object({ ok: external_exports.literal(false), errors: compileErrors })
|
|
@@ -30791,11 +30796,13 @@ var input2 = external_exports.object({
|
|
|
30791
30796
|
authorJobId: external_exports.string().min(1).optional(),
|
|
30792
30797
|
// Reads an admission a prior `source` call left running; takes no other arm beside it.
|
|
30793
30798
|
admitJobId: external_exports.string().min(1).optional(),
|
|
30799
|
+
// Reads a dry-run compile a prior `source` + `dry_run` call left running; takes no other arm beside it.
|
|
30800
|
+
compileJobId: external_exports.string().min(1).optional(),
|
|
30794
30801
|
gap: external_exports.object({ construct: external_exports.string().min(1), witness: external_exports.string().min(1), issue: external_exports.number().int().positive() }).optional()
|
|
30795
30802
|
});
|
|
30796
30803
|
var defineTool = {
|
|
30797
30804
|
name: "define",
|
|
30798
|
-
description: "Write a definition into this tenant's governing corpus. Pass exactly one of `source` (the SDL definition object \u2014 deterministic, no LLM) or `nlIntent` (a natural-language note: your own agent decomposes it into slices by pull \u2014 the first call answers with the task to pull, then re-issue the same call unchanged \u2014 and each slice is authored through the CEGIS loop), plus `repo` (org-qualified) and optional `commit` (defaults to resolved tip). Pass `basis` on either arm: free text citing what the definition stood on \u2014 the source doc plus its section (there is no fixed vocabulary), or `capture-note:<id>` for a captured note, which also marks that note formalized. It is required in effect with `source`; an admission that cites nothing is refused. With `nlIntent` it defaults to the note, with the slice number appended. Authoring answers within about 45 s; if it is still queued or iterating it returns a job id: call `define` again with `authorJobId` to read it. An admission of `source` answers the same way: a job id still running is read with `admitJobId`. `dry_run: true` with `source` validates against the live graph and admits NOTHING, returning per-gate errors with repair hints. `dry_run: true` with `source` and no `repo` answers only whether the language can say it (bind, capability and strength are deferred until a repo is named). `mine: {repo}` submits a whole-repo candidate mining pass instead (async \u2014 poll with `mine: {jobId}`). New versions land defaulted until approved. `gap: { construct, witness, issue }` records a construct the language cannot say yet (witness is the file:line that needed it) and admits nothing.",
|
|
30805
|
+
description: "Write a definition into this tenant's governing corpus. Pass exactly one of `source` (the SDL definition object \u2014 deterministic, no LLM) or `nlIntent` (a natural-language note: your own agent decomposes it into slices by pull \u2014 the first call answers with the task to pull, then re-issue the same call unchanged \u2014 and each slice is authored through the CEGIS loop), plus `repo` (org-qualified) and optional `commit` (defaults to resolved tip). Pass `basis` on either arm: free text citing what the definition stood on \u2014 the source doc plus its section (there is no fixed vocabulary), or `capture-note:<id>` for a captured note, which also marks that note formalized. It is required in effect with `source`; an admission that cites nothing is refused. With `nlIntent` it defaults to the note, with the slice number appended. Authoring answers within about 45 s; if it is still queued or iterating it returns a job id: call `define` again with `authorJobId` to read it. An admission of `source` answers the same way: a job id still running is read with `admitJobId`, and a `dry_run` still running with `compileJobId`. `dry_run: true` with `source` validates against the live graph and admits NOTHING, returning per-gate errors with repair hints. `dry_run: true` with `source` and no `repo` answers only whether the language can say it (bind, capability and strength are deferred until a repo is named). `mine: {repo}` submits a whole-repo candidate mining pass instead (async \u2014 poll with `mine: {jobId}`). New versions land defaulted until approved. `gap: { construct, witness, issue }` records a construct the language cannot say yet (witness is the file:line that needed it) and admits nothing.",
|
|
30799
30806
|
capability: "define",
|
|
30800
30807
|
inputSchema: input2.shape,
|
|
30801
30808
|
async handler(raw, ctx) {
|
|
@@ -30832,6 +30839,12 @@ var defineTool = {
|
|
|
30832
30839
|
}
|
|
30833
30840
|
return admitMode({ admitJobId: args2.admitJobId }, ctx);
|
|
30834
30841
|
}
|
|
30842
|
+
if (args2.compileJobId !== void 0) {
|
|
30843
|
+
if (args2.source !== void 0 || args2.nlIntent !== void 0) {
|
|
30844
|
+
return { text: "define: `compileJobId` reads a dry run already submitted and takes no `source` or `nlIntent` beside it \u2014 read the job, or submit a new dry run, not both." };
|
|
30845
|
+
}
|
|
30846
|
+
return compileMode({ compileJobId: args2.compileJobId }, ctx);
|
|
30847
|
+
}
|
|
30835
30848
|
const hasSource = args2.source !== void 0;
|
|
30836
30849
|
const hasIntent = args2.nlIntent !== void 0;
|
|
30837
30850
|
if (hasSource === hasIntent) {
|
|
@@ -30863,11 +30876,7 @@ var defineTool = {
|
|
|
30863
30876
|
}
|
|
30864
30877
|
if (args2.dry_run === true) {
|
|
30865
30878
|
const payload2 = { repo: args2.repo, source: args2.source, ...args2.commit !== void 0 ? { commit: args2.commit } : {} };
|
|
30866
|
-
|
|
30867
|
-
const body2 = readBody(compileBody, wire, "define", "define-compile");
|
|
30868
|
-
if (!body2.ok) return { text: body2.text };
|
|
30869
|
-
const result = body2.value;
|
|
30870
|
-
return { text: renderCompile(result) };
|
|
30879
|
+
return compileMode(payload2, ctx);
|
|
30871
30880
|
}
|
|
30872
30881
|
const payload = {
|
|
30873
30882
|
repo: args2.repo,
|
|
@@ -30879,6 +30888,13 @@ var defineTool = {
|
|
|
30879
30888
|
return admitMode(payload, ctx);
|
|
30880
30889
|
}
|
|
30881
30890
|
};
|
|
30891
|
+
async function compileMode(payload, ctx) {
|
|
30892
|
+
const wire = await ctx.gateway.invoke("define-compile", payload);
|
|
30893
|
+
const isJob = typeof wire === "object" && wire !== null && "status" in wire;
|
|
30894
|
+
const body2 = readBody(isJob ? compileJobBody : compiledBody, wire, "define", "define-compile");
|
|
30895
|
+
if (!body2.ok) return { text: body2.text };
|
|
30896
|
+
return { text: renderCompile(body2.value) };
|
|
30897
|
+
}
|
|
30882
30898
|
async function admitMode(payload, ctx) {
|
|
30883
30899
|
const rawAdmit = await ctx.gateway.invoke("define-admit", payload);
|
|
30884
30900
|
const isJob = typeof rawAdmit === "object" && rawAdmit !== null && "status" in rawAdmit;
|
|
@@ -30950,6 +30966,9 @@ ${r.dispatch.resumption}`;
|
|
|
30950
30966
|
return lines.join("\n");
|
|
30951
30967
|
}
|
|
30952
30968
|
function renderCompile(r) {
|
|
30969
|
+
if ("status" in r) {
|
|
30970
|
+
return r.status === "running" ? `define (dry run): compile job ${r.jobId} is still running (the gates). Call define with compileJobId: "${r.jobId}" to read it.` : `define (dry run): compile job ${r.jobId} failed: ${r.error}`;
|
|
30971
|
+
}
|
|
30953
30972
|
if (r.ok) {
|
|
30954
30973
|
const head = "define (dry run): compiles clean, bound at " + r.boundAtCommit + ". Nothing was admitted \u2014 call again without `dry_run` to admit it.";
|
|
30955
30974
|
return r.draft === void 0 ? head : `${head}
|
|
@@ -48728,7 +48747,7 @@ var workReadTools = createWorkReadToolProviders({ capability: "work" });
|
|
|
48728
48747
|
var bundledProviders = [src_default2, src_default, tension_default, ...defineTools, ...decisionTools, ...captureTools, ...buildTools, secureTool, ...workTools, ...workReadTools];
|
|
48729
48748
|
|
|
48730
48749
|
// package.json
|
|
48731
|
-
var version2 = "0.4.
|
|
48750
|
+
var version2 = "0.4.39";
|
|
48732
48751
|
|
|
48733
48752
|
// src/server.ts
|
|
48734
48753
|
var SERVER_VERSION = version2;
|