fix(rectification): expose canonical skill runtime path
This commit is contained in:
@@ -13,7 +13,12 @@ import {
|
||||
} from "./rectification-v9-tools";
|
||||
|
||||
const activeRectificationSkill = resolveActiveSkillPackage("jyotish-birth-time-rectification");
|
||||
export const RECTIFICATION_V9_SKILL_PATH = activeRectificationSkill.resolvedPath;
|
||||
|
||||
/** The immutable package directory used for identity/provenance checks. */
|
||||
export const RECTIFICATION_V9_PACKAGE_PATH = activeRectificationSkill.resolvedPath;
|
||||
|
||||
/** The basename-correct alias that is safe to pass to Mastra WorkspaceSkills. */
|
||||
export const RECTIFICATION_V9_SKILL_PATH = resolveSkillPackageRuntimePath(activeRectificationSkill);
|
||||
|
||||
/**
|
||||
* V9 rectification agent actions. The action drives the bounded step budget;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { readFileSync, realpathSync } from "node:fs";
|
||||
import { basename } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import test from "node:test";
|
||||
|
||||
@@ -7,6 +8,7 @@ import {
|
||||
RECTIFICATION_AGENT_HARD_STEP_LIMIT,
|
||||
RECTIFICATION_AGENT_MAX_STEPS,
|
||||
RECTIFICATION_AGENT_STEP_BUDGETS,
|
||||
RECTIFICATION_V9_PACKAGE_PATH,
|
||||
RECTIFICATION_V9_SKILL_PATH,
|
||||
RECTIFICATION_V9_SKILL_NAME,
|
||||
getRectificationV9Agent,
|
||||
@@ -59,11 +61,10 @@ test("system prompt carries only high-priority boundaries, never the method copy
|
||||
|
||||
test("agent pins the dedicated rectification skill and its fixed version", () => {
|
||||
assert.equal(RECTIFICATION_V9_SKILL_NAME, "jyotish-birth-time-rectification");
|
||||
assert.ok(
|
||||
RECTIFICATION_V9_SKILL_PATH.endsWith(
|
||||
"skills/jyotish-birth-time-rectification/versions/9.0.0",
|
||||
),
|
||||
);
|
||||
assert.equal(basename(RECTIFICATION_V9_SKILL_PATH), RECTIFICATION_V9_SKILL_NAME);
|
||||
assert.ok(RECTIFICATION_V9_PACKAGE_PATH.endsWith("skills/jyotish-birth-time-rectification/versions/9.0.0"));
|
||||
assert.notEqual(RECTIFICATION_V9_SKILL_PATH, RECTIFICATION_V9_PACKAGE_PATH);
|
||||
assert.equal(realpathSync(RECTIFICATION_V9_SKILL_PATH), RECTIFICATION_V9_PACKAGE_PATH);
|
||||
assert.equal(RECTIFICATION_SKILL_NAME, "jyotish-birth-time-rectification");
|
||||
assert.equal(RECTIFICATION_SKILL_VERSION, "9.0.0");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user