ai-hist 0.15.9 → 0.16.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/README.md CHANGED
@@ -192,6 +192,46 @@ See [the migration guide](https://github.com/AgentWorkforce/relayhistory/blob/ma
192
192
 
193
193
  Run `ai-hist enable-cloud` to log in, drain local history and keep pushing. Use `--once` to exit after draining. The npm CLI bundles Agent Relay Cloud login, so no separate `agent-relay` CLI install is required; a run without a TTY fails promptly with interactive-login and token guidance. The async SDK exports `enableCloud`, `pushCloud`, `installGitHooks` and `createShareableTrace`; RelayHistory exchange, transport, and stage-scoped auth stay in Rust. See [cloud setup](https://github.com/AgentWorkforce/relayhistory/blob/main/docs/enable-cloud.md).
194
194
 
195
+ `ai-hist/cloud` owns the cloud API wrappers, including `loginCloud` and
196
+ `loadStoredRelayhistoryAuth`, and delegates to the Rust cloud layer through N-API.
197
+ The root `ai-hist` entrypoint re-exports the cloud API for convenience. Credentials
198
+ live in `$RELAYHISTORY_HOME/stages`, defaulting to
199
+ `~/.agentworkforce/relayhistory/stages`. The Rust layer selects the stage, checks
200
+ transport security, preserves session metadata, and saves rotated tokens atomically.
201
+
202
+ ## Session thread transport
203
+
204
+ `getSessionThread` accepts `SessionThreadOptions.fetchImpl` for the thread GET
205
+ request and its retries. Authentication requests use the Rust HTTP client.
206
+ A stored-session 401 can therefore trigger a native refresh request even when
207
+ `fetchImpl` is mocked. Custom proxy or TLS settings supplied through `fetchImpl`
208
+ apply only to thread requests; the auth endpoint must also be reachable by the
209
+ native client for automatic refresh to succeed.
210
+
211
+ For isolated mocks or caller-managed credentials, supply `resolveSession` that
212
+ returns `{ auth }` without the `session: true` marker:
213
+
214
+ ```ts
215
+ import { getSessionThread } from 'ai-hist/cloud';
216
+
217
+ const thread = await getSessionThread(
218
+ { source: 'claude', sessionId: 'example-session' },
219
+ {
220
+ resolveSession: async () => ({
221
+ auth: { baseUrl: 'https://history.example.com', accessToken: 'rth_at_fixture' },
222
+ }),
223
+ fetchImpl: async () => new Response(JSON.stringify({
224
+ session: null, outcomes: [], links: [], nextCursor: null,
225
+ })),
226
+ },
227
+ );
228
+ ```
229
+
230
+ This resolver disables automatic refresh. A 401 from the selected transport
231
+ throws `AuthenticationExpiredError` without an authentication request. The
232
+ default `resolveCloudSession` returns the marker for stored credentials and
233
+ enables native refresh.
234
+
195
235
  ## Cloud token and replay
196
236
 
197
237
  The npm CLI uses the same Rust engine as the public async SDK:
@@ -2,13 +2,10 @@ export interface RelayhistoryAuth {
2
2
  baseUrl: string;
3
3
  accessToken: string;
4
4
  refreshToken?: string;
5
- /** Server-issued RFC 3339 expiry. Absent in sessions stored before it existed. */
6
5
  accessTokenExpiresAt?: string;
7
- /**
8
- * Locally cached org, for provenance only — never sent as an authorization
9
- * selector. The native store records it; this SDK's own login does not.
10
- */
6
+ /** Cached provenance; never an authorization selector. */
11
7
  orgId?: string;
8
+ workspaceId?: string;
12
9
  }
13
10
  export type LoginCloudResult = {
14
11
  ok: true;
@@ -17,41 +14,110 @@ export type LoginCloudResult = {
17
14
  ok: false;
18
15
  error: string;
19
16
  };
20
- export declare function loadStoredRelayhistoryAuth(): Promise<RelayhistoryAuth | null>;
21
- export declare function loginCloud(relayAccessToken: string, opts?: {
17
+ export interface CloudPushResult {
18
+ baseUrl: string;
19
+ sent: number;
20
+ accepted: number;
21
+ syncSkipped: boolean;
22
+ }
23
+ /** Return a secret service token with at least 60 seconds of validity. Rust
24
+ * selects the stage, refreshes if needed and atomically saves rotated tokens. */
25
+ export declare function accessToken(options?: {
22
26
  baseUrl?: string;
27
+ }): Promise<string>;
28
+ export interface ReplayOptions {
29
+ baseUrl?: string;
30
+ /** Page size, not a total cap; Rust fetches every page in server order. */
31
+ limit?: number;
32
+ maxContent?: number;
33
+ /** Return the raw event array serialized as JSON instead of readable text. */
34
+ json?: boolean;
35
+ /** Atomically save in Rust after all pages succeed; transcript is then null. */
36
+ out?: string;
37
+ }
38
+ export interface ReplayResult {
39
+ eventCount: number;
40
+ transcript: string | null;
41
+ outputPath: string | null;
42
+ }
43
+ /** Fetch a cloud transcript without opening or importing into the local DB. */
44
+ export declare function replay(sessionId: string, options?: ReplayOptions): Promise<ReplayResult>;
45
+ export interface CloudOptions {
46
+ dbPath?: string;
47
+ baseUrl?: string;
48
+ relayAccessToken?: string;
23
49
  label?: string;
24
- }): Promise<LoginCloudResult>;
25
- /** Which store a candidate came from. The two carry different written contracts. */
26
- type StoreOrigin = 'native' | 'sdk';
27
- interface StoredCandidate {
28
- auth: RelayhistoryAuth;
29
- origin: StoreOrigin;
30
- /** The file this session was read from, so a rotated pair replaces it in place. */
31
- path: string;
32
50
  }
33
- /** Why no usable cloud session was found, phrased for {@link cloudUnconfiguredMessage}. */
51
+ export interface EnableCloudOptions extends CloudOptions {
52
+ /** Keep syncing until stop() is called. Defaults to true. */
53
+ watch?: boolean;
54
+ intervalMs?: number;
55
+ onPush?: (result: CloudPushResult) => void;
56
+ onError?: (error: unknown) => void;
57
+ }
58
+ export interface CloudHandle extends CloudPushResult {
59
+ stop(): Promise<void>;
60
+ }
61
+ /** Both SDK consumers and the engine use the same stage-scoped Rust auth store. */
62
+ export declare function loadStoredRelayhistoryAuth(baseUrl?: string): Promise<RelayhistoryAuth | null>;
34
63
  export type CloudSessionResolution = {
35
64
  auth: RelayhistoryAuth;
36
- session?: StoredCandidate;
65
+ /** Marks a stored session eligible for native refresh after a 401. Omit for caller-managed auth. */
66
+ session?: true;
37
67
  } | {
38
68
  auth: null;
39
69
  detail: string;
40
70
  };
41
- /**
42
- * Resolve the cloud session a thread read should use.
43
- *
44
- * Both stores are consulted, native first: the Rust `ai-hist login` writes
45
- * `~/.agentworkforce/relayhistory/stages/*.auth.json`, while this SDK's own
46
- * {@link loginCloud} writes `~/.config/ai-hist/auth.json`. Reading only the
47
- * latter is what made the documented login flow look unconfigured.
48
- *
49
- * A caller that names a stage gets that stage or nothing. A caller that does
50
- * not, with more than one stage stored, gets a refusal rather than a guess —
51
- * the same rule as `cloud::load_auth`, and for the same reason: silently
52
- * picking a stage sends a token somewhere the caller did not ask for.
53
- */
54
- export declare function resolveCloudSession(requestedBaseUrl?: string, now?: number): Promise<CloudSessionResolution>;
71
+ /** Read-only connector probe; stage selection and eligibility belong to Rust. */
72
+ export declare function resolveCloudSession(baseUrl?: string, now?: number): Promise<CloudSessionResolution>;
73
+ /** Rotate a rejected stored bearer under the native stage lock. */
74
+ export declare function refreshCloudSession(baseUrl: string, rejectedToken: string): Promise<RelayhistoryAuth | null>;
75
+ /** Refuse to forward an SDK-obtained Agent Relay bearer to an untrusted stage. */
76
+ export declare function validateCloudExchangeBaseUrl(baseUrl?: string): Promise<void>;
77
+ export interface LoginOptions {
78
+ baseUrl?: string;
79
+ relayAccessToken?: string;
80
+ label?: string;
81
+ }
82
+ /** Exchange a supplied Agent Relay Cloud bearer for a RelayHistory session. */
83
+ export declare function login(options?: LoginOptions): Promise<RelayhistoryAuth>;
84
+ export declare function loginCloud(relayAccessToken: string, options?: {
85
+ baseUrl?: string;
86
+ label?: string;
87
+ }): Promise<LoginCloudResult>;
88
+ export declare function pushCloud(options?: CloudOptions): Promise<CloudPushResult>;
89
+ /** Device login, service-token exchange and first push run in Rust. The optional
90
+ * loop is host orchestration only: no token, refresh, stage or cursor logic in JS.
91
+ * The loop remains in this process; await stop() before shutdown. */
92
+ export declare function enableCloud(options?: EnableCloudOptions): Promise<CloudHandle>;
93
+ export interface GitHookOptions {
94
+ repo: string;
95
+ sessionId: string;
96
+ source?: string;
97
+ dbPath?: string;
98
+ prUrl?: string;
99
+ }
100
+ /** Install a local post-commit recorder for an explicit session. prUrl identifies
101
+ * an existing GitHub PR; linkage is uploaded by the next cloud push. */
102
+ export declare function installGitHooks(options: GitHookOptions): Promise<{
103
+ hookPath: string;
104
+ prUrl: string | null;
105
+ }>;
106
+ export declare function linkGitCommit(options: GitHookOptions): Promise<{
107
+ commitSha: string;
108
+ }>;
109
+ export type TraceVisibility = 'public' | 'private' | 'direct-link';
110
+ export interface ShareableTrace {
111
+ url: string;
112
+ visibility: TraceVisibility;
113
+ eventCount: number;
114
+ }
115
+ /** Share the already-pushed, frozen server snapshot of a session. */
116
+ export declare function createShareableTrace(sessionId: string, options: {
117
+ visibility: TraceVisibility;
118
+ source?: string;
119
+ baseUrl?: string;
120
+ }): Promise<ShareableTrace>;
55
121
  /**
56
122
  * The unsupported-operation message, in the shape the sibling remote
57
123
  * connectors use.
@@ -129,9 +195,18 @@ export interface SessionThreadOptions {
129
195
  * The connector-status resolver: a usable stored RelayHistory session means
130
196
  * the `cloud` connector is configured, and anything else carries the reason
131
197
  * it is not. Defaults to {@link resolveCloudSession}.
198
+ * Return `{ auth }` without `session: true` for caller-managed credentials or
199
+ * isolated mocks: a 401 then throws AuthenticationExpiredError without refresh.
132
200
  */
133
201
  resolveSession?: (requestedBaseUrl?: string) => Promise<CloudSessionResolution>;
134
- /** HTTP transport. Defaults to the global `fetch`. */
202
+ /**
203
+ * Transport for thread GET requests and their retries. Defaults to global fetch.
204
+ * Does not handle authentication requests: stored-session refresh uses Rust's
205
+ * native HTTP client and can make a real network request after a 401, even when
206
+ * this function is a mock. Proxy and TLS settings here do not configure refresh.
207
+ * For isolated mocks, also provide resolveSession returning `{ auth }` without
208
+ * `session: true`, which disables automatic refresh.
209
+ */
135
210
  fetchImpl?: typeof fetch;
136
211
  }
137
212
  /**
@@ -143,5 +218,4 @@ export interface SessionThreadOptions {
143
218
  * a remote-only request no connector can serve.
144
219
  */
145
220
  export declare function getSessionThread(query: SessionThreadQuery, opts?: SessionThreadOptions): Promise<SessionThread>;
146
- export {};
147
221
  //# sourceMappingURL=cloud-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-client.d.ts","sourceRoot":"","sources":["../src/cloud-client.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MA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