lua-cli 3.0.0-alpha.1 → 3.0.0-alpha.5
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/dist/api/job.api.service.d.ts +16 -7
- package/dist/api/job.api.service.js +21 -5
- package/dist/api/postprocessor.api.service.d.ts +61 -1
- package/dist/api/postprocessor.api.service.js +35 -0
- package/dist/api/preprocessor.api.service.d.ts +61 -1
- package/dist/api/preprocessor.api.service.js +35 -0
- package/dist/api-exports.d.ts +26 -6
- package/dist/api-exports.js +42 -29
- package/dist/cli/command-definitions.js +13 -6
- package/dist/commands/chat.js +32 -5
- package/dist/commands/compile.js +16 -2
- package/dist/commands/dev.js +23 -2
- package/dist/commands/push.d.ts +6 -2
- package/dist/commands/push.js +412 -6
- package/dist/commands/test.js +18 -2
- package/dist/common/job.instance.d.ts +3 -0
- package/dist/common/job.instance.js +8 -0
- package/dist/config/constants.d.ts +6 -5
- package/dist/config/constants.js +12 -10
- package/dist/interfaces/chat.d.ts +30 -1
- package/dist/interfaces/jobs.d.ts +21 -0
- package/dist/types/skill.d.ts +75 -56
- package/dist/types/skill.js +53 -59
- package/dist/utils/bundling.d.ts +13 -4
- package/dist/utils/bundling.js +83 -26
- package/dist/utils/compile.js +27 -6
- package/dist/utils/dev-api.d.ts +42 -2
- package/dist/utils/dev-api.js +177 -4
- package/dist/utils/dev-server.d.ts +1 -1
- package/dist/utils/dev-server.js +4 -4
- package/dist/utils/dynamic-job-bundler.d.ts +17 -0
- package/dist/utils/dynamic-job-bundler.js +143 -0
- package/dist/utils/pre-bundle-jobs.d.ts +26 -0
- package/dist/utils/pre-bundle-jobs.js +176 -0
- package/dist/utils/sandbox-storage.d.ts +48 -0
- package/dist/utils/sandbox-storage.js +114 -0
- package/dist/utils/sandbox.d.ts +2 -2
- package/dist/utils/sandbox.js +23 -7
- package/package.json +1 -1
- package/template/lua.skill.yaml +47 -0
- package/template/package-lock.json +10505 -0
- package/template/package.json +2 -1
- package/template/src/index.ts +65 -3
- package/template/src/tools/CreateInlineJob.ts +42 -0
- package/API_REFERENCE.md +0 -1408
- package/CHANGELOG.md +0 -236
- package/CLI_REFERENCE.md +0 -908
- package/GETTING_STARTED.md +0 -1040
- package/INSTANCE_TYPES.md +0 -1158
- package/README.md +0 -865
- package/TEMPLATE_GUIDE.md +0 -1398
- package/USER_DATA_INSTANCE.md +0 -621
- package/template/AGENT_CONFIGURATION.md +0 -251
- package/template/COMPLEX_JOB_EXAMPLES.md +0 -795
- package/template/DYNAMIC_JOB_CREATION.md +0 -371
- package/template/TOOL_EXAMPLES.md +0 -655
- package/template/WEBHOOKS_JOBS_QUICKSTART.md +0 -318
- package/template/WEBHOOK_JOB_EXAMPLES.md +0 -817
- package/template/src/index-agent-example.ts +0 -201
- package/template/src/postprocessors/ResponseFormatter.ts +0 -151
- package/template/src/preprocessors/MessageFilter.ts +0 -91
package/CHANGELOG.md
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
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
|
-
|
|
37
|
-
## [2.5.1] - 2025-10-07
|
|
38
|
-
|
|
39
|
-
### 🐛 Bug Fixes
|
|
40
|
-
- **TypeScript Index Signature**: Added index signature to `UserDataInstance` class to fix TypeScript linting errors
|
|
41
|
-
- Resolves "Property does not exist on type" errors when accessing dynamic properties like `user.name`
|
|
42
|
-
- Now properly typed for dynamic property access via Proxy
|
|
43
|
-
|
|
44
|
-
## [2.5.0] - 2025-10-07
|
|
45
|
-
|
|
46
|
-
### ✨ New Features
|
|
47
|
-
- **Direct Property Access for UserDataInstance**: Now supports intuitive property access using Proxy pattern
|
|
48
|
-
- Access user data with `user.name` instead of `user.data.name`
|
|
49
|
-
- Set properties directly with `user.name = "John"`
|
|
50
|
-
- Full backward compatibility maintained - `user.data.name` still works
|
|
51
|
-
- Proper enumeration support for `Object.keys()` and `in` operator
|
|
52
|
-
|
|
53
|
-
### 🔧 Improvements
|
|
54
|
-
- **Reduced Sensitive Field Filtering**: Sanitization now only removes `agentId` and `userId`
|
|
55
|
-
- Allows access to more user data fields while maintaining essential privacy
|
|
56
|
-
- Custom keys and tokens are now accessible in tools
|
|
57
|
-
|
|
58
|
-
### 📖 Documentation
|
|
59
|
-
- **Comprehensive UserDataInstance Documentation**: Added full API reference with examples
|
|
60
|
-
|
|
61
|
-
### Technical Details
|
|
62
|
-
- Enhanced Proxy implementation with proper trap handlers for get, set, has, ownKeys, and getOwnPropertyDescriptor
|
|
63
|
-
- Reserved properties (`data`, `userAPI`, `update`, `clear`, `toJSON`) protected from proxy interception
|
|
64
|
-
- Maintains all existing methods and behavior while adding new access patterns
|
|
65
|
-
|
|
66
|
-
## [1.3.2-alpha.3] - 2025-09-25
|
|
67
|
-
|
|
68
|
-
### 🚀 Major Rewrite
|
|
69
|
-
- **Complete compiler rewrite** using TypeScript AST (ts-morph) instead of regex
|
|
70
|
-
- **Self-contained tool bundling** with esbuild and minification
|
|
71
|
-
- **85% file size reduction** (4MB → 612KB total bundle size)
|
|
72
|
-
- **Zero regex usage** - pure AST-based parsing for reliability
|
|
73
|
-
|
|
74
|
-
### ✨ New Features
|
|
75
|
-
- **Enhanced Zod schema parsing** for nested objects and arrays
|
|
76
|
-
- **Comprehensive polyfills** for browser/Node.js APIs (AbortController, FormData, TextEncoder, crypto, etc.)
|
|
77
|
-
- **Optimized bundling** excludes lua-cli modules (injected by VM) for smaller sizes
|
|
78
|
-
- **Dual output format** - both new (dist/) and legacy (.lua/) formats
|
|
79
|
-
|
|
80
|
-
### 🔧 Improvements
|
|
81
|
-
- **Proper environment variable injection** from lua.skill.yaml into VM
|
|
82
|
-
- **Minified output** for production deployment
|
|
83
|
-
- **Better error handling** with proper TypeScript AST validation
|
|
84
|
-
- **Full backward compatibility** with existing deployment workflow
|
|
85
|
-
|
|
86
|
-
### 📦 Bundle Size Optimizations
|
|
87
|
-
- Simple tools (Weather, UserData): 545KB → 4KB (99% reduction)
|
|
88
|
-
- HTTP tools (CreatePost): 863KB → 232KB (73% reduction)
|
|
89
|
-
- AI tools (SearchMovies): 1.4MB → 364KB (74% reduction)
|
|
90
|
-
|
|
91
|
-
## [1.3.0-alpha.1] - 2024-12-19
|
|
92
|
-
|
|
93
|
-
### Added
|
|
94
|
-
- **Centralized CLI Utilities**: New `src/utils/cli.ts` module for consistent error handling and output management
|
|
95
|
-
- **Command Restructuring**: Reorganized commands into logical groups:
|
|
96
|
-
- `lua auth` - Authentication management (configure, logout, key)
|
|
97
|
-
- `lua skill` - Skill development (init, compile, test, push, dev, deploy)
|
|
98
|
-
- **Enhanced Error Handling**: Graceful handling of Ctrl+C (SIGINT) across all commands
|
|
99
|
-
- **Consistent Output Management**: Standardized progress messages, success messages, and prompt clearing
|
|
100
|
-
- **Tool Name Validation**: Regex-based validation for tool names (alphanumeric, hyphens, underscores only)
|
|
101
|
-
- **Version Management**: TOML-based version tracking with automatic versioning
|
|
102
|
-
- **Skill Push/Deploy/Dev**: New commands for version management, sandbox development, and production deployment
|
|
103
|
-
- **Smart Sandbox Management**: Dev command intelligently reuses existing sandbox skill IDs and falls back to creating new ones when needed
|
|
104
|
-
- **File Watching Mode**: Dev command now watches for file changes and automatically recompiles and pushes to sandbox
|
|
105
|
-
- **Web Chat Interface**: Dev command now includes a beautiful web-based chat interface for real-time skill testing
|
|
106
|
-
- **Live Log Panel**: Real-time log feed with WebSocket connection for monitoring execution details
|
|
107
|
-
- **Log Details Support**: Enhanced log display with detailed information sections and proper error handling
|
|
108
|
-
- **Comprehensive Testing**: 100% test coverage for CLI utilities with 44 passing tests
|
|
109
|
-
|
|
110
|
-
### Changed
|
|
111
|
-
- **Command Structure**:
|
|
112
|
-
- `lua configure` → `lua auth configure`
|
|
113
|
-
- `lua destroy` → `lua auth logout`
|
|
114
|
-
- `lua apiKey` → `lua auth key`
|
|
115
|
-
- `lua init` → `lua skill init`
|
|
116
|
-
- `lua compile` → `lua skill compile`
|
|
117
|
-
- `lua test` → `lua skill test`
|
|
118
|
-
- Added `lua skill push`, `lua skill dev`, and `lua skill deploy`
|
|
119
|
-
- **LuaSkill Constructor**: Now accepts object `{description, context}` instead of separate parameters
|
|
120
|
-
- **TOML Configuration**: Added `version` and `skillId` fields to `lua.skill.toml`
|
|
121
|
-
- **Error Messages**: Standardized format: `"❌ Error during [command]: [message]"`
|
|
122
|
-
- **Output Consistency**: All commands now use centralized utilities for consistent UX
|
|
123
|
-
|
|
124
|
-
### Technical Improvements
|
|
125
|
-
- **Zero Code Duplication**: Centralized error handling eliminates repetitive code
|
|
126
|
-
- **Professional UX**: Clean, consistent output with preserved command history
|
|
127
|
-
- **Maintainable Architecture**: Single source of truth for CLI patterns
|
|
128
|
-
- **Type Safety**: Enhanced TypeScript interfaces and validation
|
|
129
|
-
- **Test Coverage**: Comprehensive test suite with 100% CLI utility coverage
|
|
130
|
-
|
|
131
|
-
### Security
|
|
132
|
-
- **Input Validation**: Tool name validation prevents injection attacks
|
|
133
|
-
- **Graceful Cancellation**: Proper handling of user interruptions
|
|
134
|
-
- **Error Isolation**: Centralized error handling prevents crashes
|
|
135
|
-
|
|
136
|
-
### Documentation
|
|
137
|
-
- **Updated README**: Reflects new command structure and features
|
|
138
|
-
- **Developer Guide**: Enhanced documentation for LuaSkill constructor
|
|
139
|
-
- **API Reference**: Updated examples and usage patterns
|
|
140
|
-
|
|
141
|
-
## [1.2.1] - 2024-09-19
|
|
142
|
-
|
|
143
|
-
### Fixed
|
|
144
|
-
- **Dependency Issue**: Moved `esbuild` from devDependencies to dependencies to fix bundling in global installations
|
|
145
|
-
- **TypeScript Errors**: Fixed implicit `any` type errors in template tool files
|
|
146
|
-
|
|
147
|
-
## [1.2.0] - 2024-09-19
|
|
148
|
-
|
|
149
|
-
### Added
|
|
150
|
-
- **Tool Development Framework**: Complete LuaSkill and LuaTool framework for building custom tools
|
|
151
|
-
- **Dependency Bundling**: Automatic bundling of npm packages using esbuild
|
|
152
|
-
- **Interactive Testing**: Real-time tool testing with `lua test` command
|
|
153
|
-
- **Code Compression**: Gzip compression for efficient storage of bundled code
|
|
154
|
-
- **In-Memory Execution**: VM-based execution without temporary files
|
|
155
|
-
- **Comprehensive Documentation**: Complete guides, API reference, and examples
|
|
156
|
-
- **Template System**: Rich template with 5 example tools and services
|
|
157
|
-
- **TypeScript Support**: Full TypeScript integration with Zod validation
|
|
158
|
-
- **Error Handling**: Robust error handling and validation throughout
|
|
159
|
-
- **Performance Optimization**: Optimized bundling and execution
|
|
160
|
-
|
|
161
|
-
### New Commands
|
|
162
|
-
- **`lua compile`**: Bundle dependencies and compile LuaSkills
|
|
163
|
-
- **`lua test`**: Interactive testing interface for tools
|
|
164
|
-
- **`lua deploy`**: Deploy compiled skills to the Lua platform
|
|
165
|
-
|
|
166
|
-
### Technical Improvements
|
|
167
|
-
- **esbuild Integration**: Fast bundling of external dependencies
|
|
168
|
-
- **VM Context**: Secure in-memory execution environment
|
|
169
|
-
- **Schema Validation**: Zod-based input/output validation
|
|
170
|
-
- **Service Architecture**: Reusable service components
|
|
171
|
-
- **Template Examples**: Calculator, Math, Weather, API, and File operation tools
|
|
172
|
-
- **Documentation Suite**: README, Developer Guide, API Reference, and Quick Start
|
|
173
|
-
|
|
174
|
-
### Security
|
|
175
|
-
- **Sandboxed Execution**: Tools run in isolated VM contexts
|
|
176
|
-
- **Input Validation**: Comprehensive Zod schema validation
|
|
177
|
-
- **Error Isolation**: Proper error handling prevents crashes
|
|
178
|
-
|
|
179
|
-
## [1.1.0] - 2024-01-XX
|
|
180
|
-
|
|
181
|
-
### Added
|
|
182
|
-
- **Email Authentication**: New email-based OTP authentication method in `lua configure`
|
|
183
|
-
- **API Key Display**: New `lua apiKey` command to view stored API key
|
|
184
|
-
- **Modular Architecture**: Complete codebase refactoring into organized modules
|
|
185
|
-
- **TypeScript Types**: Comprehensive type definitions for all API responses
|
|
186
|
-
- **Command Structure**: Individual command files for better maintainability
|
|
187
|
-
|
|
188
|
-
### Changed
|
|
189
|
-
- **Project Structure**: Reorganized codebase into logical directories:
|
|
190
|
-
- `src/commands/` - Individual command implementations
|
|
191
|
-
- `src/services/` - API and authentication services
|
|
192
|
-
- `src/types/` - TypeScript interface definitions
|
|
193
|
-
- `src/utils/` - Utility functions
|
|
194
|
-
- **Main File**: Reduced `src/index.ts` from 392 lines to 39 lines
|
|
195
|
-
- **Authentication Flow**: Enhanced `lua configure` with dual authentication methods
|
|
196
|
-
- **Error Handling**: Improved error messages and validation throughout
|
|
197
|
-
|
|
198
|
-
### Technical Improvements
|
|
199
|
-
- **Code Organization**: Separated concerns for better maintainability
|
|
200
|
-
- **Type Safety**: Added proper TypeScript interfaces for all API responses
|
|
201
|
-
- **Reusability**: Services can now be shared across multiple commands
|
|
202
|
-
- **Scalability**: Easy to add new commands without cluttering main file
|
|
203
|
-
- **Testing Ready**: Modular structure enables independent testing
|
|
204
|
-
|
|
205
|
-
### Security
|
|
206
|
-
- **OTP Verification**: Secure email-based authentication with 6-digit codes
|
|
207
|
-
- **Token Management**: Proper handling of sign-in tokens and API key generation
|
|
208
|
-
- **Confirmation Prompts**: Added safety confirmations for sensitive operations
|
|
209
|
-
|
|
210
|
-
## [1.0.0] - 2024-01-XX
|
|
211
|
-
|
|
212
|
-
### Added
|
|
213
|
-
- **Initial Release**: First version of Lua CLI
|
|
214
|
-
- **API Key Authentication**: Direct API key input and validation
|
|
215
|
-
- **Project Initialization**: `lua init` command for creating new skill projects
|
|
216
|
-
- **Agent Management**: `lua agents` command to fetch and display agents
|
|
217
|
-
- **Credential Management**: `lua destroy` command to delete stored API keys
|
|
218
|
-
- **Template System**: Automatic template file copying for new projects
|
|
219
|
-
- **Secure Storage**: API keys stored using system credential manager
|
|
220
|
-
- **Interactive Prompts**: User-friendly command-line interface with inquirer
|
|
221
|
-
- **Organization Selection**: Choose from available organizations
|
|
222
|
-
- **Agent Selection**: Select agents within chosen organizations
|
|
223
|
-
- **TOML Configuration**: Generate `lua.skill.toml` configuration files
|
|
224
|
-
|
|
225
|
-
### Features
|
|
226
|
-
- **Cross-platform**: Works on Windows, macOS, and Linux
|
|
227
|
-
- **Secure**: Uses keytar for secure credential storage
|
|
228
|
-
- **User-friendly**: Interactive prompts and clear error messages
|
|
229
|
-
- **Template-based**: Quick project setup with pre-configured templates
|
|
230
|
-
- **Validation**: Input validation for email addresses and OTP codes
|
|
231
|
-
|
|
232
|
-
### Technical Details
|
|
233
|
-
- **Node.js**: Requires Node.js 16.0.0 or higher
|
|
234
|
-
- **TypeScript**: Built with TypeScript for type safety
|
|
235
|
-
- **Dependencies**: Uses commander, inquirer, keytar, and node-fetch
|
|
236
|
-
- **ES Modules**: Modern ES module syntax throughout
|