@tiflis-io/tiflis-code-workstation 0.3.1 → 0.3.3

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/main.js +42 -4
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -114,6 +114,16 @@ var EnvSchema = z.object({
114
114
  AGENT_EXECUTION_TIMEOUT: z.coerce.number().default(900),
115
115
  CLAUDE_SESSION_LOCK_WAIT_MS: z.coerce.number().default(1500),
116
116
  // ─────────────────────────────────────────────────────────────
117
+ // Agent Visibility Configuration
118
+ // Hide base agent options in mobile apps (only show aliases)
119
+ // ─────────────────────────────────────────────────────────────
120
+ /** Hide base Cursor agent option (only show aliases) */
121
+ HIDE_BASE_CURSOR: z.string().transform((val) => val?.toLowerCase() === "true").default("false"),
122
+ /** Hide base Claude agent option (only show aliases) */
123
+ HIDE_BASE_CLAUDE: z.string().transform((val) => val?.toLowerCase() === "true").default("false"),
124
+ /** Hide base OpenCode agent option (only show aliases) */
125
+ HIDE_BASE_OPENCODE: z.string().transform((val) => val?.toLowerCase() === "true").default("false"),
126
+ // ─────────────────────────────────────────────────────────────
117
127
  // Terminal Configuration
118
128
  // ─────────────────────────────────────────────────────────────
119
129
  /** Terminal output buffer size (number of messages, in-memory only, does not survive restarts) */
@@ -168,11 +178,15 @@ function parseAgentAliases() {
168
178
  return aliases;
169
179
  }
170
180
  function parseCommandString(command) {
181
+ let cmd = command.trim();
182
+ if (cmd.startsWith('"') && cmd.endsWith('"') || cmd.startsWith("'") && cmd.endsWith("'")) {
183
+ cmd = cmd.slice(1, -1);
184
+ }
171
185
  const parts = [];
172
186
  let current = "";
173
187
  let inQuote = false;
174
188
  let quoteChar = "";
175
- for (const char of command) {
189
+ for (const char of cmd) {
176
190
  if (!inQuote && (char === '"' || char === "'")) {
177
191
  inQuote = true;
178
192
  quoteChar = char;
@@ -4428,13 +4442,26 @@ var MessageBroadcasterImpl = class {
4428
4442
  }
4429
4443
  /**
4430
4444
  * Sends a message to a specific client by device ID.
4445
+ *
4446
+ * Note: We always send to tunnel regardless of local registry state because:
4447
+ * 1. HTTP polling clients (watchOS) don't authenticate with the workstation
4448
+ * - They only authenticate with the tunnel server
4449
+ * - The tunnel handles message queuing for HTTP clients
4450
+ * 2. After workstation restart, WebSocket clients may still be connected to the tunnel
4451
+ * but not yet re-authenticated with the workstation
4431
4452
  */
4432
4453
  sendToClient(deviceId, message) {
4433
4454
  const device = new DeviceId(deviceId);
4434
4455
  const client = this.deps.clientRegistry.getByDeviceId(device);
4435
- if (!client?.isAuthenticated) {
4436
- return false;
4437
- }
4456
+ this.logger.info(
4457
+ {
4458
+ deviceId,
4459
+ clientInRegistry: !!client,
4460
+ clientAuthenticated: client?.isAuthenticated,
4461
+ messagePreview: message.slice(0, 100)
4462
+ },
4463
+ "sendToClient - sending via tunnel (supports HTTP polling clients)"
4464
+ );
4438
4465
  return this.deps.tunnelClient.sendToDevice(deviceId, message);
4439
4466
  }
4440
4467
  /**
@@ -7410,6 +7437,16 @@ async function bootstrap() {
7410
7437
  is_alias: agent.isAlias
7411
7438
  })
7412
7439
  );
7440
+ const hiddenBaseTypes = [];
7441
+ if (env.HIDE_BASE_CURSOR) {
7442
+ hiddenBaseTypes.push("cursor");
7443
+ }
7444
+ if (env.HIDE_BASE_CLAUDE) {
7445
+ hiddenBaseTypes.push("claude");
7446
+ }
7447
+ if (env.HIDE_BASE_OPENCODE) {
7448
+ hiddenBaseTypes.push("opencode");
7449
+ }
7413
7450
  const workspacesList = await workspaceDiscovery.listWorkspaces();
7414
7451
  const workspaces = await Promise.all(
7415
7452
  workspacesList.map(async (ws) => {
@@ -7467,6 +7504,7 @@ async function bootstrap() {
7467
7504
  supervisorHistory,
7468
7505
  agentHistories,
7469
7506
  availableAgents,
7507
+ hiddenBaseTypes,
7470
7508
  workspaces,
7471
7509
  supervisorIsExecuting,
7472
7510
  executingStates,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiflis-io/tiflis-code-workstation",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Workstation server for tiflis-code - manages agent sessions and terminal access",
5
5
  "author": "Roman Barinov <rbarinov@gmail.com>",
6
6
  "license": "FSL-1.1-NC",