@pushary/agent-hooks 0.23.0 → 0.24.0

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.
@@ -5,6 +5,7 @@ import {
5
5
  } from "../chunk-KQYIHZ5E.js";
6
6
  import {
7
7
  CODEX_AGENT,
8
+ DECISION_LINE_MAX,
8
9
  DEFAULT_SESSION,
9
10
  askUser,
10
11
  codexAllow,
@@ -31,10 +32,7 @@ import {
31
32
  toCodexWire,
32
33
  toPolicyLookup,
33
34
  waitForAnswer
34
- } from "../chunk-M4GDBGXF.js";
35
- import {
36
- DECISION_LINE_MAX
37
- } from "../chunk-WPVL6VIT.js";
35
+ } from "../chunk-OQZH5PVA.js";
38
36
  import "../chunk-DWED7BS3.js";
39
37
  import {
40
38
  getApiKey
@@ -4,8 +4,7 @@ import {
4
4
  getMachineId,
5
5
  reportEvent,
6
6
  waitForAnswer
7
- } from "../chunk-M4GDBGXF.js";
8
- import "../chunk-WPVL6VIT.js";
7
+ } from "../chunk-OQZH5PVA.js";
9
8
  import "../chunk-DWED7BS3.js";
10
9
  import {
11
10
  getApiKey
@@ -4,6 +4,7 @@ import {
4
4
  isDeferAnswer
5
5
  } from "../chunk-KQYIHZ5E.js";
6
6
  import {
7
+ DECISION_LINE_MAX,
7
8
  DEFAULT_SESSION,
8
9
  askUser,
9
10
  deriveActionBody,
@@ -23,10 +24,7 @@ import {
23
24
  savePendingQuestion,
24
25
  sendNotification,
25
26
  waitForAnswer
26
- } from "../chunk-M4GDBGXF.js";
27
- import {
28
- DECISION_LINE_MAX
29
- } from "../chunk-WPVL6VIT.js";
27
+ } from "../chunk-OQZH5PVA.js";
30
28
  import "../chunk-DWED7BS3.js";
31
29
  import {
32
30
  getApiKey
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePreToolUse
4
- } from "../chunk-FGZZRCOG.js";
4
+ } from "../chunk-U4SSWRVM.js";
5
5
  import "../chunk-KQYIHZ5E.js";
6
- import "../chunk-M4GDBGXF.js";
7
- import "../chunk-WPVL6VIT.js";
6
+ import "../chunk-OQZH5PVA.js";
8
7
  import "../chunk-DWED7BS3.js";
9
8
  import "../chunk-NKXSILEW.js";
10
9
 
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePostToolUse
4
- } from "../chunk-M4GDBGXF.js";
5
- import "../chunk-WPVL6VIT.js";
4
+ } from "../chunk-OQZH5PVA.js";
6
5
  import "../chunk-DWED7BS3.js";
7
6
  import "../chunk-NKXSILEW.js";
8
7
 
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleUserPrompt
4
- } from "../chunk-M4GDBGXF.js";
5
- import "../chunk-WPVL6VIT.js";
4
+ } from "../chunk-OQZH5PVA.js";
6
5
  import "../chunk-DWED7BS3.js";
7
6
  import "../chunk-NKXSILEW.js";
8
7
 
@@ -17,8 +17,11 @@ import {
17
17
  writeInstructionBlock
18
18
  } from "../chunk-JPRRYC5X.js";
19
19
  import {
20
- isValidApiKey
21
- } from "../chunk-WPVL6VIT.js";
20
+ isValidApiKey,
21
+ reportEvent
22
+ } from "../chunk-OQZH5PVA.js";
23
+ import "../chunk-DWED7BS3.js";
24
+ import "../chunk-NKXSILEW.js";
22
25
 
23
26
  // bin/pushary-setup.ts
24
27
  import { existsSync, readFileSync, writeFileSync, appendFileSync, mkdirSync, cpSync, rmSync, chmodSync } from "fs";
@@ -960,9 +963,11 @@ var main = async () => {
960
963
  ${dim2("No agents selected. API key saved.")}`);
961
964
  } else {
962
965
  const failed = [];
966
+ const completed = [];
963
967
  for (const agent of agents) {
964
968
  try {
965
969
  await AGENT_SETUP[agent](trimmedKey);
970
+ completed.push(agent);
966
971
  } catch (err) {
967
972
  failed.push(agent.replace("_", " "));
968
973
  console.log(` ${yellow2("!")} ${agent.replace("_", " ")} setup failed: ${formatError(err)}`);
@@ -974,6 +979,15 @@ var main = async () => {
974
979
  console.log(` ${yellow2("!")} Failed: ${failed.join(", ")} ${dim2("(others completed successfully)")}`);
975
980
  }
976
981
  await offerProjectInstructions(agents);
982
+ if (completed.length > 0) {
983
+ try {
984
+ await reportEvent(
985
+ { event: "agent_setup_completed", agentType: "setup", agents: completed },
986
+ { maxAttempts: 1, timeoutMs: 2e3 }
987
+ );
988
+ } catch {
989
+ }
990
+ }
977
991
  }
978
992
  if (connectMode !== "app") {
979
993
  const skipPhone = process.argv.includes("--skip-phone");
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleStop
4
- } from "../chunk-M4GDBGXF.js";
5
- import "../chunk-WPVL6VIT.js";
4
+ } from "../chunk-OQZH5PVA.js";
6
5
  import "../chunk-DWED7BS3.js";
7
6
  import "../chunk-NKXSILEW.js";
8
7