opencodekit 0.4.0 → 0.6.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/dist/index.js +10 -1
- package/dist/template/.opencode/AGENTS.md +86 -55
- package/dist/template/.opencode/agent/build.md +20 -0
- package/dist/template/.opencode/agent/rush.md +27 -15
- package/dist/template/.opencode/command/init.md +176 -0
- package/dist/template/.opencode/command/summarize.md +71 -0
- package/dist/template/.opencode/memory/project/README.md +47 -16
- package/dist/template/.opencode/memory/project/architecture.md +26 -0
- package/dist/template/.opencode/memory/project/commands.md +26 -0
- package/dist/template/.opencode/memory/project/conventions.md +26 -0
- package/dist/template/.opencode/memory/project/gotchas.md +26 -0
- package/dist/template/.opencode/memory/user.example.md +21 -0
- package/dist/template/.opencode/memory/user.md +21 -0
- package/dist/template/.opencode/opencode.json +535 -470
- package/dist/template/.opencode/package.json +1 -2
- package/dist/template/.opencode/plugin/sessions.ts +26 -1
- package/package.json +1 -1
- package/dist/template/.opencode/command/setup-project.md +0 -152
- package/dist/template/.opencode/pickle-thinker.jsonc +0 -11
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@opencode-ai/plugin": "1.0.
|
|
14
|
+
"@opencode-ai/plugin": "1.0.186"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
18
17
|
"@types/node": "^20.19.27",
|
|
19
18
|
"fs": "^0.0.1-security",
|
|
20
19
|
"path": "^0.12.7",
|
|
@@ -61,7 +61,7 @@ function parseDate(dateStr: string): Date | null {
|
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const SessionsPlugin: Plugin = async ({ directory }) => {
|
|
64
|
+
export const SessionsPlugin: Plugin = async ({ client, directory }) => {
|
|
65
65
|
const storageDir = join(
|
|
66
66
|
process.env.HOME || "",
|
|
67
67
|
".local/share/opencode/storage",
|
|
@@ -158,6 +158,31 @@ export const SessionsPlugin: Plugin = async ({ directory }) => {
|
|
|
158
158
|
|
|
159
159
|
return {
|
|
160
160
|
tool: {
|
|
161
|
+
summarize_session: tool({
|
|
162
|
+
description:
|
|
163
|
+
"Generate an AI summary of a session using the new auto parameter. Useful for quickly understanding what happened in a previous session.",
|
|
164
|
+
args: {
|
|
165
|
+
session_id: tool.schema
|
|
166
|
+
.string()
|
|
167
|
+
.describe("Session ID to summarize (e.g. 'ses_abc123')"),
|
|
168
|
+
},
|
|
169
|
+
async execute(args) {
|
|
170
|
+
try {
|
|
171
|
+
// Use compaction model from config: proxypal/gemini-3-flash-preview
|
|
172
|
+
const result = await client.session.summarize({
|
|
173
|
+
path: { id: args.session_id },
|
|
174
|
+
body: {
|
|
175
|
+
providerID: "proxypal",
|
|
176
|
+
modelID: "gemini-3-flash-preview",
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
return `Session summarized successfully.\n\n${JSON.stringify(result, null, 2)}`;
|
|
180
|
+
} catch (error) {
|
|
181
|
+
return `Error summarizing session: ${error instanceof Error ? error.message : String(error)}`;
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
}),
|
|
185
|
+
|
|
161
186
|
list_sessions: tool({
|
|
162
187
|
description:
|
|
163
188
|
"List OpenCode sessions with metadata. Filter by project and date. Use this before read_session to discover available sessions.",
|
package/package.json
CHANGED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Initialize project context for AI-assisted development
|
|
3
|
-
argument-hint: "[--full] [--minimal]"
|
|
4
|
-
agent: planner
|
|
5
|
-
model: proxypal/gemini-3-flash-preview
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Setup Project: $ARGUMENTS
|
|
9
|
-
|
|
10
|
-
Initialize project context files that AI agents and beads can reference.
|
|
11
|
-
|
|
12
|
-
## Instructions
|
|
13
|
-
|
|
14
|
-
Parse options from `$ARGUMENTS`:
|
|
15
|
-
|
|
16
|
-
- `--full`: Create all context files with detailed prompts
|
|
17
|
-
- `--minimal`: Create only essential files (default)
|
|
18
|
-
|
|
19
|
-
## Context Files to Create
|
|
20
|
-
|
|
21
|
-
### Essential (always created)
|
|
22
|
-
|
|
23
|
-
**`.opencode/memory/project/product.md`**
|
|
24
|
-
|
|
25
|
-
```markdown
|
|
26
|
-
# Product Context
|
|
27
|
-
|
|
28
|
-
## Vision
|
|
29
|
-
|
|
30
|
-
[What is this product? What problem does it solve?]
|
|
31
|
-
|
|
32
|
-
## Target Users
|
|
33
|
-
|
|
34
|
-
[Who uses this? What are their needs?]
|
|
35
|
-
|
|
36
|
-
## Key Features
|
|
37
|
-
|
|
38
|
-
1. [Feature 1]
|
|
39
|
-
2. [Feature 2]
|
|
40
|
-
|
|
41
|
-
## Success Metrics
|
|
42
|
-
|
|
43
|
-
- [How do we measure success?]
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**`.opencode/memory/project/tech-stack.md`**
|
|
47
|
-
|
|
48
|
-
```markdown
|
|
49
|
-
# Tech Stack
|
|
50
|
-
|
|
51
|
-
## Languages
|
|
52
|
-
|
|
53
|
-
- [Primary language and version]
|
|
54
|
-
|
|
55
|
-
## Frameworks
|
|
56
|
-
|
|
57
|
-
- [Framework 1]: [Purpose]
|
|
58
|
-
|
|
59
|
-
## Infrastructure
|
|
60
|
-
|
|
61
|
-
- [Hosting, CI/CD, etc.]
|
|
62
|
-
|
|
63
|
-
## Key Dependencies
|
|
64
|
-
|
|
65
|
-
| Package | Version | Purpose |
|
|
66
|
-
| ------- | ------- | ------- |
|
|
67
|
-
| [name] | [ver] | [why] |
|
|
68
|
-
|
|
69
|
-
## Development Setup
|
|
70
|
-
|
|
71
|
-
[How to get started locally]
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Full Setup (with --full)
|
|
75
|
-
|
|
76
|
-
**`.opencode/memory/project/workflow.md`**
|
|
77
|
-
|
|
78
|
-
```markdown
|
|
79
|
-
# Development Workflow
|
|
80
|
-
|
|
81
|
-
## Branch Strategy
|
|
82
|
-
|
|
83
|
-
- main: Production
|
|
84
|
-
- develop: Integration
|
|
85
|
-
- feature/\*: New features
|
|
86
|
-
- fix/\*: Bug fixes
|
|
87
|
-
|
|
88
|
-
## Code Review
|
|
89
|
-
|
|
90
|
-
[Review requirements]
|
|
91
|
-
|
|
92
|
-
## Testing Requirements
|
|
93
|
-
|
|
94
|
-
[What must be tested]
|
|
95
|
-
|
|
96
|
-
## Deployment Process
|
|
97
|
-
|
|
98
|
-
[How code gets to production]
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**`.opencode/memory/project/conventions.md`**
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
# Coding Conventions
|
|
105
|
-
|
|
106
|
-
## Naming
|
|
107
|
-
|
|
108
|
-
- Files: [convention]
|
|
109
|
-
- Components: [convention]
|
|
110
|
-
- Variables: [convention]
|
|
111
|
-
|
|
112
|
-
## Structure
|
|
113
|
-
|
|
114
|
-
- [Directory structure rules]
|
|
115
|
-
|
|
116
|
-
## Patterns
|
|
117
|
-
|
|
118
|
-
- [Design patterns used]
|
|
119
|
-
|
|
120
|
-
## Anti-patterns
|
|
121
|
-
|
|
122
|
-
- [What to avoid]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Process
|
|
126
|
-
|
|
127
|
-
1. Check if context files already exist
|
|
128
|
-
2. If exists, offer to update or skip
|
|
129
|
-
3. Analyze codebase to pre-fill where possible:
|
|
130
|
-
- Detect tech stack from package.json, go.mod, etc.
|
|
131
|
-
- Identify patterns from existing code
|
|
132
|
-
- Extract project info from README
|
|
133
|
-
4. Create files with intelligent defaults
|
|
134
|
-
5. Report what was created
|
|
135
|
-
|
|
136
|
-
## Integration with Beads
|
|
137
|
-
|
|
138
|
-
After setup, beads can reference:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
bd new feature "Add login" --context .opencode/memory/project/
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Output
|
|
145
|
-
|
|
146
|
-
Report:
|
|
147
|
-
|
|
148
|
-
- Files created/updated
|
|
149
|
-
- Detected tech stack
|
|
150
|
-
- Suggested next steps
|
|
151
|
-
|
|
152
|
-
Save to `.opencode/memory/project/`
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Ultrathink config for pickle-thinker
|
|
3
|
-
// mode: "lite" keeps the original behavior (prefix user prompts only).
|
|
4
|
-
// mode: "tool" adds an extra user turn after each tool result to force deeper analysis.
|
|
5
|
-
// Note: tool mode increases turns/tokens and may impact subscription limits.
|
|
6
|
-
"enabled": true,
|
|
7
|
-
// "lite" | "tool"
|
|
8
|
-
"mode": "tool",
|
|
9
|
-
// Change the thinking keyword if you like
|
|
10
|
-
"prefix": "Ultrathink: "
|
|
11
|
-
}
|