@unity-china/codely-cli 1.0.0-beta.52 → 1.0.0-rc.1

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.
@@ -5,33 +5,32 @@
5
5
  */
6
6
  /**
7
7
  * @license
8
- * Copyright 2025 Qwen
8
+ * Copyright 2026
9
9
  * SPDX-License-Identifier: Apache-2.0
10
10
  */
11
11
  /**
12
12
  * @license
13
- * Copyright 2025 Codely
13
+ * Copyright 2025 Qwen
14
14
  * SPDX-License-Identifier: Apache-2.0
15
- *
16
- * Modified OAuth2 implementation using direct token callback:
17
- * - Instead of using redirect_uri, the callback URL is passed in the state parameter
18
- * - The server returns tokens directly in the callback as base64-encoded code parameter
19
- * - No token exchange step is needed, tokens are decoded directly from the callback
20
- * - Implements credential caching and automatic token refresh similar to qwenOAuth2.ts
21
15
  */
22
16
  /**
23
17
  * @license
24
18
  * Copyright 2025 Codely
25
19
  * SPDX-License-Identifier: Apache-2.0
20
+ *
21
+ * Codely OAuth2 implementation:
22
+ * - Prefer device flow for IDE/CLI-friendly authentication.
23
+ * - Keep legacy browser callback flow as a fallback path.
24
+ * - Implements credential caching and automatic token refresh.
26
25
  */
27
26
  /**
28
27
  * @license
29
- * Copyright 2026 Google LLC
28
+ * Copyright 2025 Codely
30
29
  * SPDX-License-Identifier: Apache-2.0
31
30
  */
32
31
  /**
33
32
  * @license
34
- * Copyright 2026
33
+ * Copyright 2026 Google LLC
35
34
  * SPDX-License-Identifier: Apache-2.0
36
35
  */
37
36
  /**
@@ -11,7 +11,7 @@
11
11
  decision = "deny"
12
12
  priority = 60
13
13
  modes = ["plan"]
14
- deny_message = "You are in Plan Mode. Only read/search tools and writing plans to the plans directory are allowed. Use exit_plan_mode to request approval for your plan."
14
+ deny_message = "You are in Plan Mode. Only approved planning tools (including read/search/multimedia) and writing plans to the plans directory are allowed. Use exit_plan_mode to request approval for your plan."
15
15
 
16
16
  # --- Read-only tools allowed in plan mode ---
17
17
  [[rule]]
@@ -44,6 +44,12 @@ decision = "allow"
44
44
  priority = 70
45
45
  modes = ["plan"]
46
46
 
47
+ [[rule]]
48
+ toolName = "analyze_multimedia"
49
+ decision = "allow"
50
+ priority = 70
51
+ modes = ["plan"]
52
+
47
53
  [[rule]]
48
54
  toolName = "web_search"
49
55
  decision = "allow"
@@ -57,7 +63,25 @@ priority = 70
57
63
  modes = ["plan"]
58
64
 
59
65
  [[rule]]
60
- toolName = "todo_write"
66
+ toolName = "job_create"
67
+ decision = "allow"
68
+ priority = 70
69
+ modes = ["plan"]
70
+
71
+ [[rule]]
72
+ toolName = "job_get"
73
+ decision = "allow"
74
+ priority = 70
75
+ modes = ["plan"]
76
+
77
+ [[rule]]
78
+ toolName = "job_update"
79
+ decision = "allow"
80
+ priority = 70
81
+ modes = ["plan"]
82
+
83
+ [[rule]]
84
+ toolName = "job_list"
61
85
  decision = "allow"
62
86
  priority = 70
63
87
  modes = ["plan"]
@@ -46,10 +46,24 @@ toolName = "analyze_multimedia"
46
46
  decision = "allow"
47
47
  priority = 50
48
48
 
49
- # todo_write is a planning/tracking tool that doesn't modify the filesystem.
50
- # It was always auto-approved (shouldConfirmExecute returns false).
49
+ # Job tools are planning/tracking tools that don't modify the filesystem.
51
50
  [[rule]]
52
- toolName = "todo_write"
51
+ toolName = "job_create"
52
+ decision = "allow"
53
+ priority = 50
54
+
55
+ [[rule]]
56
+ toolName = "job_get"
57
+ decision = "allow"
58
+ priority = 50
59
+
60
+ [[rule]]
61
+ toolName = "job_update"
62
+ decision = "allow"
63
+ priority = 50
64
+
65
+ [[rule]]
66
+ toolName = "job_list"
53
67
  decision = "allow"
54
68
  priority = 50
55
69