graphjin 3.18.42 → 3.18.44

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 (2) hide show
  1. package/README.md +42 -28
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,6 +15,7 @@ Works with PostgreSQL, MySQL, MongoDB, SQLite, Oracle, MSSQL, Snowflake, Redshif
15
15
 
16
16
  ## Why GraphJin For Agents
17
17
 
18
+ - **A built-in agent, one call away** - POST one instruction to `/api/v1/agent` (or call the `ask_graphjin_agent` MCP tool) and GraphJin runs the discovery loop itself - as the caller, under the caller's permissions - and returns a typed, evidence-backed answer. See [Server-Side Agent](#server-side-agent).
18
19
  - **One governed surface for many systems** - Query operational databases, warehouses, MongoDB, object stores, local files, CodeSQL source indexes, workflows, and GraphJin system roots through GraphQL and MCP.
19
20
  - **Smart discovery before action** - Agents start with `query_catalog(search: "<user instruction>")`, `graphql_help`, relationship evidence, examples, config recipes, and safety notes before writing or running queries.
20
21
  - **Guarded action, not raw access** - Source-mode access, query allow-lists, read-only boundaries, policy-aware MCP tools, local encrypted secrets, and `gj_config` preview/apply keep changes auditable.
@@ -50,45 +51,58 @@ docker pull dosco/graphjin
50
51
 
51
52
  ## Try It Now
52
53
 
53
- This is a quick way to try out GraphJin. The `--demo` flag runs a curated local
54
- demo, creates local state under the example's `demo/` folder, and reuses that
55
- state on later starts. Delete `demo/` to reset from scratch.
54
+ One command, no clone, no Docker. The binary ships with a built-in demo — a
55
+ clinic scheduling app (patients, providers, appointments, waitlists) on
56
+ SQLite with seeded data, saved queries, and workflows:
56
57
 
57
- Download the source which contains the `webshop` demo
58
+ ```bash
59
+ graphjin serve --demo
58
60
  ```
59
- git clone https://github.com/dosco/graphjin
60
- cd graphjin
61
+
62
+ The demo project is extracted to `./graphjin-demo`, and its state lives under
63
+ `./graphjin-demo/demo/`. Delete the `demo/` folder to reset the data, or
64
+ delete `./graphjin-demo` entirely for a fresh copy. You'll see output like
65
+ this:
66
+
61
67
  ```
68
+ GraphJin started
69
+ ───────────────────────
70
+ Web UI: http://localhost:8083/
71
+ GraphQL: http://localhost:8083/api/v1/graphql
72
+ REST API: http://localhost:8083/api/v1/rest/
73
+ Workflows: http://localhost:8083/api/v1/workflows/<name>
74
+ MCP: http://localhost:8083/api/v1/mcp
75
+ ```
76
+
77
+ **Ask the built-in agent**
78
+
79
+ With a model API key in `./.env` (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GOOGLE_APIKEY`), the same command switches into agentic mode and enables GraphJin's built-in agent - one instruction in, a typed, evidence-backed answer out:
62
80
 
63
- Now launch the Graphjin service that you installed using the install options above
64
81
  ```bash
65
- graphjin serve --demo --path examples/webshop
82
+ curl -sS localhost:8083/api/v1/agent \
83
+ -H 'content-type: application/json' \
84
+ -d '{"instruction": "Who should get the next open cardiology slot?"}'
66
85
  ```
67
86
 
68
- For a larger agent-driven example with Postgres operations data, a BigQuery
69
- simulator for roast telemetry, CodeSQL over internal business code, and
70
- executable workflows:
87
+ Answers come back as `{status, answer, data, evidence, actions, next}`, grounded by server-side protocol guards. You can also chat with it in the built-in web console at `localhost:8083/agent` — it streams every tool call live as it works. See [Server-Side Agent](#server-side-agent) below, [AGENTIC.md](AGENTIC.md#server-side-agent), and [graphjin.com/agentic/server-agent](https://graphjin.com/agentic/server-agent/).
88
+
89
+ **More demo verticals**
90
+
91
+ The bigger demos live in the repo — clone it and pass `--path`:
71
92
 
72
93
  ```bash
73
- graphjin serve --demo --path examples/coffee-roastery
94
+ git clone https://github.com/dosco/graphjin
95
+ cd graphjin
96
+ graphjin serve --demo --path examples/webshop # classic GraphQL starter (Postgres)
97
+ graphjin serve --demo --path examples/coffee-roastery # flagship agentic demo (Postgres + BigQuery-emu + CodeSQL)
74
98
  ```
75
99
 
76
- More demo verticals a MySQL corrugated-box plant with JWT roles, a PCB fab
77
- spanning Postgres + Snowflake-emu + MongoDB + a file source + an OpenAPI
78
- supplier API, and a zero-Docker SQLite clinic scheduler live in
100
+ Each demo keeps its state under `<path>/demo/` and reuses it on later starts.
101
+ A MySQL corrugated-box plant with JWT roles and a PCB fab spanning Postgres +
102
+ Snowflake-emu + MongoDB + a file source + an OpenAPI supplier API live in
79
103
  [examples/](examples/README.md), each with an end-to-end smoke suite
80
- (`make smoke-all` runs them all).
81
-
82
- You'll see output like this:
83
- ```
84
- GraphJin started
85
- ───────────────────────
86
- Web UI: http://localhost:8080/
87
- GraphQL: http://localhost:8080/api/v1/graphql
88
- REST API: http://localhost:8080/api/v1/rest/
89
- Workflows: http://localhost:8080/api/v1/workflows/<name>
90
- MCP: http://localhost:8080/api/v1/mcp
91
- ```
104
+ (`make smoke-all` runs them all). The full tour is at
105
+ <https://graphjin.com/start/demos/>.
92
106
 
93
107
  ## Add GraphJin To Your AI Client
94
108
 
@@ -581,7 +595,7 @@ Legacy prompts such as `write_query` and `fix_query_error` are available only wh
581
595
  Optional: instead of your client chaining `query_catalog` → `validate_where_clause` → `execute_saved_query`, let GraphJin run the catalog-first discovery loop for you. When enabled, GraphJin exposes one MCP tool `ask_graphjin_agent` and one REST endpoint `POST /api/v1/agent` that take a single instruction and return a typed, evidence-backed answer (`status`, `answer`, `data`, `evidence`, `actions`, `next`).
582
596
 
583
597
  - **Enable** by loading `agentic.yml` (`GO_ENV=agentic`) with `agent.enabled: true` plus a provider, model, and `api_key_env`.
584
- - **Modes:** `safe` (discovery + approved saved queries/mutations), `discovery_only` (read-only), `raw_allowed` (adds raw GraphQL when `agent.allow_raw_graphql` and `mcp.allow_raw_queries` are set).
598
+ - **Execution control:** there are no per-request agent modes. `agent.read_only: true` forces the server-side agent to reject mutations, including saved-query mutations; otherwise core roles, row-level security, source/table `read_only`, and Go protocol guards decide what can run.
585
599
  - **Caller-scoped:** the agent runs as the caller, so core roles + row-level security enforce access. The caller's role only changes which *guidance* the agent follows, never what it can read or write.
586
600
  - **Grounded:** Go protocol guards keep every answer backed by real catalog/validation/execution evidence and downgrade to `blocked` (with evidence) when a step is skipped.
587
601
  - **Machine-actionable refusals:** blocked responses carry a structured `refusal` (code, reasons, unblock steps, `policy_final`/`retryable`) so a calling agent can course-correct in one step instead of guessing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "3.18.42",
3
+ "version": "3.18.44",
4
4
  "description": "GraphJin CLI - Build APIs in 5 minutes with GraphQL",
5
5
  "bin": {
6
6
  "graphjin": "bin/graphjin.js"