tines 0.0.176 → 0.0.178
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 +1 -1
- package/dist/index.js +107 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ tines issues show <project>/<number>
|
|
|
39
39
|
tines issues move <project>/<number> <action> # a workflow transition
|
|
40
40
|
tines issues transfer <project>/<number> --project <dest> # move to another project (keeps ID, record and old refs)
|
|
41
41
|
tines issues transfer <ref> --project <dest> --dry-run # review only: no number allocated, nothing written
|
|
42
|
-
tines issues transfer <ref> --project <dest> --inspect 0 # print reviewed guidance item
|
|
42
|
+
tines issues transfer <ref> --project <dest> --inspect 0 # print any reviewed guidance item, including retained, in full
|
|
43
43
|
tines issues transfer <ref> --project <dest> --yes # skip the prompt (still commits only the fetched review)
|
|
44
44
|
tines issues comment <project>/<number> - <<'EOF' # body from stdin; @file also works
|
|
45
45
|
…
|
package/dist/index.js
CHANGED
|
@@ -5048,11 +5048,12 @@ var CHANGE_LABEL = {
|
|
|
5048
5048
|
removed: "removed with source",
|
|
5049
5049
|
retained: "retained",
|
|
5050
5050
|
rescoped: "moves with the issue",
|
|
5051
|
-
replaced: "
|
|
5051
|
+
replaced: "effective selection changes"
|
|
5052
5052
|
};
|
|
5053
5053
|
function inspectableChanges(preview) {
|
|
5054
|
-
return preview.context.changes
|
|
5054
|
+
return preview.context.changes;
|
|
5055
5055
|
}
|
|
5056
|
+
var effectiveness = (present, effective) => !present ? "not present" : effective ? "effective" : "overridden candidate";
|
|
5056
5057
|
function repoLine(change) {
|
|
5057
5058
|
if (change.kind !== "repo") return null;
|
|
5058
5059
|
const before = change.repo_before;
|
|
@@ -5074,16 +5075,85 @@ function routingLines(preview) {
|
|
|
5074
5075
|
lines.push(`${label}: ${explainer.verdict}`);
|
|
5075
5076
|
if (explainer.pin) {
|
|
5076
5077
|
lines.push(
|
|
5077
|
-
`
|
|
5078
|
+
` pin: runner ${explainer.pin.runner_name ?? explainer.pin.runner_id}, tier ${explainer.pin.tier ?? "default"}`
|
|
5078
5079
|
);
|
|
5079
5080
|
}
|
|
5081
|
+
for (const check of explainer.checks) {
|
|
5082
|
+
lines.push(
|
|
5083
|
+
` ${check.ok ? "pass" : "FAIL"} ${check.name}: ${check.detail}${check.action?.label ? ` (${check.action.label})` : ""}`
|
|
5084
|
+
);
|
|
5085
|
+
}
|
|
5086
|
+
if (explainer.matched_rule)
|
|
5087
|
+
lines.push(` matched rule ${explainer.matched_rule.scope_label}`);
|
|
5080
5088
|
for (const tie of explainer.ambiguous_rules) {
|
|
5081
5089
|
lines.push(` tied rule ${tie.scope_label}`);
|
|
5082
5090
|
}
|
|
5091
|
+
if (explainer.runner_rule)
|
|
5092
|
+
lines.push(` runner source rule ${explainer.runner_rule.scope_label}`);
|
|
5093
|
+
if (explainer.tier_override) lines.push(` tier override ${explainer.tier_override}`);
|
|
5094
|
+
for (const target of explainer.targets) {
|
|
5095
|
+
lines.push(
|
|
5096
|
+
` target ${target.runner_name} \u2014 ${target.tier}${target.model ? ` / ${target.model}` : ""}: ${target.verdict} \u2014 ${target.detail}`
|
|
5097
|
+
);
|
|
5098
|
+
}
|
|
5099
|
+
if (explainer.active_run)
|
|
5100
|
+
lines.push(
|
|
5101
|
+
` active run ${explainer.active_run.id} (${explainer.active_run.status})`
|
|
5102
|
+
);
|
|
5103
|
+
if (explainer.queue_position !== null)
|
|
5104
|
+
lines.push(` queue position ${explainer.queue_position}`);
|
|
5105
|
+
lines.push(
|
|
5106
|
+
` attempts ${explainer.attempt_count}/${explainer.attempt_limit}; parked ${explainer.parked ? "yes" : "no"}`
|
|
5107
|
+
);
|
|
5083
5108
|
}
|
|
5084
5109
|
lines.push(" Capacity, heartbeats and spending are advisory and may change at any moment.");
|
|
5085
5110
|
return lines;
|
|
5086
5111
|
}
|
|
5112
|
+
function repoDetail(repo) {
|
|
5113
|
+
return `${repo.url}; branch ${repo.branch ?? "repository default branch"}; directory ${repo.dir}`;
|
|
5114
|
+
}
|
|
5115
|
+
function effectiveRepositoryLines(preview) {
|
|
5116
|
+
const lines = ["", "Effective repositories:"];
|
|
5117
|
+
for (const [label, context] of [
|
|
5118
|
+
[" before", preview.context.before],
|
|
5119
|
+
[" after ", preview.context.after]
|
|
5120
|
+
]) {
|
|
5121
|
+
lines.push(`${label}:`);
|
|
5122
|
+
if (!context.repos.length) lines.push(" none");
|
|
5123
|
+
for (const repo of context.repos) {
|
|
5124
|
+
lines.push(` ${repo.name} \u2014 effective (${repo.scope.label})`);
|
|
5125
|
+
lines.push(` ${repoDetail(repo)}`);
|
|
5126
|
+
for (const loser of context.overridden.filter(
|
|
5127
|
+
(item) => item.kind === "repo" && item.name === repo.name
|
|
5128
|
+
)) {
|
|
5129
|
+
lines.push(
|
|
5130
|
+
` overridden candidate ${loser.name} (${loser.scope.label}) \u2014 overridden by ${loser.overridden_by}`
|
|
5131
|
+
);
|
|
5132
|
+
lines.push(
|
|
5133
|
+
` ${loser.repo ? repoDetail(loser.repo) : "checkout details unavailable from this server"}`
|
|
5134
|
+
);
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5137
|
+
}
|
|
5138
|
+
return lines;
|
|
5139
|
+
}
|
|
5140
|
+
function conflictLines(preview) {
|
|
5141
|
+
const lines = ["", "Repository checkout conflicts:"];
|
|
5142
|
+
for (const [label, context] of [
|
|
5143
|
+
[" before", preview.context.before],
|
|
5144
|
+
[" after ", preview.context.after]
|
|
5145
|
+
]) {
|
|
5146
|
+
if (!context.conflicts.length) lines.push(`${label}: none`);
|
|
5147
|
+
for (const conflict of context.conflicts) {
|
|
5148
|
+
const participants = conflict.item_ids.map((id) => {
|
|
5149
|
+
const repo = context.repos.find((item) => item.item_id === id);
|
|
5150
|
+
return repo ? `${repo.name} (${repo.scope.label})` : id;
|
|
5151
|
+
}).join(", ");
|
|
5152
|
+
lines.push(`${label}: ${conflict.dir} \u2014 ${participants}`);
|
|
5153
|
+
}
|
|
5154
|
+
}
|
|
5155
|
+
return lines;
|
|
5156
|
+
}
|
|
5087
5157
|
function formatTransferPreview(preview) {
|
|
5088
5158
|
const p = preview.preserved;
|
|
5089
5159
|
const lines = [
|
|
@@ -5097,20 +5167,19 @@ function formatTransferPreview(preview) {
|
|
|
5097
5167
|
` pins: ${p.pinned_runner_id ?? "none"}${p.pinned_tier ? ` (${p.pinned_tier})` : ""}; attempts ${p.attempt_count}${p.parked ? "; parked" : ""}`
|
|
5098
5168
|
];
|
|
5099
5169
|
const changes = inspectableChanges(preview);
|
|
5100
|
-
lines.push("", changes.length ? "Guidance
|
|
5170
|
+
lines.push("", changes.length ? "Guidance:" : "Guidance: none.");
|
|
5101
5171
|
changes.forEach((change, index) => {
|
|
5102
5172
|
lines.push(` [${index}] ${change.kind} "${change.name}" \u2014 ${CHANGE_LABEL[change.change]}`);
|
|
5103
5173
|
const scopeBefore = change.scope_before?.label ?? "\u2014";
|
|
5104
5174
|
const scopeAfter = change.scope_after?.label ?? "\u2014";
|
|
5105
5175
|
lines.push(` scope: ${scopeBefore} => ${scopeAfter}`);
|
|
5176
|
+
lines.push(
|
|
5177
|
+
` before: ${effectiveness(Boolean(change.scope_before), change.effective_before)}; after: ${effectiveness(Boolean(change.scope_after), change.effective_after)}`
|
|
5178
|
+
);
|
|
5106
5179
|
const repo = repoLine(change);
|
|
5107
5180
|
if (repo) lines.push(repo);
|
|
5108
5181
|
});
|
|
5109
|
-
|
|
5110
|
-
lines.push(
|
|
5111
|
-
` ! ${conflict.item_ids.length} repositories still want the "${conflict.dir}" directory at the destination`
|
|
5112
|
-
);
|
|
5113
|
-
}
|
|
5182
|
+
lines.push(...effectiveRepositoryLines(preview), ...conflictLines(preview));
|
|
5114
5183
|
lines.push(...routingLines(preview));
|
|
5115
5184
|
if (preview.schedule) {
|
|
5116
5185
|
lines.push(
|
|
@@ -5133,11 +5202,24 @@ function formatTransferPreview(preview) {
|
|
|
5133
5202
|
function formatTransferItem(preview, index) {
|
|
5134
5203
|
const change = inspectableChanges(preview)[index];
|
|
5135
5204
|
if (!change) return `no item [${index}] in this review`;
|
|
5136
|
-
const
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5205
|
+
const beforePrompt = preview.context.before.prompt.parts.find(
|
|
5206
|
+
(part) => part.item_id === change.item_id
|
|
5207
|
+
);
|
|
5208
|
+
const afterPrompt = preview.context.after.prompt.parts.find(
|
|
5209
|
+
(part) => part.item_id === change.item_id
|
|
5210
|
+
);
|
|
5211
|
+
if (beforePrompt || afterPrompt) {
|
|
5212
|
+
if (beforePrompt?.body === afterPrompt?.body)
|
|
5213
|
+
return `${change.name} (prompt, Before and after)
|
|
5214
|
+
${beforePrompt?.body ?? afterPrompt?.body}`;
|
|
5215
|
+
return [
|
|
5216
|
+
beforePrompt ? `${change.name} (prompt, Before \u2014 ${beforePrompt.scope.label})
|
|
5217
|
+
${beforePrompt.body}` : "",
|
|
5218
|
+
afterPrompt ? `${change.name} (prompt, After \u2014 ${afterPrompt.scope.label})
|
|
5219
|
+
${afterPrompt.body}` : ""
|
|
5220
|
+
].filter(Boolean).join("\n\n");
|
|
5221
|
+
}
|
|
5222
|
+
const skill = preview.context.after.skills.find((s) => s.item_id === change.item_id) ?? preview.context.before.skills.find((s) => s.item_id === change.item_id);
|
|
5141
5223
|
if (skill) {
|
|
5142
5224
|
return [
|
|
5143
5225
|
`${change.name} (skill, ${skill.scope.label})`,
|
|
@@ -5145,11 +5227,17 @@ ${prompt.body}`;
|
|
|
5145
5227
|
${f.content}`)
|
|
5146
5228
|
].join("\n");
|
|
5147
5229
|
}
|
|
5148
|
-
const repo =
|
|
5149
|
-
if (repo)
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5230
|
+
const repo = preview.context.after.repos.find((r) => r.item_id === change.item_id) ?? preview.context.before.repos.find((r) => r.item_id === change.item_id);
|
|
5231
|
+
if (repo) return `${change.name} (repo, ${repo.scope.label})
|
|
5232
|
+
${repoDetail(repo)}`;
|
|
5233
|
+
const candidate = [
|
|
5234
|
+
...preview.context.after.overridden,
|
|
5235
|
+
...preview.context.before.overridden
|
|
5236
|
+
].find((item) => item.item_id === change.item_id);
|
|
5237
|
+
if (candidate?.repo)
|
|
5238
|
+
return `${change.name} (overridden repo candidate, ${candidate.scope.label})
|
|
5239
|
+
${repoDetail(candidate.repo)}`;
|
|
5240
|
+
return `${change.name} (${change.kind}) is an overridden candidate; content details are unavailable from this server.`;
|
|
5153
5241
|
}
|
|
5154
5242
|
function formatTransferResult(result) {
|
|
5155
5243
|
if (result.status === "noop") {
|