oneie 3.0.3 → 3.3.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.
package/CLAUDE.md CHANGED
@@ -195,6 +195,70 @@ events → groupId: Id<"groups">
195
195
  knowledge → groupId: Id<"groups">
196
196
  ```
197
197
 
198
+ ## Installation Folders
199
+
200
+ **NEW:** Each ONE installation can have a top-level folder for organization-specific customization.
201
+
202
+ ### Architecture
203
+
204
+ ```
205
+ /
206
+ ├── one/ # Global templates (fallback)
207
+ ├── <installation-name>/ # Customer-specific overrides
208
+ │ ├── groups/ # Hierarchical group docs
209
+ │ ├── people/
210
+ │ ├── things/
211
+ │ ├── connections/
212
+ │ ├── events/
213
+ │ └── knowledge/
214
+ ├── web/
215
+ ├── backend/
216
+ └── .claude/
217
+ ```
218
+
219
+ ### File Resolution
220
+
221
+ When loading documentation, use this priority:
222
+
223
+ 1. `/<installation-name>/groups/<group-path>/<file>` (most specific)
224
+ 2. Parent group paths (walk up hierarchy)
225
+ 3. `/<installation-name>/<file>` (installation root)
226
+ 4. `/one/<file>` (global fallback)
227
+
228
+ ### Initialize Installation
229
+
230
+ ```bash
231
+ npx oneie init
232
+ # Prompts for organization name and installation identifier
233
+ # Creates folder structure and updates .env.local
234
+ ```
235
+
236
+ ### Usage
237
+
238
+ **Add installation-specific docs:**
239
+ ```bash
240
+ mkdir -p /acme/groups/engineering
241
+ echo "# Engineering Practices" > /acme/groups/engineering/practices.md
242
+ ```
243
+
244
+ **Override global templates:**
245
+ ```bash
246
+ echo "# Our Vision" > /acme/things/vision.md
247
+ ```
248
+
249
+ ### Important Distinctions
250
+
251
+ - **Installation folder** = Filesystem customization per organization
252
+ - **Database groups** = Runtime data isolation per group (via `groupId`)
253
+ - One installation can serve many database groups
254
+ - Folder hierarchy mirrors database `parentGroupId` structure
255
+
256
+ ### Security
257
+
258
+ - Never store secrets in installation folders
259
+ - Use `.env.local` for sensitive configuration
260
+ - Installation folders excluded from git by default
261
+
198
262
  ## Development Commands
199
263
 
200
264
  ### Frontend Development
@@ -289,6 +353,7 @@ bun test --watch
289
353
  **CRITICAL:** Only these markdown files belong in the root directory:
290
354
  - **README.md** - Platform overview and quick start
291
355
  - **LICENSE.md** - Legal terms and conditions
356
+ - **SECURITY.md** - Security policy and vulnerability reporting
292
357
  - **CLAUDE.md** - Claude Code instructions (this file)
293
358
  - **AGENTS.md** - AI agent coordination and rules
294
359
 
@@ -305,7 +370,7 @@ All other documentation belongs in the `one/` directory following the 6-dimensio
305
370
 
306
371
  ```
307
372
  ONE/
308
- ├── frontend/ # Main Astro application
373
+ ├── web/ # Main Astro application
309
374
  │ ├── src/
310
375
  │ │ ├── pages/ # File-based routing
311
376
  │ │ ├── components/ # React components + shadcn/ui
@@ -329,34 +394,66 @@ ONE/
329
394
  │ ├── things/ # Architecture, specifications
330
395
  │ ├── events/ # Event specifications, deployment history
331
396
  │ ├── knowledge/ # RAG, AI, implementation
332
- │ └── people/ # Roles, groups, governance
397
+ │ └── people/ # Roles, governance, organization
398
+ │
399
+ ├── .claude/ # Claude Code configuration
400
+ │ ├── agents/ # AI agent definitions (agent-ops, etc.)
401
+ │ └── commands/ # Slash commands (/release, etc.)
333
402
  │
334
403
  └── apps/ # Example applications
335
- ├── oneie/ # Main example app
404
+ ├── one/ # Assembly repository (synced from root)
336
405
  ├── eliza/ # ElizaOS integration
337
406
  └── stack/ # Stack Auth example
338
407
  ```
339
408
 
340
- ## Development Workflow (6-Phase Process)
409
+ ## Development Workflow (7-Phase Process)
341
410
 
342
411
  Before implementing ANY feature, follow this workflow defined in `one/connections/workflow.md`:
343
412
 
413
+ ### Phase 0: CHECK INSTALLATION FOLDER (NEW)
414
+
415
+ **FIRST STEP:** Check if there are installation-specific overrides before reading global templates.
416
+
417
+ ```bash
418
+ # Check if installation folder exists
419
+ if [ -d "/${INSTALLATION_NAME}" ]; then
420
+ echo "✅ Installation folder detected: /${INSTALLATION_NAME}"
421
+ echo "Priority: Installation-specific docs override global /one/ templates"
422
+ fi
423
+ ```
424
+
425
+ **File Resolution Priority:**
426
+ 1. Check `/<installation-name>/groups/<group-path>/<file>` (group-specific)
427
+ 2. Check `/<installation-name>/<file>` (installation-wide)
428
+ 3. Fallback to `/one/<file>` (global template)
429
+
430
+ **Key Questions:**
431
+ - Is there a custom `things/vision.md` in the installation folder?
432
+ - Are there group-specific `groups/<group-name>/` docs?
433
+ - Does this feature need installation-specific documentation?
434
+
344
435
  ### Phase 1: UNDERSTAND
345
436
 
346
- 1. Read `one/knowledge/ontology.md` (understand the 6 dimensions)
347
- 2. Read `frontend/AGENTS.md` (Convex patterns and quick reference)
348
- 3. Read `one/knowledge/rules.md` (golden rules for AI agents)
349
- 4. Identify feature category (entity, relationship, action, query)
350
- 5. Find similar patterns in existing code
437
+ 1. **Check installation folder first** (if `INSTALLATION_NAME` is set)
438
+ - Look for `/<installation-name>/knowledge/ontology.md` (custom ontology docs)
439
+ - Look for `/<installation-name>/knowledge/rules.md` (custom rules)
440
+ 2. Read `one/knowledge/ontology.md` (understand the 6 dimensions)
441
+ 3. Read `web/AGENTS.md` (Convex patterns and quick reference)
442
+ 4. Read `one/knowledge/rules.md` (golden rules for AI agents)
443
+ 5. Identify feature category (entity, relationship, action, query)
444
+ 6. Find similar patterns in existing code
445
+ 7. **Check for group-specific docs** in `/<installation-name>/groups/<group-path>/`
351
446
 
352
447
  ### Phase 2: MAP TO ONTOLOGY
353
448
 
354
449
  1. Identify **groups** (which group owns this? any parent/child relationships?)
450
+ - **NEW:** Check if group has custom docs in `/<installation-name>/groups/<group-slug>/`
355
451
  2. Identify **people** (who can access/modify this?)
356
452
  3. Identify **things** (what entities are involved?)
357
453
  4. Identify **connections** (how do they relate?)
358
454
  5. Identify **events** (what actions need logging?)
359
455
  6. Identify **knowledge** (what needs to be learned/searched?)
456
+ 7. **NEW:** Decide if this feature needs installation-specific documentation
360
457
 
361
458
  ### Phase 3: DESIGN SERVICES
362
459
 
@@ -384,8 +481,16 @@ Before implementing ANY feature, follow this workflow defined in `one/connection
384
481
 
385
482
  1. Write unit tests for services
386
483
  2. Write integration tests for full flows
387
- 3. Update documentation in `one/` directory
484
+ 3. Update documentation:
485
+ - **Installation-specific:** Add to `/<installation-name>/<dimension>/` if feature is org-specific
486
+ - **Group-specific:** Add to `/<installation-name>/groups/<group-slug>/` if feature is group-specific
487
+ - **Global:** Add to `/one/<dimension>/` if feature is platform-wide
388
488
  4. Run type checking (`bunx astro check`)
489
+ 5. **NEW:** Test file resolution with installation folder:
490
+ ```bash
491
+ # Test that installation-specific docs override global docs
492
+ cat /<installation-name>/things/vision.md # Should show custom version
493
+ ```
389
494
 
390
495
  ## Key Patterns and Best Practices
391
496
 
@@ -665,11 +770,16 @@ Verify `react-dom/server.edge` alias is set in `astro.config.mjs` under `vite.re
665
770
 
666
771
  **For ANY feature implementation, read in this order:**
667
772
 
668
- 1. **`one/knowledge/ontology.md`** - Complete 6-dimension ontology specification (Version 1.0.0)
669
- 2. **`frontend/AGENTS.md`** - Quick reference for Convex patterns
670
- 3. **`one/knowledge/rules.md`** - Golden rules for AI development
671
- 4. **`one/connections/workflow.md`** - 6-phase development workflow
672
- 5. **`one/connections/patterns.md`** - Proven code patterns to replicate
773
+ 1. **Check installation folder first** (if `INSTALLATION_NAME` is set):
774
+ - `/<installation-name>/knowledge/ontology.md` (custom ontology docs)
775
+ - `/<installation-name>/knowledge/rules.md` (custom rules)
776
+ - `/<installation-name>/groups/<group-slug>/` (group-specific docs)
777
+ 2. **`one/knowledge/ontology.md`** - Complete 6-dimension ontology specification (Version 1.0.0)
778
+ 3. **`web/AGENTS.md`** - Quick reference for Convex patterns
779
+ 4. **`one/knowledge/rules.md`** - Golden rules for AI development
780
+ 5. **`one/connections/workflow.md`** - 7-phase development workflow (includes installation folders)
781
+ 6. **`one/connections/patterns.md`** - Proven code patterns to replicate
782
+ 7. **`one/knowledge/installation-folders.md`** - Installation folder architecture and usage
673
783
 
674
784
  **For specific feature types:**
675
785
 
@@ -696,15 +806,58 @@ The `one/` directory contains **41 documentation files** organized in **8 layers
696
806
 
697
807
  ## Deployment
698
808
 
699
- ### Web (Cloudflare Pages)
809
+ ### Automated Release (v3.0.0+)
810
+
811
+ **Use `/release` command for complete deployment:**
812
+
813
+ ```bash
814
+ # Patch release (bug fixes)
815
+ /release patch
816
+
817
+ # Minor release (new features)
818
+ /release minor
819
+
820
+ # Major release (breaking changes)
821
+ /release major
822
+
823
+ # Sync files without version bump
824
+ /release sync
825
+ ```
826
+
827
+ **The release process automatically:**
828
+ 1. Bumps version in `cli/package.json`
829
+ 2. Syncs 518+ files from root to `cli/` and `apps/one/`:
830
+ - `/one/*` → `cli/one/` and `apps/one/one/`
831
+ - `/.claude/*` → `cli/.claude/` and `apps/one/one/.claude/`
832
+ - `/web/*` → `apps/one/web/` (git subtree)
833
+ - `CLAUDE.md`, `README.md`, `LICENSE.md`, `SECURITY.md` → all targets
834
+ - `web/AGENTS.md` → `apps/one/one/AGENTS.md`
835
+ 3. Commits and pushes to:
836
+ - `github.com/one-ie/cli`
837
+ - `github.com/one-ie/web`
838
+ - `github.com/one-ie/one` (apps/one assembly repo)
839
+ 4. Publishes to npm: `oneie@<version>`
840
+ 5. Builds and deploys web to Cloudflare Pages
841
+
842
+ **Live URLs:**
843
+ - npm: https://www.npmjs.com/package/oneie
844
+ - Web: https://web.one.ie
845
+ - CLI: https://github.com/one-ie/cli
846
+ - One: https://github.com/one-ie/one
847
+
848
+ See `.claude/commands/release.md` and `.claude/agents/agent-ops.md` for details.
849
+
850
+ ### Manual Deployment
851
+
852
+ **Web (Cloudflare Pages):**
700
853
 
701
854
  ```bash
702
855
  cd web/
703
856
  bun run build
704
- wrangler pages deploy dist --project-name=one-platform
857
+ wrangler pages deploy dist --project-name=web
705
858
  ```
706
859
 
707
- ### Backend (Convex Cloud)
860
+ **Backend (Convex Cloud):**
708
861
 
709
862
  ```bash
710
863
  cd backend/
@@ -731,10 +884,11 @@ Everything else is just data. This ontology scales from friend circles (2 people
731
884
  For questions about:
732
885
 
733
886
  - **6-Dimension Ontology**: Read `one/knowledge/ontology.md` (Version 1.0.0 - complete specification)
734
- - **Convex patterns**: Read `frontend/AGENTS.md`
887
+ - **Convex patterns**: Read `web/AGENTS.md`
735
888
  - **Architecture**: Read `one/knowledge/architecture.md`
736
889
  - **Workflows**: Read `one/connections/workflow.md`
737
890
  - **Best practices**: Read `one/knowledge/rules.md`
891
+ - **Release process**: Read `.claude/commands/release.md` and `.claude/agents/agent-ops.md`
738
892
  - **Migration from 4-table**: Read `one/things/plans/ontology-6-dimensions.md`
739
893
 
740
894
  ---
package/README.md CHANGED
@@ -55,6 +55,59 @@ cd web/
55
55
  bun test # All tests
56
56
  ```
57
57
 
58
+ ## Installation Folders (NEW)
59
+
60
+ Customize your ONE installation with organization-specific documentation and configuration.
61
+
62
+ ### Initialize
63
+
64
+ ```bash
65
+ npx oneie init
66
+ # Follow prompts to create your installation folder
67
+ ```
68
+
69
+ ### Structure
70
+
71
+ ```
72
+ /acme/ # Your installation folder
73
+ ├── groups/ # Group-specific docs (hierarchical)
74
+ │ ├── engineering/
75
+ │ │ ├── frontend/
76
+ │ │ └── backend/
77
+ │ └── marketing/
78
+ ├── people/ # Role documentation
79
+ ├── things/ # Entity specifications
80
+ ├── connections/ # Workflows
81
+ ├── events/ # Deployment history
82
+ └── knowledge/ # AI training data
83
+ ```
84
+
85
+ ### Override Templates
86
+
87
+ Files in your installation folder override global `/one/` templates:
88
+
89
+ ```bash
90
+ # Override vision document
91
+ echo "# Our Vision" > /acme/things/vision.md
92
+
93
+ # Add group-specific practices
94
+ echo "# Engineering Practices" > /acme/groups/engineering/practices.md
95
+ ```
96
+
97
+ ### File Resolution
98
+
99
+ The system automatically resolves files with this priority:
100
+
101
+ 1. Group-specific (e.g., `/acme/groups/engineering/frontend/sprint-guide.md`)
102
+ 2. Parent groups (walk up hierarchy)
103
+ 3. Installation root (e.g., `/acme/things/vision.md`)
104
+ 4. Global fallback (e.g., `/one/things/vision.md`)
105
+
106
+ ### Learn More
107
+
108
+ - Complete guide: `/one/knowledge/installation-folders.md`
109
+ - 6-Dimension Ontology: `/one/knowledge/ontology.md`
110
+
58
111
  ## ✨ ONE
59
112
 
60
113
  **Build apps, websites, and AI agents in English.** Download to your computer, run in the cloud and deploy to the edge or your own server. ONE is open source and free forever.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Init command options
3
+ */
4
+ export interface InitOptions {
5
+ organizationName?: string;
6
+ installationName?: string;
7
+ excludeFromGit?: boolean;
8
+ basePath?: string;
9
+ }
10
+ /**
11
+ * Runs the init command interactively
12
+ */
13
+ export declare function runInit(options?: InitOptions): Promise<void>;
14
+ /**
15
+ * Non-interactive init (for programmatic use)
16
+ */
17
+ export declare function initInstallation(organizationName: string, installationName: string, options?: Partial<InitOptions>): Promise<string>;
18
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwJtE;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,MAAM,EACxB,OAAO,GAAE,OAAO,CAAC,WAAW,CAAM,GACjC,OAAO,CAAC,MAAM,CAAC,CA0CjB"}
@@ -0,0 +1,155 @@
1
+ import prompts from "prompts";
2
+ import chalk from "chalk";
3
+ import ora from "ora";
4
+ import { validateInstallationName, createInstallationFolder, mirrorOntologyStructure, createReadme, updateEnvFile, updateGitignore, rollbackInstallation, } from "../utils/installation-setup.js";
5
+ /**
6
+ * Runs the init command interactively
7
+ */
8
+ export async function runInit(options = {}) {
9
+ console.log(chalk.cyan("\n✨ Initialize Installation Folder\n"));
10
+ // Step 1: Prompt for organization name
11
+ let organizationName = options.organizationName;
12
+ if (!organizationName) {
13
+ const { name } = await prompts({
14
+ type: "text",
15
+ name: "name",
16
+ message: "What is your organization name?",
17
+ validate: (value) => value.length > 0 ? true : "Organization name cannot be empty",
18
+ });
19
+ if (!name) {
20
+ console.log(chalk.yellow("\nCancelled."));
21
+ return;
22
+ }
23
+ organizationName = name;
24
+ }
25
+ // Step 2: Prompt for installation identifier
26
+ let installationName = options.installationName;
27
+ if (!installationName) {
28
+ const suggestedSlug = organizationName
29
+ .toLowerCase()
30
+ .replace(/[^a-z0-9]+/g, "-")
31
+ .replace(/^-|-$/g, "");
32
+ const { identifier } = await prompts({
33
+ type: "text",
34
+ name: "identifier",
35
+ message: "Installation identifier (lowercase, hyphens only):",
36
+ initial: suggestedSlug,
37
+ validate: (value) => {
38
+ if (!value) {
39
+ return "Installation identifier cannot be empty";
40
+ }
41
+ if (!validateInstallationName(value)) {
42
+ return "Must be lowercase letters, numbers, and hyphens only";
43
+ }
44
+ return true;
45
+ },
46
+ });
47
+ if (!identifier) {
48
+ console.log(chalk.yellow("\nCancelled."));
49
+ return;
50
+ }
51
+ installationName = identifier;
52
+ }
53
+ // Step 3: Prompt for git exclusion
54
+ let excludeFromGit = options.excludeFromGit;
55
+ if (excludeFromGit === undefined) {
56
+ const { exclude } = await prompts({
57
+ type: "confirm",
58
+ name: "exclude",
59
+ message: `Exclude /${installationName}/ from git?`,
60
+ initial: true,
61
+ });
62
+ excludeFromGit = exclude;
63
+ }
64
+ // Step 4: Create installation folder
65
+ const basePath = options.basePath || process.cwd();
66
+ let installationPath = null;
67
+ try {
68
+ // Create folder
69
+ let spinner = ora(`Creating installation folder: /${installationName}`).start();
70
+ installationPath = await createInstallationFolder(installationName, basePath);
71
+ spinner.succeed(`Created installation folder: /${installationName}`);
72
+ // Mirror ontology structure
73
+ spinner = ora("Mirroring ontology structure...").start();
74
+ await mirrorOntologyStructure(installationPath);
75
+ spinner.succeed("Created 6 ontology subdirectories");
76
+ console.log(chalk.gray(" - /groups/"));
77
+ console.log(chalk.gray(" - /people/"));
78
+ console.log(chalk.gray(" - /things/"));
79
+ console.log(chalk.gray(" - /connections/"));
80
+ console.log(chalk.gray(" - /events/"));
81
+ console.log(chalk.gray(" - /knowledge/"));
82
+ // Create README
83
+ spinner = ora("Creating README.md...").start();
84
+ await createReadme(installationPath, organizationName, installationName);
85
+ spinner.succeed("Created README.md");
86
+ // Update .env.local
87
+ spinner = ora("Updating .env.local...").start();
88
+ await updateEnvFile(installationName, basePath);
89
+ spinner.succeed(`Updated .env.local with INSTALLATION_NAME=${installationName}`);
90
+ // Update .gitignore
91
+ if (excludeFromGit) {
92
+ spinner = ora("Updating .gitignore...").start();
93
+ await updateGitignore(installationName, true, basePath);
94
+ spinner.succeed(`Updated .gitignore to exclude /${installationName}/`);
95
+ }
96
+ // Success!
97
+ console.log(chalk.green("\n🎉 Installation initialized!\n"));
98
+ console.log(chalk.cyan("📁 Your installation folder:"));
99
+ console.log(chalk.gray(` ${installationPath}\n`));
100
+ console.log(chalk.cyan("🔧 Configuration:"));
101
+ console.log(chalk.gray(` Organization: ${organizationName}`));
102
+ console.log(chalk.gray(` Identifier: ${installationName}`));
103
+ console.log(chalk.gray(` Git: ${excludeFromGit ? "excluded" : "tracked"}\n`));
104
+ console.log(chalk.bold("📝 Next steps:\n"));
105
+ console.log(chalk.gray(`1. Create your first group in the database (via web UI)`));
106
+ console.log(chalk.gray(`2. Add group-specific docs: /${installationName}/groups/<group-slug>/`));
107
+ console.log(chalk.gray(`3. Override global templates: /${installationName}/<dimension>/`));
108
+ console.log(chalk.gray(`4. Read the README: cat ${installationName}/README.md\n`));
109
+ }
110
+ catch (error) {
111
+ console.error(chalk.red("\n✗ Error:"), error.message);
112
+ // Rollback on failure
113
+ if (installationPath) {
114
+ const spinner = ora("Rolling back installation...").start();
115
+ await rollbackInstallation(installationPath);
116
+ spinner.succeed("Rolled back changes");
117
+ }
118
+ throw error;
119
+ }
120
+ }
121
+ /**
122
+ * Non-interactive init (for programmatic use)
123
+ */
124
+ export async function initInstallation(organizationName, installationName, options = {}) {
125
+ if (!validateInstallationName(installationName)) {
126
+ throw new Error(`Invalid installation name: "${installationName}". ` +
127
+ "Must be lowercase letters, numbers, and hyphens only.");
128
+ }
129
+ const basePath = options.basePath || process.cwd();
130
+ const excludeFromGit = options.excludeFromGit ?? true;
131
+ let installationPath = null;
132
+ try {
133
+ // Create folder
134
+ installationPath = await createInstallationFolder(installationName, basePath);
135
+ // Mirror ontology structure
136
+ await mirrorOntologyStructure(installationPath);
137
+ // Create README
138
+ await createReadme(installationPath, organizationName, installationName);
139
+ // Update .env.local
140
+ await updateEnvFile(installationName, basePath);
141
+ // Update .gitignore
142
+ if (excludeFromGit) {
143
+ await updateGitignore(installationName, true, basePath);
144
+ }
145
+ return installationPath;
146
+ }
147
+ catch (error) {
148
+ // Rollback on failure
149
+ if (installationPath) {
150
+ await rollbackInstallation(installationPath);
151
+ }
152
+ throw error;
153
+ }
154
+ }
155
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AAYxC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,UAAuB,EAAE;IACrD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,sCAAsC,CAA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10,7 +10,19 @@ import { createOrgProfile } from "./create-org-profile.js";
10
10
  import { cloneFrontend } from "./clone-frontend.js";
11
11
  import { cloneThirdPartyDocs } from "./clone-docs.js";
12
12
  import { displayBanner } from "./banner.js";
13
+ import { runInit } from "./commands/init.js";
13
14
  async function main() {
15
+ // Check for command line arguments
16
+ const args = process.argv.slice(2);
17
+ // Handle "init" command
18
+ if (args[0] === "init") {
19
+ await runInit();
20
+ return;
21
+ }
22
+ // Default: run full setup
23
+ await runFullSetup();
24
+ }
25
+ async function runFullSetup() {
14
26
  // Display welcome banner
15
27
  displayBanner();
16
28
  console.log(chalk.cyan("\n✨ Welcome to ONE Platform!\n"));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,UAAU,IAAI;IACjB,yBAAyB;IACzB,aAAa,EAAE,CAAC;IAEhB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CACT,gEAAgE,CACjE,CAA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;IACjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAErC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Options for file resolution
3
+ */
4
+ export interface FileResolverOptions {
5
+ installationName: string;
6
+ groupId?: string;
7
+ fallbackToGlobal?: boolean;
8
+ basePath?: string;
9
+ }
10
+ /**
11
+ * Result of file resolution
12
+ */
13
+ export interface ResolvedFile {
14
+ path: string;
15
+ source: "group" | "installation" | "global";
16
+ exists: boolean;
17
+ }
18
+ /**
19
+ * Validates path for security (no .., no symlinks outside allowed dirs)
20
+ * @param filePath Path to validate
21
+ * @param basePath Base path for validation
22
+ * @returns True if valid, throws otherwise
23
+ */
24
+ export declare function validateSecurePath(filePath: string, basePath: string): Promise<void>;
25
+ /**
26
+ * Checks if file exists
27
+ * @param filePath Path to check
28
+ * @returns True if exists, false otherwise
29
+ */
30
+ export declare function fileExists(filePath: string): Promise<boolean>;
31
+ /**
32
+ * Gets group path by walking up the hierarchy
33
+ * @param groupId Group ID
34
+ * @param convexClient Optional Convex client for database queries
35
+ * @returns Group path (e.g., "engineering/frontend")
36
+ *
37
+ * Note: This is a placeholder. In production, this should query Convex
38
+ * to get the actual group hierarchy from the database.
39
+ */
40
+ export declare function getGroupPath(groupId: string, convexClient?: any): Promise<string>;
41
+ /**
42
+ * Resolves a file hierarchically across group → installation → global
43
+ * @param relativePath Relative path to file (e.g., "sprint-guide.md")
44
+ * @param options File resolution options
45
+ * @returns Resolved file with path and source
46
+ */
47
+ export declare function resolveFile(relativePath: string, options: FileResolverOptions): Promise<ResolvedFile>;
48
+ /**
49
+ * Resolves multiple files at once
50
+ * @param relativePaths Array of relative paths
51
+ * @param options File resolution options
52
+ * @returns Array of resolved files
53
+ */
54
+ export declare function resolveFiles(relativePaths: string[], options: FileResolverOptions): Promise<ResolvedFile[]>;
55
+ /**
56
+ * Loads file content with hierarchical resolution
57
+ * @param relativePath Relative path to file
58
+ * @param options File resolution options
59
+ * @returns File content as string, or null if not found
60
+ */
61
+ export declare function loadFile(relativePath: string, options: FileResolverOptions): Promise<string | null>;
62
+ /**
63
+ * Cache for file resolution (optional performance optimization)
64
+ */
65
+ export declare class FileResolverCache {
66
+ private cache;
67
+ /**
68
+ * Gets cached result or resolves file
69
+ * @param relativePath Relative path to file
70
+ * @param options File resolution options
71
+ * @returns Resolved file
72
+ */
73
+ resolve(relativePath: string, options: FileResolverOptions): Promise<ResolvedFile>;
74
+ /**
75
+ * Clears cache
76
+ */
77
+ clear(): void;
78
+ /**
79
+ * Generates cache key
80
+ */
81
+ private getCacheKey;
82
+ }
83
+ //# sourceMappingURL=file-resolver.d.ts.map