@copilotkitnext/runtime 0.0.22-alpha.0 → 0.0.22-alpha.2
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/chunk-PXQQQ6KP.mjs +23 -0
- package/dist/chunk-PXQQQ6KP.mjs.map +1 -0
- package/dist/express.d.mts +1 -1
- package/dist/express.d.ts +1 -1
- package/dist/express.js +366 -1008
- package/dist/express.js.map +1 -1
- package/dist/express.mjs +363 -315
- package/dist/express.mjs.map +1 -1
- package/dist/index.d.mts +5 -64
- package/dist/index.d.ts +5 -64
- package/dist/index.js +22 -1304
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -258
- package/dist/index.mjs.map +1 -1
- package/dist/{runtime-njBGN6lZ.d.mts → runtime-BEcxV64L.d.mts} +1 -29
- package/dist/{runtime-njBGN6lZ.d.ts → runtime-BEcxV64L.d.ts} +1 -29
- package/package.json +7 -7
- package/dist/chunk-LDTC5BLU.mjs +0 -1040
- package/dist/chunk-LDTC5BLU.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as CopilotRuntime, A as AgentRunner,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CopilotRuntime, A as AgentRunner, a as AgentRunnerRunRequest, b as AgentRunnerConnectRequest, c as AgentRunnerIsRunningRequest, d as AgentRunnerStopRequest } from './runtime-BEcxV64L.mjs';
|
|
2
|
+
export { e as CopilotRuntimeOptions, V as VERSION } from './runtime-BEcxV64L.mjs';
|
|
3
3
|
import * as hono_hono_base from 'hono/hono-base';
|
|
4
4
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
-
import { BaseEvent
|
|
6
|
+
import { BaseEvent } from '@ag-ui/client';
|
|
7
7
|
export { finalizeRunEvents } from '@copilotkitnext/shared';
|
|
8
8
|
|
|
9
9
|
interface CopilotEndpointParams {
|
|
@@ -103,70 +103,11 @@ declare function createCopilotEndpointSingleRoute({ runtime, basePath }: Copilot
|
|
|
103
103
|
};
|
|
104
104
|
}, string>;
|
|
105
105
|
|
|
106
|
-
declare
|
|
107
|
-
private active;
|
|
108
|
-
private threadScope;
|
|
109
|
-
constructor();
|
|
110
|
-
protected abstract acquireRun(threadId: string, runId: string): Promise<boolean>;
|
|
111
|
-
protected abstract releaseRun(threadId: string): Promise<void>;
|
|
112
|
-
protected abstract isRunningState(threadId: string): Promise<boolean>;
|
|
113
|
-
protected abstract listRuns(threadId: string): Promise<Array<{
|
|
114
|
-
runId: string;
|
|
115
|
-
events: BaseEvent[];
|
|
116
|
-
createdAt: number;
|
|
117
|
-
}>>;
|
|
118
|
-
protected abstract saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
|
|
119
|
-
protected abstract pageThreads(params: {
|
|
120
|
-
scope?: ResourceScope | null;
|
|
121
|
-
limit?: number;
|
|
122
|
-
offset?: number;
|
|
123
|
-
}): Promise<{
|
|
124
|
-
threadIds: string[];
|
|
125
|
-
total: number;
|
|
126
|
-
}>;
|
|
127
|
-
protected abstract deleteThreadStorage(threadId: string, scope?: ResourceScope | null): Promise<void>;
|
|
128
|
-
protected abstract publishLive(threadId: string, event: BaseEvent): Promise<void> | void;
|
|
129
|
-
protected abstract completeLive(threadId: string): Promise<void> | void;
|
|
130
|
-
protected abstract subscribeLive(threadId: string): Observable<BaseEvent>;
|
|
131
|
-
protected closeLive?(threadId: string): Promise<void> | void;
|
|
106
|
+
declare class InMemoryAgentRunner extends AgentRunner {
|
|
132
107
|
run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
|
|
133
108
|
connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
|
|
134
109
|
isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
|
|
135
110
|
stop(request: AgentRunnerStopRequest): Promise<boolean | undefined>;
|
|
136
|
-
listThreads(request: AgentRunnerListThreadsRequest): Promise<AgentRunnerListThreadsResponse>;
|
|
137
|
-
getThreadMetadata(threadId: string, scope?: ResourceScope | null): Promise<ThreadMetadata | null>;
|
|
138
|
-
deleteThread(threadId: string, scope?: ResourceScope | null): Promise<void>;
|
|
139
111
|
}
|
|
140
112
|
|
|
141
|
-
|
|
142
|
-
runId: string;
|
|
143
|
-
events: BaseEvent[];
|
|
144
|
-
createdAt: number;
|
|
145
|
-
};
|
|
146
|
-
declare class InMemoryAgentRunner extends AgentRunnerBase {
|
|
147
|
-
private state;
|
|
148
|
-
private runs;
|
|
149
|
-
private channels;
|
|
150
|
-
constructor();
|
|
151
|
-
private ensureChannel;
|
|
152
|
-
protected acquireRun(threadId: string, runId: string): Promise<boolean>;
|
|
153
|
-
protected releaseRun(threadId: string): Promise<void>;
|
|
154
|
-
protected isRunningState(threadId: string): Promise<boolean>;
|
|
155
|
-
protected listRuns(threadId: string): Promise<HistoricRun[]>;
|
|
156
|
-
protected saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
|
|
157
|
-
protected pageThreads(params: {
|
|
158
|
-
scope?: any;
|
|
159
|
-
limit?: number;
|
|
160
|
-
offset?: number;
|
|
161
|
-
}): Promise<{
|
|
162
|
-
threadIds: string[];
|
|
163
|
-
total: number;
|
|
164
|
-
}>;
|
|
165
|
-
protected deleteThreadStorage(threadId: string): Promise<void>;
|
|
166
|
-
protected publishLive(threadId: string, event: BaseEvent): void;
|
|
167
|
-
protected completeLive(threadId: string): void;
|
|
168
|
-
protected subscribeLive(threadId: string): Observable<BaseEvent>;
|
|
169
|
-
protected closeLive(threadId: string): Promise<void>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export { AgentRunner, AgentRunnerBase, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerListThreadsRequest, AgentRunnerListThreadsResponse, AgentRunnerRunRequest, AgentRunnerStopRequest, CopilotRuntime, InMemoryAgentRunner, ResourceScope, ThreadMetadata, createCopilotEndpoint, createCopilotEndpointSingleRoute };
|
|
113
|
+
export { AgentRunner, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerRunRequest, AgentRunnerStopRequest, CopilotRuntime, InMemoryAgentRunner, createCopilotEndpoint, createCopilotEndpointSingleRoute };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as CopilotRuntime, A as AgentRunner,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CopilotRuntime, A as AgentRunner, a as AgentRunnerRunRequest, b as AgentRunnerConnectRequest, c as AgentRunnerIsRunningRequest, d as AgentRunnerStopRequest } from './runtime-BEcxV64L.js';
|
|
2
|
+
export { e as CopilotRuntimeOptions, V as VERSION } from './runtime-BEcxV64L.js';
|
|
3
3
|
import * as hono_hono_base from 'hono/hono-base';
|
|
4
4
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
-
import { BaseEvent
|
|
6
|
+
import { BaseEvent } from '@ag-ui/client';
|
|
7
7
|
export { finalizeRunEvents } from '@copilotkitnext/shared';
|
|
8
8
|
|
|
9
9
|
interface CopilotEndpointParams {
|
|
@@ -103,70 +103,11 @@ declare function createCopilotEndpointSingleRoute({ runtime, basePath }: Copilot
|
|
|
103
103
|
};
|
|
104
104
|
}, string>;
|
|
105
105
|
|
|
106
|
-
declare
|
|
107
|
-
private active;
|
|
108
|
-
private threadScope;
|
|
109
|
-
constructor();
|
|
110
|
-
protected abstract acquireRun(threadId: string, runId: string): Promise<boolean>;
|
|
111
|
-
protected abstract releaseRun(threadId: string): Promise<void>;
|
|
112
|
-
protected abstract isRunningState(threadId: string): Promise<boolean>;
|
|
113
|
-
protected abstract listRuns(threadId: string): Promise<Array<{
|
|
114
|
-
runId: string;
|
|
115
|
-
events: BaseEvent[];
|
|
116
|
-
createdAt: number;
|
|
117
|
-
}>>;
|
|
118
|
-
protected abstract saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
|
|
119
|
-
protected abstract pageThreads(params: {
|
|
120
|
-
scope?: ResourceScope | null;
|
|
121
|
-
limit?: number;
|
|
122
|
-
offset?: number;
|
|
123
|
-
}): Promise<{
|
|
124
|
-
threadIds: string[];
|
|
125
|
-
total: number;
|
|
126
|
-
}>;
|
|
127
|
-
protected abstract deleteThreadStorage(threadId: string, scope?: ResourceScope | null): Promise<void>;
|
|
128
|
-
protected abstract publishLive(threadId: string, event: BaseEvent): Promise<void> | void;
|
|
129
|
-
protected abstract completeLive(threadId: string): Promise<void> | void;
|
|
130
|
-
protected abstract subscribeLive(threadId: string): Observable<BaseEvent>;
|
|
131
|
-
protected closeLive?(threadId: string): Promise<void> | void;
|
|
106
|
+
declare class InMemoryAgentRunner extends AgentRunner {
|
|
132
107
|
run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
|
|
133
108
|
connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
|
|
134
109
|
isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
|
|
135
110
|
stop(request: AgentRunnerStopRequest): Promise<boolean | undefined>;
|
|
136
|
-
listThreads(request: AgentRunnerListThreadsRequest): Promise<AgentRunnerListThreadsResponse>;
|
|
137
|
-
getThreadMetadata(threadId: string, scope?: ResourceScope | null): Promise<ThreadMetadata | null>;
|
|
138
|
-
deleteThread(threadId: string, scope?: ResourceScope | null): Promise<void>;
|
|
139
111
|
}
|
|
140
112
|
|
|
141
|
-
|
|
142
|
-
runId: string;
|
|
143
|
-
events: BaseEvent[];
|
|
144
|
-
createdAt: number;
|
|
145
|
-
};
|
|
146
|
-
declare class InMemoryAgentRunner extends AgentRunnerBase {
|
|
147
|
-
private state;
|
|
148
|
-
private runs;
|
|
149
|
-
private channels;
|
|
150
|
-
constructor();
|
|
151
|
-
private ensureChannel;
|
|
152
|
-
protected acquireRun(threadId: string, runId: string): Promise<boolean>;
|
|
153
|
-
protected releaseRun(threadId: string): Promise<void>;
|
|
154
|
-
protected isRunningState(threadId: string): Promise<boolean>;
|
|
155
|
-
protected listRuns(threadId: string): Promise<HistoricRun[]>;
|
|
156
|
-
protected saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
|
|
157
|
-
protected pageThreads(params: {
|
|
158
|
-
scope?: any;
|
|
159
|
-
limit?: number;
|
|
160
|
-
offset?: number;
|
|
161
|
-
}): Promise<{
|
|
162
|
-
threadIds: string[];
|
|
163
|
-
total: number;
|
|
164
|
-
}>;
|
|
165
|
-
protected deleteThreadStorage(threadId: string): Promise<void>;
|
|
166
|
-
protected publishLive(threadId: string, event: BaseEvent): void;
|
|
167
|
-
protected completeLive(threadId: string): void;
|
|
168
|
-
protected subscribeLive(threadId: string): Observable<BaseEvent>;
|
|
169
|
-
protected closeLive(threadId: string): Promise<void>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export { AgentRunner, AgentRunnerBase, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerListThreadsRequest, AgentRunnerListThreadsResponse, AgentRunnerRunRequest, AgentRunnerStopRequest, CopilotRuntime, InMemoryAgentRunner, ResourceScope, ThreadMetadata, createCopilotEndpoint, createCopilotEndpointSingleRoute };
|
|
113
|
+
export { AgentRunner, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerRunRequest, AgentRunnerStopRequest, CopilotRuntime, InMemoryAgentRunner, createCopilotEndpoint, createCopilotEndpointSingleRoute };
|