@hemansubedi/aether-ai 1.0.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.
Files changed (90) hide show
  1. package/.gitattributes +3 -0
  2. package/.github/workflows/live-stats.yml +42 -0
  3. package/.github/workflows/publish.yml +34 -0
  4. package/.github/workflows/update-preview.yml +41 -0
  5. package/INSTALL.md +59 -0
  6. package/LICENSE +21 -0
  7. package/README.md +397 -0
  8. package/assets/aether-arena.svg +72 -0
  9. package/assets/aether-banner.svg +62 -0
  10. package/assets/aether-router.svg +129 -0
  11. package/dist/agent.js +125 -0
  12. package/dist/arena.js +486 -0
  13. package/dist/checkpoint.js +105 -0
  14. package/dist/client.js +95 -0
  15. package/dist/combos.js +176 -0
  16. package/dist/commands.js +483 -0
  17. package/dist/config.js +104 -0
  18. package/dist/cost.js +176 -0
  19. package/dist/git.js +52 -0
  20. package/dist/health.js +81 -0
  21. package/dist/index.js +272 -0
  22. package/dist/keys.js +128 -0
  23. package/dist/memory.js +98 -0
  24. package/dist/modes.js +68 -0
  25. package/dist/providers/index.js +32 -0
  26. package/dist/providers/ollama.js +206 -0
  27. package/dist/providers/openai-compat.js +181 -0
  28. package/dist/providers/openrouter.js +189 -0
  29. package/dist/providers/registry.js +211 -0
  30. package/dist/router-engine.js +200 -0
  31. package/dist/router.js +171 -0
  32. package/dist/server.js +210 -0
  33. package/dist/session.js +97 -0
  34. package/dist/settings.js +97 -0
  35. package/dist/skills.js +100 -0
  36. package/dist/tokensaver.js +50 -0
  37. package/dist/tools/filesystem.js +243 -0
  38. package/dist/tools/git.js +53 -0
  39. package/dist/tools/glob.js +175 -0
  40. package/dist/tools/grep.js +193 -0
  41. package/dist/tools/registry.js +39 -0
  42. package/dist/tools/vision.js +140 -0
  43. package/dist/tools/websearch.js +118 -0
  44. package/dist/tui.js +562 -0
  45. package/dist/types.js +8 -0
  46. package/docs/preview.txt +51 -0
  47. package/docs/screenshots.md +110 -0
  48. package/docs/stats.md +5 -0
  49. package/install.ps1 +170 -0
  50. package/install.sh +196 -0
  51. package/package.json +34 -0
  52. package/scripts/generate-stats-card.ts +62 -0
  53. package/scripts/patch_index.ps1 +17 -0
  54. package/scripts/release.sh +7 -0
  55. package/src/agent.ts +146 -0
  56. package/src/arena.ts +584 -0
  57. package/src/checkpoint.ts +111 -0
  58. package/src/client.ts +172 -0
  59. package/src/combos.ts +199 -0
  60. package/src/commands.ts +973 -0
  61. package/src/config.ts +122 -0
  62. package/src/cost.ts +206 -0
  63. package/src/git.ts +68 -0
  64. package/src/health.ts +90 -0
  65. package/src/index.ts +281 -0
  66. package/src/keys.ts +135 -0
  67. package/src/memory.ts +101 -0
  68. package/src/modes.ts +84 -0
  69. package/src/providers/index.ts +59 -0
  70. package/src/providers/ollama.ts +222 -0
  71. package/src/providers/openai-compat.ts +188 -0
  72. package/src/providers/openrouter.ts +198 -0
  73. package/src/providers/registry.ts +223 -0
  74. package/src/router-engine.ts +214 -0
  75. package/src/router.ts +195 -0
  76. package/src/server.ts +242 -0
  77. package/src/session.ts +111 -0
  78. package/src/settings.ts +125 -0
  79. package/src/skills.ts +106 -0
  80. package/src/tokensaver.ts +57 -0
  81. package/src/tools/filesystem.ts +258 -0
  82. package/src/tools/git.ts +53 -0
  83. package/src/tools/glob.ts +180 -0
  84. package/src/tools/grep.ts +192 -0
  85. package/src/tools/registry.ts +54 -0
  86. package/src/tools/vision.ts +152 -0
  87. package/src/tools/websearch.ts +130 -0
  88. package/src/tui.ts +664 -0
  89. package/src/types.ts +77 -0
  90. package/tsconfig.json +16 -0
package/src/types.ts ADDED
@@ -0,0 +1,77 @@
1
+ export type Role = "system" | "user" | "assistant" | "tool";
2
+
3
+ export interface TextPart {
4
+ type: "text";
5
+ text: string;
6
+ }
7
+
8
+ export interface ImageUrlPart {
9
+ type: "image_url";
10
+ image_url: { url: string } | string;
11
+ }
12
+
13
+ export type ContentPart = TextPart | ImageUrlPart;
14
+
15
+ export interface Message {
16
+ role: Role;
17
+ content: string | ContentPart[];
18
+ tool_calls?: ToolCall[];
19
+ tool_call_id?: string;
20
+ name?: string;
21
+ }
22
+
23
+ export interface ToolCall {
24
+ id: string;
25
+ type: "function";
26
+ function: { name: string; arguments: string };
27
+ }
28
+
29
+ export interface ToolDef {
30
+ name: string;
31
+ description: string;
32
+ parameters: Record<string, any>; // JSON schema
33
+ }
34
+
35
+ export interface ChatChunk {
36
+ type: "text" | "tool_call" | "done" | "error";
37
+ text?: string;
38
+ tool_call?: ToolCall;
39
+ error?: string;
40
+ usage?: { input_tokens: number; output_tokens: number };
41
+ }
42
+
43
+ export interface ProviderConfig {
44
+ name: string;
45
+ type: "ollama" | "openrouter" | "openai-compatible";
46
+ baseURL: string;
47
+ apiKey?: string;
48
+ models: string[];
49
+ priority: number; // lower = preferred
50
+ enabled: boolean;
51
+ maxRetries: number;
52
+ timeoutMs: number;
53
+ }
54
+
55
+ export interface HealthStatus {
56
+ provider: string;
57
+ healthy: boolean;
58
+ failures: number;
59
+ lastCheck: number;
60
+ lastError?: string;
61
+ circuitOpen: boolean; // circuit breaker open = do not try
62
+ cooldownUntil: number;
63
+ }
64
+
65
+ export interface RouteDecision {
66
+ provider: string;
67
+ model: string;
68
+ reason: string;
69
+ }
70
+
71
+ /** Extract a plain-text representation of a message's content. */
72
+ export function messageText(m: Message): string {
73
+ if (typeof m.content === "string") return m.content;
74
+ return m.content
75
+ .map((p) => (p.type === "text" ? p.text : "[image]"))
76
+ .join("");
77
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "moduleDetection": "force",
7
+ "verbatimModuleSyntax": false,
8
+ "strict": true,
9
+ "types": ["node"],
10
+ "outDir": "dist",
11
+ "rootDir": "src",
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true
14
+ },
15
+ "include": ["src/**/*.ts"]
16
+ }