semantic-js-mcp 0.10.2 → 0.10.4

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.
@@ -4,22 +4,15 @@ The package manifest defines an explicit public file allowlist and exposes the `
4
4
 
5
5
  ## Codex
6
6
 
7
- ```bash
8
- codex plugin marketplace add elnonathan/semantic-js-mcp
9
- codex plugin add semantic-js-mcp@elnonathan
10
- ```
11
-
12
- The marketplace entry pins a concrete npm package version. Codex CLI 0.144.4 is the minimum verified client for npm-backed marketplace installation. A release updates the package version, plugin manifest, and marketplace entry together.
13
-
14
- For an existing marketplace installation, refresh its local snapshot before reinstalling the plugin:
15
-
16
- ```bash
17
- codex plugin marketplace upgrade elnonathan
18
- codex plugin add semantic-js-mcp@elnonathan
19
- codex plugin list
20
- ```
7
+ The marketplace entry pins a concrete npm package version. Codex CLI 0.144.4
8
+ is the minimum verified client for npm-backed marketplace installation. A
9
+ release updates the package version, plugin manifest, and marketplace entry
10
+ together.
21
11
 
22
- `plugin add` reinstalls the plugin selected by the refreshed marketplace. Start a new Codex session after the listed version matches the release being installed.
12
+ Follow [Install With Codex](../SETUP.md#install-with-codex) for installation or
13
+ update commands, version checks, restart handling, and tool verification. This
14
+ document describes the distribution contract and does not define a second
15
+ setup procedure.
23
16
 
24
17
  ## Executable
25
18
 
@@ -85,7 +78,7 @@ The `publish.yml` workflow publishes tags matching `v*` from a GitHub-hosted Nod
85
78
 
86
79
  Configure the npm trusted publisher for GitHub user `elnonathan`, repository `semantic-js-mcp`, workflow filename `publish.yml`, and environment `npm-publish`. Allow `npm publish` only. In package publishing access, require two-factor authentication and disallow tokens.
87
80
 
88
- Create and push the matching `v<version>` tag only after the release commit is on `main` and its CI matrix passes. Approve the protected environment deployment, verify the published package, and then create the matching GitHub release.
81
+ Create and push the matching `v<version>` tag only after the release commit is on `main` and its CI matrix passes. If the protected environment requires review, approve the waiting deployment. Verify the published package before creating the matching GitHub release.
89
82
 
90
83
  ## Continuous Integration
91
84
 
@@ -56,15 +56,25 @@ Inspect the unresolved candidates and relevant source before making a coverage c
56
56
 
57
57
  ```yaml
58
58
  result:
59
+ diagnosticUse:
60
+ currentDocumentDiagnosticsAvailable: false
61
+ unconfirmedDiagnosticReportAvailable: false
62
+ usableAsCurrentDocumentDiagnosticEvidence: false
63
+ guidance: Current-document diagnostics are unavailable. Do not interpret this as a clean file. Run applicable repository-native typecheck, compile, or focused test commands.
59
64
  evidence:
60
65
  status: untrusted
61
66
  reason: language-server-did-not-report-current-document
62
67
  diagnosticsForCurrentDocument: null
68
+ unconfirmedDiagnosticReport:
69
+ reportReceived: false
63
70
  collection:
64
71
  status: partial
65
72
  ```
66
73
 
67
- An empty unconfirmed report is not a clean diagnostic result.
74
+ When `usableAsCurrentDocumentDiagnosticEvidence` is false, use any unconfirmed
75
+ items only as context. Run the repository's applicable typecheck, compile, or
76
+ focused test commands before making a validation claim. An empty or unavailable
77
+ unconfirmed report is not a clean diagnostic result.
68
78
 
69
79
  ### Startup Failure
70
80
 
@@ -0,0 +1,26 @@
1
+ import {DIAGNOSTIC_GUIDANCE, DIAGNOSTIC_RESULT_FIELD} from "../protocol.mjs";
2
+
3
+ export function diagnosticUseSummary({versionConfirmed, reportReceived}) {
4
+ if (versionConfirmed) {
5
+ return {
6
+ [DIAGNOSTIC_RESULT_FIELD.CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE]: true,
7
+ [DIAGNOSTIC_RESULT_FIELD.UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE]: false,
8
+ [DIAGNOSTIC_RESULT_FIELD.USABLE_AS_CURRENT_DOCUMENT_DIAGNOSTIC_EVIDENCE]: true,
9
+ [DIAGNOSTIC_RESULT_FIELD.GUIDANCE]: DIAGNOSTIC_GUIDANCE.CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE,
10
+ };
11
+ }
12
+ if (reportReceived) {
13
+ return {
14
+ [DIAGNOSTIC_RESULT_FIELD.CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE]: false,
15
+ [DIAGNOSTIC_RESULT_FIELD.UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE]: true,
16
+ [DIAGNOSTIC_RESULT_FIELD.USABLE_AS_CURRENT_DOCUMENT_DIAGNOSTIC_EVIDENCE]: false,
17
+ [DIAGNOSTIC_RESULT_FIELD.GUIDANCE]: DIAGNOSTIC_GUIDANCE.UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE,
18
+ };
19
+ }
20
+ return {
21
+ [DIAGNOSTIC_RESULT_FIELD.CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE]: false,
22
+ [DIAGNOSTIC_RESULT_FIELD.UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE]: false,
23
+ [DIAGNOSTIC_RESULT_FIELD.USABLE_AS_CURRENT_DOCUMENT_DIAGNOSTIC_EVIDENCE]: false,
24
+ [DIAGNOSTIC_RESULT_FIELD.GUIDANCE]: DIAGNOSTIC_GUIDANCE.CURRENT_DOCUMENT_DIAGNOSTICS_UNAVAILABLE,
25
+ };
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-js-mcp",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "Semantic understanding of JavaScript codebases for AI agents",
5
5
  "keywords": [
6
6
  "mcp",
@@ -28,7 +28,7 @@
28
28
  ".codex-plugin/",
29
29
  ".mcp.json",
30
30
  ".prettierrc.json",
31
- "AGENT_SETUP.md",
31
+ "SETUP.md",
32
32
  "CHANGELOG.md",
33
33
  "CONTRIBUTING.md",
34
34
  "ROADMAP.md",
@@ -45,7 +45,7 @@
45
45
  "node": ">=22"
46
46
  },
47
47
  "scripts": {
48
- "check": "npm run format:check && node --check protocol.mjs && node --check server.mjs && node --check cli.mjs && node --check lib/runtime.mjs && node --check lib/doctor.mjs && node --check lib/semantic-evidence.mjs && node --check lib/pending-requests.mjs && node --check lib/stable-collection.mjs && node --check scripts/generate-protocol-reference.mjs && node --check scripts/check-protocol-literals.mjs && node --check scripts/check-runtime.mjs && node --check scripts/documentation-contract.mjs && node --check scripts/documentation-gate.mjs && node --check scripts/documentation-gate-smoke.mjs && node --check scripts/semantic-js-mcp-ci.mjs && node --check scripts/ci-smoke.mjs && node --check scripts/publish-workflow-smoke.mjs && node --check scripts/negative-verification-smoke.mjs && node --check scripts/doctor-smoke.mjs && node --check scripts/smoke.mjs && node --check scripts/vue-smoke.mjs && node --check scripts/lifecycle-smoke.mjs && node --check scripts/lifecycle-memory-contract.mjs && node --check scripts/lifecycle-memory-observer.mjs && node --check scripts/lifecycle-memory-benchmark.mjs && node --check scripts/benchmark.mjs && node --check scripts/distribution-policy.mjs && node --check scripts/distribution-smoke.mjs && node --check scripts/release-contract.mjs && node --check scripts/release-verify.mjs && node --check scripts/release-smoke.mjs && node --check scripts/postpublication-smoke.mjs && node --check scripts/codex-plugin-verification.mjs && node --check scripts/agent-evaluation-contract.mjs && node --check scripts/agent-evaluation.mjs && node --check scripts/agent-evaluation-smoke.mjs && node --check scripts/repository-matrix-contract.mjs && node --check scripts/repository-matrix.mjs && node --check scripts/repository-matrix-smoke.mjs && node scripts/generate-protocol-reference.mjs --check && node scripts/check-protocol-literals.mjs && node scripts/documentation-gate-smoke.mjs",
48
+ "check": "npm run format:check && node --check protocol.mjs && node --check server.mjs && node --check cli.mjs && node --check lib/runtime.mjs && node --check lib/doctor.mjs && node --check lib/diagnostic-evidence.mjs && node --check lib/semantic-evidence.mjs && node --check lib/pending-requests.mjs && node --check lib/stable-collection.mjs && node --check scripts/generate-protocol-reference.mjs && node --check scripts/check-protocol-literals.mjs && node --check scripts/check-runtime.mjs && node --check scripts/documentation-contract.mjs && node --check scripts/documentation-gate.mjs && node --check scripts/documentation-gate-smoke.mjs && node --check scripts/semantic-js-mcp-ci.mjs && node --check scripts/ci-smoke.mjs && node --check scripts/publish-workflow-smoke.mjs && node --check scripts/negative-verification-smoke.mjs && node --check scripts/doctor-smoke.mjs && node --check scripts/smoke.mjs && node --check scripts/vue-smoke.mjs && node --check scripts/lifecycle-smoke.mjs && node --check scripts/lifecycle-memory-contract.mjs && node --check scripts/lifecycle-memory-observer.mjs && node --check scripts/lifecycle-memory-benchmark.mjs && node --check scripts/benchmark.mjs && node --check scripts/distribution-policy.mjs && node --check scripts/distribution-smoke.mjs && node --check scripts/release-contract.mjs && node --check scripts/release-verify.mjs && node --check scripts/release-smoke.mjs && node --check scripts/postpublication-smoke.mjs && node --check scripts/codex-plugin-verification.mjs && node --check scripts/agent-evaluation-contract.mjs && node --check scripts/agent-evaluation.mjs && node --check scripts/agent-evaluation-smoke.mjs && node --check scripts/repository-matrix-contract.mjs && node --check scripts/repository-matrix.mjs && node --check scripts/repository-matrix-smoke.mjs && node scripts/generate-protocol-reference.mjs --check && node scripts/check-protocol-literals.mjs && node scripts/documentation-gate-smoke.mjs",
49
49
  "check:runtime": "node scripts/check-runtime.mjs",
50
50
  "check:documentation": "node scripts/documentation-gate.mjs",
51
51
  "doctor": "node cli.mjs doctor",
@@ -67,8 +67,8 @@
67
67
  "verify:published": "node scripts/postpublication-smoke.mjs",
68
68
  "benchmark": "node scripts/benchmark.mjs",
69
69
  "benchmark:lifecycle-memory": "node scripts/lifecycle-memory-benchmark.mjs",
70
- "format": "prettier --write \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".github/**/*.yml\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\"",
71
- "format:check": "prettier --check \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".github/**/*.yml\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\""
70
+ "format": "prettier --write \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".github/**/*.yml\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"SETUP.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\"",
71
+ "format:check": "prettier --check \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".github/**/*.yml\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"SETUP.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\""
72
72
  },
73
73
  "dependencies": {
74
74
  "@modelcontextprotocol/sdk": "1.27.1",
package/protocol.mjs CHANGED
@@ -205,7 +205,7 @@ export const TOOL_DESCRIPTION = Object.freeze({
205
205
  [TOOL.DEFINITION]: `Resolves definitions for one source position. Use ${TOOL.HOVER} for type information or ${TOOL.COUNT_REFERENCES} for impact scope.`,
206
206
  [TOOL.HOVER]: `Returns inferred type information and documentation for one source position. Use ${TOOL.DEFINITION} for declaration identity.`,
207
207
  [TOOL.DIAGNOSTICS]:
208
- "Returns diagnostics for one file and marks evidence untrusted when the current document snapshot cannot be confirmed.",
208
+ "Returns diagnostics for one file, separates unconfirmed context, and states whether the result is usable as current-document diagnostic evidence.",
209
209
  [TOOL.COUNT_TEXT_MATCHES]: `Counts exact identifier text matches without semantic verification. Use ${TOOL.COUNT_NAMED_SYMBOL} or ${TOOL.AUDIT_NAMED_SYMBOL} to verify identity.`,
210
210
  [TOOL.COUNT_NAMED_SYMBOL]: `Returns exact-definition and verified-reference counts plus explicit semantic follow-up status for a symbol name. Use ${TOOL.AUDIT_NAMED_SYMBOL} for identity, signature, or file-hint binding verification and ${TOOL.REFERENCE_PAGE} with a returned referenceSetId for locations.`,
211
211
  [TOOL.COUNT_REFERENCES]: `Returns verified-reference counts for the symbol at one source position. Use ${TOOL.AUDIT_SYMBOL} for identity and signature or ${TOOL.REFERENCE_PAGE} with the returned referenceSetId for locations.`,
@@ -301,6 +301,26 @@ export const DIAGNOSTIC_EVIDENCE_REASON = Object.freeze({
301
301
  LANGUAGE_SERVER_DID_NOT_REPORT_CURRENT_DOCUMENT: "language-server-did-not-report-current-document",
302
302
  });
303
303
 
304
+ export const DIAGNOSTIC_RESULT_FIELD = Object.freeze({
305
+ DIAGNOSTIC_USE: "diagnosticUse",
306
+ DIAGNOSTICS_FOR_CURRENT_DOCUMENT: "diagnosticsForCurrentDocument",
307
+ UNCONFIRMED_DIAGNOSTIC_REPORT: "unconfirmedDiagnosticReport",
308
+ REPORT_RECEIVED: "reportReceived",
309
+ CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE: "currentDocumentDiagnosticsAvailable",
310
+ UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE: "unconfirmedDiagnosticReportAvailable",
311
+ USABLE_AS_CURRENT_DOCUMENT_DIAGNOSTIC_EVIDENCE: "usableAsCurrentDocumentDiagnosticEvidence",
312
+ GUIDANCE: "guidance",
313
+ });
314
+
315
+ export const DIAGNOSTIC_GUIDANCE = Object.freeze({
316
+ CURRENT_DOCUMENT_DIAGNOSTICS_AVAILABLE:
317
+ "Use these as current-document diagnostic evidence, not proof of correctness. Run applicable repository-native checks before claiming correctness.",
318
+ UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE:
319
+ "Treat the unconfirmed report as context only. It is not current-document, compile, or type validation. Run applicable repository-native typecheck, compile, or focused test commands.",
320
+ CURRENT_DOCUMENT_DIAGNOSTICS_UNAVAILABLE:
321
+ "Current-document diagnostics are unavailable. Do not interpret this as a clean file. Run applicable repository-native typecheck, compile, or focused test commands.",
322
+ });
323
+
304
324
  export const CONTENT_FRESHNESS = Object.freeze({
305
325
  VERIFIED_CURRENT: "verified-current-file-content",
306
326
  VERIFIED_REPOSITORY_SOURCE_INVENTORY: "verified-current-repository-source-inventory",
@@ -408,7 +428,7 @@ export const RESULT_SCHEMA = Object.freeze({
408
428
  VERSION: 7,
409
429
  });
410
430
 
411
- export const SERVER_VERSION = "0.10.2";
431
+ export const SERVER_VERSION = "0.10.4";
412
432
 
413
433
  export const REQUIRED_RUNTIME_COMPONENT = Object.freeze({
414
434
  TYPESCRIPT_LANGUAGE_SERVER: "typescript-language-server/lib/cli.mjs",
@@ -20,9 +20,11 @@ import {
20
20
  DEFINITION_SELECTION_STATUS,
21
21
  DIAGNOSTIC_EVIDENCE_REASON,
22
22
  DIAGNOSTIC_FRESHNESS,
23
+ DIAGNOSTIC_GUIDANCE,
23
24
  DIAGNOSTIC_LANGUAGE,
24
25
  DIAGNOSTIC_PROVIDER,
25
26
  DIAGNOSTIC_REGION,
27
+ DIAGNOSTIC_RESULT_FIELD,
26
28
  DIAGNOSTIC_SEVERITY,
27
29
  DOCTOR_CHECK,
28
30
  DOCTOR_DISTRIBUTION_ACCEPTED_STATUS,
@@ -67,7 +69,7 @@ import {
67
69
  } from "../protocol.mjs";
68
70
 
69
71
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
70
- const runtimeSourceFiles = ["server.mjs", "cli.mjs", "lib/runtime.mjs", "lib/doctor.mjs"];
72
+ const runtimeSourceFiles = ["server.mjs", "cli.mjs", "lib/runtime.mjs", "lib/doctor.mjs", "lib/diagnostic-evidence.mjs"];
71
73
  const runtimeSources = await Promise.all(
72
74
  runtimeSourceFiles.map(async (file) => ({
73
75
  file,
@@ -102,6 +104,8 @@ const groups = [
102
104
  DIAGNOSTIC_LANGUAGE,
103
105
  DIAGNOSTIC_SEVERITY,
104
106
  DIAGNOSTIC_EVIDENCE_REASON,
107
+ DIAGNOSTIC_RESULT_FIELD,
108
+ DIAGNOSTIC_GUIDANCE,
105
109
  EVIDENCE_STATUS,
106
110
  CONTENT_FRESHNESS,
107
111
  ERROR_CODE,
@@ -2,7 +2,7 @@ export const REQUIRED_PACKAGE_FILE = Object.freeze({
2
2
  PACKAGE_MANIFEST: "package.json",
3
3
  PRETTIER_CONFIGURATION: ".prettierrc.json",
4
4
  README: "README.md",
5
- AGENT_SETUP: "AGENT_SETUP.md",
5
+ SETUP: "SETUP.md",
6
6
  LICENSE: "LICENSE",
7
7
  CLI: "cli.mjs",
8
8
  SERVER: "server.mjs",
@@ -1,8 +1,9 @@
1
- import {DOCTOR_REASON, SEMANTIC_EVIDENCE_FOLLOW_UP_REASON} from "../protocol.mjs";
1
+ import {DIAGNOSTIC_GUIDANCE, DIAGNOSTIC_RESULT_FIELD, DOCTOR_REASON, SEMANTIC_EVIDENCE_FOLLOW_UP_REASON} from "../protocol.mjs";
2
2
 
3
3
  export const DOCUMENTATION_FILE = Object.freeze({
4
4
  README: "README.md",
5
- AGENT_SETUP: "AGENT_SETUP.md",
5
+ SETUP: "SETUP.md",
6
+ DISTRIBUTION: "docs/distribution.md",
6
7
  GETTING_STARTED: "docs/getting-started.md",
7
8
  SEMANTIC_NAVIGATION_SKILL: "skills/semantic-navigation/SKILL.md",
8
9
  CONTRIBUTING: "CONTRIBUTING.md",
@@ -10,26 +11,36 @@ export const DOCUMENTATION_FILE = Object.freeze({
10
11
  });
11
12
 
12
13
  export const PUBLIC_ROOT_DOCUMENT = Object.freeze([
13
- "AGENT_SETUP.md",
14
14
  "CHANGELOG.md",
15
15
  "CONTRIBUTING.md",
16
16
  "README.md",
17
17
  "ROADMAP.md",
18
18
  "SECURITY.md",
19
+ "SETUP.md",
19
20
  ]);
20
21
 
21
22
  export const PUBLIC_DOCUMENT_DIRECTORY = Object.freeze(["docs", "skills"]);
22
23
 
23
24
  export const DOCUMENTATION_REQUIREMENT = Object.freeze({
24
- README_HEADINGS: Object.freeze([
25
- "Installation",
26
- "Updating the Codex plugin",
27
- "Runtime",
28
- "Verification",
29
- "Current Limitations",
30
- "Reporting Problems",
25
+ README_HEADINGS: Object.freeze(["Setup", "Runtime", "Development Setup", "Verification", "Current Limitations", "Reporting Problems"]),
26
+ README_FIRST_SECTION: "Setup",
27
+ README_SETUP_ENTRY_LITERALS: Object.freeze([
28
+ "Before running an installation command, follow [SETUP.md](SETUP.md).",
29
+ "single source of truth",
30
+ "Package installation alone does not configure an MCP host.",
31
+ ]),
32
+ README_FORBIDDEN_SETUP_HEADINGS: Object.freeze(["Agent Installation", "Installation", "Updating the Codex plugin"]),
33
+ README_FORBIDDEN_SETUP_LITERALS: Object.freeze([
34
+ "codex plugin marketplace add elnonathan/semantic-js-mcp",
35
+ "codex plugin add semantic-js-mcp@elnonathan",
36
+ "npm install --global semantic-js-mcp",
37
+ "npm ci",
38
+ ]),
39
+ DISTRIBUTION_FORBIDDEN_SETUP_LITERALS: Object.freeze([
40
+ "codex plugin marketplace add elnonathan/semantic-js-mcp",
41
+ "codex plugin marketplace upgrade elnonathan",
42
+ "codex plugin add semantic-js-mcp@elnonathan",
31
43
  ]),
32
- README_LITERALS: Object.freeze(["codex plugin marketplace upgrade elnonathan", "codex plugin add semantic-js-mcp@elnonathan"]),
33
44
  GETTING_STARTED_HEADINGS: Object.freeze([
34
45
  "Trace A Symbol",
35
46
  "Review A Security-Sensitive Change",
@@ -40,29 +51,96 @@ export const DOCUMENTATION_REQUIREMENT = Object.freeze({
40
51
  "Untrusted Diagnostics",
41
52
  "Startup Failure",
42
53
  ]),
43
- AGENT_SETUP_HEADINGS: Object.freeze([
44
- "Scope",
45
- "Safety Boundaries",
46
- "Installation Procedure",
47
- "Verification",
48
- "Update And Rollback",
54
+ SETUP_HEADINGS: Object.freeze([
55
+ "Guards",
56
+ "Prerequisites",
57
+ "Choose A Version",
58
+ "Install With Codex",
59
+ "Install With Another MCP Host",
60
+ "Verify The Installation",
61
+ "Troubleshooting",
62
+ "Update",
63
+ "Rollback",
49
64
  "Removal",
50
- "Completion Report",
65
+ "Source Checkout",
66
+ "Background",
51
67
  ]),
68
+ SETUP_FIRST_SECTION: "Guards",
69
+ SETUP_LAST_SECTION: "Background",
70
+ DISTRIBUTION_HEADINGS: Object.freeze(["Release Verification", "npm Trusted Publishing"]),
52
71
  SEMANTIC_NAVIGATION_SKILL_HEADINGS: Object.freeze(["Preserve Combination Invariants"]),
53
- README_LINKS: Object.freeze(["AGENT_SETUP.md", "docs/getting-started.md", "CONTRIBUTING.md", "SECURITY.md"]),
54
- GETTING_STARTED_LITERALS: Object.freeze([SEMANTIC_EVIDENCE_FOLLOW_UP_REASON.COLLECTION_PARTIAL, DOCTOR_REASON.RUNTIME_COMPONENT_MISSING]),
55
- AGENT_SETUP_LITERALS: Object.freeze([
72
+ README_LINKS: Object.freeze(["SETUP.md", "docs/getting-started.md", "CONTRIBUTING.md", "SECURITY.md"]),
73
+ GETTING_STARTED_LITERALS: Object.freeze([
74
+ SEMANTIC_EVIDENCE_FOLLOW_UP_REASON.COLLECTION_PARTIAL,
75
+ DOCTOR_REASON.RUNTIME_COMPONENT_MISSING,
76
+ DIAGNOSTIC_RESULT_FIELD.USABLE_AS_CURRENT_DOCUMENT_DIAGNOSTIC_EVIDENCE,
77
+ DIAGNOSTIC_GUIDANCE.CURRENT_DOCUMENT_DIAGNOSTICS_UNAVAILABLE,
78
+ ]),
79
+ SETUP_LITERALS: Object.freeze([
56
80
  "semantic-js-mcp doctor",
57
81
  "semantic-js-mcp serve",
58
82
  "does not override system, developer, organization, repository",
59
83
  "npm uninstall --global semantic-js-mcp",
60
84
  "server name: `semanticjsmcp`",
85
+ "codex plugin marketplace upgrade elnonathan",
86
+ "Do not run `npm install semantic-js-mcp` without `--global`.",
87
+ "Treat `EPERM`, `EACCES`, `TAR_ENTRY_ERROR`, or a missing-file error as a partial installation.",
88
+ "Do not start `semantic-js-mcp serve` manually.",
89
+ "Choose exactly one installation route.",
90
+ "Use the language of the user's latest message for explanations, questions,",
91
+ "Complete Sections 1.1 through 1.4 before invoking any terminal, filesystem, package-manager, or host tool.",
92
+ "does not authorize a tool call.",
93
+ "Record exactly one operation: `verification`.",
94
+ "Use a direct integration only after positive evidence identifies the application running this setup session.",
95
+ "If no documented direct integration is positively identified, record `generic stdio` and continue without asking the user to identify the agent.",
96
+ "The host application and the host route are different facts.",
97
+ "The host route does not identify the server source.",
98
+ "The application running the agent can also be the MCP host.",
99
+ "Recommended target host: `<application>` using `generic stdio`.",
100
+ "Do not repeatedly ask for the application name after positive session evidence already identifies it.",
101
+ "Do not present direct integrations as a menu.",
102
+ "The presence of an installed host executable is not positive host evidence.",
103
+ "continue only with the recorded host route",
104
+ "and server source for the existing installation.",
105
+ "Do not use `npx`, `npm exec`, `@latest`, or an npm cache as an installation route.",
106
+ "Do not pipe JSON-RPC messages",
107
+ "A manually started server does not prove that the configured host application loaded the MCP tools.",
108
+ "Source checkout registration is not supported",
109
+ "When the recorded host route is `Codex direct`, the agent may run the",
110
+ "I cannot identify the current host application. Which application should I configure?",
111
+ "record `user` as the command runner.",
112
+ "low side-effect risk, but they are not sandbox-neutral evidence:",
113
+ "The agent must not perform even read-only local checks.",
114
+ "A command name is not enough to infer its argument grammar.",
115
+ "Do not construct the add command unless Section 5.1 recorded its exact current",
116
+ "An added-entry message is not enough.",
117
+ "A host status of `failed` is a failure, not an expected pre-restart state.",
118
+ "Use `lsp_document_symbols` on that file as the first functional",
119
+ "global executable checks for a source checkout.",
120
+ "search the user's home directory or unrelated directories for a checkout.",
121
+ "A similarly named file is not evidence of a Semantic JS MCP installation.",
122
+ "Before constructing a removal command, confirm the exact remove subcommand",
123
+ "do not run the global npm",
124
+ "Before constructing a source-checkout registration command, confirm the exact",
125
+ "report that the source checkout is ready and stop.",
126
+ "pending-restart",
127
+ "No source-code call is required",
128
+ "global executable checks",
129
+ ]),
130
+ DISTRIBUTION_LITERALS: Object.freeze([
131
+ "npm run release:verify",
132
+ "npm run verify:published -- <version>",
133
+ "The `publish.yml` workflow publishes tags matching `v*`",
134
+ "protected `npm-publish` environment",
135
+ "No long-lived npm token is used.",
136
+ "Verify the published package before creating the matching GitHub release.",
61
137
  ]),
62
138
  SEMANTIC_NAVIGATION_SKILL_LITERALS: Object.freeze([
63
139
  "Identify every producer of the value",
64
140
  "boundary case that could disprove",
65
141
  "conceptual relationships that an LSP cannot establish",
142
+ `Read \`result.${DIAGNOSTIC_RESULT_FIELD.DIAGNOSTIC_USE}\``,
143
+ DIAGNOSTIC_RESULT_FIELD.UNCONFIRMED_DIAGNOSTIC_REPORT_AVAILABLE,
66
144
  ]),
67
145
  });
68
146
 
@@ -71,6 +149,12 @@ export const DOCUMENTATION_REASON = Object.freeze({
71
149
  HEADING_MISSING: "required-heading-missing",
72
150
  LINK_MISSING: "required-link-missing",
73
151
  LITERAL_MISSING: "required-literal-missing",
152
+ SETUP_ENTRY_POINT_NOT_FIRST: "setup-entry-point-not-first",
153
+ DUPLICATE_SETUP_SECTION: "duplicate-setup-section",
154
+ DUPLICATE_SETUP_COMMAND: "duplicate-setup-command",
155
+ SETUP_GUARDS_NOT_FIRST: "setup-guards-not-first",
156
+ SETUP_SECTION_ORDER_INVALID: "setup-section-order-invalid",
157
+ SETUP_BACKGROUND_NOT_LAST: "setup-background-not-last",
74
158
  PRIVATE_COORDINATION: "private-coordination-language-found",
75
159
  LOCAL_PATH: "local-absolute-path-found",
76
160
  });