psycgod-sage 1.1.0 → 2.5.5
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 +69 -69
- package/dist/cli/index.js +12 -85
- package/dist/cli/index.js.map +1 -1
- package/dist/install/hooks.js +12 -12
- package/dist/install/targets.js +40 -40
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# SAGE npm launcher - Smart Agent Guidance Engine
|
|
2
|
-
[](https://www.npmjs.com/package/psycgod-sage)
|
|
3
|
-
|
|
4
|
-
This npm package is a Node-friendly launcher for the canonical Python package `psycgod-sage`.
|
|
5
|
-
It installs/updates the PyPI SAGE core and forwards commands to `python -m sage`, so npm/npx
|
|
6
|
-
and PyPI behavior stay identical. ML V1 is included. ML V2 remains optional.
|
|
7
|
-
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install -g psycgod-sage
|
|
12
|
-
npx -y psycgod-sage install
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
`install` is the explicit one-command onboarding step before you expect Claude, Codex, Cursor, Windsurf, OpenCode, Cline, or other AI agents to use SAGE automatically. It connects this machine, writes/repairs local AI-agent memory files and supported shell-wrapper hooks, then prints a verification report. It does **not** auto-enable SAGE MCP. Restart open AI-agent sessions after install.
|
|
16
|
-
|
|
17
|
-
One-shot npx usage:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npx -y psycgod-sage install
|
|
21
|
-
npx -y psycgod-sage run -- npm test
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Equivalent Python install:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
pip install psycgod-sage
|
|
28
|
-
sage install
|
|
29
|
-
sage run -- npm test
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx -y psycgod-sage install
|
|
36
|
-
npx -y psycgod-sage run -- npm test
|
|
37
|
-
npx -y psycgod-sage history
|
|
38
|
-
npx -y psycgod-sage explain --failed
|
|
39
|
-
npx -y psycgod-sage suggest --failed
|
|
40
|
-
npx -y psycgod-sage predict rm -rf node_modules
|
|
41
|
-
npx -y psycgod-sage ml setup
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
If installed from PyPI, AI agents should use:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
sage run -- <command>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If installed from npm/npx, AI agents should use:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
npx -y psycgod-sage run -- <command>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Notes
|
|
57
|
-
|
|
58
|
-
- npm/npx SAGE delegates to PyPI `psycgod-sage`.
|
|
59
|
-
- There is no separate JS database, runner, compressor, or ML implementation in the active CLI path.
|
|
60
|
-
- ML V1 is included through PyPI SAGE.
|
|
61
|
-
- Optional ML V2 can be installed later with `npx -y psycgod-sage ml setup`.
|
|
62
|
-
- Optional MCP tools are manual: use `npx -y psycgod-sage mcp install` only if you explicitly want an MCP server.
|
|
63
|
-
|
|
64
|
-
Links:
|
|
65
|
-
|
|
66
|
-
- Python: https://pypi.org/project/psycgod-sage/
|
|
67
|
-
- Repo: https://github.com/PsYcGoD/sage
|
|
68
|
-
- Dashboard: https://sage.api.marketingstudios.in/
|
|
69
|
-
- License: MIT
|
|
1
|
+
# SAGE npm launcher - Smart Agent Guidance Engine
|
|
2
|
+
[](https://www.npmjs.com/package/psycgod-sage)
|
|
3
|
+
|
|
4
|
+
This npm package is a Node-friendly launcher for the canonical Python package `psycgod-sage`.
|
|
5
|
+
It installs/updates the PyPI SAGE core and forwards commands to `python -m sage`, so npm/npx
|
|
6
|
+
and PyPI behavior stay identical. ML V1 is included. ML V2 remains optional.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g psycgod-sage
|
|
12
|
+
npx -y psycgod-sage install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`install` is the explicit one-command onboarding step before you expect Claude, Codex, Cursor, Windsurf, OpenCode, Cline, or other AI agents to use SAGE automatically. It connects this machine, writes/repairs local AI-agent memory files and supported shell-wrapper hooks, then prints a verification report. It does **not** auto-enable SAGE MCP. Restart open AI-agent sessions after install.
|
|
16
|
+
|
|
17
|
+
One-shot npx usage:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx -y psycgod-sage install
|
|
21
|
+
npx -y psycgod-sage run -- npm test
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Equivalent Python install:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install psycgod-sage
|
|
28
|
+
sage install
|
|
29
|
+
sage run -- npm test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx -y psycgod-sage install
|
|
36
|
+
npx -y psycgod-sage run -- npm test
|
|
37
|
+
npx -y psycgod-sage history
|
|
38
|
+
npx -y psycgod-sage explain --failed
|
|
39
|
+
npx -y psycgod-sage suggest --failed
|
|
40
|
+
npx -y psycgod-sage predict rm -rf node_modules
|
|
41
|
+
npx -y psycgod-sage ml setup
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If installed from PyPI, AI agents should use:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
sage run -- <command>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If installed from npm/npx, AI agents should use:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx -y psycgod-sage run -- <command>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Notes
|
|
57
|
+
|
|
58
|
+
- npm/npx SAGE delegates to PyPI `psycgod-sage`.
|
|
59
|
+
- There is no separate JS database, runner, compressor, or ML implementation in the active CLI path.
|
|
60
|
+
- ML V1 is included through PyPI SAGE.
|
|
61
|
+
- Optional ML V2 can be installed later with `npx -y psycgod-sage ml setup`.
|
|
62
|
+
- Optional MCP tools are manual: use `npx -y psycgod-sage mcp install` only if you explicitly want an MCP server.
|
|
63
|
+
|
|
64
|
+
Links:
|
|
65
|
+
|
|
66
|
+
- Python: https://pypi.org/project/psycgod-sage/
|
|
67
|
+
- Repo: https://github.com/PsYcGoD/sage
|
|
68
|
+
- Dashboard: https://sage.api.marketingstudios.in/
|
|
69
|
+
- License: MIT
|
package/dist/cli/index.js
CHANGED
|
@@ -1,87 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function usage() {
|
|
15
|
-
console.log('Usage: sage <command> [args...]');
|
|
16
|
-
console.log(' sage run -- <command> [args...]');
|
|
17
|
-
}
|
|
18
|
-
function runPythonSage(args) {
|
|
19
|
-
const candidates = process.platform === 'win32'
|
|
20
|
-
? ['py', 'python']
|
|
21
|
-
: ['python3', 'python'];
|
|
22
|
-
for (const executable of candidates) {
|
|
23
|
-
const probe = spawnSync(executable, ['-c', 'import sage'], {
|
|
24
|
-
cwd: process.cwd(),
|
|
25
|
-
env: process.env,
|
|
26
|
-
stdio: 'ignore',
|
|
27
|
-
shell: false,
|
|
28
|
-
});
|
|
29
|
-
if (probe.error || probe.status !== 0)
|
|
30
|
-
continue;
|
|
31
|
-
const result = spawnSync(executable, ['-m', 'sage', ...args], {
|
|
32
|
-
cwd: process.cwd(),
|
|
33
|
-
env: process.env,
|
|
34
|
-
stdio: 'inherit',
|
|
35
|
-
shell: false,
|
|
36
|
-
});
|
|
37
|
-
if (result.error) {
|
|
38
|
-
console.error(`[SAGE npm] ${result.error.message}`);
|
|
39
|
-
return 1;
|
|
40
|
-
}
|
|
41
|
-
return result.status ?? 1;
|
|
42
|
-
}
|
|
43
|
-
console.error('[SAGE npm] The full SAGE CLI requires the Python package.');
|
|
44
|
-
console.error('[SAGE npm] Install it with: pip install psycgod-sage');
|
|
45
|
-
return 1;
|
|
46
|
-
}
|
|
47
|
-
function main(args) {
|
|
48
|
-
if (args.length === 1 && (args[0] === '--version' || args[0] === '-V')) {
|
|
49
|
-
console.log(packageVersion());
|
|
50
|
-
return 0;
|
|
51
|
-
}
|
|
52
|
-
if (args[0] !== 'run') {
|
|
53
|
-
return runPythonSage(args);
|
|
54
|
-
}
|
|
55
|
-
const separator = args.indexOf('--');
|
|
56
|
-
const commandParts = separator >= 0 ? args.slice(separator + 1) : args.slice(1);
|
|
57
|
-
if (commandParts.length === 0) {
|
|
58
|
-
usage();
|
|
59
|
-
return 1;
|
|
60
|
-
}
|
|
61
|
-
const [command, ...commandArgs] = commandParts;
|
|
62
|
-
const stdinFile = process.env.SAGE_STDIN_FILE?.trim();
|
|
63
|
-
let input;
|
|
64
|
-
if (stdinFile) {
|
|
65
|
-
try {
|
|
66
|
-
input = readFileSync(stdinFile);
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
console.error(`[SAGE npm] Could not read SAGE_STDIN_FILE: ${error instanceof Error ? error.message : String(error)}`);
|
|
70
|
-
return 1;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const result = spawnSync(command, commandArgs, {
|
|
74
|
-
cwd: process.cwd(),
|
|
75
|
-
env: process.env,
|
|
76
|
-
stdio: input ? ['pipe', 'inherit', 'inherit'] : 'inherit',
|
|
77
|
-
input,
|
|
78
|
-
shell: process.platform === 'win32',
|
|
79
|
-
});
|
|
80
|
-
if (result.error) {
|
|
81
|
-
console.error(`[SAGE npm] ${result.error.message}`);
|
|
82
|
-
return 1;
|
|
83
|
-
}
|
|
84
|
-
return result.status ?? 1;
|
|
85
|
-
}
|
|
86
|
-
process.exit(main(process.argv.slice(2)));
|
|
2
|
+
// npm/npx SAGE launcher.
|
|
3
|
+
//
|
|
4
|
+
// The Python package `psycgod-sage` is the canonical SAGE implementation.
|
|
5
|
+
// This npm package exists for Node users who prefer:
|
|
6
|
+
// npx -y psycgod-sage run -- <command>
|
|
7
|
+
//
|
|
8
|
+
// To keep PyPI and npm behavior identical, every CLI invocation is forwarded
|
|
9
|
+
// to `python -m sage` after ensuring the Python core is installed.
|
|
10
|
+
import { runPythonSage } from '../python/bridge.js';
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
const exitCode = runPythonSage(args);
|
|
13
|
+
process.exit(exitCode);
|
|
87
14
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,yBAAyB;AACzB,EAAE;AACF,0EAA0E;AAC1E,qDAAqD;AACrD,yCAAyC;AACzC,EAAE;AACF,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;AACrC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/install/hooks.js
CHANGED
|
@@ -8,7 +8,7 @@ const ENFORCE_SAGE_PY = `#!/usr/bin/env python3
|
|
|
8
8
|
import json
|
|
9
9
|
import sys
|
|
10
10
|
|
|
11
|
-
SAGE_PREFIXES = (${JSON.stringify(SAGE_RUN_PREFIX)}, ${JSON.stringify(PYPI_RUN_PREFIX)})
|
|
11
|
+
SAGE_PREFIXES = (${JSON.stringify(SAGE_RUN_PREFIX)}, ${JSON.stringify(PYPI_RUN_PREFIX)})
|
|
12
12
|
|
|
13
13
|
def main():
|
|
14
14
|
try:
|
|
@@ -23,18 +23,18 @@ def main():
|
|
|
23
23
|
return 0
|
|
24
24
|
|
|
25
25
|
command = str(tool_input.get("command") or "").strip()
|
|
26
|
-
if any(command.startswith(prefix) for prefix in SAGE_PREFIXES):
|
|
27
|
-
return 0
|
|
28
|
-
|
|
29
|
-
print("SAGE enforcement: shell commands must start with one of:", ", ".join(SAGE_PREFIXES), file=sys.stderr)
|
|
30
|
-
print("The blocked command is intentionally not printed to avoid leaking secrets.", file=sys.stderr)
|
|
31
|
-
return 2
|
|
26
|
+
if any(command.startswith(prefix) for prefix in SAGE_PREFIXES):
|
|
27
|
+
return 0
|
|
28
|
+
|
|
29
|
+
print("SAGE enforcement: shell commands must start with one of:", ", ".join(SAGE_PREFIXES), file=sys.stderr)
|
|
30
|
+
print("The blocked command is intentionally not printed to avoid leaking secrets.", file=sys.stderr)
|
|
31
|
+
return 2
|
|
32
32
|
|
|
33
33
|
if __name__ == "__main__":
|
|
34
34
|
raise SystemExit(main())
|
|
35
35
|
`;
|
|
36
36
|
const ENFORCE_SAGE_JS = `#!/usr/bin/env node
|
|
37
|
-
const SAGE_PREFIXES = [${JSON.stringify(SAGE_RUN_PREFIX)}, ${JSON.stringify(PYPI_RUN_PREFIX)}];
|
|
37
|
+
const SAGE_PREFIXES = [${JSON.stringify(SAGE_RUN_PREFIX)}, ${JSON.stringify(PYPI_RUN_PREFIX)}];
|
|
38
38
|
|
|
39
39
|
let input = '';
|
|
40
40
|
process.stdin.setEncoding('utf8');
|
|
@@ -46,10 +46,10 @@ process.stdin.on('end', () => {
|
|
|
46
46
|
const toolInput = data.tool_input || {};
|
|
47
47
|
if (!['Bash', 'Shell', 'PowerShell', 'bash_tool'].includes(toolName)) process.exit(0);
|
|
48
48
|
const command = String(toolInput.command || '').trim();
|
|
49
|
-
if (SAGE_PREFIXES.some(prefix => command.startsWith(prefix))) process.exit(0);
|
|
50
|
-
console.error('SAGE enforcement: shell commands must start with one of: ' + SAGE_PREFIXES.join(', '));
|
|
51
|
-
console.error('The blocked command is intentionally not printed to avoid leaking secrets.');
|
|
52
|
-
process.exit(2);
|
|
49
|
+
if (SAGE_PREFIXES.some(prefix => command.startsWith(prefix))) process.exit(0);
|
|
50
|
+
console.error('SAGE enforcement: shell commands must start with one of: ' + SAGE_PREFIXES.join(', '));
|
|
51
|
+
console.error('The blocked command is intentionally not printed to avoid leaking secrets.');
|
|
52
|
+
process.exit(2);
|
|
53
53
|
} catch {
|
|
54
54
|
process.exit(0);
|
|
55
55
|
}
|
package/dist/install/targets.js
CHANGED
|
@@ -3,55 +3,55 @@ export const SAGE_RUN_PREFIX = 'npx -y psycgod-sage run --';
|
|
|
3
3
|
export const PYPI_RUN_PREFIX = 'sage run --';
|
|
4
4
|
export const SAGE_BLOCK_START = '# SAGE MANAGED BLOCK START';
|
|
5
5
|
export const SAGE_BLOCK_END = '# SAGE MANAGED BLOCK END';
|
|
6
|
-
export const SAGE_INSTRUCTION = `${SAGE_BLOCK_START}
|
|
7
|
-
## SAGE Integration - MANDATORY
|
|
8
|
-
|
|
9
|
-
When a user asks for any coding, repo, file, debugging, documentation, or project task, start through SAGE automatically. The user should not need to type \`sage\`.
|
|
10
|
-
|
|
11
|
-
First actions for normal repo work:
|
|
12
|
-
- Use native file/search/edit tools normally.
|
|
13
|
-
- Route every terminal command through the npm SAGE wrapper: \`${SAGE_RUN_PREFIX} <command>\`.
|
|
14
|
-
|
|
15
|
-
Route every shell command through SAGE. Do not run bare terminal commands.
|
|
16
|
-
|
|
17
|
-
Allowed wrappers:
|
|
18
|
-
- \`${SAGE_RUN_PREFIX} <command>\`
|
|
19
|
-
- Backup when npm/npx is unavailable: \`${PYPI_RUN_PREFIX} <command>\`
|
|
20
|
-
|
|
21
|
-
Rules:
|
|
22
|
-
- Python: \`${SAGE_RUN_PREFIX} python script.py\`
|
|
23
|
-
- Packages: \`${SAGE_RUN_PREFIX} npm install\`
|
|
24
|
-
- Tests: \`${SAGE_RUN_PREFIX} pytest\`
|
|
25
|
-
- If the wrapper fails before the target command starts, stop and report the wrapper failure.
|
|
6
|
+
export const SAGE_INSTRUCTION = `${SAGE_BLOCK_START}
|
|
7
|
+
## SAGE Integration - MANDATORY
|
|
8
|
+
|
|
9
|
+
When a user asks for any coding, repo, file, debugging, documentation, or project task, start through SAGE automatically. The user should not need to type \`sage\`.
|
|
10
|
+
|
|
11
|
+
First actions for normal repo work:
|
|
12
|
+
- Use native file/search/edit tools normally.
|
|
13
|
+
- Route every terminal command through the npm SAGE wrapper: \`${SAGE_RUN_PREFIX} <command>\`.
|
|
14
|
+
|
|
15
|
+
Route every shell command through SAGE. Do not run bare terminal commands.
|
|
16
|
+
|
|
17
|
+
Allowed wrappers:
|
|
18
|
+
- \`${SAGE_RUN_PREFIX} <command>\`
|
|
19
|
+
- Backup when npm/npx is unavailable: \`${PYPI_RUN_PREFIX} <command>\`
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
- Python: \`${SAGE_RUN_PREFIX} python script.py\`
|
|
23
|
+
- Packages: \`${SAGE_RUN_PREFIX} npm install\`
|
|
24
|
+
- Tests: \`${SAGE_RUN_PREFIX} pytest\`
|
|
25
|
+
- If the wrapper fails before the target command starts, stop and report the wrapper failure.
|
|
26
26
|
|
|
27
27
|
Why:
|
|
28
|
-
- npm/npx SAGE delegates to the canonical SAGE core, so behavior matches \`psycgod-sage\`.
|
|
28
|
+
- npm/npx SAGE delegates to the canonical SAGE core, so behavior matches \`psycgod-sage\`.
|
|
29
29
|
- Tracks local command history for the user.
|
|
30
30
|
- Compresses noisy output before it reaches AI context.
|
|
31
31
|
- Captures safe proof metrics for token savings and ML V1 prediction.
|
|
32
32
|
- Keeps raw commands and output local unless the user enables higher telemetry.
|
|
33
33
|
|
|
34
|
-
Examples:
|
|
35
|
-
- Wrong: \`python test.py\`
|
|
36
|
-
- Correct: \`${SAGE_RUN_PREFIX} python test.py\`
|
|
37
|
-
- Backup: \`${PYPI_RUN_PREFIX} python test.py\`
|
|
38
|
-
- Wrong: \`git status\`
|
|
39
|
-
- Correct: \`${SAGE_RUN_PREFIX} git status\`
|
|
40
|
-
|
|
41
|
-
Example user request:
|
|
42
|
-
- User: "Please help me with my general book in this folder"
|
|
43
|
-
- Correct agent start: inspect/read/edit files with available native tools, then use \`${SAGE_RUN_PREFIX} <command>\` only when a terminal command is needed.
|
|
44
|
-
- Wrong agent start: bare \`python\`, \`git\`, \`npm\`, or \`ls\`.
|
|
45
|
-
|
|
46
|
-
ML V1 is included. Optional ML V2 can be installed later by the user with:
|
|
47
|
-
\`npx -y psycgod-sage ml setup\`
|
|
34
|
+
Examples:
|
|
35
|
+
- Wrong: \`python test.py\`
|
|
36
|
+
- Correct: \`${SAGE_RUN_PREFIX} python test.py\`
|
|
37
|
+
- Backup: \`${PYPI_RUN_PREFIX} python test.py\`
|
|
38
|
+
- Wrong: \`git status\`
|
|
39
|
+
- Correct: \`${SAGE_RUN_PREFIX} git status\`
|
|
40
|
+
|
|
41
|
+
Example user request:
|
|
42
|
+
- User: "Please help me with my general book in this folder"
|
|
43
|
+
- Correct agent start: inspect/read/edit files with available native tools, then use \`${SAGE_RUN_PREFIX} <command>\` only when a terminal command is needed.
|
|
44
|
+
- Wrong agent start: bare \`python\`, \`git\`, \`npm\`, or \`ls\`.
|
|
45
|
+
|
|
46
|
+
ML V1 is included. Optional ML V2 can be installed later by the user with:
|
|
47
|
+
\`npx -y psycgod-sage ml setup\`
|
|
48
48
|
${SAGE_BLOCK_END}
|
|
49
49
|
`;
|
|
50
|
-
export const SAGE_INSTRUCTION_SHORT = `${SAGE_BLOCK_START}
|
|
51
|
-
# SAGE Integration - MANDATORY
|
|
52
|
-
# Route all shell commands through: ${SAGE_RUN_PREFIX} <command>
|
|
53
|
-
# Backup when npm/npx is unavailable: ${PYPI_RUN_PREFIX} <command>
|
|
54
|
-
${SAGE_BLOCK_END}
|
|
50
|
+
export const SAGE_INSTRUCTION_SHORT = `${SAGE_BLOCK_START}
|
|
51
|
+
# SAGE Integration - MANDATORY
|
|
52
|
+
# Route all shell commands through: ${SAGE_RUN_PREFIX} <command>
|
|
53
|
+
# Backup when npm/npx is unavailable: ${PYPI_RUN_PREFIX} <command>
|
|
54
|
+
${SAGE_BLOCK_END}
|
|
55
55
|
`;
|
|
56
56
|
export const AGENT_TARGETS = [
|
|
57
57
|
{ name: 'Claude Code', path: '~/.claude/CLAUDE.md', instruction: SAGE_INSTRUCTION, createIfMissing: true, fileType: 'markdown' },
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "psycgod-sage",
|
|
3
|
-
"version": "
|
|
4
|
-
"mcpName": "io.github.PsYcGoD/sage",
|
|
5
|
-
"description": "npm/npx launcher for the canonical PyPI SAGE CLI wrapper for AI coding agents",
|
|
6
|
-
"author": "PsYcGoD",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"bin": {
|
|
12
|
-
"sage": "bin/sage.js"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist",
|
|
16
|
-
"bin"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
20
|
-
"dev": "tsc --watch",
|
|
21
|
-
"test": "vitest",
|
|
22
|
-
"lint": "eslint src",
|
|
23
|
-
"prepublishOnly": "npm run build"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/better-sqlite3": "^7.6.11",
|
|
28
|
-
"@types/node": "^22.0.0",
|
|
29
|
-
"@types/uuid": "^10.0.0",
|
|
30
|
-
"typescript": "^5.5.0",
|
|
31
|
-
"vitest": "^2.0.0"
|
|
32
|
-
},
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">=18.0.0"
|
|
35
|
-
},
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "git+https://github.com/PsYcGoD/sage.git"
|
|
39
|
-
},
|
|
40
|
-
"keywords": [
|
|
41
|
-
"ai",
|
|
42
|
-
"cli",
|
|
43
|
-
"terminal",
|
|
44
|
-
"compression",
|
|
45
|
-
"mcp",
|
|
46
|
-
"claude",
|
|
47
|
-
"coding-agent",
|
|
48
|
-
"developer-tools"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "psycgod-sage",
|
|
3
|
+
"version": "2.5.5",
|
|
4
|
+
"mcpName": "io.github.PsYcGoD/sage",
|
|
5
|
+
"description": "npm/npx launcher for the canonical PyPI SAGE CLI wrapper for AI coding agents",
|
|
6
|
+
"author": "PsYcGoD",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"bin": {
|
|
12
|
+
"sage": "bin/sage.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"bin"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"test": "vitest",
|
|
22
|
+
"lint": "eslint src",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/better-sqlite3": "^7.6.11",
|
|
28
|
+
"@types/node": "^22.0.0",
|
|
29
|
+
"@types/uuid": "^10.0.0",
|
|
30
|
+
"typescript": "^5.5.0",
|
|
31
|
+
"vitest": "^2.0.0"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18.0.0"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/PsYcGoD/sage.git"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"cli",
|
|
43
|
+
"terminal",
|
|
44
|
+
"compression",
|
|
45
|
+
"mcp",
|
|
46
|
+
"claude",
|
|
47
|
+
"coding-agent",
|
|
48
|
+
"developer-tools"
|
|
49
|
+
]
|
|
50
|
+
}
|