@frogbotai/protocol 0.0.0-stage → 0.34.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/README.md +20 -2
- package/dist/agents.d.ts +22 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +3 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.d.ts +2 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +3 -0
- package/dist/ai.js.map +1 -0
- package/dist/channels.d.ts +6 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +3 -0
- package/dist/channels.js.map +1 -0
- package/dist/chat.d.ts +12 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +3 -0
- package/dist/chat.js.map +1 -0
- package/dist/fields.d.ts +2 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +3 -0
- package/dist/fields.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FrogBot
|
|
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
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @frogbotai/protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The types-only contract shared by the [FrogBot](https://github.com/frogbotai/frogbot) server and its clients: turn states, turn error codes, the chat manifest, channel thread references and option colors.
|
|
4
|
+
|
|
5
|
+
It has no dependencies and no runtime code. `frogbot` and `@frogbotai/ui` both import these types, so a client can implement the chat contract without installing the server.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @frogbotai/protocol
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import type { ChatManifest, TurnState } from '@frogbotai/protocol';
|
|
17
|
+
|
|
18
|
+
export const idle: TurnState = 'idle';
|
|
19
|
+
|
|
20
|
+
export const manifest: ChatManifest = { defaultAgent: 'assistant', agents: [], transcribe: false };
|
|
21
|
+
```
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ModelModality } from './ai.js';
|
|
2
|
+
export type AgentProfile = {
|
|
3
|
+
name?: string;
|
|
4
|
+
avatar?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
};
|
|
7
|
+
export type AgentReasoningOption = {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
/** One agent in the chat manifest. `TModel` narrows model ids to an app's generated union. */
|
|
12
|
+
export type AgentManifestEntry<TModel extends string = string> = {
|
|
13
|
+
slug: string;
|
|
14
|
+
label: string;
|
|
15
|
+
source: 'config' | 'collection';
|
|
16
|
+
defaultModel: TModel;
|
|
17
|
+
models: TModel[];
|
|
18
|
+
names?: Partial<Record<TModel, string>>;
|
|
19
|
+
reasoning?: Partial<Record<TModel, AgentReasoningOption[]>>;
|
|
20
|
+
inputs?: Partial<Record<TModel, ModelModality[]>>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,8FAA8F;AAC9F,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAAI;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,YAAY,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;CACnD,CAAC"}
|
package/dist/agents.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/agents.ts"],"names":[],"mappings":"AAaA,4FAA4F,GAC5F,WASE","file":"agents.js"}
|
package/dist/ai.d.ts
ADDED
package/dist/ai.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC"}
|
package/dist/ai.js
ADDED
package/dist/ai.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ai.ts"],"names":[],"mappings":"AAAA,WAAyE","file":"ai.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../src/channels.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,MAAM,sBAAsB,CAAC,OAAO,GAAG,OAAO,IAAI;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC"}
|
package/dist/channels.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/channels.ts"],"names":[],"mappings":"AAAA,2FAA2F,GAC3F,WAGE","file":"channels.js"}
|
package/dist/chat.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentManifestEntry, AgentProfile } from './agents.js';
|
|
2
|
+
export type TurnState = 'idle' | 'running' | 'awaiting';
|
|
3
|
+
export type TurnErrorCode = 'already-settled' | 'call-not-found' | 'channel-chat' | 'forbidden' | 'invalid-output' | 'not-awaiting' | 'not-found' | 'not-queued' | 'pending-calls' | 'selection-unavailable' | 'turn-in-progress' | 'write-conflict';
|
|
4
|
+
/** What the chat UI loads from a backend before it renders: its agents and features. */
|
|
5
|
+
export type ChatManifest<TModel extends string = string> = {
|
|
6
|
+
defaultAgent: string;
|
|
7
|
+
agents: (AgentManifestEntry<TModel> & {
|
|
8
|
+
profile?: AgentProfile;
|
|
9
|
+
})[];
|
|
10
|
+
transcribe: boolean;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAExD,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,cAAc,GACd,WAAW,GACX,YAAY,GACZ,eAAe,GACf,uBAAuB,GACvB,kBAAkB,GAClB,gBAAgB,CAAC;AAErB,wFAAwF;AACxF,MAAM,MAAM,YAAY,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAAI;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC,EAAE,CAAC;IACpE,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
package/dist/chat.js
ADDED
package/dist/chat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/chat.ts"],"names":[],"mappings":"AAkBA,sFAAsF,GACtF,WAIE","file":"chat.js"}
|
package/dist/fields.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACrB,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC"}
|
package/dist/fields.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,WACgG","file":"fields.js"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { AgentManifestEntry, AgentProfile, AgentReasoningOption } from './agents.js';
|
|
2
|
+
export type { ModelModality } from './ai.js';
|
|
3
|
+
export type { ChannelThreadReference } from './channels.js';
|
|
4
|
+
export type { ChatManifest, TurnErrorCode, TurnState } from './chat.js';
|
|
5
|
+
export type { OptionColor } from './fields.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1F,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAIA,WAA+C","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/protocol",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.34.0",
|
|
4
|
+
"description": "Types-only contract shared by the FrogBot server and its clients.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Colby Gilbert",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/frogbotai/frogbot.git",
|
|
10
|
+
"directory": "packages/protocol"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/frogbotai/frogbot#readme",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "6.0.3"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "node ../../scripts/build-package.mjs",
|
|
35
|
+
"clean": "rm -rf dist",
|
|
36
|
+
"typecheck": "tsc --noEmit"
|
|
37
|
+
}
|
|
6
38
|
}
|