@jush-agent/sdk 0.2.6320 → 0.2.6325

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Jush's agents in your program. The SDK starts `jush-core`, the process your
4
4
  program's cores run in, and gives your program the cores, their
5
5
  conversations, providers and devices, and plugins of your own whose commands
6
- the agents run as `jush <group> <command>`.
6
+ the agents run, under `jush` or by names of their own.
7
7
 
8
8
  A core is one Jush: its conversations, provider entries, devices and
9
9
  settings, kept in a directory you choose. A team bot, for example, opens one
@@ -216,6 +216,25 @@ for (const listed of core.state.devices) {
216
216
  }
217
217
  ```
218
218
 
219
+ ### The language and time zone of the agents' work
220
+
221
+ Commands run in the time zone and languages of the browser that last
222
+ showed the core's pages, and in `en-US` and UTC before one did. A
223
+ conversation's browser starts in them: a site shows its text in that
224
+ language, and a page its times in that zone. A new schedule counts in that
225
+ zone too. Set them for the core's work with `commandLocale`, which no page
226
+ changes:
227
+
228
+ ```ts
229
+ await core.updatePreferences({ commandLocale: { timeZone: 'Asia/Shanghai', languages: ['zh-CN'] } })
230
+ // Back to what the pages' browser reports:
231
+ await core.updatePreferences({ commandLocale: null })
232
+ ```
233
+
234
+ A conversation's browser takes them as it starts, as it takes the color
235
+ scheme: one already open keeps its own until it starts again, after its
236
+ last tab closed.
237
+
219
238
  ### Scripts outside a conversation
220
239
 
221
240
  `device.exec(script, options)` runs a script on a paired device as the agent's
@@ -525,6 +544,26 @@ each command's `summary`, input and `output` are its `--help`.
525
544
  names the one it needs: the conversation then asks before the command
526
545
  runs.
527
546
 
547
+ A group is under `jush` unless it says `placement: 'root'`, which makes it a
548
+ command of the shell, run by its own name: with the plugin above at the
549
+ root, the agent and every process its commands start run `chat send`, and
550
+ `chat --help` shows it, as `jush` shows its own. Name it after your program:
551
+ the core refuses `jush`, a name another plugin takes, and the names of shell
552
+ words and common tools, such as `ls`, `git` or `node`; a device leaves out a
553
+ command whose name its own shell answers, such as `history`, and keeps the
554
+ rest.
555
+
556
+ ```ts
557
+ commands: {
558
+ acme: {
559
+ placement: 'root',
560
+ summary: "Acme's tickets",
561
+ index: 'Files and reads Acme tickets.',
562
+ commands: { ticket: { summary: 'Tickets', commands: { create: leaf({ /* … */ }) } } },
563
+ },
564
+ },
565
+ ```
566
+
528
567
  A plugin can also add a context block before each request (`context`),
529
568
  search a conversation's project (`projectSearch`), and follow conversations
530
569
  being deleted or forked.
package/dist/index.d.mts CHANGED
@@ -4141,6 +4141,12 @@ declare const clientFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4141
4141
  type: z.ZodLiteral<"close">;
4142
4142
  }, z.core.$strict>], "type">;
4143
4143
  type ClientFrame = z.infer<typeof clientFrameSchema>;
4144
+ /** Where a plugin's command tree goes. */
4145
+ declare const placementSchema: z.ZodEnum<{
4146
+ root: "root";
4147
+ jush: "jush";
4148
+ }>;
4149
+ type Placement = z.infer<typeof placementSchema>;
4144
4150
  /**
4145
4151
  * An attachment of the conversation as a reply shows it
4146
4152
  * (`crates/core-device-access/src/attachment_commands.rs`): what its card
@@ -17416,6 +17422,167 @@ declare const conversationUpdateSchema: z.ZodObject<{
17416
17422
  }, z.core.$strip>], "status">>;
17417
17423
  }, z.core.$strip>;
17418
17424
  type ConversationUpdate = z.infer<typeof conversationUpdateSchema>;
17425
+ /** A user's saved preferences. */
17426
+ declare const preferencesSchema: z.ZodObject<{
17427
+ appearance: z.ZodObject<{
17428
+ theme: z.ZodOptional<z.ZodEnum<{
17429
+ system: "system";
17430
+ light: "light";
17431
+ dark: "dark";
17432
+ }>>;
17433
+ tone: z.ZodOptional<z.ZodEnum<{
17434
+ ink: "ink";
17435
+ warm: "warm";
17436
+ }>>;
17437
+ accent: z.ZodOptional<z.ZodEnum<{
17438
+ blue: "blue";
17439
+ purple: "purple";
17440
+ pink: "pink";
17441
+ red: "red";
17442
+ orange: "orange";
17443
+ green: "green";
17444
+ teal: "teal";
17445
+ }>>;
17446
+ fontSize: z.ZodOptional<z.ZodInt>;
17447
+ }, z.core.$strip>;
17448
+ shortcuts: z.ZodObject<{
17449
+ mac: z.ZodObject<{
17450
+ new: z.ZodOptional<z.ZodString>;
17451
+ sidebar: z.ZodOptional<z.ZodString>;
17452
+ settings: z.ZodOptional<z.ZodString>;
17453
+ search: z.ZodOptional<z.ZodString>;
17454
+ searchFiles: z.ZodOptional<z.ZodString>;
17455
+ find: z.ZodOptional<z.ZodString>;
17456
+ workspace1: z.ZodOptional<z.ZodString>;
17457
+ workspace2: z.ZodOptional<z.ZodString>;
17458
+ workspace3: z.ZodOptional<z.ZodString>;
17459
+ workspace4: z.ZodOptional<z.ZodString>;
17460
+ workspace5: z.ZodOptional<z.ZodString>;
17461
+ workspace6: z.ZodOptional<z.ZodString>;
17462
+ workspace7: z.ZodOptional<z.ZodString>;
17463
+ workspace8: z.ZodOptional<z.ZodString>;
17464
+ workspace9: z.ZodOptional<z.ZodString>;
17465
+ }, z.core.$strip>;
17466
+ pc: z.ZodObject<{
17467
+ new: z.ZodOptional<z.ZodString>;
17468
+ sidebar: z.ZodOptional<z.ZodString>;
17469
+ settings: z.ZodOptional<z.ZodString>;
17470
+ search: z.ZodOptional<z.ZodString>;
17471
+ searchFiles: z.ZodOptional<z.ZodString>;
17472
+ find: z.ZodOptional<z.ZodString>;
17473
+ workspace1: z.ZodOptional<z.ZodString>;
17474
+ workspace2: z.ZodOptional<z.ZodString>;
17475
+ workspace3: z.ZodOptional<z.ZodString>;
17476
+ workspace4: z.ZodOptional<z.ZodString>;
17477
+ workspace5: z.ZodOptional<z.ZodString>;
17478
+ workspace6: z.ZodOptional<z.ZodString>;
17479
+ workspace7: z.ZodOptional<z.ZodString>;
17480
+ workspace8: z.ZodOptional<z.ZodString>;
17481
+ workspace9: z.ZodOptional<z.ZodString>;
17482
+ }, z.core.$strip>;
17483
+ }, z.core.$strip>;
17484
+ lastModel: z.ZodOptional<z.ZodObject<{
17485
+ providerId: z.ZodString;
17486
+ modelId: z.ZodString;
17487
+ thinkingEffort: z.ZodNullable<z.ZodString>;
17488
+ serviceTierId: z.ZodNullable<z.ZodString>;
17489
+ }, z.core.$strip>>;
17490
+ lastWorkflow: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
17491
+ type: z.ZodLiteral<"default">;
17492
+ }, z.core.$strip>, z.ZodObject<{
17493
+ type: z.ZodLiteral<"none">;
17494
+ }, z.core.$strip>, z.ZodObject<{
17495
+ type: z.ZodLiteral<"workflow">;
17496
+ id: z.ZodString;
17497
+ worktree: z.ZodOptional<z.ZodBoolean>;
17498
+ }, z.core.$strip>], "type">>;
17499
+ lastProjectDevice: z.ZodOptional<z.ZodObject<{
17500
+ kind: z.ZodEnum<{
17501
+ cloud: "cloud";
17502
+ device: "device";
17503
+ }>;
17504
+ deviceId: z.ZodOptional<z.ZodString>;
17505
+ }, z.core.$strip>>;
17506
+ language: z.ZodOptional<z.ZodEnum<{
17507
+ system: "system";
17508
+ en: "en";
17509
+ de: "de";
17510
+ "es-419": "es-419";
17511
+ fr: "fr";
17512
+ "pt-BR": "pt-BR";
17513
+ "zh-Hans": "zh-Hans";
17514
+ "zh-Hant": "zh-Hant";
17515
+ ja: "ja";
17516
+ ko: "ko";
17517
+ }>>;
17518
+ locale: z.ZodOptional<z.ZodObject<{
17519
+ timeZone: z.ZodString;
17520
+ languages: z.ZodArray<z.ZodString>;
17521
+ language: z.ZodOptional<z.ZodEnum<{
17522
+ en: "en";
17523
+ de: "de";
17524
+ "es-419": "es-419";
17525
+ fr: "fr";
17526
+ "pt-BR": "pt-BR";
17527
+ "zh-Hans": "zh-Hans";
17528
+ "zh-Hant": "zh-Hant";
17529
+ ja: "ja";
17530
+ ko: "ko";
17531
+ }>>;
17532
+ }, z.core.$strip>>;
17533
+ commandLocale: z.ZodOptional<z.ZodObject<{
17534
+ timeZone: z.ZodString;
17535
+ languages: z.ZodArray<z.ZodString>;
17536
+ }, z.core.$strip>>;
17537
+ colorScheme: z.ZodOptional<z.ZodEnum<{
17538
+ light: "light";
17539
+ dark: "dark";
17540
+ }>>;
17541
+ sendWhileRunning: z.ZodOptional<z.ZodEnum<{
17542
+ queue: "queue";
17543
+ steer: "steer";
17544
+ }>>;
17545
+ resumeAtRetry: z.ZodOptional<z.ZodBoolean>;
17546
+ resumeAfterRestart: z.ZodOptional<z.ZodBoolean>;
17547
+ compactIdle: z.ZodOptional<z.ZodBoolean>;
17548
+ idleCompactionLifetime: z.ZodOptional<z.ZodEnum<{
17549
+ "1h": "1h";
17550
+ "30m": "30m";
17551
+ }>>;
17552
+ idleCompactionContext: z.ZodOptional<z.ZodInt>;
17553
+ showUnexpectedErrors: z.ZodOptional<z.ZodBoolean>;
17554
+ multiAccountWarned: z.ZodOptional<z.ZodBoolean>;
17555
+ contextLimits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodInt>>>;
17556
+ hiddenProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
17557
+ hiddenModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
17558
+ providerId: z.ZodString;
17559
+ modelId: z.ZodString;
17560
+ }, z.core.$strip>>>;
17561
+ smallModel: z.ZodOptional<z.ZodObject<{
17562
+ providerId: z.ZodString;
17563
+ modelId: z.ZodString;
17564
+ thinkingEffort: z.ZodNullable<z.ZodString>;
17565
+ }, z.core.$strip>>;
17566
+ smallModelSameProvider: z.ZodOptional<z.ZodBoolean>;
17567
+ suggestedReplies: z.ZodOptional<z.ZodBoolean>;
17568
+ outputSpeed: z.ZodOptional<z.ZodBoolean>;
17569
+ taskbarPins: z.ZodOptional<z.ZodArray<z.ZodString>>;
17570
+ fileTree: z.ZodOptional<z.ZodObject<{
17571
+ shown: z.ZodBoolean;
17572
+ width: z.ZodInt;
17573
+ }, z.core.$strip>>;
17574
+ storage: z.ZodOptional<z.ZodObject<{
17575
+ temporary: z.ZodObject<{
17576
+ unusedDays: z.ZodNullable<z.ZodInt>;
17577
+ maxBytes: z.ZodNullable<z.ZodInt>;
17578
+ }, z.core.$strip>;
17579
+ cache: z.ZodObject<{
17580
+ unusedDays: z.ZodNullable<z.ZodInt>;
17581
+ maxBytes: z.ZodNullable<z.ZodInt>;
17582
+ }, z.core.$strip>;
17583
+ }, z.core.$strip>>;
17584
+ }, z.core.$strip>;
17585
+ type Preferences = z.infer<typeof preferencesSchema>;
17419
17586
  /**
17420
17587
  * A device as the web app sees it. `platform` is the one its runner
17421
17588
  * reported; `state` says whether its runner serves it now;
@@ -17658,6 +17825,10 @@ declare const coreStateSchema: z.ZodObject<{
17658
17825
  ko: "ko";
17659
17826
  }>>;
17660
17827
  }, z.core.$strip>>;
17828
+ commandLocale: z.ZodOptional<z.ZodObject<{
17829
+ timeZone: z.ZodString;
17830
+ languages: z.ZodArray<z.ZodString>;
17831
+ }, z.core.$strip>>;
17661
17832
  colorScheme: z.ZodOptional<z.ZodEnum<{
17662
17833
  light: "light";
17663
17834
  dark: "dark";
@@ -18920,6 +19091,164 @@ declare const requestedValuesSchema: z.ZodObject<{
18920
19091
  values: z.ZodRecord<z.ZodString, z.ZodString>;
18921
19092
  }, z.core.$strict>;
18922
19093
  type RequestedValues = z.infer<typeof requestedValuesSchema>;
19094
+ /**
19095
+ * `PATCH /settings/preferences`: the overrides to change; everything absent
19096
+ * stays as saved.
19097
+ */
19098
+ declare const preferencesPatchSchema: z.ZodObject<{
19099
+ appearance: z.ZodOptional<z.ZodObject<{
19100
+ theme: z.ZodOptional<z.ZodEnum<{
19101
+ system: "system";
19102
+ light: "light";
19103
+ dark: "dark";
19104
+ }>>;
19105
+ tone: z.ZodOptional<z.ZodEnum<{
19106
+ ink: "ink";
19107
+ warm: "warm";
19108
+ }>>;
19109
+ accent: z.ZodOptional<z.ZodEnum<{
19110
+ blue: "blue";
19111
+ purple: "purple";
19112
+ pink: "pink";
19113
+ red: "red";
19114
+ orange: "orange";
19115
+ green: "green";
19116
+ teal: "teal";
19117
+ }>>;
19118
+ fontSize: z.ZodOptional<z.ZodInt>;
19119
+ }, z.core.$strip>>;
19120
+ shortcuts: z.ZodOptional<z.ZodObject<{
19121
+ mac: z.ZodOptional<z.ZodObject<{
19122
+ new: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19123
+ sidebar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19124
+ settings: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19125
+ search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19126
+ searchFiles: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19127
+ find: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19128
+ workspace1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19129
+ workspace2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19130
+ workspace3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19131
+ workspace4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19132
+ workspace5: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19133
+ workspace6: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19134
+ workspace7: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19135
+ workspace8: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19136
+ workspace9: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19137
+ }, z.core.$strict>>;
19138
+ pc: z.ZodOptional<z.ZodObject<{
19139
+ new: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19140
+ sidebar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19141
+ settings: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19142
+ search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19143
+ searchFiles: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19144
+ find: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19145
+ workspace1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19146
+ workspace2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19147
+ workspace3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19148
+ workspace4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19149
+ workspace5: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19150
+ workspace6: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19151
+ workspace7: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19152
+ workspace8: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19153
+ workspace9: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19154
+ }, z.core.$strict>>;
19155
+ }, z.core.$strict>>;
19156
+ lastModel: z.ZodOptional<z.ZodObject<{
19157
+ providerId: z.ZodString;
19158
+ modelId: z.ZodString;
19159
+ thinkingEffort: z.ZodNullable<z.ZodString>;
19160
+ serviceTierId: z.ZodNullable<z.ZodString>;
19161
+ }, z.core.$strip>>;
19162
+ lastWorkflow: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
19163
+ type: z.ZodLiteral<"default">;
19164
+ }, z.core.$strip>, z.ZodObject<{
19165
+ type: z.ZodLiteral<"none">;
19166
+ }, z.core.$strip>, z.ZodObject<{
19167
+ type: z.ZodLiteral<"workflow">;
19168
+ id: z.ZodString;
19169
+ worktree: z.ZodOptional<z.ZodBoolean>;
19170
+ }, z.core.$strip>], "type">>;
19171
+ lastProjectDevice: z.ZodOptional<z.ZodObject<{
19172
+ kind: z.ZodEnum<{
19173
+ cloud: "cloud";
19174
+ device: "device";
19175
+ }>;
19176
+ deviceId: z.ZodOptional<z.ZodString>;
19177
+ }, z.core.$strip>>;
19178
+ language: z.ZodOptional<z.ZodEnum<{
19179
+ system: "system";
19180
+ en: "en";
19181
+ de: "de";
19182
+ "es-419": "es-419";
19183
+ fr: "fr";
19184
+ "pt-BR": "pt-BR";
19185
+ "zh-Hans": "zh-Hans";
19186
+ "zh-Hant": "zh-Hant";
19187
+ ja: "ja";
19188
+ ko: "ko";
19189
+ }>>;
19190
+ locale: z.ZodOptional<z.ZodObject<{
19191
+ timeZone: z.ZodString;
19192
+ languages: z.ZodArray<z.ZodString>;
19193
+ language: z.ZodOptional<z.ZodEnum<{
19194
+ en: "en";
19195
+ de: "de";
19196
+ "es-419": "es-419";
19197
+ fr: "fr";
19198
+ "pt-BR": "pt-BR";
19199
+ "zh-Hans": "zh-Hans";
19200
+ "zh-Hant": "zh-Hant";
19201
+ ja: "ja";
19202
+ ko: "ko";
19203
+ }>>;
19204
+ }, z.core.$strip>>;
19205
+ commandLocale: z.ZodOptional<z.ZodNullable<z.ZodObject<{
19206
+ timeZone: z.ZodString;
19207
+ languages: z.ZodArray<z.ZodString>;
19208
+ }, z.core.$strip>>>;
19209
+ colorScheme: z.ZodOptional<z.ZodEnum<{
19210
+ light: "light";
19211
+ dark: "dark";
19212
+ }>>;
19213
+ sendWhileRunning: z.ZodOptional<z.ZodEnum<{
19214
+ queue: "queue";
19215
+ steer: "steer";
19216
+ }>>;
19217
+ resumeAtRetry: z.ZodOptional<z.ZodBoolean>;
19218
+ resumeAfterRestart: z.ZodOptional<z.ZodBoolean>;
19219
+ compactIdle: z.ZodOptional<z.ZodBoolean>;
19220
+ idleCompactionLifetime: z.ZodOptional<z.ZodEnum<{
19221
+ "1h": "1h";
19222
+ "30m": "30m";
19223
+ }>>;
19224
+ idleCompactionContext: z.ZodOptional<z.ZodInt>;
19225
+ showUnexpectedErrors: z.ZodOptional<z.ZodBoolean>;
19226
+ multiAccountWarned: z.ZodOptional<z.ZodBoolean>;
19227
+ contextLimit: z.ZodOptional<z.ZodObject<{
19228
+ providerId: z.ZodString;
19229
+ modelId: z.ZodString;
19230
+ tokens: z.ZodNullable<z.ZodInt>;
19231
+ }, z.core.$strict>>;
19232
+ hiddenProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
19233
+ hiddenModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
19234
+ providerId: z.ZodString;
19235
+ modelId: z.ZodString;
19236
+ }, z.core.$strip>>>;
19237
+ smallModel: z.ZodOptional<z.ZodNullable<z.ZodObject<{
19238
+ providerId: z.ZodString;
19239
+ modelId: z.ZodString;
19240
+ thinkingEffort: z.ZodNullable<z.ZodString>;
19241
+ }, z.core.$strip>>>;
19242
+ smallModelSameProvider: z.ZodOptional<z.ZodBoolean>;
19243
+ suggestedReplies: z.ZodOptional<z.ZodBoolean>;
19244
+ outputSpeed: z.ZodOptional<z.ZodBoolean>;
19245
+ taskbarPins: z.ZodOptional<z.ZodArray<z.ZodString>>;
19246
+ fileTree: z.ZodOptional<z.ZodObject<{
19247
+ shown: z.ZodBoolean;
19248
+ width: z.ZodInt;
19249
+ }, z.core.$strip>>;
19250
+ }, z.core.$strict>;
19251
+ type PreferencesPatch = z.infer<typeof preferencesPatchSchema>;
18923
19252
  /**
18924
19253
  * An entry as the web app sees it: its family, label, kind, endpoint, vendor
18925
19254
  * and model list, never its key.
@@ -20753,11 +21082,11 @@ declare class Conversation {
20753
21082
  }
20754
21083
  //#endregion
20755
21084
  //#region src/plugin.d.ts
20756
- /** A command group under `jush`, as `GroupBuilder` declares one. */
21085
+ /** A command group, as `GroupBuilder` declares one. */
20757
21086
  interface GroupDefinition {
20758
21087
  summary: string;
20759
21088
  details?: string;
20760
- /** Its sentence of the `jush` index, such as `Posts to the chat.` */
21089
+ /** Its sentence of the capability index, such as `Posts to the chat.` */
20761
21090
  index?: string;
20762
21091
  /** The permission categories its leaves need. */
20763
21092
  permissions?: Category[];
@@ -20811,9 +21140,14 @@ interface PluginDefinition {
20811
21140
  name: string;
20812
21141
  /** What it does for the user, in one sentence that names its command. */
20813
21142
  description: string;
20814
- /** Its command groups under `jush`, by name; each says its sentence of the `jush` index. */
21143
+ /**
21144
+ * Its command groups, by name; each says its sentence of the capability
21145
+ * index, and `placement: 'root'` makes it a command of the shell, run by
21146
+ * its own name, where it is a group under `jush` without.
21147
+ */
20815
21148
  commands?: Record<string, GroupDefinition & {
20816
21149
  index: string;
21150
+ placement?: Placement;
20817
21151
  }>;
20818
21152
  /** The context block it adds before each request of a node, if any. */
20819
21153
  context?(request: Extract<Request$1, {
@@ -20919,6 +21253,12 @@ declare class Core {
20919
21253
  */
20920
21254
  on(event: 'state', listener: (state: CoreState) => void): () => void;
20921
21255
  on(event: 'notify', listener: (message: PushMessage) => Promise<Notified> | Notified): () => void;
21256
+ /**
21257
+ * Changes what `patch` names of the core's preferences, the web app's
21258
+ * Settings, and answers them, such as `commandLocale`, the time zone and
21259
+ * languages its commands and browsers run in.
21260
+ */
21261
+ updatePreferences(patch: PreferencesPatch): Promise<Preferences>;
20922
21262
  /**
20923
21263
  * Answers `request` with the core's route it names below `base`, such as
20924
21264
  * `/jush/api/conversations` below `/jush/api`, as the program's server
package/dist/index.mjs CHANGED
@@ -7421,6 +7421,12 @@ const preferencesSchema = z.object({
7421
7421
  */
7422
7422
  locale: browserLocaleSchema.optional(),
7423
7423
  /**
7424
+ * The time zone and languages commands run in, which a program sets, in
7425
+ * place of what the user's browser reported; none follows the
7426
+ * browser's. A page never writes it.
7427
+ */
7428
+ commandLocale: commandLocaleSchema.optional(),
7429
+ /**
7424
7430
  * The color scheme the user's page last reported showing, which the
7425
7431
  * conversation browser starts with.
7426
7432
  */
@@ -9368,6 +9374,11 @@ z.strictObject({
9368
9374
  * refused.
9369
9375
  */
9370
9376
  locale: browserLocaleSchema.optional(),
9377
+ /**
9378
+ * The time zone and languages commands run in; null follows the
9379
+ * browser's report again. Checked as `locale` is.
9380
+ */
9381
+ commandLocale: commandLocaleSchema.nullable().optional(),
9371
9382
  /** The color scheme the user's page shows. */
9372
9383
  colorScheme: colorSchemeSchema.optional(),
9373
9384
  /** What Enter does with a message while the agent works. */
@@ -10767,7 +10778,8 @@ z.strictObject({
10767
10778
  disabled: z.boolean().nullable().optional(),
10768
10779
  cloudStorage: cloudStorageSchema.nullable().optional()
10769
10780
  });
10770
- z.object({ preferences: preferencesSchema });
10781
+ /** `{ preferences }`: the answer of `GET` and `PATCH /settings/preferences`. */
10782
+ const userPreferencesSchema = z.object({ preferences: preferencesSchema });
10771
10783
  /**
10772
10784
  * `GET /users`: every account, in the order they were created, and whether
10773
10785
  * their Cloud Storage bounds their Clouds, which the isolation the master
@@ -14179,7 +14191,7 @@ function leaf(definition) {
14179
14191
  /** The plugin `definition` defines. */
14180
14192
  function definePlugin(definition) {
14181
14193
  const commands = Object.entries(definition.commands ?? {}).map(([name, group]) => ({
14182
- placement: "jush",
14194
+ placement: group.placement ?? "jush",
14183
14195
  tree: groupNode(name, group),
14184
14196
  calls: []
14185
14197
  }));
@@ -14728,6 +14740,14 @@ var Core = class {
14728
14740
  };
14729
14741
  }
14730
14742
  /**
14743
+ * Changes what `patch` names of the core's preferences, the web app's
14744
+ * Settings, and answers them, such as `commandLocale`, the time zone and
14745
+ * languages its commands and browsers run in.
14746
+ */
14747
+ async updatePreferences(patch) {
14748
+ return (await this.routes.json("PATCH", "/settings/preferences", userPreferencesSchema, patch)).preferences;
14749
+ }
14750
+ /**
14731
14751
  * Answers `request` with the core's route it names below `base`, such as
14732
14752
  * `/jush/api/conversations` below `/jush/api`, as the program's server
14733
14753
  * forwards a page's request.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jush-agent/sdk",
3
3
  "description": "Jush's agents in a program: its cores, conversations, providers, devices and plugins, in a process of the program's own.",
4
- "version": "0.2.6320",
4
+ "version": "0.2.6325",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "exports": {
@@ -35,11 +35,11 @@
35
35
  "homepage": "https://github.com/jush-ai/jush/tree/main/packages/sdk#readme",
36
36
  "bugs": "https://github.com/jush-ai/jush/issues",
37
37
  "optionalDependencies": {
38
- "@jush-agent/sdk-darwin-arm64": "0.2.6320",
39
- "@jush-agent/sdk-darwin-x64": "0.2.6320",
40
- "@jush-agent/sdk-linux-arm64": "0.2.6320",
41
- "@jush-agent/sdk-linux-x64": "0.2.6320",
42
- "@jush-agent/sdk-win32-arm64": "0.2.6320",
43
- "@jush-agent/sdk-win32-x64": "0.2.6320"
38
+ "@jush-agent/sdk-darwin-arm64": "0.2.6325",
39
+ "@jush-agent/sdk-darwin-x64": "0.2.6325",
40
+ "@jush-agent/sdk-linux-arm64": "0.2.6325",
41
+ "@jush-agent/sdk-linux-x64": "0.2.6325",
42
+ "@jush-agent/sdk-win32-arm64": "0.2.6325",
43
+ "@jush-agent/sdk-win32-x64": "0.2.6325"
44
44
  }
45
45
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "jush.browser",
3
- "version": "0.2.6320",
3
+ "version": "0.2.6325",
4
4
  "protocolVersion": 1,
5
5
  "operations": [
6
6
  "browser.tab.new",
@@ -60,28 +60,28 @@
60
60
  ],
61
61
  "targets": {
62
62
  "aarch64-apple-darwin": {
63
- "sha256": "496840cadab7bf4aff21dbe2fcd3643e31bcc48c167312d6bb743a358c733923",
64
- "size": 28309664
63
+ "sha256": "12f1cfada0f4002f45235387374b27c0bafc1a3103bdaadb849b49d22d9c684d",
64
+ "size": 28313296
65
65
  },
66
66
  "aarch64-pc-windows-msvc": {
67
- "sha256": "4831ac7169797fd7d1a68d38fa5e618a2f7e607c133b511ff363a9a41bd68adb",
67
+ "sha256": "265129934a73dae4a166f54c33c7852a088401efb393abd7fd88bfe5eeda7408",
68
68
  "size": 25744384
69
69
  },
70
70
  "aarch64-unknown-linux-musl": {
71
- "sha256": "fe8430a25a3d1a8938257323bf4b3e1da5ec6b6e15ff9104d2f7dbb35a63b825",
72
- "size": 24357296
71
+ "sha256": "acecd667058eca784e4dccaf15fe2d09732ae345d741403f4c51835bbcc341e6",
72
+ "size": 24356720
73
73
  },
74
74
  "x86_64-apple-darwin": {
75
- "sha256": "02fb08166ba517f5e45f14da94dcc7be18845a5146e699177475cf85105cb05e",
76
- "size": 28840960
75
+ "sha256": "940e85dd4444268063a95d244815daaa2f190fe9e236a9fcf664fde1a66d67fe",
76
+ "size": 28826760
77
77
  },
78
78
  "x86_64-pc-windows-msvc": {
79
- "sha256": "386c80d081c2b673eb1b0356a9d59f1dfcea10d664a6ea70f076472aba8d750a",
80
- "size": 28680704
79
+ "sha256": "f566f93a251185b93ea745b7f375558720c92e5a68a5d4c89ab0686b8ebd81a0",
80
+ "size": 28682240
81
81
  },
82
82
  "x86_64-unknown-linux-musl": {
83
- "sha256": "5099d746eaa67283c5642b3e580381944825ae1d7ea2913c9460ca90109200e1",
84
- "size": 26732280
83
+ "sha256": "8f00741def48c4c24d9a48346620341c8e8f54c2488d3d6d28ef430c3dbc3034",
84
+ "size": 26726200
85
85
  }
86
86
  }
87
87
  }
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "id": "jush.fetch",
3
- "version": "0.2.6320",
3
+ "version": "0.2.6325",
4
4
  "protocolVersion": 1,
5
5
  "operations": [
6
6
  "fetch.get"
7
7
  ],
8
8
  "targets": {
9
9
  "aarch64-apple-darwin": {
10
- "sha256": "d2dd5eec954fe563db145f0121dcf7726c5b40ea4d7d2f205cadee70ec6139f4",
11
- "size": 7165488
10
+ "sha256": "354368cd3de21dcc5b0e45c8201715e90abaf73a4a6a3630666f81b7f4efbcc0",
11
+ "size": 7165888
12
12
  },
13
13
  "aarch64-pc-windows-msvc": {
14
- "sha256": "d991476302366c9a5cf37f32988d93973af5adae0035323016353b32ba14d5d8",
15
- "size": 6521344
14
+ "sha256": "4fc07e0daae98c64001ec08e4dd82c372b7ac4097082afaa38a6eef7e543704b",
15
+ "size": 6520320
16
16
  },
17
17
  "aarch64-unknown-linux-musl": {
18
- "sha256": "1c2b929bd7c47f15b172646d6d35f3dbd2776bf77cb6fdb3a5c260ae2a244ebc",
18
+ "sha256": "55c7a7b1e23fc8c2c59b37cc58a067ab32dc71f25ce5c4c380f6908a750b0fe8",
19
19
  "size": 6528688
20
20
  },
21
21
  "x86_64-apple-darwin": {
22
- "sha256": "665607d1cd9289bd01794d2a52b890e2750943299dd4cbe5444062e1987be707",
23
- "size": 7276296
22
+ "sha256": "60240964865f86f24ab09a9234139a7533c723847902abefc91299ff569cd4d9",
23
+ "size": 7276320
24
24
  },
25
25
  "x86_64-pc-windows-msvc": {
26
- "sha256": "f9d1e2e8dac843a53d5f65d98ea9b5556d1b8dbd0136c73e8a7a740a2e0f1da1",
27
- "size": 7001088
26
+ "sha256": "d627b2cb37b54503bc37859fec90ec585e4e7840ff0066e0047a1bbf7dbd8008",
27
+ "size": 6999040
28
28
  },
29
29
  "x86_64-unknown-linux-musl": {
30
- "sha256": "a4418dd3a3e01c6cb47da98bc09f8aa453198a7f5ea949477d4ef49b0236b0f9",
30
+ "sha256": "6b773134f47a9642272ae549438b9201003c9537adc91d05969c46461c407958",
31
31
  "size": 7019760
32
32
  }
33
33
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "jush.file",
3
- "version": "0.2.6320",
3
+ "version": "0.2.6325",
4
4
  "protocolVersion": 1,
5
5
  "operations": [
6
6
  "file.view",
@@ -9,28 +9,28 @@
9
9
  ],
10
10
  "targets": {
11
11
  "aarch64-apple-darwin": {
12
- "sha256": "098b26ae850e700b2082e722cbff765c8b1625f33918ba8a1c404aeb8855a85a",
13
- "size": 4930480
12
+ "sha256": "0a2bfd272dda431a017a08160f9303df42b5fa7aeb5c2f4c1ea365117ad8c26b",
13
+ "size": 4930576
14
14
  },
15
15
  "aarch64-pc-windows-msvc": {
16
- "sha256": "1ba0a43f57e22566a4483d5650552bfea814ba7d8bfc67413b26640253da844b",
16
+ "sha256": "6fc24baf2c2e2fd424baf75421959dc79eba3ed02362d3533d16cc452d6a15b7",
17
17
  "size": 4367872
18
18
  },
19
19
  "aarch64-unknown-linux-musl": {
20
- "sha256": "a00555b72fc088fae755d49b447d61566d6d50cab45a2cd8793be00f8da517c7",
20
+ "sha256": "25659f09720154b18e60aec9e866abc50487a609ecd9b1aa40f4f01770caeda3",
21
21
  "size": 4471232
22
22
  },
23
23
  "x86_64-apple-darwin": {
24
- "sha256": "7cd4d21a06c6e029ad8dd44b5060a091961f1072d0629f244065bd4a8d0aa0ab",
25
- "size": 4806808
24
+ "sha256": "8e567aa340bbbe5b6588c8df2dfe0bbed2e751fefa5b28f9096bf7394dc9f7d5",
25
+ "size": 4806480
26
26
  },
27
27
  "x86_64-pc-windows-msvc": {
28
- "sha256": "08344406331236f7fda187791a5e17cffa335d59207bba06be9d0a3b88da41be",
29
- "size": 4672512
28
+ "sha256": "69f635c77295f4804b16d1e585df3ca0241552b59caba57e8580602d5c0f27ca",
29
+ "size": 4673024
30
30
  },
31
31
  "x86_64-unknown-linux-musl": {
32
- "sha256": "9ada0da6ae884f767d4b70a5c21282d451e18250667f5671203c0e2eaea5b570",
33
- "size": 4694912
32
+ "sha256": "942f347e576ff4c3f56d62ddcc2b18ad8fb2c0321c72fe5aa86f456cf86da749",
33
+ "size": 4694976
34
34
  }
35
35
  }
36
36
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "jush.mobile",
3
- "version": "0.2.6320",
3
+ "version": "0.2.6325",
4
4
  "protocolVersion": 1,
5
5
  "operations": [
6
6
  "mobile.list",
@@ -25,28 +25,28 @@
25
25
  ],
26
26
  "targets": {
27
27
  "aarch64-apple-darwin": {
28
- "sha256": "0d4e4f48d810f9edef0010dd6e196cf927481df09c9e2445f414bf1033c3d216",
29
- "size": 22412848
28
+ "sha256": "0b7581d0535e633d7a9b1b883c29b28ec2f6c09e41f6333742ce6d62a88c55cf",
29
+ "size": 22263408
30
30
  },
31
31
  "aarch64-pc-windows-msvc": {
32
- "sha256": "70dac83ef57c890a293d828a912afa6f3842220931744e898cf70e7277762b20",
33
- "size": 17905664
32
+ "sha256": "64056c868d6fe481e1d404640e4d96ad4f898bf1523956c2a1e7fa4f3c0f38f9",
33
+ "size": 17903616
34
34
  },
35
35
  "aarch64-unknown-linux-musl": {
36
- "sha256": "0f07059d4e86a1550d2e8cbb273f2c2be6ee44b47d851eb5af73bfeb12efae8a",
37
- "size": 17348848
36
+ "sha256": "c25318ec20ab5e5a967a0ead0c825bd19d829f477f59fffceda63a9f0475186a",
37
+ "size": 17354480
38
38
  },
39
39
  "x86_64-apple-darwin": {
40
- "sha256": "05a76befc56f722a459a5ce60ccc5964532fa8a0f4bae7a971b31a5adbb010ec",
41
- "size": 21523520
40
+ "sha256": "ddebd0c0c4583319a1fe90a5d461c39b3b534e9ae470ef67a2c9ae56a919e619",
41
+ "size": 21518736
42
42
  },
43
43
  "x86_64-pc-windows-msvc": {
44
- "sha256": "6d9c67b5b3b3811a26e8ba4695ca1f2d2cebd4ce7f5a70a8b99a8552c84395dc",
45
- "size": 20929536
44
+ "sha256": "e627ffde58e41ea1e9803d8fc0da81411e9ab45e733d395fe1a6cf78cd577084",
45
+ "size": 20925952
46
46
  },
47
47
  "x86_64-unknown-linux-musl": {
48
- "sha256": "e30a0e0b1511d946c08a8e181733e65e618b5389e2e818d60148e194a9ac1c69",
49
- "size": 19930816
48
+ "sha256": "3345164e3b54a6f2382ece81834ec5a444dcf16571a24848a416d37faaf543ef",
49
+ "size": 19935104
50
50
  }
51
51
  }
52
52
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "jush.subscription-cli",
3
- "version": "0.2.6320",
3
+ "version": "0.2.6325",
4
4
  "protocolVersion": 1,
5
5
  "operations": [
6
6
  "subscription-cli.ensure",
@@ -8,28 +8,28 @@
8
8
  ],
9
9
  "targets": {
10
10
  "aarch64-apple-darwin": {
11
- "sha256": "2d5bd6e39b0601dd9df3619283991dc0a36d5f2bd77ff57a754cd6a5ab2d00d2",
12
- "size": 2633072
11
+ "sha256": "80e1fd1da4739651b12911d09d194ca1949ca2c9a8411368334627eab11b0b5f",
12
+ "size": 2615488
13
13
  },
14
14
  "aarch64-pc-windows-msvc": {
15
- "sha256": "ffb892d2a23ac96dd7c2c938d309025f1101076f69bbcdb9797fa61182284eae",
15
+ "sha256": "1d51d7d823a998a47bd4bfbf5da29029bac69ab456ca9679c1e24d44ef568c37",
16
16
  "size": 2319872
17
17
  },
18
18
  "aarch64-unknown-linux-musl": {
19
- "sha256": "02e2f933f5a6fc4664dc26e6834959f1583c5666e9064dcfcb620edd87a4ea19",
20
- "size": 2440520
19
+ "sha256": "fbfaa8f5e04425f4d3e4418a990819e8588783ef6dc4a31f1442cb2b2edaab85",
20
+ "size": 2440776
21
21
  },
22
22
  "x86_64-apple-darwin": {
23
- "sha256": "cd2f365c5be04c3c17f4fb6fa52fc4dcc59e46529cd4cb4fb346e5b757af83da",
24
- "size": 2513408
23
+ "sha256": "0180e5285efc39fb17da21668a1020216dd82dadc003e3b800ca5547838a8773",
24
+ "size": 2504112
25
25
  },
26
26
  "x86_64-pc-windows-msvc": {
27
- "sha256": "a0094a250becad8bd8491aae4ad0e2b718727973927cc27466b64f5fbbf1715e",
28
- "size": 2446336
27
+ "sha256": "61ac74f08af7a492336fb992df7f9e75dc8764f250ff0158bf9940793b0e075a",
28
+ "size": 2437120
29
29
  },
30
30
  "x86_64-unknown-linux-musl": {
31
- "sha256": "f77d0b03419fe6531fb2840e48e0b9e701d7367f87567848bc2a1b79f48c0a74",
32
- "size": 2510856
31
+ "sha256": "36670c5e819d6391d308ac4dba01f7638e4ad4005ac1c209f9a274173522e884",
32
+ "size": 2519816
33
33
  }
34
34
  }
35
35
  }