@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,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrgPermissionDefaultPermissionModel = void 0;
4
+ const query_builder_1 = require("../query-builder");
5
+ const input_types_1 = require("../input-types");
6
+ class OrgPermissionDefaultPermissionModel {
7
+ client;
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ findMany(args) {
12
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
13
+ where: args?.where,
14
+ orderBy: args?.orderBy,
15
+ first: args?.first,
16
+ last: args?.last,
17
+ after: args?.after,
18
+ before: args?.before,
19
+ offset: args?.offset,
20
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', input_types_1.connectionFieldsMap);
21
+ return new query_builder_1.QueryBuilder({
22
+ client: this.client,
23
+ operation: 'query',
24
+ operationName: 'OrgPermissionDefaultPermission',
25
+ fieldName: 'orgPermissionDefaultPermissions',
26
+ document,
27
+ variables,
28
+ });
29
+ }
30
+ findFirst(args) {
31
+ const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
32
+ where: args?.where,
33
+ orderBy: args?.orderBy,
34
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', input_types_1.connectionFieldsMap);
35
+ return new query_builder_1.QueryBuilder({
36
+ client: this.client,
37
+ operation: 'query',
38
+ operationName: 'OrgPermissionDefaultPermission',
39
+ fieldName: 'orgPermissionDefaultPermission',
40
+ document,
41
+ variables,
42
+ transform: (data) => ({
43
+ orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null,
44
+ }),
45
+ });
46
+ }
47
+ findOne(args) {
48
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('OrgPermissionDefaultPermission', 'orgPermissionDefaultPermissions', args.select, {
49
+ where: {
50
+ id: {
51
+ equalTo: args.id,
52
+ },
53
+ },
54
+ first: 1,
55
+ }, 'OrgPermissionDefaultPermissionFilter', 'OrgPermissionDefaultPermissionOrderBy', input_types_1.connectionFieldsMap);
56
+ return new query_builder_1.QueryBuilder({
57
+ client: this.client,
58
+ operation: 'query',
59
+ operationName: 'OrgPermissionDefaultPermission',
60
+ fieldName: 'orgPermissionDefaultPermission',
61
+ document,
62
+ variables,
63
+ transform: (data) => ({
64
+ orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null,
65
+ }),
66
+ });
67
+ }
68
+ create(args) {
69
+ const { document, variables } = (0, query_builder_1.buildCreateDocument)('OrgPermissionDefaultPermission', 'createOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', args.select, args.data, 'CreateOrgPermissionDefaultPermissionInput', input_types_1.connectionFieldsMap);
70
+ return new query_builder_1.QueryBuilder({
71
+ client: this.client,
72
+ operation: 'mutation',
73
+ operationName: 'OrgPermissionDefaultPermission',
74
+ fieldName: 'createOrgPermissionDefaultPermission',
75
+ document,
76
+ variables,
77
+ });
78
+ }
79
+ update(args) {
80
+ const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('OrgPermissionDefaultPermission', 'updateOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', args.select, args.where.id, args.data, 'UpdateOrgPermissionDefaultPermissionInput', 'id', 'orgPermissionDefaultPermissionPatch', input_types_1.connectionFieldsMap);
81
+ return new query_builder_1.QueryBuilder({
82
+ client: this.client,
83
+ operation: 'mutation',
84
+ operationName: 'OrgPermissionDefaultPermission',
85
+ fieldName: 'updateOrgPermissionDefaultPermission',
86
+ document,
87
+ variables,
88
+ });
89
+ }
90
+ delete(args) {
91
+ const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('OrgPermissionDefaultPermission', 'deleteOrgPermissionDefaultPermission', 'orgPermissionDefaultPermission', {
92
+ id: args.where.id,
93
+ }, 'DeleteOrgPermissionDefaultPermissionInput', args.select, input_types_1.connectionFieldsMap);
94
+ return new query_builder_1.QueryBuilder({
95
+ client: this.client,
96
+ operation: 'mutation',
97
+ operationName: 'OrgPermissionDefaultPermission',
98
+ fieldName: 'deleteOrgPermissionDefaultPermission',
99
+ document,
100
+ variables,
101
+ });
102
+ }
103
+ }
104
+ exports.OrgPermissionDefaultPermissionModel = OrgPermissionDefaultPermissionModel;
@@ -12,11 +12,12 @@ const fieldSchema = {
12
12
  id: 'uuid',
13
13
  createdAt: 'string',
14
14
  updatedAt: 'string',
15
- ownerId: 'uuid',
15
+ actorId: 'uuid',
16
16
  parts: 'json',
17
17
  threadId: 'uuid',
18
18
  authorRole: 'string',
19
19
  model: 'string',
20
+ agentId: 'uuid',
20
21
  };
21
22
  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';
22
23
  exports.default = async (argv, prompter, _options) => {
@@ -63,11 +64,12 @@ async function handleList(argv, _prompter) {
63
64
  id: true,
64
65
  createdAt: true,
65
66
  updatedAt: true,
66
- ownerId: true,
67
+ actorId: true,
67
68
  parts: true,
68
69
  threadId: true,
69
70
  authorRole: true,
70
71
  model: true,
72
+ agentId: true,
71
73
  };
72
74
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
73
75
  const client = (0, executor_1.getClient)();
@@ -88,11 +90,12 @@ async function handleFindFirst(argv, _prompter) {
88
90
  id: true,
89
91
  createdAt: true,
90
92
  updatedAt: true,
91
- ownerId: true,
93
+ actorId: true,
92
94
  parts: true,
93
95
  threadId: true,
94
96
  authorRole: true,
95
97
  model: true,
98
+ agentId: true,
96
99
  };
97
100
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
98
101
  const client = (0, executor_1.getClient)();
@@ -125,11 +128,12 @@ async function handleGet(argv, prompter) {
125
128
  id: true,
126
129
  createdAt: true,
127
130
  updatedAt: true,
128
- ownerId: true,
131
+ actorId: true,
129
132
  parts: true,
130
133
  threadId: true,
131
134
  authorRole: true,
132
135
  model: true,
136
+ agentId: true,
133
137
  },
134
138
  })
135
139
  .execute();
@@ -148,8 +152,8 @@ async function handleCreate(argv, prompter) {
148
152
  const rawAnswers = await prompter.prompt(argv, [
149
153
  {
150
154
  type: 'text',
151
- name: 'ownerId',
152
- message: 'ownerId',
155
+ name: 'actorId',
156
+ message: 'actorId',
153
157
  required: false,
154
158
  skipPrompt: true,
155
159
  },
@@ -179,6 +183,13 @@ async function handleCreate(argv, prompter) {
179
183
  required: false,
180
184
  skipPrompt: true,
181
185
  },
186
+ {
187
+ type: 'text',
188
+ name: 'agentId',
189
+ message: 'agentId',
190
+ required: false,
191
+ skipPrompt: true,
192
+ },
182
193
  ]);
183
194
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
184
195
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -186,21 +197,23 @@ async function handleCreate(argv, prompter) {
186
197
  const result = await client.agentMessage
187
198
  .create({
188
199
  data: {
189
- ownerId: cleanedData.ownerId,
200
+ actorId: cleanedData.actorId,
190
201
  parts: cleanedData.parts,
191
202
  threadId: cleanedData.threadId,
192
203
  authorRole: cleanedData.authorRole,
193
204
  model: cleanedData.model,
205
+ agentId: cleanedData.agentId,
194
206
  },
195
207
  select: {
196
208
  id: true,
197
209
  createdAt: true,
198
210
  updatedAt: true,
199
- ownerId: true,
211
+ actorId: true,
200
212
  parts: true,
201
213
  threadId: true,
202
214
  authorRole: true,
203
215
  model: true,
216
+ agentId: true,
204
217
  },
205
218
  })
206
219
  .execute();
@@ -225,8 +238,8 @@ async function handleUpdate(argv, prompter) {
225
238
  },
226
239
  {
227
240
  type: 'text',
228
- name: 'ownerId',
229
- message: 'ownerId',
241
+ name: 'actorId',
242
+ message: 'actorId',
230
243
  required: false,
231
244
  skipPrompt: true,
232
245
  },
@@ -256,6 +269,13 @@ async function handleUpdate(argv, prompter) {
256
269
  required: false,
257
270
  skipPrompt: true,
258
271
  },
272
+ {
273
+ type: 'text',
274
+ name: 'agentId',
275
+ message: 'agentId',
276
+ required: false,
277
+ skipPrompt: true,
278
+ },
259
279
  ]);
260
280
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
261
281
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -266,21 +286,23 @@ async function handleUpdate(argv, prompter) {
266
286
  id: answers.id,
267
287
  },
268
288
  data: {
269
- ownerId: cleanedData.ownerId,
289
+ actorId: cleanedData.actorId,
270
290
  parts: cleanedData.parts,
271
291
  threadId: cleanedData.threadId,
272
292
  authorRole: cleanedData.authorRole,
273
293
  model: cleanedData.model,
294
+ agentId: cleanedData.agentId,
274
295
  },
275
296
  select: {
276
297
  id: true,
277
298
  createdAt: true,
278
299
  updatedAt: true,
279
- ownerId: true,
300
+ actorId: true,
280
301
  parts: true,
281
302
  threadId: true,
282
303
  authorRole: true,
283
304
  model: true,
305
+ agentId: true,
284
306
  },
285
307
  })
286
308
  .execute();
@@ -12,7 +12,7 @@ const fieldSchema = {
12
12
  id: 'uuid',
13
13
  createdAt: 'string',
14
14
  updatedAt: 'string',
15
- ownerId: 'uuid',
15
+ actorId: 'uuid',
16
16
  status: 'string',
17
17
  planId: 'uuid',
18
18
  description: 'string',
@@ -70,7 +70,7 @@ async function handleList(argv, _prompter) {
70
70
  id: true,
71
71
  createdAt: true,
72
72
  updatedAt: true,
73
- ownerId: true,
73
+ actorId: true,
74
74
  status: true,
75
75
  planId: true,
76
76
  description: true,
@@ -102,7 +102,7 @@ async function handleFindFirst(argv, _prompter) {
102
102
  id: true,
103
103
  createdAt: true,
104
104
  updatedAt: true,
105
- ownerId: true,
105
+ actorId: true,
106
106
  status: true,
107
107
  planId: true,
108
108
  description: true,
@@ -146,7 +146,7 @@ async function handleGet(argv, prompter) {
146
146
  id: true,
147
147
  createdAt: true,
148
148
  updatedAt: true,
149
- ownerId: true,
149
+ actorId: true,
150
150
  status: true,
151
151
  planId: true,
152
152
  description: true,
@@ -176,8 +176,8 @@ async function handleCreate(argv, prompter) {
176
176
  const rawAnswers = await prompter.prompt(argv, [
177
177
  {
178
178
  type: 'text',
179
- name: 'ownerId',
180
- message: 'ownerId',
179
+ name: 'actorId',
180
+ message: 'actorId',
181
181
  required: false,
182
182
  skipPrompt: true,
183
183
  },
@@ -263,7 +263,7 @@ async function handleCreate(argv, prompter) {
263
263
  const result = await client.agentTask
264
264
  .create({
265
265
  data: {
266
- ownerId: cleanedData.ownerId,
266
+ actorId: cleanedData.actorId,
267
267
  status: cleanedData.status,
268
268
  planId: cleanedData.planId,
269
269
  description: cleanedData.description,
@@ -280,7 +280,7 @@ async function handleCreate(argv, prompter) {
280
280
  id: true,
281
281
  createdAt: true,
282
282
  updatedAt: true,
283
- ownerId: true,
283
+ actorId: true,
284
284
  status: true,
285
285
  planId: true,
286
286
  description: true,
@@ -316,8 +316,8 @@ async function handleUpdate(argv, prompter) {
316
316
  },
317
317
  {
318
318
  type: 'text',
319
- name: 'ownerId',
320
- message: 'ownerId',
319
+ name: 'actorId',
320
+ message: 'actorId',
321
321
  required: false,
322
322
  skipPrompt: true,
323
323
  },
@@ -406,7 +406,7 @@ async function handleUpdate(argv, prompter) {
406
406
  id: answers.id,
407
407
  },
408
408
  data: {
409
- ownerId: cleanedData.ownerId,
409
+ actorId: cleanedData.actorId,
410
410
  status: cleanedData.status,
411
411
  planId: cleanedData.planId,
412
412
  description: cleanedData.description,
@@ -423,7 +423,7 @@ async function handleUpdate(argv, prompter) {
423
423
  id: true,
424
424
  createdAt: true,
425
425
  updatedAt: true,
426
- ownerId: true,
426
+ actorId: true,
427
427
  status: true,
428
428
  planId: true,
429
429
  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' */
@@ -1,21 +1,58 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveEmbedder = resolveEmbedder;
7
- exports.autoEmbedWhere = autoEmbedWhere;
8
- exports.autoEmbedInput = autoEmbedInput;
9
2
  /**
10
3
  * CLI embedder — pluggable text-to-vector embedding for search commands
11
4
  * @generated by @constructive-io/graphql-codegen
12
5
  * DO NOT EDIT - changes will be overwritten
13
6
  */
14
- const ollama_1 = __importDefault(require("@agentic-kit/ollama"));
7
+ // ─── Types ───────────────────────────────────────────────────────────────────
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.resolveEmbedder = resolveEmbedder;
43
+ exports.autoEmbedWhere = autoEmbedWhere;
44
+ exports.autoEmbedInput = autoEmbedInput;
15
45
  // ─── Built-in Ollama Provider ────────────────────────────────────────────────
16
46
  function createOllamaEmbedder(baseUrl = 'http://localhost:11434', model = 'nomic-embed-text') {
17
- const client = new ollama_1.default(baseUrl);
47
+ let clientP;
18
48
  return async (text) => {
49
+ if (!clientP) {
50
+ clientP = Promise.resolve().then(() => __importStar(require('@agentic-kit/ollama'))).then((m) => new m.default(baseUrl))
51
+ .catch(() => {
52
+ throw new Error('The ollama embedder requires @agentic-kit/ollama. Install it: npm i @agentic-kit/ollama');
53
+ });
54
+ }
55
+ const client = await clientP;
19
56
  const result = await client.generateEmbedding(text, model);
20
57
  return result.embedding;
21
58
  };