opencodekit 0.12.0 → 0.12.1
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/dist/index.js +43 -15
- package/dist/template/.opencode/AGENTS.md +10 -0
- package/dist/template/.opencode/command/research.md +4 -0
- package/dist/template/.opencode/command/resume.md +11 -2
- package/dist/template/.opencode/command/status.md +3 -0
- package/dist/template/.opencode/command/triage.md +4 -0
- package/dist/template/.opencode/opencode.json +523 -480
- package/dist/template/.opencode/plugin/sessions.ts +295 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.12.
|
|
753
|
+
version: "0.12.1",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
755
|
type: "module",
|
|
756
756
|
repository: {
|
|
@@ -3133,6 +3133,8 @@ async function copyOpenCodeOnly(templateRoot, targetDir) {
|
|
|
3133
3133
|
return true;
|
|
3134
3134
|
}
|
|
3135
3135
|
async function initCommand(options = {}) {
|
|
3136
|
+
if (process.argv.includes("--quiet"))
|
|
3137
|
+
return;
|
|
3136
3138
|
const targetDir = process.cwd();
|
|
3137
3139
|
const mode = detectMode(targetDir);
|
|
3138
3140
|
oe(import_picocolors7.default.bgCyan(import_picocolors7.default.black(" OpenCodeKit ")));
|
|
@@ -3203,9 +3205,9 @@ version: 1
|
|
|
3203
3205
|
}
|
|
3204
3206
|
|
|
3205
3207
|
// src/commands/menu.ts
|
|
3208
|
+
import { existsSync as existsSync6, lstatSync as lstatSync3, readdirSync as readdirSync5 } from "node:fs";
|
|
3209
|
+
import { basename as basename2, join as join6 } from "node:path";
|
|
3206
3210
|
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
3207
|
-
import { existsSync as existsSync6, readdirSync as readdirSync5, lstatSync as lstatSync3 } from "node:fs";
|
|
3208
|
-
import { join as join6, basename as basename2 } from "node:path";
|
|
3209
3211
|
|
|
3210
3212
|
// src/commands/skill.ts
|
|
3211
3213
|
import { join as join4 } from "node:path";
|
|
@@ -3367,16 +3369,16 @@ async function viewSkill(opencodePath, skillName) {
|
|
|
3367
3369
|
}
|
|
3368
3370
|
|
|
3369
3371
|
// src/commands/upgrade.ts
|
|
3370
|
-
import { join as join5, dirname as dirname2 } from "node:path";
|
|
3371
|
-
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
3372
3372
|
import {
|
|
3373
|
+
copyFileSync,
|
|
3373
3374
|
existsSync as existsSync5,
|
|
3375
|
+
mkdirSync as mkdirSync3,
|
|
3374
3376
|
readFileSync as readFileSync5,
|
|
3375
|
-
writeFileSync as writeFileSync4,
|
|
3376
3377
|
readdirSync as readdirSync4,
|
|
3377
|
-
|
|
3378
|
-
copyFileSync
|
|
3378
|
+
writeFileSync as writeFileSync4
|
|
3379
3379
|
} from "node:fs";
|
|
3380
|
+
import { dirname as dirname2, join as join5 } from "node:path";
|
|
3381
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
3380
3382
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
3381
3383
|
var PRESERVE_FILES = [
|
|
3382
3384
|
"opencode.json"
|
|
@@ -3495,6 +3497,8 @@ function copyDirPreserveExisting(src, dest) {
|
|
|
3495
3497
|
return { updated, preserved };
|
|
3496
3498
|
}
|
|
3497
3499
|
async function upgradeCommand(options = {}) {
|
|
3500
|
+
if (process.argv.includes("--quiet"))
|
|
3501
|
+
return;
|
|
3498
3502
|
const cwd = process.cwd();
|
|
3499
3503
|
const opencodeDir = join5(cwd, ".opencode");
|
|
3500
3504
|
if (!existsSync5(opencodeDir)) {
|
|
@@ -3610,6 +3614,8 @@ async function interactiveMenu(version) {
|
|
|
3610
3614
|
}
|
|
3611
3615
|
}
|
|
3612
3616
|
async function doctorCommand() {
|
|
3617
|
+
if (process.argv.includes("--quiet"))
|
|
3618
|
+
return;
|
|
3613
3619
|
const cwd = process.cwd();
|
|
3614
3620
|
const opencodeDir = join6(cwd, ".opencode");
|
|
3615
3621
|
const checks = [];
|
|
@@ -3662,6 +3668,8 @@ async function doctorCommand() {
|
|
|
3662
3668
|
}
|
|
3663
3669
|
}
|
|
3664
3670
|
async function statusCommand() {
|
|
3671
|
+
if (process.argv.includes("--quiet"))
|
|
3672
|
+
return;
|
|
3665
3673
|
const cwd = process.cwd();
|
|
3666
3674
|
const opencodeDir = join6(cwd, ".opencode");
|
|
3667
3675
|
if (!existsSync6(opencodeDir)) {
|
|
@@ -3715,18 +3723,38 @@ async function statusCommand() {
|
|
|
3715
3723
|
// src/utils/logger.ts
|
|
3716
3724
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
3717
3725
|
var logger = {
|
|
3718
|
-
log: (message) =>
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3726
|
+
log: (message) => {
|
|
3727
|
+
if (!process.argv.includes("--quiet")) {
|
|
3728
|
+
console.log(message);
|
|
3729
|
+
}
|
|
3730
|
+
},
|
|
3731
|
+
info: (message) => {
|
|
3732
|
+
if (!process.argv.includes("--quiet")) {
|
|
3733
|
+
console.log(import_picocolors11.default.blue(`[i] ${message}`));
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
success: (message) => {
|
|
3737
|
+
if (!process.argv.includes("--quiet")) {
|
|
3738
|
+
console.log(import_picocolors11.default.green(`[+] ${message}`));
|
|
3739
|
+
}
|
|
3740
|
+
},
|
|
3741
|
+
warn: (message) => {
|
|
3742
|
+
if (!process.argv.includes("--quiet")) {
|
|
3743
|
+
console.warn(import_picocolors11.default.yellow(`[!] ${message}`));
|
|
3744
|
+
}
|
|
3745
|
+
},
|
|
3746
|
+
error: (message) => {
|
|
3747
|
+
if (!process.argv.includes("--quiet")) {
|
|
3748
|
+
console.error(import_picocolors11.default.red(`[x] ${message}`));
|
|
3749
|
+
}
|
|
3750
|
+
},
|
|
3723
3751
|
debug: (message) => {
|
|
3724
|
-
if (process.env.DEBUG || process.argv.includes("--verbose")) {
|
|
3752
|
+
if ((process.env.DEBUG || process.argv.includes("--verbose")) && !process.argv.includes("--quiet")) {
|
|
3725
3753
|
console.log(import_picocolors11.default.dim(`[DEBUG] ${message}`));
|
|
3726
3754
|
}
|
|
3727
3755
|
},
|
|
3728
3756
|
verbose: (message) => {
|
|
3729
|
-
if (process.argv.includes("--verbose")) {
|
|
3757
|
+
if (process.argv.includes("--verbose") && !process.argv.includes("--quiet")) {
|
|
3730
3758
|
console.log(import_picocolors11.default.dim(message));
|
|
3731
3759
|
}
|
|
3732
3760
|
}
|
|
@@ -401,6 +401,16 @@ read_session("today") # Today's first session
|
|
|
401
401
|
read_session("ses_abc123", focus="file changes") # Specific aspect
|
|
402
402
|
```
|
|
403
403
|
|
|
404
|
+
**`search_session`** - Full-text search across sessions
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
search_session(query="auth bug") # Search all sessions
|
|
408
|
+
search_session(query="OAuth", session_id="ses_abc") # Search specific session
|
|
409
|
+
search_session(query="error", limit=10) # Limit results
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
Use to find past discussions, decisions, or work on a topic before starting new work.
|
|
413
|
+
|
|
404
414
|
**`summarize_session`** - Generate AI summary of a session
|
|
405
415
|
|
|
406
416
|
```
|
|
@@ -39,6 +39,10 @@ bd_reserve({
|
|
|
39
39
|
**Check for previous research:**
|
|
40
40
|
|
|
41
41
|
```typescript
|
|
42
|
+
// Search for past research on this topic
|
|
43
|
+
search_session({ query: "<topic keywords>" });
|
|
44
|
+
|
|
45
|
+
// Also check recent sessions
|
|
42
46
|
list_sessions({ project: "current", since: "this week", limit: 5 });
|
|
43
47
|
```
|
|
44
48
|
|
|
@@ -94,13 +94,22 @@ Options:
|
|
|
94
94
|
|
|
95
95
|
## Phase 4: Load Previous Session Context
|
|
96
96
|
|
|
97
|
-
### Step 1:
|
|
97
|
+
### Step 1: Search for Related Work
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// Search past sessions for work on this bead
|
|
101
|
+
search_session({ query: "$ARGUMENTS" });
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This finds all sessions that discussed or worked on this bead.
|
|
105
|
+
|
|
106
|
+
### Step 2: Find Related Sessions
|
|
98
107
|
|
|
99
108
|
```typescript
|
|
100
109
|
list_sessions({ project: "current", limit: 10, _: true });
|
|
101
110
|
```
|
|
102
111
|
|
|
103
|
-
### Step
|
|
112
|
+
### Step 3: Identify Relevant Session
|
|
104
113
|
|
|
105
114
|
Look for sessions that:
|
|
106
115
|
|
|
@@ -30,6 +30,9 @@ bd_reservations({ reason: "Check file locks" });
|
|
|
30
30
|
// Sessions
|
|
31
31
|
list_sessions({ project: "current", since: "today", limit: 5, _: true });
|
|
32
32
|
|
|
33
|
+
// Search for recent activity on current work (if bead in progress)
|
|
34
|
+
search_session({ query: "<current-bead-id>", limit: 5 });
|
|
35
|
+
|
|
33
36
|
// Git state
|
|
34
37
|
bash("git status --porcelain");
|
|
35
38
|
bash("git branch --show-current");
|
|
@@ -29,6 +29,9 @@ bd_status({ include_agents: true });
|
|
|
29
29
|
bd_ls({ status: "open", limit: 50, offset: 0 });
|
|
30
30
|
bd_reservations({ reason: "Check active file locks" });
|
|
31
31
|
bd_inbox({ n: 10, unread: true, global: true });
|
|
32
|
+
|
|
33
|
+
// Search for past discussions on recurring issues
|
|
34
|
+
search_session({ query: "blocked OR regression OR urgent", limit: 10 });
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
Capture:
|
|
@@ -38,6 +41,7 @@ Capture:
|
|
|
38
41
|
- Active agents
|
|
39
42
|
- File locks
|
|
40
43
|
- Pending messages
|
|
44
|
+
- Past context on recurring issues
|
|
41
45
|
|
|
42
46
|
## Phase 3: Analyze Dependencies
|
|
43
47
|
|