@octavus/docs 0.0.5 → 0.0.7

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.
@@ -59,17 +59,17 @@ tools:
59
59
  query:
60
60
  type: string
61
61
  description: Search query
62
-
62
+
63
63
  category:
64
64
  type: string
65
65
  description: Filter by category
66
66
  optional: true
67
-
67
+
68
68
  maxPrice:
69
69
  type: number
70
70
  description: Maximum price filter
71
71
  optional: true
72
-
72
+
73
73
  inStock:
74
74
  type: boolean
75
75
  description: Only show in-stock items
@@ -86,7 +86,7 @@ tools:
86
86
  description: Look up user account
87
87
  parameters:
88
88
  userId: { type: string }
89
-
89
+
90
90
  create-support-ticket:
91
91
  description: Create a support ticket
92
92
  parameters:
@@ -136,17 +136,30 @@ handlers:
136
136
 
137
137
  ### In Prompts
138
138
 
139
- Reference tool results in prompts:
139
+ Tool results are stored in variables. Reference the variable in prompts:
140
140
 
141
141
  ```markdown
142
142
  <!-- prompts/ticket-directive.md -->
143
143
  A support ticket has been created:
144
- - Ticket ID: {{TICKET.ticketId}}
145
- - Estimated Response: {{TICKET.estimatedResponse}}
144
+ {{TICKET}}
145
+
146
+ Let the user know their ticket has been created.
147
+ ```
148
+
149
+ When the `TICKET` variable contains an object, it's automatically serialized as JSON in the prompt:
150
+
151
+ ```
152
+ A support ticket has been created:
153
+ {
154
+ "ticketId": "TKT-123ABC",
155
+ "estimatedResponse": "24 hours"
156
+ }
146
157
 
147
158
  Let the user know their ticket has been created.
148
159
  ```
149
160
 
161
+ > **Note**: Variables use `{{VARIABLE_NAME}}` syntax with `UPPERCASE_SNAKE_CASE`. Dot notation (like `{{TICKET.ticketId}}`) is not supported. Objects are automatically JSON-serialized.
162
+
150
163
  ### In Variables
151
164
 
152
165
  Store tool results for later use:
@@ -160,15 +173,13 @@ handlers:
160
173
  input:
161
174
  userId: USER_ID
162
175
  output: ACCOUNT # Result stored here
163
-
176
+
164
177
  Create ticket:
165
178
  type: tool-call
166
179
  tool: create-support-ticket
167
180
  input:
168
181
  summary: SUMMARY
169
182
  priority: medium
170
- # Can reference ACCOUNT here
171
- email: ACCOUNT.email
172
183
  output: TICKET
173
184
  ```
174
185
 
@@ -182,7 +193,7 @@ const session = client.agentSessions.attach(sessionId, {
182
193
  'get-user-account': async (args) => {
183
194
  const userId = args.userId as string;
184
195
  const user = await db.users.findById(userId);
185
-
196
+
186
197
  return {
187
198
  name: user.name,
188
199
  email: user.email,
@@ -190,13 +201,13 @@ const session = client.agentSessions.attach(sessionId, {
190
201
  createdAt: user.createdAt.toISOString(),
191
202
  };
192
203
  },
193
-
204
+
194
205
  'create-support-ticket': async (args) => {
195
206
  const ticket = await ticketService.create({
196
207
  summary: args.summary as string,
197
208
  priority: args.priority as string,
198
209
  });
199
-
210
+
200
211
  return {
201
212
  ticketId: ticket.id,
202
213
  estimatedResponse: getEstimatedTime(args.priority),
@@ -218,7 +229,7 @@ tools:
218
229
  Retrieves the user's account information including name, email,
219
230
  subscription plan, and account creation date. Use this when the
220
231
  user asks about their account or you need to verify their identity.
221
-
232
+
222
233
  # Avoid - vague
223
234
  get-data:
224
235
  description: Gets some data
@@ -234,4 +245,3 @@ tools:
234
245
  type: string
235
246
  description: Ticket priority level (low, medium, high, urgent)
236
247
  ```
237
-