@hmharness/agent 0.23.14 → 0.23.15

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/dist/runner.d.ts CHANGED
@@ -18,7 +18,10 @@ export declare function toServerConfig(c: McpServerImport): McpServerConfig;
18
18
  export declare const spawnBase: {
19
19
  current?: SpawnBase;
20
20
  };
21
- export declare function nativeRegistry(depth: number): Registry;
21
+ export declare function nativeRegistry(depth: number, opts?: {
22
+ lsp?: boolean;
23
+ workspaceRoot?: string;
24
+ }): Registry;
22
25
  export declare function buildRegistry(opts?: {
23
26
  mcp?: boolean;
24
27
  announce?: boolean;
package/dist/runner.js CHANGED
@@ -15,6 +15,7 @@ import { extractFeatures, routeDecision, recordRoutingOutcome } from '@hmharness
15
15
  import { appendMemory, listSkills, readInsights, readNotes, retrieveInsights, recordInsight, redactSecrets, retrieveMemory, skillsToPrompt, sessionGetsCanary, canaryWatermark, listCanary, workspaceForCwd } from '@hmharness/evolution';
16
16
  import { harmonyTools } from '@hmharness/domain-harmony';
17
17
  import { opsTools } from '@hmharness/domain-ops';
18
+ import { discoverServers, lspTools } from '@hmharness/lsp';
18
19
  import * as readline from 'node:readline/promises';
19
20
  import { stdin } from 'node:process';
20
21
  import { baseTools } from "./tools.js";
@@ -33,9 +34,21 @@ export function toServerConfig(c) {
33
34
  * server) always routes sub-agents to the CURRENT session and gate.
34
35
  */
35
36
  export const spawnBase = {};
36
- export function nativeRegistry(depth) {
37
+ export function nativeRegistry(depth, opts = {}) {
37
38
  const reg = new Registry();
38
39
  reg.registerAll(baseTools).registerAll(harmonyTools).registerAll(opsTools);
40
+ // W6: LSP Tier-0 code-intelligence tools — registered ONLY when a real
41
+ // server is discoverable on PATH; a machine with no language servers
42
+ // must not carry dead tools. Discovery is synchronous (memoized PATH
43
+ // probe) so the registry is complete when this function returns.
44
+ if (opts.lsp !== false) {
45
+ try {
46
+ if (discoverServers().length > 0) {
47
+ reg.registerAll(lspTools({ workspaceRoot: opts.workspaceRoot ?? process.cwd() }));
48
+ }
49
+ }
50
+ catch { /* lsp optional: never block tool assembly */ }
51
+ }
39
52
  if (depth < MAX_SPAWN_DEPTH) {
40
53
  // blueprint M10: every spawn_agent is governed by the live topology
41
54
  // (role contract + shared budget + immutable multi-agent.jsonl audit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/agent",
3
- "version": "0.23.14",
3
+ "version": "0.23.15",
4
4
  "description": "hmharness agent execution layer: base tools, system prompt, sub-agent spawn, and the shared task runner that frontends (cli, web) drive.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,14 +15,14 @@
15
15
  "build": "tsc -p tsconfig.build.json"
16
16
  },
17
17
  "dependencies": {
18
- "@hmharness/cognitive": "0.23.14",
19
- "@hmharness/domain-harmony": "0.23.14",
20
- "@hmharness/domain-ops": "0.23.14",
21
- "@hmharness/evolution": "0.23.14",
22
- "@hmharness/kernel": "0.23.14",
23
- "@hmharness/observability": "0.23.14",
24
- "@hmharness/sandbox": "0.23.14",
25
- "@hmharness/lsp": "0.23.13"
18
+ "@hmharness/cognitive": "0.23.15",
19
+ "@hmharness/domain-harmony": "0.23.15",
20
+ "@hmharness/domain-ops": "0.23.15",
21
+ "@hmharness/evolution": "0.23.15",
22
+ "@hmharness/kernel": "0.23.15",
23
+ "@hmharness/observability": "0.23.15",
24
+ "@hmharness/sandbox": "0.23.15",
25
+ "@hmharness/lsp": "0.23.15"
26
26
  },
27
27
  "files": [
28
28
  "dist"