arco-workbench 0.1.3 → 0.1.4
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/CONTRIBUTING.md +1 -1
- package/README.md +5 -1
- package/client/dist/assets/{PhosphorBackdrop-CkVIGkeX.js → PhosphorBackdrop-CNumba2X.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-DHF7CnpE.js → ThemedBackgroundShaderImpl-DX5KyCt3.js} +1 -1
- package/client/dist/assets/{XtermView-SY0UcZUS.js → XtermView-DhS5g8Rt.js} +1 -1
- package/client/dist/assets/{galleryEditor-Ca4F8HiM.js → galleryEditor-fPb76Cjv.js} +1 -1
- package/client/dist/assets/index-CjkHb-_n.js +592 -0
- package/client/dist/assets/index-DIbh3ae5.css +1 -0
- package/client/dist/index.html +2 -2
- package/client/src/App.tsx +2 -0
- package/client/src/alerts/desktopAlerts.ts +13 -1
- package/client/src/brief/briefFacts.ts +22 -0
- package/client/src/brief/briefFromStore.ts +7 -2
- package/client/src/components/ArtifactMoveDialog.tsx +64 -0
- package/client/src/components/BriefControl.tsx +38 -47
- package/client/src/components/CatchMeUp.tsx +25 -25
- package/client/src/components/CheckpointActions.tsx +7 -4
- package/client/src/components/ClusterComposerButtons.tsx +6 -3
- package/client/src/components/ClusterPlanTab.tsx +15 -1
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +6 -2
- package/client/src/components/ClusterTab.tsx +33 -3
- package/client/src/components/ClusterTaskBoardTab.tsx +62 -8
- package/client/src/components/DialogShell.tsx +115 -0
- package/client/src/components/DocsUpdateDialog.tsx +16 -42
- package/client/src/components/ForwardMessages.tsx +28 -32
- package/client/src/components/GitDialog.tsx +52 -52
- package/client/src/components/GitOtherWork.tsx +4 -2
- package/client/src/components/HandoffDialog.tsx +19 -45
- package/client/src/components/Home/HomeView.tsx +36 -8
- package/client/src/components/Home/home.css +7 -0
- package/client/src/components/KeepButton.tsx +23 -0
- package/client/src/components/MdTuneupDialog.tsx +52 -51
- package/client/src/components/MemberCard.tsx +4 -1
- package/client/src/components/MemberPane.tsx +1 -1
- package/client/src/components/NotificationCenter.tsx +4 -3
- package/client/src/components/NotificationChannelsSettings.tsx +25 -7
- package/client/src/components/PlanCandidateBanner.tsx +111 -57
- package/client/src/components/PlanComposerDialog.tsx +55 -87
- package/client/src/components/ProjectStateNotice.tsx +60 -0
- package/client/src/components/PublicProjectBox.tsx +25 -0
- package/client/src/components/ResearchDialog.tsx +15 -24
- package/client/src/components/ReviewDialog.tsx +32 -57
- package/client/src/components/RightPanel/OutputsPanel.tsx +4 -0
- package/client/src/components/RightPanel/PlanTab.tsx +24 -2
- package/client/src/components/RightPanel/UsageTab.tsx +77 -1
- package/client/src/components/SkillEditorDialog.tsx +38 -73
- package/client/src/components/SpawnDialog.tsx +19 -41
- package/client/src/components/StorageWarnings.tsx +21 -0
- package/client/src/components/SystemHeader.tsx +2 -2
- package/client/src/components/TerminalInput.tsx +6 -2
- package/client/src/components/TidyComposer.tsx +24 -41
- package/client/src/components/TranscriptSendDialog.tsx +151 -202
- package/client/src/components/UtilityAgentPicker.tsx +4 -2
- package/client/src/components/WorkflowCreator/index.tsx +2 -0
- package/client/src/components/WorkflowView.tsx +4 -1
- package/client/src/components/clusterNeedsYou.ts +35 -3
- package/client/src/components/compare/CompareDialog.tsx +26 -2
- package/client/src/components/terminalInput/planDraft.ts +33 -4
- package/client/src/components/utilityResult.ts +5 -1
- package/client/src/explorer/ExplorerApp.tsx +5 -2
- package/client/src/explorer/PlansLens.tsx +60 -19
- package/client/src/explorer/StorageLens.tsx +275 -0
- package/client/src/explorer/launch.ts +3 -3
- package/client/src/explorer/plansGrouping.ts +15 -0
- package/client/src/help/content/cluster.tsx +42 -7
- package/client/src/help/content/composer.tsx +26 -6
- package/client/src/help/content/header.tsx +16 -14
- package/client/src/help/content/misc.tsx +141 -6
- package/client/src/help/content/rightPanel.tsx +16 -0
- package/client/src/help/content/settings.tsx +4 -4
- package/client/src/help/manualSections/actions.tsx +19 -4
- package/client/src/help/manualSections/clusters.tsx +29 -16
- package/client/src/help/manualSections/configuration.tsx +6 -4
- package/client/src/help/manualSections/maintenance.tsx +27 -5
- package/client/src/help/manualSections/plans.tsx +96 -2
- package/client/src/help/manualSections/powerFeatures.tsx +2 -2
- package/client/src/help/manualSections/reference.tsx +6 -0
- package/client/src/help/manualSections/workspace.tsx +9 -5
- package/client/src/stores/appStore.ts +10 -1
- package/client/src/stores/appStore.types.ts +2 -0
- package/client/src/stores/mdTuneupStore.ts +5 -4
- package/client/src/stores/memoryTrim.ts +18 -2
- package/client/src/stores/storageWarningStore.ts +18 -0
- package/client/src/utils/gitDialogMemory.ts +26 -0
- package/client/src/utils/historyEvents.ts +1 -0
- package/client/src/utils/homeModel.ts +19 -0
- package/client/src/utils/publicProject.ts +56 -0
- package/client/src/ws/handleServerMessage.ts +7 -2
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CHECKPOINTS.md +2 -0
- package/docs/CLIENT.md +29 -11
- package/docs/FEATURES.md +14 -11
- package/docs/GETTING_STARTED.md +7 -7
- package/docs/GLOSSARY.md +3 -3
- package/docs/GOTCHAS.md +3 -2
- package/docs/HTTP_API.md +31 -1
- package/docs/NOTIFICATIONS.md +13 -14
- package/docs/OPERATIONS.md +27 -1
- package/docs/OPERATOR_ACTIONS.md +1 -1
- package/docs/OUTPUTS.md +9 -0
- package/docs/PERSISTENCE.md +34 -4
- package/docs/PLAN_OR_BOARD.md +7 -0
- package/docs/PRIMITIVES.md +3 -3
- package/docs/PROTOCOL.md +14 -4
- package/docs/PROTOCOL_CLUSTER.md +3 -2
- package/docs/SERVICE_MODE.md +5 -1
- package/docs/SETTINGS.md +8 -6
- package/docs/STORAGE_PLAN.md +324 -0
- package/docs/TASK_LEDGER.md +5 -4
- package/native/linux-arm64/manifest.json +1 -1
- package/node_modules/@arco/shared/dist/index.d.ts +2 -0
- package/node_modules/@arco/shared/dist/index.js +2 -0
- package/node_modules/@arco/shared/dist/protocol/autoPickup.d.ts +1 -1
- package/node_modules/@arco/shared/dist/protocol/autoPickup.js +1 -1
- package/node_modules/@arco/shared/dist/protocol/checkpoints.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
- package/node_modules/@arco/shared/dist/protocol/mdTuneup.d.ts +6 -0
- package/node_modules/@arco/shared/dist/protocol/notifications.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/notifications.js +3 -2
- package/node_modules/@arco/shared/dist/protocol/plans.d.ts +2 -0
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/storage.d.ts +21 -0
- package/node_modules/@arco/shared/dist/protocol/storage.js +3 -0
- package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +3 -0
- package/node_modules/@arco/shared/dist/protocol/utilityAgent.d.ts +2 -2
- package/node_modules/@arco/shared/dist/protocol/utilityAgent.js +2 -2
- package/node_modules/@arco/shared/dist/publicGuardrails.d.ts +7 -0
- package/node_modules/@arco/shared/dist/publicGuardrails.js +47 -0
- package/node_modules/@arco/shared/dist/publicSafetyRules.d.ts +1 -0
- package/node_modules/@arco/shared/dist/publicSafetyRules.js +6 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +3 -2
- package/scripts/packaging/arco.mjs +17 -1
- package/scripts/packaging/services.mjs +35 -5
- package/scripts/packaging/storage.mjs +125 -0
- package/scripts/packaging/update.mjs +3 -3
- package/server/dist/artifactCopy.d.ts +26 -0
- package/server/dist/artifactCopy.js +398 -0
- package/server/dist/atomicFile.d.ts +1 -0
- package/server/dist/atomicFile.js +1 -1
- package/server/dist/attention.d.ts +1 -1
- package/server/dist/attention.js +10 -13
- package/server/dist/catchUp.d.ts +2 -0
- package/server/dist/catchUp.js +46 -23
- package/server/dist/clusterPeerOps.d.ts +2 -0
- package/server/dist/clusterPeerOps.js +2 -0
- package/server/dist/clusterSnapshots.js +22 -12
- package/server/dist/eventLog.d.ts +55 -0
- package/server/dist/eventLog.js +792 -0
- package/server/dist/explorerLaunch.d.ts +4 -1
- package/server/dist/explorerLaunch.js +3 -2
- package/server/dist/explorerPlans.d.ts +4 -0
- package/server/dist/explorerPlans.js +27 -2
- package/server/dist/http/clusterRoutes.js +2 -0
- package/server/dist/http/explorerRoutes.js +2 -1
- package/server/dist/http/publicProjectRoutes.d.ts +2 -0
- package/server/dist/http/publicProjectRoutes.js +68 -0
- package/server/dist/http/router.js +6 -0
- package/server/dist/http/storageRoutes.d.ts +2 -0
- package/server/dist/http/storageRoutes.js +254 -0
- package/server/dist/http/usageStatsRoutes.js +3 -12
- package/server/dist/index.js +4 -0
- package/server/dist/keepStore.d.ts +16 -0
- package/server/dist/keepStore.js +119 -0
- package/server/dist/management/clusterActivity.js +6 -20
- package/server/dist/management/initHubLink.js +10 -43
- package/server/dist/mcp/clusterMcpTools.js +8 -1
- package/server/dist/notifications.d.ts +3 -1
- package/server/dist/notifications.js +5 -4
- package/server/dist/outputStore.d.ts +1 -0
- package/server/dist/outputStore.js +1 -1
- package/server/dist/outputs.js +39 -8
- package/server/dist/planHistory.d.ts +3 -0
- package/server/dist/planHistory.js +60 -0
- package/server/dist/primitives/runMdTuneup.d.ts +5 -1
- package/server/dist/primitives/runMdTuneup.js +43 -2
- package/server/dist/project/taskLedger.d.ts +4 -0
- package/server/dist/project/taskLedger.js +19 -0
- package/server/dist/providers/claude-native/peerTools.js +4 -0
- package/server/dist/providers/claude-native/resumeSummary.js +30 -19
- package/server/dist/providers/index.js +8 -13
- package/server/dist/providers/localProviderQueue.d.ts +2 -0
- package/server/dist/providers/localProviderQueue.js +11 -0
- package/server/dist/publicProject.d.ts +54 -0
- package/server/dist/publicProject.js +135 -0
- package/server/dist/recall/index.js +22 -23
- package/server/dist/server/broadcast.d.ts +2 -1
- package/server/dist/server/broadcast.js +56 -1
- package/server/dist/smartPickupAdapters.d.ts +7 -0
- package/server/dist/smartPickupAdapters.js +172 -8
- package/server/dist/storageActions.d.ts +50 -0
- package/server/dist/storageActions.js +326 -0
- package/server/dist/storageArchive.d.ts +24 -0
- package/server/dist/storageArchive.js +358 -0
- package/server/dist/storageOverview.d.ts +47 -0
- package/server/dist/storageOverview.js +197 -0
- package/server/dist/storageReport.d.ts +48 -0
- package/server/dist/storageReport.js +185 -0
- package/server/dist/storageWarnings.d.ts +4 -0
- package/server/dist/storageWarnings.js +96 -0
- package/server/dist/workers/limits.js +4 -1
- package/server/dist/workflowStore.d.ts +2 -0
- package/server/dist/workflowStore.js +88 -72
- package/server/dist/workflows/purgeWorkflow.d.ts +1 -0
- package/server/dist/workflows/purgeWorkflow.js +15 -2
- package/server/dist/workflows/sessionDiscovery.js +5 -17
- package/server/dist/workflows/sessionIndex.js +22 -17
- package/server/dist/ws/taskLedgerHandlers.js +8 -3
- package/server/dist/ws/workflowHandlers.js +5 -4
- package/server/package.json +1 -1
- package/server/src/artifactCopy.ts +254 -0
- package/server/src/atomicFile.ts +1 -1
- package/server/src/attention.ts +9 -10
- package/server/src/catchUp.ts +37 -15
- package/server/src/clusterPeerOps.ts +5 -0
- package/server/src/clusterSnapshots.ts +20 -13
- package/server/src/eventLog.ts +571 -0
- package/server/src/explorerLaunch.ts +3 -2
- package/server/src/explorerPlans.ts +22 -2
- package/server/src/http/clusterRoutes.ts +4 -1
- package/server/src/http/explorerRoutes.ts +2 -1
- package/server/src/http/publicProjectRoutes.ts +54 -0
- package/server/src/http/router.ts +4 -0
- package/server/src/http/storageRoutes.ts +187 -0
- package/server/src/http/usageStatsRoutes.ts +3 -11
- package/server/src/index.ts +4 -0
- package/server/src/keepStore.ts +102 -0
- package/server/src/management/clusterActivity.ts +6 -16
- package/server/src/management/initHubLink.ts +10 -39
- package/server/src/mcp/clusterMcpTools.ts +8 -2
- package/server/src/notifications.ts +4 -3
- package/server/src/outputStore.ts +5 -2
- package/server/src/outputs.ts +30 -6
- package/server/src/planHistory.ts +48 -0
- package/server/src/primitives/runMdTuneup.ts +32 -2
- package/server/src/project/taskLedger.ts +20 -0
- package/server/src/providers/claude-native/peerTools.ts +4 -0
- package/server/src/providers/claude-native/resumeSummary.ts +32 -18
- package/server/src/providers/index.ts +2 -16
- package/server/src/providers/localProviderQueue.ts +13 -0
- package/server/src/publicProject.ts +142 -0
- package/server/src/recall/index.ts +4 -9
- package/server/src/server/broadcast.ts +53 -1
- package/server/src/smartPickupAdapters.ts +128 -5
- package/server/src/storageActions.ts +216 -0
- package/server/src/storageArchive.ts +277 -0
- package/server/src/storageOverview.ts +184 -0
- package/server/src/storageReport.ts +210 -0
- package/server/src/storageWarnings.ts +84 -0
- package/server/src/workers/limits.ts +4 -1
- package/server/src/workflowStore.ts +78 -61
- package/server/src/workflows/purgeWorkflow.ts +12 -3
- package/server/src/workflows/sessionDiscovery.ts +5 -13
- package/server/src/workflows/sessionIndex.ts +5 -9
- package/server/src/ws/taskLedgerHandlers.ts +8 -3
- package/server/src/ws/workflowHandlers.ts +5 -4
- package/shared/dist/index.d.ts +2 -0
- package/shared/dist/index.js +2 -0
- package/shared/dist/protocol/autoPickup.d.ts +1 -1
- package/shared/dist/protocol/autoPickup.js +1 -1
- package/shared/dist/protocol/checkpoints.d.ts +1 -0
- package/shared/dist/protocol/clusters.d.ts +2 -1
- package/shared/dist/protocol/index.d.ts +1 -0
- package/shared/dist/protocol/index.js +1 -0
- package/shared/dist/protocol/mdTuneup.d.ts +6 -0
- package/shared/dist/protocol/notifications.d.ts +2 -1
- package/shared/dist/protocol/notifications.js +3 -2
- package/shared/dist/protocol/plans.d.ts +2 -0
- package/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/shared/dist/protocol/storage.d.ts +21 -0
- package/shared/dist/protocol/storage.js +3 -0
- package/shared/dist/protocol/tasks.d.ts +3 -0
- package/shared/dist/protocol/utilityAgent.d.ts +2 -2
- package/shared/dist/protocol/utilityAgent.js +2 -2
- package/shared/dist/publicGuardrails.d.ts +7 -0
- package/shared/dist/publicGuardrails.js +47 -0
- package/shared/dist/publicSafetyRules.d.ts +1 -0
- package/shared/dist/publicSafetyRules.js +6 -0
- package/shared/src/index.ts +3 -0
- package/shared/src/protocol/autoPickup.ts +1 -1
- package/shared/src/protocol/checkpoints.ts +4 -0
- package/shared/src/protocol/clusters.ts +6 -1
- package/shared/src/protocol/index.ts +1 -0
- package/shared/src/protocol/mdTuneup.ts +5 -0
- package/shared/src/protocol/notifications.ts +6 -2
- package/shared/src/protocol/plans.ts +2 -0
- package/shared/src/protocol/serverMessages.ts +2 -0
- package/shared/src/protocol/storage.ts +35 -0
- package/shared/src/protocol/tasks.ts +6 -0
- package/shared/src/protocol/utilityAgent.ts +2 -2
- package/shared/src/publicGuardrails.ts +50 -0
- package/shared/src/publicSafetyRules.ts +5 -0
- package/client/dist/assets/index-CcNtMA2y.js +0 -546
- package/client/dist/assets/index-Dl8tYsSp.css +0 -1
|
@@ -41,6 +41,7 @@ import { readClusterPlan } from './clusterPlanBridge.js';
|
|
|
41
41
|
import { rememberCwd } from './crashRecovery.js';
|
|
42
42
|
import { atomicWriteFile } from './atomicFile.js';
|
|
43
43
|
import { arcoHome } from './arcoHome.js';
|
|
44
|
+
import { listSegments, readLogText } from './eventLog.js';
|
|
44
45
|
const NAME_MAX = 64;
|
|
45
46
|
const MAX_SNAPSHOTS = 100;
|
|
46
47
|
// Per-member events.jsonl cap. Save reads the whole log into a string and
|
|
@@ -264,6 +265,9 @@ function portableWorkflowMeta(input) {
|
|
|
264
265
|
// Snapshot the live cluster. Reads the in-memory/on-disk ClusterState, flushes
|
|
265
266
|
// each member's event buffer (so the copy captures the latest events), then
|
|
266
267
|
// copies each member's meta.json + events.jsonl into the snapshot dir.
|
|
268
|
+
function memberLogTooLarge(wfid, bytes) {
|
|
269
|
+
return new SnapshotValidationError('member_log_too_large', `member ${wfid.slice(0, 8)} events.jsonl is ${Math.round(bytes / (1024 * 1024))}MB, over the ${MAX_MEMBER_EVENTS_BYTES / (1024 * 1024)}MB snapshot cap`);
|
|
270
|
+
}
|
|
267
271
|
export async function saveSnapshot(input) {
|
|
268
272
|
const name = validateName(input.name);
|
|
269
273
|
const cluster = await clusterStore.readCluster(input.clusterId);
|
|
@@ -308,21 +312,27 @@ export async function saveSnapshot(input) {
|
|
|
308
312
|
const destDir = path.join(tempDir, 'members', oldWfid);
|
|
309
313
|
await fs.mkdir(destDir, { recursive: true });
|
|
310
314
|
await fs.writeFile(path.join(destDir, 'meta.json'), JSON.stringify(portableWorkflowMeta(meta), null, 2) + '\n', 'utf8');
|
|
311
|
-
|
|
315
|
+
// The whole history, sealed segments included (P7.3); the snapshot
|
|
316
|
+
// keeps one plain log per member, so the cap applies to the plain text.
|
|
317
|
+
const srcDir = path.join(cwd, '.arco', 'workflows', oldWfid);
|
|
312
318
|
let eventsText = '';
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
319
|
+
let eventsBytes = 0;
|
|
320
|
+
const sealed = await listSegments(srcDir);
|
|
321
|
+
if (!sealed.length) {
|
|
322
|
+
try {
|
|
323
|
+
eventsBytes = (await fs.stat(path.join(srcDir, 'events.jsonl'))).size;
|
|
324
|
+
}
|
|
325
|
+
catch (err) {
|
|
326
|
+
if (err.code !== 'ENOENT')
|
|
327
|
+
throw err;
|
|
317
328
|
}
|
|
318
|
-
eventsText = await fs.readFile(srcEvents, 'utf8');
|
|
319
|
-
}
|
|
320
|
-
catch (err) {
|
|
321
|
-
if (err instanceof SnapshotValidationError)
|
|
322
|
-
throw err;
|
|
323
|
-
if (err.code !== 'ENOENT')
|
|
324
|
-
throw err;
|
|
325
329
|
}
|
|
330
|
+
if (eventsBytes > MAX_MEMBER_EVENTS_BYTES)
|
|
331
|
+
throw memberLogTooLarge(oldWfid, eventsBytes);
|
|
332
|
+
eventsText = await readLogText(srcDir);
|
|
333
|
+
eventsBytes = Buffer.byteLength(eventsText);
|
|
334
|
+
if (eventsBytes > MAX_MEMBER_EVENTS_BYTES)
|
|
335
|
+
throw memberLogTooLarge(oldWfid, eventsBytes);
|
|
326
336
|
await fs.writeFile(path.join(destDir, 'events.jsonl'), eventsText, 'utf8');
|
|
327
337
|
members.push({
|
|
328
338
|
oldWorkflowId: oldWfid,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const LIVE_LOG = "events.jsonl";
|
|
2
|
+
export declare const FORMAT_FILE = "log-format.json";
|
|
3
|
+
export declare const LOG_FORMAT = 2;
|
|
4
|
+
export declare const DEFAULT_SEAL_BYTES: number;
|
|
5
|
+
export declare function sealThresholdBytes(): number;
|
|
6
|
+
export interface Segment {
|
|
7
|
+
name: string;
|
|
8
|
+
file: string;
|
|
9
|
+
firstSeq: number;
|
|
10
|
+
lastSeq: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function segmentName(firstSeq: number, lastSeq: number): string;
|
|
13
|
+
export declare function listSegments(dir: string): Promise<Segment[]>;
|
|
14
|
+
export declare function listSegmentsSync(dir: string): Segment[];
|
|
15
|
+
export declare function lineSeq(line: string): number | null;
|
|
16
|
+
export declare function segmentTextMatches(seg: Pick<Segment, 'firstSeq' | 'lastSeq'>, text: string): boolean;
|
|
17
|
+
export declare function segmentIsSound(seg: Segment): Promise<boolean>;
|
|
18
|
+
export declare function segmentIsSoundSync(seg: Segment): boolean;
|
|
19
|
+
export declare class SegmentReadError extends Error {
|
|
20
|
+
readonly file: string;
|
|
21
|
+
constructor(file: string, cause: unknown);
|
|
22
|
+
}
|
|
23
|
+
export declare function readLogLines(dir: string, opts?: {
|
|
24
|
+
fromSeq?: number;
|
|
25
|
+
}): AsyncGenerator<string>;
|
|
26
|
+
export declare function readLogText(dir: string): Promise<string>;
|
|
27
|
+
export declare function readLogTextSync(dir: string): string;
|
|
28
|
+
export declare function readLogTail(dir: string, maxBytes: number): Promise<{
|
|
29
|
+
text: string;
|
|
30
|
+
truncated: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function readLogTailSync(dir: string, maxBytes: number): {
|
|
33
|
+
text: string;
|
|
34
|
+
truncated: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare function readLogHeadSync(dir: string, maxBytes: number): string;
|
|
37
|
+
export declare function sealedThroughSeq(dir: string): Promise<number>;
|
|
38
|
+
export declare function highestNamedSeq(dir: string): Promise<number>;
|
|
39
|
+
export declare function firstSealedSeq(dir: string): Promise<number | null>;
|
|
40
|
+
export declare function readLogFormat(dir: string): Promise<number>;
|
|
41
|
+
export interface SealResult {
|
|
42
|
+
segments: string[];
|
|
43
|
+
sealedRecords: number;
|
|
44
|
+
liveBytes: number;
|
|
45
|
+
movedAside: string[];
|
|
46
|
+
liveReplaced: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare const sealTestHooks: {
|
|
49
|
+
beforeLiveReplace?: () => Promise<void>;
|
|
50
|
+
};
|
|
51
|
+
export declare function sealLiveLog(dir: string, segmentBytes?: number): Promise<SealResult | null>;
|
|
52
|
+
export declare function unsealLog(dir: string): Promise<{
|
|
53
|
+
records: number;
|
|
54
|
+
segments: number;
|
|
55
|
+
} | null>;
|