echospace 0.0.1 → 0.1.0-alpha.2

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 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,194 @@
1
+ <p align="center">
2
+ <img src="assets/echospace-logo/echospace-logo.png" alt="EchoSpace" width="128" />
3
+ </p>
4
+
5
+ <h1 align="center">EchoSpace</h1>
6
+
7
+ <p align="center"><strong>The open-source, local-first prompt debugging workspace for LLM developers.</strong></p>
8
+
9
+ Debug, iterate, and manage your prompts across OpenAI, Anthropic, and Google — all from your terminal. No cloud, no accounts, no lock-in.
10
+
11
+ ---
12
+
13
+ ## Why EchoSpace?
14
+
15
+ ### Local First
16
+
17
+ All data stored as `.echo` files on disk. No cloud, no accounts. Your prompts stay on your machine, version-controlled alongside your code.
18
+
19
+ ### Open Source & Customizable
20
+
21
+ MIT-licensed. Pluggable provider adapters (OpenAI, Anthropic, Google). YAML-based config with `${ENV_VAR}` substitution.
22
+
23
+ ### CLI & SDK
24
+
25
+ `npx echospace@alpha` to launch. Core TypeScript modules (`parseEcho`, `serializeEcho`, `smartParse`, provider registry) can be imported as a library for building your own tools.
26
+
27
+ ---
28
+
29
+ ## Features
30
+
31
+ - **Multi-provider streaming** — OpenAI, Anthropic, Google Gemini with SSE streaming
32
+ - **Universal `.echo` format** — NDJSON-based, human-readable conversation protocol
33
+ - **Smart Paste** — auto-detects and converts conversations from ChatGPT, Claude, Gemini, or raw text
34
+ - **Timeline / history with branching** — revert to any point in a conversation
35
+ - **Tool use support** — `tool_call` / `tool_result` parts
36
+ - **Token counting** — tiktoken-based token estimation
37
+ - **Image support** — inline images in messages (base64 or URL)
38
+ - **Per-conversation model settings** — temperature, max_tokens, top_p, response_format, JSON schema, tools
39
+
40
+ ---
41
+
42
+ ## Quick Start
43
+
44
+ ### 1. Install skills
45
+
46
+ 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.
47
+
48
+ ```bash
49
+ npx skills add https://github.com/stonexer/echospace/tree/master/skills/echospace
50
+ ```
51
+
52
+ ### 2. Configure providers
53
+
54
+ ```bash
55
+ npx echospace init
56
+ ```
57
+
58
+ ```
59
+ ◆ Which LLM service do you use?
60
+ │ ○ OpenAI
61
+ │ ○ Anthropic (Claude)
62
+ │ ○ Google (Gemini)
63
+ │ ○ Vercel AI Gateway
64
+ │ ○ Custom Gateway (OpenAI-compatible)
65
+
66
+ ◆ Enter your API Key:
67
+ │ sk-xxxxxxxx
68
+
69
+ ✓ Config saved to ~/.echospace/config.yaml
70
+ ```
71
+
72
+ Or use the agent skill: `/echospace:init`
73
+
74
+ ### 3. Launch
75
+
76
+ ```bash
77
+ npx echospace@alpha
78
+ ```
79
+
80
+ Or install globally:
81
+
82
+ ```bash
83
+ pnpm add -g echospace
84
+ echospace ./my-project
85
+ ```
86
+
87
+ This will:
88
+
89
+ 1. Create a `.echo/` workspace in your project directory
90
+ 2. Start a local server and open the UI in your browser
91
+
92
+ ```
93
+ ╔══════════════════════════════════════╗
94
+ ║ EchoSpace v0.1.0 ║
95
+ ╠══════════════════════════════════════╣
96
+ ║ Workspace: /my-project/.echo ║
97
+ ║ URL: http://localhost:3240 ║
98
+ ╚══════════════════════════════════════╝
99
+ ```
100
+
101
+ ### Available Skills
102
+
103
+ | Skill | Description |
104
+ |-------|-------------|
105
+ | `/echospace:init` | Interactive setup wizard — select providers, enter API keys, generate config |
106
+ | `/echospace:export` | Convert conversation files (OpenAI, Anthropic, Google, Helicone, raw text) into `.echo` format |
107
+ | `/echospace:integrate` | Integrate `.echo` export into your own app |
108
+
109
+ ### CLI Options
110
+
111
+ ```
112
+ echospace [workdir] [options]
113
+
114
+ [workdir] Workspace directory (default: ".")
115
+ -p, --port <port> Port to serve on (default: auto-select 3240-3249)
116
+ --no-open Don't open browser automatically
117
+ ```
118
+
119
+ ---
120
+
121
+ ## The `.echo` Format
122
+
123
+ `.echo` files use NDJSON (Newline-Delimited JSON). Line 1 is always the conversation metadata, followed by one line per message.
124
+
125
+ ```jsonl
126
+ {"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}}
127
+ {"kind":"message","id":"m_01","role":"user","created_at":"2025-01-01T00:00:01Z","parts":[{"type":"text","text":"What's the weather in Tokyo?"}]}
128
+ {"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}}}
129
+ ```
130
+
131
+ Each message can contain multiple part types: `text`, `thinking`, `tool_call`, `tool_result`, `image`.
132
+
133
+ ---
134
+
135
+ ## Configuration
136
+
137
+ 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.
138
+
139
+ ```yaml
140
+ providers:
141
+ - name: openai
142
+ type: openai
143
+ api_key: sk-xxxxxxxx
144
+ models:
145
+ - gpt-4.1
146
+ - gpt-4.1-mini
147
+ - gpt-4.1-nano
148
+ - gpt-4o
149
+ - gpt-4o-mini
150
+ - o3
151
+ - o3-mini
152
+ - o4-mini
153
+
154
+ - name: anthropic
155
+ type: anthropic
156
+ api_key: sk-ant-xxxxxxxx
157
+ models:
158
+ - claude-sonnet-4-6
159
+ - claude-haiku-4-5
160
+
161
+ - name: google
162
+ type: google
163
+ api_key: AIza-xxxxxxxx
164
+ models:
165
+ - gemini-2.5-pro
166
+ - gemini-2.5-flash
167
+ - gemini-2.0-flash
168
+ ```
169
+
170
+ > **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.
171
+
172
+ ---
173
+
174
+ ## Development
175
+
176
+ ```bash
177
+ # Install dependencies
178
+ pnpm install
179
+
180
+ # Start dev server (UI on :5173, API on :3240)
181
+ pnpm dev
182
+
183
+ # Other scripts
184
+ pnpm build # Build for production
185
+ pnpm typecheck # Type-check without emitting
186
+ pnpm lint # ESLint
187
+ pnpm format # Prettier
188
+ ```
189
+
190
+ ---
191
+
192
+ ## License
193
+
194
+ MIT