@crasi/bisque-conductor 0.0.0-stage → 0.3.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.
@@ -0,0 +1,49 @@
1
+ import type { LimitReason } from "./limits.js";
2
+ import type { CallType, ModelUsage } from "./model.js";
3
+ /**
4
+ * Usage events (decision D4: no billing code in v1, log tokens per tenant
5
+ * and call type). Ceiling hits are logged too, as the raw material for
6
+ * demand analytics (Flow D), along with refused requests and failed model
7
+ * calls. None of them carries the user's prompt.
8
+ */
9
+ export type UsageEvent = ({
10
+ kind: "model_call";
11
+ at: string;
12
+ app: string;
13
+ tenant: string;
14
+ callType: CallType;
15
+ model: string;
16
+ /** Set when a fallback chain answered: which provider it was. */
17
+ provider?: string;
18
+ latencyMs: number;
19
+ outcome: "proposal" | "theme" | "automation" | "ask" | "answer" | "limit" | "invalid" | "error";
20
+ } & ModelUsage) | {
21
+ kind: "ceiling";
22
+ at: string;
23
+ app: string;
24
+ tenant: string;
25
+ capability: string;
26
+ } | {
27
+ kind: "limited";
28
+ at: string;
29
+ app: string;
30
+ tenant: string;
31
+ reason: LimitReason;
32
+ } | {
33
+ kind: "model_error";
34
+ at: string;
35
+ app: string;
36
+ tenant: string;
37
+ callType: CallType;
38
+ provider: string;
39
+ latencyMs: number;
40
+ status: number | null;
41
+ error: string;
42
+ };
43
+ export interface UsageSink {
44
+ record(e: UsageEvent): void | Promise<void>;
45
+ }
46
+ export declare function memoryUsage(): UsageSink & {
47
+ events: UsageEvent[];
48
+ };
49
+ export declare function jsonlUsage(path: string): UsageSink;
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@crasi/bisque-conductor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.3.0",
4
+ "description": "Authoring service: propose-only model calls, validation, one repair turn",
5
+ "license": "MIT",
6
+ "author": "Crasi",
7
+ "homepage": "https://github.com/gogeorge/bisque#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/gogeorge/bisque.git",
11
+ "directory": "packages/conductor"
12
+ },
13
+ "bugs": "https://github.com/gogeorge/bisque/issues",
14
+ "keywords": [
15
+ "bisque",
16
+ "generative-ui",
17
+ "ai",
18
+ "llm",
19
+ "server",
20
+ "anthropic",
21
+ "hono"
22
+ ],
23
+ "type": "module",
24
+ "engines": {
25
+ "node": ">=20"
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/types/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ },
32
+ "./serve": {
33
+ "types": "./dist/types/serve.d.ts",
34
+ "default": "./dist/serve.js"
35
+ }
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "zod": "^4.6.7",
47
+ "@anthropic-ai/sdk": "^1.3.0",
48
+ "hono": "^4.13.16",
49
+ "@hono/node-server": "^2.1.5",
50
+ "@crasi/bisque-core": "0.3.0",
51
+ "@crasi/bisque-ir": "0.3.0",
52
+ "@crasi/bisque-contract": "0.3.0",
53
+ "@crasi/bisque-spec": "0.3.0"
54
+ },
55
+ "devDependencies": {
56
+ "esbuild": "^0.28.2"
57
+ },
58
+ "scripts": {
59
+ "typecheck": "tsc -p .",
60
+ "build:vercel": "esbuild server.ts --bundle --platform=node --format=esm --outfile=dist-vercel/index.js \"--banner:js=import{createRequire}from'node:module';const require=createRequire(import.meta.url);\""
61
+ },
62
+ "bin": {
63
+ "bisque-conductor": "./dist/serve.js"
64
+ }
6
65
  }