dexto 1.7.2 → 1.8.1
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 +4 -7
- package/dist/agents/coding-agent/coding-agent.yml +0 -5
- package/dist/agents/default-agent.yml +0 -6
- package/dist/cli/auth/api-client.d.ts +9 -7
- package/dist/cli/auth/api-client.d.ts.map +1 -1
- package/dist/cli/auth/api-client.js +42 -64
- package/dist/cli/auth/device.d.ts +2 -2
- package/dist/cli/auth/device.d.ts.map +1 -1
- package/dist/cli/auth/device.js +3 -12
- package/dist/cli/auth/index.d.ts +2 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +1 -1
- package/dist/cli/auth/login-persistence.d.ts +2 -0
- package/dist/cli/auth/login-persistence.d.ts.map +1 -1
- package/dist/cli/auth/login-persistence.js +12 -0
- package/dist/cli/auth/types.d.ts +4 -5
- package/dist/cli/auth/types.d.ts.map +1 -1
- package/dist/cli/cloud-chat.d.ts.map +1 -1
- package/dist/cli/cloud-chat.js +65 -24
- package/dist/cli/commands/auth/login.d.ts +4 -1
- package/dist/cli/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +7 -8
- package/dist/cli/commands/auth/register.d.ts.map +1 -1
- package/dist/cli/commands/auth/register.js +2 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -1
- package/dist/cli/commands/create-image.js +1 -13
- package/dist/cli/commands/init-app.d.ts +1 -1
- package/dist/cli/commands/init-app.d.ts.map +1 -1
- package/dist/cli/commands/init-app.js +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +19 -27
- package/dist/cli/commands/run/headless.d.ts.map +1 -1
- package/dist/cli/commands/run/headless.js +75 -65
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +2 -1
- package/dist/cli/modes/cli.js +2 -2
- package/dist/cli/utils/api-key-setup.d.ts +1 -1
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-verification.d.ts +1 -1
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +3 -1
- package/dist/cli/utils/options.js +1 -1
- package/dist/cli/utils/project-utils.d.ts +1 -1
- package/dist/cli/utils/project-utils.d.ts.map +1 -1
- package/dist/cli/utils/project-utils.js +2 -1
- package/dist/cli/utils/provider-setup.d.ts +1 -1
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +1 -1
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -1
- package/dist/cli/utils/scaffolding-utils.js +1 -9
- package/dist/cli/utils/template-engine.d.ts +0 -12
- package/dist/cli/utils/template-engine.d.ts.map +1 -1
- package/dist/cli/utils/template-engine.js +5 -116
- package/dist/config/cli-overrides.d.ts +2 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +2 -1
- package/dist/config/effective-llm.d.ts +1 -1
- package/dist/config/effective-llm.d.ts.map +1 -1
- package/dist/index-main.js +12 -7
- package/dist/webui/assets/{index-UG5Fuw_8.js → index-CiIdc81a.js} +178 -178
- package/dist/webui/index.html +1 -1
- package/package.json +13 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/template-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,UAAU,eAAe;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/template-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,UAAU,eAAe;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA2B5E;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAiCrF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAsC9D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAwKzC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAqN1C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA8CvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA6EpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,GAAE,MAAuB,GAAG,MAAM,CAoD7E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiC5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAsDxE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA+ClE"}
|
|
@@ -15,8 +15,7 @@ export function generateIndexForCodeFirstDI(context) {
|
|
|
15
15
|
return `// Standalone Dexto app (programmatic)
|
|
16
16
|
import 'dotenv/config';
|
|
17
17
|
|
|
18
|
-
import { DextoAgent, createLogger } from '@dexto/core';
|
|
19
|
-
import { MemoryBlobStore, MemoryCacheStore, MemoryDatabaseStore } from '@dexto/storage';
|
|
18
|
+
import { DextoAgent, InMemoryDextoStores, createLogger } from '@dexto/core';
|
|
20
19
|
|
|
21
20
|
const agentId = '${context.projectName}';
|
|
22
21
|
const logger = createLogger({
|
|
@@ -29,11 +28,7 @@ const agent = new DextoAgent({
|
|
|
29
28
|
llm: { provider: '${defaultProvider}', model: '${defaultModel}' },
|
|
30
29
|
systemPrompt: 'You are a helpful AI assistant.',
|
|
31
30
|
logger,
|
|
32
|
-
|
|
33
|
-
cache: new MemoryCacheStore(),
|
|
34
|
-
database: new MemoryDatabaseStore(),
|
|
35
|
-
blob: new MemoryBlobStore({}, logger),
|
|
36
|
-
},
|
|
31
|
+
stores: new InMemoryDextoStores(logger),
|
|
37
32
|
});
|
|
38
33
|
|
|
39
34
|
await agent.start();
|
|
@@ -51,8 +46,7 @@ export function generateWebServerIndexForCodeFirstDI(context) {
|
|
|
51
46
|
return `// Dexto Web Server (programmatic)
|
|
52
47
|
import 'dotenv/config';
|
|
53
48
|
|
|
54
|
-
import { DextoAgent, createLogger } from '@dexto/core';
|
|
55
|
-
import { MemoryBlobStore, MemoryCacheStore, MemoryDatabaseStore } from '@dexto/storage';
|
|
49
|
+
import { DextoAgent, InMemoryDextoStores, createLogger } from '@dexto/core';
|
|
56
50
|
import { startDextoServer } from '@dexto/server';
|
|
57
51
|
import { resolve } from 'node:path';
|
|
58
52
|
|
|
@@ -67,11 +61,7 @@ const agent = new DextoAgent({
|
|
|
67
61
|
llm: { provider: '${defaultProvider}', model: '${defaultModel}' },
|
|
68
62
|
systemPrompt: 'You are a helpful AI assistant.',
|
|
69
63
|
logger,
|
|
70
|
-
|
|
71
|
-
cache: new MemoryCacheStore(),
|
|
72
|
-
database: new MemoryDatabaseStore(),
|
|
73
|
-
blob: new MemoryBlobStore({}, logger),
|
|
74
|
-
},
|
|
64
|
+
stores: new InMemoryDextoStores(logger),
|
|
75
65
|
});
|
|
76
66
|
|
|
77
67
|
const { stop } = await startDextoServer(agent, {
|
|
@@ -534,17 +524,7 @@ export function generateDextoImageFile(context) {
|
|
|
534
524
|
type: 'in-memory',
|
|
535
525
|
},
|
|
536
526
|
},`
|
|
537
|
-
:
|
|
538
|
-
blob: {
|
|
539
|
-
type: 'example-blob',
|
|
540
|
-
},
|
|
541
|
-
database: {
|
|
542
|
-
type: 'example-database',
|
|
543
|
-
},
|
|
544
|
-
cache: {
|
|
545
|
-
type: 'example-cache',
|
|
546
|
-
},
|
|
547
|
-
},`;
|
|
527
|
+
: '';
|
|
548
528
|
return `import type { ImageDefinition } from '@dexto/image-bundler';
|
|
549
529
|
|
|
550
530
|
const image = {
|
|
@@ -555,9 +535,6 @@ const image = {
|
|
|
555
535
|
${extendsField}
|
|
556
536
|
// Factories are AUTO-DISCOVERED from convention-based folders:
|
|
557
537
|
// tools/<type>/index.ts
|
|
558
|
-
// storage/blob/<type>/index.ts
|
|
559
|
-
// storage/database/<type>/index.ts
|
|
560
|
-
// storage/cache/<type>/index.ts
|
|
561
538
|
// hooks/<type>/index.ts
|
|
562
539
|
// compaction/<type>/index.ts
|
|
563
540
|
//
|
|
@@ -619,9 +596,6 @@ Set \`image: '${imageName}'\` in your agent config (or pass \`--image\` in the C
|
|
|
619
596
|
|
|
620
597
|
Add your custom factories to convention-based folders:
|
|
621
598
|
- \`tools/<type>/\` - Tool factories
|
|
622
|
-
- \`storage/blob/<type>/\` - Blob storage factories
|
|
623
|
-
- \`storage/database/<type>/\` - Database factories
|
|
624
|
-
- \`storage/cache/<type>/\` - Cache factories
|
|
625
599
|
- \`hooks/<type>/\` - Hook factories
|
|
626
600
|
- \`compaction/<type>/\` - Compaction factories
|
|
627
601
|
|
|
@@ -811,91 +785,6 @@ export const factory: CompactionFactory<ExampleCompactionConfig> = {
|
|
|
811
785
|
};
|
|
812
786
|
`;
|
|
813
787
|
}
|
|
814
|
-
/**
|
|
815
|
-
* Generates an example in-memory cache factory
|
|
816
|
-
*/
|
|
817
|
-
export function generateExampleCacheFactory(cacheType) {
|
|
818
|
-
return `import { z } from 'zod';
|
|
819
|
-
import type { CacheFactory } from '@dexto/agent-config';
|
|
820
|
-
import { MemoryCacheStore } from '@dexto/storage';
|
|
821
|
-
|
|
822
|
-
const ConfigSchema = z
|
|
823
|
-
.object({
|
|
824
|
-
type: z.literal('${cacheType}'),
|
|
825
|
-
})
|
|
826
|
-
.strict();
|
|
827
|
-
|
|
828
|
-
type ExampleCacheConfig = z.output<typeof ConfigSchema>;
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* Example cache factory
|
|
832
|
-
*
|
|
833
|
-
* Storage backends are resolved from image factories.
|
|
834
|
-
* The bundler auto-discovers this module when placed in storage/cache/<type>/index.ts.
|
|
835
|
-
*/
|
|
836
|
-
export const factory: CacheFactory<ExampleCacheConfig> = {
|
|
837
|
-
configSchema: ConfigSchema,
|
|
838
|
-
create: (_config, _logger) => new MemoryCacheStore(),
|
|
839
|
-
};
|
|
840
|
-
`;
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Generates an example in-memory database factory
|
|
844
|
-
*/
|
|
845
|
-
export function generateExampleDatabaseFactory(databaseType) {
|
|
846
|
-
return `import { z } from 'zod';
|
|
847
|
-
import type { DatabaseFactory } from '@dexto/agent-config';
|
|
848
|
-
import { MemoryDatabaseStore } from '@dexto/storage';
|
|
849
|
-
|
|
850
|
-
const ConfigSchema = z
|
|
851
|
-
.object({
|
|
852
|
-
type: z.literal('${databaseType}'),
|
|
853
|
-
})
|
|
854
|
-
.strict();
|
|
855
|
-
|
|
856
|
-
type ExampleDatabaseConfig = z.output<typeof ConfigSchema>;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Example database factory
|
|
860
|
-
*
|
|
861
|
-
* Storage backends are resolved from image factories.
|
|
862
|
-
* The bundler auto-discovers this module when placed in storage/database/<type>/index.ts.
|
|
863
|
-
*/
|
|
864
|
-
export const factory: DatabaseFactory<ExampleDatabaseConfig> = {
|
|
865
|
-
configSchema: ConfigSchema,
|
|
866
|
-
create: (_config, _logger) => new MemoryDatabaseStore(),
|
|
867
|
-
};
|
|
868
|
-
`;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* Generates an example in-memory blob store factory
|
|
872
|
-
*/
|
|
873
|
-
export function generateExampleBlobStoreFactory(blobType) {
|
|
874
|
-
return `import { z } from 'zod';
|
|
875
|
-
import type { BlobStoreFactory } from '@dexto/agent-config';
|
|
876
|
-
import { InMemoryBlobStoreSchema, MemoryBlobStore } from '@dexto/storage';
|
|
877
|
-
|
|
878
|
-
const ConfigSchema = InMemoryBlobStoreSchema.extend({
|
|
879
|
-
type: z.literal('${blobType}'),
|
|
880
|
-
}).strict();
|
|
881
|
-
|
|
882
|
-
type ExampleBlobStoreConfig = z.output<typeof ConfigSchema>;
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Example blob store factory
|
|
886
|
-
*
|
|
887
|
-
* Blob stores are resolved from image factories.
|
|
888
|
-
* The bundler auto-discovers this module when placed in storage/blob/<type>/index.ts.
|
|
889
|
-
*/
|
|
890
|
-
export const factory: BlobStoreFactory<ExampleBlobStoreConfig> = {
|
|
891
|
-
configSchema: ConfigSchema,
|
|
892
|
-
create: (config, logger) => {
|
|
893
|
-
const { type: _type, ...options } = config;
|
|
894
|
-
return new MemoryBlobStore(options, logger);
|
|
895
|
-
},
|
|
896
|
-
};
|
|
897
|
-
`;
|
|
898
|
-
}
|
|
899
788
|
/**
|
|
900
789
|
* Generates README for an app project
|
|
901
790
|
*/
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* - Merge strategy configuration for non-LLM fields
|
|
20
20
|
*/
|
|
21
21
|
import type { AgentConfig } from '@dexto/agent-config';
|
|
22
|
-
import { type
|
|
22
|
+
import { type LLMProvider } from '@dexto/llm';
|
|
23
|
+
import { type LLMConfig } from '@dexto/core';
|
|
23
24
|
import type { GlobalPreferences } from '@dexto/agent-management';
|
|
24
25
|
/**
|
|
25
26
|
* CLI config override type for fields that can be overridden via CLI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-overrides.d.ts","sourceRoot":"","sources":["../../src/config/cli-overrides.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"cli-overrides.d.ts","sourceRoot":"","sources":["../../src/config/cli-overrides.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKH,KAAK,WAAW,EACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,kBACb,SAAQ,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACtC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2BAA2B,EAAE,OAAO,CAAC;IACrC,wBAAwB,EAAE,OAAO,CAAC;IAClC,yBAAyB,EAAE,OAAO,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC7B,UAAU,EAAE,WAAW,EACvB,YAAY,CAAC,EAAE,kBAAkB,GAClC,WAAW,CAuCb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,WAAW,EACvB,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACxC,WAAW,CAwBb;AAED,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,yBAAyB,GACnC,WAAW,CAyCb;AAcD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,WAAW,EACrB,SAAS,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC,GAC3D,OAAO,CAgBT;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,WAAW,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACnC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,iBAAiB,GAAG,IAAI,EACrC,cAAc,EAAE,MAAM,GAAG,SAAS,GACnC,wBAAwB,CAwC1B"}
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* - Agent capability requirements (requires: { vision: true, toolUse: true })
|
|
19
19
|
* - Merge strategy configuration for non-LLM fields
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
21
|
+
import { LLM_PROVIDERS, getDefaultModelForProvider, requiresApiKey, requiresBaseURL, } from '@dexto/llm';
|
|
22
|
+
import { EnvExpandedString, resolveApiKeyForProvider } from '@dexto/core';
|
|
22
23
|
/**
|
|
23
24
|
* Applies CLI overrides to an agent configuration
|
|
24
25
|
* This merges CLI arguments into the base config without validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effective-llm.d.ts","sourceRoot":"","sources":["../../src/config/effective-llm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"effective-llm.d.ts","sourceRoot":"","sources":["../../src/config/effective-llm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAS9C;;GAEG;AACH,MAAM,MAAM,eAAe,GACrB,OAAO,GACP,aAAa,GACb,SAAS,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,WAAW,CAAC;IACtB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,MAAM,EAAE,eAAe,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,qBAAqB,CACvC,OAAO,GAAE,4BAAiC,GAC3C,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAsFpC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACrC,OAAO,GAAE,4BAAiC,GAC3C,OAAO,CAAC,OAAO,CAAC,CAGlB"}
|
package/dist/index-main.js
CHANGED
|
@@ -43,9 +43,10 @@ function resolveCliVersion() {
|
|
|
43
43
|
const cliVersion = resolveCliVersion();
|
|
44
44
|
// Set CLI version for Dexto Gateway usage tracking
|
|
45
45
|
process.env.DEXTO_CLI_VERSION = cliVersion;
|
|
46
|
-
import { logger,
|
|
46
|
+
import { logger, startLlmRegistryAutoUpdate, DextoAgent, isPath } from '@dexto/core';
|
|
47
|
+
import { getAllSupportedModels, getProviderFromModel } from '@dexto/llm';
|
|
47
48
|
import { applyImageDefaults, cleanNullValues, AgentConfigSchema, loadImage, resolveServicesFromConfig, toDextoAgentOptions, } from '@dexto/agent-config';
|
|
48
|
-
import { getDextoPackageRoot, resolveAgentPath, loadAgentConfig, findDextoProjectRoot, globalPreferencesExist, loadGlobalPreferences, resolveBundledScript, enrichAgentConfig, isDextoAuthEnabled, } from '@dexto/agent-management';
|
|
49
|
+
import { getDextoPackageRoot, resolveAgentPath, loadAgentConfig, findDextoProjectRoot, globalPreferencesExist, loadGlobalPreferences, resolveBundledScript, enrichAgentConfig, isDextoAuthEnabled, resolveApiKeyForProvider, getPrimaryApiKeyEnvVar, } from '@dexto/agent-management';
|
|
49
50
|
import { validateCliOptions, handleCliOptionsError } from './cli/utils/options.js';
|
|
50
51
|
import { validateAgentConfig } from './cli/utils/config-validation.js';
|
|
51
52
|
import { applyCLIOverrides, applyStartupLLMFallback, applyUserPreferences, } from './config/cli-overrides.js';
|
|
@@ -107,7 +108,7 @@ program
|
|
|
107
108
|
.option('--no-interactive', 'Disable interactive prompts and API key setup')
|
|
108
109
|
.option('--skip-setup', 'Skip global setup validation (useful for MCP mode, automation)')
|
|
109
110
|
.option('-m, --model <model>', 'Specify the LLM model to use')
|
|
110
|
-
.option('--auto-approve', 'Always approve tool executions without
|
|
111
|
+
.option('--auto-approve', 'Always approve tool executions without approval prompts')
|
|
111
112
|
.option('--bypass-permissions', 'Start the interactive CLI in bypass permissions mode (auto-approve approval prompts)')
|
|
112
113
|
.option('--no-elicitation', 'Disable elicitation (agent cannot prompt user for input)')
|
|
113
114
|
.option('-c, --continue', 'Continue most recent session (CLI mode)')
|
|
@@ -350,11 +351,12 @@ async function bootstrapAgentFromGlobalOpts(options) {
|
|
|
350
351
|
}),
|
|
351
352
|
};
|
|
352
353
|
const validatedConfig = AgentConfigSchema.parse(enrichedConfig);
|
|
353
|
-
const services = await resolveServicesFromConfig(validatedConfig, image);
|
|
354
|
+
const services = await resolveServicesFromConfig(validatedConfig, image, { workspaceRoot });
|
|
354
355
|
const agent = new DextoAgent(toDextoAgentOptions({
|
|
355
356
|
config: validatedConfig,
|
|
356
357
|
services,
|
|
357
358
|
image,
|
|
359
|
+
hostContext: { workspaceRoot },
|
|
358
360
|
}));
|
|
359
361
|
await agent.start();
|
|
360
362
|
await (await import('./utils/workspace.js')).applyWorkspaceToAgent(agent, workspaceRoot);
|
|
@@ -801,7 +803,7 @@ program
|
|
|
801
803
|
console.error(`❌ Manual approval and elicitation are not supported in "${opts.mode}" mode.`);
|
|
802
804
|
console.error(`💡 These features require interactive UI and are only supported in: ${supportedModes.join(', ')}`);
|
|
803
805
|
console.error('💡 Run `dexto --auto-approve` or configure your agent to skip approvals when running non-interactively.');
|
|
804
|
-
console.error(' permissions.mode: auto-approve
|
|
806
|
+
console.error(' permissions.mode: auto-approve');
|
|
805
807
|
console.error(' elicitation.enabled: false');
|
|
806
808
|
safeExit('main', 1, 'approval-unsupported-mode');
|
|
807
809
|
}
|
|
@@ -810,7 +812,7 @@ program
|
|
|
810
812
|
let agent;
|
|
811
813
|
let derivedAgentId;
|
|
812
814
|
try {
|
|
813
|
-
// Set run mode for tool
|
|
815
|
+
// Set run mode for tool approval provider
|
|
814
816
|
process.env.DEXTO_RUN_MODE = opts.mode;
|
|
815
817
|
// Apply --strict flag to all server configs
|
|
816
818
|
if (opts.strict && validatedConfig.mcpServers) {
|
|
@@ -829,11 +831,14 @@ program
|
|
|
829
831
|
logger,
|
|
830
832
|
})
|
|
831
833
|
: null;
|
|
832
|
-
const services = await resolveServicesFromConfig(validatedConfig, image
|
|
834
|
+
const services = await resolveServicesFromConfig(validatedConfig, image, {
|
|
835
|
+
workspaceRoot,
|
|
836
|
+
});
|
|
833
837
|
agent = new DextoAgent(toDextoAgentOptions({
|
|
834
838
|
config: validatedConfig,
|
|
835
839
|
services,
|
|
836
840
|
image,
|
|
841
|
+
hostContext: { workspaceRoot },
|
|
837
842
|
overrides: {
|
|
838
843
|
sessionLoggerFactory,
|
|
839
844
|
mcpAuthProviderFactory,
|