@linkshell/wire 0.2.30 → 0.2.31

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/dist/rpc.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { mcpMethods } from "./rpc-mcp.js";
3
+ import { lsaMethods } from "./lsa.js";
3
4
  export declare const rpcIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4
5
  export type RpcId = z.infer<typeof rpcIdSchema>;
5
6
  export declare const rpcErrorSchema: z.ZodObject<{
@@ -44,8 +45,70 @@ export declare const RPC_APP_ERROR = -32000;
44
45
  * 1: side conversations (`sessions.side`), `machine.info.protocol` itself.
45
46
  * 2: session terminals (`terminals.create` `sessionId`, `TerminalInfo.sessionId`).
46
47
  * 3: whole-computer CPU and physical memory sampling (`machine.metrics`).
48
+ * 4: smart keep-awake & battery telemetry (`machine.keepAwake`), real git working-tree
49
+ * diff/revert (`git.diff`, `git.revertFile`), fast `@file` search (`fs.projectFiles`),
50
+ * clipboard & screen privacy (`clipboard.*`, `screen.privacy`), push-to-start wakeup
51
+ * (`liveActivities.registerPushToStart`), and LSA Phase 1 steward RPCs (`lsa.*`).
47
52
  */
48
- export declare const HOST_PROTOCOL = 3;
53
+ export declare const HOST_PROTOCOL = 4;
54
+ export declare const gitDiffFileStatusSchema: z.ZodEnum<{
55
+ modified: "modified";
56
+ added: "added";
57
+ deleted: "deleted";
58
+ renamed: "renamed";
59
+ untracked: "untracked";
60
+ }>;
61
+ export type GitDiffFileStatus = z.infer<typeof gitDiffFileStatusSchema>;
62
+ export declare const gitDiffFileSchema: z.ZodObject<{
63
+ path: z.ZodString;
64
+ oldPath: z.ZodOptional<z.ZodString>;
65
+ status: z.ZodEnum<{
66
+ modified: "modified";
67
+ added: "added";
68
+ deleted: "deleted";
69
+ renamed: "renamed";
70
+ untracked: "untracked";
71
+ }>;
72
+ oldText: z.ZodString;
73
+ newText: z.ZodString;
74
+ additions: z.ZodNumber;
75
+ deletions: z.ZodNumber;
76
+ binary: z.ZodOptional<z.ZodBoolean>;
77
+ }, z.core.$strip>;
78
+ export type GitDiffFile = z.infer<typeof gitDiffFileSchema>;
79
+ export declare const gitDiffResultSchema: z.ZodObject<{
80
+ files: z.ZodArray<z.ZodObject<{
81
+ path: z.ZodString;
82
+ oldPath: z.ZodOptional<z.ZodString>;
83
+ status: z.ZodEnum<{
84
+ modified: "modified";
85
+ added: "added";
86
+ deleted: "deleted";
87
+ renamed: "renamed";
88
+ untracked: "untracked";
89
+ }>;
90
+ oldText: z.ZodString;
91
+ newText: z.ZodString;
92
+ additions: z.ZodNumber;
93
+ deletions: z.ZodNumber;
94
+ binary: z.ZodOptional<z.ZodBoolean>;
95
+ }, z.core.$strip>>;
96
+ truncated: z.ZodBoolean;
97
+ branch: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strip>;
99
+ export type GitDiffResult = z.infer<typeof gitDiffResultSchema>;
100
+ export declare const projectFileEntrySchema: z.ZodObject<{
101
+ path: z.ZodString;
102
+ relativePath: z.ZodString;
103
+ isDir: z.ZodOptional<z.ZodBoolean>;
104
+ }, z.core.$strip>;
105
+ export type ProjectFileEntry = z.infer<typeof projectFileEntrySchema>;
106
+ export declare const screenPrivacyStateSchema: z.ZodObject<{
107
+ curtain: z.ZodBoolean;
108
+ lockOnDisconnect: z.ZodBoolean;
109
+ supported: z.ZodBoolean;
110
+ }, z.core.$strip>;
111
+ export type ScreenPrivacyState = z.infer<typeof screenPrivacyStateSchema>;
49
112
  export declare const directoryEntrySchema: z.ZodObject<{
50
113
  name: z.ZodString;
51
114
  path: z.ZodString;
@@ -878,6 +941,7 @@ declare const coreMethods: {
878
941
  cacheReadTokens: z.ZodNumber;
879
942
  cacheWriteTokens: z.ZodNumber;
880
943
  totalTokens: z.ZodNumber;
944
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
881
945
  }, z.core.$strip>;
882
946
  daily: z.ZodArray<z.ZodObject<{
883
947
  records: z.ZodNumber;
@@ -887,6 +951,7 @@ declare const coreMethods: {
887
951
  cacheReadTokens: z.ZodNumber;
888
952
  cacheWriteTokens: z.ZodNumber;
889
953
  totalTokens: z.ZodNumber;
954
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
890
955
  date: z.ZodString;
891
956
  }, z.core.$strip>>;
892
957
  models: z.ZodArray<z.ZodObject<{
@@ -897,6 +962,7 @@ declare const coreMethods: {
897
962
  cacheReadTokens: z.ZodNumber;
898
963
  cacheWriteTokens: z.ZodNumber;
899
964
  totalTokens: z.ZodNumber;
965
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
900
966
  agent: z.ZodString;
901
967
  model: z.ZodString;
902
968
  }, z.core.$strip>>;
@@ -914,7 +980,13 @@ declare const coreMethods: {
914
980
  records: z.ZodNumber;
915
981
  totalTokens: z.ZodNumber;
916
982
  note: z.ZodString;
983
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
917
984
  }, z.core.$strip>>>;
985
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
986
+ remoteStats: z.ZodOptional<z.ZodObject<{
987
+ remoteTurns: z.ZodNumber;
988
+ remoteApprovals: z.ZodNumber;
989
+ }, z.core.$strip>>;
918
990
  warnings: z.ZodArray<z.ZodString>;
919
991
  }, z.core.$strip>;
920
992
  };
@@ -934,6 +1006,23 @@ declare const coreMethods: {
934
1006
  }, z.core.$strip>;
935
1007
  readonly result: z.ZodObject<{}, z.core.$strip>;
936
1008
  };
1009
+ readonly "liveActivities.registerPushToStart": {
1010
+ readonly params: z.ZodObject<{
1011
+ deviceId: z.ZodString;
1012
+ pushToStartToken: z.ZodString;
1013
+ platform: z.ZodEnum<{
1014
+ ios: "ios";
1015
+ android: "android";
1016
+ }>;
1017
+ serviceUrl: z.ZodURL;
1018
+ grant: z.ZodString;
1019
+ expiresAt: z.ZodNumber;
1020
+ computerKey: z.ZodString;
1021
+ }, z.core.$strip>;
1022
+ readonly result: z.ZodObject<{
1023
+ ok: z.ZodOptional<z.ZodBoolean>;
1024
+ }, z.core.$loose>;
1025
+ };
937
1026
  readonly "machine.info": {
938
1027
  readonly params: z.ZodObject<{}, z.core.$loose>;
939
1028
  readonly result: z.ZodObject<{
@@ -1012,6 +1101,20 @@ declare const coreMethods: {
1012
1101
  usedBytes: z.ZodNumber;
1013
1102
  availableBytes: z.ZodNumber;
1014
1103
  }, z.core.$strip>>;
1104
+ power: z.ZodOptional<z.ZodObject<{
1105
+ onBattery: z.ZodBoolean;
1106
+ percent: z.ZodNullable<z.ZodNumber>;
1107
+ charging: z.ZodOptional<z.ZodBoolean>;
1108
+ }, z.core.$strip>>;
1109
+ keepAwake: z.ZodOptional<z.ZodObject<{
1110
+ mode: z.ZodEnum<{
1111
+ smart: "smart";
1112
+ always: "always";
1113
+ off: "off";
1114
+ }>;
1115
+ active: z.ZodBoolean;
1116
+ reason: z.ZodOptional<z.ZodString>;
1117
+ }, z.core.$strip>>;
1015
1118
  history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1016
1119
  sampledAt: z.ZodNumber;
1017
1120
  sampleIntervalMs: z.ZodNumber;
@@ -1032,9 +1135,41 @@ declare const coreMethods: {
1032
1135
  usedBytes: z.ZodNumber;
1033
1136
  availableBytes: z.ZodNumber;
1034
1137
  }, z.core.$strip>>;
1138
+ power: z.ZodOptional<z.ZodObject<{
1139
+ onBattery: z.ZodBoolean;
1140
+ percent: z.ZodNullable<z.ZodNumber>;
1141
+ charging: z.ZodOptional<z.ZodBoolean>;
1142
+ }, z.core.$strip>>;
1143
+ keepAwake: z.ZodOptional<z.ZodObject<{
1144
+ mode: z.ZodEnum<{
1145
+ smart: "smart";
1146
+ always: "always";
1147
+ off: "off";
1148
+ }>;
1149
+ active: z.ZodBoolean;
1150
+ reason: z.ZodOptional<z.ZodString>;
1151
+ }, z.core.$strip>>;
1035
1152
  }, z.core.$strip>>>;
1036
1153
  }, z.core.$strip>;
1037
1154
  };
1155
+ readonly "machine.keepAwake": {
1156
+ readonly params: z.ZodObject<{
1157
+ mode: z.ZodOptional<z.ZodEnum<{
1158
+ smart: "smart";
1159
+ always: "always";
1160
+ off: "off";
1161
+ }>>;
1162
+ }, z.core.$strip>;
1163
+ readonly result: z.ZodObject<{
1164
+ mode: z.ZodEnum<{
1165
+ smart: "smart";
1166
+ always: "always";
1167
+ off: "off";
1168
+ }>;
1169
+ active: z.ZodBoolean;
1170
+ reason: z.ZodOptional<z.ZodString>;
1171
+ }, z.core.$strip>;
1172
+ };
1038
1173
  readonly "machine.rename": {
1039
1174
  /** Empty restores the configured default; names never change peer identities. */
1040
1175
  readonly params: z.ZodObject<{
@@ -1460,8 +1595,8 @@ declare const coreMethods: {
1460
1595
  category: z.ZodDefault<z.ZodEnum<{
1461
1596
  model: "model";
1462
1597
  other: "other";
1463
- model_config: "model_config";
1464
1598
  mode: "mode";
1599
+ model_config: "model_config";
1465
1600
  effort: "effort";
1466
1601
  }>>;
1467
1602
  current: z.ZodString;
@@ -3838,8 +3973,8 @@ declare const coreMethods: {
3838
3973
  category: z.ZodDefault<z.ZodEnum<{
3839
3974
  model: "model";
3840
3975
  other: "other";
3841
- model_config: "model_config";
3842
3976
  mode: "mode";
3977
+ model_config: "model_config";
3843
3978
  effort: "effort";
3844
3979
  }>>;
3845
3980
  current: z.ZodString;
@@ -5529,8 +5664,8 @@ declare const coreMethods: {
5529
5664
  category: z.ZodDefault<z.ZodEnum<{
5530
5665
  model: "model";
5531
5666
  other: "other";
5532
- model_config: "model_config";
5533
5667
  mode: "mode";
5668
+ model_config: "model_config";
5534
5669
  effort: "effort";
5535
5670
  }>>;
5536
5671
  current: z.ZodString;
@@ -6173,8 +6308,8 @@ declare const coreMethods: {
6173
6308
  readonly result: z.ZodObject<{
6174
6309
  delivery: z.ZodEnum<{
6175
6310
  started: "started";
6176
- steered: "steered";
6177
6311
  queued: "queued";
6312
+ steered: "steered";
6178
6313
  duplicate: "duplicate";
6179
6314
  }>;
6180
6315
  }, z.core.$strip>;
@@ -7125,7 +7260,48 @@ declare const coreMethods: {
7125
7260
  branch: z.ZodOptional<z.ZodString>;
7126
7261
  head: z.ZodOptional<z.ZodString>;
7127
7262
  dirty: z.ZodBoolean;
7263
+ remote: z.ZodOptional<z.ZodString>;
7264
+ rootCommit: z.ZodOptional<z.ZodString>;
7265
+ }, z.core.$strip>>;
7266
+ }, z.core.$strip>;
7267
+ };
7268
+ /** Real git working-tree diff (or against `base`), bounded by `maxBytes` and including untracked text files by default. */
7269
+ readonly "git.diff": {
7270
+ readonly params: z.ZodObject<{
7271
+ cwd: z.ZodString;
7272
+ base: z.ZodOptional<z.ZodString>;
7273
+ includeUntracked: z.ZodOptional<z.ZodBoolean>;
7274
+ maxBytes: z.ZodOptional<z.ZodNumber>;
7275
+ }, z.core.$strip>;
7276
+ readonly result: z.ZodObject<{
7277
+ files: z.ZodArray<z.ZodObject<{
7278
+ path: z.ZodString;
7279
+ oldPath: z.ZodOptional<z.ZodString>;
7280
+ status: z.ZodEnum<{
7281
+ modified: "modified";
7282
+ added: "added";
7283
+ deleted: "deleted";
7284
+ renamed: "renamed";
7285
+ untracked: "untracked";
7286
+ }>;
7287
+ oldText: z.ZodString;
7288
+ newText: z.ZodString;
7289
+ additions: z.ZodNumber;
7290
+ deletions: z.ZodNumber;
7291
+ binary: z.ZodOptional<z.ZodBoolean>;
7128
7292
  }, z.core.$strip>>;
7293
+ truncated: z.ZodBoolean;
7294
+ branch: z.ZodOptional<z.ZodString>;
7295
+ }, z.core.$strip>;
7296
+ };
7297
+ /** Restores a tracked file or removes an untracked file strictly inside the repository root. */
7298
+ readonly "git.revertFile": {
7299
+ readonly params: z.ZodObject<{
7300
+ cwd: z.ZodString;
7301
+ path: z.ZodString;
7302
+ }, z.core.$strip>;
7303
+ readonly result: z.ZodObject<{
7304
+ ok: z.ZodBoolean;
7129
7305
  }, z.core.$strip>;
7130
7306
  };
7131
7307
  /** The worktrees LinkShell made, newest first. */
@@ -7259,6 +7435,36 @@ declare const coreMethods: {
7259
7435
  truncated: z.ZodBoolean;
7260
7436
  }, z.core.$strip>;
7261
7437
  };
7438
+ /** Fast project file listing under `cwd` (`git ls-files` with directory walk fallback) for `@file` autocomplete. */
7439
+ readonly "fs.projectFiles": {
7440
+ readonly params: z.ZodObject<{
7441
+ cwd: z.ZodString;
7442
+ query: z.ZodOptional<z.ZodString>;
7443
+ limit: z.ZodOptional<z.ZodNumber>;
7444
+ }, z.core.$strip>;
7445
+ readonly result: z.ZodObject<{
7446
+ files: z.ZodArray<z.ZodObject<{
7447
+ path: z.ZodString;
7448
+ relativePath: z.ZodString;
7449
+ isDir: z.ZodOptional<z.ZodBoolean>;
7450
+ }, z.core.$strip>>;
7451
+ truncated: z.ZodBoolean;
7452
+ }, z.core.$strip>;
7453
+ };
7454
+ readonly "clipboard.read": {
7455
+ readonly params: z.ZodObject<{}, z.core.$loose>;
7456
+ readonly result: z.ZodObject<{
7457
+ text: z.ZodString;
7458
+ }, z.core.$strip>;
7459
+ };
7460
+ readonly "clipboard.write": {
7461
+ readonly params: z.ZodObject<{
7462
+ text: z.ZodString;
7463
+ }, z.core.$strip>;
7464
+ readonly result: z.ZodObject<{
7465
+ ok: z.ZodBoolean;
7466
+ }, z.core.$strip>;
7467
+ };
7262
7468
  readonly "terminals.list": {
7263
7469
  readonly params: z.ZodObject<{}, z.core.$loose>;
7264
7470
  readonly result: z.ZodObject<{
@@ -7479,6 +7685,18 @@ declare const coreMethods: {
7479
7685
  problem: z.ZodOptional<z.ZodString>;
7480
7686
  }, z.core.$strip>;
7481
7687
  };
7688
+ /** Privacy curtain (dim/blank physical screen while viewing remotely) and auto-lock on disconnect. */
7689
+ readonly "screen.privacy": {
7690
+ readonly params: z.ZodObject<{
7691
+ curtain: z.ZodOptional<z.ZodBoolean>;
7692
+ lockOnDisconnect: z.ZodOptional<z.ZodBoolean>;
7693
+ }, z.core.$strip>;
7694
+ readonly result: z.ZodObject<{
7695
+ curtain: z.ZodBoolean;
7696
+ lockOnDisconnect: z.ZodBoolean;
7697
+ supported: z.ZodBoolean;
7698
+ }, z.core.$strip>;
7699
+ };
7482
7700
  /** Bytes to the host's end of a stream (base64). */
7483
7701
  readonly "proxy.write": {
7484
7702
  readonly params: z.ZodObject<{
@@ -7494,7 +7712,7 @@ declare const coreMethods: {
7494
7712
  readonly result: z.ZodObject<{}, z.core.$loose>;
7495
7713
  };
7496
7714
  };
7497
- export declare const methods: typeof coreMethods & typeof acpMethods & typeof mcpMethods;
7715
+ export declare const methods: typeof coreMethods & typeof acpMethods & typeof mcpMethods & typeof lsaMethods;
7498
7716
  export type MethodName = keyof typeof methods;
7499
7717
  export type MethodParams<M extends MethodName> = z.input<(typeof methods)[M]["params"]>;
7500
7718
  export type MethodResult<M extends MethodName> = z.infer<(typeof methods)[M]["result"]>;
@@ -9101,8 +9319,8 @@ export declare const notifications: {
9101
9319
  category: z.ZodDefault<z.ZodEnum<{
9102
9320
  model: "model";
9103
9321
  other: "other";
9104
- model_config: "model_config";
9105
9322
  mode: "mode";
9323
+ model_config: "model_config";
9106
9324
  effort: "effort";
9107
9325
  }>>;
9108
9326
  current: z.ZodString;
@@ -9854,6 +10072,18 @@ export declare const notifications: {
9854
10072
  streamId: z.ZodString;
9855
10073
  error: z.ZodOptional<z.ZodString>;
9856
10074
  }, z.core.$strip>;
10075
+ /** Zero-plaintext transition wakeup metadata. */
10076
+ readonly "liveActivities.wakeup": z.ZodObject<{
10077
+ machineId: z.ZodString;
10078
+ sessionId: z.ZodString;
10079
+ eventType: z.ZodEnum<{
10080
+ error: "error";
10081
+ completed: "completed";
10082
+ question: "question";
10083
+ approval: "approval";
10084
+ }>;
10085
+ createdAt: z.ZodNumber;
10086
+ }, z.core.$strip>;
9857
10087
  };
9858
10088
  export type NotificationName = keyof typeof notifications;
9859
10089
  export type NotificationParams<N extends NotificationName> = z.infer<(typeof notifications)[N]>;
package/dist/rpc.js CHANGED
@@ -3,11 +3,12 @@ import { usageQuerySchema, usageReportSchema } from "./usage.js";
3
3
  import { goalChangeSchema, sessionGoalSchema } from "./goal.js";
4
4
  import { acpAgentSettingsSchema, acpFeaturesSchema, acpRemoteAgentSchema, acpProviderSchema } from "./acp.js";
5
5
  import { editorRequestSchema, editorResultSchema } from "./editor.js";
6
- import { liveActivityIdSchema, liveActivitySubscriptionSchema } from "./live-activity.js";
7
- import { backgroundTaskSchema, agentInfoSchema, gatewayStatusSchema, machineInfoSchema, machineMetricsSnapshotSchema, portInfoSchema, projectSummarySchema, terminalInfoSchema, sessionDriverSchema, sessionSummarySchema, subagentInfoSchema, gitInfoSchema, worktreeEntrySchema, questionAnswerSchema, pendingPermissionSchema, } from "./model.js";
6
+ import { liveActivityIdSchema, liveActivityPushToStartSchema, liveActivitySubscriptionSchema, wakeupNoticeSchema } from "./live-activity.js";
7
+ import { backgroundTaskSchema, agentInfoSchema, gatewayStatusSchema, keepAwakeModeSchema, machineInfoSchema, machineKeepAwakeSchema, machineMetricsSnapshotSchema, portInfoSchema, projectSummarySchema, terminalInfoSchema, sessionDriverSchema, sessionSummarySchema, subagentInfoSchema, gitInfoSchema, worktreeEntrySchema, questionAnswerSchema, pendingPermissionSchema, } from "./model.js";
8
8
  import { contentBlockSchema, sessionConfigOptionSchema, sessionEventSchema, sessionNoticeSchema } from "./updates.js";
9
9
  import { sideChatSchema } from "./side.js";
10
10
  import { mcpMethods } from "./rpc-mcp.js";
11
+ import { lsaMethods } from "./lsa.js";
11
12
  // ── JSON-RPC 2.0 framing ─────────────────────────────────────────────
12
13
  export const rpcIdSchema = z.union([z.string(), z.number()]);
13
14
  export const rpcErrorSchema = z.object({
@@ -49,9 +50,39 @@ export const RPC_APP_ERROR = -32000;
49
50
  * 1: side conversations (`sessions.side`), `machine.info.protocol` itself.
50
51
  * 2: session terminals (`terminals.create` `sessionId`, `TerminalInfo.sessionId`).
51
52
  * 3: whole-computer CPU and physical memory sampling (`machine.metrics`).
53
+ * 4: smart keep-awake & battery telemetry (`machine.keepAwake`), real git working-tree
54
+ * diff/revert (`git.diff`, `git.revertFile`), fast `@file` search (`fs.projectFiles`),
55
+ * clipboard & screen privacy (`clipboard.*`, `screen.privacy`), push-to-start wakeup
56
+ * (`liveActivities.registerPushToStart`), and LSA Phase 1 steward RPCs (`lsa.*`).
52
57
  */
53
- export const HOST_PROTOCOL = 3;
58
+ export const HOST_PROTOCOL = 4;
54
59
  const empty = z.looseObject({});
60
+ export const gitDiffFileStatusSchema = z.enum(["modified", "added", "deleted", "renamed", "untracked"]);
61
+ export const gitDiffFileSchema = z.object({
62
+ path: z.string(),
63
+ oldPath: z.string().optional(),
64
+ status: gitDiffFileStatusSchema,
65
+ oldText: z.string(),
66
+ newText: z.string(),
67
+ additions: z.number().int().nonnegative(),
68
+ deletions: z.number().int().nonnegative(),
69
+ binary: z.boolean().optional(),
70
+ });
71
+ export const gitDiffResultSchema = z.object({
72
+ files: z.array(gitDiffFileSchema),
73
+ truncated: z.boolean(),
74
+ branch: z.string().optional(),
75
+ });
76
+ export const projectFileEntrySchema = z.object({
77
+ path: z.string(),
78
+ relativePath: z.string(),
79
+ isDir: z.boolean().optional(),
80
+ });
81
+ export const screenPrivacyStateSchema = z.object({
82
+ curtain: z.boolean(),
83
+ lockOnDisconnect: z.boolean(),
84
+ supported: z.boolean(),
85
+ });
55
86
  export const directoryEntrySchema = z.object({
56
87
  name: z.string(),
57
88
  path: z.string(),
@@ -100,11 +131,19 @@ const coreMethods = {
100
131
  params: z.object({ activityId: liveActivityIdSchema }),
101
132
  result: z.object({}),
102
133
  },
134
+ "liveActivities.registerPushToStart": {
135
+ params: liveActivityPushToStartSchema,
136
+ result: z.looseObject({ ok: z.boolean().optional() }),
137
+ },
103
138
  "machine.info": {
104
139
  params: empty,
105
140
  result: machineInfoSchema,
106
141
  },
107
142
  "machine.metrics": { params: empty, result: machineMetricsSnapshotSchema },
143
+ "machine.keepAwake": {
144
+ params: z.object({ mode: keepAwakeModeSchema.optional() }),
145
+ result: machineKeepAwakeSchema,
146
+ },
108
147
  "machine.rename": {
109
148
  /** Empty restores the configured default; names never change peer identities. */
110
149
  params: z.object({ name: z.string().trim().max(40) }),
@@ -475,9 +514,24 @@ const coreMethods = {
475
514
  params: z.object({ password: z.string().min(4).max(128).optional() }),
476
515
  result: z.object({ password: z.boolean() }),
477
516
  },
478
- // ── Git: sessions in worktrees ──
517
+ // ── Git: sessions in worktrees & working-tree diffs ──
479
518
  /** What git says about `path`; no `git` when it isn't in a repository. */
480
519
  "git.info": { params: z.object({ path: z.string().min(1) }), result: z.object({ git: gitInfoSchema.optional() }) },
520
+ /** Real git working-tree diff (or against `base`), bounded by `maxBytes` and including untracked text files by default. */
521
+ "git.diff": {
522
+ params: z.object({
523
+ cwd: z.string().min(1),
524
+ base: z.string().optional(),
525
+ includeUntracked: z.boolean().optional(),
526
+ maxBytes: z.number().int().positive().max(10_000_000).optional(),
527
+ }),
528
+ result: gitDiffResultSchema,
529
+ },
530
+ /** Restores a tracked file or removes an untracked file strictly inside the repository root. */
531
+ "git.revertFile": {
532
+ params: z.object({ cwd: z.string().min(1), path: z.string().min(1) }),
533
+ result: z.object({ ok: z.boolean() }),
534
+ },
481
535
  /** The worktrees LinkShell made, newest first. */
482
536
  "worktrees.list": { params: empty, result: z.object({ worktrees: z.array(worktreeEntrySchema) }) },
483
537
  /** Removes a worktree and its branch. Refused (`busy`) while a session uses it, or (`dirty`) when work in it would be lost, unless `force`. */
@@ -567,6 +621,27 @@ const coreMethods = {
567
621
  params: z.object({ query: z.string().min(1).max(200), limit: z.number().int().min(1).max(200).default(60) }),
568
622
  result: z.object({ entries: z.array(directoryEntrySchema), truncated: z.boolean() }),
569
623
  },
624
+ /** Fast project file listing under `cwd` (`git ls-files` with directory walk fallback) for `@file` autocomplete. */
625
+ "fs.projectFiles": {
626
+ params: z.object({
627
+ cwd: z.string().min(1),
628
+ query: z.string().max(200).optional(),
629
+ limit: z.number().int().min(1).max(2000).optional(),
630
+ }),
631
+ result: z.object({
632
+ files: z.array(projectFileEntrySchema),
633
+ truncated: z.boolean(),
634
+ }),
635
+ },
636
+ // ── Clipboard: encrypted host clipboard access ──
637
+ "clipboard.read": {
638
+ params: empty,
639
+ result: z.object({ text: z.string() }),
640
+ },
641
+ "clipboard.write": {
642
+ params: z.object({ text: z.string().max(2_000_000) }),
643
+ result: z.object({ ok: z.boolean() }),
644
+ },
570
645
  // ── Terminals: plain shells on the host, any command, like SSH ──
571
646
  "terminals.list": {
572
647
  params: empty,
@@ -700,6 +775,14 @@ const coreMethods = {
700
775
  problem: z.string().optional(),
701
776
  }),
702
777
  },
778
+ /** Privacy curtain (dim/blank physical screen while viewing remotely) and auto-lock on disconnect. */
779
+ "screen.privacy": {
780
+ params: z.object({
781
+ curtain: z.boolean().optional(),
782
+ lockOnDisconnect: z.boolean().optional(),
783
+ }),
784
+ result: screenPrivacyStateSchema,
785
+ },
703
786
  /** Bytes to the host's end of a stream (base64). */
704
787
  "proxy.write": {
705
788
  params: z.object({ streamId: z.string().min(1), data: z.string().max(2_000_000) }),
@@ -710,7 +793,12 @@ const coreMethods = {
710
793
  result: empty,
711
794
  },
712
795
  };
713
- export const methods = { ...coreMethods, ...acpMethods, ...mcpMethods };
796
+ export const methods = {
797
+ ...coreMethods,
798
+ ...acpMethods,
799
+ ...mcpMethods,
800
+ ...lsaMethods,
801
+ };
714
802
  export function isMethodName(name) {
715
803
  return Object.prototype.hasOwnProperty.call(methods, name);
716
804
  }
@@ -748,5 +836,7 @@ export const notifications = {
748
836
  "proxy.data": z.object({ streamId: z.string(), data: z.string() }),
749
837
  /** The host's end of a stream closed (the server hung up, or refused). */
750
838
  "proxy.closed": z.object({ streamId: z.string(), error: z.string().optional() }),
839
+ /** Zero-plaintext transition wakeup metadata. */
840
+ "liveActivities.wakeup": wakeupNoticeSchema,
751
841
  };
752
842
  //# sourceMappingURL=rpc.js.map