@doubao-dev/cli 0.0.32 → 0.0.33

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 (92) hide show
  1. package/dist/2168.js +16 -16
  2. package/dist/275.js +12 -14
  3. package/dist/2932.js +1 -1
  4. package/dist/318.js +1 -1
  5. package/dist/3974.js +22 -22
  6. package/dist/4525.js +1 -1
  7. package/dist/4880.js +1 -1
  8. package/dist/4931.js +2 -2
  9. package/dist/7410.js +1 -1
  10. package/dist/7417.js +204 -0
  11. package/dist/7417.js.LICENSE.txt +107 -0
  12. package/dist/7945.js +1 -0
  13. package/dist/8079.js +126 -0
  14. package/dist/{1560.js → 9091.js} +2 -2
  15. package/dist/9667.js +78 -0
  16. package/dist/{8891.js.LICENSE.txt → 9667.js.LICENSE.txt} +0 -108
  17. package/dist/@byted-doubao-apps/create.js +1 -1
  18. package/dist/@byted-doubao-apps/kit.js +1 -0
  19. package/dist/@byted-doubao-apps/login.js +1 -1
  20. package/dist/@byted-doubao-apps/login~1.js +1 -1
  21. package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
  22. package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
  23. package/dist/@byted-hdt/cli.js +1 -1
  24. package/dist/@inquirer/select.js +1 -1
  25. package/dist/app.js +1 -1
  26. package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
  27. package/dist/assets/web-sdk-debugger/index.html +1 -1
  28. package/dist/assets/web-sdk-debugger/static/js/index.d1bb36b355.js +44 -0
  29. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
  30. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
  31. package/dist/build.js +1 -1
  32. package/dist/build~1.js +6 -6
  33. package/dist/check.js +1 -1
  34. package/dist/demo-server.js +1 -1
  35. package/dist/dev-config.js +1 -1
  36. package/dist/dev-shell.js +1 -1
  37. package/dist/dev.js +10 -10
  38. package/dist/devtools.js +1 -1
  39. package/dist/gen-explore.js +1 -1
  40. package/dist/gen-trajectory.js +1 -1
  41. package/dist/init.js +4 -4
  42. package/dist/ink.js +1 -1
  43. package/dist/inquirer.js +1 -0
  44. package/dist/json-file.js +1 -1
  45. package/dist/kit-dev-options.js +1 -1
  46. package/dist/legacy-upload.js +1 -1
  47. package/dist/lepus.js +1 -1
  48. package/dist/ora.js +1 -1
  49. package/dist/project-layout.js +1 -1
  50. package/dist/prompt.js +1 -1
  51. package/dist/prompts.js +1 -1
  52. package/dist/report.js +1 -1
  53. package/dist/run-registry.js +1 -1
  54. package/dist/run.js +44 -44
  55. package/dist/sandbox.js +1 -1
  56. package/dist/scan.js +1 -1
  57. package/dist/sdk.js +63 -188
  58. package/dist/sdk~1.js +50 -50
  59. package/dist/server.js +1 -1
  60. package/dist/skill.js +1 -1
  61. package/dist/skills.js +1 -1
  62. package/dist/skills~1.js +2 -1
  63. package/dist/static/assets/web-view-proxy-bootstrap.js +1 -0
  64. package/dist/static/assets/web-view-proxy-page-client.js +1 -1
  65. package/dist/static/assets/web-view-proxy-service-worker.js +1 -1
  66. package/dist/status~1.js +1 -1
  67. package/dist/stop.js +1 -1
  68. package/dist/sync.js +1 -1
  69. package/dist/templates/README.md +0 -1
  70. package/dist/update.js +1 -1
  71. package/dist/workspace.js +1 -1
  72. package/dist/wrapper.js +1 -0
  73. package/dist/yaml.js +1 -1
  74. package/package.json +2 -2
  75. package/skills/dbx-eval/SKILL.md +15 -7
  76. package/skills/doubao-agentic-service-development/SKILL.md +1 -1
  77. package/skills/doubao-agentic-service-development/references/auth.md +1 -1
  78. package/skills/doubao-agentic-service-development/references/dev-debug.md +3 -3
  79. package/skills/doubao-agentic-service-development/references/frontend/components/map-canvas.md +1 -1
  80. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +0 -6
  81. package/skills/doubao-agentic-service-development/references/frontend/guides/debugger-mcp.md +2 -2
  82. package/skills/doubao-agentic-service-development/references/frontend/widget-templates/props.md +1 -1
  83. package/skills/doubao-agentic-service-development/references/frontend-dev.md +3 -3
  84. package/skills/doubao-agentic-service-development/references/local-debug/overview.md +2 -2
  85. package/skills/doubao-agentic-service-development/references/overview.md +16 -31
  86. package/skills/doubao-agentic-service-development/scripts/workspace.py +6 -89
  87. package/dist/180.js +0 -1
  88. package/dist/8891.js +0 -280
  89. package/dist/9635.js +0 -1
  90. package/dist/assets/web-sdk-debugger/static/js/index.75528d6de7.js +0 -26
  91. package/dist/dbx.js +0 -3
  92. package/dist/skills~2.js +0 -2
@@ -194,12 +194,11 @@ Agent 可以自主编排流程,不再通过状态机脚本获取下一步。
194
194
  `workspace.py` 只管理本地工作文件路径,不调用平台接口。涉及 manifest、skill、前端目录时,必须先调用脚本获取路径,再按返回值读写或传给 `dbx` 命令。
195
195
 
196
196
  ```bash
197
- python3 <skill_dir>/scripts/workspace.py config-status --json
197
+ python3 <skill_dir>/scripts/workspace.py project-status --json
198
198
  python3 <skill_dir>/scripts/workspace.py app-id --json
199
199
  python3 <skill_dir>/scripts/workspace.py app-id set --value <app_id> --json
200
200
  python3 <skill_dir>/scripts/platform_info.py dashboard --json
201
201
  python3 <skill_dir>/scripts/workspace.py frontend path --json
202
- python3 <skill_dir>/scripts/workspace.py workspace ensure --json
203
202
  python3 <skill_dir>/scripts/workspace.py manifest path --create --json
204
203
  python3 <skill_dir>/scripts/workspace.py skill path --create --json
205
204
  python3 <skill_dir>/scripts/workspace.py artifacts check --json
@@ -239,7 +238,7 @@ python3 <skill_dir>/scripts/workspace.py artifacts check --json
239
238
  dbx dev --mcp-endpoint <mcp_endpoint>
240
239
  ```
241
240
 
242
- 命令默认读取 `<project>/manifest.yaml`,并递归加载 `<project>/skill/` 下的所有 `SKILL.md`;传入 `--skill <目录>` 时改为遍历指定目录。同时按项目布局和 `.dbx/config.json` 解析前端目录。`<mcp_endpoint>` 使用步骤 3 确认的 Streamable HTTP `/mcp` 地址。纯前端改动只刷新模拟器,不要重启 `dbx dev`。
241
+ 命令默认读取 `<project>/manifest.yaml`,并递归加载 `<project>/skill/` 下的所有 `SKILL.md`;传入 `--skill <目录>` 时改为遍历指定目录。同时按项目布局(兼容旧 `.dbx/config.json`)解析前端目录。`<mcp_endpoint>` 使用步骤 3 确认的 Streamable HTTP `/mcp` 地址。纯前端改动只刷新模拟器,不要重启 `dbx dev`。
243
242
 
244
243
  5. 只有默认路径不符合项目结构时,才调用 workspace 脚本获取调试路径:
245
244
 
@@ -258,7 +257,7 @@ python3 <skill_dir>/scripts/workspace.py artifacts check --json
258
257
  --skill <runtime_skill_dir>
259
258
  ```
260
259
 
261
- 当前目录是整个 dbx 项目根目录,也是写入 `.dbx/localdebug` 状态、默认 Manifest、Skills 和前端目录的目录。`workspace.py skill path --json` 返回的 `path` 是 Skill 目录;`dbx dev --skill` 只能传这个目录或另一 Skill 目录,不能传 `skill_md` 文件路径。
260
+ 当前目录是整个 dbx 项目根目录,也是写入 `node_modules/.doubao-dev/dev/` 状态、默认 Manifest、Skills 和前端目录的目录。`workspace.py skill path --json` 返回的 `path` 是 Skill 目录;`dbx dev --skill` 只能传这个目录或另一 Skill 目录,不能传 `skill_md` 文件路径。
262
261
 
263
262
  6. `dbx dev` 已运行后,前端 Page / Widget / 样式改动只刷新 Web 模拟器或点“刷新资源并重载卡片”;不要重启工程。
264
263
  7. 完成验证后,退出 `dbx dev` 控制台或按 Ctrl-C。
@@ -380,7 +379,7 @@ MCP 阶段不强制要求一定已经有公网 URL。已有合规代码但没有
380
379
 
381
380
  ### 关键原则
382
381
 
383
- 前端源码不放在 `.dbx/workspace` 下。`.dbx/workspace` 只保存打包产物和中间工作文件。
382
+ 前端源码保留在项目根目录;打包临时文件由上传命令管理。
384
383
 
385
384
  本阶段不打包前端源码快照。前端必须将非敏感运行时配置集中在 `src/config/runtime.ts`(或脚本返回的等价路径):`appId` 和 `apiBaseUrl` 是必需字段。`src/app.config.ts` 从该模块读取 `appId`,所有普通 HTTP 请求通过统一 client 使用 `apiBaseUrl`。不要在 Page/Widget 中硬编码 AppID 或服务端 URL;AppSecret 绝不属于前端配置。
386
385
 
@@ -391,8 +390,8 @@ MCP 阶段不强制要求一定已经有公网 URL。已有合规代码但没有
391
390
  ### 执行方式
392
391
 
393
392
  1. 确认前端目录。
394
- - 优先读取 `.dbx/config.json` 中 `frontend.directory`。
395
- - 若配置缺失,再根据项目结构判断,常见目录为项目根目录下的 `doubao-agentic-service`。
393
+ - 兼容读取旧 `.dbx/config.json` 中 `frontend.directory`。
394
+ - 若配置缺失,再根据项目结构判断,新项目使用根目录,旧项目按脚本返回的路径处理。
396
395
 
397
396
  2. 根据用户需求开发前端。
398
397
  - 补齐页面、组件、路由、状态管理、接口调用、空态、错误态和基础样式。
@@ -407,39 +406,25 @@ MCP 阶段不强制要求一定已经有公网 URL。已有合规代码但没有
407
406
 
408
407
  - 前端目录存在,并包含本轮需求所需页面、组件和交互。
409
408
  - 本轮可运行的项目校验已通过,或已说明项目没有可用校验命令。
410
- - 不要求 `.dbx/workspace/doubao-agentic-service.zip` 存在;前端源码包由 `build` 阶段的 upload 命令临时生成并清理。
409
+ - 前端源码包由 `build` 阶段的 upload 命令临时生成并清理。
411
410
 
412
411
  ## setup
413
412
 
414
413
  ### 目标
415
414
 
416
- 确认当前项目基础结构完整,恢复本地开发状态,获得本地 workspace 路径。
417
-
418
- ### 关键原则
419
-
420
- Agent 只检查初始化产物是否存在,不负责创建或补齐这些产物。关键产物缺失时停止当前开发流程,提示用户先完成项目初始化。
415
+ 确认 Manifest、运行态 Skill 和前端工程是否完整。
421
416
 
422
417
  ### 检查项
423
418
 
424
- 1. 检查 `.dbx/config.json` 是否存在:
425
-
426
- ```bash
427
- python3 <skill_dir>/scripts/workspace.py config-status --json
428
- ```
429
-
430
- 如果 `config_exists=false`,停止当前流程并提示用户先完成项目初始化。不要继续创建 workspace。
431
-
432
- 2. 确认 `.dbx/config.json` 存在后,获取本地 workspace 目录:
433
-
434
- ```bash
435
- python3 <skill_dir>/scripts/workspace.py workspace ensure --json
436
- ```
437
-
438
- 3. 检查基础产物:
439
- - `.dbx/config.json` 存在。
440
- - 项目中存在前端脚手架目录;优先读取 `.dbx/config.json` 中的 `frontend.directory` 配置,其次再按项目结构判断。
419
+ ```bash
420
+ python3 <skill_dir>/scripts/workspace.py project-status --json
421
+ python3 <skill_dir>/scripts/workspace.py frontend path --json
422
+ python3 <skill_dir>/scripts/workspace.py artifacts check --json
423
+ ```
441
424
 
442
- 如果关键产物缺失,不要自行补一个平行结构;提示用户先完成或修复项目初始化。
425
+ 新项目以 `manifest.yaml` 标记项目根目录,不要求 `.dbx/config.json` 存在。
426
+ 旧配置中的 `frontend.directory` 仍可读取,但工具不会再写入旧配置。
427
+ 如果 Manifest、运行态 Skill 或前端工程缺失,提示用户先完成或修复项目初始化,不创建平行结构。
443
428
 
444
429
  ## template-widget
445
430
 
@@ -4,7 +4,6 @@ import argparse
4
4
  import json
5
5
  import os
6
6
  import re
7
- import shutil
8
7
  import stat
9
8
  from pathlib import Path
10
9
  from typing import Any, Dict, List, Optional, Tuple
@@ -13,7 +12,7 @@ from typing import Any, Dict, List, Optional, Tuple
13
12
  def find_project_root(start_dir: Path) -> Path:
14
13
  current = start_dir.resolve()
15
14
  while True:
16
- if (current / ".dbx").exists() or (current / ".git").exists():
15
+ if (current / "manifest.yaml").is_file() or (current / ".dbx" / "config.json").is_file():
17
16
  return current
18
17
  if current.parent == current:
19
18
  return start_dir.resolve()
@@ -24,10 +23,6 @@ def config_path(project_root: Path) -> Path:
24
23
  return project_root / ".dbx" / "config.json"
25
24
 
26
25
 
27
- def workspace_dir(project_root: Path) -> Path:
28
- return project_root / ".dbx" / "workspace"
29
-
30
-
31
26
  def manifest_path(project_root: Path) -> Path:
32
27
  return project_root / "manifest.yaml"
33
28
 
@@ -145,10 +140,6 @@ def is_root_layout(project_root: Path) -> bool:
145
140
  return not (project_root / "miniapp").is_dir()
146
141
 
147
142
 
148
- def archive_dir(project_root: Path) -> Path:
149
- return project_root / ".dbx" / "archive"
150
-
151
-
152
143
  def workspace_required_files(project_root: Path) -> Dict[str, Tuple[Path, str]]:
153
144
  frontend_dir = frontend_directory_from_config(project_root, read_config(config_path(project_root)))
154
145
  app_config = frontend_app_config_path(frontend_dir)
@@ -181,7 +172,6 @@ def check_workspace_artifacts(
181
172
  }
182
173
  missing = [name for name, exists in present.items() if not exists]
183
174
  return {
184
- "workspace_dir": str(workspace_dir(project_root)),
185
175
  "required": {name: str(path) for name, (path, _kind) in files.items()},
186
176
  "present": present,
187
177
  "missing": missing,
@@ -302,16 +292,11 @@ def build_parser() -> argparse.ArgumentParser:
302
292
  output_parent = argparse.ArgumentParser(add_help=False)
303
293
  output_parent.add_argument("--json", action="store_true", help="Print structured JSON.")
304
294
 
305
- subparsers.add_parser("config-status", parents=[output_parent])
295
+ subparsers.add_parser("project-status", parents=[output_parent])
306
296
  app_id_parser = subparsers.add_parser("app-id", parents=[output_parent])
307
297
  app_id_parser.add_argument("app_id_command", nargs="?", choices=["get", "set"], default="get")
308
298
  app_id_parser.add_argument("--value", help="AppID to write into the resolved Manifest when using `set`.")
309
299
 
310
- workspace_parser = subparsers.add_parser("workspace")
311
- workspace_sub = workspace_parser.add_subparsers(dest="workspace_command", required=True)
312
- workspace_sub.add_parser("path", parents=[output_parent])
313
- workspace_sub.add_parser("ensure", parents=[output_parent])
314
-
315
300
  frontend_parser = subparsers.add_parser("frontend")
316
301
  frontend_sub = frontend_parser.add_subparsers(dest="frontend_command", required=True)
317
302
  frontend_sub.add_parser("path", parents=[output_parent])
@@ -326,15 +311,6 @@ def build_parser() -> argparse.ArgumentParser:
326
311
  skill_path = skill_sub.add_parser("path", parents=[output_parent])
327
312
  skill_path.add_argument("--create", action="store_true")
328
313
 
329
- file_parser = subparsers.add_parser("file")
330
- file_sub = file_parser.add_subparsers(dest="file_command", required=True)
331
- file_path = file_sub.add_parser("path", parents=[output_parent])
332
- file_path.add_argument("--name", required=True)
333
- file_path.add_argument("--create", action="store_true")
334
-
335
- archive_parser = subparsers.add_parser("archive", parents=[output_parent])
336
- archive_parser.add_argument("--version-tag", required=True)
337
-
338
314
  artifacts_parser = subparsers.add_parser("artifacts")
339
315
  artifacts_sub = artifacts_parser.add_subparsers(dest="artifacts_command", required=True)
340
316
  artifacts_check = artifacts_sub.add_parser("check", parents=[output_parent])
@@ -347,15 +323,13 @@ def build_parser() -> argparse.ArgumentParser:
347
323
  def main() -> None:
348
324
  args = build_parser().parse_args()
349
325
  project_root = find_project_root(Path(args.project))
350
- cfg_path = config_path(project_root)
351
- ws_dir = workspace_dir(project_root)
352
326
 
353
- if args.command == "config-status":
327
+ if args.command == "project-status":
354
328
  emit(
355
329
  {
356
330
  "project_root": str(project_root),
357
- "config_path": str(cfg_path),
358
- "config_exists": cfg_path.exists(),
331
+ "manifest_path": str(manifest_path(project_root)),
332
+ "manifest_exists": manifest_path(project_root).is_file(),
359
333
  },
360
334
  args.json,
361
335
  )
@@ -390,22 +364,8 @@ def main() -> None:
390
364
  )
391
365
  return
392
366
 
393
- if args.command == "workspace":
394
- if args.workspace_command == "ensure":
395
- ws_dir.mkdir(parents=True, exist_ok=True)
396
- emit(
397
- {
398
- "project_root": str(project_root),
399
- "workspace_dir": str(ws_dir),
400
- "workspace_rel": rel(project_root, ws_dir),
401
- "exists": ws_dir.exists(),
402
- },
403
- args.json,
404
- )
405
- return
406
-
407
367
  if args.command == "frontend":
408
- frontend_dir = frontend_directory_from_config(project_root, read_config(cfg_path))
368
+ frontend_dir = frontend_directory_from_config(project_root, read_config(config_path(project_root)))
409
369
  if args.frontend_command == "path":
410
370
  app_config = frontend_app_config_path(frontend_dir)
411
371
  candidates = frontend_app_config_candidates(frontend_dir)
@@ -477,49 +437,6 @@ def main() -> None:
477
437
  )
478
438
  return
479
439
 
480
- if args.command == "file":
481
- safe_name = Path(args.name)
482
- if safe_name.is_absolute() or ".." in safe_name.parts:
483
- raise ValueError("--name must be a relative path inside .dbx/workspace")
484
- target = ws_dir / safe_name
485
- if args.create:
486
- target.parent.mkdir(parents=True, exist_ok=True)
487
- target.touch(exist_ok=True)
488
- emit(
489
- {
490
- "project_root": str(project_root),
491
- "path": str(target),
492
- "rel": rel(project_root, target),
493
- "exists": target.exists(),
494
- },
495
- args.json,
496
- )
497
- return
498
-
499
- if args.command == "archive":
500
- if not ws_dir.exists():
501
- emit({"project_root": str(project_root), "archived": [], "workspace_exists": False}, args.json)
502
- return
503
- target_dir = archive_dir(project_root) / args.version_tag
504
- target_dir.mkdir(parents=True, exist_ok=True)
505
- moved = []
506
- for item in sorted(ws_dir.iterdir()):
507
- dest = target_dir / item.name
508
- if dest.exists():
509
- raise FileExistsError(f"archive target already exists: {dest}")
510
- shutil.move(str(item), str(dest))
511
- moved.append(rel(project_root, dest))
512
- emit(
513
- {
514
- "project_root": str(project_root),
515
- "archive_dir": str(target_dir),
516
- "archive_rel": rel(project_root, target_dir),
517
- "archived": moved,
518
- },
519
- args.json,
520
- )
521
- return
522
-
523
440
  if args.command == "artifacts":
524
441
  if args.artifacts_command == "check":
525
442
  selected_skill_dir = None
package/dist/180.js DELETED
@@ -1 +0,0 @@
1
- import t,{createRequire as e}from"node:module";let r=t.createRequire(import.meta.url);import{__webpack_require__ as o}from"./rslib-runtime.js";let p=e(import.meta.url);o.add({bufferutil(t){t.exports=r("bufferutil")},"utf-8-validate"(t){t.exports=r("utf-8-validate")},buffer(t){t.exports=p("buffer")},crypto(t){t.exports=p("crypto")},events(t){t.exports=p("events")},http(t){t.exports=p("http")},https(t){t.exports=p("https")},net(t){t.exports=p("net")},stream(t){t.exports=p("stream")},tls(t){t.exports=p("tls")},url(t){t.exports=p("url")},util(t){t.exports=p("util")},zlib(t){t.exports=p("zlib")}});