projax 3.3.69 → 3.3.71

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 (44) hide show
  1. package/dist/agent-runner.d.ts +60 -0
  2. package/dist/agent-runner.js +382 -0
  3. package/dist/api/database.d.ts +38 -1
  4. package/dist/api/database.d.ts.map +1 -1
  5. package/dist/api/database.js +327 -0
  6. package/dist/api/database.js.map +1 -1
  7. package/dist/api/routes/agents.d.ts +4 -0
  8. package/dist/api/routes/agents.d.ts.map +1 -0
  9. package/dist/api/routes/agents.js +375 -0
  10. package/dist/api/routes/agents.js.map +1 -0
  11. package/dist/api/routes/index.d.ts.map +1 -1
  12. package/dist/api/routes/index.js +4 -0
  13. package/dist/api/routes/index.js.map +1 -1
  14. package/dist/api/routes/todos.d.ts +4 -0
  15. package/dist/api/routes/todos.d.ts.map +1 -0
  16. package/dist/api/routes/todos.js +595 -0
  17. package/dist/api/routes/todos.js.map +1 -0
  18. package/dist/api/types.d.ts +67 -0
  19. package/dist/api/types.d.ts.map +1 -1
  20. package/dist/core/database.d.ts +47 -0
  21. package/dist/core/database.js +48 -0
  22. package/dist/core-bridge.d.ts +1 -1
  23. package/dist/electron/core/database.d.ts +47 -0
  24. package/dist/electron/core/database.js +48 -0
  25. package/dist/electron/renderer/assets/index-6afBeDFD.js +66 -0
  26. package/dist/electron/renderer/assets/index-Bd3aFi7B.css +1 -0
  27. package/dist/electron/renderer/index.html +2 -2
  28. package/dist/index.js +6 -175
  29. package/dist/octopus-cli.d.ts +2 -0
  30. package/dist/octopus-cli.js +45 -0
  31. package/dist/octopus-show-tui.d.ts +1 -0
  32. package/dist/octopus-show-tui.js +802 -0
  33. package/dist/octopus-tui.d.ts +1 -0
  34. package/dist/octopus-tui.js +115 -0
  35. package/dist/prxi.js +373 -63
  36. package/dist/prxi.tsx +472 -65
  37. package/package.json +7 -2
  38. package/dist/electron/renderer/assets/index-BjZn_mEF.js +0 -66
  39. package/dist/electron/renderer/assets/index-CZmDxbJO.js +0 -66
  40. package/dist/electron/renderer/assets/index-Cd1mTO3s.js +0 -66
  41. package/dist/electron/renderer/assets/index-Cj4QON0s.js +0 -66
  42. package/dist/electron/renderer/assets/index-CmtZriN5.js +0 -66
  43. package/dist/electron/renderer/assets/index-DJDPi0kp.css +0 -1
  44. package/dist/electron/renderer/assets/index-DfocdjIj.css +0 -1
@@ -73,6 +73,69 @@ export interface ProjectSettings {
73
73
  script_sort_order: 'default' | 'alphabetical' | 'last-used';
74
74
  updated_at: number;
75
75
  }
76
+ export type AgentCliType = 'claude' | 'gemini' | 'openai' | 'xai' | 'ollama' | 'aider' | 'continue' | 'custom';
77
+ export interface Agent {
78
+ id: number;
79
+ project_id: number;
80
+ name: string;
81
+ cli_type: AgentCliType;
82
+ cli_command: string | null;
83
+ model: string | null;
84
+ api_key: string | null;
85
+ system_prompt: string | null;
86
+ temperature: number | null;
87
+ max_tokens: number | null;
88
+ additional_args: string | null;
89
+ created_at: number;
90
+ updated_at: number;
91
+ }
92
+ export interface RunningAgent {
93
+ pid: number;
94
+ agentId: number;
95
+ agentName: string;
96
+ projectId: number;
97
+ projectPath: string;
98
+ cliType: AgentCliType;
99
+ startedAt: number;
100
+ }
101
+ export interface TodoList {
102
+ id: number;
103
+ project_id: number;
104
+ name: string;
105
+ description: string | null;
106
+ created_at: number;
107
+ updated_at: number;
108
+ }
109
+ export type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'blocked';
110
+ export type TaskPriority = 'low' | 'medium' | 'high' | 'urgent';
111
+ export interface TodoTask {
112
+ id: number;
113
+ list_id: number;
114
+ title: string;
115
+ description: string | null;
116
+ status: TaskStatus;
117
+ priority: TaskPriority;
118
+ order: number;
119
+ assignee_agent_id: number | null;
120
+ worktree_path: string | null;
121
+ worktree_branch: string | null;
122
+ created_at: number;
123
+ updated_at: number;
124
+ completed_at: number | null;
125
+ }
126
+ export type AgentTaskRunStatus = 'running' | 'completed' | 'failed' | 'aborted';
127
+ export interface AgentTaskRun {
128
+ id: number;
129
+ agent_id: number;
130
+ task_id: number;
131
+ worktree_path: string;
132
+ worktree_branch: string;
133
+ status: AgentTaskRunStatus;
134
+ started_at: number;
135
+ completed_at: number | null;
136
+ output: string | null;
137
+ error_message: string | null;
138
+ }
76
139
  export interface DatabaseSchema {
77
140
  projects: Project[];
78
141
  tests: Test[];
@@ -87,5 +150,9 @@ export interface DatabaseSchema {
87
150
  workspaces: Workspace[];
88
151
  workspace_projects: WorkspaceProject[];
89
152
  project_settings: ProjectSettings[];
153
+ agents: Agent[];
154
+ todo_lists: TodoList[];
155
+ todo_tasks: TodoTask[];
156
+ agent_task_runs: AgentTaskRun[];
90
157
  }
91
158
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX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AAkB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpE,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,kBAAkB,EAAE,gBAAgB,EAAE,CAAC;IACvC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,eAAe,EAAE,YAAY,EAAE,CAAC;CACjC"}
@@ -51,6 +51,31 @@ export interface TestResult {
51
51
  timestamp: number;
52
52
  raw_output: string | null;
53
53
  }
54
+ export type AgentCliType = 'claude' | 'cline' | 'gemini' | 'openai' | 'xai' | 'ollama' | 'aider' | 'continue' | 'custom';
55
+ export interface Agent {
56
+ id: number;
57
+ project_id: number;
58
+ name: string;
59
+ cli_type: AgentCliType;
60
+ cli_command: string | null;
61
+ model: string | null;
62
+ api_key: string | null;
63
+ system_prompt: string | null;
64
+ temperature: number | null;
65
+ max_tokens: number | null;
66
+ additional_args: string | null;
67
+ created_at: number;
68
+ updated_at: number;
69
+ }
70
+ export interface RunningAgent {
71
+ pid: number;
72
+ agentId: number;
73
+ agentName: string;
74
+ projectId: number;
75
+ projectPath: string;
76
+ cliType: AgentCliType;
77
+ startedAt: number;
78
+ }
54
79
  type ScanResponse = {
55
80
  project: Project;
56
81
  testsFound: number;
@@ -91,6 +116,28 @@ declare class DatabaseManager {
91
116
  addTestResult(projectId: number, scriptName: string, passed: number, failed: number, skipped?: number, total?: number, duration?: number | null, coverage?: number | null, framework?: string | null, rawOutput?: string | null): TestResult;
92
117
  getLatestTestResult(projectId: number): TestResult | null;
93
118
  getTestResultsByProject(projectId: number, limit?: number): TestResult[];
119
+ getAgentsByProject(projectId: number): Agent[];
120
+ getAgent(id: number): Agent | null;
121
+ addAgent(projectId: number, data: {
122
+ name: string;
123
+ cli_type: AgentCliType;
124
+ cli_command?: string | null;
125
+ model?: string | null;
126
+ api_key?: string | null;
127
+ system_prompt?: string | null;
128
+ temperature?: number | null;
129
+ max_tokens?: number | null;
130
+ additional_args?: string | null;
131
+ }): Agent;
132
+ updateAgent(id: number, updates: Partial<Omit<Agent, 'id' | 'project_id' | 'created_at' | 'updated_at'>>): Agent;
133
+ removeAgent(id: number): void;
134
+ launchAgent(id: number): RunningAgent;
135
+ stopAgent(id: number): void;
136
+ getAgentStatus(id: number): {
137
+ running: boolean;
138
+ info?: RunningAgent;
139
+ };
140
+ getRunningAgents(): RunningAgent[];
94
141
  close(): void;
95
142
  }
96
143
  export declare function getDatabaseManager(): DatabaseManager;
@@ -260,6 +260,54 @@ class DatabaseManager {
260
260
  getTestResultsByProject(projectId, limit = 10) {
261
261
  return this.request(`/projects/${projectId}/test-results?limit=${limit}`);
262
262
  }
263
+ // Agent operations
264
+ getAgentsByProject(projectId) {
265
+ return this.request(`/projects/${projectId}/agents`);
266
+ }
267
+ getAgent(id) {
268
+ try {
269
+ return this.request(`/agents/${id}`);
270
+ }
271
+ catch (error) {
272
+ if (error instanceof Error && error.message.includes('not found')) {
273
+ return null;
274
+ }
275
+ throw error;
276
+ }
277
+ }
278
+ addAgent(projectId, data) {
279
+ return this.request(`/projects/${projectId}/agents`, {
280
+ method: 'POST',
281
+ body: JSON.stringify(data),
282
+ });
283
+ }
284
+ updateAgent(id, updates) {
285
+ return this.request(`/agents/${id}`, {
286
+ method: 'PUT',
287
+ body: JSON.stringify(updates),
288
+ });
289
+ }
290
+ removeAgent(id) {
291
+ this.request(`/agents/${id}`, {
292
+ method: 'DELETE',
293
+ });
294
+ }
295
+ launchAgent(id) {
296
+ return this.request(`/agents/${id}/launch`, {
297
+ method: 'POST',
298
+ });
299
+ }
300
+ stopAgent(id) {
301
+ this.request(`/agents/${id}/stop`, {
302
+ method: 'POST',
303
+ });
304
+ }
305
+ getAgentStatus(id) {
306
+ return this.request(`/agents/${id}/status`);
307
+ }
308
+ getRunningAgents() {
309
+ return this.request('/agents/running');
310
+ }
263
311
  close() {
264
312
  // No-op for API client
265
313
  }
@@ -1,2 +1,2 @@
1
1
  export declare const getDatabaseManager: typeof import("projax-core").getDatabaseManager, getAllProjects: typeof import("projax-core").getAllProjects, addProject: typeof import("projax-core").addProject, removeProject: typeof import("projax-core").removeProject, scanProject: typeof import("projax-core").scanProject, scanAllProjects: typeof import("projax-core").scanAllProjects, getCurrentBranch: typeof import("projax-core").getCurrentBranch;
2
- export type { Project, Test, ProjectPort } from 'projax-core';
2
+ export type { Project, Test, ProjectPort, Agent, AgentCliType, RunningAgent } from 'projax-core';
@@ -51,6 +51,31 @@ export interface TestResult {
51
51
  timestamp: number;
52
52
  raw_output: string | null;
53
53
  }
54
+ export type AgentCliType = 'claude' | 'cline' | 'gemini' | 'openai' | 'xai' | 'ollama' | 'aider' | 'continue' | 'custom';
55
+ export interface Agent {
56
+ id: number;
57
+ project_id: number;
58
+ name: string;
59
+ cli_type: AgentCliType;
60
+ cli_command: string | null;
61
+ model: string | null;
62
+ api_key: string | null;
63
+ system_prompt: string | null;
64
+ temperature: number | null;
65
+ max_tokens: number | null;
66
+ additional_args: string | null;
67
+ created_at: number;
68
+ updated_at: number;
69
+ }
70
+ export interface RunningAgent {
71
+ pid: number;
72
+ agentId: number;
73
+ agentName: string;
74
+ projectId: number;
75
+ projectPath: string;
76
+ cliType: AgentCliType;
77
+ startedAt: number;
78
+ }
54
79
  type ScanResponse = {
55
80
  project: Project;
56
81
  testsFound: number;
@@ -91,6 +116,28 @@ declare class DatabaseManager {
91
116
  addTestResult(projectId: number, scriptName: string, passed: number, failed: number, skipped?: number, total?: number, duration?: number | null, coverage?: number | null, framework?: string | null, rawOutput?: string | null): TestResult;
92
117
  getLatestTestResult(projectId: number): TestResult | null;
93
118
  getTestResultsByProject(projectId: number, limit?: number): TestResult[];
119
+ getAgentsByProject(projectId: number): Agent[];
120
+ getAgent(id: number): Agent | null;
121
+ addAgent(projectId: number, data: {
122
+ name: string;
123
+ cli_type: AgentCliType;
124
+ cli_command?: string | null;
125
+ model?: string | null;
126
+ api_key?: string | null;
127
+ system_prompt?: string | null;
128
+ temperature?: number | null;
129
+ max_tokens?: number | null;
130
+ additional_args?: string | null;
131
+ }): Agent;
132
+ updateAgent(id: number, updates: Partial<Omit<Agent, 'id' | 'project_id' | 'created_at' | 'updated_at'>>): Agent;
133
+ removeAgent(id: number): void;
134
+ launchAgent(id: number): RunningAgent;
135
+ stopAgent(id: number): void;
136
+ getAgentStatus(id: number): {
137
+ running: boolean;
138
+ info?: RunningAgent;
139
+ };
140
+ getRunningAgents(): RunningAgent[];
94
141
  close(): void;
95
142
  }
96
143
  export declare function getDatabaseManager(): DatabaseManager;
@@ -260,6 +260,54 @@ class DatabaseManager {
260
260
  getTestResultsByProject(projectId, limit = 10) {
261
261
  return this.request(`/projects/${projectId}/test-results?limit=${limit}`);
262
262
  }
263
+ // Agent operations
264
+ getAgentsByProject(projectId) {
265
+ return this.request(`/projects/${projectId}/agents`);
266
+ }
267
+ getAgent(id) {
268
+ try {
269
+ return this.request(`/agents/${id}`);
270
+ }
271
+ catch (error) {
272
+ if (error instanceof Error && error.message.includes('not found')) {
273
+ return null;
274
+ }
275
+ throw error;
276
+ }
277
+ }
278
+ addAgent(projectId, data) {
279
+ return this.request(`/projects/${projectId}/agents`, {
280
+ method: 'POST',
281
+ body: JSON.stringify(data),
282
+ });
283
+ }
284
+ updateAgent(id, updates) {
285
+ return this.request(`/agents/${id}`, {
286
+ method: 'PUT',
287
+ body: JSON.stringify(updates),
288
+ });
289
+ }
290
+ removeAgent(id) {
291
+ this.request(`/agents/${id}`, {
292
+ method: 'DELETE',
293
+ });
294
+ }
295
+ launchAgent(id) {
296
+ return this.request(`/agents/${id}/launch`, {
297
+ method: 'POST',
298
+ });
299
+ }
300
+ stopAgent(id) {
301
+ this.request(`/agents/${id}/stop`, {
302
+ method: 'POST',
303
+ });
304
+ }
305
+ getAgentStatus(id) {
306
+ return this.request(`/agents/${id}/status`);
307
+ }
308
+ getRunningAgents() {
309
+ return this.request('/agents/running');
310
+ }
263
311
  close() {
264
312
  // No-op for API client
265
313
  }