lua-cli 2.5.1 → 2.5.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/CLI_REFERENCE.md +90 -0
  3. package/INSTANCE_TYPES.md +1158 -0
  4. package/README.md +6 -0
  5. package/dist/api/agent.api.service.d.ts +52 -0
  6. package/dist/api/agent.api.service.js +63 -0
  7. package/dist/api/logs.api.service.d.ts +35 -0
  8. package/dist/api/logs.api.service.js +43 -0
  9. package/dist/api/products.api.service.js +2 -0
  10. package/dist/cli/command-definitions.js +17 -1
  11. package/dist/commands/admin.d.ts +23 -0
  12. package/dist/commands/admin.js +62 -0
  13. package/dist/commands/channels.d.ts +17 -0
  14. package/dist/commands/channels.js +676 -0
  15. package/dist/commands/docs.d.ts +19 -0
  16. package/dist/commands/docs.js +30 -0
  17. package/dist/commands/index.d.ts +4 -0
  18. package/dist/commands/index.js +4 -0
  19. package/dist/commands/logs.d.ts +17 -0
  20. package/dist/commands/logs.js +271 -0
  21. package/dist/common/basket.instance.d.ts +4 -1
  22. package/dist/common/basket.instance.js +76 -1
  23. package/dist/common/data.entry.instance.d.ts +4 -1
  24. package/dist/common/data.entry.instance.js +57 -1
  25. package/dist/common/http.client.js +11 -1
  26. package/dist/common/order.instance.d.ts +4 -1
  27. package/dist/common/order.instance.js +76 -1
  28. package/dist/common/product.instance.d.ts +4 -1
  29. package/dist/common/product.instance.js +57 -1
  30. package/dist/common/product.pagination.instance.d.ts +58 -0
  31. package/dist/common/product.pagination.instance.js +78 -0
  32. package/dist/common/product.search.instance.d.ts +58 -0
  33. package/dist/common/product.search.instance.js +78 -0
  34. package/dist/common/user.instance.d.ts +4 -12
  35. package/dist/common/user.instance.js +5 -24
  36. package/dist/index.js +3 -0
  37. package/dist/interfaces/agent.d.ts +218 -0
  38. package/dist/interfaces/logs.d.ts +40 -0
  39. package/dist/interfaces/logs.js +5 -0
  40. package/package.json +2 -1
  41. package/template/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.5.2] - 2025-10-07
9
+
10
+ ### ✨ New Features
11
+ - **Direct Property Access for All Instance Classes**: Extended Proxy pattern to all instance types
12
+ - `ProductInstance` now supports `product.name` instead of `product.data.name`
13
+ - `DataEntryInstance` now supports `entry.fieldName` instead of `entry.data.fieldName`
14
+ - `BasketInstance` now supports `basket.items` (checks instance → data → common)
15
+ - `OrderInstance` now supports `order.shippingAddress` (checks instance → data → common)
16
+
17
+ - **Array-Like Methods for Product Collections**: Direct iteration support
18
+ - `ProductSearchInstance` now supports `.map()`, `.filter()`, `.forEach()`, etc.
19
+ - `ProductPaginationInstance` now supports all array methods
20
+ - Both support `for...of` loops and spread operators
21
+ - Direct `.length` property access
22
+
23
+ ### 🔧 Improvements
24
+ - **Consistent API**: All instance classes now follow the same intuitive access patterns
25
+ - **Enhanced Iteration**: Product collections can be treated as arrays
26
+ - **Better TypeScript Support**: Index signatures on all instance classes
27
+
28
+ ### 📖 Documentation
29
+ - **Comprehensive Instance Types Documentation**: Added complete guide for all instance types
30
+
31
+ ### Technical Details
32
+ - Added Proxy implementations to ProductInstance, DataEntryInstance, BasketInstance, OrderInstance
33
+ - Added array method delegation to ProductSearchInstance and ProductPaginationInstance
34
+ - Added Symbol.iterator support for proper iteration
35
+ - Type-safe implementations with proper generics
36
+
8
37
  ## [2.5.1] - 2025-10-07
9
38
 
10
39
  ### 🐛 Bug Fixes
package/CLI_REFERENCE.md CHANGED
@@ -501,6 +501,96 @@ Press `Ctrl+C` to stop the file watcher and server.
501
501
 
502
502
  ---
503
503
 
504
+ ### `lua admin`
505
+
506
+ Opens the Lua Admin Dashboard in your default browser.
507
+
508
+ **Usage:**
509
+ ```bash
510
+ lua admin
511
+ ```
512
+
513
+ **What it does:**
514
+ 1. Loads your API key from secure storage
515
+ 2. Reads your skill configuration (agentId and orgId)
516
+ 3. Constructs authenticated admin dashboard URL
517
+ 4. Opens the dashboard in your default browser
518
+
519
+ **Requirements:**
520
+ - Must be authenticated (`lua auth configure`)
521
+ - Must be in a skill directory (has `lua.skill.yaml`)
522
+ - Config must contain `agent.agentId` and `agent.orgId`
523
+
524
+ **What You Can Do:**
525
+ - **📊 Usage Analytics** - View API calls, skill usage, performance
526
+ - **⚙️ Agent Configuration** - Manage settings, persona, metadata
527
+ - **💳 Billing & Subscriptions** - View plans, payment, billing history
528
+ - **👥 Team Management** - Add/remove members, permissions
529
+ - **🔑 API Key Management** - View, generate, revoke keys
530
+
531
+ **Example:**
532
+ ```bash
533
+ $ lua admin
534
+ ✓ Lua Admin Dashboard opened in your browser
535
+
536
+ Dashboard URL: https://admin.heylua.ai
537
+ Agent ID: agent-abc123
538
+ Organization ID: org-xyz789
539
+ ```
540
+
541
+ **Errors:**
542
+ ```bash
543
+ # No API key
544
+ ❌ Error during admin: No API key found. Please run "lua configure" first.
545
+
546
+ # Not in skill directory
547
+ ❌ Error during admin: Could not read lua.skill.yaml. Please ensure you are in a Lua skill directory.
548
+
549
+ # Missing configuration
550
+ ❌ Error during admin: No agentId found in lua.skill.yaml. Please ensure your configuration is valid.
551
+ ```
552
+
553
+ ---
554
+
555
+ ### `lua docs`
556
+
557
+ Opens the Lua documentation website in your default browser.
558
+
559
+ **Usage:**
560
+ ```bash
561
+ lua docs
562
+ ```
563
+
564
+ **What it does:**
565
+ Opens https://docs.heylua.ai in your default browser for quick access to:
566
+ - Platform overview and concepts
567
+ - CLI command reference
568
+ - API documentation and guides
569
+ - Tool examples (30+ examples)
570
+ - Integration tutorials
571
+ - Best practices and tips
572
+
573
+ **Requirements:**
574
+ None - works from anywhere
575
+
576
+ **Example:**
577
+ ```bash
578
+ $ lua docs
579
+ ✓ Lua Documentation opened in your browser
580
+
581
+ Documentation: https://docs.heylua.ai
582
+ ```
583
+
584
+ **Documentation Sections:**
585
+ - **Overview** - Platform introduction and key concepts
586
+ - **CLI** - Complete command reference
587
+ - **API Reference** - Platform APIs (Products, Baskets, Orders, Data)
588
+ - **Tool Examples** - E-commerce, integrations, custom logic
589
+ - **Demos** - Full example implementations
590
+ - **Best Practices** - Tips for building effective agents
591
+
592
+ ---
593
+
504
594
  ## Command Reference
505
595
 
506
596
  ### Global Flags