@constructive-sdk/cli 0.25.8 → 0.25.10

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 (229) hide show
  1. package/admin/cli/commands/app-admin-grant.js +3 -1
  2. package/admin/cli/commands/app-grant.js +3 -1
  3. package/admin/cli/commands/app-invite.js +44 -0
  4. package/admin/cli/commands/app-owner-grant.js +3 -1
  5. package/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
  6. package/admin/cli/commands/app-permission-default-grant.js +286 -0
  7. package/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
  8. package/admin/cli/commands/app-permission-default-permission.js +242 -0
  9. package/admin/cli/commands/org-admin-grant.js +3 -1
  10. package/admin/cli/commands/org-grant.js +3 -1
  11. package/admin/cli/commands/org-invite.js +44 -0
  12. package/admin/cli/commands/org-owner-grant.js +3 -1
  13. package/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
  14. package/admin/cli/commands/org-permission-default-grant.js +306 -0
  15. package/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
  16. package/admin/cli/commands/org-permission-default-permission.js +262 -0
  17. package/admin/cli/commands.js +11 -3
  18. package/admin/cli/executor.d.ts +5 -1
  19. package/admin/orm/index.d.ts +10 -2
  20. package/admin/orm/index.js +10 -2
  21. package/admin/orm/input-types.d.ts +1611 -230
  22. package/admin/orm/input-types.js +9 -1
  23. package/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
  24. package/admin/orm/models/appPermissionDefaultGrant.js +104 -0
  25. package/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
  26. package/admin/orm/models/appPermissionDefaultPermission.js +104 -0
  27. package/admin/orm/models/index.d.ts +5 -1
  28. package/admin/orm/models/index.js +11 -3
  29. package/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
  30. package/admin/orm/models/orgPermissionDefaultGrant.js +104 -0
  31. package/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
  32. package/admin/orm/models/orgPermissionDefaultPermission.js +104 -0
  33. package/agent/cli/commands/agent-message.js +34 -12
  34. package/agent/cli/commands/agent-task.js +12 -12
  35. package/agent/cli/embedder.d.ts +5 -0
  36. package/agent/cli/embedder.js +46 -9
  37. package/agent/orm/input-types.d.ts +289 -47
  38. package/agent/orm/input-types.js +1 -0
  39. package/api/cli/commands/check-constraint.js +0 -22
  40. package/api/cli/commands/composite-type.d.ts +8 -0
  41. package/api/cli/commands/composite-type.js +424 -0
  42. package/api/cli/commands/enum.js +0 -22
  43. package/api/cli/commands/field.js +0 -22
  44. package/api/cli/commands/foreign-key-constraint.js +0 -22
  45. package/api/cli/commands/index.js +0 -22
  46. package/api/cli/commands/policy.js +0 -22
  47. package/api/cli/commands/primary-key-constraint.js +0 -22
  48. package/api/cli/commands/schema.js +0 -22
  49. package/api/cli/commands/spatial-relation.js +0 -22
  50. package/api/cli/commands/table.js +6 -28
  51. package/api/cli/commands/trigger.js +0 -22
  52. package/api/cli/commands/unique-constraint.js +0 -22
  53. package/api/cli/commands/view-table.js +22 -0
  54. package/api/cli/commands/view.js +0 -22
  55. package/api/cli/commands.js +3 -1
  56. package/api/cli/executor.d.ts +1 -0
  57. package/api/orm/index.d.ts +2 -0
  58. package/api/orm/index.js +2 -0
  59. package/api/orm/input-types.d.ts +1064 -125
  60. package/api/orm/input-types.js +3 -0
  61. package/api/orm/models/compositeType.d.ts +54 -0
  62. package/api/orm/models/compositeType.js +104 -0
  63. package/api/orm/models/index.d.ts +1 -0
  64. package/api/orm/models/index.js +3 -1
  65. package/auth/cli/commands/link-identity.d.ts +8 -0
  66. package/auth/cli/commands/link-identity.js +36 -0
  67. package/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
  68. package/auth/cli/commands/sign-in-sms-otp.js +36 -0
  69. package/auth/cli/commands/sign-up-sms.d.ts +8 -0
  70. package/auth/cli/commands/sign-up-sms.js +36 -0
  71. package/auth/cli/commands.js +7 -1
  72. package/auth/cli/executor.d.ts +15 -0
  73. package/auth/orm/index.d.ts +15 -0
  74. package/auth/orm/input-types.d.ts +197 -1
  75. package/auth/orm/mutation/index.d.ts +25 -1
  76. package/auth/orm/mutation/index.js +36 -0
  77. package/esm/admin/cli/commands/app-admin-grant.js +3 -1
  78. package/esm/admin/cli/commands/app-grant.js +3 -1
  79. package/esm/admin/cli/commands/app-invite.js +44 -0
  80. package/esm/admin/cli/commands/app-owner-grant.js +3 -1
  81. package/esm/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
  82. package/esm/admin/cli/commands/app-permission-default-grant.js +284 -0
  83. package/esm/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
  84. package/esm/admin/cli/commands/app-permission-default-permission.js +240 -0
  85. package/esm/admin/cli/commands/org-admin-grant.js +3 -1
  86. package/esm/admin/cli/commands/org-grant.js +3 -1
  87. package/esm/admin/cli/commands/org-invite.js +44 -0
  88. package/esm/admin/cli/commands/org-owner-grant.js +3 -1
  89. package/esm/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
  90. package/esm/admin/cli/commands/org-permission-default-grant.js +304 -0
  91. package/esm/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
  92. package/esm/admin/cli/commands/org-permission-default-permission.js +260 -0
  93. package/esm/admin/cli/commands.js +11 -3
  94. package/esm/admin/cli/executor.d.ts +5 -1
  95. package/esm/admin/orm/index.d.ts +10 -2
  96. package/esm/admin/orm/index.js +10 -2
  97. package/esm/admin/orm/input-types.d.ts +1611 -230
  98. package/esm/admin/orm/input-types.js +9 -1
  99. package/esm/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
  100. package/esm/admin/orm/models/appPermissionDefaultGrant.js +100 -0
  101. package/esm/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
  102. package/esm/admin/orm/models/appPermissionDefaultPermission.js +100 -0
  103. package/esm/admin/orm/models/index.d.ts +5 -1
  104. package/esm/admin/orm/models/index.js +5 -1
  105. package/esm/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
  106. package/esm/admin/orm/models/orgPermissionDefaultGrant.js +100 -0
  107. package/esm/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
  108. package/esm/admin/orm/models/orgPermissionDefaultPermission.js +100 -0
  109. package/esm/agent/cli/commands/agent-message.js +34 -12
  110. package/esm/agent/cli/commands/agent-task.js +12 -12
  111. package/esm/agent/cli/embedder.d.ts +5 -0
  112. package/esm/agent/cli/embedder.js +10 -2
  113. package/esm/agent/orm/input-types.d.ts +289 -47
  114. package/esm/agent/orm/input-types.js +1 -0
  115. package/esm/api/cli/commands/check-constraint.js +0 -22
  116. package/esm/api/cli/commands/composite-type.d.ts +8 -0
  117. package/esm/api/cli/commands/composite-type.js +422 -0
  118. package/esm/api/cli/commands/enum.js +0 -22
  119. package/esm/api/cli/commands/field.js +0 -22
  120. package/esm/api/cli/commands/foreign-key-constraint.js +0 -22
  121. package/esm/api/cli/commands/index.js +0 -22
  122. package/esm/api/cli/commands/policy.js +0 -22
  123. package/esm/api/cli/commands/primary-key-constraint.js +0 -22
  124. package/esm/api/cli/commands/schema.js +0 -22
  125. package/esm/api/cli/commands/spatial-relation.js +0 -22
  126. package/esm/api/cli/commands/table.js +6 -28
  127. package/esm/api/cli/commands/trigger.js +0 -22
  128. package/esm/api/cli/commands/unique-constraint.js +0 -22
  129. package/esm/api/cli/commands/view-table.js +22 -0
  130. package/esm/api/cli/commands/view.js +0 -22
  131. package/esm/api/cli/commands.js +3 -1
  132. package/esm/api/cli/executor.d.ts +1 -0
  133. package/esm/api/orm/index.d.ts +2 -0
  134. package/esm/api/orm/index.js +2 -0
  135. package/esm/api/orm/input-types.d.ts +1064 -125
  136. package/esm/api/orm/input-types.js +3 -0
  137. package/esm/api/orm/models/compositeType.d.ts +54 -0
  138. package/esm/api/orm/models/compositeType.js +100 -0
  139. package/esm/api/orm/models/index.d.ts +1 -0
  140. package/esm/api/orm/models/index.js +1 -0
  141. package/esm/auth/cli/commands/link-identity.d.ts +8 -0
  142. package/esm/auth/cli/commands/link-identity.js +34 -0
  143. package/esm/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
  144. package/esm/auth/cli/commands/sign-in-sms-otp.js +34 -0
  145. package/esm/auth/cli/commands/sign-up-sms.d.ts +8 -0
  146. package/esm/auth/cli/commands/sign-up-sms.js +34 -0
  147. package/esm/auth/cli/commands.js +7 -1
  148. package/esm/auth/cli/executor.d.ts +15 -0
  149. package/esm/auth/orm/index.d.ts +15 -0
  150. package/esm/auth/orm/input-types.d.ts +197 -1
  151. package/esm/auth/orm/mutation/index.d.ts +25 -1
  152. package/esm/auth/orm/mutation/index.js +36 -0
  153. package/esm/modules/cli/commands/agent-module.js +88 -0
  154. package/esm/modules/cli/commands/billing-module.js +66 -0
  155. package/esm/modules/cli/commands/compute-log-module.js +44 -0
  156. package/esm/modules/cli/commands/config-secrets-module.js +44 -0
  157. package/esm/modules/cli/commands/db-usage-module.js +66 -0
  158. package/esm/modules/cli/commands/entity-type-provision.js +0 -44
  159. package/esm/modules/cli/commands/events-module.js +66 -0
  160. package/esm/modules/cli/commands/function-invocation-module.d.ts +8 -0
  161. package/esm/modules/cli/commands/function-invocation-module.js +580 -0
  162. package/esm/modules/cli/commands/function-module.js +22 -198
  163. package/esm/modules/cli/commands/graph-module.js +22 -0
  164. package/esm/modules/cli/commands/hierarchy-module.js +22 -0
  165. package/esm/modules/cli/commands/identity-providers-module.js +44 -0
  166. package/esm/modules/cli/commands/inference-log-module.js +44 -0
  167. package/esm/modules/cli/commands/invites-module.js +44 -0
  168. package/esm/modules/cli/commands/limits-module.js +44 -0
  169. package/esm/modules/cli/commands/memberships-module.js +88 -0
  170. package/esm/modules/cli/commands/merkle-store-module.js +22 -0
  171. package/esm/modules/cli/commands/namespace-module.js +22 -0
  172. package/esm/modules/cli/commands/notifications-module.js +88 -0
  173. package/esm/modules/cli/commands/permissions-module.js +44 -0
  174. package/esm/modules/cli/commands/plans-module.js +44 -0
  175. package/esm/modules/cli/commands/profiles-module.js +44 -0
  176. package/esm/modules/cli/commands/rate-limit-meters-module.js +66 -0
  177. package/esm/modules/cli/commands/storage-log-module.js +44 -0
  178. package/esm/modules/cli/commands/storage-module.js +66 -0
  179. package/esm/modules/cli/commands/transfer-log-module.js +44 -0
  180. package/esm/modules/cli/commands.js +29 -27
  181. package/esm/modules/cli/executor.d.ts +14 -13
  182. package/esm/modules/orm/index.d.ts +28 -26
  183. package/esm/modules/orm/index.js +28 -26
  184. package/esm/modules/orm/input-types.d.ts +4485 -2514
  185. package/esm/modules/orm/models/functionInvocationModule.d.ts +54 -0
  186. package/esm/modules/orm/models/functionInvocationModule.js +100 -0
  187. package/esm/modules/orm/models/index.d.ts +14 -13
  188. package/esm/modules/orm/models/index.js +14 -13
  189. package/esm/objects/orm/input-types.d.ts +62 -0
  190. package/esm/usage/orm/input-types.d.ts +314 -19
  191. package/modules/cli/commands/agent-module.js +88 -0
  192. package/modules/cli/commands/billing-module.js +66 -0
  193. package/modules/cli/commands/compute-log-module.js +44 -0
  194. package/modules/cli/commands/config-secrets-module.js +44 -0
  195. package/modules/cli/commands/db-usage-module.js +66 -0
  196. package/modules/cli/commands/entity-type-provision.js +0 -44
  197. package/modules/cli/commands/events-module.js +66 -0
  198. package/modules/cli/commands/function-invocation-module.d.ts +8 -0
  199. package/modules/cli/commands/function-invocation-module.js +582 -0
  200. package/modules/cli/commands/function-module.js +22 -198
  201. package/modules/cli/commands/graph-module.js +22 -0
  202. package/modules/cli/commands/hierarchy-module.js +22 -0
  203. package/modules/cli/commands/identity-providers-module.js +44 -0
  204. package/modules/cli/commands/inference-log-module.js +44 -0
  205. package/modules/cli/commands/invites-module.js +44 -0
  206. package/modules/cli/commands/limits-module.js +44 -0
  207. package/modules/cli/commands/memberships-module.js +88 -0
  208. package/modules/cli/commands/merkle-store-module.js +22 -0
  209. package/modules/cli/commands/namespace-module.js +22 -0
  210. package/modules/cli/commands/notifications-module.js +88 -0
  211. package/modules/cli/commands/permissions-module.js +44 -0
  212. package/modules/cli/commands/plans-module.js +44 -0
  213. package/modules/cli/commands/profiles-module.js +44 -0
  214. package/modules/cli/commands/rate-limit-meters-module.js +66 -0
  215. package/modules/cli/commands/storage-log-module.js +44 -0
  216. package/modules/cli/commands/storage-module.js +66 -0
  217. package/modules/cli/commands/transfer-log-module.js +44 -0
  218. package/modules/cli/commands.js +29 -27
  219. package/modules/cli/executor.d.ts +14 -13
  220. package/modules/orm/index.d.ts +28 -26
  221. package/modules/orm/index.js +28 -26
  222. package/modules/orm/input-types.d.ts +4485 -2514
  223. package/modules/orm/models/functionInvocationModule.d.ts +54 -0
  224. package/modules/orm/models/functionInvocationModule.js +104 -0
  225. package/modules/orm/models/index.d.ts +14 -13
  226. package/modules/orm/models/index.js +30 -28
  227. package/objects/orm/input-types.d.ts +62 -0
  228. package/package.json +4 -4
  229. package/usage/orm/input-types.d.ts +314 -19
@@ -0,0 +1,100 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class OrgPermissionDefaultPermissionModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
10
+ where: args?.where,
11
+ orderBy: args?.orderBy,
12
+ first: args?.first,
13
+ last: args?.last,
14
+ after: args?.after,
15
+ before: args?.before,
16
+ offset: args?.offset,
17
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'OrgPermissionDefaultPermission',
22
+ fieldName: 'orgPermissionDefaultPermissions',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
29
+ where: args?.where,
30
+ orderBy: args?.orderBy,
31
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', connectionFieldsMap);
32
+ return new QueryBuilder({
33
+ client: this.client,
34
+ operation: 'query',
35
+ operationName: 'OrgPermissionDefaultPermission',
36
+ fieldName: 'orgPermissionDefaultPermission',
37
+ document,
38
+ variables,
39
+ transform: (data) => ({
40
+ orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null,
41
+ }),
42
+ });
43
+ }
44
+ findOne(args) {
45
+ const { document, variables } = buildFindManyDocument('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
46
+ where: {
47
+ id: {
48
+ equalTo: args.id,
49
+ },
50
+ },
51
+ first: 1,
52
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', connectionFieldsMap);
53
+ return new QueryBuilder({
54
+ client: this.client,
55
+ operation: 'query',
56
+ operationName: 'OrgPermissionDefaultPermission',
57
+ fieldName: 'orgPermissionDefaultPermission',
58
+ document,
59
+ variables,
60
+ transform: (data) => ({
61
+ orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null,
62
+ }),
63
+ });
64
+ }
65
+ create(args) {
66
+ const { document, variables } = buildCreateDocument('OrgPermissionDefaultPermission', 'createOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', args.select, args.data, 'CreateOrgPermissionDefaultPermissionInput', connectionFieldsMap);
67
+ return new QueryBuilder({
68
+ client: this.client,
69
+ operation: 'mutation',
70
+ operationName: 'OrgPermissionDefaultPermission',
71
+ fieldName: 'createOrgPermissionDefaultPermission',
72
+ document,
73
+ variables,
74
+ });
75
+ }
76
+ update(args) {
77
+ const { document, variables } = buildUpdateByPkDocument('OrgPermissionDefaultPermission', 'updateOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', args.select, args.where.id, args.data, 'UpdateOrgPermissionDefaultPermissionInput', 'id', 'orgPermissionDefaultPermissionPatch', connectionFieldsMap);
78
+ return new QueryBuilder({
79
+ client: this.client,
80
+ operation: 'mutation',
81
+ operationName: 'OrgPermissionDefaultPermission',
82
+ fieldName: 'updateOrgPermissionDefaultPermission',
83
+ document,
84
+ variables,
85
+ });
86
+ }
87
+ delete(args) {
88
+ const { document, variables } = buildDeleteByPkDocument('OrgPermissionDefaultPermission', 'deleteOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', {
89
+ id: args.where.id,
90
+ }, 'DeleteOrgPermissionDefaultPermissionInput', args.select, connectionFieldsMap);
91
+ return new QueryBuilder({
92
+ client: this.client,
93
+ operation: 'mutation',
94
+ operationName: 'OrgPermissionDefaultPermission',
95
+ fieldName: 'deleteOrgPermissionDefaultPermission',
96
+ document,
97
+ variables,
98
+ });
99
+ }
100
+ }
@@ -10,11 +10,12 @@ const fieldSchema = {
10
10
  id: 'uuid',
11
11
  createdAt: 'string',
12
12
  updatedAt: 'string',
13
- ownerId: 'uuid',
13
+ actorId: 'uuid',
14
14
  parts: 'json',
15
15
  threadId: 'uuid',
16
16
  authorRole: 'string',
17
17
  model: 'string',
18
+ agentId: 'uuid',
18
19
  };
19
20
  const usage = '\nagent-message <command>\n\nCommands:\n list List agentMessage records\n find-first Find first matching agentMessage record\n get Get a agentMessage by ID\n create Create a new agentMessage\n update Update an existing agentMessage\n delete Delete a agentMessage\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
20
21
  export default async (argv, prompter, _options) => {
@@ -61,11 +62,12 @@ async function handleList(argv, _prompter) {
61
62
  id: true,
62
63
  createdAt: true,
63
64
  updatedAt: true,
64
- ownerId: true,
65
+ actorId: true,
65
66
  parts: true,
66
67
  threadId: true,
67
68
  authorRole: true,
68
69
  model: true,
70
+ agentId: true,
69
71
  };
70
72
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
71
73
  const client = getClient();
@@ -86,11 +88,12 @@ async function handleFindFirst(argv, _prompter) {
86
88
  id: true,
87
89
  createdAt: true,
88
90
  updatedAt: true,
89
- ownerId: true,
91
+ actorId: true,
90
92
  parts: true,
91
93
  threadId: true,
92
94
  authorRole: true,
93
95
  model: true,
96
+ agentId: true,
94
97
  };
95
98
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
96
99
  const client = getClient();
@@ -123,11 +126,12 @@ async function handleGet(argv, prompter) {
123
126
  id: true,
124
127
  createdAt: true,
125
128
  updatedAt: true,
126
- ownerId: true,
129
+ actorId: true,
127
130
  parts: true,
128
131
  threadId: true,
129
132
  authorRole: true,
130
133
  model: true,
134
+ agentId: true,
131
135
  },
132
136
  })
133
137
  .execute();
@@ -146,8 +150,8 @@ async function handleCreate(argv, prompter) {
146
150
  const rawAnswers = await prompter.prompt(argv, [
147
151
  {
148
152
  type: 'text',
149
- name: 'ownerId',
150
- message: 'ownerId',
153
+ name: 'actorId',
154
+ message: 'actorId',
151
155
  required: false,
152
156
  skipPrompt: true,
153
157
  },
@@ -177,6 +181,13 @@ async function handleCreate(argv, prompter) {
177
181
  required: false,
178
182
  skipPrompt: true,
179
183
  },
184
+ {
185
+ type: 'text',
186
+ name: 'agentId',
187
+ message: 'agentId',
188
+ required: false,
189
+ skipPrompt: true,
190
+ },
180
191
  ]);
181
192
  const answers = coerceAnswers(rawAnswers, fieldSchema);
182
193
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -184,21 +195,23 @@ async function handleCreate(argv, prompter) {
184
195
  const result = await client.agentMessage
185
196
  .create({
186
197
  data: {
187
- ownerId: cleanedData.ownerId,
198
+ actorId: cleanedData.actorId,
188
199
  parts: cleanedData.parts,
189
200
  threadId: cleanedData.threadId,
190
201
  authorRole: cleanedData.authorRole,
191
202
  model: cleanedData.model,
203
+ agentId: cleanedData.agentId,
192
204
  },
193
205
  select: {
194
206
  id: true,
195
207
  createdAt: true,
196
208
  updatedAt: true,
197
- ownerId: true,
209
+ actorId: true,
198
210
  parts: true,
199
211
  threadId: true,
200
212
  authorRole: true,
201
213
  model: true,
214
+ agentId: true,
202
215
  },
203
216
  })
204
217
  .execute();
@@ -223,8 +236,8 @@ async function handleUpdate(argv, prompter) {
223
236
  },
224
237
  {
225
238
  type: 'text',
226
- name: 'ownerId',
227
- message: 'ownerId',
239
+ name: 'actorId',
240
+ message: 'actorId',
228
241
  required: false,
229
242
  skipPrompt: true,
230
243
  },
@@ -254,6 +267,13 @@ async function handleUpdate(argv, prompter) {
254
267
  required: false,
255
268
  skipPrompt: true,
256
269
  },
270
+ {
271
+ type: 'text',
272
+ name: 'agentId',
273
+ message: 'agentId',
274
+ required: false,
275
+ skipPrompt: true,
276
+ },
257
277
  ]);
258
278
  const answers = coerceAnswers(rawAnswers, fieldSchema);
259
279
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -264,21 +284,23 @@ async function handleUpdate(argv, prompter) {
264
284
  id: answers.id,
265
285
  },
266
286
  data: {
267
- ownerId: cleanedData.ownerId,
287
+ actorId: cleanedData.actorId,
268
288
  parts: cleanedData.parts,
269
289
  threadId: cleanedData.threadId,
270
290
  authorRole: cleanedData.authorRole,
271
291
  model: cleanedData.model,
292
+ agentId: cleanedData.agentId,
272
293
  },
273
294
  select: {
274
295
  id: true,
275
296
  createdAt: true,
276
297
  updatedAt: true,
277
- ownerId: true,
298
+ actorId: true,
278
299
  parts: true,
279
300
  threadId: true,
280
301
  authorRole: true,
281
302
  model: true,
303
+ agentId: true,
282
304
  },
283
305
  })
284
306
  .execute();
@@ -10,7 +10,7 @@ const fieldSchema = {
10
10
  id: 'uuid',
11
11
  createdAt: 'string',
12
12
  updatedAt: 'string',
13
- ownerId: 'uuid',
13
+ actorId: 'uuid',
14
14
  status: 'string',
15
15
  planId: 'uuid',
16
16
  description: 'string',
@@ -68,7 +68,7 @@ async function handleList(argv, _prompter) {
68
68
  id: true,
69
69
  createdAt: true,
70
70
  updatedAt: true,
71
- ownerId: true,
71
+ actorId: true,
72
72
  status: true,
73
73
  planId: true,
74
74
  description: true,
@@ -100,7 +100,7 @@ async function handleFindFirst(argv, _prompter) {
100
100
  id: true,
101
101
  createdAt: true,
102
102
  updatedAt: true,
103
- ownerId: true,
103
+ actorId: true,
104
104
  status: true,
105
105
  planId: true,
106
106
  description: true,
@@ -144,7 +144,7 @@ async function handleGet(argv, prompter) {
144
144
  id: true,
145
145
  createdAt: true,
146
146
  updatedAt: true,
147
- ownerId: true,
147
+ actorId: true,
148
148
  status: true,
149
149
  planId: true,
150
150
  description: true,
@@ -174,8 +174,8 @@ async function handleCreate(argv, prompter) {
174
174
  const rawAnswers = await prompter.prompt(argv, [
175
175
  {
176
176
  type: 'text',
177
- name: 'ownerId',
178
- message: 'ownerId',
177
+ name: 'actorId',
178
+ message: 'actorId',
179
179
  required: false,
180
180
  skipPrompt: true,
181
181
  },
@@ -261,7 +261,7 @@ async function handleCreate(argv, prompter) {
261
261
  const result = await client.agentTask
262
262
  .create({
263
263
  data: {
264
- ownerId: cleanedData.ownerId,
264
+ actorId: cleanedData.actorId,
265
265
  status: cleanedData.status,
266
266
  planId: cleanedData.planId,
267
267
  description: cleanedData.description,
@@ -278,7 +278,7 @@ async function handleCreate(argv, prompter) {
278
278
  id: true,
279
279
  createdAt: true,
280
280
  updatedAt: true,
281
- ownerId: true,
281
+ actorId: true,
282
282
  status: true,
283
283
  planId: true,
284
284
  description: true,
@@ -314,8 +314,8 @@ async function handleUpdate(argv, prompter) {
314
314
  },
315
315
  {
316
316
  type: 'text',
317
- name: 'ownerId',
318
- message: 'ownerId',
317
+ name: 'actorId',
318
+ message: 'actorId',
319
319
  required: false,
320
320
  skipPrompt: true,
321
321
  },
@@ -404,7 +404,7 @@ async function handleUpdate(argv, prompter) {
404
404
  id: answers.id,
405
405
  },
406
406
  data: {
407
- ownerId: cleanedData.ownerId,
407
+ actorId: cleanedData.actorId,
408
408
  status: cleanedData.status,
409
409
  planId: cleanedData.planId,
410
410
  description: cleanedData.description,
@@ -421,7 +421,7 @@ async function handleUpdate(argv, prompter) {
421
421
  id: true,
422
422
  createdAt: true,
423
423
  updatedAt: true,
424
- ownerId: true,
424
+ actorId: true,
425
425
  status: true,
426
426
  planId: true,
427
427
  description: true,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * CLI embedder — pluggable text-to-vector embedding for search commands
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
1
6
  export type EmbedderFunction = (text: string) => Promise<number[]>;
2
7
  export interface EmbedderConfig {
3
8
  /** Provider name: 'ollama' or 'custom' */
@@ -3,11 +3,19 @@
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
6
- import OllamaClient from '@agentic-kit/ollama';
6
+ // ─── Types ───────────────────────────────────────────────────────────────────
7
7
  // ─── Built-in Ollama Provider ────────────────────────────────────────────────
8
8
  function createOllamaEmbedder(baseUrl = 'http://localhost:11434', model = 'nomic-embed-text') {
9
- const client = new OllamaClient(baseUrl);
9
+ let clientP;
10
10
  return async (text) => {
11
+ if (!clientP) {
12
+ clientP = import('@agentic-kit/ollama')
13
+ .then((m) => new m.default(baseUrl))
14
+ .catch(() => {
15
+ throw new Error('The ollama embedder requires @agentic-kit/ollama. Install it: npm i @agentic-kit/ollama');
16
+ });
17
+ }
18
+ const client = await clientP;
11
19
  const result = await client.generateEmbedding(text, model);
12
20
  return result.embedding;
13
21
  };