opencode-agora 0.3.0 → 0.4.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/README.md +86 -255
- package/dist/atomic-write.d.ts +10 -0
- package/dist/atomic-write.d.ts.map +1 -0
- package/dist/atomic-write.js +23 -0
- package/dist/atomic-write.js.map +1 -0
- package/dist/auth/refresh.d.ts +17 -0
- package/dist/auth/refresh.d.ts.map +1 -0
- package/dist/auth/refresh.js +50 -0
- package/dist/auth/refresh.js.map +1 -0
- package/dist/cli/app.d.ts +13 -18
- package/dist/cli/app.d.ts.map +1 -1
- package/dist/cli/app.js +184 -1187
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/chat-renderer.d.ts +31 -0
- package/dist/cli/chat-renderer.d.ts.map +1 -0
- package/dist/cli/chat-renderer.js +275 -0
- package/dist/cli/chat-renderer.js.map +1 -0
- package/dist/cli/commands/browse.d.ts +4 -0
- package/dist/cli/commands/browse.d.ts.map +1 -0
- package/dist/cli/commands/browse.js +80 -0
- package/dist/cli/commands/browse.js.map +1 -0
- package/dist/cli/commands/chat.d.ts +4 -0
- package/dist/cli/commands/chat.d.ts.map +1 -0
- package/dist/cli/commands/chat.js +125 -0
- package/dist/cli/commands/chat.js.map +1 -0
- package/dist/cli/commands/community.d.ts +12 -0
- package/dist/cli/commands/community.d.ts.map +1 -0
- package/dist/cli/commands/community.js +453 -0
- package/dist/cli/commands/community.js.map +1 -0
- package/dist/cli/commands/export.d.ts +3 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +108 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/init.d.ts +4 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +299 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/learn.d.ts +4 -0
- package/dist/cli/commands/learn.d.ts.map +1 -0
- package/dist/cli/commands/learn.js +62 -0
- package/dist/cli/commands/learn.js.map +1 -0
- package/dist/cli/commands/marketplace.d.ts +9 -0
- package/dist/cli/commands/marketplace.d.ts.map +1 -0
- package/dist/cli/commands/marketplace.js +321 -0
- package/dist/cli/commands/marketplace.js.map +1 -0
- package/dist/cli/commands/notify.d.ts +3 -0
- package/dist/cli/commands/notify.d.ts.map +1 -0
- package/dist/cli/commands/notify.js +59 -0
- package/dist/cli/commands/notify.js.map +1 -0
- package/dist/cli/commands/operations.d.ts +16 -0
- package/dist/cli/commands/operations.d.ts.map +1 -0
- package/dist/cli/commands/operations.js +1006 -0
- package/dist/cli/commands/operations.js.map +1 -0
- package/dist/cli/commands/ping.d.ts +3 -0
- package/dist/cli/commands/ping.d.ts.map +1 -0
- package/dist/cli/commands/ping.js +56 -0
- package/dist/cli/commands/ping.js.map +1 -0
- package/dist/cli/commands/today.d.ts +3 -0
- package/dist/cli/commands/today.d.ts.map +1 -0
- package/dist/cli/commands/today.js +142 -0
- package/dist/cli/commands/today.js.map +1 -0
- package/dist/cli/commands/types.d.ts +5 -0
- package/dist/cli/commands/types.d.ts.map +1 -0
- package/dist/cli/commands/types.js +2 -0
- package/dist/cli/commands/types.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +3 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +41 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/commands/welcome.d.ts +3 -0
- package/dist/cli/commands/welcome.d.ts.map +1 -0
- package/dist/cli/commands/welcome.js +97 -0
- package/dist/cli/commands/welcome.js.map +1 -0
- package/dist/cli/commands-meta.d.ts +21 -0
- package/dist/cli/commands-meta.d.ts.map +1 -0
- package/dist/cli/commands-meta.js +828 -0
- package/dist/cli/commands-meta.js.map +1 -0
- package/dist/cli/completions-gen.d.ts +2 -0
- package/dist/cli/completions-gen.d.ts.map +1 -0
- package/dist/cli/completions-gen.js +195 -0
- package/dist/cli/completions-gen.js.map +1 -0
- package/dist/cli/completions.d.ts +18 -0
- package/dist/cli/completions.d.ts.map +1 -0
- package/dist/cli/completions.js +227 -0
- package/dist/cli/completions.js.map +1 -0
- package/dist/cli/flags.d.ts +19 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +91 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/format.d.ts +19 -0
- package/dist/cli/format.d.ts.map +1 -0
- package/dist/cli/format.js +249 -0
- package/dist/cli/format.js.map +1 -0
- package/dist/cli/helpers.d.ts +95 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +301 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/mcp-server.d.ts +4 -0
- package/dist/cli/mcp-server.d.ts.map +1 -0
- package/dist/cli/mcp-server.js +277 -0
- package/dist/cli/mcp-server.js.map +1 -0
- package/dist/cli/menu.d.ts +7 -0
- package/dist/cli/menu.d.ts.map +1 -0
- package/dist/cli/menu.js +172 -0
- package/dist/cli/menu.js.map +1 -0
- package/dist/cli/pages/community.d.ts +9 -0
- package/dist/cli/pages/community.d.ts.map +1 -0
- package/dist/cli/pages/community.js +1094 -0
- package/dist/cli/pages/community.js.map +1 -0
- package/dist/cli/pages/helpers.d.ts +37 -0
- package/dist/cli/pages/helpers.d.ts.map +1 -0
- package/dist/cli/pages/helpers.js +98 -0
- package/dist/cli/pages/helpers.js.map +1 -0
- package/dist/cli/pages/home.d.ts +4 -0
- package/dist/cli/pages/home.d.ts.map +1 -0
- package/dist/cli/pages/home.js +231 -0
- package/dist/cli/pages/home.js.map +1 -0
- package/dist/cli/pages/marketplace.d.ts +5 -0
- package/dist/cli/pages/marketplace.d.ts.map +1 -0
- package/dist/cli/pages/marketplace.js +583 -0
- package/dist/cli/pages/marketplace.js.map +1 -0
- package/dist/cli/pages/news.d.ts +31 -0
- package/dist/cli/pages/news.d.ts.map +1 -0
- package/dist/cli/pages/news.js +688 -0
- package/dist/cli/pages/news.js.map +1 -0
- package/dist/cli/pages/settings.d.ts +3 -0
- package/dist/cli/pages/settings.d.ts.map +1 -0
- package/dist/cli/pages/settings.js +296 -0
- package/dist/cli/pages/settings.js.map +1 -0
- package/dist/cli/pages/types.d.ts +67 -0
- package/dist/cli/pages/types.d.ts.map +1 -0
- package/dist/cli/pages/types.js +2 -0
- package/dist/cli/pages/types.js.map +1 -0
- package/dist/cli/prompter.d.ts +135 -0
- package/dist/cli/prompter.d.ts.map +1 -0
- package/dist/cli/prompter.js +710 -0
- package/dist/cli/prompter.js.map +1 -0
- package/dist/cli/shell.d.ts +23 -0
- package/dist/cli/shell.d.ts.map +1 -0
- package/dist/cli/shell.js +1106 -0
- package/dist/cli/shell.js.map +1 -0
- package/dist/cli/tui.d.ts +7 -0
- package/dist/cli/tui.d.ts.map +1 -0
- package/dist/cli/tui.js +419 -0
- package/dist/cli/tui.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts +14 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +28 -0
- package/dist/commands.js.map +1 -0
- package/dist/community/client.d.ts +84 -0
- package/dist/community/client.d.ts.map +1 -0
- package/dist/community/client.js +340 -0
- package/dist/community/client.js.map +1 -0
- package/dist/community/search.d.ts +25 -0
- package/dist/community/search.d.ts.map +1 -0
- package/dist/community/search.js +62 -0
- package/dist/community/search.js.map +1 -0
- package/dist/community/types.d.ts +71 -0
- package/dist/community/types.d.ts.map +1 -0
- package/dist/community/types.js +11 -0
- package/dist/community/types.js.map +1 -0
- package/dist/config.d.ts +1 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -32
- package/dist/config.js.map +1 -1
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +778 -40
- package/dist/data.js.map +1 -1
- package/dist/format.d.ts +5 -39
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +5 -120
- package/dist/format.js.map +1 -1
- package/dist/history.d.ts +13 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +37 -0
- package/dist/history.js.map +1 -0
- package/dist/hubs/cache.d.ts +6 -0
- package/dist/hubs/cache.d.ts.map +1 -0
- package/dist/hubs/cache.js +46 -0
- package/dist/hubs/cache.js.map +1 -0
- package/dist/hubs/enrichment.d.ts +43 -0
- package/dist/hubs/enrichment.d.ts.map +1 -0
- package/dist/hubs/enrichment.js +239 -0
- package/dist/hubs/enrichment.js.map +1 -0
- package/dist/hubs/github.d.ts +12 -0
- package/dist/hubs/github.d.ts.map +1 -0
- package/dist/hubs/github.js +54 -0
- package/dist/hubs/github.js.map +1 -0
- package/dist/hubs/huggingface.d.ts +27 -0
- package/dist/hubs/huggingface.d.ts.map +1 -0
- package/dist/hubs/huggingface.js +88 -0
- package/dist/hubs/huggingface.js.map +1 -0
- package/dist/hubs/quality.d.ts +26 -0
- package/dist/hubs/quality.d.ts.map +1 -0
- package/dist/hubs/quality.js +57 -0
- package/dist/hubs/quality.js.map +1 -0
- package/dist/hubs/types.d.ts +30 -0
- package/dist/hubs/types.d.ts.map +1 -0
- package/dist/hubs/types.js +2 -0
- package/dist/hubs/types.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +188 -224
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +6 -11
- package/dist/init.js.map +1 -1
- package/dist/live.d.ts +14 -0
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +35 -3
- package/dist/live.js.map +1 -1
- package/dist/marketplace.d.ts +25 -3
- package/dist/marketplace.d.ts.map +1 -1
- package/dist/marketplace.js +279 -22
- package/dist/marketplace.js.map +1 -1
- package/dist/news/cache.d.ts +13 -0
- package/dist/news/cache.d.ts.map +1 -0
- package/dist/news/cache.js +66 -0
- package/dist/news/cache.js.map +1 -0
- package/dist/news/score.d.ts +4 -0
- package/dist/news/score.d.ts.map +1 -0
- package/dist/news/score.js +43 -0
- package/dist/news/score.js.map +1 -0
- package/dist/news/sources/arxiv.d.ts +9 -0
- package/dist/news/sources/arxiv.d.ts.map +1 -0
- package/dist/news/sources/arxiv.js +107 -0
- package/dist/news/sources/arxiv.js.map +1 -0
- package/dist/news/sources/github-trending.d.ts +9 -0
- package/dist/news/sources/github-trending.d.ts.map +1 -0
- package/dist/news/sources/github-trending.js +97 -0
- package/dist/news/sources/github-trending.js.map +1 -0
- package/dist/news/sources/hn.d.ts +9 -0
- package/dist/news/sources/hn.d.ts.map +1 -0
- package/dist/news/sources/hn.js +57 -0
- package/dist/news/sources/hn.js.map +1 -0
- package/dist/news/sources/reddit.d.ts +9 -0
- package/dist/news/sources/reddit.d.ts.map +1 -0
- package/dist/news/sources/reddit.js +69 -0
- package/dist/news/sources/reddit.js.map +1 -0
- package/dist/news/sources/rss.d.ts +13 -0
- package/dist/news/sources/rss.d.ts.map +1 -0
- package/dist/news/sources/rss.js +14 -0
- package/dist/news/sources/rss.js.map +1 -0
- package/dist/news/types.d.ts +42 -0
- package/dist/news/types.d.ts.map +1 -0
- package/dist/news/types.js +56 -0
- package/dist/news/types.js.map +1 -0
- package/dist/preferences.d.ts +14 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +31 -0
- package/dist/preferences.js.map +1 -0
- package/dist/settings.d.ts +26 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +251 -0
- package/dist/settings.js.map +1 -0
- package/dist/state.d.ts +9 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +41 -19
- package/dist/state.js.map +1 -1
- package/dist/transcript.d.ts +28 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transcript.js +79 -0
- package/dist/transcript.js.map +1 -0
- package/dist/types.d.ts +19 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.d.ts +157 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +296 -0
- package/dist/ui.js.map +1 -0
- package/package.json +11 -9
- package/dist/api.d.ts +0 -72
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js +0 -109
- package/dist/api.js.map +0 -1
- package/dist/logger.d.ts +0 -20
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -59
- package/dist/logger.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,309 +1,140 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agora
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<strong>One command from zero to a perfectly configured OpenCode environment.</strong>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
Project scanner, MCP marketplace, workflow manager, and community hub — all in one CLI.
|
|
9
|
-
</p>
|
|
3
|
+
> A terminal hub for developers and the agentic AI ecosystem — discover MCP servers and AI tools, skills and harnesses, follow the news, join the conversation, access the latest tech.
|
|
10
4
|
|
|
11
|
-
<p
|
|
5
|
+
<p>
|
|
12
6
|
<a href="https://www.npmjs.com/package/opencode-agora"><img src="https://img.shields.io/npm/v/opencode-agora" alt="npm"></a>
|
|
13
|
-
<a href="https://github.com/IrgenSlj/agora/
|
|
14
|
-
<a href="https://github.com/IrgenSlj/agora/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/opencode-agora" alt="license"></a>
|
|
7
|
+
<a href="https://github.com/IrgenSlj/agora/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/opencode-agora" alt="MIT"></a>
|
|
15
8
|
<a href="https://github.com/IrgenSlj/agora/actions"><img src="https://img.shields.io/github/actions/workflow/status/IrgenSlj/agora/ci.yml?branch=main" alt="CI"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/tests-768%20passing-success" alt="tests">
|
|
16
10
|
</p>
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## Demo
|
|
21
|
-
|
|
22
|
-
_A terminal recording is in the works — see ROADMAP.md._
|
|
23
|
-
|
|
24
|
-
## What is Agora?
|
|
25
|
-
|
|
26
|
-
Agora is a **zero-config OpenCode setup tool** and terminal marketplace. Run `npx opencode-agora init` in any project and it automatically scans your stack, generates the perfect `opencode.json`, installs MCP servers, and registers the plugin.
|
|
27
|
-
|
|
28
|
-
It also bundles **36+ MCP servers**, **10 production workflows**, **6 tutorials**, and a full community discussion system — all usable offline.
|
|
29
|
-
|
|
30
|
-
## Features
|
|
31
|
-
|
|
32
|
-
### `agora init` — One-Command Setup
|
|
33
|
-
- Scans your project for `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Gemfile`, `Dockerfile`, and more
|
|
34
|
-
- Detects frameworks (React, Next.js, Django, Rails, Spring, Vue)
|
|
35
|
-
- Generates the optimal `opencode.json` with stack-matched MCP servers
|
|
36
|
-
- Automatically installs npm packages and registers the `opencode-agora` plugin
|
|
37
|
-
- Ready in seconds — run once, done
|
|
38
|
-
|
|
39
|
-
### `agora use` — Apply Workflows as Skills
|
|
40
|
-
- Browse 10+ production-tested workflows (TDD, security audit, API design, refactoring, etc.)
|
|
41
|
-
- `agora use wf-tdd-cycle` creates an OpenCode skill file and registers it
|
|
42
|
-
- No manual copy-pasting — one command and the workflow is live
|
|
43
|
-
|
|
44
|
-
### Rich Offline Marketplace
|
|
45
|
-
- **36+ MCP servers** across 12 categories (filesystem, databases, cloud, browser automation, monitoring, etc.)
|
|
46
|
-
- All official `@modelcontextprotocol/*` servers plus top community servers
|
|
47
|
-
- Fully functional offline — no backend required
|
|
48
|
-
- Search, browse, trending — all work with bundled data
|
|
49
|
-
|
|
50
|
-
### Config-Aware Installs
|
|
51
|
-
- `agora install mcp-github --write` installs the npm package **and** writes to config
|
|
52
|
-
- Detects OpenCode config path automatically
|
|
53
|
-
- Merge MCP servers into existing config
|
|
54
|
-
- Inspect config health with `agora config doctor`
|
|
55
|
-
|
|
56
|
-
### Community
|
|
57
|
-
- Discussion threads on tools and patterns
|
|
58
|
-
- Trending prompts and workflows
|
|
59
|
-
- Browse and create discussions from the terminal
|
|
12
|
+
`agora` is a standalone CLI that puts everything a developer building for the future cares about in one terminal: a **curated + live marketplace** of MCP servers and agent tooling, a **threaded community** with reputation-weighted sort, a **ranked news feed** with on-cache AI summarization, and **first-class install consent** for declared permissions. Works offline by default; opt into the backend with `agora auth login`.
|
|
60
13
|
|
|
61
|
-
|
|
62
|
-
- Search, browse, install-preview, review, profile, discussion, and tutorial tools from inside OpenCode
|
|
63
|
-
- Uses the same marketplace core as the CLI
|
|
64
|
-
|
|
65
|
-
### Local Hub
|
|
66
|
-
- Optional browser console for browsing the marketplace
|
|
67
|
-
- Runs locally with `bun run hub:dev`
|
|
68
|
-
|
|
69
|
-
### Learn
|
|
70
|
-
- 6 interactive tutorials on MCP, OpenCode agents, security auditing, and more
|
|
71
|
-
|
|
72
|
-
## Quick Start
|
|
73
|
-
|
|
74
|
-
The fastest way to get started — works in any project directory:
|
|
14
|
+
## Install
|
|
75
15
|
|
|
76
16
|
```bash
|
|
77
|
-
#
|
|
17
|
+
# fastest path — runs in your current project
|
|
78
18
|
npx opencode-agora init
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
For a persistent command:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npm install -g opencode-agora
|
|
85
|
-
agora init
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Install from source
|
|
89
|
-
|
|
90
|
-
Until the package is published to npm, or if you prefer to run from source:
|
|
91
19
|
|
|
92
|
-
|
|
93
|
-
|
|
20
|
+
# or install once, use anywhere
|
|
21
|
+
npm i -g opencode-agora
|
|
22
|
+
agora welcome
|
|
94
23
|
```
|
|
95
24
|
|
|
96
|
-
|
|
25
|
+
From source (requires [bun](https://bun.sh)):
|
|
97
26
|
|
|
98
27
|
```bash
|
|
99
|
-
agora
|
|
100
|
-
|
|
28
|
+
git clone https://github.com/IrgenSlj/agora.git
|
|
29
|
+
cd agora && bun install && bun run build && bun link
|
|
101
30
|
```
|
|
102
31
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
> **Note:** Browse, search, and all read-only commands work fully offline using bundled data — no backend required. Features that write data (publish, reviews, discussions, auth login) and the `--api` flag require a live backend. A hosted instance is not yet deployed. Until then, self-host via the `backend/` directory and set `AGORA_API_URL` to your instance URL before using `--api` or any write commands.
|
|
106
|
-
|
|
107
|
-
## Usage
|
|
32
|
+
The binary is published as both `agora` and `opencode-agora`.
|
|
108
33
|
|
|
109
|
-
|
|
34
|
+
## Try it
|
|
110
35
|
|
|
111
36
|
```bash
|
|
112
|
-
#
|
|
113
|
-
agora
|
|
114
|
-
agora
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
agora use wf-tdd-cycle
|
|
118
|
-
agora use wf-security-audit
|
|
37
|
+
agora welcome # guided tour, adapts when signed in
|
|
38
|
+
agora today # last 24h: news + community + trending
|
|
39
|
+
agora search mcp # 67 curated + live GitHub/HF results
|
|
40
|
+
agora install mcp-github --write --yes # install + write opencode.json
|
|
41
|
+
agora tui # 5-page full-screen interface
|
|
119
42
|
```
|
|
120
43
|
|
|
121
|
-
|
|
44
|
+
The default `agora` in a TTY drops you into a **persistent shell** that mixes bash dispatch (`ls`, `git status`) with free LLM chat (`why is this slow?`). `/help` lists the slash commands; `/abc` shows the single-letter shortcuts.
|
|
122
45
|
|
|
123
|
-
|
|
124
|
-
# Search and browse
|
|
125
|
-
agora search filesystem
|
|
126
|
-
agora search database --category mcp
|
|
127
|
-
AGORA_API_URL=https://agora.example.com agora search github --api
|
|
128
|
-
agora browse mcp-postgres
|
|
129
|
-
agora trending
|
|
130
|
-
|
|
131
|
-
# Install MCP servers
|
|
132
|
-
agora install mcp-github # preview only
|
|
133
|
-
agora install mcp-github --write # install npm package + write config
|
|
134
|
-
|
|
135
|
-
# Save/bookmark items
|
|
136
|
-
agora save wf-security-audit
|
|
137
|
-
agora saved
|
|
138
|
-
agora remove wf-security-audit
|
|
139
|
-
```
|
|
46
|
+
## Commands
|
|
140
47
|
|
|
141
|
-
|
|
48
|
+
Run `agora help` for the grouped list, or `agora help <command>` for any of these:
|
|
142
49
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
50
|
+
| Group | Commands |
|
|
51
|
+
|---|---|
|
|
52
|
+
| **Daily** | `welcome` · `today` · `bookmarks` · `share` · `open` · `author` |
|
|
53
|
+
| **Marketplace** | `search` · `browse` · `trending` · `similar` · `compare` · `install` · `workflows` |
|
|
54
|
+
| **News** | `news` (CLI) · TUI reader with AI summarization |
|
|
55
|
+
| **Community** | `community` · `thread` · `post` · `reply` · `vote` · `flag` · `discuss` |
|
|
56
|
+
| **Account** | `auth login` · `auth status` · `profile` · `review` · `reviews` · `publish` |
|
|
57
|
+
| **Moderation** | `admin hide` · `admin log` · `admin recompute` _(operator-only)_ |
|
|
58
|
+
| **Setup** | `init` · `use` · `config show/edit/doctor` · `notify` · `completions` · `ping` |
|
|
59
|
+
| **Utility** | `export` · `watch` · `chat` · `mcp` · `tui` · `menu` · `preferences` · `history` |
|
|
147
60
|
|
|
148
|
-
|
|
61
|
+
Every command supports `--json` for scripting and `--help` for inline manual.
|
|
149
62
|
|
|
150
|
-
|
|
151
|
-
agora discussions mcp --category question
|
|
152
|
-
agora discuss --title "MCP question" --content "How are you composing servers?" --category question
|
|
153
|
-
agora auth login --token $AGORA_TOKEN --api-url https://agora.example.com
|
|
154
|
-
agora auth status
|
|
155
|
-
agora publish package --name @you/server --description "MCP server" --npm @you/server
|
|
156
|
-
agora publish workflow --name "Security Audit" --description "Audit workflow" --prompt-file ./prompt.md
|
|
157
|
-
agora review mcp-github --rating 5 --content "Works well"
|
|
158
|
-
agora reviews mcp-github --api
|
|
159
|
-
agora profile alice
|
|
160
|
-
```
|
|
63
|
+
## Install consent
|
|
161
64
|
|
|
162
|
-
|
|
65
|
+
`agora install <id>` is preview-only by default. With `--write`, items that declare a permissions manifest require an explicit `--yes`:
|
|
163
66
|
|
|
164
|
-
```bash
|
|
165
|
-
agora config doctor
|
|
166
|
-
agora config doctor --json
|
|
167
67
|
```
|
|
68
|
+
$ agora install mcp-filesystem --write
|
|
69
|
+
Permissions
|
|
70
|
+
fs ./**/*
|
|
168
71
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
The CLI uses bundled offline marketplace data (36+ MCP servers, 10 workflows) by default. Add `--api`, `--live`, `AGORA_USE_API=true`, or `AGORA_API_URL` to use the live backend. Falls back to offline data if the API is unavailable.
|
|
72
|
+
This package declares permissions. Re-run with --yes to grant and install.
|
|
73
|
+
$ echo $?
|
|
74
|
+
1
|
|
75
|
+
```
|
|
174
76
|
|
|
175
|
-
|
|
77
|
+
The TUI install preview flips its footer to `g grant + install d details n cancel` when permissions are present. The list shows a dim `[fs net exec]` badge on any item with a non-empty manifest.
|
|
176
78
|
|
|
177
|
-
|
|
79
|
+
## Configuration
|
|
178
80
|
|
|
179
|
-
|
|
|
81
|
+
| Env | Meaning |
|
|
180
82
|
|---|---|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
| `/agora tutorial [id] [step]` | Interactive tutorials |
|
|
190
|
-
| `/agora info` | Help |
|
|
191
|
-
|
|
192
|
-
**Categories:** mcp, prompt, workflow, skill `|` **Data sources:** offline (default), `--api`
|
|
193
|
-
|
|
194
|
-
### Registering the plugin manually
|
|
195
|
-
|
|
196
|
-
If you did not run `agora init`, register the plugin by hand:
|
|
197
|
-
|
|
198
|
-
1. Install the package globally:
|
|
199
|
-
```bash
|
|
200
|
-
npm install -g opencode-agora
|
|
201
|
-
```
|
|
202
|
-
2. Add `"opencode-agora"` to the `plugins` array in `~/.config/opencode/opencode.json` (or your project-local `opencode.json`):
|
|
203
|
-
```json
|
|
204
|
-
{
|
|
205
|
-
"plugins": ["opencode-agora"]
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## Development
|
|
83
|
+
| `AGORA_HOME` | Override the data dir (default `~/.config/agora`) |
|
|
84
|
+
| `AGORA_API_URL` | Backend URL for `--api` reads, all writes, and `agora ping` |
|
|
85
|
+
| `AGORA_TOKEN` | Bearer token (alternatively persisted by `agora auth login`) |
|
|
86
|
+
| `AGORA_LIVE_HUBS` | `1` to merge live GitHub + HuggingFace into the marketplace |
|
|
87
|
+
| `AGORA_GITHUB_TOKEN` | Raises the unauth 60 req/hr GitHub limit to 5000 |
|
|
88
|
+
| `AGORA_ADMIN_USER_IDS` | Comma-separated user ids granted moderator commands |
|
|
89
|
+
| `EDITOR` / `VISUAL` | Used by `agora config edit` |
|
|
90
|
+
| `NO_COLOR` | Respect standard no-color convention |
|
|
210
91
|
|
|
211
|
-
|
|
212
|
-
# Typecheck
|
|
213
|
-
bun run typecheck
|
|
214
|
-
|
|
215
|
-
# Build package output
|
|
216
|
-
bun run build
|
|
92
|
+
Per-user state lives under `~/.config/agora/` — `state.json` (saves + auth), `settings.toml` (preferences), `news-cache.jsonl`, `news-meta.json` (bookmarks), `hubs-cache.jsonl`. All files holding user data are written `0o600` and atomically (`.tmp` + rename) so a crash mid-flush leaves the previous version intact.
|
|
217
93
|
|
|
218
|
-
|
|
219
|
-
bun test
|
|
94
|
+
## OpenCode plugin
|
|
220
95
|
|
|
221
|
-
|
|
222
|
-
bun src/cli.ts search filesystem
|
|
96
|
+
`agora init` also registers the package as an OpenCode plugin and drops a `.opencode/command/agora.md` slash command so the LLM can call:
|
|
223
97
|
|
|
224
|
-
# Install locally to OpenCode
|
|
225
|
-
bun run dev
|
|
226
|
-
|
|
227
|
-
# Run the optional local Hub
|
|
228
|
-
bun run hub:dev
|
|
229
98
|
```
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
agora/
|
|
235
|
-
├── src/ # CLI, plugin, and shared marketplace core
|
|
236
|
-
├── backend/ # Cloudflare Workers API
|
|
237
|
-
├── hub/ # Optional local web Hub
|
|
238
|
-
├── test/ # Tests
|
|
239
|
-
├── dist/ # Built output
|
|
240
|
-
└── README.md
|
|
99
|
+
/agora search <query>
|
|
100
|
+
/agora browse <id>
|
|
101
|
+
/agora install <id>
|
|
102
|
+
/agora chat <message>
|
|
241
103
|
```
|
|
242
104
|
|
|
105
|
+
`agora_*` tools are also reachable from any MCP client via `agora mcp` — add `{"mcp": {"agora": {"command": ["agora", "mcp"]}}}` to your `opencode.json`.
|
|
106
|
+
|
|
243
107
|
## Architecture
|
|
244
108
|
|
|
245
109
|
```
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
│ ├── api.ts # API client with fallback
|
|
257
|
-
│ ├── format.ts # Output formatting
|
|
258
|
-
│ ├── config.ts # MCP config generation
|
|
259
|
-
│ ├── data.ts # 36+ MCP servers, 10 workflows, 6 tutorials
|
|
260
|
-
│ └── types.ts # TypeScript types
|
|
261
|
-
│
|
|
262
|
-
├── backend/ # Cloudflare Workers API
|
|
263
|
-
│ ├── src/index.ts # Hono server + routes
|
|
264
|
-
│ ├── schema.sql # D1 database schema
|
|
265
|
-
│ └── services/ # npm + GitHub API clients
|
|
266
|
-
│
|
|
267
|
-
├── hub/ # Local Hub app
|
|
268
|
-
│
|
|
269
|
-
├── test/ # Unit and CLI tests
|
|
270
|
-
└── dist/ # Built output
|
|
110
|
+
src/cli/ command handlers, dispatch, shell, prompter, TUI
|
|
111
|
+
src/cli/pages/ five full-screen TUI pages (home, marketplace,
|
|
112
|
+
community, news, settings) + shared helpers
|
|
113
|
+
src/marketplace.ts curated catalog + live hub merge + install planner
|
|
114
|
+
src/hubs/ GitHub + HuggingFace connectors + AI enrichment
|
|
115
|
+
src/community/ backend client + types
|
|
116
|
+
src/news/ scoring, cache, per-source adapters
|
|
117
|
+
src/state.ts local state, saves, auth (atomic 0o600 writes)
|
|
118
|
+
backend/src/index.ts Cloudflare Workers + D1 (Hono router)
|
|
119
|
+
test/ 768 tests, 34 files
|
|
271
120
|
```
|
|
272
121
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|-----------|--------|-------|
|
|
277
|
-
| `agora init` | ✅ **New** | Project scanning, config generation, auto-install, plugin registration |
|
|
278
|
-
| `agora use` | ✅ **New** | Apply workflows as OpenCode skills in one command |
|
|
279
|
-
| `agora install --write` | ✅ **Improved** | Now auto-installs npm packages |
|
|
280
|
-
| CLI | Ready | 20 commands: `init`, `use`, `search`, `browse`, `trending`, `workflows`, `tutorials`, `tutorial`, `discussions`, `discuss`, `install`, `save`, `saved`, `remove`, `auth`, `publish`, `review`, `reviews`, `profile`, `config doctor` |
|
|
281
|
-
| Offline data | ✅ **Expanded** | 36 MCP servers, 10 workflows, 7 discussions, 6 tutorials |
|
|
282
|
-
| Live API mode | Ready | Opt-in via `--api`, `AGORA_API_URL`; falls back offline |
|
|
283
|
-
| Shared core | Ready | CLI and plugin share marketplace logic |
|
|
284
|
-
| Local state | Ready | Saved items and auth tokens under `~/.config/agora` |
|
|
285
|
-
| Plugin (offline) | Ready | Works with bundled data |
|
|
286
|
-
| Backend | 🚧 Not deployed — self-host required (see backend/) | Cloudflare Workers + D1 ready for deployment |
|
|
287
|
-
| Local Hub | Ready | Static web app served by Bun |
|
|
288
|
-
| CI | Ready | Typecheck + tests on push/PR |
|
|
289
|
-
| Publish CI | ✅ **New** | Auto-publish to npm on release |
|
|
290
|
-
|
|
291
|
-
## Testing
|
|
122
|
+
See [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for the why-this-shape writeup and [`ROADMAP.md`](./ROADMAP.md) for what's next.
|
|
123
|
+
|
|
124
|
+
## Development
|
|
292
125
|
|
|
293
126
|
```bash
|
|
294
|
-
bun test
|
|
295
|
-
|
|
127
|
+
bun test # 768 cases, ~3.5s
|
|
128
|
+
bun run typecheck # tsc -p tsconfig.check.json
|
|
129
|
+
bun run build # tsc + chmod +x dist/cli.js
|
|
130
|
+
bun src/cli.ts <cmd> # run from source without building
|
|
296
131
|
|
|
297
|
-
|
|
132
|
+
cd backend && bun run dev # local backend on wrangler
|
|
133
|
+
cd backend && bun run typecheck # backend has its own tsconfig
|
|
134
|
+
```
|
|
298
135
|
|
|
299
|
-
|
|
136
|
+
PRs welcome — see [`CONTRIBUTING.md`](./CONTRIBUTING.md) and [`COMMUNITY_GUIDELINES.md`](./COMMUNITY_GUIDELINES.md). The catalog accepts entries via PR; see `src/data.ts` for the shape.
|
|
300
137
|
|
|
301
138
|
## License
|
|
302
139
|
|
|
303
|
-
MIT
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
<p align="center">
|
|
308
|
-
Built for the developer community
|
|
309
|
-
</p>
|
|
140
|
+
[MIT](./LICENSE) — © IrgenSlj.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write `body` to `path` atomically: writes to `path.tmp`, then renames
|
|
3
|
+
* over the destination. Also chmods to `mode` (default 0o600) so files
|
|
4
|
+
* holding user data — tokens, bookmarks, settings — are owner-readable
|
|
5
|
+
* only.
|
|
6
|
+
*
|
|
7
|
+
* Ensures the parent directory exists before writing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function atomicWriteFile(path: string, body: string, mode?: number): void;
|
|
10
|
+
//# sourceMappingURL=atomic-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.d.ts","sourceRoot":"","sources":["../src/atomic-write.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,SAAQ,GAAG,IAAI,CAU9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { writeFileSync, renameSync, chmodSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { dirname } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Write `body` to `path` atomically: writes to `path.tmp`, then renames
|
|
5
|
+
* over the destination. Also chmods to `mode` (default 0o600) so files
|
|
6
|
+
* holding user data — tokens, bookmarks, settings — are owner-readable
|
|
7
|
+
* only.
|
|
8
|
+
*
|
|
9
|
+
* Ensures the parent directory exists before writing.
|
|
10
|
+
*/
|
|
11
|
+
export function atomicWriteFile(path, body, mode = 0o600) {
|
|
12
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
13
|
+
const tmp = `${path}.tmp`;
|
|
14
|
+
writeFileSync(tmp, body, { mode });
|
|
15
|
+
renameSync(tmp, path);
|
|
16
|
+
try {
|
|
17
|
+
chmodSync(path, mode);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
/* renameSync sometimes resets mode on some filesystems — best-effort */
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=atomic-write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.js","sourceRoot":"","sources":["../src/atomic-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,IAAY,EAAE,IAAI,GAAG,KAAK;IACtE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC;IAC1B,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACnC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtB,IAAI,CAAC;QACH,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;IAC1E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgoraState } from '../state.js';
|
|
2
|
+
import type { FetchLike } from '../live.js';
|
|
3
|
+
export interface EnsureFreshOpts {
|
|
4
|
+
dataDir: string;
|
|
5
|
+
fetcher?: FetchLike;
|
|
6
|
+
/** Seconds of slack before access exp at which to refresh. Default 60. */
|
|
7
|
+
slack?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns auth with a fresh access token, refreshing if needed.
|
|
11
|
+
* Persists the rotated pair back to state.json on success.
|
|
12
|
+
* Returns the original auth (untouched) if:
|
|
13
|
+
* - no refresh token available, OR
|
|
14
|
+
* - refresh request fails (let the API call fail with 401 downstream)
|
|
15
|
+
*/
|
|
16
|
+
export declare function ensureFreshAccess(state: AgoraState, opts: EnsureFreshOpts): Promise<AgoraState>;
|
|
17
|
+
//# sourceMappingURL=refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../src/auth/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CA0CrB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { setAuthState, getAuthState, clearAuthState, writeAgoraState } from '../state.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns auth with a fresh access token, refreshing if needed.
|
|
4
|
+
* Persists the rotated pair back to state.json on success.
|
|
5
|
+
* Returns the original auth (untouched) if:
|
|
6
|
+
* - no refresh token available, OR
|
|
7
|
+
* - refresh request fails (let the API call fail with 401 downstream)
|
|
8
|
+
*/
|
|
9
|
+
export async function ensureFreshAccess(state, opts) {
|
|
10
|
+
const auth = getAuthState(state);
|
|
11
|
+
if (!auth || !auth.apiUrl)
|
|
12
|
+
return state;
|
|
13
|
+
const now = Math.floor(Date.now() / 1000);
|
|
14
|
+
const slack = opts.slack ?? 60;
|
|
15
|
+
if (auth.accessExp > now + slack)
|
|
16
|
+
return state; // still fresh
|
|
17
|
+
if (!auth.refreshToken)
|
|
18
|
+
return state; // can't refresh
|
|
19
|
+
const fetcher = opts.fetcher ?? globalThis.fetch;
|
|
20
|
+
try {
|
|
21
|
+
const res = await fetcher(`${auth.apiUrl.replace(/\/+$/, '')}/auth/refresh`, {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers: { 'Content-Type': 'application/json' },
|
|
24
|
+
body: JSON.stringify({ refresh_token: auth.refreshToken })
|
|
25
|
+
});
|
|
26
|
+
if (res.status === 401) {
|
|
27
|
+
// Refresh revoked/expired — clear local auth so next attempt is clean
|
|
28
|
+
const cleared = clearAuthState(state);
|
|
29
|
+
writeAgoraState(opts.dataDir, cleared);
|
|
30
|
+
return cleared;
|
|
31
|
+
}
|
|
32
|
+
if (!res.ok)
|
|
33
|
+
return state; // transient; let caller retry
|
|
34
|
+
const data = (await res.json());
|
|
35
|
+
const nowSec = Math.floor(Date.now() / 1000);
|
|
36
|
+
const next = setAuthState(state, {
|
|
37
|
+
accessToken: data.access_token,
|
|
38
|
+
accessExp: nowSec + (data.expires_in || 0),
|
|
39
|
+
refreshToken: data.refresh_token,
|
|
40
|
+
refreshExp: nowSec + (data.refresh_expires_in || 0),
|
|
41
|
+
apiUrl: auth.apiUrl
|
|
42
|
+
});
|
|
43
|
+
writeAgoraState(opts.dataDir, next);
|
|
44
|
+
return next;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return state; // network error; let caller fail naturally
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.js","sourceRoot":"","sources":["../../src/auth/refresh.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU1F;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAiB,EACjB,IAAqB;IAErB,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAExC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAC/B,IAAI,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,KAAK;QAAE,OAAO,KAAK,CAAC,CAAC,cAAc;IAC9D,IAAI,CAAC,IAAI,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC,CAAC,gBAAgB;IAEtD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,EAAE;YAC3E,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;SAC3D,CAAC,CAAC;QACH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,sEAAsE;YACtE,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;YACtC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACvC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,KAAK,CAAC,CAAC,8BAA8B;QACzD,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAK7B,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE;YAC/B,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,SAAS,EAAE,MAAM,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;YAC1C,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,UAAU,EAAE,MAAM,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,CAAC;YACnD,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC,CAAC,2CAA2C;IAC3D,CAAC;AACH,CAAC"}
|
package/dist/cli/app.d.ts
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { type MarketplaceItem } from '../marketplace.js';
|
|
2
|
-
import { type
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fetcher?: FetchLike;
|
|
12
|
-
}
|
|
13
|
-
export interface ParsedArgs {
|
|
14
|
-
command?: string;
|
|
15
|
-
args: string[];
|
|
16
|
-
flags: Record<string, string | boolean>;
|
|
17
|
-
}
|
|
2
|
+
import { type Styler } from '../ui.js';
|
|
3
|
+
import { type CliIo } from './flags.js';
|
|
4
|
+
export declare const AGORA_VERSION: string;
|
|
5
|
+
/**
|
|
6
|
+
* Levenshtein-based suggestion: when the user mistypes a command, pick the
|
|
7
|
+
* closest registered name if it's within edit-distance 3 AND no further from
|
|
8
|
+
* the input than half its length (so "z" doesn't suggest "saved").
|
|
9
|
+
*/
|
|
10
|
+
export declare function nearestCommand(input: string): string | null;
|
|
18
11
|
export declare function runCli(argv: string[], io: CliIo): Promise<number>;
|
|
19
|
-
export declare function
|
|
12
|
+
export declare function commandManual(name: string): string;
|
|
13
|
+
export declare function commandCompletions(parsed: {
|
|
14
|
+
args: string[];
|
|
15
|
+
}, io: CliIo, _style: Styler): Promise<number>;
|
|
20
16
|
export declare function listKnownItems(): MarketplaceItem[];
|
|
21
|
-
export {};
|
|
22
17
|
//# sourceMappingURL=app.d.ts.map
|
package/dist/cli/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/cli/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/cli/app.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAmD,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAExF,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAoBnD,eAAO,MAAM,aAAa,QAAc,CAAC;AAGzC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAc3D;AA0BD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAqIvE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,EAC1B,EAAE,EAAE,KAAK,EACT,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAUjB;AAED,wBAAgB,cAAc,IAAI,eAAe,EAAE,CAElD"}
|