@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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024-2026 Hasna
3
+ Copyright (c) 2025 Hasna
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,528 +1,86 @@
1
- # @hasna/assistants
1
+ # assistants
2
2
 
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ A general-purpose AI assistant designed to help with any task - from research and writing to coding, automation, and beyond. Built terminal-first with powerful integrations.
4
4
 
5
- A general-purpose AI assistant that runs in your terminal. Built with [Ink](https://github.com/vadimdemedes/ink) and powered by [Claude](https://www.anthropic.com/claude).
6
-
7
- **Not just for coding** - while it excels at development workflows, this assistant helps with research, writing, task management, automation, and any task you need assistance with.
8
-
9
- ## Features
10
-
11
- - General-purpose assistant for any task
12
- - Interactive chat with Claude AI
13
- - Execute bash commands with approval
14
- - Read, write, and edit files
15
- - Fetch and search web content
16
- - Custom skills and hooks for domain-specific workflows
17
- - Project and plan management
18
- - Memory and context persistence across sessions
19
- - Session history and resumption
20
- - Identity management for different contexts
21
- - Voice input/output (optional)
22
- - Connectors for external services (Notion, Gmail, Linear, etc.)
5
+ **This is not just a coding tool.** While it excels at development workflows, it's designed as a versatile assistant that can help with:
6
+ - Research and analysis
7
+ - Writing and content creation
8
+ - Task management and productivity
9
+ - Business operations
10
+ - Personal assistance
11
+ - Software development
12
+ - Automation and integrations
23
13
 
24
14
  ## Installation
25
15
 
26
- ### Prerequisites
27
-
28
- - [Bun](https://bun.sh) runtime (v1.0 or later)
29
- - [Anthropic API key](https://console.anthropic.com/)
30
-
31
- ### Install globally
32
-
33
16
  ```bash
34
17
  bun add -g @hasna/assistants
35
18
  ```
36
19
 
37
- ### Or run directly
38
-
39
- ```bash
40
- bunx @hasna/assistants
41
- ```
20
+ **Requirements:**
21
+ - [Bun](https://bun.sh) 1.0+
42
22
 
43
23
  ## Quick Start
44
24
 
45
- 1. Set your Anthropic API key:
46
-
47
25
  ```bash
48
- export ANTHROPIC_API_KEY="sk-ant-..."
49
- ```
26
+ # Set your API key (or add to ~/.secrets)
27
+ export ANTHROPIC_API_KEY="your-key"
50
28
 
51
- 2. Start the assistant:
52
-
53
- ```bash
29
+ # Run
54
30
  assistants
55
- # or use the short alias
56
- ast
57
31
  ```
58
32
 
59
- 3. Start chatting!
60
-
61
- ## CLI Reference
62
-
63
- ### Basic Usage
64
-
33
+ Or add to `~/.secrets`:
65
34
  ```bash
66
- # Start interactive mode
67
- assistants
68
-
69
- # Run in headless mode (non-interactive)
70
- assistants -p "What does this codebase do?"
35
+ export ANTHROPIC_API_KEY="your-key"
71
36
  ```
72
37
 
73
- ### Options
74
-
75
- | Option | Description |
76
- |--------|-------------|
77
- | `-h, --help` | Show help message |
78
- | `-v, --version` | Show version number |
79
- | `-p, --print <prompt>` | Run non-interactively with the given prompt |
80
- | `--output-format <format>` | Output format: `text` (default), `json`, `stream-json` |
81
- | `--allowed-tools <tools>` | Comma-separated tools to auto-approve |
82
- | `--system-prompt <prompt>` | Custom system prompt |
83
- | `--json-schema <schema>` | JSON Schema for structured output |
84
- | `-c, --continue` | Continue the most recent conversation |
85
- | `-r, --resume <session_id>` | Resume a specific session by ID |
86
- | `--cwd <path>` | Set working directory |
87
-
88
- ### Headless Mode Examples
89
-
90
- ```bash
91
- # Ask a question
92
- assistants -p "What does the auth module do?"
93
-
94
- # Run with JSON output
95
- assistants -p "Summarize this project" --output-format json
96
-
97
- # Stream JSON events
98
- assistants -p "Explain this code" --output-format stream-json
99
-
100
- # Auto-approve specific tools
101
- assistants -p "Fix the bug in auth.py" --allowed-tools "Read,Edit,Bash"
102
-
103
- # Get structured output with JSON Schema
104
- assistants -p "List all functions" --output-format json \
105
- --json-schema '{"type":"array","items":{"type":"string"}}'
106
-
107
- # Continue a previous conversation
108
- assistants -p "What else can you tell me?" --continue
109
-
110
- # Resume a specific session
111
- assistants -p "Continue from where we left off" --resume abc123
112
- ```
113
-
114
- ## Interactive Mode
115
-
116
- ### Keyboard Shortcuts
117
-
118
- | Key | Action |
119
- |-----|--------|
120
- | `Enter` | Send message |
121
- | `Ctrl+C` | Stop current operation or exit |
122
- | `Ctrl+]` | Switch sessions |
123
- | `Up/Down` | Navigate command history |
124
- | `Tab` | Autocomplete commands |
125
-
126
- ### Shell Passthrough
127
-
128
- Prefix a line with `!` to run a local shell command and send the output to the assistant:
129
-
130
- ```bash
131
- !ls -la
132
- ```
133
-
134
- ### Slash Commands
135
-
136
- | Command | Description |
137
- |---------|-------------|
138
- | `/help` | Show available commands |
139
- | `/exit` | Exit the assistant |
140
- | `/new` | Start a new session |
141
- | `/clear` | Clear the screen |
142
- | `/session` | Show current session info |
143
- | `/tokens` | Show token usage |
144
- | `/context` | Show/manage context window |
145
- | `/cost` | Show estimated cost |
146
- | `/status` | Show system status |
147
- | `/model` | Show/change model settings |
148
- | `/config` | Show/edit configuration |
149
- | `/init` | Initialize project settings |
150
-
151
- ### Project & Plan Commands
152
-
153
- | Command | Description |
154
- |---------|-------------|
155
- | `/projects` | List and manage projects |
156
- | `/plans` | View and manage plans |
157
- | `/summarize` | Summarize the conversation |
158
- | `/compact` | Compact context to save tokens |
159
-
160
- ### Scheduling Commands
161
-
162
- | Command | Description |
163
- |---------|-------------|
164
- | `/schedule` | Create a scheduled task |
165
- | `/schedules` | List scheduled tasks |
166
- | `/unschedule` | Remove a scheduled task |
167
- | `/pause` | Pause a schedule |
168
- | `/resume` | Resume a paused schedule |
169
-
170
- ### Skills & Connectors
171
-
172
- | Command | Description |
173
- |---------|-------------|
174
- | `/skills` | List available skills |
175
- | `/skill <name>` | Execute a skill |
176
- | `/connectors` | List available connectors |
177
-
178
- ### Hooks Commands
179
-
180
- | Command | Description |
181
- |---------|-------------|
182
- | `/hooks` | Open interactive hooks panel |
183
- | `/hooks list` | List all hooks (native + user) |
184
- | `/hooks enable <id>` | Enable a hook |
185
- | `/hooks disable <id>` | Disable a hook |
186
- | `/hooks test <id>` | Test a hook with sample input |
187
- | `/hooks help` | Show hooks help |
188
-
189
- ### Advanced Commands
38
+ ## Features
190
39
 
191
- | Command | Description |
192
- |---------|-------------|
193
- | `/voice` | Toggle voice mode |
194
- | `/say <text>` | Speak text aloud |
195
- | `/listen` | Start persistent dictation (pause ~3s to send, Ctrl+L to stop) |
196
- | `/identity` | Manage assistant identity |
197
- | `/whoami` | Show current identity |
198
- | `/assistant` | Configure assistant settings |
199
- | `/inbox` | Check email inbox |
200
- | `/wallet` | Manage crypto wallet |
201
- | `/secrets` | Manage secrets |
202
- | `/jobs` | View background jobs |
203
- | `/messages` | Assistant-to-assistant messages |
204
- | `/verification` | Manage verification sessions |
205
- | `/memory` | View memory usage |
206
- | `/rest` | Enter rest mode |
207
- | `/feedback` | Submit feedback |
208
- | `/security-log` | View security events |
40
+ - **General-purpose**: Handles any task - research, writing, coding, automation, and more
41
+ - **Terminal-first**: Fast, keyboard-driven interface with an Ink-based TUI
42
+ - **Connector-powered**: Integrates with services via `connect-*` CLIs (Notion, Google Drive, Gmail, Linear, Slack, etc.)
43
+ - **Skills**: Reusable instructions with `SKILL.md` files for domain-specific workflows
44
+ - **Hooks**: Event-driven automation for custom behaviors
45
+ - **Memory**: Persistent context across sessions for continuity
46
+ - **Multi-session**: Work on multiple tasks simultaneously
47
+ - **Identity management**: Switch between personas and contexts
209
48
 
210
49
  ## Configuration
211
50
 
212
- ### Directory Structure
213
-
214
- ```
215
- ~/.assistants/
216
- ├── config.json # Global configuration
217
- ├── sessions/ # Session history
218
- ├── skills/ # Custom skills
219
- ├── hooks.json # Global hooks
220
- └── schedules/ # Scheduled tasks
221
-
222
- .assistants/ # Project-level (in any directory)
223
- ├── config.json # Project configuration
224
- ├── skills/ # Project-specific skills
225
- └── hooks.json # Project-specific hooks
226
- ```
227
-
228
- ### Configuration File
229
-
230
- Create `~/.assistants/config.json`:
51
+ User config: `~/.assistants/config.json`
52
+ Project config: `.assistants/config.json`
231
53
 
232
54
  ```json
233
55
  {
234
- "model": "claude-sonnet-4-20250514",
235
- "temperature": 0.7,
236
- "maxTokens": 8192,
237
- "connectors": ["notion", "googledrive"],
238
- "voice": {
239
- "tts": "elevenlabs",
240
- "stt": "whisper"
241
- }
56
+ "llm": {
57
+ "provider": "anthropic",
58
+ "model": "claude-opus-4-5"
59
+ },
60
+ "connectors": ["notion", "googledrive", "gmail", "linear", "slack"]
242
61
  }
243
62
  ```
244
63
 
245
- ### Project Configuration
246
-
247
- Create `.assistants/config.json` in your project:
248
-
249
- ```json
250
- {
251
- "name": "My Project",
252
- "description": "Project description",
253
- "systemPrompt": "You are helping with a Node.js backend project.",
254
- "context": [
255
- "src/README.md",
256
- "docs/architecture.md"
257
- ]
258
- }
259
- ```
260
-
261
- ## Environment Variables
262
-
263
- | Variable | Required | Description |
264
- |----------|----------|-------------|
265
- | `ANTHROPIC_API_KEY` | Yes | Claude API access |
266
- | `ELEVENLABS_API_KEY` | No | ElevenLabs TTS |
267
- | `OPENAI_API_KEY` | No | Whisper STT |
268
- | `EXA_API_KEY` | No | Enhanced web search |
269
- | `AWS_ACCESS_KEY_ID` | No | AWS features |
270
- | `AWS_SECRET_ACCESS_KEY` | No | AWS features |
271
- | `AWS_REGION` | No | AWS region |
272
- | `ASSISTANTS_NO_SYNC` | No | Disable synchronized output (set to `1`) |
273
-
274
64
  ## Skills
275
65
 
276
- Skills are reusable prompts defined in `SKILL.md` files:
66
+ Skills are `SKILL.md` files with YAML frontmatter:
277
67
 
278
- ```markdown
68
+ ```yaml
279
69
  ---
280
- name: code-review
281
- description: Review code for issues and improvements
282
- argument-hint: <file-path>
283
- allowed-tools: Read, Grep
70
+ name: daily-standup
71
+ description: Generate daily standup
72
+ allowed-tools: bash, googlecalendar, linear
284
73
  ---
285
74
 
286
- ## Instructions
287
-
288
- Review the code at $ARGUMENTS and provide feedback on:
289
- 1. Potential bugs
290
- 2. Performance issues
291
- 3. Code style
292
- 4. Security concerns
293
- ```
294
-
295
- Place in `~/.assistants/skills/code-review/SKILL.md` or `.assistants/skills/code-review/SKILL.md`.
296
-
297
- Use with `/skill code-review src/auth.ts` or `$code-review src/auth.ts`.
298
-
299
- ## Hooks
300
-
301
- Hooks intercept assistant behavior at key lifecycle points. Use them to validate inputs, block dangerous actions, log activity, or inject context.
302
-
303
- ### Managing Hooks
304
-
305
- Use the interactive panel:
306
- ```
307
- /hooks
308
- ```
309
-
310
- Or manage via commands:
311
- ```
312
- /hooks list # List all hooks
313
- /hooks enable abc123 # Enable a hook by ID
314
- /hooks disable abc123 # Disable a hook
315
- /hooks test abc123 # Test a hook with sample input
316
- ```
317
-
318
- ### Hook Events
319
-
320
- | Event | When Triggered |
321
- |-------|----------------|
322
- | **PreToolUse** | Before any tool executes |
323
- | **PostToolUse** | After tool succeeds |
324
- | **PostToolUseFailure** | After tool fails |
325
- | **PermissionRequest** | When approval needed |
326
- | **UserPromptSubmit** | User sends message |
327
- | **SessionStart** | Session begins |
328
- | **SessionEnd** | Session ends |
329
- | **SubassistantStart** | Subassistant spawning |
330
- | **SubassistantStop** | Subassistant completes |
331
- | **PreCompact** | Before context compaction |
332
- | **Notification** | Notification sent |
333
- | **Stop** | Assistant stopping |
334
-
335
- ### Configuration
336
-
337
- Create `.assistants/hooks.json` in your project:
338
-
339
- ```json
340
- {
341
- "PreToolUse": [
342
- {
343
- "matcher": "Bash|Edit|Write",
344
- "hooks": [
345
- {
346
- "id": "validate-commands",
347
- "name": "Validate dangerous commands",
348
- "description": "Blocks rm -rf, sudo, etc.",
349
- "type": "command",
350
- "command": "./scripts/validate.sh",
351
- "timeout": 5000,
352
- "enabled": true
353
- }
354
- ]
355
- }
356
- ],
357
- "PostToolUse": [
358
- {
359
- "matcher": "Edit",
360
- "hooks": [
361
- {
362
- "type": "command",
363
- "command": "prettier --write \"$INPUT_file_path\"",
364
- "async": true
365
- }
366
- ]
367
- }
368
- ]
369
- }
75
+ Generate a daily standup report for $ARGUMENTS
370
76
  ```
371
77
 
372
- ### Creating Hooks via Wizard
373
-
374
- Press `a` in the hooks panel to launch the interactive wizard:
78
+ Invoke with `/skill-name`.
375
79
 
376
- 1. Select event type (PreToolUse, PostToolUse, etc.)
377
- 2. Enter matcher pattern (regex or `*` for all)
378
- 3. Choose hook type (command, prompt, assistant)
379
- 4. Enter command or prompt
380
- 5. Set timeout and async options
381
- 6. Choose save location (user, project, local)
80
+ ## Documentation
382
81
 
383
- ### Example: Block Dangerous Commands
384
-
385
- ```bash
386
- #!/bin/bash
387
- # .assistants/scripts/validate.sh
388
- INPUT=$(cat)
389
- COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty')
390
-
391
- if echo "$COMMAND" | grep -qE 'rm\s+-rf|sudo|shutdown'; then
392
- echo "Blocked: dangerous command" >&2
393
- exit 2 # Exit 2 = block
394
- fi
395
-
396
- exit 0 # Exit 0 = allow
397
- ```
398
-
399
- ### Native Hooks
400
-
401
- Built-in hooks that can be enabled/disabled:
402
-
403
- | Hook | Event | Description |
404
- |------|-------|-------------|
405
- | **scope-verification** | Stop | Verifies goals were met |
406
-
407
- Manage native hooks via `/hooks` panel or commands.
408
-
409
- ## Programmatic Usage
410
-
411
- ### EmbeddedClient (Full Control)
412
-
413
- ```typescript
414
- import { EmbeddedClient } from '@hasna/assistants';
415
-
416
- // Create client with working directory
417
- const client = new EmbeddedClient(process.cwd(), {
418
- systemPrompt: 'You are a helpful coding assistant.',
419
- allowedTools: ['Read', 'Write', 'Edit', 'Bash'],
420
- });
421
-
422
- // Handle streaming chunks
423
- client.onChunk((chunk) => {
424
- if (chunk.type === 'text' && chunk.content) {
425
- process.stdout.write(chunk.content);
426
- }
427
- });
428
-
429
- // Initialize and send a message
430
- await client.initialize();
431
- await client.send('What files are in this directory?');
432
-
433
- // Get session info
434
- console.log('Session ID:', client.getSessionId());
435
- console.log('Token usage:', client.getTokenUsage());
436
-
437
- // Cleanup
438
- client.disconnect();
439
- ```
440
-
441
- ### Headless Mode (Simple Queries)
442
-
443
- ```typescript
444
- import { runHeadless } from '@hasna/assistants';
445
-
446
- // Run a simple query with JSON output
447
- await runHeadless({
448
- prompt: 'Summarize this project in 3 bullet points',
449
- cwd: process.cwd(),
450
- outputFormat: 'json',
451
- });
452
-
453
- // Stream JSON events
454
- await runHeadless({
455
- prompt: 'Explain the authentication system',
456
- cwd: process.cwd(),
457
- outputFormat: 'stream-json',
458
- });
459
-
460
- // Auto-approve tools
461
- await runHeadless({
462
- prompt: 'Fix the bug in auth.ts',
463
- cwd: process.cwd(),
464
- outputFormat: 'text',
465
- allowedTools: ['Read', 'Edit'],
466
- });
467
- ```
468
-
469
- ### Feature Detection
470
-
471
- ```typescript
472
- import { getFeatureAvailability, getFeatureStatusMessage } from '@hasna/assistants';
473
-
474
- // Check what features are available
475
- const features = getFeatureAvailability();
476
- console.log('Core chat:', features.coreChat); // true if ANTHROPIC_API_KEY set
477
- console.log('AWS features:', features.awsFeatures); // true if AWS configured
478
-
479
- // Get human-readable status
480
- console.log(getFeatureStatusMessage());
481
- ```
482
-
483
- ## Connectors
484
-
485
- Connectors integrate external services. Install separately:
486
-
487
- ```bash
488
- # Example: Notion connector
489
- bun add -g @hasna/connect-notion
490
-
491
- # List available connectors
492
- assistants
493
- /connectors
494
- ```
495
-
496
- ## Troubleshooting
497
-
498
- ### "ANTHROPIC_API_KEY not set"
499
-
500
- Set your API key:
501
- ```bash
502
- export ANTHROPIC_API_KEY="sk-ant-..."
503
- ```
504
-
505
- ### Terminal rendering issues
506
-
507
- Try disabling synchronized output:
508
- ```bash
509
- ASSISTANTS_NO_SYNC=1 assistants
510
- ```
511
-
512
- ### Slow startup
513
-
514
- The first run may take longer as dependencies are cached. Subsequent runs will be faster.
515
-
516
- ### Session not found
517
-
518
- Sessions are stored in `~/.assistants/sessions/`. Use `/session` to see current session info.
82
+ - [Admin Dashboard](./docs/ADMIN.md) - User management, audit logging, and system monitoring
519
83
 
520
84
  ## License
521
85
 
522
86
  MIT
523
-
524
- ## See Also
525
-
526
- - [FEATURES.md](./FEATURES.md) - Detailed feature documentation
527
- - [Anthropic API Documentation](https://docs.anthropic.com/)
528
- - [Bun Documentation](https://bun.sh/docs)
@@ -0,0 +1,10 @@
1
+ You are Hasna Assistant, a non-coding assistant.
2
+
3
+ Rules:
4
+ - This is not a coding assistant. Do not modify project source files.
5
+ - Only write helper scripts in `.assistants/scripts/<session-id>/`.
6
+ - Prefer read-only tools (read, glob, grep) for inspection.
7
+ - Use connector tools for external systems; do not run `connect-*` via shell.
8
+ - Avoid destructive commands, installs, or environment changes.
9
+
10
+ If code changes are needed, explain the fix or generate a helper script in the scripts folder and instruct the user how to apply it manually.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: reflect
3
+ description: Reflect on the conversation and suggest next steps
4
+ tags: [reflection, next-steps]
5
+ ---
6
+
7
+ # Reflection
8
+
9
+ Please summarize the last interaction and suggest 2-3 next steps.
10
+
11
+ - Keep it concise
12
+ - Focus on clarity
13
+ - Ask a follow-up question if needed
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "0754dc31-7598-4c24-8845-a31c8c0a7f6a",
3
+ "createdAt": "2026-02-07T20:21:18.332Z",
4
+ "type": "feedback",
5
+ "title": "good This is great",
6
+ "description": "good This is great",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "11c3098e-b1fa-410e-9f9c-0f60daf379f5",
3
+ "createdAt": "2026-02-07T20:29:58.741Z",
4
+ "type": "feedback",
5
+ "title": "good This is great",
6
+ "description": "good This is great",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "id": "1c552736-058b-4a60-a67b-f0e7ec228f6d",
3
+ "createdAt": "2026-02-03T18:28:49.763Z",
4
+ "type": "feedback",
5
+ "title": "Test feedback",
6
+ "description": "Something went wrong",
7
+ "source": "tool"
8
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "236ed1da-8a0c-443b-b906-8e88a3343b2e",
3
+ "createdAt": "2026-02-07T14:45:58.995Z",
4
+ "type": "feedback",
5
+ "title": "good This is great",
6
+ "description": "good This is great",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "324f7179-cb61-4591-803e-30877228610e",
3
+ "createdAt": "2026-02-04T08:48:37.530Z",
4
+ "type": "feedback",
5
+ "title": "Feedback",
6
+ "description": "Submitted via /feedback",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "34bda7b5-7f23-442a-908f-46def2f06072",
3
+ "createdAt": "2026-02-07T14:49:19.109Z",
4
+ "type": "feedback",
5
+ "title": "good This is great",
6
+ "description": "good This is great",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "37c15370-6c7c-4bc7-834e-681bf5b387aa",
3
+ "createdAt": "2026-02-07T22:36:41.360Z",
4
+ "type": "feedback",
5
+ "title": "good This is great",
6
+ "description": "good This is great",
7
+ "source": "command",
8
+ "metadata": {
9
+ "cwd": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/opensource-assistants"
10
+ }
11
+ }