@inkeep/agents-core 0.42.0 → 0.43.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 (95) hide show
  1. package/dist/auth/auth.d.ts +24 -24
  2. package/dist/auth/auth.js +17 -13
  3. package/dist/auth/authz/client.d.ts +9 -3
  4. package/dist/auth/authz/client.js +24 -17
  5. package/dist/auth/authz/config.d.ts +51 -24
  6. package/dist/auth/authz/config.js +44 -27
  7. package/dist/auth/authz/index.d.ts +3 -3
  8. package/dist/auth/authz/index.js +3 -3
  9. package/dist/auth/authz/permissions.d.ts +0 -4
  10. package/dist/auth/authz/permissions.js +13 -13
  11. package/dist/auth/authz/sync.d.ts +23 -2
  12. package/dist/auth/authz/sync.js +136 -52
  13. package/dist/auth/permissions.d.ts +9 -9
  14. package/dist/client-exports.d.ts +3 -2
  15. package/dist/client-exports.js +3 -2
  16. package/dist/constants/execution-limits-shared/defaults.d.ts +1 -1
  17. package/dist/constants/execution-limits-shared/defaults.js +1 -1
  18. package/dist/constants/execution-limits-shared/index.d.ts +1 -1
  19. package/dist/context/TemplateEngine.d.ts +0 -6
  20. package/dist/context/TemplateEngine.js +4 -18
  21. package/dist/credential-stores/keychain-store.d.ts +20 -8
  22. package/dist/credential-stores/keychain-store.js +107 -43
  23. package/dist/data-access/index.d.ts +3 -3
  24. package/dist/data-access/index.js +3 -3
  25. package/dist/data-access/manage/agentFull.js +28 -24
  26. package/dist/data-access/manage/agents.d.ts +41 -41
  27. package/dist/data-access/manage/agents.js +29 -21
  28. package/dist/data-access/manage/artifactComponents.d.ts +12 -12
  29. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  30. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  31. package/dist/data-access/manage/functionTools.d.ts +42 -19
  32. package/dist/data-access/manage/functionTools.js +34 -22
  33. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  34. package/dist/data-access/manage/subAgentRelations.d.ts +36 -36
  35. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  36. package/dist/data-access/manage/subAgents.d.ts +15 -15
  37. package/dist/data-access/manage/tools.d.ts +40 -34
  38. package/dist/data-access/manage/tools.js +53 -30
  39. package/dist/data-access/manage/triggers.d.ts +27 -1
  40. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  41. package/dist/data-access/runtime/conversations.d.ts +31 -31
  42. package/dist/data-access/runtime/messages.d.ts +9 -9
  43. package/dist/data-access/runtime/organizations.d.ts +2 -2
  44. package/dist/data-access/runtime/organizations.js +2 -2
  45. package/dist/data-access/runtime/tasks.d.ts +7 -7
  46. package/dist/db/manage/manage-schema.d.ts +516 -402
  47. package/dist/db/manage/manage-schema.js +37 -27
  48. package/dist/db/runtime/runtime-schema.d.ts +181 -181
  49. package/dist/db/utils.d.ts +6 -0
  50. package/dist/db/utils.js +42 -0
  51. package/dist/dolt/index.d.ts +2 -2
  52. package/dist/dolt/index.js +2 -2
  53. package/dist/dolt/migrate-all-branches.js +5 -0
  54. package/dist/dolt/migrate-dolt.js +4 -1
  55. package/dist/dolt/schema-sync.d.ts +2 -1
  56. package/dist/dolt/schema-sync.js +10 -1
  57. package/dist/index.d.ts +10 -10
  58. package/dist/index.js +10 -10
  59. package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
  60. package/dist/types/utility.d.ts +1 -1
  61. package/dist/types/utility.js +2 -1
  62. package/dist/utils/JsonTransformer.d.ts +1 -3
  63. package/dist/utils/JsonTransformer.js +14 -23
  64. package/dist/utils/index.d.ts +3 -3
  65. package/dist/utils/index.js +3 -3
  66. package/dist/utils/jmespath-utils.d.ts +152 -0
  67. package/dist/utils/jmespath-utils.js +213 -0
  68. package/dist/utils/mcp-client.d.ts +1 -1
  69. package/dist/utils/mcp-client.js +1 -1
  70. package/dist/utils/signature-validation.d.ts +2 -0
  71. package/dist/utils/signature-validation.js +3 -0
  72. package/dist/utils/third-party-mcp-servers/composio-client.d.ts +13 -1
  73. package/dist/utils/third-party-mcp-servers/composio-client.js +24 -6
  74. package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
  75. package/dist/utils/third-party-mcp-servers/index.js +2 -2
  76. package/dist/utils/trigger-auth.d.ts +31 -8
  77. package/dist/utils/trigger-auth.js +121 -13
  78. package/dist/validation/dolt-schemas.d.ts +1 -1
  79. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  80. package/dist/validation/index.d.ts +3 -3
  81. package/dist/validation/index.js +3 -3
  82. package/dist/validation/render-validation.js +19 -0
  83. package/dist/validation/schemas.d.ts +2502 -2285
  84. package/dist/validation/schemas.js +246 -16
  85. package/dist/validation/stream-event-schemas.d.ts +96 -1
  86. package/dist/validation/stream-event-schemas.js +67 -2
  87. package/drizzle/manage/0003_tiny_captain_universe.sql +8 -0
  88. package/drizzle/manage/0004_curious_phil_sheldon.sql +2 -0
  89. package/drizzle/manage/0005_silent_shatterstar.sql +53 -0
  90. package/drizzle/manage/meta/0003_snapshot.json +3134 -0
  91. package/drizzle/manage/meta/0004_snapshot.json +3141 -0
  92. package/drizzle/manage/meta/0005_snapshot.json +3141 -0
  93. package/drizzle/manage/meta/_journal.json +21 -0
  94. package/package.json +9 -4
  95. package/spicedb/schema.zed +114 -0
@@ -22,6 +22,27 @@
22
22
  "when": 1768957920900,
23
23
  "tag": "0002_bent_sunfire",
24
24
  "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "7",
29
+ "when": 1769000000000,
30
+ "tag": "0003_tiny_captain_universe",
31
+ "breakpoints": true
32
+ },
33
+ {
34
+ "idx": 4,
35
+ "version": "7",
36
+ "when": 1769200490876,
37
+ "tag": "0004_curious_phil_sheldon",
38
+ "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "7",
43
+ "when": 1769554137371,
44
+ "tag": "0005_silent_shatterstar",
45
+ "breakpoints": true
25
46
  }
26
47
  ]
27
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-core",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -66,6 +66,10 @@
66
66
  "types": "./dist/utils/schema-conversion.d.ts",
67
67
  "import": "./dist/utils/schema-conversion.js"
68
68
  },
69
+ "./utils/signature-validation": {
70
+ "types": "./dist/utils/signature-validation.d.ts",
71
+ "import": "./dist/utils/signature-validation.js"
72
+ },
69
73
  "./auth": {
70
74
  "types": "./dist/auth/auth.d.ts",
71
75
  "import": "./dist/auth/auth.js"
@@ -125,7 +129,8 @@
125
129
  "pino-pretty": "^13.1.1",
126
130
  "postgres": "^3.4.8",
127
131
  "traverse": "^0.6.10",
128
- "ts-pattern": "^5.7.1"
132
+ "ts-pattern": "^5.7.1",
133
+ "@napi-rs/keyring": "^1.2.0"
129
134
  },
130
135
  "peerDependencies": {
131
136
  "@hono/zod-openapi": "^1.1.5",
@@ -139,8 +144,7 @@
139
144
  "@opentelemetry/sdk-metrics": "^2.0.1",
140
145
  "@opentelemetry/sdk-node": "^0.203.0",
141
146
  "@opentelemetry/sdk-trace-node": "^2.0.1",
142
- "@opentelemetry/semantic-conventions": "^1.34.0",
143
- "keytar": "^7.9.0"
147
+ "@opentelemetry/semantic-conventions": "^1.34.0"
144
148
  },
145
149
  "devDependencies": {
146
150
  "@types/jmespath": "^0.15.2",
@@ -163,6 +167,7 @@
163
167
  "files": [
164
168
  "dist",
165
169
  "drizzle",
170
+ "spicedb",
166
171
  "README.md",
167
172
  "LICENSE.md",
168
173
  "SUPPLEMENTAL_TERMS.md"
@@ -0,0 +1,114 @@
1
+ /**
2
+ * SpiceDB Schema for Project-Level Access Control
3
+ *
4
+ * This schema defines the authorization model for the Inkeep Agent Framework.
5
+ * All projects are private by default and require explicit grants.
6
+ *
7
+ * Naming Conventions (per SpiceDB best practices):
8
+ * - Relations: nouns (roles) - e.g., owner, admin, member
9
+ * - Permissions: verbs (actions) - e.g., view, edit, delete, manage
10
+ *
11
+ * Future Extensibility:
12
+ * - Groups: Add `| group#member` to relation types
13
+ * - Service Accounts: Add `| service_account` to relation types
14
+ * - Custom Roles: Define a `role` definition and bind it via `relation custom_role: role`
15
+ */
16
+
17
+ /**
18
+ * user represents a human user in the system
19
+ */
20
+ definition user {}
21
+
22
+ /**
23
+ * organization represents a tenant/org boundary
24
+ * All authorization is scoped within an organization
25
+ */
26
+ definition organization {
27
+ /**
28
+ * owner has full control over the organization
29
+ */
30
+ relation owner: user
31
+
32
+ /**
33
+ * admin can manage org settings and all projects
34
+ */
35
+ relation admin: user
36
+
37
+ /**
38
+ * member is a basic org member with no implicit project access
39
+ */
40
+ relation member: user
41
+
42
+ /**
43
+ * Can view organization details
44
+ * "Can user VIEW organization?"
45
+ */
46
+ permission view = owner + admin + member
47
+
48
+ /**
49
+ * Can manage organization settings and all projects
50
+ * "Can user MANAGE organization?"
51
+ */
52
+ permission manage = owner + admin
53
+ }
54
+
55
+ /**
56
+ * project is a container for agents, workflows, and other resources
57
+ * All projects are private by default - require explicit grants
58
+ *
59
+ * Role Hierarchy:
60
+ * - project_admin: Full access (view + use + edit + manage members)
61
+ * - project_member: Operator access (view + use: invoke agents, create API keys)
62
+ * - project_viewer: Read-only access (view only)
63
+ */
64
+ definition project {
65
+ /**
66
+ * The organization this project belongs to
67
+ */
68
+ relation organization: organization
69
+
70
+ /**
71
+ * project_admin can manage project membership, settings, and configurations
72
+ * Includes all permissions: view, use, edit, delete
73
+ */
74
+ relation project_admin: user
75
+
76
+ /**
77
+ * project_member can use the project (invoke agents, create API keys)
78
+ * but cannot edit configurations or manage members
79
+ * Includes: view, use
80
+ */
81
+ relation project_member: user
82
+
83
+ /**
84
+ * project_viewer can only view the project and its resources (read-only)
85
+ * Cannot invoke agents, create API keys, or edit anything
86
+ * Includes: view only
87
+ */
88
+ relation project_viewer: user
89
+
90
+ /**
91
+ * Can view the project and its resources (read-only)
92
+ * "Can user VIEW project?"
93
+ * - Org managers can always view
94
+ * - All project roles can view
95
+ */
96
+ permission view = organization->manage + project_admin + project_member + project_viewer
97
+
98
+ /**
99
+ * Can use the project (invoke agents, create API keys, view traces)
100
+ * "Can user USE project?"
101
+ * - Org managers can always use
102
+ * - project_admin and project_member can use
103
+ * - project_viewer CANNOT use (read-only)
104
+ */
105
+ permission use = organization->manage + project_admin + project_member
106
+
107
+ /**
108
+ * Can edit project configurations and manage members
109
+ * "Can user EDIT project?"
110
+ * - Org managers can always edit
111
+ * - Only project_admin can edit
112
+ */
113
+ permission edit = organization->manage + project_admin
114
+ }