@hasna/assistants 1.1.9 → 1.1.11

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 (64) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +42 -484
  3. package/dist/.assistants/ASSISTANTS.md +10 -0
  4. package/dist/.assistants/commands/reflect.md +13 -0
  5. package/dist/.assistants/feedback/0754dc31-7598-4c24-8845-a31c8c0a7f6a.json +11 -0
  6. package/dist/.assistants/feedback/11c3098e-b1fa-410e-9f9c-0f60daf379f5.json +11 -0
  7. package/dist/.assistants/feedback/1c552736-058b-4a60-a67b-f0e7ec228f6d.json +8 -0
  8. package/dist/.assistants/feedback/236ed1da-8a0c-443b-b906-8e88a3343b2e.json +11 -0
  9. package/dist/.assistants/feedback/324f7179-cb61-4591-803e-30877228610e.json +11 -0
  10. package/dist/.assistants/feedback/34bda7b5-7f23-442a-908f-46def2f06072.json +11 -0
  11. package/dist/.assistants/feedback/37c15370-6c7c-4bc7-834e-681bf5b387aa.json +11 -0
  12. package/dist/.assistants/feedback/48c55753-85ae-4335-832c-31dab7c3be0a.json +11 -0
  13. package/dist/.assistants/feedback/49077cdf-1097-40ee-9173-56bdd8e5740d.json +8 -0
  14. package/dist/.assistants/feedback/4b469ef6-9cca-419a-9cd9-4f3c1e3924c9.json +11 -0
  15. package/dist/.assistants/feedback/6937c140-58c0-480c-b579-bc31ee2924a6.json +8 -0
  16. package/dist/.assistants/feedback/6c7c4eb1-9f23-49a4-8fa0-ff350550b038.json +8 -0
  17. package/dist/.assistants/feedback/6ff5a208-3bc1-4a92-adb9-243d23c2e56f.json +8 -0
  18. package/dist/.assistants/feedback/8692df62-2344-4ac0-9c54-f471196e683e.json +11 -0
  19. package/dist/.assistants/feedback/8b686396-3043-457c-9535-f8543446e261.json +11 -0
  20. package/dist/.assistants/feedback/9b2055b8-aa08-4dc9-9016-b14d646dd5ec.json +11 -0
  21. package/dist/.assistants/feedback/9d65e1d9-5986-4c1a-b8ca-2cd39d9df000.json +11 -0
  22. package/dist/.assistants/feedback/a2ef5c40-5aab-42e2-8c5f-bb7abd2cbd0a.json +11 -0
  23. package/dist/.assistants/feedback/acbd944e-af94-4bb2-8f72-391167c34c49.json +11 -0
  24. package/dist/.assistants/feedback/b6e0b95d-ce59-4feb-901b-c3f9f50fffd0.json +11 -0
  25. package/dist/.assistants/feedback/bf6c14e2-5264-4ecf-9858-05218e858546.json +8 -0
  26. package/dist/.assistants/feedback/c611ee6f-e2c1-4ffa-9340-9f877ec06fc2.json +11 -0
  27. package/dist/.assistants/feedback/cf204917-529b-4cdb-a0a3-ff97033b59f4.json +8 -0
  28. package/dist/.assistants/feedback/deda8685-51b1-480a-a4af-6e631d6da484.json +11 -0
  29. package/dist/.assistants/feedback/e42a28cc-282f-4602-8eb9-a8f449e7f800.json +11 -0
  30. package/dist/.assistants/feedback/e9e28688-068f-4338-ab13-f0018b15ca09.json +11 -0
  31. package/dist/.assistants/projects/11a6d12e-a46f-4a6c-bbe8-bc58ebf2eddc.json +9 -0
  32. package/dist/.assistants/projects/c4be5728-e90d-4736-b61b-8b432caacaab.json +8 -0
  33. package/dist/.assistants/schedules/3c30adef-4a9e-46bd-a62c-c030e5d83bb1.json +18 -0
  34. package/dist/.assistants/schedules/locks/4b758436-e846-441d-b1a2-aae03df551d1.lock.json +6 -0
  35. package/dist/.assistants/schedules/locks/ec03a634-6135-4bea-b9be-fb426095bba5.lock.json +6 -0
  36. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_10.json +92 -0
  37. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_11.json +82 -0
  38. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_12.json +92 -0
  39. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_13.json +82 -0
  40. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_2.json +102 -0
  41. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_3.json +82 -0
  42. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_4.json +82 -0
  43. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_5.json +82 -0
  44. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_6.json +82 -0
  45. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_7.json +82 -0
  46. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_8.json +82 -0
  47. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/ai_tweets_batch_9.json +92 -0
  48. package/dist/.assistants/scripts/f6be5a82-b00e-4b74-ba93-c610a7874776/twitter_archive_entries.json +102 -0
  49. package/dist/.assistants/skills/calendar/SKILL.md +40 -0
  50. package/dist/.assistants/skills/email/SKILL.md +41 -0
  51. package/dist/.assistants/skills/notes/SKILL.md +44 -0
  52. package/dist/.assistants/skills/search/SKILL.md +23 -0
  53. package/dist/.assistants/skills/skill-brainstorm/SKILL.md +30 -0
  54. package/dist/.assistants/skills/skill-draft/SKILL.md +30 -0
  55. package/dist/.assistants/skills/skill-research/SKILL.md +27 -0
  56. package/dist/.assistants/skills/skill-summarize/SKILL.md +25 -0
  57. package/dist/.assistants/tasks/tasks.json +5 -0
  58. package/dist/config/hooks.json +15 -0
  59. package/dist/config/settings.json +43 -0
  60. package/dist/{cli.js → index.js} +27354 -6117
  61. package/dist/index.js.map +1343 -0
  62. package/package.json +51 -56
  63. package/dist/lib.d.ts +0 -234
  64. package/dist/lib.js +0 -163798
package/package.json CHANGED
@@ -1,79 +1,74 @@
1
1
  {
2
2
  "name": "@hasna/assistants",
3
- "version": "1.1.9",
4
- "description": "AI assistant that runs in your terminal - powered by Claude",
5
- "license": "MIT",
3
+ "version": "1.1.11",
4
+ "description": "Multi-assistant orchestration platform - terminal first, voice enabled, connector powered",
6
5
  "type": "module",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/lib.d.ts",
10
- "import": "./dist/lib.js"
11
- }
12
- },
13
- "main": "./dist/lib.js",
14
- "types": "./dist/lib.d.ts",
15
6
  "bin": {
16
- "assistants": "./dist/cli.js",
17
- "ast": "./dist/cli.js"
7
+ "assistants": "dist/index.js"
18
8
  },
19
9
  "files": [
20
10
  "dist",
21
11
  "README.md",
22
12
  "LICENSE"
23
13
  ],
24
- "repository": {
25
- "type": "git",
26
- "url": "https://github.com/hasna/assistants.git"
27
- },
28
- "homepage": "https://github.com/hasna/assistants#readme",
29
- "bugs": {
30
- "url": "https://github.com/hasna/assistants/issues"
31
- },
32
- "keywords": [
33
- "ai",
34
- "assistant",
35
- "terminal",
36
- "cli",
37
- "claude",
38
- "anthropic",
39
- "chatbot",
40
- "ink",
41
- "bun"
42
- ],
43
- "publishConfig": {
44
- "access": "public"
45
- },
46
14
  "scripts": {
47
- "dev": "bun run src/cli.tsx",
48
- "build": "bun run scripts/build.ts",
49
- "build:types": "tsc -p tsconfig.build.json",
50
- "typecheck": "tsc --noEmit",
51
- "test": "bun test",
52
- "clean": "rm -rf dist",
53
- "prepublishOnly": "pnpm run clean && pnpm run build"
15
+ "dev": "bun run packages/terminal/src/index.tsx",
16
+ "build": "bun run build.ts",
17
+ "build:packages": "turbo run build",
18
+ "typecheck": "turbo run typecheck",
19
+ "test": "turbo run test",
20
+ "test:coverage": "turbo run test -- --coverage",
21
+ "lint": "turbo run lint",
22
+ "clean": "turbo run clean && rm -rf node_modules dist",
23
+ "prepublishOnly": "bun run build"
54
24
  },
55
- "dependencies": {
25
+ "dependencies": {},
26
+ "devDependencies": {
27
+ "@anthropic-ai/sdk": "^0.72.1",
28
+ "@hasna/runtime-bun": "^0.1.0",
29
+ "@types/bun": "latest",
30
+ "@types/react": "^19.0.0",
31
+ "bun-types": "^1.3.8",
56
32
  "chalk": "^5.3.0",
57
33
  "ink": "^6.0.0",
58
- "ink-scroll-view": "^0.3.5",
59
34
  "ink-spinner": "^5.0.0",
60
35
  "ink-text-input": "^6.0.0",
61
36
  "marked": "^15.0.0",
62
37
  "marked-terminal": "^7.2.0",
63
38
  "react": "^19.0.0",
64
- "react-devtools-core": "^6.1.2"
39
+ "react-test-renderer": "^19.0.0",
40
+ "turbo": "^2.3.0",
41
+ "typescript": "^5.7.0"
65
42
  },
66
- "devDependencies": {
67
- "@hasna/assistants-core": "1.0.0",
68
- "@hasna/assistants-shared": "1.0.0",
69
- "@hasna/runtime-bun": "0.1.0",
70
- "@types/bun": "latest",
71
- "@types/react": "^19.0.0",
72
- "bun-types": "^1.3.8",
73
- "typescript": "^5"
43
+ "publishConfig": {
44
+ "access": "restricted",
45
+ "registry": "https://registry.npmjs.org/"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/hasna/assistants.git"
50
+ },
51
+ "keywords": [
52
+ "ai",
53
+ "assistant",
54
+ "cli",
55
+ "terminal",
56
+ "claude",
57
+ "anthropic",
58
+ "bun",
59
+ "ink"
60
+ ],
61
+ "author": "Hasna",
62
+ "license": "MIT",
63
+ "bugs": {
64
+ "url": "https://github.com/hasna/assistants/issues"
74
65
  },
66
+ "homepage": "https://github.com/hasna/assistants#readme",
67
+ "packageManager": "pnpm@9.15.0",
75
68
  "engines": {
76
- "node": ">=18",
77
- "bun": ">=1.0"
78
- }
69
+ "bun": ">=1.0.0"
70
+ },
71
+ "workspaces": [
72
+ "packages/*"
73
+ ]
79
74
  }
package/dist/lib.d.ts DELETED
@@ -1,234 +0,0 @@
1
- /**
2
- * Type declarations for @hasna/assistants
3
- *
4
- * Note: Full declarations are generated from source in development.
5
- * Published packages should include proper .d.ts files.
6
- */
7
-
8
- // ============================================================================
9
- // Core Client
10
- // ============================================================================
11
-
12
- export declare class EmbeddedClient {
13
- constructor(cwd: string, options?: EmbeddedClientOptions);
14
- initialize(): Promise<void>;
15
- send(message: string): Promise<void>;
16
- stop(): void;
17
- disconnect(): void;
18
- onChunk(callback: (chunk: StreamChunk) => void): void;
19
- onError(callback: (error: Error) => void): void;
20
- getSessionId(): string;
21
- getTokenUsage(): TokenUsage | undefined;
22
- getModel(): string | null;
23
- }
24
-
25
- export interface EmbeddedClientOptions {
26
- sessionId?: string;
27
- initialMessages?: Message[];
28
- systemPrompt?: string;
29
- allowedTools?: string[];
30
- startedAt?: string;
31
- }
32
-
33
- // ============================================================================
34
- // Headless Mode
35
- // ============================================================================
36
-
37
- export interface HeadlessOptions {
38
- prompt: string;
39
- cwd: string;
40
- outputFormat: 'text' | 'json' | 'stream-json';
41
- allowedTools?: string[];
42
- systemPrompt?: string;
43
- jsonSchema?: string;
44
- continue?: boolean;
45
- resume?: string | null;
46
- cwdProvided?: boolean;
47
- }
48
-
49
- export interface HeadlessResult {
50
- success: boolean;
51
- result: string;
52
- sessionId: string;
53
- usage?: TokenUsage;
54
- toolCalls: Array<{ name: string; input: Record<string, unknown> }>;
55
- error?: string;
56
- structuredOutput?: unknown;
57
- }
58
-
59
- export declare function runHeadless(options: HeadlessOptions): Promise<HeadlessResult>;
60
-
61
- // ============================================================================
62
- // CLI Utilities
63
- // ============================================================================
64
-
65
- export interface ParsedOptions {
66
- command: string | undefined;
67
- cwd: string;
68
- prompt?: string;
69
- outputFormat: 'text' | 'json' | 'stream-json';
70
- allowedTools?: string[];
71
- systemPrompt?: string;
72
- jsonSchema?: string;
73
- continue: boolean;
74
- resume?: string | null;
75
- cwdProvided: boolean;
76
- }
77
-
78
- export declare function parseArgs(args?: string[]): ParsedOptions;
79
-
80
- // ============================================================================
81
- // Shared Types
82
- // ============================================================================
83
-
84
- export interface StreamChunk {
85
- type: 'text' | 'tool_use' | 'tool_result' | 'usage' | 'error' | 'done' | 'exit' | 'show_panel';
86
- content?: string;
87
- toolCall?: ToolCall;
88
- toolResult?: ToolResult;
89
- error?: string;
90
- usage?: TokenUsage;
91
- panel?: string;
92
- panelValue?: string;
93
- }
94
-
95
- export interface TokenUsage {
96
- inputTokens: number;
97
- outputTokens: number;
98
- totalTokens: number;
99
- maxContextTokens: number;
100
- cacheReadTokens?: number;
101
- cacheWriteTokens?: number;
102
- }
103
-
104
- export interface Message {
105
- id: string;
106
- role: 'user' | 'assistant' | 'system';
107
- content: string;
108
- timestamp: number;
109
- toolCalls?: ToolCall[];
110
- toolResults?: ToolResult[];
111
- }
112
-
113
- export interface Tool {
114
- name: string;
115
- description: string;
116
- parameters: ToolParameters;
117
- }
118
-
119
- export interface ToolParameters {
120
- type: 'object';
121
- properties: Record<string, ToolProperty>;
122
- required?: string[];
123
- }
124
-
125
- export interface ToolProperty {
126
- type: string | string[];
127
- description: string;
128
- enum?: string[];
129
- items?: ToolProperty;
130
- default?: unknown;
131
- properties?: Record<string, ToolProperty>;
132
- required?: string[];
133
- }
134
-
135
- export interface ToolCall {
136
- id: string;
137
- name: string;
138
- input: Record<string, unknown>;
139
- }
140
-
141
- export interface ToolResult {
142
- toolCallId: string;
143
- content: string;
144
- rawContent?: string;
145
- truncated?: boolean;
146
- isError?: boolean;
147
- toolName?: string;
148
- }
149
-
150
- export interface AssistantsConfig {
151
- llm: LLMConfig;
152
- voice?: VoiceConfig;
153
- connectors?: string[];
154
- skills?: string[];
155
- hooks?: Record<string, unknown>;
156
- scheduler?: Record<string, unknown>;
157
- context?: Record<string, unknown>;
158
- energy?: Record<string, unknown>;
159
- memory?: Record<string, unknown>;
160
- }
161
-
162
- export interface LLMConfig {
163
- provider: 'anthropic' | 'openai';
164
- model: string;
165
- apiKey?: string;
166
- maxTokens?: number;
167
- }
168
-
169
- export interface VoiceConfig {
170
- enabled: boolean;
171
- stt: { provider: string; model?: string; language?: string };
172
- tts: { provider: string; voiceId?: string };
173
- wake?: { enabled: boolean; word: string };
174
- autoListen?: boolean;
175
- }
176
-
177
- // ============================================================================
178
- // Session Storage
179
- // ============================================================================
180
-
181
- export interface SessionData {
182
- id: string;
183
- cwd: string;
184
- messages: Message[];
185
- startedAt: string;
186
- updatedAt: string;
187
- }
188
-
189
- export interface SavedSessionInfo {
190
- id: string;
191
- cwd: string;
192
- startedAt: string;
193
- updatedAt: string;
194
- messageCount: number;
195
- assistantId?: string | null;
196
- }
197
-
198
- export declare const SessionStorage: {
199
- saveSession(id: string, data: SessionData): void;
200
- loadSession(id: string, assistantId?: string | null): SessionData | null;
201
- listSessions(assistantId?: string | null): SavedSessionInfo[];
202
- listAllSessions(): SavedSessionInfo[];
203
- deleteSession(id: string): void;
204
- getLatestSession(): SavedSessionInfo | null;
205
- };
206
-
207
- export declare const Logger: {
208
- info(message: string, ...args: unknown[]): void;
209
- warn(message: string, ...args: unknown[]): void;
210
- error(message: string, ...args: unknown[]): void;
211
- debug(message: string, ...args: unknown[]): void;
212
- };
213
-
214
- export declare function initAssistantsDir(cwd: string): Promise<void>;
215
-
216
- // ============================================================================
217
- // Feature Detection
218
- // ============================================================================
219
-
220
- export interface FeatureAvailability {
221
- aws: boolean;
222
- elevenlabs: boolean;
223
- openai: boolean;
224
- exa: boolean;
225
- systemVoice: boolean;
226
- }
227
-
228
- export declare function isAWSConfigured(): boolean;
229
- export declare function isElevenLabsConfigured(): boolean;
230
- export declare function isOpenAIConfigured(): boolean;
231
- export declare function isExaConfigured(): boolean;
232
- export declare function isSystemVoiceAvailable(): boolean;
233
- export declare function getFeatureAvailability(): FeatureAvailability;
234
- export declare function getFeatureStatusMessage(): string;