@openthread/claude-code-plugin 0.1.0 → 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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openthread-share",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Share Claude Code conversations to OpenThread",
5
5
  "icon": "icon.svg",
6
6
  "author": {
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @openthread/claude-code-plugin
2
2
 
3
- Share Claude Code conversations to [OpenThread](https://openthread.dev) -- a Reddit-like platform for AI conversation threads.
3
+ Share Claude Code conversations to [OpenThread](https://openthread.me) -- a Reddit-like platform for AI conversation threads.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@openthread/claude-code-plugin)](https://www.npmjs.com/package/@openthread/claude-code-plugin)
6
6
  [![license](https://img.shields.io/npm/l/@openthread/claude-code-plugin)](https://github.com/nicholasgriffintn/openthread/blob/main/LICENSE)
@@ -24,7 +24,7 @@ Authenticated as @yourname
24
24
  Auto-generated title: "Debugging PKCE token refresh in auth middleware"
25
25
  Posted to c/ClaudeCode
26
26
 
27
- https://openthread.dev/c/ClaudeCode/posts/abc123
27
+ https://openthread.me/c/ClaudeCode/posts/abc123
28
28
  ```
29
29
 
30
30
  ## Features
@@ -72,14 +72,14 @@ Environment variables override the default endpoints. Set them in your shell pro
72
72
 
73
73
  | Variable | Default | Description |
74
74
  | --- | --- | --- |
75
- | `OPENTHREAD_API_URL` | `https://api.openthread.dev` | Backend API base URL |
76
- | `OPENTHREAD_WEB_URL` | `https://openthread.dev` | Web app base URL (used for post links) |
75
+ | `OPENTHREAD_API_URL` | `https://openthread.me/api` | Backend API base URL |
76
+ | `OPENTHREAD_WEB_URL` | `https://openthread.me` | Web app base URL (used for post links) |
77
77
 
78
78
  ## Manual Install
79
79
 
80
80
  If you prefer not to use npm:
81
81
 
82
- 1. Download the latest release `.zip` from the [GitHub releases page](https://github.com/nicholasgriffintn/openthread/releases).
82
+ 1. Download the latest `.zip` release from [openthread.me/extensions](https://openthread.me/extensions).
83
83
  2. Extract it to `~/.claude/plugins/openthread-share/`.
84
84
  3. Restart Claude Code. The plugin will be detected on next launch.
85
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openthread/claude-code-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Share Claude Code conversations to OpenThread",
5
5
  "bin": {
6
6
  "openthread-claude": "bin/cli.sh"
@@ -29,10 +29,5 @@
29
29
  "share"
30
30
  ],
31
31
  "author": "OpenThread",
32
- "license": "MIT",
33
- "repository": {
34
- "type": "git",
35
- "url": "https://github.com/nicholasgriffintn/openthread.git",
36
- "directory": "apps/claude-code-plugin"
37
- }
38
- }
32
+ "license": "MIT"
33
+ }
package/scripts/auth.sh CHANGED
@@ -7,8 +7,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
7
  # shellcheck source=token.sh
8
8
  source "$SCRIPT_DIR/token.sh"
9
9
 
10
- API_BASE="${OPENTHREAD_API_URL:-https://api.openthread.dev}"
11
- WEB_BASE="${OPENTHREAD_WEB_URL:-https://openthread.dev}"
10
+ API_BASE="${OPENTHREAD_API_URL:-https://openthread.me/api}"
11
+ WEB_BASE="${OPENTHREAD_WEB_URL:-https://openthread.me}"
12
12
  EXTENSION_ID="claude-code"
13
13
  CALLBACK_PORT=18923
14
14
  REDIRECT_URI="http://localhost:${CALLBACK_PORT}/callback"
@@ -149,7 +149,7 @@ exchange_code() {
149
149
 
150
150
  echo "Exchanging authorization code for tokens..." >&2
151
151
 
152
- RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/api/auth/extension/token" \
152
+ RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/auth/extension/token" \
153
153
  -H "Content-Type: application/json" \
154
154
  -d "{
155
155
  \"code\": \"${auth_code}\",
package/scripts/share.sh CHANGED
@@ -7,7 +7,7 @@
7
7
  set -euo pipefail
8
8
 
9
9
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
- API_BASE="${OPENTHREAD_API_URL:-https://api.openthread.dev}"
10
+ API_BASE="${OPENTHREAD_API_URL:-https://openthread.me/api}"
11
11
 
12
12
  # --- Parse JSONL session file into compact markdown body ---
13
13
  # Extracts only text blocks from assistant messages, skips thinking/tool_use/tool_result/etc.
@@ -131,7 +131,7 @@ print(json.dumps(payload))
131
131
  " "$compact_body" "$title" "$community_id" "$tags_json")
132
132
 
133
133
  # POST to import endpoint
134
- RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/api/posts/import" \
134
+ RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/posts/import" \
135
135
  -H "Authorization: Bearer ${access_token}" \
136
136
  -H "Content-Type: application/json" \
137
137
  -d "$payload")
@@ -192,7 +192,7 @@ print(json.dumps(payload))
192
192
  " "$export_file" "$title" "$community_id" "$tags_json")
193
193
 
194
194
  # POST to import endpoint
195
- RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/api/posts/import" \
195
+ RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/posts/import" \
196
196
  -H "Authorization: Bearer ${access_token}" \
197
197
  -H "Content-Type: application/json" \
198
198
  -d "$payload")
package/scripts/token.sh CHANGED
@@ -7,7 +7,7 @@
7
7
  # bash token.sh check — exit 0 if authenticated, 1 if not
8
8
  set -euo pipefail
9
9
 
10
- API_BASE="${OPENTHREAD_API_URL:-https://api.openthread.dev}"
10
+ API_BASE="${OPENTHREAD_API_URL:-https://openthread.me/api}"
11
11
  EXTENSION_ID="claude-code"
12
12
  CREDENTIALS_DIR="$HOME/.config/openthread"
13
13
  CREDENTIALS_FILE="$CREDENTIALS_DIR/credentials.json"
@@ -75,7 +75,7 @@ refresh_token() {
75
75
  local current_refresh
76
76
  current_refresh=$(get_refresh_token) || return 1
77
77
 
78
- RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/api/auth/extension/refresh" \
78
+ RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/auth/extension/refresh" \
79
79
  -H "Content-Type: application/json" \
80
80
  -d "{
81
81
  \"refreshToken\": \"${current_refresh}\",
@@ -10,8 +10,8 @@ This skill shares the current Claude Code conversation to OpenThread in 4 steps.
10
10
  ## Configuration
11
11
 
12
12
  ```
13
- API_BASE="${OPENTHREAD_API_URL:-http://localhost:3001}"
14
- WEB_BASE="${OPENTHREAD_WEB_URL:-http://localhost:3000}"
13
+ API_BASE="${OPENTHREAD_API_URL:-https://openthread.me/api}"
14
+ WEB_BASE="${OPENTHREAD_WEB_URL:-https://openthread.me}"
15
15
  PLUGIN_DIR=<directory containing this skill — find it relative to this file, e.g. apps/claude-code-plugin or ~/.claude/plugins/openthread-share>
16
16
  ```
17
17
 
@@ -93,7 +93,7 @@ First, check if the `/share-thread` command was invoked with **arguments** (any
93
93
 
94
94
  1. **Fetch communities**:
95
95
  ```bash
96
- curl -s -H "Authorization: Bearer $ACCESS_TOKEN" "$API_BASE/api/communities?limit=50"
96
+ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" "$API_BASE/communities?limit=50"
97
97
  ```
98
98
  Response format: `{"data": [{"id": "uuid", "name": "Name", "slug": "slug"}, ...], "pagination": {...}}`
99
99