agentweaver 0.1.9 → 0.1.11

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 (101) hide show
  1. package/README.md +226 -200
  2. package/dist/artifacts.js +101 -56
  3. package/dist/errors.js +7 -0
  4. package/dist/executors/{codex-local-executor.js → codex-executor.js} +4 -4
  5. package/dist/executors/configs/{codex-local-config.js → codex-config.js} +1 -1
  6. package/dist/executors/configs/jira-fetch-config.js +2 -0
  7. package/dist/executors/configs/telegram-notifier-config.js +3 -0
  8. package/dist/executors/fetch-gitlab-diff-executor.js +1 -1
  9. package/dist/executors/fetch-gitlab-review-executor.js +1 -1
  10. package/dist/executors/git-commit-executor.js +25 -0
  11. package/dist/executors/telegram-notifier-executor.js +54 -0
  12. package/dist/flow-state.js +46 -1
  13. package/dist/gitlab.js +13 -8
  14. package/dist/index.js +507 -520
  15. package/dist/interactive-ui.js +495 -87
  16. package/dist/jira.js +52 -5
  17. package/dist/pipeline/auto-flow.js +6 -6
  18. package/dist/pipeline/context.js +1 -0
  19. package/dist/pipeline/declarative-flows.js +7 -4
  20. package/dist/pipeline/flow-catalog.js +60 -23
  21. package/dist/pipeline/flow-model-settings.js +77 -0
  22. package/dist/pipeline/flow-specs/auto-common.json +446 -0
  23. package/dist/pipeline/flow-specs/auto-golang.json +563 -0
  24. package/dist/pipeline/flow-specs/{bug-analyze.json → bugz/bug-analyze.json} +43 -25
  25. package/dist/pipeline/flow-specs/{bug-fix.json → bugz/bug-fix.json} +5 -4
  26. package/dist/pipeline/flow-specs/git-commit.json +196 -0
  27. package/dist/pipeline/flow-specs/{gitlab-diff-review.json → gitlab/gitlab-diff-review.json} +20 -50
  28. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +165 -0
  29. package/dist/pipeline/flow-specs/{mr-description.json → gitlab/mr-description.json} +17 -10
  30. package/dist/pipeline/flow-specs/{run-go-linter-loop.json → go/run-go-linter-loop.json} +40 -14
  31. package/dist/pipeline/flow-specs/{run-go-tests-loop.json → go/run-go-tests-loop.json} +40 -14
  32. package/dist/pipeline/flow-specs/implement.json +5 -4
  33. package/dist/pipeline/flow-specs/plan.json +40 -148
  34. package/dist/pipeline/flow-specs/{review-fix.json → review/review-fix.json} +73 -13
  35. package/dist/pipeline/flow-specs/review/review-loop.json +280 -0
  36. package/dist/pipeline/flow-specs/review/review-project.json +87 -0
  37. package/dist/pipeline/flow-specs/review/review.json +126 -0
  38. package/dist/pipeline/flow-specs/task-describe.json +191 -11
  39. package/dist/pipeline/launch-profile-config.js +38 -0
  40. package/dist/pipeline/node-registry.js +75 -45
  41. package/dist/pipeline/nodes/build-failure-summary-node.js +16 -29
  42. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +36 -0
  43. package/dist/pipeline/nodes/codex-prompt-node.js +41 -0
  44. package/dist/pipeline/nodes/commit-message-form-node.js +79 -0
  45. package/dist/pipeline/nodes/git-commit-form-node.js +138 -0
  46. package/dist/pipeline/nodes/git-commit-node.js +28 -0
  47. package/dist/pipeline/nodes/git-status-node.js +221 -0
  48. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +10 -6
  49. package/dist/pipeline/nodes/jira-context-node.js +10 -0
  50. package/dist/pipeline/nodes/llm-prompt-node.js +62 -0
  51. package/dist/pipeline/nodes/plan-codex-node.js +1 -1
  52. package/dist/pipeline/nodes/read-file-node.js +11 -0
  53. package/dist/pipeline/nodes/review-findings-form-node.js +18 -14
  54. package/dist/pipeline/nodes/select-files-form-node.js +72 -0
  55. package/dist/pipeline/nodes/telegram-notifier-node.js +28 -0
  56. package/dist/pipeline/nodes/user-input-node.js +29 -8
  57. package/dist/pipeline/nodes/write-selection-file-node.js +46 -0
  58. package/dist/pipeline/prompt-registry.js +2 -4
  59. package/dist/pipeline/prompt-runtime.js +13 -3
  60. package/dist/pipeline/registry.js +6 -8
  61. package/dist/pipeline/spec-compiler.js +5 -0
  62. package/dist/pipeline/spec-loader.js +18 -7
  63. package/dist/pipeline/spec-types.js +7 -3
  64. package/dist/pipeline/spec-validator.js +4 -0
  65. package/dist/pipeline/types.js +1 -0
  66. package/dist/pipeline/value-resolver.js +40 -38
  67. package/dist/prompts.js +104 -110
  68. package/dist/runtime/agentweaver-home.js +8 -0
  69. package/dist/runtime/command-resolution.js +0 -38
  70. package/dist/runtime/env-loader.js +43 -0
  71. package/dist/runtime/process-runner.js +45 -1
  72. package/dist/structured-artifact-schema-registry.js +53 -0
  73. package/dist/structured-artifact-schemas.json +0 -20
  74. package/dist/structured-artifacts.js +3 -43
  75. package/dist/user-input.js +30 -2
  76. package/package.json +2 -6
  77. package/Dockerfile.codex +0 -56
  78. package/dist/executors/claude-executor.js +0 -46
  79. package/dist/executors/codex-docker-executor.js +0 -27
  80. package/dist/executors/configs/claude-config.js +0 -12
  81. package/dist/executors/configs/codex-docker-config.js +0 -10
  82. package/dist/executors/configs/verify-build-config.js +0 -7
  83. package/dist/executors/verify-build-executor.js +0 -123
  84. package/dist/pipeline/flow-specs/auto.json +0 -979
  85. package/dist/pipeline/flow-specs/gitlab-review.json +0 -317
  86. package/dist/pipeline/flow-specs/plan-opencode.json +0 -603
  87. package/dist/pipeline/flow-specs/preflight.json +0 -206
  88. package/dist/pipeline/flow-specs/review-project.json +0 -243
  89. package/dist/pipeline/flow-specs/review.json +0 -312
  90. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  91. package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
  92. package/dist/pipeline/flows/preflight-flow.js +0 -19
  93. package/dist/pipeline/nodes/claude-prompt-node.js +0 -54
  94. package/dist/pipeline/nodes/codex-docker-prompt-node.js +0 -32
  95. package/dist/pipeline/nodes/codex-local-prompt-node.js +0 -32
  96. package/dist/pipeline/nodes/review-claude-node.js +0 -38
  97. package/dist/pipeline/nodes/review-reply-codex-node.js +0 -40
  98. package/dist/pipeline/nodes/verify-build-node.js +0 -15
  99. package/dist/runtime/docker-runtime.js +0 -51
  100. package/docker-compose.yml +0 -445
  101. package/verify_build.sh +0 -105
@@ -1,445 +0,0 @@
1
- services:
2
- dockerd:
3
- image: docker:27-dind
4
- privileged: true
5
- environment:
6
- DOCKER_TLS_CERTDIR: ""
7
- command: ["--host=tcp://0.0.0.0:2375", "--tls=false"]
8
- volumes:
9
- - docker-data:/var/lib/docker
10
- tmpfs:
11
- - /tmp
12
- healthcheck:
13
- test: ["CMD", "docker", "info"]
14
- interval: 5s
15
- timeout: 5s
16
- retries: 20
17
-
18
- codex:
19
- build:
20
- context: .
21
- dockerfile: Dockerfile.codex
22
- container_name: codex-agent
23
- working_dir: /workspace
24
- stdin_open: true
25
- tty: true
26
- init: true
27
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
28
- environment:
29
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
30
- CODEX_HOME: /codex-home
31
- HOME: /codex-home/home
32
- XDG_CACHE_HOME: /codex-home/cache/xdg
33
- GOPATH: /codex-home/go
34
- GOBIN: /codex-home/go/bin
35
- GOCACHE: /codex-home/cache/go-build
36
- GOMODCACHE: /codex-home/cache/gomod
37
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
38
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
39
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
40
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
41
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
42
- GIT_TERMINAL_PROMPT: "0"
43
- DOCKER_HOST: tcp://dockerd:2375
44
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
45
- depends_on:
46
- dockerd:
47
- condition: service_healthy
48
- volumes:
49
- - type: bind
50
- source: ${PROJECT_DIR:-/home/seko/RemoteProjects/ai/demo}
51
- target: /workspace
52
- bind:
53
- create_host_path: false
54
- - type: bind
55
- source: ${CODEX_HOME_DIR:-~/.codex}
56
- target: /codex-home
57
- bind:
58
- create_host_path: false
59
- - type: bind
60
- source: ${HOST_SSH_DIR:-~/.ssh}
61
- target: /codex-home/home/.ssh
62
- read_only: true
63
- bind:
64
- create_host_path: false
65
- - type: bind
66
- source: ${HOST_GITCONFIG:-~/.gitconfig}
67
- target: /codex-home/home/.gitconfig
68
- read_only: true
69
- bind:
70
- create_host_path: false
71
- command: ["--dangerously-bypass-approvals-and-sandbox"]
72
- cap_drop:
73
- - ALL
74
- security_opt:
75
- - no-new-privileges:true
76
- read_only: true
77
- tmpfs:
78
- - /tmp:exec,mode=1777
79
- - /root
80
-
81
- codex-exec:
82
- build:
83
- context: .
84
- dockerfile: Dockerfile.codex
85
- working_dir: /workspace
86
- init: true
87
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
88
- environment:
89
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
90
- CODEX_HOME: /codex-home
91
- HOME: /codex-home/home
92
- XDG_CACHE_HOME: /codex-home/cache/xdg
93
- GOPATH: /codex-home/go
94
- GOBIN: /codex-home/go/bin
95
- GOCACHE: /codex-home/cache/go-build
96
- GOMODCACHE: /codex-home/cache/gomod
97
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
98
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
99
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
100
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
101
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
102
- GIT_TERMINAL_PROMPT: "0"
103
- DOCKER_HOST: tcp://dockerd:2375
104
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
105
- CODEX_PROMPT: ${CODEX_PROMPT:-}
106
- CODEX_EXEC_FLAGS: ${CODEX_EXEC_FLAGS:---dangerously-bypass-approvals-and-sandbox}
107
- depends_on:
108
- dockerd:
109
- condition: service_healthy
110
- volumes:
111
- - type: bind
112
- source: ${PROJECT_DIR:-./}
113
- target: /workspace
114
- bind:
115
- create_host_path: false
116
- - type: bind
117
- source: ${CODEX_HOME_DIR:-~/.codex}
118
- target: /codex-home
119
- bind:
120
- create_host_path: false
121
- - type: bind
122
- source: ${HOST_SSH_DIR:-~/.ssh}
123
- target: /codex-home/home/.ssh
124
- read_only: true
125
- bind:
126
- create_host_path: false
127
- - type: bind
128
- source: ${HOST_GITCONFIG:-~/.gitconfig}
129
- target: /codex-home/home/.gitconfig
130
- read_only: true
131
- bind:
132
- create_host_path: false
133
- entrypoint: ["/bin/bash", "-lc"]
134
- command:
135
- - |
136
- set -euo pipefail
137
- if [[ -z "$${CODEX_PROMPT}" ]]; then
138
- echo "CODEX_PROMPT is required" >&2
139
- exit 1
140
- fi
141
- exec codex exec $${CODEX_EXEC_FLAGS} -- "$${CODEX_PROMPT}"
142
- cap_drop:
143
- - ALL
144
- security_opt:
145
- - no-new-privileges:true
146
- read_only: true
147
- tmpfs:
148
- - /tmp:exec,mode=1777
149
- - /root
150
-
151
- verify-build:
152
- build:
153
- context: .
154
- dockerfile: Dockerfile.codex
155
- working_dir: /workspace
156
- init: true
157
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
158
- environment:
159
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
160
- CODEX_HOME: /codex-home
161
- HOME: /codex-home/home
162
- XDG_CACHE_HOME: /codex-home/cache/xdg
163
- GOPATH: /codex-home/go
164
- GOBIN: /codex-home/go/bin
165
- GOCACHE: /codex-home/cache/go-build
166
- GOMODCACHE: /codex-home/cache/gomod
167
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
168
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
169
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
170
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
171
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
172
- GIT_TERMINAL_PROMPT: "0"
173
- DOCKER_HOST: tcp://dockerd:2375
174
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
175
- VERIFY_BUILD_ROOT_DIR: /workspace
176
- depends_on:
177
- dockerd:
178
- condition: service_healthy
179
- volumes:
180
- - type: bind
181
- source: ${PROJECT_DIR:-./}
182
- target: /workspace
183
- bind:
184
- create_host_path: false
185
- - type: bind
186
- source: ${CODEX_HOME_DIR:-~/.codex}
187
- target: /codex-home
188
- bind:
189
- create_host_path: false
190
- - type: bind
191
- source: ${HOST_SSH_DIR:-~/.ssh}
192
- target: /codex-home/home/.ssh
193
- read_only: true
194
- bind:
195
- create_host_path: false
196
- - type: bind
197
- source: ${HOST_GITCONFIG:-~/.gitconfig}
198
- target: /codex-home/home/.gitconfig
199
- read_only: true
200
- bind:
201
- create_host_path: false
202
- entrypoint: ["/usr/local/bin/verify_build.sh"]
203
- cap_drop:
204
- - ALL
205
- security_opt:
206
- - no-new-privileges:true
207
- read_only: true
208
- tmpfs:
209
- - /tmp:exec,mode=1777
210
- - /root
211
-
212
- run-go-tests:
213
- build:
214
- context: .
215
- dockerfile: Dockerfile.codex
216
- working_dir: /workspace
217
- init: true
218
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
219
- environment:
220
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
221
- CODEX_HOME: /codex-home
222
- HOME: /codex-home/home
223
- XDG_CACHE_HOME: /codex-home/cache/xdg
224
- GOPATH: /codex-home/go
225
- GOBIN: /codex-home/go/bin
226
- GOCACHE: /codex-home/cache/go-build
227
- GOMODCACHE: /codex-home/cache/gomod
228
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
229
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
230
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
231
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
232
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
233
- GIT_TERMINAL_PROMPT: "0"
234
- DOCKER_HOST: tcp://dockerd:2375
235
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
236
- VERIFY_BUILD_ROOT_DIR: /workspace
237
- depends_on:
238
- dockerd:
239
- condition: service_healthy
240
- volumes:
241
- - type: bind
242
- source: ${PROJECT_DIR:-./}
243
- target: /workspace
244
- bind:
245
- create_host_path: false
246
- - type: bind
247
- source: ${CODEX_HOME_DIR:-~/.codex}
248
- target: /codex-home
249
- bind:
250
- create_host_path: false
251
- - type: bind
252
- source: ${HOST_SSH_DIR:-~/.ssh}
253
- target: /codex-home/home/.ssh
254
- read_only: true
255
- bind:
256
- create_host_path: false
257
- - type: bind
258
- source: ${HOST_GITCONFIG:-~/.gitconfig}
259
- target: /codex-home/home/.gitconfig
260
- read_only: true
261
- bind:
262
- create_host_path: false
263
- entrypoint: ["/usr/local/bin/run_go_tests.py"]
264
- cap_drop:
265
- - ALL
266
- security_opt:
267
- - no-new-privileges:true
268
- read_only: true
269
- tmpfs:
270
- - /tmp:exec,mode=1777
271
- - /root
272
-
273
- run-go-linter:
274
- build:
275
- context: .
276
- dockerfile: Dockerfile.codex
277
- working_dir: /workspace
278
- init: true
279
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
280
- environment:
281
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
282
- CODEX_HOME: /codex-home
283
- HOME: /codex-home/home
284
- XDG_CACHE_HOME: /codex-home/cache/xdg
285
- GOPATH: /codex-home/go
286
- GOBIN: /codex-home/go/bin
287
- GOCACHE: /codex-home/cache/go-build
288
- GOMODCACHE: /codex-home/cache/gomod
289
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
290
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
291
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
292
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
293
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
294
- GIT_TERMINAL_PROMPT: "0"
295
- DOCKER_HOST: tcp://dockerd:2375
296
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
297
- VERIFY_BUILD_ROOT_DIR: /workspace
298
- depends_on:
299
- dockerd:
300
- condition: service_healthy
301
- volumes:
302
- - type: bind
303
- source: ${PROJECT_DIR:-./}
304
- target: /workspace
305
- bind:
306
- create_host_path: false
307
- - type: bind
308
- source: ${CODEX_HOME_DIR:-~/.codex}
309
- target: /codex-home
310
- bind:
311
- create_host_path: false
312
- - type: bind
313
- source: ${HOST_SSH_DIR:-~/.ssh}
314
- target: /codex-home/home/.ssh
315
- read_only: true
316
- bind:
317
- create_host_path: false
318
- - type: bind
319
- source: ${HOST_GITCONFIG:-~/.gitconfig}
320
- target: /codex-home/home/.gitconfig
321
- read_only: true
322
- bind:
323
- create_host_path: false
324
- entrypoint: ["/usr/local/bin/run_go_linter.py"]
325
- cap_drop:
326
- - ALL
327
- security_opt:
328
- - no-new-privileges:true
329
- read_only: true
330
- tmpfs:
331
- - /tmp:exec,mode=1777
332
- - /root
333
-
334
- run-go-coverage:
335
- build:
336
- context: .
337
- dockerfile: Dockerfile.codex
338
- working_dir: /workspace
339
- init: true
340
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
341
- environment:
342
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
343
- CODEX_HOME: /codex-home
344
- HOME: /codex-home/home
345
- XDG_CACHE_HOME: /codex-home/cache/xdg
346
- GOPATH: /codex-home/go
347
- GOBIN: /codex-home/go/bin
348
- GOCACHE: /codex-home/cache/go-build
349
- GOMODCACHE: /codex-home/cache/gomod
350
- GOLANGCI_LINT_CACHE: /codex-home/cache/golangci-lint
351
- GOPRIVATE: ${GOPRIVATE:-gitlab.yourdomain.org/*}
352
- GONOSUMDB: ${GONOSUMDB:-gitlab.yourdomain.org/*}
353
- GONOPROXY: ${GONOPROXY:-gitlab.yourdomain.org/*}
354
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
355
- GIT_TERMINAL_PROMPT: "0"
356
- DOCKER_HOST: tcp://dockerd:2375
357
- TESTCONTAINERS_HOST_OVERRIDE: dockerd
358
- VERIFY_BUILD_ROOT_DIR: /workspace
359
- depends_on:
360
- dockerd:
361
- condition: service_healthy
362
- volumes:
363
- - type: bind
364
- source: ${PROJECT_DIR:-./}
365
- target: /workspace
366
- bind:
367
- create_host_path: false
368
- - type: bind
369
- source: ${CODEX_HOME_DIR:-~/.codex}
370
- target: /codex-home
371
- bind:
372
- create_host_path: false
373
- - type: bind
374
- source: ${HOST_SSH_DIR:-~/.ssh}
375
- target: /codex-home/home/.ssh
376
- read_only: true
377
- bind:
378
- create_host_path: false
379
- - type: bind
380
- source: ${HOST_GITCONFIG:-~/.gitconfig}
381
- target: /codex-home/home/.gitconfig
382
- read_only: true
383
- bind:
384
- create_host_path: false
385
- entrypoint: ["/usr/local/bin/run_go_coverage.sh"]
386
- cap_drop:
387
- - ALL
388
- security_opt:
389
- - no-new-privileges:true
390
- read_only: true
391
- tmpfs:
392
- - /tmp:exec,mode=1777
393
- - /root
394
-
395
- codex-login:
396
- build:
397
- context: .
398
- dockerfile: Dockerfile.codex
399
- working_dir: /workspace
400
- stdin_open: true
401
- tty: true
402
- init: true
403
- user: "${LOCAL_UID:-1000}:${LOCAL_GID:-1000}"
404
- environment:
405
- PATH: /usr/local/go/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codex-home/go/bin:/go/bin
406
- CODEX_HOME: /codex-home
407
- HOME: /codex-home/home
408
- GIT_ALLOW_PROTOCOL: ${GIT_ALLOW_PROTOCOL:-file:https:ssh}
409
- GIT_TERMINAL_PROMPT: "0"
410
- volumes:
411
- - type: bind
412
- source: ${PROJECT_DIR:-./}
413
- target: /workspace
414
- bind:
415
- create_host_path: false
416
- - type: bind
417
- source: ${CODEX_HOME_DIR:-./.codex-home}
418
- target: /codex-home
419
- bind:
420
- create_host_path: false
421
- - type: bind
422
- source: ${HOST_SSH_DIR:-/home/seko/.ssh}
423
- target: /codex-home/home/.ssh
424
- read_only: true
425
- bind:
426
- create_host_path: false
427
- - type: bind
428
- source: ${HOST_GITCONFIG:-/home/seko/.gitconfig}
429
- target: /codex-home/home/.gitconfig
430
- read_only: true
431
- bind:
432
- create_host_path: false
433
- command: ["login"]
434
- cap_drop:
435
- - ALL
436
- security_opt:
437
- - no-new-privileges:true
438
- read_only: true
439
- tmpfs:
440
- - /tmp:exec,mode=1777
441
- - /root
442
- network_mode: host
443
-
444
- volumes:
445
- docker-data:
package/verify_build.sh DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- ROOT_DIR="${VERIFY_BUILD_ROOT_DIR:-$(pwd)}"
6
- BUILD_TARGET="./cmd/user-service"
7
- BUILD_OUTPUT="$ROOT_DIR/user-service"
8
-
9
- log() {
10
- printf '%s\n' "$*" >&2
11
- }
12
-
13
- details_json() {
14
- local template="$1"
15
- shift
16
- if command -v jq >/dev/null 2>&1; then
17
- jq -cn "$@" "$template"
18
- else
19
- printf '{}'
20
- fi
21
- }
22
-
23
- emit_result() {
24
- local ok="$1"
25
- local kind="$2"
26
- local stage="$3"
27
- local exit_code="$4"
28
- local summary="$5"
29
- local command="$6"
30
- local details_json="${7:-{}}"
31
-
32
- if ! command -v jq >/dev/null 2>&1; then
33
- printf '{"ok":%s,"kind":"%s","stage":"%s","exitCode":%s,"summary":"%s","command":"%s","details":{"error":"jq is required for structured output"}}\n' \
34
- "$ok" "$kind" "$stage" "$exit_code" "$summary" "$command"
35
- return
36
- fi
37
-
38
- jq -cn \
39
- --arg ok "$ok" \
40
- --arg kind "$kind" \
41
- --arg stage "$stage" \
42
- --arg exitCode "$exit_code" \
43
- --arg summary "$summary" \
44
- --arg command "$command" \
45
- --arg details "$details_json" \
46
- '{
47
- ok: ($ok == "true"),
48
- kind: $kind,
49
- stage: $stage,
50
- exitCode: ($exitCode | tonumber),
51
- summary: $summary,
52
- command: $command,
53
- details: ($details | fromjson? // {raw: $details})
54
- }'
55
- }
56
-
57
- fail() {
58
- local exit_code="$1"
59
- local summary="$2"
60
- local command="$3"
61
- local details_json="${4:-{}}"
62
-
63
- emit_result false "verify-build" "verify_build" "$exit_code" "$summary" "$command" "$details_json"
64
- exit "$exit_code"
65
- }
66
-
67
- require_cmd() {
68
- if ! command -v "$1" >/dev/null 2>&1; then
69
- fail 2 "Missing required command: $1" "$1" "$(details_json --arg failedStage "require_cmd" --arg missingCommand "$1" '{failedStage: $failedStage, missingCommand: $missingCommand}')"
70
- fi
71
- }
72
-
73
- run_stage() {
74
- local stage_name="$1"
75
- local script_path="$2"
76
- local output
77
- local exit_code=0
78
-
79
- if output=$("$script_path"); then
80
- :
81
- else
82
- exit_code=$?
83
- fi
84
-
85
- printf '%s\n' "$output" >&2
86
-
87
- if [[ "$exit_code" -ne 0 ]]; then
88
- fail "$exit_code" "${stage_name} stage failed" "$script_path" "$(details_json --arg failedStage "$stage_name" --arg rawOutput "$output" '{failedStage: $failedStage, stageResult: ($rawOutput | fromjson? // {raw: $rawOutput})}')"
89
- fi
90
- }
91
-
92
- require_cmd go
93
-
94
- cd "$ROOT_DIR"
95
-
96
- run_stage "run_go_linter" "$ROOT_DIR/run_go_linter.py"
97
- run_stage "run_go_tests" "$ROOT_DIR/run_go_tests.py"
98
- run_stage "run_go_coverage" "$ROOT_DIR/run_go_coverage.sh"
99
-
100
- log "==> Building binary (go build ${BUILD_TARGET})"
101
- if ! go build -o "$BUILD_OUTPUT" "$BUILD_TARGET" >&2; then
102
- fail 1 "go build failed" "go build -o <output> ./cmd/user-service" "$(details_json --arg failedStage "go-build" --arg buildTarget "$BUILD_TARGET" --arg buildOutput "$BUILD_OUTPUT" '{failedStage: $failedStage, buildTarget: $buildTarget, buildOutput: $buildOutput}')"
103
- fi
104
-
105
- emit_result true "verify-build" "verify_build" 0 "All verification stages passed" "run_go_linter.py && run_go_tests.py && run_go_coverage.sh && go build -o <output> ./cmd/user-service" "$(details_json --arg buildTarget "$BUILD_TARGET" --arg buildOutput "$BUILD_OUTPUT" '{completedStages: ["run_go_linter", "run_go_tests", "run_go_coverage", "go-build"], buildTarget: $buildTarget, buildOutput: $buildOutput}')"