@proteos/sdk 0.82.0 → 0.83.0

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/index.d.cts CHANGED
@@ -792,6 +792,13 @@ interface AppendEventRequest {
792
792
  */
793
793
  turn_id?: string;
794
794
  payload?: unknown;
795
+ /**
796
+ * The sending surface's client-tool catalog, `user.message` only. A surface that
797
+ * opened a session it did not create attaches its tools this way: when the names
798
+ * differ from the session's client tools they replace them before the turn runs.
799
+ * Omitted, the session's tools are left as they are.
800
+ */
801
+ client_tools?: ClientToolSchema[];
795
802
  }
796
803
  /** List filter for sessions (in addition to pagination/sorting). */
797
804
  interface ListSessionsOptions extends ListOptions {
@@ -1093,13 +1100,16 @@ interface SessionService {
1093
1100
  * backend uploads it to the model provider and mounts it into the agent's sandbox
1094
1101
  * at send time. Pass `turnId` (a UUID) for optimistic rendering. At least one of
1095
1102
  * `text` / `files` should be present. `context` rides the payload for the model
1096
- * only (see {@link UserMessagePayload.context}).
1103
+ * only (see {@link UserMessagePayload.context}). `clientTools` attaches the
1104
+ * sending surface's client tools to a session it did not create (see
1105
+ * {@link AppendEventRequest.client_tools}).
1097
1106
  */
1098
1107
  sendUserMessage(id: string, input: {
1099
1108
  text?: string;
1100
1109
  files?: FileBlock[];
1101
1110
  turnId?: string;
1102
1111
  context?: string;
1112
+ clientTools?: ClientToolSchema[];
1103
1113
  }): Promise<SessionEvent>;
1104
1114
  /** Convenience: appends a `user.interrupt` to halt the running turn. */
1105
1115
  interrupt(id: string): Promise<SessionEvent>;
package/dist/index.d.ts CHANGED
@@ -792,6 +792,13 @@ interface AppendEventRequest {
792
792
  */
793
793
  turn_id?: string;
794
794
  payload?: unknown;
795
+ /**
796
+ * The sending surface's client-tool catalog, `user.message` only. A surface that
797
+ * opened a session it did not create attaches its tools this way: when the names
798
+ * differ from the session's client tools they replace them before the turn runs.
799
+ * Omitted, the session's tools are left as they are.
800
+ */
801
+ client_tools?: ClientToolSchema[];
795
802
  }
796
803
  /** List filter for sessions (in addition to pagination/sorting). */
797
804
  interface ListSessionsOptions extends ListOptions {
@@ -1093,13 +1100,16 @@ interface SessionService {
1093
1100
  * backend uploads it to the model provider and mounts it into the agent's sandbox
1094
1101
  * at send time. Pass `turnId` (a UUID) for optimistic rendering. At least one of
1095
1102
  * `text` / `files` should be present. `context` rides the payload for the model
1096
- * only (see {@link UserMessagePayload.context}).
1103
+ * only (see {@link UserMessagePayload.context}). `clientTools` attaches the
1104
+ * sending surface's client tools to a session it did not create (see
1105
+ * {@link AppendEventRequest.client_tools}).
1097
1106
  */
1098
1107
  sendUserMessage(id: string, input: {
1099
1108
  text?: string;
1100
1109
  files?: FileBlock[];
1101
1110
  turnId?: string;
1102
1111
  context?: string;
1112
+ clientTools?: ClientToolSchema[];
1103
1113
  }): Promise<SessionEvent>;
1104
1114
  /** Convenience: appends a `user.interrupt` to halt the running turn. */
1105
1115
  interrupt(id: string): Promise<SessionEvent>;
package/dist/index.js CHANGED
@@ -236,7 +236,8 @@ var SessionServiceImpl = class {
236
236
  return this.appendEvent(id, {
237
237
  type: "user.message",
238
238
  ...input.turnId ? { turn_id: input.turnId } : {},
239
- payload: { content, ...context ? { context } : {} }
239
+ payload: { content, ...context ? { context } : {} },
240
+ ...input.clientTools?.length ? { client_tools: input.clientTools } : {}
240
241
  });
241
242
  }
242
243
  async interrupt(id) {