@harperfast/agent 0.11.0 → 0.11.2
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/README.svg +16 -7
- package/dist/agent.js +6 -11
- package/package.json +1 -1
package/README.md
CHANGED
package/README.svg
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<svg
|
|
3
3
|
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
viewBox="0 0
|
|
5
|
-
width="
|
|
4
|
+
viewBox="0 0 1320 200"
|
|
5
|
+
width="660"
|
|
6
6
|
height="200"
|
|
7
7
|
role="img"
|
|
8
|
-
aria-label="
|
|
8
|
+
aria-label="npm install -g @harperfast/agent, harper-agent"
|
|
9
9
|
>
|
|
10
10
|
<defs>
|
|
11
11
|
<!-- Brand-ish gradient for the wordmark -->
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
font-weight="800"
|
|
38
38
|
letter-spacing="-1.5"
|
|
39
39
|
fill="url(#harperGrad)"
|
|
40
|
-
>harper
|
|
40
|
+
>harper-agent</text>
|
|
41
41
|
|
|
42
42
|
<!-- little “terminal” capsule -->
|
|
43
43
|
<g transform="translate(0 120)">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
rx="14"
|
|
48
48
|
ry="14"
|
|
49
49
|
width="800"
|
|
50
|
-
height="
|
|
50
|
+
height="100"
|
|
51
51
|
fill="#0b1020"
|
|
52
52
|
opacity="0.92"
|
|
53
53
|
/>
|
|
@@ -62,10 +62,19 @@
|
|
|
62
62
|
font-size="22"
|
|
63
63
|
fill="#e6f7ff"
|
|
64
64
|
opacity="0.96"
|
|
65
|
-
>$
|
|
65
|
+
>$ npm install -g @harperfast/agent</text>
|
|
66
|
+
|
|
67
|
+
<text
|
|
68
|
+
class="mono"
|
|
69
|
+
x="90"
|
|
70
|
+
y="75"
|
|
71
|
+
font-size="22"
|
|
72
|
+
fill="#e6f7ff"
|
|
73
|
+
opacity="0.96"
|
|
74
|
+
>$ harper-agent</text>
|
|
66
75
|
|
|
67
76
|
<!-- blinking cursor -->
|
|
68
|
-
<rect x="
|
|
77
|
+
<rect x="284" y="55" width="12" height="24" fill="#e6f7ff" opacity="0.55">
|
|
69
78
|
<animate
|
|
70
79
|
attributeName="opacity"
|
|
71
80
|
values="0.1;0.8;0.1"
|
package/dist/agent.js
CHANGED
|
@@ -955,8 +955,10 @@ async function execute({ path: path7 }) {
|
|
|
955
955
|
if (trackedState.agent) {
|
|
956
956
|
trackedState.agent.instructions = agentsMDContents;
|
|
957
957
|
}
|
|
958
|
+
console.log("Detected AGENTS.md, reading its contents for the AI.");
|
|
958
959
|
return `Switched current working directory to ${trackedState.cwd}, with a AGENTS.md file containing:
|
|
959
|
-
${agentsMDContents}
|
|
960
|
+
${agentsMDContents}
|
|
961
|
+
I strongly suggest you use these newfound skills!`;
|
|
960
962
|
}
|
|
961
963
|
return `Switched current working directory to ${trackedState.cwd}`;
|
|
962
964
|
} catch (err) {
|
|
@@ -1643,7 +1645,6 @@ var checkHarperStatusTool = tool19({
|
|
|
1643
1645
|
// tools/harper/createNewHarperApplicationTool.ts
|
|
1644
1646
|
import { tool as tool20 } from "@openai/agents";
|
|
1645
1647
|
import { execSync as execSync3 } from "child_process";
|
|
1646
|
-
import { existsSync as existsSync7 } from "fs";
|
|
1647
1648
|
import path6 from "path";
|
|
1648
1649
|
import { z as z20 } from "zod";
|
|
1649
1650
|
|
|
@@ -1717,13 +1718,7 @@ async function execute3({ directoryName, template }) {
|
|
|
1717
1718
|
console.log(`Initializing new Git repository in ${resolvedPath}...`);
|
|
1718
1719
|
execSync3("git init", { cwd: resolvedPath, stdio: "ignore" });
|
|
1719
1720
|
const switchedDir = await execute({ path: resolvedPath });
|
|
1720
|
-
|
|
1721
|
-
let returnMsg = `Successfully created a new Harper application in '${resolvedPath}' using template '${template}' with a matching Git repository initialized. ${switchedDir}.`;
|
|
1722
|
-
if (agentsMdExists) {
|
|
1723
|
-
returnMsg += ` I found an AGENTS.md file in the new application \u2013 I strongly suggest you read it next to understand how to use your new skills!`;
|
|
1724
|
-
}
|
|
1725
|
-
returnMsg += ` Use the readDir and readFile tools to inspect the contents of the application.`;
|
|
1726
|
-
return returnMsg;
|
|
1721
|
+
return `Successfully created a new Harper application in '${resolvedPath}' using template '${template}' with a matching Git repository initialized. Use the readDir and readFile tools to inspect the contents of the application. ${switchedDir}.`;
|
|
1727
1722
|
} catch (error) {
|
|
1728
1723
|
let errorMsg = `Error creating new Harper application: ${error.message}`;
|
|
1729
1724
|
if (error.stdout) {
|
|
@@ -2002,7 +1997,7 @@ var readHarperLogsTool = tool27({
|
|
|
2002
1997
|
|
|
2003
1998
|
// tools/harper/startHarperTool.ts
|
|
2004
1999
|
import { tool as tool28 } from "@openai/agents";
|
|
2005
|
-
import { existsSync as
|
|
2000
|
+
import { existsSync as existsSync7 } from "fs";
|
|
2006
2001
|
import { basename, resolve } from "path";
|
|
2007
2002
|
import { z as z28 } from "zod";
|
|
2008
2003
|
|
|
@@ -2029,7 +2024,7 @@ var startHarperTool = tool28({
|
|
|
2029
2024
|
try {
|
|
2030
2025
|
let effectiveDirectory = directoryName;
|
|
2031
2026
|
const candidatePath = resolve(process.cwd(), directoryName);
|
|
2032
|
-
if (!
|
|
2027
|
+
if (!existsSync7(candidatePath)) {
|
|
2033
2028
|
const cwd = process.cwd();
|
|
2034
2029
|
if (basename(cwd) === directoryName) {
|
|
2035
2030
|
effectiveDirectory = cwd;
|