@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.
Files changed (41) hide show
  1. package/lib/contracts/agent.d.ts +36 -27
  2. package/lib/contracts/agent.d.ts.map +1 -1
  3. package/lib/contracts/agent.js +18 -14
  4. package/lib/contracts/agent.js.map +1 -1
  5. package/lib/contracts/menu.d.ts +1 -1
  6. package/lib/contracts/page.d.ts +3 -3
  7. package/lib/contracts/semantic.d.ts +2 -2
  8. package/lib/contracts/tenant.d.ts +41 -6
  9. package/lib/contracts/tenant.d.ts.map +1 -1
  10. package/lib/contracts/tenant.js +10 -2
  11. package/lib/contracts/tenant.js.map +1 -1
  12. package/lib/contracts/trend.d.ts +259 -0
  13. package/lib/contracts/trend.d.ts.map +1 -1
  14. package/lib/contracts/trend.js +146 -1
  15. package/lib/contracts/trend.js.map +1 -1
  16. package/lib/esm/contracts/index.mjs +149 -11
  17. package/lib/esm/contracts/index.mjs.map +1 -1
  18. package/lib/esm/index.mjs +150 -11
  19. package/lib/esm/index.mjs.map +1 -1
  20. package/lib/esm/runtime/index.mjs +12 -6
  21. package/lib/esm/runtime/index.mjs.map +1 -1
  22. package/lib/esm/schemas/index.mjs +145 -6
  23. package/lib/esm/schemas/index.mjs.map +1 -1
  24. package/lib/json-schema/agent-session-view-model.schema.json +2 -2
  25. package/lib/json-schema/agent-workbench-composer-view-model.schema.json +4 -4
  26. package/lib/json-schema/agent-workbench-navigation-view-model.schema.json +2 -2
  27. package/lib/json-schema/index.json +1 -0
  28. package/lib/json-schema/radar-analysis-detail.schema.json +83 -0
  29. package/lib/json-schema/radar-analysis-run.schema.json +83 -0
  30. package/lib/json-schema/tenant-product-config.schema.json +34 -0
  31. package/lib/json-schema/tenant-runtime-config.schema.json +34 -0
  32. package/lib/json-schema/trend-radar-collection-item.schema.json +524 -0
  33. package/lib/schemas/index.d.ts +159 -17
  34. package/lib/schemas/index.d.ts.map +1 -1
  35. package/lib/schemas/index.js +22 -4
  36. package/lib/schemas/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/test/fixtures/{agent-session-chatbot.json → agent-session-chat.json} +22 -22
  39. package/test/fixtures/agent-session-kernel.json +1 -1
  40. package/test/fixtures/agent-session-scenarios.json +6 -6
  41. package/test/fixtures/{agent-session-agent.json → agent-session-work.json} +1 -1
@@ -6652,7 +6652,8 @@ var OutputRecordSchema = z2.object({
6652
6652
 
6653
6653
  // src/contracts/agent.ts
6654
6654
  import { z as z3 } from "zod";
6655
- var AgentModeSchema = z3.enum(["chatbot", "agent"]);
6655
+ var StudioAgentModeSchema = z3.enum(["chat", "work"]);
6656
+ var AgentModeSchema = StudioAgentModeSchema;
6656
6657
  var AgentConfigurationCapabilitySchema = z3.enum([
6657
6658
  "models",
6658
6659
  "skills",
@@ -6671,14 +6672,14 @@ var AgentResourceModeSupportSchema = z3.object({
6671
6672
  modes: z3.array(AgentModeSchema).min(1)
6672
6673
  }).strict();
6673
6674
  var AGENT_MODE_CAPABILITIES = Object.freeze({
6674
- chatbot: AgentModeCapabilitiesSchema.parse({
6675
+ chat: AgentModeCapabilitiesSchema.parse({
6675
6676
  models: true,
6676
6677
  skills: true,
6677
6678
  tools: true,
6678
6679
  mcp: true,
6679
6680
  reasoning: false
6680
6681
  }),
6681
- agent: AgentModeCapabilitiesSchema.parse({
6682
+ work: AgentModeCapabilitiesSchema.parse({
6682
6683
  models: true,
6683
6684
  skills: true,
6684
6685
  tools: true,
@@ -6747,8 +6748,8 @@ var AgentSessionPermissionProfileSchema = z3.enum([
6747
6748
  "full-access"
6748
6749
  ]);
6749
6750
  var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
6750
- chatbot: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
6751
- agent: 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 })
6751
+ chat: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
6752
+ 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 })
6752
6753
  });
6753
6754
  function getAgentSessionRuntimeCapabilities(mode) {
6754
6755
  return AGENT_SESSION_RUNTIME_CAPABILITIES[mode];
@@ -7585,15 +7586,16 @@ var AgentWorkbenchComposerViewModelSchema = z3.object({
7585
7586
  }
7586
7587
  });
7587
7588
  var AgentExecutionModeSchema = AgentModeSchema;
7588
- function normalizeAgentMode(value) {
7589
+ function normalizeStudioAgentMode(value) {
7589
7590
  const normalized = String(value ?? "").trim().toLowerCase();
7590
- if (normalized === "agent" || normalized === "codex") return "agent";
7591
- if (normalized === "chatbot" || normalized === "vercel-ai" || normalized === "vercel" || normalized === "ai-sdk") {
7592
- return "chatbot";
7591
+ if (normalized === "work" || normalized === "agent" || normalized === "codex") return "work";
7592
+ if (normalized === "chat" || normalized === "chatbot" || normalized === "vercel-ai" || normalized === "vercel" || normalized === "ai-sdk") {
7593
+ return "chat";
7593
7594
  }
7594
7595
  return void 0;
7595
7596
  }
7596
- var normalizeAgentExecutionMode = normalizeAgentMode;
7597
+ var normalizeAgentMode = normalizeStudioAgentMode;
7598
+ var normalizeAgentExecutionMode = normalizeStudioAgentMode;
7597
7599
 
7598
7600
  // src/contracts/capability.ts
7599
7601
  import { z as z5 } from "zod";
@@ -11211,9 +11213,14 @@ var TenantTrendRadarSourceSchema = z13.object({
11211
11213
  ontologyId: ContractIdentifierSchema,
11212
11214
  viewId: ContractIdentifierSchema
11213
11215
  }).strict();
11216
+ var TenantTrendRadarCollectionTargetSchema = z13.object({
11217
+ ontologyId: ContractIdentifierSchema
11218
+ }).strict();
11214
11219
  var TenantTrendRadarSourcesSchema = z13.object({
11220
+ products: TenantTrendRadarSourceSchema.optional(),
11215
11221
  hotwords: TenantTrendRadarSourceSchema.optional(),
11216
- brands: TenantTrendRadarSourceSchema.optional()
11222
+ brands: TenantTrendRadarSourceSchema.optional(),
11223
+ collection: TenantTrendRadarCollectionTargetSchema.optional()
11217
11224
  }).strict();
11218
11225
  var AssetVariantsSchema = z13.object({
11219
11226
  light: z13.string().optional(),
@@ -11935,6 +11942,120 @@ var RadarSelectionSchema = z14.object({
11935
11942
  expectedVersion: z14.number().int().nonnegative(),
11936
11943
  updatedAt: IsoDateTimeSchema
11937
11944
  }).strict();
11945
+ var versionedRefFields = {
11946
+ id: ContractIdentifierSchema,
11947
+ version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
11948
+ ownerRepo: ContractIdentifierSchema.optional()
11949
+ };
11950
+ var TrendRadarCollectionAssetRefSchema = z14.object({
11951
+ kind: z14.literal("asset"),
11952
+ ...versionedRefFields
11953
+ }).strict();
11954
+ var TrendRadarCollectionSelectionRefSchema = z14.object({
11955
+ kind: z14.literal("radar-selection"),
11956
+ ...versionedRefFields
11957
+ }).strict();
11958
+ var TrendRadarCollectionRunRefSchema = z14.object({
11959
+ kind: z14.literal("radar-analysis-run"),
11960
+ ...versionedRefFields
11961
+ }).strict();
11962
+ var TrendRadarCollectionSubjectRefSchema = z14.object({
11963
+ kind: z14.literal("hotword"),
11964
+ ...versionedRefFields
11965
+ }).strict();
11966
+ var TrendRadarCollectionArtifactRefSchema = z14.object({
11967
+ kind: z14.literal("artifact"),
11968
+ ...versionedRefFields
11969
+ }).strict();
11970
+ var TrendRadarCollectionRecipeEntrySchema = z14.object({
11971
+ subjectRef: TrendRadarCollectionSubjectRefSchema,
11972
+ label: z14.string().trim().min(1).max(200)
11973
+ }).strict();
11974
+ var TrendRadarCollectionRecipeSchema = z14.object({
11975
+ category: z14.array(TrendRadarCollectionRecipeEntrySchema),
11976
+ design: z14.array(TrendRadarCollectionRecipeEntrySchema),
11977
+ audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
11978
+ }).strict().refine(
11979
+ (recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
11980
+ "A Trend Radar collection recipe must contain at least one subject."
11981
+ );
11982
+ var TrendRadarCollectionDecisionAxisSchema = z14.object({
11983
+ key: ContractIdentifierSchema,
11984
+ label: z14.string().trim().min(1).max(200).optional(),
11985
+ value: z14.number().finite()
11986
+ }).strict();
11987
+ var TrendRadarCollectionDecisionProjectionSchema = z14.object({
11988
+ axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
11989
+ overallScore: z14.number().finite().optional(),
11990
+ itemRank: z14.number().finite().optional(),
11991
+ sourceRefs: z14.array(EntityRefSchema).optional(),
11992
+ outputRefs: z14.array(EntityRefSchema).optional()
11993
+ }).strict().superRefine((projection, context) => {
11994
+ const hasProjection = Boolean(
11995
+ projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
11996
+ );
11997
+ if (!hasProjection) {
11998
+ context.addIssue({
11999
+ code: "custom",
12000
+ message: "A decision projection must contain canonical decision data or references."
12001
+ });
12002
+ }
12003
+ const seenAxisKeys = /* @__PURE__ */ new Set();
12004
+ projection.axes?.forEach((axis, index) => {
12005
+ if (seenAxisKeys.has(axis.key)) {
12006
+ context.addIssue({
12007
+ code: "custom",
12008
+ path: ["axes", index, "key"],
12009
+ message: `Duplicate decision axis key: ${axis.key}`
12010
+ });
12011
+ }
12012
+ seenAxisKeys.add(axis.key);
12013
+ });
12014
+ });
12015
+ var TrendRadarCollectionArtifactProjectionSchema = z14.object({
12016
+ artifactRef: TrendRadarCollectionArtifactRefSchema,
12017
+ url: z14.string().url().optional(),
12018
+ thumbnailUrl: z14.string().url().optional(),
12019
+ mimeType: z14.string().trim().min(1).optional(),
12020
+ metadata: JsonObjectSchema.optional()
12021
+ }).strict();
12022
+ var TrendRadarCollectionProjectionWritebackSchema = z14.object({
12023
+ status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
12024
+ updatedAt: IsoDateTimeSchema,
12025
+ error: z14.object({
12026
+ code: ContractIdentifierSchema,
12027
+ message: z14.string().trim().min(1),
12028
+ retryable: z14.boolean()
12029
+ }).strict().optional()
12030
+ }).strict().superRefine((writeback, context) => {
12031
+ if (writeback.status === "FAILED" && !writeback.error) {
12032
+ context.addIssue({
12033
+ code: "custom",
12034
+ path: ["error"],
12035
+ message: "A failed collection projection writeback must include an error."
12036
+ });
12037
+ }
12038
+ if (writeback.status !== "FAILED" && writeback.error) {
12039
+ context.addIssue({
12040
+ code: "custom",
12041
+ path: ["error"],
12042
+ message: "Only a failed collection projection writeback may include an error."
12043
+ });
12044
+ }
12045
+ });
12046
+ var TrendRadarCollectionItemSchema = z14.object({
12047
+ contract: z14.literal("TrendRadarCollectionItem"),
12048
+ schemaVersion: z14.literal(1),
12049
+ selectionRef: TrendRadarCollectionSelectionRefSchema,
12050
+ recipe: TrendRadarCollectionRecipeSchema,
12051
+ status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
12052
+ latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
12053
+ decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
12054
+ artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
12055
+ createdAt: IsoDateTimeSchema,
12056
+ updatedAt: IsoDateTimeSchema,
12057
+ generatedAt: IsoDateTimeSchema.optional()
12058
+ }).strict();
11938
12059
  var RadarAnalysisRunSchema = z14.object({
11939
12060
  contract: z14.literal("RadarAnalysisRun"),
11940
12061
  runId: ContractIdentifierSchema,
@@ -11944,6 +12065,8 @@ var RadarAnalysisRunSchema = z14.object({
11944
12065
  executionRef: EntityRefSchema.optional(),
11945
12066
  designProjectRef: EntityRefSchema.optional(),
11946
12067
  replayedFromRef: EntityRefSchema.optional(),
12068
+ collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
12069
+ collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
11947
12070
  workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
11948
12071
  workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
11949
12072
  createDesignProject: z14.boolean().default(true),
@@ -12790,6 +12913,7 @@ export {
12790
12913
  Sha256Schema,
12791
12914
  SourceRecordRefSchema,
12792
12915
  StorageLocatorSchema,
12916
+ StudioAgentModeSchema,
12793
12917
  TenantApplicationConfigSchema,
12794
12918
  TenantAuthBindingSchema,
12795
12919
  TenantAuthBindingsSchema,
@@ -12800,6 +12924,7 @@ export {
12800
12924
  TenantLandingPageConfigSchema,
12801
12925
  TenantProductConfigSchema,
12802
12926
  TenantRuntimeConfigSchema,
12927
+ TenantTrendRadarCollectionTargetSchema,
12803
12928
  TenantTrendRadarSourceSchema,
12804
12929
  TenantTrendRadarSourcesSchema,
12805
12930
  TenantWorkbenchConfigSchema,
@@ -12813,6 +12938,18 @@ export {
12813
12938
  ThemeTokensSchema,
12814
12939
  TrendIngestRunSchema,
12815
12940
  TrendMetricSnapshotSchema,
12941
+ TrendRadarCollectionArtifactProjectionSchema,
12942
+ TrendRadarCollectionArtifactRefSchema,
12943
+ TrendRadarCollectionAssetRefSchema,
12944
+ TrendRadarCollectionDecisionAxisSchema,
12945
+ TrendRadarCollectionDecisionProjectionSchema,
12946
+ TrendRadarCollectionItemSchema,
12947
+ TrendRadarCollectionProjectionWritebackSchema,
12948
+ TrendRadarCollectionRecipeEntrySchema,
12949
+ TrendRadarCollectionRecipeSchema,
12950
+ TrendRadarCollectionRunRefSchema,
12951
+ TrendRadarCollectionSelectionRefSchema,
12952
+ TrendRadarCollectionSubjectRefSchema,
12816
12953
  TrendSourceRecordSchema,
12817
12954
  TrendSourceSchema,
12818
12955
  ViewProviderDescriptorSchema,
@@ -12839,6 +12976,7 @@ export {
12839
12976
  isAgentSessionTerminalStatus,
12840
12977
  normalizeAgentExecutionMode,
12841
12978
  normalizeAgentMode,
12979
+ normalizeStudioAgentMode,
12842
12980
  resolveAgentSessionCommandTransition
12843
12981
  };
12844
12982
  //# sourceMappingURL=index.mjs.map