codemie-sdk 0.1.389 → 0.1.391

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.cjs CHANGED
@@ -453,16 +453,24 @@ var AssistantService = class {
453
453
  * @returns AssistantCreateResponse with assistant_id and optional validation results
454
454
  */
455
455
  async create(_params) {
456
- const params = AssistantCreateParamsSchema.parse(_params);
457
- return this.api.post("/v1/assistants", params);
456
+ const params = { ..._params };
457
+ if ("is_global" in params && typeof params.is_global !== "boolean") {
458
+ params.is_global = false;
459
+ }
460
+ const validatedParams = AssistantCreateParamsSchema.parse(params);
461
+ return this.api.post("/v1/assistants", validatedParams);
458
462
  }
459
463
  /**
460
464
  * Update an existing assistant.
461
465
  * @returns AssistantUpdateResponse with optional validation results
462
466
  */
463
467
  async update(assistantId, _params) {
464
- const params = AssistantUpdateParamsSchema.parse(_params);
465
- return this.api.put(`/v1/assistants/${assistantId}`, params);
468
+ const params = { ..._params };
469
+ if ("is_global" in params && typeof params.is_global !== "boolean") {
470
+ params.is_global = false;
471
+ }
472
+ const validatedParams = AssistantUpdateParamsSchema.parse(params);
473
+ return this.api.put(`/v1/assistants/${assistantId}`, validatedParams);
466
474
  }
467
475
  /**
468
476
  * Get list of available tools.