conare 0.4.5 → 0.4.6
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/index.js +18 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -546,13 +546,13 @@ async function getRemoteMemoryCount(apiKey) {
|
|
|
546
546
|
return null;
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
async function uploadItems(apiKey, items
|
|
549
|
+
async function uploadItems(apiKey, items) {
|
|
550
550
|
let retries = 4;
|
|
551
551
|
while (retries > 0) {
|
|
552
552
|
try {
|
|
553
553
|
const data = await apiRequest("/api/memories/bulk", apiKey, {
|
|
554
554
|
method: "POST",
|
|
555
|
-
body: JSON.stringify(
|
|
555
|
+
body: JSON.stringify({ items })
|
|
556
556
|
});
|
|
557
557
|
if (!Array.isArray(data.results) || data.results.length !== items.length) {
|
|
558
558
|
throw new Error("Unexpected bulk upload response");
|
|
@@ -583,7 +583,7 @@ async function uploadBulk(apiKey, memories, onProgress) {
|
|
|
583
583
|
const results = [];
|
|
584
584
|
const batches = createUploadBatches(memories);
|
|
585
585
|
for (const batch of batches) {
|
|
586
|
-
let batchResults = await uploadItems(apiKey, batch.items
|
|
586
|
+
let batchResults = await uploadItems(apiKey, batch.items);
|
|
587
587
|
if (batch.items.length > 1 && batchResults.some((result) => !result.success)) {
|
|
588
588
|
const retriedResults = [];
|
|
589
589
|
for (let i = 0;i < batch.items.length; i++) {
|
|
@@ -592,7 +592,7 @@ async function uploadBulk(apiKey, memories, onProgress) {
|
|
|
592
592
|
retriedResults.push(result);
|
|
593
593
|
continue;
|
|
594
594
|
}
|
|
595
|
-
const [singleResult] = await uploadItems(apiKey, [batch.items[i]]
|
|
595
|
+
const [singleResult] = await uploadItems(apiKey, [batch.items[i]]);
|
|
596
596
|
retriedResults.push(singleResult);
|
|
597
597
|
}
|
|
598
598
|
batchResults = retriedResults;
|
|
@@ -614,7 +614,7 @@ async function uploadBulk(apiKey, memories, onProgress) {
|
|
|
614
614
|
}
|
|
615
615
|
return { success, failed, results };
|
|
616
616
|
}
|
|
617
|
-
var API_URL2 = "https://
|
|
617
|
+
var API_URL2 = "https://conare.ai", ApiError, PAGE_SIZE = 200, DELETE_CONCURRENCY = 5;
|
|
618
618
|
var init_api = __esm(() => {
|
|
619
619
|
ApiError = class ApiError extends Error {
|
|
620
620
|
statusCode;
|
|
@@ -1764,7 +1764,7 @@ async function promptApiKey(options) {
|
|
|
1764
1764
|
validate(value) {
|
|
1765
1765
|
const resolved = value.trim() || options.savedApiKey || "";
|
|
1766
1766
|
if (!resolved)
|
|
1767
|
-
return "Enter an API key from https://
|
|
1767
|
+
return "Enter an API key from https://conare.ai";
|
|
1768
1768
|
if (!resolved.startsWith("cmem_"))
|
|
1769
1769
|
return "API keys start with cmem_";
|
|
1770
1770
|
return;
|
|
@@ -1796,7 +1796,7 @@ async function promptAuth(options) {
|
|
|
1796
1796
|
validate(value) {
|
|
1797
1797
|
const resolved = value.trim();
|
|
1798
1798
|
if (!resolved)
|
|
1799
|
-
return "Enter an API key from https://
|
|
1799
|
+
return "Enter an API key from https://conare.ai";
|
|
1800
1800
|
if (!resolved.startsWith("cmem_"))
|
|
1801
1801
|
return "API keys start with cmem_";
|
|
1802
1802
|
return;
|
|
@@ -2028,7 +2028,7 @@ async function detect() {
|
|
|
2028
2028
|
// src/auth.ts
|
|
2029
2029
|
import { execSync } from "node:child_process";
|
|
2030
2030
|
import { platform as platform2 } from "node:os";
|
|
2031
|
-
var API_URL = "https://
|
|
2031
|
+
var API_URL = "https://conare.ai";
|
|
2032
2032
|
async function browserAuth() {
|
|
2033
2033
|
const stateBytes = new Uint8Array(16);
|
|
2034
2034
|
crypto.getRandomValues(stateBytes);
|
|
@@ -2583,7 +2583,7 @@ import { existsSync as existsSync6, mkdirSync as mkdirSync2, readFileSync as rea
|
|
|
2583
2583
|
import { dirname, join as join7 } from "node:path";
|
|
2584
2584
|
import { homedir as homedir5, platform as platform5 } from "node:os";
|
|
2585
2585
|
import { spawnSync } from "node:child_process";
|
|
2586
|
-
var CONARE_URL = "https://
|
|
2586
|
+
var CONARE_URL = "https://conare.ai";
|
|
2587
2587
|
var SERVER_NAME = "conare";
|
|
2588
2588
|
var MCP_TARGETS = [
|
|
2589
2589
|
{ id: "claude", label: "Claude Code", defaultSelected: true },
|
|
@@ -2896,7 +2896,7 @@ Expected outcome: future \`recall\` calls surface the information automatically
|
|
|
2896
2896
|
|
|
2897
2897
|
- Use \`after\`/\`before\` (Unix ms) for time-scoped searches: "what did we work on this week?"
|
|
2898
2898
|
- Use \`containerTag\` to filter by source: \`claude-chats\`, \`codex-chats\`, \`cursor-chats\`, \`codebase\`, \`preferences\`
|
|
2899
|
-
- Use \`project\` for cross-project filtering (partial names work: "conare" matches "fun/conare
|
|
2899
|
+
- Use \`project\` for cross-project filtering (partial names work: "conare" matches "fun/conare")
|
|
2900
2900
|
- Keep \`limit\` low (3-5) for focused results, higher (10-15) for broad exploration
|
|
2901
2901
|
- When user asks to "remember" something, save it with \`save\` — it goes to the \`preferences\` container and gets surfaced by \`recall\` in future sessions
|
|
2902
2902
|
|
|
@@ -3491,14 +3491,14 @@ function printMissingKeyError() {
|
|
|
3491
3491
|
console.error("Error: no API key configured.");
|
|
3492
3492
|
console.error("");
|
|
3493
3493
|
console.error("Run one of these:");
|
|
3494
|
-
console.error("
|
|
3495
|
-
console.error("
|
|
3494
|
+
console.error(" npx conare@latest");
|
|
3495
|
+
console.error(" bunx conare@latest");
|
|
3496
3496
|
console.error("");
|
|
3497
3497
|
console.error("For a built-in command, install globally:");
|
|
3498
3498
|
console.error(" bun add -g conare");
|
|
3499
3499
|
console.error(" npm i -g conare");
|
|
3500
3500
|
console.error("");
|
|
3501
|
-
console.error("Get your API key at https://
|
|
3501
|
+
console.error("Get your API key at https://conare.ai");
|
|
3502
3502
|
}
|
|
3503
3503
|
function printFailureSummary(results, memories) {
|
|
3504
3504
|
const failures = results.map((result, index) => ({ ...result, memory: memories[index] })).filter((result) => !result.success);
|
|
@@ -3617,7 +3617,7 @@ Options:
|
|
|
3617
3617
|
--source <name> Only ingest from: claude, codex, cursor
|
|
3618
3618
|
--wasm-dir <path> Path to sql.js module (for Cursor ingestion)
|
|
3619
3619
|
|
|
3620
|
-
Get your API key at https://
|
|
3620
|
+
Get your API key at https://conare.ai
|
|
3621
3621
|
`);
|
|
3622
3622
|
process.exit(0);
|
|
3623
3623
|
}
|
|
@@ -3669,7 +3669,7 @@ async function runInstall() {
|
|
|
3669
3669
|
}
|
|
3670
3670
|
const auth = await validateKey(apiKey);
|
|
3671
3671
|
if (!auth.valid) {
|
|
3672
|
-
console.error("Invalid API key. Check your key at https://
|
|
3672
|
+
console.error("Invalid API key. Check your key at https://conare.ai");
|
|
3673
3673
|
process.exit(1);
|
|
3674
3674
|
}
|
|
3675
3675
|
saveApiKey(apiKey);
|
|
@@ -3786,7 +3786,7 @@ async function main() {
|
|
|
3786
3786
|
if (opts.installSync) {
|
|
3787
3787
|
const auth2 = await validateKey(apiKey);
|
|
3788
3788
|
if (!auth2.valid) {
|
|
3789
|
-
console.error("Invalid API key. Check your key at https://
|
|
3789
|
+
console.error("Invalid API key. Check your key at https://conare.ai");
|
|
3790
3790
|
process.exit(1);
|
|
3791
3791
|
}
|
|
3792
3792
|
const syncSpinner = Y2();
|
|
@@ -3799,7 +3799,7 @@ async function main() {
|
|
|
3799
3799
|
log("");
|
|
3800
3800
|
const auth = await validateKey(apiKey);
|
|
3801
3801
|
if (!auth.valid) {
|
|
3802
|
-
console.error("Invalid API key. Check your key at https://
|
|
3802
|
+
console.error("Invalid API key. Check your key at https://conare.ai");
|
|
3803
3803
|
process.exit(1);
|
|
3804
3804
|
}
|
|
3805
3805
|
saveApiKey(apiKey);
|
|
@@ -3836,7 +3836,7 @@ async function main() {
|
|
|
3836
3836
|
if (opts.force) {
|
|
3837
3837
|
clearIngested("codebase");
|
|
3838
3838
|
try {
|
|
3839
|
-
await fetch("https://
|
|
3839
|
+
await fetch("https://conare.ai/api/containers/codebase", {
|
|
3840
3840
|
method: "DELETE",
|
|
3841
3841
|
headers: { Authorization: `Bearer ${apiKey}` }
|
|
3842
3842
|
});
|