@xcanwin/manyoyo 5.0.0 → 5.0.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
@@ -122,7 +122,8 @@ manyoyo run -y oc # OpenCode(或 opencode)
122
122
  manyoyo update # 更新 MANYOYO(全局 npm 安装场景)
123
123
 
124
124
  # 容器管理
125
- manyoyo ls
125
+ manyoyo ps
126
+ manyoyo images
126
127
  manyoyo run -n my-dev -x /bin/bash
127
128
  manyoyo rm my-dev
128
129
  manyoyo serve 3000
package/bin/manyoyo.js CHANGED
@@ -706,6 +706,22 @@ function getContList() {
706
706
  }
707
707
  }
708
708
 
709
+ function getImageList() {
710
+ try {
711
+ const output = dockerExecArgs(['images', '-a', '--format', '{{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedSince}}\t{{.Size}}']);
712
+ const lines = output
713
+ .split('\n')
714
+ .map(line => line.trim())
715
+ .filter(line => line && line.includes('manyoyo'));
716
+ console.log('REPOSITORY\tTAG\tIMAGE ID\tCREATED\tSIZE');
717
+ if (lines.length > 0) {
718
+ console.log(lines.join('\n'));
719
+ }
720
+ } catch (e) {
721
+ console.log((e && e.stdout) || '');
722
+ }
723
+ }
724
+
709
725
  function pruneDanglingImages() {
710
726
  console.log(`\n${YELLOW}清理悬空镜像...${NC}`);
711
727
  dockerExecArgs(['image', 'prune', '-f'], { stdio: 'inherit' });
@@ -820,6 +836,7 @@ async function setupCommander() {
820
836
  const config = loadConfig();
821
837
 
822
838
  const program = new Command();
839
+ program.enablePositionalOptions();
823
840
  let selectedAction = '';
824
841
  let selectedOptions = {};
825
842
  const selectAction = (action, options = {}) => {
@@ -829,7 +846,7 @@ async function setupCommander() {
829
846
 
830
847
  program
831
848
  .name(MANYOYO_NAME)
832
- .version(BIN_VERSION, '-V, --version', '显示版本')
849
+ .version(BIN_VERSION, '-v, --version', '显示版本')
833
850
  .description('MANYOYO - AI Agent CLI Sandbox\nhttps://github.com/xcanwin/manyoyo')
834
851
  .addHelpText('after', `
835
852
  配置文件:
@@ -844,7 +861,7 @@ async function setupCommander() {
844
861
 
845
862
  示例:
846
863
  ${MANYOYO_NAME} update 更新 MANYOYO 到最新版本
847
- ${MANYOYO_NAME} build --iv ${IMAGE_VERSION_HELP_EXAMPLE} 构建镜像
864
+ ${MANYOYO_NAME} build --iv ${IMAGE_VERSION_HELP_EXAMPLE} --yes 构建镜像
848
865
  ${MANYOYO_NAME} init all 从本机 Agent 配置初始化 ~/.manyoyo
849
866
  ${MANYOYO_NAME} run -r claude 使用 manyoyo.json 的 runs.claude 快速启动
850
867
  ${MANYOYO_NAME} run -r codex --ss "resume --last" 使用命令后缀
@@ -874,9 +891,13 @@ async function setupCommander() {
874
891
  .option('-r, --run <name>', '加载运行配置 (从 ~/.manyoyo/manyoyo.json 的 runs.<name> 读取)')
875
892
  .action((name, options) => selectAction('rm', { ...options, contName: name }));
876
893
 
877
- program.command('ls')
894
+ program.command('ps')
878
895
  .description('列举容器')
879
- .action(() => selectAction('ls', { contList: true }));
896
+ .action(() => selectAction('ps', { contList: true }));
897
+
898
+ program.command('images')
899
+ .description('列举镜像')
900
+ .action(() => selectAction('images', { imageList: true }));
880
901
 
881
902
  const serveCommand = program.command('serve [listen]').description('启动网页交互服务 (默认 127.0.0.1:3000)');
882
903
  applyRunStyleOptions(serveCommand, { includeRmOnExit: false, includeWebAuthOptions: true });
@@ -954,7 +975,8 @@ async function setupCommander() {
954
975
  const yesMode = Boolean(options.yes);
955
976
  const isBuildMode = selectedAction === 'build';
956
977
  const isRemoveMode = selectedAction === 'rm';
957
- const isListMode = selectedAction === 'ls';
978
+ const isPsMode = selectedAction === 'ps';
979
+ const isImagesMode = selectedAction === 'images';
958
980
  const isPruneMode = selectedAction === 'prune';
959
981
  const isShowConfigMode = selectedAction === 'config-show';
960
982
  const isShowCommandMode = selectedAction === 'config-command';
@@ -1130,7 +1152,8 @@ async function setupCommander() {
1130
1152
  process.exit(0);
1131
1153
  }
1132
1154
 
1133
- if (isListMode) { getContList(); process.exit(0); }
1155
+ if (isPsMode) { getContList(); process.exit(0); }
1156
+ if (isImagesMode) { getImageList(); process.exit(0); }
1134
1157
  if (isPruneMode) { pruneDanglingImages(); process.exit(0); }
1135
1158
  if (selectedAction === 'install') { installManyoyo(options.install); process.exit(0); }
1136
1159
 
@@ -136,6 +136,8 @@ RUN <<EOX
136
136
  # 配置 node.js
137
137
  npm config set registry=${NPM_REGISTRY}
138
138
 
139
+ export GIT_SSL_NO_VERIFY=$GIT_SSL_NO_VERIFY
140
+
139
141
  # 安装 LSP服务(python、typescript)
140
142
  npm install -g pyright typescript-language-server typescript
141
143
 
@@ -153,7 +155,7 @@ RUN <<EOX
153
155
  }
154
156
  }
155
157
  EOF
156
- GIT_SSL_NO_VERIFY=$GIT_SSL_NO_VERIFY claude plugin marketplace add https://github.com/anthropics/claude-plugins-official
158
+ claude plugin marketplace add https://github.com/anthropics/claude-plugins-official
157
159
  claude plugin install ralph-loop@claude-plugins-official
158
160
  claude plugin install typescript-lsp@claude-plugins-official
159
161
  claude plugin install pyright-lsp@claude-plugins-official
@@ -163,11 +165,39 @@ EOF
163
165
  case ",$TOOL," in *,full,*|*,java,*)
164
166
  claude plugin install jdtls-lsp@claude-plugins-official
165
167
  ;; esac
166
-
167
- GIT_SSL_NO_VERIFY=$GIT_SSL_NO_VERIFY claude plugin marketplace add https://github.com/anthropics/skills
168
- claude plugin install example-skills@anthropic-agent-skills
168
+ claude plugin marketplace add https://github.com/anthropics/skills
169
169
  claude plugin install document-skills@anthropic-agent-skills
170
170
 
171
+ # 安装 Codex CLI
172
+ npm install -g @openai/codex
173
+ mkdir -p ~/.codex
174
+ cat > ~/.codex/config.toml <<EOF
175
+ check_for_update_on_startup = false
176
+
177
+ [analytics]
178
+ enabled = false
179
+ EOF
180
+ mkdir -p "$HOME/.codex/skills"
181
+ git clone --depth 1 https://github.com/openai/skills.git /tmp/openai-skills
182
+ cp -a /tmp/openai-skills/skills/.system "$HOME/.codex/skills/.system"
183
+ rm -rf /tmp/openai-skills
184
+ CODEX_INSTALLER="$HOME/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py"
185
+ python "$CODEX_INSTALLER" --repo openai/skills --path \
186
+ skills/.curated/doc \
187
+ skills/.curated/spreadsheet \
188
+ skills/.curated/pdf \
189
+ skills/.curated/security-best-practices \
190
+ skills/.curated/security-threat-model
191
+ python "$CODEX_INSTALLER" --repo anthropics/skills --path \
192
+ skills/pptx \
193
+ skills/theme-factory \
194
+ skills/frontend-design \
195
+ skills/canvas-design \
196
+ skills/doc-coauthoring \
197
+ skills/internal-comms \
198
+ skills/web-artifacts-builder \
199
+ skills/webapp-testing
200
+
171
201
  # 安装 Gemini CLI
172
202
  case ",$TOOL," in *,full,*|*,gemini,*)
173
203
  npm install -g @google/gemini-cli
@@ -198,18 +228,6 @@ EOF
198
228
  EOF
199
229
  ;; esac
200
230
 
201
- # 安装 Codex CLI
202
- case ",$TOOL," in *,full,*|*,codex,*)
203
- npm install -g @openai/codex
204
- mkdir -p ~/.codex
205
- cat > ~/.codex/config.toml <<EOF
206
- check_for_update_on_startup = false
207
-
208
- [analytics]
209
- enabled = false
210
- EOF
211
- ;; esac
212
-
213
231
  # 安装 OpenCode CLI
214
232
  case ",$TOOL," in *,full,*|*,opencode,*)
215
233
  npm install -g opencode-ai
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "5.0.0",
4
- "imageVersion": "1.8.0-common",
3
+ "version": "5.0.2",
4
+ "imageVersion": "1.8.1-common",
5
5
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
6
6
  "keywords": [
7
7
  "manyoyo",