@capybara-hq/kernel 0.1.0-rc.69 → 0.1.0-rc.70
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/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/conversations/conversations.controller.d.ts +1 -1
- package/dist/conversations/conversations.controller.js +2 -2
- package/dist/conversations/conversations.schemas.d.ts +4 -0
- package/dist/conversations/conversations.schemas.js +5 -0
- package/dist/platform/ops/conversations.ops.js +2 -2
- package/package.json +2 -2
|
@@ -203,7 +203,7 @@ export declare function headsToResolve(entries: readonly MarketplaceEntry[], imp
|
|
|
203
203
|
/** The host versions (an entry's `minKernel` is judged against them). */
|
|
204
204
|
export declare const HOST_VERSIONS: {
|
|
205
205
|
readonly kernel: string;
|
|
206
|
-
readonly sdk: "0.1.0-rc.
|
|
206
|
+
readonly sdk: "0.1.0-rc.55";
|
|
207
207
|
};
|
|
208
208
|
/** Whether this deployment satisfies the entry's `minKernel`. */
|
|
209
209
|
export declare const entryCompatible: (e: Pick<MarketplaceEntry, "minKernel">) => boolean;
|
|
@@ -163,7 +163,7 @@ export declare class ConversationsController {
|
|
|
163
163
|
/**
|
|
164
164
|
* My conversations, most recently updated first, each with its agent: `next` is the next page's
|
|
165
165
|
* cursor (passed back as `after`), null when there are no more; `total` counts every match of
|
|
166
|
-
* the filters and comes on the first page (no `after`)
|
|
166
|
+
* the filters and comes only when asked (`withTotal=true`) on the first page (no `after`).
|
|
167
167
|
*/
|
|
168
168
|
list(principal: Principal, org: OrgContext, q: z.infer<typeof ListQuery>): Promise<{
|
|
169
169
|
conversations: ConversationListRow[];
|
|
@@ -249,13 +249,13 @@ let ConversationsController = class ConversationsController {
|
|
|
249
249
|
/**
|
|
250
250
|
* My conversations, most recently updated first, each with its agent: `next` is the next page's
|
|
251
251
|
* cursor (passed back as `after`), null when there are no more; `total` counts every match of
|
|
252
|
-
* the filters and comes on the first page (no `after`)
|
|
252
|
+
* the filters and comes only when asked (`withTotal=true`) on the first page (no `after`).
|
|
253
253
|
*/
|
|
254
254
|
async list(principal, org, q) {
|
|
255
255
|
const p = requireUser(principal);
|
|
256
256
|
const { conversations: rows, total } = await this.conversations.listMine(org.orgId, p.account.id, {
|
|
257
257
|
limit: q.limit + 1,
|
|
258
|
-
total: q.after === undefined,
|
|
258
|
+
total: q.withTotal === "true" && q.after === undefined,
|
|
259
259
|
...(q.after !== undefined && { after: q.after }),
|
|
260
260
|
...(q.agentId !== undefined && { agentId: q.agentId }),
|
|
261
261
|
...(q.q !== undefined && { q: q.q }),
|
|
@@ -31,6 +31,10 @@ export declare const ListQuery: z.ZodObject<{
|
|
|
31
31
|
after: z.ZodOptional<z.ZodString>;
|
|
32
32
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
33
33
|
agentId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
withTotal: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
false: "false";
|
|
36
|
+
true: "true";
|
|
37
|
+
}>>;
|
|
34
38
|
}, z.core.$strip>;
|
|
35
39
|
export declare const EventsQuery: z.ZodObject<{
|
|
36
40
|
after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -19,6 +19,11 @@ export const ListQuery = z.object({
|
|
|
19
19
|
limit: z.coerce.number().int().min(1).max(200).default(50),
|
|
20
20
|
/** Only this agent's conversations (the sidebar's per-group "More"). */
|
|
21
21
|
agentId: z.string().min(1).max(100).optional(),
|
|
22
|
+
/**
|
|
23
|
+
* `true`: the first page (no `after`) also returns `total`, the count of every match. Absent or
|
|
24
|
+
* `false`: no count is selected (the count costs O(matches); a polled list never asks for it).
|
|
25
|
+
*/
|
|
26
|
+
withTotal: z.enum(["true", "false"]).optional(),
|
|
22
27
|
...searchFields,
|
|
23
28
|
});
|
|
24
29
|
export const EventsQuery = z
|
|
@@ -86,8 +86,8 @@ let ConversationsOperations = class ConversationsOperations {
|
|
|
86
86
|
example: { q: "report" },
|
|
87
87
|
authz: { orgAction: "agents.use" },
|
|
88
88
|
mirrors: ["GET /api/v1/orgs/:orgId/conversations"],
|
|
89
|
-
// the page size is fixed at 50
|
|
90
|
-
omits: ["limit"],
|
|
89
|
+
// the page size is fixed at 50; the first page always carries its total
|
|
90
|
+
omits: ["limit", "withTotal"],
|
|
91
91
|
confirm: "read",
|
|
92
92
|
run: async (input, ctx) => {
|
|
93
93
|
const { conversations: rows, total } = await this.conversations.listMine(ctx.orgId, ctx.actorAccountId, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capybara-hq/kernel",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.70",
|
|
4
4
|
"description": "Capybara kernel: config, database, plugin host and HTTP API of the Capybara agent platform",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"yaml": "^2.9.1",
|
|
67
67
|
"yauzl": "3.4.0",
|
|
68
68
|
"zod": "^4.6.7",
|
|
69
|
-
"@capybara-hq/plugin-sdk": "^0.1.0-rc.
|
|
69
|
+
"@capybara-hq/plugin-sdk": "^0.1.0-rc.55"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@langchain/langgraph-checkpoint-validation": "^1.2.0",
|