@exagone313/dsh-podman 1.7.0 → 1.8.0

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 (117) hide show
  1. package/cordis.patch.yml +3 -1
  2. package/dist/approval-reasons.d.ts +37 -0
  3. package/dist/approval-reasons.js +128 -0
  4. package/dist/approval-template-summary.d.ts +8 -0
  5. package/dist/approval-template-summary.js +163 -0
  6. package/dist/approval.d.ts +8 -4
  7. package/dist/approval.js +104 -10
  8. package/dist/client/ContainerCard.js +8 -2
  9. package/dist/client/container-card-controller.d.ts +13 -5
  10. package/dist/client/container-card-controller.js +60 -24
  11. package/dist/client/container-card-create-config.d.ts +23 -0
  12. package/dist/client/container-card-create-config.js +48 -0
  13. package/dist/client/container-card-create-modal.d.ts +9 -1
  14. package/dist/client/container-card-create-modal.js +37 -41
  15. package/dist/client/container-card-create-volume.d.ts +10 -0
  16. package/dist/client/container-card-create-volume.js +34 -0
  17. package/dist/client/container-card-dialog-styles.d.ts +4 -2
  18. package/dist/client/container-card-dialog-styles.js +47 -4
  19. package/dist/client/container-card-edit-modal.d.ts +5 -1
  20. package/dist/client/container-card-edit-modal.js +55 -19
  21. package/dist/client/container-card-editors.d.ts +9 -0
  22. package/dist/client/container-card-editors.js +300 -43
  23. package/dist/client/container-card-form.d.ts +2 -1
  24. package/dist/client/container-card-form.js +26 -8
  25. package/dist/client/container-card-images.js +9 -31
  26. package/dist/client/container-card-mount-actions.d.ts +12 -0
  27. package/dist/client/container-card-mount-actions.js +35 -0
  28. package/dist/client/container-card-mount-sources.d.ts +34 -0
  29. package/dist/client/container-card-mount-sources.js +180 -0
  30. package/dist/client/container-card-names.d.ts +2 -0
  31. package/dist/client/container-card-names.js +12 -0
  32. package/dist/client/container-card-row.d.ts +16 -1
  33. package/dist/client/container-card-row.js +69 -25
  34. package/dist/client/container-card-secrets.d.ts +2 -0
  35. package/dist/client/container-card-secrets.js +60 -17
  36. package/dist/client/container-card-shared.d.ts +17 -9
  37. package/dist/client/container-card-shared.js +122 -93
  38. package/dist/client/container-card-styles.d.ts +6 -0
  39. package/dist/client/container-card-styles.js +22 -0
  40. package/dist/client/container-card-table-styles.d.ts +2 -1
  41. package/dist/client/container-card-table-styles.js +14 -0
  42. package/dist/client/container-card-templates.d.ts +81 -0
  43. package/dist/client/container-card-templates.js +1004 -0
  44. package/dist/client/container-card-toast.js +1 -1
  45. package/dist/client/container-card-volumes.js +6 -20
  46. package/dist/client/container-card-workspace.d.ts +10 -2
  47. package/dist/client/container-card-workspace.js +98 -5
  48. package/dist/client/container-template-ui.d.ts +163 -0
  49. package/dist/client/container-template-ui.js +579 -0
  50. package/dist/client/download.d.ts +1 -0
  51. package/dist/client/download.js +23 -0
  52. package/dist/client/image-facts.d.ts +18 -0
  53. package/dist/client/image-facts.js +44 -0
  54. package/dist/client/index.js +13478 -3438
  55. package/dist/client/locales.d.ts +1 -1
  56. package/dist/client/locales.js +120 -0
  57. package/dist/client/podman-containers.js +47 -18
  58. package/dist/client/podman-terminal-guide.js +4 -2
  59. package/dist/client/podman-terminal.js +4 -2
  60. package/dist/client/template-client.d.ts +9 -0
  61. package/dist/client/template-client.js +52 -0
  62. package/dist/client/template-protocol.d.ts +60 -0
  63. package/dist/client/template-protocol.js +4 -0
  64. package/dist/client/terminal-errors.d.ts +11 -0
  65. package/dist/client/terminal-errors.js +26 -0
  66. package/dist/client/terminal-protocol.d.ts +5 -0
  67. package/dist/client/terminal-protocol.js +5 -0
  68. package/dist/client/terminal-styles.d.ts +2 -1
  69. package/dist/client/terminal-styles.js +9 -1
  70. package/dist/client/terminal-transport.d.ts +17 -2
  71. package/dist/client/terminal-transport.js +31 -8
  72. package/dist/client/tool-presentations.d.ts +32 -0
  73. package/dist/client/tool-presentations.js +33 -0
  74. package/dist/client/tool-views.js +17 -7
  75. package/dist/client/workspace-target.d.ts +54 -0
  76. package/dist/client/workspace-target.js +86 -0
  77. package/dist/container-template.d.ts +153 -0
  78. package/dist/container-template.js +1058 -0
  79. package/dist/generated/version.d.ts +2 -2
  80. package/dist/generated/version.js +2 -2
  81. package/dist/grpc/proto/dshguest/v1/guest.proto +11 -0
  82. package/dist/guest-rpc.d.ts +1 -0
  83. package/dist/guest-rpc.js +12 -0
  84. package/dist/index.js +7 -1
  85. package/dist/mount-enums.d.ts +2 -0
  86. package/dist/mount-enums.js +17 -0
  87. package/dist/mount-order.d.ts +14 -0
  88. package/dist/mount-order.js +49 -0
  89. package/dist/project-path.d.ts +14 -0
  90. package/dist/project-path.js +25 -0
  91. package/dist/template-apply.d.ts +21 -0
  92. package/dist/template-apply.js +102 -0
  93. package/dist/template-files.d.ts +23 -0
  94. package/dist/template-files.js +186 -0
  95. package/dist/template-image.d.ts +22 -0
  96. package/dist/template-image.js +80 -0
  97. package/dist/template-route.d.ts +9 -0
  98. package/dist/template-route.js +278 -0
  99. package/dist/terminal-route.js +49 -7
  100. package/dist/tool-defs.js +27 -1
  101. package/dist/tool-handlers.js +69 -1
  102. package/dist/tool-params.d.ts +38 -0
  103. package/dist/tool-params.js +30 -0
  104. package/docs/README.md +4 -3
  105. package/docs/architecture.md +42 -12
  106. package/docs/architecture.zh.md +22 -8
  107. package/docs/configuration.md +19 -20
  108. package/docs/configuration.zh.md +3 -4
  109. package/docs/development-prompt.md +49 -45
  110. package/docs/development-prompt.zh.md +47 -43
  111. package/docs/development.md +45 -28
  112. package/docs/development.zh.md +59 -46
  113. package/docs/uninstall.md +3 -3
  114. package/docs/uninstall.zh.md +2 -2
  115. package/docs/usage.md +155 -23
  116. package/docs/usage.zh.md +104 -14
  117. package/package.json +6 -5
@@ -1,5 +1,5 @@
1
1
  export declare const NS = "podman";
2
- export type ContainerPluginKey = "cardTitle" | "loading" | "versionMismatchMajor" | "versionMismatchMinor" | "versionIncompatible" | "versionCompatibleDifferent" | "stateReady" | "stateNotReady" | "stateUnknown" | "stateAbsent" | "valueMissing" | "columnComponent" | "columnState" | "columnVersion" | "columnCommit" | "versionsTitle" | "orchestrator" | "gateway" | "gatewayNotRunning" | "gatewayIncompatible" | "dsh" | "copyVersions" | "copied" | "copyFailed" | "copyWorkspaceId" | "reload" | "notice" | "defaultImage" | "noDefaultImage" | "defaultEnvironment" | "addMissingVars" | "applyTo" | "allContainers" | "variablesToAdd" | "addMissingVarsApply" | "gitIdentity" | "gitName" | "gitEmail" | "save" | "discard" | "unsavedChanges" | "stagedChanges" | "recreateContainer" | "updateContainer" | "confirmUpdate" | "discardChanges" | "discardChangesTitle" | "confirmDiscardChanges" | "containerNameReserved" | "containerNamePtcReserved" | "containerKindPtc" | "invalidSecretLength" | "secretLengthHint" | "portPendingSuffix" | "portDuplicate" | "groupDefaultsTitle" | "groupStatusTitle" | "tabWorkspaces" | "tabImages" | "tabStorage" | "tabDefaults" | "tabStatus" | "settingsTabs" | "statusOverview" | "gatewayReady" | "gatewayNotReady" | "gatewayUnknown" | "edit" | "editContainerTitle" | "done" | "countImageOne" | "countImageMany" | "countVolumeOne" | "countVolumeMany" | "countSecretOne" | "countSecretMany" | "countCacheOne" | "countCacheMany" | "statusRunning" | "statusStopped" | "statusMissing" | "statusPulled" | "statusBuilt" | "countWorkspaceOne" | "countWorkspaceMany" | "countContainerOne" | "countContainerMany" | "countRunningContainerOne" | "countRunningContainerMany" | "countStoppedContainerOne" | "countStoppedContainerMany" | "countVersionOne" | "countVersionMany" | "orchestratorReady" | "orchestratorUnavailable" | "orchestratorNotReady" | "orchestratorUnknown" | "noWorkspaces" | "ptcMissing" | "ptcContainerTooltip" | "ptcImageTooltip" | "recreatePtcTitle" | "confirmRecreatePtc" | "ptcImageReserved" | "removePtcTitle" | "confirmRemovePtc" | "createContainer" | "containerName" | "image" | "copyImage" | "copyCreated" | "remove" | "removeWorkspace" | "confirmRemoveWorkspace" | "recreate" | "imageName" | "built" | "packages" | "noPackages" | "volumesTitle" | "noVolumes" | "createVolume" | "removeVolume" | "volumeName" | "secretsTitle" | "noSecrets" | "createSecret" | "secretName" | "secretCharset" | "setSecret" | "removeSecret" | "removeImage" | "rebuildImage" | "rebuildAllImages" | "buildImage" | "build" | "buildImageTitle" | "pullImage" | "setDefaultImage" | "baseImagesTitle" | "noBaseImages" | "customImagesTitle" | "noCustomImages" | "parentImage" | "cancel" | "removeTag" | "envTitle" | "envKey" | "copyEnvKey" | "envValue" | "copyEnvValue" | "addEnv" | "removeEnv" | "removeVariable" | "envNameRequired" | "envNameDuplicate" | "secretLength" | "containerSecretsTitle" | "addSecretEnv" | "secretEnvName" | "portsTitle" | "publishPort" | "unpublishPort" | "containerPort" | "copyContainerPort" | "hostPort" | "hostPortOptional" | "copyHostPort" | "protocol" | "copyProtocol" | "invalidPort" | "invalidHostPort" | "publishNeedsGateway" | "containerNotRunning" | "confirmUnpublishPort" | "none" | "unavailable" | "busy" | "confirmRemoveContainer" | "confirmRecreate" | "confirmRemoveImage" | "confirmRebuildImage" | "confirmRebuildAllImages" | "confirmRemoveVolume" | "confirmRemoveSecret" | "mountsTitle" | "addMount" | "mountKind" | "mountProject" | "mountProjectShort" | "mountPath" | "browse" | "browseTitle" | "browseSelect" | "browseLoading" | "browseError" | "browseUnavailable" | "browseHidden" | "browseTruncated" | "browseOutsideRoot" | "mountDestination" | "pathsTitle" | "path" | "copyPathEntry" | "noPaths" | "editPaths" | "addPathEntry" | "moveUp" | "moveDown" | "apply" | "dragToReorder" | "remountWaiting" | "remountApprove" | "remountReject" | "mountVolume" | "mountSecret" | "mountTmpfs" | "mountAt" | "mountMode" | "copyMountPath" | "copyMountName" | "copyMountMode" | "readOnly" | "readWrite" | "mountReadOnlySuffix" | "mountReadWriteSuffix" | "confirmRemoveMount" | "removeContainerTitle" | "removeVolumeTitle" | "removeImageTitle" | "removeSecretTitle" | "removeMountTitle" | "defaultMountNotRemovable" | "rebuildImageTitle" | "rebuildAllImagesTitle" | "setSecretTitle" | "acknowledgeRemoveWorkspace" | "acknowledgeRebuildAllImages" | "cachesTitle" | "noCaches" | "cacheUsage" | "cacheKeepLatest" | "confirmCacheKeepLatest" | "cacheRemoveAll" | "confirmCacheRemoveAll" | "addContainer" | "invalidContainerName" | "containerNameTaken" | "invalidName" | "invalidImageId" | "terminalCommandLine" | "terminalSignal" | "terminalExitCode" | "terminalNoExitCode" | "terminalRunning" | "terminalFailed" | "terminalDone" | "terminalNoOutput" | "terminalCollapseAria" | "terminalExpandAria" | "terminalExpandRest" | "toolTitle_container_bash" | "toolTitle_container_exec" | "toolTitle_container_read" | "toolTitle_container_write" | "toolTitle_container_edit" | "toolTitle_container_glob" | "toolTitle_container_grep" | "toolTitle_container_list" | "toolTitle_container_start" | "toolTitle_container_recreate" | "toolTitle_container_remove" | "toolTitle_container_mount_list" | "toolTitle_container_mount_add" | "toolTitle_container_mount_remove" | "toolTitle_container_mount_update" | "toolTitle_container_path_set" | "toolTitle_container_path_add" | "toolTitle_container_path_remove" | "toolTitle_container_secret_add" | "toolTitle_container_secret_remove" | "toolTitle_container_publish_port" | "toolTitle_container_unpublish_port" | "toolTitle_image_list" | "toolTitle_image_get" | "toolTitle_image_build" | "toolTitle_image_rebuild" | "toolTitle_image_rebuild_all" | "toolTitle_image_remove" | "toolTitle_volume_list" | "toolTitle_volume_create" | "toolTitle_volume_remove" | "toolTitle_secret_list" | "toolTitle_secret_create" | "toolTitle_secret_remove" | "toolTitle_daemon_start" | "toolTitle_daemon_list" | "toolTitle_daemon_logs" | "toolTitle_daemon_restart" | "toolTitle_daemon_stop" | "terminalTabTitle" | "terminalGuideTitle" | "terminalGuideDescription" | "terminalShortcut" | "terminalShortcutNoSession" | "terminalContainer" | "terminalShell" | "terminalDefaultContainer" | "terminalStart" | "terminalConnect" | "terminalReconnect" | "terminalStatusConnecting" | "terminalStatusRunning" | "terminalStatusExited" | "terminalStatusDetached" | "terminalNoShells" | "terminalShellsFailed" | "terminalLoading" | "containersTabTitle" | "containersCommand" | "containersPanelNoWorkspace" | "containersGuideTitle" | "containersGuideDescription" | "moreSettings";
2
+ export type ContainerPluginKey = "cardTitle" | "loading" | "versionMismatchMajor" | "versionMismatchMinor" | "versionIncompatible" | "versionCompatibleDifferent" | "stateReady" | "stateNotReady" | "stateUnknown" | "stateAbsent" | "valueMissing" | "columnComponent" | "columnState" | "columnVersion" | "columnCommit" | "versionsTitle" | "orchestrator" | "gateway" | "gatewayNotRunning" | "gatewayIncompatible" | "dsh" | "copyVersions" | "copied" | "copyFailed" | "copyWorkspaceId" | "reload" | "notice" | "defaultImage" | "noDefaultImage" | "defaultEnvironment" | "addMissingVars" | "applyTo" | "allContainers" | "variablesToAdd" | "addMissingVarsApply" | "gitIdentity" | "gitName" | "gitEmail" | "save" | "discard" | "unsavedChanges" | "stagedChanges" | "recreateContainer" | "updateContainer" | "confirmUpdate" | "discardChanges" | "discardChangesTitle" | "confirmDiscardChanges" | "containerNameReserved" | "containerNamePtcReserved" | "containerKindPtc" | "invalidSecretLength" | "secretLengthHint" | "portPendingSuffix" | "portDuplicate" | "groupDefaultsTitle" | "groupStatusTitle" | "tabWorkspaces" | "tabImages" | "tabStorage" | "tabDefaults" | "tabStatus" | "settingsTabs" | "statusOverview" | "gatewayReady" | "gatewayNotReady" | "gatewayUnknown" | "edit" | "editContainerTitle" | "done" | "countImageOne" | "countImageMany" | "countVolumeOne" | "countVolumeMany" | "countMountOne" | "countMountMany" | "countPortOne" | "countPortMany" | "countSecretOne" | "countSecretMany" | "countCacheOne" | "countCacheMany" | "statusRunning" | "statusStopped" | "statusMissing" | "statusPulled" | "statusBuilt" | "countWorkspaceOne" | "countWorkspaceMany" | "countContainerOne" | "countContainerMany" | "countRunningContainerOne" | "countRunningContainerMany" | "countStoppedContainerOne" | "countStoppedContainerMany" | "countVersionOne" | "countVersionMany" | "orchestratorReady" | "orchestratorUnavailable" | "orchestratorNotReady" | "orchestratorUnknown" | "noWorkspaces" | "ptcMissing" | "ptcContainerTooltip" | "ptcImageTooltip" | "recreatePtcTitle" | "confirmRecreatePtc" | "ptcImageReserved" | "removePtcTitle" | "confirmRemovePtc" | "createContainer" | "containerName" | "image" | "copyImage" | "copyCreated" | "remove" | "removeWorkspace" | "confirmRemoveWorkspace" | "recreate" | "imageName" | "built" | "packages" | "noPackages" | "volumesTitle" | "noVolumes" | "createVolume" | "removeVolume" | "volumeName" | "secretsTitle" | "noSecrets" | "createSecret" | "secretName" | "secretCharset" | "setSecret" | "removeSecret" | "removeImage" | "rebuildImage" | "rebuilding" | "rebuildAllImages" | "buildImage" | "build" | "building" | "buildImageTitle" | "pullImage" | "setDefaultImage" | "baseImagesTitle" | "noBaseImages" | "customImagesTitle" | "noCustomImages" | "parentImage" | "cancel" | "removeTag" | "envTitle" | "envKey" | "copyEnvKey" | "envValue" | "copyEnvValue" | "addEnv" | "removeEnv" | "removeVariable" | "envNameRequired" | "envNameDuplicate" | "secretLength" | "containerSecretsTitle" | "addSecretEnv" | "secretEnvName" | "portsTitle" | "publishPort" | "unpublishPort" | "containerPort" | "copyContainerPort" | "hostPort" | "hostPortOptional" | "copyHostPort" | "protocol" | "copyProtocol" | "invalidPort" | "invalidHostPort" | "publishNeedsGateway" | "containerNotRunning" | "confirmUnpublishPort" | "none" | "unavailable" | "busy" | "confirmRemoveContainer" | "confirmRecreate" | "confirmRemoveImage" | "confirmRebuildImage" | "confirmRebuildAllImages" | "confirmRemoveVolume" | "confirmRemoveSecret" | "mountsTitle" | "addMount" | "mountKind" | "mountProject" | "mountProjectShort" | "mountPath" | "browse" | "browseTitle" | "browseSelect" | "browseLoading" | "browseError" | "browseUnavailable" | "browseHidden" | "browseTruncated" | "browseOutsideRoot" | "mountProjectPathInvalid" | "mountProjectPathMissing" | "mountDestination" | "mountDestinationRequired" | "mountDestinationAbsolute" | "mountDestinationClean" | "mountDestinationReserved" | "pathsTitle" | "path" | "copyPathEntry" | "noPaths" | "editPaths" | "addPathEntry" | "moveUp" | "moveDown" | "apply" | "dragToReorder" | "remountWaiting" | "remountApprove" | "remountReject" | "mountVolume" | "mountSecret" | "mountTmpfs" | "mountAt" | "mountMode" | "copyMountPath" | "copyMountName" | "copyMountMode" | "readOnly" | "readWrite" | "mountReadOnlySuffix" | "mountReadWriteSuffix" | "confirmRemoveMount" | "removeContainerTitle" | "removeVolumeTitle" | "removeImageTitle" | "removeSecretTitle" | "removeMountTitle" | "defaultMountNotRemovable" | "rebuildImageTitle" | "rebuildAllImagesTitle" | "setSecretTitle" | "acknowledgeRemoveWorkspace" | "acknowledgeRebuildAllImages" | "cachesTitle" | "noCaches" | "cacheUsage" | "cacheKeepLatest" | "confirmCacheKeepLatest" | "cacheRemoveAll" | "confirmCacheRemoveAll" | "addContainer" | "invalidContainerName" | "containerNameTaken" | "invalidName" | "invalidImageId" | "terminalCommandLine" | "terminalSignal" | "terminalExitCode" | "terminalNoExitCode" | "terminalRunning" | "terminalFailed" | "terminalDone" | "terminalNoOutput" | "terminalCollapseAria" | "terminalExpandAria" | "terminalExpandRest" | "toolTitle_container_bash" | "toolTitle_container_exec" | "toolTitle_container_read" | "toolTitle_container_write" | "toolTitle_container_edit" | "toolTitle_container_glob" | "toolTitle_container_grep" | "toolTitle_container_list" | "toolTitle_container_template_load" | "toolTitle_container_template_export" | "toolTitle_container_template_save" | "toolTitle_container_start" | "toolTitle_container_recreate" | "toolTitle_container_remove" | "toolTitle_container_mount_list" | "toolTitle_container_mount_add" | "toolTitle_container_mount_remove" | "toolTitle_container_mount_update" | "toolTitle_container_path_set" | "toolTitle_container_path_add" | "toolTitle_container_path_remove" | "toolTitle_container_secret_add" | "toolTitle_container_secret_remove" | "toolTitle_container_publish_port" | "toolTitle_container_unpublish_port" | "toolTitle_image_list" | "toolTitle_image_get" | "toolTitle_image_build" | "toolTitle_image_rebuild" | "toolTitle_image_rebuild_all" | "toolTitle_image_remove" | "toolTitle_volume_list" | "toolTitle_volume_create" | "toolTitle_volume_remove" | "toolTitle_secret_list" | "toolTitle_secret_create" | "toolTitle_secret_remove" | "toolTitle_daemon_start" | "toolTitle_daemon_list" | "toolTitle_daemon_logs" | "toolTitle_daemon_restart" | "toolTitle_daemon_stop" | "terminalTabTitle" | "terminalGuideTitle" | "terminalGuideDescription" | "terminalShortcut" | "terminalShortcutNoSession" | "terminalContainer" | "terminalShell" | "terminalDefaultContainer" | "terminalStart" | "terminalConnect" | "terminalReconnect" | "terminalStatusConnecting" | "terminalStatusRunning" | "terminalStatusExited" | "terminalStatusDetached" | "terminalNoShells" | "terminalShellsFailed" | "terminalLoading" | "containersTabTitle" | "containersCommand" | "containersPanelNoWorkspace" | "containersWorkspaceStarting" | "retry" | "containersGuideTitle" | "containersGuideDescription" | "loadTemplate" | "templatePickHint" | "templateChoose" | "templateSelect" | "templateNone" | "templateUpload" | "templateUploadChip" | "templateNext" | "templateDetails" | "templateBack" | "templateSecretMissing" | "templateVolumeMissing" | "templateProjectMissing" | "templateProjectInvalid" | "templateChooseProject" | "templateChooseVolume" | "templateChooseSecret" | "templateBrowse" | "templateBuildRequired" | "templateFactEnv" | "templateFactMounts" | "templateFactSecrets" | "templateFactPath" | "templateFactPorts" | "templateFactPackageOne" | "templateFactPackageMany" | "templateDestination" | "templateCreate" | "templateReplaceContainer" | "templateFilterTargets" | "templateNoMatchingContainers" | "templateCreateHint" | "templateCreateDefaultHint" | "templateLoading" | "templateImageMissing" | "templateCheckingReferences" | "templateReferenceMissingOne" | "templateReferenceMissingMany" | "templateNoContainer" | "templateContinue" | "close" | "exportTemplate" | "exportTemplateFailed" | "moreSettings";
3
3
  /**
4
4
  * Translate one key, interpolating `{name}` placeholders when given. Components
5
5
  * that build dialog copy declare this so they can name their subject.
@@ -76,6 +76,10 @@ export const en = {
76
76
  countImageMany: "{n} images",
77
77
  countVolumeOne: "1 volume",
78
78
  countVolumeMany: "{n} volumes",
79
+ countMountOne: "1 mount",
80
+ countMountMany: "{n} mounts",
81
+ countPortOne: "1 port",
82
+ countPortMany: "{n} ports",
79
83
  countSecretOne: "1 secret",
80
84
  countSecretMany: "{n} secrets",
81
85
  countCacheOne: "1 cache",
@@ -135,9 +139,11 @@ export const en = {
135
139
  removeSecret: "Remove",
136
140
  removeImage: "Remove",
137
141
  rebuildImage: "Rebuild",
142
+ rebuilding: "Rebuilding",
138
143
  rebuildAllImages: "Rebuild all images",
139
144
  buildImage: "Build custom image",
140
145
  build: "Build",
146
+ building: "Building",
141
147
  buildImageTitle: "Build an image",
142
148
  pullImage: "Pull",
143
149
  setDefaultImage: "Set default",
@@ -203,7 +209,13 @@ export const en = {
203
209
  browseHidden: "Show hidden",
204
210
  browseTruncated: "Too many folders to list; only the beginning is shown.",
205
211
  browseOutsideRoot: "Choose a directory inside the projects root.",
212
+ mountProjectPathInvalid: "Enter a project path inside the projects root, relative to it.",
213
+ mountProjectPathMissing: "No project directory exists at this path.",
206
214
  mountDestination: "Destination",
215
+ mountDestinationRequired: "A destination is required.",
216
+ mountDestinationAbsolute: "The destination must be an absolute path.",
217
+ mountDestinationClean: 'The destination must be a clean path (no "..", doubled separators or trailing slash).',
218
+ mountDestinationReserved: "The destination must not be or overlap {path}.",
207
219
  pathsTitle: "PATH variable additions",
208
220
  path: "Path",
209
221
  copyPathEntry: "Copy PATH addition {path}",
@@ -272,6 +284,9 @@ export const en = {
272
284
  toolTitle_container_glob: "Container glob",
273
285
  toolTitle_container_grep: "Container grep",
274
286
  toolTitle_container_list: "List containers",
287
+ toolTitle_container_template_load: "Load container template",
288
+ toolTitle_container_template_export: "Export container template",
289
+ toolTitle_container_template_save: "Save container template",
275
290
  toolTitle_container_start: "Start container",
276
291
  toolTitle_container_recreate: "Recreate container",
277
292
  toolTitle_container_remove: "Remove container",
@@ -324,8 +339,53 @@ export const en = {
324
339
  containersTabTitle: "Containers",
325
340
  containersCommand: "Containers",
326
341
  containersPanelNoWorkspace: "This session is not in a known workspace.",
342
+ containersWorkspaceStarting: "This session's workspace is still starting. Retrying usually finds it.",
343
+ retry: "Retry",
327
344
  containersGuideTitle: "Workspace containers",
328
345
  containersGuideDescription: "Manage the Session workspace's containers",
346
+ loadTemplate: "Load template",
347
+ templatePickHint: "Choose a project template or upload a file. The next step shows its details.",
348
+ templateChoose: "Template",
349
+ templateSelect: "Select a template…",
350
+ templateNone: "No template in this project yet",
351
+ templateUpload: "Upload from the browser",
352
+ templateUploadChip: "Upload",
353
+ templateNext: "Next",
354
+ templateDetails: "Template details",
355
+ templateBack: "Back",
356
+ templateSecretMissing: "Secret “{secret}” does not exist.",
357
+ templateVolumeMissing: "Volume “{volume}” does not exist.",
358
+ templateProjectMissing: "Project “{project}” does not exist under the projects root.",
359
+ templateProjectInvalid: "Project “{project}” is not a valid project path.",
360
+ templateChooseProject: "Choose a project.",
361
+ templateChooseVolume: "Choose a volume.",
362
+ templateChooseSecret: "Choose a secret.",
363
+ templateBrowse: "Browse",
364
+ templateBuildRequired: "Build the image to continue.",
365
+ templateFactEnv: "env",
366
+ templateFactMounts: "mounts",
367
+ templateFactSecrets: "secrets",
368
+ templateFactPath: "PATH",
369
+ templateFactPorts: "ports",
370
+ templateFactPackageOne: "package",
371
+ templateFactPackageMany: "packages",
372
+ templateDestination: "Create or replace",
373
+ templateCreate: "New container",
374
+ templateReplaceContainer: "Edit existing container",
375
+ templateFilterTargets: "Filter containers",
376
+ templateNoMatchingContainers: "No matching containers.",
377
+ templateCreateHint: "The container name is chosen in the next step.",
378
+ templateCreateDefaultHint: "The workspace's default container is created in the next step.",
379
+ templateLoading: "Loading template…",
380
+ templateImageMissing: "Choose an existing image or build the template's image to continue.",
381
+ templateCheckingReferences: "Checking project paths…",
382
+ templateReferenceMissingOne: "One reference needs to be resolved.",
383
+ templateReferenceMissingMany: "{n} references need to be resolved.",
384
+ templateNoContainer: "No container to replace.",
385
+ templateContinue: "Continue",
386
+ close: "Close",
387
+ exportTemplate: "Export template",
388
+ exportTemplateFailed: "Export failed: {message}",
329
389
  moreSettings: "More settings…",
330
390
  };
331
391
  export const zh = {
@@ -402,6 +462,10 @@ export const zh = {
402
462
  countImageMany: "{n} 个镜像",
403
463
  countVolumeOne: "1 个卷",
404
464
  countVolumeMany: "{n} 个卷",
465
+ countMountOne: "1 个挂载",
466
+ countMountMany: "{n} 个挂载",
467
+ countPortOne: "1 个端口",
468
+ countPortMany: "{n} 个端口",
405
469
  countSecretOne: "1 个机密",
406
470
  countSecretMany: "{n} 个机密",
407
471
  countCacheOne: "1 个缓存",
@@ -461,9 +525,11 @@ export const zh = {
461
525
  removeSecret: "移除",
462
526
  removeImage: "移除",
463
527
  rebuildImage: "重建",
528
+ rebuilding: "重建中",
464
529
  rebuildAllImages: "重建全部镜像",
465
530
  buildImage: "构建自定义镜像",
466
531
  build: "构建",
532
+ building: "构建中",
467
533
  buildImageTitle: "构建镜像",
468
534
  pullImage: "拉取",
469
535
  setDefaultImage: "设为默认",
@@ -529,7 +595,13 @@ export const zh = {
529
595
  browseHidden: "显示隐藏项",
530
596
  browseTruncated: "文件夹过多,仅显示开头部分。",
531
597
  browseOutsideRoot: "请选择项目根目录内的目录。",
598
+ mountProjectPathInvalid: "请输入项目根目录内的相对项目路径。",
599
+ mountProjectPathMissing: "此路径下没有项目目录。",
532
600
  mountDestination: "目标路径",
601
+ mountDestinationRequired: "必须填写目标路径。",
602
+ mountDestinationAbsolute: "目标路径必须是绝对路径。",
603
+ mountDestinationClean: "目标路径必须是规范路径(不含“..”、重复分隔符或结尾斜杠)。",
604
+ mountDestinationReserved: "目标路径不得等于或与 {path} 重叠。",
533
605
  pathsTitle: "PATH 变量附加项",
534
606
  path: "路径",
535
607
  copyPathEntry: "复制 PATH 变量附加项 {path}",
@@ -598,6 +670,9 @@ export const zh = {
598
670
  toolTitle_container_glob: "容器文件匹配",
599
671
  toolTitle_container_grep: "容器文件搜索",
600
672
  toolTitle_container_list: "列出容器",
673
+ toolTitle_container_template_load: "加载容器模板",
674
+ toolTitle_container_template_export: "导出容器模板",
675
+ toolTitle_container_template_save: "保存容器模板",
601
676
  toolTitle_container_start: "启动容器",
602
677
  toolTitle_container_recreate: "重建容器",
603
678
  toolTitle_container_remove: "移除容器",
@@ -650,7 +725,52 @@ export const zh = {
650
725
  containersTabTitle: "容器",
651
726
  containersCommand: "容器",
652
727
  containersPanelNoWorkspace: "此会话不属于任何已知工作区。",
728
+ containersWorkspaceStarting: "此会话的工作区仍在启动中,重试通常就能找到。",
729
+ retry: "重试",
653
730
  containersGuideTitle: "工作区容器",
654
731
  containersGuideDescription: "管理会话工作区中的容器",
732
+ loadTemplate: "加载模板",
733
+ templatePickHint: "选择项目模板或上传文件。下一步将显示其详细信息。",
734
+ templateChoose: "模板",
735
+ templateSelect: "选择模板…",
736
+ templateNone: "此项目还没有模板",
737
+ templateUpload: "从浏览器上传",
738
+ templateUploadChip: "上传",
739
+ templateNext: "下一步",
740
+ templateDetails: "模板详情",
741
+ templateBack: "返回",
742
+ templateSecretMissing: "机密“{secret}”不存在。",
743
+ templateVolumeMissing: "卷“{volume}”不存在。",
744
+ templateProjectMissing: "项目“{project}”在项目根目录下不存在。",
745
+ templateProjectInvalid: "项目“{project}”不是有效的项目路径。",
746
+ templateChooseProject: "请选择一个项目。",
747
+ templateChooseVolume: "请选择一个卷。",
748
+ templateChooseSecret: "请选择一个机密。",
749
+ templateBrowse: "浏览",
750
+ templateBuildRequired: "请先构建镜像再继续。",
751
+ templateFactEnv: "环境变量",
752
+ templateFactMounts: "挂载",
753
+ templateFactSecrets: "机密",
754
+ templateFactPath: "PATH",
755
+ templateFactPorts: "端口",
756
+ templateFactPackageOne: "个软件包",
757
+ templateFactPackageMany: "个软件包",
758
+ templateDestination: "创建或替换",
759
+ templateCreate: "新容器",
760
+ templateReplaceContainer: "编辑现有容器",
761
+ templateFilterTargets: "筛选容器",
762
+ templateNoMatchingContainers: "没有匹配的容器。",
763
+ templateCreateHint: "容器名称将在下一步中选择。",
764
+ templateCreateDefaultHint: "将在下一步中创建工作区的默认容器。",
765
+ templateLoading: "正在加载模板…",
766
+ templateImageMissing: "请选择现有镜像或构建模板镜像后再继续。",
767
+ templateCheckingReferences: "正在检查项目路径…",
768
+ templateReferenceMissingOne: "还有 1 个引用需要处理。",
769
+ templateReferenceMissingMany: "还有 {n} 个引用需要处理。",
770
+ templateNoContainer: "没有可替换的容器。",
771
+ templateContinue: "继续",
772
+ close: "关闭",
773
+ exportTemplate: "导出模板",
774
+ exportTemplateFailed: "导出失败:{message}",
655
775
  moreSettings: "更多设置…",
656
776
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
3
3
  //
4
4
  // SPDX-License-Identifier: MIT
@@ -22,6 +22,7 @@ import { containersInWorkspace } from "./container-panel-scope.js";
22
22
  import { openPluginSettings, pluginSettingsAvailable, subscribePluginSettings, } from "./plugin-navigation.js";
23
23
  import { CONTAINERS_PANEL_CLASS } from "./podman-containers-styles.js";
24
24
  import { fetchTerminalTarget } from "./terminal-transport.js";
25
+ import { waitForWorkspaceTarget, WORKSPACE_TARGET_WAIT_MS, } from "./workspace-target.js";
25
26
  export function PodmanContainers(props) {
26
27
  const { t, sessionId } = props;
27
28
  const state = props.useContainerCard((snapshot) => snapshot);
@@ -31,9 +32,13 @@ export function PodmanContainers(props) {
31
32
  // a shell without the UI hides the action instead of offering a failed click.
32
33
  const settingsAvailable = useSyncExternalStore(subscribePluginSettings, pluginSettingsAvailable);
33
34
  // The host resolves the Session's workspace from the Session itself; the
34
- // browser neither chooses nor guesses one. `failed` means it cannot place this
35
- // session in a workspace, so the panel says so instead of listing every row.
35
+ // browser neither chooses nor guesses one. While the session or its workspace
36
+ // is still registering, the route answers `workspace-pending`, which this pane
37
+ // retries with backoff; `failed` means a real refusal, so the panel says so
38
+ // instead of listing every row.
36
39
  const [target, setTarget] = useState({ phase: "loading" });
40
+ // Bumped by the Retry action to start one fresh wait after the budget ran out.
41
+ const [attempt, setAttempt] = useState(0);
37
42
  const scope = target.phase === "ready" ? target.target : undefined;
38
43
  const listedWorkspace = scope === undefined
39
44
  ? undefined
@@ -60,22 +65,35 @@ export function PodmanContainers(props) {
60
65
  useEffect(() => {
61
66
  const controller = new AbortController();
62
67
  setTarget({ phase: "loading" });
63
- void fetchTerminalTarget(sessionId, controller.signal).then((resolved) => {
64
- if (!controller.signal.aborted) {
65
- setTarget({ phase: "ready", target: resolved });
66
- }
67
- }, (error) => {
68
- if (controller.signal.aborted)
68
+ void waitForWorkspaceTarget({
69
+ signal: controller.signal,
70
+ fetchTarget: (signal) => fetchTerminalTarget(sessionId, signal, {
71
+ waitMs: WORKSPACE_TARGET_WAIT_MS,
72
+ }),
73
+ }).then((result) => {
74
+ // Unmount or a tab switch aborts the loop and must leave the pane alone.
75
+ if (controller.signal.aborted || result.status === "aborted")
69
76
  return;
70
- setTarget({
71
- phase: "failed",
72
- message: error instanceof Error ? error.message : String(error),
73
- });
77
+ switch (result.status) {
78
+ case "ready":
79
+ setTarget({ phase: "ready", target: result.target });
80
+ return;
81
+ case "pending":
82
+ setTarget({ phase: "pending" });
83
+ return;
84
+ default:
85
+ setTarget({
86
+ phase: "failed",
87
+ message: result.error instanceof Error
88
+ ? result.error.message
89
+ : String(result.error),
90
+ });
91
+ }
74
92
  });
75
93
  return () => {
76
94
  controller.abort();
77
95
  };
78
- }, [sessionId]);
96
+ }, [sessionId, attempt]);
79
97
  const containers = containersInWorkspace(state.containers, scope);
80
98
  // The workspace header is the settings card's own block header, with this
81
99
  // pane's settings action appended to its action group. Both places render the
@@ -91,11 +109,22 @@ export function PodmanContainers(props) {
91
109
  ? _jsx("p", { style: hint, role: "status", children: t("loading") })
92
110
  : target.phase === "failed"
93
111
  ? _jsx("p", { style: hint, role: "alert", children: target.message })
94
- : workspace === undefined
95
- ? _jsx("p", { style: hint, role: "status", children: t("containersPanelNoWorkspace") })
96
- : (_jsx(WorkspaceSection, { t: t, workspace: workspace, containers: containers, images: state.images, volumes: state.volumes, secrets: state.secrets, busy: state.busy, writable: state.writable, locale: state.locale, pendingActions: state.pendingActions, defaultImage: state.defaultImage, defaultEnv: state.containerEnv, projectsRoot: state.projectsRoot, directoryPicker: state.directoryPicker, onRemove: props.remove, onRecreate: props.recreate, onRemoveWorkspace: props.removeWorkspace, onCreate: props.createContainer, onCreateSecret: props.createSecret, onStartContainer: props.startContainer, onApplyContainerConfig: props.applyContainerConfig, gatewayUnavailable: state.gatewayState === "absent" ||
97
- state.gatewayState === "incompatible", extraAction: settingsAction })) }));
112
+ : target.phase === "pending"
113
+ ? (_jsxs("div", { style: hint, role: "status", children: [_jsx("p", { style: PENDING_MESSAGE_STYLE, children: t("containersWorkspaceStarting") }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => setAttempt((count) => count + 1), children: t("retry") })] }))
114
+ : workspace === undefined
115
+ ? _jsx("p", { style: hint, role: "status", children: t("containersPanelNoWorkspace") })
116
+ : (_jsx(WorkspaceSection, { t: t, workspace: workspace, containers: containers, images: state.images, volumes: state.volumes, secrets: state.secrets, busy: state.busy, writable: state.writable, locale: state.locale, pendingActions: state.pendingActions, defaultImage: state.defaultImage, defaultEnv: state.containerEnv, projectsRoot: state.projectsRoot, directoryPicker: state.directoryPicker, onRemove: props.remove, onRecreate: props.recreate, onRemoveWorkspace: props.removeWorkspace, onCreate: props.createContainer, onCreateVolume: props.createVolume, onCreateSecret: props.createSecret, onStartContainer: props.startContainer, onApplyContainerConfig: props.applyContainerConfig, gatewayUnavailable: state.gatewayState === "absent" ||
117
+ state.gatewayState === "incompatible", templateActions: {
118
+ listTemplates: props.listTemplates,
119
+ inspectTemplate: props.inspectTemplate,
120
+ buildTemplate: props.buildTemplate,
121
+ applyTemplate: props.applyTemplate,
122
+ publishTemplate: props.publishTemplate,
123
+ }, onBuildImage: props.buildImage, onRebuildImage: props.rebuildImage, onRebuildBaseImage: props.rebuildBaseImage, onPullBaseImage: props.pullBaseImage, onReload: props.reload, extraAction: settingsAction })) }));
98
124
  }
125
+ // The pending notice keeps the pane's hint typography but drops the paragraph's
126
+ // own margins, so the Retry action sits right below it.
127
+ const PENDING_MESSAGE_STYLE = { margin: 0 };
99
128
  // The slot body has no padding of its own, so the pane supplies its insets and
100
129
  // scrolls the workspace block as one unit. The pane is the panel's one surface:
101
130
  // the card it holds draws no outline here (see podman-containers-styles.ts),
@@ -13,7 +13,7 @@ import { ContainerField } from "./podman-terminal.js";
13
13
  import { PODMAN_TERMINAL_KIND } from "./terminal-tab.js";
14
14
  import { readTerminalTarget, writeTerminalTarget, } from "./terminal-preference.js";
15
15
  import { containerOptions, validContainer, validShell, } from "./terminal-targets.js";
16
- import { fetchTerminalShells, fetchTerminalTarget, } from "./terminal-transport.js";
16
+ import { fetchTerminalShells, fetchTerminalTarget, TERMINAL_TARGET_READY_WAIT_MS, } from "./terminal-transport.js";
17
17
  export function PodmanTerminalGuide(props) {
18
18
  const { t, sessionId } = props;
19
19
  const { tab } = props.useTabInfo();
@@ -39,7 +39,9 @@ export function PodmanTerminalGuide(props) {
39
39
  useEffect(() => {
40
40
  const controller = new AbortController();
41
41
  setTarget({ phase: "loading" });
42
- void fetchTerminalTarget(sessionId, controller.signal).then((resolved) => {
42
+ void fetchTerminalTarget(sessionId, controller.signal, {
43
+ waitMs: TERMINAL_TARGET_READY_WAIT_MS,
44
+ }).then((resolved) => {
43
45
  if (!controller.signal.aborted) {
44
46
  setTarget({ phase: "ready", target: resolved });
45
47
  }
@@ -15,7 +15,7 @@ import { useEffect, useLayoutEffect, useRef, useState, } from "react";
15
15
  import { fieldLabel, imageSelect } from "./container-card-styles.js";
16
16
  import { containerOptions } from "./terminal-targets.js";
17
17
  import { forgetTerminalTitle, publishTerminalTitle, } from "./terminal-titles.js";
18
- import { base64ToBytes, bytesToBase64, fetchTerminalShells, fetchTerminalTarget, openTerminalStream, sendTerminalControl, } from "./terminal-transport.js";
18
+ import { base64ToBytes, bytesToBase64, fetchTerminalShells, fetchTerminalTarget, openTerminalStream, sendTerminalControl, TERMINAL_TARGET_READY_WAIT_MS, } from "./terminal-transport.js";
19
19
  // One TextEncoder serves every keystroke: the type is stateless for our use.
20
20
  const TEXT_ENCODER = new TextEncoder();
21
21
  // The xterm stylesheet is imported as text (the build's `.css` loader) and
@@ -102,7 +102,9 @@ export function PodmanTerminal(props) {
102
102
  useEffect(() => {
103
103
  const controller = new AbortController();
104
104
  setTarget({ phase: "loading" });
105
- void fetchTerminalTarget(sessionId, controller.signal).then((resolved) => {
105
+ void fetchTerminalTarget(sessionId, controller.signal, {
106
+ waitMs: TERMINAL_TARGET_READY_WAIT_MS,
107
+ }).then((resolved) => {
106
108
  if (!controller.signal.aborted) {
107
109
  setTarget({ phase: "ready", target: resolved });
108
110
  }
@@ -0,0 +1,9 @@
1
+ import { type TemplateApplyRequest, type TemplateApplyView, type TemplateBuildRequest, type TemplateBuildView, type TemplateEntryView, type TemplateInspectionView, type TemplateInspectRequest, type TemplatePublishRequest, type TemplatePublishView } from "./template-protocol.js";
2
+ export interface TemplateClient {
3
+ list(workspace: string, signal?: AbortSignal): Promise<TemplateEntryView[]>;
4
+ inspect(request: TemplateInspectRequest, signal?: AbortSignal): Promise<TemplateInspectionView>;
5
+ build(request: TemplateBuildRequest, signal?: AbortSignal): Promise<TemplateBuildView>;
6
+ apply(request: TemplateApplyRequest, signal?: AbortSignal): Promise<TemplateApplyView>;
7
+ publish(request: TemplatePublishRequest, signal?: AbortSignal): Promise<TemplatePublishView>;
8
+ }
9
+ export declare function createTemplateClient(): TemplateClient;
@@ -0,0 +1,52 @@
1
+ // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
2
+ //
3
+ // SPDX-License-Identifier: MIT
4
+ // The load-template popup's browser half of the host route. The route is served
5
+ // on the harness API channel, so a same-origin fetch carries the browser
6
+ // session the harness issued for it.
7
+ import { TEMPLATES_PATH, } from "./template-protocol.js";
8
+ async function failure(response) {
9
+ try {
10
+ const body = (await response.json());
11
+ if (typeof body.error === "string" && body.error !== "") {
12
+ return new Error(body.error);
13
+ }
14
+ }
15
+ catch {
16
+ // A non-JSON body falls through to the status text.
17
+ }
18
+ return new Error(`template request failed (${response.status})`);
19
+ }
20
+ export function createTemplateClient() {
21
+ const inspect = async (request, signal) => {
22
+ const response = await fetch(TEMPLATES_PATH, {
23
+ method: "POST",
24
+ headers: {
25
+ accept: "application/json",
26
+ "content-type": "application/json",
27
+ },
28
+ body: JSON.stringify(request),
29
+ signal,
30
+ });
31
+ if (!response.ok)
32
+ throw await failure(response);
33
+ return await response.json();
34
+ };
35
+ return {
36
+ async list(workspace, signal) {
37
+ const url = new URL(TEMPLATES_PATH, globalThis.location.origin);
38
+ url.searchParams.set("workspace", workspace);
39
+ const response = await fetch(url, {
40
+ headers: { accept: "application/json" },
41
+ signal,
42
+ });
43
+ if (!response.ok)
44
+ throw await failure(response);
45
+ return (await response.json()).templates;
46
+ },
47
+ inspect: (request, signal) => inspect(request, signal),
48
+ build: (request, signal) => inspect(request, signal),
49
+ apply: (request, signal) => inspect(request, signal),
50
+ publish: (request, signal) => inspect(request, signal),
51
+ };
52
+ }
@@ -0,0 +1,60 @@
1
+ import type { ContainerView } from "./card-protocol.js";
2
+ import type { ContainerTemplate, TemplateImagePlan, TemplateWarning } from "../container-template.js";
3
+ export declare const TEMPLATES_PATH = "/api/podman/templates";
4
+ export interface TemplateEntryView {
5
+ name: string;
6
+ path: string;
7
+ yaml: string;
8
+ }
9
+ export interface TemplateInspectionView {
10
+ name: string;
11
+ path: string;
12
+ yaml: string;
13
+ template: ContainerTemplate;
14
+ imageId: string;
15
+ image: TemplateImagePlan;
16
+ warnings: TemplateWarning[];
17
+ }
18
+ export interface TemplateBuildView extends TemplateInspectionView {
19
+ built: boolean;
20
+ removed: boolean;
21
+ }
22
+ export interface TemplateApplyView {
23
+ container: ContainerView;
24
+ imageId: string;
25
+ warnings: string[];
26
+ }
27
+ export interface TemplateInspectRequest {
28
+ op: "inspect";
29
+ workspace: string;
30
+ name: string;
31
+ yaml?: string;
32
+ }
33
+ export interface TemplateBuildRequest {
34
+ op: "build";
35
+ workspace: string;
36
+ name: string;
37
+ yaml?: string;
38
+ force?: boolean;
39
+ }
40
+ export interface TemplateApplyRequest {
41
+ op: "apply";
42
+ workspace: string;
43
+ name: string;
44
+ yaml?: string;
45
+ container?: string;
46
+ }
47
+ export interface TemplatePublishRequest {
48
+ op: "publish";
49
+ workspace: string;
50
+ name: string;
51
+ yaml?: string;
52
+ container: string;
53
+ }
54
+ export interface TemplatePublishView {
55
+ warnings: string[];
56
+ }
57
+ export type TemplateRequest = TemplateInspectRequest | TemplateBuildRequest | TemplateApplyRequest | TemplatePublishRequest;
58
+ export interface TemplatesListing {
59
+ templates: TemplateEntryView[];
60
+ }
@@ -0,0 +1,4 @@
1
+ // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
2
+ //
3
+ // SPDX-License-Identifier: MIT
4
+ export const TEMPLATES_PATH = "/api/podman/templates";
@@ -0,0 +1,11 @@
1
+ /** The session's workspace is not registered yet; asking again can succeed. */
2
+ export declare class WorkspacePendingError extends Error {
3
+ readonly code = "workspace-pending";
4
+ constructor(message?: string);
5
+ }
6
+ /**
7
+ * Whether one failure is the target route's retryable pending answer.
8
+ * @param error - anything a target request rejected with.
9
+ * @returns true for `WorkspacePendingError` or an error carrying its code.
10
+ */
11
+ export declare function isWorkspacePendingError(error: unknown): error is WorkspacePendingError;
@@ -0,0 +1,26 @@
1
+ // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
2
+ //
3
+ // SPDX-License-Identifier: MIT
4
+ // The typed refusals of the terminal transport. They live apart from the
5
+ // transport so the retry policy can recognize a pending workspace without
6
+ // importing a module that touches browser `fetch` and `location`.
7
+ import { WORKSPACE_PENDING_CODE } from "./terminal-protocol.js";
8
+ /** The session's workspace is not registered yet; asking again can succeed. */
9
+ export class WorkspacePendingError extends Error {
10
+ code = WORKSPACE_PENDING_CODE;
11
+ constructor(message) {
12
+ super(message);
13
+ this.name = "WorkspacePendingError";
14
+ }
15
+ }
16
+ /**
17
+ * Whether one failure is the target route's retryable pending answer.
18
+ * @param error - anything a target request rejected with.
19
+ * @returns true for `WorkspacePendingError` or an error carrying its code.
20
+ */
21
+ export function isWorkspacePendingError(error) {
22
+ if (error instanceof WorkspacePendingError)
23
+ return true;
24
+ return typeof error === "object" && error !== null &&
25
+ error.code === WORKSPACE_PENDING_CODE;
26
+ }
@@ -6,6 +6,11 @@ export declare const TERMINAL_SHELLS_PATH = "/api/podman/terminal/shells";
6
6
  export declare const TERMINAL_RETAINED_PATH = "/api/podman/terminal/retained";
7
7
  /** The workspace the host resolved for one session. */
8
8
  export declare const TERMINAL_TARGET_PATH = "/api/podman/terminal/target";
9
+ /**
10
+ * Error code the target route answers with while the session's workspace is
11
+ * still registering. The answer is retryable; every other refusal is not.
12
+ */
13
+ export declare const WORKSPACE_PENDING_CODE = "workspace-pending";
9
14
  /** The workspace a session runs in, resolved by the host from the session itself. */
10
15
  export interface TerminalTargetView {
11
16
  /** Workspace project name, as the card lists it. */
@@ -12,3 +12,8 @@ export const TERMINAL_SHELLS_PATH = "/api/podman/terminal/shells";
12
12
  export const TERMINAL_RETAINED_PATH = "/api/podman/terminal/retained";
13
13
  /** The workspace the host resolved for one session. */
14
14
  export const TERMINAL_TARGET_PATH = "/api/podman/terminal/target";
15
+ /**
16
+ * Error code the target route answers with while the session's workspace is
17
+ * still registering. The answer is retryable; every other refusal is not.
18
+ */
19
+ export const WORKSPACE_PENDING_CODE = "workspace-pending";
@@ -1,5 +1,6 @@
1
1
  import type { Context as ClientContext } from "@deepseek-ai/cordis";
2
2
  export declare const TERMINAL_CLASS = "dsh-podman-terminal";
3
- export declare const TERMINAL_STYLES = "\n.dsh-podman-terminal {\n --dsl-terminal-font: var(--dsw-font-markdown-code-block-small);\n --dsl-terminal-line-height: 18px;\n --dsl-terminal-output-max-height: 224px;\n margin: 4px 0 4px 4px;\n border: 1px solid var(--dsw-alias-border-l1);\n}\n";
3
+ export declare const CODE_BLOCK_CLASS = "dsh-podman-code-block";
4
+ export declare const TERMINAL_STYLES = "\n.dsh-podman-terminal {\n --dsl-terminal-font: var(--dsw-font-markdown-code-block-small);\n --dsl-terminal-line-height: 18px;\n --dsl-terminal-output-max-height: 224px;\n margin: 4px 0 4px 4px;\n border: 1px solid var(--dsw-alias-border-l1);\n}\n\n.dsh-podman-code-block {\n margin: 4px 0 4px 4px;\n}\n";
4
5
  /** Inject the terminal card stylesheet for the owning plugin lifetime. */
5
6
  export declare function installTerminalStyles(ctx: ClientContext): void;
@@ -3,9 +3,13 @@
3
3
  // SPDX-License-Identifier: MIT
4
4
  // The class passed to TerminalBlock for podman command results.
5
5
  export const TERMINAL_CLASS = "dsh-podman-terminal";
6
+ // The class passed to CodeBlock for a fenced podman result (an exported
7
+ // container template).
8
+ export const CODE_BLOCK_CLASS = "dsh-podman-code-block";
6
9
  // Mirrors ui-tool's .terminalBody/.terminal so a podman command result matches
7
10
  // the built-in Bash result: small code font (12px/18px), 224px output cap,
8
- // 4px indent, l1 border.
11
+ // 4px indent, l1 border. The code block takes ui-tool's 4px row indent too,
12
+ // because CodeBlock otherwise carries standalone markdown spacing.
9
13
  export const TERMINAL_STYLES = `
10
14
  .dsh-podman-terminal {
11
15
  --dsl-terminal-font: var(--dsw-font-markdown-code-block-small);
@@ -14,6 +18,10 @@ export const TERMINAL_STYLES = `
14
18
  margin: 4px 0 4px 4px;
15
19
  border: 1px solid var(--dsw-alias-border-l1);
16
20
  }
21
+
22
+ .dsh-podman-code-block {
23
+ margin: 4px 0 4px 4px;
24
+ }
17
25
  `;
18
26
  /** Inject the terminal card stylesheet for the owning plugin lifetime. */
19
27
  export function installTerminalStyles(ctx) {