@deepseek-ai/dsh-experimental-forge-session 0.2.2-alpha.2 → 0.2.2-alpha.3
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/index.js +11 -1
- package/package.json +33 -33
package/lib/index.js
CHANGED
|
@@ -55,6 +55,8 @@ const SEPARATORS = new Set([
|
|
|
55
55
|
"&"
|
|
56
56
|
]);
|
|
57
57
|
const REPOSITORY = /^(?:([a-z\d.-]+(?::\d+)?)\/)?([a-z\d_-]+)\/([a-z\d_.-]+)$/i;
|
|
58
|
+
/** A literal `gh` word; a command that names `gh` only after shell quoting is not recognized. */
|
|
59
|
+
const GH_WORD = /\bgh\b/;
|
|
58
60
|
/**
|
|
59
61
|
* Read explicit URL selectors or numeric selectors with `--repo`/`-R`.
|
|
60
62
|
* Shell expansion, multiline scripts, substitutions, and unsupported options
|
|
@@ -65,6 +67,7 @@ const REPOSITORY = /^(?:([a-z\d.-]+(?::\d+)?)\/)?([a-z\d_-]+)\/([a-z\d_.-]+)$/i;
|
|
|
65
67
|
* @returns references in command order; no process or environment is read.
|
|
66
68
|
*/
|
|
67
69
|
function ghReferences(command) {
|
|
70
|
+
if (!GH_WORD.test(command)) return [];
|
|
68
71
|
if (/[\r\n`]|\$\(/.test(command) || !/^(?:[^'"\\]|\\.|'(?:[^']*)'|"(?:[^"\\]|\\.)*")*$/.test(command)) return [];
|
|
69
72
|
let tokens;
|
|
70
73
|
try {
|
|
@@ -308,6 +311,13 @@ function urlIdentity(url) {
|
|
|
308
311
|
const BINDING_RECORD = "plugin:forge-session/binding";
|
|
309
312
|
/** Tools whose calls run shell commands with a string `command` argument. */
|
|
310
313
|
const SHELL_TOOLS = new Set(["bash", "pwsh"]);
|
|
314
|
+
/**
|
|
315
|
+
* Literal text checked on the raw JSON arguments before parsing: recognized
|
|
316
|
+
* `gh pr` forms name `gh`, and `git push` names `push`. Arguments whose JSON
|
|
317
|
+
* text contains neither are not parsed, so a command spelled only through JSON
|
|
318
|
+
* escapes is not recognized.
|
|
319
|
+
*/
|
|
320
|
+
const EVIDENCE_HINT = /gh|push/;
|
|
311
321
|
const EMPTY = Object.freeze({
|
|
312
322
|
pending: Object.freeze([]),
|
|
313
323
|
bindings: Object.freeze([]),
|
|
@@ -381,7 +391,7 @@ function apply(state, event) {
|
|
|
381
391
|
}
|
|
382
392
|
}
|
|
383
393
|
function applyCall(state, call) {
|
|
384
|
-
if (!SHELL_TOOLS.has(call.name)) return state;
|
|
394
|
+
if (!SHELL_TOOLS.has(call.name) || !EVIDENCE_HINT.test(call.arguments)) return state;
|
|
385
395
|
const command = commandOf(call.arguments);
|
|
386
396
|
const evidence = command === void 0 ? void 0 : commandEvidence(command);
|
|
387
397
|
if (evidence === void 0) return state;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-experimental-forge-session",
|
|
3
3
|
"description": "Binds change requests to the Session that created, pushed, or tracked them",
|
|
4
|
-
"version": "0.2.2-alpha.
|
|
4
|
+
"version": "0.2.2-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,44 +32,44 @@
|
|
|
32
32
|
"directory": "packages/experimental/forge-session"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-util-values": "0.2.2-alpha.
|
|
37
|
-
"@deepseek-ai/schemastery": "~3.18.6-alpha.
|
|
35
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.3",
|
|
36
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-alpha.3",
|
|
37
|
+
"@deepseek-ai/schemastery": "~3.18.6-alpha.2",
|
|
38
38
|
"shell-quote": "^1.12.0",
|
|
39
39
|
"zod": "^4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@deepseek-ai/cordis": "~4.0.6-alpha.
|
|
43
|
-
"@deepseek-ai/dsh-experimental-forge": "0.2.2-alpha.
|
|
44
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
45
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.
|
|
46
|
-
"@deepseek-ai/dsh-shell": "0.2.2-alpha.
|
|
47
|
-
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.
|
|
42
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.2",
|
|
43
|
+
"@deepseek-ai/dsh-experimental-forge": "0.2.2-alpha.3",
|
|
44
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-shell": "0.2.2-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@deepseek-ai/cordis": "~4.0.6-alpha.
|
|
53
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.
|
|
54
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.
|
|
55
|
-
"@deepseek-ai/dsh-agent": "0.2.2-alpha.
|
|
56
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.
|
|
57
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-experimental-forge": "0.2.2-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-experimental-forge-github": "0.2.2-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-fs-local": "0.2.2-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-llm": "0.2.2-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.
|
|
64
|
-
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.
|
|
66
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.
|
|
67
|
-
"@deepseek-ai/dsh-tool-bash": "0.2.2-alpha.
|
|
68
|
-
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.
|
|
69
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
70
|
-
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-shell": "0.2.2-alpha.
|
|
72
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.
|
|
52
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.2",
|
|
53
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.2",
|
|
54
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-experimental-forge": "0.2.2-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-experimental-forge-github": "0.2.2-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-fs-local": "0.2.2-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.2-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.3",
|
|
71
|
+
"@deepseek-ai/dsh-shell": "0.2.2-alpha.3",
|
|
72
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"@deepseek-ai/dsh-shell": {
|