assistme 0.3.0 → 0.3.2

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/PLAN.md +14 -3
  2. package/dist/{chunk-UWE5WVQI.js → chunk-KX7ITO55.js} +20 -11
  3. package/dist/index.js +1791 -572
  4. package/dist/{job-runner-N4XAAWLJ.js → job-runner-P2L6MOOX.js} +1 -1
  5. package/package.json +5 -3
  6. package/src/agent/job-runner.ts +9 -13
  7. package/src/agent/mcp-servers.ts +6 -1020
  8. package/src/agent/memory.ts +2 -11
  9. package/src/agent/processor.ts +18 -108
  10. package/src/agent/scheduler.ts +2 -3
  11. package/src/agent/session.ts +20 -36
  12. package/src/agent/skills.ts +167 -61
  13. package/src/agent/system-prompt.ts +126 -0
  14. package/src/browser/chrome-launcher.ts +555 -0
  15. package/src/browser/controller.ts +1386 -0
  16. package/src/browser/types.ts +70 -0
  17. package/src/commands/credential.ts +190 -0
  18. package/src/commands/job.ts +14 -45
  19. package/src/commands/memory.ts +16 -29
  20. package/src/commands/schedule.ts +15 -37
  21. package/src/commands/start.ts +11 -43
  22. package/src/credentials/credential-store.test.ts +162 -0
  23. package/src/credentials/credential-store.ts +266 -0
  24. package/src/credentials/encryption.test.ts +98 -0
  25. package/src/credentials/encryption.ts +82 -0
  26. package/src/credentials/index.ts +15 -0
  27. package/src/credentials/local-store.ts +89 -0
  28. package/src/db/action.ts +19 -0
  29. package/src/db/api-client.ts +3 -32
  30. package/src/db/auth-store.ts +41 -0
  31. package/src/db/auth.ts +38 -0
  32. package/src/db/conversation.ts +39 -0
  33. package/src/db/event.ts +52 -0
  34. package/src/db/job-poll.ts +18 -0
  35. package/src/db/session.ts +60 -0
  36. package/src/db/supabase.ts +40 -383
  37. package/src/db/task.ts +69 -0
  38. package/src/db/types.ts +54 -0
  39. package/src/index.ts +2 -0
  40. package/src/mcp/agent-tools-server.ts +1047 -0
  41. package/src/mcp/browser-server.ts +258 -0
  42. package/src/tools/browser.ts +28 -1208
  43. package/src/tools/index.ts +32 -263
  44. package/src/tools/web.ts +0 -73
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JobRunner
3
- } from "./chunk-UWE5WVQI.js";
3
+ } from "./chunk-KX7ITO55.js";
4
4
  import "./chunk-TTEGHE2E.js";
5
5
  export {
6
6
  JobRunner
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistme",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "AssistMe CLI Agent - AI-powered assistant that controls your real browser",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,17 +20,19 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@anthropic-ai/claude-agent-sdk": "^0.2.63",
23
- "zod": "^4.0.0",
23
+ "better-sqlite3": "^12.6.2",
24
24
  "chalk": "^5.4.1",
25
25
  "commander": "^13.1.0",
26
26
  "conf": "^13.0.1",
27
27
  "dotenv": "^16.5.0",
28
28
  "glob": "^11.0.1",
29
29
  "ora": "^8.2.0",
30
- "ws": "^8.18.0"
30
+ "ws": "^8.18.0",
31
+ "zod": "^4.0.0"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@eslint/js": "^10.0.1",
35
+ "@types/better-sqlite3": "^7.6.13",
34
36
  "@types/node": "^22.13.0",
35
37
  "@types/ws": "^8.5.14",
36
38
  "eslint": "^10.0.2",
@@ -31,10 +31,6 @@ export interface JobRunInfo {
31
31
  // ── JobRunner ──────────────────────────────────────────────────────
32
32
 
33
33
  export class JobRunner {
34
- constructor(_userId: string) {
35
- // userId is no longer needed — auth is handled by the MCP token in callMcpHandler
36
- }
37
-
38
34
  /**
39
35
  * Load a job and its linked skills from the database.
40
36
  * Skills are the agent's *capabilities* — not a fixed execution plan.
@@ -43,7 +39,7 @@ export class JobRunner {
43
39
  try {
44
40
  const data = await callMcpHandler<Array<Record<string, unknown>> | null>(
45
41
  "job.get_with_skills",
46
- { job_name: jobName },
42
+ { job_name: jobName }
47
43
  );
48
44
 
49
45
  if (!data || (data as unknown[]).length === 0) {
@@ -74,11 +70,11 @@ export class JobRunner {
74
70
  /**
75
71
  * List all jobs for the user.
76
72
  */
77
- async listJobs(): Promise<Array<{ id: string; name: string; description: string; skillCount: number }>> {
73
+ async listJobs(): Promise<
74
+ Array<{ id: string; name: string; description: string; skillCount: number }>
75
+ > {
78
76
  try {
79
- const data = await callMcpHandler<Array<Record<string, unknown>>>(
80
- "job.list",
81
- );
77
+ const data = await callMcpHandler<Array<Record<string, unknown>>>("job.list");
82
78
 
83
79
  return (data || []).map((row) => ({
84
80
  id: row.id as string,
@@ -136,10 +132,10 @@ export class JobRunner {
136
132
  */
137
133
  async getRunHistory(jobName?: string, limit = 10): Promise<JobRunInfo[]> {
138
134
  try {
139
- const data = await callMcpHandler<Array<Record<string, unknown>>>(
140
- "job.get_runs",
141
- { job_name: jobName || null, limit },
142
- );
135
+ const data = await callMcpHandler<Array<Record<string, unknown>>>("job.get_runs", {
136
+ job_name: jobName || null,
137
+ limit,
138
+ });
143
139
 
144
140
  return (data || []).map((row) => ({
145
141
  runId: row.run_id as string,