diff --git a/README.md b/README.md index 8f790e8..e9b64e3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @thinkfleet/memory-sdk -TypeScript SDK for [memory.thinkfleet.ai](https://memory.thinkfleet.ai) — a managed memory + behavioral-pattern engine for AI agents. +TypeScript SDK for [app.memmesh.ai](https://app.memmesh.ai) — a managed memory + behavioral-pattern engine for AI agents. Two resources: - **`memory`** — admin + project memory CRUD, semantic search, promote/confirm/reject workflow, feedback @@ -54,7 +54,7 @@ const hits = await tf.memory.admin.search({ const tf = new ThinkFleetMemory({ apiKey: 'sk-...', // Required projectId: 'proj_...', // Required default - baseUrl: 'https://memory.thinkfleet.ai', // Default + baseUrl: 'https://app.memmesh.ai', // Default maxRetries: 2, // Retries 429/5xx with backoff timeout: 30_000, // ms fetch: globalThis.fetch, // BYO fetch diff --git a/examples/README.md b/examples/README.md index 2628279..783b89f 100644 --- a/examples/README.md +++ b/examples/README.md @@ -23,7 +23,7 @@ npx tsx examples/financial-demo.ts --fetch-only # Full end-to-end (needs a project with @thinkfleet/pack-financial enabled): export THINKFLEET_API_KEY="sk-..." export THINKFLEET_PROJECT_ID="..." -export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional +export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional export DEMO_TICKERS="AAPL,MSFT,NVDA" # optional npm run demo:financial ``` @@ -70,7 +70,7 @@ npm install # pulls @anthropic-ai/sdk + zod (dev deps for this example) export THINKFLEET_API_KEY="sk-..." export THINKFLEET_PROJECT_ID="..." export ANTHROPIC_API_KEY="sk-ant-..." -export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional +export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional npm run demo:nbo ``` diff --git a/examples/financial-demo.ts b/examples/financial-demo.ts index 12bf966..24e15f7 100644 --- a/examples/financial-demo.ts +++ b/examples/financial-demo.ts @@ -18,7 +18,7 @@ * Usage: * export THINKFLEET_API_KEY="sk-..." * export THINKFLEET_PROJECT_ID="..." # must have @thinkfleet/pack-financial enabled - * export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional + * export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional * export DEMO_TICKERS="AAPL,MSFT,NVDA" # optional * npx tsx examples/financial-demo.ts * @@ -34,7 +34,7 @@ import type { PriceInput, NewsInput } from '../src/index.js' const FETCH_ONLY = process.argv.includes('--fetch-only') const API_KEY = process.env.THINKFLEET_API_KEY const PROJECT_ID = process.env.THINKFLEET_PROJECT_ID -const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://memory.thinkfleet.ai' +const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://app.memmesh.ai' const TICKERS = (process.env.DEMO_TICKERS ?? 'AAPL,MSFT,NVDA') .split(',') .map((t) => t.trim().toUpperCase()) @@ -48,7 +48,7 @@ if (!FETCH_ONLY && (!API_KEY || !PROJECT_ID)) { console.error('Missing required environment variables:') console.error(' THINKFLEET_API_KEY=sk-...') console.error(' THINKFLEET_PROJECT_ID=... (project must have @thinkfleet/pack-financial enabled)') - console.error(' THINKFLEET_BASE_URL=https://memory.thinkfleet.ai (optional)') + console.error(' THINKFLEET_BASE_URL=https://app.memmesh.ai (optional)') console.error('\nOr run the data-pull half only: npx tsx examples/financial-demo.ts --fetch-only') process.exit(1) } diff --git a/examples/next-best-offer.ts b/examples/next-best-offer.ts index e75e6be..dfb5a0d 100644 --- a/examples/next-best-offer.ts +++ b/examples/next-best-offer.ts @@ -26,7 +26,7 @@ * Usage: * export THINKFLEET_API_KEY="sk-..." * export THINKFLEET_PROJECT_ID="..." - * export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional + * export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional * export ANTHROPIC_API_KEY="sk-ant-..." * npx tsx examples/next-best-offer.ts * diff --git a/examples/predict-anything.ts b/examples/predict-anything.ts index c534b3b..774f6f9 100644 --- a/examples/predict-anything.ts +++ b/examples/predict-anything.ts @@ -20,7 +20,7 @@ * Usage: * export THINKFLEET_API_KEY="sk-..." * export THINKFLEET_PROJECT_ID="..." - * export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional + * export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional * export DEMO_SUBJECT="customer:acct-42" # optional, kind:externalId * npx tsx examples/predict-anything.ts */ @@ -32,7 +32,7 @@ import type { PredictionTarget, TargetPrediction, Subject } from '../src/index.j const API_KEY = process.env.THINKFLEET_API_KEY const PROJECT_ID = process.env.THINKFLEET_PROJECT_ID -const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://memory.thinkfleet.ai' +const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://app.memmesh.ai' const [subjectKind, subjectId] = (process.env.DEMO_SUBJECT ?? 'customer:acct-42').split(':') const SUBJECT: Subject = { kind: subjectKind, externalId: subjectId } diff --git a/package.json b/package.json index c7bfc92..0f5dcf3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@thinkfleet/memory-sdk", - "version": "0.4.0", - "description": "TypeScript SDK for memory.thinkfleet.ai — admin + project memory CRUD, semantic search, feedback, and Lattice behavioral patterns", + "version": "0.4.1", + "description": "TypeScript SDK for app.memmesh.ai — admin + project memory CRUD, semantic search, feedback, and Lattice behavioral patterns", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", diff --git a/scripts/seed-lattice.ts b/scripts/seed-lattice.ts index 3652895..471267c 100644 --- a/scripts/seed-lattice.ts +++ b/scripts/seed-lattice.ts @@ -14,7 +14,7 @@ * (the same UI surface — patterns ARE memories on the storage side) * * Usage: - * API_KEY=sk-... PROJECT_ID=proj_... BASE_URL=https://memory.thinkfleet.ai \ + * API_KEY=sk-... PROJECT_ID=proj_... BASE_URL=https://app.memmesh.ai \ * npx tsx scripts/seed-lattice.ts * * Flags: @@ -29,13 +29,13 @@ import { ThinkFleetMemory, MemoryItemType, MemoryScope } from '../src/index.js' const API_KEY = process.env.API_KEY ?? process.env.THINKFLEET_API_KEY const PROJECT_ID = process.env.PROJECT_ID ?? process.env.THINKFLEET_PROJECT_ID -const BASE_URL = process.env.BASE_URL ?? process.env.THINKFLEET_BASE_URL ?? 'https://memory.thinkfleet.ai' +const BASE_URL = process.env.BASE_URL ?? process.env.THINKFLEET_BASE_URL ?? 'https://app.memmesh.ai' if (!API_KEY || !PROJECT_ID) { console.error('Missing required environment variables:') console.error(' API_KEY=sk-...') console.error(' PROJECT_ID=proj_...') - console.error(' BASE_URL=https://memory.thinkfleet.ai (optional)') + console.error(' BASE_URL=https://app.memmesh.ai (optional)') process.exit(1) } @@ -154,7 +154,7 @@ async function seedSubject(spec: SubjectSpec): Promise { // ── Main ──────────────────────────────────────────────────────────── async function main(): Promise { - console.log('memory.thinkfleet.ai lattice seed script') + console.log('app.memmesh.ai lattice seed script') console.log(` base: ${BASE_URL}`) console.log(` project: ${PROJECT_ID}`) diff --git a/scripts/seed-memory.ts b/scripts/seed-memory.ts index b0cc759..92af970 100644 --- a/scripts/seed-memory.ts +++ b/scripts/seed-memory.ts @@ -7,7 +7,7 @@ * Theme: AI-engineering team's institutional knowledge base. * * Usage: - * API_KEY=sk-... PROJECT_ID=proj_... BASE_URL=https://memory.thinkfleet.ai \ + * API_KEY=sk-... PROJECT_ID=proj_... BASE_URL=https://app.memmesh.ai \ * npx tsx scripts/seed-memory.ts * * Flags: @@ -21,13 +21,13 @@ import { ThinkFleetMemory, MemoryItemType, MemoryScope } from '../src/index.js' const API_KEY = process.env.API_KEY ?? process.env.THINKFLEET_API_KEY const PROJECT_ID = process.env.PROJECT_ID ?? process.env.THINKFLEET_PROJECT_ID -const BASE_URL = process.env.BASE_URL ?? process.env.THINKFLEET_BASE_URL ?? 'https://memory.thinkfleet.ai' +const BASE_URL = process.env.BASE_URL ?? process.env.THINKFLEET_BASE_URL ?? 'https://app.memmesh.ai' if (!API_KEY || !PROJECT_ID) { console.error('Missing required environment variables:') console.error(' API_KEY=sk-...') console.error(' PROJECT_ID=proj_...') - console.error(' BASE_URL=https://memory.thinkfleet.ai (optional)') + console.error(' BASE_URL=https://app.memmesh.ai (optional)') process.exit(1) } @@ -202,7 +202,7 @@ async function cleanupSeed(): Promise { // ── Main ──────────────────────────────────────────────────────────── async function main(): Promise { - console.log(`memory.thinkfleet.ai seed script`) + console.log(`app.memmesh.ai seed script`) console.log(` base: ${BASE_URL}`) console.log(` project: ${PROJECT_ID}`) diff --git a/src/client.ts b/src/client.ts index b3e74e7..a73579f 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,7 +17,7 @@ export interface ThinkFleetMemoryOptions { apiKey: string /** Default project ID for all requests. Can be overridden per-call via `{ projectId: ... }`. */ projectId: string - /** Base URL of the memory.thinkfleet.ai API. Default: `https://memory.thinkfleet.ai`. */ + /** Base URL of the app.memmesh.ai API. Default: `https://app.memmesh.ai`. */ baseUrl?: string /** Retries 429 + 5xx with exponential backoff. Default 2. */ maxRetries?: number @@ -32,7 +32,7 @@ export interface ThinkFleetMemoryOptions { } /** - * TypeScript client for memory.thinkfleet.ai. + * TypeScript client for app.memmesh.ai. * * Exposes two resources: * - `memory` — admin + project memory CRUD, semantic search, feedback @@ -76,7 +76,7 @@ export class ThinkFleetMemory { const http = new HttpClient({ apiKey: options.apiKey, projectId: options.projectId, - baseUrl: (options.baseUrl ?? 'https://memory.thinkfleet.ai').replace(/\/+$/, ''), + baseUrl: (options.baseUrl ?? 'https://app.memmesh.ai').replace(/\/+$/, ''), maxRetries: options.maxRetries ?? 2, timeout: options.timeout ?? 30000, fetchFn: options.fetch ?? globalThis.fetch.bind(globalThis), diff --git a/src/resources/lattice.ts b/src/resources/lattice.ts index db329ca..6b81d75 100644 --- a/src/resources/lattice.ts +++ b/src/resources/lattice.ts @@ -25,7 +25,7 @@ import type { } from '../types/lattice.js' /** - * Lattice — behavioral pattern intelligence for memory.thinkfleet.ai. + * Lattice — behavioral pattern intelligence for app.memmesh.ai. * * Mines a contact's event history for repeatable behaviors and exposes * a context bundle the agent can hand to a message-rendering step. diff --git a/src/resources/memory.ts b/src/resources/memory.ts index 5ea63c1..2fb5143 100644 --- a/src/resources/memory.ts +++ b/src/resources/memory.ts @@ -51,7 +51,7 @@ function toBase64(bytes: Uint8Array): string { } /** - * Memory — primary surface for memory.thinkfleet.ai. + * Memory — primary surface for app.memmesh.ai. * * Two sub-resources: * - `tf.memory` (this class) — current-user memories at diff --git a/src/types/lattice.ts b/src/types/lattice.ts index 5480698..817712a 100644 --- a/src/types/lattice.ts +++ b/src/types/lattice.ts @@ -1,7 +1,7 @@ /** * Lattice — behavioral pattern intelligence. * - * Types mirror what the memory.thinkfleet.ai backend exposes at + * Types mirror what the app.memmesh.ai backend exposes at * `/api/v1/projects/{projectId}/lattice/*`. The server-side * implementation is TS today; cuts over to a Rust gRPC engine in a * follow-up. diff --git a/test-app.ts b/test-app.ts index 0cb61d4..59b15d1 100644 --- a/test-app.ts +++ b/test-app.ts @@ -2,14 +2,14 @@ /** * @thinkfleet/memory-sdk — integration smoke test * - * Exercises every public SDK method against a live memory.thinkfleet.ai + * Exercises every public SDK method against a live app.memmesh.ai * instance. Read-mostly, with one create+update+delete cycle so the * project is left in the same state it started. * * Usage: * export THINKFLEET_API_KEY="sk-..." * export THINKFLEET_PROJECT_ID="..." - * export THINKFLEET_BASE_URL="https://memory.thinkfleet.ai" # optional + * export THINKFLEET_BASE_URL="https://app.memmesh.ai" # optional * npx tsx test-app.ts * * Exit code 0 = all checks passed, 1 = at least one failed. Failures @@ -23,13 +23,13 @@ import { ThinkFleetMemory, MemoryItemType, MemoryScope } from './src/index.js' const API_KEY = process.env.THINKFLEET_API_KEY const PROJECT_ID = process.env.THINKFLEET_PROJECT_ID -const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://memory.thinkfleet.ai' +const BASE_URL = process.env.THINKFLEET_BASE_URL ?? 'https://app.memmesh.ai' if (!API_KEY || !PROJECT_ID) { console.error('Missing required environment variables:') console.error(' THINKFLEET_API_KEY=sk-...') console.error(' THINKFLEET_PROJECT_ID=...') - console.error(' THINKFLEET_BASE_URL=https://memory.thinkfleet.ai (optional)') + console.error(' THINKFLEET_BASE_URL=https://app.memmesh.ai (optional)') process.exit(1) } @@ -67,7 +67,7 @@ function section(title: string): void { // ── Checks ────────────────────────────────────────────────────────── async function run(): Promise { - console.log(`memory.thinkfleet.ai SDK smoke test`) + console.log(`app.memmesh.ai SDK smoke test`) console.log(` base: ${BASE_URL}`) console.log(` project: ${PROJECT_ID}`)