@parall/agent-core 1.34.0 → 1.36.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.
@@ -156,10 +156,16 @@ Every entity is addressable with a \`prll://\` URI. Common prefixes you'll see i
156
156
  | \`prll://prj_\` | Project | parall-tasks |
157
157
  | \`prll://sch_\` | Schedule (time trigger) | parall-schedules |
158
158
  | \`prll://srn_\` | Schedule run (single fire audit record; carries fire-time snapshot) | parall-schedules |
159
+ | \`prll://xcn_\` | External Trigger Connection (incoming endpoint) | parall-external-triggers |
160
+ | \`prll://xin_\` | External Trigger Event (single incoming event audit record) | parall-external-triggers |
161
+ | \`prll://xtr_\` | External Trigger (incoming trigger configuration) | parall-external-triggers |
162
+ | \`prll://xrn_\` | External Trigger run (single matched dispatch audit record) | parall-external-triggers |
159
163
  | \`prll://wik_\` | Wiki | parall-wiki |
160
164
  | \`prll://att_\` | Attachment | parall-platform (files) |
161
165
 
162
166
  When a message or event references \`prll://sch_xxx\` or \`prll://srn_xxx\`, or when you receive \`[Event: schedule.fired]\`, switch to the **parall-schedules** skill for the CLI commands (create / list / pause / resume / cancel / runs).
163
167
 
168
+ When a message or event references \`prll://xcn_xxx\`, \`prll://xin_xxx\`, \`prll://xtr_xxx\`, or \`prll://xrn_xxx\`, or when you receive \`[Event: external.trigger]\`, switch to the **parall-external-triggers** skill for the CLI commands (connections / triggers / events / runs).
169
+
164
170
  CLI success output is JSON. Errors print a JSON line (\`{"error","status","code",...}\`) and, on a \`PERMISSION_DENIED\`, may add a plain-text \`Request approval:\` line — read both.
165
171
  `;
@@ -2,16 +2,39 @@ export const PARALL_TASKS_SKILL = `# Parall Tasks
2
2
 
3
3
  Manage tasks and projects via the Parall CLI. Auth and runtime context are pre-configured.
4
4
 
5
+ ## Finding What's on Someone's Plate (incl. subtasks)
6
+
7
+ To answer "what do I still have to do", "what's <person> working on", or any
8
+ "open work assigned to X" question, use \`tasks assigned\`:
9
+
10
+ \`\`\`bash
11
+ # Pending tasks (todo + in_progress) assigned to a member — INCLUDES subtasks.
12
+ parall tasks assigned prll://usr_xxx # a specific person (e.g. the human who asked)
13
+ parall tasks assigned # yourself (defaults to the authenticated user)
14
+ \`\`\`
15
+
16
+ This is the authoritative "open work for a person" query. It returns every
17
+ pending task assigned to that member **including subtasks** — even when the
18
+ subtask's parent task belongs to someone else. Decomposed work usually lives in
19
+ subtasks, so do NOT answer this kind of question from \`tasks list\` alone:
20
+ that is org-wide, page-capped, and not scoped to a person, so a person's
21
+ subtasks are easily missed.
22
+
23
+ Resolve a person's \`prll://usr_\` id from the message context, the members
24
+ list, or ref search; your own id comes from \`parall whoami\`.
25
+
5
26
  ## Task Commands
6
27
 
7
28
  \`\`\`bash
8
- # List tasks (filterable by status)
29
+ # List tasks (org-wide; filter by status, assignee, or parent)
9
30
  parall tasks list
10
31
  parall tasks list --status todo
11
32
  parall tasks list --status in_progress
33
+ parall tasks list --assignee-id prll://usr_xxx # first page only (default 20) — for a person's FULL backlog use 'tasks assigned' above
34
+ parall tasks subtasks prll://tsk_xxx # children of a single parent task
12
35
 
13
- # Create a task
14
- parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--project-id prll://prj_xxx]
36
+ # Create a task (add --parent-id to make it a SUBTASK of another task)
37
+ parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--parent-id prll://tsk_xxx] [--project-id prll://prj_xxx]
15
38
 
16
39
  # Update task status
17
40
  parall tasks update prll://tsk_xxx --status in_progress
@@ -21,6 +44,12 @@ parall tasks update prll://tsk_xxx --status done
21
44
  parall tasks comments add prll://tsk_xxx --body "Progress update..."
22
45
  \`\`\`
23
46
 
47
+ Subtasks are just tasks with a parent: create one with \`tasks create --parent-id\`,
48
+ re-parent with \`tasks update --parent-id\`, list a parent's children with
49
+ \`tasks subtasks\`. \`tasks list\` without \`--parent-id\` already returns both
50
+ top-level tasks and subtasks; per-person open work is best fetched with
51
+ \`tasks assigned\` (above).
52
+
24
53
  ## Project Commands
25
54
 
26
55
  \`\`\`bash
@@ -2,130 +2,176 @@ export const PARALL_WIKI_SKILL = `# Parall Wiki
2
2
 
3
3
  Manage organization wikis via the Parall CLI. Auth is pre-configured.
4
4
 
5
- ## Browsing (no local state needed)
5
+ ## Mental model
6
+
7
+ Wiki editing works on a **local workspace**: \`parall wiki sync\` downloads the
8
+ wiki into a directory on disk, you edit those files with your normal file
9
+ tools, then \`parall wiki changeset create\` uploads the result as a proposal.
10
+ There is no git in the workspace — your edits are detected by diffing against
11
+ the synced baseline.
12
+
13
+ Key facts the commands won't tell you:
14
+
15
+ - **Workspace location is fixed.** Sync output and \`parall wiki status\` print
16
+ the absolute workspace path (\`synced → /path/to/<slug>\` / \`Mount: ...\`).
17
+ Always address wiki files by that absolute path — your shell cwd is usually
18
+ NOT inside the workspace.
19
+ - **Text and binary are two paths.** The workspace + changeset flow is for
20
+ text (markdown, code, config). Binary assets (images, PDFs, archives) are
21
+ diff-less — they don't go in the workspace; use \`parall wiki file\` (see
22
+ **Binary files** below). Dropping a binary into the workspace just gets it
23
+ rejected on propose.
24
+ - **\`cat\`, \`search\`, \`query\`, \`outline\`, and \`section\` read your local
25
+ workspace copy when it exists** — including your own unproposed edits. Add
26
+ \`--remote\` to \`cat\` to read the server version instead.
27
+ - **\`search\`/\`query\` are keyword (lexical) matching**, not semantic search.
28
+ \`query\` additionally ranks whole documents — better for multi-word
29
+ questions; \`search\` for a single identifier.
30
+ - The \`<wiki>\` argument is the slug or ID from \`parall wiki list\`; with a
31
+ single wiki in the org it can be omitted.
32
+
33
+ ## Core workflow
6
34
 
7
35
  \`\`\`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
36
+ parall wiki sync # 1. get/update files (prints workspace path)
37
+ # 2. read + edit files under the workspace path with standard file tools
38
+ parall wiki diff <wiki> # 3. review exactly what you'll propose
39
+ parall wiki changeset create <wiki> --title "..." # 4. submit
11
40
  \`\`\`
12
41
 
13
- ## Editing
42
+ Always sync before starting and always check \`diff\` before proposing — the
43
+ changeset uploads the full content of every changed file.
14
44
 
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.
45
+ Unprotected paths auto-merge immediately (\`auto_merged: true\`); protected
46
+ paths stay open for human review. Follow the returned \`next_action\` either way.
18
47
 
19
- ### Step 1: Sync
48
+ ## Stale base (server moved since your sync)
20
49
 
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:
50
+ If files changed on the server after your last sync, \`changeset create\` is
51
+ rejected both by a CLI precheck and by the server (409 \`STALE_BASE\`) — so
52
+ you can't silently overwrite someone's concurrent edit. Recovery:
32
53
 
33
54
  \`\`\`bash
34
- parall wiki status <slug>
55
+ parall wiki sync # pull latest; your local edits are preserved
56
+ # if a file conflicts, resolve it (see next section)
57
+ parall wiki changeset create <wiki> --title "..."
35
58
  \`\`\`
36
59
 
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\`.
60
+ ## Sync conflicts
42
61
 
43
- ### Step 3: Edit files
62
+ \`sync\` three-way merges. When both you and the server changed the same file,
63
+ your file is left intact and the upstream copy lands under
64
+ \`<workspace>/.parall-wiki/conflicts/\`:
44
65
 
45
- Use standard file tools (\`read\`, \`write\`, \`edit\`) on files under the mount path.
66
+ | Marker | Meaning |
67
+ |--------|---------|
68
+ | \`conflicts/<path>.remote\` | Server has different content for \`<path>\` |
69
+ | \`conflicts/<path>.remote-deleted\` | Server deleted \`<path>\`; you still have edits |
46
70
 
47
- ### Step 4: Review changes
71
+ All paths below are relative to the workspace root. Pick one:
48
72
 
49
73
  \`\`\`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
74
+ # Accept upstream (drop your edit):
75
+ cp <workspace>/.parall-wiki/conflicts/<path>.remote <workspace>/<path>
76
+
77
+ # Keep yours / hand-merge: edit <workspace>/<path> to final content, then
78
+ parall wiki changeset create <wiki> --title "Reconcile <path>"
79
+
80
+ # Accept server delete (.remote-deleted only):
81
+ rm <workspace>/<path>
52
82
  \`\`\`
53
83
 
54
- Always review before proposing.
84
+ Then re-run \`parall wiki sync\` and delete the used marker file. Conflicts
85
+ exit 0 (they need your decision); \`failed[]\` entries (download error,
86
+ shape-conflict) exit 1 and retry on the next sync.
55
87
 
56
- ### Step 5: Propose changeset
88
+ ## Changesets
57
89
 
58
90
  \`\`\`bash
59
- parall wiki changeset create <slug> --title "Description of changes"
91
+ parall wiki changeset list <wiki>
92
+ parall wiki changeset show <changesetId> <wiki> # status + feedback
93
+ parall wiki changeset diff <changesetId> <wiki>
94
+ parall wiki changeset create <wiki> --update <id> # re-propose after rejection (title inherited)
60
95
  \`\`\`
61
96
 
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\`.
97
+ Rejected: read the feedback (\`show\` / \`status\`), fix the files, re-propose
98
+ with \`--update <id>\`. Conflict status: \`sync\`, resolve, then \`--update <id>\`.
65
99
 
66
- ## Changeset Management
100
+ Re-propose REPLACES the changeset's previous contents with your current
101
+ workspace diff — to withdraw a file from the proposal, revert it locally
102
+ (restore the synced content) and re-propose; it drops out of the changeset.
67
103
 
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
- \`\`\`
104
+ ## Binary files
73
105
 
74
- If a changeset is rejected, fix the files locally and re-propose:
106
+ Images, PDFs, archives anything that can't be diffed bypass the workspace
107
+ and changeset-text flow entirely. They never belong in the synced workspace
108
+ (propose rejects them); use \`parall wiki file\` instead. \`cat\` is text-only —
109
+ to read a binary's real bytes use \`file get\` (a plain \`sync\` only leaves a
110
+ few-line Git-LFS pointer on disk, since the runtime has no git-lfs).
75
111
 
76
112
  \`\`\`bash
77
- parall wiki changeset create <slug> --update <changesetId>
78
- \`\`\`
113
+ # Maintainer: direct-commit a binary to the default branch (no review)
114
+ parall wiki file upload ./diagram.png docs/assets/diagram.png
79
115
 
80
- The title is inherited from the original changeset no need to repeat it.
116
+ # Read a binary's real bytes (LFS pointers resolved server-side) to a file.
117
+ # Always use --output for binaries — without it the bytes stream to stdout and
118
+ # would flood your context.
119
+ parall wiki file get docs/assets/diagram.png --output ./diagram.png
120
+ parall wiki file get docs/assets/diagram.png --ref <commit-or-branch> --output ./diagram.png # a specific revision
81
121
 
82
- ## Handling sync conflicts
122
+ # Remove a binary from the default branch (git history still has it)
123
+ parall wiki file delete docs/assets/diagram.png
124
+ \`\`\`
83
125
 
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/\`:
126
+ \`upload\` needs **maintain**; it routes by size automatically (≤1 MiB inline,
127
+ larger LFS). A text file sent to \`upload\` is rejected that's the changeset
128
+ flow's job.
87
129
 
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 |
130
+ ### Reader: propose markdown that embeds an image
92
131
 
93
- stderr prints one line per conflict. Recovery:
132
+ Without maintain you can still propose a doc with images — upload the binary
133
+ into your **changeset's** branch (read + author), not the default branch:
94
134
 
95
- **Accept upstream** (drop your edit):
96
135
  \`\`\`bash
97
- cp .parall-wiki/conflicts/<path>.remote <path>
98
136
  parall wiki sync
137
+ # edit a .md in the workspace to add ![alt](assets/foo.png)
138
+ parall wiki changeset create <wiki> --title "Add foo diagram" # creates the changeset (note its id)
139
+ parall wiki file upload ./foo.png assets/foo.png <wiki> --changeset <changesetId>
140
+ # leave it for a maintainer to merge — both the markdown and the image squash in together
99
141
  \`\`\`
100
142
 
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
- \`\`\`
143
+ Do the markdown \`changeset create\` first so the changeset exists, then attach
144
+ the image to it. Don't re-propose (\`--update\`) after attaching a binary —
145
+ re-propose replays only the text workspace and the server rejects dropping the
146
+ attached binary (422 \`REPLACE_HAS_BINARY\`).
147
+
148
+ ## Discovery & history
108
149
 
109
- **Accept server delete** (\`.remote-deleted\` only):
110
150
  \`\`\`bash
111
- rm <path>
112
- parall wiki sync
151
+ parall wiki query "how is auth configured" <wiki> # multi-word lookup (query FIRST, wiki second)
152
+ parall wiki search "JWT" <wiki> # single keyword (query FIRST, wiki second)
153
+ parall wiki outline <wiki> --path docs/ # heading structure
154
+ parall wiki cat docs/auth.md <wiki> # print a file (--remote for server version)
155
+ parall wiki tree <wiki> # list files
156
+ parall wiki log <wiki> # recent operations
157
+ parall wiki log <wiki> docs/auth.md # per-file commit history
113
158
  \`\`\`
114
159
 
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
160
+ ## Permissions
119
161
 
120
- \`\`\`bash
121
- parall wiki reset <slug> # Restore all files to last synced state
122
- \`\`\`
162
+ Reads and writes are ACL-checked server-side per path. \`parall wiki access
163
+ <path>\` shows your level for a path. On a \`PERMISSION_DENIED\`, errors include
164
+ a \`Request approval:\` hint — use \`parall wiki request-access <path> --reason
165
+ "..."\` to file an approval card for a maintainer, then re-sync after approval.
123
166
 
124
- ## History
167
+ ## Recovery
125
168
 
126
169
  \`\`\`bash
127
- parall wiki log <slug> # Recent wiki operations
170
+ parall wiki reset <wiki> # discard ALL local edits, restore last-synced state
171
+ parall wiki status <wiki> # local changes + your changesets, anytime
128
172
  \`\`\`
129
173
 
130
- CLI success output is JSON; errors may add a plain-text \`Request approval:\` line on a \`PERMISSION_DENIED\` — read both. Run \`parall wiki --help\` for full options.
174
+ CLI success output is JSON on stdout (human summary on stderr); errors state
175
+ the reason and the next step — follow them. \`parall wiki --help\` for the
176
+ full command list.
131
177
  `;
package/src/types.ts CHANGED
@@ -24,7 +24,14 @@ export type DispatchState = {
24
24
 
25
25
  /** Normalized inbound event from Parall. */
26
26
  export type ParallEvent = {
27
- type: 'message' | 'task' | 'task_comment' | 'wiki_comment' | 'schedule' | 'approval';
27
+ type:
28
+ | 'message'
29
+ | 'task'
30
+ | 'task_comment'
31
+ | 'wiki_comment'
32
+ | 'schedule'
33
+ | 'external_trigger'
34
+ | 'approval';
28
35
  targetId: string;
29
36
  targetName?: string;
30
37
  targetType?: string;
@@ -52,10 +59,16 @@ export type ParallEvent = {
52
59
  scheduledFireAt?: string;
53
60
  /** Fire-time attached_to_uri snapshot, used for schedule events. */
54
61
  attachedUri?: string;
62
+ /** External trigger metadata, used for external_trigger events. */
63
+ externalConnectionId?: string;
64
+ externalConnectionSourceType?: string;
65
+ externalConnectionDisplayName?: string;
66
+ externalIngressEventId?: string;
67
+ externalIngressEventType?: string;
55
68
  /** Original event timestamp (e.g., message.created_at). When present,
56
69
  * input steps use this instead of server insertion time for ordering. */
57
70
  sentAt?: string;
58
- ackSourceType?: 'message' | 'task_activity' | 'comment' | 'schedule_run';
71
+ ackSourceType?: 'message' | 'task_activity' | 'comment' | 'schedule_run' | 'external_trigger_run';
59
72
  ackSourceId?: string;
60
73
  /** Unread message count in the target chat since agent's last interaction. */
61
74
  unreadCount?: number;