@gethmy/agent 1.9.2 → 1.10.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/dist/cli.js CHANGED
@@ -1559,14 +1559,6 @@ class BudgetGuard {
1559
1559
  detail: `${card.attempts} of ${this.config.maxAttemptsPerCard} attempts exhausted`
1560
1560
  };
1561
1561
  }
1562
- const dailySpent = this.store.getDailyCostCents();
1563
- if (dailySpent >= this.config.dailyBudgetCents) {
1564
- return {
1565
- allow: false,
1566
- reason: "daily_budget",
1567
- detail: `daily budget ${formatCents(dailySpent)}/${formatCents(this.config.dailyBudgetCents)} exhausted`
1568
- };
1569
- }
1570
1562
  return { allow: true };
1571
1563
  }
1572
1564
  }
@@ -1590,9 +1582,6 @@ function buildGaveUpComment(maxAttempts, failures) {
1590
1582
  return lines.join(`
1591
1583
  `);
1592
1584
  }
1593
- function formatCents(cents) {
1594
- return `$${(cents / 100).toFixed(2)}`;
1595
- }
1596
1585
 
1597
1586
  // src/error-classifier.ts
1598
1587
  function parseRetryAfterMs(message) {
@@ -4048,7 +4037,6 @@ var init_transitions = __esm(() => {
4048
4037
 
4049
4038
  // src/review-worker.ts
4050
4039
  import { execFileSync as execFileSync8 } from "node:child_process";
4051
- import { createHash } from "node:crypto";
4052
4040
 
4053
4041
  class ReviewWorker {
4054
4042
  config;
@@ -4240,19 +4228,11 @@ class ReviewWorker {
4240
4228
  const systemPrompt = buildReviewSystemPrompt();
4241
4229
  const userPrompt = buildReviewUserPrompt(enriched, this.branchName, cwd, previewUrl, diff, this.config.worktree.baseBranch);
4242
4230
  try {
4243
- const sessionResp = await this.client.getAgentSession(card.id);
4244
- const reviewSession2 = sessionResp.session;
4245
- const reviewSessionId = reviewSession2?.id ?? null;
4246
- const contentHash = createHash("sha256").update(systemPrompt).digest("hex");
4247
4231
  await this.client.recordPromptHistory({
4248
4232
  cardId: card.id,
4249
4233
  generatedPrompt: systemPrompt,
4250
4234
  variant: "execute",
4251
- contextIncluded: { source: "review-knowledge", mode: "review" },
4252
- sessionId: reviewSessionId,
4253
- contentHash,
4254
- templateVersion: 1,
4255
- confidence: 0.5
4235
+ contextIncluded: { source: "review-knowledge", mode: "review" }
4256
4236
  });
4257
4237
  } catch (err) {
4258
4238
  log.warn(this.tag, `prompt_history persistence skipped: ${err instanceof Error ? err.message : String(err)}`);
@@ -4704,8 +4684,13 @@ async function promoteUnblockedSuccessors(completedCard, deps) {
4704
4684
  const successorId = link.target_card.id;
4705
4685
  try {
4706
4686
  const { card } = await deps.client.getCard(successorId);
4707
- if (card.assigned_agent_id !== deps.agentId) {
4708
- log.debug(TAG21, `successor #${card.short_id} not assigned to agent — skipping promotion`);
4687
+ if (card.assigned_agent_id === deps.agentId) {} else if (card.assigned_agent_id === null && !card.assignee_id) {
4688
+ log.info(TAG21, `successor #${card.short_id} unassigned auto-assigning to continue chain`);
4689
+ await deps.client.updateCard(successorId, {
4690
+ assignedAgentId: deps.agentId
4691
+ });
4692
+ } else {
4693
+ log.debug(TAG21, `successor #${card.short_id} assigned to different entity — skipping`);
4709
4694
  continue;
4710
4695
  }
4711
4696
  await deps.enqueue(successorId);
package/dist/index.js CHANGED
@@ -1558,14 +1558,6 @@ class BudgetGuard {
1558
1558
  detail: `${card.attempts} of ${this.config.maxAttemptsPerCard} attempts exhausted`
1559
1559
  };
1560
1560
  }
1561
- const dailySpent = this.store.getDailyCostCents();
1562
- if (dailySpent >= this.config.dailyBudgetCents) {
1563
- return {
1564
- allow: false,
1565
- reason: "daily_budget",
1566
- detail: `daily budget ${formatCents(dailySpent)}/${formatCents(this.config.dailyBudgetCents)} exhausted`
1567
- };
1568
- }
1569
1561
  return { allow: true };
1570
1562
  }
1571
1563
  }
@@ -1589,9 +1581,6 @@ function buildGaveUpComment(maxAttempts, failures) {
1589
1581
  return lines.join(`
1590
1582
  `);
1591
1583
  }
1592
- function formatCents(cents) {
1593
- return `$${(cents / 100).toFixed(2)}`;
1594
- }
1595
1584
 
1596
1585
  // src/error-classifier.ts
1597
1586
  function parseRetryAfterMs(message) {
@@ -4047,7 +4036,6 @@ var init_transitions = __esm(() => {
4047
4036
 
4048
4037
  // src/review-worker.ts
4049
4038
  import { execFileSync as execFileSync8 } from "node:child_process";
4050
- import { createHash } from "node:crypto";
4051
4039
 
4052
4040
  class ReviewWorker {
4053
4041
  config;
@@ -4239,19 +4227,11 @@ class ReviewWorker {
4239
4227
  const systemPrompt = buildReviewSystemPrompt();
4240
4228
  const userPrompt = buildReviewUserPrompt(enriched, this.branchName, cwd, previewUrl, diff, this.config.worktree.baseBranch);
4241
4229
  try {
4242
- const sessionResp = await this.client.getAgentSession(card.id);
4243
- const reviewSession2 = sessionResp.session;
4244
- const reviewSessionId = reviewSession2?.id ?? null;
4245
- const contentHash = createHash("sha256").update(systemPrompt).digest("hex");
4246
4230
  await this.client.recordPromptHistory({
4247
4231
  cardId: card.id,
4248
4232
  generatedPrompt: systemPrompt,
4249
4233
  variant: "execute",
4250
- contextIncluded: { source: "review-knowledge", mode: "review" },
4251
- sessionId: reviewSessionId,
4252
- contentHash,
4253
- templateVersion: 1,
4254
- confidence: 0.5
4234
+ contextIncluded: { source: "review-knowledge", mode: "review" }
4255
4235
  });
4256
4236
  } catch (err) {
4257
4237
  log.warn(this.tag, `prompt_history persistence skipped: ${err instanceof Error ? err.message : String(err)}`);
@@ -4703,8 +4683,13 @@ async function promoteUnblockedSuccessors(completedCard, deps) {
4703
4683
  const successorId = link.target_card.id;
4704
4684
  try {
4705
4685
  const { card } = await deps.client.getCard(successorId);
4706
- if (card.assigned_agent_id !== deps.agentId) {
4707
- log.debug(TAG21, `successor #${card.short_id} not assigned to agent — skipping promotion`);
4686
+ if (card.assigned_agent_id === deps.agentId) {} else if (card.assigned_agent_id === null && !card.assignee_id) {
4687
+ log.info(TAG21, `successor #${card.short_id} unassigned auto-assigning to continue chain`);
4688
+ await deps.client.updateCard(successorId, {
4689
+ assignedAgentId: deps.agentId
4690
+ });
4691
+ } else {
4692
+ log.debug(TAG21, `successor #${card.short_id} assigned to different entity — skipping`);
4708
4693
  continue;
4709
4694
  }
4710
4695
  await deps.enqueue(successorId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethmy/agent",
3
- "version": "1.9.2",
3
+ "version": "1.10.1",
4
4
  "description": "Push-based agent daemon for Harmony — watches board assignments and spawns Claude CLI workers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",