@reminix/runtime 0.0.17 → 0.0.18

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 CHANGED
@@ -65,7 +65,7 @@ Returns runtime information, available agents, and tools:
65
65
  {
66
66
  "runtime": {
67
67
  "name": "reminix-runtime",
68
- "version": "0.0.17",
68
+ "version": "0.0.18",
69
69
  "language": "typescript",
70
70
  "framework": "hono"
71
71
  },
@@ -403,6 +403,8 @@ const streamingAgent = agent('streaming-agent', {
403
403
  });
404
404
  ```
405
405
 
406
+ To receive request context (e.g. `user_id` from the request body), use a handler that accepts `(input, context)`: `handler: async (input, context) => { ... }`. For full request access (e.g. `stream`), use the [Agent class](#agent-class) and a handler that receives the full request object.
407
+
406
408
  ### `tool(name, options)`
407
409
 
408
410
  Factory function to create a tool.
@@ -427,6 +429,20 @@ const myTool = tool('my_tool', {
427
429
  },
428
430
  handler: async (input) => ({ result: input.input }),
429
431
  });
432
+
433
+ // With context (optional second argument receives request context)
434
+ const myToolWithContext = tool('my_tool', {
435
+ description: 'Example with context',
436
+ input: {
437
+ type: 'object',
438
+ properties: { param: { type: 'string' } },
439
+ required: ['param'],
440
+ },
441
+ handler: async (input, context) => ({
442
+ param: input.param,
443
+ userId: (context as Record<string, unknown>)?.user_id ?? 'anonymous',
444
+ }),
445
+ });
430
446
  ```
431
447
 
432
448
  ### Request/Response Types
package/dist/version.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Runtime version.
3
3
  */
4
- export declare const VERSION = "0.0.17";
4
+ export declare const VERSION = "0.0.18";
5
5
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Runtime version.
3
3
  */
4
- export const VERSION = '0.0.17';
4
+ export const VERSION = '0.0.18';
5
5
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reminix/runtime",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Reminix Runtime - Serve AI agents as REST APIs with streaming support",
5
5
  "license": "Apache-2.0",
6
6
  "author": {