@super_studio/ecforce-ai-agent-server 1.4.0-canary.2 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super_studio/ecforce-ai-agent-server",
3
- "version": "1.4.0-canary.2",
3
+ "version": "1.4.0",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.cts",
package/src/mcp-auth.ts CHANGED
@@ -2,7 +2,7 @@ import { decode, encode } from "./lib/jwt";
2
2
 
3
3
  /**
4
4
  * 共通のMCPトークンのペイロード。
5
- * すべてのapps(cdp, ma, bi)はこのトークンの形になります。
5
+ * すべてのapps(aidp, ma, bi)はこのトークンの形になります。
6
6
  */
7
7
  export type MCPTokenPayload = {
8
8
  source: string;
@@ -776,6 +776,7 @@ export class Api<
776
776
  | "adminOptionsUi"
777
777
  | "sharedPrompts"
778
778
  | "mcp"
779
+ | "mcpGrants"
779
780
  | "canvas"
780
781
  | "langfuseRecordContent"
781
782
  | "modelProviderOpenAI"
@@ -818,6 +819,7 @@ export class Api<
818
819
  | "adminOptionsUi"
819
820
  | "sharedPrompts"
820
821
  | "mcp"
822
+ | "mcpGrants"
821
823
  | "canvas"
822
824
  | "langfuseRecordContent"
823
825
  | "modelProviderOpenAI"
@@ -891,6 +893,7 @@ export class Api<
891
893
  | "adminOptionsUi"
892
894
  | "sharedPrompts"
893
895
  | "mcp"
896
+ | "mcpGrants"
894
897
  | "canvas"
895
898
  | "langfuseRecordContent"
896
899
  | "modelProviderOpenAI"
@@ -953,6 +956,7 @@ export class Api<
953
956
  | "adminOptionsUi"
954
957
  | "sharedPrompts"
955
958
  | "mcp"
959
+ | "mcpGrants"
956
960
  | "canvas"
957
961
  | "langfuseRecordContent"
958
962
  | "modelProviderOpenAI"
@@ -1101,14 +1105,14 @@ export class Api<
1101
1105
  * @description 全ユーザー一覧を取得
1102
1106
  *
1103
1107
  * @tags internal, user
1104
- * @name List2
1108
+ * @name List
1105
1109
  * @summary list
1106
1110
  * @request GET:/v1/internal/user
1107
1111
  * @originalName list
1108
1112
  * @duplicate
1109
1113
  * @secure
1110
1114
  */
1111
- list2: (
1115
+ list: (
1112
1116
  query?: {
1113
1117
  q?: string;
1114
1118
  /**
@@ -1149,6 +1153,118 @@ export class Api<
1149
1153
  format: "json",
1150
1154
  ...params,
1151
1155
  }),
1156
+
1157
+ /**
1158
+ * @description プロジェクト内のユーザー情報を解決する
1159
+ *
1160
+ * @tags internal, user
1161
+ * @name Resolve
1162
+ * @summary resolve
1163
+ * @request POST:/v1/internal/user/resolve
1164
+ * @secure
1165
+ */
1166
+ resolve: (
1167
+ data: {
1168
+ /** @format email */
1169
+ email: string;
1170
+ /** @minLength 1 */
1171
+ projectId: string;
1172
+ /** @default false */
1173
+ createIfMissing?: boolean;
1174
+ },
1175
+ params: RequestParams = {},
1176
+ ) =>
1177
+ this.request<
1178
+ {
1179
+ id: string;
1180
+ name: string;
1181
+ email: string;
1182
+ projectId: string;
1183
+ plan: "free" | "pro";
1184
+ role: "owner" | "member";
1185
+ isSuperUser: boolean;
1186
+ termsAcceptedAt: string | null;
1187
+ },
1188
+ any
1189
+ >({
1190
+ path: `/v1/internal/user/resolve`,
1191
+ method: "POST",
1192
+ body: data,
1193
+ secure: true,
1194
+ type: ContentType.Json,
1195
+ format: "json",
1196
+ ...params,
1197
+ }),
1198
+ };
1199
+ internalTerms = {
1200
+ /**
1201
+ * @description プロジェクト内のユーザーの利用規約同意状態を取得する
1202
+ *
1203
+ * @tags internal, terms
1204
+ * @name Status
1205
+ * @summary status
1206
+ * @request POST:/v1/internal/terms/status
1207
+ * @secure
1208
+ */
1209
+ status: (
1210
+ data: {
1211
+ /** @format email */
1212
+ email: string;
1213
+ /** @minLength 1 */
1214
+ projectId: string;
1215
+ },
1216
+ params: RequestParams = {},
1217
+ ) =>
1218
+ this.request<
1219
+ {
1220
+ accepted: boolean;
1221
+ acceptedAt: string | null;
1222
+ },
1223
+ any
1224
+ >({
1225
+ path: `/v1/internal/terms/status`,
1226
+ method: "POST",
1227
+ body: data,
1228
+ secure: true,
1229
+ type: ContentType.Json,
1230
+ format: "json",
1231
+ ...params,
1232
+ }),
1233
+
1234
+ /**
1235
+ * @description プロジェクト内のユーザーの利用規約同意を記録する
1236
+ *
1237
+ * @tags internal, terms
1238
+ * @name Accept
1239
+ * @summary accept
1240
+ * @request POST:/v1/internal/terms/accept
1241
+ * @secure
1242
+ */
1243
+ accept: (
1244
+ data: {
1245
+ /** @format email */
1246
+ email: string;
1247
+ /** @minLength 1 */
1248
+ projectId: string;
1249
+ /** @default false */
1250
+ createIfMissing?: boolean;
1251
+ },
1252
+ params: RequestParams = {},
1253
+ ) =>
1254
+ this.request<
1255
+ {
1256
+ acceptedAt: string;
1257
+ },
1258
+ any
1259
+ >({
1260
+ path: `/v1/internal/terms/accept`,
1261
+ method: "POST",
1262
+ body: data,
1263
+ secure: true,
1264
+ type: ContentType.Json,
1265
+ format: "json",
1266
+ ...params,
1267
+ }),
1152
1268
  };
1153
1269
  internalGlobalAgent = {
1154
1270
  /**
@@ -1341,7 +1457,7 @@ export class Api<
1341
1457
  ecforce?: boolean | string[];
1342
1458
  ma?: boolean | string[];
1343
1459
  bi?: boolean | string[];
1344
- cdp?: boolean | string[];
1460
+ aidp?: boolean | string[];
1345
1461
  };
1346
1462
  };
1347
1463
  },
@@ -1547,7 +1663,7 @@ export class Api<
1547
1663
  ecforce?: boolean | string[];
1548
1664
  ma?: boolean | string[];
1549
1665
  bi?: boolean | string[];
1550
- cdp?: boolean | string[];
1666
+ aidp?: boolean | string[];
1551
1667
  };
1552
1668
  };
1553
1669
  accessControl?: {
@@ -2383,7 +2499,7 @@ export class Api<
2383
2499
  ecforce?: boolean | string[];
2384
2500
  ma?: boolean | string[];
2385
2501
  bi?: boolean | string[];
2386
- cdp?: boolean | string[];
2502
+ aidp?: boolean | string[];
2387
2503
  };
2388
2504
  };
2389
2505
  },
@@ -2589,7 +2705,7 @@ export class Api<
2589
2705
  ecforce?: boolean | string[];
2590
2706
  ma?: boolean | string[];
2591
2707
  bi?: boolean | string[];
2592
- cdp?: boolean | string[];
2708
+ aidp?: boolean | string[];
2593
2709
  };
2594
2710
  };
2595
2711
  accessControl?: {
@@ -2892,7 +3008,7 @@ export class Api<
2892
3008
  */
2893
3009
  getMcpTools: (
2894
3010
  data: {
2895
- mcpKey: "ecforce" | "ma" | "bi" | "cdp";
3011
+ mcpKey: "ecforce" | "ma" | "bi" | "aidp";
2896
3012
  },
2897
3013
  params: RequestParams = {},
2898
3014
  ) =>
@@ -3146,7 +3262,6 @@ export class Api<
3146
3262
  */
3147
3263
  listMessages: (
3148
3264
  data: {
3149
- agentId?: string;
3150
3265
  /** @minLength 1 */
3151
3266
  chatId: string;
3152
3267
  },
@@ -3155,6 +3270,8 @@ export class Api<
3155
3270
  this.request<
3156
3271
  {
3157
3272
  activeStreamId: string | null;
3273
+ agentId: string | null;
3274
+ isGlobalAgent: boolean;
3158
3275
  isAgentDeleted: boolean;
3159
3276
  messages: {
3160
3277
  /** @maxLength 30 */
@@ -4549,6 +4666,30 @@ export class Api<
4549
4666
  format: "json",
4550
4667
  ...params,
4551
4668
  }),
4669
+
4670
+ /**
4671
+ * @description 埋め込みチャット用のセッショントークンを作成
4672
+ *
4673
+ * @tags session
4674
+ * @name CreateEmbedToken
4675
+ * @summary createEmbedToken
4676
+ * @request POST:/v1/session/embed-token
4677
+ * @secure
4678
+ */
4679
+ createEmbedToken: (params: RequestParams = {}) =>
4680
+ this.request<
4681
+ {
4682
+ token: string;
4683
+ expiresAt: string;
4684
+ },
4685
+ any
4686
+ >({
4687
+ path: `/v1/session/embed-token`,
4688
+ method: "POST",
4689
+ secure: true,
4690
+ format: "json",
4691
+ ...params,
4692
+ }),
4552
4693
  };
4553
4694
  usage = {
4554
4695
  /**