forkit-connect 0.1.8 → 0.1.10

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
@@ -929,6 +929,7 @@ function buildInteractiveOverviewSections(service, sessionState, accountLimits)
929
929
  ];
930
930
  // Account-bound sections: only shown after login
931
931
  if (accountTrusted) {
932
+ const otherReadyCount = getOtherReadyCount(overview.ready_to_connect_count, overview.draft_first_count);
932
933
  sections.push({
933
934
  title: 'Discovery',
934
935
  lines: [
@@ -941,7 +942,8 @@ function buildInteractiveOverviewSections(service, sessionState, accountLimits)
941
942
  sections.push({
942
943
  title: 'Inbox',
943
944
  lines: [
944
- shellLine('Ready to connect', overview.ready_to_connect_count),
945
+ shellLine('Draft-first review', overview.draft_first_count),
946
+ shellLine('Ready to connect', otherReadyCount),
945
947
  shellLine('Needs confirmation', overview.needs_confirmation_count),
946
948
  shellLine('Connected', overview.connected_count),
947
949
  ...(overview.lifecycle_note ? [shellLine('Note', overview.lifecycle_note)] : []),
@@ -970,7 +972,8 @@ function buildInteractiveOverviewSections(service, sessionState, accountLimits)
970
972
  lines: [
971
973
  shellLine('Workspace', formatScopeReferenceLabel(preparedWorkspace || null, 'workspace')),
972
974
  shellLine('Project', formatScopeReferenceLabel(preparedProject || null, 'project')),
973
- shellLine('Ready to connect', overview.ready_to_connect_count),
975
+ shellLine('Draft-first review', overview.draft_first_count),
976
+ shellLine('Ready to connect', otherReadyCount),
974
977
  shellLine('Needs confirmation', overview.needs_confirmation_count),
975
978
  ],
976
979
  });
@@ -1468,6 +1471,7 @@ function printConnectStatusOverview(status) {
1468
1471
  paused_session_count: status.paused_session_count,
1469
1472
  revoked_session_count: status.revoked_session_count,
1470
1473
  credential_reconnect_needed: status.credential_reconnect_needed,
1474
+ draft_first_count: status.draft_first_count,
1471
1475
  ready_to_connect_count: status.ready_to_connect_count,
1472
1476
  needs_confirmation_count: status.needs_confirmation_count,
1473
1477
  connected_count: status.connected_count,
@@ -1478,12 +1482,13 @@ function printConnectStatusOverview(status) {
1478
1482
  }, null, 2));
1479
1483
  }
1480
1484
  function printPublicStatusOverview(status) {
1485
+ const otherReadyCount = getOtherReadyCount(status.ready_to_connect_count, status.draft_first_count);
1481
1486
  console.log('[forkit-connect] Status');
1482
1487
  console.log(`- device=${status.device_paired ? 'paired' : 'approval pending'}`);
1483
1488
  console.log(`- scope=${status.workspace_id && status.project_id ? `${status.workspace_id} / ${status.project_id}` : 'not selected'}`);
1484
1489
  console.log(`- daemon=${status.daemon_status}`);
1485
1490
  console.log(`- local inventory=models ${status.models_discovered} · agents ${status.agents_discovered} · runtimes ${status.runtimes_discovered}`);
1486
- console.log(`- review queue=ready ${status.ready_to_connect_count} · needs review ${status.needs_confirmation_count}`);
1491
+ console.log(`- review queue=draft first ${status.draft_first_count} · ready ${otherReadyCount} · needs review ${status.needs_confirmation_count}`);
1487
1492
  console.log(`- connected records=${status.connected_count}`);
1488
1493
  console.log(`- pending runtime sync=${status.c2_sync_pending}`);
1489
1494
  console.log(`- privacy=${status.privacy_mode}`);
@@ -1494,6 +1499,9 @@ function printPublicStatusOverview(status) {
1494
1499
  console.log('- warning=Local workspace/project scope exists, but the account session is missing. Re-login is required before governed actions can continue.');
1495
1500
  }
1496
1501
  }
1502
+ function getOtherReadyCount(readyToConnectCount, draftFirstCount) {
1503
+ return Math.max(0, readyToConnectCount - draftFirstCount);
1504
+ }
1497
1505
  function printPublicStatusGuidance(status, sessionState) {
1498
1506
  const accountLabel = sessionState === 'authorized'
1499
1507
  ? 'connected'
@@ -1752,8 +1760,11 @@ async function run() {
1752
1760
  preferSnapshot: true,
1753
1761
  refreshInBackground: false,
1754
1762
  });
1763
+ const draftFirstCount = inbox.groups.ready_to_connect.filter((item) => (item.item_type === 'model'
1764
+ && String(item.details_received_automatically.registration_flow_state || '').trim() === 'private_draft_required')).length;
1755
1765
  return {
1756
1766
  ...overview,
1767
+ draft_first_count: draftFirstCount,
1757
1768
  ready_to_connect_count: inbox.summary.ready_to_connect_count,
1758
1769
  needs_confirmation_count: inbox.summary.needs_confirmation_count,
1759
1770
  connected_count: inbox.summary.connected_count,
@@ -2075,6 +2086,7 @@ async function run() {
2075
2086
  ? 'Local workspace/project scope is cached on this device, but account login is required before governed actions can continue.'
2076
2087
  : 'Account login is required before governed workspace/project actions can continue.',
2077
2088
  daemon_status: overview.daemon_status,
2089
+ draft_first_count: overview.draft_first_count,
2078
2090
  ready_to_connect_count: overview.ready_to_connect_count,
2079
2091
  needs_confirmation_count: overview.needs_confirmation_count,
2080
2092
  connected_count: overview.connected_count,
@@ -2100,6 +2112,7 @@ async function run() {
2100
2112
  };
2101
2113
  const renderInteractiveWorkspaceScreen = async () => {
2102
2114
  const payload = await buildWorkspaceStatusPayload();
2115
+ const otherReadyCount = getOtherReadyCount(payload.ready_to_connect_count, payload.draft_first_count);
2103
2116
  renderInteractiveScreen('Workspace Scope', {
2104
2117
  subtitle: 'Current workspace and project selection',
2105
2118
  sections: [
@@ -2118,7 +2131,8 @@ async function run() {
2118
2131
  {
2119
2132
  title: 'Queue',
2120
2133
  lines: [
2121
- shellLine('Ready to connect', payload.ready_to_connect_count),
2134
+ shellLine('Draft-first review', payload.draft_first_count),
2135
+ shellLine('Ready to connect', otherReadyCount),
2122
2136
  shellLine('Needs confirmation', payload.needs_confirmation_count),
2123
2137
  shellLine('Connected', payload.connected_count),
2124
2138
  ...(payload.lifecycle_note ? [shellLine('Note', payload.lifecycle_note)] : []),
package/dist/launcher.js CHANGED
@@ -912,6 +912,9 @@ function buildDiscovery(service) {
912
912
  const modelItems = items.filter((item) => item.kind === 'model');
913
913
  const agentItems = items.filter((item) => item.kind === 'agent');
914
914
  const runtimeItems = items.filter((item) => item.kind === 'runtime');
915
+ const draftFirstCount = inbox.groups.ready_to_connect.filter((item) => (item.item_type === 'model'
916
+ && String(item.details_received_automatically.registration_flow_state || '').trim() === 'private_draft_required')).length;
917
+ const otherReadyCount = Math.max(0, inbox.summary.ready_to_connect_count - draftFirstCount);
915
918
  return {
916
919
  ok: true,
917
920
  generatedAt: new Date().toISOString(),
@@ -926,7 +929,7 @@ function buildDiscovery(service) {
926
929
  localDetection: state.detected_runtimes.length > 0 || state.detected_models.length > 0 ? 'active' : 'attention',
927
930
  metadataExtraction: state.detected_models.length > 0 ? 'active' : 'attention',
928
931
  duplicateMatching: inbox.existing_passport_match_candidates.length > 0 || state.model_bindings.length > 0 ? 'active' : 'attention',
929
- passportReadiness: `${inbox.summary.ready_to_connect_count} ready · ${inbox.summary.needs_confirmation_count} review · ${inbox.summary.connected_count} linked`,
932
+ passportReadiness: `${draftFirstCount} draft-first · ${otherReadyCount} ready · ${inbox.summary.needs_confirmation_count} review · ${inbox.summary.connected_count} linked`,
930
933
  },
931
934
  groups: {
932
935
  ready_to_connect: inbox.groups.ready_to_connect.length,
@@ -253,6 +253,7 @@ export interface ConnectStatusOverview {
253
253
  paused_session_count: number;
254
254
  revoked_session_count: number;
255
255
  credential_reconnect_needed: boolean;
256
+ draft_first_count: number;
256
257
  ready_to_connect_count: number;
257
258
  needs_confirmation_count: number;
258
259
  connected_count: number;
@@ -4725,6 +4725,11 @@ class ConnectV1Service {
4725
4725
  const state = this.stateStore.readState();
4726
4726
  const includeInbox = options?.includeInbox !== false;
4727
4727
  const inbox = includeInbox ? this.buildSmartRegistrationInbox() : null;
4728
+ const draftFirstCount = inbox
4729
+ ? inbox.groups.ready_to_connect.filter((item) => (item.item_type === 'model'
4730
+ && String(item.details_received_automatically.registration_flow_state || '').trim() === 'private_draft_required')).length
4731
+ : state.detected_models.filter((item) => (item.status !== 'ignored'
4732
+ && String((item.metadata && typeof item.metadata === 'object' ? item.metadata : {}).tracking_status || '').trim() === 'private_draft_required')).length;
4728
4733
  const sessionSummary = this.getC2SessionSummary();
4729
4734
  const binding = this.getEffectiveBindingState(state);
4730
4735
  const bindingReconnectRequired = this.bindingRequiresReconnect(state);
@@ -4744,6 +4749,7 @@ class ConnectV1Service {
4744
4749
  paused_session_count: sessionSummary.paused_session_count,
4745
4750
  revoked_session_count: sessionSummary.revoked_session_count,
4746
4751
  credential_reconnect_needed: bindingReconnectRequired || sessionSummary.credential_reconnect_needed,
4752
+ draft_first_count: draftFirstCount,
4747
4753
  ready_to_connect_count: inbox?.summary.ready_to_connect_count ?? discoveredModels,
4748
4754
  needs_confirmation_count: inbox?.summary.needs_confirmation_count ?? 0,
4749
4755
  connected_count: inbox?.summary.connected_count ?? connectedCount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forkit-connect",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Forkit Connect Local Engine - The Global AI Governance Fabric",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",