@exagone313/dsh-podman 1.4.0 → 1.5.1

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 (47) hide show
  1. package/dist/card-route.d.ts +2 -1
  2. package/dist/card-route.js +89 -6
  3. package/dist/client/ContainerCard.js +1 -1
  4. package/dist/client/card-protocol.d.ts +12 -1
  5. package/dist/client/card-protocol.js +20 -0
  6. package/dist/client/container-card-controller.d.ts +5 -1
  7. package/dist/client/container-card-controller.js +12 -1
  8. package/dist/client/container-card-create-modal.js +14 -12
  9. package/dist/client/container-card-images.d.ts +9 -0
  10. package/dist/client/container-card-images.js +25 -3
  11. package/dist/client/container-card-ptc-section.d.ts +11 -0
  12. package/dist/client/container-card-ptc-section.js +36 -0
  13. package/dist/client/container-card-ptc.d.ts +69 -0
  14. package/dist/client/container-card-ptc.js +148 -0
  15. package/dist/client/container-card-resources.d.ts +1 -0
  16. package/dist/client/container-card-resources.js +13 -8
  17. package/dist/client/container-card-row.js +4 -2
  18. package/dist/client/container-card-shared.d.ts +1 -0
  19. package/dist/client/container-card-shared.js +4 -3
  20. package/dist/client/container-card-status.d.ts +6 -0
  21. package/dist/client/container-card-status.js +18 -14
  22. package/dist/client/index.js +832 -511
  23. package/dist/client/locales.d.ts +1 -1
  24. package/dist/client/locales.js +20 -0
  25. package/dist/client/relative-time.d.ts +2 -2
  26. package/dist/client/relative-time.js +8 -7
  27. package/dist/container-kind.d.ts +10 -0
  28. package/dist/container-kind.js +38 -0
  29. package/dist/dsh-version.d.ts +2 -0
  30. package/dist/dsh-version.js +33 -0
  31. package/dist/generated/version.d.ts +2 -2
  32. package/dist/generated/version.js +2 -2
  33. package/dist/grpc/proto/dshctl/v1/control.proto +35 -7
  34. package/dist/grpc/proto/dshguest/v1/guest.proto +17 -1
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/public.d.ts +2 -0
  38. package/dist/public.js +19 -0
  39. package/dist/subprocess.js +271 -105
  40. package/dist/tool-handlers.js +12 -13
  41. package/dist/workspace-binding.d.ts +2 -0
  42. package/dist/workspace-binding.js +54 -11
  43. package/docs/configuration.md +6 -5
  44. package/docs/configuration.zh.md +6 -5
  45. package/docs/usage.md +37 -1
  46. package/docs/usage.zh.md +31 -1
  47. package/package.json +1 -1
@@ -88,11 +88,12 @@ Reserved `DSH_PODMAN*` keys are ignored, and the values are not secret — use
88
88
 
89
89
  ## Guest agent (`dsh-podman-guest-agent`)
90
90
 
91
- | Variable | Default | Description |
92
- | -------------------------- | ----------- | ------------------------------------------------------------------------------------------- |
93
- | `DSH_PODMAN_GUEST_SOCKET` | required | Unix socket the guest agent serves on; the orchestrator sets it when starting the container |
94
- | `DSH_PODMAN_GUEST_TOKEN` | — | Bearer token required on every gRPC call; see [Variable details](#variable-details) |
95
- | `DSH_PODMAN_PROJECTS_ROOT` | `/projects` | Root where the workspace's project(s) are mounted |
91
+ | Variable | Default | Description |
92
+ | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
93
+ | `DSH_PODMAN_GUEST_PTC_MODE` | — | When set to `true`, the agent runs in restricted mode on the dedicated PTC container: exec with a control channel only, refusing filesystem, daemon operations, mounts, ports, terminals, secrets and directory browsing |
94
+ | `DSH_PODMAN_GUEST_SOCKET` | required | Unix socket the guest agent serves on; the orchestrator sets it when starting the container |
95
+ | `DSH_PODMAN_GUEST_TOKEN` | — | Bearer token required on every gRPC call; see [Variable details](#variable-details) |
96
+ | `DSH_PODMAN_PROJECTS_ROOT` | `/projects` | Root where the workspace's project(s) are mounted |
96
97
 
97
98
  ## Gateway (`dsh-podman-gateway`)
98
99
 
@@ -83,11 +83,12 @@ Podman
83
83
 
84
84
  ## Guest agent(`dsh-podman-guest-agent`)
85
85
 
86
- | 变量 | 默认值 | 说明 |
87
- | -------------------------- | ----------- | ------------------------------------------------------------------- |
88
- | `DSH_PODMAN_GUEST_SOCKET` | required | guest agent 提供服务的 Unix 套接字;orchestrator 在启动容器时设置它 |
89
- | `DSH_PODMAN_GUEST_TOKEN` | — | 每次 gRPC 调用所需的 Bearer 令牌;见[变量详解](#变量详解) |
90
- | `DSH_PODMAN_PROJECTS_ROOT` | `/projects` | 工作区的项目被挂载到的根目录 |
86
+ | 变量 | 默认值 | 说明 |
87
+ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
88
+ | `DSH_PODMAN_GUEST_PTC_MODE` | — | 当设置为 `true` 时,agent 在专用 PTC 容器上以受限模式运行:仅通过控制通道提供 exec,并拒绝文件系统、守护进程操作、挂载、端口、终端、机密和目录浏览 |
89
+ | `DSH_PODMAN_GUEST_SOCKET` | required | guest agent 提供服务的 Unix 套接字;orchestrator 在启动容器时设置它 |
90
+ | `DSH_PODMAN_GUEST_TOKEN` | — | 每次 gRPC 调用所需的 Bearer 令牌;见[变量详解](#变量详解) |
91
+ | `DSH_PODMAN_PROJECTS_ROOT` | `/projects` | 工作区的项目被挂载到的根目录 |
91
92
 
92
93
  ## Gateway(`dsh-podman-gateway`)
93
94
 
package/docs/usage.md CHANGED
@@ -413,7 +413,8 @@ not approval-gated.
413
413
 
414
414
  The **Workspaces** tab lists the orchestrator-created guest containers. Each
415
415
  workspace card states in one phrase how many of its containers run and how many
416
- are stopped (the stopped half greyed).
416
+ are stopped (the stopped half greyed). The one shared PTC container belongs to
417
+ no workspace, so it never appears here: its card lives on the **Status** tab.
417
418
 
418
419
  It also shows the workspace's readable name as the card title with a discreet
419
420
  **Copy workspace ID** button beside it for its UUID, and lists each container as
@@ -437,6 +438,26 @@ line, right-aligned while the block has room and below the name once it does
437
438
  not: **Recreate** rebuilds the container as it is once the confirmation naming
438
439
  it is accepted.
439
440
 
441
+ One container is reserved: `ptc`, the container that serves workflows and PTC
442
+ runs. It belongs to no workspace, so it never appears inside one: its card sits
443
+ on the **Status** tab, directly below the component rows, and is marked by a
444
+ violet **PTC** chip after its state chip. A PTC container that does not exist
445
+ yet reads as **Missing** in grey rather than as an error: it is created lazily
446
+ on its first use. The PTC program it runs has no filesystem or network access
447
+ and calls tools host-side, so the container carries no mounts, environment
448
+ variables, secrets or published ports; the orchestrator creates it without any.
449
+ Its image is a single `ptc` image built on demand: it is rebuilt when the
450
+ harness version it carries changes, and reused across workspaces otherwise.
451
+
452
+ It is not visible to the agent's tools — `container_list`, `container_read` and
453
+ the rest never return it — and its card offers **Recreate** and **Remove**, with
454
+ no **Edit**, so its name and every field stay fixed. **Recreate** removes the
455
+ shared container through the orchestrator's workspace-less removal and then
456
+ ensures it again from the current PTC image; **Remove** retires it, and the
457
+ container is recreated on the next PTC run. Upgrading the harness rebuilds that
458
+ single PTC image and recreates the container on its next use; an agent that has
459
+ not been upgraded keeps reporting the same PTC error as before.
460
+
440
461
  The fields follow in the canonical order the dialogs share, each a read-only
441
462
  field with its own copy control: environment and secret environment variables as
442
463
  Key/Value field pairs, PATH additions as a list of directory fields, and mounts
@@ -546,6 +567,17 @@ its parent image and its packages (chips on their own line).
546
567
  A custom image carries a destructive **Remove** in that same action group rather
547
568
  than on a line of its own.
548
569
 
570
+ The reserved `ptc` image is the last row of the **Base images** card, after
571
+ every base image: its name, its **Built**/**Missing** status and the violet
572
+ **PTC** chip, a parent line naming the `node:26-slim` primitive it builds from,
573
+ and a **Build**/**Rebuild** button: **Build** creates the PTC container and its
574
+ image when the image is absent, **Rebuild** only rebuilds the image, and
575
+ **Rebuild all images** rebuilds every image including this one, building it if
576
+ missing, for the harness version the plugin targets. Its **Set default** button
577
+ stays disabled, with a tooltip saying the image is reserved to PTC (Programmatic
578
+ Tool Calling), and it has no **Remove**: the orchestrator owns it and keeps it
579
+ out of the editable image set.
580
+
549
581
  **Build custom image**, on the **Custom images** card, opens a popup with an
550
582
  image-name form and a parent-image select preselected to the default image, plus
551
583
  a chip input for the package list (type a name and press space/comma, or paste a
@@ -592,6 +624,10 @@ component table with their runtime state, version and commit.
592
624
 
593
625
  A version divergence is named beside the state it qualifies.
594
626
 
627
+ Directly below that table sits the shared PTC container's card: its identity,
628
+ its state and **PTC** chips, its relative creation time, its read-only image and
629
+ its **Recreate**/**Remove** actions.
630
+
595
631
  ## Podman terminal
596
632
 
597
633
  The plugin owns a **Podman terminal** right-Sidebar tab, separate from dsh's own
package/docs/usage.zh.md CHANGED
@@ -348,7 +348,8 @@ orchestrator 与 gateway 的就绪/未就绪标签。每次通过 **插件**
348
348
  ### 工作区
349
349
 
350
350
  **工作区**标签页列出编排器创建的 guest
351
- 容器。每个工作区卡片用一句话说明其容器有多少在运行、多少已停止(已停止部分以灰色呈现)。
351
+ 容器。每个工作区卡片用一句话说明其容器有多少在运行、多少已停止(已停止部分以灰色呈现)。唯一的共享
352
+ PTC 容器不属于任何工作区,因此绝不会出现在这里:它的卡片位于 **状态** 标签页。
352
353
 
353
354
  卡片以工作区的可读名称作为标题,并在其旁提供一个低调的 **复制工作区 ID**
354
355
  按钮用于复制其 UUID,并把每个容器呈现为一个堆叠区块。
@@ -368,6 +369,23 @@ Pod,因此不会留下空的 Pod。
368
369
  操作位于该行右端——有空间时右对齐,空间不足时移到名称下方:**重建**
369
370
  会在确认(确认框会指明容器)后按原样重建容器。
370
371
 
372
+ 有一个容器是保留的:`ptc`,即服务工作流与 PTC
373
+ 运行的容器。它不属于任何工作区,因此绝不会出现在某个工作区内部:其卡片位于
374
+ **状态** 标签页,紧接在组件表格下方,并在状态标签之后带有紫色的 **PTC**
375
+ 标签。尚未创建的 PTC 容器以灰色的 **缺失**
376
+ 显示,而不会被视为错误:它会在首次使用时按需创建。其运行的 PTC
377
+ 程序没有文件系统或网络访问权限,而是在宿主机侧调用工具,因此该容器不携带挂载、环境变量、机密或发布端口;编排器创建它时也不带这些内容。其镜像是单一的
378
+ `ptc` 镜像,按需构建:当它所携带的 harness
379
+ 版本发生变化时重建,否则在各工作区之间复用。
380
+
381
+ agent 的工具看不到它——`container_list`、`container_read`
382
+ 等永远不会返回它——其卡片提供 **重建** 与 **移除**,没有
383
+ **编辑**,因此它的名称与所有字段都保持固定。**重建**
384
+ 通过编排器的不带工作区的移除操作删除这个共享容器,再从当前 PTC
385
+ 镜像重新确保其存在;**移除** 则停用该容器,下次运行 PTC 时会重新创建。升级
386
+ harness 时会重建这个唯一的 PTC 镜像,并在下次使用时重建容器;未升级的 agent
387
+ 会继续报告与之前相同的 PTC 错误。
388
+
371
389
  字段按各对话框共用的规范顺序排列,每个都是自带复制控件的只读字段:环境变量与机密环境变量为键/值字段对,PATH
372
390
  附加项为目录字段列表,挂载与端口为逐条字段,所有值都完整显示并可换行。
373
391
 
@@ -449,6 +467,15 @@ gateway
449
467
 
450
468
  自定义镜像的破坏性 **移除** 位于同一操作组中,而不是区块下方的独立一行。
451
469
 
470
+ 保留的 `ptc` 镜像位于 **基础镜像**
471
+ 卡片的最后,列在所有基础镜像之后:其名称、**已构建**/**缺失** 状态与紫色的
472
+ **PTC** 标签、标明其构建来源 `node:26-slim` 原语的父镜像行,以及一个
473
+ **构建**/**重建** 按钮:**构建** 在镜像缺失时创建 PTC 容器及其镜像,**重建**
474
+ 只重建该镜像,而 **重建全部镜像**
475
+ 会重建包括该镜像在内的每个镜像,缺失时先构建,并使用插件所针对的 harness
476
+ 版本。其 **设为默认** 按钮保持禁用,提示说明该镜像专用于 PTC(Programmatic Tool
477
+ Calling);它没有 **移除**:编排器拥有它,并将其排除在可编辑镜像集之外。
478
+
452
479
  **构建自定义镜像**(位于 **自定义镜像**
453
480
  卡片上)打开一个弹窗,包含镜像名称表单、预选为默认镜像的父镜像选择器,以及用于软件包列表的
454
481
  chip 输入框(输入名称并按空格/逗号,或粘贴列表,以添加可移除的 chips;chips
@@ -485,6 +512,9 @@ chip 输入框(输入名称并按空格/逗号,或粘贴列表,以添加
485
512
 
486
513
  版本差异会标注在它所限定的状态旁。
487
514
 
515
+ 紧接该表格下方是共享 PTC 容器的卡片:其身份、状态与 **PTC**
516
+ 标签、相对创建时间、只读镜像,以及 **重建**/**移除** 操作。
517
+
488
518
  ## Podman 终端
489
519
 
490
520
  插件自带一个右侧边栏的 **Podman 终端**标签页,与 dsh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exagone313/dsh-podman",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Podman-backed execution for DeepSeek Harness (dsh).",
5
5
  "license": "MIT",
6
6
  "repository": {