@yawlabs/ctxlint 0.6.0 → 0.7.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.
@@ -2,6 +2,7 @@
2
2
  import {
3
3
  ALL_CHECKS,
4
4
  ALL_MCP_CHECKS,
5
+ ALL_SESSION_CHECKS,
5
6
  VERSION,
6
7
  applyFixes,
7
8
  fileExists,
@@ -12,7 +13,7 @@ import {
12
13
  resetGit,
13
14
  runAudit,
14
15
  scanForContextFiles
15
- } from "./chunk-PLYBGRJD.js";
16
+ } from "./chunk-DYPYGTPV.js";
16
17
  import "./chunk-ZXMDA7VB.js";
17
18
 
18
19
  // src/mcp/server.ts
@@ -35,7 +36,12 @@ var checkEnum = z.enum([
35
36
  "mcp-env",
36
37
  "mcp-urls",
37
38
  "mcp-consistency",
38
- "mcp-redundancy"
39
+ "mcp-redundancy",
40
+ "session-missing-secret",
41
+ "session-diverged-file",
42
+ "session-missing-workflow",
43
+ "session-stale-memory",
44
+ "session-duplicate-memory"
39
45
  ]);
40
46
  var server = new McpServer({
41
47
  name: "ctxlint",
@@ -244,5 +250,39 @@ server.tool(
244
250
  }
245
251
  }
246
252
  );
253
+ server.tool(
254
+ "ctxlint_session_audit",
255
+ "Audit AI agent session data for cross-project consistency. Checks for missing GitHub secrets, diverged config files, missing workflows, stale memory entries, and duplicate memories across sibling repositories.",
256
+ {
257
+ projectPath: z.string().optional().describe("Path to the project root. Defaults to current working directory."),
258
+ checks: z.array(checkEnum).optional().describe("Specific session checks to run (default: all session-* checks).")
259
+ },
260
+ {
261
+ readOnlyHint: true,
262
+ destructiveHint: false,
263
+ idempotentHint: true,
264
+ openWorldHint: true
265
+ },
266
+ async ({ projectPath, checks }) => {
267
+ const root = path.resolve(projectPath || process.cwd());
268
+ const activeChecks = checks || ALL_SESSION_CHECKS;
269
+ try {
270
+ const result = await runAudit(root, activeChecks, {
271
+ session: true,
272
+ sessionOnly: true
273
+ });
274
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
275
+ } catch (err) {
276
+ const msg = err instanceof Error ? err.message : String(err);
277
+ return {
278
+ content: [{ type: "text", text: JSON.stringify({ error: msg }) }],
279
+ isError: true
280
+ };
281
+ } finally {
282
+ freeEncoder();
283
+ resetGit();
284
+ }
285
+ }
286
+ );
247
287
  var transport = new StdioServerTransport();
248
288
  await server.connect(transport);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yawlabs/ctxlint",
3
- "version": "0.6.0",
4
- "description": "Lint your AI agent context files and MCP server configs against your actual codebase",
3
+ "version": "0.7.0",
4
+ "description": "Lint your AI agent context files, MCP server configs, and session data against your actual codebase",
5
5
  "bin": {
6
6
  "ctxlint": "dist/index.js"
7
7
  },
@@ -38,15 +38,24 @@
38
38
  "context-lint",
39
39
  "gemini",
40
40
  "cline",
41
- "windsurf"
41
+ "windsurf",
42
+ "session",
43
+ "cross-project",
44
+ "agent-session",
45
+ "aider",
46
+ "vibe-cli",
47
+ "amazon-q",
48
+ "goose"
42
49
  ],
43
50
  "files": [
44
51
  "dist",
45
52
  ".pre-commit-hooks.yaml",
46
53
  "CONTEXT_LINT_SPEC.md",
47
54
  "MCP_CONFIG_LINT_SPEC.md",
55
+ "AGENT_SESSION_LINT_SPEC.md",
48
56
  "context-lint-rules.json",
49
57
  "mcp-config-lint-rules.json",
58
+ "agent-session-lint-rules.json",
50
59
  "LICENSE",
51
60
  "README.md"
52
61
  ],