opencode-lisa 0.3.1 → 0.3.3
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/assets/commands/lisa.md +38 -0
- package/bin/cli.js +44 -6
- package/dist/index.js +21 -19
- package/package.json +3 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Lisa - intelligent epic workflow (/lisa help for commands)
|
|
3
|
+
agent: general
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Arguments:** $ARGUMENTS
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**If the user ran `/lisa` with no arguments or `/lisa help`, output EXACTLY this and STOP:**
|
|
11
|
+
|
|
12
|
+
**Lisa - Intelligent Epic Workflow**
|
|
13
|
+
|
|
14
|
+
**Available Commands:**
|
|
15
|
+
|
|
16
|
+
`/lisa list` - List all epics and their status
|
|
17
|
+
`/lisa <name>` - Continue or create an epic (interactive)
|
|
18
|
+
`/lisa <name> spec` - Create/view the spec only
|
|
19
|
+
`/lisa <name> status` - Show detailed epic status
|
|
20
|
+
`/lisa <name> yolo` - Auto-execute mode (no confirmations)
|
|
21
|
+
`/lisa config view` - View current configuration
|
|
22
|
+
`/lisa config init` - Initialize config with defaults
|
|
23
|
+
`/lisa config reset` - Reset config to defaults
|
|
24
|
+
|
|
25
|
+
**Examples:**
|
|
26
|
+
- `/lisa list` - See all your epics
|
|
27
|
+
- `/lisa auth-system` - Start or continue the auth-system epic
|
|
28
|
+
- `/lisa auth-system yolo` - Run auth-system in full auto mode
|
|
29
|
+
|
|
30
|
+
**Get started:** `/lisa <epic-name>`
|
|
31
|
+
|
|
32
|
+
**DO NOT call any tools. DO NOT load the skill. Just output the above and stop.**
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
**Otherwise (if arguments were provided):**
|
|
37
|
+
|
|
38
|
+
Load the lisa skill for detailed instructions and handle the command.
|
package/bin/cli.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync, readFileSync, writeFileSync, unlinkSync, rmSync } from 'fs';
|
|
4
|
-
import { join } from 'path';
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync, rmSync, copyFileSync, mkdirSync, statSync } from 'fs';
|
|
4
|
+
import { join, dirname } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
5
9
|
|
|
6
10
|
const PLUGIN_NAME = 'opencode-lisa';
|
|
7
11
|
|
|
@@ -43,18 +47,17 @@ async function checkOpenCodeInstalled() {
|
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
function cleanupOldInstalls(targetDir) {
|
|
46
|
-
// Remove old file-based installations
|
|
50
|
+
// Remove old file-based installations from previous versions
|
|
47
51
|
const oldPaths = [
|
|
48
52
|
join(targetDir, '.opencode', 'skills', 'lisa'),
|
|
49
|
-
join(targetDir, '.opencode', 'commands', 'lisa.md'),
|
|
50
|
-
join(targetDir, '.opencode', 'command', 'lisa.md'), // old singular path
|
|
51
53
|
join(targetDir, '.opencode', 'skill', 'lisa'), // old singular path
|
|
54
|
+
join(targetDir, '.opencode', 'command', 'lisa.md'), // old singular path
|
|
52
55
|
];
|
|
53
56
|
|
|
54
57
|
for (const oldPath of oldPaths) {
|
|
55
58
|
try {
|
|
56
59
|
if (existsSync(oldPath)) {
|
|
57
|
-
const stat =
|
|
60
|
+
const stat = statSync(oldPath);
|
|
58
61
|
if (stat.isDirectory()) {
|
|
59
62
|
rmSync(oldPath, { recursive: true, force: true });
|
|
60
63
|
} else {
|
|
@@ -68,6 +71,29 @@ function cleanupOldInstalls(targetDir) {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
function installCommandFile(targetDir) {
|
|
75
|
+
// Source: command file in the npm package
|
|
76
|
+
const sourcePath = join(__dirname, '..', 'assets', 'commands', 'lisa.md');
|
|
77
|
+
|
|
78
|
+
// Destination: where OpenCode looks for slash commands
|
|
79
|
+
const destPath = join(targetDir, '.opencode', 'commands', 'lisa.md');
|
|
80
|
+
|
|
81
|
+
// Verify source file exists
|
|
82
|
+
if (!existsSync(sourcePath)) {
|
|
83
|
+
throw new Error(`Source command file not found: ${sourcePath}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Create directory if needed
|
|
87
|
+
const destDir = dirname(destPath);
|
|
88
|
+
if (!existsSync(destDir)) {
|
|
89
|
+
mkdirSync(destDir, { recursive: true });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Copy file (overwrite if exists to ensure latest version)
|
|
93
|
+
copyFileSync(sourcePath, destPath);
|
|
94
|
+
console.log(colors.green(` Created: ${destPath}`));
|
|
95
|
+
}
|
|
96
|
+
|
|
71
97
|
async function install(targetDir) {
|
|
72
98
|
console.log('');
|
|
73
99
|
console.log(colors.cyan('Lisa - Intelligent Epic Workflow Plugin'));
|
|
@@ -89,6 +115,18 @@ async function install(targetDir) {
|
|
|
89
115
|
// Cleanup old file-based installs
|
|
90
116
|
cleanupOldInstalls(targetDir);
|
|
91
117
|
|
|
118
|
+
// Install command file for slash command autocomplete
|
|
119
|
+
try {
|
|
120
|
+
installCommandFile(targetDir);
|
|
121
|
+
} catch (err) {
|
|
122
|
+
console.log(colors.red(`Error: Failed to install command file.`));
|
|
123
|
+
console.log(colors.dim(` ${err.message}`));
|
|
124
|
+
console.log('');
|
|
125
|
+
console.log('Lisa cannot be installed without the command file.');
|
|
126
|
+
console.log('Please report this issue at https://github.com/fractalswift/lisa-simpson/issues');
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
|
|
92
130
|
// Update or create opencode.json
|
|
93
131
|
const configPath = join(targetDir, 'opencode.json');
|
|
94
132
|
let config = {};
|
package/dist/index.js
CHANGED
|
@@ -12390,31 +12390,33 @@ The input format is: \`<epic-name> [mode]\`
|
|
|
12390
12390
|
|
|
12391
12391
|
### If no arguments or \`help\`:
|
|
12392
12392
|
|
|
12393
|
-
If the user runs \`/lisa\` with no arguments, or \`/lisa help\`,
|
|
12393
|
+
If the user runs \`/lisa\` with no arguments, or \`/lisa help\`, IMMEDIATELY output EXACTLY this text (verbatim, no modifications, no tool calls):
|
|
12394
12394
|
|
|
12395
|
-
|
|
12396
|
-
Lisa - Intelligent Epic Workflow
|
|
12395
|
+
---
|
|
12397
12396
|
|
|
12398
|
-
|
|
12397
|
+
**Lisa - Intelligent Epic Workflow**
|
|
12399
12398
|
|
|
12400
|
-
|
|
12401
|
-
/lisa <name> - Continue or create an epic (interactive)
|
|
12402
|
-
/lisa <name> spec - Create/view the spec only
|
|
12403
|
-
/lisa <name> status - Show detailed epic status
|
|
12404
|
-
/lisa <name> yolo - Auto-execute mode (no confirmations)
|
|
12405
|
-
/lisa config view - View current configuration
|
|
12406
|
-
/lisa config init - Initialize config with defaults
|
|
12407
|
-
/lisa config reset - Reset config to defaults
|
|
12399
|
+
**Available Commands:**
|
|
12408
12400
|
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12401
|
+
\`/lisa list\` - List all epics and their status
|
|
12402
|
+
\`/lisa <name>\` - Continue or create an epic (interactive)
|
|
12403
|
+
\`/lisa <name> spec\` - Create/view the spec only
|
|
12404
|
+
\`/lisa <name> status\` - Show detailed epic status
|
|
12405
|
+
\`/lisa <name> yolo\` - Auto-execute mode (no confirmations)
|
|
12406
|
+
\`/lisa config view\` - View current configuration
|
|
12407
|
+
\`/lisa config init\` - Initialize config with defaults
|
|
12408
|
+
\`/lisa config reset\` - Reset config to defaults
|
|
12413
12409
|
|
|
12414
|
-
|
|
12415
|
-
|
|
12410
|
+
**Examples:**
|
|
12411
|
+
- \`/lisa list\` - See all your epics
|
|
12412
|
+
- \`/lisa auth-system\` - Start or continue the auth-system epic
|
|
12413
|
+
- \`/lisa auth-system yolo\` - Run auth-system in full auto mode
|
|
12414
|
+
|
|
12415
|
+
**Get started:** \`/lisa <epic-name>\`
|
|
12416
|
+
|
|
12417
|
+
---
|
|
12416
12418
|
|
|
12417
|
-
**
|
|
12419
|
+
**CRITICAL: Output the above help text EXACTLY as shown. Do not add explanations, do not call tools, do not be creative. Just show the menu and stop.**
|
|
12418
12420
|
|
|
12419
12421
|
### Otherwise, parse the arguments:
|
|
12420
12422
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-lisa",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Lisa - intelligent epic workflow plugin for OpenCode. Like Ralph Wiggum, but smarter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
-
"bin"
|
|
12
|
+
"bin",
|
|
13
|
+
"assets"
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
|
15
16
|
"build": "bun build src/index.ts --outdir dist --target bun --format esm",
|