shraga 0.1.1 โ†’ 0.1.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/README.md CHANGED
@@ -2,21 +2,35 @@
2
2
 
3
3
  # ๐Ÿง‘โ€๐Ÿ’ป Shraga
4
4
 
5
- **The teammate you delegate coding to โ€” just forward it to Shraga.**
5
+ **The teammate you delegate coding to. Just forward it to Shraga.**
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/shraga.svg)](https://www.npmjs.com/package/shraga)
8
8
  [![CI](https://github.com/Livshitz/shraga/actions/workflows/ci.yml/badge.svg)](https://github.com/Livshitz/shraga/actions/workflows/ci.yml)
9
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
10
9
 
11
10
  </div>
12
11
 
13
- Shraga is a self-hostable, multi-user web UI for running an AI coding agent โ€” Claude Code out
14
- of the box, with a pluggable engine seam for other runtimes โ€” that you can reach from anywhere:
15
- your laptop, a home server, or a VM.
12
+ Shraga is a self-hostable, multi-user web UI for running an AI coding agent (Claude Code out of
13
+ the box, with a pluggable engine seam for other runtimes) that you can reach from anywhere: your
14
+ laptop, a home server, or a VM.
16
15
 
17
- Give it its own machine, its own keys, its own identity โ€” onboard it once and delegate.
16
+ Give it its own machine, its own keys, its own identity. Onboard it once, then delegate.
18
17
 
19
- ---
18
+ ## Why Shraga
19
+
20
+ - โญ **Runs on your Claude subscription, not a metered API key.** Point it at Claude Code and it
21
+ drives the agent through your existing plan (`claude auth login`). No per-token bill to watch.
22
+ - โญ **A real teammate, not a chat box.** It has its own machine, its own identity, and its own
23
+ logins, so you delegate a task the way you would to a person and come back to the result.
24
+ - โญ **Multi-user by design.** One Shraga serves a whole team, each with their own sessions,
25
+ tools, and permissions.
26
+ - โญ **A shared brain that compounds.** It onboards, learns your codebase and conventions, and
27
+ carries that knowledge forward across sessions and teammates.
28
+ - **Chat with an agent** that has your workspace, shell, and tools.
29
+ - **Sessions** you can fork, resume, and revisit.
30
+ - **Skills**: reusable procedures you teach it once (files in `data/skills/`).
31
+ - **MCP servers**: connect tools (GitHub, Slack, databases) per-user or globally.
32
+ - **Schedules**: run agent jobs on a cron or in response to events.
33
+ - **Programmatic API + MCP endpoint**: drive the agent from scripts or from claude.ai.
20
34
 
21
35
  ## Quickstart
22
36
 
@@ -25,85 +39,67 @@ Requires [Bun](https://bun.sh) โ‰ฅ 1.0.
25
39
  ```bash
26
40
  # 1. Install & configure
27
41
  bun install
28
- cp .env.example .env # then set ANTHROPIC_API_KEY
42
+ cp .env.example .env
29
43
 
30
44
  # 2. Run
31
45
  bun run build # build the web UI
32
46
  bun run start # serve on http://localhost:3032
33
47
  ```
34
48
 
35
- Open http://localhost:3032. On first run you'll create your account (local username/password โ€”
36
- no external auth needed). Or seed one from the CLI:
49
+ Open http://localhost:3032. On first run you create your account (local username and password, no
50
+ external auth needed). Or seed one from the CLI:
37
51
 
38
52
  ```bash
39
53
  shraga user add you@example.com <password>
40
54
  ```
41
55
 
42
- That's it โ€” sign in and start delegating.
56
+ Sign in and start delegating.
43
57
 
44
- > Prefer subscription auth? Run `claude auth login` and leave `ANTHROPIC_API_KEY` unset.
58
+ ### Auth: subscription or API key
45
59
 
46
- ## What you get
60
+ Shraga runs the agent through **Claude Code**, so it uses whatever Claude Code is authenticated
61
+ with:
47
62
 
48
- - **Chat with an agent** that has your workspace, shell, and tools.
49
- - **Sessions** โ€” fork, resume, and revisit past conversations.
50
- - **Skills** โ€” teach the agent reusable procedures (files in `data/skills/`).
51
- - **MCP servers** โ€” connect tools (GitHub, Slack, databases, โ€ฆ) per-user or globally.
52
- - **Schedules** โ€” run agent jobs on a cron or in response to events.
53
- - **Programmatic API + MCP endpoint** โ€” drive the agent from scripts or `claude.ai`.
63
+ - **Your Claude subscription (recommended).** Run `claude auth login` once and leave
64
+ `ANTHROPIC_API_KEY` unset. The agent runs on your plan, with no metered API charges.
65
+ - **An API key.** Set `ANTHROPIC_API_KEY` in `.env` if you would rather pay per token.
54
66
 
55
67
  ## Configuration
56
68
 
57
- All config is flat files under `data/` (no database). See `.env.example` for options.
58
- Key ones:
69
+ All config is flat files under `data/` (no database). See `.env.example` for the full list. The
70
+ common ones:
59
71
 
60
72
  | Var | Default | Purpose |
61
73
  |-----|---------|---------|
62
- | `ANTHROPIC_API_KEY` | โ€” | Claude API key (or `claude auth login`) |
74
+ | `ANTHROPIC_API_KEY` | *(unset)* | Claude API key. Leave unset to use `claude auth login`. |
63
75
  | `PORT` | `3032` | Server port |
64
76
  | `DATA_DIR` | `./data` | Where state lives |
65
77
  | `AUTH_PROVIDER` | `local` | `local` (username/password) or `firebase` |
66
- | `OWNERS` | โ€” | Comma-list of admin emails |
67
-
68
- ### Optional features
69
-
70
- Shraga's core is a focused chat workspace. Heavier surfaces are opt-in via env flags:
71
-
72
- | Flag | Enables |
73
- |------|---------|
74
- | `SHRAGA_FEAT_WORKSPACE=1` | Multi-tab workspace |
75
- | `SHRAGA_FEAT_INSTANCES=1` | Multi-instance switcher |
76
-
77
- Some surfaces are supplied by add-ons rather than the core โ€” e.g. embedded terminals and voice
78
- mode. Their capability flags appear once the corresponding add-on is installed; on a bare core
79
- build the flags are inert.
78
+ | `OWNERS` | *(unset)* | Comma-separated list of admin emails |
80
79
 
81
80
  ## Expose it (optional)
82
81
 
83
- Running on a home machine? Set `CLOUDFLARE_TUNNEL_TOKEN` to get a public URL via
84
- Cloudflare Tunnel, or put it behind any reverse proxy.
82
+ Running on a home machine? Set `CLOUDFLARE_TUNNEL_TOKEN` for a public URL via Cloudflare Tunnel, or
83
+ put it behind any reverse proxy.
85
84
 
86
85
  ## Architecture
87
86
 
88
- - **Runtime:** Bun ยท **Server:** Express + WebSocket (`src/server/`)
87
+ - **Runtime:** Bun. **Server:** Express + WebSocket (`src/server/`)
89
88
  - **Client:** React + Vite + Tailwind (`src/client/`)
90
89
  - **Agent:** `@anthropic-ai/claude-agent-sdk`
91
- - **Storage:** flat JSON/JSONL in `data/` โ€” no database
90
+ - **Storage:** flat JSON/JSONL in `data/` (no database)
92
91
  - **Auth:** pluggable provider (local by default; Firebase optional)
93
92
 
94
93
  ## Read the thinking
95
94
 
96
- Shraga is a set of ideas before it's a binary:
95
+ Shraga is a set of ideas before it is a binary:
97
96
 
98
- - **[Concept](./docs/concept.md)** โ€” the mental model: delegation, not another chat box.
99
- - **[The shared brain](./docs/shared-brain.md)** โ€” a teammate that onboards, learns, and compounds org knowledge.
100
- - **[Primitives](./docs/architecture/primitives.md)** โ€” the core nouns you build with.
97
+ - **[Concept](./docs/concept.md)**: the mental model of delegation, not another chat box.
98
+ - **[The shared brain](./docs/shared-brain.md)**: a teammate that onboards, learns, and compounds
99
+ org knowledge.
100
+ - **[Primitives](./docs/architecture/primitives.md)**: the core nouns you build with.
101
101
 
102
102
  ## Feedback
103
103
 
104
- Concepts, gaps, "why not X", use cases โ†’ [Discussions](https://github.com/Livshitz/shraga/discussions).
105
- Bugs and concrete proposals โ†’ [Issues](https://github.com/Livshitz/shraga/issues).
106
-
107
- ## License
108
-
109
- [MIT](./LICENSE) ยฉ Elya Livshitz
104
+ Concepts, gaps, "why not X", use cases: [Discussions](https://github.com/Livshitz/shraga/discussions).
105
+ Bugs and concrete proposals: [Issues](https://github.com/Livshitz/shraga/issues).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shraga",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "The teammate you delegate coding to โ€” a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "express": "^4.21.1",
64
64
  "firebase": "^11.0.0",
65
65
  "lucide-react": "^0.468.0",
66
- "mcp-slack": "github:Livshitz/mcp-slack#7680804b8dfdf85c50ca66ede8931c364e0516ee",
66
+ "mcp-slack-use": "github:Livshitz/mcp-slack-use#0c877d3397f7",
67
67
  "react": "^19.0.0",
68
68
  "react-dom": "^19.0.0",
69
69
  "react-markdown": "^9.0.0",
@@ -1,4 +1,4 @@
1
- // Proactive Slack poll / directed-question state. The vendor mcp-slack `post_slack_poll`
1
+ // Proactive Slack poll / directed-question state. The mcp-slack-use `post_slack_poll`
2
2
  // tool posts the interactive message; shraga owns everything after: vote state, live
3
3
  // tally updates (chat.update), closing on deadline/quorum/first-answer, and waking the
4
4
  // originating agent session once with the result ("close then report").
@@ -1,11 +1,11 @@
1
- // Slack client โ€” the ONE agent-glue seam onto the mcp-slack package `client` (unified Slack
1
+ // Slack client โ€” the ONE agent-glue seam onto the mcp-slack-use package `client` (unified Slack
2
2
  // Web API, single bot-vs-user token-resolution path). The former duplicate `slackPost` is gone:
3
3
  // everything routes through the package. Only contact/mention resolution stays here โ€” this app owns
4
4
  // the contacts store, so it can't live in the vendor package.
5
5
  import * as contacts from '../contacts.ts';
6
- import { getUserProfile } from 'mcp-slack/src/client.ts';
6
+ import { getUserProfile } from 'mcp-slack-use/src/client.ts';
7
7
 
8
- export * from 'mcp-slack/src/client.ts';
8
+ export * from 'mcp-slack-use/src/client.ts';
9
9
 
10
10
  /** Rewrite Slack `<@Uxxx>` (and bare user ids) to `@Name (operator)?`, learning contacts as it goes. */
11
11
  export async function resolveUserMentions(text: string): Promise<string> {
@@ -1,6 +1,6 @@
1
1
  // Slack agent-glue โ€” the app-side half of the Slack bot. The Slack transport/protocol (routes, HMAC
2
2
  // verify, dedupe, DM identity, file hydrate, streamer wiring, reaction lifecycle) lives in the
3
- // mcp-slack package `ingress`. This module owns only what this app owns: sessions, locks, contacts,
3
+ // mcp-slack-use package `ingress`. This module owns only what this app owns: sessions, locks, contacts,
4
4
  // thread-context sync, artifacts, broadcast, and message persistence โ€” surfaced to the ingress as
5
5
  // callbacks (shouldRespond / onMessage / onReplied) plus the crash-recovery resume path.
6
6
  import crypto from 'node:crypto';
@@ -17,7 +17,7 @@ import {
17
17
  getChannelName, getUserName, getUserProfile, resolveUserMentions, isSupportedFile, SUPPORTED_FILE_MIMES,
18
18
  downloadSlackFileBuffer,
19
19
  } from './api.ts';
20
- import { pipeAgentReply, type AgentEvent, type IngressMessage } from 'mcp-slack/src/ingress.ts';
20
+ import { pipeAgentReply, type AgentEvent, type IngressMessage } from 'mcp-slack-use/src/ingress.ts';
21
21
  import { makeSlackQuestionHandler } from './questions.ts';
22
22
  import * as contacts from '../contacts.ts';
23
23
  import { getChannelContext, invalidateChannelContext } from './context-cache.ts';
@@ -2,7 +2,7 @@
2
2
  // `ingress` (protocol) to the agent-glue (bot.ts) and subscribes the data-sync deploy notifier
3
3
  // (event bus โ†’ owner DMs). Slack ships in this app, so index.ts registers this directly.
4
4
  import type { ServerFeature, FeatureContext } from '../features.ts';
5
- import { registerSlackIngress } from 'mcp-slack/src/ingress.ts';
5
+ import { registerSlackIngress } from 'mcp-slack-use/src/ingress.ts';
6
6
  import { subscribeEvents } from '../events/bus.ts';
7
7
  import { postMessage, resolveUserMentions } from './api.ts';
8
8
  import { runAgentTurn, shouldRespond, onReplied, retrySlackSession, setBroadcast } from './bot.ts';