@super_studio/ecforce-ai-agent-server 0.1.1 → 0.1.2

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.js CHANGED
@@ -458,7 +458,7 @@ var Api = class extends HttpClient {
458
458
  // src/sdk/index.ts
459
459
  function createClient(params) {
460
460
  var _a, _b, _c;
461
- const baseUrl = (_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT;
461
+ const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
462
462
  const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
463
463
  if (!apiKey) {
464
464
  throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
package/dist/index.mjs CHANGED
@@ -458,7 +458,7 @@ var Api = class extends HttpClient {
458
458
  // src/sdk/index.ts
459
459
  function createClient(params) {
460
460
  var _a, _b, _c;
461
- const baseUrl = (_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT;
461
+ const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
462
462
  const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
463
463
  if (!apiKey) {
464
464
  throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
@@ -14,5 +14,6 @@ export type CreateClientParams = {
14
14
  */
15
15
  baseUrl?: string;
16
16
  };
17
- export declare function createClient(params?: CreateClientParams): Api<unknown>;
17
+ type AgentApi = Api<unknown>;
18
+ export declare function createClient(params?: CreateClientParams): AgentApi;
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,gBAyBvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;AAE7B,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,QAAQ,CAwBlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super_studio/ecforce-ai-agent-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/src/sdk/index.ts CHANGED
@@ -18,9 +18,10 @@ export type CreateClientParams = {
18
18
  baseUrl?: string;
19
19
  };
20
20
 
21
- export function createClient(params?: CreateClientParams) {
22
- const baseUrl =
23
- params?.baseUrl ?? process.env.AI_AGENT_API_ENDPOINT ?? API_ENDPOINT;
21
+ type AgentApi = Api<unknown>;
22
+
23
+ export function createClient(params?: CreateClientParams): AgentApi {
24
+ const baseUrl = `${params?.baseUrl ?? process.env.AI_AGENT_API_ENDPOINT ?? API_ENDPOINT}/api`;
24
25
  const apiKey = params?.apiKey ?? process.env.AI_AGENT_API_KEY;
25
26
 
26
27
  if (!apiKey) {