@inf-monkeys-tech/monkeys 1.0.28 → 1.0.30
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/lib/contracts/agent.d.ts +115 -0
- package/lib/contracts/agent.d.ts.map +1 -1
- package/lib/contracts/agent.js +81 -1
- package/lib/contracts/agent.js.map +1 -1
- package/lib/esm/contracts/index.mjs +69 -0
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +70 -0
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +63 -0
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +70 -0
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/agent-workbench-navigation-view-model.schema.json +245 -0
- package/lib/json-schema/index.json +1 -0
- package/lib/schemas/index.d.ts +63 -1
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +10 -3
- package/lib/schemas/index.js.map +1 -1
- package/package.json +2 -2
- package/test/fixtures/agent-session-scenarios.json +328 -0
|
@@ -7833,6 +7833,69 @@ var AgentSessionViewModelSchema = z5.object({
|
|
|
7833
7833
|
});
|
|
7834
7834
|
}
|
|
7835
7835
|
});
|
|
7836
|
+
var AgentWorkbenchNavigationItemStatusSchema = z5.enum(["idle", "running", "completed", "error"]);
|
|
7837
|
+
var AgentWorkbenchCollectionStatusSchema = z5.enum(["loading", "ready", "error"]);
|
|
7838
|
+
var AgentWorkbenchAgentItemSchema = z5.object({
|
|
7839
|
+
id: ContractIdentifierSchema,
|
|
7840
|
+
name: z5.string().min(1),
|
|
7841
|
+
description: z5.string().optional(),
|
|
7842
|
+
iconUrl: z5.string().url().optional(),
|
|
7843
|
+
builtIn: z5.boolean().default(false),
|
|
7844
|
+
pinned: z5.boolean().default(false),
|
|
7845
|
+
pinPending: z5.boolean().default(false)
|
|
7846
|
+
}).strict();
|
|
7847
|
+
var AgentWorkbenchSessionItemSchema = z5.object({
|
|
7848
|
+
id: ContractIdentifierSchema,
|
|
7849
|
+
title: z5.string().min(1),
|
|
7850
|
+
updatedAt: IsoDateTimeSchema,
|
|
7851
|
+
thumbnailUrl: z5.string().url().optional(),
|
|
7852
|
+
status: AgentWorkbenchNavigationItemStatusSchema.default("idle"),
|
|
7853
|
+
pinned: z5.boolean().default(false),
|
|
7854
|
+
contextUsage: z5.object({
|
|
7855
|
+
usedTokens: z5.number().int().nonnegative(),
|
|
7856
|
+
maxTokens: z5.number().int().positive()
|
|
7857
|
+
}).strict().optional()
|
|
7858
|
+
}).strict();
|
|
7859
|
+
var AgentWorkbenchNavigationCapabilitiesSchema = z5.object({
|
|
7860
|
+
createAgent: z5.boolean().default(false),
|
|
7861
|
+
createSession: z5.boolean().default(true),
|
|
7862
|
+
manageCapabilities: z5.boolean().default(false),
|
|
7863
|
+
manageAgentSettings: z5.boolean().default(false),
|
|
7864
|
+
pinAgents: z5.boolean().default(false),
|
|
7865
|
+
pinSessions: z5.boolean().default(false),
|
|
7866
|
+
renameSessions: z5.boolean().default(false),
|
|
7867
|
+
deleteSessions: z5.boolean().default(false)
|
|
7868
|
+
}).strict();
|
|
7869
|
+
var AgentWorkbenchNavigationViewModelSchema = z5.object({
|
|
7870
|
+
contract: z5.literal("AgentWorkbenchNavigationViewModel"),
|
|
7871
|
+
activeTab: z5.enum(["agents", "sessions"]).default("sessions"),
|
|
7872
|
+
searchQuery: z5.string().default(""),
|
|
7873
|
+
selectedAgentId: ContractIdentifierSchema.optional(),
|
|
7874
|
+
selectedSessionId: ContractIdentifierSchema.optional(),
|
|
7875
|
+
agents: z5.object({
|
|
7876
|
+
status: AgentWorkbenchCollectionStatusSchema,
|
|
7877
|
+
items: z5.array(AgentWorkbenchAgentItemSchema),
|
|
7878
|
+
error: z5.string().optional()
|
|
7879
|
+
}).strict(),
|
|
7880
|
+
sessions: z5.object({
|
|
7881
|
+
status: AgentWorkbenchCollectionStatusSchema,
|
|
7882
|
+
items: z5.array(AgentWorkbenchSessionItemSchema),
|
|
7883
|
+
error: z5.string().optional()
|
|
7884
|
+
}).strict(),
|
|
7885
|
+
capabilities: AgentWorkbenchNavigationCapabilitiesSchema
|
|
7886
|
+
}).strict().superRefine((value, context) => {
|
|
7887
|
+
const validateCollection = (collection, path) => {
|
|
7888
|
+
if (collection.status === "error" && !collection.error) {
|
|
7889
|
+
context.addIssue({
|
|
7890
|
+
code: "custom",
|
|
7891
|
+
path: [path, "error"],
|
|
7892
|
+
message: "An error collection must include an error message."
|
|
7893
|
+
});
|
|
7894
|
+
}
|
|
7895
|
+
};
|
|
7896
|
+
validateCollection(value.agents, "agents");
|
|
7897
|
+
validateCollection(value.sessions, "sessions");
|
|
7898
|
+
});
|
|
7836
7899
|
var AgentExecutionModeSchema = AgentModeSchema;
|
|
7837
7900
|
|
|
7838
7901
|
// src/contracts/context.ts
|
|
@@ -12025,6 +12088,7 @@ var canonicalContractSchemas = {
|
|
|
12025
12088
|
"agent-session-run-event": AgentSessionRunEventSchema,
|
|
12026
12089
|
"agent-session-run": AgentSessionRunSchema,
|
|
12027
12090
|
"agent-session-view-model": AgentSessionViewModelSchema,
|
|
12091
|
+
"agent-workbench-navigation-view-model": AgentWorkbenchNavigationViewModelSchema,
|
|
12028
12092
|
"agent-runtime-event": AgentRuntimeEventSchema,
|
|
12029
12093
|
"application-run": ApplicationRunSchema,
|
|
12030
12094
|
"application-handoff": ApplicationHandoffSchema,
|
|
@@ -12111,6 +12175,12 @@ export {
|
|
|
12111
12175
|
AgentSessionTargetedCommandSchema,
|
|
12112
12176
|
AgentSessionTerminalStatusSchema,
|
|
12113
12177
|
AgentSessionViewModelSchema,
|
|
12178
|
+
AgentWorkbenchAgentItemSchema,
|
|
12179
|
+
AgentWorkbenchCollectionStatusSchema,
|
|
12180
|
+
AgentWorkbenchNavigationCapabilitiesSchema,
|
|
12181
|
+
AgentWorkbenchNavigationItemStatusSchema,
|
|
12182
|
+
AgentWorkbenchNavigationViewModelSchema,
|
|
12183
|
+
AgentWorkbenchSessionItemSchema,
|
|
12114
12184
|
ApplicationHandoffEndpointSchema,
|
|
12115
12185
|
ApplicationHandoffSchema,
|
|
12116
12186
|
ApplicationRunSchema,
|