@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.
- package/content/01-getting-started/01-introduction.md +1 -1
- package/content/01-getting-started/02-quickstart.md +26 -18
- package/content/02-server-sdk/01-overview.md +24 -13
- package/content/03-client-sdk/01-overview.md +173 -37
- package/content/03-client-sdk/02-messages.md +73 -21
- package/content/03-client-sdk/03-streaming.md +40 -30
- package/content/03-client-sdk/04-execution-blocks.md +2 -2
- package/content/03-client-sdk/05-socket-transport.md +304 -0
- package/content/03-client-sdk/_meta.md +1 -1
- package/content/04-protocol/02-input-resources.md +2 -0
- package/content/04-protocol/03-triggers.md +39 -20
- package/content/04-protocol/04-tools.md +25 -15
- package/dist/chunk-232K4EME.js +439 -0
- package/dist/chunk-232K4EME.js.map +1 -0
- package/dist/chunk-2JDZLMS3.js +439 -0
- package/dist/chunk-2JDZLMS3.js.map +1 -0
- package/dist/chunk-4WWUKU4V.js +421 -0
- package/dist/chunk-4WWUKU4V.js.map +1 -0
- package/dist/chunk-7AS4ST73.js +421 -0
- package/dist/chunk-7AS4ST73.js.map +1 -0
- package/dist/chunk-IUKE3XDN.js +421 -0
- package/dist/chunk-IUKE3XDN.js.map +1 -0
- package/dist/chunk-JOB6YWEF.js +421 -0
- package/dist/chunk-JOB6YWEF.js.map +1 -0
- package/dist/chunk-OECAPVSX.js +439 -0
- package/dist/chunk-OECAPVSX.js.map +1 -0
- package/dist/content.js +1 -1
- package/dist/docs.json +21 -12
- package/dist/index.js +1 -1
- package/dist/search-index.json +1 -1
- package/dist/search.js +1 -1
- package/dist/search.js.map +1 -1
- package/dist/sections.json +22 -13
- package/package.json +2 -2
|
@@ -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
|
|
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
|
-
|
|
145
|
-
|
|
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
|
-
|