@lightdash-tools/common 0.7.0 → 0.8.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 (63) hide show
  1. package/dist/argument-validation.js +20 -2
  2. package/dist/argument-validation.test.js +22 -0
  3. package/dist/audit.d.ts +1 -1
  4. package/dist/index.d.ts +1 -3
  5. package/dist/index.js +6 -8
  6. package/dist/operations/agent-safe.d.ts +1 -3
  7. package/dist/operations/agent-safe.js +2 -9
  8. package/dist/operations/ai-agents.js +45 -29
  9. package/dist/operations/cli-content.d.ts +5 -0
  10. package/dist/operations/cli-content.js +71 -0
  11. package/dist/operations/client-coverage.d.ts +113 -0
  12. package/dist/operations/client-coverage.js +130 -0
  13. package/dist/operations/client-coverage.test.d.ts +1 -0
  14. package/dist/operations/client-coverage.test.js +22 -0
  15. package/dist/operations/content-developer.d.ts +2 -0
  16. package/dist/operations/content-developer.js +457 -0
  17. package/dist/operations/content-governance.d.ts +7 -0
  18. package/dist/operations/content-governance.js +98 -0
  19. package/dist/operations/content-reader.d.ts +2 -0
  20. package/dist/operations/content-reader.js +183 -0
  21. package/dist/operations/index.d.ts +10 -3
  22. package/dist/operations/index.js +20 -2
  23. package/dist/operations/organization-audit.d.ts +2 -0
  24. package/dist/operations/organization-audit.js +273 -0
  25. package/dist/operations/parity.test.js +12 -11
  26. package/dist/operations/registry.d.ts +9 -1
  27. package/dist/operations/registry.js +77 -2
  28. package/dist/operations/registry.test.js +38 -11
  29. package/dist/operations/semantic-layer.d.ts +6 -0
  30. package/dist/operations/semantic-layer.js +154 -0
  31. package/dist/operations/types.d.ts +29 -12
  32. package/dist/operations/types.js +63 -29
  33. package/dist/operations/types.test.js +33 -45
  34. package/dist/operations/users.d.ts +2 -2
  35. package/dist/operations/users.js +8 -10
  36. package/dist/safety.d.ts +5 -0
  37. package/dist/safety.js +11 -1
  38. package/dist/types/index.d.ts +12 -0
  39. package/dist/types/index.js +29 -0
  40. package/package.json +2 -1
  41. package/src/argument-validation.test.ts +31 -0
  42. package/src/argument-validation.ts +20 -2
  43. package/src/audit.ts +12 -1
  44. package/src/index.ts +5 -9
  45. package/src/operations/agent-safe.ts +2 -12
  46. package/src/operations/ai-agents.ts +46 -30
  47. package/src/operations/cli-content.ts +79 -0
  48. package/src/operations/client-coverage.test.ts +23 -0
  49. package/src/operations/client-coverage.ts +147 -0
  50. package/src/operations/content-developer.ts +485 -0
  51. package/src/operations/content-governance.ts +110 -0
  52. package/src/operations/content-reader.ts +197 -0
  53. package/src/operations/index.ts +25 -2
  54. package/src/operations/organization-audit.ts +293 -0
  55. package/src/operations/parity.test.ts +12 -14
  56. package/src/operations/registry.test.ts +40 -9
  57. package/src/operations/registry.ts +86 -2
  58. package/src/operations/semantic-layer.ts +166 -0
  59. package/src/operations/types.test.ts +38 -76
  60. package/src/operations/types.ts +110 -47
  61. package/src/operations/users.ts +9 -11
  62. package/src/safety.ts +11 -0
  63. package/src/types/index.ts +13 -0
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Organization member operations in the shared operation registry.
2
+ * Organization member operations in the shared operation catalog.
3
3
  */
4
4
 
5
- import { READ_ONLY_DEFAULT, WRITE_DESTRUCTIVE } from '../safety';
5
+ import { READ_ONLY_DEFAULT } from '../safety';
6
6
 
7
7
  import { defineOperation } from './types';
8
8
 
@@ -21,10 +21,11 @@ const membersList = defineOperation({
21
21
  summary: 'List organization members (one page)',
22
22
  http: { method: 'GET', path: MEMBERS_PATH },
23
23
  authorization: { safetyImpact: 'read' },
24
+ sensitivity: 'pii.email',
24
25
  mcp: {
25
26
  toolName: 'list_organization_members',
26
27
  annotations: READ_ONLY_DEFAULT,
27
- taskSupport: { exposed: true, taskEligible: false },
28
+ taskSupport: { exposed: false, taskEligible: false },
28
29
  },
29
30
  cli: { commandPath: 'users list' },
30
31
  profiles: [PROFILE_DISCOVERY],
@@ -35,10 +36,11 @@ const membersGet = defineOperation({
35
36
  summary: 'Get an organization member by UUID',
36
37
  http: { method: 'GET', path: MEMBER_PATH },
37
38
  authorization: { safetyImpact: 'read' },
39
+ sensitivity: 'pii.email',
38
40
  mcp: {
39
41
  toolName: 'get_member',
40
42
  annotations: READ_ONLY_DEFAULT,
41
- taskSupport: { exposed: true, taskEligible: false },
43
+ taskSupport: { exposed: false, taskEligible: false },
42
44
  },
43
45
  cli: { commandPath: 'users get' },
44
46
  profiles: [PROFILE_DISCOVERY],
@@ -49,17 +51,13 @@ const membersDelete = defineOperation({
49
51
  summary: 'Permanently remove a user from the organization (irrecoverable; client-only)',
50
52
  http: { method: 'DELETE', path: DELETE_MEMBER_PATH },
51
53
  authorization: { safetyImpact: 'write-destructive' },
52
- mcp: {
53
- toolName: 'delete_member',
54
- annotations: WRITE_DESTRUCTIVE,
55
- taskSupport: { exposed: false, taskEligible: false },
56
- },
57
- cli: { commandPath: '' },
54
+ sensitivity: 'none',
58
55
  agentExposure: 'client-only',
56
+ bannedMcpToolName: 'delete_member',
59
57
  profiles: [PROFILE_CORE_LIFECYCLE],
60
58
  });
61
59
 
62
- /** Organization member operations registered in the shared operation registry. */
60
+ /** Organization member operations registered in the shared operation catalog. */
63
61
  export const USER_OPERATIONS: readonly OperationDescriptor[] = [
64
62
  membersList,
65
63
  membersGet,
package/src/safety.ts CHANGED
@@ -48,6 +48,17 @@ export const READ_ONLY_DEFAULT: ToolAnnotations = {
48
48
  idempotentHint: true,
49
49
  };
50
50
 
51
+ /**
52
+ * Preset: read-only but non-idempotent (transient warehouse execution).
53
+ * Used by content-reader saved-chart/tile runs (ADR-0012).
54
+ */
55
+ export const READ_ONLY_TRANSIENT: ToolAnnotations = {
56
+ readOnlyHint: true,
57
+ openWorldHint: false,
58
+ destructiveHint: false,
59
+ idempotentHint: false,
60
+ };
61
+
51
62
  /**
52
63
  * Legacy preset: write, non-destructive, idempotent (e.g. upsert by slug).
53
64
  * Prefer {@link WRITE_NONDESTRUCTIVE} for new tools; idempotent behavior is not implied by safety mode.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Curated public type surface for `@lightdash-tools/common` (ADR-0013).
3
+ *
4
+ * Adding a consumer type:
5
+ * 1. Alias from `generated/openapi-types` in `types/v1/` or `types/v2/` domain modules.
6
+ * 2. Export it from this barrel (via `lightdash-api.ts` or a direct re-export).
7
+ *
8
+ * Outside this package, import types only from `@lightdash-tools/common` — not from nested paths.
9
+ */
10
+
11
+ export * from './lightdash-api';
12
+ export { CONTENT_SORT_BY_COLUMNS } from './v2/content';
13
+ export type { components, operations, paths } from './generated/openapi-types';