@ekkos/cli 1.3.2 → 1.3.6

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.
Files changed (123) hide show
  1. package/dist/capture/jsonl-rewriter.d.ts +1 -1
  2. package/dist/capture/jsonl-rewriter.js +3 -3
  3. package/dist/capture/transcript-repair.d.ts +2 -2
  4. package/dist/capture/transcript-repair.js +2 -2
  5. package/dist/commands/claw.d.ts +13 -0
  6. package/dist/commands/claw.js +253 -0
  7. package/dist/commands/dashboard.js +617 -83
  8. package/dist/commands/doctor.d.ts +3 -3
  9. package/dist/commands/doctor.js +6 -79
  10. package/dist/commands/gemini.d.ts +19 -0
  11. package/dist/commands/gemini.js +193 -0
  12. package/dist/commands/init.js +2 -25
  13. package/dist/commands/run.d.ts +0 -1
  14. package/dist/commands/run.js +147 -241
  15. package/dist/commands/scan.d.ts +21 -0
  16. package/dist/commands/scan.js +386 -0
  17. package/dist/commands/swarm-dashboard.js +156 -28
  18. package/dist/commands/swarm.d.ts +1 -1
  19. package/dist/commands/swarm.js +1 -1
  20. package/dist/commands/test-claude.d.ts +2 -2
  21. package/dist/commands/test-claude.js +3 -3
  22. package/dist/deploy/index.d.ts +0 -2
  23. package/dist/deploy/index.js +0 -2
  24. package/dist/deploy/settings.d.ts +2 -2
  25. package/dist/deploy/settings.js +42 -4
  26. package/dist/deploy/skills.js +1 -2
  27. package/dist/index.js +79 -19
  28. package/dist/lib/usage-parser.js +5 -4
  29. package/dist/utils/proxy-url.d.ts +12 -1
  30. package/dist/utils/proxy-url.js +16 -1
  31. package/dist/utils/templates.js +1 -1
  32. package/package.json +4 -6
  33. package/templates/CLAUDE.md +49 -107
  34. package/dist/agent/daemon.d.ts +0 -130
  35. package/dist/agent/daemon.js +0 -606
  36. package/dist/agent/health-check.d.ts +0 -35
  37. package/dist/agent/health-check.js +0 -243
  38. package/dist/agent/pty-runner.d.ts +0 -53
  39. package/dist/agent/pty-runner.js +0 -190
  40. package/dist/commands/agent.d.ts +0 -50
  41. package/dist/commands/agent.js +0 -544
  42. package/dist/commands/setup-remote.d.ts +0 -20
  43. package/dist/commands/setup-remote.js +0 -582
  44. package/dist/commands/synk.d.ts +0 -7
  45. package/dist/commands/synk.js +0 -339
  46. package/dist/cron/index.d.ts +0 -7
  47. package/dist/cron/index.js +0 -13
  48. package/dist/cron/promoter.d.ts +0 -70
  49. package/dist/cron/promoter.js +0 -403
  50. package/dist/synk/api.d.ts +0 -22
  51. package/dist/synk/api.js +0 -133
  52. package/dist/synk/auth.d.ts +0 -7
  53. package/dist/synk/auth.js +0 -30
  54. package/dist/synk/config.d.ts +0 -18
  55. package/dist/synk/config.js +0 -37
  56. package/dist/synk/daemon/control-client.d.ts +0 -11
  57. package/dist/synk/daemon/control-client.js +0 -101
  58. package/dist/synk/daemon/control-server.d.ts +0 -24
  59. package/dist/synk/daemon/control-server.js +0 -91
  60. package/dist/synk/daemon/run.d.ts +0 -14
  61. package/dist/synk/daemon/run.js +0 -338
  62. package/dist/synk/encryption.d.ts +0 -17
  63. package/dist/synk/encryption.js +0 -133
  64. package/dist/synk/index.d.ts +0 -13
  65. package/dist/synk/index.js +0 -36
  66. package/dist/synk/machine-client.d.ts +0 -42
  67. package/dist/synk/machine-client.js +0 -218
  68. package/dist/synk/persistence.d.ts +0 -51
  69. package/dist/synk/persistence.js +0 -211
  70. package/dist/synk/qr.d.ts +0 -5
  71. package/dist/synk/qr.js +0 -33
  72. package/dist/synk/session-bridge.d.ts +0 -58
  73. package/dist/synk/session-bridge.js +0 -171
  74. package/dist/synk/session-client.d.ts +0 -46
  75. package/dist/synk/session-client.js +0 -240
  76. package/dist/synk/types.d.ts +0 -574
  77. package/dist/synk/types.js +0 -74
  78. package/dist/utils/verify-remote-terminal.d.ts +0 -10
  79. package/dist/utils/verify-remote-terminal.js +0 -415
  80. package/templates/README.md +0 -378
  81. package/templates/claude-plugins/PHASE2_COMPLETION.md +0 -346
  82. package/templates/claude-plugins/PLUGIN_PROPOSALS.md +0 -1776
  83. package/templates/claude-plugins/README.md +0 -587
  84. package/templates/claude-plugins/agents/code-reviewer.json +0 -14
  85. package/templates/claude-plugins/agents/debug-detective.json +0 -15
  86. package/templates/claude-plugins/agents/git-companion.json +0 -14
  87. package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +0 -8
  88. package/templates/claude-plugins/blog-manager/commands/blog.md +0 -691
  89. package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +0 -8
  90. package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +0 -434
  91. package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +0 -8
  92. package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +0 -282
  93. package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +0 -8
  94. package/templates/claude-plugins/memory-lens/commands/memory-search.md +0 -181
  95. package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +0 -8
  96. package/templates/claude-plugins/pattern-coach/commands/forge.md +0 -365
  97. package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +0 -8
  98. package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +0 -582
  99. package/templates/commands/continue.md +0 -47
  100. package/templates/cursor-rules/ekkos-memory.md +0 -127
  101. package/templates/ekkos-manifest.json +0 -223
  102. package/templates/helpers/json-parse.cjs +0 -101
  103. package/templates/plan-template.md +0 -306
  104. package/templates/shared/hooks-enabled.json +0 -22
  105. package/templates/shared/session-words.json +0 -45
  106. package/templates/skills/ekkOS_Deep_Recall/Skill.md +0 -282
  107. package/templates/skills/ekkOS_Learn/Skill.md +0 -265
  108. package/templates/skills/ekkOS_Memory_First/Skill.md +0 -206
  109. package/templates/skills/ekkOS_Plan_Assist/Skill.md +0 -302
  110. package/templates/skills/ekkOS_Preferences/Skill.md +0 -247
  111. package/templates/skills/ekkOS_Reflect/Skill.md +0 -257
  112. package/templates/skills/ekkOS_Safety/Skill.md +0 -265
  113. package/templates/skills/ekkOS_Schema/Skill.md +0 -251
  114. package/templates/skills/ekkOS_Summary/Skill.md +0 -257
  115. package/templates/spec-template.md +0 -159
  116. package/templates/windsurf-rules/ekkos-memory.md +0 -127
  117. package/templates/windsurf-skills/README.md +0 -58
  118. package/templates/windsurf-skills/ekkos-continue/SKILL.md +0 -81
  119. package/templates/windsurf-skills/ekkos-golden-loop/SKILL.md +0 -225
  120. package/templates/windsurf-skills/ekkos-insights/SKILL.md +0 -138
  121. package/templates/windsurf-skills/ekkos-recall/SKILL.md +0 -96
  122. package/templates/windsurf-skills/ekkos-safety/SKILL.md +0 -89
  123. package/templates/windsurf-skills/ekkos-vault/SKILL.md +0 -86
@@ -1,18 +1,28 @@
1
1
  # ekkOS_ Memory System
2
2
 
3
- ## The Golden Loop
3
+ ## What is ekkOS?
4
4
 
5
- ekkOS is your AI's cognitive memory. It learns from every session so you get smarter over time.
6
-
7
- - **Remember mistakes** — Schema changes, wrong assumptions, bad approaches
8
- - **Don't repeat them** — If something broke before, know not to do it again
9
- - **Recall what's right** — When schemas/configs get mangled, remember the correct version
10
- - **Build on what worked** — Use proven patterns instead of starting from scratch
5
+ ekkOS is persistent memory for your AI coding assistant. It learns from every session — remembering mistakes, proven solutions, your preferences, and project context — so your AI gets smarter over time.
11
6
 
12
7
  **Failures are just as valuable as successes.** Forge anti-patterns too.
13
8
 
14
9
  ---
15
10
 
11
+ ## How It Works
12
+
13
+ ekkOS uses **proxy injection** to transparently enrich your conversations with relevant context. You don't need to do anything special — the proxy automatically:
14
+
15
+ - Injects **relevant patterns** from past sessions when you ask technical questions
16
+ - Injects **your directives** (MUST/NEVER/PREFER/AVOID rules) so your AI follows your preferences
17
+ - Injects **episodic recall** when you reference past conversations ("yesterday", "last week")
18
+ - Injects **schema context** when working with databases
19
+ - **Auto-forges patterns** when it detects bug fixes or learned solutions
20
+ - Injects **active goals** and plan progress
21
+
22
+ You also have **MCP tools** for explicit memory operations when needed.
23
+
24
+ ---
25
+
16
26
  ## Core Rules
17
27
 
18
28
  ### RULE 1: SEARCH BEFORE ANSWERING
@@ -20,9 +30,9 @@ Before answering ANY technical question, call `ekkOS_Search` first.
20
30
  Do not skip this. Do not assume you know the answer.
21
31
 
22
32
  ### RULE 2: ACKNOWLEDGE PATTERNS (PatternGuard)
23
- When patterns are retrieved, you MUST acknowledge every pattern — either use it or skip it.
33
+ When patterns are retrieved (via proxy injection or search), acknowledge every pattern — either use it or skip it.
24
34
 
25
- **Exception:** Suppress SELECT/SKIP blocks for non-technical turns (acknowledgments, affirmations, short replies).
35
+ **Exception:** Suppress SELECT/SKIP blocks for non-technical turns.
26
36
 
27
37
  **For patterns you USE:**
28
38
  ```
@@ -43,115 +53,54 @@ When patterns are retrieved, you MUST acknowledge every pattern — either use i
43
53
 
44
54
  ### RULE 3: FORGE WHAT YOU LEARN
45
55
  When you fix a bug, get corrected, or learn something new, call `ekkOS_Forge` immediately.
46
-
47
- When something DOES NOT work, forge it as an anti-pattern — failures are valuable.
56
+ Failures are valuable — forge anti-patterns too.
48
57
 
49
58
  ### RULE 4: CONTEXT CONTINUITY
50
59
 
51
- **Post-clear restoration:** After `/clear`, when you see restored turns in `<system-reminder>`, confirm with:
60
+ **Post-clear restoration:** After `/clear`, when you see restored turns in `<system-reminder>`, confirm:
52
61
  ```
53
62
  ✓ **Session continued (Turn N)** — X turns preserved, context restored
54
63
  ```
55
64
 
56
- **Auto-restore after compaction:** When you see `<ekkos-context-preserved>` in the conversation:
65
+ **Auto-restore after compaction:** When you see `<ekkos-context-preserved>`:
57
66
  1. Call `ekkOS_RestoreContext` with the `restoration_token` from the tag
58
- 2. Confirm with:
59
- ```
60
- ✓ **Context restored** — ekkOS preserved X turns before compaction
61
- ```
62
-
63
- ekkOS preserves your working memory automatically. When context is compacted, call `ekkOS_RestoreContext` to get it back seamlessly.
67
+ 2. Confirm: `✓ **Context restored** — ekkOS preserved X turns before compaction`
64
68
 
65
69
  ---
66
70
 
67
- ## 11-Layer Memory Architecture
68
-
69
- | # | Layer | What It Stores |
70
- |---|-------|---------------|
71
- | 1 | Working | Current session state |
72
- | 2 | Episodic | Past conversations |
73
- | 3 | Semantic | Embeddings & knowledge |
74
- | 4 | Patterns | Proven solutions |
75
- | 5 | Procedural | Step-by-step guides |
76
- | 6 | Collective | Cross-project wisdom |
77
- | 7 | Meta | Pattern effectiveness |
78
- | 8 | Codebase | Project-specific code |
79
- | 9 | Directives | User rules (MUST/NEVER/PREFER/AVOID) |
80
- | 10 | Conflict | Auto-resolves contradictions |
81
- | 11 | Secrets | Encrypted credentials (AES-256-GCM) |
71
+ ## MCP Tools
82
72
 
83
- ---
84
-
85
- ## MCP Tools — 29 Visible
86
-
87
- ### Core Memory (6)
88
- | Tool | Description |
89
- |------|-------------|
90
- | `ekkOS_Search` | Search across all 11 memory layers |
91
- | `ekkOS_Forge` | Create pattern from learned solution |
92
- | `ekkOS_Track` | Track when a pattern is applied |
93
- | `ekkOS_Outcome` | Record if pattern worked or failed |
94
- | `ekkOS_Stats` | Get statistics for all layers |
95
- | `ekkOS_Context` | Get relevant context for a task |
96
-
97
- ### Retrieval (4)
98
- | Tool | Description |
73
+ ### Core Memory
74
+ | Tool | When to Use |
99
75
  |------|-------------|
100
- | `ekkOS_Codebase` | Search project code embeddings |
101
- | `ekkOS_Recall` | Recall past conversations by time |
102
- | `ekkOS_PreserveContext` | Preserve working memory before compaction |
103
- | `ekkOS_RestoreContext` | Restore context after compaction |
76
+ | `ekkOS_Search` | Before answering technical questions |
77
+ | `ekkOS_Forge` | After fixing bugs, learning something new |
78
+ | `ekkOS_Track` | When applying a retrieved pattern |
79
+ | `ekkOS_Outcome` | When a pattern worked or failed |
104
80
 
105
- ### Directives (4)
106
- | Tool | Description |
81
+ ### Directives
82
+ | Tool | When to Use |
107
83
  |------|-------------|
108
- | `ekkOS_Directive` | Create MUST/NEVER/PREFER/AVOID rules |
109
- | `ekkOS_UpdateDirective` | Update an existing directive |
110
- | `ekkOS_DeleteDirective` | Remove a directive |
111
- | `ekkOS_UniversalDirectives` | Get directives that apply across all projects |
84
+ | `ekkOS_Directive` | User says "always" → MUST, "never" → NEVER, "prefer" → PREFER, "avoid" → AVOID |
85
+ | `ekkOS_Conflict` | Before deleting files, deploying, destructive commands |
112
86
 
113
- ### Utility (5)
114
- | Tool | Description |
87
+ ### Plans
88
+ | Tool | When to Use |
115
89
  |------|-------------|
116
- | `ekkOS_Summary` | Get summary of recent memory activity |
117
- | `ekkOS_Conflict` | Check for conflicts before destructive actions |
118
- | `ekkOS_Export` | Export patterns, directives, plans as JSON backup |
119
- | `ekkOS_Import` | Import memory from backup (auto-deduplication) |
120
- | `ekkOS_Health` | System health check |
121
-
122
- ### Plans (5)
123
- | Tool | Description |
124
- |------|-------------|
125
- | `ekkOS_Plan` | Create structured task plan |
126
- | `ekkOS_Plans` | List your plans |
127
- | `ekkOS_PlanStatus` | Update plan status |
128
- | `ekkOS_PlanStep` | Mark step complete/incomplete |
129
- | `ekkOS_Generate` | AI-generate plan from context |
130
-
131
- ### Secrets (5)
132
- | Tool | Description |
133
- |------|-------------|
134
- | `ekkOS_StoreSecret` | Encrypt and store sensitive data |
135
- | `ekkOS_GetSecret` | Retrieve and decrypt a secret |
136
- | `ekkOS_ListSecrets` | List secrets metadata (no values exposed) |
137
- | `ekkOS_DeleteSecret` | Permanently delete a secret |
138
- | `ekkOS_RotateSecret` | Update a secret with a new value |
90
+ | `ekkOS_Plan` | Task has 3+ steps |
91
+ | `ekkOS_PlanStep` | Mark step complete |
139
92
 
140
- ---
141
-
142
- ## When To Use What
143
-
144
- | Tool | Trigger |
145
- |------|---------|
146
- | `ekkOS_Search` | Technical question, past discussion, architecture decision, debugging |
147
- | `ekkOS_Forge` | Bug fixed, better approach found, gotcha discovered, user corrected you, anti-pattern |
148
- | `ekkOS_Directive` | User says "always" → MUST, "never" → NEVER, "I prefer" → PREFER, "avoid" → AVOID |
149
- | `ekkOS_Conflict` | Before deleting files, deploying to production, modifying config, destructive commands |
150
- | Plan tools | Task has 3+ steps, "help me implement...", complex feature request |
151
- | Secret tools | User shares API key/token/password, need stored credentials |
152
- | `ekkOS_Recall` | User says "yesterday", "last week", "remember when", "what did we discuss" |
93
+ ### Secrets
94
+ | Tool | When to Use |
95
+ |------|-------------|
96
+ | `ekkOS_StoreSecret` | User shares API key, token, password |
97
+ | `ekkOS_GetSecret` | Need a stored credential |
153
98
 
154
- Directives are created when you explicitly request them (e.g., "always use TypeScript").
99
+ ### Context
100
+ | Tool | When to Use |
101
+ |------|-------------|
102
+ | `ekkOS_RestoreContext` | See `<ekkos-context-preserved>` tag |
103
+ | `ekkOS_Recall` | "Yesterday", "last week", "remember when..." |
155
104
 
156
105
  ---
157
106
 
@@ -164,12 +113,7 @@ Every response ends with:
164
113
  ```
165
114
 
166
115
  - **Session name** comes from the `<ekkos-session>` tag
167
- - **Timestamp** comes from the `<current-time>` tag, or use the current date/time
168
- - **IDE/Model** detected from your environment
169
-
170
- Examples:
171
- - `Claude Code (Opus 4.6) · 🧠 **ekkOS_™** · cosmic-penguin-runs · 📅 2026-01-09 4:50 PM EST`
172
- - `Cursor (Sonnet 4.5) · 🧠 **ekkOS_™** · bright-falcon-soars · 📅 2026-01-09 10:15 AM EST`
116
+ - **Timestamp** from `<current-time>` tag or current date/time
173
117
 
174
118
  ---
175
119
 
@@ -179,10 +123,8 @@ Examples:
179
123
  - Patterns retrieved → SELECT or SKIP each one
180
124
  - Problem solved → `ekkOS_Forge`
181
125
  - User preference → `ekkOS_Directive`
182
- - Need to recall → `ekkOS_Recall`
183
126
  - Destructive action → `ekkOS_Conflict` first
184
127
  - Store credentials → `ekkOS_StoreSecret`
185
- - Backup memory → `ekkOS_Export`
186
128
 
187
129
  ## Documentation
188
130
 
@@ -1,130 +0,0 @@
1
- /**
2
- * ekkOS Agent Daemon
3
- *
4
- * Background daemon that:
5
- * 1. Maintains WebSocket connection to cloud relay
6
- * 2. Receives session start requests
7
- * 3. Spawns `ekkos run -d` in PTY
8
- * 4. Relays PTY I/O to cloud
9
- */
10
- interface DaemonConfig {
11
- deviceToken: string;
12
- deviceId: string;
13
- deviceName: string;
14
- verbose?: boolean;
15
- }
16
- export declare class AgentDaemon {
17
- private config;
18
- private ws;
19
- private reconnectAttempt;
20
- private heartbeatTimer;
21
- private pongTimer;
22
- private pongReceived;
23
- private ptyRunner;
24
- private currentSessionId;
25
- private currentSessionCwd;
26
- private sessionStartedAt;
27
- private ptyRestartAttempts;
28
- private readonly QUICK_EXIT_MS;
29
- private running;
30
- private logPath;
31
- private outputBuffer;
32
- private currentSessionName;
33
- private isAutoClearInProgress;
34
- private lastContextWallTime;
35
- private readonly CONTEXT_WALL_COOLDOWN;
36
- constructor(config: DaemonConfig);
37
- /**
38
- * Start the daemon
39
- */
40
- start(): Promise<void>;
41
- /**
42
- * Stop the daemon
43
- */
44
- stop(): Promise<void>;
45
- /**
46
- * Connect to relay server
47
- */
48
- private connect;
49
- /**
50
- * Handle WebSocket open
51
- */
52
- private handleOpen;
53
- /**
54
- * Handle incoming message
55
- */
56
- private handleMessage;
57
- /**
58
- * Handle session start request
59
- */
60
- private handleSessionStart;
61
- /**
62
- * Handle session end request
63
- */
64
- private handleSessionEnd;
65
- /**
66
- * Handle input from browser
67
- */
68
- private handleInput;
69
- /**
70
- * Handle resize from browser
71
- */
72
- private handleResize;
73
- /**
74
- * Handle directory listing request from relay for project browsing UI.
75
- */
76
- private handleListDirectories;
77
- private resolveBrowsePath;
78
- private getParentPath;
79
- private getWindowsRootEntries;
80
- private resolveSessionCwd;
81
- /**
82
- * Handle PTY exit
83
- */
84
- private handlePTYExit;
85
- /**
86
- * Send PTY output to server (with auto-continue detection)
87
- */
88
- private sendOutput;
89
- /**
90
- * Trigger auto /clear + /continue when context wall is hit
91
- */
92
- private triggerAutoContinue;
93
- /**
94
- * Wait for Claude's idle prompt ("> ")
95
- */
96
- private waitForIdlePrompt;
97
- /**
98
- * Sleep helper
99
- */
100
- private sleep;
101
- /**
102
- * Start or restart PTY for the current session.
103
- */
104
- private startSessionPty;
105
- /**
106
- * Handle WebSocket close
107
- *
108
- * CRITICAL: Do NOT kill the PTY here. The PTY must survive WebSocket
109
- * disconnects so users can reconnect to their existing session.
110
- * The PTY is only killed on explicit session_end or daemon stop.
111
- */
112
- private handleClose;
113
- /**
114
- * Schedule reconnection with exponential backoff
115
- */
116
- private scheduleReconnect;
117
- /**
118
- * Handle WebSocket error
119
- */
120
- private handleError;
121
- /**
122
- * Send message to server
123
- */
124
- private sendMessage;
125
- /**
126
- * Log message
127
- */
128
- private log;
129
- }
130
- export {};