@hearsay-tools/squawk 0.18.0-pr4170.8048 → 0.18.0-pr4171.8052
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/built-in-wait-kinds.d.ts +3 -0
- package/dist/built-in-wait-kinds.js +10 -0
- package/dist/built-in-wait-kinds.js.map +1 -0
- package/dist/ci-wait/tool-catalog.d.ts +13 -50
- package/dist/ci-wait/tool-catalog.js +14 -31
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +8 -8
- package/dist/delegation/park-notice.js +2 -2
- package/dist/delegation/park-notice.js.map +1 -1
- package/dist/delegation/transport.d.ts +12 -12
- package/dist/server/server.d.ts +1379 -1379
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/subcommands.js +3 -0
- package/dist/subcommands.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +72 -72
- package/dist/workflows/run/compose.d.ts +1 -1
- package/dist/workflows/run/continuation-session.js +2 -2
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/done-accepted.js +4 -4
- package/dist/workflows/run/done-accepted.js.map +1 -1
- package/dist/workflows/run/input-batch.js +2 -2
- package/dist/workflows/run/input-batch.js.map +1 -1
- package/dist/workflows/run/input-delivery.js +2 -2
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +1 -1
- package/dist/workflows/run/step-loop.js +2 -2
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/subagent-waits.js +2 -2
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-settler.js +2 -2
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +3 -1
- package/dist/workflows/run/wait-engine.js +50 -6
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-input-descriptors.d.ts +3 -0
- package/dist/workflows/run/wait-input-descriptors.js +30 -0
- package/dist/workflows/run/wait-input-descriptors.js.map +1 -0
- package/dist/workflows/run/wait-kind-registry.d.ts +73 -0
- package/dist/workflows/run/wait-kind-registry.js +35 -0
- package/dist/workflows/run/wait-kind-registry.js.map +1 -0
- package/dist/workflows/run/wait-kinds.d.ts +1033 -4
- package/dist/workflows/run/wait-kinds.js +45 -9
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration-tool.js +3 -3
- package/dist/workflows/run/wait-registration-tool.js.map +1 -1
- package/dist/workflows/run/wait-registration.js +13 -8
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +5 -1
- package/dist/workflows/run/wait-registry.js +42 -2
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/wake-admission.js +7 -3
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run.d.ts +1 -1
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/waits.d.ts +3 -8
- package/dist/workflows/waits.js +10 -15
- package/dist/workflows/waits.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-runtime.ts +3 -0
- package/scripts/measure-transcript-facts-health.mjs +3 -0
- package/scripts/mock-wire-tools.mjs +3 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { registerCoreWaitKinds, registerBuiltInWaitKind } from './workflows/run/wait-kinds.js';
|
|
2
|
+
/** Shell composition until the forge and delegation modules own these registrations. */
|
|
3
|
+
export function registerBuiltInWaitKinds() {
|
|
4
|
+
// Preserve the historical row order for policy lists.
|
|
5
|
+
for (const kind of ['pr', 'worker', 'peer', 'subagent'])
|
|
6
|
+
registerBuiltInWaitKind(kind);
|
|
7
|
+
registerCoreWaitKinds();
|
|
8
|
+
}
|
|
9
|
+
export { sealWaitKinds as sealBuiltInWaitKinds } from './workflows/run/wait-kind-registry.js';
|
|
10
|
+
//# sourceMappingURL=built-in-wait-kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"built-in-wait-kinds.js","sourceRoot":"","sources":["../src/built-in-wait-kinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE/F,wFAAwF;AACxF,MAAM,UAAU,wBAAwB;IACtC,sDAAsD;IACtD,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU;QAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAChG,qBAAqB,EAAE,CAAC;AAC1B,CAAC;AACD,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,uCAAuC,CAAC"}
|
|
@@ -1,58 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
|
|
4
|
+
* one flat object: every kind's fields side by side, with `kind` as an enum. Each field's bounds
|
|
5
|
+
* come from its kind's own schema; the discriminated union validates on the server.
|
|
6
|
+
*/
|
|
7
|
+
export declare function flatWaitInputSchema(): {
|
|
8
|
+
type: 'object';
|
|
9
|
+
properties: Record<string, unknown>;
|
|
10
|
+
required: string[];
|
|
11
|
+
additionalProperties: boolean;
|
|
12
|
+
};
|
|
2
13
|
export declare const waitToolDefinition: {
|
|
3
14
|
name: string;
|
|
4
15
|
description: string;
|
|
5
|
-
inputSchema: {
|
|
16
|
+
readonly inputSchema: {
|
|
6
17
|
type: 'object';
|
|
7
|
-
properties:
|
|
8
|
-
kind: {
|
|
9
|
-
type: string;
|
|
10
|
-
enum: ("peer" | "pr" | "process" | "request" | "timer" | "worker")[];
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
13
|
-
operation_id: {
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
pr: {
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
until: {
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
wake_on_conflict: {
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
head_sha: {
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
worker_ids: {
|
|
29
|
-
description: string;
|
|
30
|
-
};
|
|
31
|
-
request_ids: {
|
|
32
|
-
description: string;
|
|
33
|
-
};
|
|
34
|
-
peer_ids: {
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
mode: {
|
|
38
|
-
description: string;
|
|
39
|
-
};
|
|
40
|
-
timeout_seconds: {
|
|
41
|
-
description: string;
|
|
42
|
-
};
|
|
43
|
-
seconds: {
|
|
44
|
-
description: string;
|
|
45
|
-
};
|
|
46
|
-
pid: {
|
|
47
|
-
description: string;
|
|
48
|
-
};
|
|
49
|
-
exit_file: {
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
note: {
|
|
53
|
-
description: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
18
|
+
properties: Record<string, unknown>;
|
|
56
19
|
required: string[];
|
|
57
20
|
additionalProperties: boolean;
|
|
58
21
|
};
|
|
@@ -1,45 +1,28 @@
|
|
|
1
1
|
import { agentToolMetadata, enabledAgentTools } from './tool-registry.js';
|
|
2
2
|
import { automationToolRequestSchema } from '../contract/index.js';
|
|
3
|
-
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema
|
|
3
|
+
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema } from '../contract/index.js';
|
|
4
4
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
5
5
|
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
6
6
|
import { scheduleTaskRequestSchema, scheduledTasksRequestSchema } from '../contract/index.js';
|
|
7
|
+
import { registeredWaitKinds } from '../workflows/run/wait-kind-registry.js';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
/**
|
|
9
10
|
* The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
|
|
10
11
|
* one flat object: every kind's fields side by side, with `kind` as an enum. Each field's bounds
|
|
11
12
|
* come from its kind's own schema; the discriminated union validates on the server.
|
|
12
13
|
*/
|
|
13
|
-
function flatWaitInputSchema() {
|
|
14
|
+
export function flatWaitInputSchema() {
|
|
15
|
+
const inputs = registeredWaitKinds().flatMap(row => row.inputs ?? []).sort((a, b) => a.order - b.order);
|
|
14
16
|
const properties = {};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
kind: { type: 'string', enum: builtInSquawkWaitRequestSchema.options.map(option => option.shape.kind.value), description: '"pr" waits for a GitHub pull request: its checks or its merge (see `until`); "worker" waits for workers you own; "request" waits for replies to requests you sent; "peer" waits for named peer tasks to message you or settle; "timer" wakes you after `seconds`; "process" wakes you when a background command ends.' },
|
|
25
|
-
operation_id: field('operation_id', 'Optional retry identity. Reuse it with exactly the same arguments after an unknown outcome; never use it for a different registration.'),
|
|
26
|
-
pr: field('pr', 'kind "pr": the HTTPS GitHub pull request URL.'),
|
|
27
|
-
until: field('until', 'kind "pr": "checks" (default) watches checks; "merge" waits for merge or closure and ignores queue removal. After requesting a merge, use "merge_or_blocked": wakes on merge, closure, conflict, or neither queue membership nor enabled auto-merge remaining. Pending checks or a queue slot alone do not end it. All targets retain their deadline and query-error exits. Only "merged" confirms success; "blocked" requires inspection and grants no permission to retry or merge.'),
|
|
28
|
-
wake_on_conflict: field('wake_on_conflict', 'kind "pr": Default true for "checks" and "merge". Set false when your work depends on another PR merging and you want to ignore its conflicts. "merge_or_blocked" always reports conflicts, regardless of this setting. With "checks", a conflicting PR may have no checks, ending as no_checks or deadline.'),
|
|
29
|
-
head_sha: field('head_sha', 'kind "pr": optional. Right after you push, pass the pushed commit (`git rev-parse HEAD`): the wait watches it while GitHub still shows the previous head, for up to 60 seconds.'),
|
|
30
|
-
worker_ids: field('worker_ids', 'kind "worker": the workers you own to wait for (1–32 unique ids).'),
|
|
31
|
-
request_ids: field('request_ids', 'kind "request": the requests you sent, to a worker, your parent or a peer task, to wait for a reply to (1–32 unique ids).'),
|
|
32
|
-
peer_ids: field('peer_ids', 'kind "peer": the peer root tasks of this project to wait for (1–32 unique task ids; find them with `hsq message tasks`). A message from one of them, or one of them settling, ends the wait; other messages wake you and keep it open.'),
|
|
33
|
-
mode: field('mode', 'kind "worker" or "request": "any" wakes you when one selected id settles (default), "all" when every one has, "one" takes exactly one id.'),
|
|
34
|
-
timeout_seconds: field('timeout_seconds', 'The deadline in seconds. kind "pr": 1–7200, default 1800. kind "worker", "request" or "peer": 1–7200, default 600 (the default shown is the pr one). kind "process": 1–7200, default 1800.'),
|
|
35
|
-
seconds: field('seconds', 'kind "timer": seconds until the wake (60–7200).'),
|
|
36
|
-
pid: field('pid', 'kind "process": the PID of the background command: the `pid` the job start command printed.'),
|
|
37
|
-
exit_file: field('exit_file', 'kind "process": optional. The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or a file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.'),
|
|
38
|
-
note: field('note', 'kind "timer" or "process": what to re-check, handed back to you at the wake.'),
|
|
39
|
-
},
|
|
40
|
-
required: ['kind'],
|
|
41
|
-
additionalProperties: false,
|
|
42
|
-
};
|
|
17
|
+
for (const input of [...inputs].reverse())
|
|
18
|
+
Object.assign(properties, input.properties);
|
|
19
|
+
for (const input of inputs)
|
|
20
|
+
for (const [key, description] of Object.entries(input.descriptions ?? {})) {
|
|
21
|
+
if (key in properties)
|
|
22
|
+
properties[key] = { ...properties[key], description };
|
|
23
|
+
}
|
|
24
|
+
properties.kind = { type: 'string', enum: inputs.map(input => input.kind), description: inputs.map(input => input.description).join('; ') };
|
|
25
|
+
return { type: 'object', properties, required: ['kind'], additionalProperties: false };
|
|
43
26
|
}
|
|
44
27
|
export const waitToolDefinition = {
|
|
45
28
|
name: 'cezar_wait',
|
|
@@ -59,7 +42,7 @@ export const waitToolDefinition = {
|
|
|
59
42
|
'The wake then reports `exited` without a code: read the command\'s own log or status file after it. ' +
|
|
60
43
|
'Never start a watcher or helper process to copy a file into $TMPDIR. ' +
|
|
61
44
|
'An unchanged repeat names the retained wait. A changed timeout is refused and keeps that wait active; do not cancel it as a duplicate. On an unknown outcome retry the same operation_id and arguments, without a fallback timer.',
|
|
62
|
-
inputSchema
|
|
45
|
+
get inputSchema() { return flatWaitInputSchema(); },
|
|
63
46
|
};
|
|
64
47
|
/**
|
|
65
48
|
* hearsay-tools/cezarion#1234: the user's answer gets its own tool, so its card is required and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACzI,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACtH,OAAO,EAAE,mBAAmB,EAAE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C,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -601,6 +601,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
601
601
|
}[];
|
|
602
602
|
isError: boolean;
|
|
603
603
|
details: {
|
|
604
|
+
ok: false;
|
|
605
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
606
|
+
message: string;
|
|
607
|
+
} | {
|
|
604
608
|
ok: true;
|
|
605
609
|
task: {
|
|
606
610
|
id: string;
|
|
@@ -612,10 +616,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
612
616
|
url?: string | undefined;
|
|
613
617
|
};
|
|
614
618
|
note: string;
|
|
615
|
-
} | {
|
|
616
|
-
ok: false;
|
|
617
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
618
|
-
message: string;
|
|
619
619
|
};
|
|
620
620
|
}>;
|
|
621
621
|
export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof callScheduleTask>>): {
|
|
@@ -625,6 +625,10 @@ export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof
|
|
|
625
625
|
}[];
|
|
626
626
|
isError: boolean;
|
|
627
627
|
details: {
|
|
628
|
+
ok: false;
|
|
629
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
630
|
+
message: string;
|
|
631
|
+
} | {
|
|
628
632
|
ok: true;
|
|
629
633
|
task: {
|
|
630
634
|
id: string;
|
|
@@ -636,10 +640,6 @@ export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof
|
|
|
636
640
|
url?: string | undefined;
|
|
637
641
|
};
|
|
638
642
|
note: string;
|
|
639
|
-
} | {
|
|
640
|
-
ok: false;
|
|
641
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
642
|
-
message: string;
|
|
643
643
|
};
|
|
644
644
|
};
|
|
645
645
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commandText } from '../home/command.js';
|
|
2
|
-
import { WAIT_KINDS } from '../workflows/run/wait-kinds.js';
|
|
2
|
+
import { WAIT_KINDS, waitPolicyForWait } from '../workflows/run/wait-kinds.js';
|
|
3
3
|
import { createHash } from 'node:crypto';
|
|
4
4
|
import { isUsageLimitHold } from '../contract/index.js';
|
|
5
5
|
import { describeWait, isSquawkHumanWait } from '../workflows/waits.js';
|
|
@@ -60,7 +60,7 @@ export function parkNoticeExcerpt(text) {
|
|
|
60
60
|
/** What the parent reads: who parked, what it waits on, what it last said, and what to do next. */
|
|
61
61
|
export function formatParkNoticeText(input) {
|
|
62
62
|
// A worker parked on a question gets no notice; its question reaches the parent instead.
|
|
63
|
-
const open = input.waits.filter(wait => wait.phase === 'open' && !
|
|
63
|
+
const open = input.waits.filter(wait => wait.phase === 'open' && !waitPolicyForWait(wait).userAnswers && !isSquawkHumanWait(wait));
|
|
64
64
|
const excerpt = input.lastText === undefined ? undefined : parkNoticeExcerpt(input.lastText);
|
|
65
65
|
return [
|
|
66
66
|
`Squawk notice: your worker ${input.workerRunId} parked before finishing. Your wait ${input.waitId} stays open; this message closes no wait.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"park-notice.js","sourceRoot":"","sources":["../../src/delegation/park-notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"park-notice.js","sourceRoot":"","sources":["../../src/delegation/park-notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EA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AAE,OAAO;IACjE,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,uGAAuG,EAAE,CAAC,CAAC;AAC1M,CAAC"}
|
|
@@ -66,18 +66,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
66
66
|
"/discover": {
|
|
67
67
|
$post: {
|
|
68
68
|
output: {
|
|
69
|
-
tasks: {
|
|
70
|
-
id: string;
|
|
71
|
-
title: string;
|
|
72
|
-
runner?: string | undefined;
|
|
73
|
-
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
74
|
-
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
75
|
-
attentionLabel: string;
|
|
76
|
-
accepts: boolean;
|
|
77
|
-
reason?: string | undefined;
|
|
78
|
-
}[];
|
|
79
|
-
nextOffset?: number | undefined;
|
|
80
|
-
} | {
|
|
81
69
|
scope: "host-default-account";
|
|
82
70
|
runners: {
|
|
83
71
|
requiresAccountHome?: boolean | undefined;
|
|
@@ -98,6 +86,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
98
86
|
source: "cache" | "live" | "unavailable";
|
|
99
87
|
stale: boolean;
|
|
100
88
|
reason?: string | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
tasks: {
|
|
91
|
+
id: string;
|
|
92
|
+
title: string;
|
|
93
|
+
runner?: string | undefined;
|
|
94
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
95
|
+
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
96
|
+
attentionLabel: string;
|
|
97
|
+
accepts: boolean;
|
|
98
|
+
reason?: string | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
nextOffset?: number | undefined;
|
|
101
101
|
};
|
|
102
102
|
outputFormat: "json";
|
|
103
103
|
status: 200;
|