@inf-monkeys-tech/monkeys 1.0.39 → 1.0.41
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 +36 -27
- package/lib/contracts/agent.d.ts.map +1 -1
- package/lib/contracts/agent.js +18 -14
- package/lib/contracts/agent.js.map +1 -1
- package/lib/contracts/menu.d.ts +1 -1
- package/lib/contracts/page.d.ts +3 -3
- package/lib/contracts/semantic.d.ts +2 -2
- package/lib/contracts/tenant.d.ts +41 -6
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +10 -2
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/contracts/trend.d.ts +259 -0
- package/lib/contracts/trend.d.ts.map +1 -1
- package/lib/contracts/trend.js +146 -1
- package/lib/contracts/trend.js.map +1 -1
- package/lib/esm/contracts/index.mjs +149 -11
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +150 -11
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +12 -6
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +145 -6
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/agent-session-view-model.schema.json +2 -2
- package/lib/json-schema/agent-workbench-composer-view-model.schema.json +4 -4
- package/lib/json-schema/agent-workbench-navigation-view-model.schema.json +2 -2
- package/lib/json-schema/index.json +1 -0
- package/lib/json-schema/radar-analysis-detail.schema.json +83 -0
- package/lib/json-schema/radar-analysis-run.schema.json +83 -0
- package/lib/json-schema/tenant-product-config.schema.json +34 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +34 -0
- package/lib/json-schema/trend-radar-collection-item.schema.json +524 -0
- package/lib/schemas/index.d.ts +159 -17
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +22 -4
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/{agent-session-chatbot.json → agent-session-chat.json} +22 -22
- package/test/fixtures/agent-session-kernel.json +1 -1
- package/test/fixtures/agent-session-scenarios.json +6 -6
- package/test/fixtures/{agent-session-agent.json → agent-session-work.json} +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -6689,7 +6689,8 @@ var OutputRecordSchema = z2.object({
|
|
|
6689
6689
|
|
|
6690
6690
|
// src/contracts/agent.ts
|
|
6691
6691
|
import { z as z3 } from "zod";
|
|
6692
|
-
var
|
|
6692
|
+
var StudioAgentModeSchema = z3.enum(["chat", "work"]);
|
|
6693
|
+
var AgentModeSchema = StudioAgentModeSchema;
|
|
6693
6694
|
var AgentConfigurationCapabilitySchema = z3.enum([
|
|
6694
6695
|
"models",
|
|
6695
6696
|
"skills",
|
|
@@ -6708,14 +6709,14 @@ var AgentResourceModeSupportSchema = z3.object({
|
|
|
6708
6709
|
modes: z3.array(AgentModeSchema).min(1)
|
|
6709
6710
|
}).strict();
|
|
6710
6711
|
var AGENT_MODE_CAPABILITIES = Object.freeze({
|
|
6711
|
-
|
|
6712
|
+
chat: AgentModeCapabilitiesSchema.parse({
|
|
6712
6713
|
models: true,
|
|
6713
6714
|
skills: true,
|
|
6714
6715
|
tools: true,
|
|
6715
6716
|
mcp: true,
|
|
6716
6717
|
reasoning: false
|
|
6717
6718
|
}),
|
|
6718
|
-
|
|
6719
|
+
work: AgentModeCapabilitiesSchema.parse({
|
|
6719
6720
|
models: true,
|
|
6720
6721
|
skills: true,
|
|
6721
6722
|
tools: true,
|
|
@@ -6784,8 +6785,8 @@ var AgentSessionPermissionProfileSchema = z3.enum([
|
|
|
6784
6785
|
"full-access"
|
|
6785
6786
|
]);
|
|
6786
6787
|
var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
|
|
6787
|
-
|
|
6788
|
-
|
|
6788
|
+
chat: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
|
|
6789
|
+
work: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, shell: true, fileChange: true, skills: true, approval: true, artifacts: true, usage: true, resume: true, editAndRerun: true, steering: true, summary: true })
|
|
6789
6790
|
});
|
|
6790
6791
|
function getAgentSessionRuntimeCapabilities(mode) {
|
|
6791
6792
|
return AGENT_SESSION_RUNTIME_CAPABILITIES[mode];
|
|
@@ -7622,15 +7623,16 @@ var AgentWorkbenchComposerViewModelSchema = z3.object({
|
|
|
7622
7623
|
}
|
|
7623
7624
|
});
|
|
7624
7625
|
var AgentExecutionModeSchema = AgentModeSchema;
|
|
7625
|
-
function
|
|
7626
|
+
function normalizeStudioAgentMode(value) {
|
|
7626
7627
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
7627
|
-
if (normalized === "agent" || normalized === "codex") return "
|
|
7628
|
-
if (normalized === "chatbot" || normalized === "vercel-ai" || normalized === "vercel" || normalized === "ai-sdk") {
|
|
7629
|
-
return "
|
|
7628
|
+
if (normalized === "work" || normalized === "agent" || normalized === "codex") return "work";
|
|
7629
|
+
if (normalized === "chat" || normalized === "chatbot" || normalized === "vercel-ai" || normalized === "vercel" || normalized === "ai-sdk") {
|
|
7630
|
+
return "chat";
|
|
7630
7631
|
}
|
|
7631
7632
|
return void 0;
|
|
7632
7633
|
}
|
|
7633
|
-
var
|
|
7634
|
+
var normalizeAgentMode = normalizeStudioAgentMode;
|
|
7635
|
+
var normalizeAgentExecutionMode = normalizeStudioAgentMode;
|
|
7634
7636
|
|
|
7635
7637
|
// src/contracts/capability.ts
|
|
7636
7638
|
import { z as z5 } from "zod";
|
|
@@ -11281,9 +11283,14 @@ var TenantTrendRadarSourceSchema = z13.object({
|
|
|
11281
11283
|
ontologyId: ContractIdentifierSchema,
|
|
11282
11284
|
viewId: ContractIdentifierSchema
|
|
11283
11285
|
}).strict();
|
|
11286
|
+
var TenantTrendRadarCollectionTargetSchema = z13.object({
|
|
11287
|
+
ontologyId: ContractIdentifierSchema
|
|
11288
|
+
}).strict();
|
|
11284
11289
|
var TenantTrendRadarSourcesSchema = z13.object({
|
|
11290
|
+
products: TenantTrendRadarSourceSchema.optional(),
|
|
11285
11291
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
11286
|
-
brands: TenantTrendRadarSourceSchema.optional()
|
|
11292
|
+
brands: TenantTrendRadarSourceSchema.optional(),
|
|
11293
|
+
collection: TenantTrendRadarCollectionTargetSchema.optional()
|
|
11287
11294
|
}).strict();
|
|
11288
11295
|
var AssetVariantsSchema = z13.object({
|
|
11289
11296
|
light: z13.string().optional(),
|
|
@@ -12005,6 +12012,120 @@ var RadarSelectionSchema = z14.object({
|
|
|
12005
12012
|
expectedVersion: z14.number().int().nonnegative(),
|
|
12006
12013
|
updatedAt: IsoDateTimeSchema
|
|
12007
12014
|
}).strict();
|
|
12015
|
+
var versionedRefFields = {
|
|
12016
|
+
id: ContractIdentifierSchema,
|
|
12017
|
+
version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
|
|
12018
|
+
ownerRepo: ContractIdentifierSchema.optional()
|
|
12019
|
+
};
|
|
12020
|
+
var TrendRadarCollectionAssetRefSchema = z14.object({
|
|
12021
|
+
kind: z14.literal("asset"),
|
|
12022
|
+
...versionedRefFields
|
|
12023
|
+
}).strict();
|
|
12024
|
+
var TrendRadarCollectionSelectionRefSchema = z14.object({
|
|
12025
|
+
kind: z14.literal("radar-selection"),
|
|
12026
|
+
...versionedRefFields
|
|
12027
|
+
}).strict();
|
|
12028
|
+
var TrendRadarCollectionRunRefSchema = z14.object({
|
|
12029
|
+
kind: z14.literal("radar-analysis-run"),
|
|
12030
|
+
...versionedRefFields
|
|
12031
|
+
}).strict();
|
|
12032
|
+
var TrendRadarCollectionSubjectRefSchema = z14.object({
|
|
12033
|
+
kind: z14.literal("hotword"),
|
|
12034
|
+
...versionedRefFields
|
|
12035
|
+
}).strict();
|
|
12036
|
+
var TrendRadarCollectionArtifactRefSchema = z14.object({
|
|
12037
|
+
kind: z14.literal("artifact"),
|
|
12038
|
+
...versionedRefFields
|
|
12039
|
+
}).strict();
|
|
12040
|
+
var TrendRadarCollectionRecipeEntrySchema = z14.object({
|
|
12041
|
+
subjectRef: TrendRadarCollectionSubjectRefSchema,
|
|
12042
|
+
label: z14.string().trim().min(1).max(200)
|
|
12043
|
+
}).strict();
|
|
12044
|
+
var TrendRadarCollectionRecipeSchema = z14.object({
|
|
12045
|
+
category: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
12046
|
+
design: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
12047
|
+
audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
|
|
12048
|
+
}).strict().refine(
|
|
12049
|
+
(recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
|
|
12050
|
+
"A Trend Radar collection recipe must contain at least one subject."
|
|
12051
|
+
);
|
|
12052
|
+
var TrendRadarCollectionDecisionAxisSchema = z14.object({
|
|
12053
|
+
key: ContractIdentifierSchema,
|
|
12054
|
+
label: z14.string().trim().min(1).max(200).optional(),
|
|
12055
|
+
value: z14.number().finite()
|
|
12056
|
+
}).strict();
|
|
12057
|
+
var TrendRadarCollectionDecisionProjectionSchema = z14.object({
|
|
12058
|
+
axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
|
|
12059
|
+
overallScore: z14.number().finite().optional(),
|
|
12060
|
+
itemRank: z14.number().finite().optional(),
|
|
12061
|
+
sourceRefs: z14.array(EntityRefSchema).optional(),
|
|
12062
|
+
outputRefs: z14.array(EntityRefSchema).optional()
|
|
12063
|
+
}).strict().superRefine((projection, context) => {
|
|
12064
|
+
const hasProjection = Boolean(
|
|
12065
|
+
projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
|
|
12066
|
+
);
|
|
12067
|
+
if (!hasProjection) {
|
|
12068
|
+
context.addIssue({
|
|
12069
|
+
code: "custom",
|
|
12070
|
+
message: "A decision projection must contain canonical decision data or references."
|
|
12071
|
+
});
|
|
12072
|
+
}
|
|
12073
|
+
const seenAxisKeys = /* @__PURE__ */ new Set();
|
|
12074
|
+
projection.axes?.forEach((axis, index) => {
|
|
12075
|
+
if (seenAxisKeys.has(axis.key)) {
|
|
12076
|
+
context.addIssue({
|
|
12077
|
+
code: "custom",
|
|
12078
|
+
path: ["axes", index, "key"],
|
|
12079
|
+
message: `Duplicate decision axis key: ${axis.key}`
|
|
12080
|
+
});
|
|
12081
|
+
}
|
|
12082
|
+
seenAxisKeys.add(axis.key);
|
|
12083
|
+
});
|
|
12084
|
+
});
|
|
12085
|
+
var TrendRadarCollectionArtifactProjectionSchema = z14.object({
|
|
12086
|
+
artifactRef: TrendRadarCollectionArtifactRefSchema,
|
|
12087
|
+
url: z14.string().url().optional(),
|
|
12088
|
+
thumbnailUrl: z14.string().url().optional(),
|
|
12089
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
12090
|
+
metadata: JsonObjectSchema.optional()
|
|
12091
|
+
}).strict();
|
|
12092
|
+
var TrendRadarCollectionProjectionWritebackSchema = z14.object({
|
|
12093
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
12094
|
+
updatedAt: IsoDateTimeSchema,
|
|
12095
|
+
error: z14.object({
|
|
12096
|
+
code: ContractIdentifierSchema,
|
|
12097
|
+
message: z14.string().trim().min(1),
|
|
12098
|
+
retryable: z14.boolean()
|
|
12099
|
+
}).strict().optional()
|
|
12100
|
+
}).strict().superRefine((writeback, context) => {
|
|
12101
|
+
if (writeback.status === "FAILED" && !writeback.error) {
|
|
12102
|
+
context.addIssue({
|
|
12103
|
+
code: "custom",
|
|
12104
|
+
path: ["error"],
|
|
12105
|
+
message: "A failed collection projection writeback must include an error."
|
|
12106
|
+
});
|
|
12107
|
+
}
|
|
12108
|
+
if (writeback.status !== "FAILED" && writeback.error) {
|
|
12109
|
+
context.addIssue({
|
|
12110
|
+
code: "custom",
|
|
12111
|
+
path: ["error"],
|
|
12112
|
+
message: "Only a failed collection projection writeback may include an error."
|
|
12113
|
+
});
|
|
12114
|
+
}
|
|
12115
|
+
});
|
|
12116
|
+
var TrendRadarCollectionItemSchema = z14.object({
|
|
12117
|
+
contract: z14.literal("TrendRadarCollectionItem"),
|
|
12118
|
+
schemaVersion: z14.literal(1),
|
|
12119
|
+
selectionRef: TrendRadarCollectionSelectionRefSchema,
|
|
12120
|
+
recipe: TrendRadarCollectionRecipeSchema,
|
|
12121
|
+
status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
12122
|
+
latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
|
|
12123
|
+
decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
|
|
12124
|
+
artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
|
|
12125
|
+
createdAt: IsoDateTimeSchema,
|
|
12126
|
+
updatedAt: IsoDateTimeSchema,
|
|
12127
|
+
generatedAt: IsoDateTimeSchema.optional()
|
|
12128
|
+
}).strict();
|
|
12008
12129
|
var RadarAnalysisRunSchema = z14.object({
|
|
12009
12130
|
contract: z14.literal("RadarAnalysisRun"),
|
|
12010
12131
|
runId: ContractIdentifierSchema,
|
|
@@ -12014,6 +12135,8 @@ var RadarAnalysisRunSchema = z14.object({
|
|
|
12014
12135
|
executionRef: EntityRefSchema.optional(),
|
|
12015
12136
|
designProjectRef: EntityRefSchema.optional(),
|
|
12016
12137
|
replayedFromRef: EntityRefSchema.optional(),
|
|
12138
|
+
collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
|
|
12139
|
+
collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
|
|
12017
12140
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
12018
12141
|
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
12019
12142
|
createDesignProject: z14.boolean().default(true),
|
|
@@ -12736,6 +12859,7 @@ var canonicalContractSchemas = {
|
|
|
12736
12859
|
"tenant-product-config": TenantProductConfigSchema,
|
|
12737
12860
|
"tenant-runtime-config": TenantRuntimeConfigSchema,
|
|
12738
12861
|
"theme-tokens": ThemeTokensSchema,
|
|
12862
|
+
"trend-radar-collection-item": TrendRadarCollectionItemSchema,
|
|
12739
12863
|
"trend-ingest-run": TrendIngestRunSchema,
|
|
12740
12864
|
"trend-metric-snapshot": TrendMetricSnapshotSchema,
|
|
12741
12865
|
"trend-source-record": TrendSourceRecordSchema,
|
|
@@ -14682,6 +14806,7 @@ export {
|
|
|
14682
14806
|
Sha256Schema,
|
|
14683
14807
|
SourceRecordRefSchema,
|
|
14684
14808
|
StorageLocatorSchema,
|
|
14809
|
+
StudioAgentModeSchema,
|
|
14685
14810
|
TenantApplicationConfigSchema,
|
|
14686
14811
|
TenantAuthBindingSchema,
|
|
14687
14812
|
TenantAuthBindingsSchema,
|
|
@@ -14692,6 +14817,7 @@ export {
|
|
|
14692
14817
|
TenantLandingPageConfigSchema,
|
|
14693
14818
|
TenantProductConfigSchema,
|
|
14694
14819
|
TenantRuntimeConfigSchema,
|
|
14820
|
+
TenantTrendRadarCollectionTargetSchema,
|
|
14695
14821
|
TenantTrendRadarSourceSchema,
|
|
14696
14822
|
TenantTrendRadarSourcesSchema,
|
|
14697
14823
|
TenantWorkbenchConfigSchema,
|
|
@@ -14707,6 +14833,18 @@ export {
|
|
|
14707
14833
|
ToolType,
|
|
14708
14834
|
TrendIngestRunSchema,
|
|
14709
14835
|
TrendMetricSnapshotSchema,
|
|
14836
|
+
TrendRadarCollectionArtifactProjectionSchema,
|
|
14837
|
+
TrendRadarCollectionArtifactRefSchema,
|
|
14838
|
+
TrendRadarCollectionAssetRefSchema,
|
|
14839
|
+
TrendRadarCollectionDecisionAxisSchema,
|
|
14840
|
+
TrendRadarCollectionDecisionProjectionSchema,
|
|
14841
|
+
TrendRadarCollectionItemSchema,
|
|
14842
|
+
TrendRadarCollectionProjectionWritebackSchema,
|
|
14843
|
+
TrendRadarCollectionRecipeEntrySchema,
|
|
14844
|
+
TrendRadarCollectionRecipeSchema,
|
|
14845
|
+
TrendRadarCollectionRunRefSchema,
|
|
14846
|
+
TrendRadarCollectionSelectionRefSchema,
|
|
14847
|
+
TrendRadarCollectionSubjectRefSchema,
|
|
14710
14848
|
TrendSourceRecordSchema,
|
|
14711
14849
|
TrendSourceSchema,
|
|
14712
14850
|
ValidationIssueType,
|
|
@@ -14764,6 +14902,7 @@ export {
|
|
|
14764
14902
|
mergeThemeTokenDocuments,
|
|
14765
14903
|
normalizeAgentExecutionMode,
|
|
14766
14904
|
normalizeAgentMode,
|
|
14905
|
+
normalizeStudioAgentMode,
|
|
14767
14906
|
parseApplicationHandoff,
|
|
14768
14907
|
projectAgentSessionEvents,
|
|
14769
14908
|
publishOpenApiToolCapabilityManifests,
|