sideagent 0.2.0 → 0.3.0
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/README.md +10 -0
- package/package.json +8 -1
- package/skills/sideagent/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,16 @@ import { AgentChat } from "sideagent";
|
|
|
45
45
|
/>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
### sideagent Cloud
|
|
49
|
+
|
|
50
|
+
With an agent hosted on sideagent Cloud, pass its publishable key instead of `endpoint`. The key names the agent and its host, so the chat derives the URL (`https://<host>/v1/agents/<agentId>`) and sends the key in the `x-sideagent-key` header on every request. The key is public: it is safe in the browser and proves nothing on its own.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<AgentChat publishableKey="pk_live_…" />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Pass `endpoint` as well to send the requests somewhere else, such as a proxy in front of sideagent Cloud. A malformed key, or neither prop, throws during render. `parsePublishableKey` and `publishableEndpoint` are exported from `sideagent/keys`.
|
|
57
|
+
|
|
48
58
|
### Docked sidebar
|
|
49
59
|
|
|
50
60
|
Wrap your app in `AgentProvider` to dock the chat on the right, side by side with the app instead of over it. It takes the same props as `AgentChat`. The user drags the panel's left edge (or uses the arrow keys on it) to resize; the width is remembered. Outside `AgentProvider`, sidebar mode overlays the page.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sideagent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"types": "./dist/protocol.d.ts",
|
|
26
26
|
"import": "./dist/protocol.js"
|
|
27
27
|
},
|
|
28
|
+
"./keys": {
|
|
29
|
+
"types": "./dist/keys.d.ts",
|
|
30
|
+
"import": "./dist/keys.js"
|
|
31
|
+
},
|
|
28
32
|
"./testing": {
|
|
29
33
|
"types": "./dist/testing/mock-llm.d.ts",
|
|
30
34
|
"import": "./dist/testing/mock-llm.js"
|
|
@@ -39,6 +43,8 @@
|
|
|
39
43
|
"build": "tsup",
|
|
40
44
|
"test": "vitest run",
|
|
41
45
|
"typecheck": "tsc --noEmit",
|
|
46
|
+
"format": "prettier --write src demo",
|
|
47
|
+
"format:check": "prettier --check src demo",
|
|
42
48
|
"demo:api": "tsx demo/server.ts",
|
|
43
49
|
"demo": "tsx demo/server.ts & vite demo",
|
|
44
50
|
"eval:skill": "cd skills/sideagent && claude plugin eval . --scaffold --allow-tools Write Edit --trust-plugin --no-publish"
|
|
@@ -69,6 +75,7 @@
|
|
|
69
75
|
"@types/react-dom": "^19.0.0",
|
|
70
76
|
"@vitejs/plugin-react": "^5.0.0",
|
|
71
77
|
"hono": "^4.9.0",
|
|
78
|
+
"prettier": "^3.9.10",
|
|
72
79
|
"react": "^19.0.0",
|
|
73
80
|
"react-dom": "^19.0.0",
|
|
74
81
|
"tsup": "^8.5.0",
|
|
@@ -43,7 +43,7 @@ Do them in order. Do not skip the review in step 7.
|
|
|
43
43
|
<App />
|
|
44
44
|
</AgentProvider>
|
|
45
45
|
```
|
|
46
|
-
Use `<AgentChat endpoint="/agent" />` for a floating chat without docking. Different origin plus cookies: add `credentials="include"`.
|
|
46
|
+
Use `<AgentChat endpoint="/agent" />` for a floating chat without docking. Different origin plus cookies: add `credentials="include"`. For an agent hosted on sideagent Cloud, pass `publishableKey="pk_live_…"` instead of `endpoint`.
|
|
47
47
|
6. **Env vars.** Add `LLM_API_KEY`, `APPROVAL_SECRET`, `APP_ORIGIN`, `API_BASE_URL` to `.env.example`. Never hardcode keys. Never send `LLM_API_KEY` to the browser.
|
|
48
48
|
7. **Verify, then hand over for review.**
|
|
49
49
|
- Run the project's typecheck and tests.
|