@cognidesk/studio-contracts 0.0.1 → 0.0.3-dev.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.
Files changed (2) hide show
  1. package/README.md +109 -0
  2. package/package.json +7 -2
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ <div align="center">
2
+
3
+ # Cognidesk
4
+
5
+ **TypeScript runtime SDK for building customer support agents as code.**
6
+
7
+ [![SDK License](https://img.shields.io/badge/SDK-Apache--2.0-purple.svg)](LICENSES/Apache-2.0.txt)
8
+ [![Studio License](https://img.shields.io/badge/Studio-source--available-slate.svg)](LICENSES/Cognidesk-Studio-Source-Available-License.txt)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
10
+ [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
11
+
12
+ [Documentation](https://cognidesk.cognilabz.com) · [Quick Start](https://cognidesk.cognilabz.com/getting-started/quick-start/) · [Examples](https://cognidesk.cognilabz.com/examples/) · [API Reference](https://cognidesk.cognilabz.com/api-reference/)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## What is Cognidesk?
19
+
20
+ Cognidesk gives you full control over AI-powered customer support conversations — state machine journeys, typed tools, knowledge retrieval, and UI — without vendor lock-in. Core is transport-neutral: no HTTP, no framework, no runtime dependency baked in.
21
+
22
+ ```typescript
23
+ import { createAgent, createRuntime, tool } from "@cognidesk/core";
24
+ import { createSqliteStorage } from "@cognidesk/storage-sqlite";
25
+ import { z } from "zod";
26
+
27
+ const findTicket = tool("findTicket", {
28
+ input: z.object({ bookingReference: z.string() }),
29
+ output: z.object({ status: z.string() }),
30
+ execute: async ({ input }) => ({
31
+ status: `Ticket ${input.bookingReference} is confirmed.`,
32
+ }),
33
+ });
34
+
35
+ const agent = createAgent("support", {
36
+ instructions: "You are a helpful support agent.",
37
+ })
38
+ .tools.add(findTicket)
39
+ .compile();
40
+
41
+ const runtime = createRuntime({
42
+ storage: createSqliteStorage({ filename: "data.sqlite" }),
43
+ agent,
44
+ models,
45
+ });
46
+ ```
47
+
48
+ ## Features
49
+
50
+ - **State Machine Journeys** — deterministic conversation flows with typed context, guards, and alternate entries
51
+ - **Typed Tools & Knowledge** — Zod-validated inputs/outputs with source attribution
52
+ - **Transport Neutral** — core has zero HTTP dependencies; ship anywhere
53
+ - **React UI Kit** — drop-in chat widget with appearance configuration and custom widgets
54
+ - **Voice** — real-time voice via OpenAI Realtime with server-mediated connections
55
+ - **OpenTelemetry** — native spans, metrics, and pre-built Grafana dashboards
56
+ - **SSE Streaming** — real-time token streaming with synthetic deltas
57
+
58
+ ## Packages
59
+
60
+ | Package | Description |
61
+ |---------|-------------|
62
+ | `@cognidesk/core` | Runtime, agents, journeys, tools, knowledge, events |
63
+ | `@cognidesk/http` | HTTP + SSE transport adapter |
64
+ | `@cognidesk/model` | Model provider adapters (OpenAI, OpenRouter) |
65
+ | `@cognidesk/react` | React hooks and chat widget |
66
+ | `@cognidesk/ui` | Prebuilt UI components |
67
+ | `@cognidesk/storage-sqlite` | SQLite storage adapter |
68
+ | `@cognidesk/otel` | OpenTelemetry instrumentation |
69
+ | `@cognidesk/voice-openai` | OpenAI Realtime voice adapter |
70
+ | `@cognidesk/voice-websocket` | Voice WebSocket adapter |
71
+ | `@cognidesk/journey-index-json` | JSON-based journey index |
72
+
73
+ ## Quick start
74
+
75
+ ```bash
76
+ pnpm add @cognidesk/core @cognidesk/http @cognidesk/storage-sqlite
77
+ ```
78
+
79
+ Read the full [Quick Start guide →](https://cognidesk.cognilabz.com/getting-started/quick-start/)
80
+
81
+ ## Demo
82
+
83
+ Run the flight support demo:
84
+
85
+ ```bash
86
+ docker compose up --build
87
+ ```
88
+
89
+ Open `http://localhost:5173` for the frontend, `http://localhost:8787/api` for the API.
90
+
91
+ ## Development
92
+
93
+ ```bash
94
+ pnpm install
95
+ pnpm check
96
+ ```
97
+
98
+ See [docs/releasing.md](docs/releasing.md) for SDK dev and stable release flow.
99
+
100
+ ## Contributing
101
+
102
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, architecture decisions, and pull request guidelines.
103
+
104
+ ## License
105
+
106
+ The Cognidesk SDK packages are licensed under [Apache-2.0](LICENSES/Apache-2.0.txt).
107
+ Cognidesk Studio is source-available under the [Cognidesk Studio Source Available License](LICENSES/Cognidesk-Studio-Source-Available-License.txt).
108
+
109
+ See [LICENSE](LICENSE) for the repository license map.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognidesk/studio-contracts",
3
- "version": "0.0.1",
3
+ "version": "0.0.3-dev.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,5 +31,10 @@
31
31
  },
32
32
  "files": [
33
33
  "dist"
34
- ]
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/cognilabz/cognidesk",
38
+ "directory": "packages/studio-contracts"
39
+ }
35
40
  }