zrb 1.9.4__py3-none-any.whl → 1.9.6__py3-none-any.whl
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.
- zrb/__init__.py +8 -8
- zrb/__main__.py +1 -1
- zrb/builtin/__init__.py +0 -50
- zrb/builtin/llm/chat_session.py +1 -1
- zrb/builtin/llm/history.py +1 -1
- zrb/builtin/llm/llm_ask.py +3 -3
- zrb/builtin/llm/tool/api.py +19 -9
- zrb/builtin/llm/tool/cli.py +11 -5
- zrb/builtin/llm/tool/code.py +20 -20
- zrb/builtin/llm/tool/file.py +107 -155
- zrb/builtin/llm/tool/rag.py +28 -5
- zrb/builtin/llm/tool/sub_agent.py +12 -14
- zrb/builtin/llm/tool/web.py +46 -14
- zrb/builtin/todo.py +1 -1
- zrb/{llm_config.py → config/llm_config.py} +143 -158
- zrb/{llm_rate_limitter.py → config/llm_rate_limitter.py} +1 -1
- zrb/{runner → config}/web_auth_config.py +1 -1
- zrb/context/shared_context.py +1 -1
- zrb/input/text_input.py +1 -1
- zrb/runner/cli.py +2 -2
- zrb/runner/web_app.py +2 -2
- zrb/runner/web_route/docs_route.py +1 -1
- zrb/runner/web_route/error_page/serve_default_404.py +1 -1
- zrb/runner/web_route/error_page/show_error_page.py +1 -1
- zrb/runner/web_route/home_page/home_page_route.py +2 -2
- zrb/runner/web_route/login_api_route.py +1 -1
- zrb/runner/web_route/login_page/login_page_route.py +2 -2
- zrb/runner/web_route/logout_api_route.py +1 -1
- zrb/runner/web_route/logout_page/logout_page_route.py +2 -2
- zrb/runner/web_route/node_page/group/show_group_page.py +1 -1
- zrb/runner/web_route/node_page/node_page_route.py +1 -1
- zrb/runner/web_route/node_page/task/show_task_page.py +1 -1
- zrb/runner/web_route/refresh_token_api_route.py +1 -1
- zrb/runner/web_route/static/static_route.py +1 -1
- zrb/runner/web_route/task_input_api_route.py +1 -1
- zrb/runner/web_route/task_session_api_route.py +1 -1
- zrb/runner/web_util/cookie.py +1 -1
- zrb/runner/web_util/token.py +1 -1
- zrb/runner/web_util/user.py +1 -1
- zrb/session_state_logger/session_state_logger_factory.py +1 -1
- zrb/task/cmd_task.py +1 -1
- zrb/task/llm/agent.py +1 -1
- zrb/task/llm/config.py +1 -1
- zrb/task/llm/context_enrichment.py +2 -2
- zrb/task/llm/history_summarization.py +2 -2
- zrb/task/llm/prompt.py +1 -1
- zrb/task/llm_task.py +1 -1
- zrb/util/init_path.py +1 -1
- zrb-1.9.6.dist-info/METADATA +250 -0
- {zrb-1.9.4.dist-info → zrb-1.9.6.dist-info}/RECORD +53 -53
- zrb-1.9.4.dist-info/METADATA +0 -245
- /zrb/{config.py → config/config.py} +0 -0
- {zrb-1.9.4.dist-info → zrb-1.9.6.dist-info}/WHEEL +0 -0
- {zrb-1.9.4.dist-info → zrb-1.9.6.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import TYPE_CHECKING
|
2
2
|
|
3
|
-
from zrb.config import CFG
|
3
|
+
from zrb.config.config import CFG
|
4
4
|
|
5
5
|
if TYPE_CHECKING:
|
6
6
|
from pydantic_ai.models import Model
|
@@ -9,185 +9,170 @@ if TYPE_CHECKING:
|
|
9
9
|
|
10
10
|
|
11
11
|
DEFAULT_PERSONA = (
|
12
|
-
"You are a helpful and
|
13
|
-
|
14
|
-
"information, execute tasks, and solve problems. Always be accurate, "
|
15
|
-
"efficient, and get straight to the point."
|
16
|
-
).strip()
|
12
|
+
"You are a helpful and efficient AI agent specializing in CLI " "interaction."
|
13
|
+
)
|
17
14
|
|
18
15
|
DEFAULT_INTERACTIVE_SYSTEM_PROMPT = (
|
19
|
-
"This is an interactive session.
|
20
|
-
"this
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"action
|
35
|
-
"
|
16
|
+
"This is an interactive CLI session. Your standard response format is\n"
|
17
|
+
"GitHub-flavored Markdown. You MUST follow this thinking process:\n\n"
|
18
|
+
"1. **Analyze Request:** Use the `Scratchpad` and `Narrative Summary` to\n"
|
19
|
+
" fully understand the user's request in the context of the\n"
|
20
|
+
" conversation.\n\n"
|
21
|
+
"2. **Plan & Verify Pre-conditions:** Create a step-by-step plan. Before\n"
|
22
|
+
" executing, use read-only tools to check the current state. For\n"
|
23
|
+
" example, if the plan is to create a file, check if it already\n"
|
24
|
+
" exists. If pre-conditions are not as expected, inform the user.\n\n"
|
25
|
+
"3. **Assess Consent & Execute:**\n"
|
26
|
+
" - If the user's last instruction was an explicit command (e.g.,\n"
|
27
|
+
' "create file X", "delete Y"), you have consent. Proceed with the\n'
|
28
|
+
" action.\n"
|
29
|
+
' - If the request was general (e.g., "fix the bug") and your plan\n'
|
30
|
+
" involves a potentially altering action, you MUST explain the\n"
|
31
|
+
" action and ask for user approval before proceeding.\n\n"
|
32
|
+
"4. **Verify Outcome:** After executing the action, use read-only tools to\n"
|
33
|
+
" confirm it was successful. Report the outcome to the user.\n\n"
|
34
|
+
"For software engineering tasks, you MUST follow the guidelines in the\n"
|
35
|
+
"`DEFAULT_SPECIAL_INSTRUCTION_PROMPT`."
|
36
36
|
).strip()
|
37
37
|
|
38
38
|
DEFAULT_SYSTEM_PROMPT = (
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"2. **
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
39
|
+
"This is a one-shot CLI session. Your final answer MUST be in\n"
|
40
|
+
"GitHub-flavored Markdown. You MUST follow this thinking process:\n\n"
|
41
|
+
"1. **Analyze Request:** Use the `Scratchpad` and `Narrative Summary` to\n"
|
42
|
+
" fully understand the user's request in the context of the\n"
|
43
|
+
" conversation.\n\n"
|
44
|
+
"2. **Plan & Verify Pre-conditions:** Create a step-by-step plan. Before\n"
|
45
|
+
" executing, use read-only tools to check the current state. For\n"
|
46
|
+
" example, if the plan is to create a file, check if it already\n"
|
47
|
+
" exists. If pre-conditions are not as expected, state that and stop.\n\n"
|
48
|
+
"3. **Assess Consent & Execute:**\n"
|
49
|
+
" - If the user's last instruction was an explicit command (e.g.,\n"
|
50
|
+
' "create file X", "delete Y"), you have consent. Proceed with the\n'
|
51
|
+
" action.\n"
|
52
|
+
' - If the request was general (e.g., "fix the bug") and your plan\n'
|
53
|
+
" involves a potentially altering action, you MUST explain the\n"
|
54
|
+
" action and ask for user approval before proceeding.\n\n"
|
55
|
+
"4. **Verify Outcome:** After executing the action, use read-only tools to\n"
|
56
|
+
" confirm it was successful. Report the outcome to the user.\n\n"
|
57
|
+
"For software engineering tasks, you MUST follow the guidelines in the\n"
|
58
|
+
"`DEFAULT_SPECIAL_INSTRUCTION_PROMPT`."
|
48
59
|
).strip()
|
49
60
|
|
50
61
|
DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"configuration
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
76
|
-
"
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"
|
80
|
-
"
|
81
|
-
"
|
82
|
-
"
|
83
|
-
"
|
84
|
-
"
|
85
|
-
"
|
86
|
-
"
|
87
|
-
"
|
88
|
-
"
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"
|
95
|
-
"
|
96
|
-
"
|
62
|
+
"## Software Engineering Tasks\n"
|
63
|
+
"When requested to perform tasks like fixing bugs, adding features,\n"
|
64
|
+
"refactoring, or explaining code, follow this sequence:\n"
|
65
|
+
"1. **Understand:** Think about the user's request and the relevant\n"
|
66
|
+
"codebase context. Use your tools to understand file structures,\n"
|
67
|
+
"existing code patterns, and conventions.\n"
|
68
|
+
"2. **Plan:** Build a coherent and grounded plan. Share an extremely\n"
|
69
|
+
"concise yet clear plan with the user.\n"
|
70
|
+
"3. **Implement:** Use the available tools to act on the plan, strictly\n"
|
71
|
+
"adhering to the project's established conventions.\n"
|
72
|
+
"4. **Verify (Tests):** If applicable and feasible, verify the changes\n"
|
73
|
+
"using the project's testing procedures. Identify the correct test\n"
|
74
|
+
"commands and frameworks by examining 'README' files, build/package\n"
|
75
|
+
"configuration, or existing test execution patterns. NEVER assume\n"
|
76
|
+
"standard test commands.\n"
|
77
|
+
"5. **Verify (Standards):** After making code changes, execute the\n"
|
78
|
+
"project-specific build, linting and type-checking commands. This\n"
|
79
|
+
"ensures code quality and adherence to standards.\n\n"
|
80
|
+
"## New Applications\n"
|
81
|
+
"When asked to create a new application, follow this workflow:\n"
|
82
|
+
"1. **Understand Requirements:** Analyze the user's request to identify\n"
|
83
|
+
"core features, application type, and constraints.\n"
|
84
|
+
"2. **Propose Plan:** Formulate a development plan. Present a clear,\n"
|
85
|
+
"concise, high-level summary to the user, including technologies to be\n"
|
86
|
+
"used.\n"
|
87
|
+
"3. **User Approval:** Obtain user approval for the proposed plan.\n"
|
88
|
+
"4. **Implementation:** Autonomously implement each feature and design\n"
|
89
|
+
"element per the approved plan.\n"
|
90
|
+
"5. **Verify:** Review work against the original request and the approved\n"
|
91
|
+
"plan. Ensure the application builds and runs without errors.\n"
|
92
|
+
"6. **Solicit Feedback:** Provide instructions on how to start the\n"
|
93
|
+
"application and request user feedback.\n\n"
|
94
|
+
"## Git Repository\n"
|
95
|
+
"If you are in a git repository, you can be asked to commit changes:\n"
|
96
|
+
"- Use `git status` to ensure all relevant files are tracked and staged.\n"
|
97
|
+
"- Use `git diff HEAD` to review all changes.\n"
|
98
|
+
"- Use `git log -n 3` to review recent commit messages and match their\n"
|
99
|
+
"style.\n"
|
100
|
+
"- Propose a draft commit message. Never just ask the user to give you\n"
|
101
|
+
"the full commit message.\n\n"
|
102
|
+
"## Researching\n"
|
103
|
+
"When asked to research a topic, follow this workflow:\n"
|
104
|
+
"1. **Understand:** Clarify the research question and the desired output\n"
|
105
|
+
"format (e.g., summary, list of key points).\n"
|
106
|
+
"2. **Search:** Use your tools to gather information from multiple reputable \n"
|
107
|
+
"sources.\n"
|
108
|
+
"3. **Synthesize & Cite:** Present the information in the requested\n"
|
109
|
+
"format. For every piece of information, you MUST provide a citation\n"
|
110
|
+
"with the source URL."
|
97
111
|
).strip()
|
98
112
|
|
113
|
+
|
99
114
|
DEFAULT_SUMMARIZATION_PROMPT = (
|
100
|
-
"You are a Conversation Historian
|
101
|
-
"
|
102
|
-
"assistant
|
115
|
+
"You are a Conversation Historian. Your task is to distill the\n"
|
116
|
+
"conversation history into a dense, structured snapshot for the main\n"
|
117
|
+
"assistant. This snapshot is CRITICAL, as it will become the agent's\n"
|
118
|
+
"primary short-term memory.\n\n"
|
103
119
|
"## Historian Protocol\n"
|
104
|
-
"You
|
105
|
-
"
|
106
|
-
"
|
107
|
-
"
|
108
|
-
"
|
109
|
-
"
|
110
|
-
"
|
111
|
-
"
|
112
|
-
"
|
113
|
-
"
|
114
|
-
"
|
115
|
-
"
|
116
|
-
"
|
117
|
-
"
|
118
|
-
"
|
120
|
+
"You will receive a `Previous Summary` and the `Recent Conversation\n"
|
121
|
+
"History`. Your job is to create a new, updated summary.\n\n"
|
122
|
+
"### 1. Update the Narrative Summary\n"
|
123
|
+
"- **Integrate:** Weave the key events from the `Recent Conversation\n"
|
124
|
+
" History` into the `Narrative Summary`.\n"
|
125
|
+
"- **Condense and Prune:** As you add new information, you MUST condense\n"
|
126
|
+
" older parts of the narrative. Be incredibly dense with information.\n"
|
127
|
+
" Omit any irrelevant conversational filler. The summary should be a\n"
|
128
|
+
" rolling, high-level overview, not an ever-expanding log.\n\n"
|
129
|
+
"### 2. Update the Scratchpad\n"
|
130
|
+
"- **Purpose:** The Scratchpad is the assistant's working memory. It must\n"
|
131
|
+
" contain the last few turns of the conversation in full, non-truncated\n"
|
132
|
+
" detail.\n"
|
133
|
+
"- **ABSOLUTE REQUIREMENT: The assistant's response MUST be COPIED\n"
|
134
|
+
" VERBATIM into the Scratchpad. It is CRITICAL that you DO NOT\n"
|
135
|
+
" truncate, summarize, use placeholders, or alter the assistant's\n"
|
136
|
+
" response in any way. The entire, full response must be preserved.**\n"
|
137
|
+
"- **Format:** Present the assistant's turn as: `assistant (thought:\n"
|
138
|
+
" brief summary of action) final response`.\n\n"
|
119
139
|
"### 3. Output Specification\n"
|
120
|
-
"Your entire output MUST be a single block of text
|
121
|
-
"
|
122
|
-
"1. `## Narrative Summary` (The updated narrative)\n"
|
123
|
-
"2. `##
|
124
|
-
"---\n"
|
125
|
-
"## Example\n\n"
|
126
|
-
"### Input to You:\n\n"
|
127
|
-
"--- previous_summary ---\n"
|
128
|
-
"## Narrative Summary\n"
|
129
|
-
"The user, working on the 'Apollo' project, requested to refactor "
|
130
|
-
"`auth.py`.\n"
|
131
|
-
"## Recent History\n"
|
132
|
-
"user: I need to refactor auth.py to use the new 'requests' library.\n"
|
133
|
-
"assistant: Understood. I am starting the refactoring now.\n"
|
134
|
-
"user: Has it been completed?\n"
|
135
|
-
"assistant: Yes. The refactoring of `auth.py` is complete and all tests "
|
136
|
-
"are passing.\n"
|
137
|
-
"--- recent_conversation_history ---\n"
|
138
|
-
"user: Excellent. Now, please update the documentation in README.md.\n"
|
139
|
-
"assistant: I have updated the README.md file with the new documentation.\n"
|
140
|
-
"user: Looks good. Can you commit the changes for me?\n"
|
141
|
-
"assistant: Of course. What should the commit message be?\n\n"
|
142
|
-
"### Your Correct Output:\n"
|
143
|
-
"## Narrative Summary\n"
|
144
|
-
"The user, working on the 'Apollo' project, requested to refactor "
|
145
|
-
"`auth.py`. This was completed successfully. The user then asked to "
|
146
|
-
"update the documentation in `README.md`, which was also completed.\n\n"
|
147
|
-
"## Recent History\n"
|
148
|
-
"user: Excellent. Now, please update the documentation in README.md.\n"
|
149
|
-
"assistant: I have updated the README.md file with the new documentation.\n"
|
150
|
-
"user: Looks good. Can you commit the changes for me?\n"
|
151
|
-
"assistant: Of course. What should the commit message be?\n"
|
140
|
+
"Your entire output MUST be a single block of text with these two\n"
|
141
|
+
"sections:\n"
|
142
|
+
"1. `## Narrative Summary` (The updated and condensed narrative)\n"
|
143
|
+
"2. `## Scratchpad` (The new, non-truncated recent history)"
|
152
144
|
).strip()
|
153
145
|
|
154
146
|
DEFAULT_CONTEXT_ENRICHMENT_PROMPT = (
|
155
|
-
"You are a Memory Curator
|
156
|
-
"conversation and produce a concise, up-to-date Markdown block of
|
147
|
+
"You are a Memory Curator. Your sole purpose is to process a\n"
|
148
|
+
"conversation and produce a concise, up-to-date Markdown block of\n"
|
157
149
|
"long-term context for the main assistant.\n\n"
|
158
|
-
"You will be given the previous 'Long-Term Context' and the 'Recent
|
159
|
-
"Conversation History'. Your job is to return a NEW, UPDATED version of
|
150
|
+
"You will be given the previous 'Long-Term Context' and the 'Recent\n"
|
151
|
+
"Conversation History'. Your job is to return a NEW, UPDATED version of\n"
|
160
152
|
"the 'Long-Term Context'.\n\n"
|
161
153
|
"**Your Curation Process:**\n"
|
162
154
|
"1. **Review:** Analyze the existing 'Long-Term Context'.\n"
|
163
|
-
"2. **Update:** Read the 'Recent Conversation History' to identify
|
164
|
-
"new facts, changed goals, or completed tasks.\n"
|
165
|
-
"3. **Re-write:** Create the new 'Long-Term Context' by applying these
|
166
|
-
"changes.\n\n"
|
155
|
+
"2. **Update:** Read the 'Recent Conversation History' to identify\n"
|
156
|
+
" new facts, changed goals, or completed tasks.\n"
|
157
|
+
"3. **Re-write:** Create the new 'Long-Term Context' by applying these\n"
|
158
|
+
" changes.\n\n"
|
167
159
|
"**CRITICAL CURATION RULES:**\n"
|
168
|
-
"- **
|
160
|
+
"- **The context MUST NOT grow indefinitely.** Your primary goal is to\n"
|
161
|
+
" keep it concise and relevant to the *current* state of the\n"
|
162
|
+
" conversation.\n"
|
163
|
+
"- **ADD** new, stable facts (e.g., long-term user preferences).\n"
|
169
164
|
"- **UPDATE** existing facts if the user provides new information.\n"
|
170
|
-
"- **REMOVE** goals, tasks, or files that are completed or no longer
|
171
|
-
"relevant.
|
172
|
-
"
|
173
|
-
"
|
174
|
-
"
|
175
|
-
"
|
176
|
-
"
|
177
|
-
"
|
178
|
-
"
|
179
|
-
"
|
180
|
-
"
|
181
|
-
"assistant: The refactoring of `auth.py` is complete and all tests are "
|
182
|
-
"passing.\n"
|
183
|
-
"user: Great! Now, can you please write the documentation for the new "
|
184
|
-
"`auth.py` module in the `README.md` file?\n\n"
|
185
|
-
"**YOUR CORRECT OUTPUT (as a single Markdown block):**\n\n"
|
186
|
-
"## Long-Term Context\n"
|
187
|
-
"- **User Profile:** The user's name is Alex.\n"
|
188
|
-
"- **Current Goal:** Write documentation for the `auth.py` module in "
|
189
|
-
"`README.md`.\n"
|
190
|
-
"- **Key Files:** `auth.py`, `README.md`\n"
|
165
|
+
"- **REMOVE** goals, tasks, or files that are completed or no longer\n"
|
166
|
+
" relevant. Be aggressive in pruning irrelevant information.\n"
|
167
|
+
"- **CONDENSE** older entries that are still relevant but not the\n"
|
168
|
+
" immediate focus. For example, a completed high-level goal might be\n"
|
169
|
+
" condensed into a single 'Past Accomplishments' line item.\n\n"
|
170
|
+
"**A Note on Dynamic Information:**\n"
|
171
|
+
"Be mindful that some information is temporary. Details like the current\n"
|
172
|
+
"working directory, project context, or file contents can change\n"
|
173
|
+
"frequently. The main assistant MUST NOT assume this information is\n"
|
174
|
+
"current and should always use its tools to verify the latest state when\n"
|
175
|
+
"needed."
|
191
176
|
).strip()
|
192
177
|
|
193
178
|
|
zrb/context/shared_context.py
CHANGED
zrb/input/text_input.py
CHANGED
@@ -3,7 +3,7 @@ import subprocess
|
|
3
3
|
import tempfile
|
4
4
|
from collections.abc import Callable
|
5
5
|
|
6
|
-
from zrb.config import CFG
|
6
|
+
from zrb.config.config import CFG
|
7
7
|
from zrb.context.any_shared_context import AnySharedContext
|
8
8
|
from zrb.input.base_input import BaseInput
|
9
9
|
from zrb.util.file import read_file
|
zrb/runner/cli.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import sys
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
-
from zrb.config import CFG
|
4
|
+
from zrb.config.config import CFG
|
5
|
+
from zrb.config.web_auth_config import web_auth_config
|
5
6
|
from zrb.context.any_context import AnyContext
|
6
7
|
from zrb.context.shared_context import SharedContext
|
7
8
|
from zrb.group.any_group import AnyGroup
|
8
9
|
from zrb.group.group import Group
|
9
10
|
from zrb.runner.common_util import get_run_kwargs
|
10
|
-
from zrb.runner.web_auth_config import web_auth_config
|
11
11
|
from zrb.session.session import Session
|
12
12
|
from zrb.session_state_logger.session_state_logger_factory import session_state_logger
|
13
13
|
from zrb.task.any_task import AnyTask
|
zrb/runner/web_app.py
CHANGED
@@ -2,9 +2,9 @@ import asyncio
|
|
2
2
|
import sys
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
-
from zrb.config import CFG
|
5
|
+
from zrb.config.config import CFG
|
6
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
6
7
|
from zrb.group.any_group import AnyGroup
|
7
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
8
8
|
from zrb.runner.web_route.docs_route import serve_docs
|
9
9
|
from zrb.runner.web_route.error_page.serve_default_404 import serve_default_404
|
10
10
|
from zrb.runner.web_route.home_page.home_page_route import serve_home_page
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import TYPE_CHECKING
|
2
2
|
|
3
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
3
4
|
from zrb.group.any_group import AnyGroup
|
4
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
5
5
|
from zrb.runner.web_route.error_page.show_error_page import show_error_page
|
6
6
|
from zrb.runner.web_util.user import get_user_from_request
|
7
7
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import os
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
-
from zrb.config import CFG
|
4
|
+
from zrb.config.config import CFG
|
5
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
5
6
|
from zrb.group.any_group import AnyGroup
|
6
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
7
7
|
from zrb.runner.web_util.html import (
|
8
8
|
get_html_auth_link,
|
9
9
|
get_html_subgroup_info,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import TYPE_CHECKING, Annotated
|
2
2
|
|
3
|
-
from zrb.
|
3
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
4
4
|
from zrb.runner.web_util.cookie import set_auth_cookie
|
5
5
|
from zrb.runner.web_util.token import generate_tokens_by_credentials
|
6
6
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import os
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
-
from zrb.config import CFG
|
4
|
+
from zrb.config.config import CFG
|
5
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
5
6
|
from zrb.group.any_group import AnyGroup
|
6
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
7
7
|
from zrb.runner.web_util.html import get_html_auth_link
|
8
8
|
from zrb.runner.web_util.user import get_user_from_request
|
9
9
|
from zrb.util.file import read_file
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import os
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
-
from zrb.config import CFG
|
4
|
+
from zrb.config.config import CFG
|
5
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
5
6
|
from zrb.group.any_group import AnyGroup
|
6
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
7
7
|
from zrb.runner.web_util.html import get_html_auth_link
|
8
8
|
from zrb.runner.web_util.user import get_user_from_request
|
9
9
|
from zrb.util.file import read_file
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import os
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
4
5
|
from zrb.context.shared_context import SharedContext
|
5
6
|
from zrb.group.any_group import AnyGroup
|
6
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
7
7
|
from zrb.runner.web_route.error_page.show_error_page import show_error_page
|
8
8
|
from zrb.runner.web_route.node_page.group.show_group_page import show_group_page
|
9
9
|
from zrb.runner.web_route.node_page.task.show_task_page import show_task_page
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import TYPE_CHECKING
|
2
2
|
|
3
|
-
from zrb.
|
3
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
4
4
|
from zrb.runner.web_schema.token import RefreshTokenRequest
|
5
5
|
from zrb.runner.web_util.cookie import set_auth_cookie
|
6
6
|
from zrb.runner.web_util.token import regenerate_tokens
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import json
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
4
5
|
from zrb.group.any_group import AnyGroup
|
5
6
|
from zrb.runner.common_util import get_run_kwargs
|
6
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
7
7
|
from zrb.runner.web_util.user import get_user_from_request
|
8
8
|
from zrb.task.any_task import AnyTask
|
9
9
|
from zrb.util.group import NodeNotFoundError, extract_node_from_args
|
@@ -3,9 +3,9 @@ import os
|
|
3
3
|
from datetime import datetime, timedelta
|
4
4
|
from typing import TYPE_CHECKING, Any
|
5
5
|
|
6
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
6
7
|
from zrb.context.shared_context import SharedContext
|
7
8
|
from zrb.group.any_group import AnyGroup
|
8
|
-
from zrb.runner.web_auth_config import WebAuthConfig
|
9
9
|
from zrb.runner.web_schema.session import NewSessionResponse
|
10
10
|
from zrb.runner.web_util.user import get_user_from_request
|
11
11
|
from zrb.session.session import Session
|
zrb/runner/web_util/cookie.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from datetime import datetime, timedelta, timezone
|
2
2
|
from typing import TYPE_CHECKING
|
3
3
|
|
4
|
-
from zrb.
|
4
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
5
5
|
from zrb.runner.web_schema.token import Token
|
6
6
|
|
7
7
|
if TYPE_CHECKING:
|
zrb/runner/web_util/token.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from datetime import datetime, timedelta, timezone
|
2
2
|
|
3
|
-
from zrb.
|
3
|
+
from zrb.config.web_auth_config import WebAuthConfig
|
4
4
|
from zrb.runner.web_schema.token import Token
|
5
5
|
from zrb.runner.web_util.user import get_user_by_credentials
|
6
6
|
|
zrb/runner/web_util/user.py
CHANGED