@wichayutdew/pi-workflows 2.7.1 → 3.0.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.
- package/README.md +1 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
- package/src/agents/profile.ts +5 -3
package/README.md
CHANGED
|
@@ -33,8 +33,7 @@ dictating your language, framework, or delivery process.
|
|
|
33
33
|
- Keep worktree-bound iterations safe, including follow-up enhancements.
|
|
34
34
|
- Enforce declared resources and stop unsafe loops before they run away.
|
|
35
35
|
- Assign a workflow-owned role prompt with `agent: planner`, `worker`,
|
|
36
|
-
`reviewer`, or `scout`; customize profiles under
|
|
37
|
-
directory's `agents/` folder.
|
|
36
|
+
`reviewer`, or `scout`; customize profiles under `~/.agents/agents`.
|
|
38
37
|
|
|
39
38
|
## Herdr workflow status
|
|
40
39
|
|
package/dist/index.js
CHANGED
|
@@ -5511,6 +5511,7 @@ function buildMainWorkflowNotice(workflow, run, statusShortcutLabel = "Ctrl+Alt+
|
|
|
5511
5511
|
}
|
|
5512
5512
|
// src/agents/profile.ts
|
|
5513
5513
|
import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
5514
|
+
import { homedir as homedir3 } from "node:os";
|
|
5514
5515
|
import { join as join5 } from "node:path";
|
|
5515
5516
|
import { fileURLToPath } from "node:url";
|
|
5516
5517
|
import { parse } from "yaml";
|
|
@@ -5559,8 +5560,9 @@ function parseAgentProfile(source, name) {
|
|
|
5559
5560
|
...typeof thinking === "string" ? { thinking } : {}
|
|
5560
5561
|
};
|
|
5561
5562
|
}
|
|
5562
|
-
|
|
5563
|
-
|
|
5563
|
+
var DEFAULT_AGENT_PROFILE_DIRECTORY = join5(homedir3(), ".agents", "agents");
|
|
5564
|
+
function loadAgentProfile(name, agentProfileDirectory = DEFAULT_AGENT_PROFILE_DIRECTORY) {
|
|
5565
|
+
const userPath = join5(agentProfileDirectory, `${name}.md`);
|
|
5564
5566
|
const bundledUrl = new URL(`../../examples/starter-kit/agents/${name}.md`, import.meta.url);
|
|
5565
5567
|
const path = existsSync2(userPath) ? userPath : fileURLToPath(bundledUrl);
|
|
5566
5568
|
try {
|
package/package.json
CHANGED
package/src/agents/profile.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
2
3
|
import { join } from 'node:path';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
5
|
import { parse } from 'yaml';
|
|
5
|
-
import { defaultUserWorkflowDirectory } from '../config/load.ts';
|
|
6
6
|
|
|
7
7
|
export const THINKING_LEVELS = [
|
|
8
8
|
'off',
|
|
@@ -74,12 +74,14 @@ export function parseAgentProfile(source: string, name: string): AgentProfile {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
const DEFAULT_AGENT_PROFILE_DIRECTORY = join(homedir(), '.agents', 'agents');
|
|
78
|
+
|
|
77
79
|
/** Loads a user-owned agent profile, with a bundled prompt-only fallback. */
|
|
78
80
|
export function loadAgentProfile(
|
|
79
81
|
name: string,
|
|
80
|
-
|
|
82
|
+
agentProfileDirectory = DEFAULT_AGENT_PROFILE_DIRECTORY,
|
|
81
83
|
): AgentProfile {
|
|
82
|
-
const userPath = join(
|
|
84
|
+
const userPath = join(agentProfileDirectory, `${name}.md`);
|
|
83
85
|
const bundledUrl = new URL(
|
|
84
86
|
`../../examples/starter-kit/agents/${name}.md`,
|
|
85
87
|
import.meta.url,
|