@songtonyli/dsh-cli 0.1.63 → 0.1.65
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 +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +17 -14
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +17 -7
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +17 -7
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +37 -3
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +42 -4
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +9 -2
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.remote-client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/types/index.js +48 -4
- package/node_modules/@deepseek-ai/dsh-sandbox/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/lib/index.js +13 -4
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/lib/index.js +14 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/lib/index.js +16 -0
- package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +3 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +13 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +31 -11
- package/node_modules/http-cache-semantics/index.js +32 -9
- package/node_modules/http-cache-semantics/package.json +3 -3
- package/package.json +2 -2
|
@@ -334,12 +334,13 @@ module.exports = class CachePolicy {
|
|
|
334
334
|
|
|
335
335
|
/**
|
|
336
336
|
* @param {{headers: Record<string, string>, synchronous: boolean}|undefined} revalidation - Revalidation information, if any.
|
|
337
|
-
* @returns {{response:
|
|
337
|
+
* @returns {{response: HttpResponse, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info.
|
|
338
338
|
*/
|
|
339
339
|
_evaluateRequestHitResult(revalidation) {
|
|
340
340
|
return {
|
|
341
341
|
response: {
|
|
342
342
|
headers: this.responseHeaders(),
|
|
343
|
+
status: this._status,
|
|
343
344
|
},
|
|
344
345
|
revalidation,
|
|
345
346
|
};
|
|
@@ -387,9 +388,9 @@ module.exports = class CachePolicy {
|
|
|
387
388
|
* }
|
|
388
389
|
* ```
|
|
389
390
|
* @param {HttpRequest} req - new incoming HTTP request
|
|
390
|
-
* @returns {{response:
|
|
391
|
+
* @returns {{response: HttpResponse|undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object containing keys:
|
|
391
392
|
* - revalidation: { headers: Record<string, string>, synchronous: boolean } Set if you should send this to the origin server
|
|
392
|
-
* - response:
|
|
393
|
+
* - response: HttpResponse Set if you can respond to the client with these cached headers
|
|
393
394
|
*/
|
|
394
395
|
evaluateRequest(req) {
|
|
395
396
|
this._assertRequestHasHeaders(req);
|
|
@@ -484,18 +485,32 @@ module.exports = class CachePolicy {
|
|
|
484
485
|
return true;
|
|
485
486
|
}
|
|
486
487
|
|
|
487
|
-
// A Vary header field-value of "*" always fails to match
|
|
488
|
-
if (this._resHeaders.vary === '*') {
|
|
489
|
-
return false;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
488
|
const fields = this._resHeaders.vary
|
|
493
489
|
.trim()
|
|
494
490
|
.toLowerCase()
|
|
495
491
|
.split(/\s*,\s*/);
|
|
492
|
+
|
|
496
493
|
for (const name of fields) {
|
|
497
|
-
|
|
494
|
+
// A Vary header field-value of "*" always fails to match
|
|
495
|
+
if (name === '*') {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const newReq = Object.prototype.hasOwnProperty.call(
|
|
500
|
+
req.headers,
|
|
501
|
+
name
|
|
502
|
+
) && req.headers[name];
|
|
503
|
+
|
|
504
|
+
const cachedReq = Object.prototype.hasOwnProperty.call(
|
|
505
|
+
this._reqHeaders,
|
|
506
|
+
name
|
|
507
|
+
) && this._reqHeaders[name];
|
|
508
|
+
|
|
509
|
+
if (newReq !== cachedReq) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
498
512
|
}
|
|
513
|
+
|
|
499
514
|
return true;
|
|
500
515
|
}
|
|
501
516
|
|
|
@@ -556,6 +571,14 @@ module.exports = class CachePolicy {
|
|
|
556
571
|
return headers;
|
|
557
572
|
}
|
|
558
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Returns the status code of the cached response.
|
|
576
|
+
* @returns {number} The response status code.
|
|
577
|
+
*/
|
|
578
|
+
status() {
|
|
579
|
+
return this._status;
|
|
580
|
+
}
|
|
581
|
+
|
|
559
582
|
/**
|
|
560
583
|
* Returns the Date header value from the response or the current time if invalid.
|
|
561
584
|
* @returns {number} Timestamp (in milliseconds) representing the Date header or response time.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "http-cache-semantics",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"index.js"
|
|
13
13
|
],
|
|
14
|
-
"author": "Kornel Lesiński <
|
|
14
|
+
"author": "Kornel Lesiński <kornel@geekhood.net> (https://kornel.ski/)",
|
|
15
15
|
"license": "BSD-2-Clause",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"mocha": "^
|
|
17
|
+
"mocha": "^12.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@songtonyli/dsh-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"description": "The dsh terminal agent: an interactive TUI over the DeepSeek Harness, with its whole Node runtime bundled in one install.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
"hast-util-to-html": "9.0.5",
|
|
471
471
|
"hast-util-whitespace": "3.0.0",
|
|
472
472
|
"html-void-elements": "3.0.0",
|
|
473
|
-
"http-cache-semantics": "4.
|
|
473
|
+
"http-cache-semantics": "4.3.0",
|
|
474
474
|
"http-errors": "2.0.1",
|
|
475
475
|
"http-proxy-agent": "9.1.0",
|
|
476
476
|
"http2-wrapper": "2.2.1",
|