@tryaura/aura-cli 0.1.1 → 0.2.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/aura.js +4 -3
- package/dist/index.d.ts +12 -2
- package/dist/index.js +2 -2
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{plugins-DDfc7XT9.js → plugins-SZegBVXF.js} +50 -53
- package/dist/{run-ZDkvqvZb.js → run.boundary-BtMqQAEQ.js} +3377 -1135
- package/dist/{shared-link-plan-BigeLxDX.js → shared-link-plan-DVgOyqP9.js} +54 -3
- package/dist/{types-DmBu6g0d.d.ts → types--E7zqKfw.d.ts} +4 -2
- package/package.json +6 -6
- package/schema/check-output-v1.schema.json +18 -1
package/dist/bin/aura.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as OFFICIAL_REGISTRY_OPTIONS, t as OFFICIAL_PLUGINS } from "../plugins-
|
|
3
|
-
import { t as runCli } from "../run-
|
|
2
|
+
import { n as OFFICIAL_REGISTRY_OPTIONS, t as OFFICIAL_PLUGINS } from "../plugins-SZegBVXF.js";
|
|
3
|
+
import { t as runCli } from "../run.boundary-BtMqQAEQ.js";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/bin.ts
|
|
6
6
|
await runCli({
|
|
@@ -8,7 +8,8 @@ await runCli({
|
|
|
8
8
|
command: "aura",
|
|
9
9
|
description: "Agent Unification & Repair Assistant",
|
|
10
10
|
displayName: "Aura",
|
|
11
|
-
|
|
11
|
+
docsUrl: "https://tryaura.sh/docs/introduction",
|
|
12
|
+
version: "0.2.0"
|
|
12
13
|
},
|
|
13
14
|
plugins: OFFICIAL_PLUGINS,
|
|
14
15
|
registry: OFFICIAL_REGISTRY_OPTIONS
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CliRuntime, i as CliRegistryOptions, n as CliDistro, r as CliExitCode, t as CliBranding } from "./types
|
|
1
|
+
import { a as CliRuntime, i as CliRegistryOptions, n as CliDistro, r as CliExitCode, t as CliBranding } from "./types--E7zqKfw.js";
|
|
2
2
|
import { AdapterSupport, AuraConfigurationProvenance, FindingLocation, FindingPresentation, Fixability, HttpFailureReason, HttpPostRequest, HttpPostResult, JsonObject, Scope, Severity, TelemetryEvent, TelemetrySink, TelemetrySink as TelemetrySink$1 } from "@tryaura/aura-sdk";
|
|
3
3
|
//#region src/http-telemetry-sink.d.ts
|
|
4
4
|
/** A privacy-safe reason one HTTP delivery was dropped. */
|
|
@@ -93,6 +93,14 @@ interface ReportDiagnostic {
|
|
|
93
93
|
readonly path?: string | undefined;
|
|
94
94
|
readonly phase: "check" | "detect" | "files" | "fix" | "parse" | "read" | "support";
|
|
95
95
|
}
|
|
96
|
+
interface ReportRepositoryPreset {
|
|
97
|
+
readonly path: string;
|
|
98
|
+
readonly status: "applied" | "held";
|
|
99
|
+
}
|
|
100
|
+
/** Configuration state that affects how a check document should be interpreted. */
|
|
101
|
+
interface ReportConfiguration {
|
|
102
|
+
readonly repositoryPreset?: ReportRepositoryPreset | undefined;
|
|
103
|
+
}
|
|
96
104
|
type ReportStatus = "clean" | "empty" | "error" | "operational-error" | "warning";
|
|
97
105
|
interface ReportFixOperation {
|
|
98
106
|
readonly conflict?: string | undefined;
|
|
@@ -111,6 +119,7 @@ interface ReportFix {
|
|
|
111
119
|
}
|
|
112
120
|
interface CheckReportV1 {
|
|
113
121
|
readonly apps: readonly ReportApp[];
|
|
122
|
+
readonly configuration?: ReportConfiguration | undefined;
|
|
114
123
|
readonly diagnostics: readonly ReportDiagnostic[];
|
|
115
124
|
readonly findings: readonly ReportFinding[];
|
|
116
125
|
readonly fixes?: readonly ReportFix[] | undefined;
|
|
@@ -122,6 +131,7 @@ interface CheckReportV1 {
|
|
|
122
131
|
}
|
|
123
132
|
type CheckReport = CheckReportV1;
|
|
124
133
|
interface CheckExplanationV1 {
|
|
134
|
+
readonly configuration?: ReportConfiguration | undefined;
|
|
125
135
|
readonly enabled: boolean;
|
|
126
136
|
readonly explain: string;
|
|
127
137
|
readonly fixability: Fixability;
|
|
@@ -149,4 +159,4 @@ type CheckExplanation = CheckExplanationV1;
|
|
|
149
159
|
declare function runCli(distro: CliDistro, runtime?: CliRuntime): Promise<CliExitCode>;
|
|
150
160
|
declare function createHttpTelemetrySink(options: HttpTelemetrySinkOptions): TelemetrySink$1;
|
|
151
161
|
//#endregion
|
|
152
|
-
export { type CheckCounts, type CheckExplanation, type CheckExplanationV1, type CheckReport, type CheckReportV1, type CheckSummary, type CliBranding, type CliDistro, type CliExitCode, type CliRegistryOptions, type CliRuntime, type HttpTelemetryDeliveryFailure, type HttpTelemetrySinkOptions, type PassedCheck, type ReportApp, type ReportDiagnostic, type ReportFinding, type ReportFix, type ReportFixOperation, type ReportStatus, type TelemetryEvent, type TelemetrySink, createHttpTelemetrySink, runCli };
|
|
162
|
+
export { type CheckCounts, type CheckExplanation, type CheckExplanationV1, type CheckReport, type CheckReportV1, type CheckSummary, type CliBranding, type CliDistro, type CliExitCode, type CliRegistryOptions, type CliRuntime, type HttpTelemetryDeliveryFailure, type HttpTelemetrySinkOptions, type PassedCheck, type ReportApp, type ReportConfiguration, type ReportDiagnostic, type ReportFinding, type ReportFix, type ReportFixOperation, type ReportRepositoryPreset, type ReportStatus, type TelemetryEvent, type TelemetrySink, createHttpTelemetrySink, runCli };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as vetHttpUrl, n as clampHttpTimeout, r as failureReason, t as runCli } from "./run-
|
|
2
|
-
//#region ../core/src/http-post.ts
|
|
1
|
+
import { i as vetHttpUrl, n as clampHttpTimeout, r as failureReason, t as runCli } from "./run.boundary-BtMqQAEQ.js";
|
|
2
|
+
//#region ../core/src/http-post.boundary.ts
|
|
3
3
|
/**
|
|
4
4
|
* Creates a bounded, TLS-only JSON POST that never rejects.
|
|
5
5
|
*
|
package/dist/plugins/index.d.ts
CHANGED
package/dist/plugins/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as codexPlugin, i as claudeCodePlugin, n as OFFICIAL_REGISTRY_OPTIONS, o as cursorPlugin, r as checksCorePlugin, s as officialContentPlugin, t as OFFICIAL_PLUGINS } from "../plugins-
|
|
1
|
+
import { a as codexPlugin, i as claudeCodePlugin, n as OFFICIAL_REGISTRY_OPTIONS, o as cursorPlugin, r as checksCorePlugin, s as officialContentPlugin, t as OFFICIAL_PLUGINS } from "../plugins-SZegBVXF.js";
|
|
2
2
|
export { OFFICIAL_PLUGINS, OFFICIAL_REGISTRY_OPTIONS, checksCorePlugin, claudeCodePlugin, codexPlugin, cursorPlugin, officialContentPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as src_default$4, I as createAuraManifestWriteOperation, K as pluralize, S as readManagedBlock, W as SHARED_INSTRUCTIONS_TEMPLATE, _ as planSharedSkillTreeUpdate, b as reconcileManagedSnippet, c as planManifestMcpConvergence, f as isAuraOwnedSkillTarget, g as managedContentRevisionStatus, h as skillDeploymentStatus, i as planMcpSecretRemediation, l as planMcpServerRemoval, m as sharedSkillsRoot, n as canPlanMcpSecretRemediation, o as mcpConvergenceBlockers, p as planSkillDeployment, t as planSharedInstructionLink, v as reconcileParsedManagedBlock, y as diffManagedSnippet } from "./shared-link-plan-
|
|
1
|
+
import { G as src_default$4, I as createAuraManifestWriteOperation, K as pluralize, S as readManagedBlock, W as SHARED_INSTRUCTIONS_TEMPLATE, _ as planSharedSkillTreeUpdate, b as reconcileManagedSnippet, c as planManifestMcpConvergence, f as isAuraOwnedSkillTarget, g as managedContentRevisionStatus, h as skillDeploymentStatus, i as planMcpSecretRemediation, l as planMcpServerRemoval, m as sharedSkillsRoot, n as canPlanMcpSecretRemediation, o as mcpConvergenceBlockers, p as planSkillDeployment, q as displayPath, t as planSharedInstructionLink, v as reconcileParsedManagedBlock, y as diffManagedSnippet } from "./shared-link-plan-DVgOyqP9.js";
|
|
2
2
|
import { EMPTY_COLLECTION, McpWriteError, SHARED_INSTRUCTIONS_TEMPLATE_TOKEN, TIMEOUT_EXIT_CODE, collectJsonMcpServers, collectMcpServers, configStringArray, configStringRecord, defineAdapter, defineCheck, definePlugin, detectExecutable, detectLineEnding, inspectJsonMcpSecrets, isConfigRecord, isFileReference, jsonMcpEntry, jsonMcpSecretTransform, maskMarkdownCode, mcpCommandEntry, mcpEnvironmentVariableNames, mcpWriteResult, normalizeMcpServerDefinition, parseAtImports, parseConfigObject, parseInstalledSkills, parseJsonMcpConfig, redactMcpArguments, referenceTargetPath, sanitizeMcpUrl, skillDirectorySpecs, splitSourceLines, stdioTransport, writeJsonMcpServers } from "@tryaura/aura-sdk";
|
|
3
|
-
import { dirname, extname, isAbsolute, join,
|
|
3
|
+
import { dirname, extname, isAbsolute, join, resolve, sep } from "node:path";
|
|
4
4
|
import { parse, stringify } from "smol-toml";
|
|
5
5
|
import { Buffer } from "node:buffer";
|
|
6
6
|
import { parseTOML } from "toml-eslint-parser";
|
|
@@ -2454,19 +2454,15 @@ function compareParagraphs$1(left, right) {
|
|
|
2454
2454
|
//#region ../../plugins/checks-core/src/instruction-paths.ts
|
|
2455
2455
|
/** Names an instruction file the way a user can address it from the current workspace. */
|
|
2456
2456
|
function displayInstructionPath(path, model) {
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2457
|
+
return displayPath(path, {
|
|
2458
|
+
cwd: model.cwd,
|
|
2459
|
+
homeDir: model.homeDir,
|
|
2460
|
+
...model.projectRoot === void 0 ? {} : { projectRoot: model.projectRoot }
|
|
2461
|
+
});
|
|
2461
2462
|
}
|
|
2462
2463
|
function instructionLineRange(startLine, endLine) {
|
|
2463
2464
|
return startLine === endLine ? String(startLine) : `${String(startLine)}-${String(endLine)}`;
|
|
2464
2465
|
}
|
|
2465
|
-
function pathInside(root, path) {
|
|
2466
|
-
const difference = relative(root, path);
|
|
2467
|
-
if (difference.length === 0 || difference === ".." || difference.startsWith(`..${sep}`) || isAbsolute(difference)) return;
|
|
2468
|
-
return difference.split(sep).join("/");
|
|
2469
|
-
}
|
|
2470
2466
|
//#endregion
|
|
2471
2467
|
//#region ../../plugins/checks-core/src/ins-003/clusters.ts
|
|
2472
2468
|
/** Groups duplicate-pair edges into transitive connected components. */
|
|
@@ -2641,6 +2637,11 @@ const duplicateInstructionsCheck = defineCheck({
|
|
|
2641
2637
|
explain: `Repeated guidance across agent instruction files is easy to update in one place and forget in another. Similar copies also consume context repeatedly and can diverge into subtly different rules.
|
|
2642
2638
|
|
|
2643
2639
|
Review each reported cluster and keep its clearest version in the shared instruction source. Remove the redundant copies only after confirming their scopes and conditions are preserved.`,
|
|
2640
|
+
findingGroup: {
|
|
2641
|
+
description: "Keep each piece of guidance in one canonical source.",
|
|
2642
|
+
id: "checks-core/duplicate-instructions",
|
|
2643
|
+
title: "Consolidate duplicated instruction guidance"
|
|
2644
|
+
},
|
|
2644
2645
|
fixability: "manual",
|
|
2645
2646
|
id: "INS-003",
|
|
2646
2647
|
scope: "global",
|
|
@@ -4016,6 +4017,11 @@ function findingForProjectSignals(document, report, model) {
|
|
|
4016
4017
|
//#endregion
|
|
4017
4018
|
//#region ../../plugins/checks-core/src/instructions.ts
|
|
4018
4019
|
const READY = "Aura can add the missing link with check --fix.";
|
|
4020
|
+
const SHARED_INSTRUCTION_GROUP = Object.freeze({
|
|
4021
|
+
description: "Create the shared source and connect supported agent applications.",
|
|
4022
|
+
id: "checks-core/shared-instructions",
|
|
4023
|
+
title: "Complete the shared instruction setup"
|
|
4024
|
+
});
|
|
4019
4025
|
const sharedInstructionsCheck = defineCheck({
|
|
4020
4026
|
defaultSeverity: "error",
|
|
4021
4027
|
detect(model) {
|
|
@@ -4036,6 +4042,7 @@ const sharedInstructionsCheck = defineCheck({
|
|
|
4036
4042
|
explain: `A non-empty shared instruction source gives every configured agent application one canonical set of guidance. Without it, application-specific files become independent copies that drift as preferences change.
|
|
4037
4043
|
|
|
4038
4044
|
Re-run the check with \`--fix\` to create the shared source from Aura's starter template. Review the generated ~/agents/AGENTS.md, add personal guidance there, and check again.`,
|
|
4045
|
+
findingGroup: SHARED_INSTRUCTION_GROUP,
|
|
4039
4046
|
fix(_finding, model) {
|
|
4040
4047
|
const shared = model.sharedInstructions;
|
|
4041
4048
|
if (shared.problem !== void 0 || (shared.content?.trim().length ?? 0) > 0) return;
|
|
@@ -4062,6 +4069,7 @@ const sharedInstructionLinksCheck = defineCheck({
|
|
|
4062
4069
|
explain: `Each detected agent application must load the canonical shared instructions through a mechanism its adapter understands. A missing import, native copy, or symlink leaves that application working from different rules even when the shared source is correct.
|
|
4063
4070
|
|
|
4064
4071
|
Re-run the check with \`--fix\` to add the adapter-supported link without replacing unrelated instructions. Inspect the preview first, apply it, then restart the affected application if it caches instruction files.`,
|
|
4072
|
+
findingGroup: SHARED_INSTRUCTION_GROUP,
|
|
4065
4073
|
fix(finding, model) {
|
|
4066
4074
|
const app = model.apps.find((candidate) => candidate.adapterId === findingAppId(finding));
|
|
4067
4075
|
if (app === void 0) return;
|
|
@@ -4079,6 +4087,7 @@ function detectMissingLink(app, model) {
|
|
|
4079
4087
|
const sharedPath = resolve(model.sharedInstructions.path);
|
|
4080
4088
|
if (shared !== void 0 && linksToShared(app, shared, sharedPath)) return [];
|
|
4081
4089
|
const outcome = planSharedInstructionLink(app, model);
|
|
4090
|
+
if ("plan" in outcome && outcome.plan.operations.length === 0) return [];
|
|
4082
4091
|
const blocked = "blocked" in outcome;
|
|
4083
4092
|
return [{
|
|
4084
4093
|
details: blocked ? outcome.blocked : READY,
|
|
@@ -4089,10 +4098,16 @@ function detectMissingLink(app, model) {
|
|
|
4089
4098
|
metadata: { appId: app.adapterId }
|
|
4090
4099
|
}];
|
|
4091
4100
|
}
|
|
4092
|
-
/**
|
|
4101
|
+
/**
|
|
4102
|
+
* Whether the declared entry already carries a link the declared mechanism would have written.
|
|
4103
|
+
*
|
|
4104
|
+
* Target validity belongs to INS-001 and INS-006. INS-002 only owns the link's mechanism and
|
|
4105
|
+
* destination; treating a missing shared source as a missing link produces a zero-operation fix
|
|
4106
|
+
* because the planner correctly sees that the link itself is already converged.
|
|
4107
|
+
*/
|
|
4093
4108
|
function linksToShared(app, shared, sharedPath) {
|
|
4094
4109
|
const entryPath = resolve(shared.entryPath);
|
|
4095
|
-
return app.instructionFiles.some((document) => resolve(document.path) === entryPath && document.links.some((link) =>
|
|
4110
|
+
return app.instructionFiles.some((document) => resolve(document.path) === entryPath && document.links.some((link) => compatibleLink(shared.kind, link.kind) && resolve(link.targetPath) === sharedPath));
|
|
4096
4111
|
}
|
|
4097
4112
|
/** Which parsed link kinds each declared mechanism can be satisfied by. */
|
|
4098
4113
|
function compatibleLink(declared, found) {
|
|
@@ -4269,9 +4284,9 @@ function isSymlinkDocument(document, model) {
|
|
|
4269
4284
|
}
|
|
4270
4285
|
//#endregion
|
|
4271
4286
|
//#region ../../plugins/checks-core/src/mgd-001-fixes.ts
|
|
4272
|
-
const CHECK_ID$
|
|
4287
|
+
const CHECK_ID$4 = "MGD-001";
|
|
4273
4288
|
function guidedFixes$2(finding, model) {
|
|
4274
|
-
if (finding.checkId !== CHECK_ID$
|
|
4289
|
+
if (finding.checkId !== CHECK_ID$4) return [];
|
|
4275
4290
|
const kind = finding.metadata?.["kind"];
|
|
4276
4291
|
if (kind === "malformed") return [malformedMergeChoice(finding)];
|
|
4277
4292
|
if (kind === "unterminated-fence") return [unterminatedFenceChoice(finding)];
|
|
@@ -4794,6 +4809,11 @@ const unmanagedDetectedAppCheck = defineCheck({
|
|
|
4794
4809
|
defaultSeverity: "info",
|
|
4795
4810
|
detect: detectUnmanagedApps,
|
|
4796
4811
|
explain: "Aura can inspect an installed agent application without managing it. This informational check highlights detected applications that have never been accepted or ignored in the Aura manifest.\n\nRun `aura setup` to add the application, or leave it unchecked once to record that Aura should ignore it. There is no automatic fix: the decision belongs to the apps step, and this check never starts a nested command.",
|
|
4812
|
+
findingGroup: {
|
|
4813
|
+
description: "Run `aura setup` to manage them or record an ignore decision.",
|
|
4814
|
+
id: "checks-core/application-management",
|
|
4815
|
+
title: "Decide which detected applications Aura should manage"
|
|
4816
|
+
},
|
|
4797
4817
|
fixability: "manual",
|
|
4798
4818
|
id: "MGD-003",
|
|
4799
4819
|
scope: "global",
|
|
@@ -5053,36 +5073,26 @@ function inlineCredential(transport) {
|
|
|
5053
5073
|
/**
|
|
5054
5074
|
* One row per state, rather than the same three-way branch spelled out for each string.
|
|
5055
5075
|
*
|
|
5056
|
-
* The
|
|
5057
|
-
*
|
|
5058
|
-
*
|
|
5076
|
+
* The strings a state needs were previously parallel ternaries in two functions, so adding a state
|
|
5077
|
+
* meant finding all of them and nothing made them agree. Keyed by state, the compiler requires the
|
|
5078
|
+
* row and the lookups cannot drift.
|
|
5059
5079
|
*/
|
|
5060
5080
|
const CURSOR_STATE_ACTIONS = Object.freeze({
|
|
5061
5081
|
disabled: {
|
|
5062
|
-
choiceId: "enable-in-cursor",
|
|
5063
|
-
choiceLabel: "Enable in Cursor",
|
|
5064
5082
|
guidance: (name) => `Open Cursor, open MCP settings, and enable server ${name}.`,
|
|
5065
|
-
message: (name, displayName) => `MCP server ${name} is disabled in ${displayName}
|
|
5066
|
-
summary: (name) => `Enable MCP server ${name} in Cursor.`
|
|
5083
|
+
message: (name, displayName) => `MCP server ${name} is disabled in ${displayName}.`
|
|
5067
5084
|
},
|
|
5068
5085
|
error: {
|
|
5069
|
-
choiceId: "repair-in-cursor",
|
|
5070
|
-
choiceLabel: "Repair in Cursor",
|
|
5071
5086
|
guidance: (name) => `Open Cursor's MCP settings, inspect the connection error for server ${name}, and repair its configuration or service.`,
|
|
5072
|
-
message: (name, displayName) => `MCP server ${name} in ${displayName} cannot be reached because Cursor reported a connection error
|
|
5073
|
-
summary: (name) => `Repair MCP server ${name} in Cursor.`
|
|
5087
|
+
message: (name, displayName) => `MCP server ${name} in ${displayName} cannot be reached because Cursor reported a connection error.`
|
|
5074
5088
|
},
|
|
5075
5089
|
"needs-approval": {
|
|
5076
|
-
choiceId: "approve-in-cursor",
|
|
5077
|
-
choiceLabel: "Approve in Cursor",
|
|
5078
5090
|
guidance: (name) => `Open Cursor, open MCP settings, and approve server ${name}.`,
|
|
5079
|
-
message: (name, displayName) => `MCP server ${name} in ${displayName} needs approval
|
|
5080
|
-
summary: (name) => `Approve MCP server ${name} in Cursor.`
|
|
5091
|
+
message: (name, displayName) => `MCP server ${name} in ${displayName} needs approval.`
|
|
5081
5092
|
}
|
|
5082
5093
|
});
|
|
5083
5094
|
//#endregion
|
|
5084
5095
|
//#region ../../plugins/checks-core/src/mcp-003-cursor.ts
|
|
5085
|
-
const CHECK_ID$1 = "MCP-003";
|
|
5086
5096
|
/**
|
|
5087
5097
|
* Cursor runtime-state findings that are not superseded by a concrete transport failure.
|
|
5088
5098
|
*
|
|
@@ -5104,23 +5114,6 @@ function cursorMcpStateFindings(app, concretelyFailed) {
|
|
|
5104
5114
|
return state === "error" && concretelyFailed.has(mcpServerNameKey(app.adapterId, name)) ? [] : [cursorStateFinding(app, name, state)];
|
|
5105
5115
|
});
|
|
5106
5116
|
}
|
|
5107
|
-
/** Zero-operation guided action for one Cursor-owned runtime-state finding. */
|
|
5108
|
-
function cursorMcpStateChoice(finding) {
|
|
5109
|
-
if (finding.checkId !== CHECK_ID$1 || finding.metadata?.["appId"] !== "cursor" || finding.metadata?.["kind"] !== "cursor-state") return;
|
|
5110
|
-
const name = finding.metadata["serverName"];
|
|
5111
|
-
const state = finding.metadata["state"];
|
|
5112
|
-
if (typeof name !== "string" || !isActionableState(state)) return;
|
|
5113
|
-
const action = CURSOR_STATE_ACTIONS[state];
|
|
5114
|
-
return {
|
|
5115
|
-
id: action.choiceId,
|
|
5116
|
-
label: action.choiceLabel,
|
|
5117
|
-
plan: {
|
|
5118
|
-
manualSteps: [action.guidance(name), "Run `aura check` again."],
|
|
5119
|
-
operations: [],
|
|
5120
|
-
summary: action.summary(name)
|
|
5121
|
-
}
|
|
5122
|
-
};
|
|
5123
|
-
}
|
|
5124
5117
|
/** Stable identity for the name-level state Cursor reports. */
|
|
5125
5118
|
function mcpServerNameKey(appId, name) {
|
|
5126
5119
|
return `${appId}\0${name}`;
|
|
@@ -5129,6 +5122,7 @@ function cursorStateFinding(app, name, state) {
|
|
|
5129
5122
|
const action = CURSOR_STATE_ACTIONS[state];
|
|
5130
5123
|
return {
|
|
5131
5124
|
details: action.guidance(name),
|
|
5125
|
+
fixability: "manual",
|
|
5132
5126
|
id: `${app.adapterId}:${name}:cursor-${state}`,
|
|
5133
5127
|
message: action.message(name, app.displayName),
|
|
5134
5128
|
metadata: {
|
|
@@ -5150,6 +5144,7 @@ function cursorStateFinding(app, name, state) {
|
|
|
5150
5144
|
function unknownStateFinding(app, name) {
|
|
5151
5145
|
return {
|
|
5152
5146
|
details: `Run \`cursor-agent mcp list\` to see what ${app.displayName} reports for server ${name}, and check whether server ${name} is approved and enabled in its MCP settings.`,
|
|
5147
|
+
fixability: "manual",
|
|
5153
5148
|
id: `${app.adapterId}:${name}:cursor-unknown`,
|
|
5154
5149
|
message: `MCP server ${name}'s state in ${app.displayName} could not be understood.`,
|
|
5155
5150
|
metadata: {
|
|
@@ -5165,6 +5160,7 @@ function unavailableFinding(app, reason) {
|
|
|
5165
5160
|
const cause = reason === "timeout" ? "did not finish in time" : "exited unsuccessfully";
|
|
5166
5161
|
return {
|
|
5167
5162
|
details: `Run \`cursor-agent mcp list\` to see why, then re-run \`aura check\`. Approval and enablement of ${app.displayName}'s MCP servers were not checked; every other MCP check still ran.`,
|
|
5163
|
+
fixability: "manual",
|
|
5168
5164
|
id: `${app.adapterId}:cursor-state-unavailable`,
|
|
5169
5165
|
message: `${app.displayName}'s MCP server states were not read because \`cursor-agent mcp list\` ${cause}.`,
|
|
5170
5166
|
metadata: {
|
|
@@ -5175,9 +5171,6 @@ function unavailableFinding(app, reason) {
|
|
|
5175
5171
|
severity: "info"
|
|
5176
5172
|
};
|
|
5177
5173
|
}
|
|
5178
|
-
function isActionableState(value) {
|
|
5179
|
-
return value === "needs-approval" || value === "disabled" || value === "error";
|
|
5180
|
-
}
|
|
5181
5174
|
//#endregion
|
|
5182
5175
|
//#region ../../plugins/checks-core/src/mcp-003.ts
|
|
5183
5176
|
const CHECK_ID = "MCP-003";
|
|
@@ -5218,6 +5211,7 @@ function unsetEnvironmentFindings(model) {
|
|
|
5218
5211
|
const credential = catalog?.manifest.credentialEnv.find((candidate) => candidate.name === variableName);
|
|
5219
5212
|
return [{
|
|
5220
5213
|
details: credentialDetails(server.name, variableName, credential, catalog?.manifest.docsUrl),
|
|
5214
|
+
fixability: "manual",
|
|
5221
5215
|
id: `environment:${String(serverIndex)}:${variableName}`,
|
|
5222
5216
|
locations: [{ path: model.manifest.path }],
|
|
5223
5217
|
message: `MCP server ${server.name} needs environment variable ${variableName}.`,
|
|
@@ -5259,8 +5253,6 @@ function findingFor(server, probe, model) {
|
|
|
5259
5253
|
};
|
|
5260
5254
|
}
|
|
5261
5255
|
function guidedFixes$1(finding, model) {
|
|
5262
|
-
const cursorChoice = cursorMcpStateChoice(finding);
|
|
5263
|
-
if (cursorChoice !== void 0) return [cursorChoice];
|
|
5264
5256
|
const server = findingServer(finding, model);
|
|
5265
5257
|
const kind = finding.metadata?.["kind"];
|
|
5266
5258
|
if (server === void 0 || kind !== "command" && kind !== "url") return [];
|
|
@@ -5326,6 +5318,11 @@ const mcp004 = defineCheck({
|
|
|
5326
5318
|
explain: `Inline credentials in MCP configuration can leak through source control, logs, diagnostics, and copied configuration. Aura identifies credential-bearing fields without retaining their values, prefixes, or lengths.
|
|
5327
5319
|
|
|
5328
5320
|
Re-run with \`--fix --interactive\` to replace every behavior-preserving sighting in the same source file with an environment reference. Copy the current values directly from the named file before applying the rewrite; Aura never displays or stores those values outside the protected undo payload, which stays owner-only under \`~/agents/.backups\` until twenty later fixes have pushed it out of the journal. Then rotate each credential at its issuer: moving a value behind an environment reference stops it leaking again, not from wherever it has already reached.`,
|
|
5321
|
+
findingGroup: {
|
|
5322
|
+
description: "Replace inline credentials with environment-variable references.",
|
|
5323
|
+
id: "checks-core/mcp-credentials",
|
|
5324
|
+
title: "Protect credentials stored in MCP configuration"
|
|
5325
|
+
},
|
|
5329
5326
|
fix: remediation,
|
|
5330
5327
|
fixability: "guided",
|
|
5331
5328
|
guidedFixes,
|