@ai-matrx/desktop-protocol 0.21.73 → 0.21.74
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 +16 -0
- package/dist/{chunk-server-MK77KDKS.js → chunk-server-3L5JNEHY.js} +95 -5
- package/dist/chunk-server-3L5JNEHY.js.map +1 -0
- package/dist/client.cjs +72 -3
- 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 +1 -1
- package/dist/index.cjs +95 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +205 -6
- package/dist/index.d.ts +205 -6
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-ClCrYsEt.d.cts → models-BRm_O6a-.d.cts} +232 -1
- package/dist/{models-ClCrYsEt.d.ts → models-BRm_O6a-.d.ts} +232 -1
- package/dist/react.d.cts +68 -0
- package/dist/react.d.ts +68 -0
- package/generated/desktop-protocol.schema.json +377 -2
- package/package.json +2 -2
- package/dist/chunk-server-MK77KDKS.js.map +0 -1
package/dist/client.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var import_zod2 = require("zod");
|
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
146
146
|
var PROTOCOL_MAJOR = 1;
|
|
147
|
-
var PROTOCOL_MINOR =
|
|
147
|
+
var PROTOCOL_MINOR = 73;
|
|
148
148
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
149
149
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
150
150
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -3316,7 +3316,9 @@ var AccountUsage = import_zod31.z.strictObject({
|
|
|
3316
3316
|
* window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
|
|
3317
3317
|
* window is running (no use in the last reading, or the reading is over 5 hours old).
|
|
3318
3318
|
*/
|
|
3319
|
-
five_hour_resets_by_ms: epochMs.optional()
|
|
3319
|
+
five_hour_resets_by_ms: epochMs.optional(),
|
|
3320
|
+
/** 1.73: where the reading came from (absent = the app itself). */
|
|
3321
|
+
read_source: import_zod31.z.enum(["app", "claude_code"]).optional()
|
|
3320
3322
|
});
|
|
3321
3323
|
var AccountReset = import_zod31.z.strictObject({
|
|
3322
3324
|
window: ChatPlace,
|
|
@@ -3774,6 +3776,25 @@ var ElsewhereInstance = import_zod32.z.strictObject({
|
|
|
3774
3776
|
});
|
|
3775
3777
|
var AccountResetSource = import_zod32.z.enum(["app", "usage_history", "your_list"]);
|
|
3776
3778
|
var AccountGap = import_zod32.z.enum(["email", "plan", "usage"]);
|
|
3779
|
+
var AccountReadSource = import_zod32.z.enum(["app", "claude_code"]);
|
|
3780
|
+
var AccountProfile = import_zod32.z.strictObject({
|
|
3781
|
+
/** The person's name on the account. */
|
|
3782
|
+
name: import_zod32.z.string().max(200).nullable(),
|
|
3783
|
+
/** The organization the sign-in is in, and the person's role there. */
|
|
3784
|
+
org_name: import_zod32.z.string().max(200).nullable(),
|
|
3785
|
+
org_role: import_zod32.z.string().max(80).nullable(),
|
|
3786
|
+
/** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
|
|
3787
|
+
seat_tier: import_zod32.z.string().max(80).nullable(),
|
|
3788
|
+
rate_limit_tier: import_zod32.z.string().max(120).nullable(),
|
|
3789
|
+
billing: import_zod32.z.string().max(80).nullable(),
|
|
3790
|
+
trial_ends_ms: epochMs.nullable(),
|
|
3791
|
+
/** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
|
|
3792
|
+
subscription: import_zod32.z.string().max(80).nullable(),
|
|
3793
|
+
/** Where these facts were read (a short label: "Claude Code's sign-in"). */
|
|
3794
|
+
source: import_zod32.z.string().max(200),
|
|
3795
|
+
/** When the app last fetched them, when it says. */
|
|
3796
|
+
as_of_ms: epochMs.nullable()
|
|
3797
|
+
});
|
|
3777
3798
|
var AppAccount = import_zod32.z.strictObject({
|
|
3778
3799
|
app_key: AppKey,
|
|
3779
3800
|
/** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
|
|
@@ -3803,7 +3824,13 @@ var AppAccount = import_zod32.z.strictObject({
|
|
|
3803
3824
|
instances: import_zod32.z.array(ChatPlace).max(200),
|
|
3804
3825
|
first_seen_ms: epochMs.nullable(),
|
|
3805
3826
|
last_seen_ms: epochMs.nullable(),
|
|
3806
|
-
missing: import_zod32.z.array(AccountGap).max(3)
|
|
3827
|
+
missing: import_zod32.z.array(AccountGap).max(3),
|
|
3828
|
+
/** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
|
|
3829
|
+
profile: AccountProfile.optional(),
|
|
3830
|
+
/** 1.73: where the newest reading came from (absent = the app itself). */
|
|
3831
|
+
read_source: AccountReadSource.optional(),
|
|
3832
|
+
/** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
|
|
3833
|
+
session_cost_usd: import_zod32.z.number().nonnegative().optional()
|
|
3807
3834
|
});
|
|
3808
3835
|
var AppsInstancesListParams = import_zod32.z.strictObject({ app_key: AppKey, fresh: import_zod32.z.boolean().optional() });
|
|
3809
3836
|
var AppsInstancesListResult = import_zod32.z.strictObject({
|
|
@@ -3837,6 +3864,47 @@ var ProbeFact = import_zod32.z.strictObject({ key: import_zod32.z.string().max(2
|
|
|
3837
3864
|
var ProbeSource = import_zod32.z.strictObject({ source: import_zod32.z.string().max(120), instance: import_zod32.z.string().max(64).nullable(), facts: import_zod32.z.array(ProbeFact).max(500) });
|
|
3838
3865
|
var AppsChatsProbeParams = import_zod32.z.strictObject({ app_key: AppKey, chat_id: import_zod32.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
3839
3866
|
var AppsChatsProbeResult = import_zod32.z.strictObject({ app_key: AppKey, chat_id: import_zod32.z.string().max(128), sources: import_zod32.z.array(ProbeSource).max(200) });
|
|
3867
|
+
var McpTransport = import_zod32.z.enum(["stdio", "http", "sse", "unknown"]);
|
|
3868
|
+
var McpServerRow = import_zod32.z.strictObject({
|
|
3869
|
+
app_key: AppKey,
|
|
3870
|
+
/** The app's instance whose settings hold it ("main", a home's name). */
|
|
3871
|
+
instance: import_zod32.z.string().max(120),
|
|
3872
|
+
name: import_zod32.z.string().max(200),
|
|
3873
|
+
transport: McpTransport,
|
|
3874
|
+
/** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
|
|
3875
|
+
target: import_zod32.z.string().max(400).nullable(),
|
|
3876
|
+
/** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
|
|
3877
|
+
scope: import_zod32.z.string().max(400),
|
|
3878
|
+
/** Turned on or off in the app, when it records it. */
|
|
3879
|
+
enabled: import_zod32.z.boolean().nullable(),
|
|
3880
|
+
/** The settings file it was read from. */
|
|
3881
|
+
where: import_zod32.z.string().max(400)
|
|
3882
|
+
});
|
|
3883
|
+
var SetupFact = import_zod32.z.strictObject({ name: import_zod32.z.string().max(80), value: import_zod32.z.string().max(300) });
|
|
3884
|
+
var SetupItemKind = import_zod32.z.enum(["extension", "plugin", "marketplace", "model"]);
|
|
3885
|
+
var SetupItem = import_zod32.z.strictObject({
|
|
3886
|
+
kind: SetupItemKind,
|
|
3887
|
+
name: import_zod32.z.string().max(200),
|
|
3888
|
+
version: import_zod32.z.string().max(80).nullable(),
|
|
3889
|
+
/** Turned on or off, when the app records it. */
|
|
3890
|
+
enabled: import_zod32.z.boolean().nullable()
|
|
3891
|
+
});
|
|
3892
|
+
var AppSetup = import_zod32.z.strictObject({
|
|
3893
|
+
app_key: AppKey,
|
|
3894
|
+
instance: import_zod32.z.string().max(120),
|
|
3895
|
+
/** The folder its settings were read from. */
|
|
3896
|
+
where: import_zod32.z.string().max(400),
|
|
3897
|
+
facts: import_zod32.z.array(SetupFact).max(60),
|
|
3898
|
+
items: import_zod32.z.array(SetupItem).max(2e3),
|
|
3899
|
+
/** What could not be read there (shown, never hidden). */
|
|
3900
|
+
problems: import_zod32.z.array(import_zod32.z.string().max(300)).max(20)
|
|
3901
|
+
});
|
|
3902
|
+
var AppsSetupListParams = import_zod32.z.strictObject({ app_key: AppKey.optional() });
|
|
3903
|
+
var AppsSetupListResult = import_zod32.z.strictObject({
|
|
3904
|
+
setups: import_zod32.z.array(AppSetup).max(200),
|
|
3905
|
+
mcp: import_zod32.z.array(McpServerRow).max(2e3),
|
|
3906
|
+
problem: import_zod32.z.string().max(400).optional()
|
|
3907
|
+
});
|
|
3840
3908
|
|
|
3841
3909
|
// src/schema/browser.ts
|
|
3842
3910
|
var import_zod33 = require("zod");
|
|
@@ -4741,6 +4809,7 @@ var OPS = {
|
|
|
4741
4809
|
// 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
|
|
4742
4810
|
"apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4743
4811
|
"apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4812
|
+
"apps.setup.list": { params: AppsSetupListParams, result: AppsSetupListResult, kind: "unary", since: "1.73", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4744
4813
|
// 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
|
|
4745
4814
|
"apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4746
4815
|
"apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|