@cofy-x/dsh-console 0.1.0-alpha.0 → 0.1.0-alpha.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 +8 -14
- package/dist/{chunk-YNJGTXFJ.js → chunk-N3EQS35J.js} +36 -5
- package/dist/{chunk-Z7RUTXMO.js → chunk-QZDOYPUU.js} +1331 -488
- package/dist/dsh/index.js +2 -2
- package/dist/index.js +2 -2
- package/dist/ui/renderers.js +1 -1
- package/package.json +17 -7
package/README.md
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
# DSH Console
|
|
2
2
|
|
|
3
|
-
`dsh-console` is a TypeScript and React/Ink terminal frontend for
|
|
4
|
-
[DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness).
|
|
3
|
+
`dsh-console` is a TypeScript and React/Ink terminal frontend for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness).
|
|
5
4
|
|
|
6
|
-
> DSH Console is currently a public alpha. Commands and UI details may change
|
|
7
|
-
> before the first stable release.
|
|
5
|
+
> DSH Console is currently a public alpha. Commands and UI details may change before the first stable release.
|
|
8
6
|
|
|
9
7
|
## Install
|
|
10
8
|
|
|
11
|
-
DSH Console requires Node.js 24 or newer and a working DSH provider
|
|
12
|
-
configuration.
|
|
9
|
+
DSH Console requires Node.js 24 or newer and a working DSH provider configuration.
|
|
13
10
|
|
|
14
11
|
```sh
|
|
15
|
-
npm install --global @deepseek-ai/dsh @cofy-x/dsh-console
|
|
12
|
+
npm install --global @deepseek-ai/dsh @cofy-x/dsh-console
|
|
16
13
|
dsh-console --prompt "hello"
|
|
17
14
|
```
|
|
18
15
|
|
|
19
|
-
Alpha releases
|
|
16
|
+
Public Alpha releases are intentionally available through npm's default `latest` channel for a simple installation path, while the published version keeps its `-alpha.x` prerelease identifier so the maturity level remains explicit.
|
|
20
17
|
|
|
21
18
|
## Use
|
|
22
19
|
|
|
23
|
-
The launcher initializes or locates the `dsh-console` DSH profile and starts an
|
|
24
|
-
interactive terminal session. Useful commands include:
|
|
20
|
+
The launcher initializes or locates the `dsh-console` DSH profile and starts an interactive terminal session. Useful commands include:
|
|
25
21
|
|
|
26
22
|
```text
|
|
27
23
|
/model Select the active DSH model
|
|
@@ -34,8 +30,6 @@ interactive terminal session. Useful commands include:
|
|
|
34
30
|
/settings Edit Console settings
|
|
35
31
|
```
|
|
36
32
|
|
|
37
|
-
DSH owns provider credentials, model routing, session logs, and attachments.
|
|
38
|
-
DSH Console does not maintain a separate authentication or session database.
|
|
33
|
+
DSH owns provider credentials, model routing, session logs, and attachments. DSH Console does not maintain a separate authentication or session database.
|
|
39
34
|
|
|
40
|
-
See the [GitHub repository](https://github.com/cofy-x/dsh-console) for source
|
|
41
|
-
development, architecture, alpha boundaries, and license attribution details.
|
|
35
|
+
See the [GitHub repository](https://github.com/cofy-x/dsh-console) for source development, architecture, alpha boundaries, and license attribution details.
|
|
@@ -1585,24 +1585,52 @@ var NEVER_ALLOWED_NAME_PATTERNS = [
|
|
|
1585
1585
|
var NEVER_ALLOWED_VALUE_PATTERNS = [
|
|
1586
1586
|
/-----BEGIN (RSA|OPENSSH|EC|PGP) PRIVATE KEY-----/i,
|
|
1587
1587
|
/-----BEGIN CERTIFICATE-----/i,
|
|
1588
|
-
// Credentials in URL
|
|
1589
|
-
/(https?|ftp|smtp):\/\/[^:]+:[^@]+@/i,
|
|
1590
1588
|
// GitHub tokens (classic, fine-grained, OAuth, etc.)
|
|
1591
1589
|
/(ghp|gho|ghu|ghs|ghr|github_pat)_[a-zA-Z0-9_]{36,}/i,
|
|
1592
1590
|
// Google API keys
|
|
1593
1591
|
/AIzaSy[a-zA-Z0-9_\\-]{33}/i,
|
|
1594
1592
|
// Amazon AWS Access Key ID
|
|
1595
1593
|
/AKIA[A-Z0-9]{16}/i,
|
|
1596
|
-
// Generic OAuth/JWT tokens
|
|
1597
|
-
/eyJ[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*/i,
|
|
1598
1594
|
// Stripe API keys
|
|
1599
1595
|
/(s|r)k_(live|test)_[0-9a-zA-Z]{24}/i,
|
|
1600
1596
|
// Slack tokens (bot, user, etc.)
|
|
1601
1597
|
/xox[abpr]-[a-zA-Z0-9-]+/i
|
|
1602
1598
|
];
|
|
1599
|
+
var CREDENTIAL_URL_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
1600
|
+
"http:",
|
|
1601
|
+
"https:",
|
|
1602
|
+
"ftp:",
|
|
1603
|
+
"smtp:"
|
|
1604
|
+
]);
|
|
1605
|
+
function containsUrlCredentials(value) {
|
|
1606
|
+
try {
|
|
1607
|
+
const url = new URL(value);
|
|
1608
|
+
return CREDENTIAL_URL_PROTOCOLS.has(url.protocol) && (url.username.length > 0 || url.password.length > 0);
|
|
1609
|
+
} catch {
|
|
1610
|
+
return false;
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
function isBase64UrlSegment(value) {
|
|
1614
|
+
if (value.length === 0) {
|
|
1615
|
+
return false;
|
|
1616
|
+
}
|
|
1617
|
+
for (const character of value) {
|
|
1618
|
+
const code = character.charCodeAt(0);
|
|
1619
|
+
const isDigit = code >= 48 && code <= 57;
|
|
1620
|
+
const isUppercase = code >= 65 && code <= 90;
|
|
1621
|
+
const isLowercase = code >= 97 && code <= 122;
|
|
1622
|
+
if (!isDigit && !isUppercase && !isLowercase && character !== "_" && character !== "-") {
|
|
1623
|
+
return false;
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
return true;
|
|
1627
|
+
}
|
|
1628
|
+
function looksLikeJwt(value) {
|
|
1629
|
+
const segments = value.split(".");
|
|
1630
|
+
return segments.length === 3 && segments[0].startsWith("eyJ") && segments.every(isBase64UrlSegment);
|
|
1631
|
+
}
|
|
1603
1632
|
function shouldRedactEnvironmentVariable(key, value, allowedSet, blockedSet, isStrictSanitization = false) {
|
|
1604
1633
|
key = key.toUpperCase();
|
|
1605
|
-
value = value?.toUpperCase();
|
|
1606
1634
|
if (allowedSet?.has(key)) {
|
|
1607
1635
|
return false;
|
|
1608
1636
|
}
|
|
@@ -1624,6 +1652,9 @@ function shouldRedactEnvironmentVariable(key, value, allowedSet, blockedSet, isS
|
|
|
1624
1652
|
}
|
|
1625
1653
|
}
|
|
1626
1654
|
if (value) {
|
|
1655
|
+
if (containsUrlCredentials(value) || looksLikeJwt(value)) {
|
|
1656
|
+
return true;
|
|
1657
|
+
}
|
|
1627
1658
|
for (const pattern of NEVER_ALLOWED_VALUE_PATTERNS) {
|
|
1628
1659
|
if (pattern.test(value)) {
|
|
1629
1660
|
return true;
|