@possibl/rcrt-sdk 0.1.2 → 0.5.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 +99 -62
- package/LICENSE +21 -0
- package/README.md +35 -21
- package/dist/auth.d.ts +45 -0
- package/dist/auth.d.ts.map +1 -0
- package/{src/auth.ts → dist/auth.js} +9 -24
- package/dist/auth.js.map +1 -0
- package/dist/authn.d.ts +114 -0
- package/dist/authn.d.ts.map +1 -0
- package/dist/authn.js +107 -0
- package/dist/authn.js.map +1 -0
- package/dist/breadcrumbs.d.ts +43 -0
- package/dist/breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs.js +122 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/cards.d.ts +28 -0
- package/dist/cards.d.ts.map +1 -0
- package/dist/cards.js +105 -0
- package/dist/cards.js.map +1 -0
- package/dist/chat.d.ts +103 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +105 -0
- package/dist/chat.js.map +1 -0
- package/dist/client.d.ts +85 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +133 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +32 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +76 -0
- package/dist/errors.js.map +1 -0
- package/dist/files.d.ts +41 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +64 -0
- package/dist/files.js.map +1 -0
- package/dist/generated/conformance.d.ts +48 -0
- package/dist/generated/conformance.d.ts.map +1 -0
- package/dist/generated/conformance.js +24 -0
- package/dist/generated/conformance.js.map +1 -0
- package/dist/generated/index.d.ts +34 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +34 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/openapi.d.ts +3900 -0
- package/dist/generated/openapi.d.ts.map +1 -0
- package/dist/generated/openapi.js +6 -0
- package/dist/generated/openapi.js.map +1 -0
- package/dist/grants.d.ts +41 -0
- package/dist/grants.d.ts.map +1 -0
- package/dist/grants.js +50 -0
- package/dist/grants.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/fetch.d.ts +47 -0
- package/dist/internal/fetch.d.ts.map +1 -0
- package/dist/internal/fetch.js +108 -0
- package/dist/internal/fetch.js.map +1 -0
- package/dist/internal/sse.d.ts +82 -0
- package/dist/internal/sse.d.ts.map +1 -0
- package/dist/internal/sse.js +161 -0
- package/dist/internal/sse.js.map +1 -0
- package/dist/marketplace.d.ts +98 -0
- package/dist/marketplace.d.ts.map +1 -0
- package/dist/marketplace.js +74 -0
- package/dist/marketplace.js.map +1 -0
- package/dist/members.d.ts +60 -0
- package/dist/members.d.ts.map +1 -0
- package/dist/members.js +74 -0
- package/dist/members.js.map +1 -0
- package/dist/org.d.ts +85 -0
- package/dist/org.d.ts.map +1 -0
- package/dist/org.js +70 -0
- package/dist/org.js.map +1 -0
- package/dist/types/breadcrumb.d.ts +70 -0
- package/dist/types/breadcrumb.d.ts.map +1 -0
- package/dist/types/breadcrumb.js +8 -0
- package/dist/types/breadcrumb.js.map +1 -0
- package/dist/types/card.d.ts +251 -0
- package/dist/types/card.d.ts.map +1 -0
- package/dist/types/card.js +10 -0
- package/dist/types/card.js.map +1 -0
- package/dist/types/engine.d.ts +69 -0
- package/dist/types/engine.d.ts.map +1 -0
- package/dist/types/engine.js +53 -0
- package/dist/types/engine.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +35 -6
- package/src/authn.ts +0 -159
- package/src/breadcrumbs.ts +0 -111
- package/src/capabilities.ts +0 -93
- package/src/cards.ts +0 -109
- package/src/chat.ts +0 -83
- package/src/client.ts +0 -97
- package/src/errors.ts +0 -101
- package/src/files.ts +0 -135
- package/src/grants.ts +0 -99
- package/src/index.ts +0 -103
- package/src/internal/fetch.ts +0 -133
- package/src/internal/sse.ts +0 -236
- package/src/sessions.ts +0 -110
- package/src/types/breadcrumb.ts +0 -77
- package/src/types/card.ts +0 -298
- package/src/types/index.ts +0 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumbs module — CRUD + tag query + semantic search.
|
|
3
|
+
*
|
|
4
|
+
* See `packages/docs/guides/04-breadcrumbs.md` for the narrative
|
|
5
|
+
* description of each operation.
|
|
6
|
+
*/
|
|
7
|
+
import type { FetchContext } from './internal/fetch.js';
|
|
8
|
+
import type { Breadcrumb, CreateBreadcrumbRequest, UpdateBreadcrumbRequest, QueryByTagsOptions, SemanticSearchOptions } from './types/breadcrumb.js';
|
|
9
|
+
export declare class BreadcrumbsModule {
|
|
10
|
+
private readonly ctx;
|
|
11
|
+
constructor(ctx: FetchContext);
|
|
12
|
+
/** `POST /v1/breadcrumbs` */
|
|
13
|
+
create(req: CreateBreadcrumbRequest): Promise<Breadcrumb>;
|
|
14
|
+
/** `GET /v1/breadcrumbs?tags=...` — AND semantics. */
|
|
15
|
+
queryByTags(tags: string[], options?: QueryByTagsOptions): Promise<Breadcrumb[]>;
|
|
16
|
+
/** `GET /v1/breadcrumbs/search?q=...` — cosine-similarity semantic search. */
|
|
17
|
+
search(q: string, options?: SemanticSearchOptions): Promise<Breadcrumb[]>;
|
|
18
|
+
/** `GET /v1/breadcrumbs/{id}` */
|
|
19
|
+
get(id: string): Promise<Breadcrumb>;
|
|
20
|
+
/**
|
|
21
|
+
* `PATCH /v1/breadcrumbs/{id}` — optimistic-locking update.
|
|
22
|
+
*
|
|
23
|
+
* If `req.version` is wrong, the server returns 409. Pass
|
|
24
|
+
* `autoRetryConflict: true` to have the SDK refetch + retry once.
|
|
25
|
+
*/
|
|
26
|
+
update(id: string, req: UpdateBreadcrumbRequest, opts?: {
|
|
27
|
+
autoRetryConflict?: boolean;
|
|
28
|
+
}): Promise<Breadcrumb>;
|
|
29
|
+
/**
|
|
30
|
+
* Set an agent breadcrumb's `engine_config.model` to a canonical
|
|
31
|
+
* `route/provider/model` address (the runtime SSOT for LLM selection — see
|
|
32
|
+
* docs/design/LLM_PROVIDER_MODEL_RESOLUTION.md).
|
|
33
|
+
*
|
|
34
|
+
* Fetches the current breadcrumb to preserve the rest of `content` and
|
|
35
|
+
* `engine_config`, then PATCHes with the supplied optimistic-locking
|
|
36
|
+
* `version`. The `modelAddress` is NOT validated here beyond non-emptiness;
|
|
37
|
+
* the backend rejects malformed/unexpanded-tier addresses loudly at runtime.
|
|
38
|
+
*/
|
|
39
|
+
updateAgentEngineConfig(id: string, modelAddress: string, version: number): Promise<Breadcrumb>;
|
|
40
|
+
/** `DELETE /v1/breadcrumbs/{id}` — soft delete. */
|
|
41
|
+
delete(id: string): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../src/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EACV,UAAU,EAEV,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAG/B,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,YAAY;IAE9C,6BAA6B;IACvB,MAAM,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IAU/D,sDAAsD;IAChD,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAgB1F,8EAA8E;IACxE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAUnF,iCAAiC;IAC3B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI1C;;;;;OAKG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,uBAAuB,EAC5B,IAAI,GAAE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAO,GACzC,OAAO,CAAC,UAAU,CAAC;IAyBtB;;;;;;;;;OASG;IACG,uBAAuB,CAC3B,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC;IAiBtB,mDAAmD;IAC7C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQxC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumbs module — CRUD + tag query + semantic search.
|
|
3
|
+
*
|
|
4
|
+
* See `packages/docs/guides/04-breadcrumbs.md` for the narrative
|
|
5
|
+
* description of each operation.
|
|
6
|
+
*/
|
|
7
|
+
import { request } from './internal/fetch.js';
|
|
8
|
+
import { ApiError, SdkError } from './errors.js';
|
|
9
|
+
export class BreadcrumbsModule {
|
|
10
|
+
ctx;
|
|
11
|
+
constructor(ctx) {
|
|
12
|
+
this.ctx = ctx;
|
|
13
|
+
}
|
|
14
|
+
/** `POST /v1/breadcrumbs` */
|
|
15
|
+
async create(req) {
|
|
16
|
+
const res = await request(this.ctx, '/v1/breadcrumbs', {
|
|
17
|
+
method: 'POST',
|
|
18
|
+
body: req,
|
|
19
|
+
});
|
|
20
|
+
return 'breadcrumb' in res
|
|
21
|
+
? res.breadcrumb
|
|
22
|
+
: res;
|
|
23
|
+
}
|
|
24
|
+
/** `GET /v1/breadcrumbs?tags=...` — AND semantics. */
|
|
25
|
+
async queryByTags(tags, options = {}) {
|
|
26
|
+
if (tags.length === 0) {
|
|
27
|
+
throw new SdkError('EMPTY_TAGS', 'queryByTags requires at least one tag');
|
|
28
|
+
}
|
|
29
|
+
const res = await request(this.ctx, '/v1/breadcrumbs', {
|
|
30
|
+
query: {
|
|
31
|
+
tags,
|
|
32
|
+
limit: options.limit,
|
|
33
|
+
offset: options.offset,
|
|
34
|
+
name: options.name,
|
|
35
|
+
order: options.order,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
return Array.isArray(res) ? res : (res.breadcrumbs ?? []);
|
|
39
|
+
}
|
|
40
|
+
/** `GET /v1/breadcrumbs/search?q=...` — cosine-similarity semantic search. */
|
|
41
|
+
async search(q, options = {}) {
|
|
42
|
+
const query = {
|
|
43
|
+
q,
|
|
44
|
+
limit: options.limit,
|
|
45
|
+
};
|
|
46
|
+
if (options.tags?.length)
|
|
47
|
+
query.tags = options.tags;
|
|
48
|
+
const res = await request(this.ctx, '/v1/breadcrumbs/search', { query });
|
|
49
|
+
return Array.isArray(res) ? res : (res.breadcrumbs ?? []);
|
|
50
|
+
}
|
|
51
|
+
/** `GET /v1/breadcrumbs/{id}` */
|
|
52
|
+
async get(id) {
|
|
53
|
+
return request(this.ctx, `/v1/breadcrumbs/${id}`);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* `PATCH /v1/breadcrumbs/{id}` — optimistic-locking update.
|
|
57
|
+
*
|
|
58
|
+
* If `req.version` is wrong, the server returns 409. Pass
|
|
59
|
+
* `autoRetryConflict: true` to have the SDK refetch + retry once.
|
|
60
|
+
*/
|
|
61
|
+
async update(id, req, opts = {}) {
|
|
62
|
+
const refetchBeforeRetry = opts.autoRetryConflict
|
|
63
|
+
? async () => {
|
|
64
|
+
const fresh = await this.get(id);
|
|
65
|
+
return {
|
|
66
|
+
body: {
|
|
67
|
+
...req,
|
|
68
|
+
version: fresh.version,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
: undefined;
|
|
73
|
+
const res = await request(this.ctx, `/v1/breadcrumbs/${id}`, {
|
|
74
|
+
method: 'PATCH',
|
|
75
|
+
body: req,
|
|
76
|
+
...(refetchBeforeRetry
|
|
77
|
+
? { maxConflictRetries: 2, refetchBeforeRetry }
|
|
78
|
+
: {}),
|
|
79
|
+
});
|
|
80
|
+
return 'breadcrumb' in res
|
|
81
|
+
? res.breadcrumb
|
|
82
|
+
: res;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Set an agent breadcrumb's `engine_config.model` to a canonical
|
|
86
|
+
* `route/provider/model` address (the runtime SSOT for LLM selection — see
|
|
87
|
+
* docs/design/LLM_PROVIDER_MODEL_RESOLUTION.md).
|
|
88
|
+
*
|
|
89
|
+
* Fetches the current breadcrumb to preserve the rest of `content` and
|
|
90
|
+
* `engine_config`, then PATCHes with the supplied optimistic-locking
|
|
91
|
+
* `version`. The `modelAddress` is NOT validated here beyond non-emptiness;
|
|
92
|
+
* the backend rejects malformed/unexpanded-tier addresses loudly at runtime.
|
|
93
|
+
*/
|
|
94
|
+
async updateAgentEngineConfig(id, modelAddress, version) {
|
|
95
|
+
if (!modelAddress || modelAddress.trim() === '') {
|
|
96
|
+
throw new SdkError('EMPTY_MODEL_ADDRESS', 'updateAgentEngineConfig requires a non-empty route/provider/model address');
|
|
97
|
+
}
|
|
98
|
+
const current = await this.get(id);
|
|
99
|
+
const content = (current.content ?? {});
|
|
100
|
+
const engineConfig = (content.engine_config ?? {});
|
|
101
|
+
const nextContent = {
|
|
102
|
+
...content,
|
|
103
|
+
engine_config: {
|
|
104
|
+
...engineConfig,
|
|
105
|
+
model: modelAddress.trim(),
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
return this.update(id, { content: nextContent, version });
|
|
109
|
+
}
|
|
110
|
+
/** `DELETE /v1/breadcrumbs/{id}` — soft delete. */
|
|
111
|
+
async delete(id) {
|
|
112
|
+
try {
|
|
113
|
+
await request(this.ctx, `/v1/breadcrumbs/${id}`, { method: 'DELETE' });
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
if (err instanceof ApiError && err.status === 404)
|
|
117
|
+
return; // idempotent
|
|
118
|
+
throw err;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../src/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD,6BAA6B;IAC7B,KAAK,CAAC,MAAM,CAAC,GAA4B;QACvC,MAAM,GAAG,GAAG,MAAM,OAAO,CAAkC,IAAI,CAAC,GAAG,EAAE,iBAAiB,EAAE;YACtF,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,GAAG;SACV,CAAC,CAAC;QACH,OAAO,YAAY,IAAK,GAA0B;YAChD,CAAC,CAAE,GAA0B,CAAC,UAAU;YACxC,CAAC,CAAE,GAAkB,CAAC;IAC1B,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,WAAW,CAAC,IAAc,EAAE,UAA8B,EAAE;QAChE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,QAAQ,CAAC,YAAY,EAAE,uCAAuC,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,OAAO,CAA+C,IAAI,CAAC,GAAG,EAAE,iBAAiB,EAAE;YACnG,KAAK,EAAE;gBACL,IAAI;gBACJ,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;gB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MAAM,OAAO,CAAO,IAAI,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/E,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;gBAAE,OAAO,CAAC,aAAa;YACxE,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF"}
|
package/dist/cards.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cards module — resolve an `interpret:pending-action` breadcrumb.
|
|
3
|
+
*
|
|
4
|
+
* The card's footer action ids correspond to values the SDK writes
|
|
5
|
+
* to `content.status`. See
|
|
6
|
+
* `packages/docs/guides/06-rendering-cards.md`.
|
|
7
|
+
*/
|
|
8
|
+
import type { FetchContext } from './internal/fetch.js';
|
|
9
|
+
import type { Breadcrumb } from './types/breadcrumb.js';
|
|
10
|
+
import type { Card, ResolveRequest } from './types/card.js';
|
|
11
|
+
export declare class CardsModule {
|
|
12
|
+
private readonly ctx;
|
|
13
|
+
constructor(ctx: FetchContext);
|
|
14
|
+
/**
|
|
15
|
+
* PATCH the card breadcrumb with a resolution. Handles optimistic
|
|
16
|
+
* locking transparently — refetches + retries on 409.
|
|
17
|
+
*/
|
|
18
|
+
resolve(breadcrumbId: string, resolution: ResolveRequest): Promise<Breadcrumb>;
|
|
19
|
+
/** Pending cards for the current user's current workspace. */
|
|
20
|
+
listPending(limit?: number): Promise<Breadcrumb[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Extract the Card object from a breadcrumb's content, normalising
|
|
23
|
+
* over legacy shapes (old breadcrumbs stored `card.type` + flat
|
|
24
|
+
* fields instead of `card.layout` + structured body).
|
|
25
|
+
*/
|
|
26
|
+
static extractCard(bc: Breadcrumb): Card | undefined;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE5D,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,YAAY;IAE9C;;;OAGG;IACG,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAmCpF,8DAA8D;IACxD,WAAW,CAAC,KAAK,SAAK,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAOpD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS;CAkBrD"}
|
package/dist/cards.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cards module — resolve an `interpret:pending-action` breadcrumb.
|
|
3
|
+
*
|
|
4
|
+
* The card's footer action ids correspond to values the SDK writes
|
|
5
|
+
* to `content.status`. See
|
|
6
|
+
* `packages/docs/guides/06-rendering-cards.md`.
|
|
7
|
+
*/
|
|
8
|
+
import { request } from './internal/fetch.js';
|
|
9
|
+
export class CardsModule {
|
|
10
|
+
ctx;
|
|
11
|
+
constructor(ctx) {
|
|
12
|
+
this.ctx = ctx;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* PATCH the card breadcrumb with a resolution. Handles optimistic
|
|
16
|
+
* locking transparently — refetches + retries on 409.
|
|
17
|
+
*/
|
|
18
|
+
async resolve(breadcrumbId, resolution) {
|
|
19
|
+
const current = await request(this.ctx, `/v1/breadcrumbs/${breadcrumbId}`);
|
|
20
|
+
const nextContent = {
|
|
21
|
+
...(current.content ?? {}),
|
|
22
|
+
status: resolution.status,
|
|
23
|
+
user_response: resolution.user_response,
|
|
24
|
+
resolved_at: new Date().toISOString(),
|
|
25
|
+
};
|
|
26
|
+
const nextTags = ensureStatusTag(current.tags, resolution.status);
|
|
27
|
+
return request(this.ctx, `/v1/breadcrumbs/${breadcrumbId}`, {
|
|
28
|
+
method: 'PATCH',
|
|
29
|
+
body: {
|
|
30
|
+
version: current.version,
|
|
31
|
+
content: nextContent,
|
|
32
|
+
tags: nextTags,
|
|
33
|
+
},
|
|
34
|
+
maxConflictRetries: 2,
|
|
35
|
+
refetchBeforeRetry: async () => {
|
|
36
|
+
const fresh = await request(this.ctx, `/v1/breadcrumbs/${breadcrumbId}`);
|
|
37
|
+
return {
|
|
38
|
+
body: {
|
|
39
|
+
version: fresh.version,
|
|
40
|
+
content: {
|
|
41
|
+
...(fresh.content ?? {}),
|
|
42
|
+
status: resolution.status,
|
|
43
|
+
user_response: resolution.user_response,
|
|
44
|
+
resolved_at: new Date().toISOString(),
|
|
45
|
+
},
|
|
46
|
+
tags: ensureStatusTag(fresh.tags, resolution.status),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** Pending cards for the current user's current workspace. */
|
|
53
|
+
async listPending(limit = 50) {
|
|
54
|
+
const list = await request(this.ctx, '/v1/breadcrumbs', {
|
|
55
|
+
query: { tags: 'interpret:pending-action,status:pending', limit },
|
|
56
|
+
});
|
|
57
|
+
return Array.isArray(list) ? list : (list.breadcrumbs ?? []);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Extract the Card object from a breadcrumb's content, normalising
|
|
61
|
+
* over legacy shapes (old breadcrumbs stored `card.type` + flat
|
|
62
|
+
* fields instead of `card.layout` + structured body).
|
|
63
|
+
*/
|
|
64
|
+
static extractCard(bc) {
|
|
65
|
+
const content = (bc.content ?? {});
|
|
66
|
+
const raw = content.card ?? undefined;
|
|
67
|
+
if (!raw)
|
|
68
|
+
return undefined;
|
|
69
|
+
if (typeof raw.layout === 'string')
|
|
70
|
+
return raw;
|
|
71
|
+
// Legacy — fall back to a minimal info card.
|
|
72
|
+
if (typeof raw.type === 'string') {
|
|
73
|
+
const card = {
|
|
74
|
+
layout: legacyTypeToLayout(raw.type),
|
|
75
|
+
header: { title: typeof content.title === 'string' ? content.title : bc.title },
|
|
76
|
+
};
|
|
77
|
+
if (typeof content.summary === 'string') {
|
|
78
|
+
card.body = { text: content.summary };
|
|
79
|
+
}
|
|
80
|
+
return card;
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function ensureStatusTag(existing, status) {
|
|
86
|
+
const withoutStatus = existing.filter((t) => !t.startsWith('status:'));
|
|
87
|
+
withoutStatus.push(`status:${status}`);
|
|
88
|
+
return withoutStatus;
|
|
89
|
+
}
|
|
90
|
+
function legacyTypeToLayout(type) {
|
|
91
|
+
switch (type) {
|
|
92
|
+
case 'connect':
|
|
93
|
+
return 'connect';
|
|
94
|
+
case 'confirm':
|
|
95
|
+
case 'choice':
|
|
96
|
+
case 'multi-choice':
|
|
97
|
+
case 'approval':
|
|
98
|
+
return 'decision';
|
|
99
|
+
case 'text-input':
|
|
100
|
+
return 'input';
|
|
101
|
+
default:
|
|
102
|
+
return 'info';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=cards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,MAAM,OAAO,WAAW;IACO;IAA7B,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD;;;OAGG;IACH,KAAK,C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AAC;CACF;AAED,SAAS,eAAe,CAAC,QAAkB,EAAE,MAAc;IACzD,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACvE,aAAa,CAAC,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;IACvC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY;IACtC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,cAAc,CAAC;QACpB,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,YAAY;YACf,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/chat.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat module — `POST /v1/chat` + per-session / global SSE streams.
|
|
3
|
+
*
|
|
4
|
+
* See `packages/docs/guides/03-chat-and-sse.md`.
|
|
5
|
+
*/
|
|
6
|
+
import type { FetchContext } from './internal/fetch.js';
|
|
7
|
+
import type { SseConnection, SseConnectConfig, SseHandlers } from './internal/sse.js';
|
|
8
|
+
import type { Breadcrumb } from './types/breadcrumb.js';
|
|
9
|
+
/**
|
|
10
|
+
* A previously uploaded file attached to a chat turn. Mirrors the api-gateway
|
|
11
|
+
* `ChatRequest.Attachments` contract (`cmd/api-gateway/main.go::ChatAttachmentRef`).
|
|
12
|
+
*
|
|
13
|
+
* `file_breadcrumb_id` is the file breadcrumb's id — the value returned by
|
|
14
|
+
* `FilesModule.upload(...)` as `FileRecord.id`. The server resolves it to the
|
|
15
|
+
* object's `gs://` URI + mime type and threads it to a file-capable agent.
|
|
16
|
+
* `mime_type` is an optional override; the server reads it from the breadcrumb
|
|
17
|
+
* when omitted. A raw `gs://` URI is NOT accepted here — only a breadcrumb id.
|
|
18
|
+
*/
|
|
19
|
+
export interface ChatAttachmentRef {
|
|
20
|
+
file_breadcrumb_id: string;
|
|
21
|
+
mime_type?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SendChatRequest {
|
|
24
|
+
message: string;
|
|
25
|
+
/** The agent to route this turn to. `life-coordinator` by default in the Ritual bundle. */
|
|
26
|
+
target_agent: string;
|
|
27
|
+
/** Resume an existing session; omit to start a new one. */
|
|
28
|
+
session_id?: string;
|
|
29
|
+
/** Extra tags stamped on the user's message breadcrumb. */
|
|
30
|
+
extra_tags?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Files (e.g. an uploaded contract PDF or image) to deliver to a file-capable
|
|
33
|
+
* agent. Upload via `client.files.upload(...)` first, then pass the returned
|
|
34
|
+
* `FileRecord.id` as `file_breadcrumb_id`. Omit for an ordinary text turn —
|
|
35
|
+
* the wire body is then unchanged.
|
|
36
|
+
*/
|
|
37
|
+
attachments?: ChatAttachmentRef[];
|
|
38
|
+
}
|
|
39
|
+
export interface SendChatResponse {
|
|
40
|
+
id: string;
|
|
41
|
+
session_id: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SessionParticipant {
|
|
44
|
+
agent_id: string;
|
|
45
|
+
name?: string;
|
|
46
|
+
invited_by?: string;
|
|
47
|
+
joined_at?: string;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** An agent that can be chatted with / invited into a session. */
|
|
51
|
+
export interface ChattableAgent {
|
|
52
|
+
/** The id chat routing expects in `target_agent`. */
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
/** Tagged `interface:chat-default` — pick this one when the app has no opinion. */
|
|
57
|
+
isDefault: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface SseStreamOptions {
|
|
60
|
+
/** Override the EventSource constructor (required in React Native). */
|
|
61
|
+
eventSource?: SseConnectConfig['eventSource'];
|
|
62
|
+
useHeaderAuth?: boolean;
|
|
63
|
+
maxBackoffMs?: number;
|
|
64
|
+
/** Supply a Last-Event-ID-style resume token if your server supports it. */
|
|
65
|
+
last_event_id?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare class ChatModule {
|
|
68
|
+
private readonly ctx;
|
|
69
|
+
constructor(ctx: FetchContext);
|
|
70
|
+
/**
|
|
71
|
+
* Send a user message to an agent. Returns immediately with the
|
|
72
|
+
* breadcrumb id + session id. The agent reply arrives via the SSE
|
|
73
|
+
* stream — call `stream(session_id)` before posting, not after.
|
|
74
|
+
*/
|
|
75
|
+
send(req: SendChatRequest): Promise<SendChatResponse>;
|
|
76
|
+
/** Per-session SSE — just this session's events. Recommended for chat views. */
|
|
77
|
+
sessionStream(sessionId: string, handlers: SseHandlers, options?: SseStreamOptions): SseConnection;
|
|
78
|
+
/** Global SSE — everything the user can see. Useful for home feeds / awaiting-you. */
|
|
79
|
+
globalStream(handlers: SseHandlers, options?: SseStreamOptions): SseConnection;
|
|
80
|
+
private buildConfig;
|
|
81
|
+
/**
|
|
82
|
+
* Clear a session's suspend flag after the loop detector fired.
|
|
83
|
+
*
|
|
84
|
+
* @see `packages/docs/operations/loop-detector.md`
|
|
85
|
+
*/
|
|
86
|
+
resumeSession(sessionId: string): Promise<void>;
|
|
87
|
+
/** A session's message breadcrumbs (tag query on `session:{id}`). */
|
|
88
|
+
sessionBreadcrumbs(sessionId: string, limit?: number): Promise<Breadcrumb[]>;
|
|
89
|
+
/** `GET /v1/sessions/{id}/participants` */
|
|
90
|
+
sessionParticipants(sessionId: string): Promise<SessionParticipant[]>;
|
|
91
|
+
/** `POST /v1/sessions/{id}/participants` — invite an agent into the session. */
|
|
92
|
+
addSessionParticipant(sessionId: string, agentId: string, invitedBy?: string): Promise<void>;
|
|
93
|
+
/** `DELETE /v1/sessions/{id}/participants/{agentId}` */
|
|
94
|
+
removeSessionParticipant(sessionId: string, agentId: string): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Agents in the active workspace that can be chatted with / invited.
|
|
97
|
+
* Derived from `interpret:promptable` breadcrumbs; agents tagged
|
|
98
|
+
* `interface:chat` (or `interface:chat-default`) are preferred when
|
|
99
|
+
* any exist.
|
|
100
|
+
*/
|
|
101
|
+
listAgents(): Promise<ChattableAgent[]>;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,M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EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlG,wDAAwD;IAClD,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjF;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;CAgB9C"}
|
package/dist/chat.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat module — `POST /v1/chat` + per-session / global SSE streams.
|
|
3
|
+
*
|
|
4
|
+
* See `packages/docs/guides/03-chat-and-sse.md`.
|
|
5
|
+
*/
|
|
6
|
+
import { request } from './internal/fetch.js';
|
|
7
|
+
import { connect as sseConnect } from './internal/sse.js';
|
|
8
|
+
export class ChatModule {
|
|
9
|
+
ctx;
|
|
10
|
+
constructor(ctx) {
|
|
11
|
+
this.ctx = ctx;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Send a user message to an agent. Returns immediately with the
|
|
15
|
+
* breadcrumb id + session id. The agent reply arrives via the SSE
|
|
16
|
+
* stream — call `stream(session_id)` before posting, not after.
|
|
17
|
+
*/
|
|
18
|
+
async send(req) {
|
|
19
|
+
return request(this.ctx, '/v1/chat', {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
body: req,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** Per-session SSE — just this session's events. Recommended for chat views. */
|
|
25
|
+
sessionStream(sessionId, handlers, options = {}) {
|
|
26
|
+
return sseConnect(this.buildConfig(`/v1/sessions/${sessionId}/stream`, options), handlers);
|
|
27
|
+
}
|
|
28
|
+
/** Global SSE — everything the user can see. Useful for home feeds / awaiting-you. */
|
|
29
|
+
globalStream(handlers, options = {}) {
|
|
30
|
+
return sseConnect(this.buildConfig('/v1/events', options), handlers);
|
|
31
|
+
}
|
|
32
|
+
buildConfig(path, options) {
|
|
33
|
+
const config = {
|
|
34
|
+
apiUrl: this.ctx.apiUrl,
|
|
35
|
+
path,
|
|
36
|
+
tenantId: this.ctx.tenantId,
|
|
37
|
+
getToken: () => this.ctx.tokenProvider.getIdToken(),
|
|
38
|
+
};
|
|
39
|
+
if (options.eventSource)
|
|
40
|
+
config.eventSource = options.eventSource;
|
|
41
|
+
if (options.useHeaderAuth !== undefined)
|
|
42
|
+
config.useHeaderAuth = options.useHeaderAuth;
|
|
43
|
+
if (options.maxBackoffMs !== undefined)
|
|
44
|
+
config.maxBackoffMs = options.maxBackoffMs;
|
|
45
|
+
if (options.last_event_id)
|
|
46
|
+
config.query = { last_event_id: options.last_event_id };
|
|
47
|
+
return config;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Clear a session's suspend flag after the loop detector fired.
|
|
51
|
+
*
|
|
52
|
+
* @see `packages/docs/operations/loop-detector.md`
|
|
53
|
+
*/
|
|
54
|
+
async resumeSession(sessionId) {
|
|
55
|
+
await request(this.ctx, `/v1/sessions/${sessionId}/resume`, { method: 'POST' });
|
|
56
|
+
}
|
|
57
|
+
// ── Session history + participants ────────────────────────────────
|
|
58
|
+
/** A session's message breadcrumbs (tag query on `session:{id}`). */
|
|
59
|
+
async sessionBreadcrumbs(sessionId, limit = 100) {
|
|
60
|
+
const res = await request(this.ctx, '/v1/breadcrumbs', {
|
|
61
|
+
query: { tags: [`session:${sessionId}`], limit },
|
|
62
|
+
});
|
|
63
|
+
return Array.isArray(res) ? res : (res?.breadcrumbs ?? []);
|
|
64
|
+
}
|
|
65
|
+
/** `GET /v1/sessions/{id}/participants` */
|
|
66
|
+
async sessionParticipants(sessionId) {
|
|
67
|
+
const res = await request(this.ctx, `/v1/sessions/${sessionId}/participants`);
|
|
68
|
+
return res?.participants ?? [];
|
|
69
|
+
}
|
|
70
|
+
/** `POST /v1/sessions/{id}/participants` — invite an agent into the session. */
|
|
71
|
+
async addSessionParticipant(sessionId, agentId, invitedBy) {
|
|
72
|
+
await request(this.ctx, `/v1/sessions/${sessionId}/participants`, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
body: { agent_id: agentId, ...(invitedBy ? { invited_by: invitedBy } : {}) },
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/** `DELETE /v1/sessions/{id}/participants/{agentId}` */
|
|
78
|
+
async removeSessionParticipant(sessionId, agentId) {
|
|
79
|
+
await request(this.ctx, `/v1/sessions/${sessionId}/participants/${agentId}`, {
|
|
80
|
+
method: 'DELETE',
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// ── Agent discovery ───────────────────────────────────────────────
|
|
84
|
+
/**
|
|
85
|
+
* Agents in the active workspace that can be chatted with / invited.
|
|
86
|
+
* Derived from `interpret:promptable` breadcrumbs; agents tagged
|
|
87
|
+
* `interface:chat` (or `interface:chat-default`) are preferred when
|
|
88
|
+
* any exist.
|
|
89
|
+
*/
|
|
90
|
+
async listAgents() {
|
|
91
|
+
const res = await request(this.ctx, '/v1/breadcrumbs', {
|
|
92
|
+
query: { tags: ['interpret:promptable'], limit: 100 },
|
|
93
|
+
});
|
|
94
|
+
const all = Array.isArray(res) ? res : (res?.breadcrumbs ?? []);
|
|
95
|
+
const chatTagged = all.filter((bc) => bc.tags?.includes('interface:chat') || bc.tags?.includes('interface:chat-default'));
|
|
96
|
+
const agents = chatTagged.length > 0 ? chatTagged : all;
|
|
97
|
+
return agents.map((bc) => ({
|
|
98
|
+
id: bc.name || bc.id,
|
|
99
|
+
name: bc.content?.name || bc.title,
|
|
100
|
+
description: bc.content?.description || '',
|
|
101
|
+
isDefault: Boolean(bc.tags?.includes('interface:chat-default')),
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=chat.js.map
|
package/dist/chat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,O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,IAAI,EAAE,CAAC,KAAK;YAC9C,WAAW,EAAG,EAAE,CAAC,OAAO,EAAE,WAAsB,IAAI,EAAE;YACtD,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CAAC;SAChE,CAAC,CAAC,CAAC;IACN,CAAC;CACF"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RcrtClient — the single entry-point to the SDK.
|
|
3
|
+
*
|
|
4
|
+
* import { RcrtClient, staticTokenProvider } from '@possibl/rcrt-sdk';
|
|
5
|
+
*
|
|
6
|
+
* const rcrt = new RcrtClient({
|
|
7
|
+
* apiUrl: 'https://rcrt-api-gateway-<hash>.run.app',
|
|
8
|
+
* tokenProvider: firebaseTokenProvider(auth),
|
|
9
|
+
* });
|
|
10
|
+
*
|
|
11
|
+
* rcrt.setTenantId(workspaceId);
|
|
12
|
+
* const me = await rcrt.auth.me();
|
|
13
|
+
* const stream = rcrt.chat.sessionStream(sessionId, { ...handlers });
|
|
14
|
+
*
|
|
15
|
+
* Every module on the client shares the same fetch context — one
|
|
16
|
+
* bearer refresh path, one tenant header, one error envelope.
|
|
17
|
+
*
|
|
18
|
+
* For fleet fan-out across workspaces, prefer `forTenant()` over
|
|
19
|
+
* mutating one client with `setTenantId()`:
|
|
20
|
+
*
|
|
21
|
+
* await Promise.all(workspaces.map((ws) =>
|
|
22
|
+
* rcrt.forTenant(ws.id).breadcrumbs.queryByTags(['interpret:alert']),
|
|
23
|
+
* ));
|
|
24
|
+
*/
|
|
25
|
+
import type { TokenProvider } from './auth.js';
|
|
26
|
+
import type { RequestOptions } from './internal/fetch.js';
|
|
27
|
+
import { BreadcrumbsModule } from './breadcrumbs.js';
|
|
28
|
+
import { ChatModule } from './chat.js';
|
|
29
|
+
import { CardsModule } from './cards.js';
|
|
30
|
+
import { GrantsModule } from './grants.js';
|
|
31
|
+
import { IdentityModule } from './authn.js';
|
|
32
|
+
import { MarketplaceModule } from './marketplace.js';
|
|
33
|
+
import { OrgModule } from './org.js';
|
|
34
|
+
import { FilesModule } from './files.js';
|
|
35
|
+
import { MembersModule } from './members.js';
|
|
36
|
+
export interface RcrtClientConfig {
|
|
37
|
+
apiUrl: string;
|
|
38
|
+
tokenProvider: TokenProvider;
|
|
39
|
+
/** Optional workspace UUID. Can be set later via `setTenantId()`. */
|
|
40
|
+
tenantId?: string;
|
|
41
|
+
/** Optional fetch override (SSR, custom retry, mock). */
|
|
42
|
+
fetchImpl?: typeof fetch;
|
|
43
|
+
}
|
|
44
|
+
export declare class RcrtClient {
|
|
45
|
+
private readonly ctx;
|
|
46
|
+
private readonly config;
|
|
47
|
+
private readonly tenantClients;
|
|
48
|
+
readonly auth: IdentityModule;
|
|
49
|
+
readonly breadcrumbs: BreadcrumbsModule;
|
|
50
|
+
readonly chat: ChatModule;
|
|
51
|
+
readonly cards: CardsModule;
|
|
52
|
+
readonly grants: GrantsModule;
|
|
53
|
+
readonly marketplace: MarketplaceModule;
|
|
54
|
+
readonly org: OrgModule;
|
|
55
|
+
readonly files: FilesModule;
|
|
56
|
+
readonly members: MembersModule;
|
|
57
|
+
constructor(config: RcrtClientConfig);
|
|
58
|
+
/** Switch workspaces. Subsequent requests carry the new `X-Tenant-ID`. */
|
|
59
|
+
setTenantId(tenantId: string | null): void;
|
|
60
|
+
/** Read the workspace id this client is currently scoped to. */
|
|
61
|
+
getTenantId(): string | null;
|
|
62
|
+
/**
|
|
63
|
+
* A client permanently bound to `tenantId` — same apiUrl, token
|
|
64
|
+
* provider and fetch impl, its own tenant header. Instances are
|
|
65
|
+
* cached per tenant and are just thin header wrappers, so parallel
|
|
66
|
+
* fleet fan-out is safe and cheap (no shared-client races, no
|
|
67
|
+
* serialisation through `setTenantId`).
|
|
68
|
+
*/
|
|
69
|
+
forTenant(tenantId: string): RcrtClient;
|
|
70
|
+
/**
|
|
71
|
+
* Typed escape hatch — call any gateway endpoint with the client's
|
|
72
|
+
* auth + tenant + retry handling. Apps are never blocked on an SDK
|
|
73
|
+
* release for a new endpoint:
|
|
74
|
+
*
|
|
75
|
+
* const res = await rcrt.request<{ items: Item[] }>('/v1/some/new/endpoint', {
|
|
76
|
+
* method: 'POST',
|
|
77
|
+
* body: { hello: 'world' }, // plain object — the SDK serialises
|
|
78
|
+
* });
|
|
79
|
+
*
|
|
80
|
+
* `options.body` is JSON-serialised; use `options.rawBody` for
|
|
81
|
+
* FormData / binary payloads; `options.query` appends search params.
|
|
82
|
+
*/
|
|
83
|
+
request<T = unknown>(path: string, options?: RequestOptions): Promise<T>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;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