@cogitator-ai/server-shared 0.1.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/LICENSE +21 -0
- package/dist/helpers.d.ts +4 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +14 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +76 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +37 -0
- package/dist/protocol.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Cogitator Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM,CAKxD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/dist/helpers.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
let counter = 0;
|
|
2
|
+
export function generateId(prefix = 'id') {
|
|
3
|
+
const timestamp = Date.now().toString(36);
|
|
4
|
+
const random = Math.random().toString(36).substring(2, 8);
|
|
5
|
+
const count = (counter++).toString(36);
|
|
6
|
+
return `${prefix}_${timestamp}${random}${count}`;
|
|
7
|
+
}
|
|
8
|
+
export function encodeSSE(data) {
|
|
9
|
+
return `data: ${JSON.stringify(data)}\n\n`;
|
|
10
|
+
}
|
|
11
|
+
export function encodeDone() {
|
|
12
|
+
return 'data: [DONE]\n\n';
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,IAAI,OAAO,GAAG,CAAC,CAAC;AAEhB,MAAM,UAAU,UAAU,CAAC,SAAiB,IAAI;IAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,OAAO,GAAG,MAAM,IAAI,SAAS,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,OAAO,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createStartEvent, createTextStartEvent, createTextDeltaEvent, createTextEndEvent, createToolCallStartEvent, createToolCallDeltaEvent, createToolCallEndEvent, createToolResultEvent, createErrorEvent, createFinishEvent, createWorkflowEvent, createSwarmEvent, } from './protocol.js';
|
|
2
|
+
export type { Usage, StreamEvent, StartEvent, TextStartEvent, TextDeltaEvent, TextEndEvent, ToolCallStartEvent, ToolCallDeltaEvent, ToolCallEndEvent, ToolResultEvent, ErrorEvent, FinishEvent, WorkflowEvent, SwarmEvent, } from './protocol.js';
|
|
3
|
+
export { generateId, encodeSSE, encodeDone } from './helpers.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createStartEvent, createTextStartEvent, createTextDeltaEvent, createTextEndEvent, createToolCallStartEvent, createToolCallDeltaEvent, createToolCallEndEvent, createToolResultEvent, createErrorEvent, createFinishEvent, createWorkflowEvent, createSwarmEvent, } from './protocol.js';
|
|
2
|
+
export { generateId, encodeSSE, encodeDone } from './helpers.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAmBvB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface Usage {
|
|
2
|
+
inputTokens: number;
|
|
3
|
+
outputTokens: number;
|
|
4
|
+
totalTokens: number;
|
|
5
|
+
}
|
|
6
|
+
export type StreamEvent = StartEvent | TextStartEvent | TextDeltaEvent | TextEndEvent | ToolCallStartEvent | ToolCallDeltaEvent | ToolCallEndEvent | ToolResultEvent | ErrorEvent | FinishEvent | WorkflowEvent | SwarmEvent;
|
|
7
|
+
export interface StartEvent {
|
|
8
|
+
type: 'start';
|
|
9
|
+
messageId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TextStartEvent {
|
|
12
|
+
type: 'text-start';
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TextDeltaEvent {
|
|
16
|
+
type: 'text-delta';
|
|
17
|
+
id: string;
|
|
18
|
+
delta: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TextEndEvent {
|
|
21
|
+
type: 'text-end';
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ToolCallStartEvent {
|
|
25
|
+
type: 'tool-call-start';
|
|
26
|
+
id: string;
|
|
27
|
+
toolName: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ToolCallDeltaEvent {
|
|
30
|
+
type: 'tool-call-delta';
|
|
31
|
+
id: string;
|
|
32
|
+
argsTextDelta: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ToolCallEndEvent {
|
|
35
|
+
type: 'tool-call-end';
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ToolResultEvent {
|
|
39
|
+
type: 'tool-result';
|
|
40
|
+
id: string;
|
|
41
|
+
toolCallId: string;
|
|
42
|
+
result: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface ErrorEvent {
|
|
45
|
+
type: 'error';
|
|
46
|
+
message: string;
|
|
47
|
+
code?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface FinishEvent {
|
|
50
|
+
type: 'finish';
|
|
51
|
+
messageId: string;
|
|
52
|
+
usage?: Usage;
|
|
53
|
+
}
|
|
54
|
+
export interface WorkflowEvent {
|
|
55
|
+
type: 'workflow';
|
|
56
|
+
event: string;
|
|
57
|
+
data: unknown;
|
|
58
|
+
}
|
|
59
|
+
export interface SwarmEvent {
|
|
60
|
+
type: 'swarm';
|
|
61
|
+
event: string;
|
|
62
|
+
data: unknown;
|
|
63
|
+
}
|
|
64
|
+
export declare function createStartEvent(messageId: string): StartEvent;
|
|
65
|
+
export declare function createTextStartEvent(id: string): TextStartEvent;
|
|
66
|
+
export declare function createTextDeltaEvent(id: string, delta: string): TextDeltaEvent;
|
|
67
|
+
export declare function createTextEndEvent(id: string): TextEndEvent;
|
|
68
|
+
export declare function createToolCallStartEvent(id: string, toolName: string): ToolCallStartEvent;
|
|
69
|
+
export declare function createToolCallDeltaEvent(id: string, argsTextDelta: string): ToolCallDeltaEvent;
|
|
70
|
+
export declare function createToolCallEndEvent(id: string): ToolCallEndEvent;
|
|
71
|
+
export declare function createToolResultEvent(id: string, toolCallId: string, result: unknown): ToolResultEvent;
|
|
72
|
+
export declare function createErrorEvent(message: string, code?: string): ErrorEvent;
|
|
73
|
+
export declare function createFinishEvent(messageId: string, usage?: Usage): FinishEvent;
|
|
74
|
+
export declare function createWorkflowEvent(event: string, data: unknown): WorkflowEvent;
|
|
75
|
+
export declare function createSwarmEvent(event: string, data: unknown): SwarmEvent;
|
|
76
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"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"}
|
package/dist/protocol.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function createStartEvent(messageId) {
|
|
2
|
+
return { type: 'start', messageId };
|
|
3
|
+
}
|
|
4
|
+
export function createTextStartEvent(id) {
|
|
5
|
+
return { type: 'text-start', id };
|
|
6
|
+
}
|
|
7
|
+
export function createTextDeltaEvent(id, delta) {
|
|
8
|
+
return { type: 'text-delta', id, delta };
|
|
9
|
+
}
|
|
10
|
+
export function createTextEndEvent(id) {
|
|
11
|
+
return { type: 'text-end', id };
|
|
12
|
+
}
|
|
13
|
+
export function createToolCallStartEvent(id, toolName) {
|
|
14
|
+
return { type: 'tool-call-start', id, toolName };
|
|
15
|
+
}
|
|
16
|
+
export function createToolCallDeltaEvent(id, argsTextDelta) {
|
|
17
|
+
return { type: 'tool-call-delta', id, argsTextDelta };
|
|
18
|
+
}
|
|
19
|
+
export function createToolCallEndEvent(id) {
|
|
20
|
+
return { type: 'tool-call-end', id };
|
|
21
|
+
}
|
|
22
|
+
export function createToolResultEvent(id, toolCallId, result) {
|
|
23
|
+
return { type: 'tool-result', id, toolCallId, result };
|
|
24
|
+
}
|
|
25
|
+
export function createErrorEvent(message, code) {
|
|
26
|
+
return { type: 'error', message, code };
|
|
27
|
+
}
|
|
28
|
+
export function createFinishEvent(messageId, usage) {
|
|
29
|
+
return { type: 'finish', messageId, usage };
|
|
30
|
+
}
|
|
31
|
+
export function createWorkflowEvent(event, data) {
|
|
32
|
+
return { type: 'workflow', event, data };
|
|
33
|
+
}
|
|
34
|
+
export function createSwarmEvent(event, data) {
|
|
35
|
+
return { type: 'swarm', event, data };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAyFA,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAU;IAC7C,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAU,EAAE,KAAa;IAC5D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EAAU,EAAE,QAAgB;IACnE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EAAU,EAAE,aAAqB;IACxE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAC/C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,EAAU,EACV,UAAkB,EAClB,MAAe;IAEf,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,IAAa;IAC7D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAiB,EAAE,KAAa;IAChE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,IAAa;IAC9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa,EAAE,IAAa;IAC3D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACxC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cogitator-ai/server-shared",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared streaming protocol and utilities for Cogitator server adapters",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.6.0"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/cogitator-ai/Cogitator-AI.git",
|
|
23
|
+
"directory": "packages/server-shared"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"cogitator",
|
|
28
|
+
"ai",
|
|
29
|
+
"streaming",
|
|
30
|
+
"sse",
|
|
31
|
+
"protocol"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc",
|
|
35
|
+
"dev": "tsc --watch",
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"clean": "rm -rf dist"
|
|
38
|
+
}
|
|
39
|
+
}
|