@nemphi/sdk 0.3.5345 → 0.4.5348
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/index.d.ts +73 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6705,6 +6705,48 @@ export interface OverviewChatResponse {
|
|
|
6705
6705
|
/** True when this turn created, appended, edited, or deleted a dashboard. */
|
|
6706
6706
|
dashboard_changed: boolean;
|
|
6707
6707
|
}
|
|
6708
|
+
/** How a `askSession` stood when its wait ended. */
|
|
6709
|
+
export type SessionAskState = "answered" | "awaiting_approval" | "awaiting_input" | "working" | "failed";
|
|
6710
|
+
/**
|
|
6711
|
+
* What `askSession` answers: the question as a message in a session thread,
|
|
6712
|
+
* and how that session's run stood when the wait ended.
|
|
6713
|
+
*/
|
|
6714
|
+
export interface SessionAsk {
|
|
6715
|
+
thread_id: string;
|
|
6716
|
+
/** The session the ask opened; absent when it went to a thread already open. */
|
|
6717
|
+
session_id?: string;
|
|
6718
|
+
/** The message sent; "" for a wait that sent none. */
|
|
6719
|
+
message_id: string;
|
|
6720
|
+
/** The session run the message reached; "" when none did yet. */
|
|
6721
|
+
run_id: string;
|
|
6722
|
+
state: SessionAskState;
|
|
6723
|
+
/** The answer's prose, markdown, when `state` is `answered`. */
|
|
6724
|
+
reply: string;
|
|
6725
|
+
/** The answer's json-render spec, when it drew one. */
|
|
6726
|
+
ui?: UISpec;
|
|
6727
|
+
/** The answer's Block Kit blocks, when it laid some out. */
|
|
6728
|
+
blocks?: MessageBlock[];
|
|
6729
|
+
/**
|
|
6730
|
+
* The action that waits for a person: decide it with `approveRun` /
|
|
6731
|
+
* `denyRun` on `run_id`, the run that holds it (the session's own, or a
|
|
6732
|
+
* specialist's it called).
|
|
6733
|
+
*/
|
|
6734
|
+
approval?: {
|
|
6735
|
+
id: string;
|
|
6736
|
+
run_id: string;
|
|
6737
|
+
tool: string;
|
|
6738
|
+
input: Json;
|
|
6739
|
+
};
|
|
6740
|
+
/** The questions the run asked: answer with `answerRun`, or by writing in the thread. */
|
|
6741
|
+
questions?: RunQuestion[];
|
|
6742
|
+
/** What the run waits on was pending before this message: the message waits behind it. */
|
|
6743
|
+
queued: boolean;
|
|
6744
|
+
/** Why the run failed: `ai_allowance_used` when the plan refused the model. */
|
|
6745
|
+
error?: {
|
|
6746
|
+
code: string;
|
|
6747
|
+
message: string;
|
|
6748
|
+
};
|
|
6749
|
+
}
|
|
6708
6750
|
/** How far a tool call got during a streaming chat turn. */
|
|
6709
6751
|
export type OverviewChatToolPhase = "start" | "ok" | "error" | "approval" | "questions";
|
|
6710
6752
|
/**
|
|
@@ -9494,6 +9536,28 @@ export interface NemphiClient {
|
|
|
9494
9536
|
kind?: FeatureKind;
|
|
9495
9537
|
only_unused?: boolean;
|
|
9496
9538
|
}): Promise<FeatureUsageResponse>;
|
|
9539
|
+
/**
|
|
9540
|
+
* Asks the orchestrator one question as a message in a session thread
|
|
9541
|
+
* (a new session, or `thread_id` to carry one on) and waits for that
|
|
9542
|
+
* session's run: its whole answer, the approval or questions it parked
|
|
9543
|
+
* on, or `working` once `wait_ms` (at most 55 000; 25 000 by default)
|
|
9544
|
+
* runs out, when the reply lands in the thread. With `thread_id` and no
|
|
9545
|
+
* `text` it sends nothing and waits on the thread as it stands: the
|
|
9546
|
+
* answer once an approval is decided. Follow the thread live with
|
|
9547
|
+
* `streamThread`.
|
|
9548
|
+
*/
|
|
9549
|
+
askSession(input: {
|
|
9550
|
+
text?: string;
|
|
9551
|
+
thread_id?: string;
|
|
9552
|
+
context?: string;
|
|
9553
|
+
document_ids?: string[];
|
|
9554
|
+
wait_ms?: number;
|
|
9555
|
+
}): Promise<SessionAsk>;
|
|
9556
|
+
/**
|
|
9557
|
+
* @deprecated Use `askSession`: the overview chat now asks the member's
|
|
9558
|
+
* DM with the orchestrator through the same session path, and the route
|
|
9559
|
+
* goes once installed app builds age out.
|
|
9560
|
+
*/
|
|
9497
9561
|
overviewChat(input: {
|
|
9498
9562
|
messages: ChatMessage[];
|
|
9499
9563
|
}): Promise<OverviewChatResponse>;
|
|
@@ -9501,6 +9565,9 @@ export interface NemphiClient {
|
|
|
9501
9565
|
* The same round-trip as `overviewChat`, reported as it happens. Render
|
|
9502
9566
|
* the deltas for immediate feedback and take the final answer from the
|
|
9503
9567
|
* `done` event — it is what `overviewChat` would have returned.
|
|
9568
|
+
*
|
|
9569
|
+
* @deprecated Use `askSession`, and `streamThread` to follow the answer
|
|
9570
|
+
* as it forms.
|
|
9504
9571
|
*/
|
|
9505
9572
|
overviewChatStream(input: {
|
|
9506
9573
|
messages: ChatMessage[];
|
|
@@ -9530,7 +9597,12 @@ export interface NemphiClient {
|
|
|
9530
9597
|
mirrorOverviewThread(turns: ConversationTurn[]): Promise<{
|
|
9531
9598
|
thread_id: string;
|
|
9532
9599
|
}>;
|
|
9533
|
-
/**
|
|
9600
|
+
/**
|
|
9601
|
+
* Decides an in-chat authorization request; approving executes the parked call.
|
|
9602
|
+
*
|
|
9603
|
+
* @deprecated Approvals are the run's now: decide `SessionAsk.approval`
|
|
9604
|
+
* with `approveRun` / `denyRun` on its `run_id`.
|
|
9605
|
+
*/
|
|
9534
9606
|
decideChatApproval(id: string, approve: boolean): Promise<ChatApprovalDecision>;
|
|
9535
9607
|
listDashboards(): Promise<DashboardSummary[]>;
|
|
9536
9608
|
/**
|