@devness/useai 0.8.8 → 0.8.9

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -120,6 +120,9 @@ var init_chain = __esm({
120
120
  });
121
121
 
122
122
  // ../shared/dist/types/config.js
123
+ function getUserMode(config2) {
124
+ return config2.auth?.token ? "cloud" : "local";
125
+ }
123
126
  var init_config = __esm({
124
127
  "../shared/dist/types/config.js"() {
125
128
  "use strict";
@@ -215,7 +218,7 @@ var VERSION;
215
218
  var init_version = __esm({
216
219
  "../shared/dist/constants/version.js"() {
217
220
  "use strict";
218
- VERSION = "0.8.8";
221
+ VERSION = "0.8.9";
219
222
  }
220
223
  });
221
224
 
@@ -250,7 +253,7 @@ var init_defaults = __esm({
250
253
  milestones: true
251
254
  };
252
255
  DEFAULT_SYNC_CONFIG = {
253
- enabled: true,
256
+ enabled: false,
254
257
  interval_hours: 1
255
258
  };
256
259
  DEFAULT_CONFIG = {
@@ -5112,6 +5115,9 @@ function migrateConfig(raw) {
5112
5115
  };
5113
5116
  }
5114
5117
  delete config2.sync.include;
5118
+ if (config2.sync.enabled && !config2.auth?.token) {
5119
+ config2.sync.enabled = false;
5120
+ }
5115
5121
  if (!config2.evaluation_framework) {
5116
5122
  config2.evaluation_framework = "space";
5117
5123
  }
@@ -6318,6 +6324,7 @@ __export(dist_exports, {
6318
6324
  generateSessionId: () => generateSessionId,
6319
6325
  getFramework: () => getFramework,
6320
6326
  getFrameworkIds: () => getFrameworkIds,
6327
+ getUserMode: () => getUserMode,
6321
6328
  hasTimeOverlap: () => hasTimeOverlap,
6322
6329
  installAutostart: () => installAutostart,
6323
6330
  installClaudeCodeHooks: () => installClaudeCodeHooks,
@@ -33905,7 +33912,8 @@ function registerTools(server2, session2, opts) {
33905
33912
  session2.inProgressSince = Date.now();
33906
33913
  writeMcpMapping(session2.mcpSessionId, session2.sessionId);
33907
33914
  const childSuffix = parentSessionId ? ` \xB7 child of ${parentSessionId.slice(0, 8)}` : "";
33908
- const responseText = `useai session started \u2014 ${session2.sessionTaskType} on ${session2.clientName} \xB7 ${session2.sessionId.slice(0, 8)} \xB7 conv ${session2.conversationId.slice(0, 8)}#${session2.conversationIndex}${childSuffix} \xB7 ${session2.signingAvailable ? "signed" : "unsigned"}`;
33915
+ const mode = config2.auth?.token ? "cloud" : "local";
33916
+ const responseText = `useai session started \u2014 ${session2.sessionTaskType} on ${session2.clientName} \xB7 ${session2.sessionId.slice(0, 8)} \xB7 conv ${session2.conversationId.slice(0, 8)}#${session2.conversationIndex}${childSuffix} \xB7 ${session2.signingAvailable ? "signed" : "unsigned"} \xB7 ${mode}`;
33909
33917
  return {
33910
33918
  content: [
33911
33919
  {
@@ -34613,6 +34621,7 @@ function handleLocalConfig(_req, res) {
34613
34621
  const raw = readJson(CONFIG_FILE, {});
34614
34622
  const config2 = migrateConfig(raw);
34615
34623
  json(res, 200, {
34624
+ mode: config2.auth?.token ? "cloud" : "local",
34616
34625
  authenticated: !!config2.auth?.token,
34617
34626
  email: config2.auth?.user?.email ?? null,
34618
34627
  username: config2.auth?.user?.username ?? null,
@@ -34628,6 +34637,7 @@ function handleLocalConfigFull(_req, res) {
34628
34637
  const raw = readJson(CONFIG_FILE, {});
34629
34638
  const config2 = migrateConfig(raw);
34630
34639
  json(res, 200, {
34640
+ mode: config2.auth?.token ? "cloud" : "local",
34631
34641
  capture: config2.capture,
34632
34642
  sync: config2.sync,
34633
34643
  evaluation_framework: config2.evaluation_framework ?? "space",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",