replicas-cli 0.3.250 → 0.3.251

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.
Files changed (2) hide show
  1. package/dist/index.cjs +81 -18
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -16755,7 +16755,7 @@ function codexTurnFromEvent(event) {
16755
16755
  const { turnId, status, error: error51 } = event.payload;
16756
16756
  return typeof turnId === "string" && typeof status === "string" ? { turnId, status, ...typeof error51 === "string" ? { error: error51 } : {} } : null;
16757
16757
  }
16758
- var MERGED_MESSAGE_SEPARATOR, updateChatDisplayNameRequestSchema, createChatRequestSchema, spawnSubagentRequestSchema, messageSubagentRequestSchema, waitSubagentRequestSchema, subagentResponseSchema, integrationErrorNotificationTargetSchema, sendChatMessageRequestSchema, CODEX_ITEM_FIELD_CHECKS, sendChatMessageResponseSchema;
16758
+ var MERGED_MESSAGE_SEPARATOR, updateChatDisplayNameRequestSchema, createChatRequestSchema, spawnSubagentRequestSchema, messageSubagentRequestSchema, waitSubagentRequestSchema, subagentResponseSchema, integrationErrorNotificationTargetSchema, sendChatMessageRequestSchema, CODEX_ITEM_FIELD_CHECKS, sendChatMessageResponseSchema, respondToolInputRequestSchema;
16759
16759
  var init_v1 = __esm({
16760
16760
  "../shared/src/engine/v1.ts"() {
16761
16761
  "use strict";
@@ -16890,6 +16890,10 @@ var init_v1 = __esm({
16890
16890
  chatId: external_exports.string().optional(),
16891
16891
  steered: external_exports.boolean().optional()
16892
16892
  });
16893
+ respondToolInputRequestSchema = external_exports.object({
16894
+ requestId: external_exports.string().min(1),
16895
+ selectionId: external_exports.string().min(1)
16896
+ });
16893
16897
  }
16894
16898
  });
16895
16899
 
@@ -17385,6 +17389,65 @@ var init_scout = __esm({
17385
17389
  }
17386
17390
  });
17387
17391
 
17392
+ // ../shared/src/workspace-attention.ts
17393
+ var WORKSPACE_ATTENTION_REASONS, CHAT_ATTENTION_REASONS;
17394
+ var init_workspace_attention = __esm({
17395
+ "../shared/src/workspace-attention.ts"() {
17396
+ "use strict";
17397
+ WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup"];
17398
+ CHAT_ATTENTION_REASONS = ["question", "blocked"];
17399
+ }
17400
+ });
17401
+
17402
+ // ../shared/src/routes/push.ts
17403
+ var registerPushDeviceRequestSchema, PUSH_HOLD_MINUTES, recordPushActivityRequestSchema, PUSH_NOTIFICATION_KINDS, pushQuestionSchema, pushNotificationDataSchema, registerLiveActivityRequestSchema;
17404
+ var init_push = __esm({
17405
+ "../shared/src/routes/push.ts"() {
17406
+ "use strict";
17407
+ init_zod();
17408
+ init_workspace_attention();
17409
+ registerPushDeviceRequestSchema = external_exports.discriminatedUnion("platform", [
17410
+ external_exports.object({
17411
+ platform: external_exports.literal("ios"),
17412
+ token: external_exports.string().regex(/^[0-9a-f]{64,200}$/i),
17413
+ appId: external_exports.string().min(1).max(255),
17414
+ apnsEnvironment: external_exports.enum(["sandbox", "production"])
17415
+ }),
17416
+ external_exports.object({
17417
+ platform: external_exports.literal("android"),
17418
+ token: external_exports.string().min(1).max(4096),
17419
+ appId: external_exports.string().min(1).max(255)
17420
+ })
17421
+ ]);
17422
+ PUSH_HOLD_MINUTES = 5;
17423
+ recordPushActivityRequestSchema = external_exports.object({
17424
+ organizationId: external_exports.string().uuid(),
17425
+ /** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
17426
+ idleSeconds: external_exports.number().min(0).optional(),
17427
+ seenWorkspaceIds: external_exports.array(external_exports.string().uuid()).max(20)
17428
+ });
17429
+ PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished", "pull_request"];
17430
+ pushQuestionSchema = external_exports.object({ id: external_exports.string().max(64), options: external_exports.array(external_exports.object({ id: external_exports.string().max(64), label: external_exports.string().min(1).max(60) })).min(1).max(4) });
17431
+ pushNotificationDataSchema = external_exports.object({
17432
+ organizationId: external_exports.string(),
17433
+ workspaceId: external_exports.string(),
17434
+ chatId: external_exports.string().nullable(),
17435
+ kind: external_exports.enum(PUSH_NOTIFICATION_KINDS),
17436
+ completedAt: external_exports.string(),
17437
+ pullRequestUrl: external_exports.string().optional(),
17438
+ toolRequestId: external_exports.string().optional(),
17439
+ question: pushQuestionSchema.optional()
17440
+ });
17441
+ registerLiveActivityRequestSchema = external_exports.object({
17442
+ deviceId: external_exports.string().uuid(),
17443
+ workspaceId: external_exports.string().uuid(),
17444
+ chatId: external_exports.string().min(1).max(100),
17445
+ /** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
17446
+ pushToken: external_exports.string().regex(/^[0-9a-f]{64,400}$/i).optional()
17447
+ });
17448
+ }
17449
+ });
17450
+
17388
17451
  // ../shared/src/default-skills/replicas-agent/abilities/computer.ts
17389
17452
  var SECTION, REFERENCE, COMPUTER_ABILITY;
17390
17453
  var init_computer = __esm({
@@ -20269,11 +20332,12 @@ function defaultReplicasAgentAbilities() {
20269
20332
  function hasAllReplicasAgentAbilities(abilities) {
20270
20333
  return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
20271
20334
  }
20272
- var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS;
20335
+ var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, PUSH_WHEN_ACTIVE_COPY, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS;
20273
20336
  var init_preferences = __esm({
20274
20337
  "../shared/src/routes/preferences.ts"() {
20275
20338
  "use strict";
20276
20339
  init_agent();
20340
+ init_push();
20277
20341
  init_registry();
20278
20342
  EMPTY_AGENT_DEFAULT_SETTINGS = {
20279
20343
  agent_provider: null,
@@ -20288,6 +20352,11 @@ var init_preferences = __esm({
20288
20352
  wood: ["ready", "pluck", "knock", "bloom", "steps"]
20289
20353
  };
20290
20354
  ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
20355
+ PUSH_WHEN_ACTIVE_COPY = {
20356
+ wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
20357
+ skip: "Don\u2019t send",
20358
+ send: "Send right away"
20359
+ };
20291
20360
  DEFAULT_USER_PREFERENCES = {
20292
20361
  default_agent: null,
20293
20362
  default_model: null,
@@ -20327,7 +20396,8 @@ var init_preferences = __esm({
20327
20396
  alert_sound: null,
20328
20397
  workspace_alerts: {},
20329
20398
  automation_alerts: {},
20330
- push_types: { needs_you: true, finished: true, pull_requests: true, automations: true, usage_limit: true }
20399
+ push_types: { needs_you: true, finished: true, pull_requests: true, automations: true, usage_limit: true },
20400
+ push_when_active: "wait"
20331
20401
  };
20332
20402
  DEFAULT_DEFAULT_SKILLS = {
20333
20403
  replicas_agent: {
@@ -20889,6 +20959,9 @@ function upsertDisplayMessage(messages, message2) {
20889
20959
  else messages[index] = message2;
20890
20960
  return message2;
20891
20961
  }
20962
+ function isToolInputQuestion(value) {
20963
+ return isRecord(value) && typeof value.id === "string" && typeof value.prompt === "string" && typeof value.multiSelect === "boolean" && Array.isArray(value.options) && value.options.every((option) => isRecord(option) && typeof option.id === "string" && typeof option.label === "string");
20964
+ }
20892
20965
  function applyToolInputEvent(event, messages, provider2, state, questionFilter) {
20893
20966
  if (event.type === "replicas-tool-input-request" && typeof event.payload.toolUseId === "string" && typeof event.payload.requestId === "string" && (Array.isArray(event.payload.options) || Array.isArray(event.payload.questions))) {
20894
20967
  const previous = state.resolutions.get(event.payload.toolUseId);
@@ -29660,9 +29733,6 @@ var init_opencode_parser = __esm({
29660
29733
  });
29661
29734
 
29662
29735
  // ../shared/src/display-message/parsers/muse-parser.ts
29663
- function isToolInputQuestion(value) {
29664
- return isRecord(value) && typeof value.id === "string" && typeof value.prompt === "string" && typeof value.multiSelect === "boolean" && Array.isArray(value.options) && value.options.every((option) => isRecord(option) && typeof option.id === "string" && typeof option.label === "string");
29665
- }
29666
29736
  function parseMuseEvents(events) {
29667
29737
  const messages = [];
29668
29738
  const deltas = /* @__PURE__ */ new Map();
@@ -31455,7 +31525,7 @@ var CLI_VERSION;
31455
31525
  var init_cli_version = __esm({
31456
31526
  "../shared/src/cli-version.ts"() {
31457
31527
  "use strict";
31458
- CLI_VERSION = "0.3.250";
31528
+ CLI_VERSION = "0.3.251";
31459
31529
  }
31460
31530
  });
31461
31531
 
@@ -32251,15 +32321,6 @@ var init_client_state = __esm({
32251
32321
  }
32252
32322
  });
32253
32323
 
32254
- // ../shared/src/workspace-attention.ts
32255
- var WORKSPACE_ATTENTION_REASONS;
32256
- var init_workspace_attention = __esm({
32257
- "../shared/src/workspace-attention.ts"() {
32258
- "use strict";
32259
- WORKSPACE_ATTENTION_REASONS = ["question", "blocked"];
32260
- }
32261
- });
32262
-
32263
32324
  // ../shared/src/routes/workspace-events.ts
32264
32325
  var workspaceTurnCompletionSchema, workspaceChangedEventSchema;
32265
32326
  var init_workspace_events = __esm({
@@ -32273,7 +32334,7 @@ var init_workspace_events = __esm({
32273
32334
  completedAt: external_exports.string(),
32274
32335
  processing: external_exports.boolean().optional(),
32275
32336
  pullRequestFeedback: external_exports.boolean().optional(),
32276
- attention: external_exports.object({ reason: external_exports.enum(WORKSPACE_ATTENTION_REASONS), userId: external_exports.string() }).optional()
32337
+ attention: external_exports.object({ reason: external_exports.enum(CHAT_ATTENTION_REASONS), userId: external_exports.string() }).optional()
32277
32338
  });
32278
32339
  workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
32279
32340
  external_exports.object({
@@ -32318,7 +32379,8 @@ var init_workspace_events = __esm({
32318
32379
  workspaceId: external_exports.string(),
32319
32380
  subagent: external_exports.object({ id: external_exports.string(), name: external_exports.string(), prUrl: external_exports.string().nullable() }),
32320
32381
  ts: external_exports.string()
32321
- })
32382
+ }),
32383
+ external_exports.object({ type: external_exports.literal("needs-you.changed"), workspaceId: external_exports.string().nullable(), ts: external_exports.string() })
32322
32384
  ]);
32323
32385
  }
32324
32386
  });
@@ -42169,6 +42231,7 @@ var init_src = __esm({
42169
42231
  init_mothership();
42170
42232
  init_workspace_events();
42171
42233
  init_presence();
42234
+ init_push();
42172
42235
  init_voice();
42173
42236
  init_workspace_deferred_messages();
42174
42237
  init_workspace_wait();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.250",
3
+ "version": "0.3.251",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {