@ngocsangairvds/vsaf 4.1.14 → 4.1.16

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 (136) hide show
  1. package/package.json +1 -1
  2. package/skills/vds-skill/runtime/AGENTS.md +10 -10
  3. package/skills/vds-skill/runtime/AGENTS.vi.md +6 -6
  4. package/skills/vds-skill/runtime/README.md +3 -3
  5. package/skills/vds-skill/runtime/bitbucket_orchestrator/BITBUCKET_API_PRACTICES.md +1 -1
  6. package/skills/vds-skill/runtime/bitbucket_orchestrator/FEATURES.md +75 -75
  7. package/skills/vds-skill/runtime/bitbucket_orchestrator/README.md +102 -102
  8. package/skills/vds-skill/runtime/brd_orchestrator/README.md +2 -2
  9. package/skills/vds-skill/runtime/confluence_orchestrator/README.md +97 -97
  10. package/skills/vds-skill/runtime/confluence_orchestrator/SYNC_SCRIPTS.md +12 -12
  11. package/skills/vds-skill/runtime/confluence_orchestrator/SYNC_STANDARDIZATION.md +6 -6
  12. package/skills/vds-skill/runtime/confluence_orchestrator/src/confluence_orchestrator/config.py +1 -1
  13. package/skills/vds-skill/runtime/diagram_generator/README.md +5 -5
  14. package/skills/vds-skill/runtime/docker/ROLLBACK.md +1 -1
  15. package/skills/vds-skill/runtime/docs/README.md +30 -30
  16. package/skills/vds-skill/runtime/docs/agents/explanation/runtime-verification-and-gap-reporting.md +4 -4
  17. package/skills/vds-skill/runtime/docs/agents/how-to/02-using-vds-ai-memory.md +1 -1
  18. package/skills/vds-skill/runtime/docs/agents/how-to/apply-phase3-migration.md +2 -2
  19. package/skills/vds-skill/runtime/docs/agents/how-to/first-audit-run.md +1 -1
  20. package/skills/vds-skill/runtime/docs/agents/how-to/install-and-bootstrap-who-scripts-and-skills.md +14 -14
  21. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/analytics-pipeline-workflow.md +9 -9
  22. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/code-quality-gate-workflow.md +5 -5
  23. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/confluence-bitbucket-sync-workflow.md +9 -9
  24. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/document-delivery-workflow.md +3 -3
  25. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/memory-progress-workflow.md +9 -9
  26. package/skills/vds-skill/runtime/docs/agents/how-to/orchestrator-workflows/research-spec-audit-workflow.md +8 -8
  27. package/skills/vds-skill/runtime/docs/agents/how-to/phase131-all-project-preparation.md +13 -13
  28. package/skills/vds-skill/runtime/docs/agents/how-to/phase131-bounded-parallel-analysis.md +6 -6
  29. package/skills/vds-skill/runtime/docs/agents/how-to/phase131-confluence-upload-recovery.md +4 -4
  30. package/skills/vds-skill/runtime/docs/agents/how-to/run-ecosystem-daily-report.md +8 -8
  31. package/skills/vds-skill/runtime/docs/agents/reference/audit-triage-playbook.md +10 -10
  32. package/skills/vds-skill/runtime/docs/agents/reference/cli-commands.md +34 -34
  33. package/skills/vds-skill/runtime/docs/agents/reference/cli-help-matrix.md +6 -6
  34. package/skills/vds-skill/runtime/docs/agents/reference/ecosystem-daily-report.md +3 -3
  35. package/skills/vds-skill/runtime/docs/agents/reference/portable-paths-and-config.md +0 -0
  36. package/skills/vds-skill/runtime/docs/agents/reference/portable-paths-validation-matrix.md +2 -2
  37. package/skills/vds-skill/runtime/docs/agents/reference/vds-ai-memory-api.md +1 -1
  38. package/skills/vds-skill/runtime/docs/agents/tutorials/who-skills-and-scripts-onboarding.md +4 -4
  39. package/skills/vds-skill/runtime/docs/agents/tutorials/zero-to-productive-developer.md +14 -14
  40. package/skills/vds-skill/runtime/docs/vi/agents/explanation/runtime-verification-and-gap-reporting.md +4 -4
  41. package/skills/vds-skill/runtime/docs/vi/agents/how-to/02-using-vds-ai-memory.md +1 -1
  42. package/skills/vds-skill/runtime/docs/vi/agents/how-to/first-audit-run.md +1 -1
  43. package/skills/vds-skill/runtime/docs/vi/agents/how-to/install-and-bootstrap-who-scripts-and-skills.md +10 -10
  44. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/analytics-pipeline-workflow.md +9 -9
  45. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/code-quality-gate-workflow.md +5 -5
  46. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/confluence-bitbucket-sync-workflow.md +9 -9
  47. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/document-delivery-workflow.md +3 -3
  48. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/memory-progress-workflow.md +9 -9
  49. package/skills/vds-skill/runtime/docs/vi/agents/how-to/orchestrator-workflows/research-spec-audit-workflow.md +8 -8
  50. package/skills/vds-skill/runtime/docs/vi/agents/how-to/phase131-all-project-preparation.md +13 -13
  51. package/skills/vds-skill/runtime/docs/vi/agents/how-to/phase131-bounded-parallel-analysis.md +6 -6
  52. package/skills/vds-skill/runtime/docs/vi/agents/how-to/phase131-confluence-upload-recovery.md +4 -4
  53. package/skills/vds-skill/runtime/docs/vi/agents/how-to/tips-and-tricks.md +1 -1
  54. package/skills/vds-skill/runtime/docs/vi/agents/reference/audit-triage-playbook.md +10 -10
  55. package/skills/vds-skill/runtime/docs/vi/agents/reference/cli-commands.md +34 -34
  56. package/skills/vds-skill/runtime/docs/vi/agents/reference/cli-help-matrix.md +6 -6
  57. package/skills/vds-skill/runtime/docs/vi/agents/reference/portable-paths-and-config.md +3 -3
  58. package/skills/vds-skill/runtime/docs/vi/agents/reference/portable-paths-validation-matrix.md +2 -2
  59. package/skills/vds-skill/runtime/docs/vi/agents/reference/vds-ai-memory-api.md +1 -1
  60. package/skills/vds-skill/runtime/docs/vi/agents/tutorials/who-skills-and-scripts-onboarding.md +4 -4
  61. package/skills/vds-skill/runtime/docs/vi/agents/tutorials/zero-to-productive-developer.md +4 -4
  62. package/skills/vds-skill/runtime/elastic_orchestrator/README.md +31 -31
  63. package/skills/vds-skill/runtime/elastic_orchestrator/src/vds_elastic_orchestrator/cli.py +2 -2
  64. package/skills/vds-skill/runtime/excel_orchestrator/README.md +22 -22
  65. package/skills/vds-skill/runtime/git_orchestrator/README.md +46 -46
  66. package/skills/vds-skill/runtime/google_sheets_orchestrator/README.md +15 -15
  67. package/skills/vds-skill/runtime/grafana_orchestrator/README.md +44 -44
  68. package/skills/vds-skill/runtime/grafana_orchestrator/src/vds_grafana_orchestrator/cli.py +2 -2
  69. package/skills/vds-skill/runtime/jira_orchestrator/README.md +119 -119
  70. package/skills/vds-skill/runtime/jira_viettelmoney_orchestrator/README.md +117 -117
  71. package/skills/vds-skill/runtime/markdown_orchestrator/README.md +9 -9
  72. package/skills/vds-skill/runtime/pdf_orchestrator/README.md +4 -4
  73. package/skills/vds-skill/runtime/scripts/README.md +2 -2
  74. package/skills/vds-skill/runtime/scripts/move_audit_artifact_pages.py +1 -1
  75. package/skills/vds-skill/runtime/scripts/move_audit_artifact_pages_rest.py +1 -1
  76. package/skills/vds-skill/runtime/scripts/move_wrong_dept_pages.py +1 -1
  77. package/skills/vds-skill/runtime/scripts/uv-workspace-alignment-verification-2026-03-25.md +1 -1
  78. package/skills/vds-skill/runtime/sonarqube_orchestrator/IMPLEMENTATION_AUDIT.md +1 -1
  79. package/skills/vds-skill/runtime/sonarqube_orchestrator/README.md +11 -11
  80. package/skills/vds-skill/runtime/sonarqube_orchestrator/src/vds_sonarqube_orchestrator/cli.py +3 -3
  81. package/skills/vds-skill/runtime/vds_agent_core/docs/embedding.md +3 -3
  82. package/skills/vds-skill/runtime/vds_cli/README.md +48 -48
  83. package/skills/vds-skill/runtime/vds_cli/src/vds_cli/cli.py +1 -1
  84. package/skills/vds-skill/runtime/vds_cli/src/vds_cli/confluence_sync.py +3 -3
  85. package/skills/vds-skill/runtime/vds_cli/tests/unit/test_confluence_sync.py +1 -1
  86. package/skills/vds-skill/runtime/vds_cli_common/tests/test_env.py +0 -105
  87. package/skills/vds-skill/runtime/diagram_generator/ci_validate.sh +0 -16
  88. package/skills/vds-skill/runtime/pdf_orchestrator/scripts/setup_team.sh +0 -324
  89. package/skills/vds-skill/runtime/scripts/audit-cli-patterns.sh +0 -135
  90. package/skills/vds-skill/runtime/scripts/audit-dashboard.sh +0 -525
  91. package/skills/vds-skill/runtime/scripts/backup.sh +0 -123
  92. package/skills/vds-skill/runtime/scripts/bootstrap_uv.sh +0 -69
  93. package/skills/vds-skill/runtime/scripts/ci/assert_no_openspace_commits.sh +0 -37
  94. package/skills/vds-skill/runtime/scripts/ci/verify_branch_protection.sh +0 -64
  95. package/skills/vds-skill/runtime/scripts/closure/phase1_check.sh +0 -483
  96. package/skills/vds-skill/runtime/scripts/closure/phase2_check.sh +0 -500
  97. package/skills/vds-skill/runtime/scripts/deploy-bootstrap.sh +0 -201
  98. package/skills/vds-skill/runtime/scripts/deployment/load_docker_images_offline.sh +0 -90
  99. package/skills/vds-skill/runtime/scripts/dev/cli_smoke.sh +0 -259
  100. package/skills/vds-skill/runtime/scripts/init-pgbouncer-userlist.sh +0 -154
  101. package/skills/vds-skill/runtime/scripts/openspace_bootstrap.sh +0 -56
  102. package/skills/vds-skill/runtime/scripts/openspace_common.sh +0 -75
  103. package/skills/vds-skill/runtime/scripts/openspace_doctor.sh +0 -61
  104. package/skills/vds-skill/runtime/scripts/openspace_sync_shadow.sh +0 -65
  105. package/skills/vds-skill/runtime/scripts/phase7-baseline.sh +0 -77
  106. package/skills/vds-skill/runtime/scripts/preflight/env_check.sh +0 -102
  107. package/skills/vds-skill/runtime/scripts/repair_autopay_reports.sh +0 -173
  108. package/skills/vds-skill/runtime/scripts/rollback_drill.sh +0 -659
  109. package/skills/vds-skill/runtime/scripts/run-audit-in-tmux.sh +0 -286
  110. package/skills/vds-skill/runtime/scripts/run-department-audit.sh +0 -495
  111. package/skills/vds-skill/runtime/scripts/run-project-audit.sh +0 -267
  112. package/skills/vds-skill/runtime/scripts/smoke-test-deploy.sh +0 -137
  113. package/skills/vds-skill/runtime/scripts/target-state-automation/confluence_sync_coordinator.sh +0 -27
  114. package/skills/vds-skill/runtime/scripts/target-state-automation/coordination.sh +0 -114
  115. package/skills/vds-skill/runtime/scripts/target-state-automation/diagram_coordinator.sh +0 -25
  116. package/skills/vds-skill/runtime/scripts/target-state-automation/docs_root.sh +0 -22
  117. package/skills/vds-skill/runtime/scripts/target-state-automation/generate_diagrams.sh +0 -22
  118. package/skills/vds-skill/runtime/scripts/target-state-automation/markdown_coordinator.sh +0 -25
  119. package/skills/vds-skill/runtime/scripts/target-state-automation/progress_dashboard.sh +0 -17
  120. package/skills/vds-skill/runtime/scripts/target-state-automation/schema_coordinator.sh +0 -25
  121. package/skills/vds-skill/runtime/scripts/target-state-automation/sync_confluence.sh +0 -30
  122. package/skills/vds-skill/runtime/scripts/target-state-automation/update_dependencies.sh +0 -19
  123. package/skills/vds-skill/runtime/scripts/target-state-automation/validate_links.sh +0 -86
  124. package/skills/vds-skill/runtime/scripts/target-state-automation/validate_markdown.sh +0 -52
  125. package/skills/vds-skill/runtime/scripts/target-state-automation/validate_schemas.sh +0 -26
  126. package/skills/vds-skill/runtime/scripts/target-state-automation/validate_structure.sh +0 -98
  127. package/skills/vds-skill/runtime/scripts/validate-cli-standardization.sh +0 -188
  128. package/skills/vds-skill/runtime/scripts/vds_sh_helpers.sh +0 -180
  129. package/skills/vds-skill/runtime/scripts/verification/phase2_portable_paths_ubuntu_docker.sh +0 -26
  130. package/skills/vds-skill/runtime/scripts/verify-memory-cli-e2e.sh +0 -598
  131. package/skills/vds-skill/runtime/scripts/verify-worktree-features.sh +0 -306
  132. package/skills/vds-skill/runtime/scripts/worktree-add.sh +0 -128
  133. package/skills/vds-skill/runtime/scripts/worktree-remove.sh +0 -112
  134. package/skills/vds-skill/runtime/scripts/worktree_compose.sh +0 -269
  135. package/skills/vds-skill/runtime/scripts/worktree_uv.sh +0 -77
  136. package/skills/vds-skill/runtime/sonarqube_orchestrator/scripts/ensure_symlink.sh +0 -38
@@ -1,269 +0,0 @@
1
- #!/usr/bin/env bash
2
- # VDS AI Memory — worktree-safe Docker-Compose wrapper (VAMI-013 / Phase 176).
3
- #
4
- # Analogue of scripts/worktree_uv.sh for Docker Compose. Detects mainline vs
5
- # worktree, auto-copies memory_orchestrator/.env from mainline when missing,
6
- # pins compose --project-directory to the worktree's memory_orchestrator/, and
7
- # forces compose project identity "vds-ai-memory" so named volumes reattach
8
- # across worktree switches.
9
- #
10
- # Usage:
11
- # scripts/worktree_compose.sh up [--force]
12
- # scripts/worktree_compose.sh down
13
- # scripts/worktree_compose.sh restart
14
- # scripts/worktree_compose.sh logs [service...]
15
- # scripts/worktree_compose.sh ps
16
- # scripts/worktree_compose.sh <anything-else> # pass-through
17
- #
18
- # Env:
19
- # VDS_MAIN_WORKTREE Explicit mainline path override (ADR-6).
20
- # COMPOSE_PROFILES Comma-list of profiles (dev|prod|mem0|full).
21
- #
22
- # Exit codes:
23
- # 0 success
24
- # 1 usage error
25
- # 2 safety refusal (missing .env, bind-mount mismatch)
26
- # >2 docker compose exit code
27
-
28
- set -euo pipefail
29
-
30
- PROJECT_NAME="vds-ai-memory"
31
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
32
- REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
33
- MEMORY_DIR="${REPO_ROOT}/memory_orchestrator"
34
-
35
- # ──────────────────────────────────────────────────────────────
36
- # Detection
37
- # ──────────────────────────────────────────────────────────────
38
-
39
- detect_mode() {
40
- # Compare git-dir (per-worktree) vs git-common-dir (shared). They differ
41
- # inside a worktree, match inside the primary checkout.
42
- local git_dir git_common
43
- git_dir="$(git -C "${REPO_ROOT}" rev-parse --absolute-git-dir 2>/dev/null || echo "")"
44
- git_common="$(git -C "${REPO_ROOT}" rev-parse --path-format=absolute --git-common-dir 2>/dev/null || echo "")"
45
- if [[ -z "${git_dir}" || -z "${git_common}" ]]; then
46
- echo "mainline" # not a git checkout; treat as mainline
47
- return
48
- fi
49
- if [[ "${git_dir}" == "${git_common}" ]]; then
50
- echo "mainline"
51
- else
52
- echo "worktree"
53
- fi
54
- }
55
-
56
- resolve_mainline() {
57
- # Return the filesystem path of the primary (non-bare, non-locked) worktree.
58
- # Priority: VDS_MAIN_WORKTREE env override > first entry in `git worktree
59
- # list --porcelain` whose `bare` flag is absent and which is not listed as
60
- # locked with a path different from REPO_ROOT.
61
- if [[ -n "${VDS_MAIN_WORKTREE:-}" ]]; then
62
- echo "${VDS_MAIN_WORKTREE}"
63
- return
64
- fi
65
- local line path_line bare_line
66
- path_line=""
67
- while IFS= read -r line; do
68
- if [[ "${line}" == worktree\ * ]]; then
69
- path_line="${line#worktree }"
70
- bare_line=""
71
- elif [[ "${line}" == "bare" ]]; then
72
- bare_line="yes"
73
- elif [[ -z "${line}" ]]; then
74
- # record terminator — emit if this is the first non-bare one
75
- if [[ -n "${path_line}" && -z "${bare_line}" ]]; then
76
- # The primary worktree is the one whose git-dir has no `gitdir` file
77
- # (i.e., its .git is a real directory, not a pointer).
78
- if [[ -d "${path_line}/.git" ]]; then
79
- echo "${path_line}"
80
- return
81
- fi
82
- fi
83
- path_line=""
84
- bare_line=""
85
- fi
86
- done < <(git -C "${REPO_ROOT}" worktree list --porcelain 2>/dev/null; echo "")
87
- # Fallback: guess by convention (WHO-project/vds-scripts sibling of
88
- # worktrees/<branch>). Not authoritative — user should set VDS_MAIN_WORKTREE.
89
- local guess="${REPO_ROOT%/worktrees/*}"
90
- if [[ "${guess}" != "${REPO_ROOT}" && -d "${guess}/.git" ]]; then
91
- # guess is e.g. .../WHO-project (parent of worktrees/). Walk one level
92
- # down to vds-scripts.
93
- if [[ -d "${guess}/vds-scripts/.git" ]]; then
94
- echo "${guess}/vds-scripts"
95
- return
96
- fi
97
- fi
98
- echo "" # unresolved — caller must handle
99
- }
100
-
101
- resolve_memory_dir() {
102
- echo "${MEMORY_DIR}"
103
- }
104
-
105
- # ──────────────────────────────────────────────────────────────
106
- # .env handling (T-A3)
107
- # ──────────────────────────────────────────────────────────────
108
-
109
- ensure_env_file() {
110
- local mode="$1"
111
- local env_file="${MEMORY_DIR}/.env"
112
- if [[ -f "${env_file}" ]]; then
113
- ENV_SOURCE="${env_file} (already present)"
114
- return
115
- fi
116
- if [[ "${mode}" == "mainline" ]]; then
117
- echo "error: ${env_file} is missing on mainline; cannot bootstrap" >&2
118
- exit 2
119
- fi
120
- local mainline
121
- mainline="$(resolve_mainline)"
122
- if [[ -z "${mainline}" ]]; then
123
- echo "error: cannot locate mainline worktree. Set VDS_MAIN_WORKTREE." >&2
124
- exit 2
125
- fi
126
- local src="${mainline}/memory_orchestrator/.env"
127
- if [[ ! -f "${src}" ]]; then
128
- echo "error: mainline .env not found at ${src}" >&2
129
- exit 2
130
- fi
131
- # FR-6: never write to mainline. We only READ src and copy INTO worktree.
132
- cp "${src}" "${env_file}"
133
- ENV_SOURCE="copied from ${src}"
134
- }
135
-
136
- # ──────────────────────────────────────────────────────────────
137
- # Bind-mount mismatch guard (T-A2, FR-5)
138
- # ──────────────────────────────────────────────────────────────
139
-
140
- check_bind_mount_mismatch() {
141
- local force="$1"
142
- # Inspect the currently-running `vds-ai-memory` compose project (if any).
143
- # If its ConfigFiles points to a different memory_orchestrator/compose.yaml
144
- # than ours, refuse to `up`.
145
- local json
146
- if ! json="$(docker compose ls --all --format json 2>/dev/null)"; then
147
- return 0 # docker unavailable — let the subsequent command fail naturally
148
- fi
149
- # Cheap parsing: look for a project named vds-ai-memory
150
- local match
151
- match="$(printf '%s\n' "${json}" \
152
- | python3 -c "
153
- import json, sys
154
- try:
155
- data = json.loads(sys.stdin.read() or '[]')
156
- except json.JSONDecodeError:
157
- sys.exit(0)
158
- for entry in data if isinstance(data, list) else []:
159
- name = entry.get('Name') or entry.get('name')
160
- if name == 'vds-ai-memory':
161
- print(entry.get('ConfigFiles') or entry.get('configFiles') or '')
162
- break
163
- " 2>/dev/null || echo "")"
164
- if [[ -z "${match}" ]]; then
165
- return 0 # no running project to conflict with
166
- fi
167
- local our="${MEMORY_DIR}/compose.yaml"
168
- if [[ "${match}" != *"${our}"* ]]; then
169
- if [[ "${force}" == "yes" ]]; then
170
- echo "warning: vds-ai-memory already running from '${match}'; --force overrides the guard" >&2
171
- return 0
172
- fi
173
- echo "error: compose project 'vds-ai-memory' is already running from a different tree:" >&2
174
- echo " ${match}" >&2
175
- echo " run 'scripts/worktree_compose.sh down' in that tree first, or pass --force." >&2
176
- exit 2
177
- fi
178
- }
179
-
180
- # ──────────────────────────────────────────────────────────────
181
- # Pre-flight (T-A1 / FR-3)
182
- # ──────────────────────────────────────────────────────────────
183
-
184
- print_preflight() {
185
- local mode="$1"
186
- local subcommand="$2"
187
- echo "=== worktree_compose.sh pre-flight ==="
188
- echo " mode : ${mode}"
189
- echo " repo_root : ${REPO_ROOT}"
190
- echo " memory_dir : ${MEMORY_DIR}"
191
- echo " compose_project : ${PROJECT_NAME}"
192
- echo " env_source : ${ENV_SOURCE:-<not resolved>}"
193
- echo " compose_profiles : ${COMPOSE_PROFILES:-<none>}"
194
- echo " subcommand : ${subcommand}"
195
- if [[ "${mode}" == "worktree" ]]; then
196
- echo " mainline : $(resolve_mainline || echo '<unresolved>')"
197
- fi
198
- echo "======================================="
199
- }
200
-
201
- # ──────────────────────────────────────────────────────────────
202
- # Dispatch (T-A4)
203
- # ──────────────────────────────────────────────────────────────
204
-
205
- compose() {
206
- # All subcommands go through this single entry so --project-directory and -p
207
- # are applied consistently.
208
- docker compose \
209
- --project-directory "${MEMORY_DIR}" \
210
- -p "${PROJECT_NAME}" \
211
- "$@"
212
- }
213
-
214
- usage() {
215
- sed -n '2,25p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
216
- }
217
-
218
- main() {
219
- local subcommand="${1:-}"
220
- if [[ -z "${subcommand}" || "${subcommand}" == "-h" || "${subcommand}" == "--help" ]]; then
221
- usage
222
- exit 0
223
- fi
224
- shift
225
-
226
- local mode
227
- mode="$(detect_mode)"
228
-
229
- # --force is only meaningful for `up`.
230
- local force="no"
231
- local -a rest=()
232
- for arg in "$@"; do
233
- case "${arg}" in
234
- --force) force="yes" ;;
235
- *) rest+=("${arg}") ;;
236
- esac
237
- done
238
-
239
- ensure_env_file "${mode}"
240
-
241
- case "${subcommand}" in
242
- up)
243
- check_bind_mount_mismatch "${force}"
244
- print_preflight "${mode}" "up"
245
- compose up -d "${rest[@]+"${rest[@]}"}"
246
- ;;
247
- down)
248
- print_preflight "${mode}" "down"
249
- compose down "${rest[@]+"${rest[@]}"}"
250
- ;;
251
- restart)
252
- print_preflight "${mode}" "restart"
253
- compose restart "${rest[@]+"${rest[@]}"}"
254
- ;;
255
- logs)
256
- compose logs "${rest[@]+"${rest[@]}"}"
257
- ;;
258
- ps)
259
- compose ps "${rest[@]+"${rest[@]}"}"
260
- ;;
261
- *)
262
- # Pass-through: unknown subcommand is forwarded verbatim.
263
- print_preflight "${mode}" "${subcommand} (pass-through)"
264
- compose "${subcommand}" "${rest[@]+"${rest[@]}"}"
265
- ;;
266
- esac
267
- }
268
-
269
- main "$@"
@@ -1,77 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Run uv in the current worktree without inheriting a mismatched active virtualenv.
3
- # Usage: scripts/worktree_uv.sh <uv args...>
4
-
5
- set -euo pipefail
6
-
7
- ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
- WORKTREE_VENV="${ROOT}/.venv"
9
- site_packages="$(echo "$WORKTREE_VENV"/lib/python*/site-packages)"
10
-
11
- # uv project commands manage their own environment by default.
12
- # If a parent checkout exported VIRTUAL_ENV from a different repo/worktree,
13
- # uv will warn and ignore it. Clear inherited active-environment state so
14
- # worktree commands are quiet and deterministic.
15
- if [[ -n "${VIRTUAL_ENV:-}" && "${VIRTUAL_ENV}" != "${WORKTREE_VENV}" ]]; then
16
- unset VIRTUAL_ENV
17
- fi
18
-
19
- # Prevent a parent shell from forcing a different project environment.
20
- unset UV_PROJECT_ENVIRONMENT
21
- unset CONDA_PREFIX
22
-
23
- # Worktree venvs in this repo rely on editable _vds_*.pth files. Rebuild
24
- # PYTHONPATH from those stubs so uv-launched entrypoints resolve workspace
25
- # packages consistently even when Python skips underscore-prefixed .pth files.
26
- if [[ -d "$site_packages" ]]; then
27
- pythonpath_entries=()
28
- while IFS= read -r -d '' pth_file; do
29
- while IFS= read -r line || [[ -n "$line" ]]; do
30
- [[ -z "$line" ]] && continue
31
- pythonpath_entries+=("$line")
32
- done < "$pth_file"
33
- done < <(find "$site_packages" -maxdepth 1 -type f -name '_vds_*.pth' -print0 | sort -z)
34
-
35
- if [[ ${#pythonpath_entries[@]} -gt 0 ]]; then
36
- joined_pythonpath=""
37
- for entry in "${pythonpath_entries[@]}"; do
38
- if [[ -z "$joined_pythonpath" ]]; then
39
- joined_pythonpath="$entry"
40
- else
41
- joined_pythonpath="$joined_pythonpath:$entry"
42
- fi
43
- done
44
- export PYTHONPATH="$joined_pythonpath${PYTHONPATH:+:$PYTHONPATH}"
45
- fi
46
- fi
47
-
48
- # Hydrate missing runtime env from ~/.vds/.env so uv-launched Python and child
49
- # shells see the same baseline config as CLI entrypoints. Preserve explicit shell
50
- # overrides by only exporting keys that are currently unset.
51
- bootstrap_python="${WORKTREE_VENV}/bin/python"
52
- if [[ ! -x "$bootstrap_python" ]]; then
53
- bootstrap_python="$(command -v python3 || true)"
54
- fi
55
- if [[ -n "${bootstrap_python}" ]]; then
56
- if shared_env_exports="$(VDS_WORKTREE_UV_ROOT="$ROOT" "$bootstrap_python" - <<'PY' 2>/dev/null
57
- import os
58
- import sys
59
- from pathlib import Path
60
-
61
- root = Path(os.environ["VDS_WORKTREE_UV_ROOT"])
62
- sys.path.insert(0, str(root / "vds_cli_common" / "src"))
63
-
64
- from vds_cli_common.env import render_shared_env_exports
65
-
66
- print(render_shared_env_exports(ensure_defaults=False))
67
- PY
68
- )"; then
69
- if [[ -n "$shared_env_exports" ]]; then
70
- eval "$shared_env_exports"
71
- fi
72
- fi
73
- fi
74
-
75
- cd "$ROOT"
76
-
77
- exec uv "$@"
@@ -1,38 +0,0 @@
1
- #!/bin/bash
2
- # Ensure the editable install symlink exists for sonarqube_orchestrator
3
- # This is needed because .pth files with paths containing spaces don't work reliably
4
-
5
- set -e
6
-
7
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
9
- VENV_SITE_PACKAGES="$PROJECT_ROOT/.venv/lib/python3.13/site-packages"
10
- PACKAGE_SOURCE="$PROJECT_ROOT/src/vds_sonarqube_orchestrator"
11
- PACKAGE_LINK="$VENV_SITE_PACKAGES/vds_sonarqube_orchestrator"
12
- VENV_PYTHON="$PROJECT_ROOT/.venv/bin/python"
13
-
14
- echo "Checking sonarqube_orchestrator editable install..."
15
-
16
- # Remove existing link if it's a broken symlink
17
- if [ -L "$PACKAGE_LINK" ] && [ ! -e "$PACKAGE_LINK" ]; then
18
- echo "Removing broken symlink: $PACKAGE_LINK"
19
- rm "$PACKAGE_LINK"
20
- fi
21
-
22
- # Create symlink if it doesn't exist
23
- if [ ! -e "$PACKAGE_LINK" ]; then
24
- echo "Creating symlink: $PACKAGE_LINK -> $PACKAGE_SOURCE"
25
- ln -sf "$PACKAGE_SOURCE" "$PACKAGE_LINK"
26
- echo "✓ Symlink created successfully"
27
- else
28
- echo "✓ Symlink already exists"
29
- fi
30
-
31
- # Verify the import works
32
- echo "Verifying import..."
33
- if "$VENV_PYTHON" -c "from vds_sonarqube_orchestrator import SonarqubeClient" 2>/dev/null; then
34
- echo "✓ Import verification successful"
35
- else
36
- echo "✗ Import verification failed"
37
- exit 1
38
- fi