@astralform/js 8.4.0 → 9.0.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/dist/index.cjs +25 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -17
- package/dist/index.d.ts +43 -17
- package/dist/index.js +25 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -113,13 +113,6 @@ interface ToolApprovalGrantedPayload {
|
|
|
113
113
|
toolName: string;
|
|
114
114
|
callId: string;
|
|
115
115
|
}
|
|
116
|
-
interface ToolPermissionDeniedPayload {
|
|
117
|
-
toolName: string;
|
|
118
|
-
callId: string;
|
|
119
|
-
reason?: string | null;
|
|
120
|
-
/** Known values: "hook" | "rule" | "user" | "timeout" | "circuit_breaker". */
|
|
121
|
-
deniedBy?: string | null;
|
|
122
|
-
}
|
|
123
116
|
interface ToolHarnessWarningPayload {
|
|
124
117
|
toolName: string;
|
|
125
118
|
callId: string;
|
|
@@ -254,7 +247,6 @@ declare const ChatEventType: {
|
|
|
254
247
|
readonly AssetCreated: "asset_created";
|
|
255
248
|
readonly ToolApprovalRequested: "tool_approval_requested";
|
|
256
249
|
readonly ToolApprovalGranted: "tool_approval_granted";
|
|
257
|
-
readonly ToolPermissionDenied: "tool_permission_denied";
|
|
258
250
|
readonly ToolHarnessWarning: "tool_harness_warning";
|
|
259
251
|
readonly ToolProgress: "tool_progress";
|
|
260
252
|
readonly NestedLlmUsage: "nested_llm_usage";
|
|
@@ -577,13 +569,6 @@ type ChatEvent = {
|
|
|
577
569
|
type: "tool_approval_granted";
|
|
578
570
|
toolName: string;
|
|
579
571
|
callId: string;
|
|
580
|
-
} | {
|
|
581
|
-
type: "tool_permission_denied";
|
|
582
|
-
toolName: string;
|
|
583
|
-
callId: string;
|
|
584
|
-
reason?: string | null;
|
|
585
|
-
/** Known values: "hook" | "rule" | "user" | "timeout" | "circuit_breaker". */
|
|
586
|
-
deniedBy?: string | null;
|
|
587
572
|
} | {
|
|
588
573
|
type: "tool_harness_warning";
|
|
589
574
|
toolName: string;
|
|
@@ -660,15 +645,56 @@ interface Conversation {
|
|
|
660
645
|
*/
|
|
661
646
|
repository?: string | null;
|
|
662
647
|
}
|
|
648
|
+
/** One citation on a `web_search`-style tool row, as the clients parse it. */
|
|
649
|
+
interface ToolSource {
|
|
650
|
+
title: string;
|
|
651
|
+
url: string;
|
|
652
|
+
snippet?: string;
|
|
653
|
+
}
|
|
663
654
|
interface Message {
|
|
664
655
|
id: string;
|
|
665
656
|
conversationId: string;
|
|
666
|
-
|
|
657
|
+
/**
|
|
658
|
+
* `"tool"` is the role every tool-result row carries.
|
|
659
|
+
*
|
|
660
|
+
* `"system"` was here and could not occur: `MessageResponse.role` is
|
|
661
|
+
* `Literal["user", "assistant", "tool"]` and the server skips system rows
|
|
662
|
+
* before responding. Narrowing the union is source-breaking for anyone
|
|
663
|
+
* matching on it, which is why it waited for this major rather than
|
|
664
|
+
* dribbling one out of an otherwise additive change.
|
|
665
|
+
*/
|
|
666
|
+
role: "user" | "assistant" | "tool";
|
|
667
667
|
content: string;
|
|
668
668
|
parentId?: string;
|
|
669
669
|
status: "sending" | "streaming" | "complete" | "error";
|
|
670
670
|
createdAt: string;
|
|
671
671
|
toolCalls?: ToolCallRequest[];
|
|
672
|
+
/**
|
|
673
|
+
* Result typing for a `role="tool"` row, joined server-side from the tool
|
|
674
|
+
* call's `block_stop.final`. These exist so history rendered from REST —
|
|
675
|
+
* older turns paged in on scroll, or the fallback when replay yields
|
|
676
|
+
* nothing — renders a settled tool row the way its replayed twin does,
|
|
677
|
+
* instead of as raw output under a generic label.
|
|
678
|
+
*
|
|
679
|
+
* All are `undefined` when no block stop matched, which degrades to the
|
|
680
|
+
* row's plain content.
|
|
681
|
+
*/
|
|
682
|
+
sources?: ToolSource[];
|
|
683
|
+
durationMs?: number;
|
|
684
|
+
isError?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Human-readable prose — a fixed phrase, or a policy rule's own free-text
|
|
687
|
+
* reason. PRESENCE, not value, is the denial signal: a denied tool reports
|
|
688
|
+
* `isError: false` and nothing else on the row distinguishes it.
|
|
689
|
+
*/
|
|
690
|
+
deniedBy?: string;
|
|
691
|
+
/**
|
|
692
|
+
* The same denial's machine-readable half: `"policy_rule"` | `"headless"` |
|
|
693
|
+
* `"user"` | `"hook"`. Absent both when the row is not a denial and when the
|
|
694
|
+
* denial predates the field, so branch on it only after `deniedBy` has
|
|
695
|
+
* established there WAS one.
|
|
696
|
+
*/
|
|
697
|
+
denialKind?: string;
|
|
672
698
|
}
|
|
673
699
|
interface UIComponentsConfig {
|
|
674
700
|
enabled: boolean;
|
|
@@ -2547,4 +2573,4 @@ declare function isEmbeddedResource(value: unknown): value is {
|
|
|
2547
2573
|
*/
|
|
2548
2574
|
declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
|
|
2549
2575
|
|
|
2550
|
-
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolOutputMode, type ToolOutputStub, type
|
|
2576
|
+
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
package/dist/index.d.ts
CHANGED
|
@@ -113,13 +113,6 @@ interface ToolApprovalGrantedPayload {
|
|
|
113
113
|
toolName: string;
|
|
114
114
|
callId: string;
|
|
115
115
|
}
|
|
116
|
-
interface ToolPermissionDeniedPayload {
|
|
117
|
-
toolName: string;
|
|
118
|
-
callId: string;
|
|
119
|
-
reason?: string | null;
|
|
120
|
-
/** Known values: "hook" | "rule" | "user" | "timeout" | "circuit_breaker". */
|
|
121
|
-
deniedBy?: string | null;
|
|
122
|
-
}
|
|
123
116
|
interface ToolHarnessWarningPayload {
|
|
124
117
|
toolName: string;
|
|
125
118
|
callId: string;
|
|
@@ -254,7 +247,6 @@ declare const ChatEventType: {
|
|
|
254
247
|
readonly AssetCreated: "asset_created";
|
|
255
248
|
readonly ToolApprovalRequested: "tool_approval_requested";
|
|
256
249
|
readonly ToolApprovalGranted: "tool_approval_granted";
|
|
257
|
-
readonly ToolPermissionDenied: "tool_permission_denied";
|
|
258
250
|
readonly ToolHarnessWarning: "tool_harness_warning";
|
|
259
251
|
readonly ToolProgress: "tool_progress";
|
|
260
252
|
readonly NestedLlmUsage: "nested_llm_usage";
|
|
@@ -577,13 +569,6 @@ type ChatEvent = {
|
|
|
577
569
|
type: "tool_approval_granted";
|
|
578
570
|
toolName: string;
|
|
579
571
|
callId: string;
|
|
580
|
-
} | {
|
|
581
|
-
type: "tool_permission_denied";
|
|
582
|
-
toolName: string;
|
|
583
|
-
callId: string;
|
|
584
|
-
reason?: string | null;
|
|
585
|
-
/** Known values: "hook" | "rule" | "user" | "timeout" | "circuit_breaker". */
|
|
586
|
-
deniedBy?: string | null;
|
|
587
572
|
} | {
|
|
588
573
|
type: "tool_harness_warning";
|
|
589
574
|
toolName: string;
|
|
@@ -660,15 +645,56 @@ interface Conversation {
|
|
|
660
645
|
*/
|
|
661
646
|
repository?: string | null;
|
|
662
647
|
}
|
|
648
|
+
/** One citation on a `web_search`-style tool row, as the clients parse it. */
|
|
649
|
+
interface ToolSource {
|
|
650
|
+
title: string;
|
|
651
|
+
url: string;
|
|
652
|
+
snippet?: string;
|
|
653
|
+
}
|
|
663
654
|
interface Message {
|
|
664
655
|
id: string;
|
|
665
656
|
conversationId: string;
|
|
666
|
-
|
|
657
|
+
/**
|
|
658
|
+
* `"tool"` is the role every tool-result row carries.
|
|
659
|
+
*
|
|
660
|
+
* `"system"` was here and could not occur: `MessageResponse.role` is
|
|
661
|
+
* `Literal["user", "assistant", "tool"]` and the server skips system rows
|
|
662
|
+
* before responding. Narrowing the union is source-breaking for anyone
|
|
663
|
+
* matching on it, which is why it waited for this major rather than
|
|
664
|
+
* dribbling one out of an otherwise additive change.
|
|
665
|
+
*/
|
|
666
|
+
role: "user" | "assistant" | "tool";
|
|
667
667
|
content: string;
|
|
668
668
|
parentId?: string;
|
|
669
669
|
status: "sending" | "streaming" | "complete" | "error";
|
|
670
670
|
createdAt: string;
|
|
671
671
|
toolCalls?: ToolCallRequest[];
|
|
672
|
+
/**
|
|
673
|
+
* Result typing for a `role="tool"` row, joined server-side from the tool
|
|
674
|
+
* call's `block_stop.final`. These exist so history rendered from REST —
|
|
675
|
+
* older turns paged in on scroll, or the fallback when replay yields
|
|
676
|
+
* nothing — renders a settled tool row the way its replayed twin does,
|
|
677
|
+
* instead of as raw output under a generic label.
|
|
678
|
+
*
|
|
679
|
+
* All are `undefined` when no block stop matched, which degrades to the
|
|
680
|
+
* row's plain content.
|
|
681
|
+
*/
|
|
682
|
+
sources?: ToolSource[];
|
|
683
|
+
durationMs?: number;
|
|
684
|
+
isError?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Human-readable prose — a fixed phrase, or a policy rule's own free-text
|
|
687
|
+
* reason. PRESENCE, not value, is the denial signal: a denied tool reports
|
|
688
|
+
* `isError: false` and nothing else on the row distinguishes it.
|
|
689
|
+
*/
|
|
690
|
+
deniedBy?: string;
|
|
691
|
+
/**
|
|
692
|
+
* The same denial's machine-readable half: `"policy_rule"` | `"headless"` |
|
|
693
|
+
* `"user"` | `"hook"`. Absent both when the row is not a denial and when the
|
|
694
|
+
* denial predates the field, so branch on it only after `deniedBy` has
|
|
695
|
+
* established there WAS one.
|
|
696
|
+
*/
|
|
697
|
+
denialKind?: string;
|
|
672
698
|
}
|
|
673
699
|
interface UIComponentsConfig {
|
|
674
700
|
enabled: boolean;
|
|
@@ -2547,4 +2573,4 @@ declare function isEmbeddedResource(value: unknown): value is {
|
|
|
2547
2573
|
*/
|
|
2548
2574
|
declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
|
|
2549
2575
|
|
|
2550
|
-
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolOutputMode, type ToolOutputStub, type
|
|
2576
|
+
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
package/dist/index.js
CHANGED
|
@@ -298,7 +298,6 @@ var ChatEventType = {
|
|
|
298
298
|
AssetCreated: "asset_created",
|
|
299
299
|
ToolApprovalRequested: "tool_approval_requested",
|
|
300
300
|
ToolApprovalGranted: "tool_approval_granted",
|
|
301
|
-
ToolPermissionDenied: "tool_permission_denied",
|
|
302
301
|
ToolHarnessWarning: "tool_harness_warning",
|
|
303
302
|
ToolProgress: "tool_progress",
|
|
304
303
|
NestedLlmUsage: "nested_llm_usage",
|
|
@@ -352,7 +351,31 @@ function toMessage(m) {
|
|
|
352
351
|
content: m.content,
|
|
353
352
|
parentId: m.parent_id,
|
|
354
353
|
status: "complete",
|
|
355
|
-
createdAt: m.created_at
|
|
354
|
+
createdAt: m.created_at,
|
|
355
|
+
// Server-joined result typing. `?? undefined` rather than `?? null` so an
|
|
356
|
+
// absent field and an explicit null both read as "the server said nothing",
|
|
357
|
+
// which is the one distinction a renderer actually makes here.
|
|
358
|
+
toolCalls: m.tool_calls?.map(toToolCallRequest) ?? void 0,
|
|
359
|
+
sources: m.sources?.map(toToolSource) ?? void 0,
|
|
360
|
+
durationMs: m.duration_ms ?? void 0,
|
|
361
|
+
isError: m.is_error ?? void 0,
|
|
362
|
+
deniedBy: m.denied_by ?? void 0,
|
|
363
|
+
denialKind: m.denial_kind ?? void 0
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function toToolSource(s) {
|
|
367
|
+
return { title: s.title, url: s.url, snippet: s.snippet };
|
|
368
|
+
}
|
|
369
|
+
function toToolCallRequest(t) {
|
|
370
|
+
return {
|
|
371
|
+
callId: t.call_id,
|
|
372
|
+
toolName: t.tool_name,
|
|
373
|
+
displayName: t.display_name,
|
|
374
|
+
description: t.description,
|
|
375
|
+
arguments: t.arguments ?? {},
|
|
376
|
+
isClientTool: t.is_client_tool ?? false,
|
|
377
|
+
toolCategory: t.tool_category,
|
|
378
|
+
iconUrl: t.icon_url
|
|
356
379
|
};
|
|
357
380
|
}
|
|
358
381
|
var AstralformClient = class {
|
|
@@ -1502,14 +1525,6 @@ function translateCustomEvent(name, data) {
|
|
|
1502
1525
|
toolName: data.tool_name ?? "",
|
|
1503
1526
|
callId: data.call_id ?? ""
|
|
1504
1527
|
};
|
|
1505
|
-
case "tool_permission_denied":
|
|
1506
|
-
return {
|
|
1507
|
-
type: "tool_permission_denied",
|
|
1508
|
-
toolName: data.tool_name ?? "",
|
|
1509
|
-
callId: data.call_id ?? "",
|
|
1510
|
-
reason: data.reason ?? null,
|
|
1511
|
-
deniedBy: data.denied_by ?? null
|
|
1512
|
-
};
|
|
1513
1528
|
case "tool_harness_warning":
|
|
1514
1529
|
return {
|
|
1515
1530
|
type: "tool_harness_warning",
|