@ai-matrx/desktop-protocol 0.17.6 → 0.17.8
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 +20 -0
- package/dist/client.cjs +122 -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 +122 -3
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +176 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +352 -6
- package/dist/index.d.ts +352 -6
- package/dist/index.js +176 -7
- package/dist/index.js.map +1 -1
- package/dist/{models-B9tM6Hnx.d.cts → models-B2PuTc6a.d.cts} +536 -1
- package/dist/{models-B9tM6Hnx.d.ts → models-B2PuTc6a.d.ts} +536 -1
- package/dist/react.d.cts +228 -0
- package/dist/react.d.ts +228 -0
- package/generated/desktop-protocol.schema.json +1005 -91
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.8
|
|
4
|
+
### (protocol 1.12)
|
|
5
|
+
|
|
6
|
+
- `apps.accounts.usage` and `apps.accounts.resets` gain optional `problem` (the rows are right, something around them failed, e.g. a newly read reset time could not be saved), stripped for peers below 1.12 (guard: versioning.test.ts "apps accounts 1.12").
|
|
7
|
+
|
|
8
|
+
Consumer action: none for older peers.
|
|
9
|
+
|
|
10
|
+
## 0.17.7
|
|
11
|
+
### (protocol 1.11)
|
|
12
|
+
|
|
13
|
+
- **The rest of the coding app's tools.** New ops `apps.chats.cold` (chats waiting with a warm
|
|
14
|
+
prompt cache: when each goes cold and what waking it costs; recently cold), `apps.chats.open`
|
|
15
|
+
(show one chat in its window, never sending it anything), `apps.spend` (today / 7 days at API list
|
|
16
|
+
prices per account, model and chat; helpers running now; idle cache re-saves; helper starting
|
|
17
|
+
sizes; alarms), `apps.sync.status` / `apps.sync.run` (the chat sync's health check, and run it
|
|
18
|
+
now), `apps.windows.processes` (what must quit before an app update), `apps.windows.add` and
|
|
19
|
+
`apps.windows.save_names`. New ops only.
|
|
20
|
+
|
|
21
|
+
Consumer action: none for older peers.
|
|
22
|
+
|
|
3
23
|
## 0.17.6
|
|
4
24
|
### (protocol 1.10)
|
|
5
25
|
|
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 = 12;
|
|
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_-]+$/);
|
|
@@ -1643,9 +1643,19 @@ var AccountReset = import_zod25.z.strictObject({
|
|
|
1643
1643
|
var AppsWindowsListParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1644
1644
|
var AppsWindowsListResult = import_zod25.z.strictObject({ app_key: AppKey, windows: import_zod25.z.array(AppWindowInfo).max(200) });
|
|
1645
1645
|
var AppsAccountsUsageParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1646
|
-
var AppsAccountsUsageResult = import_zod25.z.strictObject({
|
|
1646
|
+
var AppsAccountsUsageResult = import_zod25.z.strictObject({
|
|
1647
|
+
app_key: AppKey,
|
|
1648
|
+
accounts: import_zod25.z.array(AccountUsage).max(500),
|
|
1649
|
+
/** 1.12: the rows are right but something around them failed (a newly read reset time could not be saved); shown, never hidden. */
|
|
1650
|
+
problem: import_zod25.z.string().max(400).optional()
|
|
1651
|
+
});
|
|
1647
1652
|
var AppsAccountsResetsParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1648
|
-
var AppsAccountsResetsResult = import_zod25.z.strictObject({
|
|
1653
|
+
var AppsAccountsResetsResult = import_zod25.z.strictObject({
|
|
1654
|
+
app_key: AppKey,
|
|
1655
|
+
resets: import_zod25.z.array(AccountReset).max(200),
|
|
1656
|
+
/** 1.12: as on `apps.accounts.usage`. */
|
|
1657
|
+
problem: import_zod25.z.string().max(400).optional()
|
|
1658
|
+
});
|
|
1649
1659
|
var AppsWindowActionResult = import_zod25.z.strictObject({ message: import_zod25.z.string().max(400) });
|
|
1650
1660
|
var AppsWindowsOpenParams = import_zod25.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
1651
1661
|
var AppsWindowsReloadParams = import_zod25.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
@@ -1663,6 +1673,106 @@ var AppsProjectsCreateParams = import_zod25.z.strictObject({ app_key: AppKey, na
|
|
|
1663
1673
|
var AppsProjectsCreateResult = import_zod25.z.strictObject({ project: ChatProject });
|
|
1664
1674
|
var AppsProjectsImportPinsParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1665
1675
|
var AppsProjectsImportPinsResult = import_zod25.z.strictObject({ message: import_zod25.z.string().max(400) });
|
|
1676
|
+
var ColdChat = import_zod25.z.strictObject({
|
|
1677
|
+
id: ChatId,
|
|
1678
|
+
title: import_zod25.z.string().max(1e3),
|
|
1679
|
+
repo: import_zod25.z.string().max(200).nullable(),
|
|
1680
|
+
window: import_zod25.z.string().max(64).nullable(),
|
|
1681
|
+
account: import_zod25.z.string().max(320).nullable(),
|
|
1682
|
+
model_name: import_zod25.z.string().max(120).nullable(),
|
|
1683
|
+
context_tokens: nonNegInt,
|
|
1684
|
+
cold_at_ms: epochMs,
|
|
1685
|
+
/** Waking it once the cache is cold. */
|
|
1686
|
+
cold_cost: import_zod25.z.number().nullable(),
|
|
1687
|
+
/** Waking it while the cache is warm. */
|
|
1688
|
+
warm_cost: import_zod25.z.number().nullable(),
|
|
1689
|
+
/** Its account is on extra usage (a 5-minute cache, and real money). */
|
|
1690
|
+
extra_usage: import_zod25.z.boolean(),
|
|
1691
|
+
/** A scheduled routine's run. */
|
|
1692
|
+
scheduled: import_zod25.z.boolean(),
|
|
1693
|
+
/** It can be shown in its window (started in the desktop app). */
|
|
1694
|
+
openable: import_zod25.z.boolean(),
|
|
1695
|
+
/** How its window was decided, or why it can't be opened. */
|
|
1696
|
+
how: import_zod25.z.string().max(200).nullable()
|
|
1697
|
+
});
|
|
1698
|
+
var AppsChatsColdParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1699
|
+
var AppsChatsColdResult = import_zod25.z.strictObject({
|
|
1700
|
+
app_key: AppKey,
|
|
1701
|
+
/** Waiting for the person with a warm cache, most urgent first. */
|
|
1702
|
+
waiting: import_zod25.z.array(ColdChat).max(2e3),
|
|
1703
|
+
/** Went cold in the last while. */
|
|
1704
|
+
recently_cold: import_zod25.z.array(ColdChat).max(2e3),
|
|
1705
|
+
/** Chats working right now (not waiting). */
|
|
1706
|
+
working: nonNegInt
|
|
1707
|
+
});
|
|
1708
|
+
var AppsChatsOpenParams = import_zod25.z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
|
|
1709
|
+
var SpendSplit = import_zod25.z.strictObject({ main: import_zod25.z.number(), helpers: import_zod25.z.number() });
|
|
1710
|
+
var SpendScopes = import_zod25.z.strictObject({ today: SpendSplit, week: SpendSplit });
|
|
1711
|
+
var SpendAccount = import_zod25.z.strictObject({
|
|
1712
|
+
account: import_zod25.z.string().max(320),
|
|
1713
|
+
spend: SpendScopes,
|
|
1714
|
+
last_hour: import_zod25.z.number().nullable(),
|
|
1715
|
+
last_5h: import_zod25.z.number().nullable(),
|
|
1716
|
+
five_hour: import_zod25.z.number().nullable(),
|
|
1717
|
+
weekly: import_zod25.z.number().nullable(),
|
|
1718
|
+
as_of_ms: epochMs.nullable(),
|
|
1719
|
+
weekly_resets_at_ms: epochMs.nullable(),
|
|
1720
|
+
/** When the 5-hour or weekly limit is projected to be reached at the current burn. */
|
|
1721
|
+
five_hour_full_at_ms: epochMs.nullable(),
|
|
1722
|
+
weekly_full_at_ms: epochMs.nullable(),
|
|
1723
|
+
/** The reading is too old to project. */
|
|
1724
|
+
stale: import_zod25.z.boolean()
|
|
1725
|
+
});
|
|
1726
|
+
var SpendModel = import_zod25.z.strictObject({ model: import_zod25.z.string().max(120), name: import_zod25.z.string().max(120), spend: SpendScopes });
|
|
1727
|
+
var SpendChat = import_zod25.z.strictObject({
|
|
1728
|
+
id: ChatId,
|
|
1729
|
+
title: import_zod25.z.string().max(1e3),
|
|
1730
|
+
repo: import_zod25.z.string().max(200).nullable(),
|
|
1731
|
+
window: import_zod25.z.string().max(64).nullable(),
|
|
1732
|
+
spend: SpendScopes,
|
|
1733
|
+
helpers: nonNegInt
|
|
1734
|
+
});
|
|
1735
|
+
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) });
|
|
1736
|
+
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) });
|
|
1737
|
+
var SpendIdleScope = import_zod25.z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: import_zod25.z.number(), avoidable: import_zod25.z.number() });
|
|
1738
|
+
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 });
|
|
1739
|
+
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() });
|
|
1740
|
+
var AppsSpendParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1741
|
+
var AppsSpendResult = import_zod25.z.strictObject({
|
|
1742
|
+
app_key: AppKey,
|
|
1743
|
+
/** False while older chats are still being read. */
|
|
1744
|
+
complete: import_zod25.z.boolean(),
|
|
1745
|
+
today_total: import_zod25.z.number(),
|
|
1746
|
+
week_total: import_zod25.z.number(),
|
|
1747
|
+
idle_today: import_zod25.z.number(),
|
|
1748
|
+
idle_week: import_zod25.z.number(),
|
|
1749
|
+
/** Models with no known list price. */
|
|
1750
|
+
unpriced: import_zod25.z.array(import_zod25.z.string().max(120)).max(100),
|
|
1751
|
+
/** Helpers past their step budget, unusual starting sizes. */
|
|
1752
|
+
alarms: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1753
|
+
live: import_zod25.z.array(SpendLive).max(200),
|
|
1754
|
+
accounts: import_zod25.z.array(SpendAccount).max(200),
|
|
1755
|
+
models: import_zod25.z.array(SpendModel).max(100),
|
|
1756
|
+
chats: import_zod25.z.array(SpendChat).max(500),
|
|
1757
|
+
idle: import_zod25.z.array(SpendIdle).max(500),
|
|
1758
|
+
starts: import_zod25.z.array(SpendStart).max(200)
|
|
1759
|
+
});
|
|
1760
|
+
var AppsSyncStatusParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1761
|
+
var AppsSyncStatusResult = import_zod25.z.strictObject({
|
|
1762
|
+
healthy: import_zod25.z.boolean(),
|
|
1763
|
+
summary: import_zod25.z.string().max(400),
|
|
1764
|
+
problems: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1765
|
+
warnings: import_zod25.z.array(import_zod25.z.string().max(400)).max(200),
|
|
1766
|
+
/** Accounts seen with no saved name yet (Save account names fixes them). */
|
|
1767
|
+
unnamed_accounts: import_zod25.z.array(import_zod25.z.string().max(80)).max(200),
|
|
1768
|
+
/** The full report. */
|
|
1769
|
+
output: import_zod25.z.string().max(2e5)
|
|
1770
|
+
});
|
|
1771
|
+
var AppsSyncRunParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1772
|
+
var AppsWindowsProcessesParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1773
|
+
var AppsWindowsProcessesResult = import_zod25.z.strictObject({ processes: import_zod25.z.array(import_zod25.z.string().max(2e3)).max(2e3) });
|
|
1774
|
+
var AppsWindowsAddParams = import_zod25.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod25.z.string().min(3).max(320) });
|
|
1775
|
+
var AppsWindowsSaveNamesParams = import_zod25.z.strictObject({ app_key: AppKey });
|
|
1666
1776
|
|
|
1667
1777
|
// src/schema/registry.ts
|
|
1668
1778
|
var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
|
|
@@ -1721,6 +1831,15 @@ var OPS = {
|
|
|
1721
1831
|
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1722
1832
|
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1723
1833
|
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1834
|
+
// 1.11: Going cold, Spend, sync health, windows upkeep.
|
|
1835
|
+
"apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1836
|
+
"apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1837
|
+
"apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1838
|
+
"apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1839
|
+
"apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1840
|
+
"apps.windows.processes": { params: AppsWindowsProcessesParams, result: AppsWindowsProcessesResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1841
|
+
"apps.windows.add": { params: AppsWindowsAddParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1842
|
+
"apps.windows.save_names": { params: AppsWindowsSaveNamesParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1724
1843
|
"proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1725
1844
|
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1726
1845
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|