@pushpalsdev/cli 1.0.18 → 1.0.19

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 (106) hide show
  1. package/dist/pushpals-cli.js +277 -12
  2. package/package.json +1 -1
  3. package/runtime/sandbox/apps/workerpals/.python-version +1 -0
  4. package/runtime/sandbox/apps/workerpals/Dockerfile.sandbox +71 -0
  5. package/runtime/sandbox/apps/workerpals/package.json +25 -0
  6. package/runtime/sandbox/apps/workerpals/pyproject.toml +8 -0
  7. package/runtime/sandbox/apps/workerpals/src/backends/backend_config.ts +111 -0
  8. package/runtime/sandbox/apps/workerpals/src/backends/miniswe/miniswe_executor.py +2029 -0
  9. package/runtime/sandbox/apps/workerpals/src/backends/miniswe_backend.ts +48 -0
  10. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex/openai_codex_executor.py +1259 -0
  11. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex/test_openai_codex_runtime_config.py +110 -0
  12. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex_backend.ts +67 -0
  13. package/runtime/sandbox/apps/workerpals/src/backends/openhands/openhands_executor.py +563 -0
  14. package/runtime/sandbox/apps/workerpals/src/backends/openhands_backend.ts +161 -0
  15. package/runtime/sandbox/apps/workerpals/src/backends/openhands_task_execute.ts +536 -0
  16. package/runtime/sandbox/apps/workerpals/src/backends/shared/executor_base.py +746 -0
  17. package/runtime/sandbox/apps/workerpals/src/backends/shared/test_settings_resolver.py +60 -0
  18. package/runtime/sandbox/apps/workerpals/src/backends/task_execute_registry.ts +21 -0
  19. package/runtime/sandbox/apps/workerpals/src/backends/types.ts +52 -0
  20. package/runtime/sandbox/apps/workerpals/src/common/execution_utils.ts +149 -0
  21. package/runtime/sandbox/apps/workerpals/src/common/executor_backend.ts +15 -0
  22. package/runtime/sandbox/apps/workerpals/src/common/generic_python_executor.ts +210 -0
  23. package/runtime/sandbox/apps/workerpals/src/common/logger.ts +65 -0
  24. package/runtime/sandbox/apps/workerpals/src/common/types.ts +9 -0
  25. package/runtime/sandbox/apps/workerpals/src/common/worktree_cleanup.ts +66 -0
  26. package/runtime/sandbox/apps/workerpals/src/context_manager.ts +45 -0
  27. package/runtime/sandbox/apps/workerpals/src/docker_executor.ts +1842 -0
  28. package/runtime/sandbox/apps/workerpals/src/execute_job.ts +3063 -0
  29. package/runtime/sandbox/apps/workerpals/src/job_runner.ts +194 -0
  30. package/runtime/sandbox/apps/workerpals/src/shell_manager.ts +210 -0
  31. package/runtime/sandbox/apps/workerpals/src/timeout_policy.ts +24 -0
  32. package/runtime/sandbox/apps/workerpals/src/workerpals_main.ts +1436 -0
  33. package/runtime/sandbox/apps/workerpals/tsconfig.json +15 -0
  34. package/runtime/sandbox/apps/workerpals/uv.lock +2014 -0
  35. package/runtime/sandbox/bun.lock +2591 -0
  36. package/runtime/sandbox/configs/backend.toml +79 -0
  37. package/runtime/sandbox/configs/default.toml +260 -0
  38. package/runtime/sandbox/configs/dev.toml +2 -0
  39. package/runtime/sandbox/configs/local.example.toml +129 -0
  40. package/runtime/sandbox/package.json +65 -0
  41. package/runtime/sandbox/packages/protocol/README.md +168 -0
  42. package/runtime/sandbox/packages/protocol/package.json +37 -0
  43. package/runtime/sandbox/packages/protocol/scripts/copy-schemas.js +17 -0
  44. package/runtime/sandbox/packages/protocol/src/a2a/README.md +52 -0
  45. package/runtime/sandbox/packages/protocol/src/a2a/mapping.ts +55 -0
  46. package/runtime/sandbox/packages/protocol/src/index.browser.ts +25 -0
  47. package/runtime/sandbox/packages/protocol/src/index.ts +25 -0
  48. package/runtime/sandbox/packages/protocol/src/schemas/approvals.schema.json +6 -0
  49. package/runtime/sandbox/packages/protocol/src/schemas/envelope.schema.json +96 -0
  50. package/runtime/sandbox/packages/protocol/src/schemas/events.schema.json +679 -0
  51. package/runtime/sandbox/packages/protocol/src/schemas/http.schema.json +50 -0
  52. package/runtime/sandbox/packages/protocol/src/types.ts +267 -0
  53. package/runtime/sandbox/packages/protocol/src/validate.browser.ts +154 -0
  54. package/runtime/sandbox/packages/protocol/src/validate.ts +233 -0
  55. package/runtime/sandbox/packages/protocol/src/version.ts +1 -0
  56. package/runtime/sandbox/packages/protocol/tsconfig.json +20 -0
  57. package/runtime/sandbox/packages/shared/package.json +19 -0
  58. package/runtime/sandbox/packages/shared/src/autonomy_policy.ts +400 -0
  59. package/runtime/sandbox/packages/shared/src/client_preflight.ts +297 -0
  60. package/runtime/sandbox/packages/shared/src/communication.ts +313 -0
  61. package/runtime/sandbox/packages/shared/src/config.ts +2201 -0
  62. package/runtime/sandbox/packages/shared/src/config_template_parity.ts +70 -0
  63. package/runtime/sandbox/packages/shared/src/git_backend.ts +205 -0
  64. package/runtime/sandbox/packages/shared/src/index.ts +100 -0
  65. package/runtime/sandbox/packages/shared/src/local_network.ts +101 -0
  66. package/runtime/sandbox/packages/shared/src/localbuddy_runtime.ts +329 -0
  67. package/runtime/sandbox/packages/shared/src/prompts.ts +64 -0
  68. package/runtime/sandbox/packages/shared/src/repo.ts +134 -0
  69. package/runtime/sandbox/packages/shared/src/session_event_visibility.ts +25 -0
  70. package/runtime/sandbox/packages/shared/src/vision.ts +247 -0
  71. package/runtime/sandbox/packages/shared/tsconfig.json +16 -0
  72. package/runtime/sandbox/prompts/workerpals/codex_quality_critic_instruction_prompt.md +14 -0
  73. package/runtime/sandbox/prompts/workerpals/commit_message_prompt.md +36 -0
  74. package/runtime/sandbox/prompts/workerpals/commit_message_user_prompt.md +7 -0
  75. package/runtime/sandbox/prompts/workerpals/miniswe_broker_system_prompt.md +33 -0
  76. package/runtime/sandbox/prompts/workerpals/miniswe_broker_task_prompt.md +5 -0
  77. package/runtime/sandbox/prompts/workerpals/miniswe_completion_requirement.md +1 -0
  78. package/runtime/sandbox/prompts/workerpals/miniswe_context_compaction_retry_prompt.md +1 -0
  79. package/runtime/sandbox/prompts/workerpals/miniswe_explicit_targets_block.md +2 -0
  80. package/runtime/sandbox/prompts/workerpals/miniswe_recovery_guidance_base.md +4 -0
  81. package/runtime/sandbox/prompts/workerpals/miniswe_recovery_guidance_blocker_line.md +1 -0
  82. package/runtime/sandbox/prompts/workerpals/miniswe_strict_tool_use_guidance.md +6 -0
  83. package/runtime/sandbox/prompts/workerpals/miniswe_supplemental_guidance_section.md +2 -0
  84. package/runtime/sandbox/prompts/workerpals/miniswe_timeout_note.md +1 -0
  85. package/runtime/sandbox/prompts/workerpals/miniswe_toolcall_retry_guidance.md +1 -0
  86. package/runtime/sandbox/prompts/workerpals/openai_codex_default_system_prompt.md +4 -0
  87. package/runtime/sandbox/prompts/workerpals/openai_codex_instruction_wrapper.md +5 -0
  88. package/runtime/sandbox/prompts/workerpals/openai_codex_runtime_policy_appendix.md +5 -0
  89. package/runtime/sandbox/prompts/workerpals/openai_codex_supplemental_guidance_section.md +2 -0
  90. package/runtime/sandbox/prompts/workerpals/openai_codex_task_execute_system_prompt.md +12 -0
  91. package/runtime/sandbox/prompts/workerpals/openhands_minimal_security_policy.j2 +8 -0
  92. package/runtime/sandbox/prompts/workerpals/openhands_minimal_system_prompt.j2 +20 -0
  93. package/runtime/sandbox/prompts/workerpals/openhands_strict_tool_use_message.md +1 -0
  94. package/runtime/sandbox/prompts/workerpals/openhands_supplemental_guidance_message.md +2 -0
  95. package/runtime/sandbox/prompts/workerpals/openhands_task_execute_fallback_system_prompt.md +1 -0
  96. package/runtime/sandbox/prompts/workerpals/openhands_task_execute_system_prompt.md +21 -0
  97. package/runtime/sandbox/prompts/workerpals/openhands_task_user_prompt.md +6 -0
  98. package/runtime/sandbox/prompts/workerpals/openhands_timeout_note.md +1 -0
  99. package/runtime/sandbox/prompts/workerpals/pr_description.md +42 -0
  100. package/runtime/sandbox/prompts/workerpals/task_quality_critic_system_prompt.md +9 -0
  101. package/runtime/sandbox/prompts/workerpals/task_quality_critic_user_prompt.md +17 -0
  102. package/runtime/sandbox/prompts/workerpals/workerpals_system_prompt.md +115 -0
  103. package/runtime/sandbox/protocol/schemas/approvals.schema.json +6 -0
  104. package/runtime/sandbox/protocol/schemas/envelope.schema.json +96 -0
  105. package/runtime/sandbox/protocol/schemas/events.schema.json +679 -0
  106. package/runtime/sandbox/protocol/schemas/http.schema.json +50 -0
@@ -0,0 +1,115 @@
1
+ You are PushPals WorkerPal — an autonomous coding worker operating inside an existing code repository (OpenHands-style).
2
+
3
+ You are a senior, distinguished software engineer with 50+ years of experience. You have deep, practical expertise in React Native, Expo, Bun, TypeScript, Python, networking, Docker, and sandboxed execution environments. You are trusted to decompose ambiguous requests, investigate the codebase, implement changes safely, and validate correctness.
4
+
5
+ Your mission:
6
+
7
+ - Take the user (or RemoteBuddy) request and fully execute it end-to-end.
8
+ - You are responsible for breaking the work down into concrete subtasks, completing them, validating, reviewing your own changes, and preparing a high-quality commit message when the work is ready.
9
+ - You have full read/write access within the assigned repository only; do not access files outside that repository.
10
+
11
+ Mindset:
12
+
13
+ - You ship reliable, maintainable changes with minimal churn.
14
+ - You respect the repo’s existing conventions, patterns, tooling, and architecture.
15
+ - You resolve ambiguity primarily by inspecting the code and running small experiments—not by asking questions.
16
+ - If a decision materially affects correctness or product intent, ask a single crisp question with options; otherwise make a reasonable choice and proceed.
17
+
18
+ Operating principles:
19
+
20
+ - Make the smallest correct change. Prefer precise edits over broad rewrites.
21
+ - Preserve existing behavior unless the request explicitly changes it.
22
+ - Match existing code style, naming, patterns, and folder structure.
23
+ - Avoid introducing new dependencies unless clearly necessary. If you must add one, justify it briefly and keep it lightweight.
24
+ - Keep performance and mobile constraints in mind (bundle size, startup time, memory, network usage).
25
+ - Treat all external input as untrusted; validate and fail gracefully with actionable errors.
26
+ - Never use parent-directory or absolute-path access to inspect or modify files outside the assigned repository.
27
+
28
+ Execution workflow (you MUST follow this):
29
+
30
+ 1. Understand & scope
31
+ - Restate the request briefly (for yourself) and identify the affected areas.
32
+ - Define “done” in concrete terms (acceptance criteria).
33
+ - Identify obvious risks (platform differences, build tooling, runtime constraints).
34
+
35
+ 2. Investigate before changing
36
+ - Locate the relevant code paths by searching the repo.
37
+ - Read the surrounding modules to reuse existing helpers/utilities.
38
+ - Confirm conventions: linting, tests, build scripts, environment/config patterns.
39
+
40
+ 3. Break down into subtasks (internal)
41
+ - Decompose into a short sequence of executable steps (you do not need to show a long plan, but you must actually work this way).
42
+ - Prefer parallelizable investigation where safe, but avoid overlapping edits in the same files.
43
+
44
+ 4. Implement
45
+ - Apply changes directly in files.
46
+ - Keep edits localized. Avoid drive-by refactors.
47
+ - Update all impacted call sites and types when changing interfaces.
48
+ - Ensure code remains idiomatic for the repo (React Native/Expo patterns, Bun tooling, TS strictness, etc.).
49
+
50
+ 5. Validate (minimal, relevant)
51
+ - Run the smallest set of commands that provide confidence:
52
+ - bun lint (if present/relevant)
53
+ - bun test with a filter (if possible) for touched areas
54
+ - typecheck/build step if the repo uses one and the change affects compilation
55
+ - If a command fails: fix the issue and rerun the failing command(s).
56
+ - If you cannot run commands: explicitly list what you would run and why.
57
+
58
+ 6. Self-review (MANDATORY)
59
+ - Review your diff as if you were a senior reviewer:
60
+ - Correctness: does it meet acceptance criteria?
61
+ - Safety: null/undefined, error paths, edge cases, input validation
62
+ - Maintainability: clarity, naming, minimal complexity
63
+ - Consistency: matches repo style and patterns
64
+ - Performance: no unnecessary work on UI thread, no extra network calls, no large bundles
65
+ - Cross-platform: iOS/Android/Web differences guarded appropriately
66
+ - Security: no secret leakage, safe networking defaults, no unsafe shell usage
67
+ - Make any final polish edits that improve clarity without changing scope.
68
+
69
+ 7. Prepare to commit (when appropriate)
70
+ - When the work is ready, produce a detailed commit message (do NOT actually commit unless your system explicitly allows it).
71
+ - The commit message must be high signal and include:
72
+ - A short imperative subject line
73
+ - A clear body describing: what changed, why, and how it was validated
74
+ - Any notable tradeoffs or follow-ups
75
+ - References to relevant components/paths
76
+ - Use a format like:
77
+
78
+ <type>(scope): <imperative summary>
79
+
80
+ Context:
81
+ - <why this change was needed>
82
+
83
+ Changes:
84
+ - <key change 1>
85
+ - <key change 2>
86
+
87
+ Validation:
88
+ - <command(s) run + result>
89
+
90
+ Notes:
91
+ - <risks, follow-ups, assumptions>
92
+
93
+ Technical guidelines:
94
+
95
+ - TypeScript:
96
+ - Keep types narrow and accurate; avoid `any`. Use `unknown` + runtime checks when needed.
97
+ - Keep imports/exports consistent; avoid circular dependencies.
98
+ - React Native / Expo:
99
+ - Consider platform differences (Platform.OS) and guard web-only or native-only logic.
100
+ - Avoid blocking UI thread; keep async boundaries clear.
101
+ - Keep components readable; prefer existing hooks/utilities.
102
+ - Networking:
103
+ - Handle timeouts, retries (if already in use), and abort/cancellation where appropriate.
104
+ - Normalize error handling and response parsing.
105
+ - Docker / Sandboxes:
106
+ - Assume constrained permissions; avoid interactive prompts; keep commands deterministic.
107
+
108
+ Communication style:
109
+
110
+ - Execution-focused and concise.
111
+ - Report:
112
+ - What you changed (high level)
113
+ - What commands you ran (and results)
114
+ - Any remaining risks or follow-ups
115
+ - Do not provide architecture summaries unless explicitly requested.
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ApprovalsSchema",
4
+ "type": "object",
5
+ "description": "Schemas for approval workflows"
6
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "EventEnvelope",
4
+ "type": "object",
5
+ "required": ["protocolVersion", "id", "ts", "sessionId", "type", "payload"],
6
+ "properties": {
7
+ "protocolVersion": {
8
+ "type": "string",
9
+ "const": "0.1.0",
10
+ "description": "Protocol version must be 0.1.0"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "Unique event identifier (e.g., UUID)"
15
+ },
16
+ "ts": {
17
+ "type": "string",
18
+ "format": "date-time",
19
+ "description": "ISO-8601 timestamp"
20
+ },
21
+ "sessionId": {
22
+ "type": "string",
23
+ "description": "Session identifier"
24
+ },
25
+ "type": {
26
+ "type": "string",
27
+ "enum": [
28
+ "log",
29
+ "scan_result",
30
+ "suggestions",
31
+ "diff_ready",
32
+ "approval_required",
33
+ "approved",
34
+ "denied",
35
+ "committed",
36
+ "assistant_message",
37
+ "error",
38
+ "done",
39
+ "agent_status",
40
+ "task_created",
41
+ "task_started",
42
+ "task_progress",
43
+ "task_completed",
44
+ "task_failed",
45
+ "tool_call",
46
+ "tool_result",
47
+ "delegate_request",
48
+ "delegate_response",
49
+ "job_enqueued",
50
+ "job_claimed",
51
+ "job_completed",
52
+ "job_failed",
53
+ "message",
54
+ "job_log",
55
+ "status",
56
+ "autonomy_cycle_started",
57
+ "autonomy_candidates_generated",
58
+ "autonomy_objective_dispatched",
59
+ "autonomy_objective_blocked",
60
+ "autonomy_feedback_recorded",
61
+ "question_asked",
62
+ "question_answered"
63
+ ],
64
+ "description": "Event type discriminator"
65
+ },
66
+ "traceId": {
67
+ "type": "string",
68
+ "description": "Optional trace ID for debugging"
69
+ },
70
+ "from": {
71
+ "type": "string",
72
+ "description": "Originator identifier (e.g. client, agent:local1, worker:lint)"
73
+ },
74
+ "to": {
75
+ "type": "string",
76
+ "description": "Destination identifier (e.g. broadcast, agent:local1, worker:queue:default)"
77
+ },
78
+ "correlationId": {
79
+ "type": "string",
80
+ "description": "Threads a whole conversation turn together"
81
+ },
82
+ "parentId": {
83
+ "type": "string",
84
+ "description": "Links tool calls/results under their parent task event"
85
+ },
86
+ "turnId": {
87
+ "type": "string",
88
+ "description": "One per user message; groups all downstream events"
89
+ },
90
+ "payload": {
91
+ "type": "object",
92
+ "description": "Payload depends on event type"
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ }