permdock 0.29.0 → 0.30.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.
Files changed (66) hide show
  1. package/dist/{adoption-scan-obbSy73c.js → adoption-scan-EGg-hGEu.js} +1 -1
  2. package/dist/{arazzo-rxj2pNN3.js → arazzo-CfjZOmVG.js} +1 -1
  3. package/dist/{arazzo-D9Fv_ZEV.js → arazzo-yiKJ4jm0.js} +1 -1
  4. package/dist/better-supabase/index.d.ts +2 -2
  5. package/dist/{casbin-p8yi9Py5.js → casbin-QzddqHaV.js} +1 -1
  6. package/dist/{casbin-D3PH6-AJ.js → casbin-j_468wDU.js} +1 -1
  7. package/dist/cli/bin.js +1 -1
  8. package/dist/cli/generate/watch-worker.js +1 -1
  9. package/dist/cli/index.js +1 -1
  10. package/dist/cli/plugins/app.js +1 -1
  11. package/dist/cli/plugins/openapi.js +1 -1
  12. package/dist/cli/plugins/powersync.js +1 -1
  13. package/dist/cli/plugins/rls.js +1 -1
  14. package/dist/cli/plugins/schemas.js +1 -1
  15. package/dist/cli/plugins/supabase.js +1 -1
  16. package/dist/cli/plugins/ui.js +1 -1
  17. package/dist/{cloud-DnTSKTYr.js → cloud-D3c4zhYr.js} +1 -1
  18. package/dist/{codemod-C4xmPHZU.js → codemod-BLTuDxFa.js} +1 -1
  19. package/dist/{codemod-DwJ1I9er.js → codemod-Ob71iPQh.js} +2 -2
  20. package/dist/{completion-CHOgUToS.js → completion-CVTgFKK6.js} +1 -1
  21. package/dist/{config-StFKj2S0.js → config-ClUStKUe.js} +1 -1
  22. package/dist/{config-report-DFj3emJp.js → config-report-GJmQMf2K.js} +1 -1
  23. package/dist/{doctor-BSYAl2XG.js → doctor-Bn2BTr0N.js} +6 -6
  24. package/dist/{doctor-CjCJ_U2a.js → doctor-CQoP1264.js} +2 -2
  25. package/dist/eve/index.d.ts +7 -7
  26. package/dist/eve/index.js +2 -2
  27. package/dist/{execute-BzQKrYqL.js → execute-BLM5tpRU.js} +1 -1
  28. package/dist/{gen-BVDN_Hqx.js → gen-02p5oEol.js} +1 -1
  29. package/dist/gen-C_RJoGZB.js +1 -0
  30. package/dist/{gen-kind-BK6bb0gj.js → gen-kind-BMwPHJZ0.js} +1 -1
  31. package/dist/{generate-p7cdH1ac.js → generate-BVcwnfoI.js} +1 -1
  32. package/dist/{generate-DNAoLMj1.js → generate-BtstB6iV.js} +2 -2
  33. package/dist/{import-B0nUIp2b.js → import-HzsIBAa5.js} +1 -1
  34. package/dist/{init-Ck4PIu9F.js → init-BklKWywy.js} +1 -1
  35. package/dist/{init-CjlVWrBE.js → init-DvsMFuau.js} +3 -3
  36. package/dist/{login-BhSLL8Pn.js → login-BFvEcFnI.js} +3 -3
  37. package/dist/{login-BdWIAsFT.js → login-CuUf-syI.js} +1 -1
  38. package/dist/{manifest-CXK3krNu.js → manifest-BYzJF6xk.js} +28 -28
  39. package/dist/{openapi-D595qUYF.js → openapi-BwZABlQO.js} +1 -1
  40. package/dist/{openapi-E2411VYb.js → openapi-DNZv-nDu.js} +1 -1
  41. package/dist/{openapi-document-DDzA3CrT.js → openapi-document-DoIe4MrZ.js} +1 -1
  42. package/dist/{output-BhNN-hvv.js → output-BI85V6hu.js} +1 -1
  43. package/dist/{powersync-Da9op2Zo.js → powersync-CkoImqoq.js} +1 -1
  44. package/dist/{powersync-BdqLK59r.js → powersync-D1Aog89p.js} +1 -1
  45. package/dist/{powersync-CMu40wtz.js → powersync-f-6y8sCk.js} +1 -1
  46. package/dist/pull-CT7wu2uo.js +1 -0
  47. package/dist/{pull-AXzbc_kg.js → pull-DD6YQ42X.js} +1 -1
  48. package/dist/{rls-DfzVlo1q.js → rls-c0Z9lbyp.js} +3 -3
  49. package/dist/{rls-files-BpMqBdji.js → rls-files-Dhtn_6LH.js} +1 -1
  50. package/dist/{rls-BC1IFnfu.js → rls-oLdqutBO.js} +1 -1
  51. package/dist/run-DKUZT8Cc.js +1 -0
  52. package/dist/{run-CqAur1Y3.js → run-DkviX16y.js} +2 -2
  53. package/dist/{scan-C_YtxPxn.js → scan-CNhvy39j.js} +1 -1
  54. package/dist/{schema-BVhiZyY-.js → schema-CwNjlLBx.js} +1 -1
  55. package/dist/{skills-DBvXLSo7.js → skills-B74k44ml.js} +1 -1
  56. package/dist/{skills-CQ3B9vuz.js → skills-DrY6VdtH.js} +1 -1
  57. package/dist/{usage-Dodo7Sjb.js → usage-B-xheuEq.js} +1 -1
  58. package/dist/usage-BRjoZ-vo.js +1 -0
  59. package/dist/{usage-CnCNB6XN.js → usage-DEUKhZ1n.js} +2 -2
  60. package/dist/{verify-DTlATzWK.js → verify-BgZapMKs.js} +1 -1
  61. package/package.json +28 -28
  62. package/skills/permdock-agents/references/runtimes.md +1 -1
  63. package/dist/gen-D13YdBQP.js +0 -1
  64. package/dist/pull-B0ju22jJ.js +0 -1
  65. package/dist/run-X_cWRiUV.js +0 -1
  66. package/dist/usage-Cayjfw1S.js +0 -1
@@ -1,4 +1,4 @@
1
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
1
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
2
2
  import { r as listSourceFiles } from "./files-DAR51W3J.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { relative } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { _ as arazzoFindings } from "./src-BAYcigFU.js";
2
2
  import { d as missingInput } from "./errors-DgLOqc6j.js";
3
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
3
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
4
4
  import { t as ARAZZO_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
5
5
  import { i as readJsonFile } from "./files-DAR51W3J.js";
6
6
  import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-CZnlAyZ8.js";
@@ -21,7 +21,7 @@ const check = defineLeaf({
21
21
  ...permissionsFlag
22
22
  },
23
23
  async run(ctx, { flags }) {
24
- return (await import("./arazzo-rxj2pNN3.js")).runArazzo({
24
+ return (await import("./arazzo-CfjZOmVG.js")).runArazzo({
25
25
  cwd: ctx.cwd,
26
26
  config: ctx.config,
27
27
  doc: given(flags.doc),
@@ -722,8 +722,8 @@ type AuthorizationProviderOptions<P = undefined> = {
722
722
  /**
723
723
  * Fill better-supabase's `roleIn` with `permdock_role_in`, which the manifest
724
724
  * lists with `rls.customRoles` in `database` mode, so the `membership_roles`
725
- * trigger refuses another tenant's custom role. Needs better-supabase 0.77.0;
726
- * an older release refuses the template.
725
+ * trigger refuses another tenant's custom role. Needs better-supabase 0.77.0
726
+ * or later.
727
727
  */
728
728
  readonly roleIn?: boolean;
729
729
  /**
@@ -1,5 +1,5 @@
1
1
  import { t as applyFiles } from "./files-DuV7wRim.js";
2
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
2
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
3
3
  import { n as isIdentifier, t as emitPolicyModule } from "./policy-module-Bp4HvsRg.js";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { resolve } from "node:path";
@@ -16,7 +16,7 @@ const casbinImport = defineLeaf({
16
16
  ...outFlag
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- const { runCasbinImport } = await import("./casbin-p8yi9Py5.js");
19
+ const { runCasbinImport } = await import("./casbin-QzddqHaV.js");
20
20
  return runCasbinImport({
21
21
  cwd: ctx.cwd,
22
22
  model: given(flags.model),
package/dist/cli/bin.js CHANGED
@@ -11,7 +11,7 @@ if (argv.length === 1 && (argv[0] === "--version" || argv[0] === "-v")) {
11
11
  const [{ isCi }, { trapSignals }, { run }, { streamHasColors }] = await Promise.all([
12
12
  import("../env-hbYumkRp.js"),
13
13
  import("../signals-a1NxAP0X.js"),
14
- import("../run-X_cWRiUV.js"),
14
+ import("../run-DKUZT8Cc.js"),
15
15
  import("../style-Crf-90o6.js")
16
16
  ]);
17
17
  const signals = trapSignals();
@@ -1,7 +1,7 @@
1
1
  import { r as isRecord } from "../../compact-C4LFuqbW.js";
2
2
  import { a as describeError } from "../../errors-DgLOqc6j.js";
3
3
  import { i as readConfig } from "../../config-iyy90IOU.js";
4
- import { t as executeGenerate } from "../../execute-BzQKrYqL.js";
4
+ import { t as executeGenerate } from "../../execute-BLM5tpRU.js";
5
5
  import { resolve } from "node:path";
6
6
  import { parentPort, workerData } from "node:worker_threads";
7
7
  // src/cli/generate/watch-worker.ts
package/dist/cli/index.js CHANGED
@@ -2,7 +2,7 @@ import { t as catalogPath } from "../catalog-path-bG0XxHMu.js";
2
2
  import { t as defineConfig } from "../config-iyy90IOU.js";
3
3
  import { t as definePlugin } from "../plugin-MQVfUBUS.js";
4
4
  import { c as parseGrantsMarker, l as parseHookMarker } from "../markers-C-kThnKN.js";
5
- import { t as run } from "../run-CqAur1Y3.js";
5
+ import { t as run } from "../run-DkviX16y.js";
6
6
  import { n as parsePushedPolicy, r as pushedPolicy, t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-rpB6k77P.js";
7
7
  // src/cli/token-schemas.ts
8
8
  const ID = {
@@ -1,4 +1,4 @@
1
- import { t as kindPlugin } from "../../gen-kind-BK6bb0gj.js";
1
+ import { t as kindPlugin } from "../../gen-kind-BMwPHJZ0.js";
2
2
  // src/cli/plugins/app.ts
3
3
  /**
4
4
  * Scope, role, permission and operation names and topic and path builders:
@@ -32,7 +32,7 @@ function openapi(options = {}) {
32
32
  return operationsFile(source.cwd, options.routes, task.out);
33
33
  }
34
34
  if (options.doc === void 0) return [];
35
- const { openapiDocument } = await import("../../openapi-document-DDzA3CrT.js");
35
+ const { openapiDocument } = await import("../../openapi-document-DoIe4MrZ.js");
36
36
  return openapiDocument(task, options, source);
37
37
  }
38
38
  });
@@ -18,7 +18,7 @@ function powersync(options = {}) {
18
18
  }],
19
19
  emit: async (task, _model, source) => {
20
20
  if (source === void 0) return [];
21
- const { powersyncFiles } = await import("../../powersync-CMu40wtz.js");
21
+ const { powersyncFiles } = await import("../../powersync-f-6y8sCk.js");
22
22
  return powersyncFiles(source.policy, source.config, task.out).files.map((file) => ({
23
23
  path: file.path,
24
24
  contents: file.text
@@ -19,7 +19,7 @@ function rls(options = {}) {
19
19
  }],
20
20
  config: (config) => withRlsOutputs(config, options),
21
21
  emit: async (task, _model, source) => {
22
- const { filesForRls } = await import("../../rls-files-BpMqBdji.js");
22
+ const { filesForRls } = await import("../../rls-files-Dhtn_6LH.js");
23
23
  return filesForRls(task, options, source);
24
24
  }
25
25
  });
@@ -1,4 +1,4 @@
1
- import { t as kindPlugin } from "../../gen-kind-BK6bb0gj.js";
1
+ import { t as kindPlugin } from "../../gen-kind-BMwPHJZ0.js";
2
2
  // src/cli/plugins/schemas.ts
3
3
  /** Row validators as Zod schemas, from the model's JSON Schema. */
4
4
  function zod(options = {}) {
@@ -37,7 +37,7 @@ function supabase(options = {}) {
37
37
  config: (config) => withHookOut(withRlsOutputs(config, options), hookOut),
38
38
  emit: async (task, _model, source) => {
39
39
  if (task.id === "sql") {
40
- const { filesForRls } = await import("../../rls-files-BpMqBdji.js");
40
+ const { filesForRls } = await import("../../rls-files-Dhtn_6LH.js");
41
41
  return filesForRls(task, {
42
42
  ...rlsOptions,
43
43
  dialect: "supabase"
@@ -1,4 +1,4 @@
1
- import { t as kindPlugin } from "../../gen-kind-BK6bb0gj.js";
1
+ import { t as kindPlugin } from "../../gen-kind-BMwPHJZ0.js";
2
2
  // src/cli/plugins/ui.ts
3
3
  /** `permdock/react` bound to the policy's vocabulary. Carries `"use client"`. */
4
4
  function reactHooks(options = {}) {
@@ -70,7 +70,7 @@ const pull = defineLeaf({
70
70
  },
71
71
  async run(ctx, { flags }) {
72
72
  const env = await withStdinSecret(ctx, "token", flags["token-stdin"], "PERMDOCK_CLOUD_TOKEN");
73
- return (await import("./pull-B0ju22jJ.js")).runCloudPull({
73
+ return (await import("./pull-CT7wu2uo.js")).runCloudPull({
74
74
  cwd: ctx.cwd,
75
75
  config: ctx.config,
76
76
  url: given(flags.url),
@@ -5,7 +5,7 @@ import { t as catalogFingerprint } from "./catalog-fingerprint-DAWZARy6.js";
5
5
  import { r as isRecord } from "./compact-C4LFuqbW.js";
6
6
  import { n as flagSpellings, o as GLOBAL_FLAGS } from "./args-Bc0HLiD4.js";
7
7
  import { c as generateFlags, f as policyFlag, i as dryRunFlag, r as dbUrlFlags, t as checkFlag } from "./flags-C0e-BzGW.js";
8
- import { n as ROOT } from "./manifest-CXK3krNu.js";
8
+ import { n as ROOT } from "./manifest-BYzJF6xk.js";
9
9
  import { i as visitorKeyTypes, r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
10
10
  import { n as defaultSqlCommand } from "./sql-T4GaBh9X.js";
11
11
  import { t as beforeFirst } from "./text-D704xHVl.js";
@@ -7,7 +7,7 @@ const codemod = defineLeaf({
7
7
  description: "The release to migrate to (0.5)",
8
8
  required: true,
9
9
  async complete() {
10
- return (await import("./codemod-C4xmPHZU.js")).codemodVersions();
10
+ return (await import("./codemod-BLTuDxFa.js")).codemodVersions();
11
11
  }
12
12
  }, {
13
13
  name: "paths",
@@ -22,7 +22,7 @@ const codemod = defineLeaf({
22
22
  }
23
23
  },
24
24
  async run(ctx, { flags, args, rest }) {
25
- return (await import("./codemod-C4xmPHZU.js")).runCodemod({
25
+ return (await import("./codemod-BLTuDxFa.js")).runCodemod({
26
26
  cwd: ctx.cwd,
27
27
  version: args["version"],
28
28
  paths: rest,
@@ -1,6 +1,6 @@
1
1
  import { a as suggestion, o as GLOBAL_FLAGS } from "./args-Bc0HLiD4.js";
2
2
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
3
- import { a as resolve } from "./manifest-CXK3krNu.js";
3
+ import { a as resolve } from "./manifest-BYzJF6xk.js";
4
4
  import { n as CliError } from "./errors-DgLOqc6j.js";
5
5
  // src/cli/core/completion.ts
6
6
  const SHELLS = [
@@ -10,7 +10,7 @@ const config = defineLeaf({
10
10
  ...failOnFlag
11
11
  },
12
12
  async run(ctx, { flags }) {
13
- const { runConfig } = await import("./config-report-DFj3emJp.js");
13
+ const { runConfig } = await import("./config-report-GJmQMf2K.js");
14
14
  return runConfig({
15
15
  cwd: ctx.cwd,
16
16
  config: ctx.config,
@@ -1,7 +1,7 @@
1
1
  import "./sources-DnjJPGfb.js";
2
2
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
3
3
  import { n as guessPermissions, t as barrelFile } from "./collect-BOh9Pxob.js";
4
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
4
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
5
5
  import { r as CONFIG_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
6
6
  import { a as rel, t as defaultSrcPath } from "./files-DAR51W3J.js";
7
7
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
@@ -2,8 +2,8 @@ import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolve
2
2
  import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
3
3
  import { r as runCollect } from "./collect-BOh9Pxob.js";
4
4
  import { t as didYouMean } from "./args-Bc0HLiD4.js";
5
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
6
- import { a as nonEmptyOr, r as findingOf } from "./output-BhNN-hvv.js";
5
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
6
+ import { a as nonEmptyOr, r as findingOf } from "./output-BI85V6hu.js";
7
7
  import { t as createStyle } from "./style-CQDaLJtP.js";
8
8
  import { i as DOCTOR_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
9
9
  import { a as rel, n as doctorSrcPath, o as sqlFiles$1, r as listSourceFiles } from "./files-DAR51W3J.js";
@@ -11,7 +11,7 @@ import { n as pgConnector } from "./pg-CA651850.js";
11
11
  import { a as describeError, i as configError } from "./errors-DgLOqc6j.js";
12
12
  import { a as betterSupabaseInstalled, c as workspaceDirs, d as readJson, i as betterSupabaseDefaults, l as filesOf, n as betterSupabaseAuthzVersions, o as betterSupabaseTenantClaim, r as betterSupabaseConfig, t as BETTER_SUPABASE_AUTHZ_TOPIC, u as nodeFiles } from "./better-supabase-DSbs4MtQ.js";
13
13
  import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-CZnlAyZ8.js";
14
- import { i as runSkillsInstall } from "./skills-DBvXLSo7.js";
14
+ import { i as runSkillsInstall } from "./skills-B74k44ml.js";
15
15
  import { a as supabaseConfig, i as readSupabaseConfig, n as pd045, r as pd074 } from "./supabase-config-B2sDFiwy.js";
16
16
  import { d as activeSource, g as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, p as resolveSchemas, r as supabaseDatabaseManifest } from "./hook-sql-55514A9t.js";
17
17
  import { i as pd039, t as hookOut } from "./supabase-hook-0q6ohTVN.js";
@@ -20,14 +20,14 @@ import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "
20
20
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
21
21
  import { i as group, n as membershipColumns, o as sqlStatements, r as tableKey } from "./deciding-columns-BnglEKqU.js";
22
22
  import { r as isRecord } from "./compact-C4LFuqbW.js";
23
- import { d as rowConditionMessage, f as parseIgnores, p as splitIgnored, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-DTlATzWK.js";
23
+ import { d as rowConditionMessage, f as parseIgnores, p as splitIgnored, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-BgZapMKs.js";
24
24
  import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-1yWthvi5.js";
25
25
  import { t as parseCatalog } from "./parse-nfHSt1Wy.js";
26
26
  import "./authz-topic-D8x24Jv-.js";
27
27
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
28
28
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
29
29
  import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-Bp5khmCG.js";
30
- import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-CnCNB6XN.js";
30
+ import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-DEUKhZ1n.js";
31
31
  import { c as listPermissions, h as formerKeys } from "./permission-registry-DMYRZVcn.js";
32
32
  import { t as resolveNames } from "./resolve-names-B0cqvJxo.js";
33
33
  import "./markers-C-kThnKN.js";
@@ -47,7 +47,7 @@ import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
47
47
  import { n as pd110, r as pd114, t as pd109 } from "./perf-token-dFGVP14-.js";
48
48
  import { a as scopeMembershipTable } from "./compile-BUKXrueE.js";
49
49
  import { t as policyModel } from "./model-B0rrUh6J.js";
50
- import { a as roleSources, i as powersyncOut, n as staleFiles, o as scopeSourcesOf, r as powersyncFiles, s as streamOf } from "./powersync-Da9op2Zo.js";
50
+ import { a as roleSources, i as powersyncOut, n as staleFiles, o as scopeSourcesOf, r as powersyncFiles, s as streamOf } from "./powersync-CkoImqoq.js";
51
51
  import { t as FIELD_VIEWS } from "./fields-CViS0EPC.js";
52
52
  import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
53
53
  import { J as policyBundle, Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-BDqfipr1.js";
@@ -10,7 +10,7 @@ const doctor = defineLeaf({
10
10
  description: "Check codes or groups to run",
11
11
  valueHint: "code",
12
12
  async complete() {
13
- const { DOCTOR_CHECKS } = await import("./doctor-BSYAl2XG.js");
13
+ const { DOCTOR_CHECKS } = await import("./doctor-Bn2BTr0N.js");
14
14
  return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
15
15
  }
16
16
  },
@@ -35,7 +35,7 @@ const doctor = defineLeaf({
35
35
  if (answer === void 0) return CANCELLED;
36
36
  fix = answer;
37
37
  }
38
- return (await import("./doctor-BSYAl2XG.js")).runDoctor({
38
+ return (await import("./doctor-Bn2BTr0N.js")).runDoctor({
39
39
  cwd: ctx.cwd,
40
40
  config: ctx.config,
41
41
  only: flags.only,
@@ -29,21 +29,21 @@ type EveApprovalContext = {
29
29
  type EveResponseContext = {
30
30
  readonly request: {
31
31
  readonly callId: string;
32
- readonly requestId?: string;
32
+ readonly interactionId: string;
33
+ /** The caller of the turn that made the call; `null` when unauthenticated. */
34
+ readonly principal: EvePrincipal | null;
33
35
  readonly toolName: string;
34
36
  readonly toolInput?: unknown;
35
37
  };
36
- /**
37
- * Who answered and how; eve settles the request only on `allowed`. Eve 0.91
38
- * sends `deny`. Earlier releases sent `cancel` for the same refusal.
39
- */
38
+ /** Who answered and how; eve settles the request only on `allowed`. */
40
39
  readonly response: {
41
- readonly decision: "approve" | "deny" | "cancel";
40
+ readonly decision: "approve" | "deny";
42
41
  readonly principal: EvePrincipal;
43
42
  };
43
+ /** Only the fields the adapter reads; eve passes the rest. */
44
44
  readonly session: {
45
45
  readonly id: string;
46
- readonly initiator: EvePrincipal | null;
46
+ readonly initiator?: EvePrincipal | null;
47
47
  };
48
48
  };
49
49
  /** What `subject`, `actor` and `tenant` receive. */
package/dist/eve/index.js CHANGED
@@ -85,13 +85,13 @@ function createPermDock(policy, given) {
85
85
  if (cached !== void 0) return Promise.resolve(cached);
86
86
  const binding = bindingFor(ctx.request.toolName);
87
87
  if (binding === void 0) return Promise.resolve(void 0);
88
- const initiator = ctx.session.initiator;
88
+ const initiator = ctx.session.initiator ?? null;
89
89
  return kernel.tokenFor(binding, ctx.request.toolInput, {
90
90
  session: {
91
91
  id: ctx.session.id,
92
92
  auth: {
93
93
  initiator,
94
- current: initiator
94
+ current: ctx.request.principal
95
95
  }
96
96
  },
97
97
  callId: ctx.request.callId
@@ -1,6 +1,6 @@
1
1
  import { a as suggestion } from "./args-Bc0HLiD4.js";
2
2
  import { n as CliError } from "./errors-DgLOqc6j.js";
3
- import { n as runGen } from "./gen-BVDN_Hqx.js";
3
+ import { n as runGen } from "./gen-02p5oEol.js";
4
4
  import { c as requirePolicy } from "./load-CZnlAyZ8.js";
5
5
  import { n as packageManagerOf } from "./peer-D77JpXe-.js";
6
6
  import { i as readSupabaseConfig } from "./supabase-config-B2sDFiwy.js";
@@ -397,7 +397,7 @@ function modelDigest(model) {
397
397
  return createHash("sha256").update(canonicalJson(model)).digest("base64url");
398
398
  }
399
399
  /**
400
- * `// @generated by permdock generate zod@0.29.0 from policy.ts sha-256:…; do
400
+ * `// @generated by permdock generate zod@0.30.0 from policy.ts sha-256:…; do
401
401
  * not edit`.
402
402
  */
403
403
  function generatedHeader(kind, info) {
@@ -0,0 +1 @@
1
+ export { t as renderKinds } from "./gen-02p5oEol.js";
@@ -47,7 +47,7 @@ function kindPlugin(kind, options = {}) {
47
47
  }],
48
48
  emit: async (_task, model, source) => {
49
49
  if (source === void 0) return [];
50
- const { renderKinds } = await import("./gen-D13YdBQP.js");
50
+ const { renderKinds } = await import("./gen-C_RJoGZB.js");
51
51
  const files = await renderKinds({
52
52
  cwd: source.cwd,
53
53
  config: source.config,
@@ -1,7 +1,7 @@
1
1
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
2
2
  import { n as CliError } from "./errors-DgLOqc6j.js";
3
3
  import { c as generateFlags, f as policyFlag, i as dryRunFlag, n as dbUrl, r as dbUrlFlags, t as checkFlag } from "./flags-C0e-BzGW.js";
4
- import { t as executeGenerate } from "./execute-BzQKrYqL.js";
4
+ import { t as executeGenerate } from "./execute-BLM5tpRU.js";
5
5
  import { t as receiptRows } from "./pipeline-Ct3YEKjx.js";
6
6
  // src/cli/commands/generate.ts
7
7
  function concurrencyFlag(value) {
@@ -6,10 +6,10 @@ import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
6
6
  import { c as indexesSql, i as tableFor, l as pruneIndexTargets, n as compileGrants, r as inferredCommand, s as indexTargets, u as readTableIndexFacts } from "./compile-B9SZiEnG.js";
7
7
  import { a as CANDIDATES, c as rowHelpersSql, d as rebuildPlan, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions, u as DROPPED_LIST } from "./generate-options-Yfh1pGyX.js";
8
8
  import { t as policyFromCatalog } from "./policy-from-catalog-YKaTeaco.js";
9
- import { t as fetchProjectPolicy } from "./pull-AXzbc_kg.js";
9
+ import { t as fetchProjectPolicy } from "./pull-DD6YQ42X.js";
10
10
  import { c as requirePolicy } from "./load-CZnlAyZ8.js";
11
11
  import { t as compact } from "./compact-C4LFuqbW.js";
12
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
12
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
13
13
  import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-C-kThnKN.js";
14
14
  import { G as graphHelper, H as byKey, K as graphSqlName, U as BOOTSTRAP_PERMISSIONS, lt as scopeSources, rt as memberIdsHelper, st as permittedIdsHelper, ut as scopeTable } from "./interactive-only-C_olBCPl.js";
15
15
  import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
@@ -6,7 +6,7 @@ import { t as applyFiles } from "./files-DuV7wRim.js";
6
6
  import { n as httpRequest } from "./http-BbX_Ou3_.js";
7
7
  import { i as readJsonFile } from "./files-DAR51W3J.js";
8
8
  import { i as schemaExpression, t as emitPermissionsModule } from "./generate-5_kz2309.js";
9
- import { t as validateOpenapi } from "./schema-BVhiZyY-.js";
9
+ import { t as validateOpenapi } from "./schema-CwNjlLBx.js";
10
10
  import { existsSync, readFileSync } from "node:fs";
11
11
  import { resolve } from "node:path";
12
12
  // src/cli/openapi/import.ts
@@ -1,7 +1,7 @@
1
1
  import { a as decodePreset, g as resolvePreset, i as presetFlags, n as generatePreset, o as encodePreset } from "./preset-BcFDaeqd.js";
2
2
  import { n as CliError } from "./errors-DgLOqc6j.js";
3
3
  import { t as applyFiles } from "./files-DuV7wRim.js";
4
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
4
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
5
5
  import { t as addLine } from "./peer-D77JpXe-.js";
6
6
  import { existsSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -48,7 +48,7 @@ const init = defineLeaf({
48
48
  ...forceFlag
49
49
  },
50
50
  async run(ctx, { flags }) {
51
- const [{ runInit }, { packageManagerOf }] = await Promise.all([import("./init-Ck4PIu9F.js"), import("./peer-BWTpSLs2.js")]);
51
+ const [{ runInit }, { packageManagerOf }] = await Promise.all([import("./init-BklKWywy.js"), import("./peer-BWTpSLs2.js")]);
52
52
  const agent = await packageManagerOf(ctx.cwd);
53
53
  const selection = {
54
54
  archetype: flags.archetype,
@@ -79,7 +79,7 @@ const presetDecode = defineLeaf({
79
79
  positionals: presetCode,
80
80
  flags: {},
81
81
  async run(_ctx, { args }) {
82
- const { runPreset } = await import("./init-Ck4PIu9F.js");
82
+ const { runPreset } = await import("./init-BklKWywy.js");
83
83
  return runPreset("decode", args["code"] ?? "");
84
84
  }
85
85
  });
@@ -87,7 +87,7 @@ const presetUrl = defineLeaf({
87
87
  positionals: presetCode,
88
88
  flags: {},
89
89
  async run(_ctx, { args }) {
90
- const { runPreset } = await import("./init-Ck4PIu9F.js");
90
+ const { runPreset } = await import("./init-BklKWywy.js");
91
91
  return runPreset("url", args["code"] ?? "");
92
92
  }
93
93
  });
@@ -27,7 +27,7 @@ const login = defineLeaf({
27
27
  }
28
28
  },
29
29
  async run(ctx, { flags }) {
30
- const { runLogin } = await import("./login-BdWIAsFT.js");
30
+ const { runLogin } = await import("./login-CuUf-syI.js");
31
31
  return runLogin({
32
32
  cwd: ctx.cwd,
33
33
  url: given(flags.url),
@@ -43,7 +43,7 @@ const login = defineLeaf({
43
43
  const logout = defineLeaf({
44
44
  flags: { ...urlFlag },
45
45
  async run(ctx, { flags }) {
46
- const { runLogout } = await import("./login-BdWIAsFT.js");
46
+ const { runLogout } = await import("./login-CuUf-syI.js");
47
47
  return runLogout({
48
48
  url: given(flags.url),
49
49
  json: ctx.json,
@@ -55,7 +55,7 @@ const logout = defineLeaf({
55
55
  const whoami = defineLeaf({
56
56
  flags: { ...urlFlag },
57
57
  async run(ctx, { flags }) {
58
- const { runWhoami } = await import("./login-BdWIAsFT.js");
58
+ const { runWhoami } = await import("./login-CuUf-syI.js");
59
59
  return runWhoami({
60
60
  url: given(flags.url),
61
61
  json: ctx.json,
@@ -3,7 +3,7 @@ import { i as postForm, r as parseToken, s as runDeviceFlow } from "./device-f3J
3
3
  import { i as writeCredentials, n as deleteCredentials, r as readCredentials, t as credentialsPath } from "./storage-BhGDhsXm.js";
4
4
  import { n as CliError } from "./errors-DgLOqc6j.js";
5
5
  import { n as httpRequest } from "./http-BbX_Ou3_.js";
6
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
6
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
7
7
  import { c as READ_SCOPES, d as issuerMetadata, i as credentialsInsideRepository, l as cloudUrl, n as cliRuntime, r as credentialStorage, s as CLI_CLIENT_ID, t as CREDENTIAL_SERVICE } from "./auth-WHKYWtnS.js";
8
8
  import { n as randomToken, t as pkce } from "./pkce-DdsRBK7n.js";
9
9
  import { spawn } from "node:child_process";
@@ -30,20 +30,20 @@ const SECTIONS = [
30
30
  docs: "init",
31
31
  effects: ["files"],
32
32
  config: false,
33
- load: async () => (await import("./init-CjlVWrBE.js")).init
33
+ load: async () => (await import("./init-DvsMFuau.js")).init
34
34
  }),
35
35
  group("preset", "Decode a preset code, or print its permdock.com/create link", "preset", [leaf("decode", "Print what a preset code holds", {
36
36
  examples: ["permdock preset decode p1AQIDBAc"],
37
37
  docs: "preset",
38
38
  effects: [],
39
39
  config: false,
40
- load: async () => (await import("./init-CjlVWrBE.js")).presetDecode
40
+ load: async () => (await import("./init-DvsMFuau.js")).presetDecode
41
41
  }), leaf("url", "Print the permdock.com/create link that opens a code", {
42
42
  examples: ["permdock preset url p1AQIDBAc"],
43
43
  docs: "preset",
44
44
  effects: [],
45
45
  config: false,
46
- load: async () => (await import("./init-CjlVWrBE.js")).presetUrl
46
+ load: async () => (await import("./init-DvsMFuau.js")).presetUrl
47
47
  })]),
48
48
  group("skills", "Install, update or list the PermDock Agent Skills", "skills", [
49
49
  leaf("install", "Copy the Agent Skills into the agent folders", {
@@ -55,21 +55,21 @@ const SECTIONS = [
55
55
  docs: "skills",
56
56
  effects: ["files"],
57
57
  config: false,
58
- load: async () => (await import("./skills-CQ3B9vuz.js")).install
58
+ load: async () => (await import("./skills-DrY6VdtH.js")).install
59
59
  }),
60
60
  leaf("update", "Replace installed skills with this version's", {
61
61
  examples: ["permdock skills update"],
62
62
  docs: "skills",
63
63
  effects: ["files"],
64
64
  config: false,
65
- load: async () => (await import("./skills-CQ3B9vuz.js")).update
65
+ load: async () => (await import("./skills-DrY6VdtH.js")).update
66
66
  }),
67
67
  leaf("list", "List the skills and where each is installed", {
68
68
  examples: ["permdock skills list"],
69
69
  docs: "skills",
70
70
  effects: [],
71
71
  config: false,
72
- load: async () => (await import("./skills-CQ3B9vuz.js")).list
72
+ load: async () => (await import("./skills-DrY6VdtH.js")).list
73
73
  })
74
74
  ]),
75
75
  leaf("doctor", "Check a PermDock installation and print a fix for each finding", {
@@ -83,7 +83,7 @@ const SECTIONS = [
83
83
  effects: ["files", "database:read"],
84
84
  config: true,
85
85
  findings: true,
86
- load: async () => (await import("./doctor-CjCJ_U2a.js")).doctor
86
+ load: async () => (await import("./doctor-CQoP1264.js")).doctor
87
87
  }),
88
88
  leaf("completion", "Print the shell completion script for bash, zsh or fish", {
89
89
  examples: ["permdock completion zsh > ~/.zfunc/_permdock", "eval \"$(permdock completion bash)\""],
@@ -91,7 +91,7 @@ const SECTIONS = [
91
91
  effects: [],
92
92
  config: false,
93
93
  shellOutput: true,
94
- load: async () => (await import("./completion-CHOgUToS.js")).completion
94
+ load: async () => (await import("./completion-CVTgFKK6.js")).completion
95
95
  })
96
96
  ]
97
97
  },
@@ -125,7 +125,7 @@ const SECTIONS = [
125
125
  docs: "generate",
126
126
  effects: ["files"],
127
127
  config: true,
128
- load: async () => (await import("./generate-p7cdH1ac.js")).generate
128
+ load: async () => (await import("./generate-BVcwnfoI.js")).generate
129
129
  }),
130
130
  leaf("usage", "Report unused, ungranted and role-less permissions and conditions on undeclared fields", {
131
131
  examples: ["permdock usage", "permdock usage --fail-on warning"],
@@ -133,7 +133,7 @@ const SECTIONS = [
133
133
  effects: [],
134
134
  config: true,
135
135
  findings: true,
136
- load: async () => (await import("./usage-Dodo7Sjb.js")).usage
136
+ load: async () => (await import("./usage-B-xheuEq.js")).usage
137
137
  }),
138
138
  leaf("diff", "Compare two policies or catalogs; exit 1 on a breaking change", {
139
139
  examples: ["permdock diff main.catalog.json permissions.catalog.json", "permdock diff ./old-policy.ts ./src/policy.ts --impact"],
@@ -180,7 +180,7 @@ const SECTIONS = [
180
180
  effects: [],
181
181
  config: true,
182
182
  findings: true,
183
- load: async () => (await import("./config-StFKj2S0.js")).config
183
+ load: async () => (await import("./config-ClUStKUe.js")).config
184
184
  })
185
185
  ]
186
186
  },
@@ -193,7 +193,7 @@ const SECTIONS = [
193
193
  docs: "rls",
194
194
  effects: ["files", "database:read"],
195
195
  config: true,
196
- load: async () => (await import("./rls-BC1IFnfu.js")).importPolicies
196
+ load: async () => (await import("./rls-oLdqutBO.js")).importPolicies
197
197
  }),
198
198
  leaf("verify", "Run the fixtures against the policies, or compare a live database", {
199
199
  examples: [
@@ -205,21 +205,21 @@ const SECTIONS = [
205
205
  effects: ["files", "database:read"],
206
206
  config: true,
207
207
  findings: true,
208
- load: async () => (await import("./rls-BC1IFnfu.js")).verify
208
+ load: async () => (await import("./rls-oLdqutBO.js")).verify
209
209
  }),
210
210
  leaf("migrate", "Rewrite hand-written policies onto the generated helpers", {
211
211
  examples: ["permdock rls migrate --sql supabase/migrations --dry-run", "permdock rls migrate --sql supabase/migrations"],
212
212
  docs: "rls",
213
213
  effects: ["rewrite", "files"],
214
214
  config: true,
215
- load: async () => (await import("./rls-BC1IFnfu.js")).migrate
215
+ load: async () => (await import("./rls-oLdqutBO.js")).migrate
216
216
  }),
217
217
  leaf("explain", "Show the tables, membership sources and triggers the SQL binds to", {
218
218
  examples: ["permdock rls explain", "permdock rls explain --db-url-stdin --json"],
219
219
  docs: "rls",
220
220
  effects: ["database:read"],
221
221
  config: true,
222
- load: async () => (await import("./rls-BC1IFnfu.js")).explain
222
+ load: async () => (await import("./rls-oLdqutBO.js")).explain
223
223
  })
224
224
  ]),
225
225
  group("supabase", "Generate the Supabase Custom Access Token Hook, or inspect its manifest", "supabase", [leaf("inspect", "Print or write the hook and helper manifest", {
@@ -234,7 +234,7 @@ const SECTIONS = [
234
234
  docs: "powersync",
235
235
  effects: ["database:read"],
236
236
  config: true,
237
- load: async () => (await import("./powersync-BdqLK59r.js")).verify
237
+ load: async () => (await import("./powersync-D1Aog89p.js")).verify
238
238
  })])
239
239
  ]
240
240
  },
@@ -247,13 +247,13 @@ const SECTIONS = [
247
247
  effects: ["files"],
248
248
  config: true,
249
249
  findings: true,
250
- load: async () => (await import("./openapi-E2411VYb.js")).annotateRoutes
250
+ load: async () => (await import("./openapi-DNZv-nDu.js")).annotateRoutes
251
251
  }), leaf("import", "Turn an OpenAPI document into a generated definition", {
252
252
  examples: ["permdock openapi import --doc openapi.yaml --out src/permissions.generated.ts"],
253
253
  docs: "openapi",
254
254
  effects: ["files", "network"],
255
255
  config: false,
256
- load: async () => (await import("./openapi-E2411VYb.js")).importDocument
256
+ load: async () => (await import("./openapi-DNZv-nDu.js")).importDocument
257
257
  })]),
258
258
  group("arazzo", "Check Arazzo workflows against the permissions", "arazzo", [leaf("check", "Resolve every Arazzo step to x-permdock-permissions", {
259
259
  examples: ["permdock arazzo check --doc arazzo.json --openapi openapi.json"],
@@ -261,7 +261,7 @@ const SECTIONS = [
261
261
  effects: [],
262
262
  config: true,
263
263
  findings: true,
264
- load: async () => (await import("./arazzo-D9Fv_ZEV.js")).check
264
+ load: async () => (await import("./arazzo-yiKJ4jm0.js")).check
265
265
  })]),
266
266
  leaf("scan", "List authorization checks written without PermDock, to adopt it in an existing app", {
267
267
  examples: ["permdock scan", "permdock scan --src app,lib --pattern isBeta"],
@@ -269,7 +269,7 @@ const SECTIONS = [
269
269
  effects: [],
270
270
  config: true,
271
271
  findings: true,
272
- load: async () => (await import("./scan-C_YtxPxn.js")).scan
272
+ load: async () => (await import("./scan-CNhvy39j.js")).scan
273
273
  }),
274
274
  group("casl", "Import CASL rules into a generated module", "casl", [leaf("import", "Turn CASL rules per role into a permissions and policy module", {
275
275
  examples: ["permdock casl import --rules rules.json --out src/permissions.generated.ts"],
@@ -283,7 +283,7 @@ const SECTIONS = [
283
283
  docs: "casbin",
284
284
  effects: ["files"],
285
285
  config: false,
286
- load: async () => (await import("./casbin-D3PH6-AJ.js")).casbinImport
286
+ load: async () => (await import("./casbin-j_468wDU.js")).casbinImport
287
287
  })])
288
288
  ]
289
289
  },
@@ -295,34 +295,34 @@ const SECTIONS = [
295
295
  docs: "login",
296
296
  effects: ["network", "files"],
297
297
  config: false,
298
- load: async () => (await import("./login-BhSLL8Pn.js")).login
298
+ load: async () => (await import("./login-BFvEcFnI.js")).login
299
299
  }),
300
300
  leaf("logout", "Revoke and delete the stored PermDock Cloud login", {
301
301
  examples: ["permdock logout"],
302
302
  docs: "login",
303
303
  effects: ["network", "files"],
304
304
  config: false,
305
- load: async () => (await import("./login-BhSLL8Pn.js")).logout
305
+ load: async () => (await import("./login-BFvEcFnI.js")).logout
306
306
  }),
307
307
  leaf("whoami", "Print the PermDock Cloud identity the CLI acts as", {
308
308
  examples: ["permdock whoami", "permdock whoami --json"],
309
309
  docs: "login",
310
310
  effects: [],
311
311
  config: false,
312
- load: async () => (await import("./login-BhSLL8Pn.js")).whoami
312
+ load: async () => (await import("./login-BFvEcFnI.js")).whoami
313
313
  }),
314
314
  group("cloud", "Publish to or pull from a PermDock Cloud project", "cloud", [leaf("push", "Publish the catalog, policy and manifest to a Cloud project", {
315
315
  examples: ["permdock cloud push --dry-run", "permdock cloud push --project prj_123"],
316
316
  docs: "cloud",
317
317
  effects: ["network", "cloud:write"],
318
318
  config: true,
319
- load: async () => (await import("./cloud-DnTSKTYr.js")).push
319
+ load: async () => (await import("./cloud-D3c4zhYr.js")).push
320
320
  }), leaf("pull", "Write a Cloud project's published catalog and manifest", {
321
321
  examples: ["permdock cloud pull --project prj_123"],
322
322
  docs: "cloud",
323
323
  effects: ["network", "files"],
324
324
  config: true,
325
- load: async () => (await import("./cloud-DnTSKTYr.js")).pull
325
+ load: async () => (await import("./cloud-D3c4zhYr.js")).pull
326
326
  })])
327
327
  ]
328
328
  },
@@ -333,7 +333,7 @@ const SECTIONS = [
333
333
  docs: "codemod",
334
334
  effects: ["rewrite"],
335
335
  config: false,
336
- load: async () => (await import("./codemod-DwJ1I9er.js")).codemod
336
+ load: async () => (await import("./codemod-Ob71iPQh.js")).codemod
337
337
  })]
338
338
  }
339
339
  ];
@@ -345,7 +345,7 @@ const COMPLETE_LEAF = leaf("__complete", "Print completion candidates for a part
345
345
  config: false,
346
346
  shellOutput: true,
347
347
  hidden: true,
348
- load: async () => (await import("./completion-CHOgUToS.js")).complete
348
+ load: async () => (await import("./completion-CVTgFKK6.js")).complete
349
349
  });
350
350
  const ROOT = group("permdock", "Collect, export, diff and check the permissions a PermDock policy declares", "", [...SECTIONS.flatMap((section) => section.entries), COMPLETE_LEAF]);
351
351
  /** Each leaf with its path from the root, in manifest order. */
@@ -7,7 +7,7 @@ import { i as fileDrift } from "./output-files-D5D-8-4l.js";
7
7
  import { t as shortDiff } from "./text-diff-DxKRNFlx.js";
8
8
  import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
9
9
  import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-CZnlAyZ8.js";
10
- import { n as validateOverlay, t as validateOpenapi } from "./schema-BVhiZyY-.js";
10
+ import { n as validateOverlay, t as validateOpenapi } from "./schema-CwNjlLBx.js";
11
11
  import { existsSync } from "node:fs";
12
12
  import { resolve } from "node:path";
13
13
  // src/cli/openapi/emit/merge.ts
@@ -81,7 +81,7 @@ const importDocument = defineLeaf({
81
81
  async run(ctx, { flags }) {
82
82
  const doc = given(flags.doc);
83
83
  if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
84
- return (await import("./import-B0nUIp2b.js")).runOpenapiImport({
84
+ return (await import("./import-HzsIBAa5.js")).runOpenapiImport({
85
85
  cwd: ctx.cwd,
86
86
  doc,
87
87
  out: fileOut("openapi import", flags.out),
@@ -3,7 +3,7 @@ import { n as CliError } from "./errors-DgLOqc6j.js";
3
3
  /** The annotated document, without writing it. */
4
4
  async function openapiDocument(task, options, source) {
5
5
  if (options.doc === void 0) return [];
6
- const { runOpenapi } = await import("./openapi-D595qUYF.js");
6
+ const { runOpenapi } = await import("./openapi-BwZABlQO.js");
7
7
  const outcome = await runOpenapi({
8
8
  cwd: source.cwd,
9
9
  config: source.config,
@@ -1,5 +1,5 @@
1
1
  import { c as isActionRequired, l as isRetryable, n as CliError, t as CLI_ERRORS_URL } from "./errors-DgLOqc6j.js";
2
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
2
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
3
3
  import { s as cliVersion } from "./version-D-jWyJb9.js";
4
4
  import { createHash } from "node:crypto";
5
5
  // src/cli/core/consent.ts
@@ -8,7 +8,7 @@ import { i as fileDrift } from "./output-files-D5D-8-4l.js";
8
8
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-Bm0G0A7H.js";
9
9
  import { n as pgConnector } from "./pg-CA651850.js";
10
10
  import { c as requirePolicy } from "./load-CZnlAyZ8.js";
11
- import { t as canFixture } from "./verify-DTlATzWK.js";
11
+ import { t as canFixture } from "./verify-BgZapMKs.js";
12
12
  import { a as roleNames, i as collectGrants, t as assignableRoles } from "./grants-Dn6zwfqo.js";
13
13
  import { a as quoteIdent, s as quoteQualified } from "./quote-BKrTBbcH.js";
14
14
  import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
@@ -24,7 +24,7 @@ const verify = defineLeaf({
24
24
  const db = await dbUrl(ctx, flags, { required: true });
25
25
  const fixtures = given(flags.fixtures);
26
26
  const from = given(flags.policy);
27
- const { runPowerSync } = await import("./powersync-CMu40wtz.js");
27
+ const { runPowerSync } = await import("./powersync-f-6y8sCk.js");
28
28
  return runPowerSync({
29
29
  cwd: ctx.cwd,
30
30
  config: ctx.config,
@@ -1 +1 @@
1
- export { r as powersyncFiles, t as runPowerSync } from "./powersync-Da9op2Zo.js";
1
+ export { r as powersyncFiles, t as runPowerSync } from "./powersync-CkoImqoq.js";
@@ -0,0 +1 @@
1
+ export { n as runCloudPull } from "./pull-DD6YQ42X.js";
@@ -4,7 +4,7 @@ import { n as parseSupabaseManifest } from "./manifest-Ct3eXbLR.js";
4
4
  import { o as formatCatalogJson } from "./catalog-doc-Bp5khmCG.js";
5
5
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
6
6
  import { a as describeError } from "./errors-DgLOqc6j.js";
7
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
7
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
8
8
  import { s as cliVersion } from "./version-D-jWyJb9.js";
9
9
  import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
10
10
  import { n as formatManifestJson } from "./manifest-json-DMaBWmcG.js";
@@ -3,12 +3,12 @@ import { a as describeError, f as usageResult, o as exitCodeOfError } from "./er
3
3
  import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-D77JpXe-.js";
4
4
  import { n as pgConnector, t as connectPgPool } from "./pg-CA651850.js";
5
5
  import { f as isSupabaseSchemas, m as schemasRefusal } from "./hook-sql-55514A9t.js";
6
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
7
- import { n as describeExplain, t as runRlsGenerate } from "./generate-DNAoLMj1.js";
6
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
7
+ import { n as describeExplain, t as runRlsGenerate } from "./generate-BtstB6iV.js";
8
8
  import { a as COLUMNS_SQL, o as INDEX_COLUMNS_SQL, u as readTableIndexFacts } from "./compile-B9SZiEnG.js";
9
9
  import { r as escapeSqlIdent } from "./sql-T4GaBh9X.js";
10
10
  import { t as beforeFirst } from "./text-D704xHVl.js";
11
- import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-DTlATzWK.js";
11
+ import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-BgZapMKs.js";
12
12
  import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-CViS0EPC.js";
13
13
  import { r as parseRbacAuthorize } from "./rbac-BJTUGJum.js";
14
14
  import { delimiter, join } from "node:path";
@@ -3,7 +3,7 @@ import { i as dateAt } from "./time-r0CKBm57.js";
3
3
  import { n as CliError } from "./errors-DgLOqc6j.js";
4
4
  import { m as seedsMigration, p as seedDeltaNote } from "./output-files-D5D-8-4l.js";
5
5
  import { a as fixturesPresent, i as defaultsSeedSql, o as fixturesSeedSql, r as FIXTURES_PATH, t as DEFAULTS_MARKER } from "./seed-sql-CjF7u0aX.js";
6
- import { t as runRlsGenerate } from "./generate-DNAoLMj1.js";
6
+ import { t as runRlsGenerate } from "./generate-BtstB6iV.js";
7
7
  import { a as quietIo, r as noted } from "./plugin-MQVfUBUS.js";
8
8
  // src/cli/generate/plugins/rls-options.ts
9
9
  function seedMode(seeds) {
@@ -192,7 +192,7 @@ async function rlsInput(ctx, verb, shape, options) {
192
192
  };
193
193
  }
194
194
  async function runRls(input) {
195
- return (await import("./rls-DfzVlo1q.js")).runRls(input);
195
+ return (await import("./rls-c0Z9lbyp.js")).runRls(input);
196
196
  }
197
197
  ({
198
198
  ...shapeFlags,
@@ -0,0 +1 @@
1
+ export { t as run } from "./run-DkviX16y.js";
@@ -3,9 +3,9 @@ import { a as resolveCwd, i as readConfig, o as withPluginOutputs } from "./conf
3
3
  import { t as beforeFirst } from "./text-D704xHVl.js";
4
4
  import { a as describeError, n as CliError, r as cliFailure, s as failureOf, u as kindOfCode } from "./errors-DgLOqc6j.js";
5
5
  import { a as suggestion, i as parseLeaf, o as GLOBAL_FLAGS, r as parseFlags } from "./args-Bc0HLiD4.js";
6
- import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-BhNN-hvv.js";
6
+ import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-BI85V6hu.js";
7
7
  import { r as progressReporter, t as redact } from "./credentials-6ZWbJ-Re.js";
8
- import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-CXK3krNu.js";
8
+ import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
9
9
  import { t as createStyle } from "./style-CQDaLJtP.js";
10
10
  import { s as cliVersion } from "./version-D-jWyJb9.js";
11
11
  import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
@@ -16,7 +16,7 @@ const scan = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- const { runAdoptionScan } = await import("./adoption-scan-obbSy73c.js");
19
+ const { runAdoptionScan } = await import("./adoption-scan-EGg-hGEu.js");
20
20
  return runAdoptionScan({
21
21
  cwd: ctx.cwd,
22
22
  srcPath: flags.src.length > 0 ? flags.src : ctx.config.collect?.srcPath ?? ["src"],
@@ -1,7 +1,7 @@
1
1
  import { t as require__2020 } from "./2020-DBXhfpuK.js";
2
2
  import { r as isRecord } from "./compact-C4LFuqbW.js";
3
3
  import { t as DRAFT_PINS } from "./pins-CXXkVEiD.js";
4
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
4
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
5
5
  import { l as packageRoot } from "./version-D-jWyJb9.js";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { t as byCodePoint } from "./compare-dfHDj8kT.js";
2
2
  import { t as didYouMean } from "./args-Bc0HLiD4.js";
3
- import { a as nonEmptyOr } from "./output-BhNN-hvv.js";
3
+ import { a as nonEmptyOr } from "./output-BI85V6hu.js";
4
4
  import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
5
5
  import { l as packageRoot } from "./version-D-jWyJb9.js";
6
6
  import { cpSync, existsSync, lstatSync, readFileSync, readdirSync, readlinkSync, realpathSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
2
2
  import { t as checkFlag } from "./flags-C0e-BzGW.js";
3
3
  import { r as pick, t as CANCELLED } from "./prompt-CPlJn_4-.js";
4
- import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-DBvXLSo7.js";
4
+ import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-B74k44ml.js";
5
5
  // src/cli/commands/skills.ts
6
6
  const forFlag = { for: {
7
7
  type: "string",
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-Cayjfw1S.js")).runUsage({
19
+ return (await import("./usage-BRjoZ-vo.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-DEUKhZ1n.js";
@@ -2,8 +2,8 @@ import { a as getResource } from "./permission-registry-DMYRZVcn.js";
2
2
  import { c as jsonSchemaOf } from "./catalog-doc-Bp5khmCG.js";
3
3
  import { r as runCollect } from "./collect-BOh9Pxob.js";
4
4
  import { f as usageResult } from "./errors-DgLOqc6j.js";
5
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
6
- import { r as findingOf } from "./output-BhNN-hvv.js";
5
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
6
+ import { r as findingOf } from "./output-BI85V6hu.js";
7
7
  import { o as USAGE_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
8
8
  import { n as jiti, r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
9
9
  import { a as rel, r as listSourceFiles } from "./files-DAR51W3J.js";
@@ -16,7 +16,7 @@ import { T as columnTypesOf, a as customRolesOn, r as HELPERS } from "./shared-C
16
16
  import { a as quoteIdent, c as quoteTable, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
17
17
  import { Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-BDqfipr1.js";
18
18
  import { s as viewName, t as FIELD_VIEWS } from "./fields-CViS0EPC.js";
19
- import { t as DOCS_BASE } from "./manifest-CXK3krNu.js";
19
+ import { t as DOCS_BASE } from "./manifest-BYzJF6xk.js";
20
20
  import { b as membershipsClaim, m as customRoleScope } from "./evaluate-D8SdfP3h.js";
21
21
  import { n as defaultSqlCommand, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
22
22
  import "./budget-BH81q2cj.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permdock",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -379,45 +379,45 @@
379
379
  "@clack/prompts": "1.8.1",
380
380
  "@modelcontextprotocol/client": "2.4.0",
381
381
  "@modelcontextprotocol/server": "2.4.0",
382
- "@nestjs/common": "12.3.2",
383
- "@nestjs/core": "12.3.2",
384
- "@nestjs/platform-express": "12.3.2",
382
+ "@nestjs/common": "12.6.0",
383
+ "@nestjs/core": "12.6.0",
384
+ "@nestjs/platform-express": "12.6.0",
385
385
  "@openai/agents": "0.21.0",
386
- "@orpc/contract": "2.0.0-beta.48",
387
- "@orpc/openapi": "2.0.0-beta.48",
388
- "@orpc/server": "2.0.0-beta.48",
386
+ "@orpc/contract": "2.0.0-beta.52",
387
+ "@orpc/openapi": "2.0.0-beta.52",
388
+ "@orpc/server": "2.0.0-beta.52",
389
389
  "@permdock/typescript-config": "0.0.0",
390
- "@solidjs/start": "2.1.0",
390
+ "@solidjs/start": "2.2.3",
391
391
  "@supabase/middleware": "1.0.0",
392
- "@supabase/supabase-js": "2.118.0",
393
- "@sveltejs/kit": "3.1.1",
392
+ "@supabase/supabase-js": "2.119.2",
393
+ "@sveltejs/kit": "3.4.0",
394
394
  "@sveltejs/vite-plugin-svelte": "7.3.1",
395
- "@tanstack/react-start": "1.169.4",
395
+ "@tanstack/react-start": "1.169.7",
396
396
  "@trpc/server": "11.19.0",
397
397
  "@types/express": "5.0.6",
398
398
  "@types/node": "26.6.6",
399
399
  "@types/pg": "8.23.1",
400
400
  "@types/react": "19.3.0",
401
401
  "@types/react-dom": "19.3.0",
402
- "@vercel/detect-agent": "1.2.5",
402
+ "@vercel/detect-agent": "1.2.7",
403
403
  "@vitest/coverage-v8": "5.1.0",
404
- "ai": "7.0.159",
404
+ "ai": "7.0.179",
405
405
  "ajv": "8.20.0",
406
- "astro": "7.4.4",
406
+ "astro": "7.4.13",
407
407
  "babel-plugin-react-compiler": "1.0.0",
408
- "better-supabase": "0.63.2",
409
- "better-supabase-floor": "npm:better-supabase@0.63.2",
410
- "chat": "4.43.0",
408
+ "better-supabase": "0.81.0",
409
+ "better-supabase-floor": "npm:better-supabase@0.81.0",
410
+ "chat": "4.45.0",
411
411
  "diff": "9.0.0",
412
412
  "drizzle-orm": "1.0.0-rc.5",
413
- "elysia": "1.4.30",
414
- "eve": "0.91.0",
413
+ "elysia": "1.4.32",
414
+ "eve": "1.3.0",
415
415
  "express": "5.3.0",
416
416
  "fastest-levenshtein": "1.0.16",
417
- "fastify": "5.12.7",
417
+ "fastify": "5.12.8",
418
418
  "h3": "2.0.8",
419
419
  "happy-dom": "21.0.4",
420
- "hono": "4.13.16",
420
+ "hono": "4.13.19",
421
421
  "jiti": "2.7.0",
422
422
  "jose": "6.2.14",
423
423
  "kysely": "0.29.8",
@@ -435,15 +435,15 @@
435
435
  "resend": "6.37.0",
436
436
  "rxjs": "7.8.2",
437
437
  "smol-toml": "1.9.1",
438
- "solid-js": "1.9.18",
438
+ "solid-js": "1.9.19",
439
439
  "svelte": "5.57.3",
440
- "temporal-polyfill": "1.0.6",
440
+ "temporal-polyfill": "1.0.8",
441
441
  "tsdown": "0.23.7",
442
442
  "typescript": "7.0.2",
443
443
  "unplugin": "3.7.0",
444
444
  "valibot": "1.5.0",
445
445
  "vitest": "5.1.0",
446
- "vue": "3.5.44",
446
+ "vue": "3.5.46",
447
447
  "workflow": "5.4.0",
448
448
  "yaml": "2.9.1",
449
449
  "zod": "4.6.7"
@@ -463,13 +463,13 @@
463
463
  "@sveltejs/kit": ">=2",
464
464
  "@tanstack/react-start": ">=1.168",
465
465
  "@trpc/server": ">=11",
466
- "ai": ">=5",
466
+ "ai": ">=7.0.177",
467
467
  "astro": ">=5",
468
- "better-supabase": ">=0.63.2",
469
- "chat": ">=4",
468
+ "better-supabase": ">=0.81.0",
469
+ "chat": ">=4.45.0",
470
470
  "drizzle-orm": ">=0.40 || >=1.0.0-rc.0",
471
471
  "elysia": ">=1",
472
- "eve": ">=0.40",
472
+ "eve": ">=1.2.0",
473
473
  "express": ">=4",
474
474
  "fastify": ">=5",
475
475
  "h3": ">=2",
@@ -70,7 +70,7 @@ export const { approval, approvalFor, getPermDock } = createPermDock(policy, {
70
70
  });
71
71
  ```
72
72
 
73
- Pass `approval` as the tool's `approval`. Default subject and actor read `session.auth.initiator` / `current`. `approval.request(ctx)` maps granted to Eve's `not-applicable` (continue), approval-required to `user-approval`, denied to `{ type: 'denied', reason }`; Eve's re-check of a call nobody approved is denied. `approval.response(ctx)` maps the responder through the same `subject`. Use a durable `store` when replicas share sessions ([Eve adapter](https://permdock.com/docs/adapters/eve)). With PermDock Cloud, pass `policies: hostedPolicies(cloud().policies)` and give `cloud()` a `verifier` for the environment JWK Set; hosted grants apply only to `hostable` permissions, so mark the ones the dashboard may extend.
73
+ Needs eve 1.2.0 or later. Pass `approval` as the tool's `approval`. Default subject and actor read `session.auth.initiator` / `current`. `approval.request(ctx)` maps granted to Eve's `not-applicable` (continue), approval-required to `user-approval`, denied to `{ type: 'denied', reason }`; Eve's re-check of a call nobody approved is denied. `approval.response(ctx)` takes eve's `approve` or `deny` decision and maps the responder through the same `subject`. Use a durable `store` when replicas share sessions ([Eve adapter](https://permdock.com/docs/adapters/eve)). With PermDock Cloud, pass `policies: hostedPolicies(cloud().policies)` and give `cloud()` a `verifier` for the environment JWK Set; hosted grants apply only to `hostable` permissions, so mark the ones the dashboard may extend.
74
74
 
75
75
  ## OpenAI Agents SDK — `permdock/openai`
76
76
 
@@ -1 +0,0 @@
1
- export { t as renderKinds } from "./gen-BVDN_Hqx.js";
@@ -1 +0,0 @@
1
- export { n as runCloudPull } from "./pull-AXzbc_kg.js";
@@ -1 +0,0 @@
1
- export { t as run } from "./run-CqAur1Y3.js";
@@ -1 +0,0 @@
1
- export { t as runUsage } from "./usage-CnCNB6XN.js";