Skip to content

Commit be3761f

Browse files
committed
Sync from local-mgr (gold v17.01.03)
1 parent 433e723 commit be3761f

49 files changed

Lines changed: 388 additions & 2671 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/create_codespaces_mgr.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ def main():
255255
readme = readme.lstrip("\n")
256256
print(" ✅ Front matter and style block stripped")
257257

258-
# Inject Codespaces + browser notes right after the outer "First Time Here?" details
259-
# summary (idempotent). Match on the stable "<details>\n<summary>⚡ ...</summary>" prefix —
260-
# the text after the lightning bolt is gold-source copy (org_git/Docs) and changes
261-
# independently of this script.
262-
summary_re = re.compile(r"<details>\n<summary>⚡[^<]*</summary>")
258+
# Inject Codespaces + browser notes inside the first "see it work" collapsible
259+
# section (idempotent). Match on the lightning-bolt-prefixed <summary> — the
260+
# exact wording after is gold-source copy (org_git/Docs) and changes
261+
# independently of this script, so anchor on the emoji prefix, not the wording.
262+
summary_re = re.compile(r"<summary>⚡[^<]*</summary>")
263263
if "Use Chrome or Edge" not in readme:
264264
cs_note = (
265265
"\n&nbsp;\n\n"
@@ -270,32 +270,14 @@ def main():
270270
match = summary_re.search(readme)
271271
if not match:
272272
raise SystemExit(
273-
"ERROR: no '<details>\\n<summary>⚡ ...</summary>' line found in README.md — "
273+
"ERROR: no '<summary>⚡...</summary>' line found in README.md — "
274274
"update this script's summary_re pattern to match the current heading."
275275
)
276276
readme = readme[:match.end()] + cs_note + readme[match.end():]
277277
print(" ✅ Codespaces + browser notes injected")
278278
else:
279279
print(" (notes already present, skipped)")
280280

281-
# Codespaces-only: open item 1's details block by default — reviewer feedback that
282-
# devs skim code, not prose, and the first prompt-as-code-block should be visible
283-
# without a click on a first-time, one-shot visit. Local README keeps it collapsed
284-
# (every-day use, would be noisy). Scoped to item 1 only — items 2-6 stay collapsed,
285-
# preserving the agenda/outline feel of the numbered list.
286-
item1_re = re.compile(r"<details markdown>\n<summary>[^<]*?1\.[^<]*</summary>")
287-
readme, n = item1_re.subn(
288-
lambda m: m.group(0).replace("<details markdown>", "<details markdown open>", 1),
289-
readme,
290-
count=1,
291-
)
292-
if n == 0:
293-
raise SystemExit(
294-
"ERROR: could not find item 1's <details markdown> block to open by default — "
295-
"update this script's item1_re pattern to match the current heading."
296-
)
297-
print(" ✅ Item 1 details block set to open by default (Codespaces-only)")
298-
299281
readme_path.write_text(readme)
300282

301283
# .vscode/settings.json — global interpreter (Manager root)

README.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
<!--
2+
title: Welcome - see end for instructions to hide this
3+
Description: Instant mcp-enabled microservices, standard projects, declarative business logic
4+
Source: docs/Manager-readme
5+
version info: 17.00.12 (06/18/2026)
6+
do_process_code_block_titles: True
7+
Used: Manager Readme (via copy_md())
8+
demo_customs: Customs-readme
9+
demo_customs_surtax: Customs-readme-surtax
10+
demo_kafka: Sample-Integration
11+
demo_allo: Sample_Allo_Dept_GL_readme
12+
demo_ai_rules: Sample-ai-rules
13+
demo_mcp_send: Sample-Basic-Demo-MCP-Send-Email
14+
demo_eai: Sample-Basic-EAI
15+
demo_vibe: Sample-Basic-Demo-Vibe
16+
demo_copilot_mcp_discovery: Sample-ai-mcp
17+
basic_demo: Sample-Basic-Demo
18+
codespaces_patch: |
19+
create_codespaces_mgr.py injects a Codespaces-only browser note immediately after
20+
the "## 🚀 First Time Here?" heading (sentinel: do not rename that heading without
21+
updating the matching logic in create_codespaces_mgr.py). The note warns Safari users to
22+
switch to Chrome/Edge. This avoids forking the README for Codespaces.
23+
-->
24+
125
# Welcome to GenAI-Logic
226

327
One prompt — or your existing database — builds a working API and Admin App, then you declare business logic in **5 readable rules instead of 200 lines of AI-generated code** to enforce it.
@@ -43,10 +67,10 @@ Please load `.github/.copilot-instructions.md`.
4367
You're already running in GitHub Codespaces — a cloud VS Code environment in your browser. Nothing to install. (Use Chrome or Edge — Safari has known compatibility issues with VS Code in the browser.)
4468

4569

46-
<br>
70+
&nbsp;
4771

48-
<details markdown open>
49-
<summary>&emsp;&emsp;1. Create — API, Admin App and business logic from a prompt - existing db</summary>
72+
<details markdown>
73+
<summary>&emsp;&emsp;1. Create — API, Admin App and business logic from a prompt (existing db)</summary>
5074

5175
<br>Say this to your AI assistant (allow 2-3 mins):
5276

@@ -67,16 +91,13 @@ Use case: App Integration
6791
```
6892

6993
<details markdown>
70-
<summary>Or, create with a new database</summary>
94+
<summary>Starting from a new database instead?</summary>
7195

72-
<br>The prompt above starts from an *existing* database — the common real-world case (1t does not need to be sqlite). You could create the same system with a *new* database, using a file-based prompt:
96+
&nbsp;
7397

74-
```
75-
Create basic_demo from samples/prompts/genai_demo.prompt
76-
```
77-
</details>
98+
The prompt above starts from an existing database — the common real-world case, and much faster (no schema design step). You *could* have AI design a new database from scratch instead — drop the `from samples/dbs/basic_demo.sqlite` clause from the first line above (allow 8-10 mins).
7899

79-
&nbsp;
100+
</details>
80101

81102
Most code generators produce code you then have to own. This one produces *models* — executable, maintainable:
82103

@@ -432,7 +453,6 @@ Verify it's operating properly:
432453
433454
Explore [genai_demo_iteration_discount](system/genai/examples/genai_demo/genai_demo_iteration_discount). It's an iteration of basic_demo (see system/genai/examples/genai_demo/genai_demo_iteration_discount/002_create_db_models.prompt). This will add carbon_neutral to the data model, and update the logic to provide the discount:
434455

435-
**Iterate Business Logic:**
436456
**Iterate Business Logic:**
437457
```bash title='Iterate Business Logic'
438458
# Iterate with data model and logic
@@ -444,7 +464,6 @@ genai-logic genai --project-name='genai_demo_with_discount' --using=system/genai
444464

445465
You can perform **model iterations:** add new columns/tables, while keeping the prior model intact. First, we create a project with no logic, perhaps just to see the screens (this step is optional, provided just to illustrate that iterations create new projects from existing ones):
446466

447-
**Iterate Without Logic:**
448467
**Iterate Without Logic:**
449468
```bash title='Iterate Without Logic'
450469
# Step 1 - create without logic
@@ -454,7 +473,6 @@ genai-logic genai --project-name='genai_demo_no_logic' --using=system/genai/exam
454473

455474
Then, we would create another prompt in the docs directory with our model changes. We've already created these for you in `system/genai/examples/genai_demo/genai_demo_iteration` - we use that to alter the data model (see `system/genai/examples/genai_demo/genai_demo_iteration/004_iteration_renames_logic.prompt`):
456475

457-
**Iterate With Logic:**
458476
**Iterate With Logic:**
459477
```bash title='Iterate With Logic'
460478
# Iterate with data model and logic
@@ -474,7 +492,6 @@ Explore [genai_demo_iteration](system/genai/examples/genai_demo/genai_demo_itera
474492

475493
<br>You can declare rules using dot notation, or more informally:
476494

477-
**Informal Logic (no dot notation):**
478495
**Informal Logic (no dot notation):**
479496
```bash title="Informal Logic (no dot notation)"
480497
genai-logic genai --using=system/genai/examples/genai_demo/genai_demo_informal.prompt --project-name=genai_demo_informal
@@ -489,7 +506,6 @@ genai-logic genai --using=system/genai/examples/genai_demo/genai_demo_informal.p
489506

490507
<br>You can add new columns/tables, while keeping the prior model intact:
491508

492-
**Multi-Rule Logic:**
493509
**Multi-Rule Logic:**
494510
```bash title="Multi-Rule Logic"
495511
genai-logic genai --using=system/genai/examples/emp_depts/emp_dept.prompt
@@ -503,14 +519,12 @@ genai-logic genai --using=system/genai/examples/emp_depts/emp_dept.prompt
503519

504520
<br>You can create a project, and ask GenAI for logic suggestions:
505521

506-
**1. Create Project, without Rules:**
507522
**1. Create Project, without Rules:**
508523
```bash title='1. Create Project, without Rules'
509524
# 1. Create Project, without Rules
510525
genai-logic genai --project-name='genai_demo_no_logic' --using=system/genai/examples/genai_demo/genai_demo_no_logic.prompt
511526
```
512527

513-
**2. Request Rule Suggestions:**
514528
**2. Request Rule Suggestions:**
515529
```bash title="2. Request Rule Suggestions"
516530
# 2. Request Rule Suggestions
@@ -523,7 +537,6 @@ You can review the [resultant logic suggestions](genai_demo_no_logic/docs/logic_
523537
* See and edit: `docs/logic_suggestions/002_logic_suggestions.prompt` (used in step 3, below)
524538
* This corresponds to the Logic Editor - Logic View in the WebGenAI web app
525539

526-
**3. See the rules for the logic:**
527540
**3. See the rules for the logic:**
528541
```bash title="3. See the rules for the logic"
529542
# 3. See the rule code for the logic
@@ -545,7 +558,6 @@ The [logic suggestions directory](genai_demo_no_logic/docs/logic_suggestions) no
545558
When you are ready to proceed:
546559
1. Execute the following to create a *new project* (iteration), with suggested logic:
547560

548-
**4. Create a new project with the Rule Suggestions:**
549561
**4. Create a new project with the Rule Suggestions:**
550562
```bash title="4. Create a new project with the Rule Suggestions"
551563
# 4. Create a new project with the Rule Suggestions
@@ -583,7 +595,6 @@ The `genai-utils --fixup` fixes such project issues by updating the Data Model a
583595

584596
After starting the [Manager](https://apilogicserver.github.io/Docs/Manager):
585597

586-
**0. Create Project Requiring Fixup:**
587598
**0. Create Project Requiring Fixup:**
588599
```bash title="0. Create Project Requiring Fixup"
589600
# 0. Create a project requiring fixup
@@ -602,7 +613,6 @@ Missing Attrs (try genai-logic genai-utils --fixup): ['Customer.balance: constra
602613

603614
To Fix it:
604615
**1. Run FixUp to add missing attributes to the fixup response data model:**
605-
**1. Run FixUp to add missing attributes to the fixup response data model:**
606616
```bash title="1. Run FixUp to add missing attributes to the fixup response data model"
607617
# 1. Run FixUp to add missing attributes to the data model
608618
cd genai_demo_fixup_required
@@ -611,7 +621,6 @@ genai-logic genai-utils --fixup
611621

612622
Finally, use the created [fixup files](genai_demo_fixup_required/docs/fixup/) to rebuild the project:
613623
**2. Rebuild the project from the fixup response data model:**
614-
**2. Rebuild the project from the fixup response data model:**
615624
```bash title="2. Rebuild the project from the fixup response data model"
616625
# 2. Rebuild the project from the fixup response data model
617626
cd ../
@@ -683,7 +692,6 @@ genai-logic genai-utils --rebuild-test-data
683692

684693
<br>You can add new columns/tables, while keeping the prior model intact:
685694

686-
**Iterate:**
687695
**Iterate:**
688696
```bash title="Iterate"
689697
# create project without creating a file...
@@ -828,7 +836,6 @@ Please see [this doc](https://apilogicserver.github.io/Docs/Sample-AI-ChatGPT/)
828836
<br>This demo creates and customizes a project, starting from a database:
829837

830838

831-
**Quick Basic Demo:**
832839
**Quick Basic Demo:**
833840
```bash title="Quick Basic Demo"
834841

@@ -858,7 +865,6 @@ genai-logic rebuild-from-database --db_url=sqlite:///database/db.sqlite
858865

859866
<br>This demo creates and customizes a project, starting from a prompt:
860867

861-
**Quick GenAI Demo:**
862868
**Quick GenAI Demo:**
863869
```bash title="Quick GenAI Demo"
864870

samples/nw_sample/api_logic_server_run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#
3333
###############################################################################
3434

35-
api_logic_server__version = '17.01.02'
36-
api_logic_server_created__on = 'June 21, 2026 20:49:49'
35+
api_logic_server__version = '17.01.03'
36+
api_logic_server_created__on = 'June 23, 2026 16:31:54'
3737
api_logic_server__host = 'localhost'
3838
api_logic_server__port = '5656'
3939

@@ -148,7 +148,7 @@
148148
AdminLoader.admin_events(flask_app = flask_app, args = args, validation_error = ValidationError)
149149

150150
if __name__ == "__main__":
151-
msg = f'API Logic Project loaded (not WSGI), version: 17.01.02\n'
151+
msg = f'API Logic Project loaded (not WSGI), version: 17.01.03\n'
152152
msg += f'.. startup message: {start_up_message}\n'
153153
if server_setup.is_docker():
154154
msg += f' (running from docker container at flask_host: {args.flask_host} - may require refresh)\n'
@@ -181,7 +181,7 @@
181181

182182
flask_app.run(host=args.flask_host, threaded=True, port=args.port)
183183
else:
184-
msg = f'API Logic Project Loaded (WSGI), version 17.01.02\n'
184+
msg = f'API Logic Project Loaded (WSGI), version 17.01.03\n'
185185
msg += f'.. startup message: {start_up_message}\n'
186186

187187
if server_setup.is_docker():

samples/nw_sample/database/alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
5454
# output_encoding = utf-8
5555

5656
# sqlalchemy.url = driver://user:pass@localhost/dbname -- set by ApiLogicServer
57-
sqlalchemy.url = sqlite:////Users/kat/dev/genai-logic/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/db.sqlite
57+
sqlalchemy.url = sqlite:////Users/val/dev/ApiLogicServer/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/db.sqlite
5858

5959
[post_write_hooks]
6060
# post_write_hooks defines scripts or Python functions that are run

samples/nw_sample/database/database_discovery/authentication_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# Alter this file per your database maintenance policy
1616
# See https://apilogicserver.github.io/Docs/Project-Rebuild/#rebuilding
1717
#
18-
# Created: June 21, 2026 20:49:49
19-
# Database: sqlite:////Users/kat/dev/genai-logic/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/authentication_db.sqlite
18+
# Created: June 23, 2026 16:31:54
19+
# Database: sqlite:////Users/val/dev/ApiLogicServer/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/authentication_db.sqlite
2020
# Dialect: sqlite
2121
#
2222
# mypy: ignore-errors

samples/nw_sample/database/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# Alter this file per your database maintenance policy
1111
# See https://apilogicserver.github.io/Docs/Project-Rebuild/#rebuilding
1212
#
13-
# Created: June 21, 2026 20:49:49
14-
# Database: sqlite:////Users/kat/dev/genai-logic/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/db.sqlite
13+
# Created: June 23, 2026 16:31:54
14+
# Database: sqlite:////Users/val/dev/ApiLogicServer/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample/database/db.sqlite
1515
# Dialect: sqlite
1616
#
1717
# mypy: ignore-errors

samples/nw_sample/devops/python-anywhere/python_anywhere_wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def application(environ, start_response):
104104
## "git clone git@github.com/myusername/myproject.git"
105105
## ...or uploaded files to the directory "myproject", then you should
106106
## specify "/home/ApiLogicServer/myproject"
107-
path = '/Users/kat/dev/genai-logic/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample' # updated in creation process
107+
path = '/Users/val/dev/ApiLogicServer/ApiLogicServer-dev/build_and_test/genai-logic/samples/nw_sample' # updated in creation process
108108
if path not in sys.path:
109109
sys.path.append(path)
110110
#

samples/nw_sample/docs/db.dbml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Table Supplier {
193193
Ref: EmployeeTerritory.(EmployeeId) > Employee.(Id)
194194
Ref: EmployeeTerritory.(TerritoryId) > Territory.(Id)
195195
Ref: Order.(CloneFromOrder) > Order.(Id)
196-
Ref: Order.(City, Country) > Location.(country, country)
196+
Ref: Order.(Country, City) > Location.(country, country)
197197
Ref: Order.(CustomerId) > Customer.(Id)
198198
Ref: Order.(EmployeeId) > Employee.(Id)
199199
Ref: OrderDetail.(OrderId) > Order.(Id)

samples/nw_sample/ui/admin/authentication_admin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
about:
2-
date: June 21, 2026 20:49:49
2+
date: June 23, 2026 16:31:54
33
recent_changes: works with modified safrs-react-admin
44
version: 0.0.0
55
api_root: '{http_type}://{swagger_host}:{port}/{api}'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)