@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
@@ -7091,7 +7091,8 @@ var CapabilityRegistryDocumentSchema = z4.object({
7091
7091
 
7092
7092
  // src/contracts/agent.ts
7093
7093
  import { z as z5 } from "zod";
7094
- var AgentModeSchema = z5.enum(["chatbot", "agent"]);
7094
+ var StudioAgentModeSchema = z5.enum(["chat", "work"]);
7095
+ var AgentModeSchema = StudioAgentModeSchema;
7095
7096
  var AgentConfigurationCapabilitySchema = z5.enum([
7096
7097
  "models",
7097
7098
  "skills",
@@ -7110,14 +7111,14 @@ var AgentResourceModeSupportSchema = z5.object({
7110
7111
  modes: z5.array(AgentModeSchema).min(1)
7111
7112
  }).strict();
7112
7113
  var AGENT_MODE_CAPABILITIES = Object.freeze({
7113
- chatbot: AgentModeCapabilitiesSchema.parse({
7114
+ chat: AgentModeCapabilitiesSchema.parse({
7114
7115
  models: true,
7115
7116
  skills: true,
7116
7117
  tools: true,
7117
7118
  mcp: true,
7118
7119
  reasoning: false
7119
7120
  }),
7120
- agent: AgentModeCapabilitiesSchema.parse({
7121
+ work: AgentModeCapabilitiesSchema.parse({
7121
7122
  models: true,
7122
7123
  skills: true,
7123
7124
  tools: true,
@@ -7177,8 +7178,8 @@ var AgentSessionPermissionProfileSchema = z5.enum([
7177
7178
  "full-access"
7178
7179
  ]);
7179
7180
  var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
7180
- chatbot: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
7181
- 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 })
7181
+ chat: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
7182
+ 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 })
7182
7183
  });
7183
7184
  var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
7184
7185
  text: { eventTypes: ["message"], commandTypes: [] },
@@ -11148,9 +11149,14 @@ var TenantTrendRadarSourceSchema = z13.object({
11148
11149
  ontologyId: ContractIdentifierSchema,
11149
11150
  viewId: ContractIdentifierSchema
11150
11151
  }).strict();
11152
+ var TenantTrendRadarCollectionTargetSchema = z13.object({
11153
+ ontologyId: ContractIdentifierSchema
11154
+ }).strict();
11151
11155
  var TenantTrendRadarSourcesSchema = z13.object({
11156
+ products: TenantTrendRadarSourceSchema.optional(),
11152
11157
  hotwords: TenantTrendRadarSourceSchema.optional(),
11153
- brands: TenantTrendRadarSourceSchema.optional()
11158
+ brands: TenantTrendRadarSourceSchema.optional(),
11159
+ collection: TenantTrendRadarCollectionTargetSchema.optional()
11154
11160
  }).strict();
11155
11161
  var AssetVariantsSchema = z13.object({
11156
11162
  light: z13.string().optional(),
@@ -11872,6 +11878,120 @@ var RadarSelectionSchema = z14.object({
11872
11878
  expectedVersion: z14.number().int().nonnegative(),
11873
11879
  updatedAt: IsoDateTimeSchema
11874
11880
  }).strict();
11881
+ var versionedRefFields = {
11882
+ id: ContractIdentifierSchema,
11883
+ version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
11884
+ ownerRepo: ContractIdentifierSchema.optional()
11885
+ };
11886
+ var TrendRadarCollectionAssetRefSchema = z14.object({
11887
+ kind: z14.literal("asset"),
11888
+ ...versionedRefFields
11889
+ }).strict();
11890
+ var TrendRadarCollectionSelectionRefSchema = z14.object({
11891
+ kind: z14.literal("radar-selection"),
11892
+ ...versionedRefFields
11893
+ }).strict();
11894
+ var TrendRadarCollectionRunRefSchema = z14.object({
11895
+ kind: z14.literal("radar-analysis-run"),
11896
+ ...versionedRefFields
11897
+ }).strict();
11898
+ var TrendRadarCollectionSubjectRefSchema = z14.object({
11899
+ kind: z14.literal("hotword"),
11900
+ ...versionedRefFields
11901
+ }).strict();
11902
+ var TrendRadarCollectionArtifactRefSchema = z14.object({
11903
+ kind: z14.literal("artifact"),
11904
+ ...versionedRefFields
11905
+ }).strict();
11906
+ var TrendRadarCollectionRecipeEntrySchema = z14.object({
11907
+ subjectRef: TrendRadarCollectionSubjectRefSchema,
11908
+ label: z14.string().trim().min(1).max(200)
11909
+ }).strict();
11910
+ var TrendRadarCollectionRecipeSchema = z14.object({
11911
+ category: z14.array(TrendRadarCollectionRecipeEntrySchema),
11912
+ design: z14.array(TrendRadarCollectionRecipeEntrySchema),
11913
+ audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
11914
+ }).strict().refine(
11915
+ (recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
11916
+ "A Trend Radar collection recipe must contain at least one subject."
11917
+ );
11918
+ var TrendRadarCollectionDecisionAxisSchema = z14.object({
11919
+ key: ContractIdentifierSchema,
11920
+ label: z14.string().trim().min(1).max(200).optional(),
11921
+ value: z14.number().finite()
11922
+ }).strict();
11923
+ var TrendRadarCollectionDecisionProjectionSchema = z14.object({
11924
+ axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
11925
+ overallScore: z14.number().finite().optional(),
11926
+ itemRank: z14.number().finite().optional(),
11927
+ sourceRefs: z14.array(EntityRefSchema).optional(),
11928
+ outputRefs: z14.array(EntityRefSchema).optional()
11929
+ }).strict().superRefine((projection, context) => {
11930
+ const hasProjection = Boolean(
11931
+ projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
11932
+ );
11933
+ if (!hasProjection) {
11934
+ context.addIssue({
11935
+ code: "custom",
11936
+ message: "A decision projection must contain canonical decision data or references."
11937
+ });
11938
+ }
11939
+ const seenAxisKeys = /* @__PURE__ */ new Set();
11940
+ projection.axes?.forEach((axis, index) => {
11941
+ if (seenAxisKeys.has(axis.key)) {
11942
+ context.addIssue({
11943
+ code: "custom",
11944
+ path: ["axes", index, "key"],
11945
+ message: `Duplicate decision axis key: ${axis.key}`
11946
+ });
11947
+ }
11948
+ seenAxisKeys.add(axis.key);
11949
+ });
11950
+ });
11951
+ var TrendRadarCollectionArtifactProjectionSchema = z14.object({
11952
+ artifactRef: TrendRadarCollectionArtifactRefSchema,
11953
+ url: z14.string().url().optional(),
11954
+ thumbnailUrl: z14.string().url().optional(),
11955
+ mimeType: z14.string().trim().min(1).optional(),
11956
+ metadata: JsonObjectSchema.optional()
11957
+ }).strict();
11958
+ var TrendRadarCollectionProjectionWritebackSchema = z14.object({
11959
+ status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
11960
+ updatedAt: IsoDateTimeSchema,
11961
+ error: z14.object({
11962
+ code: ContractIdentifierSchema,
11963
+ message: z14.string().trim().min(1),
11964
+ retryable: z14.boolean()
11965
+ }).strict().optional()
11966
+ }).strict().superRefine((writeback, context) => {
11967
+ if (writeback.status === "FAILED" && !writeback.error) {
11968
+ context.addIssue({
11969
+ code: "custom",
11970
+ path: ["error"],
11971
+ message: "A failed collection projection writeback must include an error."
11972
+ });
11973
+ }
11974
+ if (writeback.status !== "FAILED" && writeback.error) {
11975
+ context.addIssue({
11976
+ code: "custom",
11977
+ path: ["error"],
11978
+ message: "Only a failed collection projection writeback may include an error."
11979
+ });
11980
+ }
11981
+ });
11982
+ var TrendRadarCollectionItemSchema = z14.object({
11983
+ contract: z14.literal("TrendRadarCollectionItem"),
11984
+ schemaVersion: z14.literal(1),
11985
+ selectionRef: TrendRadarCollectionSelectionRefSchema,
11986
+ recipe: TrendRadarCollectionRecipeSchema,
11987
+ status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
11988
+ latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
11989
+ decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
11990
+ artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
11991
+ createdAt: IsoDateTimeSchema,
11992
+ updatedAt: IsoDateTimeSchema,
11993
+ generatedAt: IsoDateTimeSchema.optional()
11994
+ }).strict();
11875
11995
  var RadarAnalysisRunSchema = z14.object({
11876
11996
  contract: z14.literal("RadarAnalysisRun"),
11877
11997
  runId: ContractIdentifierSchema,
@@ -11881,6 +12001,8 @@ var RadarAnalysisRunSchema = z14.object({
11881
12001
  executionRef: EntityRefSchema.optional(),
11882
12002
  designProjectRef: EntityRefSchema.optional(),
11883
12003
  replayedFromRef: EntityRefSchema.optional(),
12004
+ collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
12005
+ collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
11884
12006
  workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
11885
12007
  workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
11886
12008
  createDesignProject: z14.boolean().default(true),
@@ -12603,6 +12725,7 @@ var canonicalContractSchemas = {
12603
12725
  "tenant-product-config": TenantProductConfigSchema,
12604
12726
  "tenant-runtime-config": TenantRuntimeConfigSchema,
12605
12727
  "theme-tokens": ThemeTokensSchema,
12728
+ "trend-radar-collection-item": TrendRadarCollectionItemSchema,
12606
12729
  "trend-ingest-run": TrendIngestRunSchema,
12607
12730
  "trend-metric-snapshot": TrendMetricSnapshotSchema,
12608
12731
  "trend-source-record": TrendSourceRecordSchema,
@@ -12770,10 +12893,14 @@ export {
12770
12893
  SavedRadarQuerySchema,
12771
12894
  SourceRecordRefSchema,
12772
12895
  StorageLocatorSchema,
12896
+ StudioAgentModeSchema,
12773
12897
  TenantApplicationConfigSchema,
12774
12898
  TenantLandingPageConfigSchema,
12775
12899
  TenantProductConfigSchema,
12776
12900
  TenantRuntimeConfigSchema,
12901
+ TenantTrendRadarCollectionTargetSchema,
12902
+ TenantTrendRadarSourceSchema,
12903
+ TenantTrendRadarSourcesSchema,
12777
12904
  TenantWorkbenchConfigSchema,
12778
12905
  TenantWorkbenchPageContextSchema,
12779
12906
  TenantWorkbenchPageEnvelopeSchema,
@@ -12784,6 +12911,18 @@ export {
12784
12911
  ThemeTokensSchema,
12785
12912
  TrendIngestRunSchema,
12786
12913
  TrendMetricSnapshotSchema,
12914
+ TrendRadarCollectionArtifactProjectionSchema,
12915
+ TrendRadarCollectionArtifactRefSchema,
12916
+ TrendRadarCollectionAssetRefSchema,
12917
+ TrendRadarCollectionDecisionAxisSchema,
12918
+ TrendRadarCollectionDecisionProjectionSchema,
12919
+ TrendRadarCollectionItemSchema,
12920
+ TrendRadarCollectionProjectionWritebackSchema,
12921
+ TrendRadarCollectionRecipeEntrySchema,
12922
+ TrendRadarCollectionRecipeSchema,
12923
+ TrendRadarCollectionRunRefSchema,
12924
+ TrendRadarCollectionSelectionRefSchema,
12925
+ TrendRadarCollectionSubjectRefSchema,
12787
12926
  TrendSourceRecordSchema,
12788
12927
  TrendSourceSchema,
12789
12928
  ViewProviderDescriptorSchema,