@ai-matrx/desktop-protocol 0.17.6 → 0.17.7
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 +13 -0
- package/dist/client.cjs +110 -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 +110 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +158 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +344 -6
- package/dist/index.d.ts +344 -6
- package/dist/index.js +158 -3
- package/dist/index.js.map +1 -1
- package/dist/{models-B9tM6Hnx.d.cts → models-Os6toG3X.d.cts} +532 -1
- package/dist/{models-B9tM6Hnx.d.ts → models-Os6toG3X.d.ts} +532 -1
- package/dist/react.d.cts +226 -0
- package/dist/react.d.ts +226 -0
- package/generated/desktop-protocol.schema.json +901 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.7
|
|
4
|
+
### (protocol 1.11)
|
|
5
|
+
|
|
6
|
+
- **The rest of the coding app's tools.** New ops `apps.chats.cold` (chats waiting with a warm
|
|
7
|
+
prompt cache: when each goes cold and what waking it costs; recently cold), `apps.chats.open`
|
|
8
|
+
(show one chat in its window, never sending it anything), `apps.spend` (today / 7 days at API list
|
|
9
|
+
prices per account, model and chat; helpers running now; idle cache re-saves; helper starting
|
|
10
|
+
sizes; alarms), `apps.sync.status` / `apps.sync.run` (the chat sync's health check, and run it
|
|
11
|
+
now), `apps.windows.processes` (what must quit before an app update), `apps.windows.add` and
|
|
12
|
+
`apps.windows.save_names`. New ops only.
|
|
13
|
+
|
|
14
|
+
Consumer action: none for older peers.
|
|
15
|
+
|
|
3
16
|
## 0.17.6
|
|
4
17
|
### (protocol 1.10)
|
|
5
18
|
|
package/dist/client.cjs
CHANGED
|
@@ -143,7 +143,7 @@ var import_zod2 = require("zod");
|
|
|
143
143
|
// src/schema/primitives.ts
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var PROTOCOL_MAJOR = 1;
|
|
146
|
-
var PROTOCOL_MINOR =
|
|
146
|
+
var PROTOCOL_MINOR = 11;
|
|
147
147
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
148
148
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
149
149
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1663,6 +1663,106 @@ var AppsProjectsCreateParams = import_zod25.z.strictObject({ app_key: AppKey, na
|
|
|
1663
1663
|
var AppsProjectsCreateResult = import_zod25.z.strictObject({ project: ChatProject });
|
|
1664
1664
|
var AppsProjectsImportPinsParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1665
1665
|
var AppsProjectsImportPinsResult = import_zod25.z.strictObject({ message: import_zod25.z.string().max(400) });
|
|
1666
|
+
var ColdChat = import_zod25.z.strictObject({
|
|
1667
|
+
id: ChatId,
|
|
1668
|
+
title: import_zod25.z.string().max(1e3),
|
|
1669
|
+
repo: import_zod25.z.string().max(200).nullable(),
|
|
1670
|
+
window: import_zod25.z.string().max(64).nullable(),
|
|
1671
|
+
account: import_zod25.z.string().max(320).nullable(),
|
|
1672
|
+
model_name: import_zod25.z.string().max(120).nullable(),
|
|
1673
|
+
context_tokens: nonNegInt,
|
|
1674
|
+
cold_at_ms: epochMs,
|
|
1675
|
+
/** Waking it once the cache is cold. */
|
|
1676
|
+
cold_cost: import_zod25.z.number().nullable(),
|
|
1677
|
+
/** Waking it while the cache is warm. */
|
|
1678
|
+
warm_cost: import_zod25.z.number().nullable(),
|
|
1679
|
+
/** Its account is on extra usage (a 5-minute cache, and real money). */
|
|
1680
|
+
extra_usage: import_zod25.z.boolean(),
|
|
1681
|
+
/** A scheduled routine's run. */
|
|
1682
|
+
scheduled: import_zod25.z.boolean(),
|
|
1683
|
+
/** It can be shown in its window (started in the desktop app). */
|
|
1684
|
+
openable: import_zod25.z.boolean(),
|
|
1685
|
+
/** How its window was decided, or why it can't be opened. */
|
|
1686
|
+
how: import_zod25.z.string().max(200).nullable()
|
|
1687
|
+
});
|
|
1688
|
+
var AppsChatsColdParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1689
|
+
var AppsChatsColdResult = import_zod25.z.strictObject({
|
|
1690
|
+
app_key: AppKey,
|
|
1691
|
+
/** Waiting for the person with a warm cache, most urgent first. */
|
|
1692
|
+
waiting: import_zod25.z.array(ColdChat).max(2e3),
|
|
1693
|
+
/** Went cold in the last while. */
|
|
1694
|
+
recently_cold: import_zod25.z.array(ColdChat).max(2e3),
|
|
1695
|
+
/** Chats working right now (not waiting). */
|
|
1696
|
+
working: nonNegInt
|
|
1697
|
+
});
|
|
1698
|
+
var AppsChatsOpenParams = import_zod25.z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
|
|
1699
|
+
var SpendSplit = import_zod25.z.strictObject({ main: import_zod25.z.number(), helpers: import_zod25.z.number() });
|
|
1700
|
+
var SpendScopes = import_zod25.z.strictObject({ today: SpendSplit, week: SpendSplit });
|
|
1701
|
+
var SpendAccount = import_zod25.z.strictObject({
|
|
1702
|
+
account: import_zod25.z.string().max(320),
|
|
1703
|
+
spend: SpendScopes,
|
|
1704
|
+
last_hour: import_zod25.z.number().nullable(),
|
|
1705
|
+
last_5h: import_zod25.z.number().nullable(),
|
|
1706
|
+
five_hour: import_zod25.z.number().nullable(),
|
|
1707
|
+
weekly: import_zod25.z.number().nullable(),
|
|
1708
|
+
as_of_ms: epochMs.nullable(),
|
|
1709
|
+
weekly_resets_at_ms: epochMs.nullable(),
|
|
1710
|
+
/** When the 5-hour or weekly limit is projected to be reached at the current burn. */
|
|
1711
|
+
five_hour_full_at_ms: epochMs.nullable(),
|
|
1712
|
+
weekly_full_at_ms: epochMs.nullable(),
|
|
1713
|
+
/** The reading is too old to project. */
|
|
1714
|
+
stale: import_zod25.z.boolean()
|
|
1715
|
+
});
|
|
1716
|
+
var SpendModel = import_zod25.z.strictObject({ model: import_zod25.z.string().max(120), name: import_zod25.z.string().max(120), spend: SpendScopes });
|
|
1717
|
+
var SpendChat = import_zod25.z.strictObject({
|
|
1718
|
+
id: ChatId,
|
|
1719
|
+
title: import_zod25.z.string().max(1e3),
|
|
1720
|
+
repo: import_zod25.z.string().max(200).nullable(),
|
|
1721
|
+
window: import_zod25.z.string().max(64).nullable(),
|
|
1722
|
+
spend: SpendScopes,
|
|
1723
|
+
helpers: nonNegInt
|
|
1724
|
+
});
|
|
1725
|
+
var SpendHelper = import_zod25.z.strictObject({ model: import_zod25.z.string().max(120), steps: nonNegInt, over_steps: import_zod25.z.boolean(), description: import_zod25.z.string().max(400) });
|
|
1726
|
+
var SpendLive = import_zod25.z.strictObject({ id: ChatId, title: import_zod25.z.string().max(1e3), window: import_zod25.z.string().max(64).nullable(), helpers: import_zod25.z.array(SpendHelper).max(200) });
|
|
1727
|
+
var SpendIdleScope = import_zod25.z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: import_zod25.z.number(), avoidable: import_zod25.z.number() });
|
|
1728
|
+
var SpendIdle = import_zod25.z.strictObject({ id: ChatId, chat: import_zod25.z.string().max(1e3), who: import_zod25.z.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });
|
|
1729
|
+
var SpendStart = import_zod25.z.strictObject({ repo: import_zod25.z.string().max(200), count: nonNegInt, median: nonNegInt, latest: import_zod25.z.array(nonNegInt).max(20), alarm: import_zod25.z.string().max(400).nullable() });
|
|
1730
|
+
var AppsSpendParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1731
|
+
var AppsSpendResult = import_zod25.z.strictObject({
|
|
1732
|
+
app_key: AppKey,
|
|
1733
|
+
/** False while older chats are still being read. */
|
|
1734
|
+
complete: import_zod25.z.boolean(),
|
|
1735
|
+
today_total: import_zod25.z.number(),
|
|
1736
|
+
week_total: import_zod25.z.number(),
|
|
1737
|
+
idle_today: import_zod25.z.number(),
|
|
1738
|
+
idle_week: import_zod25.z.number(),
|
|
1739
|
+
/** Models with no known list price. */
|
|
1740
|
+
unpriced: import_zod25.z.array(import_zod25.z.string().max(120)).max(100),
|
|
1741
|
+
/** Helpers past their step budget, unusual starting sizes. */
|
|
1742
|
+
alarms: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1743
|
+
live: import_zod25.z.array(SpendLive).max(200),
|
|
1744
|
+
accounts: import_zod25.z.array(SpendAccount).max(200),
|
|
1745
|
+
models: import_zod25.z.array(SpendModel).max(100),
|
|
1746
|
+
chats: import_zod25.z.array(SpendChat).max(500),
|
|
1747
|
+
idle: import_zod25.z.array(SpendIdle).max(500),
|
|
1748
|
+
starts: import_zod25.z.array(SpendStart).max(200)
|
|
1749
|
+
});
|
|
1750
|
+
var AppsSyncStatusParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1751
|
+
var AppsSyncStatusResult = import_zod25.z.strictObject({
|
|
1752
|
+
healthy: import_zod25.z.boolean(),
|
|
1753
|
+
summary: import_zod25.z.string().max(400),
|
|
1754
|
+
problems: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1755
|
+
warnings: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1756
|
+
/** Accounts seen with no saved name yet (Save account names fixes them). */
|
|
1757
|
+
unnamed_accounts: import_zod25.z.array(import_zod25.z.string().max(80)).max(200),
|
|
1758
|
+
/** The full report. */
|
|
1759
|
+
output: import_zod25.z.string().max(2e5)
|
|
1760
|
+
});
|
|
1761
|
+
var AppsSyncRunParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1762
|
+
var AppsWindowsProcessesParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1763
|
+
var AppsWindowsProcessesResult = import_zod25.z.strictObject({ processes: import_zod25.z.array(import_zod25.z.string().max(2e3)).max(2e3) });
|
|
1764
|
+
var AppsWindowsAddParams = import_zod25.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod25.z.string().min(3).max(320) });
|
|
1765
|
+
var AppsWindowsSaveNamesParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1666
1766
|
|
|
1667
1767
|
// src/schema/registry.ts
|
|
1668
1768
|
var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
|
|
@@ -1721,6 +1821,15 @@ var OPS = {
|
|
|
1721
1821
|
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1722
1822
|
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1723
1823
|
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1824
|
+
// 1.11: Going cold, Spend, sync health, windows upkeep.
|
|
1825
|
+
"apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1826
|
+
"apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1827
|
+
"apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1828
|
+
"apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1829
|
+
"apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1830
|
+
"apps.windows.processes": { params: AppsWindowsProcessesParams, result: AppsWindowsProcessesResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1831
|
+
"apps.windows.add": { params: AppsWindowsAddParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1832
|
+
"apps.windows.save_names": { params: AppsWindowsSaveNamesParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1724
1833
|
"proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1725
1834
|
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1726
1835
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|