opencodekit 0.16.1 → 0.16.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/dist/index.js CHANGED
@@ -750,9 +750,16 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.16.1",
753
+ version: "0.16.3",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
- keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
755
+ keywords: [
756
+ "agents",
757
+ "cli",
758
+ "mcp",
759
+ "opencode",
760
+ "opencodekit",
761
+ "template"
762
+ ],
756
763
  license: "MIT",
757
764
  author: "OpenCodeKit",
758
765
  repository: {
@@ -762,7 +769,10 @@ var package_default = {
762
769
  bin: {
763
770
  ock: "dist/index.js"
764
771
  },
765
- files: ["dist", "README.md"],
772
+ files: [
773
+ "dist",
774
+ "README.md"
775
+ ],
766
776
  type: "module",
767
777
  publishConfig: {
768
778
  access: "public",
@@ -808,7 +818,9 @@ var package_default = {
808
818
  engines: {
809
819
  bun: ">=1.3.2"
810
820
  },
811
- trustedDependencies: ["@beads/bd"]
821
+ trustedDependencies: [
822
+ "@beads/bd"
823
+ ]
812
824
  };
813
825
 
814
826
  // src/commands/agent.ts
@@ -16,6 +16,27 @@ Everything else is guidelines, not laws.
16
16
 
17
17
  ---
18
18
 
19
+ ## Trust Hierarchy
20
+
21
+ **DO NOT search when instructions already exist.** Searching is expensive. Follow this order:
22
+
23
+ 1. **AGENTS.md** - Project-specific rules (this file or `./AGENTS.md`)
24
+ 2. **Memory** - Past decisions, patterns, gotchas (`memory-search`)
25
+ 3. **Project files** - `.opencode/memory/project/` (commands, conventions, tech-stack)
26
+ 4. **Codebase search** - Only if above sources are incomplete or wrong
27
+
28
+ If instructions are incomplete or wrong, **update them** after finding the truth. Don't just use the correct info once—fix the source so future work benefits.
29
+
30
+ ### Atomic Version
31
+
32
+ ```
33
+ DO NOT search when instructions exist.
34
+ TRUST: AGENTS.md → memory → project files → search
35
+ UPDATE instructions when you find errors.
36
+ ```
37
+
38
+ ---
39
+
19
40
  ## Skills vs Commands
20
41
 
21
42
  - Use **commands** for user-facing entrypoints (workflows and intent).
@@ -423,7 +444,25 @@ Before you start implementing, verify the requirements are clear. If interpretat
423
444
 
424
445
  Before you claim completion, verify these things:
425
446
 
426
- 1. **Run review agent** on any significant code changes:
447
+ 1. **Run validation commands** (in order):
448
+
449
+ ```bash
450
+ # Type check (REQUIRED if TypeScript/JavaScript)
451
+ npm run typecheck # or: bun run typecheck, tsc --noEmit
452
+
453
+ # Build (REQUIRED)
454
+ npm run build # or: bun run build, cargo build, go build
455
+
456
+ # Test (REQUIRED if tests exist)
457
+ npm test # or: bun test, cargo test, go test, pytest
458
+
459
+ # Lint (REQUIRED if linter configured)
460
+ npm run lint # or: bun run lint, cargo clippy, golangci-lint
461
+ ```
462
+
463
+ Skip only if project lacks that script. Document missing scripts in `project/gotchas.md`.
464
+
465
+ 2. **Run review agent** on any significant code changes:
427
466
 
428
467
  ```typescript
429
468
  Task({
@@ -435,11 +474,12 @@ Before you claim completion, verify these things:
435
474
 
436
475
  If review suggests simplification, implement it before proceeding.
437
476
 
438
- 2. You ran `bd close <id>` with a meaningful reason
439
- 3. You ran `bd sync` to push changes
440
- 4. There are no pending LSP nudges
441
- 5. You saved observations for any important decisions or patterns
477
+ 3. You ran `bd close <id>` with a meaningful reason
478
+ 4. You ran `bd sync` to push changes
479
+ 5. There are no pending LSP nudges
480
+ 6. You saved observations for any important decisions or patterns
442
481
 
482
+ **DO NOT skip validation commands.** Failed builds/tests after merge waste everyone's time.
443
483
  **DO NOT skip the Oracle critique for non-trivial changes.** This prevents bloated, overcomplicated solutions that could be 10x simpler.
444
484
 
445
485
  ---
@@ -130,15 +130,61 @@ To construct a permalink: use `grepsearch` to find code, then build the URL from
130
130
  | Priority | Tool | Use Case | Speed |
131
131
  | -------- | ------------- | ----------------------------------------- | ------- |
132
132
  | 1 | memory-search | Past research findings | Instant |
133
- | 2 | context7 | Official library docs | Fast |
134
- | 3 | codesearch | Exa Code API for SDK/library patterns | Fast |
135
- | 4 | grepsearch | Cross-repo GitHub code search (1M+ repos) | Medium |
136
- | 5 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
137
- | 6 | opensrc + LSP | Clone & analyze source code | Slow |
138
- | 7 | websearch | Tutorials, blog posts, recent news | Slow |
133
+ | 2 | v1-run | npm package health, vulns, comparisons | Fast |
134
+ | 3 | context7 | Official library docs | Fast |
135
+ | 4 | codesearch | Exa Code API for SDK/library patterns | Fast |
136
+ | 5 | grepsearch | Cross-repo GitHub code search (1M+ repos) | Medium |
137
+ | 6 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
138
+ | 7 | opensrc + LSP | Clone & analyze source code | Slow |
139
+ | 8 | websearch | Tutorials, blog posts, recent news | Slow |
139
140
 
140
141
  **Rule:** Exhaust faster tools before slower ones. Run tools in parallel when independent.
141
142
 
143
+ ## v1-run MCP (npm Package Intelligence)
144
+
145
+ Use for npm package evaluation before adding dependencies. Load the skill first:
146
+
147
+ ```typescript
148
+ skill({ name: "v1-run" });
149
+ ```
150
+
151
+ ### Primary Tool: get_package_health
152
+
153
+ ```typescript
154
+ // Comprehensive health check (use this first)
155
+ skill_mcp({ skill_name: "v1-run", tool_name: "get_package_health", arguments: '{"name": "zod"}' });
156
+ ```
157
+
158
+ Returns: version, vulnerabilities, health score (0-100), downloads, TypeScript support, maintenance status, AI recommendation.
159
+
160
+ ### Compare Packages
161
+
162
+ ```typescript
163
+ // Side-by-side comparison (2-5 packages)
164
+ skill_mcp({
165
+ skill_name: "v1-run",
166
+ tool_name: "compare_packages",
167
+ arguments: '{"packages": ["zod", "yup", "joi"]}',
168
+ });
169
+ ```
170
+
171
+ ### Other Tools
172
+
173
+ | Tool | Use Case |
174
+ | ----------------------- | ------------------------------------- |
175
+ | `check_vulnerabilities` | Security audit for specific version |
176
+ | `check_deprecated` | Check if package is deprecated |
177
+ | `find_alternatives` | Discover better options for a package |
178
+ | `check_types` | Verify TypeScript support |
179
+ | `get_package_version` | Get latest version only |
180
+
181
+ **When to use v1-run:**
182
+
183
+ - Choosing between npm packages → `compare_packages`
184
+ - Before adding a dependency → `get_package_health`
185
+ - Security audit → `check_vulnerabilities`
186
+ - Package seems abandoned → `find_alternatives`
187
+
142
188
  ## context7 Tools
143
189
 
144
190
  Use to access up-to-date library documentation (37.6k+ libraries).
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  description: Create a specification for a bead using templates
3
3
  argument-hint: "<bead-id> [--prd] [--proposal]"
4
- agent: plan
5
- subtask: true
4
+ agent: build
6
5
  ---
7
6
 
8
7
  # Create: $ARGUMENTS
@@ -108,7 +107,8 @@ question({
108
107
  },
109
108
  {
110
109
  header: "Users",
111
- question: "Who will use this? (developers, end users, API consumers, etc.)",
110
+ question:
111
+ "Who will use this? (developers, end users, API consumers, etc.)",
112
112
  options: [
113
113
  { label: "Developers", description: "Internal tooling or API" },
114
114
  { label: "End users", description: "Customer-facing feature" },
@@ -23,6 +23,9 @@ if (thorough) {
23
23
  skill({ name: "deep-research" });
24
24
  }
25
25
 
26
+ // For npm package evaluation
27
+ skill({ name: "v1-run" });
28
+
26
29
  // For source code analysis
27
30
  skill({ name: "source-code-research" });
28
31
 
@@ -149,10 +152,11 @@ If memory search fails (Ollama not running), continue to external sources.
149
152
 
150
153
  1. **Codebase patterns** (highest trust) - Delegate to @explore for LSP analysis
151
154
  2. **Official docs** (high trust) - What does the library documentation say?
152
- 3. **Context7** (high trust) - API usage and examples
153
- 4. **Source code** (high trust) - Library implementation (use `source-code-research` skill)
154
- 5. **GitHub examples** (medium trust) - Real-world patterns via codesearch/grepsearch
155
- 6. **Web search** (lower trust) - Only if tiers 1-5 don't answer
155
+ 3. **v1-run** (high trust) - npm package health, vulnerabilities, comparisons
156
+ 4. **Context7** (high trust) - API usage and examples
157
+ 5. **Source code** (high trust) - Library implementation (use `source-code-research` skill)
158
+ 6. **GitHub examples** (medium trust) - Real-world patterns via codesearch/grepsearch
159
+ 7. **Web search** (lower trust) - Only if tiers 1-6 don't answer
156
160
 
157
161
  ## Research
158
162
 
@@ -1,72 +1,81 @@
1
1
  {
2
- "$schema": "https://unpkg.com/@anthropic/dynamic-context-protocol@1.2.7/schema.json",
3
- "enabled": true,
4
- "debug": false,
5
- // "minimal" shows prune activity without noise; "detailed" shows token counts
6
- "pruneNotification": "off",
7
- "turnProtection": {
8
- "enabled": true,
9
- // 3 turns = faster cleanup while still protecting recent context
10
- "turns": 3,
11
- },
12
- // Protected file patterns - never auto-prune reads of these files (v1.1.5+)
13
- "protectedFilePatterns": [
14
- "**/.env*",
15
- "**/AGENTS.md",
16
- "**/.opencode/**",
17
- "**/.beads/**",
18
- "**/package.json",
19
- "**/tsconfig.json",
20
- "**/biome.json",
21
- ],
22
- "tools": {
23
- "settings": {
24
- "nudgeEnabled": true,
25
- // Nudge every 8 tool calls (slightly more aggressive than default 10)
26
- "nudgeFrequency": 8,
27
- // Protect state-modifying and critical workflow tools
28
- "protectedTools": [
29
- "write",
30
- "edit",
31
- "memory-update",
32
- "skill",
33
- "skill_mcp",
34
- "task",
35
- "batch",
36
- "todowrite",
37
- "todoread",
38
- "lsp",
39
- "lsp_lsp_rename",
40
- "lsp_lsp_find_references",
41
- "lsp_lsp_goto_definition",
42
- "lsp_lsp_code_actions",
43
- "lsp_lsp_code_action_apply",
44
- "lsp_lsp_organize_imports",
45
- ],
46
- },
47
- "discard": {
48
- "enabled": true,
49
- },
50
- "extract": {
51
- "enabled": true,
52
- "showDistillation": false,
53
- },
54
- },
55
- "strategies": {
56
- // Dedup = zero LLM cost, high impact - always enable
57
- "deduplication": {
58
- "enabled": true,
59
- "protectedTools": [],
60
- },
61
- // Supersede writes = zero cost, removes redundant write inputs after read
62
- "supersedeWrites": {
63
- "enabled": true,
64
- },
65
- // Purge error inputs after 3 turns
66
- "purgeErrors": {
67
- "enabled": true,
68
- "turns": 3,
69
- "protectedTools": [],
70
- },
71
- },
2
+ "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/dev/dcp.schema.json",
3
+ "enabled": true,
4
+ "debug": false,
5
+ // "minimal" shows prune activity without noise; "detailed" shows token counts
6
+ "pruneNotification": "off",
7
+ // "chat" (in-conversation) or "toast" (system notification) - beta feature
8
+ "pruneNotificationType": "chat",
9
+ // Commands: /dcp context, /dcp stats, /dcp sweep
10
+ "commands": {
11
+ "enabled": true,
12
+ // Protect these from /dcp sweep
13
+ "protectedTools": ["observation", "memory-update", "memory-search"]
14
+ },
15
+ "turnProtection": {
16
+ "enabled": true,
17
+ "turns": 4
18
+ },
19
+ // Protected file patterns - never auto-prune reads of these files
20
+ "protectedFilePatterns": [
21
+ "**/.env*",
22
+ "**/AGENTS.md",
23
+ "**/.opencode/**",
24
+ "**/.beads/**",
25
+ "**/package.json",
26
+ "**/tsconfig.json",
27
+ "**/biome.json"
28
+ ],
29
+ "tools": {
30
+ "settings": {
31
+ "nudgeEnabled": true,
32
+ "nudgeFrequency": 10,
33
+ // Protect state-modifying and critical workflow tools
34
+ // LSP excluded: ephemeral exploration, prune after understanding
35
+ "protectedTools": [
36
+ "write",
37
+ "edit",
38
+ "memory-update",
39
+ "observation",
40
+ "skill",
41
+ "skill_mcp",
42
+ "task",
43
+ "batch",
44
+ "todowrite",
45
+ "todoread"
46
+ ]
47
+ },
48
+ // Beta: renamed from "discard" - removes tool content without preservation
49
+ "prune": {
50
+ "enabled": true
51
+ },
52
+ // Beta: renamed from "extract" - distills key findings before removing
53
+ "distill": {
54
+ "enabled": true,
55
+ "showDistillation": false
56
+ },
57
+ // Beta: NEW - collapses range of messages + tools into single summary
58
+ "compress": {
59
+ "enabled": true,
60
+ "showCompression": true
61
+ }
62
+ },
63
+ "strategies": {
64
+ // Dedup = zero LLM cost, high impact - always enable
65
+ "deduplication": {
66
+ "enabled": true,
67
+ "protectedTools": []
68
+ },
69
+ // Supersede writes = zero cost, removes redundant write inputs after read
70
+ // Note: default changed to false in beta, we explicitly enable
71
+ "supersedeWrites": {
72
+ "enabled": true
73
+ },
74
+ // Purge error inputs after N turns
75
+ "purgeErrors": {
76
+ "enabled": true,
77
+ "turns": 4,
78
+ "protectedTools": []
79
+ }
80
+ }
72
81
  }
@@ -155,7 +155,7 @@
155
155
  }
156
156
  },
157
157
  "plugin": [
158
- "@tarquinen/opencode-dcp@latest",
158
+ "@tarquinen/opencode-dcp@beta",
159
159
  "@franlol/opencode-md-table-formatter@0.0.3"
160
160
  ],
161
161
  "provider": {
@@ -11,7 +11,7 @@
11
11
  "type-check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@opencode-ai/plugin": "1.1.48"
14
+ "@opencode-ai/plugin": "1.1.49"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^25.1.0",
@@ -20,14 +20,11 @@ export function convertToOpenAICompatibleChatMessages(
20
20
  const metadata = getOpenAIMetadata({ ...message });
21
21
  switch (role) {
22
22
  case "system": {
23
+ // v1.1.49 fix: Copilot API expects system message content as plain string,
24
+ // not array format. Array format causes AGENTS.md to be silently ignored.
23
25
  messages.push({
24
26
  role: "system",
25
- content: [
26
- {
27
- type: "text",
28
- text: content,
29
- },
30
- ],
27
+ content: content,
31
28
  ...metadata,
32
29
  });
33
30
  break;
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: v1-run
3
+ description: npm package intelligence via MCP. Real-time versions, vulnerability data, health scores, and package comparisons. Use when selecting npm packages, checking for vulnerabilities, or comparing alternatives.
4
+ ---
5
+
6
+ # v1.run MCP
7
+
8
+ Fast, accurate npm package intelligence for AI agents via Model Context Protocol.
9
+
10
+ ## Overview
11
+
12
+ v1.run is an MCP-first npm registry by Midday.ai that provides:
13
+
14
+ - **Real-time version data** - No hallucinated packages
15
+ - **Security vulnerabilities** - From OSV database
16
+ - **Health scores** - Automated 0-100 scoring
17
+ - **Package comparisons** - 50+ pre-built categories
18
+
19
+ ## MCP Endpoint
20
+
21
+ **URL**: `https://api.v1.run/mcp`
22
+
23
+ **Authentication**: None required (public API)
24
+
25
+ ## Configuration
26
+
27
+ v1.run MCP is pre-configured as a skill. Load it with:
28
+
29
+ ```typescript
30
+ skill({ name: "v1-run" });
31
+ ```
32
+
33
+ ### Manual Setup (if needed)
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "v1": {
39
+ "url": "https://api.v1.run/mcp"
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ## Available Tools
46
+
47
+ | Tool | Description |
48
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------- |
49
+ | `get_package_health` | Comprehensive health assessment (primary tool) - version, vulns, score, downloads, TS support, AI recommendations |
50
+ | `get_package_version` | Get latest version of a package |
51
+ | `check_deprecated` | Check if package is deprecated + get alternatives |
52
+ | `check_types` | Check TypeScript support (bundled or @types) |
53
+ | `check_vulnerabilities` | Security vulnerabilities from OSV database |
54
+ | `find_alternatives` | Find alternative packages with recommendations |
55
+ | `compare_packages` | Side-by-side comparison (2-5 packages) |
56
+
57
+ ## Health Score System
58
+
59
+ Packages are scored 0-100 based on:
60
+
61
+ | Factor | Weight | Measures |
62
+ | ----------- | ------ | --------------------------------------- |
63
+ | Downloads | 20% | Weekly downloads + trend direction |
64
+ | Bundle Size | 20% | Smaller gzip = higher score |
65
+ | Freshness | 25% | Recent commits and releases |
66
+ | Community | 10% | Stars, contributors |
67
+ | Quality | 25% | TypeScript, ESM, security, tree-shaking |
68
+
69
+ ## Usage Examples
70
+
71
+ ### Check Package Health
72
+
73
+ ```typescript
74
+ // Get comprehensive health info for a package (primary tool)
75
+ skill_mcp({ skill_name: "v1-run", tool_name: "get_package_health", arguments: '{"name": "zod"}' });
76
+ ```
77
+
78
+ Response includes:
79
+
80
+ - Latest version
81
+ - Known vulnerabilities (CVEs)
82
+ - Health score (0-100) with grade
83
+ - Weekly downloads + trend
84
+ - TypeScript support
85
+ - Maintenance status
86
+ - AI recommendation
87
+
88
+ ### Check for Deprecation
89
+
90
+ ```typescript
91
+ // Check if package is deprecated and get alternatives
92
+ skill_mcp({
93
+ skill_name: "v1-run",
94
+ tool_name: "check_deprecated",
95
+ arguments: '{"name": "request"}',
96
+ });
97
+ ```
98
+
99
+ ### Check Vulnerabilities
100
+
101
+ ```typescript
102
+ // Check specific version for security issues
103
+ skill_mcp({
104
+ skill_name: "v1-run",
105
+ tool_name: "check_vulnerabilities",
106
+ arguments: '{"name": "lodash", "version": "4.17.20"}',
107
+ });
108
+ ```
109
+
110
+ ### Find Alternatives
111
+
112
+ ```typescript
113
+ // Find alternative packages
114
+ skill_mcp({
115
+ skill_name: "v1-run",
116
+ tool_name: "find_alternatives",
117
+ arguments: '{"name": "moment"}',
118
+ });
119
+ ```
120
+
121
+ ### Compare Packages
122
+
123
+ ```typescript
124
+ // Compare similar packages (2-5 packages)
125
+ skill_mcp({
126
+ skill_name: "v1-run",
127
+ tool_name: "compare_packages",
128
+ arguments: '{"packages": ["zod", "yup", "joi", "valibot"]}',
129
+ });
130
+ ```
131
+
132
+ ## Pre-built Categories (50+)
133
+
134
+ v1.run includes comparisons for popular package categories:
135
+
136
+ - **HTTP clients**: axios, got, ky, node-fetch
137
+ - **Date libraries**: moment, date-fns, dayjs, luxon
138
+ - **Validation**: zod, yup, joi, ajv, valibot
139
+ - **State management**: redux, zustand, jotai, recoil
140
+ - **ORM**: prisma, drizzle, typeorm, sequelize
141
+ - **Testing**: vitest, jest, mocha, ava
142
+ - **Bundlers**: vite, esbuild, webpack, rollup
143
+ - **Logging**: pino, winston, bunyan
144
+
145
+ ## When to Use
146
+
147
+ Use v1.run MCP when:
148
+
149
+ 1. **Choosing between packages** - Get objective comparisons
150
+ 2. **Checking for vulnerabilities** - Before adding dependencies
151
+ 3. **Evaluating maintenance** - Is the package actively maintained?
152
+ 4. **Finding alternatives** - Discover better options for a package
153
+
154
+ ## Best Practices
155
+
156
+ 1. **Always check health** before adding new dependencies
157
+ 2. **Compare alternatives** when multiple packages solve the same problem
158
+ 3. **Verify TypeScript support** for TypeScript projects
159
+ 4. **Check bundle size** for frontend applications
160
+
161
+ ## Documentation
162
+
163
+ - [v1.run](https://v1.run)
164
+ - [GitHub: midday-ai/v1](https://github.com/midday-ai/v1)
165
+ - [MCP Documentation](https://modelcontextprotocol.io)
@@ -0,0 +1,6 @@
1
+ {
2
+ "v1": {
3
+ "command": "npx",
4
+ "args": ["-y", "mcp-remote", "https://api.v1.run/mcp"]
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
- "keywords": ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
5
+ "keywords": [
6
+ "agents",
7
+ "cli",
8
+ "mcp",
9
+ "opencode",
10
+ "opencodekit",
11
+ "template"
12
+ ],
6
13
  "license": "MIT",
7
14
  "author": "OpenCodeKit",
8
15
  "repository": {
@@ -12,7 +19,10 @@
12
19
  "bin": {
13
20
  "ock": "dist/index.js"
14
21
  },
15
- "files": ["dist", "README.md"],
22
+ "files": [
23
+ "dist",
24
+ "README.md"
25
+ ],
16
26
  "type": "module",
17
27
  "publishConfig": {
18
28
  "access": "public",
@@ -58,5 +68,7 @@
58
68
  "engines": {
59
69
  "bun": ">=1.3.2"
60
70
  },
61
- "trustedDependencies": ["@beads/bd"]
71
+ "trustedDependencies": [
72
+ "@beads/bd"
73
+ ]
62
74
  }