@harnesspm/cli 0.18.0 → 0.18.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/CHANGELOG.md +6 -0
- package/dist/commands.js +7 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#95](https://github.com/tenphi/harnesspm/pull/95) [`92e4db0`](https://github.com/tenphi/harnesspm/commit/92e4db0e406306c90fbfb3fb153b6ca9b84936d3) Thanks [@tenphi](https://github.com/tenphi)! - In a Claude Code cloud session, the step that turns on a package's tools now says why it differs: the session gives the person no terminal, so the environment's setup script grants it before each new session. `init`'s report there asks the person to commit the trust change and to add the project's install to the setup script, without the unrelated `add <source>`.
|
|
8
|
+
|
|
3
9
|
## 0.18.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/commands.js
CHANGED
|
@@ -33,12 +33,14 @@ const plural = (count, word, many = `${word}s`) => `${count} ${count === 1 ? wor
|
|
|
33
33
|
* Where a person grants what an agent could not. A Claude Code cloud session has no terminal of the person's, and its
|
|
34
34
|
* container goes away, so there the setup script runs the command, before each new session starts (spec 9).
|
|
35
35
|
*/
|
|
36
|
-
const cloudStep = (what
|
|
37
|
-
|
|
36
|
+
const cloudStep = (what) => `A Claude Code cloud session gives the person no terminal, so the environment's setup script grants this before each new session: ask them to add ${what} to it.`;
|
|
37
|
+
/** `withAdd` also names a person's own `add`, which grants entries of added harnesses; trusting a package needs only the install. */
|
|
38
|
+
function grantStep(projectDir, inTerminal, withAdd = true) {
|
|
38
39
|
if (!inCloudSession())
|
|
39
40
|
return inTerminal;
|
|
40
41
|
const line = setupLine(projectDir);
|
|
41
|
-
|
|
42
|
+
const install = line !== undefined ? `\`${line}\`` : "the project's install";
|
|
43
|
+
return cloudStep(withAdd ? `${install}, or their own \`${NPX_ANY} add <source>\`,` : install);
|
|
42
44
|
}
|
|
43
45
|
const firstThree = (items) => `${items.slice(0, 3).join('; ')}${items.length > 3 ? '; …' : ''}`;
|
|
44
46
|
const heldList = (report) => `${plural(report.held.length, 'entry', 'entries')} that an agent cannot grant (${firstThree(report.held)})${report.why !== undefined ? `, because ${report.why}` : ''}`;
|
|
@@ -512,7 +514,7 @@ export function init(projectDir, out) {
|
|
|
512
514
|
for (const line of tools.lines)
|
|
513
515
|
out.log(line);
|
|
514
516
|
if (tools.lines.length > 0) {
|
|
515
|
-
const step = inCloudSession() ?
|
|
517
|
+
const step = inCloudSession() ? ` and commits it. ${grantStep(projectDir, APPROVE, false)}` : `, then runs \`${NPX_ANY} approve\` in their own terminal.`;
|
|
516
518
|
out.log(` To turn one on, a person adds its package to "trust" in ${CONFIG_FILE}${step} An agent never changes "trust" itself.`);
|
|
517
519
|
}
|
|
518
520
|
for (const line of others)
|
|
@@ -537,7 +539,7 @@ function writableDirs() {
|
|
|
537
539
|
function settingsAfterChange(out, hook) {
|
|
538
540
|
if (caller() === 'model') {
|
|
539
541
|
out.log('⏳ The SessionStart hook and write access to the harness folder are pending: an agent cannot grant them.');
|
|
540
|
-
out.log(` ${inCloudSession() ? cloudStep('the same command'
|
|
542
|
+
out.log(` ${inCloudSession() ? cloudStep('the same command') : 'Ask the person to run the same command in their own terminal.'}`);
|
|
541
543
|
return;
|
|
542
544
|
}
|
|
543
545
|
const anyUser = readList(configFileFor('user', '')).length > 0;
|