@parall/agent-core 1.31.0 → 1.32.1

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 (72) 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 +13 -13
  4. package/dist/dispatch-adapter.d.ts +15 -8
  5. package/dist/dispatch-adapter.d.ts.map +1 -1
  6. package/dist/event-format.d.ts +1 -1
  7. package/dist/event-format.d.ts.map +1 -1
  8. package/dist/event-format.js +68 -25
  9. package/dist/gateway-base.d.ts +14 -13
  10. package/dist/gateway-base.d.ts.map +1 -1
  11. package/dist/gateway-base.js +650 -313
  12. package/dist/index.d.ts +15 -13
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +13 -12
  15. package/dist/internal/attachment-input.d.ts +3 -3
  16. package/dist/internal/attachment-input.d.ts.map +1 -1
  17. package/dist/internal/attachment-input.js +61 -58
  18. package/dist/logger.d.ts +1 -1
  19. package/dist/platform-config.d.ts +28 -2
  20. package/dist/platform-config.d.ts.map +1 -1
  21. package/dist/platform-config.js +42 -11
  22. package/dist/prompt-fragments.d.ts +2 -2
  23. package/dist/prompt-fragments.d.ts.map +1 -1
  24. package/dist/prompt-fragments.js +37 -14
  25. package/dist/provider-config.d.ts +9 -0
  26. package/dist/provider-config.d.ts.map +1 -1
  27. package/dist/provider-config.js +13 -2
  28. package/dist/routing.d.ts +5 -5
  29. package/dist/routing.js +6 -6
  30. package/dist/session-state.d.ts +16 -0
  31. package/dist/session-state.d.ts.map +1 -1
  32. package/dist/session-state.js +45 -0
  33. package/dist/skills/index.d.ts +5 -4
  34. package/dist/skills/index.d.ts.map +1 -1
  35. package/dist/skills/index.js +28 -21
  36. package/dist/skills/parall-clips.d.ts +2 -0
  37. package/dist/skills/parall-clips.d.ts.map +1 -0
  38. package/dist/skills/parall-clips.js +44 -0
  39. package/dist/skills/parall-platform.d.ts +1 -1
  40. package/dist/skills/parall-platform.d.ts.map +1 -1
  41. package/dist/skills/parall-platform.js +6 -2
  42. package/dist/skills/parall-tasks.d.ts +1 -1
  43. package/dist/skills/parall-tasks.d.ts.map +1 -1
  44. package/dist/skills/parall-tasks.js +1 -1
  45. package/dist/skills/parall-wiki.d.ts +1 -1
  46. package/dist/skills/parall-wiki.d.ts.map +1 -1
  47. package/dist/skills/parall-wiki.js +1 -1
  48. package/dist/telemetry.d.ts +27 -0
  49. package/dist/telemetry.d.ts.map +1 -0
  50. package/dist/telemetry.js +205 -0
  51. package/dist/types.d.ts +18 -2
  52. package/dist/types.d.ts.map +1 -1
  53. package/package.json +11 -2
  54. package/src/bridge-workspace.ts +13 -13
  55. package/src/dispatch-adapter.ts +31 -8
  56. package/src/event-format.ts +80 -30
  57. package/src/gateway-base.ts +988 -445
  58. package/src/index.ts +23 -13
  59. package/src/internal/attachment-input.ts +127 -100
  60. package/src/logger.ts +1 -1
  61. package/src/platform-config.ts +61 -16
  62. package/src/prompt-fragments.ts +37 -14
  63. package/src/provider-config.ts +14 -2
  64. package/src/routing.ts +11 -11
  65. package/src/session-state.ts +62 -0
  66. package/src/skills/index.ts +34 -23
  67. package/src/skills/parall-clips.ts +44 -0
  68. package/src/skills/parall-platform.ts +6 -2
  69. package/src/skills/parall-tasks.ts +1 -1
  70. package/src/skills/parall-wiki.ts +1 -1
  71. package/src/telemetry.ts +252 -0
  72. package/src/types.ts +18 -2
@@ -1 +1 @@
1
- {"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../src/provider-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,SAAS,CAAC,EAAE,CAAC,EAAE,cAAc,GAAG,MAAM,CAWrD;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAOlE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,cAAc,GAAG,SAAS,CAQtF"}
1
+ {"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../src/provider-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,SAAS,CAAC,EAAE,CAAC,EAAE,cAAc,GAAG,MAAM,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,CAAC,EAAE,cAAc,GAAG,MAAM,CAWtE;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAOlE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,cAAc,GAAG,SAAS,CAQtF"}
@@ -1,13 +1,24 @@
1
1
  export function llmSource(pc) {
2
+ return effectiveLLMSourceExplicit(pc) || 'parall';
3
+ }
4
+ /**
5
+ * Returns the explicitly-configured LLM source — the llm_source value when
6
+ * set, or "custom" when BYO provider credentials are present — or "" when the
7
+ * provider_config carries no source signal at all (e.g. the empty `{}` default
8
+ * that self-hosted agents always have). The daemon supervisor uses the empty
9
+ * case to defer to the machine-level llm_source instead of letting `{}` shadow
10
+ * it as "parall". Mirrors the Go `ProviderConfig.EffectiveLLMSourceExplicit`.
11
+ */
12
+ export function effectiveLLMSourceExplicit(pc) {
2
13
  if (pc?.llm_source)
3
14
  return pc.llm_source;
4
15
  if (pc?.openai_api_key ||
5
16
  pc?.openai_base_url ||
6
17
  pc?.anthropic_auth_token ||
7
18
  pc?.anthropic_base_url) {
8
- return "custom";
19
+ return 'custom';
9
20
  }
10
- return "parall";
21
+ return '';
11
22
  }
12
23
  export function clearAllProviderCreds(env) {
13
24
  delete env.ANTHROPIC_AUTH_TOKEN;
package/dist/routing.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import type { DispatchState, ParallEvent } from "./types.js";
1
+ import type { DispatchState, ParallEvent } from './types.js';
2
2
  /** Where an inbound event should be routed. */
3
3
  export type TriggerDisposition = {
4
- action: "main";
4
+ action: 'main';
5
5
  } | {
6
- action: "buffer-main";
6
+ action: 'buffer-main';
7
7
  } | {
8
- action: "buffer-fork";
8
+ action: 'buffer-fork';
9
9
  forkKey: string;
10
10
  } | {
11
- action: "new-fork";
11
+ action: 'new-fork';
12
12
  };
13
13
  /** Pluggable strategy for routing triggers when main session is busy. */
14
14
  export type RoutingStrategy = (event: ParallEvent, state: DispatchState) => TriggerDisposition;
package/dist/routing.js CHANGED
@@ -8,22 +8,22 @@ const MAX_CONCURRENT_FORKS = 20;
8
8
  */
9
9
  export const defaultRoutingStrategy = (event, state) => {
10
10
  if (state.mainCurrentTargetId === event.targetId) {
11
- return { action: "buffer-main" };
11
+ return { action: 'buffer-main' };
12
12
  }
13
13
  const existingForkKey = state.activeForks.get(event.targetId);
14
14
  if (existingForkKey)
15
- return { action: "buffer-fork", forkKey: existingForkKey };
15
+ return { action: 'buffer-fork', forkKey: existingForkKey };
16
16
  if (state.activeForks.size >= MAX_CONCURRENT_FORKS) {
17
- return { action: "buffer-main" };
17
+ return { action: 'buffer-main' };
18
18
  }
19
- return { action: "new-fork" };
19
+ return { action: 'new-fork' };
20
20
  };
21
21
  /** Route an inbound event based on current dispatch state. */
22
22
  export function routeTrigger(event, state, strategy = defaultRoutingStrategy) {
23
23
  const existingForkKey = state.activeForks.get(event.targetId);
24
24
  if (existingForkKey)
25
- return { action: "buffer-fork", forkKey: existingForkKey };
25
+ return { action: 'buffer-fork', forkKey: existingForkKey };
26
26
  if (!state.mainDispatching)
27
- return { action: "main" };
27
+ return { action: 'main' };
28
28
  return strategy(event, state);
29
29
  }
@@ -14,4 +14,20 @@ export declare function clearDispatchGroupKey(sessionKey: string): void;
14
14
  export declare function setDispatchNoReply(sessionKey: string, noReply: boolean): void;
15
15
  export declare function getDispatchNoReply(sessionKey: string): boolean;
16
16
  export declare function clearDispatchNoReply(sessionKey: string): void;
17
+ export type DispatchMetrics = {
18
+ deliver_text_chunks: number;
19
+ deliver_text_chars: number;
20
+ message_send_attempts: number;
21
+ message_send_successes: number;
22
+ no_reply_called: boolean;
23
+ tool_call_count: number;
24
+ started_at: number;
25
+ };
26
+ export declare function resetDispatchMetrics(sessionKey: string): void;
27
+ export declare function getDispatchMetrics(sessionKey: string): DispatchMetrics | undefined;
28
+ export declare function clearDispatchMetrics(sessionKey: string): void;
29
+ export declare function recordDeliverText(sessionKey: string, charCount: number): void;
30
+ export declare function recordMessageSend(sessionKey: string, success: boolean): void;
31
+ export declare function recordNoReply(sessionKey: string): void;
32
+ export declare function recordToolCall(sessionKey: string): void;
17
33
  //# sourceMappingURL=session-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-state.d.ts","sourceRoot":"","sources":["../src/session-state.ts"],"names":[],"mappings":"AAYA,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAElE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QAExE;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,QAEvD;AAED,2FAA2F;AAC3F,wBAAgB,oBAAoB,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+52,48 @@ export function getDispatchNoReply(sessionKey) {
52
52
  export function clearDispatchNoReply(sessionKey) {
53
53
  dispatchNoReplyMap.delete(normalizeSessionKey(sessionKey));
54
54
  }
55
+ const dispatchMetricsMap = new Map();
56
+ export function resetDispatchMetrics(sessionKey) {
57
+ dispatchMetricsMap.set(normalizeSessionKey(sessionKey), {
58
+ deliver_text_chunks: 0,
59
+ deliver_text_chars: 0,
60
+ message_send_attempts: 0,
61
+ message_send_successes: 0,
62
+ no_reply_called: false,
63
+ tool_call_count: 0,
64
+ started_at: Date.now(),
65
+ });
66
+ }
67
+ export function getDispatchMetrics(sessionKey) {
68
+ return dispatchMetricsMap.get(normalizeSessionKey(sessionKey));
69
+ }
70
+ export function clearDispatchMetrics(sessionKey) {
71
+ dispatchMetricsMap.delete(normalizeSessionKey(sessionKey));
72
+ }
73
+ export function recordDeliverText(sessionKey, charCount) {
74
+ const m = dispatchMetricsMap.get(normalizeSessionKey(sessionKey));
75
+ if (!m)
76
+ return;
77
+ m.deliver_text_chunks++;
78
+ m.deliver_text_chars += charCount;
79
+ }
80
+ export function recordMessageSend(sessionKey, success) {
81
+ const m = dispatchMetricsMap.get(normalizeSessionKey(sessionKey));
82
+ if (!m)
83
+ return;
84
+ m.message_send_attempts++;
85
+ if (success)
86
+ m.message_send_successes++;
87
+ }
88
+ export function recordNoReply(sessionKey) {
89
+ const m = dispatchMetricsMap.get(normalizeSessionKey(sessionKey));
90
+ if (!m)
91
+ return;
92
+ m.no_reply_called = true;
93
+ }
94
+ export function recordToolCall(sessionKey) {
95
+ const m = dispatchMetricsMap.get(normalizeSessionKey(sessionKey));
96
+ if (!m)
97
+ return;
98
+ m.tool_call_count++;
99
+ }
@@ -1,7 +1,8 @@
1
- export { PARALL_PLATFORM_SKILL } from "./parall-platform.js";
2
- export { PARALL_TASKS_SKILL } from "./parall-tasks.js";
3
- export { PARALL_WIKI_SKILL } from "./parall-wiki.js";
4
- export { PARALL_SCHEDULES_SKILL } from "./parall-schedules.js";
1
+ export { PARALL_PLATFORM_SKILL } from './parall-platform.js';
2
+ export { PARALL_TASKS_SKILL } from './parall-tasks.js';
3
+ export { PARALL_WIKI_SKILL } from './parall-wiki.js';
4
+ export { PARALL_SCHEDULES_SKILL } from './parall-schedules.js';
5
+ export { PARALL_CLIPS_SKILL } from './parall-clips.js';
5
6
  export type SkillMeta = {
6
7
  name: string;
7
8
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAO/D,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,eAAO,MAAM,MAAM,EAAE,SAAS,EAqB7B,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKvD;AAGD,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAIjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAQvD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,eAAO,MAAM,MAAM,EAAE,SAAS,EA+B7B,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKvD;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAIjE"}
@@ -1,44 +1,51 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- export { PARALL_PLATFORM_SKILL } from "./parall-platform.js";
4
- export { PARALL_TASKS_SKILL } from "./parall-tasks.js";
5
- export { PARALL_WIKI_SKILL } from "./parall-wiki.js";
6
- export { PARALL_SCHEDULES_SKILL } from "./parall-schedules.js";
7
- import { PARALL_PLATFORM_SKILL } from "./parall-platform.js";
8
- import { PARALL_TASKS_SKILL } from "./parall-tasks.js";
9
- import { PARALL_WIKI_SKILL } from "./parall-wiki.js";
10
- import { PARALL_SCHEDULES_SKILL } from "./parall-schedules.js";
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ export { PARALL_PLATFORM_SKILL } from './parall-platform.js';
4
+ export { PARALL_TASKS_SKILL } from './parall-tasks.js';
5
+ export { PARALL_WIKI_SKILL } from './parall-wiki.js';
6
+ export { PARALL_SCHEDULES_SKILL } from './parall-schedules.js';
7
+ export { PARALL_CLIPS_SKILL } from './parall-clips.js';
8
+ import { PARALL_PLATFORM_SKILL } from './parall-platform.js';
9
+ import { PARALL_TASKS_SKILL } from './parall-tasks.js';
10
+ import { PARALL_WIKI_SKILL } from './parall-wiki.js';
11
+ import { PARALL_SCHEDULES_SKILL } from './parall-schedules.js';
12
+ import { PARALL_CLIPS_SKILL } from './parall-clips.js';
11
13
  export const SKILLS = [
12
14
  {
13
- name: "parall-platform",
15
+ name: 'parall-platform',
14
16
  description: "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.",
15
17
  content: PARALL_PLATFORM_SKILL,
16
18
  },
17
19
  {
18
- name: "parall-tasks",
19
- description: "Parall task operations: create, update, comment on, and query tasks and projects. Use when: user asks to create a task, update task status, add comments, list tasks, or manage projects.",
20
+ name: 'parall-tasks',
21
+ description: 'Parall task operations: create, update, comment on, and query tasks and projects. Use when: user asks to create a task, update task status, add comments, list tasks, or manage projects.',
20
22
  content: PARALL_TASKS_SKILL,
21
23
  },
22
24
  {
23
- name: "parall-wiki",
24
- description: "Parall wiki operations: read, search, edit, and propose changes to organization knowledge bases. Use when: user asks to read/write docs, edit wiki pages, search knowledge base, propose changes, or review changesets.",
25
+ name: 'parall-wiki',
26
+ description: 'Parall wiki operations: read, search, edit, and propose changes to organization knowledge bases. Use when: user asks to read/write docs, edit wiki pages, search knowledge base, propose changes, or review changesets.',
25
27
  content: PARALL_WIKI_SKILL,
26
28
  },
27
29
  {
28
- name: "parall-schedules",
29
- description: "Parall schedule operations: create / pause / resume / cancel recurring or one-shot time triggers; respond to schedule fire events. Use when: user asks to set up a recurring reminder, schedule a delayed prompt, run cron-like work, or when the agent receives an `[Event: schedule.fired]` dispatch.",
30
+ name: 'parall-schedules',
31
+ description: 'Parall schedule operations: create / pause / resume / cancel recurring or one-shot time triggers; respond to schedule fire events. Use when: user asks to set up a recurring reminder, schedule a delayed prompt, run cron-like work, or when the agent receives an `[Event: schedule.fired]` dispatch.',
30
32
  content: PARALL_SCHEDULES_SKILL,
31
33
  },
34
+ {
35
+ name: 'parall-clips',
36
+ description: 'Parall clip operations: list installed clips, invoke clip commands, inspect clip details. Use when: the task requires external capabilities (GitHub, web search, etc.), user asks about available tools/clips, or you need to call a clip command.',
37
+ content: PARALL_CLIPS_SKILL,
38
+ },
32
39
  ];
33
40
  /** Write plain skill markdown files to a target directory (CC/Codex). */
34
41
  export function writeSkillFiles(targetDir) {
35
42
  fs.mkdirSync(targetDir, { recursive: true });
36
43
  for (const skill of SKILLS) {
37
- fs.writeFileSync(path.join(targetDir, `${skill.name}.md`), skill.content, "utf8");
44
+ fs.writeFileSync(path.join(targetDir, `${skill.name}.md`), skill.content, 'utf8');
38
45
  }
39
46
  }
40
47
  export function buildSkillReferences(workspaceDir) {
41
- const dir = path.join(workspaceDir, ".parall", "skills");
42
- const lines = SKILLS.map((s) => `- ${s.description.split(":")[0]}: \`${dir}/${s.name}.md\``);
43
- return `## Platform Skills (read on demand)\n\n${lines.join("\n")}\n`;
48
+ const dir = path.join(workspaceDir, '.parall', 'skills');
49
+ const lines = SKILLS.map((s) => `- ${s.description.split(':')[0]}: \`${dir}/${s.name}.md\``);
50
+ return `## Platform Skills (read on demand)\n\n${lines.join('\n')}\n`;
44
51
  }
@@ -0,0 +1,2 @@
1
+ export declare const PARALL_CLIPS_SKILL = "# Parall Clips\n\nClips are capability extensions \u2014 packaged toolkits that give you extra commands (e.g. GitHub operations, web search, code analysis). Clips installed in the org are available for any agent to invoke via the CLI.\n\n## Discovering available clips\n\n```bash\n# List all clips installed in the org\nparall clip list\n\n# Show detailed info about a clip (manifest, commands, version)\nparall clip info <alias>\n```\n\n## Invoking a clip command\n\n```bash\n# Invoke a command on a clip by alias\nparall clip invoke <alias> <command> [input]\n\n# input is optional \u2014 when provided, it can be a JSON string or plain text\nparall clip invoke github-tools list-repos '{\"org\": \"acme\"}'\nparall clip invoke web-search search \"latest Node.js LTS version\"\n\n# Custom timeout (default 30s)\nparall clip invoke github-tools create-issue '{\"title\": \"Bug report\"}' --timeout 60000\n```\n\n## How clips work\n\n1. An org admin installs a clip from the Pinix registry or creates a custom one\n2. `parall clip list` shows every clip installed in the org\n3. You can only **invoke** clips that an admin has **bound to you** \u2014 invoking an unbound clip returns a \"not bound\" error. Ask an admin to bind the clip if you need it.\n4. Each clip exposes one or more named commands with typed input/output\n\n## When to use clips\n\n- Check `parall clip list` when a task requires capabilities beyond your built-in tools (e.g. GitHub API, external services, specialized analysis)\n- Use `parall clip info <alias>` to discover available commands and their expected input format\n- If `parall clip invoke` reports the clip isn't bound to you, that clip exists in the org but hasn't been granted to you \u2014 ask an admin to bind it\n- Clip invocations return JSON output on success or an error message on failure\n\nCLI command results are JSON on stdout.\n";
2
+ //# sourceMappingURL=parall-clips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parall-clips.d.ts","sourceRoot":"","sources":["../../src/skills/parall-clips.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,y1DA2C9B,CAAC"}
@@ -0,0 +1,44 @@
1
+ export const PARALL_CLIPS_SKILL = `# Parall Clips
2
+
3
+ Clips are capability extensions — packaged toolkits that give you extra commands (e.g. GitHub operations, web search, code analysis). Clips installed in the org are available for any agent to invoke via the CLI.
4
+
5
+ ## Discovering available clips
6
+
7
+ \`\`\`bash
8
+ # List all clips installed in the org
9
+ parall clip list
10
+
11
+ # Show detailed info about a clip (manifest, commands, version)
12
+ parall clip info <alias>
13
+ \`\`\`
14
+
15
+ ## Invoking a clip command
16
+
17
+ \`\`\`bash
18
+ # Invoke a command on a clip by alias
19
+ parall clip invoke <alias> <command> [input]
20
+
21
+ # input is optional — when provided, it can be a JSON string or plain text
22
+ parall clip invoke github-tools list-repos '{"org": "acme"}'
23
+ parall clip invoke web-search search "latest Node.js LTS version"
24
+
25
+ # Custom timeout (default 30s)
26
+ parall clip invoke github-tools create-issue '{"title": "Bug report"}' --timeout 60000
27
+ \`\`\`
28
+
29
+ ## How clips work
30
+
31
+ 1. An org admin installs a clip from the Pinix registry or creates a custom one
32
+ 2. \`parall clip list\` shows every clip installed in the org
33
+ 3. You can only **invoke** clips that an admin has **bound to you** — invoking an unbound clip returns a "not bound" error. Ask an admin to bind the clip if you need it.
34
+ 4. Each clip exposes one or more named commands with typed input/output
35
+
36
+ ## When to use clips
37
+
38
+ - Check \`parall clip list\` when a task requires capabilities beyond your built-in tools (e.g. GitHub API, external services, specialized analysis)
39
+ - Use \`parall clip info <alias>\` to discover available commands and their expected input format
40
+ - If \`parall clip invoke\` reports the clip isn't bound to you, that clip exists in the org but hasn't been granted to you — ask an admin to bind it
41
+ - Clip invocations return JSON output on success or an error message on failure
42
+
43
+ CLI command results are JSON on stdout.
44
+ `;
@@ -1,2 +1,2 @@
1
- export declare const PARALL_PLATFORM_SKILL = "# Parall Platform\n\nQuery organization data via the Parall CLI. Auth is pre-configured.\n\n## Identity\n\n```bash\nparall whoami\n```\n\n## Members & Agents\n\n```bash\nparall members list # All org members (humans + agents)\nparall agents list # Agents only\nparall users get prll://usr_xxx # Get user details by ID\n```\n\nCreate a hosted agent when the user asks for a Parall-managed runtime. Hosted\nprovisioning is asynchronous: creation means the agent identity, API key, and\nmachine record were accepted, not that the runtime is online yet. Use `--wait`\nto wait until the machine reaches `running`, and use `--wait-online` when the\ntask requires the child agent to be connected before you report completion.\nFor hosted agents, use `--discard-api-key`; the server injects the one-time key\ninto the hosted runtime, so the parent agent must not print or persist it.\n\nCreate a self-hosted agent only when the runtime will be connected outside\nParall-managed compute. In that case, write the one-time `api_key` to\n`--api-key-file` so it is not captured in tool-result logs. Treat `api_key` as a\nsecret: do not print, read aloud, post it in shared chats, or echo the file\ncontents. Include the `user.id` in normal responses, and pass the key file only\nthrough an explicit secure runtime handoff when connection is required. Never\nuse `--show-api-key` from an agent runtime. Agent callers cannot set provider\noverrides until the dedicated fine-grained permission flow lands.\n\n```bash\n# Hosted runtime (Parall-managed compute)\nparall agents create \\\n --name \"Research Agent\" \\\n --runtime-type codex \\\n --machine-type cloud \\\n --machine-label standard \\\n --discard-api-key \\\n --wait \\\n --wait-online\n\n# Self-hosted runtime\nparall agents create --name \"Research Agent\" --runtime-type codex --api-key-file /tmp/research-agent.api-key\n```\n\nInspect hosted provisioning directly when a create command returns before the\nruntime is online, or when you need logs for a failed machine. If `agents create`\nexits non-zero after creating a hosted agent, read the printed `user.id` and\n`machine.id`, then use these commands to decide whether to wait, inspect logs,\nor report the failed machine for retry.\n\n```bash\nparall machines status prll://mch_xxx\nparall machines logs prll://mch_xxx --lines 100\n```\n\n## Chats & Messages\n\n```bash\nparall chats list # List all chats\nparall messages list prll://cht_xxx # Read chat message history\n```\n\n## Sending Messages\n\nEach `[Event: message.new]` includes `[Chat: ... (prll://cht_xxx)]` \u2014 use that chat URI to reply.\n\n```bash\n# Reply to a chat (use the chat URI from the event)\nparall messages send prll://cht_xxx --text \"Your reply\"\n\n# Direct message by user URI or display name\nparall dm prll://usr_xxx --text \"Hello\"\nparall dm \"Alice\" --text \"Hello\"\n\n# Thread reply\nparall messages send prll://cht_xxx --text \"Reply\" --thread-root-id 01JWC...\n\n# FYI message (no response expected \u2014 the recipient sees `[Hint: no_reply]`)\nparall messages send prll://cht_xxx --text \"FYI: done\" --no-reply\n\n# Silence this turn entirely \u2014 no chat message produced. Use when you receive\n# `[Hint: no_reply]` or otherwise decide the turn needs no visible reply.\n# Run BEFORE any `messages send` / `dm`; those still deliver real messages.\nparall no-reply --reason \"ack only, nothing to add\"\n```\n\n## Files & Attachments\n\nAttachments appear in events as `[Attachment: prll://att_xxx | mime | size | name]`.\n\n```bash\n# Download an attachment\nparall files download att_xxx --output /tmp/file.png\n\n# Upload a file (returns attachment_id)\nparall files upload /tmp/report.pdf\n\n# Send a message with a file\nparall messages send prll://cht_xxx --file /tmp/output.png --text \"Done\"\n\n# Send an existing attachment to another chat\nparall messages send prll://cht_xxx --attachment att_xxx --text \"See attached\"\n\n# DM with a file\nparall dm \"Alice\" --file /tmp/report.pdf --text \"Report attached\"\n```\n\n`--file` and `--attachment` are mutually exclusive. `--text` can be combined with either.\n\n## Approvals\n\nWhen a CLI command returns a `PERMISSION_DENIED` error, the output includes a `Tip:` line with an approval-request template \u2014 copy it and fill in the remaining placeholders (`--chat`, `--title`, `--reason`). The `Tip:` only appears for commonly approvable actions (archive, delete, restore); for other actions, use `parall approvals actions` to check if it's approvable.\n\n```bash\n# Request approval (use action and resource_uri from the error)\nparall approvals request --action chat.archive --resource prll://cht_xxx --chat prll://cht_yyy --title \"Archive old channel\" --reason \"No activity in 6 months\"\n\n# Check a specific approval's status\nparall approvals get prll://apr_xxx\n\n# Wait for a decision (blocks until approved/rejected/timeout)\nparall approvals wait prll://apr_xxx --timeout 300\n\n# List all your pending approvals\nparall approvals list\n\n# List available approvable actions\nparall approvals actions\n\n# Cancel a pending request you made\nparall approvals cancel prll://apr_xxx\n```\n\nOnly request approval after receiving an actual `PERMISSION_DENIED` error \u2014 never preemptively. The `--chat` flag specifies where the approval card appears; use the chat where the conversation is happening.\n\n## Reference URIs\n\nEvery entity is addressable with a `prll://` URI. Common prefixes you'll see in events, messages, and schedule descriptions:\n\n| Prefix | Entity | Skill |\n|--------|--------|-------|\n| `prll://usr_` | User (human or agent) | parall-platform |\n| `prll://cht_` | Chat | parall-platform |\n| `prll://msg_` | Message | parall-platform |\n| `prll://tsk_` | Task | parall-tasks |\n| `prll://prj_` | Project | parall-tasks |\n| `prll://sch_` | Schedule (time trigger) | parall-schedules |\n| `prll://srn_` | Schedule run (single fire audit record; carries fire-time snapshot) | parall-schedules |\n| `prll://wik_` | Wiki | parall-wiki |\n| `prll://att_` | Attachment | parall-platform (files) |\n\nWhen 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).\n\nAll CLI output is JSON.\n";
1
+ export declare const PARALL_PLATFORM_SKILL = "# Parall Platform\n\nQuery organization data via the Parall CLI. Auth is pre-configured.\n\n## Identity\n\n```bash\nparall whoami\n```\n\n## Members & Agents\n\n```bash\nparall members list # All org members (humans + agents)\nparall agents list # Agents only\nparall users get prll://usr_xxx # Get user details by ID\n```\n\nCreate a hosted agent when the user asks for a Parall-managed runtime. Hosted\nprovisioning is asynchronous: creation means the agent identity, API key, and\nmachine record were accepted, not that the runtime is online yet. Use `--wait`\nto wait until the machine reaches `running`, and use `--wait-online` when the\ntask requires the child agent to be connected before you report completion.\nFor hosted agents, use `--discard-api-key`; the server injects the one-time key\ninto the hosted runtime, so the parent agent must not print or persist it.\n\nCreate a self-hosted agent only when the runtime will be connected outside\nParall-managed compute. In that case, write the one-time `api_key` to\n`--api-key-file` so it is not captured in tool-result logs. Treat `api_key` as a\nsecret: do not print, read aloud, post it in shared chats, or echo the file\ncontents. Include the `user.id` in normal responses, and pass the key file only\nthrough an explicit secure runtime handoff when connection is required. Never\nuse `--show-api-key` from an agent runtime. Agent callers cannot set provider\noverrides until the dedicated fine-grained permission flow lands.\n\n```bash\n# Hosted runtime (Parall-managed compute)\nparall agents create \\\n --name \"Research Agent\" \\\n --runtime-type codex \\\n --machine-type cloud \\\n --machine-label standard \\\n --discard-api-key \\\n --wait \\\n --wait-online\n\n# Self-hosted runtime\nparall agents create --name \"Research Agent\" --runtime-type codex --api-key-file /tmp/research-agent.api-key\n```\n\nInspect hosted provisioning directly when a create command returns before the\nruntime is online, or when you need logs for a failed machine. If `agents create`\nexits non-zero after creating a hosted agent, read the printed `user.id` and\n`machine.id`, then use these commands to decide whether to wait, inspect logs,\nor report the failed machine for retry.\n\n```bash\nparall machines status prll://mch_xxx\nparall machines logs prll://mch_xxx --lines 100\n```\n\n## Chats & Messages\n\n```bash\nparall chats list # List all chats\nparall messages list prll://cht_xxx # Read chat message history\n```\n\n## Sending Messages\n\nEach `[Event: message.new]` includes `[Chat: ... (prll://cht_xxx)]` \u2014 use that chat URI to reply.\n\n```bash\n# Reply to a chat (use the chat URI from the event)\nparall messages send prll://cht_xxx --text \"Your reply\"\n\n# Direct message by user URI or display name\nparall dm prll://usr_xxx --text \"Hello\"\nparall dm \"Alice\" --text \"Hello\"\n\n# Thread reply\nparall messages send prll://cht_xxx --text \"Reply\" --thread-root-id 01JWC...\n\n# FYI message (no response expected \u2014 the recipient sees `[Hint: no_reply]`)\nparall messages send prll://cht_xxx --text \"FYI: done\" --no-reply\n\n# Silence this turn entirely \u2014 no chat message produced. Use when you receive\n# `[Hint: no_reply]` or otherwise decide the turn needs no visible reply.\n# Run BEFORE any `messages send` / `dm`; those still deliver real messages.\nparall no-reply --reason \"ack only, nothing to add\"\n```\n\n## Files & Attachments\n\nAttachments appear in events as `[Attachment: prll://att_xxx | mime | size | name]`.\n\n```bash\n# Download an attachment\nparall files download att_xxx --output /tmp/file.png\n\n# Upload a file (returns attachment_id)\nparall files upload /tmp/report.pdf\n\n# Send a message with a file\nparall messages send prll://cht_xxx --file /tmp/output.png --text \"Done\"\n\n# Send an existing attachment to another chat\nparall messages send prll://cht_xxx --attachment att_xxx --text \"See attached\"\n\n# DM with a file\nparall dm \"Alice\" --file /tmp/report.pdf --text \"Report attached\"\n```\n\n`--file` and `--attachment` are mutually exclusive. `--text` can be combined with either.\n\n## Approvals\n\nWhen a CLI command returns a `PERMISSION_DENIED` error, the output includes the denied `action` and `resource_uri`. Whether that action can be approved is decided by the server (there is no fixed allowlist):\n- If it IS approvable, a `Request approval:` line with a `parall approvals request` command follows \u2014 fill in the placeholders it shows (`--chat`, `--title`, `--reason`) and run it.\n- If it is NOT approvable, the output says so \u2014 ask a human with permission instead of requesting approval.\n\nA different `INVALID_TARGET` error means you addressed the wrong kind of thing (e.g. a `usr_` id where a chat is expected). Follow the message (e.g. use `parall dm` to message a user) \u2014 do not request approval for it.\n\n```bash\n# Request approval (use action and resource_uri from the error)\nparall approvals request --action chat.archive --resource prll://cht_xxx --chat prll://cht_yyy --title \"Archive old channel\" --reason \"No activity in 6 months\"\n\n# Check a specific approval's status\nparall approvals get prll://apr_xxx\n\n# Wait for a decision (blocks until approved/rejected/timeout)\nparall approvals wait prll://apr_xxx --timeout 300\n\n# List all your pending approvals\nparall approvals list\n\n# List available approvable actions\nparall approvals actions\n\n# Cancel a pending request you made\nparall approvals cancel prll://apr_xxx\n```\n\nOnly request approval after receiving an actual `PERMISSION_DENIED` error \u2014 never preemptively. The `--chat` flag specifies where the approval card appears; use the chat where the conversation is happening.\n\n## Reference URIs\n\nEvery entity is addressable with a `prll://` URI. Common prefixes you'll see in events, messages, and schedule descriptions:\n\n| Prefix | Entity | Skill |\n|--------|--------|-------|\n| `prll://usr_` | User (human or agent) | parall-platform |\n| `prll://cht_` | Chat | parall-platform |\n| `prll://msg_` | Message | parall-platform |\n| `prll://tsk_` | Task | parall-tasks |\n| `prll://prj_` | Project | parall-tasks |\n| `prll://sch_` | Schedule (time trigger) | parall-schedules |\n| `prll://srn_` | Schedule run (single fire audit record; carries fire-time snapshot) | parall-schedules |\n| `prll://wik_` | Wiki | parall-wiki |\n| `prll://att_` | Attachment | parall-platform (files) |\n\nWhen 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).\n\nCLI 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 \u2014 read both.\n";
2
2
  //# sourceMappingURL=parall-platform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parall-platform.d.ts","sourceRoot":"","sources":["../../src/skills/parall-platform.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,swMAgKjC,CAAC"}
1
+ {"version":3,"file":"parall-platform.d.ts","sourceRoot":"","sources":["../../src/skills/parall-platform.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,kxNAoKjC,CAAC"}
@@ -115,7 +115,11 @@ parall dm "Alice" --file /tmp/report.pdf --text "Report attached"
115
115
 
116
116
  ## Approvals
117
117
 
118
- When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes a \`Tip:\` line with an approval-request template copy it and fill in the remaining placeholders (\`--chat\`, \`--title\`, \`--reason\`). The \`Tip:\` only appears for commonly approvable actions (archive, delete, restore); for other actions, use \`parall approvals actions\` to check if it's approvable.
118
+ When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes the denied \`action\` and \`resource_uri\`. Whether that action can be approved is decided by the server (there is no fixed allowlist):
119
+ - If it IS approvable, a \`Request approval:\` line with a \`parall approvals request\` command follows — fill in the placeholders it shows (\`--chat\`, \`--title\`, \`--reason\`) and run it.
120
+ - If it is NOT approvable, the output says so — ask a human with permission instead of requesting approval.
121
+
122
+ A different \`INVALID_TARGET\` error means you addressed the wrong kind of thing (e.g. a \`usr_\` id where a chat is expected). Follow the message (e.g. use \`parall dm\` to message a user) — do not request approval for it.
119
123
 
120
124
  \`\`\`bash
121
125
  # Request approval (use action and resource_uri from the error)
@@ -157,5 +161,5 @@ Every entity is addressable with a \`prll://\` URI. Common prefixes you'll see i
157
161
 
158
162
  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).
159
163
 
160
- All CLI output is JSON.
164
+ 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.
161
165
  `;
@@ -1,2 +1,2 @@
1
- export declare const PARALL_TASKS_SKILL = "# Parall Tasks\n\nManage tasks and projects via the Parall CLI. Auth and runtime context are pre-configured.\n\n## Task Commands\n\n```bash\n# List tasks (filterable by status)\nparall tasks list\nparall tasks list --status todo\nparall tasks list --status in_progress\n\n# Create a task\nparall tasks create --title \"Task title\" [--assignee-id prll://usr_xxx] [--project-id prll://prj_xxx]\n\n# Update task status\nparall tasks update prll://tsk_xxx --status in_progress\nparall tasks update prll://tsk_xxx --status done\n\n# Add a comment\nparall tasks comments add prll://tsk_xxx --body \"Progress update...\"\n```\n\n## Project Commands\n\n```bash\nparall projects list\n```\n\n## Watching Tasks\n\nSubscribe to a task to receive notifications when others comment on it.\n\n```bash\n# Watch a task (you'll receive dispatch events for new comments)\nparall tasks watch prll://tsk_xxx\n\n# Unwatch\nparall tasks unwatch prll://tsk_xxx\n\n# List who is watching\nparall tasks watchers prll://tsk_xxx\n```\n\nNote: task creators are automatically watching their tasks.\n\n## Responding to Task Assignments\n\nWhen you receive `[Event: task.assigned]`:\n\n1. Acknowledge with a comment: `tasks comments add prll://tsk_xxx --body \"On it\"`\n2. Update status: `tasks update prll://tsk_xxx --status in_progress`\n3. Do the work\n4. Report results via comment and update status to `done`\n\n## Responding to Task Comments\n\nWhen you receive `[Event: task.comment.created]`, someone commented on a task you are watching. Read the comment body and respond if action is needed:\n\n1. Review the comment content and task context\n2. Reply via comment: `tasks comments add prll://tsk_xxx --body \"Response...\"`\n3. If the comment requests status changes, update accordingly\n\nAll CLI output is JSON.\n";
1
+ export declare const PARALL_TASKS_SKILL = "# Parall Tasks\n\nManage tasks and projects via the Parall CLI. Auth and runtime context are pre-configured.\n\n## Task Commands\n\n```bash\n# List tasks (filterable by status)\nparall tasks list\nparall tasks list --status todo\nparall tasks list --status in_progress\n\n# Create a task\nparall tasks create --title \"Task title\" [--assignee-id prll://usr_xxx] [--project-id prll://prj_xxx]\n\n# Update task status\nparall tasks update prll://tsk_xxx --status in_progress\nparall tasks update prll://tsk_xxx --status done\n\n# Add a comment\nparall tasks comments add prll://tsk_xxx --body \"Progress update...\"\n```\n\n## Project Commands\n\n```bash\nparall projects list\n```\n\n## Watching Tasks\n\nSubscribe to a task to receive notifications when others comment on it.\n\n```bash\n# Watch a task (you'll receive dispatch events for new comments)\nparall tasks watch prll://tsk_xxx\n\n# Unwatch\nparall tasks unwatch prll://tsk_xxx\n\n# List who is watching\nparall tasks watchers prll://tsk_xxx\n```\n\nNote: task creators are automatically watching their tasks.\n\n## Responding to Task Assignments\n\nWhen you receive `[Event: task.assigned]`:\n\n1. Acknowledge with a comment: `tasks comments add prll://tsk_xxx --body \"On it\"`\n2. Update status: `tasks update prll://tsk_xxx --status in_progress`\n3. Do the work\n4. Report results via comment and update status to `done`\n\n## Responding to Task Comments\n\nWhen you receive `[Event: task.comment.created]`, someone commented on a task you are watching. Read the comment body and respond if action is needed:\n\n1. Review the comment content and task context\n2. Reply via comment: `tasks comments add prll://tsk_xxx --body \"Response...\"`\n3. If the comment requests status changes, update accordingly\n\nCLI success output is JSON; errors print a JSON line plus, on a `PERMISSION_DENIED`, an optional plain-text `Request approval:` line \u2014 read both.\n";
2
2
  //# sourceMappingURL=parall-tasks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parall-tasks.d.ts","sourceRoot":"","sources":["../../src/skills/parall-tasks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,0wDAgE9B,CAAC"}
1
+ {"version":3,"file":"parall-tasks.d.ts","sourceRoot":"","sources":["../../src/skills/parall-tasks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,y4DAgE9B,CAAC"}
@@ -61,5 +61,5 @@ When you receive \`[Event: task.comment.created]\`, someone commented on a task
61
61
  2. Reply via comment: \`tasks comments add prll://tsk_xxx --body "Response..."\`
62
62
  3. If the comment requests status changes, update accordingly
63
63
 
64
- All CLI output is JSON.
64
+ CLI success output is JSON; errors print a JSON line plus, on a \`PERMISSION_DENIED\`, an optional plain-text \`Request approval:\` line — read both.
65
65
  `;
@@ -1,2 +1,2 @@
1
- export declare const PARALL_WIKI_SKILL = "# Parall Wiki\n\nManage organization wikis via the Parall CLI. Auth is pre-configured.\n\n## Browsing (no local state needed)\n\n```bash\nparall wiki list # List all wikis\nparall wiki tree <slug> # List files and directories\nparall wiki tree <slug> --path docs/ # List a subdirectory\n```\n\n## Editing\n\nWiki editing works on a **local workspace** \u2014 a directory on disk where wiki\nfiles are synced. You sync from the server, edit files locally, then propose\na changeset.\n\n### Step 1: Sync\n\n```bash\nparall wiki sync <slug>\n```\n\nThis downloads wiki files to a local directory. The output includes the\n**absolute mount path** for each wiki (e.g. `synced \u2192 /path/to/workspace/kb`).\n\n### Step 2: Find the mount path\n\nThe sync output JSON contains `synced[].path` \u2014 the absolute path where files\nlive. You can also check it anytime with:\n\n```bash\nparall wiki status <slug>\n```\n\nThe output includes `Mount: /absolute/path/to/<slug>`.\n\nUse this path with `read`, `write`, and `edit` tools. For example, if the mount\nis `/data/.openclaw/workspace/kb`, then `README.md` is at\n`/data/.openclaw/workspace/kb/README.md`.\n\n### Step 3: Edit files\n\nUse standard file tools (`read`, `write`, `edit`) on files under the mount path.\n\n### Step 4: Review changes\n\n```bash\nparall wiki diff <slug> # Shows unified diff of all local changes\nparall wiki status <slug> # Shows which files changed with +/- line counts\n```\n\nAlways review before proposing.\n\n### Step 5: Propose changeset\n\n```bash\nparall wiki changeset create <slug> --title \"Description of changes\"\n```\n\nThis uploads your local changes. Unprotected paths auto-merge immediately; the\nCLI prints `auto_merged: true` and refreshes the local manifest. Protected\npaths remain as a changeset for review; follow the returned `next_action`.\n\n## Changeset Management\n\n```bash\nparall wiki changeset list <slug> # List all changesets\nparall wiki changeset show <changesetId> <slug> # Show detail + feedback\nparall wiki changeset diff <changesetId> <slug> # Show changeset diff\n```\n\nIf a changeset is rejected, fix the files locally and re-propose:\n\n```bash\nparall wiki changeset create <slug> --update <changesetId>\n```\n\nThe title is inherited from the original changeset \u2014 no need to repeat it.\n\n## Handling sync conflicts\n\n`wiki sync` runs a three-way merge. When both you and the server changed the\nsame file, sync **does not overwrite your work**. It leaves your file intact\nand drops the upstream version under `.parall-wiki/conflicts/`:\n\n| Marker | Meaning |\n|--------|---------|\n| `.parall-wiki/conflicts/<path>.remote` | Server has different content (concurrent edit, new file collision, or server changed a file you deleted) |\n| `.parall-wiki/conflicts/<path>.remote-deleted` | Server deleted the file; you still have edits |\n\nstderr prints one line per conflict. Recovery:\n\n**Accept upstream** (drop your edit):\n```bash\ncp .parall-wiki/conflicts/<path>.remote <path>\nparall wiki sync\n```\n\n**Keep yours** (or hand-merge, then propose):\n```bash\n# edit <path> to final content\nparall wiki diff <slug>\nparall wiki changeset create <slug> --title \"Reconcile <path>\"\nparall wiki sync # fast-forwards after server merges\n```\n\n**Accept server delete** (`.remote-deleted` only):\n```bash\nrm <path>\nparall wiki sync\n```\n\nSync failures (`download`, `shape-conflict`) set exit code 1 and retry on\nnext sync. Conflicts exit 0 \u2014 they need your decision, not a retry.\n\n## Discarding local changes\n\n```bash\nparall wiki reset <slug> # Restore all files to last synced state\n```\n\n## History\n\n```bash\nparall wiki log <slug> # Recent wiki operations\n```\n\nAll CLI output is JSON. Run `parall wiki --help` for full options.\n";
1
+ export declare const PARALL_WIKI_SKILL = "# Parall Wiki\n\nManage organization wikis via the Parall CLI. Auth is pre-configured.\n\n## Browsing (no local state needed)\n\n```bash\nparall wiki list # List all wikis\nparall wiki tree <slug> # List files and directories\nparall wiki tree <slug> --path docs/ # List a subdirectory\n```\n\n## Editing\n\nWiki editing works on a **local workspace** \u2014 a directory on disk where wiki\nfiles are synced. You sync from the server, edit files locally, then propose\na changeset.\n\n### Step 1: Sync\n\n```bash\nparall wiki sync <slug>\n```\n\nThis downloads wiki files to a local directory. The output includes the\n**absolute mount path** for each wiki (e.g. `synced \u2192 /path/to/workspace/kb`).\n\n### Step 2: Find the mount path\n\nThe sync output JSON contains `synced[].path` \u2014 the absolute path where files\nlive. You can also check it anytime with:\n\n```bash\nparall wiki status <slug>\n```\n\nThe output includes `Mount: /absolute/path/to/<slug>`.\n\nUse this path with `read`, `write`, and `edit` tools. For example, if the mount\nis `/data/.openclaw/workspace/kb`, then `README.md` is at\n`/data/.openclaw/workspace/kb/README.md`.\n\n### Step 3: Edit files\n\nUse standard file tools (`read`, `write`, `edit`) on files under the mount path.\n\n### Step 4: Review changes\n\n```bash\nparall wiki diff <slug> # Shows unified diff of all local changes\nparall wiki status <slug> # Shows which files changed with +/- line counts\n```\n\nAlways review before proposing.\n\n### Step 5: Propose changeset\n\n```bash\nparall wiki changeset create <slug> --title \"Description of changes\"\n```\n\nThis uploads your local changes. Unprotected paths auto-merge immediately; the\nCLI prints `auto_merged: true` and refreshes the local manifest. Protected\npaths remain as a changeset for review; follow the returned `next_action`.\n\n## Changeset Management\n\n```bash\nparall wiki changeset list <slug> # List all changesets\nparall wiki changeset show <changesetId> <slug> # Show detail + feedback\nparall wiki changeset diff <changesetId> <slug> # Show changeset diff\n```\n\nIf a changeset is rejected, fix the files locally and re-propose:\n\n```bash\nparall wiki changeset create <slug> --update <changesetId>\n```\n\nThe title is inherited from the original changeset \u2014 no need to repeat it.\n\n## Handling sync conflicts\n\n`wiki sync` runs a three-way merge. When both you and the server changed the\nsame file, sync **does not overwrite your work**. It leaves your file intact\nand drops the upstream version under `.parall-wiki/conflicts/`:\n\n| Marker | Meaning |\n|--------|---------|\n| `.parall-wiki/conflicts/<path>.remote` | Server has different content (concurrent edit, new file collision, or server changed a file you deleted) |\n| `.parall-wiki/conflicts/<path>.remote-deleted` | Server deleted the file; you still have edits |\n\nstderr prints one line per conflict. Recovery:\n\n**Accept upstream** (drop your edit):\n```bash\ncp .parall-wiki/conflicts/<path>.remote <path>\nparall wiki sync\n```\n\n**Keep yours** (or hand-merge, then propose):\n```bash\n# edit <path> to final content\nparall wiki diff <slug>\nparall wiki changeset create <slug> --title \"Reconcile <path>\"\nparall wiki sync # fast-forwards after server merges\n```\n\n**Accept server delete** (`.remote-deleted` only):\n```bash\nrm <path>\nparall wiki sync\n```\n\nSync failures (`download`, `shape-conflict`) set exit code 1 and retry on\nnext sync. Conflicts exit 0 \u2014 they need your decision, not a retry.\n\n## Discarding local changes\n\n```bash\nparall wiki reset <slug> # Restore all files to last synced state\n```\n\n## History\n\n```bash\nparall wiki log <slug> # Recent wiki operations\n```\n\nCLI success output is JSON; errors may add a plain-text `Request approval:` line on a `PERMISSION_DENIED` \u2014 read both. Run `parall wiki --help` for full options.\n";
2
2
  //# sourceMappingURL=parall-wiki.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parall-wiki.d.ts","sourceRoot":"","sources":["../../src/skills/parall-wiki.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,gyHAkI7B,CAAC"}
1
+ {"version":3,"file":"parall-wiki.d.ts","sourceRoot":"","sources":["../../src/skills/parall-wiki.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,o4HAkI7B,CAAC"}
@@ -127,5 +127,5 @@ parall wiki reset <slug> # Restore all files to last synced state
127
127
  parall wiki log <slug> # Recent wiki operations
128
128
  \`\`\`
129
129
 
130
- All CLI output is JSON. Run \`parall wiki --help\` for full options.
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.
131
131
  `;
@@ -0,0 +1,27 @@
1
+ import { type Span } from '@opentelemetry/api';
2
+ import type { GatewayLogger } from './dispatch-adapter.js';
3
+ import type { DispatchMetrics } from './session-state.js';
4
+ import type { ParallEvent } from './types.js';
5
+ export interface TelemetryHandle {
6
+ shutdown: () => Promise<void>;
7
+ }
8
+ /**
9
+ * Initialize agent telemetry. All agents export OTLP to the Parall
10
+ * telemetry-service (`PRLL_API_URL/otel`), authenticated with `PRLL_API_KEY`.
11
+ * The service canonicalizes identity from the token and proxies to SigNoz.
12
+ *
13
+ * Resource attributes include machine/agent/org identity from env.
14
+ * Returns a no-op handle when `PRLL_API_URL` is absent (local dev).
15
+ */
16
+ export declare function initAgentTelemetry(serviceName: string, runtimeType: string): Promise<TelemetryHandle>;
17
+ export declare function startDispatchSpan(event: ParallEvent, runtimeType: string, sessionKey: string): Span | null;
18
+ export declare function endDispatchSpan(span: Span | null, metricsSnapshot: DispatchMetrics | undefined, error?: unknown): void;
19
+ export declare function recordDispatchMetric(event: ParallEvent, runtimeType: string, durationMs: number): void;
20
+ export declare function recordMissingReply(runtimeType: string): void;
21
+ export declare function runWithSessionKey<T>(sessionKey: string, fn: () => T): T;
22
+ /**
23
+ * Create a GatewayLogger that forwards all levels to OTLP logs.
24
+ * Two layers: "agent" (runtime) and "daemon".
25
+ */
26
+ export declare function createOtelLogger(layer: 'agent' | 'daemon', prefix: string): GatewayLogger;
27
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK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