@parall/agent-core 1.42.1 → 1.44.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 (49) hide show
  1. package/dist/bin/channel-exec.d.ts +4 -0
  2. package/dist/bin/channel-exec.d.ts.map +1 -0
  3. package/dist/bin/channel-exec.js +246 -0
  4. package/dist/channel-capability.d.ts +16 -0
  5. package/dist/channel-capability.d.ts.map +1 -0
  6. package/dist/channel-capability.js +155 -0
  7. package/dist/channel-token.d.ts +19 -0
  8. package/dist/channel-token.d.ts.map +1 -0
  9. package/dist/channel-token.js +73 -0
  10. package/dist/event-format.d.ts.map +1 -1
  11. package/dist/event-format.js +21 -16
  12. package/dist/gateway-base.d.ts +37 -0
  13. package/dist/gateway-base.d.ts.map +1 -1
  14. package/dist/gateway-base.js +120 -12
  15. package/dist/gateway-lane-flow.d.ts +23 -2
  16. package/dist/gateway-lane-flow.d.ts.map +1 -1
  17. package/dist/gateway-lane-flow.js +118 -6
  18. package/dist/index.d.ts +3 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -0
  21. package/dist/lane-ledger.d.ts +22 -0
  22. package/dist/lane-ledger.d.ts.map +1 -1
  23. package/dist/lane-ledger.js +36 -1
  24. package/dist/platform-config.d.ts +15 -0
  25. package/dist/platform-config.d.ts.map +1 -1
  26. package/dist/platform-config.js +28 -0
  27. package/dist/prompt-fragments.d.ts +1 -1
  28. package/dist/prompt-fragments.d.ts.map +1 -1
  29. package/dist/prompt-fragments.js +29 -7
  30. package/dist/skills/index.js +1 -1
  31. package/dist/skills/parall-platform.d.ts +1 -1
  32. package/dist/skills/parall-platform.d.ts.map +1 -1
  33. package/dist/skills/parall-platform.js +23 -4
  34. package/dist/types.d.ts +5 -1
  35. package/dist/types.d.ts.map +1 -1
  36. package/package.json +2 -2
  37. package/src/bin/channel-exec.ts +262 -0
  38. package/src/channel-capability.ts +187 -0
  39. package/src/channel-token.ts +92 -0
  40. package/src/event-format.ts +21 -16
  41. package/src/gateway-base.ts +141 -19
  42. package/src/gateway-lane-flow.ts +132 -5
  43. package/src/index.ts +3 -0
  44. package/src/lane-ledger.ts +46 -3
  45. package/src/platform-config.ts +44 -0
  46. package/src/prompt-fragments.ts +29 -7
  47. package/src/skills/index.ts +1 -1
  48. package/src/skills/parall-platform.ts +23 -4
  49. package/src/types.ts +5 -1
@@ -212,10 +212,10 @@ resolves and renders the entity title automatically.
212
212
 
213
213
  prll://usr_xxx user prll://prj_xxx project
214
214
  prll://tsk_xxx task prll://wik_xxx wiki
215
- prll://msg_xxx message prll://tcm_xxx task comment
216
- prll://cht_xxx chat prll://ase_xxx agent session
217
- prll://att_xxx attachment prll://sch_xxx schedule
218
- prll://srn_xxx schedule run
215
+ prll://msg_xxx message prll://cmt_xxx comment
216
+ prll://cht_xxx chat prll://tcm_xxx task comment (legacy)
217
+ prll://att_xxx attachment prll://ase_xxx agent session
218
+ prll://sch_xxx schedule prll://srn_xxx schedule run
219
219
 
220
220
  **Wiki** — path is file path, fragment is a typed anchor:
221
221
 
@@ -261,15 +261,37 @@ session already has continuity, so skip the fetch unless something is unclear.
261
261
 
262
262
  Same pattern for any other entity referenced in the event: \`tasks get\`,
263
263
  \`projects get\`, \`users get\`, \`chats get\`. Follow the reflink, don't ask.
264
+ When one entity isn't enough — you need what's *around* it — walk the
265
+ reference graph instead of guessing (see "Walk the reference graph" below).
264
266
 
265
267
  ### Find context with search first
266
268
 
267
269
  Reach for unified semantic search before paging chat history:
268
270
 
269
- parall search "pricing decision june" [--limit 10]
271
+ parall search "pricing decision june" --limit 10
270
272
 
271
- It spans messages, tasks, and wiki. Page \`messages list\` only for the verbatim
272
- recent flow of one chat, not for discovery.
273
+ It spans messages, tasks, wiki, and comments. Page \`messages list\` only for the
274
+ verbatim recent flow of one chat, not for discovery.
275
+
276
+ ### Walk the reference graph
277
+
278
+ References form a traversable graph, and you can query it — don't stop at
279
+ fetching entities one by one:
280
+
281
+ # entity metadata (title, status, preview)
282
+ parall refs resolve prll://tsk_xxx prll://wik_xxx
283
+ # who references this entity
284
+ parall refs backlinks prll://tsk_xxx
285
+ # connected sub-graph around it
286
+ parall refs graph prll://tsk_xxx --depth 2
287
+
288
+ Use \`refs backlinks\` when you need "where is this discussed / used"; use
289
+ \`refs graph\` when you need the full picture around an entity (related tasks,
290
+ docs, conversations — edges carry the author's annotation for why they linked).
291
+ Then \`refs resolve\` the interesting node URIs in one batch to get titles and
292
+ status. \`refs graph\` takes entity-level URIs only (\`prll://wik_xxx\`, not
293
+ \`prll://wik_xxx/docs/a.md\`). All results are filtered to what you can see.
294
+ Details: parall-platform skill.
273
295
 
274
296
  ### File attachments
275
297
 
@@ -21,7 +21,7 @@ export const SKILLS: SkillMeta[] = [
21
21
  {
22
22
  name: 'parall-platform',
23
23
  description:
24
- "Parall platform queries and lightweight agent provisioning: list org members, agents, chats, read message history, check identity, or create another agent. Use when: user asks about org members, who's online, chat history, agent list, creating an agent, or identity/auth questions.",
24
+ "Parall platform queries and lightweight agent provisioning: list org members, agents, chats, read message history, check identity, create another agent, or walk the prll:// reference graph (resolve URIs, backlinks, multi-hop graph). Use when: user asks about org members, who's online, chat history, agent list, creating an agent, identity/auth questions, or you need to find what an entity is connected to / who references it.",
25
25
  content: PARALL_PLATFORM_SKILL,
26
26
  },
27
27
  {
@@ -76,11 +76,11 @@ settled questions or repeat known mistakes. This searches live org data
76
76
  can see.
77
77
 
78
78
  \`\`\`bash
79
- # Semantic + keyword search across messages, tasks, and wiki
79
+ # Semantic + keyword search across messages, tasks, wiki, and comments
80
80
  parall search "auth v5 upgrade"
81
81
 
82
- # Restrict entity types (m=message, t=task, w=wiki). --channel narrows the
83
- # MESSAGE hits to one chat (tasks/wiki are unaffected by it).
82
+ # Restrict entity types (m=message, t=task, w=wiki, c=comment). --channel
83
+ # narrows the MESSAGE hits to one chat (tasks/wiki/comments are unaffected).
84
84
  parall search "auth v5 upgrade" --types m,w --channel prll://cht_eng
85
85
 
86
86
  # Time-box to recent activity (RFC3339 or YYYY-MM-DD). Narrows messages + tasks;
@@ -201,6 +201,8 @@ Every entity is addressable with a \`prll://\` URI. Common prefixes you'll see i
201
201
  | \`prll://usr_\` | User (human or agent) | parall-platform |
202
202
  | \`prll://cht_\` | Chat | parall-platform |
203
203
  | \`prll://msg_\` | Message | parall-platform |
204
+ | \`prll://cmt_\` | Comment (on tasks, wiki pages, changesets) | by target: task comment → parall-tasks, wiki/changeset comment → parall-wiki |
205
+ | \`prll://ase_\` | Agent session | parall-platform |
204
206
  | \`prll://tsk_\` | Task | parall-tasks |
205
207
  | \`prll://prj_\` | Project | parall-tasks |
206
208
  | \`prll://sch_\` | Schedule (time trigger) | parall-schedules |
@@ -236,7 +238,24 @@ parall refs graph prll://tsk_xxx --depth 2
236
238
 
237
239
  \`refs graph\` traverses both directions (inbound + outbound) and returns \`nodes\`
238
240
  and \`edges\` with each node's hop \`depth\`. \`truncated: true\` means a size cap clipped
239
- the result — narrow it with a smaller \`--depth\`.
241
+ the result — narrow it with a smaller \`--depth\`. Edges carry \`context\` — the
242
+ author's annotation from \`[context](prll://...)\` — telling you *why* two
243
+ entities are linked, not just that they are.
244
+
245
+ The graph returns bare node URIs (no titles). The usual two-step: \`refs graph\`
246
+ for topology, then batch-\`refs resolve\` the node URIs you care about for
247
+ titles/status. If graph rejects your URI with a path/anchor error, strip it to
248
+ the entity root (\`prll://wik_xxx/docs/a.md\` → \`prll://wik_xxx\`) and re-query —
249
+ but note this WIDENS the query to the whole entity, not that one file: the
250
+ graph seeds from the wiki id, so a specific file's outbound links may sit
251
+ deeper in the result (or past the size caps). For refs pointing AT one file
252
+ (inbound), \`refs backlinks\` on the full file URI is precise. There is no
253
+ precise query for one file's OUTBOUND edges today — the widened root graph is
254
+ best-effort for those, or read the file itself for its \`prll://\` links.
255
+ Wiki-file nodes inside a graph *result* do legitimately carry paths.
256
+
257
+ \`refs backlinks\` items include a \`snippet\` of the referencing content — often
258
+ enough to judge relevance without fetching the source entity.
240
259
 
241
260
  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.
242
261
  `;
package/src/types.ts CHANGED
@@ -69,10 +69,14 @@ export type ParallEvent = {
69
69
  /** External IM channel metadata, used for channel_message events. */
70
70
  channelProvider?: string;
71
71
  channelConversationType?: string;
72
- /** Provider-side conversation id (the send_message target). */
72
+ /** Provider-side conversation id (the reply's addressing target). */
73
73
  channelExternalConversationId?: string;
74
74
  /** Provider-side message id (in-thread reply target). */
75
75
  channelExternalMessageId?: string;
76
+ /** Live capability grant: the `<provider>-cli` capability is active, so
77
+ * the vendor CLI (broker shim) is on PATH and is THE reply path. False /
78
+ * absent → outbound is disabled for this org; the hint says so. */
79
+ channelCliCapable?: boolean;
76
80
  /** Original event timestamp (e.g., message.created_at). When present,
77
81
  * input steps use this instead of server insertion time for ordering. */
78
82
  sentAt?: string;