@celljs/ai-pi 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  import './index.js';
2
- declare const _default: import("inversify").interfaces.ContainerModule;
2
+ declare const _default: import("@celljs/core").ContainerModule;
3
3
  export default _default;
@@ -1,13 +1,10 @@
1
- import { ContainerFactory } from '@celljs/core';
1
+ import { Container, type ContainerModule } from '@celljs/core';
2
2
  import { type PiOptions } from '../pi-protocol.js';
3
3
  import { FauxPiModels } from './faux-pi-models.js';
4
4
  import '../index.js';
5
- type Container = ReturnType<typeof ContainerFactory.create>;
6
- type ContainerModule = Parameters<typeof ContainerFactory.create>[number];
7
5
  export interface PiTestContainer {
8
6
  container: Container;
9
7
  faux: FauxPiModels;
10
8
  }
11
9
  /** A container with ai-core, this package and the scripted {@link FauxPiModels}. */
12
10
  export declare function createPiTestContainer(options?: PiOptions, ...modules: ContainerModule[]): Promise<PiTestContainer>;
13
- export {};
@@ -1,5 +1,5 @@
1
1
  import aiCoreModule from '@celljs/ai-core/lib/common/module';
2
- import { autoBind, ContainerFactory, ContainerProvider, currentThis } from '@celljs/core';
2
+ import { autoBind, Container, ContainerProvider, currentThis } from '@celljs/core';
3
3
  import { coreTestModule } from '@celljs/core/lib/common/test/test-module';
4
4
  import { PiModelsContribution } from '../pi-protocol.js';
5
5
  import { FauxPiModels } from './faux-pi-models.js';
@@ -11,7 +11,7 @@ export async function createPiTestContainer(options = {}, ...modules) {
11
11
  const faux = await FauxPiModels.create();
12
12
  // ai-core's module is imported first, so it also holds the components of @celljs/core (autoBind() takes
13
13
  // everything registered before it); core's test module then replaces their logger.
14
- const container = ContainerFactory.create(aiCoreModule, coreTestModule, piModule, ...modules);
14
+ const container = new Container(aiCoreModule, coreTestModule, piModule, ...modules);
15
15
  container.bind(PiModelsContribution).toConstantValue(faux);
16
16
  ContainerProvider.set(container);
17
17
  return { container, faux };
@@ -1 +1 @@
1
- {"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,UAAU,CAAC;AAElB,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;AAU5B,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAO,GAAc,EAAE,EAAE,GAAG,OAA0B;IAC9F,WAAW,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;IACzC,wGAAwG;IACxG,mFAAmF;IACnF,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,CAAC;IAC9F,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3D,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAwB,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,UAAU,CAAC;AAElB,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;AAO5B,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAO,GAAc,EAAE,EAAE,GAAG,OAA0B;IAC9F,WAAW,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;IACzC,wGAAwG;IACxG,mFAAmF;IACnF,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,CAAC;IACpF,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3D,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import './index';
2
- declare const _default: import("inversify").interfaces.ContainerModule;
2
+ declare const _default: import("@celljs/core").ContainerModule;
3
3
  export default _default;
4
4
  //# sourceMappingURL=module.d.ts.map
@@ -1,14 +1,11 @@
1
- import { ContainerFactory } from '@celljs/core';
1
+ import { Container, type ContainerModule } from '@celljs/core';
2
2
  import { type PiOptions } from '../pi-protocol';
3
3
  import { FauxPiModels } from './faux-pi-models';
4
4
  import '../index';
5
- type Container = ReturnType<typeof ContainerFactory.create>;
6
- type ContainerModule = Parameters<typeof ContainerFactory.create>[number];
7
5
  export interface PiTestContainer {
8
6
  container: Container;
9
7
  faux: FauxPiModels;
10
8
  }
11
9
  /** A container with ai-core, this package and the scripted {@link FauxPiModels}. */
12
10
  export declare function createPiTestContainer(options?: PiOptions, ...modules: ContainerModule[]): Promise<PiTestContainer>;
13
- export {};
14
11
  //# sourceMappingURL=test-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-container.d.ts","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,gBAAgB,EAAkC,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,UAAU,CAAC;AAIlB,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC5D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,oFAAoF;AACpF,wBAAsB,qBAAqB,CAAC,OAAO,GAAE,SAAc,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAS5H"}
1
+ {"version":3,"file":"test-container.d.ts","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAE,KAAK,eAAe,EAAkC,MAAM,cAAc,CAAC;AAEzG,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,UAAU,CAAC;AAIlB,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,oFAAoF;AACpF,wBAAsB,qBAAqB,CAAC,OAAO,GAAE,SAAc,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAS5H"}
@@ -17,7 +17,7 @@ async function createPiTestContainer(options = {}, ...modules) {
17
17
  const faux = await faux_pi_models_1.FauxPiModels.create();
18
18
  // ai-core's module is imported first, so it also holds the components of @celljs/core (autoBind() takes
19
19
  // everything registered before it); core's test module then replaces their logger.
20
- const container = core_1.ContainerFactory.create(module_1.default, test_module_1.coreTestModule, piModule, ...modules);
20
+ const container = new core_1.Container(module_1.default, test_module_1.coreTestModule, piModule, ...modules);
21
21
  container.bind(pi_protocol_1.PiModelsContribution).toConstantValue(faux);
22
22
  core_1.ContainerProvider.set(container);
23
23
  return { container, faux };
@@ -1 +1 @@
1
- {"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":";;;;;;AAAA,+EAA6D;AAC7D,uCAA0F;AAC1F,0EAA0E;AAC1E,gDAAsE;AACtE,qDAAgD;AAChD,oBAAkB;AAElB,MAAM,QAAQ,GAAG,IAAA,eAAQ,GAAE,CAAC;AAU5B,oFAAoF;AAC7E,KAAK,gCAAgC,OAAO,GAAc,EAAE,EAAE,GAAG,OAA0B;IAC9F,kBAAW,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,6BAAY,CAAC,MAAM,EAAE,CAAC;IACzC,wGAAwG;IACxG,mFAAmF;IACnF,MAAM,SAAS,GAAG,uBAAgB,CAAC,MAAM,CAAC,gBAAY,EAAE,4BAAc,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,CAAC;IAC9F,SAAS,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3D,wBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":";;;;;;AAAA,+EAA6D;AAC7D,uCAAyG;AACzG,0EAA0E;AAC1E,gDAAsE;AACtE,qDAAgD;AAChD,oBAAkB;AAElB,MAAM,QAAQ,GAAG,IAAA,eAAQ,GAAE,CAAC;AAO5B,oFAAoF;AAC7E,KAAK,gCAAgC,OAAO,GAAc,EAAE,EAAE,GAAG,OAA0B;IAC9F,kBAAW,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,6BAAY,CAAC,MAAM,EAAE,CAAC;IACzC,wGAAwG;IACxG,mFAAmF;IACnF,MAAM,SAAS,GAAG,IAAI,gBAAS,CAAC,gBAAY,EAAE,4BAAc,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,CAAC;IACpF,SAAS,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3D,wBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ai-pi",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "description": "pi-ai models (20+ providers) as Cell chat models",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -32,11 +32,10 @@
32
32
  "watch": "tsc -b -w --preserveWatchOutput"
33
33
  },
34
34
  "dependencies": {
35
- "@celljs/ai-core": "4.0.0",
36
- "@celljs/core": "4.0.0",
35
+ "@celljs/ai-core": "4.2.0",
36
+ "@celljs/core": "4.2.0",
37
37
  "@earendil-works/pi-ai": "^1.5.0",
38
- "rxjs": "^6.6.0",
39
- "tslib": "^2.8.0"
38
+ "rxjs": "^6.6.0"
40
39
  },
41
40
  "publishConfig": {
42
41
  "access": "public"
@@ -1,5 +1,5 @@
1
1
  import aiCoreModule from '@celljs/ai-core/lib/common/module';
2
- import { autoBind, ContainerFactory, ContainerProvider, currentThis } from '@celljs/core';
2
+ import { autoBind, Container, type ContainerModule, ContainerProvider, currentThis } from '@celljs/core';
3
3
  import { coreTestModule } from '@celljs/core/lib/common/test/test-module';
4
4
  import { PiModelsContribution, type PiOptions } from '../pi-protocol';
5
5
  import { FauxPiModels } from './faux-pi-models';
@@ -7,9 +7,6 @@ import '../index';
7
7
 
8
8
  const piModule = autoBind();
9
9
 
10
- type Container = ReturnType<typeof ContainerFactory.create>;
11
- type ContainerModule = Parameters<typeof ContainerFactory.create>[number];
12
-
13
10
  export interface PiTestContainer {
14
11
  container: Container;
15
12
  faux: FauxPiModels;
@@ -21,7 +18,7 @@ export async function createPiTestContainer(options: PiOptions = {}, ...modules:
21
18
  const faux = await FauxPiModels.create();
22
19
  // ai-core's module is imported first, so it also holds the components of @celljs/core (autoBind() takes
23
20
  // everything registered before it); core's test module then replaces their logger.
24
- const container = ContainerFactory.create(aiCoreModule, coreTestModule, piModule, ...modules);
21
+ const container = new Container(aiCoreModule, coreTestModule, piModule, ...modules);
25
22
  container.bind(PiModelsContribution).toConstantValue(faux);
26
23
  ContainerProvider.set(container);
27
24
  return { container, faux };