@constructive-sdk/cli 0.25.9 → 0.25.11
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,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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
152
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
229
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
180
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
320
|
-
message: '
|
|
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
|
-
|
|
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
|
-
|
|
426
|
+
actorId: true,
|
|
427
427
|
status: true,
|
|
428
428
|
planId: true,
|
|
429
429
|
description: true,
|
package/agent/cli/embedder.d.ts
CHANGED
|
@@ -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' */
|
package/agent/cli/embedder.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
};
|