@openagentpack/cli 0.7.0 → 0.7.2

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/README.md CHANGED
@@ -14,9 +14,10 @@ The package installs the `agents` command.
14
14
 
15
15
  ```sh
16
16
  agents project init
17
+ cd managed-agent
17
18
  agents project validate
18
19
  agents project build --dry-run
19
- agents project build --yes
20
+ agents project build
20
21
  agents project publish --yes
21
22
  ```
22
23
 
@@ -26,6 +27,8 @@ The legacy `agents init|validate|plan|apply` YAML workflow and `agents playgroun
26
27
 
27
28
  Use `agents <command> --help` for command-specific options.
28
29
 
30
+ Init defaults to a new `managed-agent/` subdirectory under the current working directory. Use `agents project init --project .` to initialize in place or convert an existing `agents.yaml`. Other project commands continue to default to the current working directory.
31
+
29
32
  ## Documentation
30
33
 
31
34
  - [Project README](https://github.com/modelstudioai/OpenAgentPack#readme)
@@ -3,7 +3,7 @@ import {
3
3
  configureLogger,
4
4
  log,
5
5
  program
6
- } from "../chunk-C7XMIB3W.js";
6
+ } from "../chunk-XN4Y3BFX.js";
7
7
 
8
8
  // bin/agents.ts
9
9
  import { UserError } from "@openagentpack/sdk";
@@ -1459,7 +1459,7 @@ function projectRoot(options) {
1459
1459
  return options.project ?? ".";
1460
1460
  }
1461
1461
  async function projectInitCommand(options) {
1462
- const result = await initializeDirectoryProject({ projectRoot: projectRoot(options) });
1462
+ const result = await initializeDirectoryProject({ projectRoot: options.project ?? "./managed-agent" });
1463
1463
  if (options.json) return writeJson(result);
1464
1464
  log.success(
1465
1465
  result.converted_from_yaml ? "Converted agents.yaml into a directory project." : "Created directory project."
@@ -1497,16 +1497,6 @@ async function projectBuildCommand(options) {
1497
1497
  }
1498
1498
  }
1499
1499
  if (options.dryRun) return;
1500
- if (!options.yes) {
1501
- const confirmed = await prompts.confirm({
1502
- message: "Write the Build, inferred resource associations, and Vault secret references (.env)?",
1503
- output: process.stderr
1504
- });
1505
- if (prompts.isCancel(confirmed) || !confirmed) {
1506
- prompts.cancel("Build cancelled. Project files were not changed.", { output: process.stderr });
1507
- return;
1508
- }
1509
- }
1510
1500
  const result = await commitProjectBuild({
1511
1501
  projectRoot: preview.project_root,
1512
1502
  baseRevision: preview.project_revision
@@ -2382,9 +2372,13 @@ var program = new Command2().name("agents").version(readCliVersion()).descriptio
2382
2372
  program.command("init").description("Create an agents.yaml template").option("--provider <provider>", "Provider to configure (bailian, claude, qoder, ark, or all)").option("--agent-name <name>", "Name of the first Agent").action((options) => initCommand(options));
2383
2373
  program.command("playground").description("Launch a Session Preview for an agents.yaml Agent").addOption(configFileOption()).option("--agent <id>", "Agent to preview (required when the project declares multiple Agents)").option("--port <n>", "Port to serve on (default 4848)").option("--no-open", "Do not open a browser automatically").action(withResolvedConfigFile(playgroundCommand));
2384
2374
  var projectCmd = program.command("project").description("Manage a directory-based Agent project");
2385
- projectCmd.command("init").description("Create or convert a directory-based Agent project").option("--project <directory>", "Project directory", ".").option("--json", "Output as JSON").action(projectInitCommand);
2375
+ projectCmd.command("init").description("Create or convert a directory-based Agent project").option(
2376
+ "--project <directory>",
2377
+ "Project directory (use . to initialize or convert agents.yaml in place)",
2378
+ "./managed-agent"
2379
+ ).option("--json", "Output as JSON").action(projectInitCommand);
2386
2380
  projectCmd.command("validate").description("Validate all directory project source files").option("--project <directory>", "Project directory", ".").option("--json", "Output as JSON").action(projectValidateCommand);
2387
- projectCmd.command("build").description("Organize project files and generate .openagentpack/build/agents.yaml").option("--project <directory>", "Project directory", ".").option("--dry-run", "Preview Build without changing files").option("-y, --yes", "Skip confirmation prompt").option("--json", "Output as JSON").action(projectBuildCommand);
2381
+ projectCmd.command("build").description("Organize project files and generate .openagentpack/build/agents.yaml").option("--project <directory>", "Project directory", ".").option("--dry-run", "Preview Build without changing files").option("--json", "Output as JSON").action(projectBuildCommand);
2388
2382
  projectCmd.command("publish").description("Publish the current immutable Build to the configured provider").option("--project <directory>", "Project directory", ".").option("-y, --yes", "Skip confirmation prompt").option("--refresh <value>", "Refresh state before planning (true/false)", parseBooleanOption, true).option("--concurrency <n>", "Max independent resources to publish in parallel", parsePositiveInteger).addOption(providerOption("Target provider", { allowAll: true, defaultValue: "all" })).option("--json", "Output as JSON").action(projectPublishCommand);
2389
2383
  projectCmd.command("workbench").description("Launch the directory project Workbench").option("--project <directory>", "Project directory", ".").option("--port <n>", "Port to serve on (default 4848)").option("--no-open", "Do not open a browser automatically").action(projectWorkbenchCommand);
2390
2384
  var projectVersionCmd = projectCmd.command("version").description("Manage directory project snapshots");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  program
3
- } from "../chunk-C7XMIB3W.js";
3
+ } from "../chunk-XN4Y3BFX.js";
4
4
  export {
5
5
  program
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagentpack/cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Open Agent Pack — Declaratively manage AI agent infrastructure",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -49,12 +49,12 @@
49
49
  "typecheck": "tsc --noEmit"
50
50
  },
51
51
  "devDependencies": {
52
- "@openagentpack/playground": "0.7.0",
52
+ "@openagentpack/playground": "0.7.2",
53
53
  "@types/bun": "^1.3.14",
54
54
  "typescript": "^6.0.3"
55
55
  },
56
56
  "dependencies": {
57
- "@openagentpack/sdk": "0.7.0",
57
+ "@openagentpack/sdk": "0.7.2",
58
58
  "@clack/prompts": "^1.5.1",
59
59
  "chalk": "^5.6.2",
60
60
  "commander": "^14.0.3",