ApiLogicServer 14.3.25__py3-none-any.whl → 14.4.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.
Files changed (90) hide show
  1. api_logic_server_cli/api_logic_server.py +4 -14
  2. api_logic_server_cli/api_logic_server_info.yaml +3 -3
  3. api_logic_server_cli/cli.py +16 -7
  4. api_logic_server_cli/create_from_model/__pycache__/create_db_from_model.cpython-312.pyc +0 -0
  5. api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc +0 -0
  6. api_logic_server_cli/create_from_model/__pycache__/ont_create.cpython-312.pyc +0 -0
  7. api_logic_server_cli/create_from_model/create_db_from_model.py +2 -0
  8. api_logic_server_cli/create_from_model/ont_build.py +19 -14
  9. api_logic_server_cli/create_from_model/ont_create.py +5 -5
  10. api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/.DS_Store +0 -0
  11. api_logic_server_cli/database/nw-gold-fix.sql +62 -0
  12. api_logic_server_cli/database/nw-gold.sqlite +0 -0
  13. api_logic_server_cli/{prototypes/manager/webgenai → fragments}/docker-compose.yml +1 -1
  14. api_logic_server_cli/genai/genai.py +42 -11
  15. api_logic_server_cli/genai/genai_graphics.py +252 -38
  16. api_logic_server_cli/genai/genai_svcs.py +20 -12
  17. api_logic_server_cli/manager.py +19 -10
  18. api_logic_server_cli/prototypes/.DS_Store +0 -0
  19. api_logic_server_cli/prototypes/base/.DS_Store +0 -0
  20. api_logic_server_cli/prototypes/base/.vscode/launch.json +19 -0
  21. api_logic_server_cli/prototypes/base/api/expose_api_models.py +3 -1
  22. api_logic_server_cli/prototypes/base/api_logic_server_run.py +5 -2
  23. api_logic_server_cli/prototypes/base/config/activate_logicbank.py +1 -0
  24. api_logic_server_cli/prototypes/base/config/config.py +57 -14
  25. api_logic_server_cli/prototypes/base/config/logging.yml +1 -0
  26. api_logic_server_cli/prototypes/base/config/server_setup.py +33 -1
  27. api_logic_server_cli/prototypes/base/database/test_data/readme.md +3 -1
  28. api_logic_server_cli/prototypes/base/devops/docker-standard-image/docker-compose-standard-image.yml +7 -2
  29. api_logic_server_cli/prototypes/base/docs/training/logic_bank_api.prompt +314 -0
  30. api_logic_server_cli/prototypes/base/docs/training/logic_example.py +41 -0
  31. api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py +7 -3
  32. api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py +5 -1
  33. api_logic_server_cli/prototypes/base/ui/templates/bar_chart.jinja +64 -0
  34. api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml +1 -1
  35. api_logic_server_cli/prototypes/manager/README.md +26 -4
  36. api_logic_server_cli/prototypes/manager/system/genai/.DS_Store +0 -0
  37. api_logic_server_cli/prototypes/manager/system/genai/examples/.DS_Store +0 -0
  38. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/.DS_Store +0 -0
  39. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.prompt +0 -10
  40. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.response_example +32 -10
  41. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/002_create_db_models.prompt +4 -4
  42. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/003_create_db_models.response +77 -47
  43. api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_informal.prompt +1 -1
  44. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/dashboard_services.jinja +83 -0
  45. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_dashboard_WIP.py +34 -0
  46. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/{graphics_services.py → graphics_services_api_xxx.py} +0 -9
  47. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db.jinja +46 -0
  48. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db_each_method.jinja +36 -0
  49. api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics.prompt +7 -3
  50. api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/response_format.prompt +8 -1
  51. api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.ps1 +100 -0
  52. api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.sh +116 -0
  53. api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/readme.md +7 -0
  54. api_logic_server_cli/prototypes/manager/system/style-guide.yaml +2 -2
  55. api_logic_server_cli/prototypes/manager/webgenai/README.md +6 -0
  56. api_logic_server_cli/prototypes/nw/docs/graphics/count_orders_by_category.prompt +1 -0
  57. api_logic_server_cli/prototypes/nw/docs/graphics/order_count_by_month.prompt +1 -0
  58. api_logic_server_cli/prototypes/nw/docs/graphics/request copy.json +892 -0
  59. api_logic_server_cli/prototypes/nw/docs/graphics/request.json +6 -0
  60. api_logic_server_cli/prototypes/nw/docs/graphics/response.json +17 -0
  61. api_logic_server_cli/prototypes/nw/docs/graphics/response.yaml +59 -0
  62. api_logic_server_cli/prototypes/nw/docs/graphics/sales_by_category.prompt +1 -0
  63. api_logic_server_cli/prototypes/nw/ui/admin/home.js +5 -4
  64. api_logic_server_cli/prototypes/nw/ui/app_model_custom.yaml +851 -1082
  65. api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/count_orders_by_category.prompt +1 -0
  66. api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/sales_by_employee.prompt +1 -0
  67. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/1_langchain_loader.py +19 -0
  68. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/2_gpt_mcp_prompt.txt +19 -0
  69. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/3_executor_test_agent.py +38 -0
  70. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/README.md +17 -0
  71. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/curl.txt +4 -0
  72. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/nw_swagger_3.yaml +16660 -0
  73. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/run_executor.py +23 -0
  74. api_logic_server_cli/prototypes/ont_app/ontimize_seed/nginx/nginx.conf +2 -2
  75. api_logic_server_cli/prototypes/ont_app/ontimize_seed/package.json +6 -6
  76. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/app.config.ts +2 -1
  77. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.prod.ts +5 -5
  78. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.ts +5 -5
  79. api_logic_server_cli/prototypes/ont_app/templates/app_config.jinja +1 -1
  80. api_logic_server_cli/prototypes/ont_app/templates/detail_template.html +1 -1
  81. api_logic_server_cli/prototypes/ont_app/templates/new_template.html +16 -16
  82. apilogicserver-14.4.0.dist-info/METADATA +76 -0
  83. {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/RECORD +87 -56
  84. {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/WHEEL +1 -1
  85. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_jsonapi_rpc.jinja +0 -37
  86. api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_unused.jinja +0 -38
  87. apilogicserver-14.3.25.dist-info/METADATA +0 -167
  88. {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/entry_points.txt +0 -0
  89. {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/licenses/LICENSE +0 -0
  90. {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ Graph number of sales per category, for dashboard
@@ -0,0 +1 @@
1
+ Graph Sales by Employee, for Dashboard
@@ -0,0 +1,19 @@
1
+ from langchain.tools.openapi.utils.openapi_utils import OpenAPISpec
2
+ from langchain.tools.openapi.tool import OpenAPITool
3
+
4
+ # Load your OpenAPI spec
5
+ spec = OpenAPISpec.from_file("nw_swagger_3.yaml")
6
+
7
+ # Create LangChain tool from a specific endpoint
8
+ customer_tool = OpenAPITool.from_openapi_spec(
9
+ spec=spec,
10
+ operation_id="getCustomer", # use actual operationId from your spec
11
+ verbose=True
12
+ )
13
+
14
+ # Run a test call
15
+ result = customer_tool.run({
16
+ "filter[Country]": "USA",
17
+ "page[limit]": 3
18
+ })
19
+ print(result)
@@ -0,0 +1,19 @@
1
+ You are an AI planner that builds tool_context blocks for a JSON:API server using OpenAPI 3.0.
2
+
3
+ Use this OpenAPI file: [insert contents of nw_swagger_3.yaml]
4
+
5
+ Given the goal: "List all customers from Germany, limited to 2 results", generate a JSON MCP tool_context like this:
6
+
7
+ {
8
+ "tool": "json-api",
9
+ "method": "GET",
10
+ "url": "https://your-api-domain.com/Customer",
11
+ "query_params": {
12
+ "filter[Country]": "Germany",
13
+ "page[limit]": 2
14
+ },
15
+ "headers": {
16
+ "Accept": "application/vnd.api+json"
17
+ },
18
+ "expected_output": "List of customer records"
19
+ }
@@ -0,0 +1,38 @@
1
+ import requests
2
+
3
+ # MCP-style tool_context
4
+ '''
5
+ tool_context = {
6
+ "method": "GET",
7
+ "url": "http://localhost:5656/api/Customer",
8
+ "query_params": {
9
+ "filter[Country]": "Germany",
10
+ "page[limit]": 2
11
+ },
12
+ "headers": {
13
+ "Accept": "application/vnd.api+json"
14
+ }
15
+ }
16
+ '''
17
+ tool_context = {
18
+ "method": "GET",
19
+ "url": "http://localhost:5656/api/Customer",
20
+ "query_params": {
21
+ "filter[Country]": "Germany"
22
+ },
23
+ "headers": {
24
+ "Accept": "application/vnd.api+json"
25
+ }
26
+ }
27
+
28
+
29
+ # Execute as a simulated MCP executor
30
+ response = requests.get(
31
+ tool_context["url"],
32
+ headers=tool_context["headers"],
33
+ params=tool_context["query_params"]
34
+ )
35
+
36
+ # Display result
37
+ print(response.status_code)
38
+ print(response.json())
@@ -0,0 +1,17 @@
1
+ Model Context Protocol is a way for Chat agents to discover and call external servers, be they databases, APIs, file systems, etc, and call their services.  And, for multiple such servers to be choreographed in a chain of calls.
2
+
3
+ For more information:
4
+
5
+ * [see here](https://modelcontextprotocol.io/introduction){:target="_blank" rel="noopener"}
6
+ * [and here](https://apilogicserver.github.io/Docs/Integration-MCP/){:target="_blank" rel="noopener"}
7
+
8
+
9
+ > Status: Technology Exploration
10
+
11
+ ## ChatGPT testing
12
+
13
+ In the Manager, open `samples/nw_sample_nocust`, and explore `integration/mcp`. This has been successfully used to invoke the server.
14
+
15
+ This is just an initial experiment, without automation such as creation of openAI version 3 from version 2. Many substantive issues need to be addressed, including but not limited to security, update, etc.
16
+
17
+ We welcome participation in this exploration. Please contact us via [discord](https://discord.gg/HcGxbBsgRF){:target="_blank" rel="noopener"}.
@@ -0,0 +1,4 @@
1
+ curl -X 'GET' \
2
+ 'http://localhost:5656/api/Customer/?filter%5BCountry%5D=Germany' \
3
+ -H 'accept: application/vnd.api+json' \
4
+ -H 'Content-Type: application/vnd.api+json'