playhead-cli 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -60,8 +60,7 @@ write a grounded spec, render it, and read the verdict — inside your own repo.
60
60
 
61
61
  Tools the agent gets: `playhead_explore` (grounded, validated locators for the current
62
62
  screen), `playhead_validate_spec` (schema + locator check, no render), `playhead_author`
63
- (auto-draft a spec toward a goal), and `playhead_render` (capture → compose → verify,
64
- returning the publish/no-publish verdict with reasons and artifact paths). The agent's loop
63
+ (auto-draft a spec toward a goal), playhead_render` (capture → compose → verify, returning the verdict with reasons and artifact paths), and `playhead_jira` (attach the evidence + post a verdict comment to an existing issue). The agent's loop
65
64
  becomes: *explore → write spec → render → read verdict → fix → re-render.*
66
65
 
67
66
  Outputs land in `out/`:
package/dist/cli/index.js CHANGED
@@ -6163,7 +6163,7 @@ function buildServer() {
6163
6163
  const server = new McpServer(
6164
6164
  { name: "playhead", version: PLAYHEAD_VERSION },
6165
6165
  {
6166
- instructions: "Playhead turns a spec + a live web app into a verified walkthrough video. To make a demo: (1) call playhead_explore on the running app to get validated locators, (2) write a spec (or call playhead_author), (3) call playhead_render and read the verdict \u2014 fix the spec if it is not publishable. Every locator you use MUST come from an explore catalog."
6166
+ instructions: "Playhead turns a spec + a live web app into a verified walkthrough video. To make a demo: (1) call playhead_explore on the running app to get validated locators, (2) write a spec (or call playhead_author), (3) call playhead_render and read the verdict \u2014 fix the spec if it is not publishable. Every locator you use MUST come from an explore catalog. To attach the result to a ticket, call playhead_jira with the same outDir after rendering."
6167
6167
  }
6168
6168
  );
6169
6169
  const dims = z2.string().regex(/^\d+x\d+$/).default("1280x720");
@@ -6279,6 +6279,35 @@ ${formatValidateResult2(res)}` }],
6279
6279
  };
6280
6280
  }
6281
6281
  );
6282
+ server.registerTool(
6283
+ "playhead_jira",
6284
+ {
6285
+ title: "Post render evidence to Jira",
6286
+ description: "Attach a render's evidence to an EXISTING Jira issue and post a verdict comment \u2014 the video (or failure clip), verdict.json, contact sheet, JUnit, and console log, plus a comment carrying the per-check table (or the failing step + error for a flow failure). Run this AFTER playhead_render, pointing outDir at the same directory. Reports to existing issues only (never creates them). Requires JIRA_BASE_URL, JIRA_EMAIL, and JIRA_API_TOKEN in the environment \u2014 Playhead never handles a password.",
6287
+ inputSchema: {
6288
+ issueKey: z2.string().describe("the existing Jira issue key, e.g. PROJ-123"),
6289
+ outDir: z2.string().default("playhead-out").describe("the render output directory (same one passed to playhead_render)")
6290
+ }
6291
+ },
6292
+ async ({ issueKey, outDir }) => {
6293
+ try {
6294
+ const { reportToJira: reportToJira2, collectEvidence: collectEvidence2 } = await Promise.resolve().then(() => (init_jira(), jira_exports));
6295
+ const out = resolve(outDir);
6296
+ await reportToJira2(issueKey, out);
6297
+ const ev = await collectEvidence2(out);
6298
+ return {
6299
+ content: [
6300
+ {
6301
+ type: "text",
6302
+ text: `Posted to ${issueKey}: attached ${ev.files.length} artifact(s) [${ev.files.map((f) => f.split("/").pop()).join(", ")}] and a ${ev.outcome} verdict comment.`
6303
+ }
6304
+ ]
6305
+ };
6306
+ } catch (e) {
6307
+ return { content: [{ type: "text", text: `\u2717 Jira report failed: ${e.message}` }], isError: true };
6308
+ }
6309
+ }
6310
+ );
6282
6311
  return server;
6283
6312
  }
6284
6313
  function renderVerdictReport(verdict, videoPath, manifestPath) {