@dofe/infra-clients 0.1.38 → 0.1.40
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.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/mlflow/mlflow.client.d.ts +44 -0
- package/dist/internal/mlflow/mlflow.client.d.ts.map +1 -0
- package/dist/internal/mlflow/mlflow.client.js +184 -0
- package/dist/internal/mlflow/mlflow.client.js.map +1 -0
- package/dist/internal/mlflow/mlflow.module.d.ts +3 -0
- package/dist/internal/mlflow/mlflow.module.d.ts.map +1 -0
- package/dist/internal/mlflow/mlflow.module.js +23 -0
- package/dist/internal/mlflow/mlflow.module.js.map +1 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.client.d.ts +52 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.client.d.ts.map +1 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.client.js +174 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.client.js.map +1 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.module.d.ts +3 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.module.d.ts.map +1 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.module.js +30 -0
- package/dist/internal/model-research-proxy/anthropic-proxy-research.module.js.map +1 -0
- package/dist/internal/model-research-proxy/index.d.ts +6 -0
- package/dist/internal/model-research-proxy/index.d.ts.map +1 -0
- package/dist/internal/model-research-proxy/index.js +24 -0
- package/dist/internal/model-research-proxy/index.js.map +1 -0
- package/dist/internal/model-verify/index.d.ts +4 -0
- package/dist/internal/model-verify/index.d.ts.map +1 -0
- package/dist/internal/model-verify/index.js +26 -0
- package/dist/internal/model-verify/index.js.map +1 -0
- package/dist/internal/model-verify/model-verify.client.d.ts +77 -0
- package/dist/internal/model-verify/model-verify.client.d.ts.map +1 -0
- package/dist/internal/model-verify/model-verify.client.js +324 -0
- package/dist/internal/model-verify/model-verify.client.js.map +1 -0
- package/dist/internal/openclaw/docker-exec.service.d.ts +132 -0
- package/dist/internal/openclaw/docker-exec.service.d.ts.map +1 -0
- package/dist/internal/openclaw/docker-exec.service.js +544 -0
- package/dist/internal/openclaw/docker-exec.service.js.map +1 -0
- package/dist/internal/openclaw/index.d.ts +14 -0
- package/dist/internal/openclaw/index.d.ts.map +1 -0
- package/dist/internal/openclaw/index.js +32 -0
- package/dist/internal/openclaw/index.js.map +1 -0
- package/dist/internal/openclaw/openclaw-agent-coordination.client.d.ts +73 -0
- package/dist/internal/openclaw/openclaw-agent-coordination.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw-agent-coordination.client.js +249 -0
- package/dist/internal/openclaw/openclaw-agent-coordination.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw-context-status.client.d.ts +66 -0
- package/dist/internal/openclaw/openclaw-context-status.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw-context-status.client.js +164 -0
- package/dist/internal/openclaw/openclaw-context-status.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw-cron.client.d.ts +61 -0
- package/dist/internal/openclaw/openclaw-cron.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw-cron.client.js +416 -0
- package/dist/internal/openclaw/openclaw-cron.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw-gateway.client.d.ts +41 -0
- package/dist/internal/openclaw/openclaw-gateway.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw-gateway.client.js +175 -0
- package/dist/internal/openclaw/openclaw-gateway.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw-skill-sync.client.d.ts +222 -0
- package/dist/internal/openclaw/openclaw-skill-sync.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw-skill-sync.client.js +720 -0
- package/dist/internal/openclaw/openclaw-skill-sync.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw.client.d.ts +602 -0
- package/dist/internal/openclaw/openclaw.client.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw.client.js +3062 -0
- package/dist/internal/openclaw/openclaw.client.js.map +1 -0
- package/dist/internal/openclaw/openclaw.module.d.ts +3 -0
- package/dist/internal/openclaw/openclaw.module.d.ts.map +1 -0
- package/dist/internal/openclaw/openclaw.module.js +62 -0
- package/dist/internal/openclaw/openclaw.module.js.map +1 -0
- package/dist/internal/openclaw/skill-translation.service.d.ts +39 -0
- package/dist/internal/openclaw/skill-translation.service.d.ts.map +1 -0
- package/dist/internal/openclaw/skill-translation.service.js +217 -0
- package/dist/internal/openclaw/skill-translation.service.js.map +1 -0
- package/dist/internal/openclaw/types/cron.types.d.ts +112 -0
- package/dist/internal/openclaw/types/cron.types.d.ts.map +1 -0
- package/dist/internal/openclaw/types/cron.types.js +9 -0
- package/dist/internal/openclaw/types/cron.types.js.map +1 -0
- package/dist/internal/provider-verify/index.d.ts +6 -0
- package/dist/internal/provider-verify/index.d.ts.map +1 -0
- package/dist/internal/provider-verify/index.js +24 -0
- package/dist/internal/provider-verify/index.js.map +1 -0
- package/dist/internal/provider-verify/provider-verify.client.d.ts +55 -0
- package/dist/internal/provider-verify/provider-verify.client.d.ts.map +1 -0
- package/dist/internal/provider-verify/provider-verify.client.js +284 -0
- package/dist/internal/provider-verify/provider-verify.client.js.map +1 -0
- package/dist/internal/provider-verify/provider-verify.module.d.ts +3 -0
- package/dist/internal/provider-verify/provider-verify.module.d.ts.map +1 -0
- package/dist/internal/provider-verify/provider-verify.module.js +28 -0
- package/dist/internal/provider-verify/provider-verify.module.js.map +1 -0
- package/dist/internal/sso/index.d.ts +5 -0
- package/dist/internal/sso/index.d.ts.map +1 -0
- package/dist/internal/sso/index.js +12 -0
- package/dist/internal/sso/index.js.map +1 -0
- package/dist/internal/sso/sso-auth.client.d.ts +33 -0
- package/dist/internal/sso/sso-auth.client.d.ts.map +1 -0
- package/dist/internal/sso/sso-auth.client.js +89 -0
- package/dist/internal/sso/sso-auth.client.js.map +1 -0
- package/dist/internal/sso/sso-message-proxy.service.d.ts +11 -0
- package/dist/internal/sso/sso-message-proxy.service.d.ts.map +1 -0
- package/dist/internal/sso/sso-message-proxy.service.js +51 -0
- package/dist/internal/sso/sso-message-proxy.service.js.map +1 -0
- package/dist/internal/sso/sso-message.client.d.ts +12 -0
- package/dist/internal/sso/sso-message.client.d.ts.map +1 -0
- package/dist/internal/sso/sso-message.client.js +62 -0
- package/dist/internal/sso/sso-message.client.js.map +1 -0
- package/dist/internal/sso/sso.module.d.ts +3 -0
- package/dist/internal/sso/sso.module.d.ts.map +1 -0
- package/dist/internal/sso/sso.module.js +26 -0
- package/dist/internal/sso/sso.module.js.map +1 -0
- package/package.json +110 -6
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/clients/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/clients/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34,4 +34,5 @@ __exportStar(require("./internal/sse"), exports);
|
|
|
34
34
|
__exportStar(require("./internal/third-party-sse"), exports);
|
|
35
35
|
__exportStar(require("./internal/verify"), exports);
|
|
36
36
|
__exportStar(require("./internal/wechat"), exports);
|
|
37
|
+
__exportStar(require("./internal/sso"), exports);
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/clients/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,oDAAkC;AAClC,gDAA8B;AAC9B,yDAAuC;AACvC,4DAA0C;AAC1C,mEAAiD;AACjD,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC;AACxC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,yDAAuC;AACvC,iDAA+B;AAC/B,iDAA+B;AAC/B,6DAA2C;AAC3C,oDAAkC;AAClC,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/clients/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,oDAAkC;AAClC,gDAA8B;AAC9B,yDAAuC;AACvC,4DAA0C;AAC1C,mEAAiD;AACjD,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC;AACxC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,yDAAuC;AACvC,iDAA+B;AAC/B,iDAA+B;AAC/B,6DAA2C;AAC3C,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLflow Tracking Client
|
|
3
|
+
*
|
|
4
|
+
* 职责:
|
|
5
|
+
* - 通过 MLflow REST API 记录 proxy 请求的 Experiments / Runs / Metrics
|
|
6
|
+
* - 每次 proxy 请求对应一个 MLflow Run
|
|
7
|
+
* - 异步上报,不阻塞主链路
|
|
8
|
+
*/
|
|
9
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
10
|
+
import { HttpService } from '@nestjs/axios';
|
|
11
|
+
import { Logger } from 'winston';
|
|
12
|
+
export interface MlflowProxyLog {
|
|
13
|
+
botId: string;
|
|
14
|
+
vendor: string;
|
|
15
|
+
model: string | null;
|
|
16
|
+
endpoint: string | null;
|
|
17
|
+
protocolType: string | null;
|
|
18
|
+
statusCode: number | null;
|
|
19
|
+
durationMs: number | null;
|
|
20
|
+
requestTokens: number | null;
|
|
21
|
+
responseTokens: number | null;
|
|
22
|
+
errorMessage: string | null;
|
|
23
|
+
timestamp: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class MlflowClient implements OnModuleInit {
|
|
26
|
+
private readonly logger;
|
|
27
|
+
private readonly httpService;
|
|
28
|
+
private experimentId;
|
|
29
|
+
private readonly experimentName;
|
|
30
|
+
private trackingUri;
|
|
31
|
+
private enabled;
|
|
32
|
+
constructor(logger: Logger, httpService: HttpService);
|
|
33
|
+
onModuleInit(): void;
|
|
34
|
+
/**
|
|
35
|
+
* 记录一次 proxy 请求(fire-and-forget,不阻塞主链路)
|
|
36
|
+
*/
|
|
37
|
+
logProxyRequest(data: MlflowProxyLog): void;
|
|
38
|
+
private doLog;
|
|
39
|
+
private initExperiment;
|
|
40
|
+
private createRun;
|
|
41
|
+
private logBatch;
|
|
42
|
+
private finishRun;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=mlflow.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mlflow.client.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/mlflow/mlflow.client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAsB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAmBD,qBACa,YAAa,YAAW,YAAY;IAOZ,OAAO,CAAC,QAAQ,CAAC,MAAM;IACxD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAP9B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoB;IACnD,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,OAAO,CAAS;gBAG4B,MAAM,EAAE,MAAM,EAC/C,WAAW,EAAE,WAAW;IAG3C,YAAY,IAAI,IAAI;IAmBpB;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;YAY7B,KAAK;YA0EL,cAAc;YA0Bd,SAAS;YAWT,QAAQ;YAmBR,SAAS;CAaxB"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MlflowClient = void 0;
|
|
16
|
+
/**
|
|
17
|
+
* MLflow Tracking Client
|
|
18
|
+
*
|
|
19
|
+
* 职责:
|
|
20
|
+
* - 通过 MLflow REST API 记录 proxy 请求的 Experiments / Runs / Metrics
|
|
21
|
+
* - 每次 proxy 请求对应一个 MLflow Run
|
|
22
|
+
* - 异步上报,不阻塞主链路
|
|
23
|
+
*/
|
|
24
|
+
const common_1 = require("@nestjs/common");
|
|
25
|
+
const axios_1 = require("@nestjs/axios");
|
|
26
|
+
const nest_winston_1 = require("nest-winston");
|
|
27
|
+
const winston_1 = require("winston");
|
|
28
|
+
const rxjs_1 = require("rxjs");
|
|
29
|
+
const env_config_service_1 = require("@dofe/infra-common/config/env-config.service");
|
|
30
|
+
let MlflowClient = class MlflowClient {
|
|
31
|
+
logger;
|
|
32
|
+
httpService;
|
|
33
|
+
experimentId = null;
|
|
34
|
+
experimentName = 'proxy-requests';
|
|
35
|
+
trackingUri = '';
|
|
36
|
+
enabled = false;
|
|
37
|
+
constructor(logger, httpService) {
|
|
38
|
+
this.logger = logger;
|
|
39
|
+
this.httpService = httpService;
|
|
40
|
+
}
|
|
41
|
+
onModuleInit() {
|
|
42
|
+
this.trackingUri =
|
|
43
|
+
(0, env_config_service_1.getEnv)('MLFLOW_TRACKING_URI') ?? '';
|
|
44
|
+
const enabledRaw = String((0, env_config_service_1.getEnv)('MLFLOW_ENABLED') ?? '');
|
|
45
|
+
this.enabled = enabledRaw === 'true' || enabledRaw === '1';
|
|
46
|
+
if (this.enabled && this.trackingUri) {
|
|
47
|
+
this.logger.info('[MLflow] Initialization scheduled in background (non-blocking)');
|
|
48
|
+
void this.initExperiment().catch((err) => {
|
|
49
|
+
this.logger.warn(`[MLflow] Init failed, tracking disabled: ${err.message}`);
|
|
50
|
+
this.enabled = false;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 记录一次 proxy 请求(fire-and-forget,不阻塞主链路)
|
|
56
|
+
*/
|
|
57
|
+
logProxyRequest(data) {
|
|
58
|
+
if (!this.enabled || !this.experimentId)
|
|
59
|
+
return;
|
|
60
|
+
this.doLog(data).catch((err) => {
|
|
61
|
+
this.logger.warn(`[MLflow] Failed to log run: ${err.message}`);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// Private helpers
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
async doLog(data) {
|
|
68
|
+
const modelLabel = data.model ?? 'unknown';
|
|
69
|
+
const runName = `${data.vendor}/${modelLabel}`;
|
|
70
|
+
const runId = await this.createRun(data.timestamp, runName);
|
|
71
|
+
const metrics = [];
|
|
72
|
+
const params = [];
|
|
73
|
+
const tags = [];
|
|
74
|
+
// Params
|
|
75
|
+
params.push({ key: 'vendor', value: data.vendor });
|
|
76
|
+
params.push({ key: 'bot_id', value: data.botId });
|
|
77
|
+
params.push({
|
|
78
|
+
key: 'success',
|
|
79
|
+
value: data.errorMessage ? 'false' : 'true',
|
|
80
|
+
});
|
|
81
|
+
if (data.model)
|
|
82
|
+
params.push({ key: 'model', value: data.model });
|
|
83
|
+
if (data.endpoint)
|
|
84
|
+
params.push({ key: 'endpoint', value: data.endpoint });
|
|
85
|
+
if (data.protocolType)
|
|
86
|
+
params.push({ key: 'protocol_type', value: data.protocolType });
|
|
87
|
+
// Metrics
|
|
88
|
+
const ts = data.timestamp;
|
|
89
|
+
if (data.durationMs !== null)
|
|
90
|
+
metrics.push({
|
|
91
|
+
key: 'duration_ms',
|
|
92
|
+
value: data.durationMs,
|
|
93
|
+
timestamp: ts,
|
|
94
|
+
step: 0,
|
|
95
|
+
});
|
|
96
|
+
if (data.requestTokens !== null)
|
|
97
|
+
metrics.push({
|
|
98
|
+
key: 'request_tokens',
|
|
99
|
+
value: data.requestTokens,
|
|
100
|
+
timestamp: ts,
|
|
101
|
+
step: 0,
|
|
102
|
+
});
|
|
103
|
+
if (data.responseTokens !== null)
|
|
104
|
+
metrics.push({
|
|
105
|
+
key: 'response_tokens',
|
|
106
|
+
value: data.responseTokens,
|
|
107
|
+
timestamp: ts,
|
|
108
|
+
step: 0,
|
|
109
|
+
});
|
|
110
|
+
if (data.requestTokens !== null && data.responseTokens !== null)
|
|
111
|
+
metrics.push({
|
|
112
|
+
key: 'total_tokens',
|
|
113
|
+
value: data.requestTokens + data.responseTokens,
|
|
114
|
+
timestamp: ts,
|
|
115
|
+
step: 0,
|
|
116
|
+
});
|
|
117
|
+
if (data.statusCode !== null)
|
|
118
|
+
metrics.push({
|
|
119
|
+
key: 'status_code',
|
|
120
|
+
value: data.statusCode,
|
|
121
|
+
timestamp: ts,
|
|
122
|
+
step: 0,
|
|
123
|
+
});
|
|
124
|
+
// Tags — runName already passed to createRun; keep tag for search/filter
|
|
125
|
+
tags.push({
|
|
126
|
+
key: 'mlflow.runName',
|
|
127
|
+
value: runName,
|
|
128
|
+
});
|
|
129
|
+
if (data.errorMessage)
|
|
130
|
+
tags.push({ key: 'error', value: data.errorMessage.substring(0, 250) });
|
|
131
|
+
await this.logBatch(runId, metrics, params, tags);
|
|
132
|
+
const status = data.errorMessage ? 'FAILED' : 'FINISHED';
|
|
133
|
+
const endTime = data.timestamp + (data.durationMs ?? 0);
|
|
134
|
+
await this.finishRun(runId, status, endTime);
|
|
135
|
+
}
|
|
136
|
+
async initExperiment() {
|
|
137
|
+
try {
|
|
138
|
+
const res = await (0, rxjs_1.firstValueFrom)(this.httpService.get(`${this.trackingUri}/api/2.0/mlflow/experiments/get-by-name`, { params: { experiment_name: this.experimentName } }));
|
|
139
|
+
this.experimentId = res.data.experiment.experiment_id;
|
|
140
|
+
this.logger.info(`[MLflow] Using experiment id=${this.experimentId}`);
|
|
141
|
+
}
|
|
142
|
+
catch (err) {
|
|
143
|
+
if (err.response?.status === 404) {
|
|
144
|
+
const res = await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.trackingUri}/api/2.0/mlflow/experiments/create`, { name: this.experimentName }));
|
|
145
|
+
this.experimentId = res.data.experiment_id;
|
|
146
|
+
this.logger.info(`[MLflow] Created experiment id=${this.experimentId}`);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
throw err;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async createRun(startTime, runName) {
|
|
154
|
+
const res = await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.trackingUri}/api/2.0/mlflow/runs/create`, {
|
|
155
|
+
experiment_id: this.experimentId,
|
|
156
|
+
start_time: startTime,
|
|
157
|
+
run_name: runName,
|
|
158
|
+
}));
|
|
159
|
+
return res.data.run.info.run_id;
|
|
160
|
+
}
|
|
161
|
+
async logBatch(runId, metrics, params, tags) {
|
|
162
|
+
await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.trackingUri}/api/2.0/mlflow/runs/log-batch`, {
|
|
163
|
+
run_id: runId,
|
|
164
|
+
metrics,
|
|
165
|
+
params,
|
|
166
|
+
tags,
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
async finishRun(runId, status, endTime) {
|
|
170
|
+
await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.trackingUri}/api/2.0/mlflow/runs/update`, {
|
|
171
|
+
run_id: runId,
|
|
172
|
+
status,
|
|
173
|
+
end_time: endTime,
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
exports.MlflowClient = MlflowClient;
|
|
178
|
+
exports.MlflowClient = MlflowClient = __decorate([
|
|
179
|
+
(0, common_1.Injectable)(),
|
|
180
|
+
__param(0, (0, common_1.Inject)(nest_winston_1.WINSTON_MODULE_PROVIDER)),
|
|
181
|
+
__metadata("design:paramtypes", [winston_1.Logger,
|
|
182
|
+
axios_1.HttpService])
|
|
183
|
+
], MlflowClient);
|
|
184
|
+
//# sourceMappingURL=mlflow.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mlflow.client.js","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/mlflow/mlflow.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,2CAAkE;AAClE,yCAA4C;AAC5C,+CAAuD;AACvD,qCAAiC;AACjC,+BAAsC;AACtC,qFAAsE;AAkC/D,IAAM,YAAY,GAAlB,MAAM,YAAY;IAO6B;IACjC;IA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AA,eAAM,EAAC,sCAAuB,CAAC,CAAA;qCAA0B,gBAAM;QAClC,mBAAW;GARhC,YAAY,CA4LxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mlflow.module.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/mlflow/mlflow.module.ts"],"names":[],"mappings":"AAIA,qBAKa,YAAY;CAAG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MlflowModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const axios_1 = require("@nestjs/axios");
|
|
12
|
+
const mlflow_client_1 = require("./mlflow.client");
|
|
13
|
+
let MlflowModule = class MlflowModule {
|
|
14
|
+
};
|
|
15
|
+
exports.MlflowModule = MlflowModule;
|
|
16
|
+
exports.MlflowModule = MlflowModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [axios_1.HttpModule.register({ timeout: 30000 })],
|
|
19
|
+
providers: [mlflow_client_1.MlflowClient],
|
|
20
|
+
exports: [mlflow_client_1.MlflowClient],
|
|
21
|
+
})
|
|
22
|
+
], MlflowModule);
|
|
23
|
+
//# sourceMappingURL=mlflow.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mlflow.module.js","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/mlflow/mlflow.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yCAA2C;AAC3C,mDAA+C;AAOxC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IALxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAClD,SAAS,EAAE,CAAC,4BAAY,CAAC;QACzB,OAAO,EAAE,CAAC,4BAAY,CAAC;KACxB,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HttpService } from '@nestjs/axios';
|
|
2
|
+
import { Logger } from 'winston';
|
|
3
|
+
/**
|
|
4
|
+
* Anthropic-compatible message types
|
|
5
|
+
* (simplified subset for research use)
|
|
6
|
+
*/
|
|
7
|
+
export interface AnthropicResearchMessage {
|
|
8
|
+
role: 'user' | 'assistant';
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Internal client for model capability research via Anthropic-compatible proxy
|
|
13
|
+
*
|
|
14
|
+
* Responsibilities:
|
|
15
|
+
* - Transport only - no business logic, no JSON parsing
|
|
16
|
+
* - Always send fixed sentinel model
|
|
17
|
+
* - Normalize Anthropic response to single text string
|
|
18
|
+
* - Throw on failures (canonical failure contract)
|
|
19
|
+
*/
|
|
20
|
+
export declare class AnthropicProxyResearchClient {
|
|
21
|
+
private readonly httpService;
|
|
22
|
+
private readonly logger;
|
|
23
|
+
constructor(httpService: HttpService, logger: Logger);
|
|
24
|
+
/**
|
|
25
|
+
* Perform research via Anthropic-compatible proxy
|
|
26
|
+
*
|
|
27
|
+
* @param messages - The conversation messages
|
|
28
|
+
* @returns Normalized text string (single concatenated text)
|
|
29
|
+
* @throws Error on config missing, transport failure, or no usable content
|
|
30
|
+
*/
|
|
31
|
+
research(messages: AnthropicResearchMessage[]): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Normalize Anthropic-compatible response to single text string
|
|
34
|
+
*
|
|
35
|
+
* Rules:
|
|
36
|
+
* - Only text blocks are considered
|
|
37
|
+
* - Text blocks must be non-empty after trim()
|
|
38
|
+
* - Text blocks are concatenated in order
|
|
39
|
+
* - Throws if no usable text blocks
|
|
40
|
+
*/
|
|
41
|
+
private normalizeResponseText;
|
|
42
|
+
/**
|
|
43
|
+
* Sanitize endpoint for logging (remove query params, etc.)
|
|
44
|
+
*/
|
|
45
|
+
private sanitizeEndpointForLog;
|
|
46
|
+
/**
|
|
47
|
+
* Handle transport/HTTP errors
|
|
48
|
+
*/
|
|
49
|
+
private handleError;
|
|
50
|
+
private extractErrorMessage;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=anthropic-proxy-research.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-proxy-research.client.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/anthropic-proxy-research.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAKjC;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AA0BD;;;;;;;;GAQG;AACH,qBACa,4BAA4B;IAErC,OAAO,CAAC,QAAQ,CAAC,WAAW;IACK,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADvC,WAAW,EAAE,WAAW,EACS,MAAM,EAAE,MAAM;IAGlE;;;;;;OAMG;IACG,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAqDrE;;;;;;;;OAQG;IACH,OAAO,CAAC,qBAAqB;IA0B7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;OAEG;IACH,OAAO,CAAC,WAAW;IA4BnB,OAAO,CAAC,mBAAmB;CAS5B"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AnthropicProxyResearchClient = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const axios_1 = require("@nestjs/axios");
|
|
18
|
+
const nest_winston_1 = require("nest-winston");
|
|
19
|
+
const winston_1 = require("winston");
|
|
20
|
+
const rxjs_1 = require("rxjs");
|
|
21
|
+
const infra_common_1 = require("@dofe/infra-common");
|
|
22
|
+
/**
|
|
23
|
+
* Fixed sentinel model value to indicate proxy must override
|
|
24
|
+
*/
|
|
25
|
+
const SENTINEL_MODEL = '__proxy_override_required__';
|
|
26
|
+
/**
|
|
27
|
+
* Internal client for model capability research via Anthropic-compatible proxy
|
|
28
|
+
*
|
|
29
|
+
* Responsibilities:
|
|
30
|
+
* - Transport only - no business logic, no JSON parsing
|
|
31
|
+
* - Always send fixed sentinel model
|
|
32
|
+
* - Normalize Anthropic response to single text string
|
|
33
|
+
* - Throw on failures (canonical failure contract)
|
|
34
|
+
*/
|
|
35
|
+
let AnthropicProxyResearchClient = class AnthropicProxyResearchClient {
|
|
36
|
+
httpService;
|
|
37
|
+
logger;
|
|
38
|
+
constructor(httpService, logger) {
|
|
39
|
+
this.httpService = httpService;
|
|
40
|
+
this.logger = logger;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Perform research via Anthropic-compatible proxy
|
|
44
|
+
*
|
|
45
|
+
* @param messages - The conversation messages
|
|
46
|
+
* @returns Normalized text string (single concatenated text)
|
|
47
|
+
* @throws Error on config missing, transport failure, or no usable content
|
|
48
|
+
*/
|
|
49
|
+
async research(messages) {
|
|
50
|
+
const apiBaseUrl = infra_common_1.researchConfig.apiBaseUrl;
|
|
51
|
+
const proxyToken = infra_common_1.researchConfig.researchBotProxyToken;
|
|
52
|
+
const endpoint = infra_common_1.researchConfig.researchProxyEndpoint;
|
|
53
|
+
// Config validation - fail fast
|
|
54
|
+
if (!apiBaseUrl) {
|
|
55
|
+
throw new Error('Missing apiBaseUrl for model capability research proxy');
|
|
56
|
+
}
|
|
57
|
+
if (!proxyToken) {
|
|
58
|
+
throw new Error('Missing researchBotProxyToken for model capability research');
|
|
59
|
+
}
|
|
60
|
+
this.logger.info('[AnthropicProxyResearch] Starting research request', {
|
|
61
|
+
messageCount: messages.length,
|
|
62
|
+
endpoint: this.sanitizeEndpointForLog(endpoint),
|
|
63
|
+
});
|
|
64
|
+
try {
|
|
65
|
+
const response = await (0, rxjs_1.firstValueFrom)(this.httpService.post(endpoint, {
|
|
66
|
+
model: SENTINEL_MODEL,
|
|
67
|
+
max_tokens: 2048,
|
|
68
|
+
messages,
|
|
69
|
+
}, {
|
|
70
|
+
headers: {
|
|
71
|
+
'Content-Type': 'application/json',
|
|
72
|
+
Authorization: `Bearer ${proxyToken}`,
|
|
73
|
+
},
|
|
74
|
+
timeout: 120000,
|
|
75
|
+
}));
|
|
76
|
+
const normalizedText = this.normalizeResponseText(response.data);
|
|
77
|
+
this.logger.info('[AnthropicProxyResearch] Research request successful', {
|
|
78
|
+
responseId: response.data.id,
|
|
79
|
+
hasContent: !!normalizedText,
|
|
80
|
+
contentLength: normalizedText.length,
|
|
81
|
+
});
|
|
82
|
+
return normalizedText;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
this.handleError(error, endpoint);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Normalize Anthropic-compatible response to single text string
|
|
90
|
+
*
|
|
91
|
+
* Rules:
|
|
92
|
+
* - Only text blocks are considered
|
|
93
|
+
* - Text blocks must be non-empty after trim()
|
|
94
|
+
* - Text blocks are concatenated in order
|
|
95
|
+
* - Throws if no usable text blocks
|
|
96
|
+
*/
|
|
97
|
+
normalizeResponseText(response) {
|
|
98
|
+
if (!response.content || !Array.isArray(response.content)) {
|
|
99
|
+
throw new Error('Invalid Anthropic proxy response: missing content array');
|
|
100
|
+
}
|
|
101
|
+
const usableTexts = [];
|
|
102
|
+
for (const block of response.content) {
|
|
103
|
+
if (block.type === 'text' && block.text) {
|
|
104
|
+
const trimmed = block.text.trim();
|
|
105
|
+
if (trimmed) {
|
|
106
|
+
usableTexts.push(trimmed);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// Ignore tool_use blocks and other types
|
|
110
|
+
}
|
|
111
|
+
if (usableTexts.length === 0) {
|
|
112
|
+
throw new Error('No usable text content in Anthropic proxy response');
|
|
113
|
+
}
|
|
114
|
+
return usableTexts.join('');
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sanitize endpoint for logging (remove query params, etc.)
|
|
118
|
+
*/
|
|
119
|
+
sanitizeEndpointForLog(endpoint) {
|
|
120
|
+
try {
|
|
121
|
+
const url = new URL(endpoint);
|
|
122
|
+
return `${url.origin}${url.pathname}`;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return endpoint;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Handle transport/HTTP errors
|
|
130
|
+
*/
|
|
131
|
+
handleError(error, endpoint) {
|
|
132
|
+
const errorMessage = this.extractErrorMessage(error);
|
|
133
|
+
const statusCode = error.response?.status;
|
|
134
|
+
this.logger.error('[AnthropicProxyResearch] Request failed', {
|
|
135
|
+
statusCode,
|
|
136
|
+
endpoint: this.sanitizeEndpointForLog(endpoint),
|
|
137
|
+
errorMessage,
|
|
138
|
+
code: error.code,
|
|
139
|
+
});
|
|
140
|
+
if (statusCode === 401) {
|
|
141
|
+
throw new Error('Anthropic proxy research authentication failed');
|
|
142
|
+
}
|
|
143
|
+
else if (statusCode === 429) {
|
|
144
|
+
throw new Error('Anthropic proxy research rate limit exceeded');
|
|
145
|
+
}
|
|
146
|
+
else if (statusCode === 500) {
|
|
147
|
+
throw new Error(`Anthropic proxy server error: ${errorMessage}`);
|
|
148
|
+
}
|
|
149
|
+
else if (error.code === 'ECONNREFUSED') {
|
|
150
|
+
throw new Error(`Cannot connect to Anthropic proxy: ${this.sanitizeEndpointForLog(endpoint)}`);
|
|
151
|
+
}
|
|
152
|
+
else if (error.code === 'ETIMEDOUT') {
|
|
153
|
+
throw new Error('Anthropic proxy research request timeout');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
throw new Error(`Anthropic proxy research API error: ${errorMessage}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
extractErrorMessage(error) {
|
|
160
|
+
if (error.response?.data) {
|
|
161
|
+
const data = error.response.data;
|
|
162
|
+
return (data.error?.message || data.message || data.error || 'Unknown error');
|
|
163
|
+
}
|
|
164
|
+
return error.message || 'Unknown error';
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
exports.AnthropicProxyResearchClient = AnthropicProxyResearchClient;
|
|
168
|
+
exports.AnthropicProxyResearchClient = AnthropicProxyResearchClient = __decorate([
|
|
169
|
+
(0, common_1.Injectable)(),
|
|
170
|
+
__param(1, (0, common_1.Inject)(nest_winston_1.WINSTON_MODULE_PROVIDER)),
|
|
171
|
+
__metadata("design:paramtypes", [axios_1.HttpService,
|
|
172
|
+
winston_1.Logger])
|
|
173
|
+
], AnthropicProxyResearchClient);
|
|
174
|
+
//# sourceMappingURL=anthropic-proxy-research.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-proxy-research.client.js","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/anthropic-proxy-research.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAA4C;AAC5C,+CAAuD;AACvD,qCAAiC;AACjC,+BAAsC;AAEtC,qDAAoD;AA8BpD;;GAEG;AACH,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;;;;;;;GAQG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEpB;IACiC;IAFpD,YACmB,WAAwB,EACS,MAAc;QAD/C,gBAAW,GAAX,WAAW,CAAa;QACS,WAAM,GAAN,MAAM,CAAQ;IAC/D,CAAC;IAEJ;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CAAC,QAAoC;QACjD,MAAM,UAAU,GAAG,6BAAc,CAAC,UAAU,CAAC;QAC7C,MAAM,UAAU,GAAG,6BAAc,CAAC,qBAAqB,CAAC;QACxD,MAAM,QAAQ,GAAG,6BAAc,CAAC,qBAAqB,CAAC;QAEtD,gCAAgC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;QACD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,I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,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;aAAM,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,iCAAiC,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CACb,sCAAsC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,CAC9E,CAAC;QACJ,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,uCAAuC,YAAY,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAEO,mBAAmB,CAAC,KAAiB;QAC3C,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAW,CAAC;YACxC,OAAO,CACL,IAAI,CAAC,KAAK,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,IAAI,eAAe,CACrE,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,IAAI,eAAe,CAAC;IAC1C,CAAC;CACF,CAAA;AAzJY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,sCAAuB,CAAC,CAAA;qCADF,mBAAW;QACiB,gBAAM;GAHvD,4BAA4B,CAyJxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-proxy-research.module.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/anthropic-proxy-research.module.ts"],"names":[],"mappings":"AAKA,qBAWa,kCAAkC;CAAG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AnthropicProxyResearchClientModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const axios_1 = require("@nestjs/axios");
|
|
12
|
+
const anthropic_proxy_research_client_1 = require("./anthropic-proxy-research.client");
|
|
13
|
+
const config_1 = require("@nestjs/config");
|
|
14
|
+
let AnthropicProxyResearchClientModule = class AnthropicProxyResearchClientModule {
|
|
15
|
+
};
|
|
16
|
+
exports.AnthropicProxyResearchClientModule = AnthropicProxyResearchClientModule;
|
|
17
|
+
exports.AnthropicProxyResearchClientModule = AnthropicProxyResearchClientModule = __decorate([
|
|
18
|
+
(0, common_1.Module)({
|
|
19
|
+
imports: [
|
|
20
|
+
axios_1.HttpModule.register({
|
|
21
|
+
timeout: 120000,
|
|
22
|
+
maxRedirects: 5,
|
|
23
|
+
}),
|
|
24
|
+
config_1.ConfigModule,
|
|
25
|
+
],
|
|
26
|
+
providers: [anthropic_proxy_research_client_1.AnthropicProxyResearchClient],
|
|
27
|
+
exports: [anthropic_proxy_research_client_1.AnthropicProxyResearchClient],
|
|
28
|
+
})
|
|
29
|
+
], AnthropicProxyResearchClientModule);
|
|
30
|
+
//# sourceMappingURL=anthropic-proxy-research.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-proxy-research.module.js","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/anthropic-proxy-research.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yCAA2C;AAC3C,uFAAiF;AACjF,2CAA8C;AAavC,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;CAAG,CAAA;AAArC,gFAAkC;6CAAlC,kCAAkC;IAX9C,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,kBAAU,CAAC,QAAQ,CAAC;gBAClB,OAAO,EAAE,MAAM;gBACf,YAAY,EAAE,CAAC;aAChB,CAAC;YACF,qBAAY;SACb;QACD,SAAS,EAAE,CAAC,8DAA4B,CAAC;QACzC,OAAO,EAAE,CAAC,8DAA4B,CAAC;KACxC,CAAC;GACW,kCAAkC,CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AnthropicProxyResearchClientModule = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* Model Research Proxy 模块导出
|
|
20
|
+
*/
|
|
21
|
+
__exportStar(require("./anthropic-proxy-research.client"), exports);
|
|
22
|
+
var anthropic_proxy_research_module_1 = require("./anthropic-proxy-research.module");
|
|
23
|
+
Object.defineProperty(exports, "AnthropicProxyResearchClientModule", { enumerable: true, get: function () { return anthropic_proxy_research_module_1.AnthropicProxyResearchClientModule; } });
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-research-proxy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oEAAkD;AAClD,qFAAuF;AAA9E,qJAAA,kCAAkC,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/clients/src/internal/model-verify/index.ts"],"names":[],"mappings":"AAIA,qBAKa,uBAAuB;CAAG;AAGvC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}
|