@knpkv/herdr-connect 0.4.0 → 0.4.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/dist/activity-store.d.ts +2 -2
- package/dist/activity-store.d.ts.map +1 -1
- package/dist/activity-store.js +20 -26
- package/dist/activity-store.js.map +1 -1
- package/dist/relationship-store.d.ts +2 -2
- package/dist/relationship-store.d.ts.map +1 -1
- package/dist/relationship-store.js +23 -32
- package/dist/relationship-store.js.map +1 -1
- package/dist/terminal.d.ts +117 -117
- package/package.json +4 -4
package/dist/activity-store.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Effect
|
|
1
|
+
import { Effect } from "effect";
|
|
2
2
|
import { TerminalTransportError } from "./errors.js";
|
|
3
3
|
export declare class AgentActivityStore {
|
|
4
4
|
#private;
|
|
5
5
|
readonly path: string;
|
|
6
6
|
private constructor();
|
|
7
|
-
static readonly open: (path: string) => Effect.Effect<AgentActivityStore, TerminalTransportError, FileSystem.FileSystem | Path.Path>;
|
|
7
|
+
static readonly open: (path: string) => Effect.Effect<AgentActivityStore, TerminalTransportError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
8
8
|
readonly observe: (this: AgentActivityStore, host: string, agentId: string, revision: number, observedAt: number) => Effect.Effect<number, TerminalTransportError, never>;
|
|
9
9
|
close(): void;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-store.d.ts","sourceRoot":"","sources":["../src/activity-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"activity-store.d.ts","sourceRoot":"","sources":["../src/activity-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAEvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAepD,qBAAa,kBAAkB;;IAE7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,OAAO,eAGN;IAED,MAAM,CAAC,QAAQ,CAAC,IAAI,mJAwBlB;IAEF,QAAQ,CAAC,OAAO,0JAqCd;IAEF,KAAK,IAAI,IAAI,CAEZ;CACF"}
|
package/dist/activity-store.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { openPrivateSqlite } from "@knpkv/herdr-fleet/sqlite";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
3
|
import { TerminalTransportError } from "./errors.js";
|
|
4
4
|
const ActivityRow = Schema.Struct({ last_activity_at: Schema.Number });
|
|
5
5
|
const TableColumn = Schema.Struct({ name: Schema.String });
|
|
6
|
+
const fromPrivateDatabaseError = (error) => new TerminalTransportError({
|
|
7
|
+
cause: error.cause,
|
|
8
|
+
detail: String(error.cause),
|
|
9
|
+
operation: `activity.${error.operation}`
|
|
10
|
+
});
|
|
6
11
|
const storeError = (operation) => (cause) => new TerminalTransportError({ cause, detail: String(cause), operation });
|
|
7
12
|
export class AgentActivityStore {
|
|
8
13
|
#database;
|
|
9
14
|
path;
|
|
10
|
-
constructor(path) {
|
|
15
|
+
constructor(path, opened) {
|
|
11
16
|
this.path = path;
|
|
12
|
-
this.#database =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
this.#database = opened.database;
|
|
18
|
+
}
|
|
19
|
+
static open = Effect.fn("AgentActivityStore.open")(function* (path) {
|
|
20
|
+
const opened = yield* openPrivateSqlite(path, {
|
|
21
|
+
initialize: (database) => {
|
|
22
|
+
database.exec(`
|
|
16
23
|
CREATE TABLE IF NOT EXISTS agent_activity (
|
|
17
24
|
host TEXT COLLATE NOCASE NOT NULL,
|
|
18
25
|
agent_id TEXT NOT NULL,
|
|
@@ -22,26 +29,13 @@ export class AgentActivityStore {
|
|
|
22
29
|
PRIMARY KEY (host, agent_id)
|
|
23
30
|
);
|
|
24
31
|
`);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
const columns = Schema.decodeUnknownSync(Schema.Array(TableColumn))(database.prepare("PRAGMA table_info(agent_activity)").all());
|
|
33
|
+
if (!columns.some(({ name }) => name === "observed_at")) {
|
|
34
|
+
database.exec("ALTER TABLE agent_activity ADD COLUMN observed_at INTEGER NOT NULL DEFAULT 0");
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
this.#database.close();
|
|
32
|
-
throw error;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
static open = Effect.fn("AgentActivityStore.open")(function* (path) {
|
|
36
|
-
const fileSystem = yield* FileSystem.FileSystem;
|
|
37
|
-
const paths = yield* Path.Path;
|
|
38
|
-
const directory = paths.dirname(path);
|
|
39
|
-
yield* fileSystem.makeDirectory(directory, { recursive: true, mode: 0o700 }).pipe(Effect.mapError(storeError("activity.openDirectory")));
|
|
40
|
-
yield* fileSystem.chmod(directory, 0o700).pipe(Effect.mapError(storeError("activity.secureDirectory")));
|
|
41
|
-
return yield* Effect.try({
|
|
42
|
-
try: () => new AgentActivityStore(path),
|
|
43
|
-
catch: storeError("activity.openDatabase")
|
|
44
|
-
});
|
|
37
|
+
}).pipe(Effect.mapError(fromPrivateDatabaseError));
|
|
38
|
+
return new AgentActivityStore(path, opened);
|
|
45
39
|
});
|
|
46
40
|
observe = Effect.fn("AgentActivityStore.observe")(function* (host, agentId, revision, observedAt) {
|
|
47
41
|
const normalizedHost = host.toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-store.js","sourceRoot":"","sources":["../src/activity-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"activity-store.js","sourceRoot":"","sources":["../src/activity-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiD,MAAM,2BAA2B,CAAA;AAC5G,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,E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AAA;IAEF,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Effect,
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
2
|
import { ConnectRelationshipError, ConnectRelationshipStoreError } from "./errors.js";
|
|
3
3
|
export declare const PersistedConnectAgentMetadata: Schema.Struct<{
|
|
4
4
|
readonly agentId: Schema.String;
|
|
@@ -20,7 +20,7 @@ export declare class AgentRelationshipStore {
|
|
|
20
20
|
#private;
|
|
21
21
|
readonly path: string;
|
|
22
22
|
private constructor();
|
|
23
|
-
static readonly open: (path: string) => Effect.Effect<AgentRelationshipStore, ConnectRelationshipStoreError, FileSystem.FileSystem | Path.Path>;
|
|
23
|
+
static readonly open: (path: string) => Effect.Effect<AgentRelationshipStore, ConnectRelationshipStoreError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
24
24
|
readonly persist: (this: AgentRelationshipStore, metadata: {
|
|
25
25
|
readonly agentId: string;
|
|
26
26
|
readonly host: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship-store.d.ts","sourceRoot":"","sources":["../src/relationship-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"relationship-store.d.ts","sourceRoot":"","sources":["../src/relationship-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAA;AAElD,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAIrF,eAAO,MAAM,6BAA6B;;;;;;;;;EAYxC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAC,IAAI,CAAA;AAErF,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,GAAG,wBAAwB,CAAA;AAEvF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAA;IAChD,QAAQ,CAAC,MAAM,EAAE,6BAA6B,CAAA;CAC/C;AAgED,qBAAa,sBAAsB;;IAGjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,OAAO,eAIN;IAED,MAAM,CAAC,QAAQ,CAAC,IAAI,8JA+EnB;IAED,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;wEAkBd;IAEF,QAAQ,CAAC,UAAU;;;;;;;;;0EAuGjB;IAEF,QAAQ,CAAC,IAAI;;;;;;;;;+CAIX;IAEF,OAAO,CAAC,YAAY;IAQpB,KAAK,IAAI,IAAI,CAEZ;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { openPrivateSqlite } from "@knpkv/herdr-fleet/sqlite";
|
|
2
|
+
import { Effect, Schema, Semaphore } from "effect";
|
|
3
3
|
import { ConnectRelationshipError, ConnectRelationshipStoreError } from "./errors.js";
|
|
4
4
|
import { connectRelationshipViolation } from "./forest.js";
|
|
5
5
|
import { ConnectAgent, ConnectAgentRelationship } from "./model.js";
|
|
@@ -19,6 +19,7 @@ const RelationshipRow = Schema.Struct({
|
|
|
19
19
|
relation: Schema.NullOr(Schema.String),
|
|
20
20
|
source: Schema.Literals(["durable_worker", "trusted_live_inventory"])
|
|
21
21
|
});
|
|
22
|
+
const fromPrivateDatabaseError = (error) => new ConnectRelationshipStoreError({ cause: error.cause, operation: error.operation });
|
|
22
23
|
const storeError = (operation) => (cause) => new ConnectRelationshipStoreError({ cause, operation });
|
|
23
24
|
const isRelationshipPersistenceFailure = Schema.is(Schema.Union([ConnectRelationshipError, ConnectRelationshipStoreError]));
|
|
24
25
|
const decodeRowSync = (row) => {
|
|
@@ -55,12 +56,15 @@ export class AgentRelationshipStore {
|
|
|
55
56
|
#database;
|
|
56
57
|
#transactions;
|
|
57
58
|
path;
|
|
58
|
-
constructor(path, transactions) {
|
|
59
|
+
constructor(path, transactions, opened) {
|
|
59
60
|
this.path = path;
|
|
60
61
|
this.#transactions = transactions;
|
|
61
|
-
this.#database =
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
this.#database = opened.database;
|
|
63
|
+
}
|
|
64
|
+
static open = Effect.fn("AgentRelationshipStore.open")(function* (path) {
|
|
65
|
+
const opened = yield* openPrivateSqlite(path, {
|
|
66
|
+
initialize: (database) => {
|
|
67
|
+
database.exec(`
|
|
64
68
|
CREATE TABLE IF NOT EXISTS connect_store_metadata (
|
|
65
69
|
key TEXT PRIMARY KEY,
|
|
66
70
|
value TEXT NOT NULL
|
|
@@ -76,11 +80,11 @@ export class AgentRelationshipStore {
|
|
|
76
80
|
CHECK ((parent_agent_id IS NULL) = (relation IS NULL))
|
|
77
81
|
);
|
|
78
82
|
`);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
const version = database.prepare("SELECT value FROM connect_store_metadata WHERE key = 'relationship_schema'").get();
|
|
84
|
+
const decodedVersion = Schema.decodeUnknownResult(Schema.Struct({ value: Schema.String }))(version);
|
|
85
|
+
if (decodedVersion._tag === "Failure" ||
|
|
86
|
+
(decodedVersion.success.value !== "3" && decodedVersion.success.value !== "4")) {
|
|
87
|
+
database.exec(`
|
|
84
88
|
BEGIN IMMEDIATE;
|
|
85
89
|
CREATE TABLE connect_agent_relationships_v2 (
|
|
86
90
|
host TEXT NOT NULL COLLATE NOCASE,
|
|
@@ -103,11 +107,11 @@ export class AgentRelationshipStore {
|
|
|
103
107
|
ON CONFLICT(key) DO UPDATE SET value = excluded.value;
|
|
104
108
|
COMMIT;
|
|
105
109
|
`);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
}
|
|
111
|
+
const migratedVersion = database.prepare("SELECT value FROM connect_store_metadata WHERE key = 'relationship_schema'").get();
|
|
112
|
+
const decodedMigratedVersion = Schema.decodeUnknownResult(Schema.Struct({ value: Schema.String }))(migratedVersion);
|
|
113
|
+
if (decodedMigratedVersion._tag === "Failure" || decodedMigratedVersion.success.value !== "4") {
|
|
114
|
+
database.exec(`
|
|
111
115
|
BEGIN IMMEDIATE;
|
|
112
116
|
ALTER TABLE connect_agent_relationships
|
|
113
117
|
ADD COLUMN source TEXT NOT NULL DEFAULT 'durable_worker'
|
|
@@ -119,24 +123,11 @@ export class AgentRelationshipStore {
|
|
|
119
123
|
ON CONFLICT(key) DO UPDATE SET value = excluded.value;
|
|
120
124
|
COMMIT;
|
|
121
125
|
`);
|
|
126
|
+
}
|
|
122
127
|
}
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
this.#database.close();
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
static open = Effect.fn("AgentRelationshipStore.open")(function* (path) {
|
|
130
|
-
const fileSystem = yield* FileSystem.FileSystem;
|
|
131
|
-
const paths = yield* Path.Path;
|
|
132
|
-
const directory = paths.dirname(path);
|
|
133
|
-
yield* fileSystem.makeDirectory(directory, { recursive: true, mode: 0o700 }).pipe(Effect.mapError(storeError("open.directory")));
|
|
134
|
-
yield* fileSystem.chmod(directory, 0o700).pipe(Effect.mapError(storeError("open.secureDirectory")));
|
|
128
|
+
}).pipe(Effect.mapError(fromPrivateDatabaseError));
|
|
135
129
|
const transactions = yield* Semaphore.make(1);
|
|
136
|
-
return
|
|
137
|
-
try: () => new AgentRelationshipStore(path, transactions),
|
|
138
|
-
catch: storeError("open")
|
|
139
|
-
});
|
|
130
|
+
return new AgentRelationshipStore(path, transactions, opened);
|
|
140
131
|
});
|
|
141
132
|
persist = Effect.fn("AgentRelationshipStore.persist")(function* (metadata, source) {
|
|
142
133
|
const stored = yield* this.persistAll([{ metadata, source }]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship-store.js","sourceRoot":"","sources":["../src/relationship-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,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C;gBACrC,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC;SAC/C,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CAAA;IAEO,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,QAAQ,CAAC;QAGhE,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;IAEM,YAAY;QAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;QAC/B,OAAO,MAAM,CAAC,GAAG,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YACrC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC;SAC1B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;CACF"}
|
package/dist/terminal.d.ts
CHANGED
|
@@ -56,20 +56,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
56
56
|
}, service: {
|
|
57
57
|
submit: (request: {
|
|
58
58
|
readonly payload: {
|
|
59
|
-
readonly kind: "nix.check";
|
|
60
|
-
} | {
|
|
61
|
-
readonly kind: "nix.apply";
|
|
62
|
-
readonly ref: string;
|
|
63
|
-
} | {
|
|
64
59
|
readonly kind: "agent.delegate";
|
|
65
60
|
readonly repository: string;
|
|
66
61
|
readonly prompt: string;
|
|
67
62
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
68
63
|
readonly channel?: "coordinator_chat";
|
|
69
|
-
} | {
|
|
70
|
-
readonly kind: "agent.message";
|
|
71
|
-
readonly session: string;
|
|
72
|
-
readonly message: string;
|
|
73
64
|
} | {
|
|
74
65
|
readonly kind: "work.reconcile";
|
|
75
66
|
readonly repository: string;
|
|
@@ -196,6 +187,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
196
187
|
readonly expectedGoalUpdatedAt: number;
|
|
197
188
|
} | {
|
|
198
189
|
readonly kind: "browser.mcp.recover";
|
|
190
|
+
} | {
|
|
191
|
+
readonly kind: "nix.check";
|
|
192
|
+
} | {
|
|
193
|
+
readonly kind: "nix.apply";
|
|
194
|
+
readonly ref: string;
|
|
195
|
+
} | {
|
|
196
|
+
readonly kind: "agent.message";
|
|
197
|
+
readonly session: string;
|
|
198
|
+
readonly message: string;
|
|
199
199
|
};
|
|
200
200
|
}, actor: string, provenance?: import("@knpkv/herdr-fleet").SubmissionProvenance | undefined) => Effect.Effect<{
|
|
201
201
|
readonly id: string;
|
|
@@ -212,20 +212,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
212
212
|
readonly expiredAt?: number | null;
|
|
213
213
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
214
214
|
readonly payload: {
|
|
215
|
-
readonly kind: "nix.check";
|
|
216
|
-
} | {
|
|
217
|
-
readonly kind: "nix.apply";
|
|
218
|
-
readonly ref: string;
|
|
219
|
-
} | {
|
|
220
215
|
readonly kind: "agent.delegate";
|
|
221
216
|
readonly repository: string;
|
|
222
217
|
readonly prompt: string;
|
|
223
218
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
224
219
|
readonly channel?: "coordinator_chat";
|
|
225
|
-
} | {
|
|
226
|
-
readonly kind: "agent.message";
|
|
227
|
-
readonly session: string;
|
|
228
|
-
readonly message: string;
|
|
229
220
|
} | {
|
|
230
221
|
readonly kind: "work.reconcile";
|
|
231
222
|
readonly repository: string;
|
|
@@ -352,6 +343,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
352
343
|
readonly expectedGoalUpdatedAt: number;
|
|
353
344
|
} | {
|
|
354
345
|
readonly kind: "browser.mcp.recover";
|
|
346
|
+
} | {
|
|
347
|
+
readonly kind: "nix.check";
|
|
348
|
+
} | {
|
|
349
|
+
readonly kind: "nix.apply";
|
|
350
|
+
readonly ref: string;
|
|
351
|
+
} | {
|
|
352
|
+
readonly kind: "agent.message";
|
|
353
|
+
readonly session: string;
|
|
354
|
+
readonly message: string;
|
|
355
355
|
};
|
|
356
356
|
readonly result: string | null;
|
|
357
357
|
readonly acceptedReceipt?: string | null;
|
|
@@ -389,20 +389,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
389
389
|
readonly expiredAt?: number | null;
|
|
390
390
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
391
391
|
readonly payload: {
|
|
392
|
-
readonly kind: "nix.check";
|
|
393
|
-
} | {
|
|
394
|
-
readonly kind: "nix.apply";
|
|
395
|
-
readonly ref: string;
|
|
396
|
-
} | {
|
|
397
392
|
readonly kind: "agent.delegate";
|
|
398
393
|
readonly repository: string;
|
|
399
394
|
readonly prompt: string;
|
|
400
395
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
401
396
|
readonly channel?: "coordinator_chat";
|
|
402
|
-
} | {
|
|
403
|
-
readonly kind: "agent.message";
|
|
404
|
-
readonly session: string;
|
|
405
|
-
readonly message: string;
|
|
406
397
|
} | {
|
|
407
398
|
readonly kind: "work.reconcile";
|
|
408
399
|
readonly repository: string;
|
|
@@ -529,6 +520,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
529
520
|
readonly expectedGoalUpdatedAt: number;
|
|
530
521
|
} | {
|
|
531
522
|
readonly kind: "browser.mcp.recover";
|
|
523
|
+
} | {
|
|
524
|
+
readonly kind: "nix.check";
|
|
525
|
+
} | {
|
|
526
|
+
readonly kind: "nix.apply";
|
|
527
|
+
readonly ref: string;
|
|
528
|
+
} | {
|
|
529
|
+
readonly kind: "agent.message";
|
|
530
|
+
readonly session: string;
|
|
531
|
+
readonly message: string;
|
|
532
532
|
};
|
|
533
533
|
readonly result: string | null;
|
|
534
534
|
readonly acceptedReceipt?: string | null;
|
|
@@ -566,20 +566,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
566
566
|
readonly expiredAt?: number | null;
|
|
567
567
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
568
568
|
readonly payload: {
|
|
569
|
-
readonly kind: "nix.check";
|
|
570
|
-
} | {
|
|
571
|
-
readonly kind: "nix.apply";
|
|
572
|
-
readonly ref: string;
|
|
573
|
-
} | {
|
|
574
569
|
readonly kind: "agent.delegate";
|
|
575
570
|
readonly repository: string;
|
|
576
571
|
readonly prompt: string;
|
|
577
572
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
578
573
|
readonly channel?: "coordinator_chat";
|
|
579
|
-
} | {
|
|
580
|
-
readonly kind: "agent.message";
|
|
581
|
-
readonly session: string;
|
|
582
|
-
readonly message: string;
|
|
583
574
|
} | {
|
|
584
575
|
readonly kind: "work.reconcile";
|
|
585
576
|
readonly repository: string;
|
|
@@ -706,6 +697,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
706
697
|
readonly expectedGoalUpdatedAt: number;
|
|
707
698
|
} | {
|
|
708
699
|
readonly kind: "browser.mcp.recover";
|
|
700
|
+
} | {
|
|
701
|
+
readonly kind: "nix.check";
|
|
702
|
+
} | {
|
|
703
|
+
readonly kind: "nix.apply";
|
|
704
|
+
readonly ref: string;
|
|
705
|
+
} | {
|
|
706
|
+
readonly kind: "agent.message";
|
|
707
|
+
readonly session: string;
|
|
708
|
+
readonly message: string;
|
|
709
709
|
};
|
|
710
710
|
readonly result: string | null;
|
|
711
711
|
readonly acceptedReceipt?: string | null;
|
|
@@ -743,20 +743,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
743
743
|
readonly expiredAt?: number | null;
|
|
744
744
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
745
745
|
readonly payload: {
|
|
746
|
-
readonly kind: "nix.check";
|
|
747
|
-
} | {
|
|
748
|
-
readonly kind: "nix.apply";
|
|
749
|
-
readonly ref: string;
|
|
750
|
-
} | {
|
|
751
746
|
readonly kind: "agent.delegate";
|
|
752
747
|
readonly repository: string;
|
|
753
748
|
readonly prompt: string;
|
|
754
749
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
755
750
|
readonly channel?: "coordinator_chat";
|
|
756
|
-
} | {
|
|
757
|
-
readonly kind: "agent.message";
|
|
758
|
-
readonly session: string;
|
|
759
|
-
readonly message: string;
|
|
760
751
|
} | {
|
|
761
752
|
readonly kind: "work.reconcile";
|
|
762
753
|
readonly repository: string;
|
|
@@ -883,6 +874,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
883
874
|
readonly expectedGoalUpdatedAt: number;
|
|
884
875
|
} | {
|
|
885
876
|
readonly kind: "browser.mcp.recover";
|
|
877
|
+
} | {
|
|
878
|
+
readonly kind: "nix.check";
|
|
879
|
+
} | {
|
|
880
|
+
readonly kind: "nix.apply";
|
|
881
|
+
readonly ref: string;
|
|
882
|
+
} | {
|
|
883
|
+
readonly kind: "agent.message";
|
|
884
|
+
readonly session: string;
|
|
885
|
+
readonly message: string;
|
|
886
886
|
};
|
|
887
887
|
readonly result: string | null;
|
|
888
888
|
readonly acceptedReceipt?: string | null;
|
|
@@ -920,20 +920,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
920
920
|
readonly expiredAt?: number | null;
|
|
921
921
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
922
922
|
readonly payload: {
|
|
923
|
-
readonly kind: "nix.check";
|
|
924
|
-
} | {
|
|
925
|
-
readonly kind: "nix.apply";
|
|
926
|
-
readonly ref: string;
|
|
927
|
-
} | {
|
|
928
923
|
readonly kind: "agent.delegate";
|
|
929
924
|
readonly repository: string;
|
|
930
925
|
readonly prompt: string;
|
|
931
926
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
932
927
|
readonly channel?: "coordinator_chat";
|
|
933
|
-
} | {
|
|
934
|
-
readonly kind: "agent.message";
|
|
935
|
-
readonly session: string;
|
|
936
|
-
readonly message: string;
|
|
937
928
|
} | {
|
|
938
929
|
readonly kind: "work.reconcile";
|
|
939
930
|
readonly repository: string;
|
|
@@ -1060,6 +1051,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1060
1051
|
readonly expectedGoalUpdatedAt: number;
|
|
1061
1052
|
} | {
|
|
1062
1053
|
readonly kind: "browser.mcp.recover";
|
|
1054
|
+
} | {
|
|
1055
|
+
readonly kind: "nix.check";
|
|
1056
|
+
} | {
|
|
1057
|
+
readonly kind: "nix.apply";
|
|
1058
|
+
readonly ref: string;
|
|
1059
|
+
} | {
|
|
1060
|
+
readonly kind: "agent.message";
|
|
1061
|
+
readonly session: string;
|
|
1062
|
+
readonly message: string;
|
|
1063
1063
|
};
|
|
1064
1064
|
readonly result: string | null;
|
|
1065
1065
|
readonly acceptedReceipt?: string | null;
|
|
@@ -1097,20 +1097,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1097
1097
|
readonly expiredAt?: number | null;
|
|
1098
1098
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
1099
1099
|
readonly payload: {
|
|
1100
|
-
readonly kind: "nix.check";
|
|
1101
|
-
} | {
|
|
1102
|
-
readonly kind: "nix.apply";
|
|
1103
|
-
readonly ref: string;
|
|
1104
|
-
} | {
|
|
1105
1100
|
readonly kind: "agent.delegate";
|
|
1106
1101
|
readonly repository: string;
|
|
1107
1102
|
readonly prompt: string;
|
|
1108
1103
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
1109
1104
|
readonly channel?: "coordinator_chat";
|
|
1110
|
-
} | {
|
|
1111
|
-
readonly kind: "agent.message";
|
|
1112
|
-
readonly session: string;
|
|
1113
|
-
readonly message: string;
|
|
1114
1105
|
} | {
|
|
1115
1106
|
readonly kind: "work.reconcile";
|
|
1116
1107
|
readonly repository: string;
|
|
@@ -1237,6 +1228,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1237
1228
|
readonly expectedGoalUpdatedAt: number;
|
|
1238
1229
|
} | {
|
|
1239
1230
|
readonly kind: "browser.mcp.recover";
|
|
1231
|
+
} | {
|
|
1232
|
+
readonly kind: "nix.check";
|
|
1233
|
+
} | {
|
|
1234
|
+
readonly kind: "nix.apply";
|
|
1235
|
+
readonly ref: string;
|
|
1236
|
+
} | {
|
|
1237
|
+
readonly kind: "agent.message";
|
|
1238
|
+
readonly session: string;
|
|
1239
|
+
readonly message: string;
|
|
1240
1240
|
};
|
|
1241
1241
|
readonly result: string | null;
|
|
1242
1242
|
readonly acceptedReceipt?: string | null;
|
|
@@ -1274,20 +1274,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1274
1274
|
readonly expiredAt?: number | null;
|
|
1275
1275
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
1276
1276
|
readonly payload: {
|
|
1277
|
-
readonly kind: "nix.check";
|
|
1278
|
-
} | {
|
|
1279
|
-
readonly kind: "nix.apply";
|
|
1280
|
-
readonly ref: string;
|
|
1281
|
-
} | {
|
|
1282
1277
|
readonly kind: "agent.delegate";
|
|
1283
1278
|
readonly repository: string;
|
|
1284
1279
|
readonly prompt: string;
|
|
1285
1280
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
1286
1281
|
readonly channel?: "coordinator_chat";
|
|
1287
|
-
} | {
|
|
1288
|
-
readonly kind: "agent.message";
|
|
1289
|
-
readonly session: string;
|
|
1290
|
-
readonly message: string;
|
|
1291
1282
|
} | {
|
|
1292
1283
|
readonly kind: "work.reconcile";
|
|
1293
1284
|
readonly repository: string;
|
|
@@ -1414,6 +1405,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1414
1405
|
readonly expectedGoalUpdatedAt: number;
|
|
1415
1406
|
} | {
|
|
1416
1407
|
readonly kind: "browser.mcp.recover";
|
|
1408
|
+
} | {
|
|
1409
|
+
readonly kind: "nix.check";
|
|
1410
|
+
} | {
|
|
1411
|
+
readonly kind: "nix.apply";
|
|
1412
|
+
readonly ref: string;
|
|
1413
|
+
} | {
|
|
1414
|
+
readonly kind: "agent.message";
|
|
1415
|
+
readonly session: string;
|
|
1416
|
+
readonly message: string;
|
|
1417
1417
|
};
|
|
1418
1418
|
readonly result: string | null;
|
|
1419
1419
|
readonly acceptedReceipt?: string | null;
|
|
@@ -1454,20 +1454,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1454
1454
|
readonly expiredAt?: number | null;
|
|
1455
1455
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
1456
1456
|
readonly payload: {
|
|
1457
|
-
readonly kind: "nix.check";
|
|
1458
|
-
} | {
|
|
1459
|
-
readonly kind: "nix.apply";
|
|
1460
|
-
readonly ref: string;
|
|
1461
|
-
} | {
|
|
1462
1457
|
readonly kind: "agent.delegate";
|
|
1463
1458
|
readonly repository: string;
|
|
1464
1459
|
readonly prompt: string;
|
|
1465
1460
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
1466
1461
|
readonly channel?: "coordinator_chat";
|
|
1467
|
-
} | {
|
|
1468
|
-
readonly kind: "agent.message";
|
|
1469
|
-
readonly session: string;
|
|
1470
|
-
readonly message: string;
|
|
1471
1462
|
} | {
|
|
1472
1463
|
readonly kind: "work.reconcile";
|
|
1473
1464
|
readonly repository: string;
|
|
@@ -1594,6 +1585,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1594
1585
|
readonly expectedGoalUpdatedAt: number;
|
|
1595
1586
|
} | {
|
|
1596
1587
|
readonly kind: "browser.mcp.recover";
|
|
1588
|
+
} | {
|
|
1589
|
+
readonly kind: "nix.check";
|
|
1590
|
+
} | {
|
|
1591
|
+
readonly kind: "nix.apply";
|
|
1592
|
+
readonly ref: string;
|
|
1593
|
+
} | {
|
|
1594
|
+
readonly kind: "agent.message";
|
|
1595
|
+
readonly session: string;
|
|
1596
|
+
readonly message: string;
|
|
1597
1597
|
};
|
|
1598
1598
|
readonly result: string | null;
|
|
1599
1599
|
readonly acceptedReceipt?: string | null;
|
|
@@ -1635,20 +1635,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1635
1635
|
readonly expiredAt?: number | null;
|
|
1636
1636
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
1637
1637
|
readonly payload: {
|
|
1638
|
-
readonly kind: "nix.check";
|
|
1639
|
-
} | {
|
|
1640
|
-
readonly kind: "nix.apply";
|
|
1641
|
-
readonly ref: string;
|
|
1642
|
-
} | {
|
|
1643
1638
|
readonly kind: "agent.delegate";
|
|
1644
1639
|
readonly repository: string;
|
|
1645
1640
|
readonly prompt: string;
|
|
1646
1641
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
1647
1642
|
readonly channel?: "coordinator_chat";
|
|
1648
|
-
} | {
|
|
1649
|
-
readonly kind: "agent.message";
|
|
1650
|
-
readonly session: string;
|
|
1651
|
-
readonly message: string;
|
|
1652
1643
|
} | {
|
|
1653
1644
|
readonly kind: "work.reconcile";
|
|
1654
1645
|
readonly repository: string;
|
|
@@ -1775,6 +1766,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1775
1766
|
readonly expectedGoalUpdatedAt: number;
|
|
1776
1767
|
} | {
|
|
1777
1768
|
readonly kind: "browser.mcp.recover";
|
|
1769
|
+
} | {
|
|
1770
|
+
readonly kind: "nix.check";
|
|
1771
|
+
} | {
|
|
1772
|
+
readonly kind: "nix.apply";
|
|
1773
|
+
readonly ref: string;
|
|
1774
|
+
} | {
|
|
1775
|
+
readonly kind: "agent.message";
|
|
1776
|
+
readonly session: string;
|
|
1777
|
+
readonly message: string;
|
|
1778
1778
|
};
|
|
1779
1779
|
readonly result: string | null;
|
|
1780
1780
|
readonly acceptedReceipt?: string | null;
|
|
@@ -1821,20 +1821,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1821
1821
|
readonly expiredAt?: number | null;
|
|
1822
1822
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
1823
1823
|
readonly payload: {
|
|
1824
|
-
readonly kind: "nix.check";
|
|
1825
|
-
} | {
|
|
1826
|
-
readonly kind: "nix.apply";
|
|
1827
|
-
readonly ref: string;
|
|
1828
|
-
} | {
|
|
1829
1824
|
readonly kind: "agent.delegate";
|
|
1830
1825
|
readonly repository: string;
|
|
1831
1826
|
readonly prompt: string;
|
|
1832
1827
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
1833
1828
|
readonly channel?: "coordinator_chat";
|
|
1834
|
-
} | {
|
|
1835
|
-
readonly kind: "agent.message";
|
|
1836
|
-
readonly session: string;
|
|
1837
|
-
readonly message: string;
|
|
1838
1829
|
} | {
|
|
1839
1830
|
readonly kind: "work.reconcile";
|
|
1840
1831
|
readonly repository: string;
|
|
@@ -1961,6 +1952,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
1961
1952
|
readonly expectedGoalUpdatedAt: number;
|
|
1962
1953
|
} | {
|
|
1963
1954
|
readonly kind: "browser.mcp.recover";
|
|
1955
|
+
} | {
|
|
1956
|
+
readonly kind: "nix.check";
|
|
1957
|
+
} | {
|
|
1958
|
+
readonly kind: "nix.apply";
|
|
1959
|
+
readonly ref: string;
|
|
1960
|
+
} | {
|
|
1961
|
+
readonly kind: "agent.message";
|
|
1962
|
+
readonly session: string;
|
|
1963
|
+
readonly message: string;
|
|
1964
1964
|
};
|
|
1965
1965
|
readonly result: string | null;
|
|
1966
1966
|
readonly acceptedReceipt?: string | null;
|
|
@@ -2003,20 +2003,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
2003
2003
|
readonly expiredAt?: number | null;
|
|
2004
2004
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
2005
2005
|
readonly payload: {
|
|
2006
|
-
readonly kind: "nix.check";
|
|
2007
|
-
} | {
|
|
2008
|
-
readonly kind: "nix.apply";
|
|
2009
|
-
readonly ref: string;
|
|
2010
|
-
} | {
|
|
2011
2006
|
readonly kind: "agent.delegate";
|
|
2012
2007
|
readonly repository: string;
|
|
2013
2008
|
readonly prompt: string;
|
|
2014
2009
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
2015
2010
|
readonly channel?: "coordinator_chat";
|
|
2016
|
-
} | {
|
|
2017
|
-
readonly kind: "agent.message";
|
|
2018
|
-
readonly session: string;
|
|
2019
|
-
readonly message: string;
|
|
2020
2011
|
} | {
|
|
2021
2012
|
readonly kind: "work.reconcile";
|
|
2022
2013
|
readonly repository: string;
|
|
@@ -2143,6 +2134,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
2143
2134
|
readonly expectedGoalUpdatedAt: number;
|
|
2144
2135
|
} | {
|
|
2145
2136
|
readonly kind: "browser.mcp.recover";
|
|
2137
|
+
} | {
|
|
2138
|
+
readonly kind: "nix.check";
|
|
2139
|
+
} | {
|
|
2140
|
+
readonly kind: "nix.apply";
|
|
2141
|
+
readonly ref: string;
|
|
2142
|
+
} | {
|
|
2143
|
+
readonly kind: "agent.message";
|
|
2144
|
+
readonly session: string;
|
|
2145
|
+
readonly message: string;
|
|
2146
2146
|
};
|
|
2147
2147
|
readonly result: string | null;
|
|
2148
2148
|
readonly acceptedReceipt?: string | null;
|
|
@@ -2232,20 +2232,11 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
2232
2232
|
readonly expiredAt?: number | null;
|
|
2233
2233
|
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
2234
2234
|
readonly payload: {
|
|
2235
|
-
readonly kind: "nix.check";
|
|
2236
|
-
} | {
|
|
2237
|
-
readonly kind: "nix.apply";
|
|
2238
|
-
readonly ref: string;
|
|
2239
|
-
} | {
|
|
2240
2235
|
readonly kind: "agent.delegate";
|
|
2241
2236
|
readonly repository: string;
|
|
2242
2237
|
readonly prompt: string;
|
|
2243
2238
|
readonly mode: "consult" | "review" | "transition_summary" | "work";
|
|
2244
2239
|
readonly channel?: "coordinator_chat";
|
|
2245
|
-
} | {
|
|
2246
|
-
readonly kind: "agent.message";
|
|
2247
|
-
readonly session: string;
|
|
2248
|
-
readonly message: string;
|
|
2249
2240
|
} | {
|
|
2250
2241
|
readonly kind: "work.reconcile";
|
|
2251
2242
|
readonly repository: string;
|
|
@@ -2372,6 +2363,15 @@ export declare const makeHerdrTerminalConnector: (config: {
|
|
|
2372
2363
|
readonly expectedGoalUpdatedAt: number;
|
|
2373
2364
|
} | {
|
|
2374
2365
|
readonly kind: "browser.mcp.recover";
|
|
2366
|
+
} | {
|
|
2367
|
+
readonly kind: "nix.check";
|
|
2368
|
+
} | {
|
|
2369
|
+
readonly kind: "nix.apply";
|
|
2370
|
+
readonly ref: string;
|
|
2371
|
+
} | {
|
|
2372
|
+
readonly kind: "agent.message";
|
|
2373
|
+
readonly session: string;
|
|
2374
|
+
readonly message: string;
|
|
2375
2375
|
};
|
|
2376
2376
|
readonly result: string | null;
|
|
2377
2377
|
readonly acceptedReceipt?: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/herdr-connect",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Fleet Herdr agent directory and authenticated terminal control",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@effect/platform-browser": "4.0.0",
|
|
53
53
|
"effect": "4.0.0",
|
|
54
54
|
"ghostty-web": "0.4.0",
|
|
55
|
-
"@knpkv/herdr-fleet": "^0.
|
|
56
|
-
"@knpkv/herdr-work": "^0.5.
|
|
57
|
-
"@knpkv/rly": "^0.6.
|
|
55
|
+
"@knpkv/herdr-fleet": "^0.5.0",
|
|
56
|
+
"@knpkv/herdr-work": "^0.5.1",
|
|
57
|
+
"@knpkv/rly": "^0.6.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@effect/platform-node": "4.0.0",
|