forkit-connect 0.1.24 → 0.1.25

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/dist/cli.js CHANGED
@@ -54,17 +54,17 @@ const CLI_FALLBACK_PLAN_LIMITS = {
54
54
  signal: {
55
55
  privatePassports: 25,
56
56
  draftPassports: 25,
57
- maxWorkspaces: 3,
58
- maxProjects: 3,
59
- maxGovernedPassports: 3,
57
+ maxWorkspaces: 1,
58
+ maxProjects: 1,
59
+ maxGovernedPassports: 25,
60
60
  runtimeSignalsPerMonth: 10000,
61
61
  },
62
62
  protocol: {
63
63
  privatePassports: 20,
64
64
  draftPassports: 20,
65
- maxWorkspaces: null,
66
- maxProjects: null,
67
- maxGovernedPassports: null,
65
+ maxWorkspaces: 10,
66
+ maxProjects: 10,
67
+ maxGovernedPassports: 20,
68
68
  runtimeSignalsPerMonth: 250000,
69
69
  },
70
70
  sovereign: {
@@ -1968,7 +1968,14 @@ async function maybeShowInteractiveAgentReviewTable(snapshot) {
1968
1968
  });
1969
1969
  }
1970
1970
  function formatWorkspaceStateCell(workspace) {
1971
- return [String(workspace.visibility || '').trim(), String(workspace.lifecycleStatus || '').trim()]
1971
+ const projectCount = Number(workspace.projectCountHint);
1972
+ const passportCount = Number(workspace.passportCountHint);
1973
+ return [
1974
+ String(workspace.visibility || '').trim(),
1975
+ String(workspace.lifecycleStatus || '').trim(),
1976
+ Number.isFinite(projectCount) && projectCount >= 0 ? `${projectCount} project${projectCount === 1 ? '' : 's'}` : null,
1977
+ Number.isFinite(passportCount) && passportCount >= 0 ? `${passportCount} passport${passportCount === 1 ? '' : 's'}` : null,
1978
+ ]
1972
1979
  .filter(Boolean)
1973
1980
  .join(' · ') || 'active';
1974
1981
  }
@@ -2932,12 +2939,14 @@ async function run() {
2932
2939
  }
2933
2940
  const operatingMode = resolveOperatingMode(service);
2934
2941
  const accountTrusted = sessionState === 'authorized';
2942
+ const accountLimits = accountTrusted ? await loadCliAccountLimits().catch(() => null) : null;
2935
2943
  const overview = withSmartInboxSnapshotCounts(service.getConnectStatusOverview({ includeInbox: false }));
2936
2944
  const localScopeCached = Boolean(String(overview.workspace_id || '').trim() || String(overview.project_id || '').trim());
2937
2945
  return {
2938
2946
  session_state: sessionState,
2939
2947
  operating_mode: operatingMode.mode,
2940
- tier: operatingMode.tier,
2948
+ tier: accountLimits?.planKey ?? operatingMode.tier,
2949
+ plan_name: accountLimits?.planName ?? (operatingMode.tier ? getCliPlanName(resolveCliPlanKey(operatingMode.tier)) : null),
2941
2950
  workspace_id: accountTrusted ? overview.workspace_id : null,
2942
2951
  project_id: accountTrusted ? overview.project_id : null,
2943
2952
  binding_state: accountTrusted ? overview.binding_state : 'login_required',
@@ -4213,7 +4222,7 @@ async function run() {
4213
4222
  ? draftsResult.body.drafts
4214
4223
  : [];
4215
4224
  const passports = passportsResult?.ok ? readPassportList(passportsResult.body) : [];
4216
- const planKey = resolveCliPlanKey(summaryPayload?.planCapabilities?.planKey, summaryPayload?.package?.slug, summaryPayload?.tier, accessPayload?.summary?.tier, service.getServiceEntitlements().tier);
4225
+ const planKey = resolveCliPlanKey(summaryPayload?.planCapabilities?.planKey, summaryPayload?.package?.slug, accessPayload?.summary?.planKey, accessPayload?.summary?.packageSlug, summaryPayload?.tier, accessPayload?.summary?.tier, service.getServiceEntitlements().tier);
4217
4226
  const fallback = CLI_FALLBACK_PLAN_LIMITS[planKey];
4218
4227
  let projectsUsed = typeof summaryPayload?.usage?.projects === 'number' ? summaryPayload.usage.projects : null;
4219
4228
  if (projectsUsed === null && workspaces.length > 0) {
@@ -4618,6 +4627,7 @@ async function run() {
4618
4627
  console.log('[forkit-connect] Workspace status');
4619
4628
  console.log(`- mode=${payload.operating_mode}`);
4620
4629
  console.log(`- tier=${payload.tier || 'unknown'}`);
4630
+ console.log(`- plan=${payload.plan_name || 'unknown'}`);
4621
4631
  console.log(`- workspace=${payload.workspace_id || 'not selected'}`);
4622
4632
  console.log(`- project=${payload.project_id || 'not selected'}`);
4623
4633
  console.log(`- session=${payload.session_state}`);
@@ -6198,12 +6208,14 @@ async function run() {
6198
6208
  ? tokenPayload.role
6199
6209
  : null;
6200
6210
  const workspaces = Array.isArray(payload.workspaces) ? payload.workspaces : [];
6211
+ const accountLimits = await loadCliAccountLimits().catch(() => null);
6201
6212
  if (await maybeShowInteractiveWorkspaceTable(workspaces)) {
6202
6213
  return;
6203
6214
  }
6204
6215
  printWorkspaceListSurface(workspaces, {
6205
6216
  accountEmail: email,
6206
6217
  platformRole,
6218
+ accountLimits,
6207
6219
  });
6208
6220
  return;
6209
6221
  }
package/dist/v1/api.d.ts CHANGED
@@ -62,6 +62,8 @@ export interface ProfileAccessWorkspace {
62
62
  visibility?: 'private' | 'public' | string;
63
63
  verificationStatus?: 'unverified' | 'verified' | 'revoked' | string;
64
64
  lifecycleStatus?: 'active' | 'deactivated' | string;
65
+ projectCountHint?: number | null;
66
+ passportCountHint?: number | null;
65
67
  createdAt?: string | null;
66
68
  updatedAt?: string | null;
67
69
  }
@@ -69,6 +71,9 @@ export interface ProfileAccessResponse {
69
71
  summary?: {
70
72
  platformRole?: string;
71
73
  tier?: string;
74
+ planKey?: string;
75
+ planLabel?: string;
76
+ packageSlug?: string;
72
77
  };
73
78
  workspaces?: ProfileAccessWorkspace[];
74
79
  }
package/dist/v1/api.js CHANGED
@@ -112,7 +112,7 @@ class ConnectApiClient {
112
112
  };
113
113
  }
114
114
  async getProductSummary() {
115
- const url = `${this.config.baseUrl}/product/summary`;
115
+ const url = `${this.config.baseUrl}/api/product/summary`;
116
116
  const res = await fetch(url, {
117
117
  method: 'GET',
118
118
  headers: this.getHeaders(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forkit-connect",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Forkit Connect Local Engine - The Global AI Governance Fabric",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",