@smooai/smooth-operator-core 0.10.0 → 0.10.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.
Files changed (85) hide show
  1. package/dist/agent.d.ts +276 -0
  2. package/dist/agent.d.ts.map +1 -0
  3. package/dist/agent.js +450 -0
  4. package/dist/agent.js.map +1 -0
  5. package/dist/cast.d.ts +81 -0
  6. package/dist/cast.d.ts.map +1 -0
  7. package/dist/cast.js +103 -0
  8. package/dist/cast.js.map +1 -0
  9. package/dist/checkpoint.d.ts +25 -0
  10. package/dist/checkpoint.d.ts.map +1 -0
  11. package/dist/checkpoint.js +23 -0
  12. package/dist/checkpoint.js.map +1 -0
  13. package/dist/compaction.d.ts +21 -0
  14. package/dist/compaction.d.ts.map +1 -0
  15. package/dist/compaction.js +50 -0
  16. package/dist/compaction.js.map +1 -0
  17. package/dist/cost.d.ts +34 -0
  18. package/dist/cost.d.ts.map +1 -0
  19. package/dist/cost.js +42 -0
  20. package/dist/cost.js.map +1 -0
  21. package/dist/extension/host.d.ts +199 -0
  22. package/dist/extension/host.d.ts.map +1 -0
  23. package/dist/extension/host.js +502 -0
  24. package/dist/extension/host.js.map +1 -0
  25. package/dist/extension/index.d.ts +36 -0
  26. package/dist/extension/index.d.ts.map +1 -0
  27. package/dist/extension/index.js +37 -0
  28. package/dist/extension/index.js.map +1 -0
  29. package/dist/extension/manifest.d.ts +111 -0
  30. package/dist/extension/manifest.d.ts.map +1 -0
  31. package/dist/extension/manifest.js +190 -0
  32. package/dist/extension/manifest.js.map +1 -0
  33. package/dist/extension/process.d.ts +118 -0
  34. package/dist/extension/process.d.ts.map +1 -0
  35. package/dist/extension/process.js +352 -0
  36. package/dist/extension/process.js.map +1 -0
  37. package/dist/extension/protocol.d.ts +254 -0
  38. package/dist/extension/protocol.d.ts.map +1 -0
  39. package/dist/extension/protocol.js +127 -0
  40. package/dist/extension/protocol.js.map +1 -0
  41. package/dist/extension/tool_proxy.d.ts +34 -0
  42. package/dist/extension/tool_proxy.d.ts.map +1 -0
  43. package/dist/extension/tool_proxy.js +48 -0
  44. package/dist/extension/tool_proxy.js.map +1 -0
  45. package/dist/humanGate.d.ts +44 -0
  46. package/dist/humanGate.d.ts.map +1 -0
  47. package/dist/humanGate.js +30 -0
  48. package/dist/humanGate.js.map +1 -0
  49. package/dist/index.d.ts +32 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +21 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/knowledge.d.ts +30 -0
  54. package/dist/knowledge.d.ts.map +1 -0
  55. package/dist/knowledge.js +43 -0
  56. package/dist/knowledge.js.map +1 -0
  57. package/dist/llmProvider.d.ts +106 -0
  58. package/dist/llmProvider.d.ts.map +1 -0
  59. package/dist/llmProvider.js +160 -0
  60. package/dist/llmProvider.js.map +1 -0
  61. package/dist/memory.d.ts +23 -0
  62. package/dist/memory.d.ts.map +1 -0
  63. package/dist/memory.js +40 -0
  64. package/dist/memory.js.map +1 -0
  65. package/dist/rerank.d.ts +27 -0
  66. package/dist/rerank.d.ts.map +1 -0
  67. package/dist/rerank.js +45 -0
  68. package/dist/rerank.js.map +1 -0
  69. package/dist/thread.d.ts +43 -0
  70. package/dist/thread.d.ts.map +1 -0
  71. package/dist/thread.js +60 -0
  72. package/dist/thread.js.map +1 -0
  73. package/dist/toolSearch.d.ts +55 -0
  74. package/dist/toolSearch.d.ts.map +1 -0
  75. package/dist/toolSearch.js +110 -0
  76. package/dist/toolSearch.js.map +1 -0
  77. package/dist/vector.d.ts +36 -0
  78. package/dist/vector.d.ts.map +1 -0
  79. package/dist/vector.js +75 -0
  80. package/dist/vector.js.map +1 -0
  81. package/dist/workflow.d.ts +62 -0
  82. package/dist/workflow.d.ts.map +1 -0
  83. package/dist/workflow.js +109 -0
  84. package/dist/workflow.js.map +1 -0
  85. package/package.json +1 -1
@@ -0,0 +1,276 @@
1
+ /**
2
+ * The TypeScript smooth-operator core: a native agentic loop.
3
+ *
4
+ * Phase-0 sibling of the C# `SmoothAgent` (`dotnet/core`), the Python core
5
+ * (`python/core`), and the Rust reference engine. Drives an agentic tool-calling
6
+ * loop over any OpenAI-compatible chat client (the `openai` SDK pointed at a
7
+ * gateway): inject retrieved knowledge, call the model, run any requested tools,
8
+ * feed results back, and loop until the model answers without a tool call or the
9
+ * iteration budget is hit.
10
+ *
11
+ * Deliberately minimal (no compaction / budget / checkpointing yet) — those layer
12
+ * on exactly as they did when the C# core grew past Phase 0.
13
+ */
14
+ import type { Clearance } from './cast.js';
15
+ import type { CheckpointStore } from './checkpoint.js';
16
+ import type { SmoothAgentThread } from './thread.js';
17
+ import type { Memory } from './memory.js';
18
+ import type { Reranker } from './rerank.js';
19
+ import type { CostBudget, ModelPricing, Usage } from './cost.js';
20
+ import type { HumanGate } from './humanGate.js';
21
+ import type { Knowledge } from './knowledge.js';
22
+ /** A callable tool the agent may invoke. Mirrors the reference engines' tool seam. */
23
+ export interface Tool {
24
+ name: string;
25
+ description: string;
26
+ /** JSON Schema for the tool's arguments. */
27
+ parameters: Record<string, unknown>;
28
+ execute(args: Record<string, unknown>): Promise<string>;
29
+ }
30
+ export interface AgentOptions {
31
+ instructions?: string;
32
+ model?: string;
33
+ maxIterations?: number;
34
+ maxTokens?: number;
35
+ temperature?: number;
36
+ knowledge?: Knowledge;
37
+ knowledgeTopK?: number;
38
+ /** Reranker applied to retrieved hits before injection (default: passthrough). */
39
+ reranker?: Reranker;
40
+ /** Candidate pool size to retrieve before reranking; when > knowledgeTopK, more docs are fetched, reranked, then trimmed. */
41
+ knowledgeCandidateK?: number;
42
+ /** Optional long-term memory; relevant entries are recalled into context each turn. */
43
+ memory?: Memory;
44
+ /** How many memory entries to recall per turn (default 4). */
45
+ memoryTopK?: number;
46
+ tools?: Tool[];
47
+ /**
48
+ * When `true` and an assistant turn returns ≥2 tool calls, dispatch them
49
+ * concurrently (`Promise.all`) instead of sequentially. The tool-result
50
+ * messages are still appended in the original `tool_calls` order, so the
51
+ * transcript stays deterministic regardless of completion order. Default
52
+ * `false` preserves the sequential behaviour. Per-tool semantics (clearance,
53
+ * human-gate approval, tool_search promotion, JSON parsing, error handling)
54
+ * are unchanged — only the dispatch loop runs in parallel.
55
+ */
56
+ parallelToolCalls?: boolean;
57
+ /**
58
+ * Deferred tools — registered but with their schemas HIDDEN from the model.
59
+ * When any are present, a built-in `tool_search` meta-tool is advertised in
60
+ * their place; the model calls it to fuzzy-match and promote the ones it needs,
61
+ * which then become visible + dispatchable on subsequent turns. Keeps the tool
62
+ * schema payload small when there are many rarely-used tools. An unpromoted
63
+ * deferred tool is NOT dispatchable.
64
+ */
65
+ deferredTools?: Tool[];
66
+ /**
67
+ * Approximate token budget for the context window. Before each model call,
68
+ * older non-system messages are dropped (sliding window) to stay under it.
69
+ * `0` disables compaction. Defaults to 8000.
70
+ */
71
+ maxContextTokens?: number;
72
+ /** Optional ceiling for the turn (token and/or USD). The turn stops early once a model call pushes usage/cost over the budget. */
73
+ budget?: CostBudget;
74
+ /** Per-model pricing override for cost accounting (defaults to DEFAULT_PRICING). */
75
+ pricing?: Record<string, ModelPricing>;
76
+ /** Optional store for persisting/resuming the conversation. Used with `conversationId`. */
77
+ checkpointStore?: CheckpointStore;
78
+ /** Conversation id for the checkpoint store (required to use checkpointing). */
79
+ conversationId?: string;
80
+ /**
81
+ * Optional tool-access policy. When set, a tool the clearance forbids is not
82
+ * dispatched — a "tool not permitted" result is returned to the model instead.
83
+ * Undefined allows every tool (the prior behaviour).
84
+ */
85
+ clearance?: Clearance;
86
+ /**
87
+ * Optional human-in-the-loop gate. When set, the agent asks it for approval before
88
+ * running any tool call for which {@link requiresApproval} returns true. A denied call
89
+ * is not executed; the model is told it was denied and can adapt.
90
+ */
91
+ humanGate?: HumanGate;
92
+ /**
93
+ * Which tool calls need human approval (e.g. writes / destructive actions), given the
94
+ * tool name and parsed arguments. Default: none. Only consulted when `humanGate` is set.
95
+ * Example: `requiresApproval: (name) => name === 'delete_record' || name === 'send_email'`.
96
+ */
97
+ requiresApproval?: (name: string, args: Record<string, unknown>) => boolean;
98
+ /**
99
+ * Number of ADDITIONAL attempts after the first if the model call throws a transient
100
+ * error (rate-limit, 5xx, dropped connection). `0` (the default) preserves today's
101
+ * behaviour: a single attempt, error propagates immediately. Only the model call is
102
+ * retried — never tool execution.
103
+ */
104
+ maxRetries?: number;
105
+ /**
106
+ * Base delay (milliseconds) for exponential backoff between retries. The wait before
107
+ * retry attempt `n` (1-indexed) is `retryBackoffMs * 2 ** (n - 1)`. Defaults to 200.
108
+ * Set to `0` to retry without sleeping (used by tests).
109
+ */
110
+ retryBackoffMs?: number;
111
+ }
112
+ export interface AgentRunResponse {
113
+ text: string;
114
+ iterations: number;
115
+ toolCalls: number;
116
+ usage: Usage;
117
+ costUsd: number;
118
+ /** True if the turn stopped because the cost/token budget was hit. */
119
+ budgetExceeded: boolean;
120
+ }
121
+ /**
122
+ * One streamed chunk from a streaming chat completion — the standard OpenAI
123
+ * `chat.completions` streaming chunk shape. `content` deltas concatenate into the
124
+ * assistant text; `tool_calls` fragments are assembled by their `index` (the `id`
125
+ * + `function.name` appear when the call first opens, `function.arguments` arrives
126
+ * in fragments). `usage` is sent by gateways on (typically) the final chunk.
127
+ */
128
+ export interface ChatChunk {
129
+ choices: Array<{
130
+ delta: {
131
+ content?: string | null;
132
+ tool_calls?: Array<{
133
+ index: number;
134
+ id?: string;
135
+ function?: {
136
+ name?: string;
137
+ arguments?: string;
138
+ };
139
+ }> | null;
140
+ };
141
+ }>;
142
+ usage?: {
143
+ prompt_tokens?: number | null;
144
+ completion_tokens?: number | null;
145
+ } | null;
146
+ }
147
+ /**
148
+ * The minimal shape of the OpenAI-compatible client the agent needs. The real
149
+ * `openai` SDK's `OpenAI` satisfies this; tests inject a fake.
150
+ *
151
+ * `chat.completions.create` is the non-streaming call the {@link SmoothAgent.run}
152
+ * loop uses. `createStream` is the optional streaming call the
153
+ * {@link SmoothAgent.runStream} loop uses — production wires it to the real SDK's
154
+ * `create({ ...body, stream: true })` (which returns an async-iterable of
155
+ * {@link ChatChunk}s). It is optional so non-streaming consumers and the existing
156
+ * fakes keep satisfying the interface; `runStream` throws if it is absent.
157
+ */
158
+ export interface ChatClientLike {
159
+ chat: {
160
+ completions: {
161
+ create(body: Record<string, unknown>): Promise<{
162
+ choices: Array<{
163
+ message: {
164
+ content: string | null;
165
+ tool_calls?: Array<{
166
+ id: string;
167
+ function: {
168
+ name: string;
169
+ arguments: string;
170
+ };
171
+ }> | null;
172
+ };
173
+ }>;
174
+ usage?: {
175
+ prompt_tokens?: number | null;
176
+ completion_tokens?: number | null;
177
+ } | null;
178
+ }>;
179
+ /**
180
+ * Streaming variant of {@link create}. Production wires this to the real
181
+ * `openai` SDK's `create({ ...body, stream: true })`, which returns an
182
+ * `AsyncIterable<ChatChunk>`. Optional so non-streaming clients still satisfy
183
+ * the seam; {@link SmoothAgent.runStream} requires it.
184
+ */
185
+ createStream?(body: Record<string, unknown>): AsyncIterable<ChatChunk>;
186
+ };
187
+ };
188
+ }
189
+ /**
190
+ * A streamed event from {@link SmoothAgent.runStream}. A tagged union discriminated
191
+ * on `type`, mirroring the C# `RunStreamingAsync` update sequence and the Rust
192
+ * reference engine's event stream:
193
+ *
194
+ * - `text` — an incremental assistant content delta as it streams in.
195
+ * - `tool_call`— a tool call the model requested, emitted once (after the model
196
+ * stream for the iteration completes) before it is dispatched.
197
+ * - `tool_result` — a tool's result, emitted after it finishes.
198
+ * - `done` — the single terminal event, carrying the same {@link AgentRunResponse}
199
+ * that {@link SmoothAgent.run} would return for the same script.
200
+ */
201
+ export type StreamEvent = {
202
+ type: 'text';
203
+ text: string;
204
+ } | {
205
+ type: 'tool_call';
206
+ name: string;
207
+ arguments: string;
208
+ } | {
209
+ type: 'tool_result';
210
+ name: string;
211
+ result: string;
212
+ } | {
213
+ type: 'done';
214
+ response: AgentRunResponse;
215
+ };
216
+ export declare class SmoothAgent {
217
+ private readonly client;
218
+ private readonly options;
219
+ private readonly toolsByName;
220
+ constructor(client: ChatClientLike, options?: AgentOptions);
221
+ private buildSystem;
222
+ private toolSpecs;
223
+ /**
224
+ * Run a single turn.
225
+ *
226
+ * `history` is prior OpenAI-format messages (multi-turn). `thread`, when given,
227
+ * is a {@link SmoothAgentThread} carrying the conversation across runs: the turn
228
+ * is seeded from the thread's messages, and this turn's new user + assistant
229
+ * (+ tool) messages are appended back to it before returning. The thread takes
230
+ * precedence over `history` as the prior context.
231
+ */
232
+ run(message: string, history?: Array<Record<string, unknown>>, thread?: SmoothAgentThread): Promise<AgentRunResponse>;
233
+ /**
234
+ * Stream a single turn, yielding incremental {@link StreamEvent}s as the model
235
+ * produces them. This drives the SAME agentic loop as {@link run} (system /
236
+ * knowledge / memory build, seed messages, per-iteration compaction, cost
237
+ * tracking, budget early-stop, deferred-tool specs, clearance + human-gate on
238
+ * dispatch, checkpoint/thread persistence on exit) — but calls the model in
239
+ * STREAMING mode and emits events as work happens:
240
+ *
241
+ * - a `text` event per non-empty content delta as it streams in;
242
+ * - a `tool_call` event per requested tool call, after that iteration's model
243
+ * stream ends, BEFORE the call is dispatched;
244
+ * - a `tool_result` event per tool, after it finishes (in original call order
245
+ * even when `parallelToolCalls` runs them concurrently);
246
+ * - exactly one terminal `done` event carrying the same {@link AgentRunResponse}
247
+ * {@link run} would return for the same script.
248
+ *
249
+ * NOTE: retry-with-backoff (`maxRetries`/`retryBackoffMs`) is intentionally NOT
250
+ * applied here — re-running the call after a mid-stream failure would re-emit
251
+ * already-yielded chunks. Retry stays scoped to non-streaming {@link run}; this
252
+ * mirrors the C# `RunStreamingAsync` decision.
253
+ */
254
+ runStream(message: string, history?: Array<Record<string, unknown>>, thread?: SmoothAgentThread): AsyncGenerator<StreamEvent>;
255
+ /**
256
+ * Invoke the model with bounded retry-with-exponential-backoff.
257
+ *
258
+ * On a transient error (anything the client throws — rate-limit, 5xx, dropped
259
+ * connection) the call is retried up to `maxRetries` additional times, waiting
260
+ * `retryBackoffMs * 2 ** (n - 1)` ms before the n-th (1-indexed) retry. If all
261
+ * attempts fail the LAST error propagates, so the turn fails exactly as it did
262
+ * before retries existed. Only this model call is retried — tool execution is not.
263
+ */
264
+ private callModel;
265
+ private dispatchTool;
266
+ }
267
+ /**
268
+ * Build a {@link Tool} that delegates a subtask to a child {@link SmoothAgent}.
269
+ *
270
+ * A sub-agent is just a tool backed by another agent: the model calls this tool
271
+ * with a `task` argument, the child agent runs that task, and the child's final
272
+ * reply becomes the tool result — composing with the existing tool loop, no special
273
+ * wiring. The child can have its own instructions, tools, knowledge, etc.
274
+ */
275
+ export declare function delegateTool(name: string, description: string, child: SmoothAgent, taskProperty?: string): Tool;
276
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,sFAAsF;AACtF,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,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