testeiya 0.4.5 → 0.4.6

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.
@@ -0,0 +1,38 @@
1
+ import dedent from "dedent";
2
+ export const verdict = dedent `
3
+ The verdict:
4
+ * Call \`set_result\` with \`fail\` and a one-line reason when the verdict is negative: regressions found, a quality gate unmet, tests broken, or the task could not be completed. Otherwise do not call it: silence means success.
5
+ * An advisory review that found nothing the author must act on passes.
6
+ `;
7
+ export function report(options) {
8
+ const parts = [];
9
+ if (options.brief)
10
+ parts.push(briefAnswer);
11
+ if (options.outputFile)
12
+ parts.push(finalReport(options.outputFile));
13
+ return parts;
14
+ }
15
+ export function finalReport(path) {
16
+ return dedent `
17
+ <final-report>
18
+ * Write your complete final report to \`${path}\` with the \`write\` tool. Writing it is required before you finish.
19
+ * That file is your answer. It is the run's deliverable; nothing else you say is kept.
20
+ * Markdown. Open with an \`#\` title, then the findings. Overwrite the file; never append.
21
+ * In a thread round (see <comment-thread>) the file is the whole current answer, never a delta.
22
+ * Prefer short sentences and bullet points inside your answer
23
+ * Avoid long sentances and long paragraphs
24
+ * If report has preferred format follow it strictly
25
+ * Prefer readability over detalization - report must be readable to user
26
+ * You are QA agent so your report must be clear to QA and Managers
27
+ </final-report>
28
+ `;
29
+ }
30
+ export const briefAnswer = dedent `
31
+ <answer>
32
+ * You were asked a question, not given a task. Answer it.
33
+ * Lead with the answer in one line, then the evidence you checked.
34
+ * A few sentences. No report file, no headings, no plan.
35
+ * Say plainly when what you found does not settle the question.
36
+ </answer>
37
+ `;
38
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../prompt/report.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAA;;;;CAI5B,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,OAAsB;IAC3C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,UAAU;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,MAAM,CAAA;;8CAE+B,IAAI;;;;;;;;;;GAU/C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAA;;;;;;;CAOhC,CAAC"}
@@ -1,4 +1,8 @@
1
+ import dedent from "dedent";
1
2
  import { cliRouting } from "./clis.js";
3
+ import { report, verdict } from "./report.js";
4
+ import { testomatio } from "./testomat.io.js";
5
+ import { thread } from "./thread.js";
2
6
  /**
3
7
  * The system prompt of the `testeiya` command: a one-shot worker fired by a
4
8
  * trigger. The prompt is the text below, top to bottom. What varies per run is
@@ -13,23 +17,20 @@ export function buildSystemPrompt(options) {
13
17
  let manualTestsHint = " Pulled manual tests usually live in `.testeiya/manual-tests/`; check there before declaring the project has no manual tests.";
14
18
  if (options.manualTestsHint === false)
15
19
  manualTestsHint = "";
16
- const prompt = `
20
+ const prompt = dedent `
17
21
  <role>
18
- You are Testeiya, an AI agent that helps with QA tasks.
19
- You assist in transforming code and requirements into maintainable testing strategies.
20
- You help plan and execute high-level manual tests and end-to-end acceptance tests. Low-level tests like unit and integration are out of your scope; read them only for reference.
22
+ You are Testeiya, an AI agent focused on Quality Assurance.
23
+ You help running QA processes over development, implementing test strategies, planning tests, analyzing results.
24
+ Low-level tests like unit and integration are out of your scope; read them only for reference.
21
25
  </role>
22
26
 
23
27
  <trigger-run>
24
- This is a one-shot run fired by a trigger: a pull request, an issue, a chat request. Nobody is watching this session, there is no one to ask, and no answer will ever come.
28
+ This is a one-shot run fired by a trigger: a pull request, an issue, a chat request.
29
+ Nobody is watching this session, there is no one to ask, and no answer will ever come.
25
30
 
26
- You receive, in this order:
27
- * The task. It is the request, and it stands for the whole run.
28
- * "Since your last round": what moved in the checkout or the thread since you last answered. Absent on a first round.
29
- * A <user_reply>: what the user wrote back. Answer the reply; the task above still stands.
31
+ ${thread(options)}
30
32
 
31
33
  How you work:
32
- * Catch up first: read what moved before anything else, and never repeat an answer that is still visible in the thread.
33
34
  * Investigate read-first: read code, tests and results before you conclude. Default to read-only investigation. Do not commit, push or change the repository unless the task says to.
34
35
  * Resolve every ambiguity yourself: pick the most reasonable reading, decide yourself and state the assumption in your output.
35
36
  * Never wait for input, confirmation or approval. Finish the whole task in this run.
@@ -37,13 +38,12 @@ How you work:
37
38
  * Do not launch or drive a browser. If the task needs one, report what it would take and stop.
38
39
  * Never end the run with nothing. When nothing you have can answer the question, name what is missing.
39
40
 
40
- The verdict:
41
- * Call \`set_result\` with \`fail\` and a one-line reason when the verdict is negative: regressions found, a quality gate unmet, tests broken, or the task could not be completed. Otherwise do not call it: silence means success.
42
- * An advisory review that found nothing the author must act on passes.
41
+ ${verdict}
43
42
  </trigger-run>
44
43
 
45
44
  <workspace>
46
- Your workspace is \`${cwd}\`. It can contain application source code, e2e tests, or just manual tests; find out which by looking. Exclude \`.git/\` from analysis and modification.
45
+ Your workspace is \`${cwd}\`. It can contain application source code, e2e tests, or just manual tests;
46
+ find out which by looking. Exclude \`.git/\` from analysis and modification. Include \.testeiya dir in your analysis if it is present
47
47
 
48
48
  * Application source code: never change it, use it for discovery.
49
49
  * An e2e tests directory: you can write tests for it.
@@ -54,7 +54,7 @@ Your workspace is \`${cwd}\`. It can contain application source code, e2e tests,
54
54
  * Read the \`scan-automation-project\` skill before you touch test cases or report test counts. It has the layout of \`.testeiya/\`, the test file format, how to count tests, and how to sync and run them.
55
55
  </workspace>
56
56
 
57
- Current date: ${date}. Use it for time-sensitive decisions, e.g. "recently modified files".
57
+ Current date: ${date}.
58
58
 
59
59
  <available-tools>
60
60
  * Read operations, use freely: \`read\`, \`grep\`, \`find\`, \`ls\`. Use them aggressively to understand the system under test before proposing changes.
@@ -72,85 +72,8 @@ Connected MCP servers: ${mcps}
72
72
  * When a task needs a tool that is not in the lists above, that is a blocker: name the missing tool in your output.
73
73
  * Never reach the service sideways: no raw REST or GraphQL calls against its API, no scraping credentials from dotfiles or env dumps, no installing binaries on your own.
74
74
  </connections>
75
-
76
- <rules>
77
- * Verification required: never report tests as passing, implemented, working or done without running them and seeing a scenario execute. A run that errors before any test executes (missing env var, build failure, app unreachable) is blocked, not done. Surface that as the headline, never as a footnote under a success summary.
78
- * Missing secrets: if running a test is blocked by a missing credential, env var or secret of the project under test, report it as a blocker in your output. You cannot fabricate or assume a secret. The pre-configured Testomat.io token is a different thing; it is always available.
79
- * Verify facts, don't guess them: never assume a framework, file or config exists; confirm it with discovery tools. This governs facts you can check, not judgement calls, which you still make yourself.
80
- * Environment isolation: never hardcode credentials or environment-specific paths.
81
- * No implicit structure: do not invent files, folders or configurations that do not exist; verify before use.
82
- * Your own writing is marked: a first line starting with \`<!-- testeiya\` marks markdown as yours. Text carrying it that you read back is your own earlier message. Open a comment you post yourself with that marker; \`<comment-thread>\` gives the exact line when it applies, otherwise \`<!-- testeiya -->\`.
83
- </rules>
84
75
  `;
85
- const parts = [prompt.trim(), testomatio(options), ...(options.sections ?? [])];
86
- if (options.brief)
87
- parts.push(briefAnswer);
88
- if (options.outputFile)
89
- parts.push(finalReport(options.outputFile));
76
+ const parts = [prompt.trim(), testomatio(options), ...(options.sections ?? []), ...report(options)];
90
77
  return parts.join("\n\n");
91
78
  }
92
- /**
93
- * How the agent works on the Testomat.io project. The rules are the same in
94
- * every run; only the way to reach the dynamic data differs, so `tms` picks
95
- * that one line.
96
- */
97
- function testomatio(options) {
98
- if (!options.connected) {
99
- return `
100
- <testomatio-connection>
101
- This workspace is not linked to a Testomat.io project and no API key is available in the environment.
102
-
103
- * Never ask the user for a Testomat.io API key or token.
104
- * If a task needs Testomat.io access (pulling or pushing test cases, runs, analytics), report it as a blocker in your output. Parts of the task that only touch local files can proceed right away.
105
- </testomatio-connection>
106
- `.trim();
107
- }
108
- let url = "";
109
- if (options.backendUrl)
110
- url = ` (\`${options.backendUrl}\`)`;
111
- return `
112
- <testomatio>
113
- This workspace belongs to a Testomat.io project. Two sources answer different questions:
114
-
115
- * Tests and suites are files in the workspace: content, hierarchy, bodies, tags, gherkin scenarios. Read them with \`read\`, \`find\`, \`grep\`, \`ls\`; they are instant and hit no network. Count or list them only when the workspace actually holds \`*.test.md\` suites. In a source checkout with no such files there is nothing to count.
116
- * Runs, testruns, plans, labels, linked issues, CI config and analytics are not files. ${dynamicData(options.tms)}
117
- * Statuses and counts are live: runs change them at any time. Fresh query results supersede numbers from earlier in the conversation.
118
- * To create or update tests or suites, edit the markdown file, then push it with \`npx check-tests push\`; it reads the credentials from the environment.
119
- * Never ask the user for the Testomat.io API token; it is configured. Secrets the app under test needs to run are a different thing: a missing one blocks the run.
120
- * The \`scan-automation-project\` skill has the details: which source answers what, syncing test cases, and launching runs.
121
- </testomatio>
122
-
123
- <testomatio-connection>
124
- The project API key is already set as \`TESTOMATIO\` in the environment of every \`bash\` command you run, along with \`TESTOMATIO_URL\`${url}.
125
- </testomatio-connection>
126
- `.trim();
127
- }
128
- function dynamicData(tms) {
129
- if (tms === "mcp-proxy") {
130
- return "Get them through the `mcp` tool: search it for the operation you need, then call that operation. The most common reads are also registered as tools of their own; use those directly when they fit.";
131
- }
132
- if (tms === "cli-only") {
133
- return "There are no Testomat.io tools in this session. Get them from the REST API: `curl` with the `TESTOMATIO` token as the Authorization header against `$TESTOMATIO_URL/api/v2`. Keep to documented endpoints; never invent paths or parameters.";
134
- }
135
- return "Get them through the `testomatio-<slug>` MCP tools, one set per project.";
136
- }
137
- function finalReport(path) {
138
- return `
139
- <final-report>
140
- * Write your complete final report to \`${path}\` with the \`write\` tool. Writing it is required before you finish.
141
- * That file is your answer. It is the run's deliverable; nothing else you say is kept.
142
- * Markdown. Open with an \`#\` title, then the findings. Overwrite the file; never append.
143
- * In a thread round (see <comment-thread>) the file is the whole current answer, never a delta.
144
- * Keep your chat replies short: the report carries the detail.
145
- </final-report>
146
- `.trim();
147
- }
148
- const briefAnswer = `
149
- <answer>
150
- * You were asked a question, not given a task. Answer it.
151
- * Lead with the answer in one line, then the evidence you checked.
152
- * A few sentences. No report file, no headings, no plan.
153
- * Say plainly when what you found does not settle the question.
154
- </answer>
155
- `.trim();
156
79
  //# sourceMappingURL=system-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../prompt/system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC5D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC;IACvE,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC;IACvE,IAAI,eAAe,GAAG,+HAA+H,CAAC;IACtJ,IAAI,OAAO,CAAC,eAAe,KAAK,KAAK;QAAE,eAAe,GAAG,EAAE,CAAC;IAE5D,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA8BK,GAAG;;;;;yYAKgX,eAAe;;;;;;gBAMxY,IAAI;;;;;;;;EAQlB,UAAU,EAAE;;;;uBAIS,IAAI;yBACF,IAAI;;;;;;;;;;;;;;CAc5B,CAAC;IAEA,M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AC,OAAO,CAAC,CAAC,CAAC;IACpG,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,47 @@
1
+ import dedent from "dedent";
2
+ /**
3
+ * How the agent works on the Testomat.io project. The rules are the same in
4
+ * every run; only the way to reach the dynamic data differs, so `tms` picks
5
+ * that one line.
6
+ */
7
+ export function testomatio(options) {
8
+ if (!options.connected) {
9
+ return dedent `
10
+ <testomatio-connection>
11
+ This workspace is not linked to a Testomat.io project and no API key is available in the environment.
12
+
13
+ * Never ask the user for a Testomat.io API key or token.
14
+ * If a task needs Testomat.io access (pulling or pushing test cases, runs, analytics), report it as a blocker in your output. Parts of the task that only touch local files can proceed right away.
15
+ </testomatio-connection>
16
+ `;
17
+ }
18
+ let url = "";
19
+ if (options.backendUrl)
20
+ url = ` (\`${options.backendUrl}\`)`;
21
+ return dedent `
22
+ <testomatio>
23
+ This workspace belongs to a Testomat.io project. Two sources answer different questions:
24
+
25
+ * Tests and suites are files in the workspace: content, hierarchy, bodies, tags, gherkin scenarios. Read them with \`read\`, \`find\`, \`grep\`, \`ls\`; they are instant and hit no network. Count or list them only when the workspace actually holds \`*.test.md\` suites. In a source checkout with no such files there is nothing to count.
26
+ * Runs, testruns, plans, labels, linked issues, CI config and analytics are not files. ${dynamicData(options.tms)}
27
+ * Statuses and counts are live: runs change them at any time. Fresh query results supersede numbers from earlier in the conversation.
28
+ * To create or update tests or suites, edit the markdown file, then push it with \`npx check-tests push\`; it reads the credentials from the environment.
29
+ * Never ask the user for the Testomat.io API token; it is configured. Secrets the app under test needs to run are a different thing: a missing one blocks the run.
30
+ * The \`scan-automation-project\` skill has the details: which source answers what, syncing test cases, and launching runs.
31
+ </testomatio>
32
+
33
+ <testomatio-connection>
34
+ The project API key is already set as \`TESTOMATIO\` in the environment of every \`bash\` command you run, along with \`TESTOMATIO_URL\`${url}.
35
+ </testomatio-connection>
36
+ `;
37
+ }
38
+ function dynamicData(tms) {
39
+ if (tms === "mcp-proxy") {
40
+ return "Get them through the `mcp` tool: search it for the operation you need, then call that operation. The most common reads are also registered as tools of their own; use those directly when they fit.";
41
+ }
42
+ if (tms === "cli-only") {
43
+ return "There are no Testomat.io tools in this session. Get them from the REST API: `curl` with the `TESTOMATIO` token as the Authorization header against `$TESTOMATIO_URL/api/v2`. Keep to documented endpoints; never invent paths or parameters.";
44
+ }
45
+ return "Get them through the `testomatio-<slug>` MCP tools, one set per project.";
46
+ }
47
+ //# sourceMappingURL=testomat.io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testomat.io.js","sourceRoot":"","sources":["../../prompt/testomat.io.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAA0B;IACnD,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACvB,OAAO,MAAM,CAAA;;;;;;;KAOZ,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,CAAC,UAAU;QAAE,GAAG,GAAG,OAAO,OAAO,CAAC,UAAU,KAAK,CAAC;IAC7D,OAAO,MAAM,CAAA;;;;;6FAK8E,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC;;;;;;;;8IAQyB,GAAG;;GAE9I,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,GAAc;IACjC,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;QACxB,OAAO,qMAAqM,CAAC;IAC/M,CAAC;IACD,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;QACvB,OAAO,8OAA8O,CAAC;IACxP,CAAC;IACD,OAAO,0EAA0E,CAAC;AACpF,CAAC"}
@@ -1,4 +1,49 @@
1
- import dedent from 'dedent';
1
+ import dedent from "dedent";
2
+ /**
3
+ * What this run continues, said as the three states a run can be in. A thread
4
+ * round knows its history from the checkpoint: "Since your last round" is in
5
+ * the task when there is one, so the prompt only names the state and the
6
+ * reading order. A first thread round and a standalone run share the rule that
7
+ * there is nothing to catch up on; the thread one adds that the thread starts
8
+ * with this answer.
9
+ */
10
+ export function thread(options) {
11
+ const parts = [dedent `
12
+ The task is the request for this run. An optional <user_reply> is the user's latest instruction: answer it while keeping the task in scope.
13
+ `];
14
+ if (options.threadMode) {
15
+ parts.push(dedent `
16
+ \`--thread\` names the conversation, not a live session.
17
+ When configured, new PR commits or replies trigger separate one-shot messages in that conversation.
18
+ Finish this run and exit; never poll or wait for future commits, replies or approval.
19
+ `);
20
+ }
21
+ parts.push(threadState(options));
22
+ return parts.join("\n\n");
23
+ }
24
+ function threadState(options) {
25
+ if (options.threadMode === "continuing") {
26
+ return dedent `
27
+ This is a later round in a thread.
28
+ Catch up first: read what moved before anything else, and never repeat an answer that is still visible in the thread.
29
+ If present, "Since your last round" below lists what moved since you last answered;
30
+ read it before anything else. Otherwise read the earlier answer and current thread from the host.
31
+ `;
32
+ }
33
+ if (options.threadMode === "first") {
34
+ return dedent `
35
+ This is the first message in this thread: no earlier answer of yours exists there,
36
+ and there is no "Since your last round" to catch up on.
37
+ Later rounds will continue from what you write now.
38
+ There is nothing to catch up on: start the task directly.
39
+ `;
40
+ }
41
+ return dedent `
42
+ This is the first and only message of the run: there is no earlier round, no thread history,
43
+ and no "Since your last round" to catch up on.
44
+ There is nothing to catch up on: start the task directly.
45
+ `;
46
+ }
2
47
  /**
3
48
  * How a host collapses a comment. The round is the same everywhere, so a host
4
49
  * adds one line of mechanism, never a round of its own.
@@ -25,7 +70,7 @@ const HOSTS = {
25
70
  generic: {
26
71
  env: [],
27
72
  collapse: dedent `
28
- Use whatever hides a whole comment here — hide, minimise, collapse, resolve — and read back whatever field reports it. If the host can only edit, keep one comment and rewrite it with the previous answer folded inside. If it can do neither, say so in your output.`,
73
+ Use whatever hides a whole comment here — hide, minimise, collapse, delete, resolve — and read back whatever field reports it. If the host can only edit, keep one comment and rewrite it with the previous answer folded inside. If it can do neither, say so in your output.`,
29
74
  },
30
75
  };
31
76
  /**
@@ -65,7 +110,7 @@ function round(options) {
65
110
  return dedent `
66
111
  Each round:
67
112
 
68
- 1. Fetch the thread from the host. Yours are the raw bodies starting \`${threadMarker(options.thread)}\`; the newest is your answer as of the \`commit=\` in its marker, so \`git diff <that sha>...HEAD\` is what you have not seen. A different \`thread=\` is someone else's conversation.
113
+ 1. Fetch the thread from the host. Yours are the raw bodies starting \`${threadMarker(options.thread)}\`; if any exist, the newest is your answer as of the \`commit=\` in its marker, so \`git diff <that sha>...HEAD\` is what you have not seen. A different \`thread=\` is someone else's conversation.
69
114
  2. ${answer(options)}
70
115
 
71
116
  Posting it and collapsing the older ones are done for you. Never post, edit, collapse or delete a comment yourself.`;
@@ -88,9 +133,17 @@ function answer(options) {
88
133
  const where = options.reportFile ? ` to \`${options.reportFile}\`` : '';
89
134
  const parts = [
90
135
  `Write the complete current answer${where}, never a delta.`,
91
- 'Open with "Since the last round": what was fixed, what is new, what is still open.',
92
- 'Its first line is the marker above.',
93
136
  ];
137
+ if (options.threadMode === 'continuing') {
138
+ parts.push('Open with "Since the last round": what was fixed, what is new, what is still open.');
139
+ }
140
+ else if (options.threadMode === 'first') {
141
+ parts.push('The thread starts with this answer, so open with the task: what you found, what is still open.');
142
+ }
143
+ else {
144
+ parts.push('If earlier rounds of yours exist, open with "Since the last round": what was fixed, what is new, what is still open.');
145
+ }
146
+ parts.push('Its first line is the marker above.');
94
147
  if (options.footer)
95
148
  parts.push(`Its last line is exactly \`${options.footer}\`.`);
96
149
  return parts.join(' ');
@@ -105,4 +158,4 @@ function post(options) {
105
158
  function indent(text) {
106
159
  return text.split('\n').join('\n ');
107
160
  }
108
- //# sourceMappingURL=comment-thread.js.map
161
+ //# sourceMappingURL=thread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread.js","sourceRoot":"","sources":["../../prompt/thread.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;;;GAOG;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U,KAAK,YAAY,EAAE,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;IACnG,CAAC;SAAM,IAAI,OAAO,CAAC,UAAU,KAAK,OAAO,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,gGAAgG,CAAC,CAAC;IAC/G,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,sHAAsH,CAAC,CAAC;IACrI,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,8BAA8B,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;IAClF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,IAAI,CAAC,OAA6B;IACzC,IAAI,CAAC,OAAO,CAAC,UAAU;QAAE,OAAO,2BAA2B,CAAC;IAC5D,OAAO,kGAAkG,CAAC;AAC5G,CAAC;AAED,gFAAgF;AAChF,6EAA6E;AAC7E,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { access, constants, readFile, writeFile } from "node:fs/promises";
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { run } from "./exec.js";
4
- import { threadMarker } from "../prompt/comment-thread.js";
4
+ import { threadMarker } from "../prompt/thread.js";
5
5
  const GH_SCHEME = "gh:";
6
6
  const MINIMIZE = "mutation($id:ID!){minimizeComment(input:{subjectId:$id,classifier:OUTDATED}){minimizedComment{isMinimized}}}";
7
7
  const MARKER = "<!-- testeiya";
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE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,kBAAkB;IACzB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;IACzC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,SAAS,WAAW,CAAC,IAAY;IAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,IAAI;IACX,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,IAAI;IACX,OAAO,KAAK,CAAC;AACf,CAAC"}
package/dist/src/run.js CHANGED
@@ -8,7 +8,7 @@ import { VERSION } from "./env.js";
8
8
  import { hasTestomatio } from "./mcp.js";
9
9
  import { UsageError } from "./model.js";
10
10
  import { decorate, defaultFooter, deliver, marker, markdownPath, modelName, pullRequestNumber, threadComments, threadName, } from "./output.js";
11
- import { commentThread, threadHost } from "../prompt/comment-thread.js";
11
+ import { commentThread, threadHost } from "../prompt/thread.js";
12
12
  import { shortId } from "./sessions.js";
13
13
  import { createTesteiyaSession } from "./session.js";
14
14
  import { expandSkills } from "./skills.js";
@@ -33,8 +33,21 @@ export async function runPrint(options) {
33
33
  // How a thread is kept on this host. Rendered only in a job that has one.
34
34
  const thread = threadName(options.thread);
35
35
  const stamp = marks(options, thread, repo.commit, inThread);
36
+ // Read before the run: the answer delivered afterwards cannot be in it, so
37
+ // collapsing this list needs no judgement about which comment is the new one.
38
+ // Its length is also whether this thread already has answers: the prompt
39
+ // wants to know first or continuing before the session is built.
40
+ const earlier = inThread ? await threadComments(pr, stamp.thread) : [];
36
41
  let created;
37
42
  try {
43
+ // First or continuing: a checkpoint left by a previous round of this
44
+ // session, or an answer already visible in the thread, makes this a later
45
+ // round. Nothing does: the run opens the thread.
46
+ const threadMode = !inThread
47
+ ? undefined
48
+ : lastCheckpoint(options.sessionManager) || earlier.length > 0
49
+ ? "continuing"
50
+ : "first";
38
51
  created = await createTesteiyaSession({
39
52
  cwd,
40
53
  result,
@@ -42,6 +55,7 @@ export async function runPrint(options) {
42
55
  model: options.model,
43
56
  outputFile: outputPath,
44
57
  brief: options.brief,
58
+ threadMode,
45
59
  // The model names itself in the default footer, and the agent posts that
46
60
  // footer, so the section cannot be built until the model is resolved.
47
61
  sections: (model) => {
@@ -55,6 +69,7 @@ export async function runPrint(options) {
55
69
  reportFile: outputPath,
56
70
  footer: footerFor(options, model),
57
71
  delivered: Boolean(pr),
72
+ threadMode,
58
73
  }),
59
74
  ];
60
75
  },
@@ -91,7 +106,6 @@ export async function runPrint(options) {
91
106
  }
92
107
  // Read before the run: the answer delivered afterwards cannot be in it, so
93
108
  // collapsing this list needs no judgement about which comment is the new one.
94
- const earlier = await threadComments(pr, stamp.thread);
95
109
  const run = watchRun(session);
96
110
  await promptOnce(session, task.prompt, run);
97
111
  const written = await collectReport(session, run, outputPath, stampBefore);
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":"AAAA,OAA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E,EAAE,CAAC;QACnD,OAAO,YAAY,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IAClD,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC;IACrD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,kBAAkB,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,SAAS,CAAC,GAAY;IAC7B,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,IAAI,CAAC,IAAY;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,OAAO,CAAC,OAAe;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1D,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,GAAG,CAAC;IACvC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,KAAK,OAAO,GAAG,EAAE,GAAG,CAAC;AACzD,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACzC,CAAC"}
@@ -67,6 +67,7 @@ export async function createTesteiyaSession(options) {
67
67
  backendUrl: options.backendUrl,
68
68
  outputFile: options.outputFile,
69
69
  brief: options.brief,
70
+ threadMode: options.threadMode,
70
71
  sections: options.sections?.(`${model.provider}/${model.id}`),
71
72
  connectedClis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@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testeiya",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "AI testing agent — QA-focused coding agent for manual and automated tests",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,46 @@
1
+ import dedent from "dedent";
2
+
3
+ export const verdict = dedent`
4
+ The verdict:
5
+ * Call \`set_result\` with \`fail\` and a one-line reason when the verdict is negative: regressions found, a quality gate unmet, tests broken, or the task could not be completed. Otherwise do not call it: silence means success.
6
+ * An advisory review that found nothing the author must act on passes.
7
+ `;
8
+
9
+ export function report(options: ReportOptions): string[] {
10
+ const parts: string[] = [];
11
+ if (options.brief) parts.push(briefAnswer);
12
+ if (options.outputFile) parts.push(finalReport(options.outputFile));
13
+ return parts;
14
+ }
15
+
16
+ export function finalReport(path: string): string {
17
+ return dedent`
18
+ <final-report>
19
+ * Write your complete final report to \`${path}\` with the \`write\` tool. Writing it is required before you finish.
20
+ * That file is your answer. It is the run's deliverable; nothing else you say is kept.
21
+ * Markdown. Open with an \`#\` title, then the findings. Overwrite the file; never append.
22
+ * In a thread round (see <comment-thread>) the file is the whole current answer, never a delta.
23
+ * Prefer short sentences and bullet points inside your answer
24
+ * Avoid long sentances and long paragraphs
25
+ * If report has preferred format follow it strictly
26
+ * Prefer readability over detalization - report must be readable to user
27
+ * You are QA agent so your report must be clear to QA and Managers
28
+ </final-report>
29
+ `;
30
+ }
31
+
32
+ export const briefAnswer = dedent`
33
+ <answer>
34
+ * You were asked a question, not given a task. Answer it.
35
+ * Lead with the answer in one line, then the evidence you checked.
36
+ * A few sentences. No report file, no headings, no plan.
37
+ * Say plainly when what you found does not settle the question.
38
+ </answer>
39
+ `;
40
+
41
+ export interface ReportOptions {
42
+ /** Absolute path the agent must write its final report to (`--output`). */
43
+ outputFile?: string;
44
+ /** Answer a question instead of doing a task and reporting (`testeiya ask`). */
45
+ brief?: boolean;
46
+ }
@@ -1,4 +1,8 @@
1
+ import dedent from "dedent";
1
2
  import { cliRouting } from "./clis.js";
3
+ import { report, verdict, type ReportOptions } from "./report.js";
4
+ import { testomatio, type TestomatioOptions } from "./testomat.io.js";
5
+ import { thread, type ThreadOptions } from "./thread.js";
2
6
 
3
7
  /**
4
8
  * The system prompt of the `testeiya` command: a one-shot worker fired by a
@@ -14,23 +18,20 @@ export function buildSystemPrompt(options: SystemPromptOptions): string {
14
18
  let manualTestsHint = " Pulled manual tests usually live in `.testeiya/manual-tests/`; check there before declaring the project has no manual tests.";
15
19
  if (options.manualTestsHint === false) manualTestsHint = "";
16
20
 
17
- const prompt = `
21
+ const prompt = dedent`
18
22
  <role>
19
- You are Testeiya, an AI agent that helps with QA tasks.
20
- You assist in transforming code and requirements into maintainable testing strategies.
21
- You help plan and execute high-level manual tests and end-to-end acceptance tests. Low-level tests like unit and integration are out of your scope; read them only for reference.
23
+ You are Testeiya, an AI agent focused on Quality Assurance.
24
+ You help running QA processes over development, implementing test strategies, planning tests, analyzing results.
25
+ Low-level tests like unit and integration are out of your scope; read them only for reference.
22
26
  </role>
23
27
 
24
28
  <trigger-run>
25
- This is a one-shot run fired by a trigger: a pull request, an issue, a chat request. Nobody is watching this session, there is no one to ask, and no answer will ever come.
29
+ This is a one-shot run fired by a trigger: a pull request, an issue, a chat request.
30
+ Nobody is watching this session, there is no one to ask, and no answer will ever come.
26
31
 
27
- You receive, in this order:
28
- * The task. It is the request, and it stands for the whole run.
29
- * "Since your last round": what moved in the checkout or the thread since you last answered. Absent on a first round.
30
- * A <user_reply>: what the user wrote back. Answer the reply; the task above still stands.
32
+ ${thread(options)}
31
33
 
32
34
  How you work:
33
- * Catch up first: read what moved before anything else, and never repeat an answer that is still visible in the thread.
34
35
  * Investigate read-first: read code, tests and results before you conclude. Default to read-only investigation. Do not commit, push or change the repository unless the task says to.
35
36
  * Resolve every ambiguity yourself: pick the most reasonable reading, decide yourself and state the assumption in your output.
36
37
  * Never wait for input, confirmation or approval. Finish the whole task in this run.
@@ -38,13 +39,12 @@ How you work:
38
39
  * Do not launch or drive a browser. If the task needs one, report what it would take and stop.
39
40
  * Never end the run with nothing. When nothing you have can answer the question, name what is missing.
40
41
 
41
- The verdict:
42
- * Call \`set_result\` with \`fail\` and a one-line reason when the verdict is negative: regressions found, a quality gate unmet, tests broken, or the task could not be completed. Otherwise do not call it: silence means success.
43
- * An advisory review that found nothing the author must act on passes.
42
+ ${verdict}
44
43
  </trigger-run>
45
44
 
46
45
  <workspace>
47
- Your workspace is \`${cwd}\`. It can contain application source code, e2e tests, or just manual tests; find out which by looking. Exclude \`.git/\` from analysis and modification.
46
+ Your workspace is \`${cwd}\`. It can contain application source code, e2e tests, or just manual tests;
47
+ find out which by looking. Exclude \`.git/\` from analysis and modification. Include \.testeiya dir in your analysis if it is present
48
48
 
49
49
  * Application source code: never change it, use it for discovery.
50
50
  * An e2e tests directory: you can write tests for it.
@@ -55,7 +55,7 @@ Your workspace is \`${cwd}\`. It can contain application source code, e2e tests,
55
55
  * Read the \`scan-automation-project\` skill before you touch test cases or report test counts. It has the layout of \`.testeiya/\`, the test file format, how to count tests, and how to sync and run them.
56
56
  </workspace>
57
57
 
58
- Current date: ${date}. Use it for time-sensitive decisions, e.g. "recently modified files".
58
+ Current date: ${date}.
59
59
 
60
60
  <available-tools>
61
61
  * Read operations, use freely: \`read\`, \`grep\`, \`find\`, \`ls\`. Use them aggressively to understand the system under test before proposing changes.
@@ -73,115 +73,22 @@ Connected MCP servers: ${mcps}
73
73
  * When a task needs a tool that is not in the lists above, that is a blocker: name the missing tool in your output.
74
74
  * Never reach the service sideways: no raw REST or GraphQL calls against its API, no scraping credentials from dotfiles or env dumps, no installing binaries on your own.
75
75
  </connections>
76
-
77
- <rules>
78
- * Verification required: never report tests as passing, implemented, working or done without running them and seeing a scenario execute. A run that errors before any test executes (missing env var, build failure, app unreachable) is blocked, not done. Surface that as the headline, never as a footnote under a success summary.
79
- * Missing secrets: if running a test is blocked by a missing credential, env var or secret of the project under test, report it as a blocker in your output. You cannot fabricate or assume a secret. The pre-configured Testomat.io token is a different thing; it is always available.
80
- * Verify facts, don't guess them: never assume a framework, file or config exists; confirm it with discovery tools. This governs facts you can check, not judgement calls, which you still make yourself.
81
- * Environment isolation: never hardcode credentials or environment-specific paths.
82
- * No implicit structure: do not invent files, folders or configurations that do not exist; verify before use.
83
- * Your own writing is marked: a first line starting with \`<!-- testeiya\` marks markdown as yours. Text carrying it that you read back is your own earlier message. Open a comment you post yourself with that marker; \`<comment-thread>\` gives the exact line when it applies, otherwise \`<!-- testeiya -->\`.
84
- </rules>
85
76
  `;
86
77
 
87
- const parts = [prompt.trim(), testomatio(options), ...(options.sections ?? [])];
88
- if (options.brief) parts.push(briefAnswer);
89
- if (options.outputFile) parts.push(finalReport(options.outputFile));
78
+ const parts = [prompt.trim(), testomatio(options), ...(options.sections ?? []), ...report(options)];
90
79
  return parts.join("\n\n");
91
80
  }
92
81
 
93
- /**
94
- * How the agent works on the Testomat.io project. The rules are the same in
95
- * every run; only the way to reach the dynamic data differs, so `tms` picks
96
- * that one line.
97
- */
98
- function testomatio(options: SystemPromptOptions): string {
99
- if (!options.connected) {
100
- return `
101
- <testomatio-connection>
102
- This workspace is not linked to a Testomat.io project and no API key is available in the environment.
103
-
104
- * Never ask the user for a Testomat.io API key or token.
105
- * If a task needs Testomat.io access (pulling or pushing test cases, runs, analytics), report it as a blocker in your output. Parts of the task that only touch local files can proceed right away.
106
- </testomatio-connection>
107
- `.trim();
108
- }
109
-
110
- let url = "";
111
- if (options.backendUrl) url = ` (\`${options.backendUrl}\`)`;
112
- return `
113
- <testomatio>
114
- This workspace belongs to a Testomat.io project. Two sources answer different questions:
115
-
116
- * Tests and suites are files in the workspace: content, hierarchy, bodies, tags, gherkin scenarios. Read them with \`read\`, \`find\`, \`grep\`, \`ls\`; they are instant and hit no network. Count or list them only when the workspace actually holds \`*.test.md\` suites. In a source checkout with no such files there is nothing to count.
117
- * Runs, testruns, plans, labels, linked issues, CI config and analytics are not files. ${dynamicData(options.tms)}
118
- * Statuses and counts are live: runs change them at any time. Fresh query results supersede numbers from earlier in the conversation.
119
- * To create or update tests or suites, edit the markdown file, then push it with \`npx check-tests push\`; it reads the credentials from the environment.
120
- * Never ask the user for the Testomat.io API token; it is configured. Secrets the app under test needs to run are a different thing: a missing one blocks the run.
121
- * The \`scan-automation-project\` skill has the details: which source answers what, syncing test cases, and launching runs.
122
- </testomatio>
123
-
124
- <testomatio-connection>
125
- The project API key is already set as \`TESTOMATIO\` in the environment of every \`bash\` command you run, along with \`TESTOMATIO_URL\`${url}.
126
- </testomatio-connection>
127
- `.trim();
128
- }
129
-
130
- function dynamicData(tms: TmsAccess): string {
131
- if (tms === "mcp-proxy") {
132
- return "Get them through the `mcp` tool: search it for the operation you need, then call that operation. The most common reads are also registered as tools of their own; use those directly when they fit.";
133
- }
134
- if (tms === "cli-only") {
135
- return "There are no Testomat.io tools in this session. Get them from the REST API: `curl` with the `TESTOMATIO` token as the Authorization header against `$TESTOMATIO_URL/api/v2`. Keep to documented endpoints; never invent paths or parameters.";
136
- }
137
- return "Get them through the `testomatio-<slug>` MCP tools, one set per project.";
138
- }
139
-
140
- function finalReport(path: string): string {
141
- return `
142
- <final-report>
143
- * Write your complete final report to \`${path}\` with the \`write\` tool. Writing it is required before you finish.
144
- * That file is your answer. It is the run's deliverable; nothing else you say is kept.
145
- * Markdown. Open with an \`#\` title, then the findings. Overwrite the file; never append.
146
- * In a thread round (see <comment-thread>) the file is the whole current answer, never a delta.
147
- * Keep your chat replies short: the report carries the detail.
148
- </final-report>
149
- `.trim();
150
- }
151
-
152
- const briefAnswer = `
153
- <answer>
154
- * You were asked a question, not given a task. Answer it.
155
- * Lead with the answer in one line, then the evidence you checked.
156
- * A few sentences. No report file, no headings, no plan.
157
- * Say plainly when what you found does not settle the question.
158
- </answer>
159
- `.trim();
160
-
161
- /**
162
- * `mcp-proxy`: one `mcp` tool with search and call. `cli-only`: no tools at
163
- * all; `check-tests` and REST through the shell. `mcp-direct`: every operation
164
- * is its own tool, prefixed `testomatio-<slug>`; the desktop app's one-shot mode.
165
- */
166
- export type TmsAccess = "mcp-direct" | "mcp-proxy" | "cli-only";
82
+ export type { TmsAccess } from "./testomat.io.js";
167
83
 
168
- export interface SystemPromptOptions {
84
+ export interface SystemPromptOptions extends TestomatioOptions, ThreadOptions, ReportOptions {
169
85
  cwd?: string;
170
- /** How the agent reaches Testomat.io in this run. */
171
- tms: TmsAccess;
172
- /** A Testomat.io token is in the environment. */
173
- connected?: boolean;
174
- backendUrl?: string;
175
86
  /** CLI tools on PATH and signed in (e.g. `gh`, `acli`). */
176
87
  connectedClis?: string[];
177
88
  /** MCP servers connected for this run. */
178
89
  connectedMcps?: string[];
179
90
  /** Whole sections this run adds, such as the comment-thread rules. */
180
91
  sections?: string[];
181
- /** Absolute path the agent must write its final report to (`--output`). */
182
- outputFile?: string;
183
- /** Answer a question instead of doing a task and reporting (`testeiya ask`). */
184
- brief?: boolean;
185
92
  /** False when the pulled manual tests folder is switched off, so no rule points at it. */
186
93
  manualTestsHint?: boolean;
187
94
  }
@@ -0,0 +1,63 @@
1
+ import dedent from "dedent";
2
+
3
+ /**
4
+ * How the agent works on the Testomat.io project. The rules are the same in
5
+ * every run; only the way to reach the dynamic data differs, so `tms` picks
6
+ * that one line.
7
+ */
8
+ export function testomatio(options: TestomatioOptions): string {
9
+ if (!options.connected) {
10
+ return dedent`
11
+ <testomatio-connection>
12
+ This workspace is not linked to a Testomat.io project and no API key is available in the environment.
13
+
14
+ * Never ask the user for a Testomat.io API key or token.
15
+ * If a task needs Testomat.io access (pulling or pushing test cases, runs, analytics), report it as a blocker in your output. Parts of the task that only touch local files can proceed right away.
16
+ </testomatio-connection>
17
+ `;
18
+ }
19
+
20
+ let url = "";
21
+ if (options.backendUrl) url = ` (\`${options.backendUrl}\`)`;
22
+ return dedent`
23
+ <testomatio>
24
+ This workspace belongs to a Testomat.io project. Two sources answer different questions:
25
+
26
+ * Tests and suites are files in the workspace: content, hierarchy, bodies, tags, gherkin scenarios. Read them with \`read\`, \`find\`, \`grep\`, \`ls\`; they are instant and hit no network. Count or list them only when the workspace actually holds \`*.test.md\` suites. In a source checkout with no such files there is nothing to count.
27
+ * Runs, testruns, plans, labels, linked issues, CI config and analytics are not files. ${dynamicData(options.tms)}
28
+ * Statuses and counts are live: runs change them at any time. Fresh query results supersede numbers from earlier in the conversation.
29
+ * To create or update tests or suites, edit the markdown file, then push it with \`npx check-tests push\`; it reads the credentials from the environment.
30
+ * Never ask the user for the Testomat.io API token; it is configured. Secrets the app under test needs to run are a different thing: a missing one blocks the run.
31
+ * The \`scan-automation-project\` skill has the details: which source answers what, syncing test cases, and launching runs.
32
+ </testomatio>
33
+
34
+ <testomatio-connection>
35
+ The project API key is already set as \`TESTOMATIO\` in the environment of every \`bash\` command you run, along with \`TESTOMATIO_URL\`${url}.
36
+ </testomatio-connection>
37
+ `;
38
+ }
39
+
40
+ function dynamicData(tms: TmsAccess): string {
41
+ if (tms === "mcp-proxy") {
42
+ return "Get them through the `mcp` tool: search it for the operation you need, then call that operation. The most common reads are also registered as tools of their own; use those directly when they fit.";
43
+ }
44
+ if (tms === "cli-only") {
45
+ return "There are no Testomat.io tools in this session. Get them from the REST API: `curl` with the `TESTOMATIO` token as the Authorization header against `$TESTOMATIO_URL/api/v2`. Keep to documented endpoints; never invent paths or parameters.";
46
+ }
47
+ return "Get them through the `testomatio-<slug>` MCP tools, one set per project.";
48
+ }
49
+
50
+ /**
51
+ * `mcp-proxy`: one `mcp` tool with search and call. `cli-only`: no tools at
52
+ * all; `check-tests` and REST through the shell. `mcp-direct`: every operation
53
+ * is its own tool, prefixed `testomatio-<slug>`; the desktop app's one-shot mode.
54
+ */
55
+ export type TmsAccess = "mcp-direct" | "mcp-proxy" | "cli-only";
56
+
57
+ export interface TestomatioOptions {
58
+ /** How the agent reaches Testomat.io in this run. */
59
+ tms: TmsAccess;
60
+ /** A Testomat.io token is in the environment. */
61
+ connected?: boolean;
62
+ backendUrl?: string;
63
+ }
@@ -1,4 +1,62 @@
1
- import dedent from 'dedent';
1
+ import dedent from "dedent";
2
+
3
+ /**
4
+ * What this run continues, said as the three states a run can be in. A thread
5
+ * round knows its history from the checkpoint: "Since your last round" is in
6
+ * the task when there is one, so the prompt only names the state and the
7
+ * reading order. A first thread round and a standalone run share the rule that
8
+ * there is nothing to catch up on; the thread one adds that the thread starts
9
+ * with this answer.
10
+ */
11
+ export function thread(options: ThreadOptions): string {
12
+ const parts = [dedent`
13
+ The task is the request for this run. An optional <user_reply> is the user's latest instruction: answer it while keeping the task in scope.
14
+ `];
15
+ if (options.threadMode) {
16
+ parts.push(dedent`
17
+ \`--thread\` names the conversation, not a live session.
18
+ When configured, new PR commits or replies trigger separate one-shot messages in that conversation.
19
+ Finish this run and exit; never poll or wait for future commits, replies or approval.
20
+ `);
21
+ }
22
+ parts.push(threadState(options));
23
+ return parts.join("\n\n");
24
+ }
25
+
26
+ function threadState(options: ThreadOptions): string {
27
+ if (options.threadMode === "continuing") {
28
+ return dedent`
29
+ This is a later round in a thread.
30
+ Catch up first: read what moved before anything else, and never repeat an answer that is still visible in the thread.
31
+ If present, "Since your last round" below lists what moved since you last answered;
32
+ read it before anything else. Otherwise read the earlier answer and current thread from the host.
33
+ `;
34
+ }
35
+ if (options.threadMode === "first") {
36
+ return dedent`
37
+ This is the first message in this thread: no earlier answer of yours exists there,
38
+ and there is no "Since your last round" to catch up on.
39
+ Later rounds will continue from what you write now.
40
+ There is nothing to catch up on: start the task directly.
41
+ `;
42
+ }
43
+ return dedent`
44
+ This is the first and only message of the run: there is no earlier round, no thread history,
45
+ and no "Since your last round" to catch up on.
46
+ There is nothing to catch up on: start the task directly.
47
+ `;
48
+ }
49
+
50
+ export type ThreadMode = "first" | "continuing";
51
+
52
+ export interface ThreadOptions {
53
+ /**
54
+ * Where this run sits in its thread. `continuing` is a later round with
55
+ * history to catch up on; `first` opens a thread; undefined is a standalone
56
+ * run with no thread at all.
57
+ */
58
+ threadMode?: ThreadMode;
59
+ }
2
60
 
3
61
  /**
4
62
  * How a host collapses a comment. The round is the same everywhere, so a host
@@ -29,7 +87,7 @@ const HOSTS = {
29
87
  generic: {
30
88
  env: [],
31
89
  collapse: dedent`
32
- Use whatever hides a whole comment here — hide, minimise, collapse, resolve — and read back whatever field reports it. If the host can only edit, keep one comment and rewrite it with the previous answer folded inside. If it can do neither, say so in your output.`,
90
+ Use whatever hides a whole comment here — hide, minimise, collapse, delete, resolve — and read back whatever field reports it. If the host can only edit, keep one comment and rewrite it with the previous answer folded inside. If it can do neither, say so in your output.`,
33
91
  },
34
92
  } satisfies Record<string, Host>;
35
93
 
@@ -71,7 +129,7 @@ function round(options: CommentThreadOptions): string {
71
129
  return dedent`
72
130
  Each round:
73
131
 
74
- 1. Fetch the thread from the host. Yours are the raw bodies starting \`${threadMarker(options.thread)}\`; the newest is your answer as of the \`commit=\` in its marker, so \`git diff <that sha>...HEAD\` is what you have not seen. A different \`thread=\` is someone else's conversation.
132
+ 1. Fetch the thread from the host. Yours are the raw bodies starting \`${threadMarker(options.thread)}\`; if any exist, the newest is your answer as of the \`commit=\` in its marker, so \`git diff <that sha>...HEAD\` is what you have not seen. A different \`thread=\` is someone else's conversation.
75
133
  2. ${answer(options)}
76
134
 
77
135
  Posting it and collapsing the older ones are done for you. Never post, edit, collapse or delete a comment yourself.`;
@@ -96,9 +154,15 @@ function answer(options: CommentThreadOptions): string {
96
154
  const where = options.reportFile ? ` to \`${options.reportFile}\`` : '';
97
155
  const parts = [
98
156
  `Write the complete current answer${where}, never a delta.`,
99
- 'Open with "Since the last round": what was fixed, what is new, what is still open.',
100
- 'Its first line is the marker above.',
101
157
  ];
158
+ if (options.threadMode === 'continuing') {
159
+ parts.push('Open with "Since the last round": what was fixed, what is new, what is still open.');
160
+ } else if (options.threadMode === 'first') {
161
+ parts.push('The thread starts with this answer, so open with the task: what you found, what is still open.');
162
+ } else {
163
+ parts.push('If earlier rounds of yours exist, open with "Since the last round": what was fixed, what is new, what is still open.');
164
+ }
165
+ parts.push('Its first line is the marker above.');
102
166
  if (options.footer) parts.push(`Its last line is exactly \`${options.footer}\`.`);
103
167
  return parts.join(' ');
104
168
  }
@@ -125,7 +189,7 @@ interface Host {
125
189
  collapse: string;
126
190
  }
127
191
 
128
- export interface CommentThreadOptions {
192
+ export interface CommentThreadOptions extends ThreadOptions {
129
193
  host: ThreadHost;
130
194
  /** Which conversation this run is, so parallel runs never touch each other. */
131
195
  thread: string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"comment-thread.js","sourceRoot":"","sources":["../../prompt/comment-thread.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE;QACN,GAAG,EAAE,CAAC,gBAAgB,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAA;mRAC+P;KAChR;IAED,MAAM,EAAE;QACN,GAAG,EAAE,CAAC,WAAW,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAA;wPACoO;KACrP;IAED,SAAS,EAAE;QACT,GAAG,EAAE,CAAC,wBAAwB,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAA;sQACkP;KACnQ;IAED,OAAO,EAAE;QACP,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,MAAM,CAAA;2QACuP;KACxQ;CAC6B,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,GAAgB;IACzC,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAAE,OAAO,IAAkB,CAAC;IAC5E,CAAC;IACD,IAAI,GAAG,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC;AAED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