@reunionstudio/airlock-mcp 0.1.4 → 0.1.5

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.
@@ -227,6 +227,25 @@ as `admin.list_specs`, `admin.describe_role`, `admin.get_spec`, or
227
227
  Use `admin.*` only when the app is intentionally changing Airlock setup or
228
228
  running an admin operation.
229
229
 
230
+ Restricted references are one-record interaction contracts for read-only
231
+ reference specs. If `agent.describe_spec`, `observe.spec`,
232
+ `observe.spec_config`, or `observe.reference_context` shows
233
+ `restricted_reference` or `reference_config.restricted_reference`, do not
234
+ enumerate the protected reference, build a populated picker, or use broad
235
+ `agent.select_reference_data` for that object path. Get the lookup value from
236
+ the user's case/work context, then call `agent.get_reference_record` with the
237
+ configured `object_key`, lookup value, purpose, and role lens. The procedure
238
+ returns at most one `RECORD`, applies reference row filters, checks active
239
+ `action_limit` Expectations before returning data, and records the safe
240
+ `REFERENCE_READ` event used for usage budgeting. Branch on stable codes such
241
+ as `OK`, `NOT_FOUND`, `NON_UNIQUE_LOOKUP_KEY`, `PURPOSE_REQUIRED`,
242
+ `USAGE_LIMIT_BLOCKED`, and `REFERENCE_READ_EVENT_FAILED`; expose
243
+ `USAGE_CONTEXT` fields such as `action_limit_used` and `action_time_period`.
244
+ For read-only planning and audit, use `observe.reference_context`,
245
+ `observe.usage_limits`, `observe.usage_limit`, and
246
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
247
+ without querying raw reference rows.
248
+
230
249
  Help the app follow the loop:
231
250
 
232
251
  - Observe/read: fetch existing governed data through approved Airlock or
package/README.md CHANGED
@@ -221,6 +221,25 @@ For app-first work against installed Airlock, start with `observe.procedures`,
221
221
  before designing direct SQL helpers. These payloads are intended to be useful
222
222
  to agents as well as humans.
223
223
 
224
+ Restricted references are one-record interaction contracts. When
225
+ `observe.reference_context`, `observe.spec_config`, or `agent.describe_spec`
226
+ shows `restricted_reference` or `reference_config.restricted_reference`, agents
227
+ must not call broad
228
+ `agent.select_reference_data` for that object path and must not enumerate values
229
+ or build a populated picker from the protected reference. The agent should get
230
+ the lookup value from the user's case/work context, then call
231
+ `agent.get_reference_record` with the configured `object_key`, lookup value,
232
+ purpose, and role lens. The procedure applies configured reference row filters,
233
+ checks active `action_limit` Expectations before returning a record, always
234
+ records the safe `REFERENCE_READ` event used for budgeting, and returns at most
235
+ one `RECORD`. Branch on codes such as `OK`, `NOT_FOUND`,
236
+ `NON_UNIQUE_LOOKUP_KEY`, `PURPOSE_REQUIRED`, `USAGE_LIMIT_BLOCKED`, and
237
+ `REFERENCE_READ_EVENT_FAILED`, and report `USAGE_CONTEXT` fields such as
238
+ `action_limit_used` and `action_time_period`. Auditors and planning agents can
239
+ inspect `observe.usage_limits`, `observe.usage_limit`, and
240
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
241
+ without reading raw reference rows.
242
+
224
243
  For governed Markdown knowledge, use the `okf-knowledge-bundle` pattern. It
225
244
  sets `core_config.payload_adapter` to `okf_knowledge_bundle` so installed
226
245
  Airlock can load locally validated bundles through
@@ -30,6 +30,13 @@ For installed Airlock access, teach the current procedure split:
30
30
  administrative mutation. App-first and audit-style workflows should use
31
31
  observe payloads for discovery, context, health, access explanation, activity,
32
32
  billing events, and governance maps before considering custom SQL helpers.
33
+ When a read-only reference spec declares `restricted_reference` or
34
+ `reference_config.restricted_reference`, agents should avoid broad
35
+ `agent.select_reference_data` reads and use `agent.get_reference_record` for a
36
+ known lookup value and purpose, with `observe.reference_context`,
37
+ `observe.usage_limits`, `observe.usage_limit`, and
38
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
39
+ for planning and audit.
33
40
 
34
41
  The connector package and MCP server live in `reunionstudio/airlock-mcp`.
35
42
  This workbench provides the spec-building implementation inside that one
package/docs/workflows.md CHANGED
@@ -172,6 +172,21 @@ For app-first work, start with observe payloads such as `observe.procedures`,
172
172
  wrappers such as `admin.list_specs`, `admin.describe_role`, `admin.get_spec`,
173
173
  or `admin.list_events`; use observe list/detail procedures instead.
174
174
 
175
+ Restricted references are one-record interaction contracts for read-only
176
+ reference specs. When `observe.reference_context`, `observe.spec_config`, or
177
+ `agent.describe_spec` shows `restricted_reference` or
178
+ `reference_config.restricted_reference`, do not enumerate the protected
179
+ reference, build a populated picker, or use broad `agent.select_reference_data`
180
+ for that object path. Get the lookup value from the user's case/work context,
181
+ then call `agent.get_reference_record` with the configured `object_key`, lookup
182
+ value, purpose, and role lens. The procedure returns at most one `RECORD`,
183
+ applies reference row filters, checks active `action_limit` Expectations before
184
+ returning data, and records the safe `REFERENCE_READ` event used for usage
185
+ budgeting. Use `observe.reference_context`, `observe.usage_limits`,
186
+ `observe.usage_limit`, and
187
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
188
+ for planning and audit without reading raw reference rows.
189
+
175
190
  The app should follow the loop:
176
191
 
177
192
  1. Observe/read governed records through approved Airlock or Snowflake surfaces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reunionstudio/airlock-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Single-install MCP interface for Airlock agents.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "post_id": "POST-001",
7
7
  "reply_to_post_id": "",
8
- "submitted_by": "agent.deb",
8
+ "submitted_by": "agent.csmith",
9
9
  "posted_at": "2026-06-13 09:00:00",
10
10
  "body": "Please make reimbursements easier to prepare and submit.",
11
11
  "tags": "#request #finance #reimbursements",
@@ -19,7 +19,7 @@
19
19
  "desired_outcome": "An approved agent can prepare a draft reimbursement with receipt evidence."
20
20
  },
21
21
  "agent": {
22
- "name": "Deb"
22
+ "name": "csmith"
23
23
  }
24
24
  }
25
25
  }
package/setup.py CHANGED
@@ -27,7 +27,7 @@ def data_files():
27
27
 
28
28
  setup(
29
29
  name="airlock-mcp",
30
- version="0.1.4",
30
+ version="0.1.5",
31
31
  description="Codex-first workbench and CLI for drafting Airlock specs.",
32
32
  packages=find_packages("src"),
33
33
  package_dir={"": "src"},
@@ -1,3 +1,3 @@
1
1
  """Airlock MCP CLI package."""
2
2
 
3
- __version__ = "0.1.4"
3
+ __version__ = "0.1.5"
@@ -44,6 +44,16 @@ timeline. For `alter_spec` activity, use `CHANGED_SECTIONS` and
44
44
  Do not use retired admin read wrappers such as `admin.list_specs`,
45
45
  `admin.describe_role`, or `admin.list_events`; use the matching observe procedure.
46
46
 
47
+ Restricted references are one-record interaction contracts. If a reference
48
+ spec declares `restricted_reference` or `reference_config.restricted_reference`,
49
+ do not enumerate values or use broad `agent.select_reference_data` for that
50
+ object path. Get the lookup value from the user's case/work context and call
51
+ `agent.get_reference_record` with the configured `object_key`, lookup value,
52
+ purpose, and role lens. Use `observe.reference_context`,
53
+ `observe.usage_limits`, `observe.usage_limit`, and
54
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
55
+ for planning and audit without reading raw reference rows.
56
+
47
57
  Do not store credentials here. Do not write directly to Airlock-owned tables,
48
58
  stages, generated views, or generated tables. Use approved Airlock/Snowflake
49
59
  access paths and submit governed decisions or actions through spec contracts.
@@ -85,6 +95,13 @@ Installed Airlock procedure grammar:
85
95
  - `agent.*` is governed agent work in the actor's scope.
86
96
  - `admin.*` is administrative mutation. Do not use retired admin read wrappers;
87
97
  use observe list/detail procedures instead.
98
+
99
+ For restricted reference specs, do not enumerate protected object paths or use
100
+ broad `agent.select_reference_data`. Use `agent.get_reference_record` for a
101
+ known lookup value and purpose, and use `observe.reference_context`,
102
+ `observe.usage_limits`, `observe.usage_limit`, and
103
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
104
+ for planning and audit.
88
105
  """
89
106
 
90
107
 
@@ -144,6 +161,7 @@ def _manifest(mode: str, entries: list[dict[str, Any]]) -> dict[str, Any]:
144
161
  "observe": "read-only governance observation, context, activity, health, billing events, and access explanation",
145
162
  "agent": "governed agent work in the actor scope",
146
163
  "admin": "administrative mutation and operational changes",
164
+ "restricted_reference": "one-record reference lookup through agent.get_reference_record; do not enumerate protected reference paths",
147
165
  },
148
166
  "specs": entries,
149
167
  "tracks": {
@@ -127,6 +127,18 @@ activity, use `CHANGED_SECTIONS` and `CHANGED_FIELDS` to triage what changed
127
127
  before fetching version snapshots. Do not call retired admin read wrappers such as `admin.list_specs`, `admin.describe_role`,
128
128
  or `admin.list_events`; use the matching observe list/detail procedure.
129
129
 
130
+ Restricted references are one-record interaction contracts for read-only
131
+ reference specs. If `agent.describe_spec`, `observe.spec_config`, or
132
+ `observe.reference_context` shows `restricted_reference` or
133
+ `reference_config.restricted_reference`, do not enumerate the protected
134
+ reference, build a populated picker, or use broad `agent.select_reference_data`
135
+ for that object path. Get the lookup value from the user's case/work context,
136
+ then call `agent.get_reference_record` with the configured `object_key`, lookup
137
+ value, purpose, and role lens. Use `observe.usage_limits`,
138
+ `observe.usage_limit`, and
139
+ `observe.explain_access(action => 'get_reference_record', object_key => ...)`
140
+ for planning and audit without reading raw reference rows.
141
+
130
142
  The app may orient the user with summaries, comparisons, rankings, exception
131
143
  queues, proposals, or dashboards. It should submit governed choices back
132
144
  through an Airlock spec contract. Do not write directly to Airlock-owned tables,
package/src/mcp.mjs CHANGED
@@ -44,7 +44,7 @@ export function handleMcpRequest(message) {
44
44
  },
45
45
  serverInfo: {
46
46
  name: "airlock",
47
- version: "0.1.4",
47
+ version: "0.1.5",
48
48
  },
49
49
  instructions:
50
50
  "Airlock MCP helps agents improve processes with Airlock specs and build apps or workflows that use existing specs. Use airlock_start for orientation or the airlock_* tools to bootstrap, draft, check, summarize, export, and render specs.",
package/src/text.mjs CHANGED
@@ -65,6 +65,21 @@ activity, use \`CHANGED_SECTIONS\` and \`CHANGED_FIELDS\` to triage what changed
65
65
  before fetching version snapshots. Offer to run \`airlock-mcp init-app-context\`
66
66
  in the app repo to seed \`airlock/specs.manifest.json\`, spec snapshots, sample records, and
67
67
  generated helper folders. Help code the app using approved Airlock/Snowflake access paths.
68
+ When a reference spec declares \`restricted_reference\` or
69
+ \`reference_config.restricted_reference\`, do not enumerate values, build a
70
+ populated picker, or call broad \`agent.select_reference_data\`. Get the lookup
71
+ value from the user's case/work context and call
72
+ \`agent.get_reference_record\` for the configured \`object_key\`, purpose, and
73
+ role lens. It returns at most one record, applies reference row filters, checks
74
+ \`action_limit\` before returning data, and always records the safe
75
+ \`REFERENCE_READ\` event used for budgeting. Branch on \`OK\`, \`NOT_FOUND\`,
76
+ \`NON_UNIQUE_LOOKUP_KEY\`, \`PURPOSE_REQUIRED\`, \`USAGE_LIMIT_BLOCKED\`, and
77
+ \`REFERENCE_READ_EVENT_FAILED\`; report \`USAGE_CONTEXT\` fields such as
78
+ \`action_limit_used\` and \`action_time_period\`. Use
79
+ \`observe.reference_context\`, \`observe.usage_limits\`, \`observe.usage_limit\`,
80
+ and \`observe.explain_access(action => 'get_reference_record', object_key => ...)\`
81
+ for read-only planning and audit.
82
+
68
83
  Do not use retired admin read wrappers such as
69
84
  \`admin.list_specs\`, \`admin.describe_role\`, or \`admin.list_events\`; use
70
85
  the matching observe procedure. Do not write directly to Airlock-owned tables
@@ -185,7 +200,10 @@ read-side discovery with observe payloads such as \`observe.procedures\`,
185
200
  for \`alter_spec\` activity, use \`CHANGED_SECTIONS\` and \`CHANGED_FIELDS\` to
186
201
  triage what changed before fetching version snapshots. Do not use retired admin
187
202
  read wrappers such as \`admin.list_specs\`, \`admin.describe_role\`, or
188
- \`admin.list_events\`. It can
203
+ \`admin.list_events\`. If a reference spec declares \`restricted_reference\` or
204
+ \`reference_config.restricted_reference\`, do not enumerate the protected
205
+ reference; use \`agent.get_reference_record\` for a known lookup value and
206
+ \`observe.usage_limits\` / \`observe.usage_limit\` for budget visibility. It can
189
207
  seed an app repo with \`airlock/specs.manifest.json\`, spec snapshots, sample
190
208
  records, and generated helper folders. The app should submit decisions,
191
209
  approvals, actions, comments, or follow-ups through Airlock spec contracts, not