echospace 0.0.1 → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +225 -0
- package/dist/cli/index.js +916 -0
- package/dist/client/assets/index-C3HpfhnB.js +168 -0
- package/dist/client/assets/index-kxAuiugv.css +1 -0
- package/dist/client/echospace-logo.svg +13 -0
- package/dist/client/index.html +20 -0
- package/dist/core/chunk-U4VEJP3N.js +110 -0
- package/dist/core/echo/index.d.ts +37 -0
- package/dist/core/echo/index.js +20 -0
- package/dist/core/providers/index.d.ts +45 -0
- package/dist/core/providers/index.js +384 -0
- package/dist/core/smart-paste/index.d.ts +15 -0
- package/dist/core/smart-paste/index.js +405 -0
- package/dist/core/types-CYpEmXbp.d.ts +89 -0
- package/package.json +94 -5
- package/index.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 echospace contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# EchoSpace
|
|
2
|
+
|
|
3
|
+
**The open-source, local-first prompt debugging workspace for LLM developers.**
|
|
4
|
+
|
|
5
|
+
Debug, iterate, and manage your prompts across OpenAI, Anthropic, and Google — all from your terminal. No cloud, no accounts, no lock-in.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Why EchoSpace?
|
|
10
|
+
|
|
11
|
+
### Local First
|
|
12
|
+
|
|
13
|
+
All data stored as `.echo` files on disk. No cloud, no accounts. Your prompts stay on your machine, version-controlled alongside your code.
|
|
14
|
+
|
|
15
|
+
### Open Source & Customizable
|
|
16
|
+
|
|
17
|
+
MIT-licensed. Pluggable provider adapters (OpenAI, Anthropic, Google). YAML-based config with `${ENV_VAR}` substitution.
|
|
18
|
+
|
|
19
|
+
### CLI & SDK
|
|
20
|
+
|
|
21
|
+
`npx echospace` to launch. Core TypeScript modules (`parseEcho`, `serializeEcho`, `smartParse`, provider registry) can be imported as a library for building your own tools.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- **Multi-provider streaming** — OpenAI, Anthropic, Google Gemini with SSE streaming
|
|
28
|
+
- **Universal `.echo` format** — NDJSON-based, human-readable conversation protocol
|
|
29
|
+
- **Smart Paste** — auto-detects and converts conversations from ChatGPT, Claude, Gemini, or raw text
|
|
30
|
+
- **Timeline / history with branching** — revert to any point in a conversation
|
|
31
|
+
- **Tool use support** — `tool_call` / `tool_result` parts
|
|
32
|
+
- **Token counting** — tiktoken-based token estimation
|
|
33
|
+
- **Image support** — inline images in messages (base64 or URL)
|
|
34
|
+
- **Per-conversation model settings** — temperature, max_tokens, top_p, response_format, JSON schema, tools
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
### 1. Install skills
|
|
41
|
+
|
|
42
|
+
EchoSpace ships with agent skills that work with any coding agent — [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [OpenAI Codex](https://openai.com/index/codex/), or any tool that supports the skills/SKILL.md convention.
|
|
43
|
+
|
|
44
|
+
**Claude Code:**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
claude install-skill https://github.com/stonexer/echospace/tree/master/skills/echospace
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Other agents:** Copy the `skills/echospace/` directory into your project's skills folder.
|
|
51
|
+
|
|
52
|
+
### 2. Configure providers
|
|
53
|
+
|
|
54
|
+
Run the interactive setup wizard in your coding agent:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
/echospace:init
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This will guide you through selecting LLM providers (OpenAI, Anthropic, Google, Vercel AI Gateway) and entering API keys. The config is saved to `~/.echospace/config.yaml`.
|
|
61
|
+
|
|
62
|
+
### 3. Launch
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx echospace
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or install globally:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm add -g echospace
|
|
72
|
+
echospace ./my-project
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This will:
|
|
76
|
+
|
|
77
|
+
1. Create a `.echo/` workspace in your project directory
|
|
78
|
+
2. Start a local server and open the UI in your browser
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
╔══════════════════════════════════════╗
|
|
82
|
+
║ EchoSpace v0.1.0 ║
|
|
83
|
+
╠══════════════════════════════════════╣
|
|
84
|
+
║ Workspace: /my-project/.echo ║
|
|
85
|
+
║ URL: http://localhost:7788 ║
|
|
86
|
+
╚══════════════════════════════════════╝
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Available Skills
|
|
90
|
+
|
|
91
|
+
| Skill | Description |
|
|
92
|
+
|-------|-------------|
|
|
93
|
+
| `/echospace:init` | Interactive setup wizard — select providers, enter API keys, generate config |
|
|
94
|
+
| `/echospace:export` | Convert conversation files (OpenAI, Anthropic, Google, Helicone, raw text) into `.echo` format |
|
|
95
|
+
| `/echospace:integrate` | Integrate `.echo` export into your own app |
|
|
96
|
+
|
|
97
|
+
### CLI Options
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
echospace [workdir] [options]
|
|
101
|
+
|
|
102
|
+
[workdir] Workspace directory (default: ".")
|
|
103
|
+
-p, --port <port> Port to serve on (default: auto-select 7788-7799)
|
|
104
|
+
--no-open Don't open browser automatically
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## The `.echo` Format
|
|
110
|
+
|
|
111
|
+
`.echo` files use NDJSON (Newline-Delimited JSON). Line 1 is always the conversation metadata, followed by one line per message.
|
|
112
|
+
|
|
113
|
+
```jsonl
|
|
114
|
+
{"kind":"meta","v":1,"id":"abc123","title":"Weather chat","created_at":"2025-01-01T00:00:00Z","settings":{"provider":"openai","model":"gpt-4o","temperature":0.7}}
|
|
115
|
+
{"kind":"message","id":"m_01","role":"user","created_at":"2025-01-01T00:00:01Z","parts":[{"type":"text","text":"What's the weather in Tokyo?"}]}
|
|
116
|
+
{"kind":"message","id":"m_02","role":"assistant","created_at":"2025-01-01T00:00:02Z","parts":[{"type":"text","text":"Currently 23°C and sunny in Tokyo."}],"meta":{"model":"gpt-4o","usage":{"input_tokens":12,"output_tokens":15}}}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Each message can contain multiple part types: `text`, `thinking`, `tool_call`, `tool_result`, `image`.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Architecture
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
┌─────────┐ ┌──────────────┐ ┌──────────────────┐
|
|
127
|
+
│ CLI │──────▶│ Hono Server │──────▶│ Provider Adapters│
|
|
128
|
+
│ (Commander) │ (localhost) │ │ ┌──────────────┐ │
|
|
129
|
+
└─────────┘ │ │ │ │ OpenAI │ │──▶ LLM APIs
|
|
130
|
+
│ /api/* │ │ │ Anthropic │ │
|
|
131
|
+
┌─────────┐ │ │ │ │ Google │ │
|
|
132
|
+
│ React UI│◀─────▶│ Static files│ │ └──────────────┘ │
|
|
133
|
+
│ (browser)│ └──────────────┘ └──────────────────┘
|
|
134
|
+
└─────────┘
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Tech stack:** React 19 · Hono · Zustand · Tailwind CSS 4 · Vite · CodeMirror · tiktoken
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
On first launch, EchoSpace creates `~/.echospace/config.yaml`. Fill in the `api_key` for the providers you want to use — unconfigured providers are automatically ignored.
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
providers:
|
|
147
|
+
- name: openai
|
|
148
|
+
type: openai
|
|
149
|
+
api_key: sk-xxxxxxxx
|
|
150
|
+
models:
|
|
151
|
+
- gpt-4.1
|
|
152
|
+
- gpt-4.1-mini
|
|
153
|
+
- gpt-4.1-nano
|
|
154
|
+
- gpt-4o
|
|
155
|
+
- gpt-4o-mini
|
|
156
|
+
- o3
|
|
157
|
+
- o3-mini
|
|
158
|
+
- o4-mini
|
|
159
|
+
|
|
160
|
+
- name: anthropic
|
|
161
|
+
type: anthropic
|
|
162
|
+
api_key: sk-ant-xxxxxxxx
|
|
163
|
+
models:
|
|
164
|
+
- claude-sonnet-4-6
|
|
165
|
+
- claude-haiku-4-5
|
|
166
|
+
|
|
167
|
+
- name: google
|
|
168
|
+
type: google
|
|
169
|
+
api_key: AIza-xxxxxxxx
|
|
170
|
+
models:
|
|
171
|
+
- gemini-2.5-pro
|
|
172
|
+
- gemini-2.5-flash
|
|
173
|
+
- gemini-2.0-flash
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
> **Tip:** `${ENV_VAR}` syntax is also supported for API keys — they are resolved from your environment at runtime. `.env` files in your project directory are auto-loaded.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## SDK / Programmatic Usage
|
|
181
|
+
|
|
182
|
+
Core modules can be imported directly for building your own tooling:
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
import { parseEcho, serializeEcho } from "echospace/core/echo";
|
|
186
|
+
import { smartParse, detectFormat } from "echospace/core/smart-paste";
|
|
187
|
+
import { createProviderRegistry } from "echospace/core/providers/registry";
|
|
188
|
+
|
|
189
|
+
// Parse a .echo file
|
|
190
|
+
const conversation = parseEcho(fileContents);
|
|
191
|
+
console.log(conversation.meta.title);
|
|
192
|
+
console.log(conversation.messages.length);
|
|
193
|
+
|
|
194
|
+
// Detect and convert from other formats
|
|
195
|
+
const format = detectFormat(clipboardText); // "openai" | "anthropic" | "google" | "raw" | ...
|
|
196
|
+
const messages = smartParse(clipboardText);
|
|
197
|
+
|
|
198
|
+
// Create a provider registry
|
|
199
|
+
const registry = createProviderRegistry();
|
|
200
|
+
const adapter = registry.get("openai");
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Development
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Install dependencies
|
|
209
|
+
pnpm install
|
|
210
|
+
|
|
211
|
+
# Start dev server (UI on :5173, API on :7788)
|
|
212
|
+
pnpm dev
|
|
213
|
+
|
|
214
|
+
# Other scripts
|
|
215
|
+
pnpm build # Build for production
|
|
216
|
+
pnpm typecheck # Type-check without emitting
|
|
217
|
+
pnpm lint # ESLint
|
|
218
|
+
pnpm format # Prettier
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## License
|
|
224
|
+
|
|
225
|
+
MIT
|