@awak-app/simy-cli 0.7.31 → 0.7.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awak-app/simy-cli",
3
- "version": "0.7.31",
3
+ "version": "0.7.32",
4
4
  "description": "Local SIMY executor for non-coding Local Tasks and Agentic Loop runs.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -106,6 +106,7 @@ import {
106
106
  webApiErrorMessage,
107
107
  webApiHeaders,
108
108
  webApiUrl,
109
+ publicImageUrl,
109
110
  } from "./web-api.js";
110
111
  import {
111
112
  defaultRepositoryScanRoot,
@@ -672,9 +673,13 @@ export async function startAgent({
672
673
  if (!Array.isArray(payload.organizations)) throw new Error("Invalid organization list.");
673
674
  if (session !== requestedSession) return;
674
675
  organizationItems = payload.organizations.filter(org => typeof org.id === "string" && typeof org.name === "string")
675
- .slice(0, 100).map(org => ({ id: org.id, name: org.name.slice(0, 120),
676
+ .slice(0, 100).map(org => {
677
+ const logoUrl = publicImageUrl(org.logoUrl ?? org.logo_url);
678
+ return { id: org.id, name: org.name.slice(0, 120),
679
+ ...(logoUrl ? { logoUrl } : {}),
676
680
  ...(["ready", "sqm_required", "developer_required", "unavailable"].includes(org.desktopAccess) ? { desktopAccess: org.desktopAccess } : {}),
677
- ...(typeof org.slug === 'string' && org.slug && org.slug.length <= 160 && !/[\/\\?#\x00-\x1f]/.test(org.slug) ? { slug: org.slug } : {}) }));
681
+ ...(typeof org.slug === 'string' && org.slug && org.slug.length <= 160 && !/[\/\\?#\x00-\x1f]/.test(org.slug) ? { slug: org.slug } : {}) };
682
+ });
678
683
  organizationState = "ready";
679
684
  } catch {
680
685
  if (session === requestedSession) organizationState = "unavailable";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./durable-local-task-steps-contract.js";
15
15
  import { buildExecutionCapabilityContract } from "./execution-capability-contract.js";
16
16
 
17
- export const CLI_VERSION = "0.7.31";
17
+ export const CLI_VERSION = "0.7.32";
18
18
  export const CLI_API_CONTRACT_VERSION = 10;
19
19
 
20
20
  export function narrativeImageCapabilityMetadata() {
@@ -7,7 +7,7 @@ import { execFile } from 'node:child_process';
7
7
  import { promisify } from 'node:util';
8
8
  import { webApiHeaders, webApiUrl } from './web-api.js';
9
9
  // Keep this leaf module package-safe: hooks load it before the full CLI contract.
10
- const CLI_VERSION = '0.7.31';
10
+ const CLI_VERSION = '0.7.32';
11
11
 
12
12
  const STORE = 'cli-observability-state.json';
13
13
  const LEGACY_CONFIG = 'cli-observability.json';
@@ -1,10 +1,7 @@
1
+ import { publicImageUrl } from "./web-api.js";
1
2
  function profileAvatar(value) {
2
- if (typeof value !== "string" || value.length > 2048) return {};
3
- try {
4
- const url = new URL(value);
5
- if (url.protocol !== "https:" || !url.hostname || url.username || url.password) return {};
6
- return { avatarUrl: url.toString() };
7
- } catch { return {}; }
3
+ const url = publicImageUrl(value);
4
+ return url ? { avatarUrl: url } : {};
8
5
  }
9
6
  import { createHash } from "node:crypto";
10
7
  import { sanitizedText } from "./session-supervision/conversation-context.js";
package/src/web-api.js CHANGED
@@ -6,6 +6,15 @@ export function webApiHeaders({ token } = {}, extraHeaders = {}) {
6
6
  return headers;
7
7
  }
8
8
 
9
+ // Public profile images never carry the CLI's application credentials.
10
+ export function publicImageUrl(value) {
11
+ if (typeof value !== "string" || value.length > 2048) return null;
12
+ try {
13
+ const url = new URL(value);
14
+ return url.protocol === "https:" && url.hostname && !url.username && !url.password ? url.toString() : null;
15
+ } catch { return null; }
16
+ }
17
+
9
18
  const APP_DEV_ORIGIN = "https://app-dev.simy.one";
10
19
  const APP_DEV_GATEWAY_BASE_URL = "https://app.simy.one/api/local-cli-gateway/";
11
20