@celljs/ai-coding-agent 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.
- package/esm/node/module.d.ts +1 -1
- package/esm/node/test/test-container.d.ts +1 -4
- package/esm/node/test/test-container.js +2 -2
- package/esm/node/test/test-container.js.map +1 -1
- package/lib/node/module.d.ts +1 -1
- package/lib/node/test/test-container.d.ts +1 -4
- package/lib/node/test/test-container.d.ts.map +1 -1
- package/lib/node/test/test-container.js +1 -1
- package/lib/node/test/test-container.js.map +1 -1
- package/package.json +5 -6
- package/src/node/test/test-container.ts +2 -5
package/esm/node/module.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Container, type ContainerModule } from '@celljs/core';
|
|
2
2
|
import { type CodingAgentOptions } from '../coding-agent-protocol.js';
|
|
3
3
|
import { FauxModels } from './faux-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 TestContainer {
|
|
8
6
|
container: Container;
|
|
9
7
|
faux: FauxModels;
|
|
@@ -15,4 +13,3 @@ export interface TestContainer {
|
|
|
15
13
|
* directories in a new temporary directory, so tests neither read nor write `~/.pi`.
|
|
16
14
|
*/
|
|
17
15
|
export declare function createTestContainer(options?: CodingAgentOptions, ...modules: ContainerModule[]): Promise<TestContainer>;
|
|
18
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdtempSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { autoBind,
|
|
4
|
+
import { autoBind, Container, ContainerProvider, currentThis } from '@celljs/core';
|
|
5
5
|
import { coreTestModule } from '@celljs/core/lib/common/test/test-module';
|
|
6
6
|
import { ModelRuntimeContribution } from '../coding-agent-protocol.js';
|
|
7
7
|
import { FauxModels } from './faux-models.js';
|
|
@@ -17,7 +17,7 @@ export async function createTestContainer(options = {}, ...modules) {
|
|
|
17
17
|
cell: { ai: { codingAgent: { cwd: dir, agentDir: join(dir, '.pi-agent'), model: FauxModels.MODEL, discoverResources: false, ...options } } },
|
|
18
18
|
};
|
|
19
19
|
const faux = await FauxModels.create();
|
|
20
|
-
const container =
|
|
20
|
+
const container = new Container(coreTestModule, codingAgentModule, ...modules);
|
|
21
21
|
container.bind(ModelRuntimeContribution).toConstantValue(faux);
|
|
22
22
|
ContainerProvider.set(container);
|
|
23
23
|
return { container, faux, dir };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAwB,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAA2B,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,UAAU,CAAC;AAElB,MAAM,iBAAiB,GAAG,QAAQ,EAAE,CAAC;AASrC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAO,GAAuB,EAAE,EAAE,GAAG,OAA0B;IACrG,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC9D,WAAW,CAAC,SAAS,GAAG;QACpB,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE;KAC/I,CAAC;IACF,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,cAAc,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,CAAC;IAC/E,SAAS,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/D,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACpC,CAAC"}
|
package/lib/node/module.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Container, type ContainerModule } from '@celljs/core';
|
|
2
2
|
import { type CodingAgentOptions } from '../coding-agent-protocol';
|
|
3
3
|
import { FauxModels } from './faux-models';
|
|
4
4
|
import '../index';
|
|
5
|
-
type Container = ReturnType<typeof ContainerFactory.create>;
|
|
6
|
-
type ContainerModule = Parameters<typeof ContainerFactory.create>[number];
|
|
7
5
|
export interface TestContainer {
|
|
8
6
|
container: Container;
|
|
9
7
|
faux: FauxModels;
|
|
@@ -15,5 +13,4 @@ export interface TestContainer {
|
|
|
15
13
|
* directories in a new temporary directory, so tests neither read nor write `~/.pi`.
|
|
16
14
|
*/
|
|
17
15
|
export declare function createTestContainer(options?: CodingAgentOptions, ...modules: ContainerModule[]): Promise<TestContainer>;
|
|
18
|
-
export {};
|
|
19
16
|
//# 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":"AAGA,OAAO,EAAY,
|
|
1
|
+
{"version":3,"file":"test-container.d.ts","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,SAAS,EAAE,KAAK,eAAe,EAAkC,MAAM,cAAc,CAAC;AAEzG,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,UAAU,CAAC;AAIlB,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,kBAAuB,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAUjI"}
|
|
@@ -20,7 +20,7 @@ async function createTestContainer(options = {}, ...modules) {
|
|
|
20
20
|
cell: { ai: { codingAgent: { cwd: dir, agentDir: (0, node_path_1.join)(dir, '.pi-agent'), model: faux_models_1.FauxModels.MODEL, discoverResources: false, ...options } } },
|
|
21
21
|
};
|
|
22
22
|
const faux = await faux_models_1.FauxModels.create();
|
|
23
|
-
const container = core_1.
|
|
23
|
+
const container = new core_1.Container(test_module_1.coreTestModule, codingAgentModule, ...modules);
|
|
24
24
|
container.bind(coding_agent_protocol_1.ModelRuntimeContribution).toConstantValue(faux);
|
|
25
25
|
core_1.ContainerProvider.set(container);
|
|
26
26
|
return { container, faux, dir };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,qCAAiC;AACjC,yCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/node/test/test-container.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,qCAAiC;AACjC,yCAAiC;AACjC,uCAAyG;AACzG,0EAA0E;AAC1E,oEAA6F;AAC7F,+CAA2C;AAC3C,oBAAkB;AAElB,MAAM,iBAAiB,GAAG,IAAA,eAAQ,GAAE,CAAC;AASrC;;;GAGG;AACI,KAAK,8BAA8B,OAAO,GAAuB,EAAE,EAAE,GAAG,OAA0B;IACrG,MAAM,GAAG,GAAG,IAAA,qBAAW,EAAC,IAAA,gBAAI,EAAC,IAAA,gBAAM,GAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC9D,kBAAW,CAAC,SAAS,GAAG;QACpB,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAA,gBAAI,EAAC,GAAG,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,wBAAU,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE;KAC/I,CAAC;IACF,MAAM,IAAI,GAAG,MAAM,wBAAU,CAAC,MAAM,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,gBAAS,CAAC,4BAAc,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,CAAC;IAC/E,SAAS,CAAC,IAAI,CAAC,gDAAwB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/D,wBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ai-coding-agent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Hosts pi coding agent sessions in Cell applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -32,12 +32,11 @@
|
|
|
32
32
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@celljs/ai-agent": "4.
|
|
36
|
-
"@celljs/ai-pi": "4.
|
|
37
|
-
"@celljs/core": "4.
|
|
35
|
+
"@celljs/ai-agent": "4.2.0",
|
|
36
|
+
"@celljs/ai-pi": "4.2.0",
|
|
37
|
+
"@celljs/core": "4.2.0",
|
|
38
38
|
"@earendil-works/pi-ai": "^1.5.0",
|
|
39
|
-
"@earendil-works/pi-coding-agent": "^1.5.0"
|
|
40
|
-
"tslib": "^2.8.0"
|
|
39
|
+
"@earendil-works/pi-coding-agent": "^1.5.0"
|
|
41
40
|
},
|
|
42
41
|
"publishConfig": {
|
|
43
42
|
"access": "public"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdtempSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { autoBind,
|
|
4
|
+
import { autoBind, Container, type ContainerModule, ContainerProvider, currentThis } from '@celljs/core';
|
|
5
5
|
import { coreTestModule } from '@celljs/core/lib/common/test/test-module';
|
|
6
6
|
import { type CodingAgentOptions, ModelRuntimeContribution } from '../coding-agent-protocol';
|
|
7
7
|
import { FauxModels } from './faux-models';
|
|
@@ -9,9 +9,6 @@ import '../index';
|
|
|
9
9
|
|
|
10
10
|
const codingAgentModule = autoBind();
|
|
11
11
|
|
|
12
|
-
type Container = ReturnType<typeof ContainerFactory.create>;
|
|
13
|
-
type ContainerModule = Parameters<typeof ContainerFactory.create>[number];
|
|
14
|
-
|
|
15
12
|
export interface TestContainer {
|
|
16
13
|
container: Container;
|
|
17
14
|
faux: FauxModels;
|
|
@@ -29,7 +26,7 @@ export async function createTestContainer(options: CodingAgentOptions = {}, ...m
|
|
|
29
26
|
cell: { ai: { codingAgent: { cwd: dir, agentDir: join(dir, '.pi-agent'), model: FauxModels.MODEL, discoverResources: false, ...options } } },
|
|
30
27
|
};
|
|
31
28
|
const faux = await FauxModels.create();
|
|
32
|
-
const container =
|
|
29
|
+
const container = new Container(coreTestModule, codingAgentModule, ...modules);
|
|
33
30
|
container.bind(ModelRuntimeContribution).toConstantValue(faux);
|
|
34
31
|
ContainerProvider.set(container);
|
|
35
32
|
return { container, faux, dir };
|