@askexenow/exe-os 0.8.76 → 0.8.78

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/bin/cli.js CHANGED
@@ -2928,9 +2928,17 @@ async function cloudSync(config) {
2928
2928
  } catch (err) {
2929
2929
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
2930
2930
  }
2931
- let behaviorsResult = { pushed: false, pulled: 0 };
2931
+ const countRows = async (sql) => {
2932
+ try {
2933
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
2934
+ } catch {
2935
+ return 0;
2936
+ }
2937
+ };
2938
+ let behaviorsResult = { pushed: 0, pulled: 0 };
2932
2939
  try {
2933
- behaviorsResult.pushed = await cloudPushBehaviors(config);
2940
+ await cloudPushBehaviors(config);
2941
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
2934
2942
  } catch (err) {
2935
2943
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
2936
2944
  }
@@ -2940,9 +2948,10 @@ async function cloudSync(config) {
2940
2948
  } catch (err) {
2941
2949
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
2942
2950
  }
2943
- let graphragResult = { pushed: false, pulled: 0 };
2951
+ let graphragResult = { pushed: 0, pulled: 0 };
2944
2952
  try {
2945
- graphragResult.pushed = await cloudPushGraphRAG(config);
2953
+ await cloudPushGraphRAG(config);
2954
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
2946
2955
  } catch (err) {
2947
2956
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
2948
2957
  }
@@ -2952,9 +2961,10 @@ async function cloudSync(config) {
2952
2961
  } catch (err) {
2953
2962
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
2954
2963
  }
2955
- let tasksResult = { pushed: false, pulled: 0 };
2964
+ let tasksResult = { pushed: 0, pulled: 0 };
2956
2965
  try {
2957
- tasksResult.pushed = await cloudPushTasks(config);
2966
+ await cloudPushTasks(config);
2967
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
2958
2968
  } catch (err) {
2959
2969
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
2960
2970
  }
@@ -2964,9 +2974,10 @@ async function cloudSync(config) {
2964
2974
  } catch (err) {
2965
2975
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
2966
2976
  }
2967
- let conversationsResult = { pushed: false, pulled: 0 };
2977
+ let conversationsResult = { pushed: 0, pulled: 0 };
2968
2978
  try {
2969
- conversationsResult.pushed = await cloudPushConversations(config);
2979
+ await cloudPushConversations(config);
2980
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
2970
2981
  } catch (err) {
2971
2982
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
2972
2983
  }
@@ -2976,9 +2987,10 @@ async function cloudSync(config) {
2976
2987
  } catch (err) {
2977
2988
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
2978
2989
  }
2979
- let documentsResult = { pushed: false, pulled: 0 };
2990
+ let documentsResult = { pushed: 0, pulled: 0 };
2980
2991
  try {
2981
- documentsResult.pushed = await cloudPushDocuments(config);
2992
+ await cloudPushDocuments(config);
2993
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
2982
2994
  } catch (err) {
2983
2995
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
2984
2996
  }
@@ -2988,6 +3000,16 @@ async function cloudSync(config) {
2988
3000
  } catch (err) {
2989
3001
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
2990
3002
  }
3003
+ let rosterResult = { employees: 0, identities: 0 };
3004
+ try {
3005
+ const employees = await loadEmployees();
3006
+ rosterResult.employees = employees.length;
3007
+ const idDir = path7.join(EXE_AI_DIR, "identity");
3008
+ if (existsSync7(idDir)) {
3009
+ rosterResult.identities = readdirSync(idDir).filter((f) => f.endsWith(".md")).length;
3010
+ }
3011
+ } catch {
3012
+ }
2991
3013
  return {
2992
3014
  pushed,
2993
3015
  pulled,
@@ -2995,7 +3017,8 @@ async function cloudSync(config) {
2995
3017
  graphrag: graphragResult,
2996
3018
  tasks: tasksResult,
2997
3019
  conversations: conversationsResult,
2998
- documents: documentsResult
3020
+ documents: documentsResult,
3021
+ roster: rosterResult
2999
3022
  };
3000
3023
  }
3001
3024
  function recordRosterDeletion(name) {
@@ -24859,6 +24882,16 @@ import { existsSync as existsSync23, readFileSync as readFileSync19, writeFileSy
24859
24882
  import path35 from "path";
24860
24883
  import os12 from "os";
24861
24884
  var args = process.argv.slice(2);
24885
+ if (args.includes("--version") || args.includes("-v")) {
24886
+ try {
24887
+ const pkgPath = path35.join(path35.dirname(new URL(import.meta.url).pathname), "..", "..", "package.json");
24888
+ const pkg = JSON.parse(readFileSync19(pkgPath, "utf8"));
24889
+ console.log(pkg.version);
24890
+ } catch {
24891
+ console.log("unknown");
24892
+ }
24893
+ process.exit(0);
24894
+ }
24862
24895
  if (args.includes("--global")) {
24863
24896
  process.stderr.write(
24864
24897
  "\x1B[33m[deprecated]\x1B[0m --global is deprecated. Use: exe-os claude install\n"
@@ -25390,14 +25423,15 @@ async function runCloudSync() {
25390
25423
  console.log("Syncing with Exe Cloud...");
25391
25424
  try {
25392
25425
  const result = await cloudSync2(config.cloud);
25426
+ console.log("");
25393
25427
  console.log(` Memories: pushed ${result.pushed}, pulled ${result.pulled}`);
25394
- console.log(` Roster: synced`);
25395
- console.log(` Behaviors: pushed ${result.behaviors.pushed ? "yes" : "no"}, pulled ${result.behaviors.pulled}`);
25396
- console.log(` GraphRAG: pushed ${result.graphrag.pushed ? "yes" : "no"}, pulled ${result.graphrag.pulled}`);
25397
- console.log(` Tasks: pushed ${result.tasks.pushed ? "yes" : "no"}, pulled ${result.tasks.pulled}`);
25398
- console.log(` Conversations: pushed ${result.conversations.pushed ? "yes" : "no"}, pulled ${result.conversations.pulled}`);
25399
- console.log(` Documents: pushed ${result.documents.pushed ? "yes" : "no"}, pulled ${result.documents.pulled}`);
25400
- console.log("\nSync complete.");
25428
+ console.log(` Behaviors: pushed ${result.behaviors.pushed}, pulled ${result.behaviors.pulled}`);
25429
+ console.log(` Roster: ${result.roster.employees} employees, ${result.roster.identities} identities`);
25430
+ console.log(` Tasks: pushed ${result.tasks.pushed}, pulled ${result.tasks.pulled}`);
25431
+ console.log(` Conversations: pushed ${result.conversations.pushed}, pulled ${result.conversations.pulled}`);
25432
+ console.log(` Documents: pushed ${result.documents.pushed}, pulled ${result.documents.pulled}`);
25433
+ console.log(` GraphRAG: pushed ${result.graphrag.pushed}, pulled ${result.graphrag.pulled}`);
25434
+ console.log("\n\x1B[32mSync complete.\x1B[0m");
25401
25435
  } catch (err) {
25402
25436
  console.error(`Sync failed: ${err instanceof Error ? err.message : String(err)}`);
25403
25437
  process.exit(1);
@@ -5992,9 +5992,17 @@ async function cloudSync(config) {
5992
5992
  } catch (err) {
5993
5993
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
5994
5994
  }
5995
- let behaviorsResult = { pushed: false, pulled: 0 };
5995
+ const countRows = async (sql) => {
5996
+ try {
5997
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
5998
+ } catch {
5999
+ return 0;
6000
+ }
6001
+ };
6002
+ let behaviorsResult = { pushed: 0, pulled: 0 };
5996
6003
  try {
5997
- behaviorsResult.pushed = await cloudPushBehaviors(config);
6004
+ await cloudPushBehaviors(config);
6005
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
5998
6006
  } catch (err) {
5999
6007
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
6000
6008
  }
@@ -6004,9 +6012,10 @@ async function cloudSync(config) {
6004
6012
  } catch (err) {
6005
6013
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
6006
6014
  }
6007
- let graphragResult = { pushed: false, pulled: 0 };
6015
+ let graphragResult = { pushed: 0, pulled: 0 };
6008
6016
  try {
6009
- graphragResult.pushed = await cloudPushGraphRAG(config);
6017
+ await cloudPushGraphRAG(config);
6018
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
6010
6019
  } catch (err) {
6011
6020
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
6012
6021
  }
@@ -6016,9 +6025,10 @@ async function cloudSync(config) {
6016
6025
  } catch (err) {
6017
6026
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
6018
6027
  }
6019
- let tasksResult = { pushed: false, pulled: 0 };
6028
+ let tasksResult = { pushed: 0, pulled: 0 };
6020
6029
  try {
6021
- tasksResult.pushed = await cloudPushTasks(config);
6030
+ await cloudPushTasks(config);
6031
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
6022
6032
  } catch (err) {
6023
6033
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
6024
6034
  }
@@ -6028,9 +6038,10 @@ async function cloudSync(config) {
6028
6038
  } catch (err) {
6029
6039
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
6030
6040
  }
6031
- let conversationsResult = { pushed: false, pulled: 0 };
6041
+ let conversationsResult = { pushed: 0, pulled: 0 };
6032
6042
  try {
6033
- conversationsResult.pushed = await cloudPushConversations(config);
6043
+ await cloudPushConversations(config);
6044
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
6034
6045
  } catch (err) {
6035
6046
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
6036
6047
  }
@@ -6040,9 +6051,10 @@ async function cloudSync(config) {
6040
6051
  } catch (err) {
6041
6052
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
6042
6053
  }
6043
- let documentsResult = { pushed: false, pulled: 0 };
6054
+ let documentsResult = { pushed: 0, pulled: 0 };
6044
6055
  try {
6045
- documentsResult.pushed = await cloudPushDocuments(config);
6056
+ await cloudPushDocuments(config);
6057
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
6046
6058
  } catch (err) {
6047
6059
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
6048
6060
  }
@@ -6052,6 +6064,16 @@ async function cloudSync(config) {
6052
6064
  } catch (err) {
6053
6065
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
6054
6066
  }
6067
+ let rosterResult = { employees: 0, identities: 0 };
6068
+ try {
6069
+ const employees = await loadEmployees();
6070
+ rosterResult.employees = employees.length;
6071
+ const idDir = path19.join(EXE_AI_DIR, "identity");
6072
+ if (existsSync15(idDir)) {
6073
+ rosterResult.identities = readdirSync7(idDir).filter((f) => f.endsWith(".md")).length;
6074
+ }
6075
+ } catch {
6076
+ }
6055
6077
  return {
6056
6078
  pushed,
6057
6079
  pulled,
@@ -6059,7 +6081,8 @@ async function cloudSync(config) {
6059
6081
  graphrag: graphragResult,
6060
6082
  tasks: tasksResult,
6061
6083
  conversations: conversationsResult,
6062
- documents: documentsResult
6084
+ documents: documentsResult,
6085
+ roster: rosterResult
6063
6086
  };
6064
6087
  }
6065
6088
  function recordRosterDeletion(name) {
@@ -887,9 +887,17 @@ async function cloudSync(config) {
887
887
  } catch (err) {
888
888
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
889
889
  }
890
- let behaviorsResult = { pushed: false, pulled: 0 };
890
+ const countRows = async (sql) => {
891
+ try {
892
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
893
+ } catch {
894
+ return 0;
895
+ }
896
+ };
897
+ let behaviorsResult = { pushed: 0, pulled: 0 };
891
898
  try {
892
- behaviorsResult.pushed = await cloudPushBehaviors(config);
899
+ await cloudPushBehaviors(config);
900
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
893
901
  } catch (err) {
894
902
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
895
903
  }
@@ -899,9 +907,10 @@ async function cloudSync(config) {
899
907
  } catch (err) {
900
908
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
901
909
  }
902
- let graphragResult = { pushed: false, pulled: 0 };
910
+ let graphragResult = { pushed: 0, pulled: 0 };
903
911
  try {
904
- graphragResult.pushed = await cloudPushGraphRAG(config);
912
+ await cloudPushGraphRAG(config);
913
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
905
914
  } catch (err) {
906
915
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
907
916
  }
@@ -911,9 +920,10 @@ async function cloudSync(config) {
911
920
  } catch (err) {
912
921
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
913
922
  }
914
- let tasksResult = { pushed: false, pulled: 0 };
923
+ let tasksResult = { pushed: 0, pulled: 0 };
915
924
  try {
916
- tasksResult.pushed = await cloudPushTasks(config);
925
+ await cloudPushTasks(config);
926
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
917
927
  } catch (err) {
918
928
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
919
929
  }
@@ -923,9 +933,10 @@ async function cloudSync(config) {
923
933
  } catch (err) {
924
934
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
925
935
  }
926
- let conversationsResult = { pushed: false, pulled: 0 };
936
+ let conversationsResult = { pushed: 0, pulled: 0 };
927
937
  try {
928
- conversationsResult.pushed = await cloudPushConversations(config);
938
+ await cloudPushConversations(config);
939
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
929
940
  } catch (err) {
930
941
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
931
942
  }
@@ -935,9 +946,10 @@ async function cloudSync(config) {
935
946
  } catch (err) {
936
947
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
937
948
  }
938
- let documentsResult = { pushed: false, pulled: 0 };
949
+ let documentsResult = { pushed: 0, pulled: 0 };
939
950
  try {
940
- documentsResult.pushed = await cloudPushDocuments(config);
951
+ await cloudPushDocuments(config);
952
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
941
953
  } catch (err) {
942
954
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
943
955
  }
@@ -947,6 +959,16 @@ async function cloudSync(config) {
947
959
  } catch (err) {
948
960
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
949
961
  }
962
+ let rosterResult = { employees: 0, identities: 0 };
963
+ try {
964
+ const employees = await loadEmployees();
965
+ rosterResult.employees = employees.length;
966
+ const idDir = path5.join(EXE_AI_DIR, "identity");
967
+ if (existsSync5(idDir)) {
968
+ rosterResult.identities = readdirSync(idDir).filter((f) => f.endsWith(".md")).length;
969
+ }
970
+ } catch {
971
+ }
950
972
  return {
951
973
  pushed,
952
974
  pulled,
@@ -954,7 +976,8 @@ async function cloudSync(config) {
954
976
  graphrag: graphragResult,
955
977
  tasks: tasksResult,
956
978
  conversations: conversationsResult,
957
- documents: documentsResult
979
+ documents: documentsResult,
980
+ roster: rosterResult
958
981
  };
959
982
  }
960
983
  function recordRosterDeletion(name) {
package/dist/bin/setup.js CHANGED
@@ -1760,9 +1760,17 @@ async function cloudSync(config) {
1760
1760
  } catch (err) {
1761
1761
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
1762
1762
  }
1763
- let behaviorsResult = { pushed: false, pulled: 0 };
1763
+ const countRows = async (sql) => {
1764
+ try {
1765
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
1766
+ } catch {
1767
+ return 0;
1768
+ }
1769
+ };
1770
+ let behaviorsResult = { pushed: 0, pulled: 0 };
1764
1771
  try {
1765
- behaviorsResult.pushed = await cloudPushBehaviors(config);
1772
+ await cloudPushBehaviors(config);
1773
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
1766
1774
  } catch (err) {
1767
1775
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
1768
1776
  }
@@ -1772,9 +1780,10 @@ async function cloudSync(config) {
1772
1780
  } catch (err) {
1773
1781
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
1774
1782
  }
1775
- let graphragResult = { pushed: false, pulled: 0 };
1783
+ let graphragResult = { pushed: 0, pulled: 0 };
1776
1784
  try {
1777
- graphragResult.pushed = await cloudPushGraphRAG(config);
1785
+ await cloudPushGraphRAG(config);
1786
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
1778
1787
  } catch (err) {
1779
1788
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
1780
1789
  }
@@ -1784,9 +1793,10 @@ async function cloudSync(config) {
1784
1793
  } catch (err) {
1785
1794
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
1786
1795
  }
1787
- let tasksResult = { pushed: false, pulled: 0 };
1796
+ let tasksResult = { pushed: 0, pulled: 0 };
1788
1797
  try {
1789
- tasksResult.pushed = await cloudPushTasks(config);
1798
+ await cloudPushTasks(config);
1799
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
1790
1800
  } catch (err) {
1791
1801
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
1792
1802
  }
@@ -1796,9 +1806,10 @@ async function cloudSync(config) {
1796
1806
  } catch (err) {
1797
1807
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
1798
1808
  }
1799
- let conversationsResult = { pushed: false, pulled: 0 };
1809
+ let conversationsResult = { pushed: 0, pulled: 0 };
1800
1810
  try {
1801
- conversationsResult.pushed = await cloudPushConversations(config);
1811
+ await cloudPushConversations(config);
1812
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
1802
1813
  } catch (err) {
1803
1814
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
1804
1815
  }
@@ -1808,9 +1819,10 @@ async function cloudSync(config) {
1808
1819
  } catch (err) {
1809
1820
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
1810
1821
  }
1811
- let documentsResult = { pushed: false, pulled: 0 };
1822
+ let documentsResult = { pushed: 0, pulled: 0 };
1812
1823
  try {
1813
- documentsResult.pushed = await cloudPushDocuments(config);
1824
+ await cloudPushDocuments(config);
1825
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
1814
1826
  } catch (err) {
1815
1827
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
1816
1828
  }
@@ -1820,6 +1832,16 @@ async function cloudSync(config) {
1820
1832
  } catch (err) {
1821
1833
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
1822
1834
  }
1835
+ let rosterResult = { employees: 0, identities: 0 };
1836
+ try {
1837
+ const employees = await loadEmployees();
1838
+ rosterResult.employees = employees.length;
1839
+ const idDir = path7.join(EXE_AI_DIR, "identity");
1840
+ if (existsSync7(idDir)) {
1841
+ rosterResult.identities = readdirSync(idDir).filter((f) => f.endsWith(".md")).length;
1842
+ }
1843
+ } catch {
1844
+ }
1823
1845
  return {
1824
1846
  pushed,
1825
1847
  pulled,
@@ -1827,7 +1849,8 @@ async function cloudSync(config) {
1827
1849
  graphrag: graphragResult,
1828
1850
  tasks: tasksResult,
1829
1851
  conversations: conversationsResult,
1830
- documents: documentsResult
1852
+ documents: documentsResult,
1853
+ roster: rosterResult
1831
1854
  };
1832
1855
  }
1833
1856
  function recordRosterDeletion(name) {
@@ -3603,9 +3603,17 @@ async function cloudSync(config) {
3603
3603
  } catch (err) {
3604
3604
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
3605
3605
  }
3606
- let behaviorsResult = { pushed: false, pulled: 0 };
3606
+ const countRows = async (sql) => {
3607
+ try {
3608
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
3609
+ } catch {
3610
+ return 0;
3611
+ }
3612
+ };
3613
+ let behaviorsResult = { pushed: 0, pulled: 0 };
3607
3614
  try {
3608
- behaviorsResult.pushed = await cloudPushBehaviors(config);
3615
+ await cloudPushBehaviors(config);
3616
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
3609
3617
  } catch (err) {
3610
3618
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
3611
3619
  }
@@ -3615,9 +3623,10 @@ async function cloudSync(config) {
3615
3623
  } catch (err) {
3616
3624
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
3617
3625
  }
3618
- let graphragResult = { pushed: false, pulled: 0 };
3626
+ let graphragResult = { pushed: 0, pulled: 0 };
3619
3627
  try {
3620
- graphragResult.pushed = await cloudPushGraphRAG(config);
3628
+ await cloudPushGraphRAG(config);
3629
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
3621
3630
  } catch (err) {
3622
3631
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
3623
3632
  }
@@ -3627,9 +3636,10 @@ async function cloudSync(config) {
3627
3636
  } catch (err) {
3628
3637
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
3629
3638
  }
3630
- let tasksResult = { pushed: false, pulled: 0 };
3639
+ let tasksResult = { pushed: 0, pulled: 0 };
3631
3640
  try {
3632
- tasksResult.pushed = await cloudPushTasks(config);
3641
+ await cloudPushTasks(config);
3642
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
3633
3643
  } catch (err) {
3634
3644
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
3635
3645
  }
@@ -3639,9 +3649,10 @@ async function cloudSync(config) {
3639
3649
  } catch (err) {
3640
3650
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
3641
3651
  }
3642
- let conversationsResult = { pushed: false, pulled: 0 };
3652
+ let conversationsResult = { pushed: 0, pulled: 0 };
3643
3653
  try {
3644
- conversationsResult.pushed = await cloudPushConversations(config);
3654
+ await cloudPushConversations(config);
3655
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
3645
3656
  } catch (err) {
3646
3657
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
3647
3658
  }
@@ -3651,9 +3662,10 @@ async function cloudSync(config) {
3651
3662
  } catch (err) {
3652
3663
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
3653
3664
  }
3654
- let documentsResult = { pushed: false, pulled: 0 };
3665
+ let documentsResult = { pushed: 0, pulled: 0 };
3655
3666
  try {
3656
- documentsResult.pushed = await cloudPushDocuments(config);
3667
+ await cloudPushDocuments(config);
3668
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
3657
3669
  } catch (err) {
3658
3670
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
3659
3671
  }
@@ -3663,6 +3675,16 @@ async function cloudSync(config) {
3663
3675
  } catch (err) {
3664
3676
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
3665
3677
  }
3678
+ let rosterResult = { employees: 0, identities: 0 };
3679
+ try {
3680
+ const employees = await loadEmployees();
3681
+ rosterResult.employees = employees.length;
3682
+ const idDir = path13.join(EXE_AI_DIR, "identity");
3683
+ if (existsSync12(idDir)) {
3684
+ rosterResult.identities = readdirSync4(idDir).filter((f) => f.endsWith(".md")).length;
3685
+ }
3686
+ } catch {
3687
+ }
3666
3688
  return {
3667
3689
  pushed,
3668
3690
  pulled,
@@ -3670,7 +3692,8 @@ async function cloudSync(config) {
3670
3692
  graphrag: graphragResult,
3671
3693
  tasks: tasksResult,
3672
3694
  conversations: conversationsResult,
3673
- documents: documentsResult
3695
+ documents: documentsResult,
3696
+ roster: rosterResult
3674
3697
  };
3675
3698
  }
3676
3699
  function recordRosterDeletion(name) {
@@ -665,9 +665,17 @@ async function cloudSync(config) {
665
665
  } catch (err) {
666
666
  logError(`[cloud-sync] Global procedures pull: ${err instanceof Error ? err.message : String(err)}`);
667
667
  }
668
- let behaviorsResult = { pushed: false, pulled: 0 };
668
+ const countRows = async (sql) => {
669
+ try {
670
+ return Number((await client.execute(sql)).rows[0]?.cnt ?? 0);
671
+ } catch {
672
+ return 0;
673
+ }
674
+ };
675
+ let behaviorsResult = { pushed: 0, pulled: 0 };
669
676
  try {
670
- behaviorsResult.pushed = await cloudPushBehaviors(config);
677
+ await cloudPushBehaviors(config);
678
+ behaviorsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM behaviors WHERE active = 1");
671
679
  } catch (err) {
672
680
  logError(`[cloud-sync] Behaviors push: ${err instanceof Error ? err.message : String(err)}`);
673
681
  }
@@ -677,9 +685,10 @@ async function cloudSync(config) {
677
685
  } catch (err) {
678
686
  logError(`[cloud-sync] Behaviors pull: ${err instanceof Error ? err.message : String(err)}`);
679
687
  }
680
- let graphragResult = { pushed: false, pulled: 0 };
688
+ let graphragResult = { pushed: 0, pulled: 0 };
681
689
  try {
682
- graphragResult.pushed = await cloudPushGraphRAG(config);
690
+ await cloudPushGraphRAG(config);
691
+ graphragResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM entities");
683
692
  } catch (err) {
684
693
  logError(`[cloud-sync] GraphRAG push: ${err instanceof Error ? err.message : String(err)}`);
685
694
  }
@@ -689,9 +698,10 @@ async function cloudSync(config) {
689
698
  } catch (err) {
690
699
  logError(`[cloud-sync] GraphRAG pull: ${err instanceof Error ? err.message : String(err)}`);
691
700
  }
692
- let tasksResult = { pushed: false, pulled: 0 };
701
+ let tasksResult = { pushed: 0, pulled: 0 };
693
702
  try {
694
- tasksResult.pushed = await cloudPushTasks(config);
703
+ await cloudPushTasks(config);
704
+ tasksResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM tasks");
695
705
  } catch (err) {
696
706
  logError(`[cloud-sync] Tasks push: ${err instanceof Error ? err.message : String(err)}`);
697
707
  }
@@ -701,9 +711,10 @@ async function cloudSync(config) {
701
711
  } catch (err) {
702
712
  logError(`[cloud-sync] Tasks pull: ${err instanceof Error ? err.message : String(err)}`);
703
713
  }
704
- let conversationsResult = { pushed: false, pulled: 0 };
714
+ let conversationsResult = { pushed: 0, pulled: 0 };
705
715
  try {
706
- conversationsResult.pushed = await cloudPushConversations(config);
716
+ await cloudPushConversations(config);
717
+ conversationsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM conversations");
707
718
  } catch (err) {
708
719
  logError(`[cloud-sync] Conversations push: ${err instanceof Error ? err.message : String(err)}`);
709
720
  }
@@ -713,9 +724,10 @@ async function cloudSync(config) {
713
724
  } catch (err) {
714
725
  logError(`[cloud-sync] Conversations pull: ${err instanceof Error ? err.message : String(err)}`);
715
726
  }
716
- let documentsResult = { pushed: false, pulled: 0 };
727
+ let documentsResult = { pushed: 0, pulled: 0 };
717
728
  try {
718
- documentsResult.pushed = await cloudPushDocuments(config);
729
+ await cloudPushDocuments(config);
730
+ documentsResult.pushed = await countRows("SELECT COUNT(*) as cnt FROM documents");
719
731
  } catch (err) {
720
732
  logError(`[cloud-sync] Documents push: ${err instanceof Error ? err.message : String(err)}`);
721
733
  }
@@ -725,6 +737,16 @@ async function cloudSync(config) {
725
737
  } catch (err) {
726
738
  logError(`[cloud-sync] Documents pull: ${err instanceof Error ? err.message : String(err)}`);
727
739
  }
740
+ let rosterResult = { employees: 0, identities: 0 };
741
+ try {
742
+ const employees = await loadEmployees();
743
+ rosterResult.employees = employees.length;
744
+ const idDir = path5.join(EXE_AI_DIR, "identity");
745
+ if (existsSync5(idDir)) {
746
+ rosterResult.identities = readdirSync(idDir).filter((f) => f.endsWith(".md")).length;
747
+ }
748
+ } catch {
749
+ }
728
750
  return {
729
751
  pushed,
730
752
  pulled,
@@ -732,7 +754,8 @@ async function cloudSync(config) {
732
754
  graphrag: graphragResult,
733
755
  tasks: tasksResult,
734
756
  conversations: conversationsResult,
735
- documents: documentsResult
757
+ documents: documentsResult,
758
+ roster: rosterResult
736
759
  };
737
760
  }
738
761
  var ROSTER_DELETIONS_PATH = path5.join(EXE_AI_DIR, "roster-deletions.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.8.76",
3
+ "version": "0.8.78",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "type": "module",