@takeshape/cli 11.91.0 → 11.92.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.
Files changed (2) hide show
  1. package/dist/index.js +125 -58
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -205179,7 +205179,7 @@ var engines = {
205179
205179
  };
205180
205180
  var package_default = {
205181
205181
  name: "@takeshape/cli",
205182
- version: "11.91.0",
205182
+ version: "11.92.0",
205183
205183
  description: "TakeShape CLI",
205184
205184
  homepage: "https://www.takeshape.io",
205185
205185
  repository: {
@@ -217045,7 +217045,9 @@ var builtInShapes = {
217045
217045
  chatSessionIds: { type: "object" },
217046
217046
  sessionMemory: { type: "object" },
217047
217047
  stateOutputs: { type: "object" },
217048
- currentValue: { type: "object" }
217048
+ currentValue: { type: "object" },
217049
+ userHistory: { type: "array", items: { type: "object" } },
217050
+ agentHistory: { type: "array", items: { type: "object" } }
217049
217051
  }
217050
217052
  }
217051
217053
  },
@@ -220927,11 +220929,115 @@ var experimental_default = {
220927
220929
  items: {
220928
220930
  $ref: "#/definitions/agentGuard"
220929
220931
  }
220932
+ },
220933
+ historyStrategies: {
220934
+ $ref: "#/definitions/historyStrategyMap"
220930
220935
  }
220931
220936
  },
220932
220937
  required: ["start", "states", "api"],
220933
220938
  additionalProperties: false
220934
220939
  },
220940
+ historyStrategyMap: {
220941
+ title: "History Strategy Map",
220942
+ type: "object",
220943
+ patternProperties: {
220944
+ "^[0-9A-Za-z_]+$": {
220945
+ $ref: "#/definitions/historyStrategy"
220946
+ }
220947
+ },
220948
+ additionalProperties: false
220949
+ },
220950
+ historyStrategy: {
220951
+ title: "History Strategy",
220952
+ type: "object",
220953
+ properties: {
220954
+ name: {
220955
+ type: "string"
220956
+ },
220957
+ variables: {
220958
+ title: "Variables",
220959
+ type: "array",
220960
+ items: {
220961
+ $ref: "#/definitions/agentVariable"
220962
+ }
220963
+ },
220964
+ filter: {
220965
+ $ref: "#/definitions/historyStrategyFilter"
220966
+ },
220967
+ execution: {
220968
+ $ref: "#/definitions/historyStrategyExecution"
220969
+ }
220970
+ },
220971
+ required: ["name", "execution"],
220972
+ additionalProperties: false
220973
+ },
220974
+ historyStrategyFilter: {
220975
+ title: "History Strategy Filter",
220976
+ type: "object",
220977
+ properties: {
220978
+ toolCalls: {
220979
+ enum: ["retain", "clear"]
220980
+ }
220981
+ },
220982
+ additionalProperties: false
220983
+ },
220984
+ historyStrategyExecution: {
220985
+ title: "History Strategy Execution",
220986
+ discriminator: {
220987
+ propertyName: "type"
220988
+ },
220989
+ oneOf: [
220990
+ {
220991
+ $ref: "#/definitions/historyStrategyExecutionReplace"
220992
+ },
220993
+ {
220994
+ $ref: "#/definitions/historyStrategyExecutionSummarize"
220995
+ }
220996
+ ]
220997
+ },
220998
+ historyStrategyExecutionReplace: {
220999
+ title: "History Strategy Execution Replace",
221000
+ type: "object",
221001
+ properties: {
221002
+ type: {
221003
+ enum: ["replace"]
221004
+ },
221005
+ template: {
221006
+ type: "string"
221007
+ }
221008
+ },
221009
+ required: ["type", "template"],
221010
+ additionalProperties: false
221011
+ },
221012
+ historyStrategyExecutionSummarize: {
221013
+ title: "History Strategy Execution Summarize",
221014
+ type: "object",
221015
+ properties: {
221016
+ type: {
221017
+ enum: ["generate"]
221018
+ },
221019
+ service: {
221020
+ type: "string"
221021
+ },
221022
+ model: {
221023
+ type: "string"
221024
+ },
221025
+ systemPrompt: {
221026
+ type: "string"
221027
+ },
221028
+ tools: {
221029
+ type: "array",
221030
+ items: {
221031
+ $ref: "#/definitions/agentToolConfig"
221032
+ }
221033
+ },
221034
+ options: {
221035
+ $ref: "#/definitions/agentGenerateOptions"
221036
+ }
221037
+ },
221038
+ required: ["type", "service", "model", "systemPrompt"],
221039
+ additionalProperties: false
221040
+ },
220935
221041
  tool: {
220936
221042
  title: "Tool JSON",
220937
221043
  type: "object",
@@ -221501,59 +221607,6 @@ var experimental_default = {
221501
221607
  required: ["type", "argName", "variableName"],
221502
221608
  additionalProperties: false
221503
221609
  },
221504
- agentChatHistoryConfig: {
221505
- title: "Agent Chat History Config",
221506
- discriminator: {
221507
- propertyName: "type"
221508
- },
221509
- oneOf: [
221510
- {
221511
- $ref: "#/definitions/agentChatHistoryRetain"
221512
- },
221513
- {
221514
- $ref: "#/definitions/agentChatHistorySummarize"
221515
- },
221516
- {
221517
- $ref: "#/definitions/agentChatHistoryClear"
221518
- }
221519
- ]
221520
- },
221521
- agentChatHistoryRetain: {
221522
- title: "Agent Chat History Retain",
221523
- type: "object",
221524
- properties: {
221525
- type: {
221526
- enum: ["retain"]
221527
- }
221528
- },
221529
- required: ["type"],
221530
- additionalProperties: false
221531
- },
221532
- agentChatHistorySummarize: {
221533
- title: "Agent Chat History Summarize",
221534
- type: "object",
221535
- properties: {
221536
- type: {
221537
- enum: ["summarize"]
221538
- },
221539
- toolCalls: {
221540
- enum: ["retain", "clear"]
221541
- }
221542
- },
221543
- required: ["type", "toolCalls"],
221544
- additionalProperties: false
221545
- },
221546
- agentChatHistoryClear: {
221547
- title: "Agent Chat History Clear",
221548
- type: "object",
221549
- properties: {
221550
- type: {
221551
- enum: ["clear"]
221552
- }
221553
- },
221554
- required: ["type"],
221555
- additionalProperties: false
221556
- },
221557
221610
  agentExecutionGenerate: {
221558
221611
  title: "Agent Execution Generate",
221559
221612
  type: "object",
@@ -221617,9 +221670,6 @@ var experimental_default = {
221617
221670
  $ref: "#/definitions/agentToolConfig"
221618
221671
  }
221619
221672
  },
221620
- history: {
221621
- $ref: "#/definitions/agentChatHistoryConfig"
221622
- },
221623
221673
  options: {
221624
221674
  $ref: "#/definitions/agentGenerateOptions"
221625
221675
  }
@@ -221644,6 +221694,9 @@ var experimental_default = {
221644
221694
  },
221645
221695
  limit: {
221646
221696
  type: "integer"
221697
+ },
221698
+ historyStrategy: {
221699
+ type: "string"
221647
221700
  }
221648
221701
  },
221649
221702
  additionalProperties: false,
@@ -383555,6 +383608,20 @@ function validateAgents(projectSchema) {
383555
383608
  })));
383556
383609
  }
383557
383610
  }
383611
+ if (agent.historyStrategies) {
383612
+ const seenStrategyNames = /* @__PURE__ */ new Set();
383613
+ for (const [historyStrategyId, historyStrategy] of Object.entries(agent.historyStrategies)) {
383614
+ if (seenStrategyNames.has(historyStrategy.name)) {
383615
+ errors.push({
383616
+ path: [...agentPath, "historyStrategies", historyStrategyId, "name"],
383617
+ type: "conflict",
383618
+ message: `Duplicate history strategy name "${historyStrategy.name}"`
383619
+ });
383620
+ } else {
383621
+ seenStrategyNames.add(historyStrategy.name);
383622
+ }
383623
+ }
383624
+ }
383558
383625
  }
383559
383626
  return errors;
383560
383627
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/cli",
3
- "version": "11.91.0",
3
+ "version": "11.92.0",
4
4
  "description": "TakeShape CLI",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -70,11 +70,11 @@
70
70
  "stream-to-promise": "^2.2.0",
71
71
  "tmp": "^0.0.33",
72
72
  "unzipper": "^0.10.11",
73
- "@takeshape/branches": "11.91.0",
74
- "@takeshape/schema": "11.91.0",
75
- "@takeshape/ssg": "11.91.0",
76
- "@takeshape/streams": "11.91.0",
77
- "@takeshape/util": "11.91.0"
73
+ "@takeshape/branches": "11.92.0",
74
+ "@takeshape/ssg": "11.92.0",
75
+ "@takeshape/streams": "11.92.0",
76
+ "@takeshape/schema": "11.92.0",
77
+ "@takeshape/util": "11.92.0"
78
78
  },
79
79
  "engines": {
80
80
  "node": ">=20"