@vibekiln/cutline-mcp-cli 0.12.0 → 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/servers/cutline-server.js +56 -26
- package/package.json +1 -1
|
@@ -7490,6 +7490,46 @@ function evaluateRepoPolicy(requirements, observed) {
|
|
|
7490
7490
|
};
|
|
7491
7491
|
}
|
|
7492
7492
|
|
|
7493
|
+
// ../mcp/dist/mcp/src/shared/repo-policy-response.js
|
|
7494
|
+
function resolveTelemetryAttribution(input) {
|
|
7495
|
+
if (input.providedInstallId) {
|
|
7496
|
+
return "provided";
|
|
7497
|
+
}
|
|
7498
|
+
if (input.resolvedInstallId) {
|
|
7499
|
+
return "auto_resolved";
|
|
7500
|
+
}
|
|
7501
|
+
return "missing";
|
|
7502
|
+
}
|
|
7503
|
+
function buildInvalidPolicyResponse(input) {
|
|
7504
|
+
return {
|
|
7505
|
+
status: "invalid_policy",
|
|
7506
|
+
certification_id: `policy_${(input.now || /* @__PURE__ */ new Date()).getTime()}`,
|
|
7507
|
+
blocking_reasons: [`Policy manifest not found at ${input.manifestPath}`],
|
|
7508
|
+
required_actions: [
|
|
7509
|
+
"Create policy manifest: cutline-mcp policy-init",
|
|
7510
|
+
"Commit cutline.json and re-run validate_repo_policy"
|
|
7511
|
+
],
|
|
7512
|
+
telemetry_attribution: input.telemetryAttribution,
|
|
7513
|
+
generated_at: (input.now || /* @__PURE__ */ new Date()).toISOString()
|
|
7514
|
+
};
|
|
7515
|
+
}
|
|
7516
|
+
function buildPolicyVerdictResponse(input) {
|
|
7517
|
+
return {
|
|
7518
|
+
status: input.verdict.status,
|
|
7519
|
+
certification_id: `policy_${(input.now || /* @__PURE__ */ new Date()).getTime()}`,
|
|
7520
|
+
manifest_path: input.manifestPath,
|
|
7521
|
+
policy_name: input.policyName || "cutline-policy",
|
|
7522
|
+
schema_version: input.schemaVersion || "unknown",
|
|
7523
|
+
verification_requirements: input.verdict.verification_requirements,
|
|
7524
|
+
observed_evidence: input.observedEvidence,
|
|
7525
|
+
telemetry_attribution: input.telemetryAttribution,
|
|
7526
|
+
checks: input.verdict.checks,
|
|
7527
|
+
blocking_reasons: input.verdict.blocking_reasons,
|
|
7528
|
+
required_actions: input.verdict.required_actions,
|
|
7529
|
+
generated_at: (input.now || /* @__PURE__ */ new Date()).toISOString()
|
|
7530
|
+
};
|
|
7531
|
+
}
|
|
7532
|
+
|
|
7493
7533
|
// ../mcp/dist/mcp/src/shared/discovery-intent.js
|
|
7494
7534
|
var TESTING_INTENT_REGEX = /\b(test|tests|testing|vitest|jest|coverage|unit test|integration test|e2e|spec file|assertion)\b/i;
|
|
7495
7535
|
var TOKEN_INTENT_PATTERNS = [
|
|
@@ -9007,7 +9047,10 @@ Why AI: ${idea.whyAI}`
|
|
|
9007
9047
|
await resolveAuthContextFree(policyArgs.auth_token);
|
|
9008
9048
|
const env = process.env.CUTLINE_ENV === "staging" ? "staging" : "production";
|
|
9009
9049
|
const resolvedInstallId = policyArgs.install_id || getStoredInstallId({ environment: env });
|
|
9010
|
-
const telemetryAttribution =
|
|
9050
|
+
const telemetryAttribution = resolveTelemetryAttribution({
|
|
9051
|
+
providedInstallId: policyArgs.install_id,
|
|
9052
|
+
resolvedInstallId: resolvedInstallId || void 0
|
|
9053
|
+
});
|
|
9011
9054
|
const { existsSync, readFileSync } = await import("node:fs");
|
|
9012
9055
|
const { resolve, join: join4 } = await import("node:path");
|
|
9013
9056
|
const manifestPath = resolve(policyArgs.manifest_path || join4(policyArgs.project_root, "cutline.json"));
|
|
@@ -9024,17 +9067,10 @@ Why AI: ${idea.whyAI}`
|
|
|
9024
9067
|
return {
|
|
9025
9068
|
content: [{
|
|
9026
9069
|
type: "text",
|
|
9027
|
-
text: JSON.stringify({
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
required_actions: [
|
|
9032
|
-
"Create policy manifest: cutline-mcp policy-init",
|
|
9033
|
-
"Commit cutline.json and re-run validate_repo_policy"
|
|
9034
|
-
],
|
|
9035
|
-
telemetry_attribution: telemetryAttribution,
|
|
9036
|
-
generated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
9037
|
-
}, null, 2)
|
|
9070
|
+
text: JSON.stringify(buildInvalidPolicyResponse({
|
|
9071
|
+
manifestPath,
|
|
9072
|
+
telemetryAttribution
|
|
9073
|
+
}), null, 2)
|
|
9038
9074
|
}]
|
|
9039
9075
|
};
|
|
9040
9076
|
}
|
|
@@ -9061,20 +9097,14 @@ Why AI: ${idea.whyAI}`
|
|
|
9061
9097
|
return {
|
|
9062
9098
|
content: [{
|
|
9063
9099
|
type: "text",
|
|
9064
|
-
text: JSON.stringify({
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
telemetry_attribution: telemetryAttribution,
|
|
9073
|
-
checks: verdict.checks,
|
|
9074
|
-
blocking_reasons: verdict.blocking_reasons,
|
|
9075
|
-
required_actions: verdict.required_actions,
|
|
9076
|
-
generated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
9077
|
-
}, null, 2)
|
|
9100
|
+
text: JSON.stringify(buildPolicyVerdictResponse({
|
|
9101
|
+
verdict,
|
|
9102
|
+
manifestPath,
|
|
9103
|
+
policyName: manifest?.policy_name,
|
|
9104
|
+
schemaVersion: manifest?.schema_version,
|
|
9105
|
+
observedEvidence: policyArgs.observed || {},
|
|
9106
|
+
telemetryAttribution
|
|
9107
|
+
}), null, 2)
|
|
9078
9108
|
}]
|
|
9079
9109
|
};
|
|
9080
9110
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibekiln/cutline-mcp-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "CLI and MCP servers for Cutline — authenticate, then run constraint-aware MCP servers in Cursor or any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|