@constructive-sdk/cli 0.25.9 → 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.
- package/admin/cli/commands/app-admin-grant.js +3 -1
- package/admin/cli/commands/app-grant.js +3 -1
- package/admin/cli/commands/app-invite.js +44 -0
- package/admin/cli/commands/app-owner-grant.js +3 -1
- package/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
- package/admin/cli/commands/app-permission-default-grant.js +286 -0
- package/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
- package/admin/cli/commands/app-permission-default-permission.js +242 -0
- package/admin/cli/commands/org-admin-grant.js +3 -1
- package/admin/cli/commands/org-grant.js +3 -1
- package/admin/cli/commands/org-invite.js +44 -0
- package/admin/cli/commands/org-owner-grant.js +3 -1
- package/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
- package/admin/cli/commands/org-permission-default-grant.js +306 -0
- package/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
- package/admin/cli/commands/org-permission-default-permission.js +262 -0
- package/admin/cli/commands.js +11 -3
- package/admin/cli/executor.d.ts +5 -1
- package/admin/orm/index.d.ts +10 -2
- package/admin/orm/index.js +10 -2
- package/admin/orm/input-types.d.ts +1611 -230
- package/admin/orm/input-types.js +9 -1
- package/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
- package/admin/orm/models/appPermissionDefaultGrant.js +104 -0
- package/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
- package/admin/orm/models/appPermissionDefaultPermission.js +104 -0
- package/admin/orm/models/index.d.ts +5 -1
- package/admin/orm/models/index.js +11 -3
- package/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
- package/admin/orm/models/orgPermissionDefaultGrant.js +104 -0
- package/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
- package/admin/orm/models/orgPermissionDefaultPermission.js +104 -0
- package/agent/cli/commands/agent-message.js +34 -12
- package/agent/cli/commands/agent-task.js +12 -12
- package/agent/cli/embedder.d.ts +5 -0
- package/agent/cli/embedder.js +46 -9
- package/agent/orm/input-types.d.ts +289 -47
- package/agent/orm/input-types.js +1 -0
- package/api/cli/commands/check-constraint.js +0 -22
- package/api/cli/commands/composite-type.d.ts +8 -0
- package/api/cli/commands/composite-type.js +424 -0
- package/api/cli/commands/enum.js +0 -22
- package/api/cli/commands/field.js +0 -22
- package/api/cli/commands/foreign-key-constraint.js +0 -22
- package/api/cli/commands/index.js +0 -22
- package/api/cli/commands/policy.js +0 -22
- package/api/cli/commands/primary-key-constraint.js +0 -22
- package/api/cli/commands/schema.js +0 -22
- package/api/cli/commands/spatial-relation.js +0 -22
- package/api/cli/commands/table.js +6 -28
- package/api/cli/commands/trigger.js +0 -22
- package/api/cli/commands/unique-constraint.js +0 -22
- package/api/cli/commands/view-table.js +22 -0
- package/api/cli/commands/view.js +0 -22
- package/api/cli/commands.js +3 -1
- package/api/cli/executor.d.ts +1 -0
- package/api/orm/index.d.ts +2 -0
- package/api/orm/index.js +2 -0
- package/api/orm/input-types.d.ts +1064 -125
- package/api/orm/input-types.js +3 -0
- package/api/orm/models/compositeType.d.ts +54 -0
- package/api/orm/models/compositeType.js +104 -0
- package/api/orm/models/index.d.ts +1 -0
- package/api/orm/models/index.js +3 -1
- package/auth/cli/commands/link-identity.d.ts +8 -0
- package/auth/cli/commands/link-identity.js +36 -0
- package/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
- package/auth/cli/commands/sign-in-sms-otp.js +36 -0
- package/auth/cli/commands/sign-up-sms.d.ts +8 -0
- package/auth/cli/commands/sign-up-sms.js +36 -0
- package/auth/cli/commands.js +7 -1
- package/auth/cli/executor.d.ts +15 -0
- package/auth/orm/index.d.ts +15 -0
- package/auth/orm/input-types.d.ts +197 -1
- package/auth/orm/mutation/index.d.ts +25 -1
- package/auth/orm/mutation/index.js +36 -0
- package/esm/admin/cli/commands/app-admin-grant.js +3 -1
- package/esm/admin/cli/commands/app-grant.js +3 -1
- package/esm/admin/cli/commands/app-invite.js +44 -0
- package/esm/admin/cli/commands/app-owner-grant.js +3 -1
- package/esm/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
- package/esm/admin/cli/commands/app-permission-default-grant.js +284 -0
- package/esm/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
- package/esm/admin/cli/commands/app-permission-default-permission.js +240 -0
- package/esm/admin/cli/commands/org-admin-grant.js +3 -1
- package/esm/admin/cli/commands/org-grant.js +3 -1
- package/esm/admin/cli/commands/org-invite.js +44 -0
- package/esm/admin/cli/commands/org-owner-grant.js +3 -1
- package/esm/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
- package/esm/admin/cli/commands/org-permission-default-grant.js +304 -0
- package/esm/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
- package/esm/admin/cli/commands/org-permission-default-permission.js +260 -0
- package/esm/admin/cli/commands.js +11 -3
- package/esm/admin/cli/executor.d.ts +5 -1
- package/esm/admin/orm/index.d.ts +10 -2
- package/esm/admin/orm/index.js +10 -2
- package/esm/admin/orm/input-types.d.ts +1611 -230
- package/esm/admin/orm/input-types.js +9 -1
- package/esm/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
- package/esm/admin/orm/models/appPermissionDefaultGrant.js +100 -0
- package/esm/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
- package/esm/admin/orm/models/appPermissionDefaultPermission.js +100 -0
- package/esm/admin/orm/models/index.d.ts +5 -1
- package/esm/admin/orm/models/index.js +5 -1
- package/esm/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
- package/esm/admin/orm/models/orgPermissionDefaultGrant.js +100 -0
- package/esm/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
- package/esm/admin/orm/models/orgPermissionDefaultPermission.js +100 -0
- package/esm/agent/cli/commands/agent-message.js +34 -12
- package/esm/agent/cli/commands/agent-task.js +12 -12
- package/esm/agent/cli/embedder.d.ts +5 -0
- package/esm/agent/cli/embedder.js +10 -2
- package/esm/agent/orm/input-types.d.ts +289 -47
- package/esm/agent/orm/input-types.js +1 -0
- package/esm/api/cli/commands/check-constraint.js +0 -22
- package/esm/api/cli/commands/composite-type.d.ts +8 -0
- package/esm/api/cli/commands/composite-type.js +422 -0
- package/esm/api/cli/commands/enum.js +0 -22
- package/esm/api/cli/commands/field.js +0 -22
- package/esm/api/cli/commands/foreign-key-constraint.js +0 -22
- package/esm/api/cli/commands/index.js +0 -22
- package/esm/api/cli/commands/policy.js +0 -22
- package/esm/api/cli/commands/primary-key-constraint.js +0 -22
- package/esm/api/cli/commands/schema.js +0 -22
- package/esm/api/cli/commands/spatial-relation.js +0 -22
- package/esm/api/cli/commands/table.js +6 -28
- package/esm/api/cli/commands/trigger.js +0 -22
- package/esm/api/cli/commands/unique-constraint.js +0 -22
- package/esm/api/cli/commands/view-table.js +22 -0
- package/esm/api/cli/commands/view.js +0 -22
- package/esm/api/cli/commands.js +3 -1
- package/esm/api/cli/executor.d.ts +1 -0
- package/esm/api/orm/index.d.ts +2 -0
- package/esm/api/orm/index.js +2 -0
- package/esm/api/orm/input-types.d.ts +1064 -125
- package/esm/api/orm/input-types.js +3 -0
- package/esm/api/orm/models/compositeType.d.ts +54 -0
- package/esm/api/orm/models/compositeType.js +100 -0
- package/esm/api/orm/models/index.d.ts +1 -0
- package/esm/api/orm/models/index.js +1 -0
- package/esm/auth/cli/commands/link-identity.d.ts +8 -0
- package/esm/auth/cli/commands/link-identity.js +34 -0
- package/esm/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
- package/esm/auth/cli/commands/sign-in-sms-otp.js +34 -0
- package/esm/auth/cli/commands/sign-up-sms.d.ts +8 -0
- package/esm/auth/cli/commands/sign-up-sms.js +34 -0
- package/esm/auth/cli/commands.js +7 -1
- package/esm/auth/cli/executor.d.ts +15 -0
- package/esm/auth/orm/index.d.ts +15 -0
- package/esm/auth/orm/input-types.d.ts +197 -1
- package/esm/auth/orm/mutation/index.d.ts +25 -1
- package/esm/auth/orm/mutation/index.js +36 -0
- package/esm/modules/cli/commands/agent-module.js +88 -0
- package/esm/modules/cli/commands/billing-module.js +66 -0
- package/esm/modules/cli/commands/compute-log-module.js +44 -0
- package/esm/modules/cli/commands/config-secrets-module.js +44 -0
- package/esm/modules/cli/commands/db-usage-module.js +66 -0
- package/esm/modules/cli/commands/entity-type-provision.js +0 -44
- package/esm/modules/cli/commands/events-module.js +66 -0
- package/esm/modules/cli/commands/function-invocation-module.d.ts +8 -0
- package/esm/modules/cli/commands/function-invocation-module.js +580 -0
- package/esm/modules/cli/commands/function-module.js +22 -198
- package/esm/modules/cli/commands/graph-module.js +22 -0
- package/esm/modules/cli/commands/hierarchy-module.js +22 -0
- package/esm/modules/cli/commands/identity-providers-module.js +44 -0
- package/esm/modules/cli/commands/inference-log-module.js +44 -0
- package/esm/modules/cli/commands/invites-module.js +44 -0
- package/esm/modules/cli/commands/limits-module.js +44 -0
- package/esm/modules/cli/commands/memberships-module.js +88 -0
- package/esm/modules/cli/commands/merkle-store-module.js +22 -0
- package/esm/modules/cli/commands/namespace-module.js +22 -0
- package/esm/modules/cli/commands/notifications-module.js +88 -0
- package/esm/modules/cli/commands/permissions-module.js +44 -0
- package/esm/modules/cli/commands/plans-module.js +44 -0
- package/esm/modules/cli/commands/profiles-module.js +44 -0
- package/esm/modules/cli/commands/rate-limit-meters-module.js +66 -0
- package/esm/modules/cli/commands/storage-log-module.js +44 -0
- package/esm/modules/cli/commands/storage-module.js +66 -0
- package/esm/modules/cli/commands/transfer-log-module.js +44 -0
- package/esm/modules/cli/commands.js +29 -27
- package/esm/modules/cli/executor.d.ts +14 -13
- package/esm/modules/orm/index.d.ts +28 -26
- package/esm/modules/orm/index.js +28 -26
- package/esm/modules/orm/input-types.d.ts +4485 -2514
- package/esm/modules/orm/models/functionInvocationModule.d.ts +54 -0
- package/esm/modules/orm/models/functionInvocationModule.js +100 -0
- package/esm/modules/orm/models/index.d.ts +14 -13
- package/esm/modules/orm/models/index.js +14 -13
- package/esm/objects/orm/input-types.d.ts +62 -0
- package/esm/usage/orm/input-types.d.ts +314 -19
- package/modules/cli/commands/agent-module.js +88 -0
- package/modules/cli/commands/billing-module.js +66 -0
- package/modules/cli/commands/compute-log-module.js +44 -0
- package/modules/cli/commands/config-secrets-module.js +44 -0
- package/modules/cli/commands/db-usage-module.js +66 -0
- package/modules/cli/commands/entity-type-provision.js +0 -44
- package/modules/cli/commands/events-module.js +66 -0
- package/modules/cli/commands/function-invocation-module.d.ts +8 -0
- package/modules/cli/commands/function-invocation-module.js +582 -0
- package/modules/cli/commands/function-module.js +22 -198
- package/modules/cli/commands/graph-module.js +22 -0
- package/modules/cli/commands/hierarchy-module.js +22 -0
- package/modules/cli/commands/identity-providers-module.js +44 -0
- package/modules/cli/commands/inference-log-module.js +44 -0
- package/modules/cli/commands/invites-module.js +44 -0
- package/modules/cli/commands/limits-module.js +44 -0
- package/modules/cli/commands/memberships-module.js +88 -0
- package/modules/cli/commands/merkle-store-module.js +22 -0
- package/modules/cli/commands/namespace-module.js +22 -0
- package/modules/cli/commands/notifications-module.js +88 -0
- package/modules/cli/commands/permissions-module.js +44 -0
- package/modules/cli/commands/plans-module.js +44 -0
- package/modules/cli/commands/profiles-module.js +44 -0
- package/modules/cli/commands/rate-limit-meters-module.js +66 -0
- package/modules/cli/commands/storage-log-module.js +44 -0
- package/modules/cli/commands/storage-module.js +66 -0
- package/modules/cli/commands/transfer-log-module.js +44 -0
- package/modules/cli/commands.js +29 -27
- package/modules/cli/executor.d.ts +14 -13
- package/modules/orm/index.d.ts +28 -26
- package/modules/orm/index.js +28 -26
- package/modules/orm/input-types.d.ts +4485 -2514
- package/modules/orm/models/functionInvocationModule.d.ts +54 -0
- package/modules/orm/models/functionInvocationModule.js +104 -0
- package/modules/orm/models/index.d.ts +14 -13
- package/modules/orm/models/index.js +30 -28
- package/objects/orm/input-types.d.ts +62 -0
- package/package.json +4 -4
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
150
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
227
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
178
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
318
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6
|
+
// ─── Types ───────────────────────────────────────────────────────────────────
|
|
7
7
|
// ─── Built-in Ollama Provider ────────────────────────────────────────────────
|
|
8
8
|
function createOllamaEmbedder(baseUrl = 'http://localhost:11434', model = 'nomic-embed-text') {
|
|
9
|
-
|
|
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
|
};
|