@goodandready/dsh-clinebot 0.6.29 → 0.6.31

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/lib/updater.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getConnection } from './http.js'
1
+ import { getConnection, isLoopbackAddress, isLoopbackHostname } from './http.js'
2
2
  /**
3
3
  * Host-side one-click updater for @goodandready/dsh-clinebot.
4
4
  * Conforms to the DSH authoring reference implementation.
@@ -58,12 +58,7 @@ function header(request, name) {
58
58
  return Array.isArray(value) ? value[0] : value
59
59
  }
60
60
 
61
- function isLoopback(value) {
62
- const address = value?.toLowerCase().replace(/^\[|\]$/g, '')
63
- return address === 'localhost' || address === 'localhost.' || address === '::1'
64
- || address?.startsWith('127.') === true
65
- || address?.startsWith('::ffff:127.') === true
66
- }
61
+
67
62
 
68
63
  export function isTrustedUpdateRequest(request, targetCtx = null) {
69
64
  if (header(request, UPDATE_HEADER) !== '1') return false
@@ -77,7 +72,7 @@ export function isTrustedUpdateRequest(request, targetCtx = null) {
77
72
  }
78
73
  if (rejection !== undefined) return false
79
74
  }
80
- if (!isLoopback(request?.socket?.remoteAddress)) return false
75
+ if (!isLoopbackAddress(request?.socket?.remoteAddress)) return false
81
76
  const site = header(request, 'sec-fetch-site')
82
77
  if (site !== undefined && site !== 'same-origin') return false
83
78
  const origin = header(request, 'origin')
@@ -86,7 +81,7 @@ export function isTrustedUpdateRequest(request, targetCtx = null) {
86
81
  try {
87
82
  const url = new URL(origin)
88
83
  return (url.protocol === 'http:' || url.protocol === 'https:')
89
- && isLoopback(url.hostname) && url.host === host
84
+ && isLoopbackHostname(url.hostname) && url.host === host
90
85
  } catch {
91
86
  return false
92
87
  }
package/package.json CHANGED
@@ -1,117 +1,117 @@
1
- {
2
- "name": "@goodandready/dsh-clinebot",
3
- "version": "0.6.29",
4
- "description": "DeepSeek Harness companion for ClineBot / ClinePass: dynamic subscription models sync, quota exhaustion warnings, session metrics, dedicated settings page, live usage limits, and /cline slash-command.",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "./lib/index.js",
8
- "exports": {
9
- ".": "./lib/index.js",
10
- "./client": "./lib/client.js",
11
- "./package.json": "./package.json",
12
- "./cordis.patch.yml": "./cordis.patch.yml"
13
- },
14
- "files": [
15
- "lib/",
16
- "cordis.patch.yml",
17
- "README.md",
18
- "README.ru.md",
19
- "README.zh.md",
20
- "CHANGELOG.md",
21
- "LICENSE",
22
- "media/visual-verification.png"
23
- ],
24
- "keywords": [
25
- "dsh",
26
- "dsh-plugin",
27
- "deepseek-harness",
28
- "cline",
29
- "clinebot",
30
- "clinepass",
31
- "openai-compatible",
32
- "llm-provider",
33
- "usage-dashboard",
34
- "quota-limits"
35
- ],
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/GooDAnDReaDY/dsh-clinebot.git"
39
- },
40
- "scripts": {
41
- "build:client": "node scripts/build-client.js",
42
- "test": "node scripts/build-client.js && node --import ./test/_setup.mjs --test test/*.test.js"
43
- },
44
- "engines": {
45
- "node": ">=22",
46
- "dsh": ">=0.2.1-rc.2 <0.2.3-0"
47
- },
48
- "dsh": {
49
- "bundle": {
50
- "patch": "./cordis.patch.yml"
51
- },
52
- "compatibility": {
53
- "dsh": ">=0.2.1-rc.2 <0.2.3-0",
54
- "dshReleases": {
55
- "0.2.1-rc.2": "compatible",
56
- "0.2.1-rc.3": "compatible",
57
- "0.2.1-rc.4": "compatible",
58
- "0.2.2-rc.1": "compatible"
59
- }
60
- },
61
- "client": {
62
- "platform": "web",
63
- "inject": [
64
- "@deepseek-ai/dsh-client-ui-slots",
65
- "@deepseek-ai/dsh-client-locale",
66
- "@deepseek-ai/dsh-client-ui-settings"
67
- ]
68
- }
69
- },
70
- "peerDependencies": {
71
- "@deepseek-ai/cordis": "~4.0.5",
72
- "@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.3-0",
73
- "@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.3-0",
74
- "@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.3-0",
75
- "@deepseek-ai/dsh-host-webserver": ">=0.2.1-rc.2 <0.2.3-0",
76
- "@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.3-0",
77
- "@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.3-0",
78
- "@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.3-0",
79
- "@deepseek-ai/schemastery": "~3.18.5",
80
- "react": "^18.2.0"
81
- },
82
- "peerDependenciesMeta": {
83
- "@deepseek-ai/dsh-attachment": {
84
- "optional": true
85
- },
86
- "@deepseek-ai/dsh-commands": {
87
- "optional": true
88
- },
89
- "@deepseek-ai/dsh-settings": {
90
- "optional": true
91
- },
92
- "@deepseek-ai/dsh-web": {
93
- "optional": true
94
- },
95
- "react": {
96
- "optional": true
97
- }
98
- },
99
- "devDependencies": {
100
- "@deepseek-ai/cordis": "~4.0.5",
101
- "@deepseek-ai/dsh-attachment": "^0.2.1-rc.2",
102
- "@deepseek-ai/dsh-brand": "0.2.1-rc.2",
103
- "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
104
- "@deepseek-ai/schemastery": "~3.18.5",
105
- "@types/node": "^24.0.0",
106
- "esbuild": "^0.28.2",
107
- "eslint": "^9.39.5",
108
- "typescript": "^6.0.3"
109
- },
110
- "homepage": "https://github.com/GooDAnDReaDY/dsh-clinebot#readme",
111
- "bugs": {
112
- "url": "https://github.com/GooDAnDReaDY/dsh-clinebot/issues"
113
- },
114
- "publishConfig": {
115
- "access": "public"
116
- }
117
- }
1
+ {
2
+ "name": "@goodandready/dsh-clinebot",
3
+ "version": "0.6.31",
4
+ "description": "DeepSeek Harness companion for ClineBot / ClinePass: dynamic subscription models sync, quota exhaustion warnings, session metrics, dedicated settings page, live usage limits, and /cline slash-command.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "exports": {
9
+ ".": "./lib/index.js",
10
+ "./client": "./lib/client.js",
11
+ "./package.json": "./package.json",
12
+ "./cordis.patch.yml": "./cordis.patch.yml"
13
+ },
14
+ "files": [
15
+ "lib/",
16
+ "cordis.patch.yml",
17
+ "README.md",
18
+ "README.ru.md",
19
+ "README.zh.md",
20
+ "CHANGELOG.md",
21
+ "LICENSE",
22
+ "media/visual-verification.png"
23
+ ],
24
+ "keywords": [
25
+ "dsh",
26
+ "dsh-plugin",
27
+ "deepseek-harness",
28
+ "cline",
29
+ "clinebot",
30
+ "clinepass",
31
+ "openai-compatible",
32
+ "llm-provider",
33
+ "usage-dashboard",
34
+ "quota-limits"
35
+ ],
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/GooDAnDReaDY/dsh-clinebot.git"
39
+ },
40
+ "scripts": {
41
+ "build:client": "node scripts/build-client.js",
42
+ "test": "node scripts/build-client.js && node --import ./test/_setup.mjs --test test/*.test.js"
43
+ },
44
+ "engines": {
45
+ "node": ">=22",
46
+ "dsh": ">=0.2.1-rc.2 <0.2.3-0"
47
+ },
48
+ "dsh": {
49
+ "bundle": {
50
+ "patch": "./cordis.patch.yml"
51
+ },
52
+ "compatibility": {
53
+ "dsh": ">=0.2.1-rc.2 <0.2.3-0",
54
+ "dshReleases": {
55
+ "0.2.1-rc.2": "compatible",
56
+ "0.2.1-rc.3": "compatible",
57
+ "0.2.1-rc.4": "compatible",
58
+ "0.2.2-rc.1": "compatible"
59
+ }
60
+ },
61
+ "client": {
62
+ "platform": "web",
63
+ "inject": [
64
+ "@deepseek-ai/dsh-client-ui-slots",
65
+ "@deepseek-ai/dsh-client-locale",
66
+ "@deepseek-ai/dsh-client-ui-settings"
67
+ ]
68
+ }
69
+ },
70
+ "peerDependencies": {
71
+ "@deepseek-ai/cordis": "~4.0.5",
72
+ "@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.3-0",
73
+ "@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.3-0",
74
+ "@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.3-0",
75
+ "@deepseek-ai/dsh-host-webserver": ">=0.2.1-rc.2 <0.2.3-0",
76
+ "@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.3-0",
77
+ "@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.3-0",
78
+ "@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.3-0",
79
+ "@deepseek-ai/schemastery": "~3.18.5",
80
+ "react": "^18.2.0"
81
+ },
82
+ "peerDependenciesMeta": {
83
+ "@deepseek-ai/dsh-attachment": {
84
+ "optional": true
85
+ },
86
+ "@deepseek-ai/dsh-commands": {
87
+ "optional": true
88
+ },
89
+ "@deepseek-ai/dsh-settings": {
90
+ "optional": true
91
+ },
92
+ "@deepseek-ai/dsh-web": {
93
+ "optional": true
94
+ },
95
+ "react": {
96
+ "optional": true
97
+ }
98
+ },
99
+ "devDependencies": {
100
+ "@deepseek-ai/cordis": "~4.0.5",
101
+ "@deepseek-ai/dsh-attachment": "^0.2.1-rc.2",
102
+ "@deepseek-ai/dsh-brand": "0.2.1-rc.2",
103
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
104
+ "@deepseek-ai/schemastery": "~3.18.5",
105
+ "@types/node": "^24.0.0",
106
+ "esbuild": "^0.28.2",
107
+ "eslint": "^9.39.5",
108
+ "typescript": "^6.0.3"
109
+ },
110
+ "homepage": "https://github.com/GooDAnDReaDY/dsh-clinebot#readme",
111
+ "bugs": {
112
+ "url": "https://github.com/GooDAnDReaDY/dsh-clinebot/issues"
113
+ },
114
+ "publishConfig": {
115
+ "access": "public"
116
+ }
117
+ }