ApiLogicServer 15.3.2__py3-none-any.whl → 15.3.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.
@@ -12,10 +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.03.02" # last public release: 15.03.00
15
+ __version__ = "15.03.06" # last public release: 15.03.02
16
16
  recent_changes = \
17
17
  f'\n\nRecent Changes:\n' +\
18
- "\t11/04/2025 - 15.03.02: Fix Manager/Copilot startup \n"\
18
+ "\t11/06/2025 - 15.03.06: Nat lang Copilot data access, fix Manager/Copilot startup, finding venv in project \n"\
19
19
  "\t10/29/2025 - 15.03.00: Stable Tutor 3.3 (working, vibe transtion) \n"\
20
20
  "\t10/26/2025 - 15.02.07: Clarify order created for ship test, security fixes [105], tutor 2.1 \n"\
21
21
  "\t10/22/2025 - 15.02.03: Copilot test creation from rules and custom APIs with issues [103, 104] \n"\
@@ -84,7 +84,7 @@ def copy_md(project, from_doc_file: str, to_project_file: str = "README.md"):
84
84
 
85
85
  1. github (to acquire more recent version since release)
86
86
 
87
- 2. dev docs, iff exists (gold version in docs, not prototypes).
87
+ 2. dev docs, iff exists (**gold version in docs, not prototypes**).
88
88
 
89
89
  Used by Sample-AI; Sample-Integration (nw-), Tutorial, Tutorial-3 (3 projects), Sample-Basic-Demo; Manager
90
90
 
@@ -98,6 +98,8 @@ def copy_md(project, from_doc_file: str, to_project_file: str = "README.md"):
98
98
 
99
99
  Doc Links are made absolute.
100
100
 
101
+ See: https://apilogicserver.github.io/Docs/Architecture-Internals/#docs-used-in-project-creation
102
+
101
103
  Args:
102
104
  project (ProjectRun or Path): project object (project name, etc)
103
105
  from_doc_file (str): eg, Sample-Basic_Demo.md (no docs/)
@@ -3,9 +3,11 @@ title: Copilot Instructions for GenAI-Logic Projects
3
3
  Description: Project-level instructions for working with generated projects
4
4
  Source: ApiLogicServer-src/prototypes/base/.github/.copilot-instructions.md
5
5
  Propagation: CLI create command → created projects (non-basic_demo)
6
+ Instrucions: Changes must be copied to api_logic_server_cli/prototypes/basic_demo/.github - see instructions there
6
7
  Usage: AI assistants read this when user opens any created project
7
- version: 2.3
8
+ version: 2.4
8
9
  changelog:
10
+ - 2.4 (Nov 05, 2025 - Added MCP Integration section, Copilot as MCP client capability)
9
11
  - 2.3 (Nov 04, 2025 - Clear 1st message about reading Welcome section verbatim, again for non basic_demo)
10
12
  - 2.2 (Oct 29, 2025 - Clear 1st message about reading Welcome section verbatim)
11
13
  - 2.1 (Oct 2025) - Streamlined OBX for non-tutorial projects, friendly collaborative tone
@@ -15,7 +17,8 @@ changelog:
15
17
 
16
18
  # GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
17
19
 
18
- **INSTRUCTION**: When the user asks you to load 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.
20
+
21
+ **INSTRUCTION**: When the user asks you to load 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. The Welcome section ends at the "---" marker before "🔑 Key Technical Points".
19
22
 
20
23
  ## Welcome
21
24
 
@@ -40,7 +43,7 @@ This is a complete, working microservice auto-generated from your database schem
40
43
  4. **Add security** - Set up role-based access control with `genai-logic add-auth`
41
44
  5. **Test your logic** - Create Behave tests with requirements traceability
42
45
  6. **Configure Admin UI** - Customize the auto-generated admin interface
43
- 7. **Add MCP integration** - Enable Model Context Protocol for external AI access
46
+ 7. **Query via natural language** - I can act as MCP client to read/update data (see `docs/training/MCP_Copilot_Integration.md`)
44
47
  8. **Create B2B APIs** - Complex integration endpoints with partner systems
45
48
  9. **Add events** - Integrate with Kafka, webhooks, or other event systems
46
49
  10. **Customize models** - Add tables, attributes, or derived fields
@@ -109,6 +112,17 @@ Want to get started? Press **F5** to start the server with debugger support, the
109
112
  ## Detailed Service Documentation
110
113
 
111
114
  The sections below provide complete details on each service. I'll reference these as needed when we work together.
115
+
116
+ ### `venv` is required
117
+
118
+ To establish the virtual environment:
119
+
120
+ 1. Attempt to find a `venv` folder in the parent or grandparent directory
121
+ 2. Or, create it using requirements.txt
122
+
123
+ ### Starting the server
124
+
125
+ ```bash
112
126
  python api_logic_server_run.py
113
127
  # Then open: http://localhost:5656
114
128
  ```
@@ -236,6 +250,48 @@ When users provide natural language with multiple use cases like:
236
250
 
237
251
  **NEVER put everything in `use_case.py`** - that defeats the discovery system purpose.
238
252
 
253
+ ### MCP Integration - Acting as Database Client
254
+
255
+ **You (GitHub Copilot) can serve as an MCP client** to read and update database entities using natural language queries!
256
+
257
+ **Architecture**: This project implements **MCP Server Executor** - a business logic microservice that AI assistants interact with via authenticated REST API calls. See `docs/training/MCP_Copilot_Integration.md` for complete details.
258
+
259
+ **When users request database operations** (e.g., "list customers", "update credit limit", "what's the balance?"):
260
+
261
+ 1. **Authenticate first** - Login to obtain JWT token:
262
+ ```bash
263
+ curl -X POST http://localhost:5656/api/auth/login \
264
+ -H "Content-Type: application/json" \
265
+ -d '{"username":"admin","password":"p"}'
266
+ ```
267
+
268
+ 2. **Execute operations** - Use Bearer token for API calls:
269
+ ```bash
270
+ # Read: List entities
271
+ curl -X GET http://localhost:5656/api/Customer/ \
272
+ -H "Authorization: Bearer {token}"
273
+
274
+ # Update: Change attributes (JSON:API format)
275
+ curl -X PATCH http://localhost:5656/api/Customer/ALFKI/ \
276
+ -H "Authorization: Bearer {token}" \
277
+ -H "Content-Type: application/vnd.api+json" \
278
+ -d '{"data": {"type": "Customer", "id": "ALFKI", "attributes": {"CreditLimit": 5000}}}'
279
+ ```
280
+
281
+ 3. **Handle constraint violations correctly** - Error code 2001 is SUCCESS!
282
+ - When LogicBank prevents invalid updates, report as: "✅ Business logic working - constraint prevented invalid operation"
283
+ - Example: "balance (2102.00) exceeds credit (1000.00)" = logic is protecting data integrity
284
+
285
+ **Natural Language Translation Examples**:
286
+ - "List customers" → `GET /api/Customer/`
287
+ - "Show customer ALFKI" → `GET /api/Customer/ALFKI/`
288
+ - "Set ALFKI credit to 5000" → `PATCH /api/Customer/ALFKI/` with CreditLimit
289
+ - "What's ALFKI's balance?" → `GET /api/Customer/ALFKI/` then extract Balance attribute
290
+
291
+ **Key Principle**: Constraint violations (code 2001) demonstrate that declarative business logic is working correctly - celebrate these as successes, not failures!
292
+
293
+ See `docs/training/MCP_Copilot_Integration.md` for comprehensive guide including JSON:API payload formats, authentication workflows, and architecture details.
294
+
239
295
  ### Automated Testing
240
296
 
241
297
  **CRITICAL WORKFLOW - When User Says "Create Tests":**
@@ -0,0 +1,295 @@
1
+ # MCP Integration Guide for Copilot
2
+
3
+ ## Overview
4
+
5
+ This GenAI-Logic project implements **MCP Server Executor** architecture - providing business logic services that AI assistants (like GitHub Copilot) can invoke to read and update database entities using natural language.
6
+
7
+ **Key Distinction**: GenAI-Logic is NOT a standard "MCP Protocol Server" (JSON-RPC over stdio). Instead, it's a **business logic microservice** that AI assistants interact with via authenticated REST API calls. This architecture is more scalable and enterprise-ready than stdio-based MCP servers.
8
+
9
+ ## Architecture
10
+
11
+ ```
12
+ ┌─────────────────────────────────┐
13
+ │ GitHub Copilot / Claude │ Natural language interface
14
+ │ (MCP Client / AI Assistant) │
15
+ └────────────┬────────────────────┘
16
+ │ HTTP REST API (JSON:API format)
17
+ │ JWT Authentication
18
+ ┌────────────▼────────────────────┐
19
+ │ GenAI-Logic Server │ MCP Server Executor
20
+ │ (Flask + LogicBank) │ - Business logic enforcement
21
+ │ │ - Constraint validation
22
+ │ Endpoints: │ - Declarative rules (44X reduction)
23
+ │ - /api/auth/login │ - Schema metadata
24
+ │ - /api/{Entity} │
25
+ │ - /.well-known/mcp.json │
26
+ │ - /mcp │
27
+ └────────────┬────────────────────┘
28
+
29
+ ┌────────────▼────────────────────┐
30
+ │ Database (SQLAlchemy ORM) │
31
+ └─────────────────────────────────┘
32
+ ```
33
+
34
+ ## How Copilot Acts as MCP Client
35
+
36
+ GitHub Copilot can serve as an interactive MCP client by:
37
+
38
+ 1. **Authenticating** - Login to obtain JWT token
39
+ 2. **Translating** - Convert natural language to API operations
40
+ 3. **Executing** - Make authenticated HTTP calls
41
+ 4. **Reporting** - Present results or explain constraint violations
42
+
43
+ ## Copilot Usage Pattern
44
+
45
+ ### Step 1: Authentication
46
+
47
+ When user requests database operations, Copilot should first authenticate:
48
+
49
+ ```bash
50
+ curl -X POST http://localhost:5656/api/auth/login \
51
+ -H "Content-Type: application/json" \
52
+ -d '{"username":"admin","password":"p"}'
53
+ ```
54
+
55
+ Response contains JWT token:
56
+ ```json
57
+ {
58
+ "access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
59
+ "token_type": "Bearer"
60
+ }
61
+ ```
62
+
63
+ ### Step 2: Execute Operations
64
+
65
+ Use token for authenticated requests:
66
+
67
+ #### Read Operations (GET)
68
+ ```bash
69
+ # List customers
70
+ curl -X GET http://localhost:5656/api/Customer/ \
71
+ -H "Authorization: Bearer {token}"
72
+
73
+ # Get specific customer
74
+ curl -X GET http://localhost:5656/api/Customer/ALFKI/ \
75
+ -H "Authorization: Bearer {token}"
76
+ ```
77
+
78
+ #### Update Operations (PATCH)
79
+ ```bash
80
+ # Update customer credit limit
81
+ curl -X PATCH http://localhost:5656/api/Customer/ALFKI/ \
82
+ -H "Authorization: Bearer {token}" \
83
+ -H "Content-Type: application/vnd.api+json" \
84
+ -d '{
85
+ "data": {
86
+ "type": "Customer",
87
+ "id": "ALFKI",
88
+ "attributes": {
89
+ "CreditLimit": 5000
90
+ }
91
+ }
92
+ }'
93
+ ```
94
+
95
+ #### Create Operations (POST)
96
+ ```bash
97
+ # Create new customer
98
+ curl -X POST http://localhost:5656/api/Customer/ \
99
+ -H "Authorization: Bearer {token}" \
100
+ -H "Content-Type: application/vnd.api+json" \
101
+ -d '{
102
+ "data": {
103
+ "type": "Customer",
104
+ "attributes": {
105
+ "Id": "NEWCO",
106
+ "CompanyName": "New Company Inc",
107
+ "ContactName": "John Doe",
108
+ "CreditLimit": 1000
109
+ }
110
+ }
111
+ }'
112
+ ```
113
+
114
+ ### Step 3: Handle Constraint Violations
115
+
116
+ **CRITICAL**: Constraint violations are SUCCESS demonstrations of business logic!
117
+
118
+ When an update violates business rules, the server returns error code 2001:
119
+
120
+ ```json
121
+ {
122
+ "error": {
123
+ "code": 2001,
124
+ "message": "balance (2102.00) exceeds credit (1000.00)"
125
+ }
126
+ }
127
+ ```
128
+
129
+ **Copilot should report this as**: "✅ Business logic working correctly - constraint prevented invalid update: balance exceeds credit limit"
130
+
131
+ Common constraint codes:
132
+ - **2001** - Business rule violation (the valuable demonstration!)
133
+ - **401** - Unauthorized (need to authenticate)
134
+ - **404** - Entity not found
135
+ - **422** - Validation error
136
+
137
+ ## Natural Language → API Translation Examples
138
+
139
+ | User Request | Copilot Action | API Call |
140
+ |--------------|----------------|----------|
141
+ | "List all customers" | GET collection | `GET /api/Customer/` |
142
+ | "Show customer ALFKI" | GET single entity | `GET /api/Customer/ALFKI/` |
143
+ | "Update ALFKI credit to 5000" | PATCH entity | `PATCH /api/Customer/ALFKI/` with CreditLimit |
144
+ | "What's ALFKI's balance?" | GET entity, extract attribute | `GET /api/Customer/ALFKI/` → read Balance |
145
+ | "Increase ALFKI credit by 1000" | GET then PATCH | GET current → calculate → PATCH new value |
146
+ | "Create customer NEWCO" | POST entity | `POST /api/Customer/` with attributes |
147
+
148
+ ## MCP Discovery Endpoints
149
+
150
+ The server exposes schema metadata for AI assistants:
151
+
152
+ ### Well-Known Endpoint
153
+ ```bash
154
+ curl http://localhost:5656/.well-known/mcp.json
155
+ ```
156
+
157
+ Returns full schema including:
158
+ - Available entities (tables)
159
+ - Attributes and types
160
+ - Relationships
161
+ - Business rules documentation
162
+
163
+ ### MCP Endpoint
164
+ ```bash
165
+ curl http://localhost:5656/mcp
166
+ ```
167
+
168
+ Same schema as well-known endpoint, alternate path for compatibility.
169
+
170
+ ## Key Implementation Files
171
+
172
+ - **`api/api_discovery/mcp_discovery.py`** - MCP discovery endpoints
173
+ - **`integration/mcp/mcp_client_executor.py`** - Example MCP client script
174
+ - **`docs/mcp_learning/mcp_schema.json`** - Schema metadata
175
+ - **`logic/declare_logic.py`** - Declarative business rules (LogicBank)
176
+ - **`config/default.env`** - Server configuration (SECURITY_ENABLED)
177
+
178
+ ## Testing Workflow for Copilot
179
+
180
+ When user says: "Can you query the database for me?"
181
+
182
+ 1. **Acknowledge**: "I'll act as MCP client and query the server"
183
+ 2. **Authenticate**: Login via `/api/auth/login` to get JWT token
184
+ 3. **Execute**: Make appropriate GET/PATCH/POST call with Bearer token
185
+ 4. **Present**: Format results or explain constraint violations as logic success
186
+ 5. **Iterate**: Accept follow-up natural language requests
187
+
188
+ Example interaction:
189
+ ```
190
+ User: "List customers with balance over 1000"
191
+ Copilot:
192
+ 1. Login to get token
193
+ 2. GET /api/Customer/?filter[Balance]=>1000
194
+ 3. Present: "Found 3 customers: ALFKI (2102.00), ANATR (1500.50), ..."
195
+
196
+ User: "Try to set ALFKI credit to 500"
197
+ Copilot:
198
+ 1. PATCH /api/Customer/ALFKI/ with CreditLimit=500
199
+ 2. Receive error 2001: "balance (2102.00) exceeds credit (500.00)"
200
+ 3. Present: "✅ Business logic prevented this - ALFKI's balance of 2102.00
201
+ exceeds the proposed credit limit of 500.00. The system is correctly
202
+ enforcing the constraint that credit must be >= balance."
203
+ ```
204
+
205
+ ## Business Logic Layer (LogicBank)
206
+
207
+ The real power is in declarative business rules that auto-execute on all API operations:
208
+
209
+ ```python
210
+ # From logic/declare_logic.py
211
+
212
+ # Constraint: Customer balance cannot exceed credit limit
213
+ Rule.constraint(validate=models.Customer,
214
+ as_condition=lambda row: row.Balance <= row.CreditLimit,
215
+ error_msg="balance ({row.Balance}) exceeds credit ({row.CreditLimit})")
216
+
217
+ # Sum rule: Customer balance = sum of unpaid order amounts
218
+ Rule.sum(derive=models.Customer.Balance,
219
+ as_sum_of=models.Order.AmountTotal,
220
+ where=lambda row: row.ShippedDate is None)
221
+
222
+ # Formula: Order amount = sum of items
223
+ Rule.sum(derive=models.Order.AmountTotal,
224
+ as_sum_of=models.OrderDetail.Amount)
225
+ ```
226
+
227
+ These rules:
228
+ - Execute automatically on INSERT/UPDATE/DELETE
229
+ - Provide **44X code reduction** vs. traditional procedural code
230
+ - Enforce multi-table constraints
231
+ - Chain automatically (Order → Customer balance)
232
+
233
+ ## Why This Architecture?
234
+
235
+ **GenAI-Logic's HTTP-based approach** vs **stdio-based MCP servers**:
236
+
237
+ | Aspect | GenAI-Logic (HTTP) | Stdio MCP |
238
+ |--------|-------------------|-----------|
239
+ | Transport | HTTP REST API | JSON-RPC over stdin/stdout |
240
+ | Authentication | JWT Bearer tokens | Process isolation |
241
+ | Scalability | Horizontal scaling | One process per client |
242
+ | Network | Works across machines | Same machine only |
243
+ | Protocol | JSON:API standard | Custom JSON-RPC |
244
+ | Enterprise Ready | ✅ Yes | ⚠️ Limited |
245
+
246
+ For Microsoft demo: Position GenAI-Logic as the **business logic layer** that any MCP client can invoke, rather than trying to fit into stdio-based protocol constraints.
247
+
248
+ ## Optional: JSON-RPC Wrapper
249
+
250
+ If standard MCP protocol compatibility is desired, you could add a thin JSON-RPC wrapper:
251
+
252
+ ```python
253
+ # Optional enhancement - not required for Copilot usage
254
+ @app.route('/mcp/jsonrpc', methods=['POST'])
255
+ def mcp_jsonrpc():
256
+ """Translate JSON-RPC 2.0 to internal API calls"""
257
+ request_data = request.json
258
+ method = request_data.get('method')
259
+ params = request_data.get('params', {})
260
+
261
+ if method == 'customers/list':
262
+ # Translate to GET /api/Customer/
263
+ response = internal_api_call('GET', '/api/Customer/', params)
264
+ return jsonify({'jsonrpc': '2.0', 'result': response, 'id': request_data['id']})
265
+ # ... more method translations
266
+ ```
267
+
268
+ **Effort estimate**: Half-day for experienced developer. But this is optional - Copilot can work directly with REST API.
269
+
270
+ ## Demo Strategy
271
+
272
+ For Microsoft presentation:
273
+
274
+ 1. **Position correctly**: "GenAI-Logic implements MCP Server Executor - the valuable business logic layer"
275
+ 2. **Show constraint violations**: "Error 2001 is the success - logic is working!"
276
+ 3. **Demonstrate declarative rules**: "44X code reduction with automatic multi-table chaining"
277
+ 4. **Use Copilot as client**: "AI assistant translates natural language to authenticated API calls"
278
+ 5. **Highlight enterprise architecture**: "HTTP-based, JWT auth, horizontally scalable"
279
+
280
+ The MCP discovery endpoints (`/.well-known/mcp.json` and `/mcp`) allow AI assistants to understand the schema and available operations, but the real innovation is the declarative business logic layer that enforces rules automatically.
281
+
282
+ ## Quick Reference for Copilot
283
+
284
+ **Authentication**:
285
+ ```bash
286
+ curl -X POST http://localhost:5656/api/auth/login -d '{"username":"admin","password":"p"}'
287
+ ```
288
+
289
+ **Common operations**:
290
+ - List: `GET /api/{Entity}/` with Bearer token
291
+ - Read: `GET /api/{Entity}/{id}/` with Bearer token
292
+ - Update: `PATCH /api/{Entity}/{id}/` with JSON:API payload and Bearer token
293
+ - Create: `POST /api/{Entity}/` with JSON:API payload and Bearer token
294
+
295
+ **Remember**: Constraint violations (code 2001) = business logic success! Report them positively.
@@ -1,12 +1,12 @@
1
1
  This describes how to use Logic; for more information, [see here](https://apilogicserver.github.io/Docs/Logic-Why).
2
2
 
3
- > What is Logic: Multi-table Derivation and Constraint Rules, Extensible with Python
4
- <br>Rules are:
5
- <br>1. **Declared** in your IDE - 40X more concise
6
- <br>2. **Activated** on server start
7
- <br>3. **Executed** - *automatically* - on updates (using SQLAlchemy events)
8
- <br>4. **Debugged** in your IDE, and with the console log
9
- <br>For more on rules, [click here](https://apilogicserver.github.io/Docs/Logic-Why/).
3
+ > What is Logic: Multi-table Derivation and Constraint Rules, Extensible with Python
4
+ > <br>Rules are:
5
+ > <br>1. **Declared** in your IDE - 40X more concise
6
+ > <br>2. **Activated** on server start
7
+ > <br>3. **Executed** - *automatically* - on updates (using SQLAlchemy events)
8
+ > <br>4. **Debugged** in your IDE, and with the console log
9
+ > <br>For more on rules, [click here](https://apilogicserver.github.io/Docs/Logic-Why/).
10
10
 
11
11
  &nbsp;
12
12
 
@@ -27,11 +27,13 @@ Use case: App Integration
27
27
  ```
28
28
 
29
29
  Basic process:
30
+
30
31
  1. Create a file such as `logic/logic_discovery/check_credit.py` (e.g., copy from `use_case.py`).
31
- 2. Paste the prompt above into CoPilot - use `docs/training` to generate logic
32
+ 2. Paste the prompt above into CoPilot - it uses `docs/training` to generate logic
32
33
  3. Paste the generated logic into `logic/logic_discovery/check_credit.py`
33
34
 
34
35
  From the Natural Language, Copilot will create Python rules (you can also create these directly using code completion):
36
+
35
37
  ```python
36
38
  if os.environ.get("WG_PROJECT"):
37
39
  # Inside WG: Load rules from docs/expprt/export.json
@@ -67,7 +69,7 @@ From the Natural Language, Copilot will create Python rules (you can also create
67
69
 
68
70
  ## Natural Language vs. IDE
69
71
 
70
- If you are using WebGenAI, you can specify rules in Natural Language. You can also augment them in the IDE using code completion. There are some important usage guidelines.
72
+ If you are using WebGenAI, you can specify rules in Natural Language. You can also augment them in the IDE using code completion. There are some important usage guidelines.
71
73
 
72
74
  > You should generally not alter any files in the `wg_rules` directory. For more information, see [WebGenAI](https://apilogicserver.github.io/Docs/WebGenAI/), and [WebGenAI Logic](https://apilogicserver.github.io/Docs/WebGenAI-CLI.md#natural-language-logic).
73
75
 
@@ -79,7 +81,7 @@ You can declare logic in `declare_logic.py`,
79
81
  but that can lead to a lot of rules in 1 file.
80
82
 
81
83
  A *best practice* is to create logic files in `logic/logic_discovery`,
82
- named after the use case (e.g., `check_credit.py`).
84
+ named after the use case (e.g., `check_credit.py`).
83
85
 
84
86
  The easiest way to to copy/paste `use_case.py` to a new file, then
85
87
  add your logic either by Natural Language (use your Coding Assistant, such as CoPilot),
@@ -87,8 +89,10 @@ or your IDE's code completion.
87
89
 
88
90
  <br>
89
91
 
90
- ## Examples
92
+ ## Examples
93
+
91
94
  Examples from tutorial project:
95
+
92
96
  * Examples drawn from [tutorial project](https://github.com/ApiLogicServer/demo/blob/main/logic/declare_logic.py)
93
97
  * Use Shift + "." to view in project mode
94
98
 
@@ -105,11 +109,13 @@ This declares the Customer.Balance as the sum of the unshipped Order.AmountTotal
105
109
  as_sum_of=models.Order.AmountTotal,
106
110
  where=lambda row: row.ShippedDate is None)
107
111
  ```
112
+
108
113
  It means the rule engine **watches** for these changes:
114
+
109
115
  * Order inserted/deleted, or
110
116
  * AmountTotal or ShippedDate or CustomerID changes
111
117
 
112
- Iff changes are detected, the engine **reacts** by *adjusting* the Customer.Balance. SQLs are [optimized](#declarative-logic-important-notes).
118
+ Iff changes are detected, the engine **reacts** by *adjusting* the Customer.Balance. SQLs are [optimized - see Important Notes, below](#declarative-logic-important-notes).
113
119
 
114
120
  This would **chain** to check the Customers' Constraint rule, described below.
115
121
 
@@ -120,6 +126,7 @@ This would **chain** to check the Customers' Constraint rule, described below.
120
126
  Constraints are multi-field conditions which must be true for transactions to succeed (else an exception is raised). You can express the condition as a lambda or a function:
121
127
 
122
128
  **As a lambda:**
129
+
123
130
  ```python
124
131
  Rule.constraint(validate=models.Customer,
125
132
  as_condition=lambda row: row.Balance <= row.CreditLimit, # parent references are supported
@@ -127,6 +134,7 @@ Constraints are multi-field conditions which must be true for transactions to su
127
134
  ```
128
135
 
129
136
  **Or, as a function:**
137
+
130
138
  ```python
131
139
  def check_balance(row: models.Customer, old_row: models.Customer, logic_row: LogicRow):
132
140
  if logic_row.ins_upd_dlt != "dlt": # see also: logic_row.old_row
@@ -144,12 +152,14 @@ Constraints are multi-field conditions which must be true for transactions to su
144
152
  ### 3. Row Events: Extensible with Python
145
153
 
146
154
  Events are procedural Python code, providing extensibility for declarative rules:
155
+
147
156
  ```python
148
157
  def congratulate_sales_rep(row: models.Order, old_row: models.Order, logic_row: LogicRow):
149
158
  pass # event code here - sending email, messages, etc.
150
159
 
151
160
  Rule.commit_row_event(on_class=models.Order, calling=congratulate_sales_rep)
152
161
  ```
162
+
153
163
  Note there are multiple kinds of events, so you can control whether they run before or after rule execution. For more information, [see here](https://apilogicserver.github.io/Docs/Logic-Type-Constraint).
154
164
 
155
165
  &nbsp;
@@ -159,9 +169,7 @@ Note there are multiple kinds of events, so you can control whether they run bef
159
169
  A key argument to functions is `logic_row`:
160
170
 
161
171
  * **Wraps row and old_row,** plus methods for insert, update and delete - rule enforcement
162
-
163
172
  * **Additional instance variables:** ins_upd_dlt, nest_level, session, etc.
164
-
165
173
  * **Helper Methods:** are_attributes_changed, set_same_named_attributes, get_parent_logic_row(role_name), get_derived_attributes, log, is_inserted, etc
166
174
 
167
175
  Here is an example:
@@ -194,13 +202,11 @@ logic_row.log("no manager for this order's salesrep")
194
202
  Logic *declarative*, which differs from conventional *procedural* logic:
195
203
 
196
204
  1. **Automatic Invocation:** you don't call the rules; they execute in response to updates (via SQLAlchemy events).
197
-
198
205
  2. **Automatic Ordering:** you don't order the rules; execution order is based on system-discovered depencencies.
199
-
200
206
  3. **Automatic Optimizations:** logic is optimized to reduce SQLs.
201
207
 
202
- * Rule execution is *pruned* if dependent attributes are not altered
203
- * SQL is optimized, e.g., `sum` rules operate by *adjustment*, not expensive SQL `select sum`
208
+ * Rule execution is *pruned* if dependent attributes are not altered
209
+ * SQL is optimized, e.g., `sum` rules operate by *adjustment*, not expensive SQL `select sum`
204
210
 
205
211
  These simplify maintenance / iteration: you can be sure new logic is always called, in the correct order.
206
212
 
@@ -226,14 +232,15 @@ Logging is performed using standard Python logging, with a logger named `logic_l
226
232
 
227
233
  In addition, the system logs all rules that fire, to aid in debugging. Referring the the screen shot above:
228
234
 
229
- * Each line represents a rule execution, showing row state (old/new values), and the _{reason}_ that caused the update (e.g., client, sum adjustment)
230
- * Log indention shows multi-table chaining
235
+ * Each line represents a rule execution, showing row state (old/new values), and the _{reason}_ that caused the update (e.g., client, sum adjustment)
236
+ * Log indention shows multi-table chaining
231
237
 
232
238
  &nbsp;
233
239
 
234
240
  ## How Logic works
235
241
 
236
242
  *Activation* occurs in `api_logic_server_run.py`:
243
+
237
244
  ```python
238
245
  LogicBank.activate(session=session, activator=declare_logic, constraint_event=constraint_handler)
239
246
  ```
@@ -242,8 +249,14 @@ This installs the rule engine as a SQLAlchemy event listener (`before_flush`).
242
249
 
243
250
  Rules plug into SQLAlchemy events, and execute as follows:
244
251
 
245
- | Logic Phase | Why It Matters |
246
- |:-----------------------------|:---------------------|
247
- | **Watch** for changes at the attribute level | Performance - Automatic Attribute-level Pruning |
248
- | **React** by recomputing value | Ensures Reuse - Invocation is automatic<br>Derivations are optimized (e.g. *adjustment updates* - not aggregate queries) |
249
- | **Chain** to other referencing data | Simplifies Maintenance - ordering is automatic<br>Multi-table logic automation |
252
+
253
+ | Logic Phase | Why It Matters |
254
+ | :--------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------- |
255
+ | **Watch** for changes at the attribute level | Performance - Automatic Attribute-level Pruning |
256
+ | **React** by recomputing value | Ensures Reuse - Invocation is automatic<br>Derivations are optimized (e.g. *adjustment updates* - not aggregate queries) |
257
+ | **Chain** to other referencing data | Simplifies Maintenance - ordering is automatic<br>Multi-table logic automation |
258
+
259
+ This pattern is sometimes called Reactive Dependency Propagation. Automatic dependency management accounts is why 5 *declarative* lines represent the same logic as 200 lines of *declarative* Python
260
+
261
+ 1. To view a AI procedural/declarative comparison, [click here](https://github.com/ApiLogicServer/ApiLogicServer-src/blob/main/api_logic_server_cli/prototypes/basic_demo/logic/procedural/declarative-vs-procedural-comparison.md)
262
+ 2. Rules typically automate over 95% of your logic, so the results can be significant. Consider a 100 table system: 1,000 rules vs. 40,000 lines of code
@@ -1,21 +1,23 @@
1
1
  ---
2
- title: Copilot Instructions for basic_demo Project
3
- Description: Project-level instructions for AI assistants conducting guided tours
4
- Source: ApiLogicServer-src/prototypes/basic_demo/.github/.copilot-instructions.md
5
- Propagation: CLI create command → created projects
6
- Usage: AI assistants read this when user says "guide me through"
7
- version: 2.3
2
+ title: Copilot Instructions for GenAI-Logic Projects
3
+ Description: Project-level instructions for working with generated projects
4
+ Source: ApiLogicServer-src/prototypes/base/.github/.copilot-instructions.md
5
+ Propagation: CLI create command → created projects (non-basic_demo)
6
+ Instrucions: Changes must be copied to api_logic_server_cli/prototypes/basic_demo/.github - see instructions there
7
+ Usage: AI assistants read this when user opens any created project
8
+ version: 2.4
8
9
  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
12
- - 2.1 (Oct 2025) - Streamlined OBX, emphasized uncustomized template, friendly collaborative tone
13
- - 2.0 (Oct 2025) - Added provocation method, spreadsheet analogy, timing checkpoints
10
+ - 2.4 (Nov 05, 2025 - Added MCP Integration section, Copilot as MCP client capability)
11
+ - 2.3 (Nov 04, 2025 - Clear 1st message about reading Welcome section verbatim, again for non basic_demo)
12
+ - 2.2 (Oct 29, 2025 - Clear 1st message about reading Welcome section verbatim)
13
+ - 2.1 (Oct 2025) - Streamlined OBX for non-tutorial projects, friendly collaborative tone
14
+ - 2.0 (Oct 2025) - Added front matter, updated for OBX improvements
15
+ - 1.0 (Initial) - Comprehensive technical reference
14
16
  ---
15
17
 
16
18
  # GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
17
19
 
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.
20
+ **INSTRUCTION**: When the user asks you to load 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. The Welcome section ends at the "---" marker before "🔑 Key Technical Points".
19
21
 
20
22
  ## Welcome
21
23
 
@@ -39,20 +41,94 @@ This is a complete, working microservice auto-generated from a database schema -
39
41
 
40
42
  ---
41
43
 
42
- ## Technical Reference (For AI Assistant - Do Not Present to User Unless Asked)
44
+ **DO NOT include the content below in the welcome greeting. It is reference material only.**
43
45
 
44
- The sections below contain detailed technical information for when we're actively working on specific tasks. These are reference materials, not introductory content.
46
+ ## Here are some things I can help you with
47
+
48
+ 1. **Add business logic** - Describe your requirements in natural language, I'll generate declarative rules
49
+ 2. **Customize the API** - Add custom endpoints for your specific needs
50
+ 3. **Create custom UIs** - Build React apps with `genai-logic genai-add-app --vibe`
51
+ 4. **Add security** - Set up role-based access control with `genai-logic add-auth`
52
+ 5. **Test your logic** - Create Behave tests with requirements traceability
53
+ 6. **Configure Admin UI** - Customize the auto-generated admin interface
54
+ 7. **Query via natural language** - I can act as MCP client to read/update data (see `docs/training/MCP_Copilot_Integration.md`)
55
+ 8. **Create B2B APIs** - Complex integration endpoints with partner systems
56
+ 9. **Add events** - Integrate with Kafka, webhooks, or other event systems
57
+ 10. **Customize models** - Add tables, attributes, or derived fields
58
+ 11. **Discovery systems** - Auto-load logic and APIs from discovery folders
59
+
60
+ 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.
45
61
 
46
62
  ---
47
63
 
48
- I'll present these as choices - we'll tackle them one at a time.
64
+ ## 🔑 Key Technical Points
65
+ ```
66
+
67
+ **DO NOT create your own summary. DO NOT rephrase. Copy the text above exactly.**
49
68
 
50
- ### Set Up Virtual Environment
51
- If it's not already set, we can often find a `venv` in the GenAI-Logic Manager - a parent or grandparent directory.
69
+ The technical reference sections below are for later consultation when working on specific tasks.
52
70
 
53
- ### 🚀 To Run This Project
71
+ ---
72
+
73
+ ## Welcome (Reference Copy)
74
+
75
+ | # | Service | Description |
76
+ |---|---------|-------------|
77
+ | 1️⃣ | **Add business logic** | Describe your requirements in natural language, I'll generate declarative rules |
78
+ | 2️⃣ | **Customize the API** | Add custom endpoints for your specific needs |
79
+ | 3️⃣ | **Create custom UIs** | Build React apps with `genai-logic genai-add-app --vibe` |
80
+ | 4️⃣ | **Add security** | Set up role-based access control with `genai-logic add-auth` |
81
+ | 5️⃣ | **Test your logic** | Create Behave tests with requirements traceability |
82
+ | 6️⃣ | **Configure Admin UI** | Customize the auto-generated admin interface |
83
+ | 7️⃣ | **Add MCP integration** | Enable Model Context Protocol for external AI access |
84
+ | 8️⃣ | **Create B2B APIs** | Complex integration endpoints with partner systems |
85
+ | 9️⃣ | **Add events** | Integrate with Kafka, webhooks, or other event systems |
86
+ | 🔟 | **Customize models** | Add tables, attributes, or derived fields |
87
+ | 1️⃣1️⃣ | **Discovery systems** | Auto-load logic and APIs from discovery folders |
88
+
89
+ ---
54
90
 
55
- Use F5 (pre-configured run configuration - supports debugger for server logic), or (when focused on client apps):
91
+ 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.
92
+
93
+ ---
94
+
95
+ ## 🔑 Key Technical Points
96
+
97
+ **Critical Implementation Details:**
98
+
99
+ 1. **Discovery Systems**:
100
+ - **Logic Discovery**: Business rules automatically loaded from `logic/logic_discovery/use_case.py` via `logic/logic_discovery/auto_discovery.py`
101
+ - **API Discovery**: Custom APIs automatically loaded from `api/api_discovery/[service_name].py` via `api/api_discovery/auto_discovery.py`
102
+ - Do NOT manually duplicate rule calls or API registrations
103
+
104
+ 2. **API Record ID Pattern**: When creating records via custom APIs, use `session.flush()` before accessing the ID to ensure it's generated:
105
+ ```python
106
+ session.add(sql_alchemy_row)
107
+ session.flush() # Ensures ID is generated
108
+ record_id = sql_alchemy_row.id
109
+ return {"message": "Success", "record_id": record_id}
110
+ ```
111
+
112
+ 3. **Automatic Business Logic**: All APIs (standard and custom) automatically inherit LogicBank rules without additional code.
113
+
114
+ 4. **CLI Commands**: Use `genai-logic --help` to see all available commands. When CLI commands exist for a task (e.g., `add-auth`, `genai-add-mcp-client`, `genai-add-app`), ALWAYS use them instead of manual configuration - they handle all setup correctly.
115
+
116
+ > **📋 Testing:** For comprehensive testing conventions, patterns, and examples, see `docs/training/testing.md` (555 lines - I'll read this before we create any tests)
117
+
118
+ ---
119
+
120
+ ## Detailed Service Documentation
121
+
122
+ The sections below provide complete details on each service. I'll reference these as needed when we work together.
123
+
124
+ ### `venv` is required
125
+
126
+ To establish the virtual environment:
127
+
128
+ 1. Attempt to find a `venv` folder in the parent or grandparent directory
129
+ 2. Or, create it using requirements.txt
130
+
131
+ ### Starting the server
56
132
 
57
133
  ```bash
58
134
  python api_logic_server_run.py
@@ -182,6 +258,48 @@ When users provide natural language with multiple use cases like:
182
258
 
183
259
  **NEVER put everything in `use_case.py`** - that defeats the discovery system purpose.
184
260
 
261
+ ### MCP Integration - Acting as Database Client
262
+
263
+ **You (GitHub Copilot) can serve as an MCP client** to read and update database entities using natural language queries!
264
+
265
+ **Architecture**: This project implements **MCP Server Executor** - a business logic microservice that AI assistants interact with via authenticated REST API calls. See `docs/training/MCP_Copilot_Integration.md` for complete details.
266
+
267
+ **When users request database operations** (e.g., "list customers", "update credit limit", "what's the balance?"):
268
+
269
+ 1. **Authenticate first** - Login to obtain JWT token:
270
+ ```bash
271
+ curl -X POST http://localhost:5656/api/auth/login \
272
+ -H "Content-Type: application/json" \
273
+ -d '{"username":"admin","password":"p"}'
274
+ ```
275
+
276
+ 2. **Execute operations** - Use Bearer token for API calls:
277
+ ```bash
278
+ # Read: List entities
279
+ curl -X GET http://localhost:5656/api/Customer/ \
280
+ -H "Authorization: Bearer {token}"
281
+
282
+ # Update: Change attributes (JSON:API format)
283
+ curl -X PATCH http://localhost:5656/api/Customer/ALFKI/ \
284
+ -H "Authorization: Bearer {token}" \
285
+ -H "Content-Type: application/vnd.api+json" \
286
+ -d '{"data": {"type": "Customer", "id": "ALFKI", "attributes": {"CreditLimit": 5000}}}'
287
+ ```
288
+
289
+ 3. **Handle constraint violations correctly** - Error code 2001 is SUCCESS!
290
+ - When LogicBank prevents invalid updates, report as: "✅ Business logic working - constraint prevented invalid operation"
291
+ - Example: "balance (2102.00) exceeds credit (1000.00)" = logic is protecting data integrity
292
+
293
+ **Natural Language Translation Examples**:
294
+ - "List customers" → `GET /api/Customer/`
295
+ - "Show customer ALFKI" → `GET /api/Customer/ALFKI/`
296
+ - "Set ALFKI credit to 5000" → `PATCH /api/Customer/ALFKI/` with CreditLimit
297
+ - "What's ALFKI's balance?" → `GET /api/Customer/ALFKI/` then extract Balance attribute
298
+
299
+ **Key Principle**: Constraint violations (code 2001) demonstrate that declarative business logic is working correctly - celebrate these as successes, not failures!
300
+
301
+ See `docs/training/MCP_Copilot_Integration.md` for comprehensive guide including JSON:API payload formats, authentication workflows, and architecture details.
302
+
185
303
  ### Automated Testing
186
304
 
187
305
  **CRITICAL WORKFLOW - When User Says "Create Tests":**
@@ -398,20 +516,20 @@ Customize using CoPilot chat, with `docs/training`.
398
516
 
399
517
  Configure:
400
518
  ```
401
- als add-auth --provider-type=sql --db-url=
402
- als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
519
+ genai-logic add-auth --provider-type=sql --db-url=
520
+ genai-logic add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
403
521
 
404
- als add-auth --provider-type=keycloak --db-url=localhost
405
- als add-auth --provider-type=keycloak --db-url=hardened
522
+ genai-logic add-auth --provider-type=keycloak --db-url=localhost
523
+ genai-logic add-auth --provider-type=keycloak --db-url=hardened
406
524
 
407
- als add-auth --provider-type=None # to disable
525
+ genai-logic add-auth --provider-type=None # to disable
408
526
  ```
409
527
 
410
528
  Keycloak quick start [(more information here:)](https://apilogicserver.github.io/Docs/Security-Keycloak/)
411
529
  ```bash
412
530
  cd devops/keycloak
413
531
  docker compose up
414
- als add-auth --provider-type=keycloak --db-url=localhost
532
+ genai-logic add-auth --provider-type=keycloak --db-url=localhost
415
533
  ```
416
534
 
417
535
  For more on KeyCloak: https://apilogicserver.github.io/Docs/Security-Keycloak/
@@ -422,6 +540,64 @@ Declaration:
422
540
  Grant(on_entity=Customer, to_role=sales, filter=lambda: Customer.SalesRep == current_user())
423
541
  ```
424
542
 
543
+
544
+ #### Testing with Security Enabled
545
+
546
+ **CRITICAL:** When `SECURITY_ENABLED=True`, test code must obtain and include JWT authentication tokens.
547
+
548
+ **Pattern for test steps:**
549
+ ```python
550
+ from pathlib import Path
551
+ import os
552
+ from dotenv import load_dotenv
553
+
554
+ # Load config to check SECURITY_ENABLED
555
+ config_path = Path(__file__).parent.parent.parent.parent.parent / 'config' / 'default.env'
556
+ load_dotenv(config_path)
557
+
558
+ # Cache for auth token (obtained once per test session)
559
+ _auth_token = None
560
+
561
+ def get_auth_token():
562
+ """Login and get JWT token if security is enabled"""
563
+ global _auth_token
564
+
565
+ if _auth_token is not None:
566
+ return _auth_token
567
+
568
+ # Login with default admin credentials
569
+ login_url = f'{BASE_URL}/api/auth/login'
570
+ login_data = {'username': 'admin', 'password': 'p'}
571
+
572
+ response = requests.post(login_url, json=login_data)
573
+ if response.status_code == 200:
574
+ _auth_token = response.json().get('access_token')
575
+ return _auth_token
576
+ else:
577
+ raise Exception(f"Login failed: {response.status_code}")
578
+
579
+ def get_headers():
580
+ """Get headers including auth token if security is enabled"""
581
+ security_enabled = os.getenv('SECURITY_ENABLED', 'false').lower() not in ['false', 'no']
582
+
583
+ headers = {'Content-Type': 'application/json'}
584
+
585
+ if security_enabled:
586
+ token = get_auth_token()
587
+ if token:
588
+ headers['Authorization'] = f'Bearer {token}'
589
+
590
+ return headers
591
+
592
+ # Use in all API requests
593
+ response = requests.post(url=api_url, json=data, headers=get_headers())
594
+ ```
595
+
596
+ **Key points:**
597
+ - Tests DO NOT automatically include auth headers - you must code this pattern
598
+ - Token is cached to avoid repeated logins during test session
599
+ - Pattern works for both `SECURITY_ENABLED=True` and `SECURITY_ENABLED=False`
600
+ - See `test/api_logic_server_behave/features/steps/order_processing_steps.py` for complete example
425
601
  ### Adding Custom API Endpoints
426
602
 
427
603
  For simple endpoints:
@@ -0,0 +1,26 @@
1
+ ---
2
+ use: welcome for basic_demo - please start the tour
3
+ instuctions: copy api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md, then paste as the Welcome section
4
+ ---
5
+
6
+ ## Welcome
7
+
8
+ **Welcome! This is your basic_demo project.**
9
+
10
+ This is a complete, working microservice auto-generated from a database schema - **uncustomized**, so you can see what to expect when you create projects from your own databases.
11
+
12
+ **What's already created from introspecting the database schema:**
13
+ - **Admin Web Application** - Live at `http://localhost:5656`
14
+ - **REST API Endpoints** - All database tables exposed at `/api/*`
15
+ - **Database Models** - Complete SQLAlchemy ORM in `database/models.py`
16
+ - **Authentication System** - JWT-based auth framework
17
+ - **Business Logic Engine** - Declarative rules system
18
+
19
+ ---
20
+
21
+ **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.**
22
+
23
+
24
+ **Ready to explore?** Open `tutor.md` and tell me "guide me through" to begin the interactive tutorial.
25
+
26
+ ---
@@ -47,7 +47,12 @@ def declare_logic():
47
47
 
48
48
  Use case: App Integration
49
49
  1. Send the Order to Kafka topic 'order_shipping' if the date_shipped is not None.
50
+
50
51
  Also, using logic/logic_discovery is a Best Practice - see logic/readme_logic.md
52
+
53
+ The 5 *declarative* lines below represent the same logic as 200 lines of *declarative* Python
54
+ 1. To view the AI procedural/declarative comparison, [click here](https://github.com/ApiLogicServer/ApiLogicServer-src/blob/main/api_logic_server_cli/prototypes/basic_demo/logic/procedural/declarative-vs-procedural-comparison.md)
55
+ 2. Consider a 100 table system: 1,000 rules vs. 40,000 lines of code
51
56
  '''
52
57
  from database.models import Product, Order, Item, Customer, SysEmail
53
58
 
@@ -11,7 +11,10 @@ app_logger = logging.getLogger(__name__)
11
11
 
12
12
  def declare_logic():
13
13
  """
14
- Check Credit Use Case Logic
14
+
15
+ The 5 *declarative* lines below represent the same logic as 200 lines of *declarative* Python
16
+ 1. To view the AI procedural/declarative comparison, [click here](https://github.com/ApiLogicServer/ApiLogicServer-src/blob/main/api_logic_server_cli/prototypes/basic_demo/logic/procedural/declarative-vs-procedural-comparison.md)
17
+ 2. Consider a 100 table system: 1,000 rules vs. 40,000 lines of code
15
18
 
16
19
  Natural Language Requirements:
17
20
  1. The Customer's balance is less than the credit limit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ApiLogicServer
3
- Version: 15.3.2
3
+ Version: 15.3.6
4
4
  Author-email: Val Huber <apilogicserver@gmail.com>
5
5
  License-Expression: BSD-3-Clause
6
6
  Project-URL: Homepage, https://www.genai-logic.com
@@ -1,5 +1,5 @@
1
1
  api_logic_server_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- api_logic_server_cli/api_logic_server.py,sha256=NcViYeSCIiDw_Gb91Epg-N0K0u6MmOg7YCW0RKTQhkw,104746
2
+ api_logic_server_cli/api_logic_server.py,sha256=0FeGwB6aLxRnAdORSAsTy-k0qoiMVxEcD7CWALUP688,104801
3
3
  api_logic_server_cli/api_logic_server_info.yaml,sha256=xwH5ENyjrlv3XbKx7IaY2iaF0Cc4zHi3x7qtpEWTzBI,139
4
4
  api_logic_server_cli/cli.py,sha256=xAqTOhq-OnXU2HEQgzsGC9yKrGcAgKUt_8b9U2bV5No,87831
5
5
  api_logic_server_cli/cli_args_base.py,sha256=7cVM6BeizwttYAwUu1FUyuLuvWufvgt0TFeA8FI6tu0,3304
@@ -10,7 +10,7 @@ api_logic_server_cli/manager.py,sha256=So_Oa2FIP9h6PBUk1jqIOZveqtf7aOCZUORIZI4zw
10
10
  api_logic_server_cli/add_cust/add_cust.py,sha256=yi_6qoiBm19K1u5VNhDW-KaTVcnsU-uTQ8-GYioojMI,14034
11
11
  api_logic_server_cli/create_from_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  api_logic_server_cli/create_from_model/api_expose_api_models_creator.py,sha256=V-u3Hm404doztw66YuD2A043RCFmtw5QF5tMioC_1b0,7900
13
- api_logic_server_cli/create_from_model/api_logic_server_utils.py,sha256=H0t_hpN6TGzhe9CAzkonX3dUvZ2k9qeemKHexoXtIQI,28624
13
+ api_logic_server_cli/create_from_model/api_logic_server_utils.py,sha256=Aj211XUd-Ns81lJqU53owvIEfKVSJA0ssGmlWb1owo4,28730
14
14
  api_logic_server_cli/create_from_model/create_db_from_model.py,sha256=2H7slGnk39XOSnvL7vxrg6Ewx4bxeBJBgLo8fcXHTB4,4382
15
15
  api_logic_server_cli/create_from_model/dbml.py,sha256=SdSD1D8ZIjtHdqr559SUiZ05rwQjeppKS550q-hSydo,11573
16
16
  api_logic_server_cli/create_from_model/meta_model.py,sha256=bzkpaC0ePrxpAPiJGh5GbSrZ7N-DETL5eW6-LxcmOZs,5885
@@ -423,7 +423,7 @@ api_logic_server_cli/prototypes/base/.devcontainer-option/For_VSCode.dockerfile,
423
423
  api_logic_server_cli/prototypes/base/.devcontainer-option/devcontainer.json,sha256=tk-mGd4XdmbpKUqUeGmcPMzX3RDc6am9-de8c-rFmSo,2361
424
424
  api_logic_server_cli/prototypes/base/.devcontainer-option/readme.md,sha256=-sSneMDne1fqEoox2hXUGmoO8ewgi34y7lJwGTidSpY,104
425
425
  api_logic_server_cli/prototypes/base/.devcontainer-option/setup.sh,sha256=pOvGjZ7jgRQzFkD93mNICmcC2y66Dexrq4bCnSSVwtU,310
426
- api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md,sha256=dHUl52qF-dhZHfpxCoqc3Cc_VtWss0aikqLVMZu5rPg,38360
426
+ api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md,sha256=llNDE0SUTPiBztVlQdr3xqqD66BS_rtzRUMGxNkI8Eo,41031
427
427
  api_logic_server_cli/prototypes/base/.idea/runConfigurations/ApiLogicServer.xml,sha256=eFzhe9NH-VNjcPWbPsRQy5o-MugJR9IWklA1Fo8wtYg,1127
428
428
  api_logic_server_cli/prototypes/base/.idea/runConfigurations/Report_Behave_Logic.xml,sha256=I3jlEf-TPzc-1NY843v6AcQIQ8QJD3z9KvxTYSZWMtY,1306
429
429
  api_logic_server_cli/prototypes/base/.idea/runConfigurations/Run_Behave.xml,sha256=CTzF0P4w7o4FzOi-eSpru0HczSEGtJsKqkQ7VWRyxPc,1196
@@ -526,6 +526,7 @@ api_logic_server_cli/prototypes/base/devops/python-anywhere/python_anywhere_wsgi
526
526
  api_logic_server_cli/prototypes/base/docs/graphics/readme.md,sha256=GaNOkrzT_nlcrIpmmwLQtoGC6aPZnM8bSGgmc5fM8yk,402
527
527
  api_logic_server_cli/prototypes/base/docs/logic/readme.md,sha256=fIQypEQ7Ny7q385AhpwndYRBFquG6P6xpM41-zrIseE,871
528
528
  api_logic_server_cli/prototypes/base/docs/logic_suggestions/readme_logic_suggestions.md,sha256=44ibQYGOy84J4zGFaChLCOf-GU9pOBrbgBbprujMtIs,184
529
+ api_logic_server_cli/prototypes/base/docs/training/MCP_Copilot_Integration.md,sha256=hR88Th7XNaT2051sEMniPTf9v1cVEblpuAXWGmVNd5w,10686
529
530
  api_logic_server_cli/prototypes/base/docs/training/admin_app_1_context.prompt.md,sha256=IpBkTI7BLdF7885Q0k5CTu_8Gunl5FdqH_t6fHVjAq0,1740
530
531
  api_logic_server_cli/prototypes/base/docs/training/admin_app_2_functionality.prompt.md,sha256=iWMoAkETeQjWWPrNj1AcI4HFGLlgS0-HP9oBYXhdTNI,1705
531
532
  api_logic_server_cli/prototypes/base/docs/training/admin_app_3_architecture.prompt.md,sha256=5KtRBihPbxTQEvLJ51w104Z0HfDGFEmQc3ysek6EsXA,925
@@ -555,7 +556,7 @@ api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py,sha256=QK5
555
556
  api_logic_server_cli/prototypes/base/integration/system/RowDictMapper.py,sha256=DSdmeAQZZ_wUWHHiSS_6ZgeTKIuEycNlgX140l3fnSE,19986
556
557
  api_logic_server_cli/prototypes/base/logic/declare_logic.py,sha256=7-lMGq0PVkHv3q-Hvor1itSjcj1VVNKLW25QAhmUAJ8,3391
557
558
  api_logic_server_cli/prototypes/base/logic/load_verify_rules.py,sha256=dYEb-UxqQ5N08ry22I04vtFy8JtQe2pL7Jw8gR8nGu4,7742
558
- api_logic_server_cli/prototypes/base/logic/readme_logic.md,sha256=teXyg9-7b-1OAj_kLC7gQ37zNllTRFnovdq2LGsyg6E,10178
559
+ api_logic_server_cli/prototypes/base/logic/readme_logic.md,sha256=zns_MTCq3nCqpwezTPhrNuGSTe8mvdcLrwWYe6mNnxg,11193
559
560
  api_logic_server_cli/prototypes/base/logic/logic_discovery/auto_discovery.py,sha256=m97W6DYi6ouTDuFCiU1rPq1UqzJuNnVePyOeLU33D1s,2645
560
561
  api_logic_server_cli/prototypes/base/logic/logic_discovery/readme_logic_discovery.md,sha256=SRg3Hrq3vCjqtAL1XijcbPGvfLLgkqsODLtIKfZUEaI,396
561
562
  api_logic_server_cli/prototypes/base/logic/logic_discovery/use_case.py,sha256=XR3o8cnmBzsdLobzNX1kbBqqNVVFFdQmfiVHi3I4hyQ,970
@@ -620,7 +621,8 @@ api_logic_server_cli/prototypes/base/venv_setup/venv.sh,sha256=aWX9fa8fe6aO9ifBI
620
621
  api_logic_server_cli/prototypes/basic_demo/_config.yml,sha256=KIUQQpjgj7hP_Z2Fksq90E52UnbKnyom-v9L_eIfqZo,170
621
622
  api_logic_server_cli/prototypes/basic_demo/readme.md,sha256=Ii0WojbHMHpg6bgMlg9WyadzXVZePM2Nk89kmKHuGTM,18722
622
623
  api_logic_server_cli/prototypes/basic_demo/tutor.md,sha256=nlIkqcqkVXBDe3Rktcr4puZxrrTFDl1s_Id8nA5GwA4,45516
623
- api_logic_server_cli/prototypes/basic_demo/.github/.copilot-instructions.md,sha256=asxo9m-3BInN5Stb8G5W3AL6d1eiq9cuzjP2EIU0Cmw,33260
624
+ api_logic_server_cli/prototypes/basic_demo/.github/.copilot-instructions.md,sha256=e8UZpBpJf_-A788HblOZWzeplHM85-JaL1pVIp5_vKU,41515
625
+ api_logic_server_cli/prototypes/basic_demo/.github/welcome.md,sha256=sdT1Jz9rDgkjTQK2IC1EHs_rFI1bRhwTsOZ21i3oJ0k,1077
624
626
  api_logic_server_cli/prototypes/basic_demo/_layouts/redirect.html,sha256=-0kMPGYI88fb787IzYmdi7ySZUhgpUlP0vodrg8-NRM,457
625
627
  api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/openapi.py,sha256=kLQ7Fn1J7tzuNJHBXF2AiwtzvQ-0JxJ6z-MfFryAtLk,3887
626
628
  api_logic_server_cli/prototypes/basic_demo/customizations/config/default.env,sha256=-rjXJrjR4vjMr9YCVYVchaJw7qMBlbvQ3KfR_wri_XM,412
@@ -628,7 +630,7 @@ api_logic_server_cli/prototypes/basic_demo/customizations/database/db.sqlite,sha
628
630
  api_logic_server_cli/prototypes/basic_demo/customizations/database/models.py,sha256=bmM2TNXZXYlb4HpGjlPO_QJW_Ps0MvNlqJQPXB9TWdU,4545
629
631
  api_logic_server_cli/prototypes/basic_demo/customizations/docs/mcp_learning/mcp_discovery.json,sha256=juCiWJ_BEBgj-8JMXw-ewW6i8vL9ZkLQCd7Dkf_xWmc,3249
630
632
  api_logic_server_cli/prototypes/basic_demo/customizations/logic/cocktail-napkin.jpg,sha256=5rNSy6wvcWSHPJQZqkf2DHs19QLWiyqMBNwxGqjstZU,133075
631
- api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py,sha256=95TuOgNKvO7yMfncSqJ7HKlXZQB0zhEso4l-9l-nVUw,5436
633
+ api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py,sha256=huUQg5kjo1XscU5U_NjE7yj4b4QIhaXmcVdw2iUki9Y,5855
632
634
  api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/email_request.py,sha256=3UnBUBpHSThHHRLLJuV-sgRAs6sS-UCzsTjBzf0onns,1851
633
635
  api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/simple_constraints.py,sha256=4HRLOXuLJP1eOosONeEtpA9DehxiZME0-FBKuG1RaI0,760
634
636
  api_logic_server_cli/prototypes/basic_demo/customizations/security/declare_security.py,sha256=gbdH29cPY656lgROPm_w20Q-g6AhlIMES3wiIrqBTdk,2439
@@ -1023,7 +1025,7 @@ api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/load_ver
1023
1025
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/readme_logic.md,sha256=teXyg9-7b-1OAj_kLC7gQ37zNllTRFnovdq2LGsyg6E,10178
1024
1026
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/app_integration.py,sha256=wy8MXTKbYRhv-N5Jm5Q-mW4UtFrk6Q2y1ZeGbUoUVas,863
1025
1027
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/auto_discovery.py,sha256=m97W6DYi6ouTDuFCiU1rPq1UqzJuNnVePyOeLU33D1s,2645
1026
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/check_credit.py,sha256=NoJ2UO3NG35R55wCgoQQm9GLR8T0PMSlglhuBLgdeGY,1756
1028
+ api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/check_credit.py,sha256=cFqPHYBBOGnUT_TpPWCZ8HHXTFwE-4mF7aycH4d9xO0,2138
1027
1029
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/mcp_client_executor_request.py,sha256=X6jlA_xcR7RpbFgc5uY5yDFTCKp0eGHnVubIT2M0AbU,2184
1028
1030
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/readme_logic_discovery.md,sha256=SRg3Hrq3vCjqtAL1XijcbPGvfLLgkqsODLtIKfZUEaI,396
1029
1031
  api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/use_case.py,sha256=M3TQZwBaAtgEyNjP_Hl8s35x_zEpzpnIrtxmD7sL1NY,916
@@ -2862,9 +2864,9 @@ api_logic_server_cli/tools/mini_skel/database/system/SAFRSBaseX.py,sha256=p8C7AF
2862
2864
  api_logic_server_cli/tools/mini_skel/database/system/TestDataBase.py,sha256=U02SYqThsbY5g3DX7XGaiMxjZBuOpzvtPS6RfI1WQFg,371
2863
2865
  api_logic_server_cli/tools/mini_skel/logic/declare_logic.py,sha256=fTrlHyqMeZsw_TyEXFa1VlYBL7fzjZab5ONSXO7aApo,175
2864
2866
  api_logic_server_cli/tools/mini_skel/logic/load_verify_rules.py,sha256=Rr5bySJpYCZmNPF2h-phcPJ53nAOPcT_ohZpCD93-a0,7530
2865
- apilogicserver-15.3.2.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
2866
- apilogicserver-15.3.2.dist-info/METADATA,sha256=xZIDZwpBx5n1GunlhwhdYCpWBXgsTrmLH8MUewaN2Pc,26461
2867
- apilogicserver-15.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2868
- apilogicserver-15.3.2.dist-info/entry_points.txt,sha256=W9EVNvf09h8n6rJChmVj2gzxVQ6BXXZa2x3wri0lFGc,259
2869
- apilogicserver-15.3.2.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
2870
- apilogicserver-15.3.2.dist-info/RECORD,,
2867
+ apilogicserver-15.3.6.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
2868
+ apilogicserver-15.3.6.dist-info/METADATA,sha256=SuVFzjcqSb6S35JTbId2k5fxHeypu8Dz2kkBG5kjmus,26461
2869
+ apilogicserver-15.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2870
+ apilogicserver-15.3.6.dist-info/entry_points.txt,sha256=W9EVNvf09h8n6rJChmVj2gzxVQ6BXXZa2x3wri0lFGc,259
2871
+ apilogicserver-15.3.6.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
2872
+ apilogicserver-15.3.6.dist-info/RECORD,,