@tenonhq/dovetail-servicenow 0.0.17 → 0.0.18

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/dist/client.js +11 -0
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -278,6 +278,17 @@ function createClient(config = {}) {
278
278
  },
279
279
  claude: {
280
280
  createRecord: async function (params) {
281
+ // Guard: a bare record insert into sys_db_object creates only an
282
+ // orphaned metadata row — no physical table and no ACLs. Table creation
283
+ // is a privileged platform operation that must run through the proper
284
+ // lifecycle, never a generic createRecord call.
285
+ if (params && params.table === "sys_db_object") {
286
+ throw new Error("Refusing to insert sys_db_object via createRecord: a bare insert " +
287
+ "orphans the table (no physical table or ACLs are created). " +
288
+ "Create tables via the dove-sn create-table capability (in build), " +
289
+ "or in Studio then run `dove refresh -s <scope>` to materialise " +
290
+ "the new records locally.");
291
+ }
281
292
  var data = await dovetailRequest("POST", "createRecord", params, null, "claude.createRecord(" + params.table + ")");
282
293
  return data.result || data;
283
294
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-servicenow",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },