@holokai/holo-sdk 1.4.1
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/README.md +264 -0
- package/dist/client/builder.d.ts +82 -0
- package/dist/client/builder.d.ts.map +1 -0
- package/dist/client/builder.js +207 -0
- package/dist/client/builder.js.map +1 -0
- package/dist/client/client.d.ts +148 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +309 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/errors.d.ts +20 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +36 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +8 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/merge.d.ts +28 -0
- package/dist/client/merge.d.ts.map +1 -0
- package/dist/client/merge.js +185 -0
- package/dist/client/merge.js.map +1 -0
- package/dist/client/output.d.ts +26 -0
- package/dist/client/output.d.ts.map +1 -0
- package/dist/client/output.js +75 -0
- package/dist/client/output.js.map +1 -0
- package/dist/client/runner.d.ts +92 -0
- package/dist/client/runner.d.ts.map +1 -0
- package/dist/client/runner.js +121 -0
- package/dist/client/runner.js.map +1 -0
- package/dist/client/sse.d.ts +3 -0
- package/dist/client/sse.d.ts.map +1 -0
- package/dist/client/sse.js +72 -0
- package/dist/client/sse.js.map +1 -0
- package/dist/client/stream.d.ts +60 -0
- package/dist/client/stream.d.ts.map +1 -0
- package/dist/client/stream.js +137 -0
- package/dist/client/stream.js.map +1 -0
- package/dist/client/transport.d.ts +42 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/client/transport.js +129 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client/types.d.ts +41 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/core/async-event-queue.d.ts +11 -0
- package/dist/core/async-event-queue.d.ts.map +1 -0
- package/dist/core/async-event-queue.js +38 -0
- package/dist/core/async-event-queue.js.map +1 -0
- package/dist/core/binary.d.ts +3 -0
- package/dist/core/binary.d.ts.map +1 -0
- package/dist/core/binary.js +11 -0
- package/dist/core/binary.js.map +1 -0
- package/dist/core/errors.d.ts +11 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +24 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/headers.d.ts +3 -0
- package/dist/core/headers.d.ts.map +1 -0
- package/dist/core/headers.js +42 -0
- package/dist/core/headers.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger.d.ts +37 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +73 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/pick-defined.d.ts +9 -0
- package/dist/core/pick-defined.d.ts.map +1 -0
- package/dist/core/pick-defined.js +79 -0
- package/dist/core/pick-defined.js.map +1 -0
- package/dist/core/safe-parse.d.ts +2 -0
- package/dist/core/safe-parse.d.ts.map +1 -0
- package/dist/core/safe-parse.js +11 -0
- package/dist/core/safe-parse.js.map +1 -0
- package/dist/core/sanitize.object.d.ts +2 -0
- package/dist/core/sanitize.object.d.ts.map +1 -0
- package/dist/core/sanitize.object.js +10 -0
- package/dist/core/sanitize.object.js.map +1 -0
- package/dist/core/stable-id.d.ts +2 -0
- package/dist/core/stable-id.d.ts.map +1 -0
- package/dist/core/stable-id.js +11 -0
- package/dist/core/stable-id.js.map +1 -0
- package/dist/core/stringify-any.d.ts +2 -0
- package/dist/core/stringify-any.d.ts.map +1 -0
- package/dist/core/stringify-any.js +4 -0
- package/dist/core/stringify-any.js.map +1 -0
- package/dist/core/time-utils.d.ts +2 -0
- package/dist/core/time-utils.d.ts.map +1 -0
- package/dist/core/time-utils.js +2 -0
- package/dist/core/time-utils.js.map +1 -0
- package/dist/core/tokenizer.d.ts +2 -0
- package/dist/core/tokenizer.d.ts.map +1 -0
- package/dist/core/tokenizer.js +12 -0
- package/dist/core/tokenizer.js.map +1 -0
- package/dist/holo/content.d.ts +9 -0
- package/dist/holo/content.d.ts.map +1 -0
- package/dist/holo/content.js +22 -0
- package/dist/holo/content.js.map +1 -0
- package/dist/holo/factories/index.d.ts +2 -0
- package/dist/holo/factories/index.d.ts.map +1 -0
- package/dist/holo/factories/index.js +2 -0
- package/dist/holo/factories/index.js.map +1 -0
- package/dist/holo/factories/request-factory.d.ts +3 -0
- package/dist/holo/factories/request-factory.d.ts.map +1 -0
- package/dist/holo/factories/request-factory.js +8 -0
- package/dist/holo/factories/request-factory.js.map +1 -0
- package/dist/holo/index.d.ts +3 -0
- package/dist/holo/index.d.ts.map +1 -0
- package/dist/holo/index.js +3 -0
- package/dist/holo/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/matching/index.d.ts +3 -0
- package/dist/matching/index.d.ts.map +1 -0
- package/dist/matching/index.js +2 -0
- package/dist/matching/index.js.map +1 -0
- package/dist/matching/normalize.d.ts +19 -0
- package/dist/matching/normalize.d.ts.map +1 -0
- package/dist/matching/normalize.js +169 -0
- package/dist/matching/normalize.js.map +1 -0
- package/dist/notification/index.d.ts +4 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +4 -0
- package/dist/notification/index.js.map +1 -0
- package/dist/notification/service.d.ts +8 -0
- package/dist/notification/service.d.ts.map +1 -0
- package/dist/notification/service.js +16 -0
- package/dist/notification/service.js.map +1 -0
- package/dist/notification/store.d.ts +2 -0
- package/dist/notification/store.d.ts.map +1 -0
- package/dist/notification/store.js +2 -0
- package/dist/notification/store.js.map +1 -0
- package/dist/notification/types.d.ts +11 -0
- package/dist/notification/types.d.ts.map +1 -0
- package/dist/notification/types.js +63 -0
- package/dist/notification/types.js.map +1 -0
- package/dist/plugin/base.d.ts +29 -0
- package/dist/plugin/base.d.ts.map +1 -0
- package/dist/plugin/base.js +105 -0
- package/dist/plugin/base.js.map +1 -0
- package/dist/plugin/errors.d.ts +9 -0
- package/dist/plugin/errors.d.ts.map +1 -0
- package/dist/plugin/errors.js +15 -0
- package/dist/plugin/errors.js.map +1 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +5 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/loader.d.ts +14 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugin/loader.js +67 -0
- package/dist/plugin/loader.js.map +1 -0
- package/dist/plugin/normalize.d.ts +3 -0
- package/dist/plugin/normalize.d.ts.map +1 -0
- package/dist/plugin/normalize.js +160 -0
- package/dist/plugin/normalize.js.map +1 -0
- package/dist/provider/auditor/base.d.ts +47 -0
- package/dist/provider/auditor/base.d.ts.map +1 -0
- package/dist/provider/auditor/base.js +254 -0
- package/dist/provider/auditor/base.js.map +1 -0
- package/dist/provider/auditor/index.d.ts +2 -0
- package/dist/provider/auditor/index.d.ts.map +1 -0
- package/dist/provider/auditor/index.js +2 -0
- package/dist/provider/auditor/index.js.map +1 -0
- package/dist/provider/base.d.ts +36 -0
- package/dist/provider/base.d.ts.map +1 -0
- package/dist/provider/base.js +185 -0
- package/dist/provider/base.js.map +1 -0
- package/dist/provider/event-processor.d.ts +13 -0
- package/dist/provider/event-processor.d.ts.map +1 -0
- package/dist/provider/event-processor.js +22 -0
- package/dist/provider/event-processor.js.map +1 -0
- package/dist/provider/index.d.ts +7 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +7 -0
- package/dist/provider/index.js.map +1 -0
- package/dist/provider/translator/base.d.ts +15 -0
- package/dist/provider/translator/base.d.ts.map +1 -0
- package/dist/provider/translator/base.js +33 -0
- package/dist/provider/translator/base.js.map +1 -0
- package/dist/provider/translator/index.d.ts +3 -0
- package/dist/provider/translator/index.d.ts.map +1 -0
- package/dist/provider/translator/index.js +3 -0
- package/dist/provider/translator/index.js.map +1 -0
- package/dist/provider/translator/stream.d.ts +24 -0
- package/dist/provider/translator/stream.d.ts.map +1 -0
- package/dist/provider/translator/stream.js +50 -0
- package/dist/provider/translator/stream.js.map +1 -0
- package/dist/provider/wire/base.d.ts +39 -0
- package/dist/provider/wire/base.d.ts.map +1 -0
- package/dist/provider/wire/base.js +106 -0
- package/dist/provider/wire/base.js.map +1 -0
- package/dist/provider/wire/holo.wire.adapter.d.ts +33 -0
- package/dist/provider/wire/holo.wire.adapter.d.ts.map +1 -0
- package/dist/provider/wire/holo.wire.adapter.js +220 -0
- package/dist/provider/wire/holo.wire.adapter.js.map +1 -0
- package/dist/provider/wire/index.d.ts +3 -0
- package/dist/provider/wire/index.d.ts.map +1 -0
- package/dist/provider/wire/index.js +3 -0
- package/dist/provider/wire/index.js.map +1 -0
- package/dist/provider/worker-request-factory.d.ts +23 -0
- package/dist/provider/worker-request-factory.d.ts.map +1 -0
- package/dist/provider/worker-request-factory.js +38 -0
- package/dist/provider/worker-request-factory.js.map +1 -0
- package/package.json +106 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Holokai
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# @holokai/holo-sdk
|
|
2
|
+
|
|
3
|
+
SDK for the Holo platform. Provides base classes for building provider plugins and a client SDK for consuming the Holo API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @holokai/holo-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Plugins also need the types package:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @holokai/holo-types
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
The SDK provides:
|
|
20
|
+
|
|
21
|
+
- `BasePlugin` — lifecycle management (initialize, destroy, state machine)
|
|
22
|
+
- `BaseProvider` — provider request processing and auditing
|
|
23
|
+
- `BaseAuditor` — request/response audit record construction
|
|
24
|
+
- `BaseTranslator` — Holo universal format translation
|
|
25
|
+
- `BaseWireAdapter` — provider events to HTTP wire chunks
|
|
26
|
+
- Core utilities (`ClassLogger`, `pickDefined`, `AsyncEventQueue`, etc.)
|
|
27
|
+
- Notification factories and stores
|
|
28
|
+
|
|
29
|
+
## Package Exports
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Plugin development
|
|
33
|
+
import {BasePlugin} from '@holokai/holo-sdk/plugin';
|
|
34
|
+
import {BaseProvider, BaseAuditor, BaseTranslator, BaseWireAdapter} from '@holokai/holo-sdk/provider';
|
|
35
|
+
import {ClassLogger, pickDefined, stringifyError} from '@holokai/holo-sdk';
|
|
36
|
+
import {HoloRequestDefaults} from '@holokai/holo-sdk/holo';
|
|
37
|
+
import {NotificationServiceToken, NotificationEventFactory} from '@holokai/holo-sdk/notification';
|
|
38
|
+
|
|
39
|
+
// Client SDK
|
|
40
|
+
import {HoloClient, HoloRequestBuilder, HoloStream, HoloToolRunner} from '@holokai/holo-sdk/client';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Subpath | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `@holokai/holo-sdk` | Core utilities: `pickDefined`, `ClassLogger`, `AsyncEventQueue`, logging |
|
|
46
|
+
| `@holokai/holo-sdk/plugin` | `BasePlugin`, plugin loader, discovery |
|
|
47
|
+
| `@holokai/holo-sdk/provider` | `BaseProvider`, `BaseAuditor`, `BaseTranslator`, `BaseWireAdapter`, event processor |
|
|
48
|
+
| `@holokai/holo-sdk/holo` | Holo format helpers, content type guards, request factories |
|
|
49
|
+
| `@holokai/holo-sdk/core` | Low-level utilities |
|
|
50
|
+
| `@holokai/holo-sdk/notification` | Notification service, event factory |
|
|
51
|
+
| `@holokai/holo-sdk/client` | `HoloClient`, `HoloRequestBuilder`, streaming, tool runner |
|
|
52
|
+
|
|
53
|
+
## Building a Provider Plugin
|
|
54
|
+
|
|
55
|
+
### Directory Structure
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
plugins/holo-provider-{name}/
|
|
59
|
+
├── src/
|
|
60
|
+
│ ├── index.ts # Default export of plugin instance
|
|
61
|
+
│ ├── manifest.ts # Plugin manifest definition
|
|
62
|
+
│ ├── plugin.ts # IProviderPlugin implementation
|
|
63
|
+
│ ├── {name}.provider.ts # IProvider implementation
|
|
64
|
+
│ ├── {name}.auditor.ts # IAuditor implementation
|
|
65
|
+
│ ├── {name}.translator.ts # IProviderTranslator implementation
|
|
66
|
+
│ ├── {name}.wire.adapter.ts # IWireAdapter implementation
|
|
67
|
+
│ └── types.ts # Provider-specific types
|
|
68
|
+
├── package.json
|
|
69
|
+
├── tsconfig.json
|
|
70
|
+
└── README.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Plugin Implementation
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// plugin.ts
|
|
77
|
+
import {BasePlugin} from '@holokai/holo-sdk/plugin';
|
|
78
|
+
import type {IProviderPlugin, PluginContext} from '@holokai/holo-types/plugin';
|
|
79
|
+
import type {IProvider, IWireAdapter, ProviderCapabilities, WireAdapterParams} from '@holokai/holo-types/provider';
|
|
80
|
+
import type {RouteTree} from '@holokai/holo-types/routing';
|
|
81
|
+
import {RouteHandler} from '@holokai/holo-types/routing';
|
|
82
|
+
import {ProtocolCapability} from '@holokai/holo-types/entities';
|
|
83
|
+
import {manifest} from './manifest';
|
|
84
|
+
import {MyProvider} from './my.provider';
|
|
85
|
+
import {MyWireAdapter} from './my.wire.adapter';
|
|
86
|
+
import {MyTranslator} from './my.translator';
|
|
87
|
+
|
|
88
|
+
export const MyProtocols = {
|
|
89
|
+
CHAT: 'my.chat',
|
|
90
|
+
MODELS: 'my.models'
|
|
91
|
+
} as const;
|
|
92
|
+
|
|
93
|
+
export class MyProviderPlugin extends BasePlugin implements IProviderPlugin {
|
|
94
|
+
manifest = manifest;
|
|
95
|
+
translator = MyTranslator.instance();
|
|
96
|
+
protocols = MyProtocols;
|
|
97
|
+
defaultProtocol = MyProtocols.CHAT;
|
|
98
|
+
|
|
99
|
+
async createProvider(id: string, name: string, config: any): Promise<IProvider> {
|
|
100
|
+
return new MyProvider(this, config);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async createWireAdapter(params: WireAdapterParams): Promise<IWireAdapter> {
|
|
104
|
+
return new MyWireAdapter(params.requestId, params.isStreaming);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
getCapabilities(): ProviderCapabilities {
|
|
108
|
+
return {streaming: true, tools: true, vision: false, functionCalling: true, maxTokens: 128000};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
getRoutes(): RouteTree {
|
|
112
|
+
return {
|
|
113
|
+
v1: {
|
|
114
|
+
chat: {
|
|
115
|
+
method: 'POST',
|
|
116
|
+
handler: RouteHandler.REQUEST,
|
|
117
|
+
protocol: {name: MyProtocols.CHAT, capability: ProtocolCapability.CHAT}
|
|
118
|
+
},
|
|
119
|
+
models: {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
handler: RouteHandler.MODELS,
|
|
122
|
+
protocol: {name: MyProtocols.MODELS, capability: ProtocolCapability.MODELS}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
protected onInitialize(_context: PluginContext): Promise<void> {
|
|
129
|
+
return Promise.resolve();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
protected onDestroy(): Promise<void> {
|
|
133
|
+
return Promise.resolve();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Protocols and Capabilities
|
|
139
|
+
|
|
140
|
+
Each route declares a **protocol** (wire format identifier) and **capability** (what kind of request it handles):
|
|
141
|
+
|
|
142
|
+
| Capability | Description |
|
|
143
|
+
|-------------------------------|-----------------------------|
|
|
144
|
+
| `ProtocolCapability.CHAT` | Conversational LLM requests |
|
|
145
|
+
| `ProtocolCapability.GENERATE` | Text generation (non-chat) |
|
|
146
|
+
| `ProtocolCapability.EMBED` | Embedding generation |
|
|
147
|
+
| `ProtocolCapability.MODELS` | Model listing |
|
|
148
|
+
|
|
149
|
+
Protocols are registered in the database at startup. Each protocol is tied to a specific plugin version.
|
|
150
|
+
|
|
151
|
+
### Auditor Implementation
|
|
152
|
+
|
|
153
|
+
The auditor transforms worker requests/responses into `ProviderRequest`/`ProviderResponse` audit records:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import {BaseAuditor} from '@holokai/holo-sdk/provider';
|
|
157
|
+
import type {HoloWorkerRequest} from '@holokai/holo-types/worker';
|
|
158
|
+
import type {ProviderRequest} from '@holokai/holo-types/entities';
|
|
159
|
+
|
|
160
|
+
export class MyAuditor extends BaseAuditor {
|
|
161
|
+
readonly provider = 'my-provider';
|
|
162
|
+
|
|
163
|
+
protected toHoloRequest(workerRequest: HoloWorkerRequest, req: Omit<ProviderRequest, 'id'>): void {
|
|
164
|
+
req.access_model = workerRequest.payload.model;
|
|
165
|
+
req.metadata.user_prompt = workerRequest.payload.messages?.at(-1)?.content;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
protected mapProviderPayload(workerRequest: HoloWorkerRequest, req: Omit<ProviderRequest, 'id'>): void {
|
|
169
|
+
const {temperature, max_tokens} = workerRequest.payload;
|
|
170
|
+
req.metadata.options = {temperature, max_tokens};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
protected async createProviderEnvelope(payload: any) {
|
|
174
|
+
return {access_model: payload.model || 'unknown'};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Audit records use:
|
|
180
|
+
|
|
181
|
+
- **Real columns** for queryable fields: `access_model`, `application_id`, `provider_id`, `protocol_id`, `user_id`,
|
|
182
|
+
`client_identifier`, `thread_id`, token counts, timing, cost
|
|
183
|
+
- **`metadata` JSONB** for extensible data: `user_prompt`, `system_prompt`, `options`, `raw_request`, `headers`,
|
|
184
|
+
`response_raw`, `usage_raw`, etc.
|
|
185
|
+
|
|
186
|
+
### Manifest
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
// manifest.ts
|
|
190
|
+
import type {PluginManifest} from '@holokai/holo-types/plugin';
|
|
191
|
+
import {PluginType} from '@holokai/holo-types/plugin';
|
|
192
|
+
|
|
193
|
+
export const manifest: PluginManifest = {
|
|
194
|
+
name: '@holokai/holo-provider-my',
|
|
195
|
+
version: '1.0.0',
|
|
196
|
+
pluginType: PluginType.PROVIDER,
|
|
197
|
+
family: 'MY_PROVIDER',
|
|
198
|
+
description: 'My custom provider plugin'
|
|
199
|
+
};
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Default Export
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
// index.ts
|
|
206
|
+
import {MyProviderPlugin} from './plugin';
|
|
207
|
+
|
|
208
|
+
export default new MyProviderPlugin();
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Client SDK
|
|
212
|
+
|
|
213
|
+
The `@holokai/holo-sdk/client` subpath provides a typed client for consuming the Holo API:
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
import {HoloClient} from '@holokai/holo-sdk/client';
|
|
217
|
+
|
|
218
|
+
const client = new HoloClient({baseUrl: 'http://localhost:3000', token: 'your-token'});
|
|
219
|
+
|
|
220
|
+
// Simple chat
|
|
221
|
+
const response = await client.chat.send({
|
|
222
|
+
model: 'gpt-4o',
|
|
223
|
+
messages: [{role: 'user', content: 'Hello'}],
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// Fluent builder
|
|
227
|
+
const response = await client.chat.builder()
|
|
228
|
+
.model('gpt-4o')
|
|
229
|
+
.system('You are helpful.')
|
|
230
|
+
.user('Hello')
|
|
231
|
+
.temperature(0.7)
|
|
232
|
+
.send();
|
|
233
|
+
|
|
234
|
+
// Streaming
|
|
235
|
+
const stream = await client.chat.builder()
|
|
236
|
+
.model('gpt-4o')
|
|
237
|
+
.user('Write a poem')
|
|
238
|
+
.stream();
|
|
239
|
+
|
|
240
|
+
for await (const event of stream) {
|
|
241
|
+
process.stdout.write(event.text ?? '');
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Tool calling
|
|
245
|
+
import {HoloToolRunner} from '@holokai/holo-sdk/client';
|
|
246
|
+
|
|
247
|
+
const runner = new HoloToolRunner(client, tools, handlers);
|
|
248
|
+
const result = await runner.run({model: 'gpt-4o', messages});
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
See [docs/README.md](docs/README.md) for the full client SDK reference.
|
|
252
|
+
|
|
253
|
+
## Reference Implementations
|
|
254
|
+
|
|
255
|
+
| Plugin | Key Features |
|
|
256
|
+
|-----------------------------------|--------------------------------------------------------------------------------|
|
|
257
|
+
| [OpenAI](../holo-provider-openai) | Dual protocols (completions + responses), dual wire adapters, tool calling |
|
|
258
|
+
| [Claude](../holo-provider-claude) | 6-event streaming lifecycle, content blocks, extended thinking, prompt caching |
|
|
259
|
+
| [Ollama](../holo-provider-ollama) | Chat + generate protocols, local deployment, passthrough default handler |
|
|
260
|
+
| [Gemini](../holo-provider-gemini) | Dual protocols (generate + stream), embedding, vision, 1M token context |
|
|
261
|
+
|
|
262
|
+
## License
|
|
263
|
+
|
|
264
|
+
MIT
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { HoloContent, HoloContentToolResult, HoloMessage, HoloRequest, HoloRequestMetadata, HoloResponse, HoloResponseFormat, HoloTool, HoloToolChoice } from '@holokai/holo-types/holo';
|
|
2
|
+
import type { HoloStream } from './stream';
|
|
3
|
+
export type SendFn = (request: HoloRequest) => Promise<HoloResponse>;
|
|
4
|
+
export type StreamFn = (request: HoloRequest) => Promise<HoloStream>;
|
|
5
|
+
/**
|
|
6
|
+
* Fluent builder for constructing and sending {@link HoloRequest} objects.
|
|
7
|
+
*
|
|
8
|
+
* @remarks Create via {@link ChatNamespace.builder} rather than constructing directly.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.chat.builder()
|
|
13
|
+
* .model('gpt-4o')
|
|
14
|
+
* .user('Summarize this article')
|
|
15
|
+
* .temperature(0.3)
|
|
16
|
+
* .send();
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @see {@link HoloRequest} for the underlying request shape.
|
|
20
|
+
*/
|
|
21
|
+
export declare class HoloRequestBuilder {
|
|
22
|
+
private readonly sendFn;
|
|
23
|
+
private readonly streamFn;
|
|
24
|
+
private _model?;
|
|
25
|
+
private _application?;
|
|
26
|
+
private _messages;
|
|
27
|
+
private _temperature?;
|
|
28
|
+
private _maxTokens?;
|
|
29
|
+
private _topP?;
|
|
30
|
+
private _topK?;
|
|
31
|
+
private _frequencyPenalty?;
|
|
32
|
+
private _presencePenalty?;
|
|
33
|
+
private _seed?;
|
|
34
|
+
private _stopSequences?;
|
|
35
|
+
private _tools?;
|
|
36
|
+
private _toolChoice?;
|
|
37
|
+
private _responseFormat?;
|
|
38
|
+
private _metadata?;
|
|
39
|
+
private _serviceTier?;
|
|
40
|
+
private _provider?;
|
|
41
|
+
private _threadId?;
|
|
42
|
+
private _branch?;
|
|
43
|
+
constructor(sendFn: SendFn, streamFn: StreamFn, defaults?: {
|
|
44
|
+
model?: string;
|
|
45
|
+
application?: string;
|
|
46
|
+
});
|
|
47
|
+
model(name: string): this;
|
|
48
|
+
application(slug: string): this;
|
|
49
|
+
system(content: string): this;
|
|
50
|
+
user(content: string | HoloContent[]): this;
|
|
51
|
+
assistant(content: string | HoloContent[]): this;
|
|
52
|
+
/** Append a tool result message. Use this to feed tool outputs back into the conversation. */
|
|
53
|
+
tool(result: HoloContentToolResult): this;
|
|
54
|
+
messages(msgs: HoloMessage[]): this;
|
|
55
|
+
temperature(v: number): this;
|
|
56
|
+
maxTokens(v: number): this;
|
|
57
|
+
topP(v: number): this;
|
|
58
|
+
topK(v: number): this;
|
|
59
|
+
frequencyPenalty(v: number): this;
|
|
60
|
+
presencePenalty(v: number): this;
|
|
61
|
+
seed(v: number): this;
|
|
62
|
+
stopSequences(s: string[]): this;
|
|
63
|
+
tools(t: HoloTool[]): this;
|
|
64
|
+
toolChoice(c: HoloToolChoice): this;
|
|
65
|
+
responseFormat(f: HoloResponseFormat): this;
|
|
66
|
+
/** Shorthand to set `response_format` to `json_object` (valid JSON, no schema). */
|
|
67
|
+
json(): this;
|
|
68
|
+
/** Shorthand to set `response_format` to `json_schema` with strict validation. */
|
|
69
|
+
jsonSchema(schema: Record<string, unknown>): this;
|
|
70
|
+
metadata(m: HoloRequestMetadata | null): this;
|
|
71
|
+
serviceTier(tier: 'auto' | 'default' | 'standard_only'): this;
|
|
72
|
+
provider(nameOrId: string): this;
|
|
73
|
+
threadId(id: string): this;
|
|
74
|
+
branch(id: string): this;
|
|
75
|
+
/** Assemble the current builder state into a {@link HoloRequest} without sending it. */
|
|
76
|
+
build(): HoloRequest;
|
|
77
|
+
/** Build and send the request, returning the complete {@link HoloResponse}. */
|
|
78
|
+
send(): Promise<HoloResponse>;
|
|
79
|
+
/** Build and send the request as a streaming call, returning a {@link HoloStream}. */
|
|
80
|
+
stream(): Promise<HoloStream>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/client/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAErE;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,kBAAkB;IAsBvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAtB7B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,C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der} rather than constructing directly.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const response = await client.chat.builder()
|
|
9
|
+
* .model('gpt-4o')
|
|
10
|
+
* .user('Summarize this article')
|
|
11
|
+
* .temperature(0.3)
|
|
12
|
+
* .send();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @see {@link HoloRequest} for the underlying request shape.
|
|
16
|
+
*/
|
|
17
|
+
export class HoloRequestBuilder {
|
|
18
|
+
sendFn;
|
|
19
|
+
streamFn;
|
|
20
|
+
_model;
|
|
21
|
+
_application;
|
|
22
|
+
_messages = [];
|
|
23
|
+
_temperature;
|
|
24
|
+
_maxTokens;
|
|
25
|
+
_topP;
|
|
26
|
+
_topK;
|
|
27
|
+
_frequencyPenalty;
|
|
28
|
+
_presencePenalty;
|
|
29
|
+
_seed;
|
|
30
|
+
_stopSequences;
|
|
31
|
+
_tools;
|
|
32
|
+
_toolChoice;
|
|
33
|
+
_responseFormat;
|
|
34
|
+
_metadata;
|
|
35
|
+
_serviceTier;
|
|
36
|
+
_provider;
|
|
37
|
+
_threadId;
|
|
38
|
+
_branch;
|
|
39
|
+
constructor(sendFn, streamFn, defaults) {
|
|
40
|
+
this.sendFn = sendFn;
|
|
41
|
+
this.streamFn = streamFn;
|
|
42
|
+
if (defaults?.model)
|
|
43
|
+
this._model = defaults.model;
|
|
44
|
+
if (defaults?.application)
|
|
45
|
+
this._application = defaults.application;
|
|
46
|
+
}
|
|
47
|
+
model(name) {
|
|
48
|
+
this._model = name;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
application(slug) {
|
|
52
|
+
this._application = slug;
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
system(content) {
|
|
56
|
+
this._messages.push({ role: 'system', content });
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
user(content) {
|
|
60
|
+
this._messages.push({ role: 'user', content });
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
assistant(content) {
|
|
64
|
+
this._messages.push({ role: 'assistant', content });
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
/** Append a tool result message. Use this to feed tool outputs back into the conversation. */
|
|
68
|
+
tool(result) {
|
|
69
|
+
this._messages.push({ role: 'tool', content: result.content, tool_call_id: result.tool_call_id });
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
messages(msgs) {
|
|
73
|
+
this._messages.push(...msgs);
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
temperature(v) {
|
|
77
|
+
this._temperature = v;
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
maxTokens(v) {
|
|
81
|
+
this._maxTokens = v;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
topP(v) {
|
|
85
|
+
this._topP = v;
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
topK(v) {
|
|
89
|
+
this._topK = v;
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
frequencyPenalty(v) {
|
|
93
|
+
this._frequencyPenalty = v;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
presencePenalty(v) {
|
|
97
|
+
this._presencePenalty = v;
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
seed(v) {
|
|
101
|
+
this._seed = v;
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
stopSequences(s) {
|
|
105
|
+
this._stopSequences = s;
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
tools(t) {
|
|
109
|
+
this._tools = t;
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
toolChoice(c) {
|
|
113
|
+
this._toolChoice = c;
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
responseFormat(f) {
|
|
117
|
+
this._responseFormat = f;
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
/** Shorthand to set `response_format` to `json_object` (valid JSON, no schema). */
|
|
121
|
+
json() {
|
|
122
|
+
this._responseFormat = { type: 'json_object' };
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
/** Shorthand to set `response_format` to `json_schema` with strict validation. */
|
|
126
|
+
jsonSchema(schema) {
|
|
127
|
+
this._responseFormat = { type: 'json_schema', schema, strict: true };
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
metadata(m) {
|
|
131
|
+
this._metadata = m;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
serviceTier(tier) {
|
|
135
|
+
this._serviceTier = tier;
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
provider(nameOrId) {
|
|
139
|
+
this._provider = nameOrId;
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
threadId(id) {
|
|
143
|
+
this._threadId = id;
|
|
144
|
+
return this;
|
|
145
|
+
}
|
|
146
|
+
branch(id) {
|
|
147
|
+
this._branch = id;
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
/** Assemble the current builder state into a {@link HoloRequest} without sending it. */
|
|
151
|
+
build() {
|
|
152
|
+
const model = this._model;
|
|
153
|
+
if (!model) {
|
|
154
|
+
throw new Error('No model specified. Set a model via .model() or provide a defaultModel in HoloClientOptions.');
|
|
155
|
+
}
|
|
156
|
+
const request = {
|
|
157
|
+
model,
|
|
158
|
+
messages: this._messages,
|
|
159
|
+
};
|
|
160
|
+
if (this._application)
|
|
161
|
+
request.application = this._application;
|
|
162
|
+
if (this._provider)
|
|
163
|
+
request.provider = this._provider;
|
|
164
|
+
if (this._temperature !== undefined)
|
|
165
|
+
request.temperature = this._temperature;
|
|
166
|
+
if (this._maxTokens !== undefined)
|
|
167
|
+
request.max_tokens = this._maxTokens;
|
|
168
|
+
if (this._topP !== undefined)
|
|
169
|
+
request.top_p = this._topP;
|
|
170
|
+
if (this._topK !== undefined)
|
|
171
|
+
request.top_k = this._topK;
|
|
172
|
+
if (this._frequencyPenalty !== undefined)
|
|
173
|
+
request.frequency_penalty = this._frequencyPenalty;
|
|
174
|
+
if (this._presencePenalty !== undefined)
|
|
175
|
+
request.presence_penalty = this._presencePenalty;
|
|
176
|
+
if (this._seed !== undefined)
|
|
177
|
+
request.seed = this._seed;
|
|
178
|
+
if (this._stopSequences)
|
|
179
|
+
request.stop_sequences = this._stopSequences;
|
|
180
|
+
if (this._tools)
|
|
181
|
+
request.tools = this._tools;
|
|
182
|
+
if (this._toolChoice)
|
|
183
|
+
request.tool_choice = this._toolChoice;
|
|
184
|
+
if (this._responseFormat)
|
|
185
|
+
request.response_format = this._responseFormat;
|
|
186
|
+
if (this._metadata !== undefined)
|
|
187
|
+
request.metadata = this._metadata;
|
|
188
|
+
if (this._serviceTier)
|
|
189
|
+
request.service_tier = this._serviceTier;
|
|
190
|
+
if (this._threadId)
|
|
191
|
+
request.thread_id = this._threadId;
|
|
192
|
+
if (this._branch)
|
|
193
|
+
request.branch = this._branch;
|
|
194
|
+
return request;
|
|
195
|
+
}
|
|
196
|
+
/** Build and send the request, returning the complete {@link HoloResponse}. */
|
|
197
|
+
async send() {
|
|
198
|
+
return this.sendFn(this.build());
|
|
199
|
+
}
|
|
200
|
+
/** Build and send the request as a streaming call, returning a {@link HoloStream}. */
|
|
201
|
+
async stream() {
|
|
202
|
+
const request = this.build();
|
|
203
|
+
request.stream = true;
|
|
204
|
+
return this.streamFn(request);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/client/builder.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,kBAAkB;IAsBN;IACA;IAtBb,MAAM,CAAU;IAChB,YAAY,CAAU;IACtB,SAAS,GAAkB,EAAE,CAAC;IAC9B,YAAY,CAAU;IACtB,UAAU,CAAU;IACpB,KAAK,CAAU;IACf,KA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