@orchagent/cli 0.3.76 → 0.3.77
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/dist/commands/publish.js +14 -0
- package/dist/commands/service.js +7 -0
- package/package.json +1 -1
package/dist/commands/publish.js
CHANGED
|
@@ -360,6 +360,7 @@ function registerPublishCommand(program) {
|
|
|
360
360
|
.option('--skills-locked', 'Lock default skills (callers cannot override via headers)')
|
|
361
361
|
.option('--docker', 'Include Dockerfile for custom environment (builds E2B template)')
|
|
362
362
|
.option('--local-download', 'Allow users to download and run locally (default: server-only)')
|
|
363
|
+
.option('--no-required-secrets', 'Skip required_secrets check for tool/agent types')
|
|
363
364
|
.action(async (options) => {
|
|
364
365
|
const skillsFromFlag = options.skills
|
|
365
366
|
? options.skills.split(',').map(s => s.trim()).filter(Boolean)
|
|
@@ -820,6 +821,19 @@ function registerPublishCommand(program) {
|
|
|
820
821
|
` (Platform-injected vars like LLM API keys are already excluded.)\n\n`);
|
|
821
822
|
}
|
|
822
823
|
}
|
|
824
|
+
// C-1: Block publish if tool/agent type has no required_secrets declared.
|
|
825
|
+
// Prompt and skill types are exempt (prompt agents get LLM keys from platform,
|
|
826
|
+
// skills don't run standalone).
|
|
827
|
+
if ((canonicalType === 'tool' || canonicalType === 'agent') &&
|
|
828
|
+
(!manifest.required_secrets || manifest.required_secrets.length === 0) &&
|
|
829
|
+
options.requiredSecrets !== false) {
|
|
830
|
+
process.stderr.write(chalk_1.default.red(`\nError: ${canonicalType} agents must declare required_secrets in orchagent.json.\n\n`) +
|
|
831
|
+
` Add the env vars your code needs at runtime:\n` +
|
|
832
|
+
` ${chalk_1.default.cyan('"required_secrets": ["ANTHROPIC_API_KEY", "MY_TOKEN"]')}\n\n` +
|
|
833
|
+
` These are matched by name against your workspace secrets vault.\n` +
|
|
834
|
+
` Use ${chalk_1.default.cyan('--no-required-secrets')} to skip this check.\n`);
|
|
835
|
+
throw new errors_1.CliError('Missing required_secrets declaration', errors_1.ExitCodes.INVALID_INPUT);
|
|
836
|
+
}
|
|
823
837
|
// Create the agent (server auto-assigns version)
|
|
824
838
|
let result;
|
|
825
839
|
try {
|
package/dist/commands/service.js
CHANGED
|
@@ -147,6 +147,13 @@ function registerServiceCommand(program) {
|
|
|
147
147
|
spinner.fail('Failed to resolve agent');
|
|
148
148
|
throw e;
|
|
149
149
|
}
|
|
150
|
+
// C-2: Show deprecation notice when --secret is used
|
|
151
|
+
if (options.secret.length > 0) {
|
|
152
|
+
process.stderr.write(chalk_1.default.yellow(`\nTip: `) +
|
|
153
|
+
`Declare secrets in orchagent.json ${chalk_1.default.cyan('required_secrets')} instead.\n` +
|
|
154
|
+
`They'll be auto-injected from your workspace vault at deploy time.\n` +
|
|
155
|
+
`The ${chalk_1.default.cyan('--secret')} flag is for extras not declared on the agent.\n\n`);
|
|
156
|
+
}
|
|
150
157
|
const deploySpinner = (0, spinner_1.createSpinner)('Deploying service...');
|
|
151
158
|
deploySpinner.start();
|
|
152
159
|
try {
|
package/package.json
CHANGED