@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.74
|
|
4
|
+
|
|
5
|
+
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
|
+
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/desktop-protocol/src`.
|
|
7
|
+
|
|
3
8
|
## 0.21.73
|
|
4
9
|
### Protocol 1.72 — ours pushed into the apps
|
|
5
10
|
|
|
@@ -224,6 +229,17 @@ Changed shipped source files (2):
|
|
|
224
229
|
|
|
225
230
|
## 0.21.52
|
|
226
231
|
### Unreleased
|
|
232
|
+
### Protocol 1.73 — what each coding app keeps besides chats
|
|
233
|
+
|
|
234
|
+
- `AppAccount`: optional `profile` (`AccountProfile`: name, organization and role, seat and
|
|
235
|
+
rate-limit tiers, billing, trial end, Cursor's subscription status, where read and when), optional
|
|
236
|
+
`read_source` (`AccountReadSource`: `app` or `claude_code`, Claude Code's live-usage file read with
|
|
237
|
+
no network) and `session_cost_usd`. `AccountUsage`: optional `read_source`.
|
|
238
|
+
- New op `apps.setup.list` (`app_key?`): each app instance's settings (`SetupFact`), models,
|
|
239
|
+
plugins, marketplaces and extensions (`SetupItem`), and every MCP server (`McpServerRow`: name,
|
|
240
|
+
transport, URL or command, scope, on/off, file) — allow-listed fields only, never env or headers.
|
|
241
|
+
- Optional fields in FIELDS_SINCE, a new op since 1.73. Consumer action: none for an older client.
|
|
242
|
+
|
|
227
243
|
### Protocol 1.57 — the account a coding record belongs to, and each sign-in's usage
|
|
228
244
|
|
|
229
245
|
- `accountId` (optional) on `CodingSessionRecord`, `CodingDiscoveredChat`, `CodingRecentRow` and
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
|
|
8
8
|
var PROTOCOL_MAJOR = 1;
|
|
9
|
-
var PROTOCOL_MINOR =
|
|
9
|
+
var PROTOCOL_MINOR = 73;
|
|
10
10
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
11
11
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
12
12
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1476,7 +1476,9 @@ var AccountUsage = z14.strictObject({
|
|
|
1476
1476
|
* window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
|
|
1477
1477
|
* window is running (no use in the last reading, or the reading is over 5 hours old).
|
|
1478
1478
|
*/
|
|
1479
|
-
five_hour_resets_by_ms: epochMs.optional()
|
|
1479
|
+
five_hour_resets_by_ms: epochMs.optional(),
|
|
1480
|
+
/** 1.73: where the reading came from (absent = the app itself). */
|
|
1481
|
+
read_source: z14.enum(["app", "claude_code"]).optional()
|
|
1480
1482
|
});
|
|
1481
1483
|
var AccountReset = z14.strictObject({
|
|
1482
1484
|
window: ChatPlace,
|
|
@@ -1934,6 +1936,25 @@ var ElsewhereInstance = z15.strictObject({
|
|
|
1934
1936
|
});
|
|
1935
1937
|
var AccountResetSource = z15.enum(["app", "usage_history", "your_list"]);
|
|
1936
1938
|
var AccountGap = z15.enum(["email", "plan", "usage"]);
|
|
1939
|
+
var AccountReadSource = z15.enum(["app", "claude_code"]);
|
|
1940
|
+
var AccountProfile = z15.strictObject({
|
|
1941
|
+
/** The person's name on the account. */
|
|
1942
|
+
name: z15.string().max(200).nullable(),
|
|
1943
|
+
/** The organization the sign-in is in, and the person's role there. */
|
|
1944
|
+
org_name: z15.string().max(200).nullable(),
|
|
1945
|
+
org_role: z15.string().max(80).nullable(),
|
|
1946
|
+
/** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
|
|
1947
|
+
seat_tier: z15.string().max(80).nullable(),
|
|
1948
|
+
rate_limit_tier: z15.string().max(120).nullable(),
|
|
1949
|
+
billing: z15.string().max(80).nullable(),
|
|
1950
|
+
trial_ends_ms: epochMs.nullable(),
|
|
1951
|
+
/** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
|
|
1952
|
+
subscription: z15.string().max(80).nullable(),
|
|
1953
|
+
/** Where these facts were read (a short label: "Claude Code's sign-in"). */
|
|
1954
|
+
source: z15.string().max(200),
|
|
1955
|
+
/** When the app last fetched them, when it says. */
|
|
1956
|
+
as_of_ms: epochMs.nullable()
|
|
1957
|
+
});
|
|
1937
1958
|
var AppAccount = z15.strictObject({
|
|
1938
1959
|
app_key: AppKey,
|
|
1939
1960
|
/** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
|
|
@@ -1963,7 +1984,13 @@ var AppAccount = z15.strictObject({
|
|
|
1963
1984
|
instances: z15.array(ChatPlace).max(200),
|
|
1964
1985
|
first_seen_ms: epochMs.nullable(),
|
|
1965
1986
|
last_seen_ms: epochMs.nullable(),
|
|
1966
|
-
missing: z15.array(AccountGap).max(3)
|
|
1987
|
+
missing: z15.array(AccountGap).max(3),
|
|
1988
|
+
/** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
|
|
1989
|
+
profile: AccountProfile.optional(),
|
|
1990
|
+
/** 1.73: where the newest reading came from (absent = the app itself). */
|
|
1991
|
+
read_source: AccountReadSource.optional(),
|
|
1992
|
+
/** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
|
|
1993
|
+
session_cost_usd: z15.number().nonnegative().optional()
|
|
1967
1994
|
});
|
|
1968
1995
|
var AppsInstancesListParams = z15.strictObject({ app_key: AppKey, fresh: z15.boolean().optional() });
|
|
1969
1996
|
var AppsInstancesListResult = z15.strictObject({
|
|
@@ -1997,6 +2024,47 @@ var ProbeFact = z15.strictObject({ key: z15.string().max(200), value: z15.string
|
|
|
1997
2024
|
var ProbeSource = z15.strictObject({ source: z15.string().max(120), instance: z15.string().max(64).nullable(), facts: z15.array(ProbeFact).max(500) });
|
|
1998
2025
|
var AppsChatsProbeParams = z15.strictObject({ app_key: AppKey, chat_id: z15.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
1999
2026
|
var AppsChatsProbeResult = z15.strictObject({ app_key: AppKey, chat_id: z15.string().max(128), sources: z15.array(ProbeSource).max(200) });
|
|
2027
|
+
var McpTransport = z15.enum(["stdio", "http", "sse", "unknown"]);
|
|
2028
|
+
var McpServerRow = z15.strictObject({
|
|
2029
|
+
app_key: AppKey,
|
|
2030
|
+
/** The app's instance whose settings hold it ("main", a home's name). */
|
|
2031
|
+
instance: z15.string().max(120),
|
|
2032
|
+
name: z15.string().max(200),
|
|
2033
|
+
transport: McpTransport,
|
|
2034
|
+
/** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
|
|
2035
|
+
target: z15.string().max(400).nullable(),
|
|
2036
|
+
/** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
|
|
2037
|
+
scope: z15.string().max(400),
|
|
2038
|
+
/** Turned on or off in the app, when it records it. */
|
|
2039
|
+
enabled: z15.boolean().nullable(),
|
|
2040
|
+
/** The settings file it was read from. */
|
|
2041
|
+
where: z15.string().max(400)
|
|
2042
|
+
});
|
|
2043
|
+
var SetupFact = z15.strictObject({ name: z15.string().max(80), value: z15.string().max(300) });
|
|
2044
|
+
var SetupItemKind = z15.enum(["extension", "plugin", "marketplace", "model"]);
|
|
2045
|
+
var SetupItem = z15.strictObject({
|
|
2046
|
+
kind: SetupItemKind,
|
|
2047
|
+
name: z15.string().max(200),
|
|
2048
|
+
version: z15.string().max(80).nullable(),
|
|
2049
|
+
/** Turned on or off, when the app records it. */
|
|
2050
|
+
enabled: z15.boolean().nullable()
|
|
2051
|
+
});
|
|
2052
|
+
var AppSetup = z15.strictObject({
|
|
2053
|
+
app_key: AppKey,
|
|
2054
|
+
instance: z15.string().max(120),
|
|
2055
|
+
/** The folder its settings were read from. */
|
|
2056
|
+
where: z15.string().max(400),
|
|
2057
|
+
facts: z15.array(SetupFact).max(60),
|
|
2058
|
+
items: z15.array(SetupItem).max(2e3),
|
|
2059
|
+
/** What could not be read there (shown, never hidden). */
|
|
2060
|
+
problems: z15.array(z15.string().max(300)).max(20)
|
|
2061
|
+
});
|
|
2062
|
+
var AppsSetupListParams = z15.strictObject({ app_key: AppKey.optional() });
|
|
2063
|
+
var AppsSetupListResult = z15.strictObject({
|
|
2064
|
+
setups: z15.array(AppSetup).max(200),
|
|
2065
|
+
mcp: z15.array(McpServerRow).max(2e3),
|
|
2066
|
+
problem: z15.string().max(400).optional()
|
|
2067
|
+
});
|
|
2000
2068
|
|
|
2001
2069
|
// src/schema/service.ts
|
|
2002
2070
|
import { z as z16 } from "zod";
|
|
@@ -4673,6 +4741,7 @@ var OPS = {
|
|
|
4673
4741
|
// 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
|
|
4674
4742
|
"apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4675
4743
|
"apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4744
|
+
"apps.setup.list": { params: AppsSetupListParams, result: AppsSetupListResult, kind: "unary", since: "1.73", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4676
4745
|
// 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
|
|
4677
4746
|
"apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4678
4747
|
"apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -4969,6 +5038,16 @@ var NAMED_SCHEMAS = {
|
|
|
4969
5038
|
AppsInstancesListResult,
|
|
4970
5039
|
AppsAccountsListParams,
|
|
4971
5040
|
AppsAccountsListResult,
|
|
5041
|
+
AccountReadSource,
|
|
5042
|
+
AccountProfile,
|
|
5043
|
+
McpTransport,
|
|
5044
|
+
McpServerRow,
|
|
5045
|
+
SetupFact,
|
|
5046
|
+
SetupItemKind,
|
|
5047
|
+
SetupItem,
|
|
5048
|
+
AppSetup,
|
|
5049
|
+
AppsSetupListParams,
|
|
5050
|
+
AppsSetupListResult,
|
|
4972
5051
|
ProtocolVersion,
|
|
4973
5052
|
RequestId,
|
|
4974
5053
|
ResourceId,
|
|
@@ -5799,7 +5878,8 @@ var FIELDS_SINCE = {
|
|
|
5799
5878
|
AppsAccountsUsageResult: { problem: "1.12" },
|
|
5800
5879
|
AppsAccountsResetsResult: { problem: "1.12" },
|
|
5801
5880
|
ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59", title_sync: "1.61", moved: "1.62", home: "1.63", hidden: "1.70", pin_sync: "1.72" },
|
|
5802
|
-
AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
|
|
5881
|
+
AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25", read_source: "1.73" },
|
|
5882
|
+
AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73" },
|
|
5803
5883
|
ResourcesDisk: { name: "1.17" },
|
|
5804
5884
|
StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
|
|
5805
5885
|
AudioDevice: { kind: "1.24" },
|
|
@@ -6465,6 +6545,8 @@ export {
|
|
|
6465
6545
|
ElsewhereInstance,
|
|
6466
6546
|
AccountResetSource,
|
|
6467
6547
|
AccountGap,
|
|
6548
|
+
AccountReadSource,
|
|
6549
|
+
AccountProfile,
|
|
6468
6550
|
AppAccount,
|
|
6469
6551
|
AppsInstancesListParams,
|
|
6470
6552
|
AppsInstancesListResult,
|
|
@@ -6476,6 +6558,14 @@ export {
|
|
|
6476
6558
|
ProbeSource,
|
|
6477
6559
|
AppsChatsProbeParams,
|
|
6478
6560
|
AppsChatsProbeResult,
|
|
6561
|
+
McpTransport,
|
|
6562
|
+
McpServerRow,
|
|
6563
|
+
SetupFact,
|
|
6564
|
+
SetupItemKind,
|
|
6565
|
+
SetupItem,
|
|
6566
|
+
AppSetup,
|
|
6567
|
+
AppsSetupListParams,
|
|
6568
|
+
AppsSetupListResult,
|
|
6479
6569
|
SERVICE_MAX_FRAME_BYTES,
|
|
6480
6570
|
ServiceName,
|
|
6481
6571
|
ContractHash,
|
|
@@ -6984,4 +7074,4 @@ export {
|
|
|
6984
7074
|
closeRule,
|
|
6985
7075
|
isTerminalClose
|
|
6986
7076
|
};
|
|
6987
|
-
//# sourceMappingURL=chunk-server-
|
|
7077
|
+
//# sourceMappingURL=chunk-server-3L5JNEHY.js.map
|