@nextclaw/ncp 0.5.7 → 0.5.9
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 +12 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -217,6 +217,7 @@ type NcpSessionSummary = {
|
|
|
217
217
|
sessionId: string;
|
|
218
218
|
agentId?: string;
|
|
219
219
|
messageCount: number;
|
|
220
|
+
createdAt?: string;
|
|
220
221
|
updatedAt: string;
|
|
221
222
|
lastMessageAt?: string;
|
|
222
223
|
status?: NcpSessionStatus;
|
|
@@ -347,6 +348,13 @@ type NcpRequestEnvelope = {
|
|
|
347
348
|
providerRoute?: NcpProviderRuntimeRoute;
|
|
348
349
|
tools?: ReadonlyArray<OpenAITool>;
|
|
349
350
|
};
|
|
351
|
+
type NcpOutboundMessageDraft = Omit<NcpMessage, "sessionId"> & {
|
|
352
|
+
sessionId?: string;
|
|
353
|
+
};
|
|
354
|
+
type NcpAgentSendEnvelope = Omit<NcpRequestEnvelope, "sessionId" | "message"> & {
|
|
355
|
+
sessionId?: string;
|
|
356
|
+
message: NcpMessage | NcpOutboundMessageDraft;
|
|
357
|
+
};
|
|
350
358
|
type NcpProviderRuntimeRoute = {
|
|
351
359
|
model: string;
|
|
352
360
|
apiKey?: string | null;
|
|
@@ -357,7 +365,6 @@ type NcpProviderRuntimeRoute = {
|
|
|
357
365
|
type NcpResponseEnvelope = {
|
|
358
366
|
sessionId: string;
|
|
359
367
|
message: NcpMessage;
|
|
360
|
-
correlationId?: string;
|
|
361
368
|
metadata?: Record<string, unknown>;
|
|
362
369
|
};
|
|
363
370
|
type NcpCompletedEnvelope = {
|
|
@@ -398,6 +405,7 @@ type NcpStreamRequestPayload = {
|
|
|
398
405
|
type NcpMessageSentPayload = {
|
|
399
406
|
sessionId: string;
|
|
400
407
|
message: NcpMessage;
|
|
408
|
+
correlationId?: string;
|
|
401
409
|
metadata?: Record<string, unknown>;
|
|
402
410
|
};
|
|
403
411
|
type NcpTypingStartPayload = {
|
|
@@ -555,7 +563,7 @@ type NcpEndpointEvent = {
|
|
|
555
563
|
type: NcpEventType.EndpointReady;
|
|
556
564
|
} | {
|
|
557
565
|
type: NcpEventType.MessageRequest;
|
|
558
|
-
payload:
|
|
566
|
+
payload: NcpAgentSendEnvelope;
|
|
559
567
|
} | {
|
|
560
568
|
type: NcpEventType.MessageStreamRequest;
|
|
561
569
|
payload: NcpStreamRequestPayload;
|
|
@@ -735,7 +743,7 @@ interface NcpEndpoint {
|
|
|
735
743
|
*/
|
|
736
744
|
interface NcpAgentClientEndpoint extends NcpEndpoint {
|
|
737
745
|
/** Sends a new message request to the agent. Emits `message.request`. */
|
|
738
|
-
send(envelope:
|
|
746
|
+
send(envelope: NcpAgentSendEnvelope): Promise<void>;
|
|
739
747
|
/** Attaches to the live event stream of a session. Emits `message.stream-request`. */
|
|
740
748
|
stream(payload: NcpStreamRequestPayload): Promise<void>;
|
|
741
749
|
/** Aborts the active execution of a session. Emits `message.abort`. */
|
|
@@ -1006,4 +1014,4 @@ declare function normalizeAssistantText(text: string, mode: NcpAssistantReasonin
|
|
|
1006
1014
|
parts: NcpAssistantReasoningSegment[];
|
|
1007
1015
|
};
|
|
1008
1016
|
//#endregion
|
|
1009
|
-
export { ListMessagesOptions, ListSessionsOptions, NCP_INTERNAL_VISIBILITY_METADATA_KEY, NcpActionPart, NcpAgentClientEndpoint, NcpAgentConversationHydrationParams, NcpAgentConversationSnapshot, NcpAgentConversationStateManager, NcpAgentRunApi, NcpAgentRunInput, NcpAgentRunOptions, NcpAgentRunSendOptions, NcpAgentRunStreamOptions, NcpAgentRuntime, NcpAgentServerEndpoint, NcpAgentStreamProvider, NcpAssistantReasoningNormalizationMode, NcpAssistantReasoningSegment, NcpAssistantTextStreamNormalizer, NcpCardPart, NcpCompletedEnvelope, NcpContextBuilder, NcpContextPrepareOptions, NcpContextWindowUpdatedPayload, NcpConversationSnapshot, NcpConversationStateManager, NcpEncodeContext, NcpEndpoint, NcpEndpointEvent, NcpEndpointKind, NcpEndpointLatency, NcpEndpointManifest, NcpEndpointSubscriber, NcpError, NcpErrorCode, NcpEventType, NcpExtensionPart, NcpFailedEnvelope, NcpFilePart, NcpInvalidToolArgumentsResult, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessageAbortPayload, NcpMessageAcceptedPayload, NcpMessageDeliveredPayload, NcpMessagePart, NcpMessageReactionPayload, NcpMessageReadPayload, NcpMessageRecalledPayload, NcpMessageRole, NcpMessageSentPayload, NcpMessageStatus, NcpPendingToolCall, NcpPresenceUpdatedPayload, NcpProviderRuntimeRoute, NcpReasoningDeltaPayload, NcpReasoningEndPayload, NcpReasoningPart, NcpReasoningStartPayload, NcpReplyTagParseResult, NcpRequestEnvelope, NcpResponseEnvelope, NcpRichTextPart, NcpRoundBuffer, NcpRunContext, NcpRunErrorPayload, NcpRunFinalMetadata, NcpRunFinishedPayload, NcpRunMetadataPayload, NcpRunReadyMetadata, NcpRunStartedPayload, NcpSessionApi, NcpSessionPatch, NcpSessionStatus, NcpSessionSummary, NcpSourcePart, NcpStepStartPart, NcpStreamEncoder, NcpStreamRequestPayload, NcpTextDeltaPayload, NcpTextEndPayload, NcpTextPart, NcpTextStartPayload, NcpTool, NcpToolCallArgsDeltaPayload, NcpToolCallArgsPayload, NcpToolCallEndPayload, NcpToolCallResult, NcpToolCallResultPayload, NcpToolCallStartPayload, NcpToolDefinition, NcpToolInvocationPart, NcpToolOutputContentItem, NcpToolOutputImageItem, NcpToolOutputTextItem, NcpToolRegistry, NcpTypingEndPayload, NcpTypingStartPayload, OpenAIChatChunk, OpenAIChatMessage, OpenAIContentPart, OpenAITool, OpenAIToolCall, OpenAIToolCallDelta, isHiddenNcpMessage, normalizeAssistantText, readAssistantReasoningNormalizationMode, readAssistantReasoningNormalizationModeFromMetadata, sanitizeAssistantReplyTags, stripReplyTagsFromText, writeAssistantReasoningNormalizationModeToMetadata };
|
|
1017
|
+
export { ListMessagesOptions, ListSessionsOptions, NCP_INTERNAL_VISIBILITY_METADATA_KEY, NcpActionPart, NcpAgentClientEndpoint, NcpAgentConversationHydrationParams, NcpAgentConversationSnapshot, NcpAgentConversationStateManager, NcpAgentRunApi, NcpAgentRunInput, NcpAgentRunOptions, NcpAgentRunSendOptions, NcpAgentRunStreamOptions, NcpAgentRuntime, NcpAgentSendEnvelope, NcpAgentServerEndpoint, NcpAgentStreamProvider, NcpAssistantReasoningNormalizationMode, NcpAssistantReasoningSegment, NcpAssistantTextStreamNormalizer, NcpCardPart, NcpCompletedEnvelope, NcpContextBuilder, NcpContextPrepareOptions, NcpContextWindowUpdatedPayload, NcpConversationSnapshot, NcpConversationStateManager, NcpEncodeContext, NcpEndpoint, NcpEndpointEvent, NcpEndpointKind, NcpEndpointLatency, NcpEndpointManifest, NcpEndpointSubscriber, NcpError, NcpErrorCode, NcpEventType, NcpExtensionPart, NcpFailedEnvelope, NcpFilePart, NcpInvalidToolArgumentsResult, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessageAbortPayload, NcpMessageAcceptedPayload, NcpMessageDeliveredPayload, NcpMessagePart, NcpMessageReactionPayload, NcpMessageReadPayload, NcpMessageRecalledPayload, NcpMessageRole, NcpMessageSentPayload, NcpMessageStatus, NcpOutboundMessageDraft, NcpPendingToolCall, NcpPresenceUpdatedPayload, NcpProviderRuntimeRoute, NcpReasoningDeltaPayload, NcpReasoningEndPayload, NcpReasoningPart, NcpReasoningStartPayload, NcpReplyTagParseResult, NcpRequestEnvelope, NcpResponseEnvelope, NcpRichTextPart, NcpRoundBuffer, NcpRunContext, NcpRunErrorPayload, NcpRunFinalMetadata, NcpRunFinishedPayload, NcpRunMetadataPayload, NcpRunReadyMetadata, NcpRunStartedPayload, NcpSessionApi, NcpSessionPatch, NcpSessionStatus, NcpSessionSummary, NcpSourcePart, NcpStepStartPart, NcpStreamEncoder, NcpStreamRequestPayload, NcpTextDeltaPayload, NcpTextEndPayload, NcpTextPart, NcpTextStartPayload, NcpTool, NcpToolCallArgsDeltaPayload, NcpToolCallArgsPayload, NcpToolCallEndPayload, NcpToolCallResult, NcpToolCallResultPayload, NcpToolCallStartPayload, NcpToolDefinition, NcpToolInvocationPart, NcpToolOutputContentItem, NcpToolOutputImageItem, NcpToolOutputTextItem, NcpToolRegistry, NcpTypingEndPayload, NcpTypingStartPayload, OpenAIChatChunk, OpenAIChatMessage, OpenAIContentPart, OpenAITool, OpenAIToolCall, OpenAIToolCallDelta, isHiddenNcpMessage, normalizeAssistantText, readAssistantReasoningNormalizationMode, readAssistantReasoningNormalizationModeFromMetadata, sanitizeAssistantReplyTags, stripReplyTagsFromText, writeAssistantReasoningNormalizationModeToMetadata };
|