@yadsh/dsh-git-readonly 0.2.1 → 0.2.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.
- package/README.md +34 -5
- package/lib/git/repo.d.ts +5 -3
- package/lib/git/repo.d.ts.map +1 -1
- package/lib/git/repo.js +83 -24
- package/lib/git/repo.js.map +1 -1
- package/lib/tools/shared.d.ts.map +1 -1
- package/lib/tools/shared.js +2 -1
- package/lib/tools/shared.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,8 +32,12 @@ branch → history → blame → commit — without ever receiving a command lin
|
|
|
32
32
|
tools use the session working directory. An explicit directory must remain
|
|
33
33
|
inside that directory or an operator-configured `repositoryRoots` entry,
|
|
34
34
|
both before and after Git resolves the work-tree root. Canonical-path checks
|
|
35
|
-
reject traversal and symlink escapes.
|
|
36
|
-
no
|
|
35
|
+
reject traversal and symlink escapes. A selection that names the session
|
|
36
|
+
directory itself counts as no selection: a session pinned to a directory
|
|
37
|
+
that is not a repository resolves through the configured root instead of
|
|
38
|
+
failing, which is what a model echoing its own cwd depends on. Nothing
|
|
39
|
+
writes to the repository, and no network git command exists in the tool
|
|
40
|
+
surface.
|
|
37
41
|
- **Bounded, structured output.** Commits, files, blame lines and patches
|
|
38
42
|
come back as structured fields with explicit `truncated` flags, sized so
|
|
39
43
|
one call cannot flood the model context.
|
|
@@ -97,9 +101,34 @@ For a QA session rooted at `E:/qa-assistant/workspaces/work` that must inspect
|
|
|
97
101
|
the sibling checkout, configure the plugin with
|
|
98
102
|
`repositoryRoots: ["E:/qa-assistant/workspaces/code"]`. Because this is the
|
|
99
103
|
only configured root, `dsh_git_context {}` automatically uses it when the
|
|
100
|
-
session cwd is not itself a repository
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
session cwd is not itself a repository — and so does a call that names the
|
|
105
|
+
session cwd, which is what a model reciting its own working directory sends.
|
|
106
|
+
The model can also pass the absolute path explicitly. With multiple configured
|
|
107
|
+
roots the model must select one; the tool parameter and the typed error both
|
|
108
|
+
list the available roots.
|
|
109
|
+
|
|
110
|
+
**Configure the row that mounts the tools.** A deployment can mount this
|
|
111
|
+
plugin more than once, and each mount is its own instance with its own
|
|
112
|
+
configuration. An agent preset is the usual second mount: a preset row is
|
|
113
|
+
composed under the session's own scope, so the tools a chat calls are the
|
|
114
|
+
preset instance's — a `repositoryRoots` entry in the profile patch configures
|
|
115
|
+
the operator's harness sessions and is invisible to a preset session. Put the
|
|
116
|
+
roots on the preset's row:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
# <DSH_HOME>/.agent-presets/<preset>/agent.cordis.yml
|
|
120
|
+
- id: dsh-git-readonly
|
|
121
|
+
name: '@yadsh/dsh-git-readonly'
|
|
122
|
+
config:
|
|
123
|
+
repositoryRoots:
|
|
124
|
+
- E:/qa-assistant/workspaces/code
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
A missing entry is recognizable from the tool itself: the `repository`
|
|
128
|
+
parameter description reports the roots that instance actually has, and a
|
|
129
|
+
refusal says `this row exposes no repository roots`. Editing a live preset
|
|
130
|
+
takes effect for new chats — an already mounted session keeps the composition
|
|
131
|
+
it was created with.
|
|
103
132
|
|
|
104
133
|
## Security model
|
|
105
134
|
|
package/lib/git/repo.d.ts
CHANGED
|
@@ -25,9 +25,11 @@ export declare function resolveRepositoryRoot(run: GitRunner, sessionCwd: string
|
|
|
25
25
|
/**
|
|
26
26
|
* Resolve the repository selected by one tool call without granting a general
|
|
27
27
|
* filesystem path escape. Omitting `requested` prefers the session repository
|
|
28
|
-
* and falls back only when there is exactly one configured root
|
|
29
|
-
*
|
|
30
|
-
* directory
|
|
28
|
+
* and falls back only when there is exactly one configured root; naming the
|
|
29
|
+
* session directory means the same default, which is what a session that is
|
|
30
|
+
* not itself a repository — a QA scratch directory — relies on. An explicit
|
|
31
|
+
* path elsewhere and its resolved work-tree root must both remain inside the
|
|
32
|
+
* session directory or an operator-configured root.
|
|
31
33
|
*/
|
|
32
34
|
export declare function resolveToolRepository(run: GitRunner, exec: ToolExec, requested: unknown, options: {
|
|
33
35
|
readonly timeoutMs: number;
|
package/lib/git/repo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/git/repo.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,6EAA6E;AAC7E,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErD,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,KACE,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAgBxD;AAED,0EAA0E;AAC1E,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,SAAS,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,MAAM,CAAC,CAejB;
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/git/repo.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,6EAA6E;AAC7E,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErD,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,KACE,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAgBxD;AAED,0EAA0E;AAC1E,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,SAAS,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,MAAM,CAAC,CAejB;AAkCD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE;IACP,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,GACA,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAwHD;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
package/lib/git/repo.js
CHANGED
|
@@ -43,6 +43,10 @@ function pathIsInside(target, root) {
|
|
|
43
43
|
relative !== ".." &&
|
|
44
44
|
!path.isAbsolute(relative)));
|
|
45
45
|
}
|
|
46
|
+
/** Whether two canonical directories are the same directory. */
|
|
47
|
+
function sameDirectory(left, right) {
|
|
48
|
+
return pathIsInside(left, right) && pathIsInside(right, left);
|
|
49
|
+
}
|
|
46
50
|
async function canonicalDirectory(input, label) {
|
|
47
51
|
try {
|
|
48
52
|
const canonical = await realpath(input);
|
|
@@ -57,31 +61,16 @@ async function canonicalDirectory(input, label) {
|
|
|
57
61
|
/**
|
|
58
62
|
* Resolve the repository selected by one tool call without granting a general
|
|
59
63
|
* filesystem path escape. Omitting `requested` prefers the session repository
|
|
60
|
-
* and falls back only when there is exactly one configured root
|
|
61
|
-
*
|
|
62
|
-
* directory
|
|
64
|
+
* and falls back only when there is exactly one configured root; naming the
|
|
65
|
+
* session directory means the same default, which is what a session that is
|
|
66
|
+
* not itself a repository — a QA scratch directory — relies on. An explicit
|
|
67
|
+
* path elsewhere and its resolved work-tree root must both remain inside the
|
|
68
|
+
* session directory or an operator-configured root.
|
|
63
69
|
*/
|
|
64
70
|
export async function resolveToolRepository(run, exec, requested, options) {
|
|
65
71
|
const sessionCwd = requireSessionCwd(exec);
|
|
66
72
|
if (requested === undefined || requested === null) {
|
|
67
|
-
|
|
68
|
-
return await resolveRepositoryRoot(run, sessionCwd, {
|
|
69
|
-
timeoutMs: options.timeoutMs,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
if (!(error instanceof GitToolError) ||
|
|
74
|
-
error.code !== "not-a-git-repository")
|
|
75
|
-
throw error;
|
|
76
|
-
if (options.repositoryRoots.length === 1) {
|
|
77
|
-
return resolveToolRepository(run, exec, options.repositoryRoots[0], options);
|
|
78
|
-
}
|
|
79
|
-
if (options.repositoryRoots.length > 1) {
|
|
80
|
-
throw new GitToolError("not-a-git-repository", `the session directory is not inside a git work tree (${sessionCwd}); ` +
|
|
81
|
-
`select one configured repository root: ${options.repositoryRoots.join(", ")}`);
|
|
82
|
-
}
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
73
|
+
return resolveDefaultRepository(run, sessionCwd, options);
|
|
85
74
|
}
|
|
86
75
|
if (typeof requested !== "string" || requested.trim() === "") {
|
|
87
76
|
throw new GitToolError("invalid-repository", "repository must be a non-empty path");
|
|
@@ -93,15 +82,85 @@ export async function resolveToolRepository(run, exec, requested, options) {
|
|
|
93
82
|
if (!allowedRoots.some((root) => pathIsInside(selected, root))) {
|
|
94
83
|
throw new GitToolError("repository-not-allowed", "repository is outside the session directory and configured repository roots");
|
|
95
84
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
// Naming the session directory is not a repository choice: it is the default
|
|
86
|
+
// a model that echoes its own working directory asks for, and it resolves
|
|
87
|
+
// exactly like an omitted argument.
|
|
88
|
+
if (sameDirectory(selected, canonicalSession)) {
|
|
89
|
+
return resolveDefaultRepository(run, sessionCwd, options);
|
|
90
|
+
}
|
|
91
|
+
return resolveSelectedRepository(run, selected, allowedRoots, options);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The default selection: the session repository, and only when the session
|
|
95
|
+
* directory is not one, the single configured root. Multiple roots require the
|
|
96
|
+
* model to choose, and no root at all is a plain refusal.
|
|
97
|
+
*/
|
|
98
|
+
async function resolveDefaultRepository(run, sessionCwd, options) {
|
|
99
|
+
try {
|
|
100
|
+
return await resolveRepositoryRoot(run, sessionCwd, {
|
|
101
|
+
timeoutMs: options.timeoutMs,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
if (!(error instanceof GitToolError) ||
|
|
106
|
+
error.code !== "not-a-git-repository") {
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
const [only] = options.repositoryRoots;
|
|
110
|
+
if (only === undefined) {
|
|
111
|
+
throw new GitToolError("not-a-git-repository", selectionRefusal(sessionCwd, options.repositoryRoots));
|
|
112
|
+
}
|
|
113
|
+
if (options.repositoryRoots.length > 1) {
|
|
114
|
+
throw new GitToolError("not-a-git-repository", `the session directory is not inside a git work tree (${sessionCwd}); ` +
|
|
115
|
+
`select one configured repository root: ${options.repositoryRoots.join(", ")}`);
|
|
116
|
+
}
|
|
117
|
+
const [canonicalSession, canonicalRoot] = await Promise.all([
|
|
118
|
+
canonicalDirectory(sessionCwd, "the session working directory"),
|
|
119
|
+
canonicalDirectory(only, "a configured repository root"),
|
|
120
|
+
]);
|
|
121
|
+
// The operator pointed the root at the session directory itself: there is
|
|
122
|
+
// nothing else to resolve, and retrying the same directory would loop.
|
|
123
|
+
if (sameDirectory(canonicalRoot, canonicalSession)) {
|
|
124
|
+
throw new GitToolError("not-a-git-repository", selectionRefusal(sessionCwd, options.repositoryRoots));
|
|
125
|
+
}
|
|
126
|
+
return resolveSelectedRepository(run, canonicalRoot, [canonicalSession, canonicalRoot], options);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** One explicit selection: it must be a work tree inside an allowed root. */
|
|
130
|
+
async function resolveSelectedRepository(run, selected, allowedRoots, options) {
|
|
131
|
+
let repoRoot;
|
|
132
|
+
try {
|
|
133
|
+
repoRoot = await resolveRepositoryRoot(run, selected, {
|
|
134
|
+
timeoutMs: options.timeoutMs,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (!(error instanceof GitToolError) ||
|
|
139
|
+
error.code !== "not-a-git-repository") {
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
throw new GitToolError("not-a-git-repository", selectionRefusal(selected, options.repositoryRoots));
|
|
143
|
+
}
|
|
99
144
|
const canonicalRepoRoot = await canonicalDirectory(repoRoot, "the resolved repository root");
|
|
100
145
|
if (!allowedRoots.some((root) => pathIsInside(canonicalRepoRoot, root))) {
|
|
101
146
|
throw new GitToolError("repository-not-allowed", "the resolved git work tree escapes the allowed repository root");
|
|
102
147
|
}
|
|
103
148
|
return canonicalRepoRoot;
|
|
104
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* The refusal for a directory that names no repository. A deployment that
|
|
152
|
+
* configured roots gets them named: they are the only directories the model
|
|
153
|
+
* may select instead, and the tool parameter promises the same list. Without
|
|
154
|
+
* roots the refusal says so — the usual cause is a row that carries no
|
|
155
|
+
* `repositoryRoots`, which is what a preset-mounted instance of this plugin is
|
|
156
|
+
* until the operator configures the row that mounts it.
|
|
157
|
+
*/
|
|
158
|
+
function selectionRefusal(selected, repositoryRoots) {
|
|
159
|
+
const recovery = repositoryRoots.length === 0
|
|
160
|
+
? "this row exposes no repository roots, so only a repository inside the session directory can be read"
|
|
161
|
+
: `pass repository to select one of the configured repository roots: ${repositoryRoots.join(", ")}`;
|
|
162
|
+
return `the selected directory is not inside a git work tree (${selected}); ${recovery}`;
|
|
163
|
+
}
|
|
105
164
|
/**
|
|
106
165
|
* Canonicalize a validated hexadecimal commit id to the full object id of an
|
|
107
166
|
* existing commit. The `^{commit}` peel plus `--end-of-options` mean the
|
package/lib/git/repo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../src/git/repo.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgBjD,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACzB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,YAAY,CACpB,gBAAgB,EAChB,4CAA4C,CAC7C,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;IACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,EA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CAAC,OAAO,MAAM,CAAC,CAAC,EAC1C,OAAO,EAAE,MAAM,GACd,IAAI,CAcN"}
|
package/lib/tools/shared.js
CHANGED
|
@@ -15,7 +15,8 @@ export function repositoryParameter(config) {
|
|
|
15
15
|
description: "Repository directory. Relative paths start at the session directory and must remain " +
|
|
16
16
|
"inside it or a configured repository root. When omitted, the session repository is used; " +
|
|
17
17
|
"if the session directory is not a repository and exactly one repository root is configured, " +
|
|
18
|
-
|
|
18
|
+
"that root is used automatically. Naming the session directory itself is the same as " +
|
|
19
|
+
`omitting this argument. ${configuredRoots}`,
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
/** Bind a hardened runner to the resolved configuration. */
|
package/lib/tools/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C,qFAAqF;AACrF,MAAM,UAAU,mBAAmB,CAAC,MAAiC;IACnE,MAAM,eAAe,GACnB,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC;QACjC,CAAC,CAAC,gDAAgD;QAClD,CAAC,CAAC,gCAAgC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3E,OAAO;QACL,IAAI,EAAE,QAAiB;QACvB,WAAW,EACT,sFAAsF;YACtF,2FAA2F;YAC3F,8FAA8F;YAC9F,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C,qFAAqF;AACrF,MAAM,UAAU,mB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