create-agentuity 0.0.68 → 0.0.70

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 (2) hide show
  1. package/README.md +8 -9
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -88,22 +88,22 @@ Create a new agent by adding a folder in `src/agent/`:
88
88
 
89
89
  ```typescript
90
90
  // src/agent/my-agent/agent.ts
91
- import { type AgentContext, createAgent } from '@agentuity/runtime';
92
- import { z } from 'zod';
91
+ import { createAgent } from '@agentuity/runtime';
92
+ import { s } from '@agentuity/schema';
93
93
 
94
94
  const agent = createAgent({
95
95
  metadata: {
96
96
  description: 'My amazing agent',
97
97
  },
98
98
  schema: {
99
- input: z.object({
100
- message: z.string(),
99
+ input: s.object({
100
+ message: s.string(),
101
101
  }),
102
- output: z.object({
103
- response: z.string(),
102
+ output: s.object({
103
+ response: s.string(),
104
104
  }),
105
105
  },
106
- handler: async (ctx: AgentContext, input) => {
106
+ handler: async (ctx, input) => {
107
107
  return { response: `Processed: ${input.message}` };
108
108
  },
109
109
  });
@@ -118,7 +118,6 @@ Create custom routes in `src/web/` or add routes to an agent folder:
118
118
  ```typescript
119
119
  // src/agent/my-agent/route.ts
120
120
  import { createRouter } from '@agentuity/runtime';
121
- import { zValidator } from '@hono/zod-validator';
122
121
  import agent from './agent';
123
122
 
124
123
  const router = createRouter();
@@ -128,7 +127,7 @@ router.get('/', async (c) => {
128
127
  return c.json(result);
129
128
  });
130
129
 
131
- router.post('/', zValidator('json', agent.inputSchema!), async (c) => {
130
+ router.post('/', agent.validator(), async (c) => {
132
131
  const data = c.req.valid('json');
133
132
  const result = await c.agent.myAgent.run(data);
134
133
  return c.json(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentuity",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Agentuity employees and contributors",
6
6
  "description": "Create a new Agentuity project",
@@ -9,7 +9,8 @@
9
9
  "create-agentuity": "./bin.js"
10
10
  },
11
11
  "scripts": {
12
- "build": "echo 'No build required'"
12
+ "build": "echo 'No build required'",
13
+ "test": "echo 'No tests for create-agentuity (CLI wrapper)'"
13
14
  },
14
15
  "files": [
15
16
  "bin.js"