@parall/agent-core 1.14.4 → 1.15.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.
@@ -3,13 +3,13 @@ export function buildEventBody(event) {
3
3
  if (event.type === "message") {
4
4
  lines.push(`[Event: message.new]`);
5
5
  const chatLabel = event.targetName
6
- ? `"${event.targetName}" (${event.targetId})`
7
- : event.targetId;
6
+ ? `"${event.targetName}" (prll://${event.targetId})`
7
+ : `prll://${event.targetId}`;
8
8
  lines.push(`[Chat: ${chatLabel} | type: ${event.targetType ?? "unknown"}]`);
9
- lines.push(`[From: ${event.senderName} (${event.senderId})]`);
10
- lines.push(`[Message ID: ${event.messageId}]`);
9
+ lines.push(`[From: ${event.senderName} (prll://${event.senderId})]`);
10
+ lines.push(`[Message ID: prll://${event.messageId}]`);
11
11
  if (event.threadRootId)
12
- lines.push(`[Thread: ${event.threadRootId}]`);
12
+ lines.push(`[Thread: prll://${event.threadRootId}]`);
13
13
  if (event.noReply)
14
14
  lines.push(`[Hint: no_reply]`);
15
15
  if (event.mediaFields?.MediaUrl) {
@@ -20,10 +20,10 @@ export function buildEventBody(event) {
20
20
  else {
21
21
  lines.push(`[Event: task.assigned]`);
22
22
  const taskLabel = event.targetName
23
- ? `${event.targetName} (${event.targetId})`
24
- : event.targetId;
25
- lines.push(`[Task: ${taskLabel} | type: ${event.targetType ?? "task"}]`);
26
- lines.push(`[Assigned by: ${event.senderName} (${event.senderId})]`);
23
+ ? `${event.targetName} (prll://${event.targetId})`
24
+ : `prll://${event.targetId}`;
25
+ lines.push(`[Task: ${taskLabel}]`);
26
+ lines.push(`[Assigned by: ${event.senderName} (prll://${event.senderId})]`);
27
27
  lines.push("", event.body);
28
28
  }
29
29
  return lines.join("\n");
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-base.d.ts","sourceRoot":"","sources":["../src/gateway-base.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,YAAY,EAAE,QAAQ,EAAE,MA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qB;IACrD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsC;IACjE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK5B;IAEF,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,eAAe,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;gBAEjB,IAAI,EAAE,oBAAoB;IAIjD,GAAG,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA8ElD,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,oBAAoB;YAmBd,eAAe;YAqBf,iBAAiB;IAsF/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,eAAe;YAQT,gCAAgC;YAMhC,WAAW;YAyDX,gBAAgB;YAmEhB,eAAe;YAmDf,kBAAkB;YAoElB,kBAAkB;YAkBlB,4BAA4B;YA8D5B,aAAa;YA8Bb,oBAAoB;YAmCpB,mBAAmB;YAoGnB,WAAW;YA0DX,QAAQ;CAsBvB"}
@@ -662,6 +662,10 @@ export class ParallAgentGateway {
662
662
  this.opts.log?.info(`parall[${this.opts.accountId}]: task assigned: ${task.identifier ?? task.id} "${task.title}"`);
663
663
  const parts = [`Title: ${task.title}`];
664
664
  parts.push(`Status: ${task.status}`, `Priority: ${task.priority}`);
665
+ if (task.project_id)
666
+ parts.push(`Project: prll://${task.project_id}`);
667
+ if (task.parent_id)
668
+ parts.push(`Parent: prll://${task.parent_id}`);
665
669
  if (task.description)
666
670
  parts.push("", task.description);
667
671
  const event = {
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from "./types.js";
2
2
  export * from "./session-state.js";
3
3
  export * from "./routing.js";
4
4
  export * from "./event-format.js";
5
+ export * from "./prompt-fragments.js";
5
6
  export * from "./dispatch-adapter.js";
6
7
  export * from "./gateway-base.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -2,5 +2,6 @@ export * from "./types.js";
2
2
  export * from "./session-state.js";
3
3
  export * from "./routing.js";
4
4
  export * from "./event-format.js";
5
+ export * from "./prompt-fragments.js";
5
6
  export * from "./dispatch-adapter.js";
6
7
  export * from "./gateway-base.js";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Shared prompt fragments for Parall agent runtimes.
3
+ * Each runtime adapter imports these and injects them via its own mechanism
4
+ * (OpenClaw: appendSystemContext, Claude Code: workspace file, etc.).
5
+ *
6
+ * This is the agent-facing SSOT for prll:// URI usage. The developer-facing
7
+ * architectural spec (BNF, canonicalization, data model) lives in
8
+ * docs/engineering-design/reference-schema-design.md. Different audiences,
9
+ * no duplication — this teaches agents HOW to use refs, the design doc
10
+ * explains WHY the system works the way it does.
11
+ */
12
+ export declare const PRLL_REFERENCE_GUIDE = "## Parall References\n\nEvery entity on Parall has a `prll://` URI. Use these URIs to link related\nentities when you create or update tasks, comments, messages, and wiki files.\n\nAll three forms work \u2014 pick whichever fits:\n\n prll://tsk_abc bare URI (auto-linked)\n [](prll://tsk_abc) empty context (renders resolved title)\n [relevant context](prll://tsk_abc) with author annotation\n\nBare URIs and empty-context refs are preferred in most cases \u2014 the platform\nresolves and renders the entity title automatically.\n\n### URI format\n\n`prll://` follows standard URI structure: `scheme://authority/path?query#fragment`.\n\n**Entities** \u2014 the entity ID is the authority:\n\n prll://usr_xxx user prll://prj_xxx project\n prll://tsk_xxx task prll://wik_xxx wiki\n prll://msg_xxx message prll://tcm_xxx task comment\n prll://cht_xxx chat prll://ase_xxx agent session\n\n**Wiki** \u2014 path is file path, fragment is a typed anchor:\n\n prll://wik_xxx/docs/guide.md file\n prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)\n prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)\n\n Anchor types: `h=` heading, `l=` line/range, `s=` symbol.\n Line anchors in persistent content require `?rev=<full-40-char-sha>`.\n\n**Chat message range**:\n\n prll://cht_xxx#range=msg_01HA,msg_01HZ\n\n**Field access** \u2014 path selects a field (omit to reference the entity itself):\n\n prll://tsk_xxx/description#Implementation heading within task description\n\n### When to reference\n\n- **Origin** \u2014 always link the message or task that triggered your work\n- **Design docs / wiki** \u2014 link specs and guides relevant to the work\n- **Related tasks** \u2014 link parent, sibling, or blocking tasks\n- **People** \u2014 link assignees or stakeholders when mentioning them\n- **Conversations** \u2014 link a chat or message range as context\n\n### Why this matters\n\nOther agents and humans read your output. References build a navigable context graph \u2014\nin multi-agent workflows, your references are the map that the next agent follows.";
13
+ //# sourceMappingURL=prompt-fragments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-fragments.d.ts","sourceRoot":"","sources":["../src/prompt-fragments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,oBAAoB,6xEAqDkD,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Shared prompt fragments for Parall agent runtimes.
3
+ * Each runtime adapter imports these and injects them via its own mechanism
4
+ * (OpenClaw: appendSystemContext, Claude Code: workspace file, etc.).
5
+ *
6
+ * This is the agent-facing SSOT for prll:// URI usage. The developer-facing
7
+ * architectural spec (BNF, canonicalization, data model) lives in
8
+ * docs/engineering-design/reference-schema-design.md. Different audiences,
9
+ * no duplication — this teaches agents HOW to use refs, the design doc
10
+ * explains WHY the system works the way it does.
11
+ */
12
+ export const PRLL_REFERENCE_GUIDE = `## Parall References
13
+
14
+ Every entity on Parall has a \`prll://\` URI. Use these URIs to link related
15
+ entities when you create or update tasks, comments, messages, and wiki files.
16
+
17
+ All three forms work — pick whichever fits:
18
+
19
+ prll://tsk_abc bare URI (auto-linked)
20
+ [](prll://tsk_abc) empty context (renders resolved title)
21
+ [relevant context](prll://tsk_abc) with author annotation
22
+
23
+ Bare URIs and empty-context refs are preferred in most cases — the platform
24
+ resolves and renders the entity title automatically.
25
+
26
+ ### URI format
27
+
28
+ \`prll://\` follows standard URI structure: \`scheme://authority/path?query#fragment\`.
29
+
30
+ **Entities** — the entity ID is the authority:
31
+
32
+ prll://usr_xxx user prll://prj_xxx project
33
+ prll://tsk_xxx task prll://wik_xxx wiki
34
+ prll://msg_xxx message prll://tcm_xxx task comment
35
+ prll://cht_xxx chat prll://ase_xxx agent session
36
+
37
+ **Wiki** — path is file path, fragment is a typed anchor:
38
+
39
+ prll://wik_xxx/docs/guide.md file
40
+ prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)
41
+ prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)
42
+
43
+ Anchor types: \`h=\` heading, \`l=\` line/range, \`s=\` symbol.
44
+ Line anchors in persistent content require \`?rev=<full-40-char-sha>\`.
45
+
46
+ **Chat message range**:
47
+
48
+ prll://cht_xxx#range=msg_01HA,msg_01HZ
49
+
50
+ **Field access** — path selects a field (omit to reference the entity itself):
51
+
52
+ prll://tsk_xxx/description#Implementation heading within task description
53
+
54
+ ### When to reference
55
+
56
+ - **Origin** — always link the message or task that triggered your work
57
+ - **Design docs / wiki** — link specs and guides relevant to the work
58
+ - **Related tasks** — link parent, sibling, or blocking tasks
59
+ - **People** — link assignees or stakeholders when mentioning them
60
+ - **Conversations** — link a chat or message range as context
61
+
62
+ ### Why this matters
63
+
64
+ Other agents and humans read your output. References build a navigable context graph —
65
+ in multi-agent workflows, your references are the map that the next agent follows.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/agent-core",
3
- "version": "1.14.4",
3
+ "version": "1.15.0",
4
4
  "description": "Shared agent runtime orchestration helpers for Parall",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "src"
23
23
  ],
24
24
  "dependencies": {
25
- "@parall/sdk": "1.14.4"
25
+ "@parall/sdk": "1.15.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",
@@ -5,12 +5,12 @@ export function buildEventBody(event: ParallEvent): string {
5
5
  if (event.type === "message") {
6
6
  lines.push(`[Event: message.new]`);
7
7
  const chatLabel = event.targetName
8
- ? `"${event.targetName}" (${event.targetId})`
9
- : event.targetId;
8
+ ? `"${event.targetName}" (prll://${event.targetId})`
9
+ : `prll://${event.targetId}`;
10
10
  lines.push(`[Chat: ${chatLabel} | type: ${event.targetType ?? "unknown"}]`);
11
- lines.push(`[From: ${event.senderName} (${event.senderId})]`);
12
- lines.push(`[Message ID: ${event.messageId}]`);
13
- if (event.threadRootId) lines.push(`[Thread: ${event.threadRootId}]`);
11
+ lines.push(`[From: ${event.senderName} (prll://${event.senderId})]`);
12
+ lines.push(`[Message ID: prll://${event.messageId}]`);
13
+ if (event.threadRootId) lines.push(`[Thread: prll://${event.threadRootId}]`);
14
14
  if (event.noReply) lines.push(`[Hint: no_reply]`);
15
15
  if (event.mediaFields?.MediaUrl) {
16
16
  lines.push(`[Attachment: ${event.mediaFields.MediaType ?? "file"} ${event.mediaFields.MediaUrl}]`);
@@ -19,10 +19,10 @@ export function buildEventBody(event: ParallEvent): string {
19
19
  } else {
20
20
  lines.push(`[Event: task.assigned]`);
21
21
  const taskLabel = event.targetName
22
- ? `${event.targetName} (${event.targetId})`
23
- : event.targetId;
24
- lines.push(`[Task: ${taskLabel} | type: ${event.targetType ?? "task"}]`);
25
- lines.push(`[Assigned by: ${event.senderName} (${event.senderId})]`);
22
+ ? `${event.targetName} (prll://${event.targetId})`
23
+ : `prll://${event.targetId}`;
24
+ lines.push(`[Task: ${taskLabel}]`);
25
+ lines.push(`[Assigned by: ${event.senderName} (prll://${event.senderId})]`);
26
26
  lines.push("", event.body);
27
27
  }
28
28
  return lines.join("\n");
@@ -784,6 +784,8 @@ export class ParallAgentGateway {
784
784
 
785
785
  const parts = [`Title: ${task.title}`];
786
786
  parts.push(`Status: ${task.status}`, `Priority: ${task.priority}`);
787
+ if (task.project_id) parts.push(`Project: prll://${task.project_id}`);
788
+ if (task.parent_id) parts.push(`Parent: prll://${task.parent_id}`);
787
789
  if (task.description) parts.push("", task.description);
788
790
 
789
791
  const event: ParallEvent = {
package/src/index.ts CHANGED
@@ -2,5 +2,6 @@ export * from "./types.js";
2
2
  export * from "./session-state.js";
3
3
  export * from "./routing.js";
4
4
  export * from "./event-format.js";
5
+ export * from "./prompt-fragments.js";
5
6
  export * from "./dispatch-adapter.js";
6
7
  export * from "./gateway-base.js";
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Shared prompt fragments for Parall agent runtimes.
3
+ * Each runtime adapter imports these and injects them via its own mechanism
4
+ * (OpenClaw: appendSystemContext, Claude Code: workspace file, etc.).
5
+ *
6
+ * This is the agent-facing SSOT for prll:// URI usage. The developer-facing
7
+ * architectural spec (BNF, canonicalization, data model) lives in
8
+ * docs/engineering-design/reference-schema-design.md. Different audiences,
9
+ * no duplication — this teaches agents HOW to use refs, the design doc
10
+ * explains WHY the system works the way it does.
11
+ */
12
+
13
+ export const PRLL_REFERENCE_GUIDE = `## Parall References
14
+
15
+ Every entity on Parall has a \`prll://\` URI. Use these URIs to link related
16
+ entities when you create or update tasks, comments, messages, and wiki files.
17
+
18
+ All three forms work — pick whichever fits:
19
+
20
+ prll://tsk_abc bare URI (auto-linked)
21
+ [](prll://tsk_abc) empty context (renders resolved title)
22
+ [relevant context](prll://tsk_abc) with author annotation
23
+
24
+ Bare URIs and empty-context refs are preferred in most cases — the platform
25
+ resolves and renders the entity title automatically.
26
+
27
+ ### URI format
28
+
29
+ \`prll://\` follows standard URI structure: \`scheme://authority/path?query#fragment\`.
30
+
31
+ **Entities** — the entity ID is the authority:
32
+
33
+ prll://usr_xxx user prll://prj_xxx project
34
+ prll://tsk_xxx task prll://wik_xxx wiki
35
+ prll://msg_xxx message prll://tcm_xxx task comment
36
+ prll://cht_xxx chat prll://ase_xxx agent session
37
+
38
+ **Wiki** — path is file path, fragment is a typed anchor:
39
+
40
+ prll://wik_xxx/docs/guide.md file
41
+ prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)
42
+ prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)
43
+
44
+ Anchor types: \`h=\` heading, \`l=\` line/range, \`s=\` symbol.
45
+ Line anchors in persistent content require \`?rev=<full-40-char-sha>\`.
46
+
47
+ **Chat message range**:
48
+
49
+ prll://cht_xxx#range=msg_01HA,msg_01HZ
50
+
51
+ **Field access** — path selects a field (omit to reference the entity itself):
52
+
53
+ prll://tsk_xxx/description#Implementation heading within task description
54
+
55
+ ### When to reference
56
+
57
+ - **Origin** — always link the message or task that triggered your work
58
+ - **Design docs / wiki** — link specs and guides relevant to the work
59
+ - **Related tasks** — link parent, sibling, or blocking tasks
60
+ - **People** — link assignees or stakeholders when mentioning them
61
+ - **Conversations** — link a chat or message range as context
62
+
63
+ ### Why this matters
64
+
65
+ Other agents and humans read your output. References build a navigable context graph —
66
+ in multi-agent workflows, your references are the map that the next agent follows.`;