@botiverse/raft-computer 0.0.63 → 0.0.64
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/lib/index.d.ts +33 -6
- package/package.json +5 -5
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Tracer } from '@slock-ai/shared';
|
|
2
|
-
import { TraceClientSource } from '@slock-ai/trace-client';
|
|
3
|
-
|
|
4
1
|
declare class ComputerError extends Error {
|
|
5
2
|
readonly code: string;
|
|
6
3
|
readonly exitCode: number;
|
|
@@ -496,6 +493,36 @@ type MigrationDetection = {
|
|
|
496
493
|
kind: "server-unavailable";
|
|
497
494
|
};
|
|
498
495
|
|
|
496
|
+
type ComputerTraceSurface = "server" | "daemon" | "web" | "computer";
|
|
497
|
+
type ComputerTraceSpanKind = "server" | "client" | "internal" | "producer" | "consumer";
|
|
498
|
+
type ComputerTraceStatus = "ok" | "error" | "cancelled";
|
|
499
|
+
type ComputerTraceAttributes = Record<string, unknown>;
|
|
500
|
+
type ComputerTraceClientSource = "daemon" | "computer.cli" | "computer.menu-bar";
|
|
501
|
+
interface ComputerTraceContext {
|
|
502
|
+
traceId: string;
|
|
503
|
+
spanId: string;
|
|
504
|
+
parentSpanId: string | null;
|
|
505
|
+
traceFlags: string;
|
|
506
|
+
}
|
|
507
|
+
interface ComputerStartSpanOptions {
|
|
508
|
+
parent?: ComputerTraceContext | null;
|
|
509
|
+
surface: ComputerTraceSurface;
|
|
510
|
+
kind?: ComputerTraceSpanKind;
|
|
511
|
+
attrs?: ComputerTraceAttributes;
|
|
512
|
+
startTimeMs?: number;
|
|
513
|
+
}
|
|
514
|
+
interface ComputerEndSpanOptions {
|
|
515
|
+
attrs?: ComputerTraceAttributes;
|
|
516
|
+
}
|
|
517
|
+
interface ComputerActiveSpan {
|
|
518
|
+
readonly context: ComputerTraceContext;
|
|
519
|
+
addEvent(name: string, attrs?: ComputerTraceAttributes): void;
|
|
520
|
+
end(status?: ComputerTraceStatus, options?: ComputerEndSpanOptions): void;
|
|
521
|
+
}
|
|
522
|
+
interface ComputerTracer {
|
|
523
|
+
startSpan(name: string, options: ComputerStartSpanOptions): ComputerActiveSpan;
|
|
524
|
+
}
|
|
525
|
+
|
|
499
526
|
type ComputerApiEvent = {
|
|
500
527
|
kind: "login.device-code";
|
|
501
528
|
verifyUrl: string;
|
|
@@ -1434,7 +1461,7 @@ interface ComputerApi {
|
|
|
1434
1461
|
* one — so the same lib code attributes correctly across both surfaces.
|
|
1435
1462
|
*/
|
|
1436
1463
|
declare function createComputerApi(slockHome: string, opts?: {
|
|
1437
|
-
tracer?:
|
|
1464
|
+
tracer?: ComputerTracer;
|
|
1438
1465
|
}): ComputerApi;
|
|
1439
1466
|
|
|
1440
1467
|
/**
|
|
@@ -1443,7 +1470,7 @@ declare function createComputerApi(slockHome: string, opts?: {
|
|
|
1443
1470
|
* `<computerDir>/traces/` sink with consistent gating. `SLOCK_COMPUTER_LOCAL_TRACE=0`
|
|
1444
1471
|
* disables (default on, mirrors the daemon); any setup failure falls back to noop.
|
|
1445
1472
|
*/
|
|
1446
|
-
declare function createComputerTracer(slockHome: string, source:
|
|
1473
|
+
declare function createComputerTracer(slockHome: string, source: ComputerTraceClientSource): ComputerTracer;
|
|
1447
1474
|
|
|
1448
1475
|
/**
|
|
1449
1476
|
* Read the Computer-level aggregate status from `installRoot`. Identical
|
|
@@ -1489,4 +1516,4 @@ declare function userSessionPath(slockHome: string): string;
|
|
|
1489
1516
|
|
|
1490
1517
|
declare const COMPUTER_VERSION: string;
|
|
1491
1518
|
|
|
1492
|
-
export { type AttachInput, type AttachResult, COMPUTER_VERSION, type ComputerApi, type ComputerApiEvent, ComputerError, ComputerServiceError, type ComputerStatusReport, type ConnectService, type ConnectServiceOptions, DEFAULT_UPGRADE_BASE_URL, type DaemonState, IPC_ERROR_CODES, type IpcErrorCode, type LegacyMachineCandidate, type LegacyMachineRosterClient, type LegacyMachineRosterEntry, type LegacyMachineRosterResult, LegacyMachinesClient, type ListRunnersResult, type LoginInput, type LoginResult, MIGRATION_DETECTION_KINDS, MIGRATION_FRESH_TRIGGERS, type ManualPathValidation, type MigrationDetection, type MigrationDetectionKind, type MigrationFreshTrigger, type PickerSelection, RUNNER_STATE_VALUES, type RequestMethodMap, type RequestOptions, type ResetRunnerResult, type ResetServiceResult, type RunnerListItem as RunnerInfo, type RunnerListPerServer, type RunnerState, type RunnerStatusResult, SERVICE_STATE_VALUES, STATE_READER_ERROR_CODES, type ServerHealth, type ServerStatusRow, ServersClient, type ServiceClient, ServiceClientError, type ServiceEvent, type ServiceState, type ServiceStatusResult, StateReaderError, type StateReaderErrorCode, UPGRADE_ERROR_CODES, type UpgradeBundle, type UpgradeErrorCode, type UpgradeLogEntry, type UpgradeLogEntryErr, type UpgradeLogEntryOk, type UpgradeStartResult, type UpgradeTrigger, type UserServerEntry, type UserServersResult, assertUpgradeLogEntry, connectService, createComputerApi, createComputerTracer, detectLegacyMigration, fetchCdnLatestVersion, isComputerError, isIpcErrorCode, isMigrationDetectionKind, isRunnerState, isServiceState, listRunners, pickMigrationCandidateFromInput, readRunnerStatus, readServiceStatus, userSessionPath, validateManualMigratePath };
|
|
1519
|
+
export { type AttachInput, type AttachResult, COMPUTER_VERSION, type ComputerActiveSpan, type ComputerApi, type ComputerApiEvent, type ComputerEndSpanOptions, ComputerError, ComputerServiceError, type ComputerStartSpanOptions, type ComputerStatusReport, type ComputerTraceAttributes, type ComputerTraceClientSource, type ComputerTraceContext, type ComputerTraceSpanKind, type ComputerTraceStatus, type ComputerTraceSurface, type ComputerTracer, type ConnectService, type ConnectServiceOptions, DEFAULT_UPGRADE_BASE_URL, type DaemonState, IPC_ERROR_CODES, type IpcErrorCode, type LegacyMachineCandidate, type LegacyMachineRosterClient, type LegacyMachineRosterEntry, type LegacyMachineRosterResult, LegacyMachinesClient, type ListRunnersResult, type LoginInput, type LoginResult, MIGRATION_DETECTION_KINDS, MIGRATION_FRESH_TRIGGERS, type ManualPathValidation, type MigrationDetection, type MigrationDetectionKind, type MigrationFreshTrigger, type PickerSelection, RUNNER_STATE_VALUES, type RequestMethodMap, type RequestOptions, type ResetRunnerResult, type ResetServiceResult, type RunnerListItem as RunnerInfo, type RunnerListPerServer, type RunnerState, type RunnerStatusResult, SERVICE_STATE_VALUES, STATE_READER_ERROR_CODES, type ServerHealth, type ServerStatusRow, ServersClient, type ServiceClient, ServiceClientError, type ServiceEvent, type ServiceState, type ServiceStatusResult, StateReaderError, type StateReaderErrorCode, UPGRADE_ERROR_CODES, type UpgradeBundle, type UpgradeErrorCode, type UpgradeLogEntry, type UpgradeLogEntryErr, type UpgradeLogEntryOk, type UpgradeStartResult, type UpgradeTrigger, type UserServerEntry, type UserServersResult, assertUpgradeLogEntry, connectService, createComputerApi, createComputerTracer, detectLegacyMigration, fetchCdnLatestVersion, isComputerError, isIpcErrorCode, isMigrationDetectionKind, isRunnerState, isServiceState, listRunners, pickMigrationCandidateFromInput, readRunnerStatus, readServiceStatus, userSessionPath, validateManualMigratePath };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botiverse/raft-computer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"description": "Canonical Raft Computer — standalone human/local-machine control-plane CLI (login + attach). Provides raft-computer plus the legacy slock-computer alias; distinct from the agent-facing @botiverse/raft CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,9 +31,7 @@
|
|
|
31
31
|
"commander": "^12.1.0",
|
|
32
32
|
"proper-lockfile": "^4.1.2",
|
|
33
33
|
"undici": "^7.24.7",
|
|
34
|
-
"@
|
|
35
|
-
"@slock-ai/trace-client": "0.0.1",
|
|
36
|
-
"@botiverse/raft-daemon": "0.63.3"
|
|
34
|
+
"@botiverse/raft-daemon": "0.63.4"
|
|
37
35
|
},
|
|
38
36
|
"devDependencies": {
|
|
39
37
|
"@types/node": "^25.5.0",
|
|
@@ -42,7 +40,9 @@
|
|
|
42
40
|
"postject": "^1.0.0-alpha.6",
|
|
43
41
|
"tsup": "^8.5.1",
|
|
44
42
|
"tsx": "^4.21.0",
|
|
45
|
-
"typescript": "^5.9.3"
|
|
43
|
+
"typescript": "^5.9.3",
|
|
44
|
+
"@slock-ai/shared": "0.1.0",
|
|
45
|
+
"@slock-ai/trace-client": "0.0.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"computer": "tsx src/index.ts",
|