@getsupervisor/agents-studio-sdk 1.23.0 → 1.25.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
@@ -16,6 +16,8 @@ type components = {
16
16
  versionId?: string;
17
17
  status: 'inactive' | 'training' | 'active' | 'archived';
18
18
  description?: string | null;
19
+ avatarUrl?: string | null;
20
+ debounceDelayMs?: number | null;
19
21
  toneId?: string | null;
20
22
  messageStyleId?: string | null;
21
23
  ownerUserId?: string | null;
@@ -772,10 +774,22 @@ type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
772
774
  type VoiceSummary = components['schemas']['VoiceSummary'];
773
775
  type VoiceListResponse = components['schemas']['VoiceListResponse'];
774
776
  type CatalogItemLinks = components['schemas']['CatalogItemLinks'];
775
- type CatalogItemSummary = components['schemas']['CatalogItemSummary'];
776
- type CatalogItemDetail = components['schemas']['CatalogItemDetail'];
777
- type CatalogItemListResponse = components['schemas']['CatalogItemListResponse'];
778
- type CatalogItemCreateRequest = components['schemas']['CatalogItemCreateRequest'];
777
+ type CatalogItemSummarySchema = components['schemas']['CatalogItemSummary'];
778
+ type CatalogItemSummary = Omit<CatalogItemSummarySchema, 'metadata'> & {
779
+ metadata: Record<string, unknown>;
780
+ };
781
+ type CatalogItemDetailSchema = components['schemas']['CatalogItemDetail'];
782
+ type CatalogItemDetail = Omit<CatalogItemDetailSchema, 'metadata'> & {
783
+ metadata: Record<string, unknown>;
784
+ };
785
+ type CatalogItemListResponseSchema = components['schemas']['CatalogItemListResponse'];
786
+ type CatalogItemListResponse = Omit<CatalogItemListResponseSchema, 'data'> & {
787
+ data: CatalogItemSummary[];
788
+ };
789
+ type CatalogItemCreateRequestSchema = components['schemas']['CatalogItemCreateRequest'];
790
+ type CatalogItemCreateRequest = Omit<CatalogItemCreateRequestSchema, 'metadata'> & {
791
+ metadata: Record<string, unknown>;
792
+ };
779
793
  type ApiKeySummary = {
780
794
  id: string;
781
795
  name: string;
@@ -868,10 +882,25 @@ type UpdateAgentBlueprintRequest = {
868
882
  topicsAllowed?: string[];
869
883
  topicsForbidden?: string[];
870
884
  };
871
- type BlueprintStage = components['schemas']['BlueprintStage'];
872
- type BlueprintStageListResponse = components['schemas']['BlueprintStageListResponse'];
873
- type CreateBlueprintStageRequest = components['schemas']['CreateBlueprintStageRequest'];
874
- type UpdateBlueprintStageRequest = components['schemas']['UpdateBlueprintStageRequest'];
885
+ type BlueprintStageSchema = components['schemas']['BlueprintStage'];
886
+ type BlueprintStage = Omit<BlueprintStageSchema, 'prompt' | 'promptInstructions'> & {
887
+ goalPrompt: string;
888
+ promptInstructions: string[];
889
+ };
890
+ type BlueprintStageListResponseSchema = components['schemas']['BlueprintStageListResponse'];
891
+ type BlueprintStageListResponse = Omit<BlueprintStageListResponseSchema, 'data'> & {
892
+ data: BlueprintStage[];
893
+ };
894
+ type CreateBlueprintStageRequestSchema = components['schemas']['CreateBlueprintStageRequest'];
895
+ type CreateBlueprintStageRequest = Omit<CreateBlueprintStageRequestSchema, 'prompt'> & {
896
+ goalPrompt: string;
897
+ promptInstructions?: string[];
898
+ };
899
+ type UpdateBlueprintStageRequestSchema = components['schemas']['UpdateBlueprintStageRequest'];
900
+ type UpdateBlueprintStageRequest = Omit<UpdateBlueprintStageRequestSchema, 'prompt'> & {
901
+ goalPrompt?: string;
902
+ promptInstructions?: string[];
903
+ };
875
904
  type BlueprintStageReorderRequest = components['schemas']['BlueprintStageReorderRequest'];
876
905
  type BlueprintStageTrigger = components['schemas']['BlueprintStageTrigger'];
877
906
  type BlueprintStageTriggerListResponse = components['schemas']['BlueprintStageTriggerListResponse'];
@@ -1125,10 +1154,7 @@ declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: stri
1125
1154
  delete(triggerId: string): Promise<void>;
1126
1155
  };
1127
1156
  declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentStageTriggersApi, agentId: string) => {
1128
- list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<{
1129
- data: components["schemas"]["BlueprintStage"][];
1130
- meta: components["schemas"]["PaginationMeta"];
1131
- }, Partial<{
1157
+ list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<BlueprintStageListResponse, Partial<{
1132
1158
  page: number;
1133
1159
  limit: number;
1134
1160
  sort: string | string[];
@@ -1139,41 +1165,10 @@ declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentSta
1139
1165
  or: QueryOrGroups | QueryBuilderInput;
1140
1166
  }>>>;
1141
1167
  get(stageId: string): Promise<BlueprintStage>;
1142
- create(payload: CreateBlueprintStageRequest): Promise<{
1143
- id: string;
1144
- agentId: string;
1145
- blueprintId: string;
1146
- name: string;
1147
- title?: string | null;
1148
- prompt: string;
1149
- order: number;
1150
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1151
- metadata?: {
1152
- [key: string]: unknown;
1153
- } | null;
1154
- createdAt: string;
1155
- updatedAt: string;
1156
- }>;
1157
- update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<{
1158
- id: string;
1159
- agentId: string;
1160
- blueprintId: string;
1161
- name: string;
1162
- title?: string | null;
1163
- prompt: string;
1164
- order: number;
1165
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1166
- metadata?: {
1167
- [key: string]: unknown;
1168
- } | null;
1169
- createdAt: string;
1170
- updatedAt: string;
1171
- }>;
1168
+ create(payload: CreateBlueprintStageRequest): Promise<BlueprintStage>;
1169
+ update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<BlueprintStage>;
1172
1170
  delete(stageId: string): Promise<void>;
1173
- reorder(payload: BlueprintStageReorderRequest): Promise<{
1174
- data: components["schemas"]["BlueprintStage"][];
1175
- meta: components["schemas"]["PaginationMeta"];
1176
- }>;
1171
+ reorder(payload: BlueprintStageReorderRequest): Promise<BlueprintStageListResponse>;
1177
1172
  triggers(stageId: string): AgentStageTriggersHelper;
1178
1173
  };
1179
1174
  declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
package/dist/index.d.ts CHANGED
@@ -16,6 +16,8 @@ type components = {
16
16
  versionId?: string;
17
17
  status: 'inactive' | 'training' | 'active' | 'archived';
18
18
  description?: string | null;
19
+ avatarUrl?: string | null;
20
+ debounceDelayMs?: number | null;
19
21
  toneId?: string | null;
20
22
  messageStyleId?: string | null;
21
23
  ownerUserId?: string | null;
@@ -772,10 +774,22 @@ type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
772
774
  type VoiceSummary = components['schemas']['VoiceSummary'];
773
775
  type VoiceListResponse = components['schemas']['VoiceListResponse'];
774
776
  type CatalogItemLinks = components['schemas']['CatalogItemLinks'];
775
- type CatalogItemSummary = components['schemas']['CatalogItemSummary'];
776
- type CatalogItemDetail = components['schemas']['CatalogItemDetail'];
777
- type CatalogItemListResponse = components['schemas']['CatalogItemListResponse'];
778
- type CatalogItemCreateRequest = components['schemas']['CatalogItemCreateRequest'];
777
+ type CatalogItemSummarySchema = components['schemas']['CatalogItemSummary'];
778
+ type CatalogItemSummary = Omit<CatalogItemSummarySchema, 'metadata'> & {
779
+ metadata: Record<string, unknown>;
780
+ };
781
+ type CatalogItemDetailSchema = components['schemas']['CatalogItemDetail'];
782
+ type CatalogItemDetail = Omit<CatalogItemDetailSchema, 'metadata'> & {
783
+ metadata: Record<string, unknown>;
784
+ };
785
+ type CatalogItemListResponseSchema = components['schemas']['CatalogItemListResponse'];
786
+ type CatalogItemListResponse = Omit<CatalogItemListResponseSchema, 'data'> & {
787
+ data: CatalogItemSummary[];
788
+ };
789
+ type CatalogItemCreateRequestSchema = components['schemas']['CatalogItemCreateRequest'];
790
+ type CatalogItemCreateRequest = Omit<CatalogItemCreateRequestSchema, 'metadata'> & {
791
+ metadata: Record<string, unknown>;
792
+ };
779
793
  type ApiKeySummary = {
780
794
  id: string;
781
795
  name: string;
@@ -868,10 +882,25 @@ type UpdateAgentBlueprintRequest = {
868
882
  topicsAllowed?: string[];
869
883
  topicsForbidden?: string[];
870
884
  };
871
- type BlueprintStage = components['schemas']['BlueprintStage'];
872
- type BlueprintStageListResponse = components['schemas']['BlueprintStageListResponse'];
873
- type CreateBlueprintStageRequest = components['schemas']['CreateBlueprintStageRequest'];
874
- type UpdateBlueprintStageRequest = components['schemas']['UpdateBlueprintStageRequest'];
885
+ type BlueprintStageSchema = components['schemas']['BlueprintStage'];
886
+ type BlueprintStage = Omit<BlueprintStageSchema, 'prompt' | 'promptInstructions'> & {
887
+ goalPrompt: string;
888
+ promptInstructions: string[];
889
+ };
890
+ type BlueprintStageListResponseSchema = components['schemas']['BlueprintStageListResponse'];
891
+ type BlueprintStageListResponse = Omit<BlueprintStageListResponseSchema, 'data'> & {
892
+ data: BlueprintStage[];
893
+ };
894
+ type CreateBlueprintStageRequestSchema = components['schemas']['CreateBlueprintStageRequest'];
895
+ type CreateBlueprintStageRequest = Omit<CreateBlueprintStageRequestSchema, 'prompt'> & {
896
+ goalPrompt: string;
897
+ promptInstructions?: string[];
898
+ };
899
+ type UpdateBlueprintStageRequestSchema = components['schemas']['UpdateBlueprintStageRequest'];
900
+ type UpdateBlueprintStageRequest = Omit<UpdateBlueprintStageRequestSchema, 'prompt'> & {
901
+ goalPrompt?: string;
902
+ promptInstructions?: string[];
903
+ };
875
904
  type BlueprintStageReorderRequest = components['schemas']['BlueprintStageReorderRequest'];
876
905
  type BlueprintStageTrigger = components['schemas']['BlueprintStageTrigger'];
877
906
  type BlueprintStageTriggerListResponse = components['schemas']['BlueprintStageTriggerListResponse'];
@@ -1125,10 +1154,7 @@ declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: stri
1125
1154
  delete(triggerId: string): Promise<void>;
1126
1155
  };
1127
1156
  declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentStageTriggersApi, agentId: string) => {
1128
- list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<{
1129
- data: components["schemas"]["BlueprintStage"][];
1130
- meta: components["schemas"]["PaginationMeta"];
1131
- }, Partial<{
1157
+ list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<BlueprintStageListResponse, Partial<{
1132
1158
  page: number;
1133
1159
  limit: number;
1134
1160
  sort: string | string[];
@@ -1139,41 +1165,10 @@ declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentSta
1139
1165
  or: QueryOrGroups | QueryBuilderInput;
1140
1166
  }>>>;
1141
1167
  get(stageId: string): Promise<BlueprintStage>;
1142
- create(payload: CreateBlueprintStageRequest): Promise<{
1143
- id: string;
1144
- agentId: string;
1145
- blueprintId: string;
1146
- name: string;
1147
- title?: string | null;
1148
- prompt: string;
1149
- order: number;
1150
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1151
- metadata?: {
1152
- [key: string]: unknown;
1153
- } | null;
1154
- createdAt: string;
1155
- updatedAt: string;
1156
- }>;
1157
- update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<{
1158
- id: string;
1159
- agentId: string;
1160
- blueprintId: string;
1161
- name: string;
1162
- title?: string | null;
1163
- prompt: string;
1164
- order: number;
1165
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1166
- metadata?: {
1167
- [key: string]: unknown;
1168
- } | null;
1169
- createdAt: string;
1170
- updatedAt: string;
1171
- }>;
1168
+ create(payload: CreateBlueprintStageRequest): Promise<BlueprintStage>;
1169
+ update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<BlueprintStage>;
1172
1170
  delete(stageId: string): Promise<void>;
1173
- reorder(payload: BlueprintStageReorderRequest): Promise<{
1174
- data: components["schemas"]["BlueprintStage"][];
1175
- meta: components["schemas"]["PaginationMeta"];
1176
- }>;
1171
+ reorder(payload: BlueprintStageReorderRequest): Promise<BlueprintStageListResponse>;
1177
1172
  triggers(stageId: string): AgentStageTriggersHelper;
1178
1173
  };
1179
1174
  declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
package/dist/index.js CHANGED
@@ -1476,7 +1476,7 @@ function ensureCatalogTypeFilter(filter, type) {
1476
1476
  if (isQueryBuilderLike(filter)) {
1477
1477
  return ensureTypeForBuilder(filter, requiredQuery, requiredExpression);
1478
1478
  }
1479
- if (isPlainObject2(filter)) {
1479
+ if (isFilterRecord(filter)) {
1480
1480
  return ensureTypeForObject(filter, type);
1481
1481
  }
1482
1482
  return filter;
@@ -1506,7 +1506,7 @@ function ensureTypeForObject(candidate, type) {
1506
1506
  return candidate;
1507
1507
  }
1508
1508
  const typeConfig = candidate.type;
1509
- const normalizedType = isPlainObject2(typeConfig) ? { ...typeConfig, eq: type } : { eq: type };
1509
+ const normalizedType = isFilterOperators(typeConfig) ? { ...typeConfig, eq: type } : { eq: type };
1510
1510
  return {
1511
1511
  ...candidate,
1512
1512
  type: normalizedType
@@ -1517,10 +1517,11 @@ function hasTypeEquality(candidate, type) {
1517
1517
  if (typeof typeConfig === "string") {
1518
1518
  return typeConfig === type;
1519
1519
  }
1520
- if (!isPlainObject2(typeConfig)) {
1520
+ if (!isFilterOperators(typeConfig)) {
1521
1521
  return false;
1522
1522
  }
1523
- return typeConfig.eq === type;
1523
+ const equality = typeConfig.eq;
1524
+ return typeof equality === "string" ? equality === type : false;
1524
1525
  }
1525
1526
  function containsTypePredicate(expression, required) {
1526
1527
  const normalizedExpression = expression.replace(/\s+/g, "").toLowerCase();
@@ -1537,6 +1538,12 @@ function isPlainObject2(value) {
1537
1538
  const proto = Object.getPrototypeOf(value);
1538
1539
  return proto === Object.prototype || proto === null;
1539
1540
  }
1541
+ function isFilterRecord(value) {
1542
+ return isPlainObject2(value);
1543
+ }
1544
+ function isFilterOperators(value) {
1545
+ return isPlainObject2(value);
1546
+ }
1540
1547
 
1541
1548
  // src/api/voices.ts
1542
1549
  function mapCatalogResponseToVoiceList(response) {