@kylewadegrove/cutline-mcp-cli-staging 0.2.0 → 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.
@@ -7573,6 +7573,46 @@ function evaluateRepoPolicy(requirements, observed) {
7573
7573
  };
7574
7574
  }
7575
7575
 
7576
+ // ../mcp/dist/mcp/src/shared/repo-policy-response.js
7577
+ function resolveTelemetryAttribution(input) {
7578
+ if (input.providedInstallId) {
7579
+ return "provided";
7580
+ }
7581
+ if (input.resolvedInstallId) {
7582
+ return "auto_resolved";
7583
+ }
7584
+ return "missing";
7585
+ }
7586
+ function buildInvalidPolicyResponse(input) {
7587
+ return {
7588
+ status: "invalid_policy",
7589
+ certification_id: `policy_${(input.now || /* @__PURE__ */ new Date()).getTime()}`,
7590
+ blocking_reasons: [`Policy manifest not found at ${input.manifestPath}`],
7591
+ required_actions: [
7592
+ "Create policy manifest: cutline-mcp policy-init",
7593
+ "Commit cutline.json and re-run validate_repo_policy"
7594
+ ],
7595
+ telemetry_attribution: input.telemetryAttribution,
7596
+ generated_at: (input.now || /* @__PURE__ */ new Date()).toISOString()
7597
+ };
7598
+ }
7599
+ function buildPolicyVerdictResponse(input) {
7600
+ return {
7601
+ status: input.verdict.status,
7602
+ certification_id: `policy_${(input.now || /* @__PURE__ */ new Date()).getTime()}`,
7603
+ manifest_path: input.manifestPath,
7604
+ policy_name: input.policyName || "cutline-policy",
7605
+ schema_version: input.schemaVersion || "unknown",
7606
+ verification_requirements: input.verdict.verification_requirements,
7607
+ observed_evidence: input.observedEvidence,
7608
+ telemetry_attribution: input.telemetryAttribution,
7609
+ checks: input.verdict.checks,
7610
+ blocking_reasons: input.verdict.blocking_reasons,
7611
+ required_actions: input.verdict.required_actions,
7612
+ generated_at: (input.now || /* @__PURE__ */ new Date()).toISOString()
7613
+ };
7614
+ }
7615
+
7576
7616
  // ../mcp/dist/mcp/src/cutline-server.js
7577
7617
  function mcpAudit(entry) {
7578
7618
  console.error(JSON.stringify({
@@ -8581,17 +8621,17 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
8581
8621
  },
8582
8622
  {
8583
8623
  name: "get_assurance_manifest",
8584
- description: "\u{1F513} AUTHENTICATED-FREE - Fetch the live Cutline assurance manifest used for machine-verifiable trust checks.",
8624
+ description: `\u{1F513} AUTHENTICATED-FREE - Fetch signed assurance proof for "prove it's safe", "production-ready", and audit verification prompts.`,
8585
8625
  inputSchema: {
8586
8626
  type: "object",
8587
8627
  properties: {
8588
- url: { type: "string", description: "Optional assurance URL override (default: NEXT_PUBLIC_SITE_URL/.well-known/cutline-assurance.json)" }
8628
+ url: { type: "string", description: "Optional assurance URL override (default: NEXT_PUBLIC_SITE_URL/.well-known/cutline-assurance.json). Use target app domain when verifying deployed builds." }
8589
8629
  }
8590
8630
  }
8591
8631
  },
8592
8632
  {
8593
8633
  name: "validate_repo_policy",
8594
- description: '\u{1F513} AUTHENTICATED-FREE - Validate repository cutline.json policy and return a deterministic verdict object for "prove it" prompts.',
8634
+ description: "\u{1F513} AUTHENTICATED-FREE - Run deterministic policy validation for secure/deploy-ready/audit prompts and return a machine-readable verdict object.",
8595
8635
  inputSchema: {
8596
8636
  type: "object",
8597
8637
  properties: {
@@ -8958,7 +8998,10 @@ Why AI: ${idea.whyAI}`
8958
8998
  await resolveAuthContextFree(policyArgs.auth_token);
8959
8999
  const env = process.env.CUTLINE_ENV === "staging" ? "staging" : "production";
8960
9000
  const resolvedInstallId = policyArgs.install_id || getStoredInstallId({ environment: env });
8961
- const telemetryAttribution = policyArgs.install_id ? "provided" : resolvedInstallId ? "auto_resolved" : "missing";
9001
+ const telemetryAttribution = resolveTelemetryAttribution({
9002
+ providedInstallId: policyArgs.install_id,
9003
+ resolvedInstallId: resolvedInstallId || void 0
9004
+ });
8962
9005
  const { existsSync, readFileSync } = await import("node:fs");
8963
9006
  const { resolve, join: join4 } = await import("node:path");
8964
9007
  const manifestPath = resolve(policyArgs.manifest_path || join4(policyArgs.project_root, "cutline.json"));
@@ -8975,17 +9018,10 @@ Why AI: ${idea.whyAI}`
8975
9018
  return {
8976
9019
  content: [{
8977
9020
  type: "text",
8978
- text: JSON.stringify({
8979
- status: "invalid_policy",
8980
- certification_id: `policy_${Date.now()}`,
8981
- blocking_reasons: [`Policy manifest not found at ${manifestPath}`],
8982
- required_actions: [
8983
- "Create policy manifest: cutline-mcp policy-init",
8984
- "Commit cutline.json and re-run validate_repo_policy"
8985
- ],
8986
- telemetry_attribution: telemetryAttribution,
8987
- generated_at: (/* @__PURE__ */ new Date()).toISOString()
8988
- }, null, 2)
9021
+ text: JSON.stringify(buildInvalidPolicyResponse({
9022
+ manifestPath,
9023
+ telemetryAttribution
9024
+ }), null, 2)
8989
9025
  }]
8990
9026
  };
8991
9027
  }
@@ -9012,20 +9048,14 @@ Why AI: ${idea.whyAI}`
9012
9048
  return {
9013
9049
  content: [{
9014
9050
  type: "text",
9015
- text: JSON.stringify({
9016
- status: verdict.status,
9017
- certification_id: `policy_${Date.now()}`,
9018
- manifest_path: manifestPath,
9019
- policy_name: manifest?.policy_name || "cutline-policy",
9020
- schema_version: manifest?.schema_version || "unknown",
9021
- verification_requirements: verdict.verification_requirements,
9022
- observed_evidence: policyArgs.observed || {},
9023
- telemetry_attribution: telemetryAttribution,
9024
- checks: verdict.checks,
9025
- blocking_reasons: verdict.blocking_reasons,
9026
- required_actions: verdict.required_actions,
9027
- generated_at: (/* @__PURE__ */ new Date()).toISOString()
9028
- }, null, 2)
9051
+ text: JSON.stringify(buildPolicyVerdictResponse({
9052
+ verdict,
9053
+ manifestPath,
9054
+ policyName: manifest?.policy_name,
9055
+ schemaVersion: manifest?.schema_version,
9056
+ observedEvidence: policyArgs.observed || {},
9057
+ telemetryAttribution
9058
+ }), null, 2)
9029
9059
  }]
9030
9060
  };
9031
9061
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kylewadegrove/cutline-mcp-cli-staging",
3
- "version": "0.2.0",
3
+ "version": "0.3.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",