hermes-agent 0.20.1 → 0.20.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/README.md CHANGED
@@ -343,7 +343,10 @@ then install the exact checked canonical version.
343
343
 
344
344
  1. Validates the upstream repository, Release tag, and full commit SHA stored
345
345
  in `package.json`.
346
- 2. Requires Git and creates a shallow checkout of the exact tag.
346
+ 2. Requires Git and creates a shallow sparse checkout of the exact tag. The
347
+ upstream `contributors/` metadata tree is omitted because it is not runtime
348
+ input and can contain case-colliding paths that Windows and default macOS
349
+ filesystems cannot represent independently.
347
350
  3. Verifies that the fetched tag resolves to the committed SHA before checkout.
348
351
  4. Downloads the pinned Astral `uv` asset for the current OS, architecture, and
349
352
  Linux libc variant.
@@ -393,8 +396,10 @@ profiles, or global `PATH` beyond npm's normal binary shims. It does not change
393
396
  normal location and survive npm reinstall/uninstall.
394
397
 
395
398
  The package-local checkout is mutable by design because native updates are
396
- enabled. Removing the npm package removes this runtime, but it does not remove
397
- upstream user data.
399
+ enabled. Its sparse-checkout configuration remains active during native Git
400
+ updates; executable source and assets remain tracked normally, while only
401
+ `contributors/` stays absent. Removing the npm package removes this runtime,
402
+ but it does not remove upstream user data.
398
403
 
399
404
  The explicit upstream handoff is the exception to the package-local boundary:
400
405
  the pinned official installer creates the official checkout and may update
@@ -403,12 +408,14 @@ never run by `npm install` and requires `--yes`.
403
408
 
404
409
  ## Release automation
405
410
 
406
- The publish workflow runs on a schedule and through manual `workflow_dispatch`.
407
- It reads the latest non-draft, non-prerelease upstream GitHub Release and then:
411
+ The publish workflow polls once per hour and also supports manual
412
+ `workflow_dispatch`. Its prepare job reads the latest non-draft,
413
+ non-prerelease upstream GitHub Release once and then:
408
414
 
409
415
  1. resolves annotated tags to their final commit SHA;
410
416
  2. reads `project.version` from `pyproject.toml` at that exact commit;
411
- 3. updates npm package metadata;
417
+ 3. passes the validated tag, commit, version, and description to smoke and
418
+ publish jobs for deterministic offline metadata application;
412
419
  4. refuses to reuse an npm version if its published tag/commit mapping differs;
413
420
  5. runs wrapper tests, a native `hermes update --check`, and full runtime smoke
414
421
  tests on Windows, macOS, and Linux;
package/SECURITY.md CHANGED
@@ -100,7 +100,8 @@ audit procedure below avoids lifecycle execution.
100
100
 
101
101
  1. validate the upstream repository, Release tag, and full commit SHA stored in
102
102
  `package.json`;
103
- 2. require Git and initialize a shallow package-local checkout;
103
+ 2. require Git and initialize a shallow package-local sparse checkout that
104
+ omits only the non-runtime upstream `contributors/` metadata tree;
104
105
  3. fetch the exact tag and verify its peeled commit before checkout;
105
106
  4. select a pinned Astral `uv` asset for Windows, macOS, or Linux, including
106
107
  supported architecture and Linux libc variants;
@@ -112,6 +113,11 @@ audit procedure below avoids lifecycle execution.
112
113
  and `uv.lock`;
113
114
  8. remove the temporary dependency cache and write a runtime identity marker.
114
115
 
116
+ The sparse boundary prevents case-colliding contributor metadata from making
117
+ Windows or default macOS checkouts dirty. It does not ignore or omit executable
118
+ runtime source; tracked changes outside `contributors/` still fail the clean
119
+ Release check.
120
+
115
121
  The installer does not invoke an upstream installer script, a system package
116
122
  manager, system Python/pip, `curl`, `tar`, PowerShell download evaluation, or
117
123
  `HERMES_NIX_BUILD`.
@@ -230,11 +236,12 @@ to normal npm behavior.
230
236
 
231
237
  The publish workflow:
232
238
 
233
- - polls the latest non-draft, non-prerelease upstream GitHub Release;
239
+ - polls the latest non-draft, non-prerelease upstream GitHub Release hourly;
234
240
  - resolves annotated tags to their final commit and records the full SHA;
235
241
  - refuses to overwrite an npm version whose published tag/commit identity
236
242
  differs;
237
- - fails if the upstream Release changes between prepare, smoke, and publish;
243
+ - resolves Release identity once in the prepare job and passes that immutable
244
+ identity to smoke and publish jobs without repeating mutable latest lookups;
238
245
  - runs unit, package, native-update-check, and full runtime smoke tests on
239
246
  Windows, macOS, and Linux;
240
247
  - pins third-party GitHub Actions by commit SHA;
@@ -18,7 +18,7 @@ function npmCommand() {
18
18
  return process.platform === "win32" ? "npm.cmd" : "npm";
19
19
  }
20
20
 
21
- function runGit(args) {
21
+ function runGit(args, options = {}) {
22
22
  const env = {
23
23
  ...process.env,
24
24
  GIT_TERMINAL_PROMPT: "0",
@@ -32,7 +32,22 @@ function runGit(args) {
32
32
  env,
33
33
  windowsHide: true
34
34
  });
35
- return result.status === 0 ? result.stdout.trim() : null;
35
+ if (result.status !== 0) return null;
36
+ return options.trim === false ? result.stdout.replace(/\r?\n$/u, "") : result.stdout.trim();
37
+ }
38
+
39
+ function parseGitStatusPorcelain(output) {
40
+ if (!output) return [];
41
+ return output.split(/\r?\n/u).filter((line) => line.length > 0);
42
+ }
43
+
44
+ function isReleasePinned(runtimeReady, runtimeCommit, packagedCommit, runtimeDirtyPaths) {
45
+ return Boolean(
46
+ runtimeReady &&
47
+ runtimeCommit === packagedCommit &&
48
+ Array.isArray(runtimeDirtyPaths) &&
49
+ runtimeDirtyPaths.length === 0
50
+ );
36
51
  }
37
52
 
38
53
  function findNodeModulesOwner(startPath) {
@@ -158,10 +173,19 @@ function readRuntimeStatus() {
158
173
 
159
174
  const runtimeCommit = runGit(["-C", sourceDirectory, "rev-parse", "HEAD"]);
160
175
  const branch = runGit(["-C", sourceDirectory, "branch", "--show-current"]);
161
- const dirty = runGit(["-C", sourceDirectory, "status", "--porcelain", "--untracked-files=no"]);
176
+ const dirty = runGit(
177
+ ["-C", sourceDirectory, "status", "--porcelain", "--untracked-files=no"],
178
+ { trim: false }
179
+ );
180
+ const runtimeDirtyPaths = dirty === null ? null : parseGitStatusPorcelain(dirty);
162
181
  const packagedCommit = packageJson.hermesAgent?.upstreamCommit || null;
163
182
  const runtimeReady = Boolean(runtimeCommit && marker);
164
- const releasePinned = runtimeReady && runtimeCommit === packagedCommit && dirty === "";
183
+ const releasePinned = isReleasePinned(
184
+ runtimeReady,
185
+ runtimeCommit,
186
+ packagedCommit,
187
+ runtimeDirtyPaths
188
+ );
165
189
  const context = detectInstallContext();
166
190
 
167
191
  return {
@@ -175,7 +199,8 @@ function readRuntimeStatus() {
175
199
  runtimeSourceDirectory: sourceDirectory,
176
200
  runtimeVenvDirectory: path.join(sourceDirectory, "venv"),
177
201
  runtimeBranch: branch || null,
178
- runtimeDirty: dirty === null ? null : dirty !== "",
202
+ runtimeDirty: runtimeDirtyPaths === null ? null : runtimeDirtyPaths.length > 0,
203
+ runtimeDirtyPaths,
179
204
  runtimeReady,
180
205
  runtimeChannel: releasePinned ? "npm-release" : runtimeReady ? "upstream-native" : "missing",
181
206
  runtimeModifiedByNativeUpdate: runtimeReady ? !releasePinned : null,
@@ -526,6 +551,8 @@ module.exports = {
526
551
  getInstallMethods,
527
552
  getReleaseUpdateArgs,
528
553
  getReleaseUpdateCommand,
554
+ isReleasePinned,
555
+ parseGitStatusPorcelain,
529
556
  pathsReferToSameInstallLocation,
530
557
  printHelp,
531
558
  readRuntimeStatus,
@@ -0,0 +1,16 @@
1
+ const RUNTIME_SPARSE_PATTERNS = Object.freeze([
2
+ "/*",
3
+ "!/contributors/"
4
+ ]);
5
+
6
+ function configureRuntimeSparseCheckout(sourceDirectory, runGit) {
7
+ runGit(
8
+ ["-C", sourceDirectory, "sparse-checkout", "set", "--no-cone", "--stdin"],
9
+ { input: `${RUNTIME_SPARSE_PATTERNS.join("\n")}\n` }
10
+ );
11
+ }
12
+
13
+ module.exports = {
14
+ RUNTIME_SPARSE_PATTERNS,
15
+ configureRuntimeSparseCheckout
16
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hermes-agent",
3
- "version": "0.20.1",
4
- "description": "Unofficial npm bridge for Hermes Agent 0.20.1: The self-improving AI agent \u2014 creates skills from experience, improves them during use, and runs anywhere",
3
+ "version": "0.20.3",
4
+ "description": "Unofficial npm bridge for Hermes Agent 0.20.3: The self-improving AI agent \u2014 creates skills from experience, improves them during use, and runs anywhere",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "hermes-agent",
@@ -46,10 +46,10 @@
46
46
  "SECURITY.md"
47
47
  ],
48
48
  "hermesAgent": {
49
- "upstreamVersion": "0.20.1",
49
+ "upstreamVersion": "0.20.3",
50
50
  "upstreamRepository": "NousResearch/hermes-agent",
51
- "upstreamGitTag": "v2026.8.13",
52
- "upstreamCommit": "f80f453ae0679347e38abc917c7f94f717bf96c5",
51
+ "upstreamGitTag": "v2026.8.16.2",
52
+ "upstreamCommit": "7339f5f160db5c96657a3bab60151227cc61f66c",
53
53
  "pythonVersion": "3.11",
54
54
  "runtimeDirectory": "runtime/hermes-agent"
55
55
  }
@@ -7,6 +7,7 @@ const path = require("node:path");
7
7
  const packageJson = require("../package.json");
8
8
  const { getRelatedPackageNames } = require("../lib/package-metadata");
9
9
  const { getRuntimeSourceDirectory, getVenvDirectory } = require("../lib/python-launcher");
10
+ const { configureRuntimeSparseCheckout } = require("../lib/runtime-checkout");
10
11
  const { ensureUv, UV_VERSION } = require("../lib/uv-installer");
11
12
 
12
13
  const packageName = packageJson.name;
@@ -60,11 +61,15 @@ function cleanGitEnvironment() {
60
61
  }
61
62
 
62
63
  function run(command, args, options = {}) {
64
+ const hasInput = options.input !== undefined;
63
65
  const result = spawnSync(command, args, {
64
66
  cwd: options.cwd || packageRoot,
65
67
  env: options.env || process.env,
66
68
  encoding: options.capture ? "utf8" : undefined,
67
- stdio: options.capture ? ["ignore", "pipe", "pipe"] : "inherit",
69
+ input: options.input,
70
+ stdio: options.capture
71
+ ? ["ignore", "pipe", "pipe"]
72
+ : hasInput ? ["pipe", "inherit", "inherit"] : "inherit",
68
73
  windowsHide: true
69
74
  });
70
75
  if (result.error) throw result.error;
@@ -148,6 +153,7 @@ function createPinnedCheckout(targetDirectory) {
148
153
  git(["-C", targetDirectory, "config", "core.autocrlf", "false"]);
149
154
  git(["-C", targetDirectory, "config", "core.longpaths", "true"]);
150
155
  git(["-C", targetDirectory, "remote", "add", "origin", origin]);
156
+ configureRuntimeSparseCheckout(targetDirectory, git);
151
157
  fetchAndVerifyPinnedTag(targetDirectory);
152
158
 
153
159
  git(["-C", targetDirectory, "checkout", "--detach", upstreamCommit]);