feat: add TypeScript support and shared types
- Added TypeScript configuration file (tsconfig.json) with strict settings. - Introduced devDependencies for TypeScript in package.json. - Added scripts for type checking and watching for changes. - Created a new types file (lib/types.ts) defining shared types for the DevClaw plugin.
This commit is contained in:
17
lib/types.ts
Normal file
17
lib/types.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Shared types for the DevClaw plugin.
|
||||
*
|
||||
* OpenClawPluginToolContext is declared in the plugin-sdk but not exported.
|
||||
* We define a compatible local type for use in tool factory functions.
|
||||
*/
|
||||
|
||||
export type ToolContext = {
|
||||
config?: Record<string, unknown>;
|
||||
workspaceDir?: string;
|
||||
agentDir?: string;
|
||||
agentId?: string;
|
||||
sessionKey?: string;
|
||||
messageChannel?: string;
|
||||
agentAccountId?: string;
|
||||
sandboxed?: boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user