ApiLogicServer 15.2.7__py3-none-any.whl → 15.3.0__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.
- api_logic_server_cli/api_logic_server.py +2 -1
- api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md +42 -1
- api_logic_server_cli/prototypes/base/test/api_logic_server_behave/behave_logic_report.py +19 -6
- api_logic_server_cli/prototypes/basic_demo/.github/.copilot-instructions.md +7 -5
- api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py +17 -1
- api_logic_server_cli/prototypes/basic_demo/readme.md +1 -1
- api_logic_server_cli/prototypes/basic_demo/tutor.md +392 -152
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/customizations/logic/declare_logic.py +17 -1
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/iteration/logic/declare_logic.py +17 -1
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/declare_logic.py +38 -1
- api_logic_server_cli/prototypes/manager/system/ApiLogicServer-Internal-Dev/copilot-dev-context.md +34 -2
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/METADATA +1 -1
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/RECORD +17 -17
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/WHEEL +0 -0
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.2.7.dist-info → apilogicserver-15.3.0.dist-info}/top_level.txt +0 -0
|
@@ -12,9 +12,10 @@ ApiLogicServer CLI: given a database url, create [and run] customizable ApiLogic
|
|
|
12
12
|
Called from api_logic_server_cli.py, by instantiating the ProjectRun object.
|
|
13
13
|
'''
|
|
14
14
|
|
|
15
|
-
__version__ = "15.
|
|
15
|
+
__version__ = "15.03.00" # last public release: 15.02.10
|
|
16
16
|
recent_changes = \
|
|
17
17
|
f'\n\nRecent Changes:\n' +\
|
|
18
|
+
"\t10/29/2025 - 15.03.00: Stable Tutor 3.3 (working, vibe transtion) \n"\
|
|
18
19
|
"\t10/26/2025 - 15.02.07: Clarify order created for ship test, security fixes [105], tutor 2.1 \n"\
|
|
19
20
|
"\t10/22/2025 - 15.02.03: Copilot test creation from rules and custom APIs with issues [103, 104] \n"\
|
|
20
21
|
"\t10/06/2025 - 15.01.06: Incorrect dbml reln arrows [102] \n"\
|
|
@@ -6,6 +6,7 @@ Propagation: CLI create command → created projects (non-basic_demo)
|
|
|
6
6
|
Usage: AI assistants read this when user opens any created project
|
|
7
7
|
version: 2.1
|
|
8
8
|
changelog:
|
|
9
|
+
- 2.2 (Oct 29, 2025 - Clear 1st message about reading Welcome section verbatim
|
|
9
10
|
- 2.1 (Oct 2025) - Streamlined OBX for non-tutorial projects, friendly collaborative tone
|
|
10
11
|
- 2.0 (Oct 2025) - Added front matter, updated for OBX improvements
|
|
11
12
|
- 1.0 (Initial) - Comprehensive technical reference
|
|
@@ -13,7 +14,16 @@ changelog:
|
|
|
13
14
|
|
|
14
15
|
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚠️ CRITICAL INSTRUCTION FOR AI ASSISTANTS
|
|
20
|
+
|
|
21
|
+
**When user first opens this project or asks "what can you help me with", respond with the following text VERBATIM (copy-paste exactly as shown below):**
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
|
|
25
|
+
|
|
26
|
+
**INSTRUCTION**: When the user asks you to read these instructions, respond with the Welcome section content below as your greeting. Do not add preamble like "I've read the instructions" - just present the Welcome content directly.
|
|
17
27
|
|
|
18
28
|
---
|
|
19
29
|
|
|
@@ -50,6 +60,37 @@ Want to get started? Press **F5** to start the server with debugger support, the
|
|
|
50
60
|
|
|
51
61
|
---
|
|
52
62
|
|
|
63
|
+
## 🔑 Key Technical Points
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**DO NOT create your own summary. DO NOT rephrase. Copy the text above exactly.**
|
|
67
|
+
|
|
68
|
+
The technical reference sections below are for later consultation when working on specific tasks.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Welcome (Reference Copy)
|
|
73
|
+
|
|
74
|
+
| # | Service | Description |
|
|
75
|
+
|---|---------|-------------|
|
|
76
|
+
| 1️⃣ | **Add business logic** | Describe your requirements in natural language, I'll generate declarative rules |
|
|
77
|
+
| 2️⃣ | **Customize the API** | Add custom endpoints for your specific needs |
|
|
78
|
+
| 3️⃣ | **Create custom UIs** | Build React apps with `genai-logic genai-add-app --vibe` |
|
|
79
|
+
| 4️⃣ | **Add security** | Set up role-based access control with `genai-logic add-auth` |
|
|
80
|
+
| 5️⃣ | **Test your logic** | Create Behave tests with requirements traceability |
|
|
81
|
+
| 6️⃣ | **Configure Admin UI** | Customize the auto-generated admin interface |
|
|
82
|
+
| 7️⃣ | **Add MCP integration** | Enable Model Context Protocol for external AI access |
|
|
83
|
+
| 8️⃣ | **Create B2B APIs** | Complex integration endpoints with partner systems |
|
|
84
|
+
| 9️⃣ | **Add events** | Integrate with Kafka, webhooks, or other event systems |
|
|
85
|
+
| 🔟 | **Customize models** | Add tables, attributes, or derived fields |
|
|
86
|
+
| 1️⃣1️⃣ | **Discovery systems** | Auto-load logic and APIs from discovery folders |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
Want to get started? Press **F5** to start the server with debugger support, then open `http://localhost:5656`. (There are also run configurations for running tests and other tasks.) Or just ask me what you'd like to work on.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
53
94
|
## 🔑 Key Technical Points
|
|
54
95
|
|
|
55
96
|
**Critical Implementation Details:**
|
|
@@ -129,19 +129,32 @@ def show_logic(scenario: str, logic_logs_dir: str):
|
|
|
129
129
|
best_section = max(rules_sections, key=lambda x: x['rule_count'])
|
|
130
130
|
last_rules_start = best_section['start']
|
|
131
131
|
last_rules_end = best_section['end']
|
|
132
|
+
# Find where the "These Rules Fired" line is (one line before rules start)
|
|
133
|
+
rules_fired_line = last_rules_start - 1
|
|
134
|
+
# Now search backwards to find the beginning of this logic section
|
|
135
|
+
logic_start_line = rules_fired_line - 1
|
|
136
|
+
while logic_start_line > 0:
|
|
137
|
+
line = logic_lines[logic_start_line].strip()
|
|
138
|
+
# Look for the start marker (usually after a blank line following "COMPLETE")
|
|
139
|
+
if 'Logic Phase:' in logic_lines[logic_start_line] and 'ROW LOGIC' in logic_lines[logic_start_line]:
|
|
140
|
+
# Found the start of the logic section
|
|
141
|
+
# Go back one more to include the header line (scenario name)
|
|
142
|
+
if logic_start_line > 0 and logic_lines[logic_start_line-1].strip():
|
|
143
|
+
logic_start_line -= 1
|
|
144
|
+
break
|
|
145
|
+
logic_start_line -= 1
|
|
132
146
|
else:
|
|
133
147
|
last_rules_start = -1
|
|
134
148
|
last_rules_end = -1
|
|
149
|
+
logic_start_line = 0
|
|
135
150
|
|
|
136
|
-
# Now process the file, collecting logic log and extracting the
|
|
151
|
+
# Now process the file, collecting logic log and extracting the rules section
|
|
137
152
|
for i, each_logic_line in enumerate(logic_lines):
|
|
138
153
|
each_logic_line = remove_trailer(each_logic_line)
|
|
139
154
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
else:
|
|
144
|
-
logic_log.append(each_logic_line)
|
|
155
|
+
# Collect logic log from the best section
|
|
156
|
+
if rules_sections and logic_start_line <= i < rules_fired_line:
|
|
157
|
+
logic_log.append(each_logic_line)
|
|
145
158
|
|
|
146
159
|
# Extract rules from the last "These Rules Fired" section
|
|
147
160
|
if last_rules_start <= i < last_rules_end:
|
|
@@ -4,17 +4,18 @@ Description: Project-level instructions for AI assistants conducting guided tour
|
|
|
4
4
|
Source: ApiLogicServer-src/prototypes/basic_demo/.github/.copilot-instructions.md
|
|
5
5
|
Propagation: CLI create command → created projects
|
|
6
6
|
Usage: AI assistants read this when user says "guide me through"
|
|
7
|
-
version: 2.
|
|
7
|
+
version: 2.3
|
|
8
8
|
changelog:
|
|
9
|
+
- 2.4 10/28/2025 - Added "Ready to explore?" prompt to guide user to tutor.md
|
|
10
|
+
- 2.3 (Oct 2025) - Added positive instruction: respond WITH Welcome section content
|
|
11
|
+
- 2.2 (Oct 2025) - Removed meta-instruction; let structure speak for itself
|
|
9
12
|
- 2.1 (Oct 2025) - Streamlined OBX, emphasized uncustomized template, friendly collaborative tone
|
|
10
13
|
- 2.0 (Oct 2025) - Added provocation method, spreadsheet analogy, timing checkpoints
|
|
11
14
|
---
|
|
12
15
|
|
|
13
16
|
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
+
**INSTRUCTION**: When the user asks you to read these instructions, respond with the Welcome section content below as your greeting. Do not add preamble like "I've read the instructions" - just present the Welcome content directly.
|
|
18
19
|
|
|
19
20
|
## Welcome
|
|
20
21
|
|
|
@@ -33,7 +34,8 @@ This is a complete, working microservice auto-generated from a database schema -
|
|
|
33
34
|
|
|
34
35
|
**First, we'll briefly explore what's automatically created. Then I'll show you how I can help you customize it - adding logic, security, and API endpoints.**
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
**Ready to explore?** Open `tutor.md` and tell me "guide me through" to begin the interactive tutorial.
|
|
37
39
|
|
|
38
40
|
---
|
|
39
41
|
|
|
@@ -32,7 +32,23 @@ def declare_logic():
|
|
|
32
32
|
from logic.logic_discovery.auto_discovery import discover_logic
|
|
33
33
|
discover_logic()
|
|
34
34
|
|
|
35
|
-
# Logic from GenAI
|
|
35
|
+
# Logic from GenAI
|
|
36
|
+
'''
|
|
37
|
+
You can enter logic in 2 ways:
|
|
38
|
+
1. Using your IDE and code completion (Rule.)
|
|
39
|
+
|
|
40
|
+
2. Use your AI Assistant and enter logic in Natural Language, e.g.:
|
|
41
|
+
Create Business Logic for Use Case = Check Credit:
|
|
42
|
+
1. The Customer's balance is less than the credit limit
|
|
43
|
+
2. The Customer's balance is the sum of the Order amount_total where date_shipped is null
|
|
44
|
+
3. The Order's amount_total is the sum of the Item amount
|
|
45
|
+
4. The Item amount is the quantity * unit_price
|
|
46
|
+
5. The Item unit_price is copied from the Product unit_price
|
|
47
|
+
|
|
48
|
+
Use case: App Integration
|
|
49
|
+
1. Send the Order to Kafka topic 'order_shipping' if the date_shipped is not None.
|
|
50
|
+
Also, using logic/logic_discovery is a Best Practice - see logic/readme_logic.md
|
|
51
|
+
'''
|
|
36
52
|
from database.models import Product, Order, Item, Customer, SysEmail
|
|
37
53
|
|
|
38
54
|
# Ensure the customer's balance is less than their credit limit
|
|
@@ -31,7 +31,7 @@ Please find and read `.github/.copilot-instructions.md`.
|
|
|
31
31
|
|
|
32
32
|
<br>
|
|
33
33
|
|
|
34
|
-
The entire process takes
|
|
34
|
+
The entire process takes 45 minutes; usage notes:
|
|
35
35
|
|
|
36
36
|
* Important: look for **readme files** in created projects
|
|
37
37
|
* You may find it more convenient to view this [in your Browser](https://apilogicserver.github.io/Docs/Sample-Basic-Tour)
|