From 77a11fc90a11081a7b16b82134b02b584252adde Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 3 Dec 2024 14:52:40 -0700 Subject: [PATCH] fix: update agent lib, update enums, update spec file schema --- package.json | 2 +- src/commands/agent/generate/spec.ts | 7 +++++-- yarn.lock | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 122f184..ce8bb49 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@inquirer/input": "^4.0.1", "@inquirer/select": "^4.0.1", "@oclif/core": "^4", - "@salesforce/agents": "^0.2.3", + "@salesforce/agents": "^0.2.4", "@oclif/multi-stage-output": "^0.7.12", "@salesforce/core": "^8.5.2", "@salesforce/kit": "^3.2.1", diff --git a/src/commands/agent/generate/spec.ts b/src/commands/agent/generate/spec.ts index 93191fb..e26ebae 100644 --- a/src/commands/agent/generate/spec.ts +++ b/src/commands/agent/generate/spec.ts @@ -44,7 +44,7 @@ const FLAGGABLE_PROMPTS = { message: messages.getMessage('flags.type.summary'), validate: (d: string): boolean | string => d.length > 0 || 'Type cannot be empty', char: 't', - options: ['customer_facing', 'employee_facing'], + options: ['customer', 'internal'], required: true, }, role: { @@ -167,7 +167,10 @@ export default class AgentCreateSpec extends SfCommand { // Write a file with the returned job specs const filePath = join(flags['output-dir'], flags['file-name']); - writeFileSync(filePath, JSON.stringify(agentSpec, null, 4)); + writeFileSync( + filePath, + JSON.stringify({ type, role, companyName, companyDescription, companyWebsite, JobSpec: agentSpec }, null, 4) + ); this.spinner.stop(); diff --git a/yarn.lock b/yarn.lock index 9d70f48..20356f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1365,10 +1365,10 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@salesforce/agents@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.2.3.tgz#a35a0220364ace2749ede302497379416729e5c6" - integrity sha512-cc8TmzxpWXtb9FI6uTQoimvyZTq0ZiTgXu3XcjBzOYwbJOPXEEOV1mvGRJMy4/acGqgNz4e3lXd9Ni22lcuBNw== +"@salesforce/agents@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.2.4.tgz#df599a7fd69535f30afa1012d0b89fa90edd42af" + integrity sha512-ntJqXhIDG1YsS8qfjEnd4m7CIuZF9VAqkv44FL5Fdslh1vNRwiCA21JJtk1+hZk3EN+JHI/NyZEBYtqckv1fHg== dependencies: "@oclif/table" "^0.3.3" "@salesforce/core" "^8.8.0"