@aiderdesk/extensions 0.3.1 → 0.5.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/README.md +8 -0
- package/dist/cli.js +0 -0
- package/dist/index.d.ts +1477 -0
- package/dist/index.js +23 -0
- package/extensions.d.ts +24 -3
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -14,17 +14,25 @@ pnpm add @aiderdesk/extensions
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
+
Import both types and runtime values from a single entry point:
|
|
18
|
+
|
|
17
19
|
```typescript
|
|
18
20
|
import type { Extension, ExtensionContext, ToolDefinition } from '@aiderdesk/extensions';
|
|
21
|
+
import { ToolApprovalState } from '@aiderdesk/extensions';
|
|
19
22
|
import { z } from 'zod';
|
|
20
23
|
|
|
21
24
|
export default class MyExtension implements Extension {
|
|
22
25
|
async onLoad(context: ExtensionContext) {
|
|
23
26
|
context.log('Extension loaded!', 'info');
|
|
27
|
+
|
|
28
|
+
// Runtime values are available too
|
|
29
|
+
const approval = ToolApprovalState.Always;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
```
|
|
27
33
|
|
|
34
|
+
**Note**: The package provides both TypeScript type definitions and runtime JavaScript values (like enum values) from the same entry point. You can use `import type` for type-only imports, or regular imports for runtime values.
|
|
35
|
+
|
|
28
36
|
## Example Extensions
|
|
29
37
|
|
|
30
38
|
This directory contains example extensions demonstrating various capabilities of the AiderDesk extension system.
|
package/dist/cli.js
CHANGED
|
File without changes
|