@tencent-ai/agent-sdk 0.0.1 → 0.0.3

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.
Files changed (103) hide show
  1. package/README.md +46 -32
  2. package/dist/agent-sdk.js +1 -1
  3. package/lib/common/index.d.ts +1 -0
  4. package/lib/common/index.d.ts.map +1 -1
  5. package/lib/common/index.js +1 -0
  6. package/lib/common/index.js.map +1 -1
  7. package/lib/common/services/agent.d.ts +8 -0
  8. package/lib/common/services/agent.d.ts.map +1 -0
  9. package/lib/common/services/agent.js +13 -0
  10. package/lib/common/services/agent.js.map +1 -0
  11. package/lib/common/services/event.d.ts +8 -0
  12. package/lib/common/services/event.d.ts.map +1 -0
  13. package/lib/common/services/event.js +18 -0
  14. package/lib/common/services/event.js.map +1 -0
  15. package/lib/common/services/http.d.ts +6 -0
  16. package/lib/common/services/http.d.ts.map +1 -0
  17. package/lib/common/services/http.js +12 -0
  18. package/lib/common/services/http.js.map +1 -0
  19. package/lib/common/services/index.d.ts +7 -0
  20. package/lib/common/services/index.d.ts.map +1 -0
  21. package/lib/common/services/index.js +23 -0
  22. package/lib/common/services/index.js.map +1 -0
  23. package/lib/common/services/logger.d.ts +7 -0
  24. package/lib/common/services/logger.d.ts.map +1 -0
  25. package/lib/common/services/logger.js +18 -0
  26. package/lib/common/services/logger.js.map +1 -0
  27. package/lib/common/services/product.d.ts +11 -0
  28. package/lib/common/services/product.d.ts.map +1 -0
  29. package/lib/common/services/product.js +25 -0
  30. package/lib/common/services/product.js.map +1 -0
  31. package/lib/common/services/trace.d.ts +10 -0
  32. package/lib/common/services/trace.d.ts.map +1 -0
  33. package/lib/common/services/trace.js +25 -0
  34. package/lib/common/services/trace.js.map +1 -0
  35. package/lib/common/types/event/activity.d.ts +5 -0
  36. package/lib/common/types/event/activity.d.ts.map +1 -0
  37. package/lib/common/types/event/activity.js +3 -0
  38. package/lib/common/types/event/activity.js.map +1 -0
  39. package/lib/common/types/event/authentication.d.ts +9 -0
  40. package/lib/common/types/event/authentication.d.ts.map +1 -0
  41. package/lib/common/types/event/authentication.js +9 -0
  42. package/lib/common/types/event/authentication.js.map +1 -0
  43. package/lib/common/types/event/chat.d.ts +33 -0
  44. package/lib/common/types/event/chat.d.ts.map +1 -0
  45. package/lib/common/types/event/chat.js +3 -0
  46. package/lib/common/types/event/chat.js.map +1 -0
  47. package/lib/common/types/event/check-point.d.ts +10 -0
  48. package/lib/common/types/event/check-point.d.ts.map +1 -0
  49. package/lib/common/types/event/check-point.js +3 -0
  50. package/lib/common/types/event/check-point.js.map +1 -0
  51. package/lib/common/types/event/code.d.ts +19 -0
  52. package/lib/common/types/event/code.d.ts.map +1 -0
  53. package/lib/common/types/event/code.js +11 -0
  54. package/lib/common/types/event/code.js.map +1 -0
  55. package/lib/common/types/event/commit-message.d.ts +25 -0
  56. package/lib/common/types/event/commit-message.d.ts.map +1 -0
  57. package/lib/common/types/event/commit-message.js +3 -0
  58. package/lib/common/types/event/commit-message.js.map +1 -0
  59. package/lib/common/types/event/completion.d.ts +276 -0
  60. package/lib/common/types/event/completion.d.ts.map +1 -0
  61. package/lib/common/types/event/completion.js +38 -0
  62. package/lib/common/types/event/completion.js.map +1 -0
  63. package/lib/common/types/event/craft.d.ts +202 -0
  64. package/lib/common/types/event/craft.d.ts.map +1 -0
  65. package/lib/common/types/event/craft.js +3 -0
  66. package/lib/common/types/event/craft.js.map +1 -0
  67. package/lib/common/types/event/events.d.ts +96 -0
  68. package/lib/common/types/event/events.d.ts.map +1 -0
  69. package/lib/common/types/event/events.js +70 -0
  70. package/lib/common/types/event/events.js.map +1 -0
  71. package/lib/common/types/event/index.d.ts +11 -0
  72. package/lib/common/types/event/index.d.ts.map +1 -0
  73. package/lib/common/types/event/index.js +27 -0
  74. package/lib/common/types/event/index.js.map +1 -0
  75. package/lib/common/types/event/legacy-completion.d.ts +196 -0
  76. package/lib/common/types/event/legacy-completion.d.ts.map +1 -0
  77. package/lib/common/types/event/legacy-completion.js +38 -0
  78. package/lib/common/types/event/legacy-completion.js.map +1 -0
  79. package/lib/common/types/event/mcp.d.ts +20 -0
  80. package/lib/common/types/event/mcp.d.ts.map +1 -0
  81. package/lib/common/types/event/mcp.js +3 -0
  82. package/lib/common/types/event/mcp.js.map +1 -0
  83. package/lib/common/types/event/plugin-status.d.ts +7 -0
  84. package/lib/common/types/event/plugin-status.d.ts.map +1 -0
  85. package/lib/common/types/event/plugin-status.js +3 -0
  86. package/lib/common/types/event/plugin-status.js.map +1 -0
  87. package/lib/common/types/event/protocol.d.ts +21 -0
  88. package/lib/common/types/event/protocol.d.ts.map +1 -0
  89. package/lib/common/types/event/protocol.js +3 -0
  90. package/lib/common/types/event/protocol.js.map +1 -0
  91. package/lib/common/types/index.d.ts +2 -0
  92. package/lib/common/types/index.d.ts.map +1 -0
  93. package/lib/common/types/index.js +18 -0
  94. package/lib/common/types/index.js.map +1 -0
  95. package/lib/common/utils.d.ts +3 -0
  96. package/lib/common/utils.d.ts.map +1 -0
  97. package/lib/common/utils.js +10 -0
  98. package/lib/common/utils.js.map +1 -0
  99. package/package.json +1 -1
  100. package/lib/common/services.d.ts +0 -19
  101. package/lib/common/services.d.ts.map +0 -1
  102. package/lib/common/services.js +0 -54
  103. package/lib/common/services.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  export * from './application-utils';
2
2
  export * from './component-registry';
3
3
  export * from './services';
4
+ export * from './types';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./application-utils"), exports);
18
18
  __exportStar(require("./component-registry"), exports);
19
19
  __exportStar(require("./services"), exports);
20
+ __exportStar(require("./types"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,6CAA2B;AAC3B,0CAAwB"}
@@ -0,0 +1,8 @@
1
+ import { AgentCallRequest } from '@genie/agent-core';
2
+ export type { AgentCallRequest, AgentContext } from '@genie/agent-core';
3
+ export type { ModelOptions } from '@genie/models';
4
+ export type { Agent as IAgent } from '@genie/product';
5
+ export declare abstract class Agent {
6
+ static dispatch<T>(request: AgentCallRequest): Promise<T>;
7
+ }
8
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/common/services/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,mBAAmB,CAAC;AAItE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEtD,8BAAsB,KAAK;WAEV,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;CAIlE"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Agent = void 0;
4
+ const agent_core_1 = require("@genie/agent-core");
5
+ const utils_1 = require("../utils");
6
+ class Agent {
7
+ static async dispatch(request) {
8
+ const dispatcher = await (0, utils_1.doGet)(agent_core_1.AgentDispatcher);
9
+ return dispatcher.dispatch(request);
10
+ }
11
+ }
12
+ exports.Agent = Agent;
13
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/common/services/agent.ts"],"names":[],"mappings":";;;AAAA,kDAAsE;AAEtE,oCAAiC;AAMjC,MAAsB,KAAK;IAEvB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAI,OAAyB;QAC9C,MAAM,UAAU,GAAG,MAAM,IAAA,aAAK,EAAkB,4BAAe,CAAC,CAAC;QACjE,OAAO,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;CACJ;AAND,sBAMC"}
@@ -0,0 +1,8 @@
1
+ import { Newable } from '@celljs/core';
2
+ import { EventPayloadMapping } from '../types/event/events';
3
+ import { EventOptions, EventProcessor } from '../types/event/protocol';
4
+ export declare abstract class Event {
5
+ static report<K extends keyof EventPayloadMapping>(code: K, event: EventPayloadMapping[K], options?: EventOptions): Promise<void>;
6
+ static registerEventProcessor(constructor: Newable<EventProcessor>): Promise<void>;
7
+ }
8
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/common/services/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGvE,8BAAsB,KAAK;WAEV,MAAM,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;WAM1H,sBAAsB,CAAC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3F"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Event = 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 Event {
8
+ static async report(code, event, options) {
9
+ const eventService = await (0, utils_1.doGet)(telemetry_1.EventService);
10
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+ await eventService.report(code, event, options);
12
+ }
13
+ static async registerEventProcessor(constructor) {
14
+ await component_registry_1.ComponentRegistry.bind(telemetry_1.EventProcessor, constructor);
15
+ }
16
+ }
17
+ exports.Event = Event;
18
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../src/common/services/event.ts"],"names":[],"mappings":";;;AACA,gDAAqF;AAErF,8DAA0D;AAG1D,oCAAiC;AAEjC,MAAsB,KAAK;IAEvB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAsC,IAAO,EAAE,KAA6B,EAAE,OAAsB;QACnH,MAAM,YAAY,GAAG,MAAM,IAAA,aAAK,EAAe,wBAAY,CAAC,CAAC;QAC7D,8DAA8D;QAC9D,MAAM,YAAY,CAAC,MAAM,CAAC,IAAW,EAAE,KAAY,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,WAAoC;QACpE,MAAM,sCAAiB,CAAC,IAAI,CAAC,0BAAiB,EAAE,WAAW,CAAC,CAAC;IACjE,CAAC;CACJ;AAXD,sBAWC"}
@@ -0,0 +1,6 @@
1
+ import { RestOperations } from '@celljs/http';
2
+ export type { RestOperations } from '@celljs/http';
3
+ export declare abstract class Http {
4
+ static getInstance(): Promise<RestOperations>;
5
+ }
6
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/services/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,8BAAsB,IAAI;WAET,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC;CAGtD"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Http = void 0;
4
+ const http_1 = require("@celljs/http");
5
+ const utils_1 = require("../utils");
6
+ class Http {
7
+ static async getInstance() {
8
+ return (0, utils_1.doGet)(http_1.RestOperations);
9
+ }
10
+ }
11
+ exports.Http = Http;
12
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/common/services/http.ts"],"names":[],"mappings":";;;AACA,uCAA8C;AAE9C,oCAAiC;AAIjC,MAAsB,IAAI;IAEtB,MAAM,CAAC,KAAK,CAAC,WAAW;QACpB,OAAO,IAAA,aAAK,EAAiB,qBAAc,CAAC,CAAC;IACjD,CAAC;CACJ;AALD,oBAKC"}
@@ -0,0 +1,7 @@
1
+ export * from './event';
2
+ export * from './logger';
3
+ export * from './product';
4
+ export * from './trace';
5
+ export * from './http';
6
+ export * from './agent';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,23 @@
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
+ __exportStar(require("./event"), exports);
18
+ __exportStar(require("./logger"), exports);
19
+ __exportStar(require("./product"), exports);
20
+ __exportStar(require("./trace"), exports);
21
+ __exportStar(require("./http"), exports);
22
+ __exportStar(require("./agent"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB"}
@@ -0,0 +1,7 @@
1
+ import { Logger as ILogger, Newable } from '@celljs/core';
2
+ export { Logger as ILogger } from '@celljs/core';
3
+ export declare abstract class Logger {
4
+ static getLogger(): Promise<ILogger>;
5
+ static registerLogger(constructor: Newable<ILogger>): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/services/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,OAAO,EAAS,MAAM,cAAc,CAAC;AAKjE,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjD,8BAAsB,MAAM;WAEX,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;WAI7B,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5E"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Logger = exports.ILogger = void 0;
4
+ const core_1 = require("@celljs/core");
5
+ const component_registry_1 = require("../component-registry");
6
+ const utils_1 = require("../utils");
7
+ var core_2 = require("@celljs/core");
8
+ Object.defineProperty(exports, "ILogger", { enumerable: true, get: function () { return core_2.Logger; } });
9
+ class Logger {
10
+ static async getLogger() {
11
+ return (0, utils_1.doGet)(core_1.Logger);
12
+ }
13
+ static async registerLogger(constructor) {
14
+ await component_registry_1.ComponentRegistry.rebind(core_1.Logger, constructor, core_1.Scope.Transient);
15
+ }
16
+ }
17
+ exports.Logger = Logger;
18
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/common/services/logger.ts"],"names":[],"mappings":";;;AAAA,uCAAiE;AAEjE,8DAA0D;AAC1D,oCAAiC;AAEjC,qCAAiD;AAAxC,+FAAA,MAAM,OAAW;AAE1B,MAAsB,MAAM;IAExB,MAAM,CAAC,KAAK,CAAC,SAAS;QAClB,OAAO,IAAA,aAAK,EAAU,aAAO,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,WAA6B;QACrD,MAAM,sCAAiB,CAAC,MAAM,CAAC,aAAO,EAAE,WAAW,EAAE,YAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,CAAC;CACJ;AATD,wBASC"}
@@ -0,0 +1,11 @@
1
+ import { Newable } from '@celljs/core';
2
+ import { ProductConfiguration, ProductProvider } from '@genie/product';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ export type { ProductConfiguration, ProductProvider } from '@genie/product';
5
+ export declare abstract class Product {
6
+ static configuration$(): Promise<BehaviorSubject<ProductConfiguration | undefined>>;
7
+ static waitConfiguration(): Promise<ProductConfiguration>;
8
+ static sync(): Promise<void>;
9
+ static registerProductProvider(constructor: Newable<ProductProvider>): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/common/services/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAKvC,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE5E,8BAAsB,OAAO;WAEZ,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"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Product = void 0;
4
+ const product_1 = require("@genie/product");
5
+ const component_registry_1 = require("../component-registry");
6
+ const utils_1 = require("../utils");
7
+ class Product {
8
+ static async configuration$() {
9
+ const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
10
+ return productManagerService.configuration;
11
+ }
12
+ static async waitConfiguration() {
13
+ const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
14
+ return productManagerService.waitConfiguration();
15
+ }
16
+ static async sync() {
17
+ const productManagerService = await (0, utils_1.doGet)(product_1.ProductManager);
18
+ return productManagerService.sync();
19
+ }
20
+ static async registerProductProvider(constructor) {
21
+ await component_registry_1.ComponentRegistry.bind(product_1.ProductProvider, constructor);
22
+ }
23
+ }
24
+ exports.Product = Product;
25
+ //# sourceMappingURL=product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/common/services/product.ts"],"names":[],"mappings":";;;AACA,4CAAuF;AAGvF,8DAA0D;AAC1D,oCAAiC;AAIjC,MAAsB,OAAO;IAEzB,MAAM,CAAC,KAAK,CAAC,cAAc;QACvB,MAAM,qBAAqB,GAAG,MAAM,IAAA,aAAK,EAAiB,wBAAc,CAAC,CAAC;QAC1E,OAAO,qBAAqB,CAAC,aAAa,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,iBAAiB;QAC1B,MAAM,qBAAqB,GAAG,MAAM,IAAA,aAAK,EAAiB,wBAAc,CAAC,CAAC;QAC1E,OAAO,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;IACrD,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,yBAAe,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;CACJ;AApBD,0BAoBC"}
@@ -0,0 +1,10 @@
1
+ import { Newable } from '@celljs/core';
2
+ import { InitOptions, ResourcesProvider, RootSpan, SpanOptions } from '@genie/telemetry';
3
+ export type { ResourcesProvider as TracingResourcesProvider, InitOptions as TraceInitOptions, SpanOptions, RootSpan, Span, Exception, TimeInput, Attributes } from '@genie/telemetry';
4
+ export declare abstract class Tracing {
5
+ static init(options?: InitOptions): Promise<void>;
6
+ static shutdown(): Promise<void>;
7
+ static startTrace(traceName: string, traceId?: string, spanOptions?: SpanOptions): Promise<RootSpan>;
8
+ static registerResourcesProvider(constructor: Newable<ResourcesProvider>): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../src/common/services/trace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAKvG,YAAY,EACR,iBAAiB,IAAI,wBAAwB,EAC7C,WAAW,IAAI,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EACjG,MAAM,kBAAkB,CAAC;AAE1B,8BAAsB,OAAO;WACZ,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;WAK1C,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;CAIjG"}
@@ -0,0 +1,25 @@
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=trace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/common/services/trace.ts"],"names":[],"mappings":";;;AAEA,gDAAuG;AAEvG,8DAA0D;AAC1D,oCAAiC;AAOjC,MAAsB,OAAO;IACzB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAqB;QACnC,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,WAAW,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,WAAuC;QAC1E,MAAM,sCAAiB,CAAC,IAAI,CAAC,6BAAiB,EAAE,WAAW,CAAC,CAAC;IACjE,CAAC;CAEJ;AApBD,0BAoBC"}
@@ -0,0 +1,5 @@
1
+ export interface ActivityNotifyTelemetry {
2
+ activityId: string;
3
+ processType: 'click' | 'close';
4
+ }
5
+ //# sourceMappingURL=activity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/activity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC;CAClC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../../src/common/types/event/activity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare enum UserAuthActionType {
2
+ Login = "login",
3
+ Logout = "logout"
4
+ }
5
+ export interface UserAuthActionTelemetry {
6
+ actionType: UserAuthActionType;
7
+ userAgent?: string;
8
+ }
9
+ //# sourceMappingURL=authentication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/authentication.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;CACpB;AAED,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserAuthActionType = void 0;
4
+ var UserAuthActionType;
5
+ (function (UserAuthActionType) {
6
+ UserAuthActionType["Login"] = "login";
7
+ UserAuthActionType["Logout"] = "logout";
8
+ })(UserAuthActionType || (exports.UserAuthActionType = UserAuthActionType = {}));
9
+ //# sourceMappingURL=authentication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../src/common/types/event/authentication.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,uCAAiB,CAAA;AACrB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B"}
@@ -0,0 +1,33 @@
1
+ export interface ChatClickTelemetry {
2
+ messageId: string;
3
+ conversationId: string;
4
+ content: string;
5
+ }
6
+ export interface ChatVoteTelemetry {
7
+ chatSource: 'chat';
8
+ conversationId: string;
9
+ messageId: string;
10
+ requestId: string;
11
+ vote: 'like' | 'dislike';
12
+ suggestionTypes: string;
13
+ modelId: string;
14
+ }
15
+ export interface PageClickTelemetry {
16
+ page: 'home' | 'chat' | 'mcp' | 'history';
17
+ button: string;
18
+ }
19
+ export interface PageExposureTelemetry {
20
+ page: 'home' | 'chat' | 'mcp' | 'history';
21
+ }
22
+ export interface FileReceivingRejectionTelemetry {
23
+ conversationId: string;
24
+ conversationRequestId: string;
25
+ conversationMessageId: string;
26
+ requestId: string;
27
+ scene: 'ask' | 'craft';
28
+ actionCode: 'accept_single_file' | 'reject_single_file';
29
+ files: [{
30
+ path: string;
31
+ }];
32
+ }
33
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/chat.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACzC,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;CAC5C;AAED,MAAM,WAAW,+BAA+B;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;IACvB,UAAU,EAAE,oBAAoB,GAAG,oBAAoB,CAAA;IACvD,KAAK,EAAE,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../src/common/types/event/chat.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface CheckPointRequest {
2
+ checkPoint: string;
3
+ files: CheckPointFile[];
4
+ }
5
+ interface CheckPointFile {
6
+ path: string;
7
+ version: string;
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=check-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-point.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/check-point.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,UAAU,cAAc;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=check-point.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-point.js","sourceRoot":"","sources":["../../../../src/common/types/event/check-point.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface CodeEditTelemetry {
2
+ /** 语言 ID */
3
+ languageId: string;
4
+ /** 变更来源: all/completion/agent/apply */
5
+ source: 'all' | 'completion' | 'agent' | 'apply';
6
+ /** 变更文件数 */
7
+ fileCount: number;
8
+ /** 变更行数 */
9
+ lineCount: number;
10
+ /** 变更字符数 */
11
+ characterCount: number;
12
+ }
13
+ export declare enum CodeEditSource {
14
+ All = "all",
15
+ Completion = "completion",
16
+ Agent = "agent",
17
+ Apply = "apply"
18
+ }
19
+ //# sourceMappingURL=code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/code.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,YAAY;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;IACjD,YAAY;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY;IACZ,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,oBAAY,cAAc;IACtB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;CAClB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeEditSource = void 0;
4
+ var CodeEditSource;
5
+ (function (CodeEditSource) {
6
+ CodeEditSource["All"] = "all";
7
+ CodeEditSource["Completion"] = "completion";
8
+ CodeEditSource["Agent"] = "agent";
9
+ CodeEditSource["Apply"] = "apply";
10
+ })(CodeEditSource || (exports.CodeEditSource = CodeEditSource = {}));
11
+ //# sourceMappingURL=code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.js","sourceRoot":"","sources":["../../../../src/common/types/event/code.ts"],"names":[],"mappings":";;;AAaA,IAAY,cAKX;AALD,WAAY,cAAc;IACtB,6BAAW,CAAA;IACX,2CAAyB,CAAA;IACzB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACnB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
@@ -0,0 +1,25 @@
1
+ export interface CommitGenerateTelemetry {
2
+ /**
3
+ * 使用的模型 id
4
+ */
5
+ modelId: string;
6
+ /**
7
+ * 请求 id
8
+ */
9
+ requestId: string;
10
+ }
11
+ export interface CommitGenerateCancelTelemetry {
12
+ /**
13
+ * 使用的模型 id
14
+ */
15
+ modelId: string;
16
+ /**
17
+ * 请求 id
18
+ * */
19
+ requestId: string;
20
+ /**
21
+ * 取消原因
22
+ */
23
+ reason: 'abort' | 'timeout';
24
+ }
25
+ //# sourceMappingURL=commit-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-message.d.ts","sourceRoot":"","sources":["../../../../src/common/types/event/commit-message.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,6BAA6B;IAC1C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;SAEK;IACL,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=commit-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-message.js","sourceRoot":"","sources":["../../../../src/common/types/event/commit-message.ts"],"names":[],"mappings":""}