opencode-telegram-bridge 1.0.7 → 1.0.8

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
@@ -22,30 +22,6 @@ You still need OpenCode running separately:
22
22
  opencode serve
23
23
  ```
24
24
 
25
- ## Develop (for contributors)
26
- 1. Install dependencies:
27
-
28
- ```bash
29
- npm install
30
- ```
31
-
32
- 2. Create `.env` from the example:
33
-
34
- ```bash
35
- cp .env.example .env
36
- ```
37
-
38
- 3. Start OpenCode server in another terminal:
39
-
40
- ```bash
41
- opencode serve
42
- ```
43
-
44
- 4. Run the bot:
45
-
46
- ```bash
47
- npm run dev
48
- ```
49
-
50
- ## Releases
51
- This project uses Changesets. See `docs/release.md`.
25
+ ## Documentation
26
+ See the docs for configuration, usage, and systemd setup:
27
+ https://gabriel-trigo.github.io/opencode-telegram-bridge/
@@ -1,6 +1,6 @@
1
1
  # Configuration
2
2
 
3
- Set these environment variables in `.env` or in your service environment.
3
+ Set these environment variables in your shell or service environment.
4
4
 
5
5
  ## Required
6
6
  - `TELEGRAM_BOT_TOKEN` - Telegram bot token.
package/docs/index.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # OpenCode Telegram Bridge
2
2
 
3
- Run a Telegram bot that forwards messages to an OpenCode backend and returns responses. This site is a minimal, markdown-first reference for operating the bridge.
3
+ Run a Telegram bot that forwards messages to an OpenCode backend and returns responses. These docs are for end users and aim to make setup and operation unambiguous.
4
4
 
5
5
  Start here:
6
6
  - Installation
7
7
  - Configuration
8
8
  - Usage
9
9
  - Systemd
10
- - Release
@@ -3,40 +3,14 @@
3
3
  ## Prerequisites
4
4
  - Node.js 18+
5
5
  - OpenCode CLI installed and available on PATH (see https://opencode.ai/docs/cli/)
6
+ - OpenCode server running (`opencode serve`)
6
7
 
7
- ## Install dependencies
8
- ```bash
9
- npm install
10
- ```
11
-
12
- ## Start OpenCode server
13
- ```bash
14
- opencode serve
15
- ```
16
-
17
- ## Configure environment
18
- Copy the example file and fill in values:
19
- ```bash
20
- cp .env.example .env
21
- ```
22
-
23
- ## Run the bot
24
- ```bash
25
- npm run dev
26
- ```
27
-
28
- For production, build and run:
29
- ```bash
30
- npm run build
31
- npm start
32
- ```
33
-
34
- ## Install via npm
8
+ ## Install
35
9
  ```bash
36
10
  npm install -g opencode-telegram-bridge
37
11
  ```
38
12
 
39
- Run:
13
+ ## Run the bot
40
14
  ```bash
41
15
  opencode-telegram-bridge
42
16
  ```
package/docs/systemd.md CHANGED
@@ -3,11 +3,10 @@
3
3
  This project ships a systemd unit template in `systemd/opencode-telegram-bridge.service`.
4
4
 
5
5
  ## Install
6
- 1. Build the project:
6
+ 1. Install the package:
7
7
 
8
8
  ```bash
9
- npm install
10
- npm run build
9
+ npm install -g opencode-telegram-bridge
11
10
  ```
12
11
 
13
12
  2. Copy the service and env files:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-telegram-bridge",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/docs/release.md DELETED
@@ -1,112 +0,0 @@
1
- # Release
2
-
3
- This project is published as an npm package.
4
-
5
- ## Mental model
6
- Every CI run (PRs and pushes) requires a changeset for non-doc changes or it
7
- fails. A push to `main` creates or updates the release PR. A merged PR leads to
8
- a push to `main`, so it also updates the release PR. The release PR accumulates
9
- changesets until it is merged. When the release PR is merged, npm publishes a
10
- new version and a GitHub release is created using the accumulated changesets.
11
-
12
- ## CI + release flowcharts
13
-
14
- ### Pull request opened
15
- ```
16
- PR opened/updated
17
- |
18
- v
19
- CI workflow (pull_request)
20
- |
21
- +--> npm ci
22
- +--> changeset check (diff base...head)
23
- | |
24
- | +--> relevant change + no changeset -> FAIL
25
- | +--> docs-only or has changeset -> OK
26
- +--> typecheck + tests + build
27
- |
28
- v
29
- Status checks gate merge to main
30
- ```
31
-
32
- ### Push to main
33
- ```
34
- Push to main
35
- |
36
- v
37
- CI workflow (push)
38
- |
39
- +--> npm ci
40
- +--> changeset check (diff before...after)
41
- | |
42
- | +--> relevant change + no changeset -> FAIL
43
- | +--> docs-only or has changeset -> OK
44
- +--> typecheck + tests + build
45
- |
46
- v
47
- Release workflow (push)
48
- |
49
- +--> changesets/action
50
- |
51
- +--> changesets present?
52
- | |
53
- | +--> yes: create/update release PR (changeset-release/main)
54
- | | (no publish)
55
- | |
56
- | +--> no: run `npm run release` (publish to npm)
57
- |
58
- +--> if published: create GitHub release tag (unless it already exists)
59
- ```
60
-
61
- ## Manual release (local)
62
- 1. Add a changeset for your change:
63
-
64
- ```bash
65
- npx changeset
66
- ```
67
-
68
- 2. Version the release:
69
-
70
- ```bash
71
- npm run version
72
- ```
73
-
74
- 3. Publish:
75
-
76
- ```bash
77
- npm run release
78
- ```
79
-
80
- The `prepublishOnly` script runs the build to ensure `dist/` is included.
81
-
82
- ## Required setup (GitHub Actions)
83
- - Configure npm Trusted Publishing for this repo and workflow file (`release.yml`).
84
- - The workflow requires `id-token: write` permission to publish via OIDC.
85
- - npm CLI 11.5.1+ is required for trusted publishing.
86
-
87
- ## CI enforcement
88
- CI fails if a relevant code change lands without a `.changeset/*.md` file.
89
- Docs-only updates (`docs/`, `README.md`, `.github/`) do not require a changeset.
90
-
91
- ## FAQ
92
-
93
- ### How is the version bump decided?
94
- You pick it when you run `npx changeset`. The changeset file records whether the
95
- change is a `patch`, `minor`, or `major`. When you run `npm run version`, all
96
- pending changesets are read and the highest required bump wins.
97
-
98
- ### How is the changelog generated?
99
- The changelog is generated from the text in the changeset files, not from
100
- commits. Each changeset contributes a short release note entry.
101
-
102
- ### Does each merged PR cause a new package version?
103
- No. Merged PRs with changesets update the release PR. A new version is published
104
- only when the release PR is merged.
105
-
106
- ### What happens if I push to main without a changeset?
107
- CI fails. Add a changeset in a follow-up commit and push again. Do not rewrite
108
- history on main.
109
-
110
- ### Do I need one changeset per commit or per push?
111
- No. You need one changeset per release-worthy change (often one per PR). A
112
- single changeset can cover multiple commits.