opencodekit 0.18.25 → 0.18.27

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
@@ -20,7 +20,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
21
  //#endregion
22
22
  //#region package.json
23
- var version = "0.18.25";
23
+ var version = "0.18.27";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -1,72 +1,83 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
3
- "enabled": true,
4
- "debug": false,
5
- // "minimal" shows prune activity without noise; "detailed" shows token counts
6
- "pruneNotification": "detailed",
7
- // "chat" (in-conversation) or "toast" (system notification)
8
- "pruneNotificationType": "toast",
9
- // Commands: /dcp context, /dcp stats, /dcp sweep, /dcp compress, /dcp decompress, /dcp recompress
10
- "commands": {
11
- "enabled": true,
12
- // Protect these from /dcp sweep
13
- "protectedTools": ["observation", "memory-update", "memory-search"]
14
- },
15
- // Manual mode: disables autonomous context management
16
- "manualMode": {
17
- "enabled": false,
18
- "automaticStrategies": true
19
- },
20
- "turnProtection": {
21
- "enabled": true,
22
- "turns": 4
23
- },
24
- // Protected file patterns - never auto-prune reads of these files
25
- "protectedFilePatterns": [
26
- "**/.env*",
27
- "**/AGENTS.md",
28
- "**/.opencode/**",
29
- "**/.beads/**",
30
- "**/package.json",
31
- "**/tsconfig.json",
32
- "**/biome.json"
33
- ],
34
- "compress": {
35
- // v3.0.0: single compress tool replaces the old 3-tool system
36
- "permission": "allow",
37
- "showCompression": false,
38
- "maxContextLimit": "80%",
39
- "minContextLimit": 50000,
40
- "nudgeFrequency": 5,
41
- "iterationNudgeThreshold": 15,
42
- "nudgeForce": "soft",
43
- "flatSchema": false,
44
- "protectUserMessages": true,
45
- // v3.0.0 auto-protects: task, skill, todowrite, todoread, compress, batch, plan_enter, plan_exit
46
- // Only list additional tools here
47
- "protectedTools": ["write", "edit", "memory-*", "observation", "tilth_*"]
48
- },
49
- // Experimental features
50
- "experimental": {
51
- "allowSubAgents": true,
52
- "customPrompts": false
53
- },
54
- // Auto strategies
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 N turns
66
- "purgeErrors": {
67
- "enabled": true,
68
- "turns": 4,
69
- "protectedTools": []
70
- }
71
- }
2
+ "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
3
+ "enabled": true,
4
+ "debug": false,
5
+ // "off" | "minimal" | "detailed" keep minimal for low-noise dev flow
6
+ "pruneNotification": "minimal",
7
+ // "chat" (in-conversation) or "toast" (system notification)
8
+ "pruneNotificationType": "toast",
9
+ // Slash commands: /dcp context, /dcp stats, /dcp sweep, /dcp compress, /dcp decompress, /dcp recompress
10
+ "commands": {
11
+ "enabled": true,
12
+ // Additional tools to protect from /dcp sweep (supports glob wildcards)
13
+ "protectedTools": ["observation", "memory-*"],
14
+ },
15
+ // Manual mode: disables autonomous context management
16
+ "manualMode": {
17
+ "enabled": false,
18
+ "automaticStrategies": true,
19
+ },
20
+ // Protect recent tool outputs from pruning
21
+ "turnProtection": {
22
+ "enabled": false,
23
+ "turns": 4,
24
+ },
25
+ // Glob patterns for files that should never be auto-pruned
26
+ // Keep tight: broad patterns reduce DCP effectiveness
27
+ "protectedFilePatterns": [
28
+ "**/.env*",
29
+ "**/AGENTS.md",
30
+ "**/.opencode/**",
31
+ "**/.beads/**",
32
+ "**/package.json",
33
+ "**/tsconfig.json",
34
+ ],
35
+ // Unified context compression tool (v3.1.0)
36
+ "compress": {
37
+ // "range" (stable) compresses spans into block summaries
38
+ // "message" (experimental) compresses individual raw messages
39
+ "mode": "message",
40
+ // "allow" (no prompt) | "ask" (prompt) | "deny" (tool not registered)
41
+ "permission": "allow",
42
+ "showCompression": false,
43
+ // v3.1.0: active summary tokens extend effective maxContextLimit
44
+ "summaryBuffer": true,
45
+ // Soft upper threshold: above this, strong compression nudges fire
46
+ // Accepts number or "X%" of model context window
47
+ "maxContextLimit": "80%",
48
+ // Soft lower threshold: below this, turn/iteration reminders are off
49
+ "minContextLimit": "35%",
50
+ // How often context-limit nudge fires above maxContextLimit (1 = every fetch)
51
+ "nudgeFrequency": 5,
52
+ // Messages since last user message before adding compression reminders
53
+ "iterationNudgeThreshold": 15,
54
+ // "strong" = more likely to compress, "soft" = less likely
55
+ "nudgeForce": "soft",
56
+ // Keep user messages compressible to avoid permanent context growth
57
+ "protectUserMessages": false,
58
+ // Auto-protected by DCP: task, skill, todowrite, todoread, compress, batch, plan_enter, plan_exit, write, edit
59
+ // Only list ADDITIONAL tools whose outputs should be appended to compression summaries
60
+ "protectedTools": ["observation", "memory-*", "tilth_*"],
61
+ },
62
+ // Experimental features
63
+ "experimental": {
64
+ // Allow DCP processing in subagent sessions (default: false)
65
+ "allowSubAgents": false,
66
+ // Enable user-editable prompt overrides under dcp-prompts directories
67
+ "customPrompts": false,
68
+ },
69
+ // Automatic pruning strategies (zero LLM cost)
70
+ "strategies": {
71
+ // Removes duplicate tool calls (same tool + same arguments), keeps most recent
72
+ "deduplication": {
73
+ "enabled": true,
74
+ "protectedTools": [],
75
+ },
76
+ // Prunes inputs from errored tool calls after N turns (error messages preserved)
77
+ "purgeErrors": {
78
+ "enabled": true,
79
+ "turns": 4,
80
+ "protectedTools": [],
81
+ },
82
+ },
72
83
  }
Binary file
@@ -129,16 +129,6 @@
129
129
  "session_parent": "<leader>up"
130
130
  },
131
131
  "mcp": {
132
- "stitch": {
133
- "enabled": false,
134
- "headers": {
135
- "Authorization": "Bearer {env:STITCH_ACCESS_TOKEN}",
136
- "X-Goog-User-Project": "{env:GOOGLE_CLOUD_PROJECT}"
137
- },
138
- "oauth": false,
139
- "type": "remote",
140
- "url": "https://stitch.googleapis.com/mcp"
141
- },
142
132
  "tilth": {
143
133
  "command": [
144
134
  "npx",
@@ -11,7 +11,8 @@
11
11
  "type-check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@opencode-ai/plugin": "1.3.0"
14
+ "@google/stitch-sdk": "^0.0.3",
15
+ "@opencode-ai/plugin": "1.3.3"
15
16
  },
16
17
  "devDependencies": {
17
18
  "@types/node": "^25.3.0",
@@ -9,6 +9,7 @@ plugin/
9
9
  ├── memory.ts # 4-tier automated memory system (capture → distill → curate → inject)
10
10
  ├── sessions.ts # Session search tools (find/read)
11
11
  ├── copilot-auth.ts # GitHub Copilot provider/auth integration
12
+ ├── stitch.ts # Google Stitch UI generation (8 tools via @google/stitch-sdk)
12
13
  ├── skill-mcp.ts # Skill-scoped MCP bridge (skill_mcp tools)
13
14
  └── lib/
14
15
  ├── memory-tools.ts # 6 core memory tools (observation, search, get, read, update, timeline)
@@ -58,6 +59,12 @@ plugin/
58
59
  - Handles GitHub Copilot OAuth/device flow
59
60
  - Adds model/provider request shaping for compatible reasoning behavior
60
61
 
62
+ - `stitch.ts`
63
+ - Google Stitch UI generation via `@google/stitch-sdk`
64
+ - 8 tools: create_project, get_project, list_projects, list_screens, get_screen, generate_screen, edit_screens, generate_variants
65
+ - Direct HTTP to `stitch.googleapis.com/mcp` (no MCP subprocess)
66
+ - Auth: STITCH_API_KEY or STITCH_ACCESS_TOKEN env var
67
+
61
68
  ## Notes
62
69
 
63
70
  - OpenCode auto-discovers every `.ts` file in `plugin/` as a plugin — keep helper modules in `lib/`