@2amtech/hai 0.0.1 → 0.0.3
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/README.md +124 -147
- package/dist/commands/init.js +4 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/helpers/init.d.ts +4 -1
- package/dist/helpers/init.js +16 -3
- package/dist/helpers/init.js.map +1 -1
- package/dist/helpers/main-config.d.ts +5 -0
- package/dist/helpers/main-config.js +29 -0
- package/dist/helpers/main-config.js.map +1 -0
- package/dist/schemas/main-config.d.ts +5 -0
- package/dist/schemas/main-config.js +5 -0
- package/dist/schemas/main-config.js.map +1 -0
- package/dist/wizard/summary-step.d.ts +3 -1
- package/dist/wizard/summary-step.js +3 -2
- package/dist/wizard/summary-step.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,197 +1,174 @@
|
|
|
1
|
-
# hai
|
|
1
|
+
# @2amtech/hai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Helper AI (HAI)** is an npm CLI that sets up a standardized AI-assisted development workflow for your project. It syncs tickets and specs from platforms like Jira and Confluence into a local (git ignored) `.ai/` directory and exposes an MCP server to your AI, and installs purpose-built prompts and subagents into your AI coding environment — so your AI assistant can plan, research, and implement work with full project context and easily pull tickets and specification in AI readable MD files.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- **Plugin architecture** — add new integrations without touching core code
|
|
11
|
-
- **Interactive setup** — guided wizard for first-time configuration
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @2amtech/hai
|
|
9
|
+
```
|
|
12
10
|
|
|
13
11
|
## Quick start
|
|
14
12
|
|
|
15
13
|
```bash
|
|
16
|
-
#
|
|
17
|
-
|
|
14
|
+
hai init # Interactive wizard — pick your AI provider, ticket source, and spec source
|
|
15
|
+
hai pull # Sync tickets and specs to .ai/
|
|
16
|
+
```
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
That's it. Your AI assistant now has access to your project's tickets, specs, prompts, and agents.
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
MCP server will automatically be added for your provider. If you need add mcp server manually you can add it as:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
hai mcp .
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
## Commands
|
|
25
27
|
|
|
26
|
-
| Command | Description
|
|
27
|
-
| --------------- |
|
|
28
|
-
| `hai init` | Interactive setup wizard — select
|
|
29
|
-
| `hai
|
|
30
|
-
| `hai
|
|
31
|
-
| `hai
|
|
32
|
-
| `hai
|
|
33
|
-
| `hai mcp` | Start MCP server over stdio |
|
|
28
|
+
| Command | Description |
|
|
29
|
+
| --------------- | -------------------------------------------------------------- |
|
|
30
|
+
| `hai init` | Interactive setup wizard — select providers, enter credentials |
|
|
31
|
+
| `hai pull` | Sync tickets and specs to `.ai/` |
|
|
32
|
+
| `hai status` | Show sync status (ticket counts, last sync time) |
|
|
33
|
+
| `hai get <KEY>` | Fetch a specific ticket (e.g. `PROJ-123`) |
|
|
34
|
+
| `hai mcp [dir]` | Start the MCP server over stdio |
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
### Flags
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
│ ├── configure.tsx # hai configure
|
|
45
|
-
│ ├── pull.tsx # hai pull
|
|
46
|
-
│ ├── status.tsx # hai status
|
|
47
|
-
│ ├── get.tsx # hai get
|
|
48
|
-
│ └── mcp/ # MCP server (runs outside Ink, raw stdio)
|
|
49
|
-
├── plugins/ # Plugin system
|
|
50
|
-
│ ├── types.ts # HaiPlugin interface
|
|
51
|
-
│ ├── registry.ts # Plugin registration and lookup
|
|
52
|
-
│ ├── resolve.ts # Provider resolution from config
|
|
53
|
-
│ ├── atlassian/ # Jira + Confluence provider
|
|
54
|
-
│ ├── claude-code/ # Claude Code AI provider
|
|
55
|
-
│ ├── vscode-copilot/ # GitHub Copilot AI provider
|
|
56
|
-
│ ├── local/ # Local provider
|
|
57
|
-
│ ├── none/ # No-op provider
|
|
58
|
-
│ └── other-ai/ # Generic AI provider
|
|
59
|
-
├── wizard/ # Wizard step components
|
|
60
|
-
├── ui/ # Reusable UI components (select, text-input, spinner)
|
|
61
|
-
├── components/ # Business logic (sync-engine, spec-engine)
|
|
62
|
-
├── hooks/ # React hooks (use-config, use-async)
|
|
63
|
-
├── helpers/ # Utilities (config I/O, preflight checks, fs helpers)
|
|
64
|
-
└── schemas/ # Zod config schema
|
|
65
|
-
```
|
|
38
|
+
| Flag | Commands | Description |
|
|
39
|
+
| ------------------- | -------- | ------------------------------------- |
|
|
40
|
+
| `--tickets`, `-t` | `pull` | Sync tickets only |
|
|
41
|
+
| `--specs`, `-s` | `pull` | Sync specs only |
|
|
42
|
+
| `--dry-run` | `pull` | Preview changes without writing |
|
|
43
|
+
| `--update-local` | `pull` | Remove local files not found remotely |
|
|
44
|
+
| `--recursive`, `-r` | `get` | Also fetch linked issues |
|
|
66
45
|
|
|
67
|
-
##
|
|
46
|
+
## Supported AI providers
|
|
68
47
|
|
|
69
|
-
|
|
48
|
+
HAI integrates with the following AI coding environments:
|
|
70
49
|
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
| Provider | ID | MCP config location | Prompts installed to | Agents installed to |
|
|
51
|
+
| ------------------ | ---------------- | ------------------- | -------------------- | ------------------- |
|
|
52
|
+
| **Claude Code** | `claude-code` | `.mcp.json` | `.claude/commands/` | `.claude/agents/` |
|
|
53
|
+
| **GitHub Copilot** | `vscode-copilot` | `.vscode/mcp.json` | `.github/prompts/` | `.github/agents/` |
|
|
54
|
+
| **Cursor** | `cursor` | `.cursor/mcp.json` | `.cursor/commands/` | `.cursor/agents/` |
|
|
55
|
+
| **Other** | `other` | _(manual setup)_ | `.ai/prompts/` | `.ai/agents/` |
|
|
73
56
|
|
|
74
|
-
|
|
57
|
+
All providers register the HAI MCP server and install the full set of prompts and agents into the appropriate directories for that environment.
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
npm run build # Compile TypeScript to dist/
|
|
78
|
-
npm run dev # Watch mode — recompiles on change
|
|
79
|
-
npm run cli # Build and run in one step
|
|
80
|
-
npm test # Run Prettier check + XO lint + AVA tests
|
|
81
|
-
npm run format # Auto-format with Prettier
|
|
82
|
-
```
|
|
59
|
+
## Supported ticket and spec providers
|
|
83
60
|
|
|
84
|
-
|
|
61
|
+
| Provider | ID | Capabilities | Description |
|
|
62
|
+
| ------------- | ----------- | --------------- | -------------------------------------- |
|
|
63
|
+
| **Atlassian** | `atlassian` | Tickets + Specs | Jira for tickets, Confluence for specs |
|
|
64
|
+
| **Local** | `local` | Tickets + Specs | Read from local filesystem directories |
|
|
65
|
+
| **None** | `none` | Tickets + Specs | Disabled / no-op provider |
|
|
85
66
|
|
|
86
|
-
|
|
87
|
-
- **Ink 4** — React 18 for terminal UIs
|
|
88
|
-
- **Meow** — CLI argument parsing
|
|
89
|
-
- **Zod 4** — runtime config validation
|
|
67
|
+
### Atlassian provider
|
|
90
68
|
|
|
91
|
-
|
|
69
|
+
- **Jira**: Fetches active and done tickets by project, supports recursive linked-issue fetching, custom fields, and comments
|
|
70
|
+
- **Confluence**: Fetches pages by space (optionally scoped to an ancestor page), converts Atlassian Document Format (ADF) to Markdown, and preserves page hierarchy
|
|
92
71
|
|
|
93
|
-
|
|
94
|
-
- **Imports**: use `.js` extensions in all relative imports (ESM requirement)
|
|
95
|
-
- **Types**: use the `type` keyword for type-only imports (`import type {Foo} from ...`)
|
|
96
|
-
- **Props**: define inline with `type Props = { ... }` — no `interface`, no `prop-types`
|
|
97
|
-
- **Components**: default exports for page-level, named exports for UI components
|
|
98
|
-
- **Formatting**: Prettier via `@vdemedes/prettier-config` (tabs, single quotes, trailing commas)
|
|
72
|
+
## Prompts
|
|
99
73
|
|
|
100
|
-
|
|
74
|
+
HAI ships with 7 built-in prompts that are installed into your AI editor as commands:
|
|
101
75
|
|
|
102
|
-
|
|
76
|
+
| Prompt | Description |
|
|
77
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| **implement** | Full implementation workflow — fetches tickets, researches context, plans, and spawns dev agents in parallel by domain |
|
|
79
|
+
| **pull** | Pull both tickets and specs from remote via MCP |
|
|
80
|
+
| **pull-tickets** | Pull only tickets from remote via MCP |
|
|
81
|
+
| **pull-specs** | Pull only specs from remote via MCP |
|
|
82
|
+
| **document** | Generate implementation documentation from recent git changes |
|
|
83
|
+
| **optimize-ai** | Optimize AI agents and prompts for your project needs |
|
|
84
|
+
| **review-changes** | Review recent code changes |
|
|
103
85
|
|
|
104
|
-
###
|
|
86
|
+
### The `implement` workflow
|
|
105
87
|
|
|
106
|
-
|
|
107
|
-
source/plugins/my-plugin/
|
|
108
|
-
├── index.ts # Plugin definition (exports the HaiPlugin object)
|
|
109
|
-
└── provider.ts # Provider implementation(s)
|
|
110
|
-
```
|
|
88
|
+
The `implement` prompt orchestrates a multi-phase, domain-parallel coding workflow:
|
|
111
89
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
id: 'my-plugin',
|
|
120
|
-
name: 'My Plugin',
|
|
121
|
-
|
|
122
|
-
getCapabilities(): CapabilityType[] {
|
|
123
|
-
// Declare what this plugin provides: 'tickets', 'specs', 'ai', or any combination
|
|
124
|
-
return ['tickets'];
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
// React component rendered during `hai init` to collect user config
|
|
128
|
-
InitStep: ({capability, existingData, onComplete}) => {
|
|
129
|
-
// Collect credentials or settings, then call:
|
|
130
|
-
// onComplete({ host: '...', token: '...' })
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
createProvider(capability, data) {
|
|
134
|
-
// Return a TicketProvider, SpecProvider, or AiProvider
|
|
135
|
-
// based on the requested capability
|
|
136
|
-
return new MyTicketProvider(data);
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
// Optional: return project keys for ticket syncing
|
|
140
|
-
getTicketProjects(data) {
|
|
141
|
-
return data.projects as string[];
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
// Optional: return a human-readable summary for the wizard
|
|
145
|
-
summarize(capability, data) {
|
|
146
|
-
return `My Plugin (${(data as {host: string}).host})`;
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
```
|
|
90
|
+
1. **Fetch** — pulls the target ticket(s) via MCP with recursive linking
|
|
91
|
+
2. **Research** — spawns a `researcher` subagent to read tickets, specs, and codebase patterns
|
|
92
|
+
3. **Plan** — enters plan mode, creates structured TODOs grouped by domain (backend, frontend, etc.)
|
|
93
|
+
4. **Implement** — spawns `backend-dev` and `frontend-dev` subagents **in parallel** for each domain
|
|
94
|
+
5. **Verify** — validates each subagent's output and collects implementation decisions
|
|
95
|
+
|
|
96
|
+
## Agents
|
|
150
97
|
|
|
151
|
-
|
|
98
|
+
HAI installs 7 specialized subagents that prompts can orchestrate:
|
|
152
99
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
100
|
+
| Agent | Role | Writes code? |
|
|
101
|
+
| --------------------- | ----------------------------------------------------- | ------------ |
|
|
102
|
+
| **researcher** | Read-only exploration of specs, tickets, and codebase | No |
|
|
103
|
+
| **architect** | Designs detailed implementation plans from research | No |
|
|
104
|
+
| **backend-dev** | Implements backend tasks | Yes |
|
|
105
|
+
| **frontend-dev** | Implements frontend tasks | Yes |
|
|
106
|
+
| **refactorer** | Refactors existing code | Yes |
|
|
107
|
+
| **security-reviewer** | Reviews code for security issues | No |
|
|
108
|
+
| **verifier** | Verification and QA | No |
|
|
158
109
|
|
|
159
|
-
|
|
110
|
+
Dev agents (`backend-dev`, `frontend-dev`) automatically spawn a `researcher` subagent first to gather context before writing code.
|
|
160
111
|
|
|
161
|
-
|
|
112
|
+
## MCP server
|
|
162
113
|
|
|
163
|
-
|
|
114
|
+
The MCP server (`hai mcp`) exposes project context to AI assistants over stdio. It provides two tools:
|
|
164
115
|
|
|
165
|
-
|
|
166
|
-
|
|
116
|
+
| Tool | Description |
|
|
117
|
+
| --------------- | -------------------------------------------------------------- |
|
|
118
|
+
| **pull** | Sync tickets and/or specs from remote to `.ai/` |
|
|
119
|
+
| **ticket_pull** | Pull a specific ticket by key, with optional recursive linking |
|
|
167
120
|
|
|
168
|
-
|
|
121
|
+
The server also provides instructions that direct AI assistants to read `.ai/specification-index.md` and `.ai/ticket-index.md` for discovering available project context.
|
|
122
|
+
|
|
123
|
+
## The `.ai/` directory
|
|
124
|
+
|
|
125
|
+
After running `hai pull`, your project contains:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
.ai/
|
|
129
|
+
├── ticket-index.md # Index of all synced tickets
|
|
130
|
+
├── specification-index.md # Index of all synced specs
|
|
131
|
+
├── AGENTS.md # Auto-generated agent info
|
|
132
|
+
├── tickets/ # Provider dependent structure (example is for Atlassian)
|
|
133
|
+
│ └── <PROJECT>/
|
|
134
|
+
│ ├── PROJ-101.md
|
|
135
|
+
│ ├── PROJ-102.md
|
|
136
|
+
│ └── ...
|
|
137
|
+
└── specs/ # Provider dependent structure (example is for Atlassian)
|
|
138
|
+
└── <SPACE>/
|
|
139
|
+
├── page-title.md
|
|
140
|
+
└── subfolder/
|
|
141
|
+
└── nested-page.md
|
|
169
142
|
```
|
|
170
143
|
|
|
171
|
-
|
|
144
|
+
Ticket files include: summary, status, assignee, priority, description, comments, and links. Spec files contain the page content converted to Markdown with hierarchy preserved.
|
|
172
145
|
|
|
173
|
-
|
|
146
|
+
## Configuration
|
|
174
147
|
|
|
175
|
-
|
|
148
|
+
Running `hai init` creates a `hai.json` at the project root (should be gitignored) that stores provider configuration:
|
|
176
149
|
|
|
177
150
|
```json
|
|
178
151
|
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
152
|
+
"plugins": [
|
|
153
|
+
{
|
|
154
|
+
"plugin": "atlassian",
|
|
155
|
+
"provides": ["tickets", "specs"],
|
|
156
|
+
"host": "https://your-org.atlassian.net",
|
|
157
|
+
"email": "you@example.com",
|
|
158
|
+
"token": "...",
|
|
159
|
+
"projects": ["PROJ"],
|
|
160
|
+
"spaces": ["TEAM"]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"plugin": "claude-code",
|
|
164
|
+
"provides": ["ai"]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
187
167
|
}
|
|
188
168
|
```
|
|
189
169
|
|
|
190
|
-
|
|
170
|
+
Use `hai init` again to reconfigure at any time.
|
|
191
171
|
|
|
192
|
-
1. **Init** — the wizard collects plugin configs and writes `hai.json`
|
|
193
|
-
2. **Pull** — reads config, resolves providers, syncs tickets/specs to `.ai/`
|
|
194
|
-
3. **MCP** — reads config, starts a stdio server, exposes ticket and spec tools to AI assistants
|
|
195
172
|
|
|
196
173
|
## License
|
|
197
174
|
|
package/dist/commands/init.js
CHANGED
|
@@ -54,12 +54,13 @@ export default function InitCommand() {
|
|
|
54
54
|
const { setError } = useErrorContext();
|
|
55
55
|
const [steps, setSteps] = useState([...INITIAL_STEPS]);
|
|
56
56
|
const [isSaving, setIsSaving] = useState(false);
|
|
57
|
+
const [initResult, setInitResult] = useState(null);
|
|
57
58
|
if (isSaving || !config) {
|
|
58
59
|
return (React.createElement(Spinner, { label: "Saving configuration and doing initial pull..." }));
|
|
59
60
|
}
|
|
60
61
|
const currentStep = steps[0];
|
|
61
62
|
if (!currentStep) {
|
|
62
|
-
return React.createElement(SummaryStep,
|
|
63
|
+
return React.createElement(SummaryStep, { aiAlreadyInitialized: initResult?.aiAlreadyInitialized ?? false });
|
|
63
64
|
}
|
|
64
65
|
const { capability, label } = STEP_MAP[currentStep];
|
|
65
66
|
return (React.createElement(ProviderStep, { key: currentStep, capability: capability, label: label, onComplete: (plugin, data) => {
|
|
@@ -100,7 +101,8 @@ export default function InitCommand() {
|
|
|
100
101
|
setError(e);
|
|
101
102
|
})
|
|
102
103
|
.then(() => initializeEnvironment(updatedConfig))
|
|
103
|
-
.then(
|
|
104
|
+
.then(result => {
|
|
105
|
+
setInitResult(result);
|
|
104
106
|
setIsSaving(false);
|
|
105
107
|
setSteps([]);
|
|
106
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../source/commands/init.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../source/commands/init.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAC,qBAAq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CAAC,CAAC;YAC1B,CAAC;QACF,CAAC,GACA,CACF,CAAC;AACH,CAAC"}
|
package/dist/helpers/init.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { HaiConfig } from '../schemas/config.js';
|
|
2
|
-
export
|
|
2
|
+
export type InitResult = {
|
|
3
|
+
aiAlreadyInitialized: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function initializeEnvironment(config: HaiConfig): Promise<InitResult>;
|
package/dist/helpers/init.js
CHANGED
|
@@ -3,16 +3,29 @@ import { ensureDir } from '../helpers/fs.js';
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { resolveAiProvider } from '../plugins/resolve.js';
|
|
5
5
|
import { pullAll } from '../helpers/pull.js';
|
|
6
|
+
import { findPluginForCapability } from '../schemas/config.js';
|
|
7
|
+
import { readMainConfig, writeMainConfig, isProviderInitialized, addInitializedProvider, } from './main-config.js';
|
|
6
8
|
export async function initializeEnvironment(config) {
|
|
7
9
|
await runPreflightChecks({
|
|
8
|
-
gitIgnoreEntriesMustBeSatisfied: false
|
|
10
|
+
gitIgnoreEntriesMustBeSatisfied: false,
|
|
9
11
|
});
|
|
10
12
|
const cwd = process.cwd();
|
|
11
13
|
await ensureDir(join(cwd, '.ai', 'tickets'));
|
|
12
14
|
await ensureDir(join(cwd, '.ai', 'specs'));
|
|
13
|
-
const
|
|
14
|
-
await
|
|
15
|
+
const aiEntry = findPluginForCapability(config, 'ai');
|
|
16
|
+
let mainConfig = await readMainConfig();
|
|
17
|
+
let aiAlreadyInitialized = false;
|
|
18
|
+
if (aiEntry && !isProviderInitialized(mainConfig, aiEntry.plugin)) {
|
|
19
|
+
const aiProvider = resolveAiProvider(config);
|
|
20
|
+
await aiProvider.install(cwd);
|
|
21
|
+
mainConfig = addInitializedProvider(mainConfig, aiEntry.plugin);
|
|
22
|
+
}
|
|
23
|
+
else if (aiEntry) {
|
|
24
|
+
aiAlreadyInitialized = true;
|
|
25
|
+
}
|
|
26
|
+
await writeMainConfig(mainConfig);
|
|
15
27
|
await ensureGitignoreEntries();
|
|
16
28
|
await pullAll(config);
|
|
29
|
+
return { aiAlreadyInitialized };
|
|
17
30
|
}
|
|
18
31
|
//# sourceMappingURL=init.js.map
|
package/dist/helpers/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../source/helpers/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,sBAAsB,EACtB,kBAAkB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../source/helpers/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,sBAAsB,EACtB,kBAAkB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACN,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,kBAAkB,CAAC;AAM1B,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAiB;IAC5D,MAAM,kBAAkB,CAAC;QACxB,+BAA+B,EAAE,KAAK;KACtC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,MAAM,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAC7C,MAAM,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAE3C,MAAM,OAAO,GAAG,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,IAAI,UAAU,GAAG,MAAM,cAAc,EAAE,CAAC;IAExC,IAAI,oBAAoB,GAAG,KAAK,CAAC;IAEjC,IAAI,OAAO,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,UAAU,GAAG,sBAAsB,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;SAAM,IAAI,OAAO,EAAE,CAAC;QACpB,oBAAoB,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,MAAM,eAAe,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,sBAAsB,EAAE,CAAC;IAE/B,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtB,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HaiMainConfig } from '../schemas/main-config.js';
|
|
2
|
+
export declare function readMainConfig(path?: string): Promise<HaiMainConfig>;
|
|
3
|
+
export declare function writeMainConfig(config: HaiMainConfig, path?: string): Promise<void>;
|
|
4
|
+
export declare function isProviderInitialized(config: HaiMainConfig, providerId: string): boolean;
|
|
5
|
+
export declare function addInitializedProvider(config: HaiMainConfig, providerId: string): HaiMainConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { readJsonFileSafe, writeJsonFile } from './fs.js';
|
|
3
|
+
import { HaiMainConfigSchema } from '../schemas/main-config.js';
|
|
4
|
+
const DEFAULT_MAIN_CONFIG_FILENAME = 'hai.main.json';
|
|
5
|
+
function defaultPath(path) {
|
|
6
|
+
return path ?? join(process.cwd(), DEFAULT_MAIN_CONFIG_FILENAME);
|
|
7
|
+
}
|
|
8
|
+
export async function readMainConfig(path) {
|
|
9
|
+
const filePath = defaultPath(path);
|
|
10
|
+
const data = await readJsonFileSafe(filePath);
|
|
11
|
+
return HaiMainConfigSchema.parse(data);
|
|
12
|
+
}
|
|
13
|
+
export async function writeMainConfig(config, path) {
|
|
14
|
+
const filePath = defaultPath(path);
|
|
15
|
+
await writeJsonFile(filePath, config);
|
|
16
|
+
}
|
|
17
|
+
export function isProviderInitialized(config, providerId) {
|
|
18
|
+
return config.initializedProviders.includes(providerId);
|
|
19
|
+
}
|
|
20
|
+
export function addInitializedProvider(config, providerId) {
|
|
21
|
+
if (config.initializedProviders.includes(providerId)) {
|
|
22
|
+
return config;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
...config,
|
|
26
|
+
initializedProviders: [...config.initializedProviders, providerId],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=main-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-config.js","sourceRoot":"","sources":["../../source/helpers/main-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACxD,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAG9D,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAErD,SAAS,WAAW,CAAC,IAAa;IACjC,OAAO,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,4BAA4B,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAa;IACjD,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACpC,MAAqB,EACrB,IAAa;IAEb,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,qBAAqB,CACpC,MAAqB,EACrB,UAAkB;IAElB,OAAO,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,sBAAsB,CACrC,MAAqB,EACrB,UAAkB;IAElB,IAAI,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,OAAO;QACN,GAAG,MAAM;QACT,oBAAoB,EAAE,CAAC,GAAG,MAAM,CAAC,oBAAoB,EAAE,UAAU,CAAC;KAClE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-config.js","sourceRoot":"","sources":["../../source/schemas/main-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACrD,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ function capabilitySummary(config, capability) {
|
|
|
19
19
|
return `${entry.plugin}: (unknown)`;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
export default function SummaryStep() {
|
|
22
|
+
export default function SummaryStep({ aiAlreadyInitialized }) {
|
|
23
23
|
const { config } = useConfigContext();
|
|
24
24
|
if (!config) {
|
|
25
25
|
return null;
|
|
@@ -32,7 +32,8 @@ export default function SummaryStep() {
|
|
|
32
32
|
React.createElement(Newline, null),
|
|
33
33
|
aiSummary && React.createElement(Text, null,
|
|
34
34
|
"* AI Provider: ",
|
|
35
|
-
aiSummary
|
|
35
|
+
aiSummary,
|
|
36
|
+
aiAlreadyInitialized && React.createElement(Text, { color: "yellow" }, " (already initialized \u2014 skipped reinstall)")),
|
|
36
37
|
ticketSummary && React.createElement(Text, null,
|
|
37
38
|
"* Ticket Provider: ",
|
|
38
39
|
ticketSummary),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-step.js","sourceRoot":"","sources":["../../source/wizard/summary-step.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAE7C,SAAS,iBAAiB,CACzB,MAAiB,EACjB,UAA0B;IAE1B,MAAM,KAAK,GAAG,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1D,OAAO,MAAM,CAAC,C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;QACP,oBAAC,OAAO,OAAG,CACN,CACN,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2amtech/hai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Helper AI (HAI) is an AI environment initializer setting up a standardized AI workflow supporting multiple AI providers.",
|
|
6
6
|
"author": "Aleksandar Panic",
|