musubix 3.3.9 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.github/AGENTS.md +949 -0
  2. package/.github/prompts/sdd-change-apply.prompt.md +283 -0
  3. package/.github/prompts/sdd-change-archive.prompt.md +241 -0
  4. package/.github/prompts/sdd-change-init.prompt.md +269 -0
  5. package/.github/prompts/sdd-design.prompt.md +250 -0
  6. package/.github/prompts/sdd-implement.prompt.md +387 -0
  7. package/.github/prompts/sdd-requirements.prompt.md +193 -0
  8. package/.github/prompts/sdd-review.prompt.md +155 -0
  9. package/.github/prompts/sdd-security.prompt.md +228 -0
  10. package/.github/prompts/sdd-steering.prompt.md +269 -0
  11. package/.github/prompts/sdd-tasks.prompt.md +255 -0
  12. package/.github/prompts/sdd-test.prompt.md +230 -0
  13. package/.github/prompts/sdd-validate.prompt.md +304 -0
  14. package/.github/skills/musubix-adr-generation/SKILL.md +209 -0
  15. package/.github/skills/musubix-best-practices/SKILL.md +315 -0
  16. package/.github/skills/musubix-c4-design/SKILL.md +162 -0
  17. package/.github/skills/musubix-code-generation/SKILL.md +237 -0
  18. package/.github/skills/musubix-domain-inference/SKILL.md +196 -0
  19. package/.github/skills/musubix-ears-validation/SKILL.md +161 -0
  20. package/.github/skills/musubix-sdd-workflow/SKILL.md +217 -0
  21. package/.github/skills/musubix-technical-writing/SKILL.md +444 -0
  22. package/.github/skills/musubix-test-generation/SKILL.md +212 -0
  23. package/.github/skills/musubix-traceability/SKILL.md +141 -0
  24. package/AGENTS.md +1134 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +313 -0
  27. package/README.md +315 -50
  28. package/bin/musubix-mcp.js +15 -0
  29. package/bin/musubix.js +9 -1
  30. package/docs/API-REFERENCE.md +1425 -0
  31. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
  32. package/docs/INSTALL-GUIDE.ja.md +459 -0
  33. package/docs/INSTALL-GUIDE.md +459 -0
  34. package/docs/MIGRATION-v3.0.md +324 -0
  35. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  36. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  37. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  38. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  39. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  40. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  41. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  42. package/docs/ROADMAP-v1.5.md +116 -0
  43. package/docs/SwarmCoding.md +1284 -0
  44. package/docs/Test-prompt.md +105 -0
  45. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  46. package/docs/USER-GUIDE.ja.md +2147 -0
  47. package/docs/USER-GUIDE.md +3022 -0
  48. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  49. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  50. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  51. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  52. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  53. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  54. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  55. package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +217 -0
  56. package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +308 -0
  57. package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +475 -0
  58. package/docs/enterprise-knowledge-management.md +1737 -0
  59. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  60. package/docs/getting-started-with-sdd.md +1602 -0
  61. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  62. package/docs/moodle-refactering-codegraph.md +278 -0
  63. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  64. package/docs/overview/MUSUBIX-Core.md +671 -0
  65. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  66. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  67. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  68. package/docs/overview/MUSUBIX-Learning.md +837 -0
  69. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  70. package/docs/overview/MUSUBIX-Overview.md +264 -0
  71. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  72. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  73. package/docs/overview/MUSUBIX-Policy.md +477 -0
  74. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  75. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  76. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  77. package/docs/overview/MUSUBIX-Security.md +891 -0
  78. package/docs/overview/MUSUBIX-YATA.md +666 -0
  79. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  80. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  81. package/docs/packages/knowledge.md +594 -0
  82. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  83. package/package.json +55 -49
  84. package/scripts/generate-quality-gate-report.ts +106 -0
  85. package/scripts/postinstall.js +94 -0
  86. package/steering/.musubi-version +1 -0
  87. package/steering/product.ja.md +572 -0
  88. package/steering/project.yml +66 -0
  89. package/steering/rules/constitution.md +491 -0
  90. package/steering/structure.ja.md +503 -0
  91. package/steering/tech.ja.md +208 -0
  92. package/dist/index.d.ts +0 -25
  93. package/dist/index.d.ts.map +0 -1
  94. package/dist/index.js +0 -74
  95. package/dist/index.js.map +0 -1
@@ -0,0 +1,595 @@
1
+ # YATA Global User Guide
2
+
3
+ > **YATA Global** - Distributed Knowledge Graph Platform
4
+
5
+ ## 📖 Overview
6
+
7
+ YATA Global (`@nahisaho/yata-global`) is a community-based knowledge sharing platform. It enables global sharing and searching of framework knowledge, design patterns, and best practices.
8
+
9
+ ### Key Features
10
+
11
+ | Feature | Description |
12
+ |---------|-------------|
13
+ | **Framework Knowledge** | Knowledge base for various frameworks |
14
+ | **Pattern Sharing** | Share design patterns and code patterns |
15
+ | **KGPR** | Contribution via Knowledge Graph Pull Request |
16
+ | **Offline Mode** | Offline operation via local cache |
17
+ | **Sync Engine** | Automatic/manual data synchronization |
18
+ | **Authentication** | User authentication and access control |
19
+
20
+ ---
21
+
22
+ ## 🚀 Installation
23
+
24
+ ```bash
25
+ npm install @nahisaho/yata-global
26
+ ```
27
+
28
+ ### Prerequisites
29
+
30
+ - Node.js >= 20.0.0
31
+ - npm >= 10.0.0
32
+
33
+ ---
34
+
35
+ ## 📘 Basic Usage
36
+
37
+ ### Client Initialization
38
+
39
+ ```typescript
40
+ import { createYataGlobal } from '@nahisaho/yata-global';
41
+
42
+ const yataGlobal = createYataGlobal({
43
+ serverUrl: 'https://api.yata.example.com', // API server URL
44
+ offlineMode: false, // Offline mode
45
+ cacheSize: 100, // Cache size (MB)
46
+ autoSync: true, // Auto sync
47
+ syncInterval: 300000, // Sync interval (5 minutes)
48
+ });
49
+
50
+ // Register event listeners
51
+ yataGlobal.on('sync:start', () => console.log('Sync started'));
52
+ yataGlobal.on('sync:complete', (result) => console.log('Sync complete:', result));
53
+ yataGlobal.on('sync:error', (error) => console.error('Sync error:', error));
54
+
55
+ // On exit
56
+ yataGlobal.close();
57
+ ```
58
+
59
+ ### Configuration Options
60
+
61
+ ```typescript
62
+ interface SyncConfig {
63
+ serverUrl: string; // API server URL
64
+ offlineMode: boolean; // Offline mode (default: false)
65
+ cacheSize: number; // Local cache size (default: 100MB)
66
+ autoSync: boolean; // Auto sync (default: true)
67
+ syncInterval: number; // Sync interval (ms, default: 300000)
68
+ retryAttempts: number; // Retry attempts (default: 3)
69
+ timeout: number; // Timeout (ms)
70
+ }
71
+ ```
72
+
73
+ ---
74
+
75
+ ## 🔐 Authentication
76
+
77
+ ### Login
78
+
79
+ ```typescript
80
+ // Login with username/password
81
+ const token = await yataGlobal.login({
82
+ username: 'developer',
83
+ password: 'secure-password',
84
+ });
85
+
86
+ console.log('Logged in, token expires:', token.expiresAt);
87
+ ```
88
+
89
+ ### Token Authentication
90
+
91
+ ```typescript
92
+ // Login with existing token
93
+ const token = await yataGlobal.loginWithToken('your-access-token');
94
+ ```
95
+
96
+ ### Logout
97
+
98
+ ```typescript
99
+ await yataGlobal.logout();
100
+ ```
101
+
102
+ ### Check Authentication Status
103
+
104
+ ```typescript
105
+ if (yataGlobal.isAuthenticated()) {
106
+ const user = await yataGlobal.getCurrentUser();
107
+ console.log('Current user:', user?.username);
108
+ }
109
+ ```
110
+
111
+ ---
112
+
113
+ ## 📚 Framework Knowledge
114
+
115
+ ### Search Frameworks
116
+
117
+ ```typescript
118
+ const result = await yataGlobal.searchFrameworks({
119
+ query: 'react',
120
+ category: 'web-frontend',
121
+ language: 'typescript',
122
+ tags: ['ui', 'component'],
123
+ minQuality: 70,
124
+ sortBy: 'popularity', // 'popularity' | 'quality' | 'updated' | 'relevance'
125
+ limit: 20,
126
+ offset: 0,
127
+ });
128
+
129
+ console.log(`Found ${result.total} frameworks`);
130
+ for (const fw of result.items) {
131
+ console.log(`- ${fw.name} v${fw.version} (${fw.popularity}★)`);
132
+ }
133
+ ```
134
+
135
+ ### Framework Categories
136
+
137
+ ```typescript
138
+ type FrameworkCategory =
139
+ | 'web-frontend' // Web Frontend
140
+ | 'web-backend' // Web Backend
141
+ | 'mobile' // Mobile
142
+ | 'desktop' // Desktop
143
+ | 'database' // Database
144
+ | 'orm' // ORM
145
+ | 'testing' // Testing
146
+ | 'build-tool' // Build Tool
147
+ | 'cli' // CLI
148
+ | 'ai-ml' // AI/ML
149
+ | 'devops' // DevOps
150
+ | 'cloud' // Cloud
151
+ | 'security' // Security
152
+ | 'networking' // Networking
153
+ | 'data-processing' // Data Processing
154
+ | 'logging' // Logging
155
+ | 'monitoring' // Monitoring
156
+ | 'documentation' // Documentation
157
+ | 'other'; // Other
158
+ ```
159
+
160
+ ### Get Individual Framework
161
+
162
+ ```typescript
163
+ const framework = await yataGlobal.getFramework('react-18');
164
+ if (framework) {
165
+ console.log('Name:', framework.name);
166
+ console.log('Version:', framework.version);
167
+ console.log('Description:', framework.description);
168
+ console.log('Docs:', framework.documentationUrl);
169
+ console.log('Quality:', framework.quality);
170
+ console.log('Tags:', framework.tags.join(', '));
171
+ }
172
+ ```
173
+
174
+ ---
175
+
176
+ ## 🧩 Patterns
177
+
178
+ ### Search Patterns
179
+
180
+ ```typescript
181
+ const patterns = await yataGlobal.searchPatterns({
182
+ query: 'repository pattern',
183
+ category: 'data-access',
184
+ language: 'typescript',
185
+ sortBy: 'quality',
186
+ limit: 20,
187
+ });
188
+
189
+ for (const pattern of patterns.items) {
190
+ console.log(`- ${pattern.name}: ${pattern.description}`);
191
+ console.log(` Rating: ${pattern.rating.average}/5 (${pattern.downloads} downloads)`);
192
+ }
193
+ ```
194
+
195
+ ### Pattern Categories
196
+
197
+ ```typescript
198
+ type PatternCategory =
199
+ | 'architecture' // Architecture
200
+ | 'design-pattern' // Design Pattern
201
+ | 'testing' // Testing
202
+ | 'error-handling' // Error Handling
203
+ | 'authentication' // Authentication
204
+ | 'authorization' // Authorization
205
+ | 'api-design' // API Design
206
+ | 'data-access' // Data Access
207
+ | 'validation' // Validation
208
+ | 'logging' // Logging
209
+ | 'caching' // Caching
210
+ | 'async' // Async
211
+ | 'configuration' // Configuration
212
+ | 'other'; // Other
213
+ ```
214
+
215
+ ### Share Patterns
216
+
217
+ ```typescript
218
+ // Authentication required
219
+ if (!yataGlobal.isAuthenticated()) {
220
+ await yataGlobal.login({ username, password });
221
+ }
222
+
223
+ const patternId = await yataGlobal.sharePattern({
224
+ name: 'Service Layer Pattern',
225
+ description: 'Service layer pattern for encapsulating business logic',
226
+ category: 'architecture',
227
+ language: 'typescript',
228
+ frameworks: ['nestjs', 'express'],
229
+ template: `
230
+ export class {{ServiceName}} {
231
+ constructor(private readonly repository: I{{EntityName}}Repository) {}
232
+
233
+ async create(dto: Create{{EntityName}}Dto): Promise<{{EntityName}}> {
234
+ return this.repository.save(dto);
235
+ }
236
+ }`,
237
+ tags: ['service', 'layer', 'architecture'],
238
+ visibility: 'public',
239
+ official: false,
240
+ });
241
+
242
+ console.log('Pattern shared:', patternId);
243
+ ```
244
+
245
+ ### Rate Patterns
246
+
247
+ ```typescript
248
+ await yataGlobal.ratePattern('pattern-id', 5); // 1-5 rating
249
+ ```
250
+
251
+ ---
252
+
253
+ ## 🔄 Sync
254
+
255
+ ### Manual Sync
256
+
257
+ ```typescript
258
+ const syncResult = await yataGlobal.sync();
259
+
260
+ console.log('Sync result:');
261
+ console.log(` Frameworks synced: ${syncResult.frameworksSynced}`);
262
+ console.log(` Patterns synced: ${syncResult.patternsSynced}`);
263
+ console.log(` Duration: ${syncResult.duration}ms`);
264
+ ```
265
+
266
+ ### Sync Status
267
+
268
+ ```typescript
269
+ const status = yataGlobal.getSyncStatus();
270
+
271
+ console.log('Sync status:');
272
+ console.log(` Last sync: ${status.lastSyncAt}`);
273
+ console.log(` Pending changes: ${status.pendingChanges}`);
274
+ console.log(` Is syncing: ${status.isSyncing}`);
275
+ ```
276
+
277
+ ### Offline Mode
278
+
279
+ ```typescript
280
+ // Enable offline mode
281
+ yataGlobal.enableOfflineMode();
282
+
283
+ // Disable offline mode (go online)
284
+ yataGlobal.disableOfflineMode();
285
+ ```
286
+
287
+ In offline mode:
288
+ - Data is retrieved from local cache
289
+ - Change operations are saved to sync queue
290
+ - Auto-sync on reconnection
291
+
292
+ ---
293
+
294
+ ## 📤 KGPR (Knowledge Graph Pull Request)
295
+
296
+ KGPR is a workflow for contributing local knowledge graph changes to YATA Global.
297
+
298
+ ### KGPR Workflow
299
+
300
+ ```
301
+ ┌─────────────────────────────────────────────────────────────┐
302
+ │ KGPR Workflow │
303
+ │ │
304
+ │ [YATA Local] [YATA Global] │
305
+ │ │ │ │
306
+ │ 1. Create KGPR │ │
307
+ │ (Apply privacy filter) │ │
308
+ │ │ │ │
309
+ │ ▼ │ │
310
+ │ 2. Calculate diff │ │
311
+ │ (Entities & relationships) │ │
312
+ │ │ │ │
313
+ │ └─── 3. Submit KGPR ─────►│ │
314
+ │ │ │
315
+ │ 4. Review │
316
+ │ (approve/reject) │
317
+ │ │ │
318
+ │ 5. Merge │
319
+ │ (Conflict resolution) │
320
+ │ │ │
321
+ │ ◄───── 6. Notification ───┘ │
322
+ └─────────────────────────────────────────────────────────────┘
323
+ ```
324
+
325
+ ### KGPR REST API Endpoints
326
+
327
+ | Method | Endpoint | Description |
328
+ |--------|----------|-------------|
329
+ | GET | `/api/v1/kgprs` | List KGPRs |
330
+ | POST | `/api/v1/kgprs` | Create KGPR |
331
+ | GET | `/api/v1/kgprs/:id` | Get KGPR details |
332
+ | POST | `/api/v1/kgprs/:id/review` | Review KGPR |
333
+ | POST | `/api/v1/kgprs/:id/merge` | Merge KGPR |
334
+
335
+ ### Create KGPR (REST API)
336
+
337
+ ```bash
338
+ curl -X POST http://localhost:3000/api/v1/kgprs \
339
+ -H "Content-Type: application/json" \
340
+ -d '{
341
+ "title": "Add UserService pattern",
342
+ "description": "Patterns learned from user authentication flow",
343
+ "sourceNamespace": "app.services",
344
+ "labels": ["pattern", "authentication"],
345
+ "diff": {
346
+ "entities": {
347
+ "added": [
348
+ {
349
+ "changeType": "add",
350
+ "localId": "entity-1",
351
+ "name": "UserService",
352
+ "entityType": "class",
353
+ "namespace": "app.services",
354
+ "description": "User management service"
355
+ }
356
+ ],
357
+ "updated": [],
358
+ "deleted": []
359
+ },
360
+ "relationships": {
361
+ "added": [],
362
+ "updated": [],
363
+ "deleted": []
364
+ },
365
+ "stats": {
366
+ "entitiesAdded": 1,
367
+ "entitiesUpdated": 0,
368
+ "entitiesDeleted": 0,
369
+ "relationshipsAdded": 0,
370
+ "relationshipsUpdated": 0,
371
+ "relationshipsDeleted": 0,
372
+ "totalChanges": 1
373
+ }
374
+ }
375
+ }'
376
+ ```
377
+
378
+ ### Review KGPR (REST API)
379
+
380
+ ```bash
381
+ # Approve
382
+ curl -X POST http://localhost:3000/api/v1/kgprs/KGPR-abc123/review \
383
+ -H "Content-Type: application/json" \
384
+ -d '{
385
+ "decision": "approve",
386
+ "comment": "LGTM! Great pattern."
387
+ }'
388
+
389
+ # Request changes
390
+ curl -X POST http://localhost:3000/api/v1/kgprs/KGPR-abc123/review \
391
+ -H "Content-Type: application/json" \
392
+ -d '{
393
+ "decision": "changes_requested",
394
+ "comment": "Please add more documentation."
395
+ }'
396
+ ```
397
+
398
+ ### Merge KGPR (REST API)
399
+
400
+ ```bash
401
+ curl -X POST http://localhost:3000/api/v1/kgprs/KGPR-abc123/merge \
402
+ -H "Content-Type: application/json" \
403
+ -d '{
404
+ "conflictStrategy": "skip_conflicts"
405
+ }'
406
+ ```
407
+
408
+ ### Conflict Types
409
+
410
+ ```typescript
411
+ type ConflictType =
412
+ | 'entity_exists' // Entity with same name already exists
413
+ | 'entity_modified' // Entity was modified after KGPR creation
414
+ | 'entity_deleted' // Entity was deleted after KGPR creation
415
+ | 'relationship_exists' // Relationship already exists
416
+ | 'relationship_broken' // Source/target entity doesn't exist
417
+ | 'circular_dependency' // Would create circular dependency
418
+ | 'schema_violation'; // Global KG schema violation
419
+
420
+ type ConflictResolution =
421
+ | 'use_local' // Use local (KGPR) value
422
+ | 'use_global' // Keep global value
423
+ | 'merge' // Merge both values
424
+ | 'skip' // Skip this change
425
+ | 'rename'; // Rename to avoid conflict
426
+ ```
427
+
428
+ ---
429
+
430
+ ## 🐳 Docker Environment
431
+
432
+ ### Start with Docker Compose
433
+
434
+ ```bash
435
+ cd docker
436
+ docker compose up -d
437
+ ```
438
+
439
+ ### Architecture
440
+
441
+ ```
442
+ ┌─────────────────────────────────────────────────────────────┐
443
+ │ Docker Network │
444
+ │ ┌──────────────────┐ ┌──────────────────────────────┐ │
445
+ │ │ yata-global │ │ musubix-dev │ │
446
+ │ │ (Port 3000) │◄───│ (Development Environment) │ │
447
+ │ │ │ │ │ │
448
+ │ │ - HTTP API │ │ - MUSUBIX CLI │ │
449
+ │ │ - KGPR Server │ │ - YATA Local │ │
450
+ │ │ - Pattern Store │ │ - Project Workspace │ │
451
+ │ └──────────────────┘ └──────────────────────────────┘ │
452
+ └─────────────────────────────────────────────────────────────┘
453
+ ```
454
+
455
+ ### Health Check
456
+
457
+ ```bash
458
+ curl http://localhost:3000/health
459
+ # {"status":"healthy","timestamp":"...","version":"1.0.0"}
460
+ ```
461
+
462
+ ### E2E Test
463
+
464
+ ```bash
465
+ cd docker
466
+ ./test-kgpr-flow.sh
467
+ ```
468
+
469
+ ---
470
+
471
+ ## 🔧 HTTP Server
472
+
473
+ YATA Global HTTP server can be started standalone.
474
+
475
+ ### Start Server
476
+
477
+ ```bash
478
+ # Via npm
479
+ npx yata-global-server
480
+
481
+ # Or directly
482
+ node packages/yata-global/dist/bin/yata-global-server.js
483
+ ```
484
+
485
+ ### Environment Variables
486
+
487
+ | Variable | Default | Description |
488
+ |----------|---------|-------------|
489
+ | `PORT` | 3000 | Listen port |
490
+ | `HOST` | 0.0.0.0 | Listen host |
491
+
492
+ ### API Endpoints
493
+
494
+ | Method | Path | Description |
495
+ |--------|------|-------------|
496
+ | GET | `/health` | Health check |
497
+ | POST | `/auth/login` | Login |
498
+ | POST | `/auth/logout` | Logout |
499
+ | GET | `/api/v1/kgprs` | List KGPRs |
500
+ | POST | `/api/v1/kgprs` | Create KGPR |
501
+ | GET | `/api/v1/kgprs/:id` | Get KGPR |
502
+ | POST | `/api/v1/kgprs/:id/review` | Review |
503
+ | POST | `/api/v1/kgprs/:id/merge` | Merge |
504
+ | GET | `/api/v1/patterns` | List patterns |
505
+ | POST | `/api/v1/patterns` | Create pattern |
506
+ | GET | `/api/v1/patterns/:id` | Get pattern |
507
+ | GET | `/api/v1/frameworks` | List frameworks |
508
+ | GET | `/api/v1/frameworks/:id` | Get framework |
509
+
510
+ ---
511
+
512
+ ## 📱 Events
513
+
514
+ YataGlobal emits the following events:
515
+
516
+ ```typescript
517
+ // Authentication events
518
+ yataGlobal.on('auth:login', (user) => {
519
+ console.log('User logged in:', user.username);
520
+ });
521
+
522
+ yataGlobal.on('auth:logout', () => {
523
+ console.log('User logged out');
524
+ });
525
+
526
+ // Sync events
527
+ yataGlobal.on('sync:start', () => {
528
+ console.log('Sync started');
529
+ });
530
+
531
+ yataGlobal.on('sync:complete', (result) => {
532
+ console.log('Sync completed:', result);
533
+ });
534
+
535
+ yataGlobal.on('sync:error', (error) => {
536
+ console.error('Sync error:', error);
537
+ });
538
+
539
+ // Connection events
540
+ yataGlobal.on('connection:online', () => {
541
+ console.log('Online');
542
+ });
543
+
544
+ yataGlobal.on('connection:offline', () => {
545
+ console.log('Offline');
546
+ });
547
+ ```
548
+
549
+ ---
550
+
551
+ ## 🔒 Privacy Filter
552
+
553
+ When creating a KGPR, a privacy filter is applied.
554
+
555
+ ### Privacy Levels
556
+
557
+ | Level | Description |
558
+ |-------|-------------|
559
+ | `strict` | Completely remove file paths, line numbers, sensitive metadata |
560
+ | `moderate` | Relativize file paths, keep line numbers, remove sensitive metadata |
561
+ | `none` | No filtering |
562
+
563
+ ### Sensitive Information Detection
564
+
565
+ Information automatically filtered:
566
+ - API keys
567
+ - Passwords
568
+ - Tokens
569
+ - Personal information (email addresses, etc.)
570
+ - Internal path information
571
+
572
+ ---
573
+
574
+ ## 📚 Related Documentation
575
+
576
+ - [YATA Local User Guide](./YATA-LOCAL-GUIDE.md)
577
+ - [Docker Environment README](../docker/README.md)
578
+ - [API Reference](./API-REFERENCE.md)
579
+ - [MUSUBIX User Guide](./USER-GUIDE.md)
580
+
581
+ ---
582
+
583
+ ## 📝 Version History
584
+
585
+ | Version | Major Changes |
586
+ |---------|---------------|
587
+ | v2.4.1 | HTTP server added, Docker support |
588
+ | v1.7.0 | MergeEngine enhancement, conflict resolution |
589
+ | v1.6.5 | KGPR, privacy filter added |
590
+ | v1.0.0 | Initial release |
591
+
592
+ ---
593
+
594
+ **Last Updated**: 2026-01-11
595
+ **Package**: `@nahisaho/yata-global`