harnery 0.9.0 → 0.10.0
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 +1 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +6 -0
- package/dist/commands/agents.d.ts +24 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +244 -13
- package/dist/commands/backup.d.ts +5 -4
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +15 -14
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +27 -1
- package/dist/commands/claude-desktop.d.ts +19 -0
- package/dist/commands/claude-desktop.d.ts.map +1 -0
- package/dist/commands/claude-desktop.js +168 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +149 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +2 -3
- package/dist/commands/eml.d.ts +32 -0
- package/dist/commands/eml.d.ts.map +1 -1
- package/dist/commands/eml.js +16 -3
- package/dist/commands/harness.d.ts +11 -0
- package/dist/commands/harness.d.ts.map +1 -0
- package/dist/commands/harness.js +118 -0
- package/dist/commands/presence.d.ts +9 -4
- package/dist/commands/presence.d.ts.map +1 -1
- package/dist/commands/presence.js +88 -5
- package/dist/commands/relay.d.ts +9 -0
- package/dist/commands/relay.d.ts.map +1 -0
- package/dist/commands/relay.js +143 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +5 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +8 -15
- package/dist/core/agents/canonical-emit.d.ts +15 -0
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +41 -3
- package/dist/core/agents/cli.js +4 -2
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +44 -3
- package/dist/core/agents/render/session-context.d.ts.map +1 -1
- package/dist/core/agents/render/session-context.js +26 -1
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/commit-conflict.js +4 -37
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +16 -43
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-projector.js +11 -2
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +3 -3
- package/dist/core/agents/state/names.d.ts +38 -3
- package/dist/core/agents/state/names.d.ts.map +1 -1
- package/dist/core/agents/state/names.js +46 -7
- package/dist/core/agents/state/pidmap.d.ts +5 -1
- package/dist/core/agents/state/pidmap.d.ts.map +1 -1
- package/dist/core/agents/state/pidmap.js +58 -2
- package/dist/core/agents/state/stale-sweep.d.ts +3 -2
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +6 -6
- package/dist/core/config.d.ts +68 -11
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +191 -25
- package/dist/core/context/index.d.ts +144 -0
- package/dist/core/context/index.d.ts.map +1 -0
- package/dist/core/context/index.js +380 -0
- package/dist/core/harnesses/bench.d.ts +29 -0
- package/dist/core/harnesses/bench.d.ts.map +1 -0
- package/dist/core/harnesses/bench.js +151 -0
- package/dist/core/harnesses/index.d.ts +9 -0
- package/dist/core/harnesses/index.d.ts.map +1 -0
- package/dist/core/harnesses/index.js +4 -0
- package/dist/core/harnesses/profiles.d.ts +62 -0
- package/dist/core/harnesses/profiles.d.ts.map +1 -0
- package/dist/core/harnesses/profiles.js +115 -0
- package/dist/core/harnesses/registry.d.ts +15 -0
- package/dist/core/harnesses/registry.d.ts.map +1 -0
- package/dist/core/harnesses/registry.js +113 -0
- package/dist/core/harnesses/types.d.ts +64 -0
- package/dist/core/harnesses/types.d.ts.map +1 -0
- package/dist/core/harnesses/types.js +20 -0
- package/dist/core/hooks/cli.js +280 -63
- package/dist/core/hooks/events/schema.d.ts +38 -1
- package/dist/core/hooks/events/schema.d.ts.map +1 -1
- package/dist/core/hooks/harness/events.d.ts.map +1 -1
- package/dist/core/hooks/harness/events.js +3 -0
- package/dist/core/hooks/harness/parse.d.ts +1 -1
- package/dist/core/hooks/harness/parse.d.ts.map +1 -1
- package/dist/core/hooks/harness/parse.js +4 -0
- package/dist/core/presence/blob.d.ts +40 -0
- package/dist/core/presence/blob.d.ts.map +1 -0
- package/dist/core/presence/blob.js +91 -0
- package/dist/core/presence/git.d.ts +68 -0
- package/dist/core/presence/git.d.ts.map +1 -0
- package/dist/core/presence/git.js +173 -0
- package/dist/core/presence/index.d.ts +74 -0
- package/dist/core/presence/index.d.ts.map +1 -0
- package/dist/core/presence/index.js +224 -0
- package/dist/core/presence/relay-client.d.ts +39 -0
- package/dist/core/presence/relay-client.d.ts.map +1 -0
- package/dist/core/presence/relay-client.js +295 -0
- package/dist/core/presence/relay-protocol.d.ts +94 -0
- package/dist/core/presence/relay-protocol.d.ts.map +1 -0
- package/dist/core/presence/relay-protocol.js +169 -0
- package/dist/core/workflow/billing.d.ts +1 -1
- package/dist/core/workflow/billing.d.ts.map +1 -1
- package/dist/core/workflow/billing.js +7 -1
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +11 -2
- package/dist/core/workflow/harnesses.d.ts +3 -3
- package/dist/core/workflow/harnesses.d.ts.map +1 -1
- package/dist/core/workflow/harnesses.js +8 -17
- package/dist/core/workflow/spawn-claude.d.ts +4 -1
- package/dist/core/workflow/spawn-claude.d.ts.map +1 -1
- package/dist/core/workflow/spawn-claude.js +39 -18
- package/dist/core/workflow/spawn-codex.d.ts +4 -1
- package/dist/core/workflow/spawn-codex.d.ts.map +1 -1
- package/dist/core/workflow/spawn-codex.js +44 -22
- package/dist/core/workflow/spawn-cursor.d.ts +4 -1
- package/dist/core/workflow/spawn-cursor.d.ts.map +1 -1
- package/dist/core/workflow/spawn-cursor.js +35 -16
- package/dist/core/workflow/types.d.ts +9 -2
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/lib/browser/client.d.ts +16 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +22 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/index.js +1 -0
- package/dist/lib/browser/launch-args.d.ts +21 -0
- package/dist/lib/browser/launch-args.d.ts.map +1 -0
- package/dist/lib/browser/launch-args.js +32 -0
- package/dist/lib/claude-desktop.d.ts +105 -0
- package/dist/lib/claude-desktop.d.ts.map +1 -0
- package/dist/lib/claude-desktop.js +217 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +5 -2
- package/dist/lib/identities/assume.d.ts +51 -0
- package/dist/lib/identities/assume.d.ts.map +1 -0
- package/dist/lib/identities/assume.js +274 -0
- package/dist/lib/identities/index.d.ts +7 -7
- package/dist/lib/identities/index.d.ts.map +1 -1
- package/dist/lib/identities/index.js +24 -24
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +15 -2
- package/package.json +12 -1
- package/schemas/config.schema.json +88 -19
- package/src/commander.ts +6 -0
- package/src/commands/agents.ts +280 -14
- package/src/commands/backup.ts +17 -16
- package/src/commands/browse.ts +32 -0
- package/src/commands/claude-desktop.ts +215 -0
- package/src/commands/context.ts +174 -1
- package/src/commands/doctor.ts +2 -3
- package/src/commands/eml.ts +22 -4
- package/src/commands/harness.ts +147 -0
- package/src/commands/presence.ts +111 -5
- package/src/commands/relay.ts +160 -0
- package/src/commands/sync.ts +4 -0
- package/src/commands/workflow.ts +9 -18
- package/src/core/agents/canonical-emit.ts +41 -3
- package/src/core/agents/cli.ts +4 -2
- package/src/core/agents/render/prompt-context.ts +48 -3
- package/src/core/agents/render/session-context.ts +27 -1
- package/src/core/agents/rules/commit-conflict.ts +4 -33
- package/src/core/agents/session-events.ts +15 -39
- package/src/core/agents/state/heartbeat-projector.ts +10 -1
- package/src/core/agents/state/heartbeat-writer.ts +3 -2
- package/src/core/agents/state/names.ts +68 -9
- package/src/core/agents/state/pidmap.ts +59 -2
- package/src/core/agents/state/stale-sweep.ts +6 -11
- package/src/core/config.ts +248 -24
- package/src/core/context/index.ts +575 -0
- package/src/core/harnesses/bench.ts +214 -0
- package/src/core/harnesses/index.ts +31 -0
- package/src/core/harnesses/profiles.ts +141 -0
- package/src/core/harnesses/registry.ts +140 -0
- package/src/core/harnesses/types.ts +90 -0
- package/src/core/hooks/cli.ts +331 -62
- package/src/core/hooks/events/schema.ts +68 -0
- package/src/core/hooks/harness/events.ts +3 -0
- package/src/core/hooks/harness/parse.ts +7 -1
- package/src/core/presence/blob.ts +125 -0
- package/src/core/presence/git.ts +191 -0
- package/src/core/presence/index.ts +274 -0
- package/src/core/presence/relay-client.ts +322 -0
- package/src/core/presence/relay-protocol.ts +246 -0
- package/src/core/workflow/billing.ts +8 -2
- package/src/core/workflow/engine.ts +11 -2
- package/src/core/workflow/harnesses.ts +14 -19
- package/src/core/workflow/spawn-claude.ts +39 -20
- package/src/core/workflow/spawn-codex.ts +47 -28
- package/src/core/workflow/spawn-cursor.ts +37 -18
- package/src/core/workflow/types.ts +9 -2
- package/src/lib/browser/client.ts +37 -0
- package/src/lib/browser/index.ts +1 -0
- package/src/lib/browser/launch-args.ts +33 -0
- package/src/lib/claude-desktop.ts +293 -0
- package/src/lib/docs-lint.ts +5 -2
- package/src/lib/identities/assume.ts +363 -0
- package/src/lib/identities/index.ts +28 -24
- package/src/lib/instructions/templates.ts +16 -2
|
@@ -31,12 +31,7 @@
|
|
|
31
31
|
"type": "integer",
|
|
32
32
|
"minimum": 30,
|
|
33
33
|
"default": 600,
|
|
34
|
-
"description": "How stale a peer heartbeat can get before the sweeper prunes it."
|
|
35
|
-
},
|
|
36
|
-
"name_pool": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"default": "default",
|
|
39
|
-
"description": "Which agent-name pool to draw from. 'default' / 'hurricane' / a custom pool id."
|
|
34
|
+
"description": "How stale a peer heartbeat can get before the sweeper prunes it. Env override: HARNERY_AGENT_COORD_FRESHNESS."
|
|
40
35
|
}
|
|
41
36
|
}
|
|
42
37
|
},
|
|
@@ -48,7 +43,7 @@
|
|
|
48
43
|
"type": "integer",
|
|
49
44
|
"minimum": 1024,
|
|
50
45
|
"maximum": 65535,
|
|
51
|
-
"default":
|
|
46
|
+
"default": 9000,
|
|
52
47
|
"description": "Port that `harn web up` binds to."
|
|
53
48
|
},
|
|
54
49
|
"bind": {
|
|
@@ -77,35 +72,109 @@
|
|
|
77
72
|
}
|
|
78
73
|
}
|
|
79
74
|
},
|
|
75
|
+
"tools": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"description": "Managed-tool provisioning consent.",
|
|
79
|
+
"properties": {
|
|
80
|
+
"ripgrep": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"properties": {
|
|
84
|
+
"autoInstall": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"default": false,
|
|
87
|
+
"description": "Allow `grep` to download the pinned, checksum-verified ripgrep into the harnery tools dir on first miss. Env override: HARNERY_TOOLS_AUTOINSTALL=1|0."
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"workflow": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"properties": {
|
|
97
|
+
"subscriptionOnly": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"default": false,
|
|
100
|
+
"description": "Pin `workflow run` to subscription billing: API-key vars are scrubbed from every child env. Stamped true by `harn init` when the key is absent. Env override: HARNERY_WORKFLOW_SUBSCRIPTION_ONLY=1|0."
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"skills": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"properties": {
|
|
108
|
+
"exclude": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": { "type": "string" },
|
|
111
|
+
"default": [],
|
|
112
|
+
"description": "Shipped harnery skills this repo suppresses (e.g. because it maintains richer host-specific versions)."
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"presence": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"description": "Cross-machine session presence (decision record 0016).",
|
|
120
|
+
"properties": {
|
|
121
|
+
"enabled": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"default": true,
|
|
124
|
+
"description": "Presence over git refs (refs/harnery/presence/<machine> on origin). On by default when an origin remote exists; fail-silent everywhere. Env override: HARNERY_PRESENCE=1|0."
|
|
125
|
+
},
|
|
126
|
+
"relay": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "Optional live-socket upgrade: a wss:// relay URL (public reference: wss://relay.harnery.com; self-host via `harn relay serve` or relay/worker/). Hooks keep a per-machine daemon connected; git refs stay on as the floor. Env override: HARNERY_PRESENCE_RELAY=<url|0>."
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
80
132
|
"backup": {
|
|
81
133
|
"type": "object",
|
|
82
134
|
"additionalProperties": false,
|
|
135
|
+
"description": "`harn backup` (restic) defaults. Env overrides: HARNERY_RESTIC_REPO, HARNERY_RESTIC_PASSWORD_FILE. `harn backup` is manual (init/snapshot/prune/...); there is no auto-snapshot scheduler.",
|
|
83
136
|
"properties": {
|
|
84
137
|
"repo": {
|
|
85
138
|
"type": "string",
|
|
86
|
-
"description": "restic repository URL. Common: 'rclone:gdrive:harnery-backup/<project>'
|
|
139
|
+
"description": "restic repository path or URL. Default: ~/.cache/harnery/restic-repo. Common remote form: 'rclone:gdrive:harnery-backup/<project>'."
|
|
87
140
|
},
|
|
88
|
-
"
|
|
141
|
+
"password_file": {
|
|
89
142
|
"type": "string",
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
143
|
+
"description": "File holding the restic repo password. Default: ~/.config/harnery/restic-password (autogenerated on `harn backup init`)."
|
|
144
|
+
},
|
|
145
|
+
"keep_daily": {
|
|
146
|
+
"type": "integer",
|
|
147
|
+
"minimum": 0,
|
|
148
|
+
"default": 7,
|
|
149
|
+
"description": "Daily snapshots to keep on `harn backup prune` (overridable per run with --keep-daily)."
|
|
150
|
+
},
|
|
151
|
+
"keep_weekly": {
|
|
152
|
+
"type": "integer",
|
|
153
|
+
"minimum": 0,
|
|
154
|
+
"default": 4,
|
|
155
|
+
"description": "Weekly snapshots to keep on `harn backup prune` (overridable with --keep-weekly)."
|
|
156
|
+
},
|
|
157
|
+
"keep_monthly": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 0,
|
|
160
|
+
"default": 6,
|
|
161
|
+
"description": "Monthly snapshots to keep on `harn backup prune` (overridable with --keep-monthly)."
|
|
93
162
|
}
|
|
94
163
|
}
|
|
95
164
|
},
|
|
96
165
|
"sync": {
|
|
97
166
|
"type": "object",
|
|
98
167
|
"additionalProperties": false,
|
|
168
|
+
"description": "`harn sync` (rclone) defaults for the curated cross-machine subset (identities/, scratch/archived/, councils/). Env overrides: HARNERY_SYNC_REMOTE, HARNERY_SYNC_PREFIX. `harn sync init` also records these in ~/.config/harnery/sync.json (a lower-precedence fallback than this section).",
|
|
99
169
|
"properties": {
|
|
100
|
-
"
|
|
101
|
-
"type": "
|
|
102
|
-
"
|
|
103
|
-
"description": "Enable cross-machine sync via Google Drive."
|
|
170
|
+
"remote": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "rclone remote name (e.g. 'gdrive'). Set up the remote with `rclone config`; harnery doesn't wrap the OAuth flow."
|
|
104
173
|
},
|
|
105
|
-
"
|
|
174
|
+
"prefix": {
|
|
106
175
|
"type": "string",
|
|
107
|
-
"default": "harnery
|
|
108
|
-
"description": "
|
|
176
|
+
"default": "harnery",
|
|
177
|
+
"description": "Subpath under the rclone remote root that holds the synced subset."
|
|
109
178
|
}
|
|
110
179
|
}
|
|
111
180
|
}
|
package/src/commander.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { registerBackupCommand } from "./commands/backup.ts";
|
|
|
23
23
|
import { registerBrowseCommand } from "./commands/browse.ts";
|
|
24
24
|
import { registerBrowseAiCommand } from "./commands/browse-ai.ts";
|
|
25
25
|
import { registerCallersCommand } from "./commands/callers.ts";
|
|
26
|
+
import { registerClaudeDesktopCommand } from "./commands/claude-desktop.ts";
|
|
26
27
|
import { registerCompletionCommand } from "./commands/completion.ts";
|
|
27
28
|
import { registerConfigGetCommand } from "./commands/config-get.ts";
|
|
28
29
|
import { registerContextCommand } from "./commands/context.ts";
|
|
@@ -38,10 +39,12 @@ import { registerEnvCommand } from "./commands/env.ts";
|
|
|
38
39
|
import { registerFetchCommand } from "./commands/fetch.ts";
|
|
39
40
|
import { registerFileHistoryCommand } from "./commands/file-history.ts";
|
|
40
41
|
import { registerGrepCommand } from "./commands/grep.ts";
|
|
42
|
+
import { registerHarnessCommand } from "./commands/harness.ts";
|
|
41
43
|
import { registerInitCommand } from "./commands/init.ts";
|
|
42
44
|
import { registerOutlineCommand } from "./commands/outline.ts";
|
|
43
45
|
import { registerPresenceCommand } from "./commands/presence.ts";
|
|
44
46
|
import { registerReadCommand } from "./commands/read.ts";
|
|
47
|
+
import { registerRelayCommand } from "./commands/relay.ts";
|
|
45
48
|
import { registerScratchCommand } from "./commands/scratch.ts";
|
|
46
49
|
import { registerSessionCommand } from "./commands/session.ts";
|
|
47
50
|
import { registerSyncCommand } from "./commands/sync.ts";
|
|
@@ -251,6 +254,7 @@ export function createHarneryProgram(opts: HarneryContextOpts = {}): Command {
|
|
|
251
254
|
registerEmlCommand(program, emit);
|
|
252
255
|
registerEnvCommand(program, emit, opts.context);
|
|
253
256
|
registerPresenceCommand(program, emit);
|
|
257
|
+
registerRelayCommand(program, emit);
|
|
254
258
|
registerConfigGetCommand(program, emit);
|
|
255
259
|
registerFileHistoryCommand(program, emit);
|
|
256
260
|
registerOutlineCommand(program, emit);
|
|
@@ -259,6 +263,7 @@ export function createHarneryProgram(opts: HarneryContextOpts = {}): Command {
|
|
|
259
263
|
registerCallersCommand(program, emit, opts.context);
|
|
260
264
|
registerEditBatchCommand(program, emit);
|
|
261
265
|
registerGrepCommand(program, emit, opts.context);
|
|
266
|
+
registerHarnessCommand(program, emit);
|
|
262
267
|
registerCookiesCommand(program, emit);
|
|
263
268
|
registerFetchCommand(program, emit, opts.context);
|
|
264
269
|
registerReadCommand(program, emit);
|
|
@@ -277,6 +282,7 @@ export function createHarneryProgram(opts: HarneryContextOpts = {}): Command {
|
|
|
277
282
|
registerInitCommand(program, emit, opts.binName);
|
|
278
283
|
registerDeinitCommand(program, emit, opts.binName);
|
|
279
284
|
registerBackupCommand(program, emit);
|
|
285
|
+
registerClaudeDesktopCommand(program, emit);
|
|
280
286
|
registerSyncCommand(program, emit);
|
|
281
287
|
registerWorkflowCommand(program, emit);
|
|
282
288
|
if (include("web")) registerWebCommand(program, emit);
|