norn-cli 4.6.2 → 5.0.0

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.
package/README.md CHANGED
@@ -134,6 +134,22 @@ Every `{{...}}` reference in any Norn file shows its resolved value as a gray in
134
134
 
135
135
  `{{$env.name}}` always reads from scope 3, skipping local/file vars. Runtime values (`$1.body.id`, request captures, `run X()` returns) render no hint inline; hover narrates them with source line. `.nornapi` and `.nornsql` use env scope only; `.nornsql` additionally shows the resolved connection string after `connection NAME`.
136
136
 
137
+ ## Database Connections
138
+
139
+ Declare each SQL connection in a `.nornai` or `.nornagent` sidecar:
140
+
141
+ ```nornagent
142
+ database AppDb
143
+ adapter postgres
144
+ connectionString {{$env.APP_DB_URL}}
145
+ access read
146
+ end database
147
+ ```
148
+
149
+ Import that sidecar alongside the `.nornsql` file in a `.norn` flow that runs named SQL operations. `adapter` also accepts `sqlserver`, `sqlserver-windows`, or a relative path to a custom adapter script. The old `sql.connections` and `sql.adapters` entries in `norn.config.json` are no longer used.
150
+
151
+ An agent can receive `query_database` and `inspect_database` by adding `database AppDb` inside its agent block. Agent access defaults to `read`; use `access full` in the database declaration to permit writes. The database account's own permissions still apply. The access setting limits agent tools, not deterministic `.nornsql` operations. The Agent Graph shows database and knowledge declarations as nodes connected to the agents that grant them.
152
+
137
153
  ## Deterministic MCP Tools
138
154
 
139
155
  Norn can call MCP tools from sequences without leaving the `.norn` runtime. MCP sessions are deterministic and shared across the full sequence run by default, so nested sequences reuse the same connection for the same resolved server alias.