@gaia-ai/conductor 0.4.0 → 0.4.2

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.
@@ -4,10 +4,19 @@ import { type ConductorFileConfig } from '@gaia-ai/core';
4
4
  * the agent must stop instead of running the whole flow in one session. The run
5
5
  * is closed automatically when the ticket state changes on the next claim - the
6
6
  * agent does not release it. Run mechanics live here (not in the repo's
7
- * WORKFLOW.md). A conductor config may override via the `prompt` field.
8
- * Placeholders: `{identifier}`, `{state}`, `{runUuid}`, `{comments}` ({state}
9
- * falls back to `triage` for unclassified tickets; {comments} is the ticket's
10
- * comments, oldest first, or a "no comments yet" note).
7
+ * WORKFLOW.md). The prompt routes through the gaia skill (`ticket:run`) rather
8
+ * than pointing at WORKFLOW.md directly (GAIA-125): the intake splash + state
9
+ * engine are a skill mechanic, so a bare "follow WORKFLOW.md" pointer left the
10
+ * splash unrendered unless an external skill-forcing hook happened to fire. A
11
+ * conductor config may override via the `prompt` field.
12
+ *
13
+ * The ticket + its comments are NOT embedded (GAIA-112): embedding unbounded
14
+ * ticket content into a single typed pane line overran the PTY canonical line
15
+ * cap (4096 B) and truncated the base64-wrapped dispatch command. Instead the
16
+ * prompt is a bounded, constant-size pointer and the agent reads the ticket +
17
+ * all comments at run start via `gaia dropsh read … --include comments`.
18
+ * Placeholders: `{identifier}`, `{state}`, `{runUuid}` ({state} falls back to
19
+ * `triage` for unclassified tickets).
11
20
  */
12
21
  export declare const DEFAULT_AGENT_PROMPT: string;
13
22
  /**
@@ -8,23 +8,34 @@ import { conductorId, } from '@gaia-ai/core';
8
8
  * the agent must stop instead of running the whole flow in one session. The run
9
9
  * is closed automatically when the ticket state changes on the next claim - the
10
10
  * agent does not release it. Run mechanics live here (not in the repo's
11
- * WORKFLOW.md). A conductor config may override via the `prompt` field.
12
- * Placeholders: `{identifier}`, `{state}`, `{runUuid}`, `{comments}` ({state}
13
- * falls back to `triage` for unclassified tickets; {comments} is the ticket's
14
- * comments, oldest first, or a "no comments yet" note).
11
+ * WORKFLOW.md). The prompt routes through the gaia skill (`ticket:run`) rather
12
+ * than pointing at WORKFLOW.md directly (GAIA-125): the intake splash + state
13
+ * engine are a skill mechanic, so a bare "follow WORKFLOW.md" pointer left the
14
+ * splash unrendered unless an external skill-forcing hook happened to fire. A
15
+ * conductor config may override via the `prompt` field.
16
+ *
17
+ * The ticket + its comments are NOT embedded (GAIA-112): embedding unbounded
18
+ * ticket content into a single typed pane line overran the PTY canonical line
19
+ * cap (4096 B) and truncated the base64-wrapped dispatch command. Instead the
20
+ * prompt is a bounded, constant-size pointer and the agent reads the ticket +
21
+ * all comments at run start via `gaia dropsh read … --include comments`.
22
+ * Placeholders: `{identifier}`, `{state}`, `{runUuid}` ({state} falls back to
23
+ * `triage` for unclassified tickets).
15
24
  */
16
25
  export const DEFAULT_AGENT_PROMPT = `You are a GAIA agent working ticket {identifier}, current state: {state}. ` +
17
- `Follow the "{state}" section of ./WORKFLOW.md in this repository. ` +
26
+ `Invoke the gaia skill and run \`ticket:run {identifier} {state}\` it renders ` +
27
+ `the intake splash, runs the {state} engine, and applies WORKFLOW.md's {state} policy. ` +
18
28
  `This run covers EXACTLY the {state} state - do only its work. Do not start, ` +
19
29
  `prepare, or perform any later state's work, even if WORKFLOW.md mentions ` +
20
30
  `transitioning onward. When the {state} work is done and you have no open ` +
21
31
  `questions, STOP - do not pick up or work any further state or ticket. If ` +
22
32
  `blocked or you need a human, stop and surface the blocker. After you have ` +
23
33
  `written the ticket's next state, run /exit to end this session.\n\n` +
24
- `The ticket's comments are included below (oldest first). Read them before ` +
25
- `acting: the latest \`summary\` is the review feedback you MUST address, and ` +
26
- `any \`spec\`/\`debug_diagnose\` is the agreed plan/diagnosis. Treat their ` +
27
- `points as in-scope acceptance criteria.\n\n--- Ticket comments ---\n{comments}`;
34
+ `First, read the ticket + all comments in one call:\n\n` +
35
+ ` gaia dropsh read gaia_ticket/gaia_ticket/$GAIA_ID --include comments\n\n` +
36
+ `The latest \`summary\` comment is review feedback you MUST address; any ` +
37
+ `\`spec\`/\`diagnose\` comment is the agreed plan. Treat them as in-scope ` +
38
+ `acceptance criteria.`;
28
39
  function requirePlugin(value, kind) {
29
40
  if (!isRecord(value) || value.kind !== kind) {
30
41
  throw new Error(`conductor config requires a ${kind} plugin in the "${kind}" slot`);
@@ -16,26 +16,6 @@ function sleep(ms, signal) {
16
16
  signal?.addEventListener('abort', onAbort, { once: true });
17
17
  });
18
18
  }
19
- /**
20
- * Formats a ticket's comments into the `{comments}` prompt block, oldest first.
21
- * The conductor injects this so a review→coding bounce reaches the coder with the
22
- * review summary in hand, independent of whether the agent remembers to fetch it.
23
- *
24
- * The body is the raw gaia_rich markup — the agent reads HTML fine, so we don't
25
- * strip it (a tag/entity stripper is a maintenance footgun that buys nothing for
26
- * an LLM reader).
27
- */
28
- function renderComments(comments) {
29
- if (comments.length === 0) {
30
- return '(no comments on this ticket yet)';
31
- }
32
- return comments
33
- .map((c, i) => {
34
- const when = c.created ? ` (${c.created})` : '';
35
- return `[#${i + 1}] type=${c.type}${when}\n${c.body}`;
36
- })
37
- .join('\n\n---\n\n');
38
- }
39
19
  /**
40
20
  * A run-env key is reserved when it names a conductor-provided core variable:
41
21
  * any `GAIA_*`, `WORKSPACE_ROOT`, or `TICKET_URL`. User `env_vars` may not
@@ -99,8 +79,7 @@ function renderPrompt(template, values) {
99
79
  return template
100
80
  .replaceAll('{identifier}', values.identifier)
101
81
  .replaceAll('{state}', values.state)
102
- .replaceAll('{runUuid}', values.runUuid)
103
- .replaceAll('{comments}', renderComments(values.comments));
82
+ .replaceAll('{runUuid}', values.runUuid);
104
83
  }
105
84
  export class Conductor {
106
85
  config;
@@ -358,7 +337,6 @@ export class Conductor {
358
337
  identifier: t.identifier,
359
338
  state: t.state || 'triage',
360
339
  runUuid: run.runUuid,
361
- comments: t.comments,
362
340
  })
363
341
  : '';
364
342
  await this.executor.startRun({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaia-ai/conductor",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "GAIA conductor engine + CLI: registers, claims tickets via JSON:API, dispatches agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,10 +25,10 @@
25
25
  "directory": "conductor/packages/conductor"
26
26
  },
27
27
  "dependencies": {
28
- "@gaia-ai/core": "^0.4.0",
28
+ "@gaia-ai/core": "^0.4.2",
29
29
  "@dropsh/plugin-oauth2": "^0.4.1",
30
30
  "@dropsh/plugin-jsonapi-schema": "^0.5.1",
31
31
  "commander": "^12.1.0",
32
- "dropsh": "^0.5.1"
32
+ "dropsh": "^0.5.3"
33
33
  }
34
34
  }