@arbidocs/sdk 0.4.167 → 0.4.168
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 +19 -14
- package/dist/{browser-DDZsy7dn.d.cts → browser-3s6asEn1.d.cts} +2051 -211
- package/dist/{browser-DDZsy7dn.d.ts → browser-jyiyv5Wh.d.ts} +2051 -211
- package/dist/browser.cjs +2169 -339
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +3 -2
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +2127 -341
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +2172 -342
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +2130 -344
- package/dist/index.js.map +1 -1
- package/dist/sse-types-BbR7JG5o.d.cts +69 -0
- package/dist/sse-types-BbR7JG5o.d.ts +69 -0
- package/dist/testing.cjs +816 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +293 -0
- package/dist/testing.d.ts +293 -0
- package/dist/testing.js +792 -0
- package/dist/testing.js.map +1 -0
- package/package.json +10 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { components } from '@arbidocs/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SSE event types — re-exported from the auto-generated OpenAPI schema.
|
|
5
|
+
*
|
|
6
|
+
* Consumers should import these from '@arbidocs/sdk' (or '/browser')
|
|
7
|
+
* rather than reaching into '@arbidocs/client' directly.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
type ResponseCreatedEvent = components['schemas']['ResponseCreatedEvent'];
|
|
11
|
+
type ResponseCompletedEvent = components['schemas']['ResponseCompletedEvent'];
|
|
12
|
+
type ResponseFailedEvent = components['schemas']['ResponseFailedEvent'];
|
|
13
|
+
type ResponseOutputTextDeltaEvent = components['schemas']['ResponseOutputTextDeltaEvent'];
|
|
14
|
+
type ResponseOutputTextDoneEvent = components['schemas']['ResponseOutputTextDoneEvent'];
|
|
15
|
+
type ResponseOutputItemAddedEvent = components['schemas']['ResponseOutputItemAddedEvent'];
|
|
16
|
+
type ResponseOutputItemDoneEvent = components['schemas']['ResponseOutputItemDoneEvent'];
|
|
17
|
+
type ResponseContentPartAddedEvent = components['schemas']['ResponseContentPartAddedEvent'];
|
|
18
|
+
/**
|
|
19
|
+
* One step of an agent turn, as the chat model holds it: the wire's `AgentStepEvent` plus what the
|
|
20
|
+
* output-item reducer (`chat/output-item-reducer`) records when it folds a v3 item into a step.
|
|
21
|
+
*/
|
|
22
|
+
type AgentStepEvent = components['schemas']['AgentStepEvent'] & {
|
|
23
|
+
model_recommendation?: string | null;
|
|
24
|
+
selected_model?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque v3 output-item id (#2075). The reducer keys steps by this; `index` is a derived display
|
|
27
|
+
* order. Absent only on legacy rows persisted before the cutover, which are keyed by `index`.
|
|
28
|
+
*/
|
|
29
|
+
_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* This step is the model's own PROSE (a `message` output item that is not the answer), not a
|
|
32
|
+
* tool call or a lifecycle marker. The main chat window shows it while the work happens and then
|
|
33
|
+
* drops it; the trace is where it lives afterwards, so it must render its text rather than a
|
|
34
|
+
* tool headline.
|
|
35
|
+
*/
|
|
36
|
+
narration?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* This step was folded from a `reasoning` output item (goal, plan, goal check, …). Its text is
|
|
39
|
+
* the model's reasoning: the trace shows it, the live status line shows only the label.
|
|
40
|
+
*/
|
|
41
|
+
reasoning?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The backend's duplicate guard refused this call: the tool never ran (a repeat of a call already
|
|
44
|
+
* made), so the trace drops the row. Per call (`arbi.guard_refused`, arbicity/ARBI#3183), unlike
|
|
45
|
+
* the round's `outcome: 'duplicate'`, which lands only on a round's last call. A tool that ran and
|
|
46
|
+
* failed never carries it.
|
|
47
|
+
*/
|
|
48
|
+
guard_refused?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type AgentStepDeltaEvent = components['schemas']['AgentStepDeltaEvent'];
|
|
51
|
+
type UserInputRequestEvent = components['schemas']['UserInputRequestEvent'];
|
|
52
|
+
type ProbeAnswerEvent = components['schemas']['ProbeAnswerEvent'];
|
|
53
|
+
type DeferredInterjectionEvent = components['schemas']['DeferredInterjectionEvent'];
|
|
54
|
+
type AgentControlStateEvent = components['schemas']['AgentControlStateEvent'];
|
|
55
|
+
type ArtifactEvent = components['schemas']['ArtifactEvent'];
|
|
56
|
+
type MailDraftSSEEvent = components['schemas']['MailDraftSSEEvent'];
|
|
57
|
+
type UserMessageEvent = components['schemas']['UserMessageEvent'];
|
|
58
|
+
type MessageQueuedEvent = components['schemas']['MessageQueuedEvent'];
|
|
59
|
+
type MessageMetadataPayload = components['schemas']['MessageMetadataPayload'];
|
|
60
|
+
type ArbiErrorEvent = components['schemas']['ArbiErrorEvent'];
|
|
61
|
+
type ResponseUsage = components['schemas']['ResponseUsage'];
|
|
62
|
+
type OutputTokensDetails = components['schemas']['OutputTokensDetails'];
|
|
63
|
+
type TokenBudgetContext = components['schemas']['TokenBudgetContext'];
|
|
64
|
+
/** Convenience type — what onStreamStart callbacks receive. */
|
|
65
|
+
type SSEStreamStartData = {
|
|
66
|
+
assistant_message_ext_id: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type { AgentControlStateEvent as A, DeferredInterjectionEvent as D, MailDraftSSEEvent as M, OutputTokensDetails as O, ProbeAnswerEvent as P, ResponseCompletedEvent as R, SSEStreamStartData as S, TokenBudgetContext as T, UserInputRequestEvent as U, AgentStepDeltaEvent as a, AgentStepEvent as b, ArbiErrorEvent as c, ArtifactEvent as d, MessageMetadataPayload as e, MessageQueuedEvent as f, ResponseContentPartAddedEvent as g, ResponseCreatedEvent as h, ResponseFailedEvent as i, ResponseOutputItemAddedEvent as j, ResponseOutputItemDoneEvent as k, ResponseOutputTextDeltaEvent as l, ResponseOutputTextDoneEvent as m, ResponseUsage as n, UserMessageEvent as o };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { components } from '@arbidocs/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SSE event types — re-exported from the auto-generated OpenAPI schema.
|
|
5
|
+
*
|
|
6
|
+
* Consumers should import these from '@arbidocs/sdk' (or '/browser')
|
|
7
|
+
* rather than reaching into '@arbidocs/client' directly.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
type ResponseCreatedEvent = components['schemas']['ResponseCreatedEvent'];
|
|
11
|
+
type ResponseCompletedEvent = components['schemas']['ResponseCompletedEvent'];
|
|
12
|
+
type ResponseFailedEvent = components['schemas']['ResponseFailedEvent'];
|
|
13
|
+
type ResponseOutputTextDeltaEvent = components['schemas']['ResponseOutputTextDeltaEvent'];
|
|
14
|
+
type ResponseOutputTextDoneEvent = components['schemas']['ResponseOutputTextDoneEvent'];
|
|
15
|
+
type ResponseOutputItemAddedEvent = components['schemas']['ResponseOutputItemAddedEvent'];
|
|
16
|
+
type ResponseOutputItemDoneEvent = components['schemas']['ResponseOutputItemDoneEvent'];
|
|
17
|
+
type ResponseContentPartAddedEvent = components['schemas']['ResponseContentPartAddedEvent'];
|
|
18
|
+
/**
|
|
19
|
+
* One step of an agent turn, as the chat model holds it: the wire's `AgentStepEvent` plus what the
|
|
20
|
+
* output-item reducer (`chat/output-item-reducer`) records when it folds a v3 item into a step.
|
|
21
|
+
*/
|
|
22
|
+
type AgentStepEvent = components['schemas']['AgentStepEvent'] & {
|
|
23
|
+
model_recommendation?: string | null;
|
|
24
|
+
selected_model?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque v3 output-item id (#2075). The reducer keys steps by this; `index` is a derived display
|
|
27
|
+
* order. Absent only on legacy rows persisted before the cutover, which are keyed by `index`.
|
|
28
|
+
*/
|
|
29
|
+
_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* This step is the model's own PROSE (a `message` output item that is not the answer), not a
|
|
32
|
+
* tool call or a lifecycle marker. The main chat window shows it while the work happens and then
|
|
33
|
+
* drops it; the trace is where it lives afterwards, so it must render its text rather than a
|
|
34
|
+
* tool headline.
|
|
35
|
+
*/
|
|
36
|
+
narration?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* This step was folded from a `reasoning` output item (goal, plan, goal check, …). Its text is
|
|
39
|
+
* the model's reasoning: the trace shows it, the live status line shows only the label.
|
|
40
|
+
*/
|
|
41
|
+
reasoning?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The backend's duplicate guard refused this call: the tool never ran (a repeat of a call already
|
|
44
|
+
* made), so the trace drops the row. Per call (`arbi.guard_refused`, arbicity/ARBI#3183), unlike
|
|
45
|
+
* the round's `outcome: 'duplicate'`, which lands only on a round's last call. A tool that ran and
|
|
46
|
+
* failed never carries it.
|
|
47
|
+
*/
|
|
48
|
+
guard_refused?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type AgentStepDeltaEvent = components['schemas']['AgentStepDeltaEvent'];
|
|
51
|
+
type UserInputRequestEvent = components['schemas']['UserInputRequestEvent'];
|
|
52
|
+
type ProbeAnswerEvent = components['schemas']['ProbeAnswerEvent'];
|
|
53
|
+
type DeferredInterjectionEvent = components['schemas']['DeferredInterjectionEvent'];
|
|
54
|
+
type AgentControlStateEvent = components['schemas']['AgentControlStateEvent'];
|
|
55
|
+
type ArtifactEvent = components['schemas']['ArtifactEvent'];
|
|
56
|
+
type MailDraftSSEEvent = components['schemas']['MailDraftSSEEvent'];
|
|
57
|
+
type UserMessageEvent = components['schemas']['UserMessageEvent'];
|
|
58
|
+
type MessageQueuedEvent = components['schemas']['MessageQueuedEvent'];
|
|
59
|
+
type MessageMetadataPayload = components['schemas']['MessageMetadataPayload'];
|
|
60
|
+
type ArbiErrorEvent = components['schemas']['ArbiErrorEvent'];
|
|
61
|
+
type ResponseUsage = components['schemas']['ResponseUsage'];
|
|
62
|
+
type OutputTokensDetails = components['schemas']['OutputTokensDetails'];
|
|
63
|
+
type TokenBudgetContext = components['schemas']['TokenBudgetContext'];
|
|
64
|
+
/** Convenience type — what onStreamStart callbacks receive. */
|
|
65
|
+
type SSEStreamStartData = {
|
|
66
|
+
assistant_message_ext_id: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type { AgentControlStateEvent as A, DeferredInterjectionEvent as D, MailDraftSSEEvent as M, OutputTokensDetails as O, ProbeAnswerEvent as P, ResponseCompletedEvent as R, SSEStreamStartData as S, TokenBudgetContext as T, UserInputRequestEvent as U, AgentStepDeltaEvent as a, AgentStepEvent as b, ArbiErrorEvent as c, ArtifactEvent as d, MessageMetadataPayload as e, MessageQueuedEvent as f, ResponseContentPartAddedEvent as g, ResponseCreatedEvent as h, ResponseFailedEvent as i, ResponseOutputItemAddedEvent as j, ResponseOutputItemDoneEvent as k, ResponseOutputTextDeltaEvent as l, ResponseOutputTextDoneEvent as m, ResponseUsage as n, UserMessageEvent as o };
|