@awak-app/simy-cli 0.5.50 → 0.5.52

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.5.50",
3
+ "version": "0.5.52",
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
@@ -445,6 +445,7 @@ export async function startAgent({
445
445
  if (session !== requestedSession) return;
446
446
  organizationItems = payload.organizations.filter(org => typeof org.id === "string" && typeof org.name === "string")
447
447
  .slice(0, 100).map(org => ({ id: org.id, name: org.name.slice(0, 120),
448
+ ...(["ready", "sqm_required", "developer_required", "unavailable"].includes(org.desktopAccess) ? { desktopAccess: org.desktopAccess } : {}),
448
449
  ...(typeof org.slug === 'string' && org.slug && org.slug.length <= 160 && !/[\/\\?#\x00-\x1f]/.test(org.slug) ? { slug: org.slug } : {}) }));
449
450
  organizationState = "ready";
450
451
  } catch {
@@ -458,7 +459,9 @@ export async function startAgent({
458
459
  if (organizationId) {
459
460
  if (!isSessionValid(session, Date.now(), apiOrigin)) throw new Error("Sign in before switching organizations.");
460
461
  if (organizationState !== "ready" || !organizationItems.some(org => org.id === organizationId)) throw new Error("Refresh the organization list before selecting an organization.");
461
- organizationSlug = organizationItems.find(org => org.id === organizationId)?.slug;
462
+ const choice = organizationItems.find(org => org.id === organizationId);
463
+ if (choice.desktopAccess && choice.desktopAccess !== "ready") throw new Error("This organization does not have SIMY Developer access.");
464
+ organizationSlug = choice.slug;
462
465
  if (!organizationSlug) throw new Error('Refresh organizations before switching; its verified slug is unavailable.');
463
466
  if (organizationBusy()) throw Object.assign(new Error("Wait for running tasks to finish before switching organizations."), { code: "desktop_organization_busy" });
464
467
  authNonce = randomBytes(16).toString("base64url");
@@ -13,7 +13,7 @@ import {
13
13
  } from "./durable-local-task-steps-contract.js";
14
14
  import { buildExecutionCapabilityContract } from "./execution-capability-contract.js";
15
15
 
16
- export const CLI_VERSION = "0.5.50";
16
+ export const CLI_VERSION = "0.5.52";
17
17
  export const CLI_API_CONTRACT_VERSION = 10;
18
18
 
19
19
  export function withCliContract(