@tencent-ai/agent-sdk 0.0.13 → 0.1.0-next.989
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/README.md +1 -9
- package/dist/agent-sdk.js +1 -7
- package/lib/common/application-utils.d.ts.map +1 -1
- package/lib/common/application-utils.js +2 -7
- package/lib/common/application-utils.js.map +1 -1
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +0 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/services.d.ts +8 -0
- package/lib/common/services.d.ts.map +1 -0
- package/lib/common/services.js +21 -0
- package/lib/common/services.js.map +1 -0
- package/package.json +3 -6
- package/lib/common/services/agent.d.ts +0 -12
- package/lib/common/services/agent.d.ts.map +0 -1
- package/lib/common/services/agent.js +0 -28
- package/lib/common/services/agent.js.map +0 -1
- package/lib/common/services/auth.d.ts +0 -53
- package/lib/common/services/auth.d.ts.map +0 -1
- package/lib/common/services/auth.js +0 -83
- package/lib/common/services/auth.js.map +0 -1
- package/lib/common/services/codebase.d.ts +0 -44
- package/lib/common/services/codebase.d.ts.map +0 -1
- package/lib/common/services/codebase.js +0 -87
- package/lib/common/services/codebase.js.map +0 -1
- package/lib/common/services/event.d.ts +0 -8
- package/lib/common/services/event.d.ts.map +0 -1
- package/lib/common/services/event.js +0 -18
- package/lib/common/services/event.js.map +0 -1
- package/lib/common/services/filepath.d.ts +0 -7
- package/lib/common/services/filepath.d.ts.map +0 -1
- package/lib/common/services/filepath.js +0 -16
- package/lib/common/services/filepath.js.map +0 -1
- package/lib/common/services/http.d.ts +0 -5
- package/lib/common/services/http.d.ts.map +0 -1
- package/lib/common/services/http.js +0 -12
- package/lib/common/services/http.js.map +0 -1
- package/lib/common/services/index.d.ts +0 -10
- package/lib/common/services/index.d.ts.map +0 -1
- package/lib/common/services/index.js +0 -26
- package/lib/common/services/index.js.map +0 -1
- package/lib/common/services/logger.d.ts +0 -7
- package/lib/common/services/logger.d.ts.map +0 -1
- package/lib/common/services/logger.js +0 -17
- package/lib/common/services/logger.js.map +0 -1
- package/lib/common/services/product.d.ts +0 -10
- package/lib/common/services/product.d.ts.map +0 -1
- package/lib/common/services/product.js +0 -26
- package/lib/common/services/product.js.map +0 -1
- package/lib/common/services/tracing.d.ts +0 -9
- package/lib/common/services/tracing.d.ts.map +0 -1
- package/lib/common/services/tracing.js +0 -25
- package/lib/common/services/tracing.js.map +0 -1
- package/lib/common/types/agents/agent.d.ts +0 -49
- package/lib/common/types/agents/agent.d.ts.map +0 -1
- package/lib/common/types/agents/agent.js +0 -9
- package/lib/common/types/agents/agent.js.map +0 -1
- package/lib/common/types/agents/ai.d.ts +0 -96
- package/lib/common/types/agents/ai.d.ts.map +0 -1
- package/lib/common/types/agents/ai.js +0 -3
- package/lib/common/types/agents/ai.js.map +0 -1
- package/lib/common/types/agents/completion.d.ts +0 -192
- package/lib/common/types/agents/completion.d.ts.map +0 -1
- package/lib/common/types/agents/completion.js +0 -4
- package/lib/common/types/agents/completion.js.map +0 -1
- package/lib/common/types/agents/conversation-manager.d.ts +0 -256
- package/lib/common/types/agents/conversation-manager.d.ts.map +0 -1
- package/lib/common/types/agents/conversation-manager.js +0 -3
- package/lib/common/types/agents/conversation-manager.js.map +0 -1
- package/lib/common/types/agents/craft-history.d.ts +0 -111
- package/lib/common/types/agents/craft-history.d.ts.map +0 -1
- package/lib/common/types/agents/craft-history.js +0 -3
- package/lib/common/types/agents/craft-history.js.map +0 -1
- package/lib/common/types/agents/craft.d.ts +0 -17
- package/lib/common/types/agents/craft.d.ts.map +0 -1
- package/lib/common/types/agents/craft.js +0 -3
- package/lib/common/types/agents/craft.js.map +0 -1
- package/lib/common/types/agents/file-tree.d.ts +0 -169
- package/lib/common/types/agents/file-tree.d.ts.map +0 -1
- package/lib/common/types/agents/file-tree.js +0 -17
- package/lib/common/types/agents/file-tree.js.map +0 -1
- package/lib/common/types/agents/index.d.ts +0 -10
- package/lib/common/types/agents/index.d.ts.map +0 -1
- package/lib/common/types/agents/index.js +0 -26
- package/lib/common/types/agents/index.js.map +0 -1
- package/lib/common/types/agents/run.d.ts +0 -133
- package/lib/common/types/agents/run.d.ts.map +0 -1
- package/lib/common/types/agents/run.js +0 -27
- package/lib/common/types/agents/run.js.map +0 -1
- package/lib/common/types/agents/tools.d.ts +0 -336
- package/lib/common/types/agents/tools.d.ts.map +0 -1
- package/lib/common/types/agents/tools.js +0 -59
- package/lib/common/types/agents/tools.js.map +0 -1
- package/lib/common/types/agents/user-reference.d.ts +0 -78
- package/lib/common/types/agents/user-reference.d.ts.map +0 -1
- package/lib/common/types/agents/user-reference.js +0 -3
- package/lib/common/types/agents/user-reference.js.map +0 -1
- package/lib/common/types/auth.d.ts +0 -59
- package/lib/common/types/auth.d.ts.map +0 -1
- package/lib/common/types/auth.js +0 -3
- package/lib/common/types/auth.js.map +0 -1
- package/lib/common/types/codebase.d.ts +0 -69
- package/lib/common/types/codebase.d.ts.map +0 -1
- package/lib/common/types/codebase.js +0 -3
- package/lib/common/types/codebase.js.map +0 -1
- package/lib/common/types/event/activity.d.ts +0 -5
- package/lib/common/types/event/activity.d.ts.map +0 -1
- package/lib/common/types/event/activity.js +0 -3
- package/lib/common/types/event/activity.js.map +0 -1
- package/lib/common/types/event/authentication.d.ts +0 -9
- package/lib/common/types/event/authentication.d.ts.map +0 -1
- package/lib/common/types/event/authentication.js +0 -9
- package/lib/common/types/event/authentication.js.map +0 -1
- package/lib/common/types/event/chat.d.ts +0 -38
- package/lib/common/types/event/chat.d.ts.map +0 -1
- package/lib/common/types/event/chat.js +0 -3
- package/lib/common/types/event/chat.js.map +0 -1
- package/lib/common/types/event/check-point.d.ts +0 -13
- package/lib/common/types/event/check-point.d.ts.map +0 -1
- package/lib/common/types/event/check-point.js +0 -3
- package/lib/common/types/event/check-point.js.map +0 -1
- package/lib/common/types/event/code.d.ts +0 -19
- package/lib/common/types/event/code.d.ts.map +0 -1
- package/lib/common/types/event/code.js +0 -11
- package/lib/common/types/event/code.js.map +0 -1
- package/lib/common/types/event/commit-message.d.ts +0 -25
- package/lib/common/types/event/commit-message.d.ts.map +0 -1
- package/lib/common/types/event/commit-message.js +0 -3
- package/lib/common/types/event/commit-message.js.map +0 -1
- package/lib/common/types/event/completion.d.ts +0 -276
- package/lib/common/types/event/completion.d.ts.map +0 -1
- package/lib/common/types/event/completion.js +0 -38
- package/lib/common/types/event/completion.js.map +0 -1
- package/lib/common/types/event/craft.d.ts +0 -218
- package/lib/common/types/event/craft.d.ts.map +0 -1
- package/lib/common/types/event/craft.js +0 -3
- package/lib/common/types/event/craft.js.map +0 -1
- package/lib/common/types/event/events.d.ts +0 -114
- package/lib/common/types/event/events.d.ts.map +0 -1
- package/lib/common/types/event/events.js +0 -79
- package/lib/common/types/event/events.js.map +0 -1
- package/lib/common/types/event/ide-event.d.ts +0 -44
- package/lib/common/types/event/ide-event.d.ts.map +0 -1
- package/lib/common/types/event/ide-event.js +0 -15
- package/lib/common/types/event/ide-event.js.map +0 -1
- package/lib/common/types/event/index.d.ts +0 -12
- package/lib/common/types/event/index.d.ts.map +0 -1
- package/lib/common/types/event/index.js +0 -28
- package/lib/common/types/event/index.js.map +0 -1
- package/lib/common/types/event/legacy-completion.d.ts +0 -196
- package/lib/common/types/event/legacy-completion.d.ts.map +0 -1
- package/lib/common/types/event/legacy-completion.js +0 -38
- package/lib/common/types/event/legacy-completion.js.map +0 -1
- package/lib/common/types/event/mcp.d.ts +0 -20
- package/lib/common/types/event/mcp.d.ts.map +0 -1
- package/lib/common/types/event/mcp.js +0 -3
- package/lib/common/types/event/mcp.js.map +0 -1
- package/lib/common/types/event/plugin-status.d.ts +0 -7
- package/lib/common/types/event/plugin-status.d.ts.map +0 -1
- package/lib/common/types/event/plugin-status.js +0 -3
- package/lib/common/types/event/plugin-status.js.map +0 -1
- package/lib/common/types/event/protocol.d.ts +0 -24
- package/lib/common/types/event/protocol.d.ts.map +0 -1
- package/lib/common/types/event/protocol.js +0 -3
- package/lib/common/types/event/protocol.js.map +0 -1
- package/lib/common/types/filepath.d.ts +0 -35
- package/lib/common/types/filepath.d.ts.map +0 -1
- package/lib/common/types/filepath.js +0 -3
- package/lib/common/types/filepath.js.map +0 -1
- package/lib/common/types/http.d.ts +0 -3
- package/lib/common/types/http.d.ts.map +0 -1
- package/lib/common/types/http.js +0 -3
- package/lib/common/types/http.js.map +0 -1
- package/lib/common/types/index.d.ts +0 -11
- package/lib/common/types/index.d.ts.map +0 -1
- package/lib/common/types/index.js +0 -27
- package/lib/common/types/index.js.map +0 -1
- package/lib/common/types/logger.d.ts +0 -10
- package/lib/common/types/logger.d.ts.map +0 -1
- package/lib/common/types/logger.js +0 -3
- package/lib/common/types/logger.js.map +0 -1
- package/lib/common/types/product/activities.d.ts +0 -5
- package/lib/common/types/product/activities.d.ts.map +0 -1
- package/lib/common/types/product/activities.js +0 -3
- package/lib/common/types/product/activities.js.map +0 -1
- package/lib/common/types/product/agent-tools.d.ts +0 -5
- package/lib/common/types/product/agent-tools.d.ts.map +0 -1
- package/lib/common/types/product/agent-tools.js +0 -3
- package/lib/common/types/product/agent-tools.js.map +0 -1
- package/lib/common/types/product/agent.d.ts +0 -38
- package/lib/common/types/product/agent.d.ts.map +0 -1
- package/lib/common/types/product/agent.js +0 -10
- package/lib/common/types/product/agent.js.map +0 -1
- package/lib/common/types/product/authentication.d.ts +0 -84
- package/lib/common/types/product/authentication.d.ts.map +0 -1
- package/lib/common/types/product/authentication.js +0 -40
- package/lib/common/types/product/authentication.js.map +0 -1
- package/lib/common/types/product/codebase.d.ts +0 -40
- package/lib/common/types/product/codebase.d.ts.map +0 -1
- package/lib/common/types/product/codebase.js +0 -3
- package/lib/common/types/product/codebase.js.map +0 -1
- package/lib/common/types/product/commit-message.d.ts +0 -7
- package/lib/common/types/product/commit-message.d.ts.map +0 -1
- package/lib/common/types/product/commit-message.js +0 -3
- package/lib/common/types/product/commit-message.js.map +0 -1
- package/lib/common/types/product/completion.d.ts +0 -8
- package/lib/common/types/product/completion.d.ts.map +0 -1
- package/lib/common/types/product/completion.js +0 -3
- package/lib/common/types/product/completion.js.map +0 -1
- package/lib/common/types/product/config.d.ts +0 -6
- package/lib/common/types/product/config.d.ts.map +0 -1
- package/lib/common/types/product/config.js +0 -3
- package/lib/common/types/product/config.js.map +0 -1
- package/lib/common/types/product/features.d.ts +0 -149
- package/lib/common/types/product/features.d.ts.map +0 -1
- package/lib/common/types/product/features.js +0 -154
- package/lib/common/types/product/features.js.map +0 -1
- package/lib/common/types/product/index.d.ts +0 -23
- package/lib/common/types/product/index.d.ts.map +0 -1
- package/lib/common/types/product/index.js +0 -39
- package/lib/common/types/product/index.js.map +0 -1
- package/lib/common/types/product/inline-chat.d.ts +0 -15
- package/lib/common/types/product/inline-chat.d.ts.map +0 -1
- package/lib/common/types/product/inline-chat.js +0 -3
- package/lib/common/types/product/inline-chat.js.map +0 -1
- package/lib/common/types/product/knowledge-base.d.ts +0 -16
- package/lib/common/types/product/knowledge-base.d.ts.map +0 -1
- package/lib/common/types/product/knowledge-base.js +0 -3
- package/lib/common/types/product/knowledge-base.js.map +0 -1
- package/lib/common/types/product/language-model.d.ts +0 -38
- package/lib/common/types/product/language-model.d.ts.map +0 -1
- package/lib/common/types/product/language-model.js +0 -3
- package/lib/common/types/product/language-model.js.map +0 -1
- package/lib/common/types/product/links.d.ts +0 -20
- package/lib/common/types/product/links.d.ts.map +0 -1
- package/lib/common/types/product/links.js +0 -3
- package/lib/common/types/product/links.js.map +0 -1
- package/lib/common/types/product/log.d.ts +0 -39
- package/lib/common/types/product/log.d.ts.map +0 -1
- package/lib/common/types/product/log.js +0 -12
- package/lib/common/types/product/log.js.map +0 -1
- package/lib/common/types/product/product-provider.d.ts +0 -12
- package/lib/common/types/product/product-provider.d.ts.map +0 -1
- package/lib/common/types/product/product-provider.js +0 -5
- package/lib/common/types/product/product-provider.js.map +0 -1
- package/lib/common/types/product/product.d.ts +0 -179
- package/lib/common/types/product/product.d.ts.map +0 -1
- package/lib/common/types/product/product.js +0 -3
- package/lib/common/types/product/product.js.map +0 -1
- package/lib/common/types/product/prompt-template.d.ts +0 -6
- package/lib/common/types/product/prompt-template.d.ts.map +0 -1
- package/lib/common/types/product/prompt-template.js +0 -3
- package/lib/common/types/product/prompt-template.js.map +0 -1
- package/lib/common/types/product/remote-agent.d.ts +0 -20
- package/lib/common/types/product/remote-agent.d.ts.map +0 -1
- package/lib/common/types/product/remote-agent.js +0 -3
- package/lib/common/types/product/remote-agent.js.map +0 -1
- package/lib/common/types/product/replacement.d.ts +0 -38
- package/lib/common/types/product/replacement.d.ts.map +0 -1
- package/lib/common/types/product/replacement.js +0 -18
- package/lib/common/types/product/replacement.js.map +0 -1
- package/lib/common/types/product/telemetry.d.ts +0 -18
- package/lib/common/types/product/telemetry.d.ts.map +0 -1
- package/lib/common/types/product/telemetry.js +0 -3
- package/lib/common/types/product/telemetry.js.map +0 -1
- package/lib/common/types/product/updates.d.ts +0 -17
- package/lib/common/types/product/updates.d.ts.map +0 -1
- package/lib/common/types/product/updates.js +0 -8
- package/lib/common/types/product/updates.js.map +0 -1
- package/lib/common/types/protocol.d.ts +0 -9
- package/lib/common/types/protocol.d.ts.map +0 -1
- package/lib/common/types/protocol.js +0 -10
- package/lib/common/types/protocol.js.map +0 -1
- package/lib/common/types/tracing.d.ts +0 -74
- package/lib/common/types/tracing.d.ts.map +0 -1
- package/lib/common/types/tracing.js +0 -3
- package/lib/common/types/tracing.js.map +0 -1
- package/lib/common/utils.d.ts +0 -3
- package/lib/common/utils.d.ts.map +0 -1
- package/lib/common/utils.js +0 -10
- package/lib/common/utils.js.map +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Log = void 0;
|
|
4
|
-
const core_1 = require("@celljs/core");
|
|
5
|
-
const component_registry_1 = require("../component-registry");
|
|
6
|
-
const protocol_1 = require("../types/protocol");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
class Log {
|
|
9
|
-
static async getLogger() {
|
|
10
|
-
return (0, utils_1.doGet)(core_1.Logger);
|
|
11
|
-
}
|
|
12
|
-
static async registerLogger(constructor) {
|
|
13
|
-
await component_registry_1.ComponentRegistry.rebind(core_1.Logger, constructor, protocol_1.Scope.Transient);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Log = Log;
|
|
17
|
-
//# sourceMappingURL=logger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/common/services/logger.ts"],"names":[],"mappings":";;;AAAA,uCAAmD;AAEnD,8DAA0D;AAE1D,gDAAmD;AACnD,oCAAiC;AAEjC,MAAsB,GAAG;IAErB,MAAM,CAAC,KAAK,CAAC,SAAS;QAClB,OAAO,IAAA,aAAK,EAAS,aAAS,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,WAA4B;QACpD,MAAM,sCAAiB,CAAC,MAAM,CAAC,aAAS,EAAE,WAAW,EAAE,gBAAK,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;CACJ;AATD,kBASC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { ProductConfiguration, ProductProvider } from '../types/product';
|
|
3
|
-
import { Newable } from '../types/protocol';
|
|
4
|
-
export declare abstract class Product {
|
|
5
|
-
static configuration$(): Promise<BehaviorSubject<ProductConfiguration | undefined>>;
|
|
6
|
-
static waitConfiguration(): Promise<ProductConfiguration>;
|
|
7
|
-
static sync(): Promise<void>;
|
|
8
|
-
static registerProductProvider(constructor: Newable<ProductProvider>): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/common/services/product.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAGvC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,8BAAsB,OAAO;WACZ,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;WAK5E,iBAAiB,IAAI,OAAO,CAAC,oBAAoB,CAAC;WAKlD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;WAKrB,uBAAuB,CAAC,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7F"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Product = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
const product_1 = require("@genie/product");
|
|
6
|
-
const component_registry_1 = require("../component-registry");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
class Product {
|
|
9
|
-
static async configuration$() {
|
|
10
|
-
const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
|
|
11
|
-
return productManagerService.configuration;
|
|
12
|
-
}
|
|
13
|
-
static async waitConfiguration() {
|
|
14
|
-
const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
|
|
15
|
-
return productManagerService.waitConfiguration();
|
|
16
|
-
}
|
|
17
|
-
static async sync() {
|
|
18
|
-
const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
|
|
19
|
-
return productManagerService.sync();
|
|
20
|
-
}
|
|
21
|
-
static async registerProductProvider(constructor) {
|
|
22
|
-
await component_registry_1.ComponentRegistry.bind(product_1.ProductProvider, constructor);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.Product = Product;
|
|
26
|
-
//# sourceMappingURL=product.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/common/services/product.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,4CAAuF;AAGvF,8DAA0D;AAG1D,oCAAiC;AAEjC,MAAsB,OAAO;IACzB,MAAM,CAAC,KAAK,CAAC,cAAc;QACvB,MAAM,qBAAqB,GAAG,MAAM,IAAA,aAAK,EAAiB,wBAAc,CAAC,CAAC;QAC1E,OAAO,qBAAqB,CAAC,aAAoB,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,iBAAiB;QAC1B,MAAM,qBAAqB,GAAG,MAAM,IAAA,aAAK,EAAiB,wBAAc,CAAC,CAAC;QAC1E,OAAO,qBAAqB,CAAC,iBAAiB,EAAS,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAI;QACb,MAAM,qBAAqB,GAAG,MAAM,IAAA,aAAK,EAAiB,wBAAc,CAAC,CAAC;QAC1E,OAAO,qBAAqB,CAAC,IAAI,EAAE,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,WAAqC;QACtE,MAAM,sCAAiB,CAAC,IAAI,CAAC,yBAAkB,EAAE,WAAW,CAAC,CAAC;IAClE,CAAC;CACJ;AAnBD,0BAmBC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Newable } from '../types/protocol';
|
|
2
|
-
import { ResourcesProvider, RootSpan, SpanOptions, TracingInitOptions } from '../types/tracing';
|
|
3
|
-
export declare abstract class Tracing {
|
|
4
|
-
static init(options?: TracingInitOptions): Promise<void>;
|
|
5
|
-
static shutdown(): Promise<void>;
|
|
6
|
-
static startTrace(traceName: string, traceId?: string, spanOptions?: SpanOptions): Promise<RootSpan>;
|
|
7
|
-
static registerResourcesProvider(constructor: Newable<ResourcesProvider>): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../src/common/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGhG,8BAAsB,OAAO;WACZ,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;WAKjD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;WAKzB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;WAK7F,yBAAyB,CAAC,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjG"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Tracing = void 0;
|
|
4
|
-
const telemetry_1 = require("@genie/telemetry");
|
|
5
|
-
const component_registry_1 = require("../component-registry");
|
|
6
|
-
const utils_1 = require("../utils");
|
|
7
|
-
class Tracing {
|
|
8
|
-
static async init(options) {
|
|
9
|
-
const traceService = await (0, utils_1.doGet)(telemetry_1.TraceService);
|
|
10
|
-
await traceService.init(options);
|
|
11
|
-
}
|
|
12
|
-
static async shutdown() {
|
|
13
|
-
const traceService = await (0, utils_1.doGet)(telemetry_1.TraceService);
|
|
14
|
-
await traceService.shutdown();
|
|
15
|
-
}
|
|
16
|
-
static async startTrace(traceName, traceId, spanOptions) {
|
|
17
|
-
const traceService = await (0, utils_1.doGet)(telemetry_1.TraceService);
|
|
18
|
-
return traceService.startTrace(traceName, traceId, spanOptions);
|
|
19
|
-
}
|
|
20
|
-
static async registerResourcesProvider(constructor) {
|
|
21
|
-
await component_registry_1.ComponentRegistry.bind(telemetry_1.ResourcesProvider, constructor);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Tracing = Tracing;
|
|
25
|
-
//# sourceMappingURL=tracing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/common/services/tracing.ts"],"names":[],"mappings":";;;AACA,gDAA0H;AAE1H,8DAA0D;AAG1D,oCAAiC;AAEjC,MAAsB,OAAO;IACzB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAA4B;QAC1C,MAAM,YAAY,GAAG,MAAM,IAAA,aAAK,EAAe,wBAAY,CAAC,CAAC;QAC7D,MAAM,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ;QACjB,MAAM,YAAY,GAAG,MAAM,IAAA,aAAK,EAAe,wBAAY,CAAC,CAAC;QAC7D,MAAM,YAAY,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,SAAiB,EAAE,OAAgB,EAAE,WAAyB;QAClF,MAAM,YAAY,GAAG,MAAM,IAAA,aAAK,EAAe,wBAAY,CAAC,CAAC;QAC7D,OAAO,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,WAA6B,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,WAAuC;QAC1E,MAAM,sCAAiB,CAAC,IAAI,CAAC,6BAAoB,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC;CACJ;AAnBD,0BAmBC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Agent } from '../product/agent';
|
|
2
|
-
import { CodeCompletionModelOptions } from './completion';
|
|
3
|
-
export interface AgentCallRequest {
|
|
4
|
-
agent: string;
|
|
5
|
-
agentContext: AgentContext;
|
|
6
|
-
}
|
|
7
|
-
export declare enum CodeCompletionAgentNames {
|
|
8
|
-
CODE_COMPLETION = "CodeCompletion",
|
|
9
|
-
CODE_COMPLETION_NES = "CodeCompletionNes"
|
|
10
|
-
}
|
|
11
|
-
export interface CompletionAgentCallRequest {
|
|
12
|
-
agent: CodeCompletionAgentNames;
|
|
13
|
-
agentContext: Omit<AgentContext, 'modelOptions'> & {
|
|
14
|
-
modelOptions?: CodeCompletionModelOptions;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface AgentContext extends Record<string, any> {
|
|
18
|
-
done?: boolean;
|
|
19
|
-
agent?: Agent;
|
|
20
|
-
/**
|
|
21
|
-
* 渲染后的系统提示词
|
|
22
|
-
*/
|
|
23
|
-
instructions?: string;
|
|
24
|
-
variables?: AgentContextVariable[];
|
|
25
|
-
modelOptions?: ModelOptions;
|
|
26
|
-
}
|
|
27
|
-
export interface AgentContextVariable {
|
|
28
|
-
name: string;
|
|
29
|
-
value: any;
|
|
30
|
-
}
|
|
31
|
-
export interface ModelOptions {
|
|
32
|
-
signal?: AbortSignal;
|
|
33
|
-
httpHeaders?: Record<string, string>;
|
|
34
|
-
model?: string;
|
|
35
|
-
frequencyPenalty?: number;
|
|
36
|
-
maxTokens?: number;
|
|
37
|
-
presencePenalty?: number;
|
|
38
|
-
temperature?: number;
|
|
39
|
-
topP?: number;
|
|
40
|
-
extra?: Record<string, unknown>;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 系统提示信息接口
|
|
44
|
-
*/
|
|
45
|
-
export interface SystemPrompt {
|
|
46
|
-
prompt: string;
|
|
47
|
-
specialInstructions?: string;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/common/types/agents/agent.ts"],"names":[],"mappings":"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;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CodeCompletionAgentNames = void 0;
|
|
4
|
-
var CodeCompletionAgentNames;
|
|
5
|
-
(function (CodeCompletionAgentNames) {
|
|
6
|
-
CodeCompletionAgentNames["CODE_COMPLETION"] = "CodeCompletion";
|
|
7
|
-
CodeCompletionAgentNames["CODE_COMPLETION_NES"] = "CodeCompletionNes";
|
|
8
|
-
})(CodeCompletionAgentNames || (exports.CodeCompletionAgentNames = CodeCompletionAgentNames = {}));
|
|
9
|
-
//# sourceMappingURL=agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../src/common/types/agents/agent.ts"],"names":[],"mappings":";;;AAQA,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAChC,8DAAkC,CAAA;IAClC,qEAAyC,CAAA;AAC7C,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
|
|
2
|
-
export type CoreSystemMessage = {
|
|
3
|
-
role: 'system';
|
|
4
|
-
content: string;
|
|
5
|
-
providerOptions?: ProviderOptions;
|
|
6
|
-
};
|
|
7
|
-
export type CoreUserMessage = {
|
|
8
|
-
role: 'user';
|
|
9
|
-
content: UserContent;
|
|
10
|
-
providerOptions?: ProviderOptions;
|
|
11
|
-
};
|
|
12
|
-
export type UserContent = string | Array<TextPart | ImagePart | FilePart>;
|
|
13
|
-
export type LanguageModelV1ProviderMetadata = Record<string, Record<string, JSONValue>>;
|
|
14
|
-
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
15
|
-
export interface JSONObject {
|
|
16
|
-
[key: string]: JSONValue;
|
|
17
|
-
}
|
|
18
|
-
export type JSONArray = JSONValue[];
|
|
19
|
-
export type ProviderMetadata = LanguageModelV1ProviderMetadata;
|
|
20
|
-
export type ProviderOptions = LanguageModelV1ProviderMetadata;
|
|
21
|
-
export interface TextPart {
|
|
22
|
-
type: 'text';
|
|
23
|
-
text: string;
|
|
24
|
-
providerOptions?: ProviderOptions;
|
|
25
|
-
}
|
|
26
|
-
export type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
|
|
27
|
-
export interface ImagePart {
|
|
28
|
-
type: 'image';
|
|
29
|
-
image: DataContent | URL;
|
|
30
|
-
mimeType?: string;
|
|
31
|
-
providerOptions?: ProviderOptions;
|
|
32
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
33
|
-
}
|
|
34
|
-
export interface FilePart {
|
|
35
|
-
type: 'file';
|
|
36
|
-
data: DataContent | URL;
|
|
37
|
-
filename?: string;
|
|
38
|
-
mimeType: string;
|
|
39
|
-
providerOptions?: ProviderOptions;
|
|
40
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
41
|
-
}
|
|
42
|
-
type CoreAssistantMessage = {
|
|
43
|
-
role: 'assistant';
|
|
44
|
-
content: AssistantContent;
|
|
45
|
-
providerOptions?: ProviderOptions;
|
|
46
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
47
|
-
};
|
|
48
|
-
type AssistantContent = string | Array<TextPart | FilePart | ReasoningPart | RedactedReasoningPart | ToolCallPart>;
|
|
49
|
-
interface ReasoningPart {
|
|
50
|
-
type: 'reasoning';
|
|
51
|
-
text: string;
|
|
52
|
-
signature?: string;
|
|
53
|
-
providerOptions?: ProviderOptions;
|
|
54
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
55
|
-
}
|
|
56
|
-
interface RedactedReasoningPart {
|
|
57
|
-
type: 'redacted-reasoning';
|
|
58
|
-
data: string;
|
|
59
|
-
providerOptions?: ProviderOptions;
|
|
60
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
61
|
-
}
|
|
62
|
-
interface ToolCallPart {
|
|
63
|
-
type: 'tool-call';
|
|
64
|
-
toolCallId: string;
|
|
65
|
-
toolName: string;
|
|
66
|
-
args: unknown;
|
|
67
|
-
providerOptions?: ProviderOptions;
|
|
68
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
69
|
-
}
|
|
70
|
-
interface ToolResultPart {
|
|
71
|
-
type: 'tool-result';
|
|
72
|
-
toolCallId: string;
|
|
73
|
-
toolName: string;
|
|
74
|
-
result: unknown;
|
|
75
|
-
experimental_content?: ToolResultContent;
|
|
76
|
-
isError?: boolean;
|
|
77
|
-
providerOptions?: ProviderOptions;
|
|
78
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
79
|
-
}
|
|
80
|
-
type ToolResultContent = Array<{
|
|
81
|
-
type: 'text';
|
|
82
|
-
text: string;
|
|
83
|
-
} | {
|
|
84
|
-
type: 'image';
|
|
85
|
-
data: string;
|
|
86
|
-
mimeType?: string;
|
|
87
|
-
}>;
|
|
88
|
-
export type CoreToolMessage = {
|
|
89
|
-
role: 'tool';
|
|
90
|
-
content: ToolContent;
|
|
91
|
-
providerOptions?: ProviderOptions;
|
|
92
|
-
experimental_providerMetadata?: ProviderMetadata;
|
|
93
|
-
};
|
|
94
|
-
type ToolContent = Array<ToolResultPart>;
|
|
95
|
-
export {};
|
|
96
|
-
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../../src/common/types/agents/ai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,eAAe,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAGvG,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,eAAe,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C,EAAE,eAAe,CAAC;IAClC,6BAA6B,CAAC,EAAE,gBAAgB,CAAC;CACpD;AAED,KAAK,iBAAiB,GAAG,KAAK,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,GAAG;IACA,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAGH,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,6BAA6B,CAAC,EAAE,gBAAgB,CAAC;CACpD,CAAC;AACF,KAAK,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../../src/common/types/agents/ai.ts"],"names":[],"mappings":""}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { ModelOptions } from './agent';
|
|
2
|
-
export interface ResultMetadata {
|
|
3
|
-
}
|
|
4
|
-
export interface ModelResult<T> {
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the output generated by the AI model.
|
|
7
|
-
* The output generated by the AI model
|
|
8
|
-
*/
|
|
9
|
-
readonly output: T;
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves the metadata associated with the result of an AI model.
|
|
12
|
-
* The metadata associated with the result
|
|
13
|
-
*/
|
|
14
|
-
readonly metadata: ResultMetadata;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Interface representing a request to an AI model. This interface encapsulates the
|
|
18
|
-
* necessary information required to interact with an AI model, including instructions or
|
|
19
|
-
* inputs (of generic type T) and additional model options. It provides a standardized way
|
|
20
|
-
* to send requests to AI models, ensuring that all necessary details are included and can
|
|
21
|
-
* be easily managed.
|
|
22
|
-
*
|
|
23
|
-
* @param <T> the type of instructions or input required by the AI model
|
|
24
|
-
*/
|
|
25
|
-
export interface ModelRequest<T> {
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves the instructions or input required by the AI model.
|
|
28
|
-
* The instructions or input required by the AI model
|
|
29
|
-
*/
|
|
30
|
-
readonly instructions: T;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves the customizable options for AI model interactions.
|
|
33
|
-
* The customizable options for AI model interactions
|
|
34
|
-
*/
|
|
35
|
-
readonly options: ModelOptions;
|
|
36
|
-
}
|
|
37
|
-
export interface CodeCompletionGenerationMetadata extends ResultMetadata {
|
|
38
|
-
/**
|
|
39
|
-
* The reason this choice completed for the generation.
|
|
40
|
-
*/
|
|
41
|
-
readonly contentFilterMetadata?: any;
|
|
42
|
-
/**
|
|
43
|
-
* The reason this choice completed for the generation.
|
|
44
|
-
*/
|
|
45
|
-
readonly finishReason?: string;
|
|
46
|
-
readonly metadata: Record<string, any>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Interface representing the response received from an AI model. This interface provides
|
|
50
|
-
* methods to access the main result or a list of results generated by the AI model, along
|
|
51
|
-
* with the response metadata. It serves as a standardized way to encapsulate and manage
|
|
52
|
-
* the output from AI models, ensuring easy retrieval and processing of the generated
|
|
53
|
-
* information.
|
|
54
|
-
*
|
|
55
|
-
* @param <T> the type of the result(s) provided by the AI model
|
|
56
|
-
*/
|
|
57
|
-
export interface ModelResponse<T extends ModelResult<any>> {
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves the result of the AI model.
|
|
60
|
-
* The result generated by the AI model
|
|
61
|
-
*/
|
|
62
|
-
readonly result: T;
|
|
63
|
-
/**
|
|
64
|
-
* Retrieves the list of generated outputs by the AI model.
|
|
65
|
-
* The list of generated outputs
|
|
66
|
-
*/
|
|
67
|
-
readonly results: T[];
|
|
68
|
-
/**
|
|
69
|
-
* Retrieves the response metadata associated with the AI model's response.
|
|
70
|
-
* The response metadata
|
|
71
|
-
*/
|
|
72
|
-
readonly metadata: ResponseMetadata;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Interface representing metadata associated with an AI model's response. This interface
|
|
76
|
-
* is designed to provide additional information about the generative response from an AI
|
|
77
|
-
* model, including processing details and model-specific data. It serves as a value
|
|
78
|
-
* object within the core domain, enhancing the understanding and management of AI model
|
|
79
|
-
* responses in various applications.
|
|
80
|
-
*/
|
|
81
|
-
export interface ResponseMetadata {
|
|
82
|
-
readonly extra: Record<string, any>;
|
|
83
|
-
}
|
|
84
|
-
export interface CodeCompletionModelOptions extends ModelOptions {
|
|
85
|
-
httpHeaders?: Record<string, string>;
|
|
86
|
-
stopSequences?: string[];
|
|
87
|
-
topK?: number;
|
|
88
|
-
n?: number;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Represents a response returned by the AI.
|
|
92
|
-
*/
|
|
93
|
-
export interface Generation extends ModelResult<string> {
|
|
94
|
-
metadata: CodeCompletionGenerationMetadata;
|
|
95
|
-
}
|
|
96
|
-
export interface CodeCompletionResponse extends ModelResponse<Generation> {
|
|
97
|
-
metadata: CodeCompletionResponseMetadata;
|
|
98
|
-
}
|
|
99
|
-
export interface CodeCompletionResponseMetadata extends ResponseMetadata {
|
|
100
|
-
id?: string;
|
|
101
|
-
model?: string;
|
|
102
|
-
costs?: number[];
|
|
103
|
-
/**
|
|
104
|
-
* AI provider specific metadata on rate limits.
|
|
105
|
-
* @see RateLimit
|
|
106
|
-
*/
|
|
107
|
-
rateLimit: RateLimit;
|
|
108
|
-
/**
|
|
109
|
-
* AI provider specific metadata on API usage.
|
|
110
|
-
* @see Usage
|
|
111
|
-
*/
|
|
112
|
-
usage: Usage;
|
|
113
|
-
promptMetadata: PromptMetadata;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Abstract Data Type (ADT) modeling filter metadata for all prompts sent during an AI
|
|
117
|
-
* request.
|
|
118
|
-
*/
|
|
119
|
-
export interface PromptFilterMetadata<T = any> {
|
|
120
|
-
/**
|
|
121
|
-
* Index of the prompt filter metadata contained in the AI response.
|
|
122
|
-
*/
|
|
123
|
-
readonly promptIndex: number;
|
|
124
|
-
/**
|
|
125
|
-
* Returns the underlying AI provider metadata for filtering applied to prompt
|
|
126
|
-
* content.
|
|
127
|
-
* @param <T> {@link Class Type} used to cast the filtered content metadata into
|
|
128
|
-
* the AI provider-specific type.
|
|
129
|
-
* @return the underlying AI provider metadata for filtering applied to prompt
|
|
130
|
-
* content.
|
|
131
|
-
*/
|
|
132
|
-
readonly contentFilterMetadata: T;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Abstract Data Type (ADT) modeling metadata gathered by the AI during request
|
|
136
|
-
* processing.
|
|
137
|
-
*/
|
|
138
|
-
export type PromptMetadata = PromptFilterMetadata[];
|
|
139
|
-
/**
|
|
140
|
-
* Abstract Data Type (ADT) encapsulating metadata from an AI provider's API rate limits
|
|
141
|
-
* granted to the API key in use and the API key's current balance.
|
|
142
|
-
*/
|
|
143
|
-
export interface RateLimit {
|
|
144
|
-
/**
|
|
145
|
-
* The maximum number of requests that are permitted before exhausting the
|
|
146
|
-
* rate limit.
|
|
147
|
-
*/
|
|
148
|
-
readonly requestsLimit?: number;
|
|
149
|
-
/**
|
|
150
|
-
* The remaining number of requests that are permitted before exhausting the
|
|
151
|
-
* requestsLimit rate limit.
|
|
152
|
-
*/
|
|
153
|
-
readonly requestsRemaining?: number;
|
|
154
|
-
/**
|
|
155
|
-
* The duration time until the rate limit (based on requests) resets
|
|
156
|
-
* to its requestsLimit initial state.
|
|
157
|
-
*/
|
|
158
|
-
readonly requestsReset?: number;
|
|
159
|
-
/**
|
|
160
|
-
* The maximum number of tokens that are permitted before exhausting the rate
|
|
161
|
-
* limit.
|
|
162
|
-
*/
|
|
163
|
-
readonly tokensLimit?: number;
|
|
164
|
-
/**
|
|
165
|
-
* The remaining number of tokens that are permitted before exhausting the
|
|
166
|
-
* tokensLimit rate limit.
|
|
167
|
-
*/
|
|
168
|
-
readonly tokensRemaining?: number;
|
|
169
|
-
/**
|
|
170
|
-
* The duration time until the rate limit (based on tokens) resets to
|
|
171
|
-
* its tokensLimit initial state.
|
|
172
|
-
*/
|
|
173
|
-
readonly tokensReset?: number;
|
|
174
|
-
}
|
|
175
|
-
interface Usage {
|
|
176
|
-
/**
|
|
177
|
-
* The number of tokens used in the prompt of the AI request.
|
|
178
|
-
*/
|
|
179
|
-
readonly promptTokens?: number;
|
|
180
|
-
/**
|
|
181
|
-
* The number of tokens returned in the generation (aka completion)
|
|
182
|
-
* of the AI's response.
|
|
183
|
-
*/
|
|
184
|
-
readonly generationTokens?: number;
|
|
185
|
-
/**
|
|
186
|
-
* The total number of tokens from both the prompt of an AI request
|
|
187
|
-
* and generation of the AI's response.
|
|
188
|
-
*/
|
|
189
|
-
readonly totalTokens?: number;
|
|
190
|
-
}
|
|
191
|
-
export {};
|
|
192
|
-
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../../src/common/types/agents/completion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,WAAW,cAAc;CAAI;AAEnC,MAAM,WAAW,WAAW,CAAC,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,gCAAiC,SAAQ,cAAc;IAEpE;;OAEG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAErC;;OAEG;IAC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