dexto 1.10.4 → 1.12.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/dist/agents/coding-agent/coding-agent.yml +3 -3
- package/dist/cli/auth/api-client.d.ts +9 -10
- package/dist/cli/auth/api-client.d.ts.map +1 -1
- package/dist/cli/auth/api-client.js +62 -98
- package/dist/cli/auth/constants.d.ts +2 -0
- package/dist/cli/auth/constants.d.ts.map +1 -1
- package/dist/cli/auth/constants.js +2 -0
- package/dist/cli/auth/index.d.ts +1 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +1 -1
- package/dist/cli/commands/billing/status.d.ts.map +1 -1
- package/dist/cli/commands/billing/status.js +7 -17
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +19 -44
- package/dist/webui/assets/{index-D-sh5G_P.js → index-DGxuMOGM.js} +1 -1
- package/dist/webui/index.html +1 -1
- package/package.json +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as p from '@clack/prompts';
|
|
2
|
-
import { createDextoAgentFromConfig, deriveDisplayName, findProjectRegistryPath as findSharedProjectRegistryPath, getPrimaryApiKeyEnvVar, getProjectRegistryPath as getCanonicalProjectRegistryPath, ProjectRegistrySchema, readProjectRegistry as readSharedProjectRegistry, writeConfigFile, } from '@dexto/agent-management';
|
|
2
|
+
import { createDextoAgentFromConfig, deriveDisplayName, discoverStandaloneSkills, findProjectRegistryPath as findSharedProjectRegistryPath, getPrimaryApiKeyEnvVar, getProjectRegistryPath as getCanonicalProjectRegistryPath, ProjectRegistrySchema, readProjectRegistry as readSharedProjectRegistry, writeConfigFile, } from '@dexto/agent-management';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
5
|
import { promises as fs } from 'node:fs';
|
|
@@ -13,7 +13,7 @@ import { discoverPrimaryWorkspaceAgent } from './deploy/entry-agent.js';
|
|
|
13
13
|
import { confirmOrExit, multiselectOrExit, selectOrExit, textOrExit, } from '../utils/prompt-helpers.js';
|
|
14
14
|
import { ensureImageImporterConfigured } from '../utils/image-importer.js';
|
|
15
15
|
const AGENTS_FILENAME = 'AGENTS.md';
|
|
16
|
-
const WORKSPACE_DIRECTORIES = ['agents', 'skills'];
|
|
16
|
+
const WORKSPACE_DIRECTORIES = ['agents', path.join('.agents', 'skills')];
|
|
17
17
|
const SKILL_RESOURCE_DIRECTORIES = ['handlers', 'scripts', 'mcps', 'references'];
|
|
18
18
|
const STARTER_SKILL_ID = 'create-skill';
|
|
19
19
|
const STARTER_SKILL_IDS = [STARTER_SKILL_ID];
|
|
@@ -27,7 +27,8 @@ This workspace can define project-specific agents and skills.
|
|
|
27
27
|
|
|
28
28
|
## Structure
|
|
29
29
|
- Put custom agents and subagents in \`agents/\`
|
|
30
|
-
- Put custom skills in
|
|
30
|
+
- Put custom skills in \`.agents/skills/<skill-id>/\`
|
|
31
|
+
- Existing \`skills/\` and \`.dexto/skills/\` bundles remain discoverable for compatibility; create new skills under \`.agents/skills/\`
|
|
31
32
|
- Each skill bundle should keep \`SKILL.md\` plus optional \`handlers/\`, \`scripts/\`, \`mcps/\`, and \`references/\`
|
|
32
33
|
- Use \`.dexto/\` only for Dexto-managed state and installed assets
|
|
33
34
|
|
|
@@ -38,7 +39,7 @@ This workspace can define project-specific agents and skills.
|
|
|
38
39
|
const CORE_AGENT_TOOL_ENTRIES = [
|
|
39
40
|
{
|
|
40
41
|
type: 'builtin-tools',
|
|
41
|
-
enabledTools: ['ask_user', '
|
|
42
|
+
enabledTools: ['ask_user', 'skill_load', 'sleep'],
|
|
42
43
|
},
|
|
43
44
|
];
|
|
44
45
|
const ALWAYS_ENABLED_AGENT_TOOL_ENTRIES = [
|
|
@@ -800,7 +801,7 @@ async function resolveInitAgentInput(agentIdInput, options, workspaceRoot) {
|
|
|
800
801
|
`${chalk.cyan('Workspace role:')} ${roleSummary}`,
|
|
801
802
|
`${chalk.cyan('System prompt:')} ${promptResult.mode === 'generate' ? 'Generated from description' : 'Custom'}`,
|
|
802
803
|
`${chalk.cyan('Tool bundles:')} ${formatBundleSelection(bundleIds)}`,
|
|
803
|
-
`${chalk.cyan('Core utilities:')} ask_user,
|
|
804
|
+
`${chalk.cyan('Core utilities:')} ask_user, skill_load, sleep`,
|
|
804
805
|
`${chalk.cyan('Agent creation:')} enabled by default`,
|
|
805
806
|
].join('\n'), 'Agent Summary');
|
|
806
807
|
const confirmed = await confirmOrExit({
|
|
@@ -866,7 +867,7 @@ description: "Create or update Dexto skill bundles with SKILL.md, handlers, scri
|
|
|
866
867
|
|
|
867
868
|
# Create Skill
|
|
868
869
|
|
|
869
|
-
Create or update standalone Dexto skill bundles. Treat
|
|
870
|
+
Create or update standalone Dexto skill bundles. Treat \`.agents/skills/<id>/\` as the canonical workspace location unless the user explicitly asks for a global skill.
|
|
870
871
|
|
|
871
872
|
## Core Flow
|
|
872
873
|
1. Search for overlap first with \`skill_list\` and \`skill_search\`.
|
|
@@ -879,7 +880,7 @@ Create or update standalone Dexto skill bundles. Treat \`skills/<id>/\` as the c
|
|
|
879
880
|
- \`handlers/\` for reusable workflow logic or structured helper code
|
|
880
881
|
- \`mcps/\` for inert MCP-related reference/config files
|
|
881
882
|
6. Prefer extending existing skills or references over duplicating content.
|
|
882
|
-
7. If you edit \`SKILL.md\` or bundled files with non-creator tools,
|
|
883
|
+
7. If you edit \`SKILL.md\` or bundled files with non-creator tools, use \`skill_load\` to reread the current Skill before relying on it in the current session.
|
|
883
884
|
8. Creating \`mcps/*.json\` only creates inert bundled files. Configure runtime MCP servers through normal MCP configuration paths.
|
|
884
885
|
|
|
885
886
|
## Authoring Rules
|
|
@@ -888,7 +889,7 @@ Create or update standalone Dexto skill bundles. Treat \`skills/<id>/\` as the c
|
|
|
888
889
|
- Use \`references/\` sparingly for larger copied docs, external references, schemas, examples, or policies.
|
|
889
890
|
- Keep references one level deep from \`SKILL.md\` and link them explicitly.
|
|
890
891
|
- Reuse language and conventions from nearby skills when possible.
|
|
891
|
-
- If you update bundled resources outside creator tools,
|
|
892
|
+
- If you update bundled resources outside creator tools, use \`skill_load\` so the current session reads the latest skill content before invoking it.
|
|
892
893
|
|
|
893
894
|
## SKILL.md Structure
|
|
894
895
|
- \`# <Title>\`
|
|
@@ -907,7 +908,7 @@ function buildCreateSkillStarterReference() {
|
|
|
907
908
|
|
|
908
909
|
## Canonical Layout
|
|
909
910
|
\`\`\`
|
|
910
|
-
skills/<skill-id>/
|
|
911
|
+
.agents/skills/<skill-id>/
|
|
911
912
|
├── SKILL.md
|
|
912
913
|
├── handlers/
|
|
913
914
|
├── scripts/
|
|
@@ -934,7 +935,7 @@ skills/<skill-id>/
|
|
|
934
935
|
- Files under \`mcps/\` are bundled content only.
|
|
935
936
|
- Skills do not register or connect MCP servers from \`mcps/\`.
|
|
936
937
|
- Configure runtime MCP servers through normal agent MCP configuration paths.
|
|
937
|
-
-
|
|
938
|
+
- The \`skill_load\` tool rereads the current skill files, so no refresh step is required after editing bundled files.
|
|
938
939
|
`;
|
|
939
940
|
}
|
|
940
941
|
function buildCreateSkillMcpReference() {
|
|
@@ -1031,7 +1032,7 @@ await server.connect(transport);
|
|
|
1031
1032
|
|
|
1032
1033
|
## Verification Sequence
|
|
1033
1034
|
1. Create or update \`SKILL.md\`, \`scripts/\`, and any inert \`mcps/\` reference files.
|
|
1034
|
-
2.
|
|
1035
|
+
2. Use \`skill_load\` to reread the current Skill after non-creator file edits.
|
|
1035
1036
|
3. Invoke the skill in the current session and confirm the updated instructions load.
|
|
1036
1037
|
4. Configure and verify runtime MCP servers separately through normal MCP configuration paths.
|
|
1037
1038
|
|
|
@@ -1196,7 +1197,7 @@ export async function createWorkspaceAgentScaffold(agentIdInput, options = {}, w
|
|
|
1196
1197
|
export async function createWorkspaceSkillScaffold(skillIdInput, workspaceRoot = process.cwd()) {
|
|
1197
1198
|
const skillId = normalizeScaffoldId(skillIdInput, 'skill');
|
|
1198
1199
|
const workspace = await createWorkspaceScaffold(workspaceRoot);
|
|
1199
|
-
const skillDirPath = path.join(workspace.root, 'skills', skillId);
|
|
1200
|
+
const skillDirPath = path.join(workspace.root, '.agents', 'skills', skillId);
|
|
1200
1201
|
const skillFilePath = path.join(skillDirPath, 'SKILL.md');
|
|
1201
1202
|
const resourceDirectories = [];
|
|
1202
1203
|
const extraFiles = [];
|
|
@@ -1329,36 +1330,10 @@ function formatSkillPaths(result) {
|
|
|
1329
1330
|
return createdPaths;
|
|
1330
1331
|
}
|
|
1331
1332
|
async function listWorkspaceSkillIds(workspaceRoot) {
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
for (const entry of entries) {
|
|
1337
|
-
if (!entry.isDirectory()) {
|
|
1338
|
-
continue;
|
|
1339
|
-
}
|
|
1340
|
-
const skillFilePath = path.join(skillsRoot, entry.name, 'SKILL.md');
|
|
1341
|
-
try {
|
|
1342
|
-
const stat = await fs.stat(skillFilePath);
|
|
1343
|
-
if (stat.isFile()) {
|
|
1344
|
-
skillIds.push(entry.name);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
catch (error) {
|
|
1348
|
-
if (error.code === 'ENOENT') {
|
|
1349
|
-
continue;
|
|
1350
|
-
}
|
|
1351
|
-
throw error;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
return skillIds.sort((left, right) => left.localeCompare(right));
|
|
1355
|
-
}
|
|
1356
|
-
catch (error) {
|
|
1357
|
-
if (error.code === 'ENOENT') {
|
|
1358
|
-
return [];
|
|
1359
|
-
}
|
|
1360
|
-
throw error;
|
|
1361
|
-
}
|
|
1333
|
+
return discoverStandaloneSkills(workspaceRoot)
|
|
1334
|
+
.filter((skill) => skill.source === 'project')
|
|
1335
|
+
.map((skill) => skill.name)
|
|
1336
|
+
.sort((left, right) => left.localeCompare(right));
|
|
1362
1337
|
}
|
|
1363
1338
|
function describeEffectiveDeployAgent(input) {
|
|
1364
1339
|
if (input.deployConfig) {
|
|
@@ -1377,7 +1352,7 @@ export async function inspectWorkspaceStatus(workspaceRoot = process.cwd()) {
|
|
|
1377
1352
|
await ensureWorkspaceRoot(root);
|
|
1378
1353
|
const agentsFilePresent = (await getExistingEntryType(path.join(root, AGENTS_FILENAME))) === 'file';
|
|
1379
1354
|
const agentsDirectoryPresent = (await getExistingEntryType(path.join(root, 'agents'))) === 'directory';
|
|
1380
|
-
const skillsDirectoryPresent = (await getExistingEntryType(path.join(root, 'skills'))) === 'directory';
|
|
1355
|
+
const skillsDirectoryPresent = (await getExistingEntryType(path.join(root, '.agents', 'skills'))) === 'directory';
|
|
1381
1356
|
const registryPath = await findSharedProjectRegistryPath(root);
|
|
1382
1357
|
const registry = registryPath ? await readSharedProjectRegistry(registryPath) : null;
|
|
1383
1358
|
const primaryAgentId = registry ? getEffectiveWorkspacePrimaryAgentId(registry) : null;
|
|
@@ -1416,7 +1391,7 @@ function formatWorkspaceStatus(result) {
|
|
|
1416
1391
|
`Workspace: ${result.workspaceRoot}`,
|
|
1417
1392
|
`AGENTS.md: ${result.agentsFilePresent ? 'present' : 'missing'}`,
|
|
1418
1393
|
`agents/: ${result.agentsDirectoryPresent ? 'present' : 'missing'}`,
|
|
1419
|
-
|
|
1394
|
+
`.agents/skills/: ${result.skillsDirectoryPresent ? 'present' : 'missing'}`,
|
|
1420
1395
|
`Registry: ${result.registryPath ? path.relative(result.workspaceRoot, result.registryPath) : 'none'}`,
|
|
1421
1396
|
`Primary agent: ${result.primaryAgentId ?? 'none (global default used locally)'}`,
|
|
1422
1397
|
`Allow global agents: ${result.allowGlobalAgents === null
|