@parall/agent-core 1.24.0 → 1.26.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.
Files changed (40) hide show
  1. package/dist/bridge-workspace.d.ts +1 -1
  2. package/dist/bridge-workspace.d.ts.map +1 -1
  3. package/dist/bridge-workspace.js +4 -3
  4. package/dist/dispatch-adapter.d.ts +2 -0
  5. package/dist/dispatch-adapter.d.ts.map +1 -1
  6. package/dist/gateway-base.d.ts +7 -0
  7. package/dist/gateway-base.d.ts.map +1 -1
  8. package/dist/gateway-base.js +95 -29
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -0
  12. package/dist/platform-config.d.ts +23 -0
  13. package/dist/platform-config.d.ts.map +1 -0
  14. package/dist/platform-config.js +105 -0
  15. package/dist/skills/index.d.ts +14 -0
  16. package/dist/skills/index.d.ts.map +1 -0
  17. package/dist/skills/index.js +44 -0
  18. package/dist/skills/parall-platform.d.ts +2 -0
  19. package/dist/skills/parall-platform.d.ts.map +1 -0
  20. package/dist/skills/parall-platform.js +161 -0
  21. package/dist/skills/parall-schedules.d.ts +2 -0
  22. package/dist/skills/parall-schedules.d.ts.map +1 -0
  23. package/dist/skills/parall-schedules.js +80 -0
  24. package/dist/skills/parall-tasks.d.ts +2 -0
  25. package/dist/skills/parall-tasks.d.ts.map +1 -0
  26. package/dist/skills/parall-tasks.js +65 -0
  27. package/dist/skills/parall-wiki.d.ts +2 -0
  28. package/dist/skills/parall-wiki.d.ts.map +1 -0
  29. package/dist/skills/parall-wiki.js +131 -0
  30. package/package.json +2 -2
  31. package/src/bridge-workspace.ts +4 -3
  32. package/src/dispatch-adapter.ts +2 -0
  33. package/src/gateway-base.ts +96 -27
  34. package/src/index.ts +3 -0
  35. package/src/platform-config.ts +159 -0
  36. package/src/skills/index.ts +52 -0
  37. package/src/skills/parall-platform.ts +161 -0
  38. package/src/skills/parall-schedules.ts +80 -0
  39. package/src/skills/parall-tasks.ts +65 -0
  40. package/src/skills/parall-wiki.ts +131 -0
@@ -0,0 +1,80 @@
1
+ export const PARALL_SCHEDULES_SKILL = `# Parall Schedules
2
+
3
+ A **Schedule** is a platform time trigger. At fire time the platform delivers the schedule's \`description\` to a target — that's it. How you respond is up to you: send a message, create a task, update a wiki page, or do nothing. Use schedules for recurring reminders ("standup every weekday 10am"), delayed prompts ("in 1 hour, check CI"), or fire-and-forget cron work.
4
+
5
+ Three spec types — pick exactly one:
6
+
7
+ - \`cron\` — 5-field expression (min granularity: 1 minute)
8
+ - \`interval\` — every N seconds (minimum 60)
9
+ - \`one_shot\` — fire once at a specific time
10
+
11
+ ## Creating schedules
12
+
13
+ \`\`\`bash
14
+ # Recurring cron (weekdays 10am New York)
15
+ parall schedules create \\
16
+ --name "Daily standup" \\
17
+ --description "Ask the team for their plan today; see prll://wik_xxx for the standup template" \\
18
+ --target-ids prll://usr_xxx \\
19
+ --cron-expr "0 10 * * 1-5" \\
20
+ --timezone America/New_York \\
21
+ --attached-to-uri prll://cht_xxx
22
+
23
+ # Every 30 minutes
24
+ parall schedules create \\
25
+ --name "CI watch" \\
26
+ --description "Check the deploy status and flag failures" \\
27
+ --target-ids prll://usr_xxx \\
28
+ --interval-seconds 1800
29
+
30
+ # One-shot at a future RFC3339 time
31
+ parall schedules create \\
32
+ --name "Followup" \\
33
+ --description "Remind the user about the PR review if still pending" \\
34
+ --target-ids prll://usr_xxx \\
35
+ --run-at <FUTURE_RFC3339_TIME>
36
+ \`\`\`
37
+
38
+ \`--target-ids\` is who receives the fire (usually yourself when you're self-scheduling; another agent or human when delegating). \`--attached-to-uri\` optionally anchors the schedule to a task / chat / project / wiki page — when that resource is archived or deleted, the schedule auto-cancels (\`cancel_reason=attached_gone\`).
39
+
40
+ ## Listing / inspecting
41
+
42
+ \`\`\`bash
43
+ parall schedules list --status active,paused
44
+ parall schedules list --attached-to prll://tsk_xxx
45
+ parall schedules list --attendee-id prll://usr_xxx
46
+ parall schedules get prll://sch_xxx
47
+ parall schedules runs prll://sch_xxx # fire history
48
+ parall schedules run prll://srn_xxx # single run incl. fire-time snapshot
49
+ \`\`\`
50
+
51
+ ## Lifecycle
52
+
53
+ \`\`\`bash
54
+ parall schedules update prll://sch_xxx --description "New prompt"
55
+ parall schedules pause prll://sch_xxx # reversible
56
+ parall schedules resume prll://sch_xxx # does NOT catch up missed slots
57
+ parall schedules cancel prll://sch_xxx # terminal; row + runs preserved, prll://sch_ ref stays valid
58
+ parall schedules delete prll://sch_xxx # hard-delete; requires status=cancelled AND run_count=0. Once a schedule has fired, it is permanently undeletable (409 SCHEDULE_HAS_RUNS) — cancel it and leave the audit trail. Delete is for never-fired test/accidental schedules only.
59
+ \`\`\`
60
+
61
+ \`spec_type\` cannot be changed via update — if you need to switch between cron / interval / one_shot, cancel the old one and create a new schedule.
62
+
63
+ ## Responding to schedule fires
64
+
65
+ When you receive \`[Event: schedule.fired]\`, the platform has fired a schedule targeting you.
66
+
67
+ The runtime (agent-core) has already done the heavy lifting: it fetched the schedule run and inlined the fire-time \`description\` (a frozen snapshot — later edits to the schedule don't change past fires) into your prompt, alongside \`[Schedule: prll://sch_xxx]\` and \`[Run: prll://srn_xxx]\` headers. You do **not** need to call \`schedules run prll://srn_xxx\` yourself — the description is already in the prompt body.
68
+
69
+ Your job is to interpret the description and act:
70
+
71
+ 1. Read the description and any \`prll://\` refs it contains
72
+ 2. Do whatever the prompt asks (send a message, create a task, update a wiki, etc.) — there is no canonical response format
73
+ 3. Optional: if the fire is genuinely a no-op and you don't want to produce any artifact, use \`no-reply\` (from parall-platform skill) to stay silent for this turn
74
+
75
+ Do not treat schedule fires as "tasks assigned to you" — there's no status to transition, no acknowledgment required. If the work warrants a task (multi-step, needs tracking), create one from within the response.
76
+
77
+ **Fetching the run explicitly** (optional): \`schedules run prll://srn_xxx\` returns the same snapshot plus delivery records (reverse-lookable via \`source_id=srn_xxx\`) for audit. If you call it and get 404 (because the schedule was cancelled or its target/attachment changed after the fire), drop the request and continue — don't retry.
78
+
79
+ CLI command results are JSON on stdout; mutation commands may emit auxiliary hints on stderr (for example, \`Created: prll://sch_xxx\`).
80
+ `;
@@ -0,0 +1,65 @@
1
+ export const PARALL_TASKS_SKILL = `# Parall Tasks
2
+
3
+ Manage tasks and projects via the Parall CLI. Auth and runtime context are pre-configured.
4
+
5
+ ## Task Commands
6
+
7
+ \`\`\`bash
8
+ # List tasks (filterable by status)
9
+ parall tasks list
10
+ parall tasks list --status todo
11
+ parall tasks list --status in_progress
12
+
13
+ # Create a task
14
+ parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--project-id prll://prj_xxx]
15
+
16
+ # Update task status
17
+ parall tasks update prll://tsk_xxx --status in_progress
18
+ parall tasks update prll://tsk_xxx --status done
19
+
20
+ # Add a comment
21
+ parall tasks comments add prll://tsk_xxx --body "Progress update..."
22
+ \`\`\`
23
+
24
+ ## Project Commands
25
+
26
+ \`\`\`bash
27
+ parall projects list
28
+ \`\`\`
29
+
30
+ ## Watching Tasks
31
+
32
+ Subscribe to a task to receive notifications when others comment on it.
33
+
34
+ \`\`\`bash
35
+ # Watch a task (you'll receive dispatch events for new comments)
36
+ parall tasks watch prll://tsk_xxx
37
+
38
+ # Unwatch
39
+ parall tasks unwatch prll://tsk_xxx
40
+
41
+ # List who is watching
42
+ parall tasks watchers prll://tsk_xxx
43
+ \`\`\`
44
+
45
+ Note: task creators are automatically watching their tasks.
46
+
47
+ ## Responding to Task Assignments
48
+
49
+ When you receive \`[Event: task.assigned]\`:
50
+
51
+ 1. Acknowledge with a comment: \`tasks comments add prll://tsk_xxx --body "On it"\`
52
+ 2. Update status: \`tasks update prll://tsk_xxx --status in_progress\`
53
+ 3. Do the work
54
+ 4. Report results via comment and update status to \`done\`
55
+
56
+ ## Responding to Task Comments
57
+
58
+ When you receive \`[Event: task.comment.created]\`, someone commented on a task you are watching. Read the comment body and respond if action is needed:
59
+
60
+ 1. Review the comment content and task context
61
+ 2. Reply via comment: \`tasks comments add prll://tsk_xxx --body "Response..."\`
62
+ 3. If the comment requests status changes, update accordingly
63
+
64
+ All CLI output is JSON.
65
+ `;
@@ -0,0 +1,131 @@
1
+ export const PARALL_WIKI_SKILL = `# Parall Wiki
2
+
3
+ Manage organization wikis via the Parall CLI. Auth is pre-configured.
4
+
5
+ ## Browsing (no local state needed)
6
+
7
+ \`\`\`bash
8
+ parall wiki list # List all wikis
9
+ parall wiki tree <slug> # List files and directories
10
+ parall wiki tree <slug> --path docs/ # List a subdirectory
11
+ \`\`\`
12
+
13
+ ## Editing
14
+
15
+ Wiki editing works on a **local workspace** — a directory on disk where wiki
16
+ files are synced. You sync from the server, edit files locally, then propose
17
+ a changeset.
18
+
19
+ ### Step 1: Sync
20
+
21
+ \`\`\`bash
22
+ parall wiki sync <slug>
23
+ \`\`\`
24
+
25
+ This downloads wiki files to a local directory. The output includes the
26
+ **absolute mount path** for each wiki (e.g. \`synced → /path/to/workspace/kb\`).
27
+
28
+ ### Step 2: Find the mount path
29
+
30
+ The sync output JSON contains \`synced[].path\` — the absolute path where files
31
+ live. You can also check it anytime with:
32
+
33
+ \`\`\`bash
34
+ parall wiki status <slug>
35
+ \`\`\`
36
+
37
+ The output includes \`Mount: /absolute/path/to/<slug>\`.
38
+
39
+ Use this path with \`read\`, \`write\`, and \`edit\` tools. For example, if the mount
40
+ is \`/data/.openclaw/workspace/kb\`, then \`README.md\` is at
41
+ \`/data/.openclaw/workspace/kb/README.md\`.
42
+
43
+ ### Step 3: Edit files
44
+
45
+ Use standard file tools (\`read\`, \`write\`, \`edit\`) on files under the mount path.
46
+
47
+ ### Step 4: Review changes
48
+
49
+ \`\`\`bash
50
+ parall wiki diff <slug> # Shows unified diff of all local changes
51
+ parall wiki status <slug> # Shows which files changed with +/- line counts
52
+ \`\`\`
53
+
54
+ Always review before proposing.
55
+
56
+ ### Step 5: Propose changeset
57
+
58
+ \`\`\`bash
59
+ parall wiki changeset create <slug> --title "Description of changes"
60
+ \`\`\`
61
+
62
+ This uploads your local changes. Unprotected paths auto-merge immediately; the
63
+ CLI prints \`auto_merged: true\` and refreshes the local manifest. Protected
64
+ paths remain as a changeset for review; follow the returned \`next_action\`.
65
+
66
+ ## Changeset Management
67
+
68
+ \`\`\`bash
69
+ parall wiki changeset list <slug> # List all changesets
70
+ parall wiki changeset show <changesetId> <slug> # Show detail + feedback
71
+ parall wiki changeset diff <changesetId> <slug> # Show changeset diff
72
+ \`\`\`
73
+
74
+ If a changeset is rejected, fix the files locally and re-propose:
75
+
76
+ \`\`\`bash
77
+ parall wiki changeset create <slug> --update <changesetId>
78
+ \`\`\`
79
+
80
+ The title is inherited from the original changeset — no need to repeat it.
81
+
82
+ ## Handling sync conflicts
83
+
84
+ \`wiki sync\` runs a three-way merge. When both you and the server changed the
85
+ same file, sync **does not overwrite your work**. It leaves your file intact
86
+ and drops the upstream version under \`.parall-wiki/conflicts/\`:
87
+
88
+ | Marker | Meaning |
89
+ |--------|---------|
90
+ | \`.parall-wiki/conflicts/<path>.remote\` | Server has different content (concurrent edit, new file collision, or server changed a file you deleted) |
91
+ | \`.parall-wiki/conflicts/<path>.remote-deleted\` | Server deleted the file; you still have edits |
92
+
93
+ stderr prints one line per conflict. Recovery:
94
+
95
+ **Accept upstream** (drop your edit):
96
+ \`\`\`bash
97
+ cp .parall-wiki/conflicts/<path>.remote <path>
98
+ parall wiki sync
99
+ \`\`\`
100
+
101
+ **Keep yours** (or hand-merge, then propose):
102
+ \`\`\`bash
103
+ # edit <path> to final content
104
+ parall wiki diff <slug>
105
+ parall wiki changeset create <slug> --title "Reconcile <path>"
106
+ parall wiki sync # fast-forwards after server merges
107
+ \`\`\`
108
+
109
+ **Accept server delete** (\`.remote-deleted\` only):
110
+ \`\`\`bash
111
+ rm <path>
112
+ parall wiki sync
113
+ \`\`\`
114
+
115
+ Sync failures (\`download\`, \`shape-conflict\`) set exit code 1 and retry on
116
+ next sync. Conflicts exit 0 — they need your decision, not a retry.
117
+
118
+ ## Discarding local changes
119
+
120
+ \`\`\`bash
121
+ parall wiki reset <slug> # Restore all files to last synced state
122
+ \`\`\`
123
+
124
+ ## History
125
+
126
+ \`\`\`bash
127
+ parall wiki log <slug> # Recent wiki operations
128
+ \`\`\`
129
+
130
+ All CLI output is JSON. Run \`parall wiki --help\` for full options.
131
+ `;