conare 0.4.7 → 0.5.1

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 +40 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -453,6 +453,7 @@ __export(exports_api, {
453
453
  uploadBulk: () => uploadBulk,
454
454
  listRemoteMemories: () => listRemoteMemories,
455
455
  getRemoteMemoryCount: () => getRemoteMemoryCount,
456
+ getBillingStatus: () => getBillingStatus,
456
457
  deleteMemory: () => deleteMemory,
457
458
  deleteMemories: () => deleteMemories,
458
459
  createUploadBatches: () => createUploadBatches,
@@ -548,6 +549,13 @@ async function getRemoteMemoryCount(apiKey) {
548
549
  return null;
549
550
  }
550
551
  }
552
+ async function getBillingStatus(apiKey) {
553
+ try {
554
+ return await apiRequest("/api/billing/status", apiKey);
555
+ } catch {
556
+ return null;
557
+ }
558
+ }
551
559
  async function uploadItems(apiKey, items) {
552
560
  let retries = 4;
553
561
  while (retries > 0) {
@@ -562,6 +570,12 @@ async function uploadItems(apiKey, items) {
562
570
  return data.results;
563
571
  } catch (error) {
564
572
  if (error instanceof ApiError && error.statusCode === 429) {
573
+ if (error.message.includes("quota_exceeded")) {
574
+ return items.map(() => ({
575
+ success: false,
576
+ error: "Memory limit reached. Upgrade at https://conare.ai/pricing"
577
+ }));
578
+ }
565
579
  retries--;
566
580
  await new Promise((r) => setTimeout(r, 5000));
567
581
  continue;
@@ -630,7 +644,7 @@ var init_api = __esm(() => {
630
644
  };
631
645
  });
632
646
 
633
- // node_modules/sisteransi/src/index.js
647
+ // ../node_modules/sisteransi/src/index.js
634
648
  var require_src = __commonJS((exports, module) => {
635
649
  var ESC = "\x1B";
636
650
  var CSI = `${ESC}[`;
@@ -688,7 +702,7 @@ var require_src = __commonJS((exports, module) => {
688
702
  module.exports = { cursor, scroll, erase, beep };
689
703
  });
690
704
 
691
- // node_modules/picocolors/picocolors.js
705
+ // ../node_modules/picocolors/picocolors.js
692
706
  var require_picocolors = __commonJS((exports, module) => {
693
707
  var p = process || {};
694
708
  var argv = p.argv || [];
@@ -758,7 +772,7 @@ var require_picocolors = __commonJS((exports, module) => {
758
772
  module.exports.createColors = createColors;
759
773
  });
760
774
 
761
- // node_modules/@clack/core/dist/index.mjs
775
+ // ../node_modules/@clack/core/dist/index.mjs
762
776
  import { stdin as j, stdout as M } from "node:process";
763
777
  import * as g from "node:readline";
764
778
  import O from "node:readline";
@@ -1294,7 +1308,7 @@ var init_dist = __esm(() => {
1294
1308
  };
1295
1309
  });
1296
1310
 
1297
- // node_modules/@clack/prompts/dist/index.mjs
1311
+ // ../node_modules/@clack/prompts/dist/index.mjs
1298
1312
  var exports_dist = {};
1299
1313
  __export(exports_dist, {
1300
1314
  updateSettings: () => cD,
@@ -2859,6 +2873,17 @@ This skill teaches the agent the default workflow, tool-selection rules, and que
2859
2873
  | User says "remember this" | \`save\` | Save preferences, rules, decisions |
2860
2874
  | User says "forget this" | \`forget\` | Remove a specific memory |
2861
2875
  | Browse what's stored | \`list\` | "Show me recent memories" |
2876
+ | Narrative/summary question | \`search\` with \`deep: true\` | "What happened with the auth rewrite?" |
2877
+ | Deep + specific format | \`search\` with \`deep\` + \`prompt\` | query="auth rewrite bug", prompt="timeline with dates" |
2878
+
2879
+ ## Deep Mode
2880
+
2881
+ \`deep: true\` on \`search\` or \`recall\` returns an LLM-synthesized answer instead of raw memories.
2882
+
2883
+ - **Use for**: narratives, summaries, "what happened with X", comparing approaches
2884
+ - **Don't use for**: exact values, config lookups, file paths — raw preserves full detail
2885
+
2886
+ \`prompt\` (deep only) separates retrieval from synthesis. Keep \`query\` keyword-dense to find the right memories. Use \`prompt\` to instruct the LLM on format: "chronological timeline with dates", "only shipped changes, not proposals", "compare X vs Y". Omit \`prompt\` to let the LLM infer format from the query.
2862
2887
 
2863
2888
  ## Critical Rules
2864
2889
 
@@ -3987,6 +4012,17 @@ Nothing new to index.`);
3987
4012
  const db = b3.metadata?.date || "0000";
3988
4013
  return db.localeCompare(da);
3989
4014
  });
4015
+ const billing = await getBillingStatus(apiKey);
4016
+ if (billing && billing.plan === "free" && billing.limits.uploadedChats > 0) {
4017
+ const chatLimit = billing.limits.uploadedChats;
4018
+ if (allMemories.length > chatLimit) {
4019
+ const skipped = allMemories.length - chatLimit;
4020
+ allMemories.splice(chatLimit);
4021
+ log(`\x1B[33m⚠\x1B[0m Free plan: uploading ${chatLimit} most recent sessions (${skipped} older sessions skipped)`);
4022
+ log(` Upgrade to Pro for unlimited uploads → \x1B[4mhttps://conare.ai/pricing\x1B[0m`);
4023
+ log();
4024
+ }
4025
+ }
3990
4026
  log();
3991
4027
  if (allMemories.length > 2000 && !opts.dryRun && !opts.quiet) {
3992
4028
  if (hasTty) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.4.7",
3
+ "version": "0.5.1",
4
4
  "description": "Conare CLI for ingesting AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {