projscan 1.2.1 → 1.4.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/README.md +87 -5
- package/dist/cli/commands/mcp.js +3 -2
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/session.d.ts +12 -0
- package/dist/cli/commands/session.js +200 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/upgrade.js +6 -3
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/session.d.ts +94 -0
- package/dist/core/session.js +187 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/upgradePreview.d.ts +15 -1
- package/dist/core/upgradePreview.js +60 -2
- package/dist/core/upgradePreview.js.map +1 -1
- package/dist/mcp/server.d.ts +16 -3
- package/dist/mcp/server.js +106 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/sessionTouchScanner.d.ts +16 -0
- package/dist/mcp/sessionTouchScanner.js +112 -0
- package/dist/mcp/sessionTouchScanner.js.map +1 -0
- package/dist/mcp/tools/session.d.ts +22 -0
- package/dist/mcp/tools/session.js +140 -0
- package/dist/mcp/tools/session.js.map +1 -0
- package/dist/mcp/tools/upgrade.js +7 -2
- package/dist/mcp/tools/upgrade.js.map +1 -1
- package/dist/mcp/tools.js +2 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/tool-manifest.json +44 -4
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk an arbitrary tool-result value and pull out repo-relative file
|
|
3
|
+
* paths. Used by the MCP server dispatcher to auto-record session
|
|
4
|
+
* touches after every tools/call response.
|
|
5
|
+
*
|
|
6
|
+
* Heuristic: collect string values found under any of TOUCH_KEYS, in
|
|
7
|
+
* arrays whose keys are TOUCH_KEYS, or as top-level entries in objects
|
|
8
|
+
* keyed by TOUCH_KEYS. Filter out paths that look absolute, contain
|
|
9
|
+
* `..`, are URLs, or are clearly not source files (no `/` and no
|
|
10
|
+
* recognized extension).
|
|
11
|
+
*
|
|
12
|
+
* The goal isn't to find *every* mention — it's to recognize the file
|
|
13
|
+
* paths that projscan tools structurally surface (relativePath fields,
|
|
14
|
+
* `paths` arrays from notifications, importer lists, etc.).
|
|
15
|
+
*/
|
|
16
|
+
const TOUCH_KEYS = new Set([
|
|
17
|
+
'file',
|
|
18
|
+
'files',
|
|
19
|
+
'filePath',
|
|
20
|
+
'path',
|
|
21
|
+
'paths',
|
|
22
|
+
'relativePath',
|
|
23
|
+
'relativePaths',
|
|
24
|
+
'from',
|
|
25
|
+
'to',
|
|
26
|
+
'definitions',
|
|
27
|
+
'importers',
|
|
28
|
+
'reachable',
|
|
29
|
+
'changed',
|
|
30
|
+
'added',
|
|
31
|
+
'removed',
|
|
32
|
+
'modified',
|
|
33
|
+
]);
|
|
34
|
+
const KNOWN_EXTENSIONS = new Set([
|
|
35
|
+
'.ts',
|
|
36
|
+
'.tsx',
|
|
37
|
+
'.js',
|
|
38
|
+
'.jsx',
|
|
39
|
+
'.mjs',
|
|
40
|
+
'.cjs',
|
|
41
|
+
'.mts',
|
|
42
|
+
'.cts',
|
|
43
|
+
'.py',
|
|
44
|
+
'.go',
|
|
45
|
+
'.java',
|
|
46
|
+
'.rb',
|
|
47
|
+
'.rs',
|
|
48
|
+
'.php',
|
|
49
|
+
'.cs',
|
|
50
|
+
'.json',
|
|
51
|
+
'.yaml',
|
|
52
|
+
'.yml',
|
|
53
|
+
'.toml',
|
|
54
|
+
'.md',
|
|
55
|
+
]);
|
|
56
|
+
const MAX_DEPTH = 8;
|
|
57
|
+
const MAX_PATHS = 200;
|
|
58
|
+
export function extractTouchedPaths(value) {
|
|
59
|
+
const out = new Set();
|
|
60
|
+
walk(value, /* keyHint */ null, /* depth */ 0, out);
|
|
61
|
+
return [...out].slice(0, MAX_PATHS);
|
|
62
|
+
}
|
|
63
|
+
function walk(value, keyHint, depth, out) {
|
|
64
|
+
if (out.size >= MAX_PATHS)
|
|
65
|
+
return;
|
|
66
|
+
if (depth > MAX_DEPTH)
|
|
67
|
+
return;
|
|
68
|
+
if (value == null)
|
|
69
|
+
return;
|
|
70
|
+
if (typeof value === 'string') {
|
|
71
|
+
if (keyHint && TOUCH_KEYS.has(keyHint) && looksLikePath(value)) {
|
|
72
|
+
out.add(value);
|
|
73
|
+
}
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (Array.isArray(value)) {
|
|
77
|
+
// For an array, propagate the parent's key hint so `paths: [...]`
|
|
78
|
+
// captures every entry.
|
|
79
|
+
for (const item of value)
|
|
80
|
+
walk(item, keyHint, depth + 1, out);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (typeof value === 'object') {
|
|
84
|
+
for (const [k, v] of Object.entries(value)) {
|
|
85
|
+
walk(v, k, depth + 1, out);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function looksLikePath(s) {
|
|
90
|
+
if (s.length === 0 || s.length > 1024)
|
|
91
|
+
return false;
|
|
92
|
+
if (s.includes('..'))
|
|
93
|
+
return false;
|
|
94
|
+
if (s.startsWith('/'))
|
|
95
|
+
return false;
|
|
96
|
+
if (s.startsWith('http://') || s.startsWith('https://'))
|
|
97
|
+
return false;
|
|
98
|
+
if (s.startsWith('file://'))
|
|
99
|
+
return false;
|
|
100
|
+
// Disallow shell control chars and newlines.
|
|
101
|
+
if (/[\n\r\t]/.test(s))
|
|
102
|
+
return false;
|
|
103
|
+
// Accept either: contains `/` (suggests a path) OR has a known extension.
|
|
104
|
+
const dot = s.lastIndexOf('.');
|
|
105
|
+
const hasKnownExt = dot >= 0 && KNOWN_EXTENSIONS.has(s.slice(dot).toLowerCase());
|
|
106
|
+
if (hasKnownExt)
|
|
107
|
+
return true;
|
|
108
|
+
if (s.includes('/') && /^[A-Za-z0-9._/@-]+$/.test(s))
|
|
109
|
+
return true;
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=sessionTouchScanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionTouchScanner.js","sourceRoot":"","sources":["../../src/mcp/sessionTouchScanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,MAAM;IACN,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,cAAc;IACd,eAAe;IACf,MAAM;IACN,IAAI;IACJ,aAAa;IACb,WAAW;IACX,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;CACN,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,IAAI,CAAC,KAAc,EAAE,OAAsB,EAAE,KAAa,EAAE,GAAgB;IACnF,IAAI,GAAG,CAAC,IAAI,IAAI,SAAS;QAAE,OAAO;IAClC,IAAI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UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,6CAA6C;IAC7C,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,0EAA0E;IAC1E,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACjF,IAAI,WAAW;QAAE,OAAO,IAAI,CAAC;IAC7B,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAClE,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { McpTool } from './_shared.js';
|
|
2
|
+
import { type SessionTouch } from '../../core/session.js';
|
|
3
|
+
/**
|
|
4
|
+
* `projscan_session` (1.4+) — surface the current durable session so an
|
|
5
|
+
* agent (or a coordinated swarm of agents) can ask "what's been touched
|
|
6
|
+
* since I arrived?" without re-running git status / grep.
|
|
7
|
+
*
|
|
8
|
+
* Subactions:
|
|
9
|
+
* - "current" (default): session metadata (id, age, touched-file count, event count).
|
|
10
|
+
* - "touched": list of files touched in the current session. Sorted by
|
|
11
|
+
* last-touched descending. Filterable by source (`tool-result` /
|
|
12
|
+
* `fs-watch` / `explicit`) and supports cursor pagination.
|
|
13
|
+
* - "events": chronological event log. Bounded to the most recent 500.
|
|
14
|
+
* - "reset": discard the current session and start a fresh one. Useful
|
|
15
|
+
* when the agent is starting a new task and wants a clean slate.
|
|
16
|
+
*
|
|
17
|
+
* The session itself is populated by other paths in projscan (tool-call
|
|
18
|
+
* dispatcher records auto-touches; `mcp --watch` records fs.watch events).
|
|
19
|
+
* This tool is read-only except for the `reset` subaction.
|
|
20
|
+
*/
|
|
21
|
+
export declare const sessionTool: McpTool;
|
|
22
|
+
export type { SessionTouch };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { loadSession, resetSession, saveSession, } from '../../core/session.js';
|
|
2
|
+
/**
|
|
3
|
+
* `projscan_session` (1.4+) — surface the current durable session so an
|
|
4
|
+
* agent (or a coordinated swarm of agents) can ask "what's been touched
|
|
5
|
+
* since I arrived?" without re-running git status / grep.
|
|
6
|
+
*
|
|
7
|
+
* Subactions:
|
|
8
|
+
* - "current" (default): session metadata (id, age, touched-file count, event count).
|
|
9
|
+
* - "touched": list of files touched in the current session. Sorted by
|
|
10
|
+
* last-touched descending. Filterable by source (`tool-result` /
|
|
11
|
+
* `fs-watch` / `explicit`) and supports cursor pagination.
|
|
12
|
+
* - "events": chronological event log. Bounded to the most recent 500.
|
|
13
|
+
* - "reset": discard the current session and start a fresh one. Useful
|
|
14
|
+
* when the agent is starting a new task and wants a clean slate.
|
|
15
|
+
*
|
|
16
|
+
* The session itself is populated by other paths in projscan (tool-call
|
|
17
|
+
* dispatcher records auto-touches; `mcp --watch` records fs.watch events).
|
|
18
|
+
* This tool is read-only except for the `reset` subaction.
|
|
19
|
+
*/
|
|
20
|
+
export const sessionTool = {
|
|
21
|
+
name: 'projscan_session',
|
|
22
|
+
description: 'Inspect the durable cross-invocation session: which files have been touched in this session, by what (tool result / fs watch / explicit), and the event log. Use to coordinate across multi-agent setups without re-querying git.',
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
action: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['current', 'touched', 'events', 'reset'],
|
|
29
|
+
description: 'Subaction. Default "current" returns session metadata. "touched" returns the touched-file list. "events" returns the event log. "reset" discards the current session and starts a fresh one.',
|
|
30
|
+
},
|
|
31
|
+
source: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['tool-result', 'fs-watch', 'explicit'],
|
|
34
|
+
description: '"touched" only — restrict to files added by this source. Omit for all sources.',
|
|
35
|
+
},
|
|
36
|
+
cursor: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Opaque cursor for pagination (touched / events lists).',
|
|
39
|
+
},
|
|
40
|
+
page_size: {
|
|
41
|
+
type: 'integer',
|
|
42
|
+
description: 'Page size for paginated lists. Default 50, max 500.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
handler: async (args, rootPath) => {
|
|
47
|
+
const action = typeof args.action === 'string' ? args.action : 'current';
|
|
48
|
+
const { session } = await loadSession(rootPath);
|
|
49
|
+
switch (action) {
|
|
50
|
+
case 'current':
|
|
51
|
+
return summarizeSession(session);
|
|
52
|
+
case 'touched':
|
|
53
|
+
return touchedView(session, args);
|
|
54
|
+
case 'events':
|
|
55
|
+
return eventsView(session, args);
|
|
56
|
+
case 'reset': {
|
|
57
|
+
const fresh = await resetSession(rootPath);
|
|
58
|
+
return {
|
|
59
|
+
action: 'reset',
|
|
60
|
+
previousSessionId: session.id,
|
|
61
|
+
newSession: summarizeSession(fresh),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
default:
|
|
65
|
+
throw new Error(`Unknown action "${action}". Valid actions: current, touched, events, reset.`);
|
|
66
|
+
}
|
|
67
|
+
// Unreachable, but keeps the path that may add a `saveSession` later
|
|
68
|
+
// explicit. The current handler reads only; nothing to persist.
|
|
69
|
+
void saveSession;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
function summarizeSession(session) {
|
|
73
|
+
const startedAtMs = Date.parse(session.startedAt);
|
|
74
|
+
const lastActivityMs = Date.parse(session.lastActivityAt);
|
|
75
|
+
const ageMs = Number.isFinite(lastActivityMs) ? Date.now() - startedAtMs : null;
|
|
76
|
+
return {
|
|
77
|
+
id: session.id,
|
|
78
|
+
startedAt: session.startedAt,
|
|
79
|
+
lastActivityAt: session.lastActivityAt,
|
|
80
|
+
ageMs,
|
|
81
|
+
touchedFileCount: Object.keys(session.touchedFiles).length,
|
|
82
|
+
eventCount: session.events.length,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function touchedView(session, args) {
|
|
86
|
+
const sourceFilter = typeof args.source === 'string' ? args.source : undefined;
|
|
87
|
+
const all = Object.values(session.touchedFiles);
|
|
88
|
+
const filtered = sourceFilter ? all.filter((t) => t.source === sourceFilter) : all;
|
|
89
|
+
// Sort by lastTouchedAt descending (most recently touched first).
|
|
90
|
+
filtered.sort((a, b) => b.lastTouchedAt.localeCompare(a.lastTouchedAt));
|
|
91
|
+
const { items, nextCursor } = paginate(filtered, args);
|
|
92
|
+
return {
|
|
93
|
+
sessionId: session.id,
|
|
94
|
+
total: filtered.length,
|
|
95
|
+
touched: items,
|
|
96
|
+
...(nextCursor ? { nextCursor } : {}),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function eventsView(session, args) {
|
|
100
|
+
// Newest-first for the consumer; the underlying log is append-order.
|
|
101
|
+
const reversed = [...session.events].reverse();
|
|
102
|
+
const { items, nextCursor } = paginate(reversed, args);
|
|
103
|
+
return {
|
|
104
|
+
sessionId: session.id,
|
|
105
|
+
total: reversed.length,
|
|
106
|
+
events: items,
|
|
107
|
+
...(nextCursor ? { nextCursor } : {}),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function paginate(arr, args) {
|
|
111
|
+
const pageSize = clampPageSize(args.page_size);
|
|
112
|
+
const offset = decodeOffset(args.cursor);
|
|
113
|
+
const slice = arr.slice(offset, offset + pageSize);
|
|
114
|
+
const next = offset + pageSize;
|
|
115
|
+
const nextCursor = next < arr.length ? encodeOffset(next) : undefined;
|
|
116
|
+
return { items: slice, nextCursor };
|
|
117
|
+
}
|
|
118
|
+
function clampPageSize(raw) {
|
|
119
|
+
if (typeof raw !== 'number' || !Number.isFinite(raw))
|
|
120
|
+
return 50;
|
|
121
|
+
return Math.max(1, Math.min(500, Math.floor(raw)));
|
|
122
|
+
}
|
|
123
|
+
function encodeOffset(offset) {
|
|
124
|
+
return Buffer.from(JSON.stringify({ offset }), 'utf-8').toString('base64');
|
|
125
|
+
}
|
|
126
|
+
function decodeOffset(cursor) {
|
|
127
|
+
if (typeof cursor !== 'string' || cursor.length === 0)
|
|
128
|
+
return 0;
|
|
129
|
+
try {
|
|
130
|
+
const parsed = JSON.parse(Buffer.from(cursor, 'base64').toString('utf-8'));
|
|
131
|
+
if (parsed && typeof parsed.offset === 'number' && Number.isFinite(parsed.offset)) {
|
|
132
|
+
return Math.max(0, Math.floor(parsed.offset));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
// Bad cursor — restart from offset 0.
|
|
137
|
+
}
|
|
138
|
+
return 0;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/mcp/tools/session.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,WAAW,GAGZ,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAY;IAClC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,mOAAmO;IACrO,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC;gBAC/C,WAAW,EACT,8LAA8L;aACjM;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC;gBAC7C,WAAW,EACT,gFAAgF;aACnF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wDAAwD;aACtE;Y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AG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,YAAY,CAAC,MAAe;IACnC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAChE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3E,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAClF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sCAAsC;IACxC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { previewUpgrade } from '../../core/upgradePreview.js';
|
|
|
3
3
|
import { isPythonDominated } from './_shared.js';
|
|
4
4
|
export const upgradeTool = {
|
|
5
5
|
name: 'projscan_upgrade',
|
|
6
|
-
description: 'Preview the impact of upgrading a package: semver drift, breaking-change markers from the local CHANGELOG, and the files in your repo that import it. Offline.',
|
|
6
|
+
description: 'Preview the impact of upgrading a package: semver drift, breaking-change markers from the local CHANGELOG, and the files in your repo that import it. Offline by default; pass `check_registry: true` (1.3+) to fetch the actual latest version from npm.',
|
|
7
7
|
inputSchema: {
|
|
8
8
|
type: 'object',
|
|
9
9
|
properties: {
|
|
@@ -11,6 +11,10 @@ export const upgradeTool = {
|
|
|
11
11
|
type: 'string',
|
|
12
12
|
description: 'Name of the package to preview.',
|
|
13
13
|
},
|
|
14
|
+
check_registry: {
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
description: '1.3+ — when true, fetch the latest version from registry.npmjs.org (network-required). Default false: latest is treated as the installed version.',
|
|
17
|
+
},
|
|
14
18
|
},
|
|
15
19
|
required: ['package'],
|
|
16
20
|
},
|
|
@@ -18,6 +22,7 @@ export const upgradeTool = {
|
|
|
18
22
|
const pkgName = typeof args.package === 'string' ? args.package : '';
|
|
19
23
|
if (!pkgName)
|
|
20
24
|
throw new Error('package argument is required');
|
|
25
|
+
const checkRegistry = args.check_registry === true;
|
|
21
26
|
const scan = await scanRepository(rootPath);
|
|
22
27
|
if (await isPythonDominated(rootPath, scan.files)) {
|
|
23
28
|
return {
|
|
@@ -32,7 +37,7 @@ export const upgradeTool = {
|
|
|
32
37
|
importers: [],
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
|
-
return await previewUpgrade(rootPath, pkgName, scan.files);
|
|
40
|
+
return await previewUpgrade(rootPath, pkgName, scan.files, { checkRegistry });
|
|
36
41
|
},
|
|
37
42
|
};
|
|
38
43
|
//# sourceMappingURL=upgrade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../src/mcp/tools/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAgB,MAAM,cAAc,CAAC;AAE/D,MAAM,CAAC,MAAM,WAAW,GAAY;IAClC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"upgrade.js","source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gBACnB,SAAS,EAAE,EAAE;aACd,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IAChF,CAAC;CACF,CAAC"}
|
package/dist/mcp/tools.js
CHANGED
|
@@ -28,6 +28,7 @@ import { fixSuggestTool } from './tools/fixSuggest.js';
|
|
|
28
28
|
import { explainIssueTool } from './tools/explainIssue.js';
|
|
29
29
|
import { impactTool } from './tools/impact.js';
|
|
30
30
|
import { searchTool } from './tools/search.js';
|
|
31
|
+
import { sessionTool } from './tools/session.js';
|
|
31
32
|
const tools = [
|
|
32
33
|
analyzeTool,
|
|
33
34
|
doctorTool,
|
|
@@ -49,6 +50,7 @@ const tools = [
|
|
|
49
50
|
explainIssueTool,
|
|
50
51
|
impactTool,
|
|
51
52
|
searchTool,
|
|
53
|
+
sessionTool,
|
|
52
54
|
];
|
|
53
55
|
export function getToolDefinitions() {
|
|
54
56
|
return tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema }));
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAA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manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projscan",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"mcpProtocolVersion": "2025-03-26",
|
|
5
|
-
"generatedAt": "2026-05-
|
|
6
|
-
"toolCount":
|
|
5
|
+
"generatedAt": "2026-05-05T10:19:16.805Z",
|
|
6
|
+
"toolCount": 21,
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
9
9
|
"name": "projscan_analyze",
|
|
@@ -182,13 +182,17 @@
|
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"name": "projscan_upgrade",
|
|
185
|
-
"description": "Preview the impact of upgrading a package: semver drift, breaking-change markers from the local CHANGELOG, and the files in your repo that import it. Offline.",
|
|
185
|
+
"description": "Preview the impact of upgrading a package: semver drift, breaking-change markers from the local CHANGELOG, and the files in your repo that import it. Offline by default; pass `check_registry: true` (1.3+) to fetch the actual latest version from npm.",
|
|
186
186
|
"inputSchema": {
|
|
187
187
|
"type": "object",
|
|
188
188
|
"properties": {
|
|
189
189
|
"package": {
|
|
190
190
|
"type": "string",
|
|
191
191
|
"description": "Name of the package to preview."
|
|
192
|
+
},
|
|
193
|
+
"check_registry": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"description": "1.3+ — when true, fetch the latest version from registry.npmjs.org (network-required). Default false: latest is treated as the installed version."
|
|
192
196
|
}
|
|
193
197
|
},
|
|
194
198
|
"required": [
|
|
@@ -478,6 +482,42 @@
|
|
|
478
482
|
"query"
|
|
479
483
|
]
|
|
480
484
|
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "projscan_session",
|
|
488
|
+
"description": "Inspect the durable cross-invocation session: which files have been touched in this session, by what (tool result / fs watch / explicit), and the event log. Use to coordinate across multi-agent setups without re-querying git.",
|
|
489
|
+
"inputSchema": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"properties": {
|
|
492
|
+
"action": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"enum": [
|
|
495
|
+
"current",
|
|
496
|
+
"touched",
|
|
497
|
+
"events",
|
|
498
|
+
"reset"
|
|
499
|
+
],
|
|
500
|
+
"description": "Subaction. Default \"current\" returns session metadata. \"touched\" returns the touched-file list. \"events\" returns the event log. \"reset\" discards the current session and starts a fresh one."
|
|
501
|
+
},
|
|
502
|
+
"source": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"enum": [
|
|
505
|
+
"tool-result",
|
|
506
|
+
"fs-watch",
|
|
507
|
+
"explicit"
|
|
508
|
+
],
|
|
509
|
+
"description": "\"touched\" only — restrict to files added by this source. Omit for all sources."
|
|
510
|
+
},
|
|
511
|
+
"cursor": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"description": "Opaque cursor for pagination (touched / events lists)."
|
|
514
|
+
},
|
|
515
|
+
"page_size": {
|
|
516
|
+
"type": "integer",
|
|
517
|
+
"description": "Page size for paginated lists. Default 50, max 500."
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
481
521
|
}
|
|
482
522
|
]
|
|
483
523
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -298,6 +298,15 @@ export interface UpgradePreview {
|
|
|
298
298
|
breakingMarkers: string[];
|
|
299
299
|
changelogExcerpt?: string;
|
|
300
300
|
importers: string[];
|
|
301
|
+
/**
|
|
302
|
+
* 1.3+ — set when `previewUpgrade` was called with `checkRegistry: true`.
|
|
303
|
+
* "registry" if the latest came from npm; "installed" if we fell back to
|
|
304
|
+
* the locally-installed version (either offline mode or a registry fetch
|
|
305
|
+
* that failed). Absent when no registry attempt was made.
|
|
306
|
+
*/
|
|
307
|
+
latestSource?: 'registry' | 'installed';
|
|
308
|
+
/** 1.3+ — set when a registry fetch was attempted and failed. */
|
|
309
|
+
registryError?: string;
|
|
301
310
|
}
|
|
302
311
|
export type CoverageSource = 'lcov' | 'coverage-final' | 'coverage-summary';
|
|
303
312
|
export interface FileCoverage {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projscan",
|
|
3
3
|
"mcpName": "io.github.abhiyoheswaran1/projscan",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "Agent-first code intelligence. MCP server (2025-03-26) with AST parsing for JavaScript, TypeScript, Python, Go, Java, Ruby, Rust, PHP, and C#; code graph, file + per-function AST cyclomatic complexity, per-function fan-in + fan-out, coupling + cycle detection, structural PR diff with HTML reporter, coverage report with HTML reporter, one-call PR review (projscan_review), rule-driven fix suggestions (projscan_fix_suggest, projscan_explain_issue) closing the diagnose-fix loop, transitive blast-radius analysis (projscan_impact for files and symbols), per-function semantic search chunks (sub-file embeddings), monorepo workspace awareness with cross-package import policy + per-package dependencies / outdated / audit, BM25 + optional semantic search, cursor pagination, progress notifications, context-budgeted output, and a stable-surface CI guard. CLI on the side.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|