@islamihab/kds 0.2.3 → 0.2.4
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/index.js +16 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -14597,7 +14597,7 @@ import { join } from "path";
|
|
|
14597
14597
|
// package.json
|
|
14598
14598
|
var package_default = {
|
|
14599
14599
|
name: "cli",
|
|
14600
|
-
version: "0.2.
|
|
14600
|
+
version: "0.2.4",
|
|
14601
14601
|
private: true,
|
|
14602
14602
|
type: "module",
|
|
14603
14603
|
bin: {
|
|
@@ -17981,7 +17981,7 @@ var runInbox = async (options) => {
|
|
|
17981
17981
|
const inbox = await client3.query(api2.inbox.list, {});
|
|
17982
17982
|
const targetLastSeen = new Map(inbox.targetLastSeen.map((state) => [state.targetId, state.lastSeenAt]));
|
|
17983
17983
|
const events = options.all ? inbox.events : inbox.events.filter((event) => {
|
|
17984
|
-
const targetId = event.type === "
|
|
17984
|
+
const targetId = event.type === "project" ? event.project.id : event.issue.id;
|
|
17985
17985
|
return event.at > Math.max(inbox.lastSeenAt, targetLastSeen.get(targetId) ?? 0);
|
|
17986
17986
|
});
|
|
17987
17987
|
if (options.json)
|
|
@@ -18000,8 +18000,8 @@ var runInbox = async (options) => {
|
|
|
18000
18000
|
...events.map((event) => [
|
|
18001
18001
|
new Date(event.at).toISOString().slice(0, 16).replace("T", " "),
|
|
18002
18002
|
actorLabel(event.via, event.agent),
|
|
18003
|
-
event.type === "
|
|
18004
|
-
event.type === "
|
|
18003
|
+
event.type === "project" ? event.project.name : event.issue.identifier,
|
|
18004
|
+
event.type === "project" ? projectActivityLine(event.detail) : event.type === "comment" ? `commented: ${event.excerpt}` : issueActivityLine(event.detail)
|
|
18005
18005
|
])
|
|
18006
18006
|
]);
|
|
18007
18007
|
if (inbox.truncated)
|
|
@@ -18553,11 +18553,22 @@ var start = command({
|
|
|
18553
18553
|
positionals: {
|
|
18554
18554
|
id: exports_external.string().describe("Issue identifier, number, or URL")
|
|
18555
18555
|
},
|
|
18556
|
-
|
|
18556
|
+
options: {
|
|
18557
|
+
ready: exports_external.boolean().default(false).describe("Also route the issue to ready_for_agent")
|
|
18558
|
+
},
|
|
18559
|
+
run: async ({ positionals: { id }, options: { ready } }) => {
|
|
18557
18560
|
const client3 = await backendClient();
|
|
18558
18561
|
const issue2 = await resolveIssue(client3, id);
|
|
18559
18562
|
const { branch } = await client3.mutation(api2.issues.start, { id: issue2._id });
|
|
18563
|
+
if (ready && issue2.disposition !== "ready_for_agent") {
|
|
18564
|
+
await client3.mutation(api2.issues.route, { id: issue2._id, disposition: "ready_for_agent" });
|
|
18565
|
+
}
|
|
18560
18566
|
console.log(`Started ${issue2.identifier}: in_progress, branch ${branch}`);
|
|
18567
|
+
if (ready) {
|
|
18568
|
+
console.log("Routed to ready_for_agent.");
|
|
18569
|
+
} else if (issue2.disposition !== "ready_for_agent" && await agentClaim()) {
|
|
18570
|
+
console.log(`Note: disposition is ${issue2.disposition}. Pass --ready if this hand-off was intended.`);
|
|
18571
|
+
}
|
|
18561
18572
|
console.log(`
|
|
18562
18573
|
git switch -c ${shellArg(branch)}`);
|
|
18563
18574
|
}
|