@motir/cli 0.11.0 → 0.11.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 (2) hide show
  1. package/dist/index.js +43 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var __export = (target, all) => {
9
9
  import { Command as Command2, Option } from "commander";
10
10
 
11
11
  // package.json
12
- var version = "0.11.0";
12
+ var version = "0.11.1";
13
13
 
14
14
  // src/version.ts
15
15
  var CLI_VERSION = version;
@@ -824,7 +824,7 @@ function displayTokenPrefix(token) {
824
824
 
825
825
  // src/api/operations.ts
826
826
  var API_MAJOR = 1;
827
- var GENERATED_AGAINST = "1.60.0";
827
+ var GENERATED_AGAINST = "1.61.0";
828
828
  var V1_OPERATIONS = {
829
829
  "appendDispatchRunEvents": {
830
830
  method: "POST",
@@ -33312,7 +33312,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
33312
33312
  }
33313
33313
  validate58.evaluated = { "props": { "totalComments": true, "totalChanges": true, "items": true, "nextCursor": true, "totalCount": true }, "dynamicProps": false, "dynamicItems": false };
33314
33314
  var operation_getWorkItemApprovalGate = validate59;
33315
- var schema97 = { "type": "object", "properties": { "workItemKey": { "type": "string", "pattern": "^[A-Z][A-Z0-9]*-\\d+$" }, "workItemTitle": { "type": "string" }, "kind": { "type": "string", "enum": ["design_result", "decision_approval", "pull_request_approval", "pull_request_merge", "acceptance_result", "decision_choice", "decision_confirmation", "plan_approval", "agent_review"] }, "gate": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": ["design_result", "decision_approval", "pull_request_approval", "pull_request_merge", "acceptance_result", "decision_choice", "decision_confirmation", "plan_approval", "agent_review"] }, "state": { "type": "string", "enum": ["awaiting", "approved", "changes_requested", "superseded", "overturned", "declined"] }, "noteMd": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decidedAt": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" }] }, "decidedByLabel": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decidedUnderAuthority": { "anyOf": [{ "type": "string", "enum": ["assignee", "reporter", "admin", "github_review", "plan_permission", "review_agent", "project_setting"] }, { "type": "null" }] }, "decisionSource": { "anyOf": [{ "type": "string", "enum": ["ui", "api", "mcp", "github", "system"] }, { "type": "null" }] }, "subjectVersion": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "supersededCause": { "anyOf": [{ "type": "string", "enum": ["republished", "withdrawn", "head_moved", "member_closed", "member_drafted", "conflict", "set_changed", "pulled_back", "ci_failed", "ci_rerunning", "unknown", "plan_stale", "plan_discarded", "queue_failed", "review_agent_disabled"] }, { "type": "null" }] }, "outcomeRef": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "refusalVerdict": { "anyOf": [{ "type": "string", "enum": ["revise", "re_plan"] }, { "type": "null" }] }, "offersRefusalVerdict": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": ["id", "kind", "state", "noteMd", "decidedAt", "decidedByLabel", "decidedUnderAuthority", "decisionSource", "subjectVersion", "supersededCause", "outcomeRef", "refusalVerdict", "offersRefusalVerdict", "createdAt", "updatedAt"] }, { "type": "null" }] }, "routedToLabel": { "anyOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["workItemKey", "workItemTitle", "kind", "gate", "routedToLabel"], "$id": "motir://v1/operations/getWorkItemApprovalGate" };
33315
+ var schema97 = { "type": "object", "properties": { "workItemKey": { "type": "string", "pattern": "^[A-Z][A-Z0-9]*-\\d+$" }, "workItemTitle": { "type": "string" }, "kind": { "type": "string", "enum": ["design_result", "decision_approval", "pull_request_approval", "pull_request_merge", "acceptance_result", "decision_choice", "decision_confirmation", "plan_approval", "agent_review"] }, "gate": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": ["design_result", "decision_approval", "pull_request_approval", "pull_request_merge", "acceptance_result", "decision_choice", "decision_confirmation", "plan_approval", "agent_review"] }, "state": { "type": "string", "enum": ["awaiting", "approved", "changes_requested", "superseded", "overturned", "declined"] }, "noteMd": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decidedAt": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" }] }, "decidedByLabel": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decidedUnderAuthority": { "anyOf": [{ "type": "string", "enum": ["assignee", "reporter", "admin", "github_review", "plan_permission", "review_agent", "project_setting"] }, { "type": "null" }] }, "decisionSource": { "anyOf": [{ "type": "string", "enum": ["ui", "api", "mcp", "github", "system"] }, { "type": "null" }] }, "subjectVersion": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "supersededCause": { "anyOf": [{ "type": "string", "enum": ["republished", "withdrawn", "head_moved", "member_closed", "member_drafted", "conflict", "set_changed", "pulled_back", "ci_failed", "ci_rerunning", "unknown", "plan_stale", "plan_discarded", "queue_failed", "review_agent_disabled", "subject_gone"] }, { "type": "null" }] }, "outcomeRef": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "refusalVerdict": { "anyOf": [{ "type": "string", "enum": ["revise", "re_plan"] }, { "type": "null" }] }, "offersRefusalVerdict": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": ["id", "kind", "state", "noteMd", "decidedAt", "decidedByLabel", "decidedUnderAuthority", "decisionSource", "subjectVersion", "supersededCause", "outcomeRef", "refusalVerdict", "offersRefusalVerdict", "createdAt", "updatedAt"] }, { "type": "null" }] }, "routedToLabel": { "anyOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["workItemKey", "workItemTitle", "kind", "gate", "routedToLabel"], "$id": "motir://v1/operations/getWorkItemApprovalGate" };
33316
33316
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
33317
33317
  ;
33318
33318
  let vErrors = null;
@@ -33822,7 +33822,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
33822
33822
  }
33823
33823
  errors++;
33824
33824
  }
33825
- if (!(data13 === "republished" || data13 === "withdrawn" || data13 === "head_moved" || data13 === "member_closed" || data13 === "member_drafted" || data13 === "conflict" || data13 === "set_changed" || data13 === "pulled_back" || data13 === "ci_failed" || data13 === "ci_rerunning" || data13 === "unknown" || data13 === "plan_stale" || data13 === "plan_discarded" || data13 === "queue_failed" || data13 === "review_agent_disabled")) {
33825
+ if (!(data13 === "republished" || data13 === "withdrawn" || data13 === "head_moved" || data13 === "member_closed" || data13 === "member_drafted" || data13 === "conflict" || data13 === "set_changed" || data13 === "pulled_back" || data13 === "ci_failed" || data13 === "ci_rerunning" || data13 === "unknown" || data13 === "plan_stale" || data13 === "plan_discarded" || data13 === "queue_failed" || data13 === "review_agent_disabled" || data13 === "subject_gone")) {
33826
33826
  const err28 = { instancePath: instancePath + "/gate/supersededCause", schemaPath: "#/properties/gate/anyOf/0/properties/supersededCause/anyOf/0/enum", keyword: "enum", params: { allowedValues: schema97.properties.gate.anyOf[0].properties.supersededCause.anyOf[0].enum }, message: "must be equal to one of the allowed values" };
33827
33827
  if (vErrors === null) {
33828
33828
  vErrors = [err28];
@@ -59004,18 +59004,25 @@ var HOSTED_AGENT_ENV_KEYS = [
59004
59004
  var MAX_ARGV_PROMPT_BYTES2 = 100 * 1024;
59005
59005
  var EGRESS_DOCUMENT = {
59006
59006
  $schema: "https://opencode.ai/config.json",
59007
- enabled_providers: ["anthropic"],
59007
+ enabled_providers: ["anthropic", "deepseek"],
59008
59008
  provider: {
59009
59009
  anthropic: {
59010
59010
  options: {
59011
59011
  baseURL: "{env:MOTIR_GATEWAY_URL}/v1",
59012
59012
  apiKey: "{env:MOTIR_RUN_KEY}"
59013
59013
  }
59014
+ },
59015
+ deepseek: {
59016
+ options: {
59017
+ baseURL: "{env:MOTIR_GATEWAY_URL}/v1",
59018
+ apiKey: "{env:MOTIR_RUN_KEY}"
59019
+ }
59014
59020
  }
59015
59021
  },
59016
59022
  share: "disabled",
59017
59023
  autoupdate: false
59018
59024
  };
59025
+ var HOSTED_MODEL_PROVIDERS = EGRESS_DOCUMENT.enabled_providers;
59019
59026
  function egressConfig() {
59020
59027
  return JSON.stringify(EGRESS_DOCUMENT);
59021
59028
  }
@@ -59044,8 +59051,13 @@ function hostedOpenCodeAgent(env = process.env, opts = {}) {
59044
59051
  hint: "The hosted image is booted with the run model, the gateway URL and the run key."
59045
59052
  });
59046
59053
  }
59047
- if (!/^anthropic\/[A-Za-z0-9._-]+$/.test(model)) {
59048
- throw new CliError(`${HOSTED_MODEL_ENV} must be "anthropic/<model id>", got "${model}".`);
59054
+ const slash = model.indexOf("/");
59055
+ const provider = slash > 0 ? model.slice(0, slash) : "";
59056
+ const id = slash > 0 ? model.slice(slash + 1) : "";
59057
+ if (!HOSTED_MODEL_PROVIDERS.includes(provider) || !/^[A-Za-z0-9._-]+$/.test(id)) {
59058
+ throw new CliError(
59059
+ `${HOSTED_MODEL_ENV} must be "<provider>/<model id>" with provider one of ${HOSTED_MODEL_PROVIDERS.join(", ")}, got "${model}".`
59060
+ );
59049
59061
  }
59050
59062
  const args = ["run", "--model", model, "--auto"];
59051
59063
  return {
@@ -60215,6 +60227,7 @@ function renderAcceptanceRerunPrompt(input) {
60215
60227
  lines2.push(` does, publish it again with \`${HOW_TO_TEST_TOOL_NAME}\` on ${input.key}.`);
60216
60228
  return lines2.join("\n");
60217
60229
  }
60230
+ var ACCEPTANCE_LANE_PUBLISHES_CHECK = "grep -rlE 'uses:\\s*\\./\\.github/actions/upload-acceptance-video' .github/workflows/";
60218
60231
  function renderAcceptanceRecordPrompt(input) {
60219
60232
  const lines2 = [];
60220
60233
  lines2.push(
@@ -60229,17 +60242,37 @@ function renderAcceptanceRecordPrompt(input) {
60229
60242
  lines2.push("");
60230
60243
  lines2.push("## What to do");
60231
60244
  lines2.push("");
60232
- lines2.push("1. **Run the story's acceptance spec** (`tests/e2e/acceptance*.spec.ts`, the one");
60245
+ lines2.push("1. **Find out who publishes the receipt.** In the checkout that holds the");
60246
+ lines2.push(" acceptance spec, run:");
60247
+ lines2.push("");
60248
+ lines2.push(` ${ACCEPTANCE_LANE_PUBLISHES_CHECK}`);
60249
+ lines2.push("");
60250
+ lines2.push(" **If it prints a file**, that repository\u2019s acceptance lane publishes the");
60251
+ lines2.push(" receipt itself, from the green pull-request run on the commit you pushed. Make");
60252
+ lines2.push(
60253
+ " NO MCP publish. Run the story\u2019s acceptance spec only to confirm it is green,"
60254
+ );
60255
+ lines2.push(
60256
+ " then report: \u201Cthe repository\u2019s acceptance lane published the receipt on"
60257
+ );
60258
+ lines2.push(" CI\u2019s green run; no MCP publish made\u201D, naming that run (its");
60259
+ lines2.push(
60260
+ " `Publish the acceptance receipt` step logs the receipt id). Steps 2\u20134 do not"
60261
+ );
60262
+ lines2.push(" apply.");
60263
+ lines2.push("");
60264
+ lines2.push(" **If it prints nothing**, no lane publishes there, and steps 2\u20134 are yours.");
60265
+ lines2.push("2. **Run the story's acceptance spec** (`tests/e2e/acceptance*.spec.ts`, the one");
60233
60266
  lines2.push(` that declares \`acceptanceStory('${input.key}')\`) on the acceptance lane, with`);
60234
60267
  lines2.push(" recording on, so the clip shows the fixed work.");
60235
- lines2.push("2. **Publish it \u2014 two calls.** `create_acceptance_upload` with the card key mints a");
60268
+ lines2.push("3. **Publish it \u2014 two calls.** `create_acceptance_upload` with the card key mints a");
60236
60269
  lines2.push(
60237
60270
  " presigned PUT; PUT the clip\u2019s bytes to it (`Content-Type: video/webm`); then"
60238
60271
  );
60239
60272
  lines2.push(" `publish_acceptance_result` with the pathname it returned, the chapters, the");
60240
60273
  lines2.push(" commit sha you pushed, and the card key.");
60241
60274
  lines2.push(
60242
- "3. **Report the receipt id the publish returned.** Without it nothing was published,"
60275
+ "4. **Report the receipt id the publish returned.** Without it nothing was published,"
60243
60276
  );
60244
60277
  lines2.push(" and the reviewer has nothing new to watch.");
60245
60278
  lines2.push("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motir/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Motir CLI — terminal dispatch of the work loop, over Motir's public REST API.",
5
5
  "license": "GPL-3.0-only",
6
6
  "repository": {