devzone 1.1.0 → 3.0.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 (118) hide show
  1. package/.devcontainer/Dockerfile +4 -4
  2. package/.devcontainer/{agent-erreurs.sh → agent-errors.sh} +6 -6
  3. package/.devcontainer/agent-local.sh +2 -2
  4. package/.devcontainer/{agent-modele.messages → agent-model.messages} +1 -1
  5. package/.devcontainer/{agent-modele.sh → agent-model.sh} +5 -5
  6. package/.devcontainer/agent-pod-manifest.sh +4 -4
  7. package/.devcontainer/{agent-droits.sh → agent-rights.sh} +2 -2
  8. package/.devcontainer/agent-session.sh +3 -3
  9. package/.devcontainer/{agent-etat-json.sh → agent-state-json.sh} +6 -6
  10. package/.devcontainer/agent-workspace.sh +1 -1
  11. package/.devcontainer/agent.sh +14 -14
  12. package/.devcontainer/{ia/docker-garde.sh → ai/docker-guard.sh} +1 -1
  13. package/.devcontainer/{ia → ai}/host-models.sh +2 -2
  14. package/.devcontainer/{ia/plugins/devzone-garde-v2.js → ai/plugins/devzone-guard-v2.js} +7 -7
  15. package/.devcontainer/{ia/plugins/devzone-garde.js → ai/plugins/devzone-guard.js} +6 -6
  16. package/.devcontainer/argocd/argocd.sh +94 -93
  17. package/.devcontainer/argocd/{catalogue-argocd.sh → catalog-argocd.sh} +3 -3
  18. package/.devcontainer/argocd/services-hook.sh +8 -8
  19. package/.devcontainer/argocd/services.sh +1 -1
  20. package/.devcontainer/catalog/app.sh +209 -0
  21. package/.devcontainer/catalog/catalog-watcher.sh +130 -0
  22. package/.devcontainer/{catalogue → catalog}/mysql/app.conf +1 -1
  23. package/.devcontainer/catalog/mysql/install.sh +87 -0
  24. package/.devcontainer/catalog/mysql/mysql.sh +262 -0
  25. package/.devcontainer/catalog/mysql/volume.sh +71 -0
  26. package/.devcontainer/catalog.sh +231 -0
  27. package/.devcontainer/chart-direct.sh +1 -1
  28. package/.devcontainer/cluster.sh +222 -224
  29. package/.devcontainer/clusters.sh +41 -41
  30. package/.devcontainer/devcontainer.json +1 -1
  31. package/.devcontainer/devzone +103 -1506
  32. package/.devcontainer/devzone-ai-guard.sh +76 -0
  33. package/.devcontainer/devzone-ai.sh +201 -0
  34. package/.devcontainer/devzone-cluster.sh +210 -0
  35. package/.devcontainer/devzone-modules.sh +126 -0
  36. package/.devcontainer/devzone-platform.sh +189 -0
  37. package/.devcontainer/devzone-repair.sh +94 -0
  38. package/.devcontainer/devzone-services.sh +241 -0
  39. package/.devcontainer/devzone-skill.sh +97 -0
  40. package/.devcontainer/devzone-status.sh +140 -0
  41. package/.devcontainer/devzone-version.sh +78 -0
  42. package/.devcontainer/git-identity.sh +28 -0
  43. package/.devcontainer/gitlab/argocd.sh +2 -2
  44. package/.devcontainer/gitlab/chart.sh +2 -2
  45. package/.devcontainer/gitlab/gitlab.sh +83 -84
  46. package/.devcontainer/gitlab/installation.sh +111 -111
  47. package/.devcontainer/gitlab/secrets.sh +47 -47
  48. package/.devcontainer/gitlab/seed.sh +77 -77
  49. package/.devcontainer/gitlab/test-gitlab.sh +242 -243
  50. package/.devcontainer/help.sh +1 -1
  51. package/.devcontainer/isolation.sh +65 -0
  52. package/.devcontainer/kind-wrapper.sh +45 -0
  53. package/.devcontainer/kube-account.sh +199 -0
  54. package/.devcontainer/kube-config.sh +45 -46
  55. package/.devcontainer/{invite-kube.sh → kube-prompt.sh} +6 -6
  56. package/.devcontainer/kube-reachable.sh +64 -0
  57. package/.devcontainer/{memoire.sh → memory.sh} +1 -1
  58. package/.devcontainer/metrics-server.sh +2 -2
  59. package/.devcontainer/opencode.jsonc +2 -2
  60. package/.devcontainer/packages.sh +228 -0
  61. package/.devcontainer/password.sh +1 -1
  62. package/.devcontainer/ports-auto.sh +152 -153
  63. package/.devcontainer/ports-json.sh +16 -15
  64. package/.devcontainer/ports.sh +127 -123
  65. package/.devcontainer/post-create.sh +52 -52
  66. package/.devcontainer/postgres/postgres.sh +176 -176
  67. package/.devcontainer/rename-legacy-files.sh +103 -0
  68. package/.devcontainer/services-admin.sh +5 -5
  69. package/.devcontainer/skills/devzone/SKILL.md +40 -41
  70. package/.devcontainer/startup.sh +65 -0
  71. package/.devcontainer/{etat-gitops.sh → state-gitops.sh} +1 -1
  72. package/.devcontainer/{etat-json.sh → state-json.sh} +39 -65
  73. package/.devcontainer/{etat-verrou.sh → state-lock.sh} +1 -1
  74. package/.devcontainer/{etat.sh → state.sh} +4 -4
  75. package/.devcontainer/workspace-init.sh +17 -3
  76. package/Makefile +8 -8
  77. package/README.md +195 -194
  78. package/charts/devzone-workspace/templates/statefulset.yaml +1 -1
  79. package/manage/devzone +8 -10
  80. package/manage/scripts/argocd-workspace.sh +1 -1
  81. package/manage/scripts/check-go-layout.sh +40 -0
  82. package/manage/scripts/check-names.sh +61 -0
  83. package/manage/scripts/create-cluster.sh +1 -1
  84. package/manage/scripts/create-mode.sh +2 -2
  85. package/manage/scripts/devzone-create.sh +5 -5
  86. package/manage/scripts/devzone-manifest.sh +3 -3
  87. package/manage/scripts/devzone-update.sh +12 -8
  88. package/manage/scripts/docker-workstation.sh +2 -2
  89. package/manage/scripts/docker.sh +2 -2
  90. package/manage/scripts/{lancer.sh → launch.sh} +10 -51
  91. package/manage/scripts/{migrer-retour.sh → migrate-revert.sh} +4 -4
  92. package/manage/scripts/{migrer.sh → migrate.sh} +8 -14
  93. package/manage/scripts/ports-apps.sh +1 -1
  94. package/manage/scripts/ports-workspace.sh +7 -7
  95. package/manage/scripts/{desinstaller.sh → uninstall.sh} +8 -8
  96. package/manage/scripts/workspace-egress.sh +2 -2
  97. package/manage/scripts/workspace-update.sh +5 -2
  98. package/manage/scripts/workspace-wait.sh +2 -2
  99. package/manage/workspace.sh +4 -4
  100. package/package.json +1 -1
  101. package/.devcontainer/catalogue/app.sh +0 -211
  102. package/.devcontainer/catalogue/catalogue-veilleur.sh +0 -130
  103. package/.devcontainer/catalogue/mysql/installer.sh +0 -87
  104. package/.devcontainer/catalogue/mysql/mysql.sh +0 -262
  105. package/.devcontainer/catalogue/mysql/volume.sh +0 -71
  106. package/.devcontainer/catalogue.sh +0 -231
  107. package/.devcontainer/demarrage.sh +0 -66
  108. package/.devcontainer/docker-relais.sh +0 -149
  109. package/.devcontainer/docker-sans-hote.sh +0 -12
  110. package/.devcontainer/git-identite.sh +0 -28
  111. package/.devcontainer/isolement.sh +0 -65
  112. package/.devcontainer/kind-enveloppe.sh +0 -45
  113. package/.devcontainer/kube-compte.sh +0 -200
  114. package/.devcontainer/kube-joignable.sh +0 -64
  115. package/.devcontainer/paquets.sh +0 -227
  116. /package/.devcontainer/{ia/docker-garde.message → ai/docker-guard.message} +0 -0
  117. /package/.devcontainer/{ia → ai}/host-check.message +0 -0
  118. /package/.devcontainer/{ia → ai}/host-check.sh +0 -0
@@ -108,10 +108,10 @@ RUN set -eu; \
108
108
  rm -rf "$tmp"
109
109
 
110
110
  # kind passe par une enveloppe (#291) : avec le Docker de l'hôte, un cluster
111
- # créé à la main doit être rendu joignable depuis le conteneur (kube-joignable.sh)
112
- COPY kube-joignable.sh /usr/local/lib/devzone/kube-joignable.sh
113
- COPY kind-enveloppe.sh /usr/local/bin/kind
114
- RUN chmod 0644 /usr/local/lib/devzone/kube-joignable.sh && chmod 0755 /usr/local/bin/kind
111
+ # créé à la main doit être rendu joignable depuis le conteneur (kube-reachable.sh)
112
+ COPY kube-reachable.sh /usr/local/lib/devzone/kube-reachable.sh
113
+ COPY kind-wrapper.sh /usr/local/bin/kind
114
+ RUN chmod 0644 /usr/local/lib/devzone/kube-reachable.sh && chmod 0755 /usr/local/bin/kind
115
115
 
116
116
  COPY --from=uv /uv /uvx /usr/local/bin/
117
117
 
@@ -35,10 +35,10 @@ cause_label() {
35
35
  esac
36
36
  }
37
37
 
38
- # Duration of an exclusion in seconds: country 7 days (DEVZONE_AGENT_ECART_PAYS), the others 1 h.
38
+ # Duration of an exclusion in seconds: country 7 days (DEVZONE_AGENT_COUNTRY_EXCLUSION), the others 1 h.
39
39
  exclusion_duration() {
40
40
  case "$1" in
41
- pays) echo "${DEVZONE_AGENT_ECART_PAYS:-604800}" ;;
41
+ pays) echo "${DEVZONE_AGENT_COUNTRY_EXCLUSION:-604800}" ;;
42
42
  *) echo 3600 ;;
43
43
  esac
44
44
  }
@@ -78,18 +78,18 @@ network_reachable() {
78
78
  getent hosts opencode.ai >/dev/null 2>&1 && curl -sI --max-time 5 https://opencode.ai >/dev/null 2>&1
79
79
  }
80
80
 
81
- # Waits for the network to come back: a try every DEVZONE_AGENT_RESEAU_PAS s, for
82
- # DEVZONE_AGENT_RESEAU_MAX s at most. Returns 0 when it is back.
81
+ # Waits for the network to come back: a try every DEVZONE_AGENT_NETWORK_STEP s, for
82
+ # DEVZONE_AGENT_NETWORK_MAX s at most. Returns 0 when it is back.
83
83
  network_wait() {
84
84
  local end
85
- end=$(( $(date +%s) + ${DEVZONE_AGENT_RESEAU_MAX:-1800} ))
85
+ end=$(( $(date +%s) + ${DEVZONE_AGENT_NETWORK_MAX:-1800} ))
86
86
  echo "=== network down, waiting" >>"$AGENT_JOURNAL"
87
87
  while [ "$(date +%s)" -lt "$end" ]; do
88
88
  if network_reachable; then
89
89
  echo "=== network back" >>"$AGENT_JOURNAL"
90
90
  return 0
91
91
  fi
92
- sleep "${DEVZONE_AGENT_RESEAU_PAS:-30}"
92
+ sleep "${DEVZONE_AGENT_NETWORK_STEP:-30}"
93
93
  done
94
94
  return 1
95
95
  }
@@ -9,9 +9,9 @@ LOCAL_HOTE_REEL=""
9
9
  # Internal (slash-free) name of the host model chosen for this attempt.
10
10
  LOCAL_HOTE_INTERNE=""
11
11
 
12
- # shellcheck source=SCRIPTDIR/ia/host-models.sh
12
+ # shellcheck source=SCRIPTDIR/ai/host-models.sh
13
13
  # shellcheck disable=SC1091
14
- . "$ICI/ia/host-models.sh"
14
+ . "$ICI/ai/host-models.sh"
15
15
 
16
16
  # Sanitizes a model name into an internal name: every character outside
17
17
  # [A-Za-z0-9._-] becomes '_'. Used for ecart-<name> files, the journal and
@@ -1,5 +1,5 @@
1
1
  # Messages of devzone agent --modele (#420), in French like the journal they go to.
2
- # Sourced by agent-modele.sh. Kept out of .english on purpose: the accents are
2
+ # Sourced by agent-model.sh. Kept out of .english on purpose: the accents are
3
3
  # the point. Each %s is replaced by a model name or a cause (printf formats).
4
4
  MSG_AUCUN_MODELE='aucun modèle gratuit disponible'
5
5
  MSG_CHOISI='=== modèle choisi : %s (demandé)'
@@ -4,8 +4,8 @@
4
4
  # Library sourced by agent.sh: no command is launched here.
5
5
 
6
6
  # Journal and refusal texts (French), printf formats.
7
- # shellcheck source=SCRIPTDIR/agent-modele.messages disable=SC1091
8
- . "$ICI/agent-modele.messages"
7
+ # shellcheck source=SCRIPTDIR/agent-model.messages disable=SC1091
8
+ . "$ICI/agent-model.messages"
9
9
 
10
10
  # Option --modele as typed (comma-separated list), empty when absent.
11
11
  MODELE_LISTE=""
@@ -16,7 +16,7 @@ ORDRE=()
16
16
 
17
17
  # Refuses a name missing from the free models: nothing is launched (code 2).
18
18
  refuse_modele() {
19
- # shellcheck disable=SC2059 # the format comes from agent-modele.messages
19
+ # shellcheck disable=SC2059 # the format comes from agent-model.messages
20
20
  printf "$MSG_INCONNU\n" "$1" >&2
21
21
  printf ' %s\n' "${FREE_MODELS[@]}" >&2
22
22
  exit 2
@@ -54,7 +54,7 @@ modele_demande_p() {
54
54
  # Journal line when requested model $1 starts; other models get no line.
55
55
  modele_demande_choisi() {
56
56
  if modele_demande_p "$1"; then
57
- # shellcheck disable=SC2059 # the format comes from agent-modele.messages
57
+ # shellcheck disable=SC2059 # the format comes from agent-model.messages
58
58
  printf "$MSG_CHOISI\n" "$1" >>"$2"
59
59
  fi
60
60
  }
@@ -63,7 +63,7 @@ modele_demande_choisi() {
63
63
  # journal $3. Other models keep their own lines.
64
64
  modele_demande_ecart() {
65
65
  if modele_demande_p "$1"; then
66
- # shellcheck disable=SC2059 # the format comes from agent-modele.messages
66
+ # shellcheck disable=SC2059 # the format comes from agent-model.messages
67
67
  printf "$MSG_ECARTE\n" "$1" "$2" >>"$3"
68
68
  fi
69
69
  }
@@ -12,8 +12,8 @@ DEVZONE_AGENT_POD_CPU_LIMIT="${DEVZONE_AGENT_POD_CPU_LIMIT:-2}"
12
12
  DEVZONE_AGENT_POD_MEM_LIMIT="${DEVZONE_AGENT_POD_MEM_LIMIT:-4Gi}"
13
13
  DEVZONE_AGENT_POD_TIMEOUT="${DEVZONE_AGENT_POD_TIMEOUT:-$((DEVZONE_AGENT_POD_ACTIVE_DEADLINE_SECONDS + 120))}"
14
14
  # Projects root, read by the launcher only (no trailing slash). The pod keeps
15
- # /workspaces/projets in its own environment (DEVZONE_RACINE in the manifest).
16
- AGENT_POD_ROOT="${DEVZONE_RACINE:-/workspaces/projets}"
15
+ # /workspaces/projets in its own environment (DEVZONE_ROOT in the manifest).
16
+ AGENT_POD_ROOT="${DEVZONE_ROOT:-/workspaces/projets}"
17
17
  # Module state file on the workspace volume (subPath .devzone.modules, read-only in the pod).
18
18
  # shellcheck disable=SC2034 # read by agent-pod.sh
19
19
  AGENT_POD_MODULES_FILE="${DEVZONE_AGENT_POD_MODULES_FILE:-${AGENT_POD_ROOT}/.devzone.modules}"
@@ -193,7 +193,7 @@ agent_pod_build_manifest() {
193
193
  printf '%s\n' " value: \"${ws_path}\""
194
194
  printf '%s\n' " - name: DEVZONE_WORKSPACE"
195
195
  printf '%s\n' " value: \"kubernetes\""
196
- printf '%s\n' " - name: DEVZONE_RACINE"
196
+ printf '%s\n' " - name: DEVZONE_ROOT"
197
197
  printf '%s\n' " value: \"/workspaces/projets\""; agent_pod_egress_manifest_lines "$egress_mode"
198
198
  printf '%s\n' " resources:"
199
199
  printf '%s\n' " limits:"
@@ -230,7 +230,7 @@ agent_pod_build_manifest() {
230
230
  printf '%s\n' " mountPath: /workspaces/projets/workspace"
231
231
  printf '%s\n' " command: [\"/bin/bash\", \"-lc\"]"
232
232
  printf '%s\n' " args:"
233
- printf '%s\n' " - 'devzone agent --local ${folder} /agent-consigne/consigne.md; code=\$?; cat \"\$DEVZONE_RACINE/workspace/.agents/${AGENT_POD_SESSION_LABEL}.log\" 2>/dev/null; exit \$code'"
233
+ printf '%s\n' " - 'devzone agent --local ${folder} /agent-consigne/consigne.md; code=\$?; cat \"\$DEVZONE_ROOT/workspace/.agents/${AGENT_POD_SESSION_LABEL}.log\" 2>/dev/null; exit \$code'"
234
234
  printf '%s\n' " volumes:"
235
235
  printf '%s\n' " - name: workspace"
236
236
  printf '%s\n' " persistentVolumeClaim:"
@@ -4,12 +4,12 @@
4
4
 
5
5
  # Fichiers de droits, chemins relatifs à la racine du dossier de travail. Liste
6
6
  # fixe : aucune variable d'environnement ne la change, un agent peut en poser.
7
- # agent-droits.sh y figure, sinon un agent pourrait vider la liste.
7
+ # agent-rights.sh y figure, sinon un agent pourrait vider la liste.
8
8
  DROITS_AGENT=(
9
9
  .devcontainer/opencode/agent.json
10
10
  .devcontainer/opencode.jsonc
11
11
  .repowarden.conf
12
- .devcontainer/agent-droits.sh
12
+ .devcontainer/agent-rights.sh
13
13
  )
14
14
 
15
15
  # Dossier de la photo des droits d'un projet, dans l'état de l'agent.
@@ -47,7 +47,7 @@ lock_trace() {
47
47
  # which of the two launches succeeded in mkdir.
48
48
  lock_take() {
49
49
  local end age lock_pid
50
- end=$(( $(date +%s) + ${DEVZONE_AGENT_VERROU_MAX:-10} ))
50
+ end=$(( $(date +%s) + ${DEVZONE_AGENT_LOCK_MAX:-10} ))
51
51
  while ! mkdir "$AGENT_ETAT/verrou" 2>/dev/null; do
52
52
  # A lock is orphaned only by its age: the rank is held for a few milliseconds,
53
53
  # 30 s can only be a stop to take over; otherwise wait, then give up (code 1).
@@ -73,7 +73,7 @@ lock_take() {
73
73
  if command -v flock >/dev/null 2>&1; then
74
74
  # exec in an if makes a failure a condition instead of killing the shell
75
75
  # (bash 3.2 and GNU alike); without flock, mkdir remains the only guard (macOS).
76
- if { exec 9>"$AGENT_ETAT/rang.lock"; } && flock -w "${DEVZONE_AGENT_VERROU_MAX:-10}" 9; then
76
+ if { exec 9>"$AGENT_ETAT/rang.lock"; } && flock -w "${DEVZONE_AGENT_LOCK_MAX:-10}" 9; then
77
77
  AGENT_LOCK_FLOCK=1
78
78
  else
79
79
  lock_release
@@ -138,7 +138,7 @@ rights_edit_deny() {
138
138
  # out of the merge, then added back at the end (the key order of a jq object is the
139
139
  # insertion order), so the caller can add permissions but never remove a devzone deny.
140
140
  # ~/bash32 is always protected: the container's bash 3.2 was already replaced by a
141
- # link (#210). The name configurer is kept: agent-droits-gh.bats calls it.
141
+ # link (#210). The name configurer is kept: agent-rights-gh.bats calls it.
142
142
  configurer() {
143
143
  local def config
144
144
  def="$ICI/opencode/agent.json"
@@ -14,19 +14,19 @@ while [ -L "$SOURCE" ]; do
14
14
  esac
15
15
  done
16
16
  ICI="$(cd -P "$(dirname "$SOURCE")" && pwd)"
17
- RACINE="${DEVZONE_RACINE:-$(dirname "$ICI")}"
17
+ RACINE="${DEVZONE_ROOT:-$(dirname "$ICI")}"
18
18
 
19
- # shellcheck source=agent-erreurs.sh
19
+ # shellcheck source=agent-errors.sh
20
20
  # shellcheck disable=SC1091
21
- . "$ICI/agent-erreurs.sh"
22
- # shellcheck source=agent-droits.sh
21
+ . "$ICI/agent-errors.sh"
22
+ # shellcheck source=agent-rights.sh
23
23
  # shellcheck disable=SC1091
24
- . "$ICI/agent-droits.sh"
24
+ . "$ICI/agent-rights.sh"
25
25
  # shellcheck source=agent-session.sh
26
26
  # shellcheck disable=SC1091
27
27
  . "$ICI/agent-session.sh"
28
28
 
29
- AGENT_ETAT="${DEVZONE_AGENT_ETAT:-$HOME/.local/state/oc-lancer}"
29
+ AGENT_ETAT="${DEVZONE_AGENT_STATE:-$HOME/.local/state/oc-lancer}"
30
30
 
31
31
  # UTC ISO-8601 date of an epoch, GNU then BSD date: the fin field of the exclusions.
32
32
  iso() {
@@ -73,7 +73,7 @@ agent_workspace() {
73
73
  echo "devzone agent: Kubernetes workspace (pod devzone-workspace-0, $in_pod); --local for the container"
74
74
  agent_kc cp "$brief" "devzone-workspace-0:/tmp/devzone-agent-$name.md" -c workspace
75
75
  # shellcheck disable=SC2016 # the pod shell expands MODEL_OPT, not this one
76
- agent_kc exec devzone-workspace-0 -c workspace -- env DEVZONE_RACINE="$pod_root" MODEL_OPT="$MODELE_LISTE" bash -lc 'devzone agent ${MODEL_OPT:+--modele "$MODEL_OPT"} "$1" "$2"' _ "$in_pod" "/tmp/devzone-agent-$name.md" || code=$?
76
+ agent_kc exec devzone-workspace-0 -c workspace -- env DEVZONE_ROOT="$pod_root" MODEL_OPT="$MODELE_LISTE" bash -lc 'devzone agent ${MODEL_OPT:+--modele "$MODEL_OPT"} "$1" "$2"' _ "$in_pod" "/tmp/devzone-agent-$name.md" || code=$?
77
77
  journal="$(journal_of "$name")"
78
78
  mkdir -p "$(dirname "$journal")"
79
79
  if ! agent_kc exec devzone-workspace-0 -c workspace -- cat "$pod_root/workspace/.agents/$name.log" >>"$journal"; then
@@ -15,31 +15,31 @@ while [ -L "$SOURCE" ]; do
15
15
  esac
16
16
  done
17
17
  ICI="$(cd -P "$(dirname "$SOURCE")" && pwd)"
18
- RACINE="${DEVZONE_RACINE:-$(dirname "$ICI")}"
19
- # shellcheck source=agent-erreurs.sh disable=SC1091
20
- . "$ICI/agent-erreurs.sh"
21
- # shellcheck source=agent-droits.sh disable=SC1091
22
- . "$ICI/agent-droits.sh"
18
+ RACINE="${DEVZONE_ROOT:-$(dirname "$ICI")}"
19
+ # shellcheck source=agent-errors.sh disable=SC1091
20
+ . "$ICI/agent-errors.sh"
21
+ # shellcheck source=agent-rights.sh disable=SC1091
22
+ . "$ICI/agent-rights.sh"
23
23
  # shellcheck source=SCRIPTDIR/agent-session.sh disable=SC1091
24
24
  . "$ICI/agent-session.sh"
25
25
  # shellcheck source=agent-workspace.sh disable=SC1091
26
26
  . "$ICI/agent-workspace.sh"
27
27
  # shellcheck source=agent-local.sh disable=SC1091
28
28
  . "$ICI/agent-local.sh"
29
- # shellcheck source=SCRIPTDIR/agent-modele.sh disable=SC1091
30
- . "$ICI/agent-modele.sh"
29
+ # shellcheck source=SCRIPTDIR/agent-model.sh disable=SC1091
30
+ . "$ICI/agent-model.sh"
31
31
  FREE_MODELS=(big-pickle deepseek-v4.1-flash-free hy4-flash-free nemotron-3.5-super-vl-free
32
32
  nemotron-3.5-lightning-free mimo-v2.6-flash-free beam-free flint-40b-free longcat-2.5-free)
33
33
  # Session pod ephemere (#222)
34
34
  # shellcheck source=agent-pod.sh disable=SC1091
35
35
  . "$ICI/agent-pod.sh"
36
36
  SILENCE="${DEVZONE_AGENT_SILENCE:-45}"
37
- FROZEN="${DEVZONE_AGENT_FIGEE:-600}"
38
- AGENT_ETAT="${DEVZONE_AGENT_ETAT:-$HOME/.local/state/oc-lancer}"
37
+ FROZEN="${DEVZONE_AGENT_FROZEN:-600}"
38
+ AGENT_ETAT="${DEVZONE_AGENT_STATE:-$HOME/.local/state/oc-lancer}"
39
39
  # Pause between read and write of the rank (tests only): active only when
40
- # DEVZONE_AGENT_PAUSE_RANG is set under bats; never a pause by default.
40
+ # DEVZONE_AGENT_PAUSE_RANK is set under bats; never a pause by default.
41
41
  PAUSE_RANK=0
42
- if [ -n "${DEVZONE_AGENT_PAUSE_RANG:-}" ] && [ -n "${BATS_TEST_TMPDIR:-}" ]; then PAUSE_RANK="$DEVZONE_AGENT_PAUSE_RANG"; fi
42
+ if [ -n "${DEVZONE_AGENT_PAUSE_RANK:-}" ] && [ -n "${BATS_TEST_TMPDIR:-}" ]; then PAUSE_RANK="$DEVZONE_AGENT_PAUSE_RANK"; fi
43
43
  # Retries of the same session for a network cause, per model, before the next model
44
44
  NETWORK_RETRIES=3
45
45
  refuse() { echo "devzone agent: $*" >&2; exit 2; }
@@ -104,7 +104,7 @@ agent_launch() {
104
104
  if [ "$(error_cause "$(error_lines "$new")")" != "quota" ]; then started=1; break; fi
105
105
  fi
106
106
  if [ $(( $(date +%s) - start_t )) -ge "$SILENCE" ]; then break; fi
107
- sleep "${DEVZONE_AGENT_PAS:-1}"
107
+ sleep "${DEVZONE_AGENT_STEP:-1}"
108
108
  done
109
109
  if [ "$discard" = 1 ]; then resume; i=$(( i + 1 )); continue; fi
110
110
  if kill -0 "$pid" 2>/dev/null && [ "$started" = 0 ]; then
@@ -127,7 +127,7 @@ agent_launch() {
127
127
  size="$(wc -c <"$journal")"
128
128
  while kill -0 "$pid" 2>/dev/null; do
129
129
  if session_fatal_error "$pid" "$journal" "$offset" "$m" "$folder"; then discard=1; break; fi
130
- sleep "${DEVZONE_AGENT_PAS:-1}"
130
+ sleep "${DEVZONE_AGENT_STEP:-1}"
131
131
  now="$(date +%s)"
132
132
  if [ "$(wc -c <"$journal")" -gt "$size" ]; then
133
133
  size="$(wc -c <"$journal")"
@@ -207,7 +207,7 @@ agent_launch() {
207
207
  }
208
208
  case "${1:-}" in
209
209
  status) agent_pod_status ;;
210
- etat) if [ "${2:-}" = "--json" ]; then exec bash "$ICI/agent-etat-json.sh"; else agent_state; fi ;;
210
+ etat) if [ "${2:-}" = "--json" ]; then exec bash "$ICI/agent-state-json.sh"; else agent_state; fi ;;
211
211
  liberer)
212
212
  [ -n "${2:-}" ] || { agent_aide >&2; exit 2; }
213
213
  exclusion_clear "$2"
@@ -9,7 +9,7 @@
9
9
  set -u
10
10
 
11
11
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
- MESSAGE_FILE="$SCRIPT_DIR/docker-garde.message"
12
+ MESSAGE_FILE="$SCRIPT_DIR/docker-guard.message"
13
13
  FALLBACK="devzone is Kubernetes-first: only pods are containers. Use kubectl, or a throwaway pod or namespace. Host action: set DEVZONE_ALLOW_DOCKER to 1."
14
14
  MESSAGE="$FALLBACK"
15
15
  if [ -r "$MESSAGE_FILE" ]; then
@@ -9,7 +9,7 @@
9
9
  # host-models.sh check update check of each model (delegates to host-check.sh)
10
10
  # host-models.sh rapport report (delegates to host-check.sh)
11
11
  # Default URL: http://host.docker.internal:11434, overridable with DEVZONE_OLLAMA_URL.
12
- # Measurements: DEVZONE_IA_MESURES, else ~/.config/devzone/ia-mesures.json
12
+ # Measurements: DEVZONE_AI_MEASURES, else ~/.config/devzone/ia-mesures.json
13
13
  # ({"<model>": {"reussite": 0..1, "tok_s": n, "date": "..."}}).
14
14
  # Short timeout; exits 0 and writes nothing when Ollama does not answer.
15
15
  # bash 3.2 (macOS). Code and comments in English.
@@ -18,7 +18,7 @@ set -euo pipefail
18
18
  URL="${DEVZONE_OLLAMA_URL:-http://host.docker.internal:11434}"
19
19
  URL="${URL%/}"
20
20
  FILE="$HOME/.config/opencode/config.json"
21
- MESURES="${DEVZONE_IA_MESURES:-$HOME/.config/devzone/ia-mesures.json}"
21
+ MESURES="${DEVZONE_AI_MEASURES:-$HOME/.config/devzone/ia-mesures.json}"
22
22
 
23
23
  # True when a model is an embedding model (Ollama details.type, or a name
24
24
  # containing "embed", case-insensitive).
@@ -1,23 +1,23 @@
1
1
  // Guard for opencode 2.x: blocks Docker commands in devzone (Kubernetes-first).
2
- // Each shell tool call is checked by docker-garde.sh. Exit code 2: error shown
2
+ // Each shell tool call is checked by docker-guard.sh. Exit code 2: error shown
3
3
  // to the agent with stderr message. Script absent or failing: nothing blocked.
4
4
  // The installed copy (devzone enable ia) replaces the placeholder below with
5
- // the script path; DEVZONE_DOCKER_GARDE overrides it. The script is resolved
6
- // from the plugin location itself (.devcontainer/ia/plugins -> ../docker-garde.sh).
5
+ // the script path; DEVZONE_DOCKER_GUARD overrides it. The script is resolved
6
+ // from the plugin location itself (.devcontainer/ai/plugins -> ../docker-guard.sh).
7
7
  // opencode 1.x also loads default exports with an id; without ctx.tool.hook the
8
- // 1.x guard in devzone-garde.js remains active.
8
+ // 1.x guard in devzone-guard.js remains active.
9
9
  import { spawnSync } from "node:child_process"
10
10
  import { existsSync } from "node:fs"
11
11
  import { fileURLToPath } from "node:url"
12
12
  import { dirname, join } from "node:path"
13
13
 
14
- const INSTALLED = process.env.DEVZONE_DOCKER_GARDE || "__DEVZONE_DOCKER_GARDE__"
14
+ const INSTALLED = process.env.DEVZONE_DOCKER_GUARD || "__DEVZONE_DOCKER_GUARD__"
15
15
 
16
16
  function guardScript() {
17
- if (INSTALLED && INSTALLED.indexOf("__DEVZONE_DOCKER_GARDE__") !== 0 && existsSync(INSTALLED)) {
17
+ if (INSTALLED && INSTALLED.indexOf("__DEVZONE_DOCKER_GUARD__") !== 0 && existsSync(INSTALLED)) {
18
18
  return INSTALLED
19
19
  }
20
- const script = join(dirname(fileURLToPath(import.meta.url)), "..", "docker-garde.sh")
20
+ const script = join(dirname(fileURLToPath(import.meta.url)), "..", "docker-guard.sh")
21
21
  if (existsSync(script)) {
22
22
  return script
23
23
  }
@@ -1,21 +1,21 @@
1
1
  // Guard for opencode 1.x: blocks Docker commands in devzone (Kubernetes-first).
2
- // Each shell tool call is checked by docker-garde.sh. Exit code 2: error shown
2
+ // Each shell tool call is checked by docker-guard.sh. Exit code 2: error shown
3
3
  // to the agent with stderr message. Script absent or failing: nothing blocked.
4
4
  // The installed copy (devzone enable ia) replaces the placeholder below with
5
- // the script path; DEVZONE_DOCKER_GARDE overrides it. The script is resolved
6
- // from the plugin location itself (.devcontainer/ia/plugins -> ../docker-garde.sh).
5
+ // the script path; DEVZONE_DOCKER_GUARD overrides it. The script is resolved
6
+ // from the plugin location itself (.devcontainer/ai/plugins -> ../docker-guard.sh).
7
7
  import { spawnSync } from "node:child_process"
8
8
  import { existsSync } from "node:fs"
9
9
  import { fileURLToPath } from "node:url"
10
10
  import { dirname, join } from "node:path"
11
11
 
12
- const INSTALLED = process.env.DEVZONE_DOCKER_GARDE || "__DEVZONE_DOCKER_GARDE__"
12
+ const INSTALLED = process.env.DEVZONE_DOCKER_GUARD || "__DEVZONE_DOCKER_GUARD__"
13
13
 
14
14
  function guardScript() {
15
- if (INSTALLED && INSTALLED.indexOf("__DEVZONE_DOCKER_GARDE__") !== 0 && existsSync(INSTALLED)) {
15
+ if (INSTALLED && INSTALLED.indexOf("__DEVZONE_DOCKER_GUARD__") !== 0 && existsSync(INSTALLED)) {
16
16
  return INSTALLED
17
17
  }
18
- const script = join(dirname(fileURLToPath(import.meta.url)), "..", "docker-garde.sh")
18
+ const script = join(dirname(fileURLToPath(import.meta.url)), "..", "docker-guard.sh")
19
19
  if (existsSync(script)) {
20
20
  return script
21
21
  }