@nexagent-cli/cli 0.6.1 → 0.7.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/dist/bin/amarax.d.ts +3 -0
- package/dist/bin/amarax.d.ts.map +1 -0
- package/dist/bin/amarax.js +7 -0
- package/dist/bin/amarax.js.map +1 -0
- package/dist/bin/nexagent.d.ts +3 -0
- package/dist/bin/nexagent.d.ts.map +1 -0
- package/dist/bin/nexagent.js +7 -0
- package/dist/bin/nexagent.js.map +1 -0
- package/dist/bin/sophie.d.ts +3 -0
- package/dist/bin/sophie.d.ts.map +1 -0
- package/dist/bin/sophie.js +7 -0
- package/dist/bin/sophie.js.map +1 -0
- package/dist/commands/amarax.d.ts +10 -0
- package/dist/commands/amarax.d.ts.map +1 -0
- package/dist/commands/amarax.js +143 -0
- package/dist/commands/amarax.js.map +1 -0
- package/dist/commands/sophie.d.ts +11 -0
- package/dist/commands/sophie.d.ts.map +1 -0
- package/dist/commands/sophie.js +140 -0
- package/dist/commands/sophie.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +175 -249
- package/dist/index.js.map +1 -1
- package/dist/profiles/aiko.d.ts +3 -0
- package/dist/profiles/aiko.d.ts.map +1 -0
- package/dist/profiles/aiko.js +25 -0
- package/dist/profiles/aiko.js.map +1 -0
- package/dist/profiles/amarax.d.ts +3 -0
- package/dist/profiles/amarax.d.ts.map +1 -0
- package/dist/profiles/amarax.js +31 -0
- package/dist/profiles/amarax.js.map +1 -0
- package/dist/profiles/nexagent.d.ts +3 -0
- package/dist/profiles/nexagent.d.ts.map +1 -0
- package/dist/profiles/nexagent.js +36 -0
- package/dist/profiles/nexagent.js.map +1 -0
- package/dist/profiles/registry.d.ts +13 -0
- package/dist/profiles/registry.d.ts.map +1 -0
- package/dist/profiles/registry.js +51 -0
- package/dist/profiles/registry.js.map +1 -0
- package/dist/profiles/sophie.d.ts +3 -0
- package/dist/profiles/sophie.d.ts.map +1 -0
- package/dist/profiles/sophie.js +31 -0
- package/dist/profiles/sophie.js.map +1 -0
- package/dist/profiles/types.d.ts +50 -0
- package/dist/profiles/types.d.ts.map +1 -0
- package/dist/profiles/types.js +5 -0
- package/dist/profiles/types.js.map +1 -0
- package/dist/runtime/dispatch.d.ts +24 -0
- package/dist/runtime/dispatch.d.ts.map +1 -0
- package/dist/runtime/dispatch.js +49 -0
- package/dist/runtime/dispatch.js.map +1 -0
- package/package.json +8 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Profile: Amarax — Product / Platform / Business Shell
|
|
3
|
+
// ============================================================
|
|
4
|
+
export const AMARAX_PROFILE = {
|
|
5
|
+
name: 'amarax',
|
|
6
|
+
displayName: 'Amarax',
|
|
7
|
+
description: 'Productization layer — scaffolding, deployment, registry, marketplace packaging',
|
|
8
|
+
aliases: ['amarax', 'amx'],
|
|
9
|
+
systemPrompt: `You are Amarax, a product and platform builder.
|
|
10
|
+
You help turn code into products — scaffolding apps, setting up deployments, managing registries, and packaging for marketplaces.
|
|
11
|
+
You understand business requirements and translate them into technical implementation.
|
|
12
|
+
You care about branding, user experience, and production readiness.`,
|
|
13
|
+
defaultModel: 'gpt-4o',
|
|
14
|
+
defaultProvider: 'proxy',
|
|
15
|
+
memoryNamespace: 'amarax',
|
|
16
|
+
brandColor: '#f59e0b',
|
|
17
|
+
icon: '◉',
|
|
18
|
+
enabled: true,
|
|
19
|
+
commands: [
|
|
20
|
+
{ name: 'init', description: 'Initialize a new product/project', args: '[type]', riskLevel: 'medium' },
|
|
21
|
+
{ name: 'scaffold', description: 'Scaffold an app or platform', args: '<template>', riskLevel: 'medium' },
|
|
22
|
+
{ name: 'deploy', description: 'Run deployment workflow', riskLevel: 'high' },
|
|
23
|
+
{ name: 'registry', description: 'Manage local product registry / Nexus', aliases: ['reg'] },
|
|
24
|
+
{ name: 'package', description: 'Export publish-ready bundle', riskLevel: 'medium' },
|
|
25
|
+
{ name: 'brand', description: 'Generate branding/design-token package', riskLevel: 'low' },
|
|
26
|
+
{ name: 'doctor', description: 'Check product/platform health' },
|
|
27
|
+
{ name: 'run', description: 'Execute with Amarax product profile', args: '<prompt>', aliases: ['r'] },
|
|
28
|
+
{ name: 'chat', description: 'Interactive session with Amarax persona', aliases: ['c'] },
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=amarax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amarax.js","sourceRoot":"","sources":["../../src/profiles/amarax.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wDAAwD;AACxD,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,iFAAiF;IAC9F,OAAO,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC;IAC1B,YAAY,EAAE;;;oEAGoD;IAClE,YAAY,EAAE,QAAQ;IACtB,eAAe,EAAE,OAAO;IACxB,eAAe,EAAE,QAAQ;IACzB,UAAU,EAAE,SAAS;IACrB,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACR,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kCAAkC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;QACtG,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,6BAA6B,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE;QACzG,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,EAAE;QAC7E,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,uCAAuC,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE;QAC5F,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE,SAAS,EAAE,QAAQ,EAAE;QACpF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wCAAwC,EAAE,SAAS,EAAE,KAAK,EAAE;QAC1F,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+BAA+B,EAAE;QAChE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qCAAqC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE;QACrG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE;KACzF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nexagent.d.ts","sourceRoot":"","sources":["../../src/profiles/nexagent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,gBAAgB,EAAE,OA+B9B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Profile: NexAgent — Core technical agent identity
|
|
3
|
+
// ============================================================
|
|
4
|
+
export const NEXAGENT_PROFILE = {
|
|
5
|
+
name: 'nexagent',
|
|
6
|
+
displayName: 'NexAgent',
|
|
7
|
+
description: 'Core technical agent CLI — file editing, shell execution, web tools, memory, TUI',
|
|
8
|
+
aliases: ['nexagent'],
|
|
9
|
+
systemPrompt: `You are NexAgent, a locally-runnable AI agent.
|
|
10
|
+
You help developers by reading files, writing code, executing shell commands, searching the web, and managing persistent memory.
|
|
11
|
+
You are precise, technical, and focused on getting things done correctly.
|
|
12
|
+
Always verify file contents before editing. Never assume file structure.`,
|
|
13
|
+
defaultModel: 'gpt-4o',
|
|
14
|
+
defaultProvider: 'proxy',
|
|
15
|
+
memoryNamespace: 'nexagent',
|
|
16
|
+
brandColor: '#6366f1',
|
|
17
|
+
icon: '◆',
|
|
18
|
+
enabled: true,
|
|
19
|
+
commands: [
|
|
20
|
+
{ name: 'chat', description: 'Start interactive TUI session', aliases: ['c'] },
|
|
21
|
+
{ name: 'run', description: 'Single-shot prompt execution', aliases: ['r'], args: '<prompt>' },
|
|
22
|
+
{ name: 'memory', description: 'Manage agent memory blocks', aliases: ['mem'] },
|
|
23
|
+
{ name: 'session', description: 'Manage chat sessions', aliases: ['sess'] },
|
|
24
|
+
{ name: 'agent', description: 'Manage agent profiles' },
|
|
25
|
+
{ name: 'config', description: 'Manage configuration' },
|
|
26
|
+
{ name: 'models', description: 'List available LLM models' },
|
|
27
|
+
{ name: 'update', description: 'Update to latest version' },
|
|
28
|
+
{ name: 'changelog', description: 'Show release notes' },
|
|
29
|
+
{ name: 'doctor', description: 'Diagnose installation health' },
|
|
30
|
+
{ name: 'server', description: 'Manage proxy gateway', aliases: ['srv'] },
|
|
31
|
+
{ name: 'dashboard', description: 'Start web dashboard', aliases: ['dash'] },
|
|
32
|
+
{ name: 'mcp', description: 'Manage MCP tools' },
|
|
33
|
+
{ name: 'completion', description: 'Generate shell completion script' },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=nexagent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nexagent.js","sourceRoot":"","sources":["../../src/profiles/nexagent.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oDAAoD;AACpD,+DAA+D;AAI/D,MAAM,CAAC,MAAM,gBAAgB,GAAY;IACvC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,kFAAkF;IAC/F,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,YAAY,EAAE;;;yEAGyD;IACvE,YAAY,EAAE,QAAQ;IACtB,eAAe,EAAE,OAAO;IACxB,eAAe,EAAE,UAAU;IAC3B,UAAU,EAAE,SAAS;IACrB,IAAI,EAAE,GAAG;IACT,OAAO,E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js';
|
|
2
|
+
import { NEXAGENT_PROFILE } from './nexagent.js';
|
|
3
|
+
import { SOPHIE_PROFILE } from './sophie.js';
|
|
4
|
+
import { AMARAX_PROFILE } from './amarax.js';
|
|
5
|
+
import { AIKO_PROFILE } from './aiko.js';
|
|
6
|
+
export declare function getProfile(nameOrAlias: string): Profile | undefined;
|
|
7
|
+
export declare function getDefaultProfile(): Profile;
|
|
8
|
+
export declare function listProfiles(): Profile[];
|
|
9
|
+
export declare function listAllProfiles(): Profile[];
|
|
10
|
+
export declare function resolveProfile(invokedAs: string, explicitFlag?: string): Profile;
|
|
11
|
+
export { NEXAGENT_PROFILE, SOPHIE_PROFILE, AMARAX_PROFILE, AIKO_PROFILE };
|
|
12
|
+
export type { Profile, ProfileContext, ProfileCommand } from './types.js';
|
|
13
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/profiles/registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAqBzC,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEnE;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAExC;AAED,wBAAgB,eAAe,IAAI,OAAO,EAAE,CAE3C;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAWhF;AAED,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Profile Registry — All branded identities in one place
|
|
3
|
+
// ============================================================
|
|
4
|
+
import { NEXAGENT_PROFILE } from './nexagent.js';
|
|
5
|
+
import { SOPHIE_PROFILE } from './sophie.js';
|
|
6
|
+
import { AMARAX_PROFILE } from './amarax.js';
|
|
7
|
+
import { AIKO_PROFILE } from './aiko.js';
|
|
8
|
+
const ALL_PROFILES = [
|
|
9
|
+
NEXAGENT_PROFILE,
|
|
10
|
+
SOPHIE_PROFILE,
|
|
11
|
+
AMARAX_PROFILE,
|
|
12
|
+
AIKO_PROFILE,
|
|
13
|
+
];
|
|
14
|
+
/** Map of profile name → Profile */
|
|
15
|
+
const BY_NAME = new Map();
|
|
16
|
+
/** Map of alias → Profile */
|
|
17
|
+
const BY_ALIAS = new Map();
|
|
18
|
+
for (const p of ALL_PROFILES) {
|
|
19
|
+
BY_NAME.set(p.name, p);
|
|
20
|
+
for (const alias of p.aliases) {
|
|
21
|
+
BY_ALIAS.set(alias, p);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export function getProfile(nameOrAlias) {
|
|
25
|
+
return BY_NAME.get(nameOrAlias) ?? BY_ALIAS.get(nameOrAlias);
|
|
26
|
+
}
|
|
27
|
+
export function getDefaultProfile() {
|
|
28
|
+
return NEXAGENT_PROFILE;
|
|
29
|
+
}
|
|
30
|
+
export function listProfiles() {
|
|
31
|
+
return ALL_PROFILES.filter(p => p.enabled);
|
|
32
|
+
}
|
|
33
|
+
export function listAllProfiles() {
|
|
34
|
+
return [...ALL_PROFILES];
|
|
35
|
+
}
|
|
36
|
+
export function resolveProfile(invokedAs, explicitFlag) {
|
|
37
|
+
// 1. Explicit --profile flag wins
|
|
38
|
+
if (explicitFlag) {
|
|
39
|
+
const p = getProfile(explicitFlag);
|
|
40
|
+
if (p)
|
|
41
|
+
return p;
|
|
42
|
+
}
|
|
43
|
+
// 2. Binary name match
|
|
44
|
+
const p = getProfile(invokedAs);
|
|
45
|
+
if (p)
|
|
46
|
+
return p;
|
|
47
|
+
// 3. Default
|
|
48
|
+
return getDefaultProfile();
|
|
49
|
+
}
|
|
50
|
+
export { NEXAGENT_PROFILE, SOPHIE_PROFILE, AMARAX_PROFILE, AIKO_PROFILE };
|
|
51
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/profiles/registry.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,yDAAyD;AACzD,+DAA+D;AAG/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,YAAY,GAAc;IAC9B,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,YAAY;CACb,CAAC;AAEF,oCAAoC;AACpC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;AAC3C,6BAA6B;AAC7B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;AAE5C,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;IAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAC9B,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAmB;IAC5C,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,YAAqB;IACrE,kCAAkC;IAClC,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;QACnC,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC;IAClB,CAAC;IACD,uBAAuB;IACvB,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAChB,aAAa;IACb,OAAO,iBAAiB,EAAE,CAAC;AAC7B,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sophie.d.ts","sourceRoot":"","sources":["../../src/profiles/sophie.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,cAAc,EAAE,OA0B5B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Profile: Sophie — Intelligence / Persona / Operator Shell
|
|
3
|
+
// ============================================================
|
|
4
|
+
export const SOPHIE_PROFILE = {
|
|
5
|
+
name: 'sophie',
|
|
6
|
+
displayName: 'Sophie',
|
|
7
|
+
description: 'Intelligence layer — planning, audit, reasoning, skills, agent council, project memory',
|
|
8
|
+
aliases: ['sophie', 'soph'],
|
|
9
|
+
systemPrompt: `You are Sophie, an intelligent operator and reasoning agent.
|
|
10
|
+
You excel at planning, auditing, skill generation, and multi-agent orchestration.
|
|
11
|
+
You think before acting, break complex problems into steps, and review your work.
|
|
12
|
+
You can create reusable skills, conduct code audits, and facilitate expert council reviews.
|
|
13
|
+
You maintain project memory and help teams coordinate.`,
|
|
14
|
+
defaultModel: 'claude-3-7-sonnet',
|
|
15
|
+
defaultProvider: 'anthropic',
|
|
16
|
+
memoryNamespace: 'sophie',
|
|
17
|
+
brandColor: '#ec4899',
|
|
18
|
+
icon: '◈',
|
|
19
|
+
enabled: true,
|
|
20
|
+
commands: [
|
|
21
|
+
{ name: 'plan', description: 'Create a structured plan from a goal', args: '<goal>', riskLevel: 'low' },
|
|
22
|
+
{ name: 'audit', description: 'Audit a repository, file, or decision', args: '<target>', riskLevel: 'low' },
|
|
23
|
+
{ name: 'skill', description: 'Generate or manage reusable skills', aliases: ['sk'] },
|
|
24
|
+
{ name: 'council', description: 'Run MOAE-style expert review', args: '<topic>', riskLevel: 'medium' },
|
|
25
|
+
{ name: 'inspect', description: 'Deep inspect codebase or context', args: '<path>', riskLevel: 'low' },
|
|
26
|
+
{ name: 'review', description: 'Review execution output and suggest improvements', riskLevel: 'low' },
|
|
27
|
+
{ name: 'run', description: 'Execute with Sophie reasoning profile', args: '<prompt>', aliases: ['r'] },
|
|
28
|
+
{ name: 'chat', description: 'Interactive session with Sophie persona', aliases: ['c'] },
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=sophie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sophie.js","sourceRoot":"","sources":["../../src/profiles/sophie.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,4DAA4D;AAC5D,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,IAAI,EAAE,QAAQ;IACd,WAAW,EA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|
|
3
|
+
name: string;
|
|
4
|
+
/** Display name for UI */
|
|
5
|
+
displayName: string;
|
|
6
|
+
/** Short description */
|
|
7
|
+
description: string;
|
|
8
|
+
/** Binary names that activate this profile */
|
|
9
|
+
aliases: string[];
|
|
10
|
+
/** Profile-specific system prompt additions */
|
|
11
|
+
systemPrompt: string;
|
|
12
|
+
/** Default model for this profile */
|
|
13
|
+
defaultModel?: string;
|
|
14
|
+
/** Default provider for this profile */
|
|
15
|
+
defaultProvider?: string;
|
|
16
|
+
/** Commands this profile exposes */
|
|
17
|
+
commands: ProfileCommand[];
|
|
18
|
+
/** Whether this profile is active/available */
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
/** Memory namespace prefix */
|
|
21
|
+
memoryNamespace: string;
|
|
22
|
+
/** Brand color for TUI (hex) */
|
|
23
|
+
brandColor: string;
|
|
24
|
+
/** Icon/emoji for the profile */
|
|
25
|
+
icon: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ProfileCommand {
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
aliases?: string[];
|
|
31
|
+
args?: string;
|
|
32
|
+
options?: ProfileCommandOption[];
|
|
33
|
+
/** Risk level for confirmation gates */
|
|
34
|
+
riskLevel?: 'low' | 'medium' | 'high' | 'critical';
|
|
35
|
+
}
|
|
36
|
+
export interface ProfileCommandOption {
|
|
37
|
+
flags: string;
|
|
38
|
+
description: string;
|
|
39
|
+
defaultValue?: string | boolean | number;
|
|
40
|
+
}
|
|
41
|
+
/** Runtime context passed to profile-aware commands */
|
|
42
|
+
export interface ProfileContext {
|
|
43
|
+
profile: Profile;
|
|
44
|
+
invokedAs: string;
|
|
45
|
+
workspaceDir: string;
|
|
46
|
+
dataDir: string;
|
|
47
|
+
config: import('@nexagent-cli/shared').ResolvedConfig;
|
|
48
|
+
isInteractive: boolean;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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AC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,sBAAsB,EAAE,cAAc,CAAC;IACtD,aAAa,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/profiles/types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,+DAA+D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Profile } from '../profiles/registry.js';
|
|
2
|
+
export interface DispatchResult {
|
|
3
|
+
profile: Profile;
|
|
4
|
+
command: string;
|
|
5
|
+
args: string[];
|
|
6
|
+
options: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Determine the active profile from process.argv[1] (how the binary was invoked)
|
|
10
|
+
* and any explicit --profile flag.
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectInvocation(): {
|
|
13
|
+
invokedAs: string;
|
|
14
|
+
explicitProfile?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Build help text for a profile's commands
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildProfileHelp(profile: Profile): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get the brand-colored prefix for a profile
|
|
22
|
+
*/
|
|
23
|
+
export declare function getBrandPrefix(profile: Profile): string;
|
|
24
|
+
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/runtime/dispatch.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAUlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAyBzD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Runtime Dispatch — Decides which profile + command to run
|
|
3
|
+
// ============================================================
|
|
4
|
+
/**
|
|
5
|
+
* Determine the active profile from process.argv[1] (how the binary was invoked)
|
|
6
|
+
* and any explicit --profile flag.
|
|
7
|
+
*/
|
|
8
|
+
export function detectInvocation() {
|
|
9
|
+
const execPath = process.argv[1] ?? '';
|
|
10
|
+
const baseName = execPath.replace(/\\/g, '/').split('/').pop() ?? 'nexagent';
|
|
11
|
+
const invokedAs = baseName.replace(/\.js$|\.exe$/, '');
|
|
12
|
+
// Check for --profile flag
|
|
13
|
+
const profileIdx = process.argv.indexOf('--profile');
|
|
14
|
+
const explicitProfile = profileIdx >= 0 ? process.argv[profileIdx + 1] : undefined;
|
|
15
|
+
return { invokedAs, explicitProfile };
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build help text for a profile's commands
|
|
19
|
+
*/
|
|
20
|
+
export function buildProfileHelp(profile) {
|
|
21
|
+
const lines = [];
|
|
22
|
+
lines.push(`${profile.icon} ${profile.displayName} — ${profile.description}`);
|
|
23
|
+
lines.push('');
|
|
24
|
+
if (profile.commands.length > 0) {
|
|
25
|
+
lines.push('Commands:');
|
|
26
|
+
for (const cmd of profile.commands) {
|
|
27
|
+
const aliasStr = cmd.aliases ? ` (${cmd.aliases.join(', ')})` : '';
|
|
28
|
+
const argStr = cmd.args ? ` ${cmd.args}` : '';
|
|
29
|
+
lines.push(` ${cmd.name}${aliasStr}${argStr.padEnd(18)} ${cmd.description}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
lines.push('');
|
|
33
|
+
lines.push('Global flags:');
|
|
34
|
+
lines.push(' --profile <name> Switch profile (sophie, amarax, aiko)');
|
|
35
|
+
lines.push(' --no-color Disable color output');
|
|
36
|
+
lines.push(' --json Output machine-readable JSON');
|
|
37
|
+
lines.push(' --debug Enable verbose debug logging');
|
|
38
|
+
lines.push(' --data-dir <path> Override agent data directory');
|
|
39
|
+
lines.push(' -h, --help Show help');
|
|
40
|
+
lines.push(' -v, --version Show version');
|
|
41
|
+
return lines.join('\n');
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get the brand-colored prefix for a profile
|
|
45
|
+
*/
|
|
46
|
+
export function getBrandPrefix(profile) {
|
|
47
|
+
return `${profile.icon} ${profile.displayName}`;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../src/runtime/dispatch.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,4DAA4D;AAC5D,+DAA+D;AAW/D;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,UAAU,CAAC;IAC7E,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAEvD,2BAA2B;IAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,eAAe,GAAG,UAAU,IAAI,CAAC,CA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AC;IAC1D,KAAK,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IAClE,KAAK,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IAClE,KAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACnE,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAC/C,KAAK,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAElD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexagent-cli/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "NexAgent — locally-runnable AI agent CLI with file editing, tools, and beautiful TUI",
|
|
5
5
|
"bin": {
|
|
6
|
-
"nexagent": "./dist/
|
|
6
|
+
"nexagent": "./dist/bin/nexagent.js",
|
|
7
|
+
"sophie": "./dist/bin/sophie.js",
|
|
8
|
+
"amarax": "./dist/bin/amarax.js"
|
|
7
9
|
},
|
|
8
10
|
"main": "./dist/index.js",
|
|
9
11
|
"types": "./dist/index.d.ts",
|
|
@@ -28,13 +30,15 @@
|
|
|
28
30
|
"test:watch": "vitest",
|
|
29
31
|
"lint": "eslint src/",
|
|
30
32
|
"clean": "rm -rf dist/",
|
|
31
|
-
"prepublishOnly": "pnpm run build"
|
|
33
|
+
"prepublishOnly": "pnpm run build",
|
|
34
|
+
"validate:bin": "node --import tsx scripts/validate-bin-map.ts",
|
|
35
|
+
"smoke:pack": "node --import tsx scripts/smoke-pack.ts"
|
|
32
36
|
},
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"@anthropic-ai/sdk": "^0.29.0",
|
|
35
39
|
"@google/generative-ai": "^0.19.0",
|
|
36
40
|
"@inquirer/prompts": "^5.0.0",
|
|
37
|
-
"@nexagent-cli/shared": "^0.
|
|
41
|
+
"@nexagent-cli/shared": "^0.7.1",
|
|
38
42
|
"better-sqlite3": "^11.0.0",
|
|
39
43
|
"boxen": "^8.0.0",
|
|
40
44
|
"chalk": "^5.3.0",
|