devzone 0.6.0 → 0.7.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.
package/.devcontainer/devzone
CHANGED
|
@@ -61,6 +61,42 @@ ecrire() {
|
|
|
61
61
|
mv "$tmp" "$ETAT"
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
# Vrai si le fichier ne contient que la clé $schema (créé d'office par opencode)
|
|
65
|
+
contient_seulement_schema() {
|
|
66
|
+
local autres
|
|
67
|
+
autres="$(grep -vcE '^[[:space:]]*([{}]|"?[$]schema"?[[:space:]]*:.*)?[[:space:]]*$' "$1" || true)"
|
|
68
|
+
[ "$autres" -eq 0 ] && grep -qF "\$schema" "$1"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# Configuration opencode par défaut (modèle versionné) : écrite au premier
|
|
72
|
+
# usage, mise à jour tant qu'elle garde le repère devzone, personnalisée sinon.
|
|
73
|
+
config_opencode() {
|
|
74
|
+
local modele="$ICI/opencode.jsonc" repere cible
|
|
75
|
+
repere='// devzone : configuration opencode par défaut'
|
|
76
|
+
if [ -f "$HOME/.config/opencode/opencode.jsonc" ]; then
|
|
77
|
+
cible="$HOME/.config/opencode/opencode.jsonc"
|
|
78
|
+
elif [ -f "$HOME/.config/opencode/opencode.json" ]; then
|
|
79
|
+
cible="$HOME/.config/opencode/opencode.json"
|
|
80
|
+
else
|
|
81
|
+
cible="$HOME/.config/opencode/opencode.jsonc"
|
|
82
|
+
fi
|
|
83
|
+
mkdir -p "$(dirname "$cible")"
|
|
84
|
+
if [ ! -f "$cible" ]; then
|
|
85
|
+
cp "$modele" "$cible"
|
|
86
|
+
echo "opencode : configuration par défaut écrite"
|
|
87
|
+
elif grep -qF "$repere" "$cible"; then
|
|
88
|
+
if ! cmp -s "$modele" "$cible"; then
|
|
89
|
+
cp "$modele" "$cible"
|
|
90
|
+
echo "opencode : configuration par défaut mise à jour"
|
|
91
|
+
fi
|
|
92
|
+
elif contient_seulement_schema "$cible"; then
|
|
93
|
+
cp "$modele" "$cible"
|
|
94
|
+
echo "opencode : configuration par défaut mise à jour"
|
|
95
|
+
else
|
|
96
|
+
echo "opencode : configuration personnalisée, gardée"
|
|
97
|
+
fi
|
|
98
|
+
}
|
|
99
|
+
|
|
64
100
|
appliquer_ia() {
|
|
65
101
|
if [ "$1" = on ]; then
|
|
66
102
|
npm install -g --no-fund --no-audit --loglevel=error "${IA_PAQUETS[@]}" >/dev/null
|
|
@@ -73,6 +109,7 @@ appliquer_ia() {
|
|
|
73
109
|
else
|
|
74
110
|
echo "devzone : garde-fou repowarden non branché (repowarden 4.10 ou plus requis) : repowarden agents init --global" >&2
|
|
75
111
|
fi
|
|
112
|
+
config_opencode
|
|
76
113
|
echo "devzone : ia actif : claude (puis /login), opencode auth login"
|
|
77
114
|
else
|
|
78
115
|
npm uninstall -g "${IA_NOMS[@]}" >/dev/null 2>&1 || true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// devzone : configuration opencode par défaut (devzone activer ia la tient à jour ; retirer cette ligne pour la personnaliser)
|
|
2
|
+
{
|
|
3
|
+
"$schema": "https://opencode.ai/config.json",
|
|
4
|
+
// Modèles gratuits de la version d'opencode fixée par devzone.
|
|
5
|
+
// Partage et mises à jour désactivés : les versions sont fixées par devzone.
|
|
6
|
+
"model": "opencode/big-pickle",
|
|
7
|
+
"small_model": "opencode/mimo-v2.6-flash-free",
|
|
8
|
+
"share": "disabled",
|
|
9
|
+
"autoupdate": false,
|
|
10
|
+
"compaction": {
|
|
11
|
+
"auto": true
|
|
12
|
+
},
|
|
13
|
+
// Le reste est encadré par le garde-fou repowarden des dépôts repowarden.
|
|
14
|
+
"permission": {
|
|
15
|
+
"edit": "allow",
|
|
16
|
+
"webfetch": "allow",
|
|
17
|
+
"bash": {
|
|
18
|
+
"*": "allow",
|
|
19
|
+
"sudo *": "ask",
|
|
20
|
+
"rm -rf /*": "ask",
|
|
21
|
+
"git push --force*": "ask",
|
|
22
|
+
"git push -f*": "ask"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"agent": {
|
|
26
|
+
"build": { "model": "opencode/big-pickle" },
|
|
27
|
+
"plan": { "model": "opencode/nemotron-3-ultra-free" },
|
|
28
|
+
"general": { "model": "opencode/deepseek-v4.1-flash-free" },
|
|
29
|
+
"explore": { "model": "opencode/nemotron-3.5-lightning-free" },
|
|
30
|
+
"title": { "model": "opencode/mimo-v2.6-flash-free" },
|
|
31
|
+
"summary": { "model": "opencode/mimo-v2.6-flash-free" },
|
|
32
|
+
"compaction": { "model": "opencode/deepseek-v4.1-flash-free" }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -46,7 +46,7 @@ git config --global url.https://github.com/.insteadOf git@github.com:
|
|
|
46
46
|
|
|
47
47
|
# repowarden, version figée (il installe des hooks git globaux) ; mettre à jour
|
|
48
48
|
# en changeant la version ici, puis Rebuild Container
|
|
49
|
-
npm install -g repowarden@4.
|
|
49
|
+
npm install -g repowarden@4.12.0
|
|
50
50
|
repowarden install --global --lang fr
|
|
51
51
|
|
|
52
52
|
# Modules facultatifs (assistants IA, Kubernetes) : commande devzone, état
|
package/package.json
CHANGED