@astroway/sdk 0.1.0-alpha.1 → 0.1.0
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/CHANGELOG.md +350 -0
- package/README.md +59 -31
- package/dist/cache.d.ts +101 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +198 -0
- package/dist/cache.js.map +1 -0
- package/dist/errors.d.ts +30 -6
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +45 -14
- package/dist/errors.js.map +1 -1
- package/dist/helpers/birth-date-time.d.ts +76 -0
- package/dist/helpers/birth-date-time.d.ts.map +1 -0
- package/dist/helpers/birth-date-time.js +112 -0
- package/dist/helpers/birth-date-time.js.map +1 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +3 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/idempotency.d.ts +10 -0
- package/dist/idempotency.d.ts.map +1 -0
- package/dist/idempotency.js +41 -0
- package/dist/idempotency.js.map +1 -0
- package/dist/index.d.ts +97 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +191 -3
- package/dist/index.js.map +1 -1
- package/dist/namespaces.generated.d.ts +1513 -0
- package/dist/namespaces.generated.d.ts.map +1 -0
- package/dist/namespaces.generated.js +865 -0
- package/dist/namespaces.generated.js.map +1 -0
- package/dist/runtime.d.ts +7 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +31 -0
- package/dist/runtime.js.map +1 -0
- package/dist/stream.d.ts +71 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +199 -0
- package/dist/stream.js.map +1 -0
- package/dist/testing.d.ts +133 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +132 -0
- package/dist/testing.js.map +1 -0
- package/dist/types.generated.d.ts +784 -176
- package/dist/types.generated.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/with-response.d.ts +36 -0
- package/dist/with-response.d.ts.map +1 -0
- package/dist/with-response.js +38 -0
- package/dist/with-response.js.map +1 -0
- package/package.json +19 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Idempotency key generation + policy. */
|
|
2
|
+
const HEX = '0123456789abcdef';
|
|
3
|
+
/** RFC 4122 v4 UUID. Uses Web Crypto when available, falls back to Math.random. */
|
|
4
|
+
export function generateIdempotencyKey() {
|
|
5
|
+
const c = globalThis.crypto;
|
|
6
|
+
if (c?.randomUUID) {
|
|
7
|
+
return c.randomUUID();
|
|
8
|
+
}
|
|
9
|
+
const bytes = new Uint8Array(16);
|
|
10
|
+
if (c?.getRandomValues) {
|
|
11
|
+
c.getRandomValues(bytes);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
for (let i = 0; i < 16; i++)
|
|
15
|
+
bytes[i] = Math.floor(Math.random() * 256);
|
|
16
|
+
}
|
|
17
|
+
// RFC 4122 v4: set version (bits 12-15 of clock_seq_hi_and_reserved → 0100)
|
|
18
|
+
// and variant (bits 6-7 of clock_seq_hi_and_reserved → 10).
|
|
19
|
+
bytes[6] = ((bytes[6] ?? 0) & 0x0f) | 0x40;
|
|
20
|
+
bytes[8] = ((bytes[8] ?? 0) & 0x3f) | 0x80;
|
|
21
|
+
let hex = '';
|
|
22
|
+
for (let i = 0; i < 16; i++) {
|
|
23
|
+
const b = bytes[i] ?? 0;
|
|
24
|
+
hex += HEX[(b >> 4) & 0xf];
|
|
25
|
+
hex += HEX[b & 0xf];
|
|
26
|
+
}
|
|
27
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
28
|
+
}
|
|
29
|
+
/** True for the methods we auto-attach an idempotency key on (POST only). */
|
|
30
|
+
export function shouldAttachIdempotency(mode, method) {
|
|
31
|
+
if (mode === 'off')
|
|
32
|
+
return false;
|
|
33
|
+
return method.toUpperCase() === 'POST';
|
|
34
|
+
}
|
|
35
|
+
export function resolveKeyGenerator(mode) {
|
|
36
|
+
if (typeof mode === 'object' && mode !== null && typeof mode.generator === 'function') {
|
|
37
|
+
return mode.generator;
|
|
38
|
+
}
|
|
39
|
+
return generateIdempotencyKey;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=idempotency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../src/idempotency.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAO3C,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAE/B,mFAAmF;AACnF,MAAM,UAAU,sBAAsB;IACpC,MAAM,CAAC,GAAG,UAAU,CAAC,MAA4B,CAAC;IAClD,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IACxB,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC;QACvB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;YAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IAC1E,CAAC;IACD,4EAA4E;IAC5E,4DAA4D;IAC5D,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3C,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACxB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QAC3B,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;AAC7G,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,uBAAuB,CAAC,IAAiC,EAAE,MAAc;IACvF,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACjC,OAAO,MAAM,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAiC;IACnE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,8 +14,19 @@
|
|
|
14
14
|
import createClient from 'openapi-fetch';
|
|
15
15
|
import type { paths } from './types.generated.js';
|
|
16
16
|
import { type RetryOptions } from './retry.js';
|
|
17
|
+
import { type AstrowayNamespaces } from './namespaces.generated.js';
|
|
18
|
+
import { type IdempotencyMode } from './idempotency.js';
|
|
19
|
+
import { type StreamChunk } from './stream.js';
|
|
20
|
+
import { type CacheOption, type ResolvedCache } from './cache.js';
|
|
17
21
|
export * from './errors.js';
|
|
18
22
|
export type { paths, components, operations } from './types.generated.js';
|
|
23
|
+
export type { AstrowayNamespaces, CallOptions } from './namespaces.generated.js';
|
|
24
|
+
export type { IdempotencyMode } from './idempotency.js';
|
|
25
|
+
export { generateIdempotencyKey } from './idempotency.js';
|
|
26
|
+
export { ResultPromise, type WithResponseResult } from './with-response.js';
|
|
27
|
+
export { detectRuntime, type RuntimeInfo } from './runtime.js';
|
|
28
|
+
export { parseSSEStream, normaliseStreamChunk, type SSEEvent, type StreamChunk, } from './stream.js';
|
|
29
|
+
export { buildCacheKey, canonicalise, CACHE_KEY_PREFIX, type CacheEntry, type CacheOption, type CacheStore, DEFAULT_CACHE_TTL_MS, DETERMINISTIC_PATH_PREFIXES, isDeterministicPath, LocalStorageStore, MemoryStore, NON_DETERMINISTIC_PATH_PREFIXES, } from './cache.js';
|
|
19
30
|
export interface AstrowayOptions {
|
|
20
31
|
/** API key — `aw_live_...` for production, `aw_test_...` for sandbox. Required. */
|
|
21
32
|
apiKey: string;
|
|
@@ -23,14 +34,53 @@ export interface AstrowayOptions {
|
|
|
23
34
|
baseUrl?: string;
|
|
24
35
|
/** Auth scheme. `header` (default) sends `X-Api-Key: <key>`. `bearer` sends `Authorization: Bearer <key>`. */
|
|
25
36
|
authScheme?: 'header' | 'bearer';
|
|
26
|
-
/** Per-request timeout in ms. Default 30_000. */
|
|
37
|
+
/** Per-request timeout in ms. Default 30_000 for calc endpoints, 120_000 for AI/streaming. */
|
|
27
38
|
timeoutMs?: number;
|
|
28
39
|
/** Retry configuration. Default 2 retries, exp backoff, on 408/409/429/5xx/connection. Set `{ maxRetries: 0 }` to disable. */
|
|
29
40
|
retry?: RetryOptions;
|
|
30
41
|
/** Optional custom `fetch` implementation. Default — global `fetch`. */
|
|
31
42
|
fetch?: typeof globalThis.fetch;
|
|
43
|
+
/**
|
|
44
|
+
* Undici `Agent` / `Pool` / `MockAgent` for connection pooling, custom proxy,
|
|
45
|
+
* mTLS, etc. Node-only — silently ignored on browser, edge runtimes, Bun, Deno.
|
|
46
|
+
*
|
|
47
|
+
* Example (heavy batching):
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { Agent } from 'undici';
|
|
50
|
+
* const dispatcher = new Agent({ keepAliveTimeout: 60_000, connections: 50 });
|
|
51
|
+
* const aw = new Astroway({ apiKey, dispatcher });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
dispatcher?: unknown;
|
|
32
55
|
/** Extra headers added to every request. */
|
|
33
56
|
defaultHeaders?: Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* Idempotency key policy for credit-costing POSTs.
|
|
59
|
+
* - `'auto'` (default): every POST gets a fresh UUIDv4 `Idempotency-Key` header
|
|
60
|
+
* unless the caller already supplied one.
|
|
61
|
+
* - `'off'`: never auto-generate. Caller controls the header explicitly.
|
|
62
|
+
* - `{ generator }`: provide your own key source (deterministic test keys, ULIDs, etc).
|
|
63
|
+
*
|
|
64
|
+
* Backend-coordinated: server still works without it, so old SDKs won't break.
|
|
65
|
+
* Recommended to keep `'auto'` so a network blip retry never double-bills.
|
|
66
|
+
*/
|
|
67
|
+
idempotency?: IdempotencyMode;
|
|
68
|
+
/**
|
|
69
|
+
* Client-side response cache for deterministic endpoints (charts, synastry,
|
|
70
|
+
* vedic, numerology, tarot, hd, dasha). Set to:
|
|
71
|
+
*
|
|
72
|
+
* - `false` / unset (default) — no cache.
|
|
73
|
+
* - `'memory'` — in-process Map, fast for tests and short-lived processes.
|
|
74
|
+
* - `'localStorage'` — browser/edge-runtime `Storage` adapter.
|
|
75
|
+
* - a `CacheStore` — bring-your-own (Redis, IndexedDB, etc.).
|
|
76
|
+
* - `{ store, ttlMs }` — store + custom default TTL.
|
|
77
|
+
*
|
|
78
|
+
* Time-sensitive endpoints (`/transits`, `/horoscope`, `/interpret`, `/ai/*`,
|
|
79
|
+
* `/mcp/*`, `/stream/*`, `/now`, `/today`) are skipped by default. Force
|
|
80
|
+
* per-call via the `Idempotency-Key` `x-astroway-cache: yes|no` header
|
|
81
|
+
* pattern (advanced; usually unnecessary).
|
|
82
|
+
*/
|
|
83
|
+
cache?: CacheOption;
|
|
34
84
|
}
|
|
35
85
|
/**
|
|
36
86
|
* Type-safe AstroWay client. Methods (`GET`, `POST`, `PUT`, `DELETE`) and
|
|
@@ -44,14 +94,59 @@ export type AstrowayClient = ReturnType<typeof createClient<paths>>;
|
|
|
44
94
|
* users who prefer the factory style.
|
|
45
95
|
*/
|
|
46
96
|
export declare function createAstroway(options: AstrowayOptions): AstrowayClient;
|
|
97
|
+
/**
|
|
98
|
+
* Type-safe AstroWay client. Use the typed namespaces for IDE autocomplete
|
|
99
|
+
* (`aw.synastry.aspectGrid({...})`) — they wrap the underlying openapi-fetch
|
|
100
|
+
* `client` and unwrap the `{ ok, data, error }` envelope, returning `data`
|
|
101
|
+
* directly. Errors throw classified subclasses of `ApiError`.
|
|
102
|
+
*
|
|
103
|
+
* The raw `client` (`aw.client.POST(...)`) and `aw.request(...)` remain
|
|
104
|
+
* available as escape hatches when you need the full envelope or want to call
|
|
105
|
+
* an endpoint not yet covered by namespaces.
|
|
106
|
+
*/
|
|
107
|
+
export interface Astroway extends AstrowayNamespaces {
|
|
108
|
+
}
|
|
47
109
|
export declare class Astroway {
|
|
48
110
|
/** The underlying typed openapi-fetch client. */
|
|
49
111
|
readonly client: AstrowayClient;
|
|
50
|
-
readonly options: Required<Omit<AstrowayOptions, 'fetch' | 'defaultHeaders' | 'retry'>> & {
|
|
112
|
+
readonly options: Required<Omit<AstrowayOptions, 'fetch' | 'defaultHeaders' | 'retry' | 'cache' | 'dispatcher'>> & {
|
|
51
113
|
fetch: typeof globalThis.fetch;
|
|
52
114
|
defaultHeaders: Record<string, string>;
|
|
53
115
|
retry: RetryOptions;
|
|
116
|
+
cache: ResolvedCache | null;
|
|
117
|
+
dispatcher: unknown;
|
|
54
118
|
};
|
|
55
119
|
constructor(options: AstrowayOptions);
|
|
120
|
+
/**
|
|
121
|
+
* Open a Server-Sent Events stream against an SSE-capable endpoint
|
|
122
|
+
* (`/horoscope/daily`, `/interpret/*`, `/mcp/streaming`, etc.). Returns an
|
|
123
|
+
* async iterable of normalised {@link StreamChunk}s — the user can `for await`
|
|
124
|
+
* over it the same way they would Anthropic's `MessageStream`:
|
|
125
|
+
*
|
|
126
|
+
* ```ts
|
|
127
|
+
* for await (const chunk of aw.streamSSE('/horoscope/daily', { date: '2026-05-10' })) {
|
|
128
|
+
* if (chunk.type === 'text_delta') process.stdout.write(chunk.text);
|
|
129
|
+
* if (chunk.type === 'done') break;
|
|
130
|
+
* if (chunk.type === 'error') throw new Error(chunk.message);
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* The same auth/User-Agent/timeout/retry policy as regular calls applies.
|
|
135
|
+
* Idempotency-Key auto-attaches on POST so a network blip + reconnect on the
|
|
136
|
+
* same key replays the same generation deterministically (when the backend
|
|
137
|
+
* supports it; fails open otherwise).
|
|
138
|
+
*
|
|
139
|
+
* Named `streamSSE` rather than `stream` because `/stream/*` is already a
|
|
140
|
+
* namespace for synchronous calc endpoints (`stream.positions`, `stream.ingress`,
|
|
141
|
+
* etc.).
|
|
142
|
+
*
|
|
143
|
+
* AbortSignal is honoured — pass `options.signal` to cancel the stream
|
|
144
|
+
* mid-flight.
|
|
145
|
+
*/
|
|
146
|
+
streamSSE(path: string, body?: unknown, options?: {
|
|
147
|
+
method?: 'POST' | 'GET';
|
|
148
|
+
signal?: AbortSignal;
|
|
149
|
+
idempotencyKey?: string;
|
|
150
|
+
}): AsyncGenerator<StreamChunk, void, void>;
|
|
56
151
|
}
|
|
57
152
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,YAAoC,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/D,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,YAAoC,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,WAAW,EAAsB,MAAM,aAAa,CAAC;AACnE,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AAEpB,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACjF,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAA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B;CAAG;AAEvD,qBAAa,QAAQ;IACnB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC,CAAC,GAAG;QACjH,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,KAAK,EAAE,YAAY,CAAC;QACpB,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;QAC5B,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;gBAEU,OAAO,EAAE,eAAe;IAoJpC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,SAAS,CACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GACnF,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC;CA0C3C"}
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,25 @@ import createClient from 'openapi-fetch';
|
|
|
15
15
|
import { ApiError, APIConnectionError, APITimeoutError, classifyHttpError, } from './errors.js';
|
|
16
16
|
import { fetchWithRetry } from './retry.js';
|
|
17
17
|
import { SDK_VERSION } from './version.js';
|
|
18
|
+
import { detectRuntime } from './runtime.js';
|
|
19
|
+
import { buildNamespaces } from './namespaces.generated.js';
|
|
20
|
+
import { resolveKeyGenerator, shouldAttachIdempotency, } from './idempotency.js';
|
|
21
|
+
import { streamFromResponse } from './stream.js';
|
|
22
|
+
import { buildCacheKey, isDeterministicPath, resolveCacheOption, } from './cache.js';
|
|
18
23
|
export * from './errors.js';
|
|
24
|
+
export { generateIdempotencyKey } from './idempotency.js';
|
|
25
|
+
export { ResultPromise } from './with-response.js';
|
|
26
|
+
export { detectRuntime } from './runtime.js';
|
|
27
|
+
export { parseSSEStream, normaliseStreamChunk, } from './stream.js';
|
|
28
|
+
export { buildCacheKey, canonicalise, CACHE_KEY_PREFIX, DEFAULT_CACHE_TTL_MS, DETERMINISTIC_PATH_PREFIXES, isDeterministicPath, LocalStorageStore, MemoryStore, NON_DETERMINISTIC_PATH_PREFIXES, } from './cache.js';
|
|
19
29
|
const DEFAULT_BASE_URL = 'https://api.astroway.info/v1';
|
|
30
|
+
/** Default timeout for long-running paths (AI gateway, SSE) when caller hasn't set `timeoutMs`. */
|
|
31
|
+
const LONG_RUNNING_TIMEOUT_MS = 120_000;
|
|
32
|
+
/** Path prefixes that warrant a longer default timeout — AI gateway routes through `ai.astroway.info`. */
|
|
33
|
+
const LONG_RUNNING_PATH_PREFIXES = ['/ai/', '/horoscope/', '/interpret/', '/mcp/streaming', '/stream/'];
|
|
34
|
+
function isLongRunningPath(path) {
|
|
35
|
+
return LONG_RUNNING_PATH_PREFIXES.some((p) => path === p.replace(/\/$/, '') || path.startsWith(p));
|
|
36
|
+
}
|
|
20
37
|
/**
|
|
21
38
|
* Creates a new AstroWay client. Equivalent to `new Astroway(...)` for
|
|
22
39
|
* users who prefer the factory style.
|
|
@@ -38,6 +55,10 @@ export class Astroway {
|
|
|
38
55
|
const retry = options.retry ?? {};
|
|
39
56
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
40
57
|
const defaultHeaders = options.defaultHeaders ?? {};
|
|
58
|
+
const idempotency = options.idempotency ?? 'auto';
|
|
59
|
+
const generateKey = resolveKeyGenerator(idempotency);
|
|
60
|
+
const dispatcher = options.dispatcher;
|
|
61
|
+
const cache = resolveCacheOption(options.cache);
|
|
41
62
|
this.options = {
|
|
42
63
|
apiKey: options.apiKey,
|
|
43
64
|
baseUrl,
|
|
@@ -46,11 +67,15 @@ export class Astroway {
|
|
|
46
67
|
retry,
|
|
47
68
|
fetch: fetchImpl,
|
|
48
69
|
defaultHeaders,
|
|
70
|
+
idempotency,
|
|
71
|
+
cache,
|
|
72
|
+
dispatcher,
|
|
49
73
|
};
|
|
50
74
|
const authHeaders = authScheme === 'bearer'
|
|
51
75
|
? { Authorization: `Bearer ${options.apiKey}` }
|
|
52
76
|
: { 'X-Api-Key': options.apiKey };
|
|
53
|
-
const
|
|
77
|
+
const runtime = detectRuntime();
|
|
78
|
+
const userAgent = `astroway-sdk-typescript/${SDK_VERSION} (${runtime.name}/${runtime.version})`;
|
|
54
79
|
const clientOpts = {
|
|
55
80
|
baseUrl,
|
|
56
81
|
headers: {
|
|
@@ -60,19 +85,88 @@ export class Astroway {
|
|
|
60
85
|
...defaultHeaders,
|
|
61
86
|
},
|
|
62
87
|
fetch: async (input) => {
|
|
88
|
+
// Cache lookup pre-flight: deterministic GET/POST against cacheable
|
|
89
|
+
// endpoints short-circuit with a synthetic Response built from the
|
|
90
|
+
// stored payload. The body is consumed once (clone() + .json()) and
|
|
91
|
+
// re-attached to a fresh Request so downstream `fetch` still works.
|
|
92
|
+
const cachePath = pathFromUrl(input.url, baseUrl);
|
|
93
|
+
let cacheKey = null;
|
|
94
|
+
if (cache && (input.method === 'GET' || input.method === 'POST') && isDeterministicPath(cachePath)) {
|
|
95
|
+
let bodyForKey = null;
|
|
96
|
+
if (input.method === 'POST') {
|
|
97
|
+
try {
|
|
98
|
+
const cloned = input.clone();
|
|
99
|
+
const txt = await cloned.text();
|
|
100
|
+
bodyForKey = txt === '' ? null : JSON.parse(txt);
|
|
101
|
+
}
|
|
102
|
+
catch { /* non-JSON body, hash the raw URL only */ }
|
|
103
|
+
}
|
|
104
|
+
cacheKey = await buildCacheKey(input.method, cachePath, bodyForKey);
|
|
105
|
+
const hit = await cache.store.get(cacheKey);
|
|
106
|
+
if (hit && hit.expiresAt > Date.now()) {
|
|
107
|
+
return new Response(JSON.stringify(hit.value), {
|
|
108
|
+
status: 200,
|
|
109
|
+
headers: {
|
|
110
|
+
'content-type': 'application/json',
|
|
111
|
+
'x-astroway-cache': 'hit',
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Auto-attach Idempotency-Key on POSTs unless caller already supplied one or
|
|
117
|
+
// the policy is disabled. We clone the request rather than mutating headers
|
|
118
|
+
// since the runtime Request object can be frozen in some environments.
|
|
119
|
+
if (shouldAttachIdempotency(idempotency, input.method)
|
|
120
|
+
&& !input.headers.has('idempotency-key')) {
|
|
121
|
+
const headers = new Headers(input.headers);
|
|
122
|
+
headers.set('Idempotency-Key', generateKey());
|
|
123
|
+
input = new Request(input, { headers });
|
|
124
|
+
}
|
|
125
|
+
// Per-call timeout override travels via x-astroway-timeout-ms header set
|
|
126
|
+
// by the namespace wrapper. Strip before sending so the server never sees
|
|
127
|
+
// it; longest path-based default kicks in for long-running AI/SSE routes.
|
|
128
|
+
let effectiveTimeoutMs = timeoutMs;
|
|
129
|
+
if (input.headers.has('x-astroway-timeout-ms')) {
|
|
130
|
+
const raw = Number(input.headers.get('x-astroway-timeout-ms'));
|
|
131
|
+
if (Number.isFinite(raw) && raw > 0)
|
|
132
|
+
effectiveTimeoutMs = raw;
|
|
133
|
+
const headers = new Headers(input.headers);
|
|
134
|
+
headers.delete('x-astroway-timeout-ms');
|
|
135
|
+
input = new Request(input, { headers });
|
|
136
|
+
}
|
|
137
|
+
else if (options.timeoutMs === undefined
|
|
138
|
+
&& isLongRunningPath(pathFromUrl(input.url, baseUrl))) {
|
|
139
|
+
effectiveTimeoutMs = LONG_RUNNING_TIMEOUT_MS;
|
|
140
|
+
}
|
|
63
141
|
const controller = new AbortController();
|
|
64
|
-
const timer = setTimeout(() => controller.abort(),
|
|
142
|
+
const timer = setTimeout(() => controller.abort(), effectiveTimeoutMs);
|
|
65
143
|
const reqInit = { signal: controller.signal };
|
|
144
|
+
if (dispatcher !== undefined)
|
|
145
|
+
reqInit.dispatcher = dispatcher;
|
|
66
146
|
try {
|
|
67
147
|
const res = await fetchWithRetry(() => fetchImpl(input, reqInit), retry);
|
|
68
148
|
await throwOnApiError(res);
|
|
149
|
+
if (cache && cacheKey && res.ok) {
|
|
150
|
+
// Cache the full parsed payload — openapi-fetch surfaces it as-is
|
|
151
|
+
// through `result.data`, so the cached hit must round-trip identical bytes.
|
|
152
|
+
try {
|
|
153
|
+
const cloned = res.clone();
|
|
154
|
+
const txt = await cloned.text();
|
|
155
|
+
const parsed = JSON.parse(txt);
|
|
156
|
+
await cache.store.set(cacheKey, {
|
|
157
|
+
expiresAt: Date.now() + cache.defaultTtlMs,
|
|
158
|
+
value: parsed,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
catch { /* non-JSON success body — skip cache */ }
|
|
162
|
+
}
|
|
69
163
|
return res;
|
|
70
164
|
}
|
|
71
165
|
catch (e) {
|
|
72
166
|
if (e instanceof ApiError)
|
|
73
167
|
throw e;
|
|
74
168
|
if (e?.name === 'AbortError') {
|
|
75
|
-
throw new APITimeoutError(`Request to ${input.url} timed out after ${
|
|
169
|
+
throw new APITimeoutError(`Request to ${input.url} timed out after ${effectiveTimeoutMs}ms`, { cause: e });
|
|
76
170
|
}
|
|
77
171
|
throw new APIConnectionError(`Network error calling ${input.url}: ${e?.message ?? 'unknown'}. Check your connection or baseUrl.`, { cause: e });
|
|
78
172
|
}
|
|
@@ -82,6 +176,97 @@ export class Astroway {
|
|
|
82
176
|
},
|
|
83
177
|
};
|
|
84
178
|
this.client = createClient(clientOpts);
|
|
179
|
+
Object.assign(this, buildNamespaces(this.client));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Open a Server-Sent Events stream against an SSE-capable endpoint
|
|
183
|
+
* (`/horoscope/daily`, `/interpret/*`, `/mcp/streaming`, etc.). Returns an
|
|
184
|
+
* async iterable of normalised {@link StreamChunk}s — the user can `for await`
|
|
185
|
+
* over it the same way they would Anthropic's `MessageStream`:
|
|
186
|
+
*
|
|
187
|
+
* ```ts
|
|
188
|
+
* for await (const chunk of aw.streamSSE('/horoscope/daily', { date: '2026-05-10' })) {
|
|
189
|
+
* if (chunk.type === 'text_delta') process.stdout.write(chunk.text);
|
|
190
|
+
* if (chunk.type === 'done') break;
|
|
191
|
+
* if (chunk.type === 'error') throw new Error(chunk.message);
|
|
192
|
+
* }
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* The same auth/User-Agent/timeout/retry policy as regular calls applies.
|
|
196
|
+
* Idempotency-Key auto-attaches on POST so a network blip + reconnect on the
|
|
197
|
+
* same key replays the same generation deterministically (when the backend
|
|
198
|
+
* supports it; fails open otherwise).
|
|
199
|
+
*
|
|
200
|
+
* Named `streamSSE` rather than `stream` because `/stream/*` is already a
|
|
201
|
+
* namespace for synchronous calc endpoints (`stream.positions`, `stream.ingress`,
|
|
202
|
+
* etc.).
|
|
203
|
+
*
|
|
204
|
+
* AbortSignal is honoured — pass `options.signal` to cancel the stream
|
|
205
|
+
* mid-flight.
|
|
206
|
+
*/
|
|
207
|
+
async *streamSSE(path, body, options) {
|
|
208
|
+
const method = options?.method ?? 'POST';
|
|
209
|
+
const url = `${this.options.baseUrl}${path.startsWith('/') ? path : `/${path}`}`;
|
|
210
|
+
const headers = {
|
|
211
|
+
...(this.options.authScheme === 'bearer'
|
|
212
|
+
? { Authorization: `Bearer ${this.options.apiKey}` }
|
|
213
|
+
: { 'X-Api-Key': this.options.apiKey }),
|
|
214
|
+
Accept: 'text/event-stream',
|
|
215
|
+
'X-Astroway-Channel': 'sdk-ts',
|
|
216
|
+
...this.options.defaultHeaders,
|
|
217
|
+
};
|
|
218
|
+
if (body !== undefined)
|
|
219
|
+
headers['Content-Type'] = 'application/json';
|
|
220
|
+
// Streaming POSTs benefit from idempotency the same way regular POSTs do —
|
|
221
|
+
// a reconnect retries the *same* generation, the server returns it, no double-bill.
|
|
222
|
+
if (method === 'POST') {
|
|
223
|
+
if (options?.idempotencyKey) {
|
|
224
|
+
headers['Idempotency-Key'] = options.idempotencyKey;
|
|
225
|
+
}
|
|
226
|
+
else if (shouldAttachIdempotency(this.options.idempotency, method)) {
|
|
227
|
+
headers['Idempotency-Key'] = resolveKeyGenerator(this.options.idempotency)();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const fetchImpl = this.options.fetch;
|
|
231
|
+
const init = {
|
|
232
|
+
method,
|
|
233
|
+
headers,
|
|
234
|
+
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
235
|
+
...(options?.signal ? { signal: options.signal } : {}),
|
|
236
|
+
};
|
|
237
|
+
let response;
|
|
238
|
+
try {
|
|
239
|
+
response = await fetchImpl(url, init);
|
|
240
|
+
}
|
|
241
|
+
catch (e) {
|
|
242
|
+
if (e?.name === 'AbortError') {
|
|
243
|
+
throw new APITimeoutError(`Stream to ${path} aborted`, { cause: e });
|
|
244
|
+
}
|
|
245
|
+
throw new APIConnectionError(`Network error opening stream to ${path}: ${e?.message ?? 'unknown'}`, { cause: e });
|
|
246
|
+
}
|
|
247
|
+
yield* streamFromResponse(response);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Strip the configured baseUrl prefix from a request URL so that the cache
|
|
252
|
+
* key path matches what `isDeterministicPath` expects (`/chart`, not
|
|
253
|
+
* `https://api.astroway.info/v1/chart`). Falls back gracefully on URLs that
|
|
254
|
+
* don't share the baseUrl.
|
|
255
|
+
*/
|
|
256
|
+
function pathFromUrl(url, baseUrl) {
|
|
257
|
+
try {
|
|
258
|
+
const u = new URL(url);
|
|
259
|
+
const b = new URL(baseUrl);
|
|
260
|
+
if (u.origin !== b.origin)
|
|
261
|
+
return u.pathname + u.search;
|
|
262
|
+
let path = u.pathname;
|
|
263
|
+
const basePath = b.pathname.replace(/\/$/, '');
|
|
264
|
+
if (basePath && path.startsWith(basePath))
|
|
265
|
+
path = path.slice(basePath.length) || '/';
|
|
266
|
+
return path + u.search;
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return url;
|
|
85
270
|
}
|
|
86
271
|
}
|
|
87
272
|
/**
|
|
@@ -95,6 +280,8 @@ async function throwOnApiError(res) {
|
|
|
95
280
|
const requestId = res.headers.get('x-request-id') ?? undefined;
|
|
96
281
|
const retryAfter = res.headers.get('retry-after');
|
|
97
282
|
const retryAfterSeconds = retryAfter && !Number.isNaN(Number(retryAfter)) ? Number(retryAfter) : undefined;
|
|
283
|
+
const creditsRaw = res.headers.get('x-credits-remaining');
|
|
284
|
+
const creditsRemaining = creditsRaw && !Number.isNaN(Number(creditsRaw)) ? Number(creditsRaw) : undefined;
|
|
98
285
|
let body;
|
|
99
286
|
let code;
|
|
100
287
|
let message = `${res.status} ${res.statusText}`;
|
|
@@ -117,6 +304,7 @@ async function throwOnApiError(res) {
|
|
|
117
304
|
body,
|
|
118
305
|
...(requestId !== undefined ? { requestId } : {}),
|
|
119
306
|
...(retryAfterSeconds !== undefined ? { retryAfterSeconds } : {}),
|
|
307
|
+
...(creditsRemaining !== undefined ? { creditsRemaining } : {}),
|
|
120
308
|
});
|
|
121
309
|
}
|
|
122
310
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,YAAoC,MAAM,eAAe,CAAC;AAEjE,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,cAAc,aAAa,CAAC;AAG5B,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AA2BxD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAwB;IACrD,OAAO,IAAI,QAAQ,CAAC,OAAO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