@hupan56/wlkj 2.2.3 → 2.2.5
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/bin/cli.js +532 -532
- package/package.json +28 -28
- package/templates/qoder/hooks/inject-workflow-state.py +117 -117
- package/templates/qoder/hooks/session-start.py +204 -204
- package/templates/qoder/scripts/common/developer.py +231 -161
- package/templates/qoder/scripts/common/paths.py +310 -310
- package/templates/qoder/scripts/common/task_utils.py +392 -387
- package/templates/qoder/scripts/init_developer.py +75 -75
- package/templates/qoder/scripts/install_qoderwork.py +367 -367
- package/templates/qoder/scripts/role.py +39 -39
- package/templates/qoder/scripts/syncgate.py +333 -333
- package/templates/qoder/scripts/team_sync.py +439 -439
- package/templates/qoder/skills/design-review/SKILL.md +25 -25
- package/templates/qoder/skills/prd-generator/SKILL.md +180 -180
- package/templates/qoder/skills/prd-review/SKILL.md +36 -36
- package/templates/qoder/skills/prototype-generator/SKILL.md +141 -141
- package/templates/qoder/skills/spec-coder/SKILL.md +68 -68
- package/templates/qoder/skills/spec-generator/SKILL.md +66 -66
- package/templates/qoder/skills/test-generator/SKILL.md +71 -71
- package/templates/root/AGENTS.md +182 -182
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# role.py - Resolve role from member info
|
|
2
|
-
import os, json, sys
|
|
3
|
-
|
|
4
|
-
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
5
|
-
from common.paths import get_developer, get_developer_info
|
|
6
|
-
|
|
7
|
-
BASE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
8
|
-
|
|
9
|
-
def get_role(name=None):
|
|
10
|
-
if not name:
|
|
11
|
-
# Prefer role recorded directly in .developer
|
|
12
|
-
info = get_developer_info()
|
|
13
|
-
if info and info.get('role'):
|
|
14
|
-
return info['role']
|
|
15
|
-
name = get_developer()
|
|
16
|
-
if not name:
|
|
17
|
-
return None
|
|
18
|
-
mf = os.path.join(BASE, 'workspace', 'members', name, 'member.json')
|
|
19
|
-
if os.path.isfile(mf):
|
|
20
|
-
try:
|
|
21
|
-
with open(mf, encoding='utf-8') as f:
|
|
22
|
-
return json.load(f).get('role')
|
|
23
|
-
except (OSError, json.JSONDecodeError):
|
|
24
|
-
return None
|
|
25
|
-
return None
|
|
26
|
-
|
|
27
|
-
def get_permissions(role):
|
|
28
|
-
import yaml
|
|
29
|
-
cfg = os.path.join(BASE, '.qoder', 'config.yaml')
|
|
30
|
-
if not os.path.isfile(cfg):
|
|
31
|
-
return []
|
|
32
|
-
try:
|
|
33
|
-
with open(cfg, encoding='utf-8') as f:
|
|
34
|
-
config = yaml.safe_load(f) or {}
|
|
35
|
-
except (OSError, yaml.YAMLError):
|
|
36
|
-
return []
|
|
37
|
-
roles = config.get('roles', {})
|
|
38
|
-
r = roles.get(role, {})
|
|
39
|
-
return r.get('permissions', [])
|
|
1
|
+
# role.py - Resolve role from member info
|
|
2
|
+
import os, json, sys
|
|
3
|
+
|
|
4
|
+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
5
|
+
from common.paths import get_developer, get_developer_info
|
|
6
|
+
|
|
7
|
+
BASE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
8
|
+
|
|
9
|
+
def get_role(name=None):
|
|
10
|
+
if not name:
|
|
11
|
+
# Prefer role recorded directly in .developer
|
|
12
|
+
info = get_developer_info()
|
|
13
|
+
if info and info.get('role'):
|
|
14
|
+
return info['role']
|
|
15
|
+
name = get_developer()
|
|
16
|
+
if not name:
|
|
17
|
+
return None
|
|
18
|
+
mf = os.path.join(BASE, 'workspace', 'members', name, 'member.json')
|
|
19
|
+
if os.path.isfile(mf):
|
|
20
|
+
try:
|
|
21
|
+
with open(mf, encoding='utf-8') as f:
|
|
22
|
+
return json.load(f).get('role')
|
|
23
|
+
except (OSError, json.JSONDecodeError):
|
|
24
|
+
return None
|
|
25
|
+
return None
|
|
26
|
+
|
|
27
|
+
def get_permissions(role):
|
|
28
|
+
import yaml
|
|
29
|
+
cfg = os.path.join(BASE, '.qoder', 'config.yaml')
|
|
30
|
+
if not os.path.isfile(cfg):
|
|
31
|
+
return []
|
|
32
|
+
try:
|
|
33
|
+
with open(cfg, encoding='utf-8') as f:
|
|
34
|
+
config = yaml.safe_load(f) or {}
|
|
35
|
+
except (OSError, yaml.YAMLError):
|
|
36
|
+
return []
|
|
37
|
+
roles = config.get('roles', {})
|
|
38
|
+
r = roles.get(role, {})
|
|
39
|
+
return r.get('permissions', [])
|