@peer-agent/runtime-sdk 0.1.0-rc.25 → 0.1.0-rc.27

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.
@@ -3,7 +3,7 @@ import type { ContextAccountingSnapshot, RuntimeExecuteRequest, RuntimeExecution
3
3
  export type { RuntimeExecuteRequest, RuntimeExecutionContext, RuntimeToolCall, RuntimeToolResult, } from '@peer-agent/protocol';
4
4
  export declare const RUNTIME_EVENT_PROTOCOL_VERSION: 1;
5
5
  export type RuntimeEventProtocolVersion = typeof RUNTIME_EVENT_PROTOCOL_VERSION;
6
- export type RuntimeSdkEventType = 'session.started' | 'message.delta' | 'reasoning.delta' | 'message.completed' | 'runtime.error' | 'tool.started' | 'hook.completed' | 'permission.requested' | 'permission.resolved' | 'tool.completed' | 'compaction.progress' | 'context.accounting';
6
+ export type RuntimeSdkEventType = 'session.started' | 'message.delta' | 'reasoning.delta' | 'stream.discard' | 'message.completed' | 'runtime.error' | 'tool.started' | 'hook.completed' | 'permission.requested' | 'permission.resolved' | 'tool.completed' | 'compaction.progress' | 'context.accounting';
7
7
  export type RuntimeSdkToolCall = RuntimeToolCall;
8
8
  export type RuntimeSdkExecuteRequest = RuntimeExecuteRequest;
9
9
  export type RuntimeSdkExecutionContext = RuntimeExecutionContext;
@@ -93,6 +93,12 @@ export interface RuntimeSdkReasoningDeltaEvent extends RuntimeSdkEventBase {
93
93
  * Mid-turn / automatic compaction progress for host UI surfaces.
94
94
  * percent is 0-100; hosts should treat values below 100 as live progress.
95
95
  */
96
+ export interface RuntimeSdkStreamDiscardEvent extends RuntimeSdkEventBase {
97
+ readonly type: 'stream.discard';
98
+ readonly streamId: string;
99
+ readonly textChars: number;
100
+ readonly reasoningChars: number;
101
+ }
96
102
  export interface RuntimeSdkCompactionProgressEvent extends RuntimeSdkEventBase {
97
103
  readonly type: 'compaction.progress';
98
104
  readonly streamId: string;
@@ -153,7 +159,7 @@ export interface RuntimeSdkToolCompletedEvent extends RuntimeSdkEventBase {
153
159
  readonly decision: RuntimeDecision;
154
160
  readonly result: RuntimeSdkToolResult;
155
161
  }
156
- export type RuntimeSdkEvent = RuntimeSdkSessionStartedEvent | RuntimeSdkMessageDeltaEvent | RuntimeSdkReasoningDeltaEvent | RuntimeSdkCompactionProgressEvent | RuntimeSdkContextAccountingEvent | RuntimeSdkMessageCompletedEvent | RuntimeSdkRuntimeErrorEvent | RuntimeSdkToolStartedEvent | RuntimeSdkHookCompletedEvent | RuntimeSdkPermissionRequestedEvent | RuntimeSdkPermissionResolvedEvent | RuntimeSdkToolCompletedEvent;
162
+ export type RuntimeSdkEvent = RuntimeSdkSessionStartedEvent | RuntimeSdkMessageDeltaEvent | RuntimeSdkReasoningDeltaEvent | RuntimeSdkStreamDiscardEvent | RuntimeSdkCompactionProgressEvent | RuntimeSdkContextAccountingEvent | RuntimeSdkMessageCompletedEvent | RuntimeSdkRuntimeErrorEvent | RuntimeSdkToolStartedEvent | RuntimeSdkHookCompletedEvent | RuntimeSdkPermissionRequestedEvent | RuntimeSdkPermissionResolvedEvent | RuntimeSdkToolCompletedEvent;
157
163
  export type RuntimeSdkEventInput = RuntimeSdkEvent extends infer Event ? Event extends RuntimeSdkEvent ? Omit<Event, 'protocolVersion' | 'eventId' | 'sequence' | 'occurredAt'> : never : never;
158
164
  export type RuntimeSdkEventListener = (event: RuntimeSdkEvent) => void;
159
165
  export interface RuntimeSdkOptions {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { RUNTIME_EVENT_PROTOCOL_VERSION } from './contracts.ts';
2
- export type { RuntimeEventProtocolVersion, RuntimeExecuteRequest, RuntimeExecutionContext, RuntimeToolCall, RuntimeToolResult, RuntimeSdk, RuntimeSdkApprovalDecision, RuntimeSdkApprovalPort, RuntimeSdkEvent, RuntimeSdkEventBase, RuntimeSdkEventInput, RuntimeSdkEventListener, RuntimeSdkEventType, RuntimeSdkSessionStartedEvent, RuntimeSdkMessageDeltaEvent, RuntimeSdkReasoningDeltaEvent, RuntimeSdkCompactionProgressEvent, RuntimeSdkContextAccountingEvent, RuntimeSdkMessageCompletedEvent, RuntimeSdkRuntimeErrorEvent, RuntimeSdkHookCompletedEvent, RuntimeSdkPermissionRequestedEvent, RuntimeSdkPermissionResolvedEvent, RuntimeSdkToolCompletedEvent, RuntimeSdkToolStartedEvent, RuntimeSdkExecuteRequest, RuntimeSdkExecutionContext, RuntimeSdkHookPayload, RuntimeSdkHookRecord, RuntimeSdkHookRunner, RuntimeSdkHostAdapter, RuntimeSdkOptions, RuntimeSdkPermissionRequest, RuntimeSdkProviderExecution, RuntimeSdkToolCall, RuntimeSdkToolResult, } from './contracts.ts';
2
+ export type { RuntimeEventProtocolVersion, RuntimeExecuteRequest, RuntimeExecutionContext, RuntimeToolCall, RuntimeToolResult, RuntimeSdk, RuntimeSdkApprovalDecision, RuntimeSdkApprovalPort, RuntimeSdkEvent, RuntimeSdkEventBase, RuntimeSdkEventInput, RuntimeSdkEventListener, RuntimeSdkEventType, RuntimeSdkSessionStartedEvent, RuntimeSdkMessageDeltaEvent, RuntimeSdkReasoningDeltaEvent, RuntimeSdkStreamDiscardEvent, RuntimeSdkCompactionProgressEvent, RuntimeSdkContextAccountingEvent, RuntimeSdkMessageCompletedEvent, RuntimeSdkRuntimeErrorEvent, RuntimeSdkHookCompletedEvent, RuntimeSdkPermissionRequestedEvent, RuntimeSdkPermissionResolvedEvent, RuntimeSdkToolCompletedEvent, RuntimeSdkToolStartedEvent, RuntimeSdkExecuteRequest, RuntimeSdkExecutionContext, RuntimeSdkHookPayload, RuntimeSdkHookRecord, RuntimeSdkHookRunner, RuntimeSdkHostAdapter, RuntimeSdkOptions, RuntimeSdkPermissionRequest, RuntimeSdkProviderExecution, RuntimeSdkToolCall, RuntimeSdkToolResult, } from './contracts.ts';
3
3
  export type { RuntimePipeline, RuntimePipelineCompletedTurn, RuntimePipelineContinueTurn, RuntimePipelineEventSink, RuntimePipelineLifecycleObserver, RuntimePipelineModelAdapter, RuntimePipelineOptions, RuntimePipelineRunInput, RuntimePipelineRunResult, RuntimePipelineStatus, RuntimePipelineToolCall, RuntimePipelineToolCallsTurn, RuntimePipelineToolExecution, RuntimePipelineToolExecutor, RuntimePipelineTurnContext, RuntimePipelineTurnResult, } from './pipeline-contracts.ts';
4
4
  export { createRuntimePipeline } from './pipeline.ts';
5
5
  export { createRuntimeSdk } from './runtime.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peer-agent/runtime-sdk",
3
- "version": "0.1.0-rc.25",
3
+ "version": "0.1.0-rc.27",
4
4
  "description": "Public host-neutral orchestration SDK for Peer Agent runtimes.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,8 +34,8 @@
34
34
  "LICENSE"
35
35
  ],
36
36
  "dependencies": {
37
- "@peer-agent/protocol": "^0.1.0-rc.25",
38
- "@peer-agent/runtime-core": "^0.1.0-rc.25"
37
+ "@peer-agent/protocol": "^0.1.0-rc.27",
38
+ "@peer-agent/runtime-core": "^0.1.0-rc.27"
39
39
  },
40
40
  "devDependencies": {
41
41
  "typescript": "^5.9.3"