shell: fish functions -> ~/.local/bin executables + bash/zsh ports; manage ~/.agents

- 16 cross-shell utilities converted to sh/bash chezmoi executables:
  ai c2p cp-appid extract_agents fab gdc gh-sonr-org-migrate ghg-clone
  ghn gho git-summary launch_omp_livediff_overlay lc-elir mdcp mdp pj
  (ghg-clone not named ghg: unrelated cargo binary owns that name)
- cwd/history helpers stay per-shell: yy c cd clip-last + ghg/ghn/gho
  cd-wrappers in bash/functions/ and zsh/functions/, loaded by rc files
- fish keeps only shell-state functions; converted ones now hit PATH
- cp-appid ignore gating moved to .local/bin path
- dot_agents/skills: 82 skills materialized from dotstate storage so
  dot_claude skill symlinks resolve on fresh bootstrap; dotstate
  profile/symlinks.json released .agents/skills .bashrc .zshrc
This commit is contained in:
Prad Nukala committed 2026-08-10 15:15:06 -04:00
1 parent 6776366ce6
commit 6406208b35
637 files changed
+100297 -497

No files matched your search

@@ -0,0 +1,88 @@
# Vectorize API Reference
## Types
```typescript
interface VectorizeVector {
id: string; // Max 64 bytes
values: number[]; // Must match index dimensions
namespace?: string; // Optional partition (max 64 bytes)
metadata?: Record<string, any>; // Max 10 KiB
}
```
## Query
```typescript
const matches = await env.VECTORIZE.query(queryVector, {
topK: 10, // Max 100 (or 20 with returnValues/returnMetadata:"all")
returnMetadata: "indexed", // "none" | "indexed" | "all"
returnValues: false,
namespace: "tenant-123",
filter: { category: "docs" }
});
// matches.matches[0] = { id, score, metadata? }
```
**returnMetadata:** `"none"` (fastest) → `"indexed"` (recommended) → `"all"` (topK max 20)
**queryById (V2 only):** Search using existing vector as query.
```typescript
await env.VECTORIZE.queryById("doc-123", { topK: 5 });
```
## Insert/Upsert
```typescript
// Insert: ignores duplicates (keeps first)
await env.VECTORIZE.insert([{ id, values, metadata }]);
// Upsert: overwrites duplicates (keeps last)
await env.VECTORIZE.upsert([{ id, values, metadata }]);
```
**Max 500 vectors per call.** Queryable after 5-10 seconds.
## Other Operations
```typescript
// Get by IDs
const vectors = await env.VECTORIZE.getByIds(["id1", "id2"]);
// Delete (max 1000 IDs per call)
await env.VECTORIZE.deleteByIds(["id1", "id2"]);
// Index info
const info = await env.VECTORIZE.describe();
// { dimensions, metric, vectorCount }
```
## Filtering
Requires metadata index. Filter operators:
| Operator | Example |
|----------|---------|
| `$eq` (implicit) | `{ category: "docs" }` |
| `$ne` | `{ status: { $ne: "deleted" } }` |
| `$in` / `$nin` | `{ tag: { $in: ["sale"] } }` |
| `$lt`, `$lte`, `$gt`, `$gte` | `{ price: { $lt: 100 } }` |
**Constraints:** Max 2048 bytes, no dots/`$` in keys, values: string/number/boolean/null.
## Performance
| Configuration | topK Limit | Speed |
|--------------|------------|-------|
| No metadata | 100 | Fastest |
| `returnMetadata: "indexed"` | 100 | Fast |
| `returnMetadata: "all"` | 20 | Slower |
| `returnValues: true` | 20 | Slower |
**Batch operations:** Always batch (500/call) for optimal throughput.
```typescript
for (let i = 0; i < vectors.length; i += 500) {
await env.VECTORIZE.upsert(vectors.slice(i, i + 500));
}
```