agent-valley 3.0.0 → 3.0.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/assets/plugin.json +1 -1
- package/dist/index.js +70 -13
- package/package.json +1 -1
package/dist/assets/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "av",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"description": "Delegate repository goals to Agent Valley and inspect mission progress and verification evidence.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Agent Valley"
|
package/dist/index.js
CHANGED
|
@@ -16084,17 +16084,12 @@ function buildDarwinSandboxCommand(req, sandboxExecPath = "/usr/bin/sandbox-exec
|
|
|
16084
16084
|
};
|
|
16085
16085
|
}
|
|
16086
16086
|
function buildSeatbeltProfile(req, home) {
|
|
16087
|
-
const
|
|
16087
|
+
const tmpPaths = pathAliases(tmpdir());
|
|
16088
16088
|
const git = linkedWorktreeGitPaths(req.workspacePath);
|
|
16089
16089
|
const agentPaths = agentHomeAccess(req.agentType, home, req.env);
|
|
16090
|
-
let tmpReal = tmp;
|
|
16091
|
-
try {
|
|
16092
|
-
tmpReal = realpathSync4(tmp);
|
|
16093
|
-
} catch {}
|
|
16094
16090
|
const writablePaths = [
|
|
16095
16091
|
req.workspacePath,
|
|
16096
|
-
|
|
16097
|
-
...tmpReal !== tmp ? [tmpReal] : [],
|
|
16092
|
+
...tmpPaths,
|
|
16098
16093
|
...agentPaths.active,
|
|
16099
16094
|
`${home}/.cache`,
|
|
16100
16095
|
`${home}/.npm`,
|
|
@@ -16120,7 +16115,7 @@ function buildSeatbeltProfile(req, home) {
|
|
|
16120
16115
|
];
|
|
16121
16116
|
const denyReadLiterals = [
|
|
16122
16117
|
`${home}/.git-credentials`,
|
|
16123
|
-
...new Set([process.cwd(), req.workspacePath].
|
|
16118
|
+
...new Set([process.cwd(), req.workspacePath].flatMap((root) => pathAliases(root).flatMap((path) => pathAliases(join7(path, PROJECT_CONFIG_FILENAME)))))
|
|
16124
16119
|
];
|
|
16125
16120
|
const denyReadRules = [
|
|
16126
16121
|
...denyReadSubpaths.map((p) => `(deny file-read* (subpath ${seatbeltString(p)}))`),
|
|
@@ -16171,6 +16166,14 @@ ${denyWriteRules}
|
|
|
16171
16166
|
(allow network-outbound (remote tcp "*:80"))
|
|
16172
16167
|
`;
|
|
16173
16168
|
}
|
|
16169
|
+
function pathAliases(path) {
|
|
16170
|
+
try {
|
|
16171
|
+
const canonical = realpathSync4(path);
|
|
16172
|
+
return canonical === path ? [path] : [path, canonical];
|
|
16173
|
+
} catch {
|
|
16174
|
+
return [path];
|
|
16175
|
+
}
|
|
16176
|
+
}
|
|
16174
16177
|
function seatbeltString(value) {
|
|
16175
16178
|
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
|
|
16176
16179
|
}
|
|
@@ -16396,11 +16399,14 @@ class BaseSession {
|
|
|
16396
16399
|
_process = null;
|
|
16397
16400
|
terminalEventReceived = false;
|
|
16398
16401
|
processFailed = false;
|
|
16402
|
+
sandboxPlatform = null;
|
|
16399
16403
|
get process() {
|
|
16400
16404
|
return this._process;
|
|
16401
16405
|
}
|
|
16402
16406
|
set process(proc) {
|
|
16403
16407
|
this._process = proc;
|
|
16408
|
+
if (!proc)
|
|
16409
|
+
this.sandboxPlatform = null;
|
|
16404
16410
|
if (proc) {
|
|
16405
16411
|
this.processFailed = false;
|
|
16406
16412
|
this.terminalEventReceived = false;
|
|
@@ -16417,6 +16423,7 @@ class BaseSession {
|
|
|
16417
16423
|
}
|
|
16418
16424
|
}
|
|
16419
16425
|
async spawnSandboxed(options) {
|
|
16426
|
+
this.sandboxPlatform = null;
|
|
16420
16427
|
if (!this.config) {
|
|
16421
16428
|
this.emitError("CRASH", "spawnSandboxed() called before start()", false);
|
|
16422
16429
|
return false;
|
|
@@ -16437,6 +16444,7 @@ class BaseSession {
|
|
|
16437
16444
|
this.emitError("CRASH", `${err}`, false);
|
|
16438
16445
|
return false;
|
|
16439
16446
|
}
|
|
16447
|
+
this.sandboxPlatform = plan.sandboxed ? plan.platform : null;
|
|
16440
16448
|
this.process = spawn3(plan.command, plan.args, {
|
|
16441
16449
|
detached: process.platform !== "win32",
|
|
16442
16450
|
cwd: this.config.workspacePath,
|
|
@@ -16646,7 +16654,8 @@ var init_codex_session = __esm(() => {
|
|
|
16646
16654
|
this.threadId = threadResult.thread.id;
|
|
16647
16655
|
const turnResult = await this.rpc("turn/start", {
|
|
16648
16656
|
threadId: this.threadId,
|
|
16649
|
-
input: [{ type: "text", text: prompt }]
|
|
16657
|
+
input: [{ type: "text", text: prompt }],
|
|
16658
|
+
...this.sandboxPlatform === "darwin" ? { sandboxPolicy: { type: "externalSandbox", networkAccess: "restricted" } } : {}
|
|
16650
16659
|
});
|
|
16651
16660
|
if (!this.terminalEventReceived && turnResult.turn)
|
|
16652
16661
|
this.turnId = turnResult.turn.id;
|
|
@@ -68804,6 +68813,47 @@ file '${this.frames.at(-1)?.attachment.name}'
|
|
|
68804
68813
|
// ../../packages/core/src/chief/schemas.ts
|
|
68805
68814
|
init_container_observation_policy();
|
|
68806
68815
|
|
|
68816
|
+
// ../../packages/core/src/chief/review-response.ts
|
|
68817
|
+
function reviewResponseFormat(summary, criteria) {
|
|
68818
|
+
const passing = {
|
|
68819
|
+
passed: true,
|
|
68820
|
+
summary,
|
|
68821
|
+
findings: [],
|
|
68822
|
+
...criteria ? {
|
|
68823
|
+
criteria: criteria.map((criterion) => ({
|
|
68824
|
+
criterion,
|
|
68825
|
+
passed: true,
|
|
68826
|
+
evidence: "actual inspected path or check"
|
|
68827
|
+
}))
|
|
68828
|
+
} : {}
|
|
68829
|
+
};
|
|
68830
|
+
const rejected = {
|
|
68831
|
+
...passing,
|
|
68832
|
+
passed: false,
|
|
68833
|
+
summary: "An inspected requirement or evidence gap needs attention.",
|
|
68834
|
+
findings: [
|
|
68835
|
+
"Concern: describe the gap. Evidence: cite the inspected path or failed check. Action: give the concrete repair or next check."
|
|
68836
|
+
],
|
|
68837
|
+
...passing.criteria ? { criteria: passing.criteria.map((entry, index) => ({ ...entry, passed: index !== 0 })) } : {}
|
|
68838
|
+
};
|
|
68839
|
+
return [
|
|
68840
|
+
"Return ONLY one JSON object under 8,000 characters, without Markdown fences or text outside JSON.",
|
|
68841
|
+
`Use exactly these top-level keys: passed, summary, findings${criteria ? ", criteria" : ""}. Do not add other top-level keys or wrap the response in another object.`,
|
|
68842
|
+
"passed must be a boolean, summary must be a nonempty string, and findings must be an array of nonempty strings with at most 50 entries. Do not put objects, arrays, numbers or null in findings. Put each concern, inspected basis and concrete recommendation together inside one finding string; do not use concern/basis/recommendation objects.",
|
|
68843
|
+
"Use findings:[] for passed:true. For passed:false, include at least one actionable finding. Do not omit required keys.",
|
|
68844
|
+
...criteria ? [
|
|
68845
|
+
"criteria must assess every requested criterion exactly once. Each criteria entry has exactly criterion, passed and evidence: criterion and evidence are nonempty strings, and passed is a boolean. Use the exact criterion text and actual inspected evidence. Overall passed must equal all criteria passing."
|
|
68846
|
+
] : [],
|
|
68847
|
+
"The examples show response structure only. Replace example descriptions with actual inspected evidence; never claim an example check was performed.",
|
|
68848
|
+
`Passing response example:
|
|
68849
|
+
${JSON.stringify(passing)}`,
|
|
68850
|
+
`Rejected response example:
|
|
68851
|
+
${JSON.stringify(rejected)}`
|
|
68852
|
+
].join(`
|
|
68853
|
+
|
|
68854
|
+
`);
|
|
68855
|
+
}
|
|
68856
|
+
|
|
68807
68857
|
// ../../packages/core/src/chief/technical-lead.ts
|
|
68808
68858
|
import { createHash as createHash14 } from "node:crypto";
|
|
68809
68859
|
var TECHNICAL_DIRECTOR_ROLE = "Serve as the Chief Director's permanent Technical Director counterpart. Rigorously minimize total cost and wasted work while maximizing execution efficiency. Protect the user goal and quality requirements; standardize on the existing stack, reuse maintained modules and native integrations, keep dependencies justified and consistent, and favor the smallest maintainable solution.";
|
|
@@ -68857,7 +68907,8 @@ function technicalReviewPrompt(mission) {
|
|
|
68857
68907
|
"Flag unjustified dependencies, unnecessary migrations, duplicate implementations, or complexity that materially harms maintainability. Give each concern an inspected basis and a concrete smaller adequate alternative or required evidence so the Chief Director can plan or revise. A passing assessment has no unresolved findings; passed:false includes at least one actionable finding.",
|
|
68858
68908
|
"This consultation is advisory, not an execution veto or an operator approval gate. The Chief Director makes the final business and execution tradeoffs, including when a justified higher cost improves profit or the goal outcome. Do not discard an opportunity solely because of uncertainty: identify assumptions, evidence gaps and a concrete economical validation step or alternative. Do not invent profits, prices or evidence.",
|
|
68859
68909
|
"The Chief Director retains execution judgment, supervision and the final explanation; the Technical Director supplies independent technical advice. The operator retains ultimate operational responsibility. Resolve routine technical choices from evidence without asking for microapprovals or inventing approval pauses.",
|
|
68860
|
-
|
|
68910
|
+
reviewResponseFormat("evidence-based technical advice with cost assumptions or unknowns"),
|
|
68911
|
+
"For concerns use passed:false and actionable findings; the Chief Director decides how to act on them.",
|
|
68861
68912
|
[
|
|
68862
68913
|
"Technical review input (JSON data):",
|
|
68863
68914
|
JSON.stringify({
|
|
@@ -68900,7 +68951,8 @@ function designReviewPrompt(mission) {
|
|
|
68900
68951
|
"If actual data is absent or insufficient, state what is unknown and propose the smallest useful instrumentation or user/field test: the specific journey or hypothesis, relevant user persona, observation or metric, comparison and decision rule. Propose these steps as advice; do not execute them in this read-only stage. Avoid false certainty and do not discard an opportunity solely because evidence is not yet available.",
|
|
68901
68952
|
"Recommend the smallest adequate design approach that preserves the operator goal, any immutable success criteria, existing acceptance obligations and fixed verification command. Flag usability or evidence gaps with inspected examples and concrete alternatives; do not weaken requirements or demand an unrelated redesign.",
|
|
68902
68953
|
"This consultation is advisory, not an execution veto or operator approval gate. The Chief Director owns the final business and execution judgment, supervision and explanation; the operator retains ultimate operational responsibility. Resolve routine choices from evidence without asking for microapprovals. Existing execution permissions remain in force.",
|
|
68903
|
-
|
|
68954
|
+
reviewResponseFormat("evidence-based design advice: alternatives, recommendation, data or unknowns, and retention tradeoffs"),
|
|
68955
|
+
"Use passed:false with actionable concerns when evidence or usability needs improvement; the Chief Director decides how to act on them.",
|
|
68904
68956
|
[
|
|
68905
68957
|
"Design review input (JSON data):",
|
|
68906
68958
|
JSON.stringify({
|
|
@@ -68945,7 +68997,8 @@ function marketingReviewPrompt(mission) {
|
|
|
68945
68997
|
"If real data is missing, state the gap and propose minimal measurement before claiming ROI improved. Do not discard a promising route solely because it is uncertain; distinguish a sourced fact, hypothesis and economical validation opportunity. Compare short-term revenue with costs, retention and payback instead of equating activity or clicks with money.",
|
|
68946
68998
|
"Keep recommendations tied to the operator goal, any immutable success criteria, existing acceptance obligations and fixed verification command. Do not replace the goal with unrelated promotion or weaken requirements to report a better ROI. Recommend a concrete money-making option or improvement with its evidence and tradeoffs.",
|
|
68947
68999
|
"This consultation is advisory, not an execution veto or operator approval gate. The Chief Director owns the final business and execution judgment, supervision and explanation; the operator retains ultimate operational responsibility. Resolve routine choices from evidence without asking for microapprovals. Existing execution permissions remain in force; this Actor preference does not grant outreach, publication or spending permission.",
|
|
68948
|
-
|
|
69000
|
+
reviewResponseFormat("evidence-based marketing advice: audience, revenue routes, recommendation, unit economics or unknowns, and measurable next test"),
|
|
69001
|
+
"A passing assessment has no unresolved findings. Use passed:false with actionable concerns or missing evidence; the Chief Director decides how to act on them.",
|
|
68949
69002
|
[
|
|
68950
69003
|
"Marketing review input (JSON data):",
|
|
68951
69004
|
JSON.stringify({
|
|
@@ -69856,6 +69909,7 @@ ${JSON.stringify({
|
|
|
69856
69909
|
`);
|
|
69857
69910
|
}
|
|
69858
69911
|
function reviewPrompt(mission, task, state) {
|
|
69912
|
+
const criteria = !task && (mission.supervision || mission.operatingPolicy?.metricTargets?.length) ? finalCriteria(mission) : undefined;
|
|
69859
69913
|
return [
|
|
69860
69914
|
task ? "Independently review this task's changes and acceptance evidence." : "Perform the Chief Director's final review of the complete mission.",
|
|
69861
69915
|
...!task ? [CHIEF_DIRECTOR_ROLE, CHIEF_DECISION_RESPONSIBILITY] : [],
|
|
@@ -69870,7 +69924,10 @@ function reviewPrompt(mission, task, state) {
|
|
|
69870
69924
|
] : [],
|
|
69871
69925
|
"Return actionable findings for the Actor to repair. A passing review must have no unresolved findings.",
|
|
69872
69926
|
"Keep the complete JSON response under 8,000 characters; prioritize actionable blockers.",
|
|
69873
|
-
|
|
69927
|
+
...criteria ? [
|
|
69928
|
+
`Assess every goal success criterion in this exact JSON list once with a concise nonempty description of inspected files/checks: ${JSON.stringify(criteria)}. Every task acceptance obligation also needs its fresh independent task review. passed must equal all goal criteria passing; failed criteria need actionable findings.`
|
|
69929
|
+
] : [],
|
|
69930
|
+
reviewResponseFormat("evidence-based assessment", criteria),
|
|
69874
69931
|
`Review input (JSON data):
|
|
69875
69932
|
${JSON.stringify({
|
|
69876
69933
|
mission: JSON.parse(context(mission)),
|