agentick 0.3.0 → 0.5.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/README.md +10 -9
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -85,6 +85,7 @@ Everything in the component tree compiles to what the model sees. Components are
|
|
|
85
85
|
| `<Timeline.Provider>` | Context provider exposing timeline entries to descendants via `useTimelineContext()`. |
|
|
86
86
|
| `<Timeline.Messages>` | Renders messages from `Timeline.Provider` context. Optional `renderEntry` prop for custom rendering. |
|
|
87
87
|
| `<Section>` | Structured context block injected every tick. `audience` controls visibility: `"model"`, `"user"`, or `"all"`. |
|
|
88
|
+
| `<Tool>` | Tool the model can call. Use inline (`<Tool name="..." handler={...} />`) or via `createTool()`. Supports `render()` for persistent state, `use()` for context injection. |
|
|
88
89
|
| `<Model>` | Model configuration. Pass `engine` prop, or use adapter-specific components like `<OpenAIModel>` or `<GoogleModel>`. |
|
|
89
90
|
|
|
90
91
|
### Messages
|
|
@@ -561,20 +562,20 @@ function AdaptiveAgent({ task }: { task: string }) {
|
|
|
561
562
|
}
|
|
562
563
|
```
|
|
563
564
|
|
|
564
|
-
## Execution
|
|
565
|
+
## Execution Runners
|
|
565
566
|
|
|
566
567
|
The context window is JSX. But what _consumes_ that context — and how tool calls _execute_ — is pluggable.
|
|
567
568
|
|
|
568
|
-
An `
|
|
569
|
+
An `ExecutionRunner` is a swappable backend that sits between the compiled context and execution. It transforms what the model sees, intercepts how tools run, and manages its own lifecycle state. Your agent code doesn't change — the runner changes the execution model underneath it.
|
|
569
570
|
|
|
570
571
|
```tsx
|
|
571
|
-
import { type
|
|
572
|
+
import { type ExecutionRunner } from "@agentick/core";
|
|
572
573
|
|
|
573
|
-
const repl:
|
|
574
|
+
const repl: ExecutionRunner = {
|
|
574
575
|
name: "repl",
|
|
575
576
|
|
|
576
577
|
// The model sees command descriptions instead of tool schemas
|
|
577
|
-
|
|
578
|
+
transformCompiled(compiled, tools) {
|
|
578
579
|
return { ...compiled, tools: [executeTool] };
|
|
579
580
|
},
|
|
580
581
|
|
|
@@ -592,15 +593,15 @@ const repl: ExecutionEnvironment = {
|
|
|
592
593
|
},
|
|
593
594
|
};
|
|
594
595
|
|
|
595
|
-
const app = createApp(Agent, { model,
|
|
596
|
+
const app = createApp(Agent, { model, runner: repl });
|
|
596
597
|
```
|
|
597
598
|
|
|
598
599
|
Same agent, same JSX, different execution model. Build once — run against standard tool_use in production, a sandboxed REPL for code execution, a human-approval gateway for sensitive operations.
|
|
599
600
|
|
|
600
|
-
All hooks are optional. Without
|
|
601
|
+
All hooks are optional. Without a runner, standard model → tool_use behavior applies. Runners are inherited by spawned child sessions — override per-child via `SpawnOptions`:
|
|
601
602
|
|
|
602
603
|
```tsx
|
|
603
|
-
await session.spawn(CodeAgent, { messages }, {
|
|
604
|
+
await session.spawn(CodeAgent, { messages }, { runner: replEnv });
|
|
604
605
|
```
|
|
605
606
|
|
|
606
607
|
## Testing
|
|
@@ -668,7 +669,7 @@ adapter.stream([
|
|
|
668
669
|
| `createMockApp()` | Mock app for client/transport tests. |
|
|
669
670
|
| `createMockSession()` | Mock session with send/close/abort. |
|
|
670
671
|
| `createMockExecutionHandle()` | Mock execution handle (async iterable + result). |
|
|
671
|
-
| `
|
|
672
|
+
| `createTestRunner()` | Mock execution runner with call tracking. |
|
|
672
673
|
| `createMockCom()` | Mock COM for hook tests. |
|
|
673
674
|
| `createMockTickState()` | Mock tick state. |
|
|
674
675
|
| `createMockTickResult()` | Mock tick result for `useOnTickEnd` tests. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentick",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "The component framework for AI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agentick/agent": "0.
|
|
35
|
-
"@agentick/core": "0.
|
|
36
|
-
"@agentick/guardrails": "0.
|
|
34
|
+
"@agentick/agent": "0.5.0",
|
|
35
|
+
"@agentick/core": "0.5.0",
|
|
36
|
+
"@agentick/guardrails": "0.4.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -p tsconfig.build.json",
|