palmier 0.1.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/src/types.ts ADDED
@@ -0,0 +1,63 @@
1
+ export interface AgentConfig {
2
+ agentId: string;
3
+ userId: string;
4
+ natsUrl: string;
5
+ natsWsUrl: string;
6
+ natsToken: string;
7
+ projectRoot: string;
8
+ }
9
+
10
+ export interface TaskFrontmatter {
11
+ id: string;
12
+ name: string;
13
+ user_prompt: string;
14
+ triggers: Trigger[];
15
+ requires_confirmation: boolean;
16
+ suppress_permissions: boolean;
17
+ enabled: boolean;
18
+ }
19
+
20
+ export interface Trigger {
21
+ type: "cron" | "once";
22
+ value: string;
23
+ }
24
+
25
+ export interface ParsedTask {
26
+ frontmatter: TaskFrontmatter;
27
+ body: string;
28
+ }
29
+
30
+ export interface TaskStatus {
31
+ state: "active" | "inactive" | "failed";
32
+ lastRun?: string;
33
+ lastResult?: number;
34
+ nextRun?: string;
35
+ }
36
+
37
+ export interface TaskWithStatus extends ParsedTask {
38
+ status: TaskStatus;
39
+ }
40
+
41
+ export interface HookPayload {
42
+ type: "confirm" | "permission" | "input";
43
+ task_id: string;
44
+ hook_id: string;
45
+ agent_id: string;
46
+ user_id: string;
47
+ details: Record<string, unknown>;
48
+ status: string;
49
+ }
50
+
51
+ export interface ClaudeHookEvent {
52
+ hook_name: string;
53
+ session_id: string;
54
+ tool_name?: string;
55
+ tool_input?: Record<string, unknown>;
56
+ message?: string;
57
+ [key: string]: unknown;
58
+ }
59
+
60
+ export interface RpcMessage {
61
+ method: string;
62
+ params: Record<string, unknown>;
63
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "Node16",
5
+ "moduleResolution": "Node16",
6
+ "outDir": "dist",
7
+ "rootDir": "src",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "sourceMap": true
16
+ },
17
+ "include": ["src/**/*"],
18
+ "exclude": ["node_modules", "dist"]
19
+ }