@neta-art/cohub-cli 10.23.0 → 10.25.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 +18 -5
- package/bin/cohub.js +4 -1
- package/dist/board-gpu/page.js +1566 -71230
- package/dist/bootstrap.js +67 -27
- package/dist/build.json +1 -1
- package/dist/{board-kernel/FilterPipe.js → chunks/Geometry.js} +10447 -10469
- package/dist/chunks/about.js +102 -0
- package/dist/chunks/app-realtime.js +2216 -0
- package/dist/chunks/app-realtime2.js +2 -0
- package/dist/chunks/app-ref.js +88 -0
- package/dist/chunks/apps.js +1423 -0
- package/dist/chunks/auth.js +175 -0
- package/dist/chunks/avatar.js +146 -0
- package/dist/chunks/board-export-resources.js +232 -0
- package/dist/chunks/board-export.js +874 -0
- package/dist/chunks/board-export2.js +2 -0
- package/dist/{board-kernel.js → chunks/board-kernel.js} +18032 -28512
- package/dist/chunks/board-kernel2.js +4 -0
- package/dist/chunks/board-profile.js +69 -0
- package/dist/chunks/board-simulate.js +315 -0
- package/dist/chunks/board-time.js +34 -0
- package/dist/chunks/boards.js +1943 -0
- package/dist/{board-kernel → chunks}/browserAll.js +9 -8
- package/dist/chunks/channels.js +64 -0
- package/dist/chunks/client.js +12606 -0
- package/dist/chunks/command-input.js +17 -0
- package/dist/chunks/commander.js +2962 -0
- package/dist/chunks/cron-jobs.js +163 -0
- package/dist/chunks/daemon.js +545 -0
- package/dist/chunks/daemon2.js +2 -0
- package/dist/chunks/desktop.js +172 -0
- package/dist/chunks/endpoint-options.js +26 -0
- package/dist/chunks/env-proxy.js +35 -0
- package/dist/chunks/environment.js +154 -0
- package/dist/chunks/feedback.js +120 -0
- package/dist/chunks/generations.js +379 -0
- package/dist/chunks/host.js +9 -0
- package/dist/chunks/http-put.js +131 -0
- package/dist/chunks/id.js +2416 -0
- package/dist/{board-kernel → chunks}/init.js +1 -1
- package/dist/chunks/install.js +11959 -0
- package/dist/chunks/launch.js +374 -0
- package/dist/chunks/local-media.js +47 -0
- package/dist/chunks/me.js +134 -0
- package/dist/chunks/media.js +315 -0
- package/dist/chunks/models.js +242 -0
- package/dist/chunks/operands.js +46 -0
- package/dist/chunks/package-paths.js +13 -0
- package/dist/chunks/policy.js +221 -0
- package/dist/chunks/preferences.js +29 -0
- package/dist/chunks/profile.js +64 -0
- package/dist/chunks/prompts.js +41 -0
- package/dist/chunks/public.js +2 -0
- package/dist/chunks/public2.js +244 -0
- package/dist/chunks/references.js +197 -0
- package/dist/chunks/referrals.js +90 -0
- package/dist/chunks/rolldown-runtime.js +26 -0
- package/dist/chunks/rooms-connect.js +2 -0
- package/dist/chunks/rooms-connect2.js +151 -0
- package/dist/chunks/rooms-rtc.js +309 -0
- package/dist/chunks/rooms.js +211 -0
- package/dist/chunks/run.js +220 -0
- package/dist/chunks/runtime.js +638 -0
- package/dist/chunks/runtime2.js +286 -0
- package/dist/chunks/runtimes.js +48 -0
- package/dist/chunks/safe-remote-image.js +198 -0
- package/dist/chunks/schemas.js +6017 -0
- package/dist/chunks/search.js +113 -0
- package/dist/chunks/self-update.js +238 -0
- package/dist/chunks/serve.js +1246 -0
- package/dist/chunks/session-status.js +24 -0
- package/dist/chunks/skills.js +35 -0
- package/dist/chunks/spaces.js +5080 -0
- package/dist/chunks/src.js +405 -0
- package/dist/chunks/supervisor.js +2511 -0
- package/dist/chunks/supervisor2.js +2 -0
- package/dist/chunks/tasks.js +82 -0
- package/dist/chunks/themes.js +2898 -0
- package/dist/chunks/version.js +2 -0
- package/dist/chunks/version2.js +22 -0
- package/dist/chunks/version3.js +18 -0
- package/dist/chunks/web.js +7 -0
- package/dist/{board-kernel → chunks}/webworkerAll.js +1 -1
- package/dist/runtime/native/pi-extension.js +174 -166
- package/dist/runtime/worker.js +27 -16
- package/package.json +8 -9
- package/dist/about.d.ts +0 -2
- package/dist/about.js +0 -71
- package/dist/app-download.d.ts +0 -11
- package/dist/app-download.js +0 -252
- package/dist/app-ref.d.ts +0 -5
- package/dist/app-ref.js +0 -8
- package/dist/app-target.d.ts +0 -26
- package/dist/app-target.js +0 -55
- package/dist/auth.d.ts +0 -45
- package/dist/auth.js +0 -307
- package/dist/avatar.d.ts +0 -55
- package/dist/avatar.js +0 -104
- package/dist/board-command-support.d.ts +0 -6
- package/dist/board-command-support.js +0 -88
- package/dist/board-export-resources.d.ts +0 -12
- package/dist/board-export-resources.js +0 -51
- package/dist/board-export.d.ts +0 -110
- package/dist/board-export.js +0 -592
- package/dist/board-fonts.d.ts +0 -11
- package/dist/board-fonts.js +0 -10
- package/dist/board-gpu/daemon.d.ts +0 -11
- package/dist/board-gpu/daemon.js +0 -295
- package/dist/board-gpu/index.d.ts +0 -33
- package/dist/board-gpu/index.js +0 -189
- package/dist/board-gpu/protocol.d.ts +0 -77
- package/dist/board-gpu/protocol.js +0 -1
- package/dist/board-kernel.d.ts +0 -5
- package/dist/board-media-export.d.ts +0 -17
- package/dist/board-media-export.js +0 -164
- package/dist/board-media.d.ts +0 -5
- package/dist/board-media.js +0 -66
- package/dist/board-profile.d.ts +0 -21
- package/dist/board-profile.js +0 -67
- package/dist/board-simulate.d.ts +0 -67
- package/dist/board-simulate.js +0 -259
- package/dist/board-time.d.ts +0 -3
- package/dist/board-time.js +0 -34
- package/dist/bootstrap.d.ts +0 -2
- package/dist/client.d.ts +0 -5
- package/dist/client.js +0 -24
- package/dist/command-input.d.ts +0 -4
- package/dist/command-input.js +0 -16
- package/dist/commands/app-commerce.d.ts +0 -2
- package/dist/commands/app-commerce.js +0 -228
- package/dist/commands/app-domains.d.ts +0 -2
- package/dist/commands/app-domains.js +0 -133
- package/dist/commands/apps.d.ts +0 -4
- package/dist/commands/apps.js +0 -827
- package/dist/commands/auth.d.ts +0 -2
- package/dist/commands/auth.js +0 -186
- package/dist/commands/boards/authoring.d.ts +0 -2
- package/dist/commands/boards/authoring.js +0 -166
- package/dist/commands/boards/examples.d.ts +0 -10
- package/dist/commands/boards/examples.js +0 -118
- package/dist/commands/boards.d.ts +0 -13
- package/dist/commands/boards.js +0 -836
- package/dist/commands/channels.d.ts +0 -2
- package/dist/commands/channels.js +0 -74
- package/dist/commands/cron-jobs.d.ts +0 -2
- package/dist/commands/cron-jobs.js +0 -155
- package/dist/commands/decision.d.ts +0 -4
- package/dist/commands/decision.js +0 -113
- package/dist/commands/desktop.d.ts +0 -10
- package/dist/commands/desktop.js +0 -233
- package/dist/commands/feedback.d.ts +0 -2
- package/dist/commands/feedback.js +0 -131
- package/dist/commands/generations.d.ts +0 -2
- package/dist/commands/generations.js +0 -427
- package/dist/commands/host.d.ts +0 -2
- package/dist/commands/host.js +0 -11
- package/dist/commands/me.d.ts +0 -2
- package/dist/commands/me.js +0 -118
- package/dist/commands/models.d.ts +0 -28
- package/dist/commands/models.js +0 -271
- package/dist/commands/profile.d.ts +0 -2
- package/dist/commands/profile.js +0 -81
- package/dist/commands/prompts.d.ts +0 -2
- package/dist/commands/prompts.js +0 -37
- package/dist/commands/public.d.ts +0 -20
- package/dist/commands/public.js +0 -291
- package/dist/commands/references.d.ts +0 -2
- package/dist/commands/references.js +0 -193
- package/dist/commands/referrals.d.ts +0 -2
- package/dist/commands/referrals.js +0 -88
- package/dist/commands/rooms-connect.d.ts +0 -17
- package/dist/commands/rooms-connect.js +0 -140
- package/dist/commands/rooms-rtc-binary.d.ts +0 -2
- package/dist/commands/rooms-rtc-binary.js +0 -107
- package/dist/commands/rooms-rtc.d.ts +0 -21
- package/dist/commands/rooms-rtc.js +0 -171
- package/dist/commands/rooms.d.ts +0 -3
- package/dist/commands/rooms.js +0 -277
- package/dist/commands/run.d.ts +0 -13
- package/dist/commands/run.js +0 -246
- package/dist/commands/runtime.d.ts +0 -3
- package/dist/commands/runtime.js +0 -320
- package/dist/commands/sandboxd-binary.d.ts +0 -11
- package/dist/commands/sandboxd-binary.js +0 -238
- package/dist/commands/search.d.ts +0 -2
- package/dist/commands/search.js +0 -114
- package/dist/commands/session-access.d.ts +0 -2
- package/dist/commands/session-access.js +0 -70
- package/dist/commands/skills.d.ts +0 -2
- package/dist/commands/skills.js +0 -34
- package/dist/commands/space-activity.d.ts +0 -26
- package/dist/commands/space-activity.js +0 -147
- package/dist/commands/space-commerce.d.ts +0 -2
- package/dist/commands/space-commerce.js +0 -514
- package/dist/commands/space-displays.d.ts +0 -2
- package/dist/commands/space-displays.js +0 -620
- package/dist/commands/space-files.d.ts +0 -5
- package/dist/commands/space-files.js +0 -215
- package/dist/commands/space-invitations.d.ts +0 -29
- package/dist/commands/space-invitations.js +0 -189
- package/dist/commands/space-turns.d.ts +0 -49
- package/dist/commands/space-turns.js +0 -205
- package/dist/commands/space-wallet.d.ts +0 -2
- package/dist/commands/space-wallet.js +0 -64
- package/dist/commands/space-webhooks.d.ts +0 -7
- package/dist/commands/space-webhooks.js +0 -73
- package/dist/commands/spaces.d.ts +0 -25
- package/dist/commands/spaces.js +0 -2139
- package/dist/commands/tasks.d.ts +0 -8
- package/dist/commands/tasks.js +0 -80
- package/dist/commands/version.d.ts +0 -2
- package/dist/commands/version.js +0 -21
- package/dist/endpoint-options.d.ts +0 -4
- package/dist/endpoint-options.js +0 -26
- package/dist/env-proxy.d.ts +0 -5
- package/dist/env-proxy.js +0 -20
- package/dist/help-path.d.ts +0 -18
- package/dist/help-path.js +0 -223
- package/dist/host/auth.d.ts +0 -20
- package/dist/host/auth.js +0 -119
- package/dist/host/login-env.d.ts +0 -1
- package/dist/host/login-env.js +0 -31
- package/dist/host/runtime.d.ts +0 -35
- package/dist/host/runtime.js +0 -395
- package/dist/host/runtimes.d.ts +0 -9
- package/dist/host/runtimes.js +0 -42
- package/dist/host/serve.d.ts +0 -2
- package/dist/host/serve.js +0 -117
- package/dist/host/workspaces.d.ts +0 -2
- package/dist/host/workspaces.js +0 -18
- package/dist/http-put.d.ts +0 -25
- package/dist/http-put.js +0 -132
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -129
- package/dist/launcher.d.ts +0 -4
- package/dist/launcher.js +0 -38
- package/dist/local-media.d.ts +0 -2
- package/dist/local-media.js +0 -30
- package/dist/network-error.d.ts +0 -3
- package/dist/network-error.js +0 -22
- package/dist/output.d.ts +0 -46
- package/dist/output.js +0 -244
- package/dist/runtime/archive-store.d.ts +0 -54
- package/dist/runtime/archive-store.js +0 -379
- package/dist/runtime/cli-path.d.ts +0 -5
- package/dist/runtime/cli-path.js +0 -27
- package/dist/runtime/codex-usage.d.ts +0 -7
- package/dist/runtime/codex-usage.js +0 -11
- package/dist/runtime/connection.d.ts +0 -42
- package/dist/runtime/connection.js +0 -789
- package/dist/runtime/diagnostics.d.ts +0 -107
- package/dist/runtime/diagnostics.js +0 -392
- package/dist/runtime/harnesses/chained-projection.d.ts +0 -40
- package/dist/runtime/harnesses/chained-projection.js +0 -95
- package/dist/runtime/harnesses/chained-transcript.d.ts +0 -24
- package/dist/runtime/harnesses/chained-transcript.js +0 -62
- package/dist/runtime/harnesses/claude-approval.d.ts +0 -34
- package/dist/runtime/harnesses/claude-approval.js +0 -124
- package/dist/runtime/harnesses/claude-transcript.d.ts +0 -8
- package/dist/runtime/harnesses/claude-transcript.js +0 -138
- package/dist/runtime/harnesses/claude.d.ts +0 -8
- package/dist/runtime/harnesses/claude.js +0 -225
- package/dist/runtime/harnesses/codex-approval.d.ts +0 -25
- package/dist/runtime/harnesses/codex-approval.js +0 -69
- package/dist/runtime/harnesses/codex.d.ts +0 -4
- package/dist/runtime/harnesses/codex.js +0 -269
- package/dist/runtime/harnesses/cursor-transcript.d.ts +0 -37
- package/dist/runtime/harnesses/cursor-transcript.js +0 -183
- package/dist/runtime/harnesses/cursor.d.ts +0 -24
- package/dist/runtime/harnesses/cursor.js +0 -620
- package/dist/runtime/harnesses/index.d.ts +0 -16
- package/dist/runtime/harnesses/index.js +0 -73
- package/dist/runtime/harnesses/pi.d.ts +0 -4
- package/dist/runtime/harnesses/pi.js +0 -247
- package/dist/runtime/harnesses/process.d.ts +0 -31
- package/dist/runtime/harnesses/process.js +0 -75
- package/dist/runtime/harnesses/stream-json.d.ts +0 -48
- package/dist/runtime/harnesses/stream-json.js +0 -336
- package/dist/runtime/harnesses/types.d.ts +0 -117
- package/dist/runtime/harnesses/types.js +0 -1
- package/dist/runtime/harnesses/workbuddy-transcript.d.ts +0 -8
- package/dist/runtime/harnesses/workbuddy-transcript.js +0 -127
- package/dist/runtime/harnesses/workbuddy.d.ts +0 -21
- package/dist/runtime/harnesses/workbuddy.js +0 -123
- package/dist/runtime/instance.d.ts +0 -20
- package/dist/runtime/instance.js +0 -247
- package/dist/runtime/json-rpc.d.ts +0 -53
- package/dist/runtime/json-rpc.js +0 -212
- package/dist/runtime/launch.d.ts +0 -25
- package/dist/runtime/launch.js +0 -247
- package/dist/runtime/local-workspace.d.ts +0 -15
- package/dist/runtime/local-workspace.js +0 -52
- package/dist/runtime/model-catalog.d.ts +0 -12
- package/dist/runtime/model-catalog.js +0 -84
- package/dist/runtime/native/adapters.d.ts +0 -15
- package/dist/runtime/native/adapters.js +0 -11
- package/dist/runtime/native/approvals.d.ts +0 -18
- package/dist/runtime/native/approvals.js +0 -54
- package/dist/runtime/native/archive.d.ts +0 -19
- package/dist/runtime/native/archive.js +0 -142
- package/dist/runtime/native/attach.d.ts +0 -36
- package/dist/runtime/native/attach.js +0 -128
- package/dist/runtime/native/codex-link.d.ts +0 -60
- package/dist/runtime/native/codex-link.js +0 -322
- package/dist/runtime/native/config.d.ts +0 -16
- package/dist/runtime/native/config.js +0 -24
- package/dist/runtime/native/daemon.d.ts +0 -92
- package/dist/runtime/native/daemon.js +0 -380
- package/dist/runtime/native/execution.d.ts +0 -26
- package/dist/runtime/native/execution.js +0 -34
- package/dist/runtime/native/identity.d.ts +0 -9
- package/dist/runtime/native/identity.js +0 -15
- package/dist/runtime/native/ingest.d.ts +0 -263
- package/dist/runtime/native/ingest.js +0 -884
- package/dist/runtime/native/install.d.ts +0 -9
- package/dist/runtime/native/install.js +0 -113
- package/dist/runtime/native/paths.d.ts +0 -2
- package/dist/runtime/native/paths.js +0 -7
- package/dist/runtime/native/pi-extension.d.ts +0 -36
- package/dist/runtime/native/pi-link.d.ts +0 -69
- package/dist/runtime/native/pi-link.js +0 -269
- package/dist/runtime/native/results.d.ts +0 -41
- package/dist/runtime/native/results.js +0 -128
- package/dist/runtime/native/sessions.d.ts +0 -45
- package/dist/runtime/native/sessions.js +0 -87
- package/dist/runtime/native/transcript.d.ts +0 -89
- package/dist/runtime/native/transcript.js +0 -656
- package/dist/runtime/native/translate.d.ts +0 -46
- package/dist/runtime/native/translate.js +0 -299
- package/dist/runtime/native/transport.d.ts +0 -7
- package/dist/runtime/native/transport.js +0 -16
- package/dist/runtime/native/version.d.ts +0 -5
- package/dist/runtime/native/version.js +0 -21
- package/dist/runtime/preferences.d.ts +0 -7
- package/dist/runtime/preferences.js +0 -22
- package/dist/runtime/presentation.d.ts +0 -32
- package/dist/runtime/presentation.js +0 -124
- package/dist/runtime/process-group.d.ts +0 -5
- package/dist/runtime/process-group.js +0 -161
- package/dist/runtime/projection-store.d.ts +0 -27
- package/dist/runtime/projection-store.js +0 -30
- package/dist/runtime/space-binding.d.ts +0 -48
- package/dist/runtime/space-binding.js +0 -342
- package/dist/runtime/supervisor.d.ts +0 -19
- package/dist/runtime/supervisor.js +0 -441
- package/dist/runtime/turn-projection.d.ts +0 -41
- package/dist/runtime/turn-projection.js +0 -120
- package/dist/runtime/worker.d.ts +0 -1
- package/dist/safe-remote-image.d.ts +0 -36
- package/dist/safe-remote-image.js +0 -191
- package/dist/self-update.d.ts +0 -7
- package/dist/self-update.js +0 -202
- package/dist/session-status.d.ts +0 -6
- package/dist/session-status.js +0 -16
- package/dist/space-files/limit.d.ts +0 -2
- package/dist/space-files/limit.js +0 -16
- package/dist/space-files/operands.d.ts +0 -17
- package/dist/space-files/operands.js +0 -33
- package/dist/space-files/transfer.d.ts +0 -53
- package/dist/space-files/transfer.js +0 -297
- package/dist/space-files/upload.d.ts +0 -17
- package/dist/space-files/upload.js +0 -76
- package/dist/space.d.ts +0 -44
- package/dist/space.js +0 -192
- package/dist/version.d.ts +0 -2
- package/dist/version.js +0 -17
- package/dist/web.d.ts +0 -1
- package/dist/web.js +0 -4
- /package/dist/{board-kernel → chunks}/lexer.js +0 -0
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import { type NativeIngestResult, type NativeRuntimeEvent } from "@neta-art/cohub";
|
|
2
|
-
import { type Harness } from "./adapters.js";
|
|
3
|
-
import type { RuntimeArchiveStore } from "../archive-store.js";
|
|
4
|
-
export declare const DEFAULT_IMPORT_CONCURRENCY = 4;
|
|
5
|
-
export declare const MAX_IMPORT_CONCURRENCY = 8;
|
|
6
|
-
export type TranscriptState = {
|
|
7
|
-
harness: Harness;
|
|
8
|
-
path: string;
|
|
9
|
-
nativeSessionId: string;
|
|
10
|
-
cwd: string;
|
|
11
|
-
threadKind: "user" | "internal" | "spawned";
|
|
12
|
-
size: number;
|
|
13
|
-
mtimeMs: number;
|
|
14
|
-
ino: number;
|
|
15
|
-
scannedBytes: number;
|
|
16
|
-
throughTurnKey: string | null;
|
|
17
|
-
throughTurnId: string | null;
|
|
18
|
-
sessionId: string | null;
|
|
19
|
-
runningTurnId: string | null;
|
|
20
|
-
runningTurnKey: string | null;
|
|
21
|
-
headTurnId: string | null;
|
|
22
|
-
origin: "cohub" | "native";
|
|
23
|
-
controllable?: boolean;
|
|
24
|
-
/** The Turn Cohub is running in this file, for formats that cannot mark it; kept across a crash. */
|
|
25
|
-
executingTurnId?: string | null;
|
|
26
|
-
};
|
|
27
|
-
export type ImportFilter = {
|
|
28
|
-
harnesses?: Harness[];
|
|
29
|
-
nativeSessionId?: string;
|
|
30
|
-
};
|
|
31
|
-
/** A backfill of conversations that predate sync. Persisted so a restart resumes it. */
|
|
32
|
-
export type ImportJob = {
|
|
33
|
-
state: "idle" | "running" | "paused" | "done";
|
|
34
|
-
filter: ImportFilter;
|
|
35
|
-
concurrency: number;
|
|
36
|
-
files: number;
|
|
37
|
-
done: number;
|
|
38
|
-
turns: number;
|
|
39
|
-
bytes: number;
|
|
40
|
-
totalBytes: number;
|
|
41
|
-
startedAt: string | null;
|
|
42
|
-
failed: Array<{
|
|
43
|
-
path: string;
|
|
44
|
-
message: string;
|
|
45
|
-
}>;
|
|
46
|
-
};
|
|
47
|
-
export type IngestTransport = {
|
|
48
|
-
ingest(event: Extract<NativeRuntimeEvent, {
|
|
49
|
-
type: "ingest";
|
|
50
|
-
}>, options?: {
|
|
51
|
-
signal?: AbortSignal;
|
|
52
|
-
}): Promise<NativeIngestResult>;
|
|
53
|
-
known(turnIds: string[], options?: {
|
|
54
|
-
signal?: AbortSignal;
|
|
55
|
-
}): Promise<Array<{
|
|
56
|
-
turnId: string;
|
|
57
|
-
sessionId: string;
|
|
58
|
-
settled: boolean;
|
|
59
|
-
}>>;
|
|
60
|
-
progress(event: Extract<NativeRuntimeEvent, {
|
|
61
|
-
type: "progress";
|
|
62
|
-
}>, options?: {
|
|
63
|
-
signal?: AbortSignal;
|
|
64
|
-
}): Promise<{
|
|
65
|
-
accepted?: boolean;
|
|
66
|
-
resync?: boolean;
|
|
67
|
-
} | unknown>;
|
|
68
|
-
status(sessionId: string, turnId: string, controllable?: boolean, options?: {
|
|
69
|
-
signal?: AbortSignal;
|
|
70
|
-
}): Promise<{
|
|
71
|
-
abortRequested: boolean;
|
|
72
|
-
status?: string;
|
|
73
|
-
}>;
|
|
74
|
-
};
|
|
75
|
-
export type IngestHooks = {
|
|
76
|
-
/**
|
|
77
|
-
* Control-plane certainty about a session's file as last written at `mtimeMs`: `true` when the
|
|
78
|
-
* agent settled after that write, `false` while it runs, `null` when the control plane cannot
|
|
79
|
-
* tell.
|
|
80
|
-
*/
|
|
81
|
-
settled?: (state: TranscriptState, mtimeMs: number) => boolean | null;
|
|
82
|
-
controllable?: (state: TranscriptState) => boolean;
|
|
83
|
-
abortTurn?: (state: TranscriptState) => void;
|
|
84
|
-
onGrowth?: (state: TranscriptState) => void;
|
|
85
|
-
onRunning?: (state: TranscriptState, turnId: string | null) => void;
|
|
86
|
-
onError?: (error: unknown, context: {
|
|
87
|
-
path: string;
|
|
88
|
-
harness: Harness;
|
|
89
|
-
}) => void;
|
|
90
|
-
};
|
|
91
|
-
/** A transcript on disk that may belong to the bound directory. */
|
|
92
|
-
export type NativeCandidate = {
|
|
93
|
-
harness: Harness;
|
|
94
|
-
path: string;
|
|
95
|
-
size: number;
|
|
96
|
-
mtimeMs: number;
|
|
97
|
-
ino: number;
|
|
98
|
-
};
|
|
99
|
-
/** Whether a session in `cwd` belongs to the directory bound at `root`. */
|
|
100
|
-
export declare const owns: (root: string, cwd: string, nested?: readonly string[]) => boolean;
|
|
101
|
-
/** Every transcript of the bound directory and its subdirectories, newest first. */
|
|
102
|
-
export declare function discoverTranscripts(cwd: string, harnesses: Harness[], options?: {
|
|
103
|
-
headers?: boolean;
|
|
104
|
-
nested?: readonly string[];
|
|
105
|
-
signal?: AbortSignal;
|
|
106
|
-
}): Promise<Array<NativeCandidate & {
|
|
107
|
-
nativeSessionId?: string;
|
|
108
|
-
}>>;
|
|
109
|
-
/**
|
|
110
|
-
* The daemon's data plane. A harness's transcript is both the durable record of a conversation and
|
|
111
|
-
* the local outbox.
|
|
112
|
-
*/
|
|
113
|
-
export declare class NativeIngest {
|
|
114
|
-
private readonly options;
|
|
115
|
-
private readonly states;
|
|
116
|
-
private readonly live;
|
|
117
|
-
private readonly busy;
|
|
118
|
-
private readonly reads;
|
|
119
|
-
private readonly timers;
|
|
120
|
-
private readonly failures;
|
|
121
|
-
/** File versions that hit a size limit; they are not read again until the file changes. */
|
|
122
|
-
private readonly oversized;
|
|
123
|
-
private readonly aliveAt;
|
|
124
|
-
private readonly runningPaths;
|
|
125
|
-
/** Files a live Cohub execution is writing in a format that cannot mark its Turn. */
|
|
126
|
-
private readonly executing;
|
|
127
|
-
private writing;
|
|
128
|
-
private readonly foreign;
|
|
129
|
-
private importQueue;
|
|
130
|
-
private runningLive;
|
|
131
|
-
private runningImport;
|
|
132
|
-
private job;
|
|
133
|
-
private stopped;
|
|
134
|
-
private readonly dirty;
|
|
135
|
-
private jobDirty;
|
|
136
|
-
private journalLines;
|
|
137
|
-
private writeTimer;
|
|
138
|
-
private readonly watchers;
|
|
139
|
-
private transport;
|
|
140
|
-
private harnesses;
|
|
141
|
-
private enabledAt;
|
|
142
|
-
private watching;
|
|
143
|
-
private nested;
|
|
144
|
-
constructor(options: {
|
|
145
|
-
spaceId: string;
|
|
146
|
-
cwd: string;
|
|
147
|
-
harnesses: Harness[];
|
|
148
|
-
enabledAt: string;
|
|
149
|
-
root: string;
|
|
150
|
-
archives: RuntimeArchiveStore;
|
|
151
|
-
hooks?: IngestHooks;
|
|
152
|
-
});
|
|
153
|
-
owns(cwd: string): boolean;
|
|
154
|
-
exclude(nested: string[]): void;
|
|
155
|
-
configure(harnesses: Harness[], enabledAt: string): void;
|
|
156
|
-
private get ledgerPath();
|
|
157
|
-
load(): Promise<void>;
|
|
158
|
-
connect(transport: IngestTransport | null): void;
|
|
159
|
-
/**
|
|
160
|
-
* Record that Cohub created or chose this transcript for a Session, before any Turn of it runs.
|
|
161
|
-
* `through` says the server has the file's Turns up to `turnKey` (none when null) and `turnId` heads them.
|
|
162
|
-
*/
|
|
163
|
-
adopt(session: {
|
|
164
|
-
harness: Harness;
|
|
165
|
-
path: string;
|
|
166
|
-
nativeSessionId: string;
|
|
167
|
-
cwd: string;
|
|
168
|
-
}, sessionId: string, through?: {
|
|
169
|
-
turnKey: string | null;
|
|
170
|
-
turnId: string | null;
|
|
171
|
-
}): void;
|
|
172
|
-
/** A Cohub Turn starts writing this file; a format that cannot mark it is not read until it ends. */
|
|
173
|
-
begin(session: {
|
|
174
|
-
harness: Harness;
|
|
175
|
-
path: string;
|
|
176
|
-
nativeSessionId: string;
|
|
177
|
-
cwd: string;
|
|
178
|
-
}, sessionId: string, turnId: string): void;
|
|
179
|
-
/** A Cohub Turn ended, whether or not it produced a result. */
|
|
180
|
-
end(turnId: string): void;
|
|
181
|
-
advance(path: string, turnId: string): void;
|
|
182
|
-
touch(path: string): void;
|
|
183
|
-
running(harness: Harness, nativeSessionId: string): TranscriptState | null;
|
|
184
|
-
stop(sessionId: string, turnId: string): boolean;
|
|
185
|
-
alive(harness: Harness, nativeSessionId: string): void;
|
|
186
|
-
/**
|
|
187
|
-
* A native client came or went, so whether Cohub can stop this session's running Turn may have
|
|
188
|
-
* changed.
|
|
189
|
-
*/
|
|
190
|
-
controlChanged(harness: Harness, nativeSessionId: string): void;
|
|
191
|
-
status(): {
|
|
192
|
-
transcripts: number;
|
|
193
|
-
live: number;
|
|
194
|
-
running: number;
|
|
195
|
-
import: {
|
|
196
|
-
state: "idle" | "running" | "paused" | "done";
|
|
197
|
-
filter: ImportFilter;
|
|
198
|
-
concurrency: number;
|
|
199
|
-
files: number;
|
|
200
|
-
done: number;
|
|
201
|
-
turns: number;
|
|
202
|
-
bytes: number;
|
|
203
|
-
totalBytes: number;
|
|
204
|
-
startedAt: string | null;
|
|
205
|
-
failed: Array<{
|
|
206
|
-
path: string;
|
|
207
|
-
message: string;
|
|
208
|
-
}>;
|
|
209
|
-
queued: number;
|
|
210
|
-
running: number;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
transcriptFor(sessionId: string, harness: Harness, headTurnId: string | null): TranscriptState | null;
|
|
214
|
-
scan(): Promise<void>;
|
|
215
|
-
/** `resume` is automatic resumption: it skips file versions that already hit a size limit, which only an explicit import retries. */
|
|
216
|
-
plan(filter?: ImportFilter, signal?: AbortSignal, options?: {
|
|
217
|
-
resume?: boolean;
|
|
218
|
-
}): Promise<Array<NativeCandidate & {
|
|
219
|
-
nativeSessionId?: string;
|
|
220
|
-
}>>;
|
|
221
|
-
/**
|
|
222
|
-
* Start or resume a backfill. What was imported is tracked, so resuming simply plans again; the
|
|
223
|
-
* server recognizes any Turn it already has, so an interrupted batch is never duplicated.
|
|
224
|
-
*/
|
|
225
|
-
startImport(filter?: ImportFilter, concurrency?: number, options?: {
|
|
226
|
-
resume?: boolean;
|
|
227
|
-
}): Promise<ImportJob>;
|
|
228
|
-
pauseImport(): ImportJob;
|
|
229
|
-
watch(signal: AbortSignal): Promise<void>;
|
|
230
|
-
private watchHarness;
|
|
231
|
-
private resync;
|
|
232
|
-
private reportControl;
|
|
233
|
-
close(signal: AbortSignal): Promise<void>;
|
|
234
|
-
private unchanged;
|
|
235
|
-
private drainLive;
|
|
236
|
-
private retryLater;
|
|
237
|
-
private drainImport;
|
|
238
|
-
private report;
|
|
239
|
-
private sync;
|
|
240
|
-
private read;
|
|
241
|
-
private readVersion;
|
|
242
|
-
private crossesBoundary;
|
|
243
|
-
private blank;
|
|
244
|
-
private harnessFor;
|
|
245
|
-
private tailSettled;
|
|
246
|
-
private recheck;
|
|
247
|
-
private known;
|
|
248
|
-
private apply;
|
|
249
|
-
private markRunning;
|
|
250
|
-
private endRunning;
|
|
251
|
-
private cutOff;
|
|
252
|
-
private imported;
|
|
253
|
-
private archive;
|
|
254
|
-
private message;
|
|
255
|
-
private complete;
|
|
256
|
-
private markDirty;
|
|
257
|
-
private markJobDirty;
|
|
258
|
-
private scheduleWrite;
|
|
259
|
-
private write;
|
|
260
|
-
private append;
|
|
261
|
-
private overgrown;
|
|
262
|
-
private compact;
|
|
263
|
-
}
|