@inferencesh/sdk 0.6.20 → 0.6.21
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/dist/agent/api.js +3 -0
- package/dist/agent/types.d.ts +6 -0
- package/package.json +1 -1
package/dist/agent/api.js
CHANGED
|
@@ -55,6 +55,9 @@ export async function sendTemplateMessage(client, config, chatId, text, attachme
|
|
|
55
55
|
chat_id: chatId ?? undefined,
|
|
56
56
|
// Only include agent if it's not empty (for existing chats, backend uses chat's agent)
|
|
57
57
|
agent: config.agent || undefined,
|
|
58
|
+
// Agent-level context (version_id, app_id, ...). Omit when empty so we don't
|
|
59
|
+
// send a bare {} for agents that declare no context.
|
|
60
|
+
context: config.context && Object.keys(config.context).length > 0 ? config.context : undefined,
|
|
58
61
|
input: {
|
|
59
62
|
text,
|
|
60
63
|
attachments,
|
package/dist/agent/types.d.ts
CHANGED
|
@@ -62,6 +62,12 @@ export type AdHocAgentConfig = Omit<Partial<GeneratedAgentConfig>, 'tools' | 'co
|
|
|
62
62
|
export interface TemplateAgentConfig {
|
|
63
63
|
/** Agent reference: namespace/name@shortid */
|
|
64
64
|
agent: string;
|
|
65
|
+
/**
|
|
66
|
+
* Context values passed to the agent on every message, keyed by the context
|
|
67
|
+
* name declared in the agent definition. Equivalent to the CLI's
|
|
68
|
+
* `--context key=value`. Agents with required context won't run without it.
|
|
69
|
+
*/
|
|
70
|
+
context?: Record<string, string>;
|
|
65
71
|
}
|
|
66
72
|
/**
|
|
67
73
|
* Union type for agent configuration options
|