@eminent337/aery 0.1.98 → 0.1.99
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/CHANGELOG.md +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +5 -1
- package/dist/cli/doctor.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +16 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
### Added
|
|
6
6
|
- Added `aery doctor` for non-mutating version, provider auth, and core extension health checks.
|
|
7
7
|
- Added a post-login provider setup check so `/login` confirms credentials expose usable local models.
|
|
8
|
+
- Added `/extensions doctor` in interactive mode for non-mutating core extension diagnostics.
|
|
8
9
|
|
|
9
10
|
## [0.1.14] - 2026-04-21
|
|
10
11
|
|
package/dist/cli/doctor.d.ts
CHANGED
|
@@ -25,5 +25,6 @@ export interface DoctorReportOptions {
|
|
|
25
25
|
}
|
|
26
26
|
export declare function collectDoctorReport(options?: DoctorReportOptions): Promise<DoctorReport>;
|
|
27
27
|
export declare function formatDoctorReport(report: DoctorReport): string;
|
|
28
|
+
export declare function formatCoreExtensionsReport(extensions: CoreExtensionDiagnostic): string;
|
|
28
29
|
export declare function runDoctorCommand(args: string[]): Promise<boolean>;
|
|
29
30
|
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,EAA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AAM,kBAAkB,CAAC;AAOxF,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,cAAc,EAAE,uBAAuB,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxE,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAqBD,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgClG;AAiBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyB/D;AAED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,uBAAuB,GAAG,MAAM,CAetF;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAavE","sourcesContent":["import chalk from \"chalk\";\nimport { join } from \"path\";\nimport { APP_NAME, getAgentDir, VERSION } from \"../config.js\";\nimport { type AuthStatus, AuthStorage } from \"../core/auth-storage.js\";\nimport { ModelRegistry } from \"../core/model-registry.js\";\nimport { type CoreExtensionDiagnostic, diagnoseCoreExtensions } from \"../migrations.js\";\nimport { getLatestPiVersion, isNewerPackageVersion } from \"../utils/version-check.js\";\n\nfunction isTruthyEnvFlag(value: string | undefined): boolean {\n\treturn value === \"1\" || value === \"true\" || value === \"yes\";\n}\n\nexport interface DoctorProviderStatus {\n\tprovider: string;\n\tstatus: AuthStatus;\n}\n\nexport interface DoctorReport {\n\tversion: {\n\t\tlocal: string;\n\t\tlatest?: string;\n\t\tupdateAvailable?: boolean;\n\t\terror?: string;\n\t};\n\tproviders: DoctorProviderStatus[];\n\tcoreExtensions: CoreExtensionDiagnostic;\n}\n\nexport interface DoctorReportOptions {\n\tversion?: string;\n\tauthStorage?: AuthStorage;\n\tmodelRegistry?: ModelRegistry;\n\tlatestVersion?: (currentVersion: string) => Promise<string | undefined>;\n\tcoreExtensions?: CoreExtensionDiagnostic;\n\tagentDir?: string;\n}\n\nconst DEFAULT_PROVIDER_CHECKS = [\n\t\"anthropic\",\n\t\"openai\",\n\t\"google\",\n\t\"openrouter\",\n\t\"cloudflare-workers-ai\",\n\t\"deepseek\",\n\t\"mistral\",\n\t\"groq\",\n\t\"xai\",\n\t\"bedrock\",\n];\n\nfunction getCoreExtensionDiagnostic(agentDir: string): CoreExtensionDiagnostic {\n\tconst repoPath = join(agentDir, \"git\", \"github.com\", \"eminent337\", \"aery-extensions\");\n\tconst settingsPath = join(agentDir, \"settings.json\");\n\treturn diagnoseCoreExtensions(repoPath, settingsPath);\n}\n\nexport async function collectDoctorReport(options: DoctorReportOptions = {}): Promise<DoctorReport> {\n\tconst version = options.version ?? VERSION;\n\tconst authStorage = options.authStorage ?? AuthStorage.create();\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage);\n\tconst latestVersion =\n\t\toptions.latestVersion ??\n\t\t(isTruthyEnvFlag(process.env.AERY_OFFLINE) || isTruthyEnvFlag(process.env.AERY_SKIP_VERSION_CHECK)\n\t\t\t? async () => undefined\n\t\t\t: getLatestPiVersion);\n\tconst providerIds = [...new Set([...DEFAULT_PROVIDER_CHECKS, ...authStorage.list()])].sort();\n\n\tlet latest: string | undefined;\n\tlet versionError: string | undefined;\n\ttry {\n\t\tlatest = await latestVersion(version);\n\t} catch (error) {\n\t\tversionError = error instanceof Error ? error.message : String(error);\n\t}\n\n\treturn {\n\t\tversion: {\n\t\t\tlocal: version,\n\t\t\tlatest,\n\t\t\tupdateAvailable: latest ? isNewerPackageVersion(latest, version) : false,\n\t\t\terror: versionError,\n\t\t},\n\t\tproviders: providerIds.map((provider) => ({\n\t\t\tprovider,\n\t\t\tstatus: modelRegistry.getProviderAuthStatus(provider),\n\t\t})),\n\t\tcoreExtensions: options.coreExtensions ?? getCoreExtensionDiagnostic(options.agentDir ?? getAgentDir()),\n\t};\n}\n\nfunction formatStatus(status: AuthStatus): string {\n\tif (status.configured) {\n\t\tconst source = status.source ? ` via ${status.source}` : \"\";\n\t\tconst label = status.label ? ` (${status.label})` : \"\";\n\t\treturn `configured${source}${label}`;\n\t}\n\tif (status.label) {\n\t\treturn status.label;\n\t}\n\tif (status.source) {\n\t\treturn `detected via ${status.source}`;\n\t}\n\treturn \"not configured\";\n}\n\nexport function formatDoctorReport(report: DoctorReport): string {\n\tconst lines: string[] = [];\n\tlines.push(chalk.bold(`${APP_NAME.charAt(0).toUpperCase()}${APP_NAME.slice(1)} Doctor`));\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Version\"));\n\tlines.push(` local: ${report.version.local}`);\n\tif (report.version.latest) {\n\t\tconst suffix = report.version.updateAvailable ? \" (update available)\" : \" (latest)\";\n\t\tlines.push(` latest: ${report.version.latest}${suffix}`);\n\t} else if (report.version.error) {\n\t\tlines.push(` latest: unavailable (${report.version.error})`);\n\t} else {\n\t\tlines.push(\" latest: unavailable\");\n\t}\n\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Providers\"));\n\tfor (const provider of report.providers) {\n\t\tlines.push(` ${provider.provider}: ${formatStatus(provider.status)}`);\n\t}\n\n\tlines.push(\"\");\n\tlines.push(formatCoreExtensionsReport(report.coreExtensions));\n\n\treturn lines.join(\"\\n\");\n}\n\nexport function formatCoreExtensionsReport(extensions: CoreExtensionDiagnostic): string {\n\tconst lines: string[] = [];\n\tlines.push(chalk.bold(\"Core Extensions\"));\n\tif (!extensions.repoExists) {\n\t\tlines.push(\" core extensions: not installed\");\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else if (extensions.missingFiles.length > 0 || extensions.missingSettingsEntries.length > 0) {\n\t\tlines.push(\" core extensions: attention needed\");\n\t\tlines.push(` missing files: ${extensions.missingFiles.length}`);\n\t\tlines.push(` missing settings entries: ${extensions.missingSettingsEntries.length}`);\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else {\n\t\tlines.push(\" core extensions: ok\");\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport async function runDoctorCommand(args: string[]): Promise<boolean> {\n\tif (args[0] !== \"doctor\") {\n\t\treturn false;\n\t}\n\n\tconst json = args.includes(\"--json\");\n\tconst report = await collectDoctorReport();\n\tif (json) {\n\t\tconsole.log(JSON.stringify(report, null, 2));\n\t} else {\n\t\tconsole.log(formatDoctorReport(report));\n\t}\n\treturn true;\n}\n"]}
|
package/dist/cli/doctor.js
CHANGED
|
@@ -92,8 +92,12 @@ export function formatDoctorReport(report) {
|
|
|
92
92
|
lines.push(` ${provider.provider}: ${formatStatus(provider.status)}`);
|
|
93
93
|
}
|
|
94
94
|
lines.push("");
|
|
95
|
+
lines.push(formatCoreExtensionsReport(report.coreExtensions));
|
|
96
|
+
return lines.join("\n");
|
|
97
|
+
}
|
|
98
|
+
export function formatCoreExtensionsReport(extensions) {
|
|
99
|
+
const lines = [];
|
|
95
100
|
lines.push(chalk.bold("Core Extensions"));
|
|
96
|
-
const extensions = report.coreExtensions;
|
|
97
101
|
if (!extensions.repoExists) {
|
|
98
102
|
lines.push(" core extensions: not installed");
|
|
99
103
|
lines.push(" repair: run aery update --extensions");
|
package/dist/cli/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRo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,oBAAoB,UAAU,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACjE,KAAK,CAAC,IAAI,CAAC,+BAA+B,UAAU,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,KAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;IACtD,CAAC;SAAM,CAAC;QACP,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAAA,CACxB;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAc,EAAoB;IACxE,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAC3C,IAAI,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,CAAC;AAAA,CACZ","sourcesContent":["import chalk from \"chalk\";\nimport { join } from \"path\";\nimport { APP_NAME, getAgentDir, VERSION } from \"../config.js\";\nimport { type AuthStatus, AuthStorage } from \"../core/auth-storage.js\";\nimport { ModelRegistry } from \"../core/model-registry.js\";\nimport { type CoreExtensionDiagnostic, diagnoseCoreExtensions } from \"../migrations.js\";\nimport { getLatestPiVersion, isNewerPackageVersion } from \"../utils/version-check.js\";\n\nfunction isTruthyEnvFlag(value: string | undefined): boolean {\n\treturn value === \"1\" || value === \"true\" || value === \"yes\";\n}\n\nexport interface DoctorProviderStatus {\n\tprovider: string;\n\tstatus: AuthStatus;\n}\n\nexport interface DoctorReport {\n\tversion: {\n\t\tlocal: string;\n\t\tlatest?: string;\n\t\tupdateAvailable?: boolean;\n\t\terror?: string;\n\t};\n\tproviders: DoctorProviderStatus[];\n\tcoreExtensions: CoreExtensionDiagnostic;\n}\n\nexport interface DoctorReportOptions {\n\tversion?: string;\n\tauthStorage?: AuthStorage;\n\tmodelRegistry?: ModelRegistry;\n\tlatestVersion?: (currentVersion: string) => Promise<string | undefined>;\n\tcoreExtensions?: CoreExtensionDiagnostic;\n\tagentDir?: string;\n}\n\nconst DEFAULT_PROVIDER_CHECKS = [\n\t\"anthropic\",\n\t\"openai\",\n\t\"google\",\n\t\"openrouter\",\n\t\"cloudflare-workers-ai\",\n\t\"deepseek\",\n\t\"mistral\",\n\t\"groq\",\n\t\"xai\",\n\t\"bedrock\",\n];\n\nfunction getCoreExtensionDiagnostic(agentDir: string): CoreExtensionDiagnostic {\n\tconst repoPath = join(agentDir, \"git\", \"github.com\", \"eminent337\", \"aery-extensions\");\n\tconst settingsPath = join(agentDir, \"settings.json\");\n\treturn diagnoseCoreExtensions(repoPath, settingsPath);\n}\n\nexport async function collectDoctorReport(options: DoctorReportOptions = {}): Promise<DoctorReport> {\n\tconst version = options.version ?? VERSION;\n\tconst authStorage = options.authStorage ?? AuthStorage.create();\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage);\n\tconst latestVersion =\n\t\toptions.latestVersion ??\n\t\t(isTruthyEnvFlag(process.env.AERY_OFFLINE) || isTruthyEnvFlag(process.env.AERY_SKIP_VERSION_CHECK)\n\t\t\t? async () => undefined\n\t\t\t: getLatestPiVersion);\n\tconst providerIds = [...new Set([...DEFAULT_PROVIDER_CHECKS, ...authStorage.list()])].sort();\n\n\tlet latest: string | undefined;\n\tlet versionError: string | undefined;\n\ttry {\n\t\tlatest = await latestVersion(version);\n\t} catch (error) {\n\t\tversionError = error instanceof Error ? error.message : String(error);\n\t}\n\n\treturn {\n\t\tversion: {\n\t\t\tlocal: version,\n\t\t\tlatest,\n\t\t\tupdateAvailable: latest ? isNewerPackageVersion(latest, version) : false,\n\t\t\terror: versionError,\n\t\t},\n\t\tproviders: providerIds.map((provider) => ({\n\t\t\tprovider,\n\t\t\tstatus: modelRegistry.getProviderAuthStatus(provider),\n\t\t})),\n\t\tcoreExtensions: options.coreExtensions ?? getCoreExtensionDiagnostic(options.agentDir ?? getAgentDir()),\n\t};\n}\n\nfunction formatStatus(status: AuthStatus): string {\n\tif (status.configured) {\n\t\tconst source = status.source ? ` via ${status.source}` : \"\";\n\t\tconst label = status.label ? ` (${status.label})` : \"\";\n\t\treturn `configured${source}${label}`;\n\t}\n\tif (status.label) {\n\t\treturn status.label;\n\t}\n\tif (status.source) {\n\t\treturn `detected via ${status.source}`;\n\t}\n\treturn \"not configured\";\n}\n\nexport function formatDoctorReport(report: DoctorReport): string {\n\tconst lines: string[] = [];\n\tlines.push(chalk.bold(`${APP_NAME.charAt(0).toUpperCase()}${APP_NAME.slice(1)} Doctor`));\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Version\"));\n\tlines.push(` local: ${report.version.local}`);\n\tif (report.version.latest) {\n\t\tconst suffix = report.version.updateAvailable ? \" (update available)\" : \" (latest)\";\n\t\tlines.push(` latest: ${report.version.latest}${suffix}`);\n\t} else if (report.version.error) {\n\t\tlines.push(` latest: unavailable (${report.version.error})`);\n\t} else {\n\t\tlines.push(\" latest: unavailable\");\n\t}\n\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Providers\"));\n\tfor (const provider of report.providers) {\n\t\tlines.push(` ${provider.provider}: ${formatStatus(provider.status)}`);\n\t}\n\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Core Extensions\"));\n\tconst extensions = report.coreExtensions;\n\tif (!extensions.repoExists) {\n\t\tlines.push(\" core extensions: not installed\");\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else if (extensions.missingFiles.length > 0 || extensions.missingSettingsEntries.length > 0) {\n\t\tlines.push(\" core extensions: attention needed\");\n\t\tlines.push(` missing files: ${extensions.missingFiles.length}`);\n\t\tlines.push(` missing settings entries: ${extensions.missingSettingsEntries.length}`);\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else {\n\t\tlines.push(\" core extensions: ok\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n\nexport async function runDoctorCommand(args: string[]): Promise<boolean> {\n\tif (args[0] !== \"doctor\") {\n\t\treturn false;\n\t}\n\n\tconst json = args.includes(\"--json\");\n\tconst report = await collectDoctorReport();\n\tif (json) {\n\t\tconsole.log(JSON.stringify(report, null, 2));\n\t} else {\n\t\tconsole.log(formatDoctorReport(report));\n\t}\n\treturn true;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAmB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAgC,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,SAAS,eAAe,CAAC,KAAyB,EAAW;IAC5D,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,KAAK,CAAC;AAAA,CAC5D;AA2BD,MAAM,uBAAuB,GAAG;IAC/B,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,uBAAuB;IACvB,UAAU;IACV,SAAS;IACT,MAAM;IACN,KAAK;IACL,SAAS;CACT,CAAC;AAEF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CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAC3C,IAAI,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,CAAC;AAAA,CACZ","sourcesContent":["import chalk from \"chalk\";\nimport { join } from \"path\";\nimport { APP_NAME, getAgentDir, VERSION } from \"../config.js\";\nimport { type AuthStatus, AuthStorage } from \"../core/auth-storage.js\";\nimport { ModelRegistry } from \"../core/model-registry.js\";\nimport { type CoreExtensionDiagnostic, diagnoseCoreExtensions } from \"../migrations.js\";\nimport { getLatestPiVersion, isNewerPackageVersion } from \"../utils/version-check.js\";\n\nfunction isTruthyEnvFlag(value: string | undefined): boolean {\n\treturn value === \"1\" || value === \"true\" || value === \"yes\";\n}\n\nexport interface DoctorProviderStatus {\n\tprovider: string;\n\tstatus: AuthStatus;\n}\n\nexport interface DoctorReport {\n\tversion: {\n\t\tlocal: string;\n\t\tlatest?: string;\n\t\tupdateAvailable?: boolean;\n\t\terror?: string;\n\t};\n\tproviders: DoctorProviderStatus[];\n\tcoreExtensions: CoreExtensionDiagnostic;\n}\n\nexport interface DoctorReportOptions {\n\tversion?: string;\n\tauthStorage?: AuthStorage;\n\tmodelRegistry?: ModelRegistry;\n\tlatestVersion?: (currentVersion: string) => Promise<string | undefined>;\n\tcoreExtensions?: CoreExtensionDiagnostic;\n\tagentDir?: string;\n}\n\nconst DEFAULT_PROVIDER_CHECKS = [\n\t\"anthropic\",\n\t\"openai\",\n\t\"google\",\n\t\"openrouter\",\n\t\"cloudflare-workers-ai\",\n\t\"deepseek\",\n\t\"mistral\",\n\t\"groq\",\n\t\"xai\",\n\t\"bedrock\",\n];\n\nfunction getCoreExtensionDiagnostic(agentDir: string): CoreExtensionDiagnostic {\n\tconst repoPath = join(agentDir, \"git\", \"github.com\", \"eminent337\", \"aery-extensions\");\n\tconst settingsPath = join(agentDir, \"settings.json\");\n\treturn diagnoseCoreExtensions(repoPath, settingsPath);\n}\n\nexport async function collectDoctorReport(options: DoctorReportOptions = {}): Promise<DoctorReport> {\n\tconst version = options.version ?? VERSION;\n\tconst authStorage = options.authStorage ?? AuthStorage.create();\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage);\n\tconst latestVersion =\n\t\toptions.latestVersion ??\n\t\t(isTruthyEnvFlag(process.env.AERY_OFFLINE) || isTruthyEnvFlag(process.env.AERY_SKIP_VERSION_CHECK)\n\t\t\t? async () => undefined\n\t\t\t: getLatestPiVersion);\n\tconst providerIds = [...new Set([...DEFAULT_PROVIDER_CHECKS, ...authStorage.list()])].sort();\n\n\tlet latest: string | undefined;\n\tlet versionError: string | undefined;\n\ttry {\n\t\tlatest = await latestVersion(version);\n\t} catch (error) {\n\t\tversionError = error instanceof Error ? error.message : String(error);\n\t}\n\n\treturn {\n\t\tversion: {\n\t\t\tlocal: version,\n\t\t\tlatest,\n\t\t\tupdateAvailable: latest ? isNewerPackageVersion(latest, version) : false,\n\t\t\terror: versionError,\n\t\t},\n\t\tproviders: providerIds.map((provider) => ({\n\t\t\tprovider,\n\t\t\tstatus: modelRegistry.getProviderAuthStatus(provider),\n\t\t})),\n\t\tcoreExtensions: options.coreExtensions ?? getCoreExtensionDiagnostic(options.agentDir ?? getAgentDir()),\n\t};\n}\n\nfunction formatStatus(status: AuthStatus): string {\n\tif (status.configured) {\n\t\tconst source = status.source ? ` via ${status.source}` : \"\";\n\t\tconst label = status.label ? ` (${status.label})` : \"\";\n\t\treturn `configured${source}${label}`;\n\t}\n\tif (status.label) {\n\t\treturn status.label;\n\t}\n\tif (status.source) {\n\t\treturn `detected via ${status.source}`;\n\t}\n\treturn \"not configured\";\n}\n\nexport function formatDoctorReport(report: DoctorReport): string {\n\tconst lines: string[] = [];\n\tlines.push(chalk.bold(`${APP_NAME.charAt(0).toUpperCase()}${APP_NAME.slice(1)} Doctor`));\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Version\"));\n\tlines.push(` local: ${report.version.local}`);\n\tif (report.version.latest) {\n\t\tconst suffix = report.version.updateAvailable ? \" (update available)\" : \" (latest)\";\n\t\tlines.push(` latest: ${report.version.latest}${suffix}`);\n\t} else if (report.version.error) {\n\t\tlines.push(` latest: unavailable (${report.version.error})`);\n\t} else {\n\t\tlines.push(\" latest: unavailable\");\n\t}\n\n\tlines.push(\"\");\n\tlines.push(chalk.bold(\"Providers\"));\n\tfor (const provider of report.providers) {\n\t\tlines.push(` ${provider.provider}: ${formatStatus(provider.status)}`);\n\t}\n\n\tlines.push(\"\");\n\tlines.push(formatCoreExtensionsReport(report.coreExtensions));\n\n\treturn lines.join(\"\\n\");\n}\n\nexport function formatCoreExtensionsReport(extensions: CoreExtensionDiagnostic): string {\n\tconst lines: string[] = [];\n\tlines.push(chalk.bold(\"Core Extensions\"));\n\tif (!extensions.repoExists) {\n\t\tlines.push(\" core extensions: not installed\");\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else if (extensions.missingFiles.length > 0 || extensions.missingSettingsEntries.length > 0) {\n\t\tlines.push(\" core extensions: attention needed\");\n\t\tlines.push(` missing files: ${extensions.missingFiles.length}`);\n\t\tlines.push(` missing settings entries: ${extensions.missingSettingsEntries.length}`);\n\t\tlines.push(\" repair: run aery update --extensions\");\n\t} else {\n\t\tlines.push(\" core extensions: ok\");\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport async function runDoctorCommand(args: string[]): Promise<boolean> {\n\tif (args[0] !== \"doctor\") {\n\t\treturn false;\n\t}\n\n\tconst json = args.includes(\"--json\");\n\tconst report = await collectDoctorReport();\n\tif (json) {\n\t\tconsole.log(JSON.stringify(report, null, 2));\n\t} else {\n\t\tconsole.log(formatDoctorReport(report));\n\t}\n\treturn true;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CAuBrE,CAAC","sourcesContent":["import { APP_NAME } from \"../config.js\";\nimport type { SourceInfo } from \"./source-info.js\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for Ctrl+P cycling\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"extensions\", description: \"Show extension diagnostics (/extensions doctor)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
|
|
@@ -14,6 +14,7 @@ export const BUILTIN_SLASH_COMMANDS = [
|
|
|
14
14
|
{ name: "fork", description: "Create a new fork from a previous user message" },
|
|
15
15
|
{ name: "clone", description: "Duplicate the current session at the current position" },
|
|
16
16
|
{ name: "tree", description: "Navigate session tree (switch branches)" },
|
|
17
|
+
{ name: "extensions", description: "Show extension diagnostics (/extensions doctor)" },
|
|
17
18
|
{ name: "login", description: "Configure provider authentication" },
|
|
18
19
|
{ name: "logout", description: "Remove provider authentication" },
|
|
19
20
|
{ name: "new", description: "Start a new session" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiBxC,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kCAAkC,EAAE;IAClE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAClF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;IAC/F,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAChF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uCAAuC,EAAE;IACvE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACrE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE;IACzD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE;IAC5D,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC/E,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uDAAuD,EAAE;IACvF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACxE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACnE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACjE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;IAC9F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC","sourcesContent":["import { APP_NAME } from \"../config.js\";\nimport type { SourceInfo } from \"./source-info.js\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for Ctrl+P cycling\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
|
|
1
|
+
{"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiBxC,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kCAAkC,EAAE;IAClE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAClF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;IAC/F,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAChF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uCAAuC,EAAE;IACvE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACrE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE;IACzD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE;IAC5D,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC/E,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uDAAuD,EAAE;IACvF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACxE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,iDAAiD,EAAE;IACtF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACnE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACjE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;IAC9F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC","sourcesContent":["import { APP_NAME } from \"../config.js\";\nimport type { SourceInfo } from \"./source-info.js\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for Ctrl+P cycling\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"extensions\", description: \"Show extension diagnostics (/extensions doctor)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
|
|
@@ -334,6 +334,7 @@ export declare class InteractiveMode {
|
|
|
334
334
|
private handleNameCommand;
|
|
335
335
|
private handleSessionCommand;
|
|
336
336
|
private handleChangelogCommand;
|
|
337
|
+
private handleExtensionsDoctorCommand;
|
|
337
338
|
/**
|
|
338
339
|
* Capitalize keybinding for display (e.g., "ctrl+c" -> "Ctrl+C").
|
|
339
340
|
*/
|