@acquiredintelligence/attend 0.0.0-stage → 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/README.md +580 -2
- package/dist/attend.d.ts +30 -0
- package/dist/attend.d.ts.map +1 -0
- package/dist/attend.js +428 -0
- package/dist/attend.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/ids.d.ts +12 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/ids.js +97 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/reducer.d.ts +26 -0
- package/dist/core/reducer.d.ts.map +1 -0
- package/dist/core/reducer.js +437 -0
- package/dist/core/reducer.js.map +1 -0
- package/dist/core/seen.d.ts +22 -0
- package/dist/core/seen.d.ts.map +1 -0
- package/dist/core/seen.js +61 -0
- package/dist/core/seen.js.map +1 -0
- package/dist/core/state.d.ts +12 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +90 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/step.d.ts +14 -0
- package/dist/core/step.d.ts.map +1 -0
- package/dist/core/step.js +17 -0
- package/dist/core/step.js.map +1 -0
- package/dist/core/threshold.d.ts +40 -0
- package/dist/core/threshold.d.ts.map +1 -0
- package/dist/core/threshold.js +72 -0
- package/dist/core/threshold.js.map +1 -0
- package/dist/core/types.d.ts +704 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +24 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/window.d.ts +38 -0
- package/dist/core/window.d.ts.map +1 -0
- package/dist/core/window.js +322 -0
- package/dist/core/window.js.map +1 -0
- package/dist/decisions.d.ts +53 -0
- package/dist/decisions.d.ts.map +1 -0
- package/dist/decisions.js +115 -0
- package/dist/decisions.js.map +1 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +53 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/adapter.d.ts +21 -0
- package/dist/internal/adapter.d.ts.map +1 -0
- package/dist/internal/adapter.js +62 -0
- package/dist/internal/adapter.js.map +1 -0
- package/dist/internal/assert.d.ts +5 -0
- package/dist/internal/assert.d.ts.map +1 -0
- package/dist/internal/assert.js +14 -0
- package/dist/internal/assert.js.map +1 -0
- package/dist/internal/clock.d.ts +8 -0
- package/dist/internal/clock.d.ts.map +1 -0
- package/dist/internal/clock.js +38 -0
- package/dist/internal/clock.js.map +1 -0
- package/dist/internal/http.d.ts +42 -0
- package/dist/internal/http.d.ts.map +1 -0
- package/dist/internal/http.js +122 -0
- package/dist/internal/http.js.map +1 -0
- package/dist/internal/images.d.ts +18 -0
- package/dist/internal/images.d.ts.map +1 -0
- package/dist/internal/images.js +75 -0
- package/dist/internal/images.js.map +1 -0
- package/dist/internal/json.d.ts +3 -0
- package/dist/internal/json.d.ts.map +1 -0
- package/dist/internal/json.js +5 -0
- package/dist/internal/json.js.map +1 -0
- package/dist/internal/prompt.d.ts +31 -0
- package/dist/internal/prompt.d.ts.map +1 -0
- package/dist/internal/prompt.js +149 -0
- package/dist/internal/prompt.js.map +1 -0
- package/dist/internal/shared.d.ts +12 -0
- package/dist/internal/shared.d.ts.map +1 -0
- package/dist/internal/shared.js +134 -0
- package/dist/internal/shared.js.map +1 -0
- package/dist/jev.d.ts +74 -0
- package/dist/jev.d.ts.map +1 -0
- package/dist/jev.js +156 -0
- package/dist/jev.js.map +1 -0
- package/dist/llm.d.ts +164 -0
- package/dist/llm.d.ts.map +1 -0
- package/dist/llm.js +79 -0
- package/dist/llm.js.map +1 -0
- package/dist/mcp.d.ts +130 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +550 -0
- package/dist/mcp.js.map +1 -0
- package/dist/memory.d.ts +10 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +50 -0
- package/dist/memory.js.map +1 -0
- package/dist/postgres.d.ts +25 -0
- package/dist/postgres.d.ts.map +1 -0
- package/dist/postgres.js +56 -0
- package/dist/postgres.js.map +1 -0
- package/dist/redis.d.ts +20 -0
- package/dist/redis.d.ts.map +1 -0
- package/dist/redis.js +83 -0
- package/dist/redis.js.map +1 -0
- package/dist/server/compat.d.ts +13 -0
- package/dist/server/compat.d.ts.map +1 -0
- package/dist/server/compat.js +5 -0
- package/dist/server/compat.js.map +1 -0
- package/dist/server/cursor.d.ts +15 -0
- package/dist/server/cursor.d.ts.map +1 -0
- package/dist/server/cursor.js +50 -0
- package/dist/server/cursor.js.map +1 -0
- package/dist/server/events.d.ts +42 -0
- package/dist/server/events.d.ts.map +1 -0
- package/dist/server/events.js +189 -0
- package/dist/server/events.js.map +1 -0
- package/dist/server/fanout.d.ts +28 -0
- package/dist/server/fanout.d.ts.map +1 -0
- package/dist/server/fanout.js +184 -0
- package/dist/server/fanout.js.map +1 -0
- package/dist/server/guard.d.ts +19 -0
- package/dist/server/guard.d.ts.map +1 -0
- package/dist/server/guard.js +27 -0
- package/dist/server/guard.js.map +1 -0
- package/dist/server/http.d.ts +4 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +323 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/ingest.d.ts +4 -0
- package/dist/server/ingest.d.ts.map +1 -0
- package/dist/server/ingest.js +400 -0
- package/dist/server/ingest.js.map +1 -0
- package/dist/server/install.d.ts +5 -0
- package/dist/server/install.d.ts.map +1 -0
- package/dist/server/install.js +91 -0
- package/dist/server/install.js.map +1 -0
- package/dist/server/poll.d.ts +4 -0
- package/dist/server/poll.d.ts.map +1 -0
- package/dist/server/poll.js +45 -0
- package/dist/server/poll.js.map +1 -0
- package/dist/server/serve.d.ts +19 -0
- package/dist/server/serve.d.ts.map +1 -0
- package/dist/server/serve.js +238 -0
- package/dist/server/serve.js.map +1 -0
- package/dist/server/sessions.d.ts +14 -0
- package/dist/server/sessions.d.ts.map +1 -0
- package/dist/server/sessions.js +54 -0
- package/dist/server/sessions.js.map +1 -0
- package/dist/server/stream.d.ts +11 -0
- package/dist/server/stream.d.ts.map +1 -0
- package/dist/server/stream.js +216 -0
- package/dist/server/stream.js.map +1 -0
- package/dist/server/tools.d.ts +22 -0
- package/dist/server/tools.d.ts.map +1 -0
- package/dist/server/tools.js +55 -0
- package/dist/server/tools.js.map +1 -0
- package/dist/server/types.d.ts +351 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +5 -0
- package/dist/server/types.js.map +1 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +10 -0
- package/dist/server.js.map +1 -0
- package/dist/shell/budget.d.ts +4 -0
- package/dist/shell/budget.d.ts.map +1 -0
- package/dist/shell/budget.js +5 -0
- package/dist/shell/budget.js.map +1 -0
- package/dist/shell/copy.d.ts +17 -0
- package/dist/shell/copy.d.ts.map +1 -0
- package/dist/shell/copy.js +67 -0
- package/dist/shell/copy.js.map +1 -0
- package/dist/shell/decisions.d.ts +6 -0
- package/dist/shell/decisions.d.ts.map +1 -0
- package/dist/shell/decisions.js +42 -0
- package/dist/shell/decisions.js.map +1 -0
- package/dist/shell/read.d.ts +7 -0
- package/dist/shell/read.d.ts.map +1 -0
- package/dist/shell/read.js +21 -0
- package/dist/shell/read.js.map +1 -0
- package/dist/shell/scheduler.d.ts +4 -0
- package/dist/shell/scheduler.d.ts.map +1 -0
- package/dist/shell/scheduler.js +90 -0
- package/dist/shell/scheduler.js.map +1 -0
- package/dist/shell/scope.d.ts +27 -0
- package/dist/shell/scope.d.ts.map +1 -0
- package/dist/shell/scope.js +343 -0
- package/dist/shell/scope.js.map +1 -0
- package/dist/shell/types.d.ts +156 -0
- package/dist/shell/types.d.ts.map +1 -0
- package/dist/shell/types.js +2 -0
- package/dist/shell/types.js.map +1 -0
- package/dist/sqlite.d.ts +14 -0
- package/dist/sqlite.d.ts.map +1 -0
- package/dist/sqlite.js +39 -0
- package/dist/sqlite.js.map +1 -0
- package/dist/step.d.ts +18 -0
- package/dist/step.d.ts.map +1 -0
- package/dist/step.js +14 -0
- package/dist/step.js.map +1 -0
- package/dist/store/memory.d.ts +12 -0
- package/dist/store/memory.d.ts.map +1 -0
- package/dist/store/memory.js +264 -0
- package/dist/store/memory.js.map +1 -0
- package/dist/store/postgres.d.ts +24 -0
- package/dist/store/postgres.d.ts.map +1 -0
- package/dist/store/postgres.js +364 -0
- package/dist/store/postgres.js.map +1 -0
- package/dist/store/redis.d.ts +12 -0
- package/dist/store/redis.d.ts.map +1 -0
- package/dist/store/redis.js +540 -0
- package/dist/store/redis.js.map +1 -0
- package/dist/store/sqlite-worker.d.ts +91 -0
- package/dist/store/sqlite-worker.d.ts.map +1 -0
- package/dist/store/sqlite-worker.js +322 -0
- package/dist/store/sqlite-worker.js.map +1 -0
- package/dist/store/sqlite.d.ts +34 -0
- package/dist/store/sqlite.d.ts.map +1 -0
- package/dist/store/sqlite.js +238 -0
- package/dist/store/sqlite.js.map +1 -0
- package/dist/store/types.d.ts +137 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +2 -0
- package/dist/store/types.js.map +1 -0
- package/dist/testing/conformance.d.ts +13 -0
- package/dist/testing/conformance.d.ts.map +1 -0
- package/dist/testing/conformance.js +542 -0
- package/dist/testing/conformance.js.map +1 -0
- package/dist/testing/wire.d.ts +16 -0
- package/dist/testing/wire.d.ts.map +1 -0
- package/dist/testing/wire.js +304 -0
- package/dist/testing/wire.js.map +1 -0
- package/dist/testing.d.ts +113 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +655 -0
- package/dist/testing.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +130 -4
- package/skills/attend/SKILL.md +231 -0
- package/skills/attend/references/judges.md +283 -0
- package/skills/attend/references/kinds.md +62 -0
- package/skills/attend/references/mcp.md +132 -0
- package/skills/attend/references/sinks.md +73 -0
- package/skills/attend/references/stores.md +90 -0
- package/skills/attend/references/testing.md +120 -0
package/dist/llm.d.ts
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `attend/llm`: a judge over any model that can reply in JSON matching a schema. There is no SDK
|
|
3
|
+
* dependency: you pass the one structured-output call as `complete`. When the judge input carries
|
|
4
|
+
* images, `complete` receives them as `images` to place after the prompt in the model's own block
|
|
5
|
+
* format.
|
|
6
|
+
*
|
|
7
|
+
* With `contextTokens`, the judge declares a budget, and a rendered window over it loses its
|
|
8
|
+
* oldest consequence and context events first; acts and flushes always stay. A rejection that
|
|
9
|
+
* names the context length is retried once with the window halved, so let a vendor SDK's error
|
|
10
|
+
* propagate from `complete` with its `status`.
|
|
11
|
+
*
|
|
12
|
+
* Anthropic:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import Anthropic from '@anthropic-ai/sdk';
|
|
16
|
+
* import { PermanentError } from '@acquiredintelligence/attend';
|
|
17
|
+
* import { llmJudge } from '@acquiredintelligence/attend/llm';
|
|
18
|
+
*
|
|
19
|
+
* const anthropic = new Anthropic();
|
|
20
|
+
*
|
|
21
|
+
* export const judge = llmJudge({
|
|
22
|
+
* complete: async ({ system, prompt, images, schema, signal }) => {
|
|
23
|
+
* const res = await anthropic.messages.create(
|
|
24
|
+
* {
|
|
25
|
+
* model: 'claude-opus-5-5',
|
|
26
|
+
* max_tokens: 1024,
|
|
27
|
+
* system,
|
|
28
|
+
* messages: [
|
|
29
|
+
* {
|
|
30
|
+
* role: 'user',
|
|
31
|
+
* content: [
|
|
32
|
+
* { type: 'text', text: prompt },
|
|
33
|
+
* ...images.map((image) => ({ type: 'image' as const, source: { type: 'base64' as const, media_type: image.mimeType, data: image.data } })),
|
|
34
|
+
* ],
|
|
35
|
+
* },
|
|
36
|
+
* ],
|
|
37
|
+
* output_config: { effort: 'low', format: { type: 'json_schema', schema } },
|
|
38
|
+
* },
|
|
39
|
+
* { signal },
|
|
40
|
+
* );
|
|
41
|
+
* if (res.stop_reason === 'refusal') throw new PermanentError('judge refused');
|
|
42
|
+
* const text = res.content.find((b) => b.type === 'text');
|
|
43
|
+
* return JSON.parse(text?.type === 'text' ? text.text : 'null');
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* OpenAI Responses API:
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* import OpenAI from 'openai';
|
|
52
|
+
* import { PermanentError } from '@acquiredintelligence/attend';
|
|
53
|
+
* import { llmJudge } from '@acquiredintelligence/attend/llm';
|
|
54
|
+
*
|
|
55
|
+
* const openai = new OpenAI();
|
|
56
|
+
*
|
|
57
|
+
* export const judge = llmJudge({
|
|
58
|
+
* complete: async ({ system, prompt, images, schema, signal }) => {
|
|
59
|
+
* const res = await openai.responses.create(
|
|
60
|
+
* {
|
|
61
|
+
* model: '<model id>',
|
|
62
|
+
* instructions: system,
|
|
63
|
+
* input: [
|
|
64
|
+
* {
|
|
65
|
+
* role: 'user',
|
|
66
|
+
* content: [
|
|
67
|
+
* { type: 'input_text', text: prompt },
|
|
68
|
+
* ...images.map((image) => ({ type: 'input_image' as const, image_url: `data:${image.mimeType};base64,${image.data}`, detail: 'auto' as const })),
|
|
69
|
+
* ],
|
|
70
|
+
* },
|
|
71
|
+
* ],
|
|
72
|
+
* text: { format: { type: 'json_schema', name: 'judgment', schema, strict: true } },
|
|
73
|
+
* },
|
|
74
|
+
* { signal },
|
|
75
|
+
* );
|
|
76
|
+
* if (res.output.some((item) => item.type === 'message' && item.content.some((part) => part.type === 'refusal'))) throw new PermanentError('judge refused');
|
|
77
|
+
* return JSON.parse(res.output_text);
|
|
78
|
+
* },
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* Gemini, through `@google/genai`. Unverified: written without the package installed, so check
|
|
83
|
+
* `generateContent` and the config fields against the version you use.
|
|
84
|
+
*
|
|
85
|
+
* ```ts
|
|
86
|
+
* import { GoogleGenAI } from '@google/genai';
|
|
87
|
+
* import { PermanentError } from '@acquiredintelligence/attend';
|
|
88
|
+
* import { llmJudge } from '@acquiredintelligence/attend/llm';
|
|
89
|
+
*
|
|
90
|
+
* const ai = new GoogleGenAI({});
|
|
91
|
+
*
|
|
92
|
+
* export const judge = llmJudge({
|
|
93
|
+
* complete: async ({ system, prompt, images, schema, signal }) => {
|
|
94
|
+
* const res = await ai.models.generateContent({
|
|
95
|
+
* model: '<model id>',
|
|
96
|
+
* contents: [{ role: 'user', parts: [{ text: prompt }, ...images.map((image) => ({ inlineData: { mimeType: image.mimeType, data: image.data } }))] }],
|
|
97
|
+
* config: { systemInstruction: system, responseMimeType: 'application/json', responseJsonSchema: schema, abortSignal: signal },
|
|
98
|
+
* });
|
|
99
|
+
* const finish = res.candidates?.[0]?.finishReason;
|
|
100
|
+
* if (res.promptFeedback?.blockReason !== undefined || (finish !== undefined && finish !== 'STOP' && finish !== 'MAX_TOKENS')) throw new PermanentError('judge refused');
|
|
101
|
+
* return JSON.parse(res.text ?? 'null');
|
|
102
|
+
* },
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* Vercel AI SDK. Unverified: written without the `ai` package installed, so check
|
|
107
|
+
* `generateObject` and `jsonSchema` against the version you use.
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { openai } from '@ai-sdk/openai';
|
|
111
|
+
* import { generateObject, jsonSchema } from 'ai';
|
|
112
|
+
* import { llmJudge } from '@acquiredintelligence/attend/llm';
|
|
113
|
+
*
|
|
114
|
+
* export const judge = llmJudge({
|
|
115
|
+
* complete: async ({ system, prompt, images, schema, signal }) => {
|
|
116
|
+
* const { object } = await generateObject({
|
|
117
|
+
* model: openai('<model id>'),
|
|
118
|
+
* system,
|
|
119
|
+
* messages: [{ role: 'user', content: [{ type: 'text', text: prompt }, ...images.map((image) => ({ type: 'image' as const, image: image.data, mediaType: image.mimeType }))] }],
|
|
120
|
+
* schema: jsonSchema(schema),
|
|
121
|
+
* abortSignal: signal,
|
|
122
|
+
* });
|
|
123
|
+
* return object;
|
|
124
|
+
* },
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
import type { JudgeBudget } from './core/types.js';
|
|
129
|
+
import { type JsonObject, type Judge, type JudgeImage, type JudgeInput, type Route } from './types.js';
|
|
130
|
+
export { DEFAULT_CRITERIA, DEFAULT_SYSTEM } from './internal/prompt.js';
|
|
131
|
+
export interface CompleteRequest {
|
|
132
|
+
system: string;
|
|
133
|
+
prompt: string;
|
|
134
|
+
/** From the judge input; empty when it carries none. Place them after the prompt. */
|
|
135
|
+
images: JudgeImage[];
|
|
136
|
+
/**
|
|
137
|
+
* JSON Schema for `{ route, probabilities, predicates }`. Strict-mode safe: every object sets
|
|
138
|
+
* `additionalProperties: false` and requires all of its properties. `predicates` is left out
|
|
139
|
+
* when no predicate is asked.
|
|
140
|
+
*/
|
|
141
|
+
schema: JsonObject;
|
|
142
|
+
signal: AbortSignal;
|
|
143
|
+
}
|
|
144
|
+
/** One structured-output call. Resolve with the parsed JSON reply; throw a `PermanentError` on a refusal, and let other errors propagate as thrown. */
|
|
145
|
+
export type Complete = (request: CompleteRequest) => Promise<unknown>;
|
|
146
|
+
export interface LlmJudgeOptions {
|
|
147
|
+
complete: Complete;
|
|
148
|
+
/** Replaces `DEFAULT_SYSTEM`. The routes on offer and their criteria are appended either way, since they change per call. */
|
|
149
|
+
system?: string;
|
|
150
|
+
/** Per-route criteria. A criterion on the judge input wins over these, and `DEFAULT_CRITERIA` fills the rest. */
|
|
151
|
+
criteria?: Partial<Record<Route, string>>;
|
|
152
|
+
/** The model's context window in tokens. Set it to declare a budget. */
|
|
153
|
+
contextTokens?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Builds the user prompt from the judge input, once its window is trimmed to the budget or halved.
|
|
156
|
+
* The default renders the window, facts, recent routes and predicate questions as compact JSON, 64 events per macrotask.
|
|
157
|
+
*/
|
|
158
|
+
render?: (input: JudgeInput) => string;
|
|
159
|
+
}
|
|
160
|
+
/** With `contextTokens`, `budget.reservedTokens` is measured from the system prompt with every route on offer, plus the schema. */
|
|
161
|
+
export declare function llmJudge(options: LlmJudgeOptions): Judge & {
|
|
162
|
+
budget?: JudgeBudget;
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=llm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8HG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAU,KAAK,UAAU,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAoC,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjJ,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB;;;;OAIG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,uJAAuJ;AACvJ,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,6HAA6H;IAC7H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;CACxC;AAED,mIAAmI;AACnI,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,KAAK,GAAG;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,CAkCnF"}
|
package/dist/llm.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { DEFAULT_SYSTEM, renderBytes, renderWithin, resolveCriteria, sendHalving, stateText, tokensOf } from './internal/prompt.js';
|
|
2
|
+
import { isRecord } from './internal/shared.js';
|
|
3
|
+
import { ROUTES } from './types.js';
|
|
4
|
+
export { DEFAULT_CRITERIA, DEFAULT_SYSTEM } from './internal/prompt.js';
|
|
5
|
+
/** With `contextTokens`, `budget.reservedTokens` is measured from the system prompt with every route on offer, plus the schema. */
|
|
6
|
+
export function llmJudge(options) {
|
|
7
|
+
const { complete, system = DEFAULT_SYSTEM, criteria, render, contextTokens } = options;
|
|
8
|
+
const reservedTokens = tokensOf(systemPrompt(system, resolveCriteria(ROUTES.map((route) => ({ route })), criteria), true) + JSON.stringify(judgmentSchema([...ROUTES], [])));
|
|
9
|
+
if (contextTokens !== undefined && !(contextTokens > reservedTokens))
|
|
10
|
+
throw new RangeError(`llmJudge: contextTokens must be more than the ${reservedTokens} tokens its own prompt takes, got ${contextTokens}`);
|
|
11
|
+
const budget = contextTokens === undefined ? undefined : { contextTokens, reservedTokens };
|
|
12
|
+
const judge = async (input, signal) => {
|
|
13
|
+
const routes = resolveCriteria(input.routes, criteria);
|
|
14
|
+
const offered = routes.map((r) => r.route);
|
|
15
|
+
const asked = input.predicates.map((p) => p.name);
|
|
16
|
+
const rendered = await renderWithin(input, renderBytes(budget), signal);
|
|
17
|
+
signal.throwIfAborted();
|
|
18
|
+
const reply = await sendHalving(rendered, (r) => complete({
|
|
19
|
+
system: systemPrompt(system, routes, asked.length > 0),
|
|
20
|
+
prompt: render === undefined ? stateText(r) : render(r.input),
|
|
21
|
+
images: input.images ?? [],
|
|
22
|
+
schema: judgmentSchema(offered, asked),
|
|
23
|
+
signal,
|
|
24
|
+
}));
|
|
25
|
+
return parseReply(reply, offered, asked);
|
|
26
|
+
};
|
|
27
|
+
if (budget !== undefined)
|
|
28
|
+
judge.budget = budget;
|
|
29
|
+
return judge;
|
|
30
|
+
}
|
|
31
|
+
function systemPrompt(base, routes, asksPredicates) {
|
|
32
|
+
const answer = asksPredicates
|
|
33
|
+
? 'Answer with the route you choose, a probability from 0 to 1 for each route on offer, and for each entry under predicates the probability from 0 to 1 that the answer to its question is yes.'
|
|
34
|
+
: 'Answer with the route you choose and a probability from 0 to 1 for each route on offer.';
|
|
35
|
+
return [base, '', 'Routes on offer:', ...routes.map((r) => `- ${r.route}: ${r.criterion}`), '', answer].join('\n');
|
|
36
|
+
}
|
|
37
|
+
/** No `minimum`/`maximum`: Anthropic's structured outputs reject numeric bounds, so the range lives in the system prompt. */
|
|
38
|
+
function judgmentSchema(routes, predicates) {
|
|
39
|
+
const numbers = (keys) => ({
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: Object.fromEntries(keys.map((key) => [key, { type: 'number' }])),
|
|
42
|
+
required: keys,
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
});
|
|
45
|
+
const properties = { route: { type: 'string', enum: routes }, probabilities: numbers(routes) };
|
|
46
|
+
if (predicates.length > 0)
|
|
47
|
+
properties.predicates = numbers(predicates);
|
|
48
|
+
return { type: 'object', properties, required: Object.keys(properties), additionalProperties: false };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Only the route is load-bearing. Probabilities and predicates keep the finite numbers found
|
|
52
|
+
* under known keys and drop the rest, because the reducer renormalises and a garbled ride-along
|
|
53
|
+
* should not cost a retry.
|
|
54
|
+
*/
|
|
55
|
+
function parseReply(reply, routes, predicates) {
|
|
56
|
+
if (!isRecord(reply))
|
|
57
|
+
throw new Error(`llmJudge: expected a JSON object, got ${describe(reply)}`);
|
|
58
|
+
const route = routes.find((r) => r === reply.route);
|
|
59
|
+
if (route === undefined)
|
|
60
|
+
throw new Error(`llmJudge: route ${JSON.stringify(reply.route)} is not one of ${routes.join(', ')}`);
|
|
61
|
+
return { route, probabilities: numbersAt(reply.probabilities, routes), predicates: numbersAt(reply.predicates, predicates) };
|
|
62
|
+
}
|
|
63
|
+
function numbersAt(value, keys) {
|
|
64
|
+
const out = {};
|
|
65
|
+
if (!isRecord(value))
|
|
66
|
+
return out;
|
|
67
|
+
for (const key of keys) {
|
|
68
|
+
const n = value[key];
|
|
69
|
+
if (typeof n === 'number' && Number.isFinite(n))
|
|
70
|
+
out[key] = n;
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
function describe(value) {
|
|
75
|
+
if (value === null)
|
|
76
|
+
return 'null';
|
|
77
|
+
return Array.isArray(value) ? 'an array' : typeof value;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=llm.js.map
|
package/dist/llm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAgIA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACpI,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,EAA+G,MAAM,YAAY,CAAC;AAEjJ,OAAO,EAAE,gBAAgB,EAAE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E,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC;AAC/H,CAAC;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,IAAc;IAC/C,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;AAC1D,CAAC"}
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `attend/mcp`: an MCP Events subscription (`events/stream` or `events/poll`) as a
|
|
3
|
+
* `Source`. Peer dependency: `@modelcontextprotocol/sdk`. The draft's wire shapes stay
|
|
4
|
+
* inside this module; the public surface takes an SDK `Client` and emits domain events.
|
|
5
|
+
*
|
|
6
|
+
* The source installs one notification handler on the Client for each of the five
|
|
7
|
+
* `notifications/events/*` methods (`active`, `event`, `heartbeat`, `error`, `terminated`)
|
|
8
|
+
* the first time it is used on that Client, and routes by subscription id from there. The
|
|
9
|
+
* app must not replace those handlers.
|
|
10
|
+
*
|
|
11
|
+
* When the Client's transport closes, the SDK fails every open request with
|
|
12
|
+
* `ConnectionClosed` (-32000). The source turns that into a `PermanentError`, so `attach`
|
|
13
|
+
* rejects: the app must reconnect the Client (or make a new one) and attach again. A source
|
|
14
|
+
* waiting between polls or before a reopen is woken by the close and rejects the same way.
|
|
15
|
+
*/
|
|
16
|
+
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
17
|
+
import type { AttendEventName, AttentionDeadLetterData, AttentionDecisionData, DeadLetterArguments, DecisionArguments } from './server/types.js';
|
|
18
|
+
import type { Clock, JsonObject, Source } from './types.js';
|
|
19
|
+
export interface McpEventsOptions {
|
|
20
|
+
/** An event name from `events/list`. */
|
|
21
|
+
name: string;
|
|
22
|
+
arguments?: JsonObject;
|
|
23
|
+
/** `auto` streams when `events/list` says the event supports `push`, else polls. Default `auto`. */
|
|
24
|
+
mode?: 'stream' | 'poll' | 'auto';
|
|
25
|
+
/** Bound on replay when resuming from a cursor; passed through as `maxAgeMs`. */
|
|
26
|
+
maxAgeMs?: number;
|
|
27
|
+
/** Poll page size; passed through as `maxEvents`. */
|
|
28
|
+
maxEvents?: number;
|
|
29
|
+
/** Poll interval when the server sends no `nextPollMs`. Default 10000. */
|
|
30
|
+
pollMs?: number;
|
|
31
|
+
/**
|
|
32
|
+
* How many stream notifications may wait while `emit` persists earlier ones. Past that, the
|
|
33
|
+
* source stops the stream, persists everything it holds, reports `overflow`, and reopens from
|
|
34
|
+
* the committed cursor, so the server sends the rest again. Notifications that arrive after
|
|
35
|
+
* the stop are lost only for an event type the server cannot replay from a cursor. Default 1000.
|
|
36
|
+
*/
|
|
37
|
+
maxBuffered?: number;
|
|
38
|
+
/**
|
|
39
|
+
* How long a stream may go without any notification, heartbeats included, before the source
|
|
40
|
+
* treats it as dead: it reports `idle`, aborts the stream and reopens from the committed
|
|
41
|
+
* cursor. Default 300000.
|
|
42
|
+
*/
|
|
43
|
+
idleTimeoutMs?: number;
|
|
44
|
+
clock?: Clock;
|
|
45
|
+
/** Everything the source survives: a server error notification, a skipped payload, an overflow, an idle stream, a stray notification. */
|
|
46
|
+
onError?: (error: McpEventsError) => void;
|
|
47
|
+
}
|
|
48
|
+
export type McpEventsError =
|
|
49
|
+
/** The server's `notifications/events/error`; the stream stays open. */
|
|
50
|
+
{
|
|
51
|
+
kind: 'stream';
|
|
52
|
+
code: number;
|
|
53
|
+
message: string;
|
|
54
|
+
data: unknown;
|
|
55
|
+
}
|
|
56
|
+
/** A payload that failed validation and was skipped, with its cursor kept. */
|
|
57
|
+
| {
|
|
58
|
+
kind: 'malformed';
|
|
59
|
+
method: string;
|
|
60
|
+
message: string;
|
|
61
|
+
payload: unknown;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* `buffered` notifications were waiting on `emit`; they are persisted, then the stream reopens
|
|
65
|
+
* from the committed cursor after `reopenMs`: at once when the overflowed stream moved that
|
|
66
|
+
* cursor, else after the reopen pause, since a server that cannot resume from a cursor would
|
|
67
|
+
* send the same backlog again.
|
|
68
|
+
*/
|
|
69
|
+
| {
|
|
70
|
+
kind: 'overflow';
|
|
71
|
+
buffered: number;
|
|
72
|
+
reopenMs: number;
|
|
73
|
+
}
|
|
74
|
+
/** Nothing arrived for `idleTimeoutMs`; the stream reopens from the committed cursor. */
|
|
75
|
+
| {
|
|
76
|
+
kind: 'idle';
|
|
77
|
+
}
|
|
78
|
+
/** A notification on this Client named a subscription that no live stream here opened. */
|
|
79
|
+
| {
|
|
80
|
+
kind: 'unrouted';
|
|
81
|
+
method: string;
|
|
82
|
+
subscriptionId: string | null;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* One subscription (name + arguments) as a `Source`, keyed `mcp:<name>:<arguments as sorted
|
|
86
|
+
* JSON>`. It holds no cursor of its own: every emit carries the server's cursor, the record
|
|
87
|
+
* persists it, and every open resumes from the committed one. `eventId` becomes `Event.id`, so
|
|
88
|
+
* the record's seen ring dedups redelivery. `truncated` becomes the batch's `truncated`, which
|
|
89
|
+
* marks the window as a gap.
|
|
90
|
+
*
|
|
91
|
+
* The subscription runs until `signal` aborts. A terminated or idle stream reopens from the last
|
|
92
|
+
* committed cursor after a short pause; an overflowed one at once, when it moved that cursor. A request error that the server says to
|
|
93
|
+
* retry (-32025, a request timeout) is thrown as a plain Error, so `attach` backs off through the
|
|
94
|
+
* app's `retryBackoffMs` and resubscribes; any other error, and a closed Client, is thrown as a
|
|
95
|
+
* `PermanentError` with the SDK error as its `cause`, and `attach` rejects.
|
|
96
|
+
*/
|
|
97
|
+
export declare function mcpEventsSource(client: Client, options: McpEventsOptions): Source;
|
|
98
|
+
/** Options for consuming decisions with a durable cursor. */
|
|
99
|
+
export interface DecisionFeedOptions {
|
|
100
|
+
/** Default 'attention.decision'. */
|
|
101
|
+
name?: AttendEventName;
|
|
102
|
+
arguments?: DecisionArguments | DeadLetterArguments;
|
|
103
|
+
/** The last cursor persisted. Null starts from now. */
|
|
104
|
+
cursor: string | null;
|
|
105
|
+
maxAgeMs?: number;
|
|
106
|
+
/** `auto` streams when `events/list` offers push, else polls. Default `auto`. */
|
|
107
|
+
mode?: 'stream' | 'poll' | 'auto';
|
|
108
|
+
/** A stream with no frame for this long counts as dead (twice the heartbeat). Default 30,000. */
|
|
109
|
+
idleTimeoutMs?: number;
|
|
110
|
+
signal: AbortSignal;
|
|
111
|
+
}
|
|
112
|
+
/** Persist `cursor` from every item, `cursor` items included, before acting on the next one. Dedup on `eventId`. */
|
|
113
|
+
export type DecisionFeedItem = {
|
|
114
|
+
kind: 'decision';
|
|
115
|
+
eventId: string;
|
|
116
|
+
data: AttentionDecisionData;
|
|
117
|
+
cursor: string | null;
|
|
118
|
+
} | {
|
|
119
|
+
kind: 'deadLetter';
|
|
120
|
+
eventId: string;
|
|
121
|
+
data: AttentionDeadLetterData;
|
|
122
|
+
cursor: string | null;
|
|
123
|
+
} | {
|
|
124
|
+
kind: 'cursor';
|
|
125
|
+
cursor: string | null;
|
|
126
|
+
truncated: boolean;
|
|
127
|
+
};
|
|
128
|
+
/** Subscribes through `mcpEventsSource` and yields one item at a time; the subscription waits while the caller handles an item. */
|
|
129
|
+
export declare function decisionFeed(client: Client, options: DecisionFeedOptions): AsyncIterable<DecisionFeedItem>;
|
|
130
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AASxE,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACjJ,OAAO,KAAK,EAAE,KAAK,EAAS,UAAU,EAAE,MAAM,EAAe,MAAM,YAAY,CAAC;AAEhF,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,oGAAoG;IACpG,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,yIAAyI;IACzI,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,MAAM,cAAc;AACxB,wEAAwE;AACtE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE;AAClE,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