@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.mjs
CHANGED
|
@@ -2646,6 +2646,7 @@ var InMemoryTaskStore = class {
|
|
|
2646
2646
|
projectId: params.projectId,
|
|
2647
2647
|
dueDate: params.dueDate,
|
|
2648
2648
|
metadata: params.metadata,
|
|
2649
|
+
files: params.files,
|
|
2649
2650
|
parentId: params.parentId,
|
|
2650
2651
|
sourceId: params.sourceId,
|
|
2651
2652
|
context: params.context,
|
|
@@ -2703,6 +2704,7 @@ var InMemoryTaskStore = class {
|
|
|
2703
2704
|
const updated = {
|
|
2704
2705
|
...existing,
|
|
2705
2706
|
...updates,
|
|
2707
|
+
files: updates.files !== void 0 ? updates.files : existing.files,
|
|
2706
2708
|
updatedAt: /* @__PURE__ */ new Date()
|
|
2707
2709
|
};
|
|
2708
2710
|
tenantTasks.set(id, updated);
|
|
@@ -14207,6 +14209,11 @@ var manageTaskSchema = z41.object({
|
|
|
14207
14209
|
dependencies: z41.array(z41.string()).optional().describe("List of task IDs that must be completed before this task can start"),
|
|
14208
14210
|
result: z41.string().optional().describe("Result summary when task is completed"),
|
|
14209
14211
|
failureReason: z41.string().optional().describe("Reason for failure (use when status='failed')"),
|
|
14212
|
+
files: z41.array(z41.object({
|
|
14213
|
+
uri: z41.string().describe("Uniquely locates the resource: http(s):// URL, /s/:token share, or sandbox path"),
|
|
14214
|
+
name: z41.string().optional().describe("Display name"),
|
|
14215
|
+
addedBy: z41.enum(["user", "agent"]).optional().describe("Who attached the file")
|
|
14216
|
+
})).optional().describe("File references attached to this task"),
|
|
14210
14217
|
summary: z41.string().optional().describe("Brief summary of the operation")
|
|
14211
14218
|
});
|
|
14212
14219
|
function buildReviewMarkdown(task) {
|
|
@@ -14265,7 +14272,8 @@ function createTaskMiddleware() {
|
|
|
14265
14272
|
requireReview: input.requireReview,
|
|
14266
14273
|
dependencies: input.dependencies,
|
|
14267
14274
|
workspaceId,
|
|
14268
|
-
projectId
|
|
14275
|
+
projectId,
|
|
14276
|
+
files: input.files
|
|
14269
14277
|
});
|
|
14270
14278
|
return JSON.stringify({ success: true, data: task });
|
|
14271
14279
|
}
|
|
@@ -14344,7 +14352,8 @@ function createTaskMiddleware() {
|
|
|
14344
14352
|
"result",
|
|
14345
14353
|
"failureReason",
|
|
14346
14354
|
"requireReview",
|
|
14347
|
-
"dependencies"
|
|
14355
|
+
"dependencies",
|
|
14356
|
+
"files"
|
|
14348
14357
|
];
|
|
14349
14358
|
for (const field of settableFields) {
|
|
14350
14359
|
if (input[field] !== void 0) {
|
|
@@ -18182,11 +18191,11 @@ ${BASE_PROMPT}` : BASE_PROMPT;
|
|
|
18182
18191
|
defaultInterruptOn: interruptOn,
|
|
18183
18192
|
subagents,
|
|
18184
18193
|
generalPurposeAgent: true
|
|
18185
|
-
}),
|
|
18186
|
-
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
18187
|
-
anthropicPromptCachingMiddleware({
|
|
18188
|
-
unsupportedModelBehavior: "ignore"
|
|
18189
18194
|
})
|
|
18195
|
+
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
18196
|
+
// anthropicPromptCachingMiddleware({
|
|
18197
|
+
// unsupportedModelBehavior: "ignore",
|
|
18198
|
+
// })
|
|
18190
18199
|
];
|
|
18191
18200
|
if (interruptOn) {
|
|
18192
18201
|
middleware.push(humanInTheLoopMiddleware2({ interruptOn }));
|
|
@@ -21864,6 +21873,27 @@ registerToolLattice(
|
|
|
21864
21873
|
}
|
|
21865
21874
|
}
|
|
21866
21875
|
);
|
|
21876
|
+
registerToolLattice(
|
|
21877
|
+
"list_models",
|
|
21878
|
+
{
|
|
21879
|
+
name: "list_models",
|
|
21880
|
+
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.",
|
|
21881
|
+
schema: z49.object({})
|
|
21882
|
+
},
|
|
21883
|
+
async (_input) => {
|
|
21884
|
+
try {
|
|
21885
|
+
const lattices = modelLatticeManager.getAllLattices();
|
|
21886
|
+
return JSON.stringify({
|
|
21887
|
+
models: lattices.map((l) => ({
|
|
21888
|
+
key: l.key,
|
|
21889
|
+
name: l.client.name ?? l.key
|
|
21890
|
+
}))
|
|
21891
|
+
});
|
|
21892
|
+
} catch (error) {
|
|
21893
|
+
return JSON.stringify({ error: `Failed to list models: ${error.message}` });
|
|
21894
|
+
}
|
|
21895
|
+
}
|
|
21896
|
+
);
|
|
21867
21897
|
registerToolLattice(
|
|
21868
21898
|
"invoke_agent",
|
|
21869
21899
|
{
|
|
@@ -21995,6 +22025,22 @@ The skills document WHY and HOW; these gates are the unskippable
|
|
|
21995
22025
|
minimum. If you cannot satisfy a gate (e.g. user says skip), record it
|
|
21996
22026
|
and proceed only on the user's explicit instruction.
|
|
21997
22027
|
|
|
22028
|
+
LEARNING ROUND KICKOFF \u2014 a message that names an existing target agent
|
|
22029
|
+
id AND an existing tracking task id (a "learning round"). This protocol
|
|
22030
|
+
OVERRIDES the defaults above:
|
|
22031
|
+
- The target agent ALREADY EXISTS (an empty placeholder). Build and
|
|
22032
|
+
refine it via update_agent on that exact id. NEVER call create_agent \u2014
|
|
22033
|
+
a new agent would disconnect the round's tracking.
|
|
22034
|
+
- The parent task ALREADY EXISTS \u2014 your create-a-task-first duty is
|
|
22035
|
+
satisfied by it. Create subtasks with manage_task under its id
|
|
22036
|
+
(parentId); NEVER create a new parent task for the round.
|
|
22037
|
+
- The round is pre-approved \u2014 skip the DESIGN\u2192CONFIRM gates: show the
|
|
22038
|
+
design in your reply, then build directly.
|
|
22039
|
+
- Every update_agent call must be mirrored by a manage_task work item
|
|
22040
|
+
whose summary names the changed keys (e.g. "update_agent: prompt,
|
|
22041
|
+
modelKey") \u2014 the round feed highlights these so the user can see what
|
|
22042
|
+
changed between iterations.
|
|
22043
|
+
|
|
21998
22044
|
Your sub-skills (accessible via the MOC or direct loading):
|
|
21999
22045
|
- [[learn-capability]] \u2014 Learn from any source material \u2192 skills + agents
|
|
22000
22046
|
- [[agent-build]] \u2014 Design and build single agents (REACT/DEEP_AGENT)
|
|
@@ -22109,6 +22155,7 @@ var agentArchitectConfig = {
|
|
|
22109
22155
|
tools: [
|
|
22110
22156
|
"list_agents",
|
|
22111
22157
|
"list_tools",
|
|
22158
|
+
"list_models",
|
|
22112
22159
|
"list_middleware_types",
|
|
22113
22160
|
"list_connections",
|
|
22114
22161
|
"get_agent",
|
|
@@ -28987,6 +29034,7 @@ function createManageEvalTool() {
|
|
|
28987
29034
|
description: z66.string().optional(),
|
|
28988
29035
|
judgeModelKey: z66.string().optional(),
|
|
28989
29036
|
concurrency: z66.number().optional(),
|
|
29037
|
+
targetAgentId: z66.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."),
|
|
28990
29038
|
suiteId: z66.string().optional(),
|
|
28991
29039
|
caseId: z66.string().optional(),
|
|
28992
29040
|
inputMessage: z66.string().optional(),
|
|
@@ -29018,7 +29066,11 @@ function createManageEvalTool() {
|
|
|
29018
29066
|
judgeModelConfig: { modelKey: input.judgeModelKey },
|
|
29019
29067
|
targetServerConfig: {
|
|
29020
29068
|
workspace_id: ctx.workspaceId,
|
|
29021
|
-
project_id: ctx.projectId
|
|
29069
|
+
project_id: ctx.projectId,
|
|
29070
|
+
// The project↔agent association lives here (not in the project
|
|
29071
|
+
// name): an eval project is agent-agnostic by design, this
|
|
29072
|
+
// pointer is merely the agent's designated verifier.
|
|
29073
|
+
...input.targetAgentId ? { targetAgentId: input.targetAgentId } : {}
|
|
29022
29074
|
},
|
|
29023
29075
|
concurrency: input.concurrency ?? 3
|
|
29024
29076
|
});
|
|
@@ -29085,7 +29137,7 @@ function createManageEvalTool() {
|
|
|
29085
29137
|
name: "manage_eval",
|
|
29086
29138
|
description: `Create, update, delete evaluation projects, suites, and test cases.
|
|
29087
29139
|
|
|
29088
|
-
Project: create_project(name, description?, judgeModelKey?, concurrency?) | update_project | delete_project
|
|
29140
|
+
Project: create_project(name, description?, judgeModelKey?, concurrency?, targetAgentId?) | update_project | delete_project
|
|
29089
29141
|
judgeModelKey defaults to first available model. concurrency defaults to 3.
|
|
29090
29142
|
delete_project rejected if active runs exist.
|
|
29091
29143
|
**When creating a project from within a workspace, the workspace/project context is
|
|
@@ -29109,6 +29161,7 @@ function createRunEvalTool() {
|
|
|
29109
29161
|
suiteIds: z66.array(z66.string()).optional().describe("Optional for start \u2014 only run these suites (e.g. dev set only). Omit to run all."),
|
|
29110
29162
|
caseIds: z66.array(z66.string()).optional().describe("Optional for start \u2014 only run these cases across the selected suites. Omit to run all cases in those suites."),
|
|
29111
29163
|
runId: z66.string().optional().describe("Required for status, resume, abort"),
|
|
29164
|
+
taskId: z66.string().optional().describe("Optional for start \u2014 training task ID this run belongs to (round association)"),
|
|
29112
29165
|
sleepMs: z66.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."),
|
|
29113
29166
|
wait: z66.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.")
|
|
29114
29167
|
});
|
|
@@ -29126,7 +29179,7 @@ function createRunEvalTool() {
|
|
|
29126
29179
|
switch (input.action) {
|
|
29127
29180
|
case "start": {
|
|
29128
29181
|
const ctx = workspaceContext(exeConfig);
|
|
29129
|
-
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx);
|
|
29182
|
+
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx, input.taskId);
|
|
29130
29183
|
if (input.wait === false) {
|
|
29131
29184
|
data = sanitize({ runId, message: "Run started. Poll with run_eval status (backoff: 15s\u219230s\u219260s\u2192max 120s)." });
|
|
29132
29185
|
break;
|