@ai-matrx/desktop-protocol 0.17.12 → 0.17.13
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/CHANGELOG.md +8 -0
- package/dist/client.cjs +117 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +117 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +151 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +259 -8
- package/dist/index.d.ts +259 -8
- package/dist/index.js +151 -5
- package/dist/index.js.map +1 -1
- package/dist/{models-A0PWllJz.d.cts → models-BOPMXUz-.d.cts} +362 -1
- package/dist/{models-A0PWllJz.d.ts → models-BOPMXUz-.d.ts} +362 -1
- package/dist/react.d.cts +136 -0
- package/dist/react.d.ts +136 -0
- package/generated/desktop-protocol.schema.json +610 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './models-
|
|
3
|
-
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-
|
|
2
|
+
import { O as OpName } from './models-BOPMXUz-.js';
|
|
3
|
+
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-BOPMXUz-.js';
|
|
4
4
|
export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.js';
|
|
5
5
|
|
|
6
6
|
/** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
@@ -26,10 +26,13 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
26
26
|
* 1.14 — a chat row carries its original title, where it came from, and the person's rename.
|
|
27
27
|
* 1.15 — a chat row says when the app archived it (typed), and its title source is a closed set.
|
|
28
28
|
* 1.16 — the `stack` capability: the local AI Matrx servers, their logs, errors and history.
|
|
29
|
+
* 1.17 — what is using the computer: resources.activity (jobs, heaviest processes, strain, the
|
|
30
|
+
* last hour), resources.stop_job (a job's whole tree), resources.incidents (slowdown log);
|
|
31
|
+
* a disk names its volume (ResourcesDisk `name`).
|
|
29
32
|
*/
|
|
30
|
-
declare const PROTOCOL_MINOR:
|
|
33
|
+
declare const PROTOCOL_MINOR: 17;
|
|
31
34
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
32
|
-
declare const PROTOCOL_VERSION: "1.
|
|
35
|
+
declare const PROTOCOL_VERSION: "1.17";
|
|
33
36
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
34
37
|
declare const u32: z.ZodInt;
|
|
35
38
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -3501,19 +3504,263 @@ type PowerPreventSleepResult = z.output<typeof PowerPreventSleepResult>;
|
|
|
3501
3504
|
|
|
3502
3505
|
/**
|
|
3503
3506
|
* @ai-matrx/desktop-protocol — cap resources (SPEC §6): how busy the computer is — CPU, memory and
|
|
3504
|
-
* disks.
|
|
3505
|
-
* scripts/check-schema-source.mjs.
|
|
3507
|
+
* disks — and (1.17) what is using it, grouped into jobs, with a slowdown log. The busiest single
|
|
3508
|
+
* processes are proc.list. Schema source: lint-enforced rules in scripts/check-schema-source.mjs.
|
|
3509
|
+
* Added in protocol 1.4.
|
|
3506
3510
|
*/
|
|
3507
3511
|
|
|
3508
3512
|
declare const ResourcesSnapshotParams: z.ZodObject<{}, z.core.$strict>;
|
|
3513
|
+
declare const ResourcesActivityParams: z.ZodObject<{}, z.core.$strict>;
|
|
3509
3514
|
declare const ResourcesDisk: z.ZodObject<{
|
|
3510
3515
|
mount: z.ZodString;
|
|
3516
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3511
3517
|
fs: z.ZodString;
|
|
3512
3518
|
size_bytes: z.ZodInt;
|
|
3513
3519
|
used_bytes: z.ZodInt;
|
|
3514
3520
|
available_bytes: z.ZodInt;
|
|
3515
3521
|
}, z.core.$strict>;
|
|
3516
3522
|
type ResourcesDisk = z.output<typeof ResourcesDisk>;
|
|
3523
|
+
/** What a job is, from its command line. */
|
|
3524
|
+
declare const ResourcesJobKind: z.ZodEnum<{
|
|
3525
|
+
"type-check": "type-check";
|
|
3526
|
+
tests: "tests";
|
|
3527
|
+
build: "build";
|
|
3528
|
+
lint: "lint";
|
|
3529
|
+
"dev server": "dev server";
|
|
3530
|
+
"language server": "language server";
|
|
3531
|
+
search: "search";
|
|
3532
|
+
}>;
|
|
3533
|
+
type ResourcesJobKind = z.output<typeof ResourcesJobKind>;
|
|
3534
|
+
/** How hard the computer is working right now. */
|
|
3535
|
+
declare const ResourcesStrain: z.ZodEnum<{
|
|
3536
|
+
good: "good";
|
|
3537
|
+
strain: "strain";
|
|
3538
|
+
overloaded: "overloaded";
|
|
3539
|
+
}>;
|
|
3540
|
+
type ResourcesStrain = z.output<typeof ResourcesStrain>;
|
|
3541
|
+
/** The kernel's memory-pressure level (macOS); null where the OS has none. */
|
|
3542
|
+
declare const ResourcesPressure: z.ZodEnum<{
|
|
3543
|
+
normal: "normal";
|
|
3544
|
+
warning: "warning";
|
|
3545
|
+
critical: "critical";
|
|
3546
|
+
}>;
|
|
3547
|
+
type ResourcesPressure = z.output<typeof ResourcesPressure>;
|
|
3548
|
+
/** A job: a type-check, test run, build, lint, dev server, language server or search, with its whole process tree. */
|
|
3549
|
+
declare const ResourcesJob: z.ZodObject<{
|
|
3550
|
+
pid: z.ZodInt;
|
|
3551
|
+
kind: z.ZodEnum<{
|
|
3552
|
+
"type-check": "type-check";
|
|
3553
|
+
tests: "tests";
|
|
3554
|
+
build: "build";
|
|
3555
|
+
lint: "lint";
|
|
3556
|
+
"dev server": "dev server";
|
|
3557
|
+
"language server": "language server";
|
|
3558
|
+
search: "search";
|
|
3559
|
+
}>;
|
|
3560
|
+
command: z.ZodString;
|
|
3561
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3562
|
+
orphan: z.ZodBoolean;
|
|
3563
|
+
waiting: z.ZodBoolean;
|
|
3564
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
3565
|
+
duplicates: z.ZodInt;
|
|
3566
|
+
processes: z.ZodInt;
|
|
3567
|
+
cpu_percent: z.ZodNumber;
|
|
3568
|
+
memory_bytes: z.ZodInt;
|
|
3569
|
+
started_at_ms: z.ZodNullable<z.ZodInt>;
|
|
3570
|
+
stoppable: z.ZodBoolean;
|
|
3571
|
+
}, z.core.$strict>;
|
|
3572
|
+
type ResourcesJob = z.output<typeof ResourcesJob>;
|
|
3573
|
+
/** One of the heaviest processes. */
|
|
3574
|
+
declare const ResourcesProcess: z.ZodObject<{
|
|
3575
|
+
pid: z.ZodInt;
|
|
3576
|
+
name: z.ZodString;
|
|
3577
|
+
cpu_percent: z.ZodNumber;
|
|
3578
|
+
memory_bytes: z.ZodInt;
|
|
3579
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3580
|
+
job: z.ZodNullable<z.ZodString>;
|
|
3581
|
+
started_at_ms: z.ZodNullable<z.ZodInt>;
|
|
3582
|
+
}, z.core.$strict>;
|
|
3583
|
+
type ResourcesProcess = z.output<typeof ResourcesProcess>;
|
|
3584
|
+
declare const ResourcesVerdict: z.ZodObject<{
|
|
3585
|
+
level: z.ZodEnum<{
|
|
3586
|
+
good: "good";
|
|
3587
|
+
strain: "strain";
|
|
3588
|
+
overloaded: "overloaded";
|
|
3589
|
+
}>;
|
|
3590
|
+
text: z.ZodString;
|
|
3591
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
3592
|
+
}, z.core.$strict>;
|
|
3593
|
+
type ResourcesVerdict = z.output<typeof ResourcesVerdict>;
|
|
3594
|
+
declare const ResourcesSample: z.ZodObject<{
|
|
3595
|
+
at_ms: z.ZodInt;
|
|
3596
|
+
load: z.ZodNumber;
|
|
3597
|
+
memory_used_bytes: z.ZodInt;
|
|
3598
|
+
typechecks: z.ZodInt;
|
|
3599
|
+
}, z.core.$strict>;
|
|
3600
|
+
type ResourcesSample = z.output<typeof ResourcesSample>;
|
|
3601
|
+
declare const ResourcesActivityResult: z.ZodObject<{
|
|
3602
|
+
ready: z.ZodBoolean;
|
|
3603
|
+
sampled_at_ms: z.ZodNullable<z.ZodInt>;
|
|
3604
|
+
cores: z.ZodInt;
|
|
3605
|
+
load: z.ZodArray<z.ZodNumber>;
|
|
3606
|
+
memory: z.ZodObject<{
|
|
3607
|
+
total_bytes: z.ZodInt;
|
|
3608
|
+
used_bytes: z.ZodInt;
|
|
3609
|
+
compressed_bytes: z.ZodInt;
|
|
3610
|
+
compressor_bytes: z.ZodInt;
|
|
3611
|
+
swap_used_bytes: z.ZodInt;
|
|
3612
|
+
pressure: z.ZodNullable<z.ZodEnum<{
|
|
3613
|
+
normal: "normal";
|
|
3614
|
+
warning: "warning";
|
|
3615
|
+
critical: "critical";
|
|
3616
|
+
}>>;
|
|
3617
|
+
}, z.core.$strict>;
|
|
3618
|
+
verdict: z.ZodObject<{
|
|
3619
|
+
level: z.ZodEnum<{
|
|
3620
|
+
good: "good";
|
|
3621
|
+
strain: "strain";
|
|
3622
|
+
overloaded: "overloaded";
|
|
3623
|
+
}>;
|
|
3624
|
+
text: z.ZodString;
|
|
3625
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
3626
|
+
}, z.core.$strict>;
|
|
3627
|
+
typechecks: z.ZodObject<{
|
|
3628
|
+
running: z.ZodInt;
|
|
3629
|
+
waiting: z.ZodInt;
|
|
3630
|
+
comfort: z.ZodInt;
|
|
3631
|
+
}, z.core.$strict>;
|
|
3632
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
3633
|
+
pid: z.ZodInt;
|
|
3634
|
+
kind: z.ZodEnum<{
|
|
3635
|
+
"type-check": "type-check";
|
|
3636
|
+
tests: "tests";
|
|
3637
|
+
build: "build";
|
|
3638
|
+
lint: "lint";
|
|
3639
|
+
"dev server": "dev server";
|
|
3640
|
+
"language server": "language server";
|
|
3641
|
+
search: "search";
|
|
3642
|
+
}>;
|
|
3643
|
+
command: z.ZodString;
|
|
3644
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3645
|
+
orphan: z.ZodBoolean;
|
|
3646
|
+
waiting: z.ZodBoolean;
|
|
3647
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
3648
|
+
duplicates: z.ZodInt;
|
|
3649
|
+
processes: z.ZodInt;
|
|
3650
|
+
cpu_percent: z.ZodNumber;
|
|
3651
|
+
memory_bytes: z.ZodInt;
|
|
3652
|
+
started_at_ms: z.ZodNullable<z.ZodInt>;
|
|
3653
|
+
stoppable: z.ZodBoolean;
|
|
3654
|
+
}, z.core.$strict>>;
|
|
3655
|
+
top: z.ZodArray<z.ZodObject<{
|
|
3656
|
+
pid: z.ZodInt;
|
|
3657
|
+
name: z.ZodString;
|
|
3658
|
+
cpu_percent: z.ZodNumber;
|
|
3659
|
+
memory_bytes: z.ZodInt;
|
|
3660
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3661
|
+
job: z.ZodNullable<z.ZodString>;
|
|
3662
|
+
started_at_ms: z.ZodNullable<z.ZodInt>;
|
|
3663
|
+
}, z.core.$strict>>;
|
|
3664
|
+
history: z.ZodArray<z.ZodObject<{
|
|
3665
|
+
at_ms: z.ZodInt;
|
|
3666
|
+
load: z.ZodNumber;
|
|
3667
|
+
memory_used_bytes: z.ZodInt;
|
|
3668
|
+
typechecks: z.ZodInt;
|
|
3669
|
+
}, z.core.$strict>>;
|
|
3670
|
+
}, z.core.$strict>;
|
|
3671
|
+
type ResourcesActivityResult = z.output<typeof ResourcesActivityResult>;
|
|
3672
|
+
declare const ResourcesStopJobParams: z.ZodObject<{
|
|
3673
|
+
pid: z.ZodInt;
|
|
3674
|
+
}, z.core.$strict>;
|
|
3675
|
+
type ResourcesStopJobParams = z.output<typeof ResourcesStopJobParams>;
|
|
3676
|
+
declare const ResourcesStopJobResult: z.ZodObject<{
|
|
3677
|
+
processes: z.ZodInt;
|
|
3678
|
+
already_finished: z.ZodBoolean;
|
|
3679
|
+
}, z.core.$strict>;
|
|
3680
|
+
type ResourcesStopJobResult = z.output<typeof ResourcesStopJobResult>;
|
|
3681
|
+
/** A moment the computer was under strain, and what was using it. */
|
|
3682
|
+
declare const ResourcesIncident: z.ZodObject<{
|
|
3683
|
+
at_ms: z.ZodInt;
|
|
3684
|
+
verdict: z.ZodObject<{
|
|
3685
|
+
level: z.ZodEnum<{
|
|
3686
|
+
good: "good";
|
|
3687
|
+
strain: "strain";
|
|
3688
|
+
overloaded: "overloaded";
|
|
3689
|
+
}>;
|
|
3690
|
+
text: z.ZodString;
|
|
3691
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
3692
|
+
}, z.core.$strict>;
|
|
3693
|
+
load: z.ZodNumber;
|
|
3694
|
+
memory_used_bytes: z.ZodInt;
|
|
3695
|
+
compressed_bytes: z.ZodInt;
|
|
3696
|
+
pressure: z.ZodNullable<z.ZodEnum<{
|
|
3697
|
+
normal: "normal";
|
|
3698
|
+
warning: "warning";
|
|
3699
|
+
critical: "critical";
|
|
3700
|
+
}>>;
|
|
3701
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
3702
|
+
kind: z.ZodEnum<{
|
|
3703
|
+
"type-check": "type-check";
|
|
3704
|
+
tests: "tests";
|
|
3705
|
+
build: "build";
|
|
3706
|
+
lint: "lint";
|
|
3707
|
+
"dev server": "dev server";
|
|
3708
|
+
"language server": "language server";
|
|
3709
|
+
search: "search";
|
|
3710
|
+
}>;
|
|
3711
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3712
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
3713
|
+
command: z.ZodString;
|
|
3714
|
+
cpu_percent: z.ZodNumber;
|
|
3715
|
+
memory_bytes: z.ZodInt;
|
|
3716
|
+
duplicates: z.ZodInt;
|
|
3717
|
+
}, z.core.$strict>>;
|
|
3718
|
+
}, z.core.$strict>;
|
|
3719
|
+
type ResourcesIncident = z.output<typeof ResourcesIncident>;
|
|
3720
|
+
declare const ResourcesIncidentsParams: z.ZodObject<{
|
|
3721
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
3722
|
+
}, z.core.$strict>;
|
|
3723
|
+
type ResourcesIncidentsParams = z.output<typeof ResourcesIncidentsParams>;
|
|
3724
|
+
declare const ResourcesIncidentsResult: z.ZodObject<{
|
|
3725
|
+
incidents: z.ZodArray<z.ZodObject<{
|
|
3726
|
+
at_ms: z.ZodInt;
|
|
3727
|
+
verdict: z.ZodObject<{
|
|
3728
|
+
level: z.ZodEnum<{
|
|
3729
|
+
good: "good";
|
|
3730
|
+
strain: "strain";
|
|
3731
|
+
overloaded: "overloaded";
|
|
3732
|
+
}>;
|
|
3733
|
+
text: z.ZodString;
|
|
3734
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
3735
|
+
}, z.core.$strict>;
|
|
3736
|
+
load: z.ZodNumber;
|
|
3737
|
+
memory_used_bytes: z.ZodInt;
|
|
3738
|
+
compressed_bytes: z.ZodInt;
|
|
3739
|
+
pressure: z.ZodNullable<z.ZodEnum<{
|
|
3740
|
+
normal: "normal";
|
|
3741
|
+
warning: "warning";
|
|
3742
|
+
critical: "critical";
|
|
3743
|
+
}>>;
|
|
3744
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
3745
|
+
kind: z.ZodEnum<{
|
|
3746
|
+
"type-check": "type-check";
|
|
3747
|
+
tests: "tests";
|
|
3748
|
+
build: "build";
|
|
3749
|
+
lint: "lint";
|
|
3750
|
+
"dev server": "dev server";
|
|
3751
|
+
"language server": "language server";
|
|
3752
|
+
search: "search";
|
|
3753
|
+
}>;
|
|
3754
|
+
started_by: z.ZodNullable<z.ZodString>;
|
|
3755
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
3756
|
+
command: z.ZodString;
|
|
3757
|
+
cpu_percent: z.ZodNumber;
|
|
3758
|
+
memory_bytes: z.ZodInt;
|
|
3759
|
+
duplicates: z.ZodInt;
|
|
3760
|
+
}, z.core.$strict>>;
|
|
3761
|
+
}, z.core.$strict>>;
|
|
3762
|
+
}, z.core.$strict>;
|
|
3763
|
+
type ResourcesIncidentsResult = z.output<typeof ResourcesIncidentsResult>;
|
|
3517
3764
|
declare const ResourcesSnapshotResult: z.ZodObject<{
|
|
3518
3765
|
cpu: z.ZodObject<{
|
|
3519
3766
|
percent: z.ZodNumber;
|
|
@@ -3531,6 +3778,7 @@ declare const ResourcesSnapshotResult: z.ZodObject<{
|
|
|
3531
3778
|
}, z.core.$strict>;
|
|
3532
3779
|
disks: z.ZodArray<z.ZodObject<{
|
|
3533
3780
|
mount: z.ZodString;
|
|
3781
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3534
3782
|
fs: z.ZodString;
|
|
3535
3783
|
size_bytes: z.ZodInt;
|
|
3536
3784
|
used_bytes: z.ZodInt;
|
|
@@ -4081,6 +4329,9 @@ declare const FIELDS_SINCE: {
|
|
|
4081
4329
|
readonly plan: "1.13";
|
|
4082
4330
|
readonly credits: "1.13";
|
|
4083
4331
|
};
|
|
4332
|
+
readonly ResourcesDisk: {
|
|
4333
|
+
readonly name: "1.17";
|
|
4334
|
+
};
|
|
4084
4335
|
};
|
|
4085
4336
|
type FieldsSincePath = keyof typeof FIELDS_SINCE;
|
|
4086
4337
|
/**
|
|
@@ -4135,7 +4386,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
4135
4386
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
4136
4387
|
|
|
4137
4388
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
4138
|
-
declare const CONTRACT_SHA256: "
|
|
4389
|
+
declare const CONTRACT_SHA256: "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
|
|
4139
4390
|
|
|
4140
4391
|
/**
|
|
4141
4392
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
@@ -4262,4 +4513,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
4262
4513
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
4263
4514
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
4264
4515
|
|
|
4265
|
-
export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatAppProject, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
|
|
4516
|
+
export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatAppProject, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesActivityParams, ResourcesActivityResult, ResourcesDisk, ResourcesIncident, ResourcesIncidentsParams, ResourcesIncidentsResult, ResourcesJob, ResourcesJobKind, ResourcesPressure, ResourcesProcess, ResourcesSample, ResourcesSnapshotParams, ResourcesSnapshotResult, ResourcesStopJobParams, ResourcesStopJobResult, ResourcesStrain, ResourcesVerdict, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/schema/primitives.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var PROTOCOL_MAJOR = 1;
|
|
4
|
-
var PROTOCOL_MINOR =
|
|
4
|
+
var PROTOCOL_MINOR = 17;
|
|
5
5
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
6
6
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
7
7
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1640,6 +1640,8 @@ import { z as z23 } from "zod";
|
|
|
1640
1640
|
var ResourcesDisk = z23.strictObject({
|
|
1641
1641
|
/** Where it is mounted ("/", "C:"). */
|
|
1642
1642
|
mount: z23.string().max(512),
|
|
1643
|
+
/** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
|
|
1644
|
+
name: z23.string().max(256).optional(),
|
|
1643
1645
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1644
1646
|
fs: z23.string().max(64),
|
|
1645
1647
|
size_bytes: nonNegInt,
|
|
@@ -1660,6 +1662,117 @@ var ResourcesSnapshotResult = z23.strictObject({
|
|
|
1660
1662
|
disks: z23.array(ResourcesDisk).max(64),
|
|
1661
1663
|
uptime_seconds: nonNegInt
|
|
1662
1664
|
});
|
|
1665
|
+
var ResourcesJobKind = z23.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
|
|
1666
|
+
var ResourcesStrain = z23.enum(["good", "strain", "overloaded"]);
|
|
1667
|
+
var ResourcesPressure = z23.enum(["normal", "warning", "critical"]);
|
|
1668
|
+
var ResourcesJob = z23.strictObject({
|
|
1669
|
+
/** The job's root process (Stop takes its whole tree). */
|
|
1670
|
+
pid: z23.int().min(0),
|
|
1671
|
+
kind: ResourcesJobKind,
|
|
1672
|
+
/** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
|
|
1673
|
+
command: z23.string().max(256),
|
|
1674
|
+
/** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
|
|
1675
|
+
started_by: z23.string().max(64).nullable(),
|
|
1676
|
+
/** Whatever started it is gone and nothing waits for it. */
|
|
1677
|
+
orphan: z23.boolean(),
|
|
1678
|
+
/** A type-check queued for its turn (no compiler running yet). */
|
|
1679
|
+
waiting: z23.boolean(),
|
|
1680
|
+
/** The project folder it runs in ("matrx-frontend"); null when not in one. */
|
|
1681
|
+
folder: z23.string().max(256).nullable(),
|
|
1682
|
+
/** The same command in the same folder, running this many times (1 = no duplicate). */
|
|
1683
|
+
duplicates: z23.int().min(1),
|
|
1684
|
+
processes: z23.int().min(1),
|
|
1685
|
+
/** Sum over the tree, as `ps` reports it: 100 = one full core. */
|
|
1686
|
+
cpu_percent: z23.number().min(0),
|
|
1687
|
+
/** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
|
|
1688
|
+
memory_bytes: nonNegInt,
|
|
1689
|
+
started_at_ms: epochMs.nullable(),
|
|
1690
|
+
/** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
|
|
1691
|
+
stoppable: z23.boolean()
|
|
1692
|
+
});
|
|
1693
|
+
var ResourcesProcess = z23.strictObject({
|
|
1694
|
+
pid: z23.int().min(0),
|
|
1695
|
+
/** The command line, shortened. */
|
|
1696
|
+
name: z23.string().max(256),
|
|
1697
|
+
cpu_percent: z23.number().min(0),
|
|
1698
|
+
memory_bytes: nonNegInt,
|
|
1699
|
+
started_by: z23.string().max(64).nullable(),
|
|
1700
|
+
/** The job it belongs to ("type-check in aidream"); null when none. */
|
|
1701
|
+
job: z23.string().max(256).nullable(),
|
|
1702
|
+
started_at_ms: epochMs.nullable()
|
|
1703
|
+
});
|
|
1704
|
+
var ResourcesVerdict = z23.strictObject({
|
|
1705
|
+
level: ResourcesStrain,
|
|
1706
|
+
/** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
|
|
1707
|
+
text: z23.string().max(256),
|
|
1708
|
+
/** The biggest jobs behind it; null when all is well. */
|
|
1709
|
+
cause: z23.string().max(1024).nullable()
|
|
1710
|
+
});
|
|
1711
|
+
var ResourcesSample = z23.strictObject({
|
|
1712
|
+
at_ms: epochMs,
|
|
1713
|
+
/** The 1-minute load average. */
|
|
1714
|
+
load: z23.number().min(0),
|
|
1715
|
+
memory_used_bytes: nonNegInt,
|
|
1716
|
+
typechecks: nonNegInt
|
|
1717
|
+
});
|
|
1718
|
+
var ResourcesActivityParams = z23.strictObject({});
|
|
1719
|
+
var ResourcesActivityResult = z23.strictObject({
|
|
1720
|
+
/** False until the first reading (a second or two after start). */
|
|
1721
|
+
ready: z23.boolean(),
|
|
1722
|
+
sampled_at_ms: epochMs.nullable(),
|
|
1723
|
+
cores: z23.int().min(1),
|
|
1724
|
+
/** 1, 5 and 15 minute load averages. */
|
|
1725
|
+
load: z23.array(z23.number().min(0)).length(3),
|
|
1726
|
+
memory: z23.strictObject({
|
|
1727
|
+
total_bytes: nonNegInt,
|
|
1728
|
+
/** Activity Monitor's Memory Used: app memory + wired + compressed. */
|
|
1729
|
+
used_bytes: nonNegInt,
|
|
1730
|
+
/** Data held compressed, and the memory the compressor takes to hold it. */
|
|
1731
|
+
compressed_bytes: nonNegInt,
|
|
1732
|
+
compressor_bytes: nonNegInt,
|
|
1733
|
+
swap_used_bytes: nonNegInt,
|
|
1734
|
+
pressure: ResourcesPressure.nullable()
|
|
1735
|
+
}),
|
|
1736
|
+
verdict: ResourcesVerdict,
|
|
1737
|
+
typechecks: z23.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
|
|
1738
|
+
/** Heaviest first (1 GB weighs as much as 16 % of a core). */
|
|
1739
|
+
jobs: z23.array(ResourcesJob).max(200),
|
|
1740
|
+
/** The 15 heaviest by memory and the 15 busiest by CPU, together. */
|
|
1741
|
+
top: z23.array(ResourcesProcess).max(30),
|
|
1742
|
+
/** The last hour, oldest first. */
|
|
1743
|
+
history: z23.array(ResourcesSample).max(1200)
|
|
1744
|
+
});
|
|
1745
|
+
var ResourcesStopJobParams = z23.strictObject({ pid: z23.int().min(1) });
|
|
1746
|
+
var ResourcesStopJobResult = z23.strictObject({
|
|
1747
|
+
/** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
|
|
1748
|
+
processes: nonNegInt,
|
|
1749
|
+
/** It had finished before the request arrived. */
|
|
1750
|
+
already_finished: z23.boolean()
|
|
1751
|
+
});
|
|
1752
|
+
var ResourcesIncident = z23.strictObject({
|
|
1753
|
+
at_ms: epochMs,
|
|
1754
|
+
verdict: ResourcesVerdict,
|
|
1755
|
+
load: z23.number().min(0),
|
|
1756
|
+
memory_used_bytes: nonNegInt,
|
|
1757
|
+
compressed_bytes: nonNegInt,
|
|
1758
|
+
pressure: ResourcesPressure.nullable(),
|
|
1759
|
+
jobs: z23.array(
|
|
1760
|
+
z23.strictObject({
|
|
1761
|
+
kind: ResourcesJobKind,
|
|
1762
|
+
started_by: z23.string().max(64).nullable(),
|
|
1763
|
+
folder: z23.string().max(256).nullable(),
|
|
1764
|
+
command: z23.string().max(256),
|
|
1765
|
+
cpu_percent: z23.number().min(0),
|
|
1766
|
+
memory_bytes: nonNegInt,
|
|
1767
|
+
duplicates: z23.int().min(1)
|
|
1768
|
+
})
|
|
1769
|
+
).max(8)
|
|
1770
|
+
});
|
|
1771
|
+
var ResourcesIncidentsParams = z23.strictObject({ limit: z23.int().min(1).max(200).default(50) });
|
|
1772
|
+
var ResourcesIncidentsResult = z23.strictObject({
|
|
1773
|
+
/** Newest first; at most one a minute is written. */
|
|
1774
|
+
incidents: z23.array(ResourcesIncident).max(200)
|
|
1775
|
+
});
|
|
1663
1776
|
|
|
1664
1777
|
// src/schema/stack.ts
|
|
1665
1778
|
import { z as z24 } from "zod";
|
|
@@ -2022,6 +2135,9 @@ var OPS = {
|
|
|
2022
2135
|
"power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
2023
2136
|
"power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2024
2137
|
"resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
2138
|
+
"resources.activity": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: "unary", since: "1.17", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2139
|
+
"resources.stop_job": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: "unary", since: "1.17", errors: ["NOT_FOUND", "CONFLICT", "AUTH_FORBIDDEN", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2140
|
+
"resources.incidents": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: "unary", since: "1.17", errors: ["INTERNAL"] },
|
|
2025
2141
|
"audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2026
2142
|
"audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
|
|
2027
2143
|
"audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -2256,6 +2372,20 @@ var NAMED_SCHEMAS = {
|
|
|
2256
2372
|
ResourcesDisk,
|
|
2257
2373
|
ResourcesSnapshotParams,
|
|
2258
2374
|
ResourcesSnapshotResult,
|
|
2375
|
+
ResourcesJobKind,
|
|
2376
|
+
ResourcesStrain,
|
|
2377
|
+
ResourcesPressure,
|
|
2378
|
+
ResourcesVerdict,
|
|
2379
|
+
ResourcesSample,
|
|
2380
|
+
ResourcesJob,
|
|
2381
|
+
ResourcesProcess,
|
|
2382
|
+
ResourcesActivityParams,
|
|
2383
|
+
ResourcesActivityResult,
|
|
2384
|
+
ResourcesStopJobParams,
|
|
2385
|
+
ResourcesStopJobResult,
|
|
2386
|
+
ResourcesIncident,
|
|
2387
|
+
ResourcesIncidentsParams,
|
|
2388
|
+
ResourcesIncidentsResult,
|
|
2259
2389
|
AudioDevice,
|
|
2260
2390
|
AudioDevicesParams,
|
|
2261
2391
|
AudioDevicesResult,
|
|
@@ -2407,7 +2537,8 @@ var FIELDS_SINCE = {
|
|
|
2407
2537
|
AppsAccountsUsageResult: { problem: "1.12" },
|
|
2408
2538
|
AppsAccountsResetsResult: { problem: "1.12" },
|
|
2409
2539
|
ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15" },
|
|
2410
|
-
AccountUsage: { plan: "1.13", credits: "1.13" }
|
|
2540
|
+
AccountUsage: { plan: "1.13", credits: "1.13" },
|
|
2541
|
+
ResourcesDisk: { name: "1.17" }
|
|
2411
2542
|
};
|
|
2412
2543
|
var NULL_SINCE = {
|
|
2413
2544
|
"RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
|
|
@@ -2474,7 +2605,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
2474
2605
|
["apps.projects.move", [["chat", "ChatRow"]]],
|
|
2475
2606
|
["apps.chats.star", [["chat", "ChatRow"]]],
|
|
2476
2607
|
["apps.chats.place", [["chat", "ChatRow"]]],
|
|
2477
|
-
["apps.accounts.usage", [["accounts", "AccountUsage"]]]
|
|
2608
|
+
["apps.accounts.usage", [["accounts", "AccountUsage"]]],
|
|
2609
|
+
["resources.snapshot", [["disks", "ResourcesDisk"]]]
|
|
2478
2610
|
]);
|
|
2479
2611
|
function stripNested(value, nested, version) {
|
|
2480
2612
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
@@ -2535,7 +2667,7 @@ function forPeer(op, part, value, version) {
|
|
|
2535
2667
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
2536
2668
|
|
|
2537
2669
|
// src/contract.ts
|
|
2538
|
-
var CONTRACT_SHA256 = "
|
|
2670
|
+
var CONTRACT_SHA256 = "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
|
|
2539
2671
|
|
|
2540
2672
|
// src/close-policy.ts
|
|
2541
2673
|
var CLOSE_RULES = {
|
|
@@ -2595,7 +2727,7 @@ var TOOL_CATALOG = [
|
|
|
2595
2727
|
{ name: "desktop_input", group: "os_control", state: "built", path: "device_op", ops: ["input.type_text", "input.hotkey", "input.mouse_click", "input.mouse_move"], platforms: ALL, summary: "Keyboard and mouse" },
|
|
2596
2728
|
{ name: "desktop_audio", group: "os_control", state: "built", path: "device_op", ops: ["audio.devices", "audio.record", "audio.play"], platforms: ALL, summary: "Audio devices, record, play" },
|
|
2597
2729
|
{ name: "desktop_power", group: "os_control", state: "built", path: "device_op", ops: ["power.status", "power.prevent_sleep"], platforms: ALL, summary: "Battery and keep awake" },
|
|
2598
|
-
{ name: "desktop_resources", group: "os_control", state: "built", path: "device_op", ops: ["resources.snapshot"], platforms: ALL, summary: "CPU, memory and disk use" },
|
|
2730
|
+
{ name: "desktop_resources", group: "os_control", state: "built", path: "device_op", ops: ["resources.snapshot", "resources.activity", "resources.stop_job", "resources.incidents"], platforms: ALL, summary: "CPU, memory and disk use; what is using them, grouped into jobs; stop a job; the slowdown log" },
|
|
2599
2731
|
{ name: "fs_watch", group: "os_control", state: "built", path: "device_op", ops: ["fs.watch.start", "fs.watch.events", "fs.watch.stop"], platforms: ALL, summary: "Watch a folder; read what changed" },
|
|
2600
2732
|
// ── 3. Personal apps and automation ──────────────────────────────────────────────────────────
|
|
2601
2733
|
{ name: "desktop_automation", group: "personal_automation", state: "planned", path: "device_op", ops: ["automation.script"], platforms: ["darwin", "win32"], summary: "AppleScript on a Mac, PowerShell on Windows" },
|
|
@@ -3153,9 +3285,23 @@ export {
|
|
|
3153
3285
|
RequestMsg,
|
|
3154
3286
|
ResourceId,
|
|
3155
3287
|
ResourceInfo,
|
|
3288
|
+
ResourcesActivityParams,
|
|
3289
|
+
ResourcesActivityResult,
|
|
3156
3290
|
ResourcesDisk,
|
|
3291
|
+
ResourcesIncident,
|
|
3292
|
+
ResourcesIncidentsParams,
|
|
3293
|
+
ResourcesIncidentsResult,
|
|
3294
|
+
ResourcesJob,
|
|
3295
|
+
ResourcesJobKind,
|
|
3296
|
+
ResourcesPressure,
|
|
3297
|
+
ResourcesProcess,
|
|
3298
|
+
ResourcesSample,
|
|
3157
3299
|
ResourcesSnapshotParams,
|
|
3158
3300
|
ResourcesSnapshotResult,
|
|
3301
|
+
ResourcesStopJobParams,
|
|
3302
|
+
ResourcesStopJobResult,
|
|
3303
|
+
ResourcesStrain,
|
|
3304
|
+
ResourcesVerdict,
|
|
3159
3305
|
ResponseMsg,
|
|
3160
3306
|
SERVICES,
|
|
3161
3307
|
SERVICE_MAX_FRAME_BYTES,
|