@agentick/core 0.0.1 → 0.1.9

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 (160) hide show
  1. package/dist/.tsbuildinfo.build +1 -1
  2. package/package.json +8 -3
  3. package/dist/.tsbuildinfo +0 -1
  4. package/dist/agent.d.ts +0 -32
  5. package/dist/agent.d.ts.map +0 -1
  6. package/dist/agent.js +0 -26
  7. package/dist/agent.js.map +0 -1
  8. package/dist/aidk-instance.d.ts +0 -294
  9. package/dist/aidk-instance.d.ts.map +0 -1
  10. package/dist/aidk-instance.js +0 -340
  11. package/dist/aidk-instance.js.map +0 -1
  12. package/dist/compiler/content-block-registry.d.ts +0 -11
  13. package/dist/compiler/content-block-registry.d.ts.map +0 -1
  14. package/dist/compiler/content-block-registry.js +0 -312
  15. package/dist/compiler/content-block-registry.js.map +0 -1
  16. package/dist/compiler/extractors.d.ts +0 -68
  17. package/dist/compiler/extractors.d.ts.map +0 -1
  18. package/dist/compiler/extractors.js +0 -547
  19. package/dist/compiler/extractors.js.map +0 -1
  20. package/dist/compiler/fiber.d.ts +0 -61
  21. package/dist/compiler/fiber.d.ts.map +0 -1
  22. package/dist/compiler/fiber.js +0 -244
  23. package/dist/compiler/fiber.js.map +0 -1
  24. package/dist/component/tentickle-component.d.ts +0 -185
  25. package/dist/component/tentickle-component.d.ts.map +0 -1
  26. package/dist/component/tentickle-component.js +0 -182
  27. package/dist/component/tentickle-component.js.map +0 -1
  28. package/dist/core/channel-helpers.d.ts +0 -31
  29. package/dist/core/channel-helpers.d.ts.map +0 -1
  30. package/dist/core/channel-helpers.js +0 -62
  31. package/dist/core/channel-helpers.js.map +0 -1
  32. package/dist/core/channel.d.ts +0 -164
  33. package/dist/core/channel.d.ts.map +0 -1
  34. package/dist/core/channel.js +0 -199
  35. package/dist/core/channel.js.map +0 -1
  36. package/dist/core/context.d.ts +0 -412
  37. package/dist/core/context.d.ts.map +0 -1
  38. package/dist/core/context.js +0 -290
  39. package/dist/core/context.js.map +0 -1
  40. package/dist/core/event-buffer.d.ts +0 -212
  41. package/dist/core/event-buffer.d.ts.map +0 -1
  42. package/dist/core/event-buffer.js +0 -346
  43. package/dist/core/event-buffer.js.map +0 -1
  44. package/dist/core/execution-helpers.d.ts +0 -179
  45. package/dist/core/execution-helpers.d.ts.map +0 -1
  46. package/dist/core/execution-helpers.js +0 -212
  47. package/dist/core/execution-helpers.js.map +0 -1
  48. package/dist/core/execution-tracker.d.ts +0 -53
  49. package/dist/core/execution-tracker.d.ts.map +0 -1
  50. package/dist/core/execution-tracker.js +0 -309
  51. package/dist/core/execution-tracker.js.map +0 -1
  52. package/dist/core/index.d.ts +0 -58
  53. package/dist/core/index.d.ts.map +0 -1
  54. package/dist/core/index.js +0 -58
  55. package/dist/core/index.js.map +0 -1
  56. package/dist/core/logger.d.ts +0 -341
  57. package/dist/core/logger.d.ts.map +0 -1
  58. package/dist/core/logger.js +0 -346
  59. package/dist/core/logger.js.map +0 -1
  60. package/dist/core/metrics-helpers.d.ts +0 -40
  61. package/dist/core/metrics-helpers.d.ts.map +0 -1
  62. package/dist/core/metrics-helpers.js +0 -72
  63. package/dist/core/metrics-helpers.js.map +0 -1
  64. package/dist/core/otel-provider.d.ts +0 -54
  65. package/dist/core/otel-provider.d.ts.map +0 -1
  66. package/dist/core/otel-provider.js +0 -107
  67. package/dist/core/otel-provider.js.map +0 -1
  68. package/dist/core/procedure-graph.d.ts +0 -136
  69. package/dist/core/procedure-graph.d.ts.map +0 -1
  70. package/dist/core/procedure-graph.js +0 -272
  71. package/dist/core/procedure-graph.js.map +0 -1
  72. package/dist/core/procedure.d.ts +0 -755
  73. package/dist/core/procedure.d.ts.map +0 -1
  74. package/dist/core/procedure.js +0 -899
  75. package/dist/core/procedure.js.map +0 -1
  76. package/dist/core/stream.d.ts +0 -106
  77. package/dist/core/stream.d.ts.map +0 -1
  78. package/dist/core/stream.js +0 -186
  79. package/dist/core/stream.js.map +0 -1
  80. package/dist/core/telemetry.d.ts +0 -182
  81. package/dist/core/telemetry.d.ts.map +0 -1
  82. package/dist/core/telemetry.js +0 -124
  83. package/dist/core/telemetry.js.map +0 -1
  84. package/dist/engine/execution-graph.d.ts +0 -104
  85. package/dist/engine/execution-graph.d.ts.map +0 -1
  86. package/dist/engine/execution-graph.js +0 -257
  87. package/dist/engine/execution-graph.js.map +0 -1
  88. package/dist/hooks/policy-context.d.ts.map +0 -1
  89. package/dist/jsx/components/agent.d.ts +0 -64
  90. package/dist/jsx/components/agent.d.ts.map +0 -1
  91. package/dist/jsx/components/agent.js +0 -80
  92. package/dist/jsx/components/agent.js.map +0 -1
  93. package/dist/model/simple-adapter.d.ts +0 -176
  94. package/dist/model/simple-adapter.d.ts.map +0 -1
  95. package/dist/model/simple-adapter.js +0 -264
  96. package/dist/model/simple-adapter.js.map +0 -1
  97. package/dist/state/boundary.d.ts +0 -347
  98. package/dist/state/boundary.d.ts.map +0 -1
  99. package/dist/state/boundary.js +0 -341
  100. package/dist/state/boundary.js.map +0 -1
  101. package/dist/state/context.d.ts +0 -138
  102. package/dist/state/context.d.ts.map +0 -1
  103. package/dist/state/context.js +0 -139
  104. package/dist/state/context.js.map +0 -1
  105. package/dist/state/hooks.d.ts +0 -798
  106. package/dist/state/hooks.d.ts.map +0 -1
  107. package/dist/state/hooks.js +0 -1437
  108. package/dist/state/hooks.js.map +0 -1
  109. package/dist/state/index.d.ts +0 -72
  110. package/dist/state/index.d.ts.map +0 -1
  111. package/dist/state/index.js +0 -73
  112. package/dist/state/index.js.map +0 -1
  113. package/dist/state/signal.d.ts +0 -223
  114. package/dist/state/signal.d.ts.map +0 -1
  115. package/dist/state/signal.js +0 -699
  116. package/dist/state/signal.js.map +0 -1
  117. package/dist/state/use-state.d.ts +0 -210
  118. package/dist/state/use-state.d.ts.map +0 -1
  119. package/dist/state/use-state.js +0 -327
  120. package/dist/state/use-state.js.map +0 -1
  121. package/dist/tentickle-instance.d.ts +0 -285
  122. package/dist/tentickle-instance.d.ts.map +0 -1
  123. package/dist/tentickle-instance.js +0 -700
  124. package/dist/tentickle-instance.js.map +0 -1
  125. package/dist/testing/test-model.d.ts +0 -132
  126. package/dist/testing/test-model.d.ts.map +0 -1
  127. package/dist/testing/test-model.js +0 -260
  128. package/dist/testing/test-model.js.map +0 -1
  129. package/dist/v2/reconciler/host-config.d.ts +0 -31
  130. package/dist/v2/reconciler/host-config.d.ts.map +0 -1
  131. package/dist/v2/reconciler/host-config.js +0 -197
  132. package/dist/v2/reconciler/host-config.js.map +0 -1
  133. package/dist/v2/reconciler/index.d.ts +0 -7
  134. package/dist/v2/reconciler/index.d.ts.map +0 -1
  135. package/dist/v2/reconciler/index.js +0 -7
  136. package/dist/v2/reconciler/index.js.map +0 -1
  137. package/dist/v2/reconciler/reconciler.d.ts +0 -39
  138. package/dist/v2/reconciler/reconciler.d.ts.map +0 -1
  139. package/dist/v2/reconciler/reconciler.js +0 -54
  140. package/dist/v2/reconciler/reconciler.js.map +0 -1
  141. package/dist/v2/reconciler/types.d.ts +0 -64
  142. package/dist/v2/reconciler/types.d.ts.map +0 -1
  143. package/dist/v2/reconciler/types.js +0 -20
  144. package/dist/v2/reconciler/types.js.map +0 -1
  145. package/dist/v2/renderers/index.d.ts +0 -7
  146. package/dist/v2/renderers/index.d.ts.map +0 -1
  147. package/dist/v2/renderers/index.js +0 -7
  148. package/dist/v2/renderers/index.js.map +0 -1
  149. package/dist/v2/renderers/markdown.d.ts +0 -16
  150. package/dist/v2/renderers/markdown.d.ts.map +0 -1
  151. package/dist/v2/renderers/markdown.js +0 -65
  152. package/dist/v2/renderers/markdown.js.map +0 -1
  153. package/dist/v2/renderers/types.d.ts +0 -26
  154. package/dist/v2/renderers/types.d.ts.map +0 -1
  155. package/dist/v2/renderers/types.js +0 -6
  156. package/dist/v2/renderers/types.js.map +0 -1
  157. package/dist/v2/renderers/xml.d.ts +0 -17
  158. package/dist/v2/renderers/xml.d.ts.map +0 -1
  159. package/dist/v2/renderers/xml.js +0 -73
  160. package/dist/v2/renderers/xml.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentick/core",
3
- "version": "0.0.1",
3
+ "version": "0.1.9",
4
4
  "description": "Core engine for Agentick",
5
5
  "keywords": [
6
6
  "agent",
@@ -29,13 +29,18 @@
29
29
  "react-reconciler": "^0.29.2",
30
30
  "zod": "^4.2.1",
31
31
  "zod-to-json-schema": "^3.25.1",
32
- "@agentick/kernel": "0.0.1",
33
- "@agentick/shared": "0.0.1"
32
+ "@agentick/kernel": "0.1.9",
33
+ "@agentick/shared": "0.1.9"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "^18.2.0",
37
37
  "@types/react-reconciler": "0.28.9"
38
38
  },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/agenticklabs/agentick.git",
42
+ "directory": "packages/core"
43
+ },
39
44
  "scripts": {
40
45
  "build": "tsc -p tsconfig.build.json",
41
46
  "test": "echo \"Tests run from workspace root\"",
package/dist/.tsbuildinfo DELETED
@@ -1 +0,0 @@
1
- {"fileNames":[],"fileInfos":[],"root":[],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"jsxImportSource":"react","module":200,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"version":"5.9.3"}
package/dist/agent.d.ts DELETED
@@ -1,32 +0,0 @@
1
- /**
2
- * createAgent — Level 0 entry point (no JSX required).
3
- *
4
- * Generates a component wrapping <Agent> and passes it to createApp.
5
- * Returns the same App interface as createApp.
6
- *
7
- * For programmatic control (hooks, conditional rendering, composition),
8
- * write a component with <Agent> and use createApp() instead.
9
- */
10
- import type { AppOptions, App } from "./app/types";
11
- import type { ToolClass } from "./tool/tool";
12
- import type { EngineModel } from "./model/model";
13
- import type { KnobDescriptor } from "./hooks/knob";
14
- /**
15
- * Configuration for creating an agent without writing JSX (Level 0).
16
- *
17
- * Pass to createAgent() to get a working App without writing components.
18
- * For programmatic control (conditional tools, hard knobs, custom
19
- * continuation), write a component with <Agent> instead (Level 1+).
20
- */
21
- export interface AgentConfig {
22
- /** System prompt. Rendered as a model-visible section. */
23
- system?: string;
24
- /** Model adapter. */
25
- model?: EngineModel;
26
- /** Tools (ToolClass values from createTool). */
27
- tools?: ToolClass[];
28
- /** Knobs — model-visible, model-settable parameters. */
29
- knobs?: Record<string, KnobDescriptor<any, any>>;
30
- }
31
- export declare function createAgent(config: AgentConfig, options?: AppOptions): App;
32
- //# sourceMappingURL=agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAMnD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;CAClD;AAMD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,GAAE,UAAe,GAAG,GAAG,CAW9E"}
package/dist/agent.js DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * createAgent — Level 0 entry point (no JSX required).
3
- *
4
- * Generates a component wrapping <Agent> and passes it to createApp.
5
- * Returns the same App interface as createApp.
6
- *
7
- * For programmatic control (hooks, conditional rendering, composition),
8
- * write a component with <Agent> and use createApp() instead.
9
- */
10
- import React from "react";
11
- import { Agent } from "./jsx/components/agent";
12
- import { createApp } from "./tentickle-instance";
13
- // ============================================================================
14
- // createAgent
15
- // ============================================================================
16
- export function createAgent(config, options = {}) {
17
- const ConfigAgent = () => React.createElement(Agent, {
18
- system: config.system,
19
- model: config.model,
20
- tools: config.tools,
21
- knobs: config.knobs,
22
- });
23
- ConfigAgent.displayName = "ConfigAgent";
24
- return createApp(ConfigAgent, options);
25
- }
26
- //# sourceMappingURL=agent.js.map
package/dist/agent.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA4BjD,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,UAAsB,EAAE;IACvE,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC;IACL,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;IAExC,OAAO,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC"}
@@ -1,294 +0,0 @@
1
- /**
2
- * Tentickle Configuration Instance
3
- *
4
- * `Tentickle` is the default global instance. Users interact with instances, never the class directly.
5
- *
6
- * ```typescript
7
- * import { Tentickle, createApp } from 'tentickle';
8
- *
9
- * // Configure global instance
10
- * Tentickle.use('*', loggingMiddleware);
11
- * Tentickle.use('tool:*', authMiddleware);
12
- *
13
- * // createApp uses Tentickle by default
14
- * const app = createApp(MyAgent, { model });
15
- *
16
- * // Create a scoped instance (inherits from Tentickle)
17
- * const scoped = Tentickle.create();
18
- * scoped.use('model:generate', rateLimitMiddleware);
19
- * const scopedApp = scoped.createApp(MyAgent, { model });
20
- *
21
- * // Create isolated instance (no inheritance)
22
- * const isolated = Tentickle.create({ inheritDefaults: false });
23
- * ```
24
- *
25
- * @module tentickle/@tentickle/instance
26
- */
27
- import { type Middleware, type TelemetryProvider, type DirectProcedure } from "./core";
28
- import type { App, AppInput, AppOptions, SessionExecutionHandle, ComponentFunction } from "./app/types";
29
- /**
30
- * Key for middleware registration.
31
- * - `'*'` - matches all procedures
32
- * - `'tool:*'` - matches all tool procedures
33
- * - `'tool:run'` - matches specific procedure
34
- * - `'model:generate'` - matches specific procedure
35
- */
36
- export type MiddlewareKey = string;
37
- /**
38
- * Options for creating an TentickleInstance.
39
- */
40
- export interface TentickleInstanceCreateOptions {
41
- /** Telemetry provider for tracing and metrics */
42
- telemetryProvider?: TelemetryProvider;
43
- /**
44
- * Whether to inherit middleware from the parent instance.
45
- * @default true
46
- */
47
- inheritDefaults?: boolean;
48
- }
49
- /**
50
- * Interface for middleware resolution.
51
- * This is what gets passed to context for procedures to read at execution time.
52
- */
53
- export interface MiddlewareRegistry {
54
- /**
55
- * Get middleware matching a procedure name.
56
- * Matches in order: '*', category wildcard ('tool:*'), exact name
57
- */
58
- getMiddlewareFor(procedureName: string): Middleware[];
59
- }
60
- /**
61
- * Handler type for the run procedure.
62
- * Generic P is the props type for the component.
63
- */
64
- type RunHandler = <P extends Record<string, unknown>>(element: {
65
- type: ComponentFunction<P>;
66
- props: P;
67
- key: string | null;
68
- }, input?: RunInput<P>) => SessionExecutionHandle;
69
- /**
70
- * Tentickle configuration instance.
71
- *
72
- * Users interact with instances, never the class directly.
73
- * `Tentickle` is the default global instance.
74
- */
75
- export declare class TentickleInstance implements MiddlewareRegistry {
76
- private middlewareRegistry;
77
- private _telemetryProvider?;
78
- /**
79
- * One-shot execution of a JSX component.
80
- *
81
- * This is a procedure with handleFactory: false (pass-through).
82
- * Returns SessionExecutionHandle which is both PromiseLike and AsyncIterable:
83
- * - `await run(...)` → SendResult
84
- * - `for await (const event of run(...))` → AppStreamEvent
85
- *
86
- * @example Await result
87
- * ```typescript
88
- * const result = await Tentickle.run(
89
- * <MyAgent />,
90
- * { messages: [{ role: "user", content: [...] }], model }
91
- * );
92
- * ```
93
- *
94
- * @example Stream events
95
- * ```typescript
96
- * for await (const event of Tentickle.run(<MyAgent />, { messages, model })) {
97
- * if (event.type === 'content_delta') {
98
- * process.stdout.write(event.delta);
99
- * }
100
- * }
101
- * ```
102
- *
103
- * @example Add middleware to run
104
- * ```typescript
105
- * const loggedRun = Tentickle.run.use(loggingMiddleware);
106
- * const result = await loggedRun(<MyAgent />, { messages, model });
107
- * ```
108
- */
109
- readonly run: DirectProcedure<RunHandler>;
110
- /**
111
- * @internal
112
- */
113
- constructor(options?: {
114
- telemetryProvider?: TelemetryProvider;
115
- });
116
- /**
117
- * Register middleware for a procedure pattern.
118
- *
119
- * Keys can be:
120
- * - `'*'` - all procedures
121
- * - `'tool:*'` - all tool procedures (tool:run, etc.)
122
- * - `'model:*'` - all model procedures (model:generate, model:stream)
123
- * - `'tool:run'` - specific procedure name
124
- * - `'model:generate'` - specific procedure name
125
- *
126
- * Middleware is executed in order: global → category → specific
127
- *
128
- * @param key - Procedure pattern to match
129
- * @param middleware - Middleware functions to register
130
- * @returns this for chaining
131
- *
132
- * @example
133
- * ```typescript
134
- * Tentickle
135
- * .use('*', loggingMiddleware)
136
- * .use('tool:*', authMiddleware)
137
- * .use('model:generate', rateLimitMiddleware);
138
- * ```
139
- */
140
- use(key: MiddlewareKey, ...middleware: Middleware[]): this;
141
- /**
142
- * Get middleware matching a procedure name.
143
- *
144
- * Resolution order:
145
- * 1. Global ('*')
146
- * 2. Category wildcard (e.g., 'tool:*' matches 'tool:run')
147
- * 3. Exact match (e.g., 'tool:run')
148
- *
149
- * @param procedureName - The procedure name to match (e.g., 'tool:run', 'model:generate')
150
- * @returns Array of middleware functions in execution order
151
- */
152
- getMiddlewareFor(procedureName: string): Middleware[];
153
- /**
154
- * Clear all registered middleware.
155
- * Useful for testing or resetting state.
156
- */
157
- clear(): this;
158
- /**
159
- * Get the telemetry provider.
160
- */
161
- get telemetryProvider(): TelemetryProvider | undefined;
162
- /**
163
- * Set the telemetry provider.
164
- */
165
- set telemetryProvider(provider: TelemetryProvider | undefined);
166
- /**
167
- * Create a child instance.
168
- *
169
- * By default, the child inherits all middleware from this instance.
170
- * Use `inheritDefaults: false` for a completely isolated instance.
171
- *
172
- * @param options - Instance options
173
- * @returns A new TentickleInstance
174
- *
175
- * @example
176
- * ```typescript
177
- * // Create scoped instance that inherits global middleware
178
- * const scoped = Tentickle.create();
179
- * scoped.use('model:generate', rateLimitMiddleware);
180
- * const app = scoped.createApp(MyAgent);
181
- *
182
- * // Create isolated instance (no inheritance)
183
- * const isolated = Tentickle.create({ inheritDefaults: false });
184
- * ```
185
- */
186
- create(options?: TentickleInstanceCreateOptions): TentickleInstance;
187
- /**
188
- * Create an app from a component function.
189
- *
190
- * The app inherits middleware from this Tentickle instance.
191
- *
192
- * @param Component - The component function that defines the Model Interface
193
- * @param options - App configuration options
194
- * @returns An App instance with run and createSession methods
195
- *
196
- * @example
197
- * ```typescript
198
- * const MyAgent = ({ query }) => (
199
- * <>
200
- * <System>You are helpful.</System>
201
- * <Timeline />
202
- * <User>{query}</User>
203
- * </>
204
- * );
205
- *
206
- * // Use global Tentickle
207
- * const app = createApp(MyAgent, { model });
208
- *
209
- * // Use scoped instance
210
- * const scoped = Tentickle.create();
211
- * scoped.use('tool:*', authMiddleware);
212
- * const scopedApp = scoped.createApp(MyAgent, { model });
213
- * ```
214
- */
215
- createApp<P extends Record<string, unknown>>(Component: ComponentFunction<P>, options?: AppOptions): App<P>;
216
- }
217
- /**
218
- * The default global Tentickle instance.
219
- *
220
- * All configuration and middleware registration starts here.
221
- * The exported `createApp` and `run` are bound to this instance.
222
- *
223
- * @example
224
- * ```typescript
225
- * import { Tentickle, createApp, run } from 'tentickle';
226
- *
227
- * // Configure global middleware
228
- * Tentickle.use('*', loggingMiddleware);
229
- * Tentickle.telemetryProvider = myProvider;
230
- *
231
- * // createApp and run use Tentickle
232
- * const app = createApp(MyAgent, { model });
233
- * const result = await run(<MyAgent />, { messages, model });
234
- *
235
- * // Create scoped instance with its own middleware
236
- * const scoped = Tentickle.create();
237
- * scoped.use('model:generate', specialMiddleware);
238
- * const scopedResult = await scoped.run(<MyAgent />, { messages, model });
239
- * ```
240
- */
241
- export declare const Tentickle: TentickleInstance;
242
- /**
243
- * Create an app from a component function.
244
- *
245
- * This is `Tentickle.createApp` - apps inherit middleware from the global Tentickle instance.
246
- *
247
- * @example
248
- * ```typescript
249
- * import { createApp } from 'tentickle';
250
- *
251
- * const app = createApp(MyAgent, { model });
252
- * const result = await app.run({ props: { query: "Hello!" } });
253
- * ```
254
- */
255
- export declare const createApp: <P extends Record<string, unknown>>(Component: ComponentFunction<P>, options?: AppOptions) => App<P>;
256
- /**
257
- * One-shot execution of a JSX component.
258
- *
259
- * This is `Tentickle.run` - the simplest way to run an agent.
260
- * Returns SessionExecutionHandle which is both PromiseLike and AsyncIterable.
261
- *
262
- * @example
263
- * ```typescript
264
- * import { run } from 'tentickle';
265
- *
266
- * // Await result
267
- * const result = await run(<MyAgent />, { messages, model });
268
- *
269
- * // Stream events
270
- * for await (const event of run(<MyAgent />, { messages, model })) {
271
- * console.log(event);
272
- * }
273
- * ```
274
- */
275
- export declare const run: DirectProcedure<RunHandler>;
276
- /**
277
- * Input for the run() function.
278
- */
279
- export interface RunInput<P extends Record<string, unknown> = Record<string, unknown>> {
280
- /** Model instance to use for execution */
281
- model?: AppOptions["model"];
282
- /** Props to pass to the component */
283
- props?: P;
284
- /** Messages to queue before running */
285
- messages?: AppInput<P>["messages"];
286
- /** Conversation history to seed */
287
- history?: AppInput<P>["history"];
288
- /** Maximum number of ticks before stopping */
289
- maxTicks?: number;
290
- /** Abort signal for cancellation */
291
- signal?: AbortSignal;
292
- }
293
- export {};
294
- //# sourceMappingURL=aidk-instance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aidk-instance.d.ts","sourceRoot":"","sources":["../src/aidk-instance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAmB,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AACxG,OAAO,KAAK,EACV,GAAG,EACH,QAAQ,EACR,UAAU,EAGV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAGrB;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC;CACvD;AAED;;;GAGG;AACH,KAAK,UAAU,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClD,OAAO,EAAE;IAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAChB,s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