@ai-matrx/desktop-protocol 0.17.12 → 0.18.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/CHANGELOG.md +14 -0
- package/dist/client.cjs +123 -4
- 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 +123 -4
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +157 -8
- 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 +157 -8
- 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 +2 -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,12 +1,13 @@
|
|
|
1
1
|
// src/schema/primitives.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
|
|
3
4
|
var PROTOCOL_MAJOR = 1;
|
|
4
|
-
var PROTOCOL_MINOR =
|
|
5
|
+
var PROTOCOL_MINOR = 17;
|
|
5
6
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
6
7
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
7
8
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
8
9
|
var ResourceId = z.string().regex(/^(pty|watch)_[A-Za-z0-9]{16,40}$/);
|
|
9
|
-
var DeviceId = z.string().regex(
|
|
10
|
+
var DeviceId = z.string().regex(UUID_SHAPE_PATTERN);
|
|
10
11
|
var AbsPath = z.string().min(1).max(4096).regex(/^(\/|[A-Za-z]:\/)[^\\\u0000]*$/);
|
|
11
12
|
var u32 = z.int().min(0).max(4294967295);
|
|
12
13
|
var nonNegInt = z.int().min(0);
|
|
@@ -801,8 +802,9 @@ var ModelsProgressEvent = z10.strictObject({ request_id: RequestId, progress: Ml
|
|
|
801
802
|
|
|
802
803
|
// src/schema/apps.ts
|
|
803
804
|
import { z as z11 } from "zod";
|
|
805
|
+
import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN2 } from "@ai-matrx/kit/uuid";
|
|
804
806
|
var AppKey = z11.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
|
|
805
|
-
var AppProfileId = z11.string().regex(
|
|
807
|
+
var AppProfileId = z11.string().regex(UUID_SHAPE_PATTERN2);
|
|
806
808
|
var AppProfileLocator = z11.string().min(1).max(512).regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);
|
|
807
809
|
var AppSupport = z11.enum(["supported", "partial", "unsupported"]);
|
|
808
810
|
var AppFeatureStatus = z11.strictObject({
|
|
@@ -1640,6 +1642,8 @@ import { z as z23 } from "zod";
|
|
|
1640
1642
|
var ResourcesDisk = z23.strictObject({
|
|
1641
1643
|
/** Where it is mounted ("/", "C:"). */
|
|
1642
1644
|
mount: z23.string().max(512),
|
|
1645
|
+
/** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
|
|
1646
|
+
name: z23.string().max(256).optional(),
|
|
1643
1647
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1644
1648
|
fs: z23.string().max(64),
|
|
1645
1649
|
size_bytes: nonNegInt,
|
|
@@ -1660,6 +1664,117 @@ var ResourcesSnapshotResult = z23.strictObject({
|
|
|
1660
1664
|
disks: z23.array(ResourcesDisk).max(64),
|
|
1661
1665
|
uptime_seconds: nonNegInt
|
|
1662
1666
|
});
|
|
1667
|
+
var ResourcesJobKind = z23.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
|
|
1668
|
+
var ResourcesStrain = z23.enum(["good", "strain", "overloaded"]);
|
|
1669
|
+
var ResourcesPressure = z23.enum(["normal", "warning", "critical"]);
|
|
1670
|
+
var ResourcesJob = z23.strictObject({
|
|
1671
|
+
/** The job's root process (Stop takes its whole tree). */
|
|
1672
|
+
pid: z23.int().min(0),
|
|
1673
|
+
kind: ResourcesJobKind,
|
|
1674
|
+
/** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
|
|
1675
|
+
command: z23.string().max(256),
|
|
1676
|
+
/** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
|
|
1677
|
+
started_by: z23.string().max(64).nullable(),
|
|
1678
|
+
/** Whatever started it is gone and nothing waits for it. */
|
|
1679
|
+
orphan: z23.boolean(),
|
|
1680
|
+
/** A type-check queued for its turn (no compiler running yet). */
|
|
1681
|
+
waiting: z23.boolean(),
|
|
1682
|
+
/** The project folder it runs in ("matrx-frontend"); null when not in one. */
|
|
1683
|
+
folder: z23.string().max(256).nullable(),
|
|
1684
|
+
/** The same command in the same folder, running this many times (1 = no duplicate). */
|
|
1685
|
+
duplicates: z23.int().min(1),
|
|
1686
|
+
processes: z23.int().min(1),
|
|
1687
|
+
/** Sum over the tree, as `ps` reports it: 100 = one full core. */
|
|
1688
|
+
cpu_percent: z23.number().min(0),
|
|
1689
|
+
/** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
|
|
1690
|
+
memory_bytes: nonNegInt,
|
|
1691
|
+
started_at_ms: epochMs.nullable(),
|
|
1692
|
+
/** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
|
|
1693
|
+
stoppable: z23.boolean()
|
|
1694
|
+
});
|
|
1695
|
+
var ResourcesProcess = z23.strictObject({
|
|
1696
|
+
pid: z23.int().min(0),
|
|
1697
|
+
/** The command line, shortened. */
|
|
1698
|
+
name: z23.string().max(256),
|
|
1699
|
+
cpu_percent: z23.number().min(0),
|
|
1700
|
+
memory_bytes: nonNegInt,
|
|
1701
|
+
started_by: z23.string().max(64).nullable(),
|
|
1702
|
+
/** The job it belongs to ("type-check in aidream"); null when none. */
|
|
1703
|
+
job: z23.string().max(256).nullable(),
|
|
1704
|
+
started_at_ms: epochMs.nullable()
|
|
1705
|
+
});
|
|
1706
|
+
var ResourcesVerdict = z23.strictObject({
|
|
1707
|
+
level: ResourcesStrain,
|
|
1708
|
+
/** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
|
|
1709
|
+
text: z23.string().max(256),
|
|
1710
|
+
/** The biggest jobs behind it; null when all is well. */
|
|
1711
|
+
cause: z23.string().max(1024).nullable()
|
|
1712
|
+
});
|
|
1713
|
+
var ResourcesSample = z23.strictObject({
|
|
1714
|
+
at_ms: epochMs,
|
|
1715
|
+
/** The 1-minute load average. */
|
|
1716
|
+
load: z23.number().min(0),
|
|
1717
|
+
memory_used_bytes: nonNegInt,
|
|
1718
|
+
typechecks: nonNegInt
|
|
1719
|
+
});
|
|
1720
|
+
var ResourcesActivityParams = z23.strictObject({});
|
|
1721
|
+
var ResourcesActivityResult = z23.strictObject({
|
|
1722
|
+
/** False until the first reading (a second or two after start). */
|
|
1723
|
+
ready: z23.boolean(),
|
|
1724
|
+
sampled_at_ms: epochMs.nullable(),
|
|
1725
|
+
cores: z23.int().min(1),
|
|
1726
|
+
/** 1, 5 and 15 minute load averages. */
|
|
1727
|
+
load: z23.array(z23.number().min(0)).length(3),
|
|
1728
|
+
memory: z23.strictObject({
|
|
1729
|
+
total_bytes: nonNegInt,
|
|
1730
|
+
/** Activity Monitor's Memory Used: app memory + wired + compressed. */
|
|
1731
|
+
used_bytes: nonNegInt,
|
|
1732
|
+
/** Data held compressed, and the memory the compressor takes to hold it. */
|
|
1733
|
+
compressed_bytes: nonNegInt,
|
|
1734
|
+
compressor_bytes: nonNegInt,
|
|
1735
|
+
swap_used_bytes: nonNegInt,
|
|
1736
|
+
pressure: ResourcesPressure.nullable()
|
|
1737
|
+
}),
|
|
1738
|
+
verdict: ResourcesVerdict,
|
|
1739
|
+
typechecks: z23.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
|
|
1740
|
+
/** Heaviest first (1 GB weighs as much as 16 % of a core). */
|
|
1741
|
+
jobs: z23.array(ResourcesJob).max(200),
|
|
1742
|
+
/** The 15 heaviest by memory and the 15 busiest by CPU, together. */
|
|
1743
|
+
top: z23.array(ResourcesProcess).max(30),
|
|
1744
|
+
/** The last hour, oldest first. */
|
|
1745
|
+
history: z23.array(ResourcesSample).max(1200)
|
|
1746
|
+
});
|
|
1747
|
+
var ResourcesStopJobParams = z23.strictObject({ pid: z23.int().min(1) });
|
|
1748
|
+
var ResourcesStopJobResult = z23.strictObject({
|
|
1749
|
+
/** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
|
|
1750
|
+
processes: nonNegInt,
|
|
1751
|
+
/** It had finished before the request arrived. */
|
|
1752
|
+
already_finished: z23.boolean()
|
|
1753
|
+
});
|
|
1754
|
+
var ResourcesIncident = z23.strictObject({
|
|
1755
|
+
at_ms: epochMs,
|
|
1756
|
+
verdict: ResourcesVerdict,
|
|
1757
|
+
load: z23.number().min(0),
|
|
1758
|
+
memory_used_bytes: nonNegInt,
|
|
1759
|
+
compressed_bytes: nonNegInt,
|
|
1760
|
+
pressure: ResourcesPressure.nullable(),
|
|
1761
|
+
jobs: z23.array(
|
|
1762
|
+
z23.strictObject({
|
|
1763
|
+
kind: ResourcesJobKind,
|
|
1764
|
+
started_by: z23.string().max(64).nullable(),
|
|
1765
|
+
folder: z23.string().max(256).nullable(),
|
|
1766
|
+
command: z23.string().max(256),
|
|
1767
|
+
cpu_percent: z23.number().min(0),
|
|
1768
|
+
memory_bytes: nonNegInt,
|
|
1769
|
+
duplicates: z23.int().min(1)
|
|
1770
|
+
})
|
|
1771
|
+
).max(8)
|
|
1772
|
+
});
|
|
1773
|
+
var ResourcesIncidentsParams = z23.strictObject({ limit: z23.int().min(1).max(200).default(50) });
|
|
1774
|
+
var ResourcesIncidentsResult = z23.strictObject({
|
|
1775
|
+
/** Newest first; at most one a minute is written. */
|
|
1776
|
+
incidents: z23.array(ResourcesIncident).max(200)
|
|
1777
|
+
});
|
|
1663
1778
|
|
|
1664
1779
|
// src/schema/stack.ts
|
|
1665
1780
|
import { z as z24 } from "zod";
|
|
@@ -1855,9 +1970,10 @@ var ExecJobListResult = z27.strictObject({ jobs: z27.array(ExecJobInfo).max(64)
|
|
|
1855
1970
|
|
|
1856
1971
|
// src/schema/coding.ts
|
|
1857
1972
|
import { z as z28 } from "zod";
|
|
1973
|
+
import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN3 } from "@ai-matrx/kit/uuid";
|
|
1858
1974
|
var CodingServiceCredentials = z28.strictObject({
|
|
1859
1975
|
access_token: z28.string().min(16).max(16384),
|
|
1860
|
-
user_id: z28.string().regex(
|
|
1976
|
+
user_id: z28.string().regex(UUID_SHAPE_PATTERN3),
|
|
1861
1977
|
/** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
|
|
1862
1978
|
server_url: z28.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
|
|
1863
1979
|
});
|
|
@@ -2022,6 +2138,9 @@ var OPS = {
|
|
|
2022
2138
|
"power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
2023
2139
|
"power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2024
2140
|
"resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
2141
|
+
"resources.activity": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: "unary", since: "1.17", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2142
|
+
"resources.stop_job": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: "unary", since: "1.17", errors: ["NOT_FOUND", "CONFLICT", "AUTH_FORBIDDEN", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2143
|
+
"resources.incidents": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: "unary", since: "1.17", errors: ["INTERNAL"] },
|
|
2025
2144
|
"audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2026
2145
|
"audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
|
|
2027
2146
|
"audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -2256,6 +2375,20 @@ var NAMED_SCHEMAS = {
|
|
|
2256
2375
|
ResourcesDisk,
|
|
2257
2376
|
ResourcesSnapshotParams,
|
|
2258
2377
|
ResourcesSnapshotResult,
|
|
2378
|
+
ResourcesJobKind,
|
|
2379
|
+
ResourcesStrain,
|
|
2380
|
+
ResourcesPressure,
|
|
2381
|
+
ResourcesVerdict,
|
|
2382
|
+
ResourcesSample,
|
|
2383
|
+
ResourcesJob,
|
|
2384
|
+
ResourcesProcess,
|
|
2385
|
+
ResourcesActivityParams,
|
|
2386
|
+
ResourcesActivityResult,
|
|
2387
|
+
ResourcesStopJobParams,
|
|
2388
|
+
ResourcesStopJobResult,
|
|
2389
|
+
ResourcesIncident,
|
|
2390
|
+
ResourcesIncidentsParams,
|
|
2391
|
+
ResourcesIncidentsResult,
|
|
2259
2392
|
AudioDevice,
|
|
2260
2393
|
AudioDevicesParams,
|
|
2261
2394
|
AudioDevicesResult,
|
|
@@ -2407,7 +2540,8 @@ var FIELDS_SINCE = {
|
|
|
2407
2540
|
AppsAccountsUsageResult: { problem: "1.12" },
|
|
2408
2541
|
AppsAccountsResetsResult: { problem: "1.12" },
|
|
2409
2542
|
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" }
|
|
2543
|
+
AccountUsage: { plan: "1.13", credits: "1.13" },
|
|
2544
|
+
ResourcesDisk: { name: "1.17" }
|
|
2411
2545
|
};
|
|
2412
2546
|
var NULL_SINCE = {
|
|
2413
2547
|
"RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
|
|
@@ -2474,7 +2608,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
2474
2608
|
["apps.projects.move", [["chat", "ChatRow"]]],
|
|
2475
2609
|
["apps.chats.star", [["chat", "ChatRow"]]],
|
|
2476
2610
|
["apps.chats.place", [["chat", "ChatRow"]]],
|
|
2477
|
-
["apps.accounts.usage", [["accounts", "AccountUsage"]]]
|
|
2611
|
+
["apps.accounts.usage", [["accounts", "AccountUsage"]]],
|
|
2612
|
+
["resources.snapshot", [["disks", "ResourcesDisk"]]]
|
|
2478
2613
|
]);
|
|
2479
2614
|
function stripNested(value, nested, version) {
|
|
2480
2615
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
@@ -2535,7 +2670,7 @@ function forPeer(op, part, value, version) {
|
|
|
2535
2670
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
2536
2671
|
|
|
2537
2672
|
// src/contract.ts
|
|
2538
|
-
var CONTRACT_SHA256 = "
|
|
2673
|
+
var CONTRACT_SHA256 = "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
|
|
2539
2674
|
|
|
2540
2675
|
// src/close-policy.ts
|
|
2541
2676
|
var CLOSE_RULES = {
|
|
@@ -2595,7 +2730,7 @@ var TOOL_CATALOG = [
|
|
|
2595
2730
|
{ 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
2731
|
{ 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
2732
|
{ 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" },
|
|
2733
|
+
{ 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
2734
|
{ 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
2735
|
// ── 3. Personal apps and automation ──────────────────────────────────────────────────────────
|
|
2601
2736
|
{ 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 +3288,23 @@ export {
|
|
|
3153
3288
|
RequestMsg,
|
|
3154
3289
|
ResourceId,
|
|
3155
3290
|
ResourceInfo,
|
|
3291
|
+
ResourcesActivityParams,
|
|
3292
|
+
ResourcesActivityResult,
|
|
3156
3293
|
ResourcesDisk,
|
|
3294
|
+
ResourcesIncident,
|
|
3295
|
+
ResourcesIncidentsParams,
|
|
3296
|
+
ResourcesIncidentsResult,
|
|
3297
|
+
ResourcesJob,
|
|
3298
|
+
ResourcesJobKind,
|
|
3299
|
+
ResourcesPressure,
|
|
3300
|
+
ResourcesProcess,
|
|
3301
|
+
ResourcesSample,
|
|
3157
3302
|
ResourcesSnapshotParams,
|
|
3158
3303
|
ResourcesSnapshotResult,
|
|
3304
|
+
ResourcesStopJobParams,
|
|
3305
|
+
ResourcesStopJobResult,
|
|
3306
|
+
ResourcesStrain,
|
|
3307
|
+
ResourcesVerdict,
|
|
3159
3308
|
ResponseMsg,
|
|
3160
3309
|
SERVICES,
|
|
3161
3310
|
SERVICE_MAX_FRAME_BYTES,
|