@axiom-lattice/core 3.0.7 → 3.1.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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +62 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -5494,12 +5494,13 @@ interface EvalRunService {
|
|
|
5494
5494
|
* executes in. Comes from the CALLER's runConfig, NOT from the eval
|
|
5495
5495
|
* project's targetServerConfig. Test cases are environment-agnostic;
|
|
5496
5496
|
* the run environment is decided at run time.
|
|
5497
|
+
* @param taskId - Optional training task (round) this run belongs to.
|
|
5497
5498
|
* @returns The newly created run ID
|
|
5498
5499
|
*/
|
|
5499
5500
|
startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
|
|
5500
5501
|
workspaceId?: string;
|
|
5501
5502
|
projectId?: string;
|
|
5502
|
-
}): Promise<string>;
|
|
5503
|
+
}, taskId?: string): Promise<string>;
|
|
5503
5504
|
/**
|
|
5504
5505
|
* Abort a running evaluation.
|
|
5505
5506
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -5494,12 +5494,13 @@ interface EvalRunService {
|
|
|
5494
5494
|
* executes in. Comes from the CALLER's runConfig, NOT from the eval
|
|
5495
5495
|
* project's targetServerConfig. Test cases are environment-agnostic;
|
|
5496
5496
|
* the run environment is decided at run time.
|
|
5497
|
+
* @param taskId - Optional training task (round) this run belongs to.
|
|
5497
5498
|
* @returns The newly created run ID
|
|
5498
5499
|
*/
|
|
5499
5500
|
startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
|
|
5500
5501
|
workspaceId?: string;
|
|
5501
5502
|
projectId?: string;
|
|
5502
|
-
}): Promise<string>;
|
|
5503
|
+
}, taskId?: string): Promise<string>;
|
|
5503
5504
|
/**
|
|
5504
5505
|
* Abort a running evaluation.
|
|
5505
5506
|
*
|
package/dist/index.js
CHANGED
|
@@ -4501,6 +4501,7 @@ var InMemoryTaskStore = class {
|
|
|
4501
4501
|
projectId: params.projectId,
|
|
4502
4502
|
dueDate: params.dueDate,
|
|
4503
4503
|
metadata: params.metadata,
|
|
4504
|
+
files: params.files,
|
|
4504
4505
|
parentId: params.parentId,
|
|
4505
4506
|
sourceId: params.sourceId,
|
|
4506
4507
|
context: params.context,
|
|
@@ -4558,6 +4559,7 @@ var InMemoryTaskStore = class {
|
|
|
4558
4559
|
const updated = {
|
|
4559
4560
|
...existing,
|
|
4560
4561
|
...updates,
|
|
4562
|
+
files: updates.files !== void 0 ? updates.files : existing.files,
|
|
4561
4563
|
updatedAt: /* @__PURE__ */ new Date()
|
|
4562
4564
|
};
|
|
4563
4565
|
tenantTasks.set(id, updated);
|
|
@@ -16043,6 +16045,11 @@ var manageTaskSchema = import_zod43.z.object({
|
|
|
16043
16045
|
dependencies: import_zod43.z.array(import_zod43.z.string()).optional().describe("List of task IDs that must be completed before this task can start"),
|
|
16044
16046
|
result: import_zod43.z.string().optional().describe("Result summary when task is completed"),
|
|
16045
16047
|
failureReason: import_zod43.z.string().optional().describe("Reason for failure (use when status='failed')"),
|
|
16048
|
+
files: import_zod43.z.array(import_zod43.z.object({
|
|
16049
|
+
uri: import_zod43.z.string().describe("Uniquely locates the resource: http(s):// URL, /s/:token share, or sandbox path"),
|
|
16050
|
+
name: import_zod43.z.string().optional().describe("Display name"),
|
|
16051
|
+
addedBy: import_zod43.z.enum(["user", "agent"]).optional().describe("Who attached the file")
|
|
16052
|
+
})).optional().describe("File references attached to this task"),
|
|
16046
16053
|
summary: import_zod43.z.string().optional().describe("Brief summary of the operation")
|
|
16047
16054
|
});
|
|
16048
16055
|
function buildReviewMarkdown(task) {
|
|
@@ -16101,7 +16108,8 @@ function createTaskMiddleware() {
|
|
|
16101
16108
|
requireReview: input.requireReview,
|
|
16102
16109
|
dependencies: input.dependencies,
|
|
16103
16110
|
workspaceId,
|
|
16104
|
-
projectId
|
|
16111
|
+
projectId,
|
|
16112
|
+
files: input.files
|
|
16105
16113
|
});
|
|
16106
16114
|
return JSON.stringify({ success: true, data: task });
|
|
16107
16115
|
}
|
|
@@ -16180,7 +16188,8 @@ function createTaskMiddleware() {
|
|
|
16180
16188
|
"result",
|
|
16181
16189
|
"failureReason",
|
|
16182
16190
|
"requireReview",
|
|
16183
|
-
"dependencies"
|
|
16191
|
+
"dependencies",
|
|
16192
|
+
"files"
|
|
16184
16193
|
];
|
|
16185
16194
|
for (const field of settableFields) {
|
|
16186
16195
|
if (input[field] !== void 0) {
|
|
@@ -20012,11 +20021,11 @@ ${BASE_PROMPT}` : BASE_PROMPT;
|
|
|
20012
20021
|
defaultInterruptOn: interruptOn,
|
|
20013
20022
|
subagents,
|
|
20014
20023
|
generalPurposeAgent: true
|
|
20015
|
-
}),
|
|
20016
|
-
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
20017
|
-
(0, import_langchain54.anthropicPromptCachingMiddleware)({
|
|
20018
|
-
unsupportedModelBehavior: "ignore"
|
|
20019
20024
|
})
|
|
20025
|
+
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
20026
|
+
// anthropicPromptCachingMiddleware({
|
|
20027
|
+
// unsupportedModelBehavior: "ignore",
|
|
20028
|
+
// })
|
|
20020
20029
|
];
|
|
20021
20030
|
if (interruptOn) {
|
|
20022
20031
|
middleware.push((0, import_langchain54.humanInTheLoopMiddleware)({ interruptOn }));
|
|
@@ -23704,6 +23713,27 @@ registerToolLattice(
|
|
|
23704
23713
|
}
|
|
23705
23714
|
}
|
|
23706
23715
|
);
|
|
23716
|
+
registerToolLattice(
|
|
23717
|
+
"list_models",
|
|
23718
|
+
{
|
|
23719
|
+
name: "list_models",
|
|
23720
|
+
description: "List all registered models. Returns each model's key (use this string as modelKey when creating eval projects via manage_eval create_project, or as an agent's modelKey in create_agent/update_agent) and its display name.",
|
|
23721
|
+
schema: import_zod47.default.object({})
|
|
23722
|
+
},
|
|
23723
|
+
async (_input) => {
|
|
23724
|
+
try {
|
|
23725
|
+
const lattices = modelLatticeManager.getAllLattices();
|
|
23726
|
+
return JSON.stringify({
|
|
23727
|
+
models: lattices.map((l) => ({
|
|
23728
|
+
key: l.key,
|
|
23729
|
+
name: l.client.name ?? l.key
|
|
23730
|
+
}))
|
|
23731
|
+
});
|
|
23732
|
+
} catch (error) {
|
|
23733
|
+
return JSON.stringify({ error: `Failed to list models: ${error.message}` });
|
|
23734
|
+
}
|
|
23735
|
+
}
|
|
23736
|
+
);
|
|
23707
23737
|
registerToolLattice(
|
|
23708
23738
|
"invoke_agent",
|
|
23709
23739
|
{
|
|
@@ -23835,6 +23865,22 @@ The skills document WHY and HOW; these gates are the unskippable
|
|
|
23835
23865
|
minimum. If you cannot satisfy a gate (e.g. user says skip), record it
|
|
23836
23866
|
and proceed only on the user's explicit instruction.
|
|
23837
23867
|
|
|
23868
|
+
LEARNING ROUND KICKOFF \u2014 a message that names an existing target agent
|
|
23869
|
+
id AND an existing tracking task id (a "learning round"). This protocol
|
|
23870
|
+
OVERRIDES the defaults above:
|
|
23871
|
+
- The target agent ALREADY EXISTS (an empty placeholder). Build and
|
|
23872
|
+
refine it via update_agent on that exact id. NEVER call create_agent \u2014
|
|
23873
|
+
a new agent would disconnect the round's tracking.
|
|
23874
|
+
- The parent task ALREADY EXISTS \u2014 your create-a-task-first duty is
|
|
23875
|
+
satisfied by it. Create subtasks with manage_task under its id
|
|
23876
|
+
(parentId); NEVER create a new parent task for the round.
|
|
23877
|
+
- The round is pre-approved \u2014 skip the DESIGN\u2192CONFIRM gates: show the
|
|
23878
|
+
design in your reply, then build directly.
|
|
23879
|
+
- Every update_agent call must be mirrored by a manage_task work item
|
|
23880
|
+
whose summary names the changed keys (e.g. "update_agent: prompt,
|
|
23881
|
+
modelKey") \u2014 the round feed highlights these so the user can see what
|
|
23882
|
+
changed between iterations.
|
|
23883
|
+
|
|
23838
23884
|
Your sub-skills (accessible via the MOC or direct loading):
|
|
23839
23885
|
- [[learn-capability]] \u2014 Learn from any source material \u2192 skills + agents
|
|
23840
23886
|
- [[agent-build]] \u2014 Design and build single agents (REACT/DEEP_AGENT)
|
|
@@ -23949,6 +23995,7 @@ var agentArchitectConfig = {
|
|
|
23949
23995
|
tools: [
|
|
23950
23996
|
"list_agents",
|
|
23951
23997
|
"list_tools",
|
|
23998
|
+
"list_models",
|
|
23952
23999
|
"list_middleware_types",
|
|
23953
24000
|
"list_connections",
|
|
23954
24001
|
"get_agent",
|
|
@@ -30832,6 +30879,7 @@ function createManageEvalTool() {
|
|
|
30832
30879
|
description: import_zod64.z.string().optional(),
|
|
30833
30880
|
judgeModelKey: import_zod64.z.string().optional(),
|
|
30834
30881
|
concurrency: import_zod64.z.number().optional(),
|
|
30882
|
+
targetAgentId: import_zod64.z.string().optional().describe("Optional for create_project \u2014 the agent this eval project verifies. Recorded in targetServerConfig so the agent's detail page can find its eval data without relying on project naming."),
|
|
30835
30883
|
suiteId: import_zod64.z.string().optional(),
|
|
30836
30884
|
caseId: import_zod64.z.string().optional(),
|
|
30837
30885
|
inputMessage: import_zod64.z.string().optional(),
|
|
@@ -30863,7 +30911,11 @@ function createManageEvalTool() {
|
|
|
30863
30911
|
judgeModelConfig: { modelKey: input.judgeModelKey },
|
|
30864
30912
|
targetServerConfig: {
|
|
30865
30913
|
workspace_id: ctx.workspaceId,
|
|
30866
|
-
project_id: ctx.projectId
|
|
30914
|
+
project_id: ctx.projectId,
|
|
30915
|
+
// The project↔agent association lives here (not in the project
|
|
30916
|
+
// name): an eval project is agent-agnostic by design, this
|
|
30917
|
+
// pointer is merely the agent's designated verifier.
|
|
30918
|
+
...input.targetAgentId ? { targetAgentId: input.targetAgentId } : {}
|
|
30867
30919
|
},
|
|
30868
30920
|
concurrency: input.concurrency ?? 3
|
|
30869
30921
|
});
|
|
@@ -30930,7 +30982,7 @@ function createManageEvalTool() {
|
|
|
30930
30982
|
name: "manage_eval",
|
|
30931
30983
|
description: `Create, update, delete evaluation projects, suites, and test cases.
|
|
30932
30984
|
|
|
30933
|
-
Project: create_project(name, description?, judgeModelKey?, concurrency?) | update_project | delete_project
|
|
30985
|
+
Project: create_project(name, description?, judgeModelKey?, concurrency?, targetAgentId?) | update_project | delete_project
|
|
30934
30986
|
judgeModelKey defaults to first available model. concurrency defaults to 3.
|
|
30935
30987
|
delete_project rejected if active runs exist.
|
|
30936
30988
|
**When creating a project from within a workspace, the workspace/project context is
|
|
@@ -30954,6 +31006,7 @@ function createRunEvalTool() {
|
|
|
30954
31006
|
suiteIds: import_zod64.z.array(import_zod64.z.string()).optional().describe("Optional for start \u2014 only run these suites (e.g. dev set only). Omit to run all."),
|
|
30955
31007
|
caseIds: import_zod64.z.array(import_zod64.z.string()).optional().describe("Optional for start \u2014 only run these cases across the selected suites. Omit to run all cases in those suites."),
|
|
30956
31008
|
runId: import_zod64.z.string().optional().describe("Required for status, resume, abort"),
|
|
31009
|
+
taskId: import_zod64.z.string().optional().describe("Optional for start \u2014 training task ID this run belongs to (round association)"),
|
|
30957
31010
|
sleepMs: import_zod64.z.number().int().min(0).max(12e4).optional().describe("Optional for status \u2014 sleep this many ms BEFORE checking the run, to pace polling (e.g. 15000 \u2192 30000 \u2192 60000 \u2192 120000). Omit to check immediately."),
|
|
30958
31011
|
wait: import_zod64.z.boolean().optional().describe("Optional for start \u2014 defaults to true: block synchronously (up to ~150s) and return final results in one call. Set false to return the runId immediately and poll.")
|
|
30959
31012
|
});
|
|
@@ -30971,7 +31024,7 @@ function createRunEvalTool() {
|
|
|
30971
31024
|
switch (input.action) {
|
|
30972
31025
|
case "start": {
|
|
30973
31026
|
const ctx = workspaceContext(exeConfig);
|
|
30974
|
-
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx);
|
|
31027
|
+
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx, input.taskId);
|
|
30975
31028
|
if (input.wait === false) {
|
|
30976
31029
|
data = sanitize({ runId, message: "Run started. Poll with run_eval status (backoff: 15s\u219230s\u219260s\u2192max 120s)." });
|
|
30977
31030
|
break;
|