Skip to content

Commit 9b4b17f

Browse files
committed
style: format with oxfmt
1 parent ec39480 commit 9b4b17f

4 files changed

Lines changed: 36 additions & 34 deletions

File tree

‎ARCHITECTURE.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ built on it. There is no provider registry. Every call is HTTP POST to
88

99
Callers import from `@corbits/embedding`. The barrel is the public surface:
1010

11-
| Export | Role |
12-
| --- | --- |
13-
| `embedTexts` | Batch texts, post sequentially, return `number[][]` in input order |
14-
| `probeEmbedDims` | Embed one probe string; report the vector length that came back |
15-
| `EmbedConfig` / `EmbedConfigSchema` | Endpoint, model, and optional knobs |
16-
| `EmbedOptions` | Harness deps plus optional retry, `Retry-After` override, abort |
17-
| `runJSONRequest` | Classified, retried JSON POST (sibling clients reuse this) |
18-
| `extractRetryAfterMs` | Default `Retry-After` reader (seconds or HTTP-date) |
19-
| `ModelRequestError` | Transport, HTTP, or non-JSON 200 — `reason` is the classified `InferenceError` |
11+
| Export | Role |
12+
| ----------------------------------- | ------------------------------------------------------------------------------ |
13+
| `embedTexts` | Batch texts, post sequentially, return `number[][]` in input order |
14+
| `probeEmbedDims` | Embed one probe string; report the vector length that came back |
15+
| `EmbedConfig` / `EmbedConfigSchema` | Endpoint, model, and optional knobs |
16+
| `EmbedOptions` | Harness deps plus optional retry, `Retry-After` override, abort |
17+
| `runJSONRequest` | Classified, retried JSON POST (sibling clients reuse this) |
18+
| `extractRetryAfterMs` | Default `Retry-After` reader (seconds or HTTP-date) |
19+
| `ModelRequestError` | Transport, HTTP, or non-JSON 200 — `reason` is the classified `InferenceError` |
2020

2121
Quickstart shape (matches the README):
2222

‎IMPLEMENTATION.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ bun add @corbits/embedding
2828

2929
## Dependencies
3030

31-
| Package | Use |
32-
| --- | --- |
31+
| Package | Use |
32+
| ----------------- | ----------------------------------------------------------------------------------------------------- |
3333
| `@intx/inference` | `BuiltRequest`, `createDefaultRetryPolicy`, error classifiers, `createDefaultScheduler` (caller-side) |
34-
| `@intx/types` | `RetryPolicy`, `InferenceError` |
35-
| `@intx/log` | Transitive Interchange surface (not imported by this package's sources) |
36-
| `arktype` | `EmbedConfigSchema` and the embeddings reply shape |
34+
| `@intx/types` | `RetryPolicy`, `InferenceError` |
35+
| `@intx/log` | Transitive Interchange surface (not imported by this package's sources) |
36+
| `arktype` | `EmbedConfigSchema` and the embeddings reply shape |
3737

3838
Dev: `@intx/inference-testing`, `@types/bun`, `oxfmt`, `oxlint`, `typescript` 5.9.
3939

‎package.json‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
{
22
"name": "@corbits/embedding",
3-
"description": "Embedding client for OpenAI-compatible /v1/embeddings endpoints, built on the Interchange inference primitives",
43
"version": "0.1.0",
4+
"description": "Embedding client for OpenAI-compatible /v1/embeddings endpoints, built on the Interchange inference primitives",
5+
"homepage": "https://github.com/corbitsdev/corbits-embedding",
6+
"bugs": {
7+
"url": "https://github.com/corbitsdev/corbits-embedding/issues"
8+
},
59
"license": "LGPL-2.1-only",
610
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/corbitsdev/corbits-embedding.git"
14+
},
15+
"files": [
16+
"dist",
17+
"README.md",
18+
"LICENSE"
19+
],
720
"type": "module",
21+
"sideEffects": false,
822
"main": "./dist/index.js",
923
"types": "./dist/index.d.ts",
1024
"exports": {
@@ -13,6 +27,9 @@
1327
"default": "./dist/index.js"
1428
}
1529
},
30+
"publishConfig": {
31+
"access": "public"
32+
},
1633
"scripts": {
1734
"build": "tsc -p tsconfig.build.json",
1835
"prepack": "bun run build",
@@ -35,23 +52,6 @@
3552
"oxlint": "1.85.0",
3653
"typescript": "5.9.3"
3754
},
38-
"files": [
39-
"dist",
40-
"README.md",
41-
"LICENSE"
42-
],
43-
"sideEffects": false,
44-
"publishConfig": {
45-
"access": "public"
46-
},
47-
"repository": {
48-
"type": "git",
49-
"url": "git+https://github.com/corbitsdev/corbits-embedding.git"
50-
},
51-
"homepage": "https://github.com/corbitsdev/corbits-embedding",
52-
"bugs": {
53-
"url": "https://github.com/corbitsdev/corbits-embedding/issues"
54-
},
5555
"engines": {
5656
"bun": ">=1.2.0",
5757
"node": ">=24"

‎src/embed.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ describe("embedTexts", () => {
107107
const { deps: d, calls } = deps([embedding(3), embedding(3)]);
108108
await embedTexts(["a"], CONFIG, { deps: d });
109109
expect(
110-
(calls[0]?.init.headers as Record<string, string> | undefined)?.authorization,
110+
(calls[0]?.init.headers as Record<string, string> | undefined)
111+
?.authorization,
111112
).toBeUndefined();
112113

113114
await embedTexts(["a"], { ...CONFIG, apiKey: "sk-test" }, { deps: d });
114115
expect(
115-
(calls[1]?.init.headers as Record<string, string> | undefined)?.authorization,
116+
(calls[1]?.init.headers as Record<string, string> | undefined)
117+
?.authorization,
116118
).toBe("Bearer sk-test");
117119
});
118120

0 commit comments

Comments
 (0)