@constructive-sdk/cli 0.23.2 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/cli/commands/app-limit-event.js +248 -2
- package/admin/cli/commands/app-limit.js +44 -0
- package/admin/cli/commands/org-limit-aggregate.js +44 -0
- package/admin/cli/commands/org-limit-event.js +248 -2
- package/admin/cli/commands/org-limit.js +44 -0
- package/admin/cli/commands.js +31 -33
- package/admin/cli/executor.d.ts +15 -16
- package/admin/orm/index.d.ts +31 -33
- package/admin/orm/index.js +32 -33
- package/admin/orm/input-types.d.ts +2090 -2039
- package/admin/orm/input-types.js +4 -4
- package/admin/orm/models/appLimitEvent.d.ts +26 -2
- package/admin/orm/models/appLimitEvent.js +45 -0
- package/admin/orm/models/index.d.ts +15 -16
- package/admin/orm/models/index.js +31 -33
- package/admin/orm/models/orgLimitEvent.d.ts +26 -2
- package/admin/orm/models/orgLimitEvent.js +45 -0
- package/{esm/public/cli/commands/agent-message.d.ts → auth/cli/commands/audit-log-auth.d.ts} +1 -1
- package/auth/cli/commands/{audit-log.js → audit-log-auth.js} +14 -14
- package/auth/cli/commands.js +5 -5
- package/auth/cli/executor.d.ts +6 -6
- package/auth/orm/index.d.ts +8 -8
- package/auth/orm/index.js +4 -3
- package/auth/orm/input-types.d.ts +94 -94
- package/auth/orm/input-types.js +1 -1
- package/auth/orm/models/auditLogAuth.d.ts +54 -0
- package/{public/orm/models/agentMessage.js → auth/orm/models/auditLogAuth.js} +27 -27
- package/auth/orm/models/index.d.ts +1 -1
- package/auth/orm/models/index.js +3 -3
- package/auth/orm/mutation/index.d.ts +9 -9
- package/auth/orm/mutation/index.js +12 -12
- package/esm/admin/cli/commands/app-limit-event.js +248 -2
- package/esm/admin/cli/commands/app-limit.js +44 -0
- package/esm/admin/cli/commands/org-limit-aggregate.js +44 -0
- package/esm/admin/cli/commands/org-limit-event.js +248 -2
- package/esm/admin/cli/commands/org-limit.js +44 -0
- package/esm/admin/cli/commands.js +31 -33
- package/esm/admin/cli/executor.d.ts +15 -16
- package/esm/admin/orm/index.d.ts +31 -33
- package/esm/admin/orm/index.js +31 -33
- package/esm/admin/orm/input-types.d.ts +2090 -2039
- package/esm/admin/orm/input-types.js +4 -4
- package/esm/admin/orm/models/appLimitEvent.d.ts +26 -2
- package/esm/admin/orm/models/appLimitEvent.js +46 -1
- package/esm/admin/orm/models/index.d.ts +15 -16
- package/esm/admin/orm/models/index.js +15 -16
- package/esm/admin/orm/models/orgLimitEvent.d.ts +26 -2
- package/esm/admin/orm/models/orgLimitEvent.js +46 -1
- package/esm/auth/cli/commands/audit-log-auth.d.ts +8 -0
- package/esm/{public/cli/commands/audit-log.js → auth/cli/commands/audit-log-auth.js} +14 -14
- package/esm/auth/cli/commands.js +5 -5
- package/esm/auth/cli/executor.d.ts +6 -6
- package/esm/auth/orm/index.d.ts +8 -8
- package/esm/auth/orm/index.js +3 -3
- package/esm/auth/orm/input-types.d.ts +94 -94
- package/esm/auth/orm/input-types.js +1 -1
- package/esm/auth/orm/models/auditLogAuth.d.ts +54 -0
- package/esm/{public/orm/models/auditLog.js → auth/orm/models/auditLogAuth.js} +25 -25
- package/esm/auth/orm/models/index.d.ts +1 -1
- package/esm/auth/orm/models/index.js +1 -1
- package/esm/auth/orm/mutation/index.d.ts +9 -9
- package/esm/auth/orm/mutation/index.js +12 -12
- package/esm/objects/orm/index.d.ts +1 -1
- package/esm/objects/orm/index.js +1 -1
- package/esm/public/cli/commands/{agent-thread.d.ts → agent-module.d.ts} +1 -1
- package/esm/public/cli/commands/agent-module.js +690 -0
- package/esm/public/cli/commands/app-limit-event.js +248 -2
- package/esm/public/cli/commands/app-limit.js +44 -0
- package/esm/public/cli/commands/apply-registry-defaults.d.ts +8 -0
- package/esm/public/cli/commands/{rev-parse.js → apply-registry-defaults.js} +9 -12
- package/esm/public/cli/commands/audit-log-auth.d.ts +8 -0
- package/esm/{auth/cli/commands/audit-log.js → public/cli/commands/audit-log-auth.js} +14 -14
- package/esm/public/cli/commands/billing-module.js +88 -0
- package/esm/public/cli/commands/compute-log-module.d.ts +8 -0
- package/esm/public/cli/commands/compute-log-module.js +514 -0
- package/esm/public/cli/commands/config-secrets-org-module.d.ts +8 -0
- package/esm/public/cli/commands/{encrypted-secrets-module.js → config-secrets-org-module.js} +8 -8
- package/esm/public/cli/commands/config-secrets-user-module.d.ts +8 -0
- package/esm/public/cli/commands/{object.js → config-secrets-user-module.js} +60 -67
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/{admin/cli/commands/usage-snapshot.d.ts → esm/public/cli/commands/db-usage-module.d.ts} +1 -1
- package/esm/public/cli/commands/db-usage-module.js +558 -0
- package/esm/public/cli/commands/entity-type-provision.js +386 -34
- package/esm/public/cli/commands/field.js +4 -26
- package/esm/public/cli/commands/function-module.d.ts +8 -0
- package/esm/public/cli/commands/function-module.js +778 -0
- package/{auth/cli/commands/audit-log.d.ts → esm/public/cli/commands/graph-module.d.ts} +1 -1
- package/esm/public/cli/commands/graph-module.js +584 -0
- package/esm/public/cli/commands/inference-log-module.d.ts +8 -0
- package/esm/public/cli/commands/inference-log-module.js +514 -0
- package/esm/public/cli/commands/memberships-module.js +22 -0
- package/esm/public/cli/commands/merkle-store-module.d.ts +8 -0
- package/esm/public/cli/commands/merkle-store-module.js +498 -0
- package/esm/public/cli/commands/namespace-module.d.ts +8 -0
- package/esm/public/cli/commands/namespace-module.js +558 -0
- package/esm/public/cli/commands/org-limit-aggregate.js +44 -0
- package/esm/public/cli/commands/org-limit-event.js +248 -2
- package/esm/public/cli/commands/org-limit.js +44 -0
- package/esm/public/cli/commands/partition.js +44 -0
- package/esm/public/cli/commands/storage-log-module.d.ts +8 -0
- package/esm/public/cli/commands/storage-log-module.js +514 -0
- package/esm/public/cli/commands/storage-module.js +36 -14
- package/esm/public/cli/commands/transfer-log-module.d.ts +8 -0
- package/esm/public/cli/commands/transfer-log-module.js +514 -0
- package/esm/public/cli/commands.js +83 -101
- package/esm/public/cli/executor.d.ts +72 -125
- package/esm/public/orm/index.d.ts +102 -153
- package/esm/public/orm/index.js +59 -55
- package/esm/public/orm/input-types.d.ts +6255 -3877
- package/esm/public/orm/input-types.js +24 -15
- package/esm/public/orm/models/agentModule.d.ts +54 -0
- package/esm/public/orm/models/{agentThread.js → agentModule.js} +25 -25
- package/esm/public/orm/models/appLimitEvent.d.ts +26 -2
- package/esm/public/orm/models/appLimitEvent.js +46 -1
- package/esm/public/orm/models/auditLogAuth.d.ts +54 -0
- package/esm/{auth/orm/models/auditLog.js → public/orm/models/auditLogAuth.js} +25 -25
- package/esm/public/orm/models/computeLogModule.d.ts +54 -0
- package/esm/public/orm/models/{commit.js → computeLogModule.js} +25 -25
- package/esm/public/orm/models/configSecretsOrgModule.d.ts +54 -0
- package/esm/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +25 -25
- package/esm/public/orm/models/configSecretsUserModule.d.ts +54 -0
- package/esm/public/orm/models/configSecretsUserModule.js +100 -0
- package/esm/public/orm/models/dbUsageModule.d.ts +54 -0
- package/esm/{admin/orm/models/usageSnapshot.js → public/orm/models/dbUsageModule.js} +25 -25
- package/esm/public/orm/models/functionModule.d.ts +54 -0
- package/esm/public/orm/models/{agentMessage.js → functionModule.js} +25 -25
- package/esm/public/orm/models/graphModule.d.ts +54 -0
- package/esm/public/orm/models/{agentTask.js → graphModule.js} +25 -25
- package/esm/public/orm/models/index.d.ts +29 -27
- package/esm/public/orm/models/index.js +29 -27
- package/esm/public/orm/models/inferenceLogModule.d.ts +54 -0
- package/esm/public/orm/models/inferenceLogModule.js +100 -0
- package/esm/public/orm/models/merkleStoreModule.d.ts +54 -0
- package/esm/public/orm/models/merkleStoreModule.js +100 -0
- package/esm/public/orm/models/namespaceModule.d.ts +54 -0
- package/esm/public/orm/models/namespaceModule.js +100 -0
- package/esm/public/orm/models/orgLimitEvent.d.ts +26 -2
- package/esm/public/orm/models/orgLimitEvent.js +46 -1
- package/esm/public/orm/models/storageLogModule.d.ts +54 -0
- package/esm/public/orm/models/{store.js → storageLogModule.js} +25 -25
- package/esm/public/orm/models/transferLogModule.d.ts +54 -0
- package/esm/public/orm/models/transferLogModule.js +100 -0
- package/esm/public/orm/mutation/index.d.ts +69 -133
- package/esm/public/orm/mutation/index.js +78 -174
- package/esm/public/orm/query/index.d.ts +22 -71
- package/esm/public/orm/query/index.js +36 -124
- package/objects/orm/index.d.ts +1 -1
- package/objects/orm/index.js +2 -1
- package/package.json +6 -6
- package/{esm/public/cli/commands/agent-task.d.ts → public/cli/commands/agent-module.d.ts} +1 -1
- package/public/cli/commands/agent-module.js +692 -0
- package/public/cli/commands/app-limit-event.js +248 -2
- package/public/cli/commands/app-limit.js +44 -0
- package/public/cli/commands/apply-registry-defaults.d.ts +8 -0
- package/public/cli/commands/{rev-parse.js → apply-registry-defaults.js} +9 -12
- package/public/cli/commands/audit-log-auth.d.ts +8 -0
- package/public/cli/commands/{audit-log.js → audit-log-auth.js} +14 -14
- package/public/cli/commands/billing-module.js +88 -0
- package/public/cli/commands/compute-log-module.d.ts +8 -0
- package/public/cli/commands/compute-log-module.js +516 -0
- package/public/cli/commands/config-secrets-org-module.d.ts +8 -0
- package/public/cli/commands/{encrypted-secrets-module.js → config-secrets-org-module.js} +8 -8
- package/public/cli/commands/config-secrets-user-module.d.ts +8 -0
- package/public/cli/commands/{object.js → config-secrets-user-module.js} +60 -67
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/{esm/admin/cli/commands/usage-snapshot.d.ts → public/cli/commands/db-usage-module.d.ts} +1 -1
- package/public/cli/commands/db-usage-module.js +560 -0
- package/public/cli/commands/entity-type-provision.js +386 -34
- package/public/cli/commands/field.js +4 -26
- package/public/cli/commands/function-module.d.ts +8 -0
- package/public/cli/commands/function-module.js +780 -0
- package/{esm/auth/cli/commands/audit-log.d.ts → public/cli/commands/graph-module.d.ts} +1 -1
- package/public/cli/commands/graph-module.js +586 -0
- package/public/cli/commands/inference-log-module.d.ts +8 -0
- package/public/cli/commands/inference-log-module.js +516 -0
- package/public/cli/commands/memberships-module.js +22 -0
- package/public/cli/commands/merkle-store-module.d.ts +8 -0
- package/public/cli/commands/merkle-store-module.js +500 -0
- package/public/cli/commands/namespace-module.d.ts +8 -0
- package/public/cli/commands/namespace-module.js +560 -0
- package/public/cli/commands/org-limit-aggregate.js +44 -0
- package/public/cli/commands/org-limit-event.js +248 -2
- package/public/cli/commands/org-limit.js +44 -0
- package/public/cli/commands/partition.js +44 -0
- package/public/cli/commands/storage-log-module.d.ts +8 -0
- package/public/cli/commands/storage-log-module.js +516 -0
- package/public/cli/commands/storage-module.js +36 -14
- package/public/cli/commands/transfer-log-module.d.ts +8 -0
- package/public/cli/commands/transfer-log-module.js +516 -0
- package/public/cli/commands.js +83 -101
- package/public/cli/executor.d.ts +72 -125
- package/public/orm/index.d.ts +102 -153
- package/public/orm/index.js +60 -55
- package/public/orm/input-types.d.ts +6255 -3877
- package/public/orm/input-types.js +24 -15
- package/public/orm/models/agentModule.d.ts +54 -0
- package/public/orm/models/{agentThread.js → agentModule.js} +27 -27
- package/public/orm/models/appLimitEvent.d.ts +26 -2
- package/public/orm/models/appLimitEvent.js +45 -0
- package/public/orm/models/auditLogAuth.d.ts +54 -0
- package/{admin/orm/models/usageSnapshot.js → public/orm/models/auditLogAuth.js} +27 -27
- package/public/orm/models/computeLogModule.d.ts +54 -0
- package/{auth/orm/models/auditLog.js → public/orm/models/computeLogModule.js} +27 -27
- package/public/orm/models/configSecretsOrgModule.d.ts +54 -0
- package/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +27 -27
- package/public/orm/models/configSecretsUserModule.d.ts +54 -0
- package/public/orm/models/{ref.js → configSecretsUserModule.js} +27 -27
- package/public/orm/models/dbUsageModule.d.ts +54 -0
- package/public/orm/models/{usageSnapshot.js → dbUsageModule.js} +27 -27
- package/public/orm/models/functionModule.d.ts +54 -0
- package/public/orm/models/functionModule.js +104 -0
- package/public/orm/models/graphModule.d.ts +54 -0
- package/public/orm/models/{agentTask.js → graphModule.js} +27 -27
- package/public/orm/models/index.d.ts +29 -27
- package/public/orm/models/index.js +61 -57
- package/public/orm/models/inferenceLogModule.d.ts +54 -0
- package/public/orm/models/inferenceLogModule.js +104 -0
- package/public/orm/models/merkleStoreModule.d.ts +54 -0
- package/public/orm/models/merkleStoreModule.js +104 -0
- package/public/orm/models/namespaceModule.d.ts +54 -0
- package/public/orm/models/namespaceModule.js +104 -0
- package/public/orm/models/orgLimitEvent.d.ts +26 -2
- package/public/orm/models/orgLimitEvent.js +45 -0
- package/public/orm/models/storageLogModule.d.ts +54 -0
- package/public/orm/models/storageLogModule.js +104 -0
- package/public/orm/models/transferLogModule.d.ts +54 -0
- package/public/orm/models/transferLogModule.js +104 -0
- package/public/orm/mutation/index.d.ts +69 -133
- package/public/orm/mutation/index.js +78 -174
- package/public/orm/query/index.d.ts +22 -71
- package/public/orm/query/index.js +36 -124
- package/admin/cli/commands/usage-snapshot.js +0 -316
- package/admin/orm/models/usageSnapshot.d.ts +0 -54
- package/auth/orm/models/auditLog.d.ts +0 -54
- package/esm/admin/cli/commands/usage-snapshot.js +0 -314
- package/esm/admin/orm/models/usageSnapshot.d.ts +0 -54
- package/esm/auth/orm/models/auditLog.d.ts +0 -54
- package/esm/public/cli/commands/agent-message.js +0 -324
- package/esm/public/cli/commands/agent-task.js +0 -368
- package/esm/public/cli/commands/agent-thread.js +0 -372
- package/esm/public/cli/commands/audit-log.d.ts +0 -8
- package/esm/public/cli/commands/commit.d.ts +0 -8
- package/esm/public/cli/commands/commit.js +0 -380
- package/esm/public/cli/commands/encrypted-secrets-module.d.ts +0 -8
- package/esm/public/cli/commands/freeze-objects.d.ts +0 -8
- package/esm/public/cli/commands/freeze-objects.js +0 -34
- package/esm/public/cli/commands/get-all-objects-from-root.d.ts +0 -8
- package/esm/public/cli/commands/get-all-objects-from-root.js +0 -52
- package/esm/public/cli/commands/get-all-record.d.ts +0 -8
- package/esm/public/cli/commands/get-all-record.js +0 -124
- package/esm/public/cli/commands/get-object-at-path.d.ts +0 -8
- package/esm/public/cli/commands/get-object-at-path.js +0 -47
- package/esm/public/cli/commands/get-path-objects-from-root.d.ts +0 -8
- package/esm/public/cli/commands/get-path-objects-from-root.js +0 -57
- package/esm/public/cli/commands/init-empty-repo.d.ts +0 -8
- package/esm/public/cli/commands/init-empty-repo.js +0 -34
- package/esm/public/cli/commands/insert-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/insert-node-at-path.js +0 -34
- package/esm/public/cli/commands/object.d.ts +0 -8
- package/esm/public/cli/commands/ref.d.ts +0 -8
- package/esm/public/cli/commands/ref.js +0 -290
- package/esm/public/cli/commands/remove-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/remove-node-at-path.js +0 -34
- package/esm/public/cli/commands/rev-parse.d.ts +0 -8
- package/esm/public/cli/commands/set-and-commit.d.ts +0 -8
- package/esm/public/cli/commands/set-and-commit.js +0 -34
- package/esm/public/cli/commands/set-data-at-path.d.ts +0 -8
- package/esm/public/cli/commands/set-data-at-path.js +0 -34
- package/esm/public/cli/commands/set-props-and-commit.d.ts +0 -8
- package/esm/public/cli/commands/set-props-and-commit.js +0 -34
- package/esm/public/cli/commands/store.d.ts +0 -8
- package/esm/public/cli/commands/store.js +0 -276
- package/esm/public/cli/commands/update-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/update-node-at-path.js +0 -34
- package/esm/public/cli/commands/usage-snapshot.d.ts +0 -8
- package/esm/public/cli/commands/usage-snapshot.js +0 -314
- package/esm/public/orm/models/agentMessage.d.ts +0 -54
- package/esm/public/orm/models/agentTask.d.ts +0 -54
- package/esm/public/orm/models/agentThread.d.ts +0 -54
- package/esm/public/orm/models/auditLog.d.ts +0 -54
- package/esm/public/orm/models/commit.d.ts +0 -54
- package/esm/public/orm/models/encryptedSecretsModule.d.ts +0 -54
- package/esm/public/orm/models/getAllRecord.d.ts +0 -30
- package/esm/public/orm/models/getAllRecord.js +0 -55
- package/esm/public/orm/models/object.d.ts +0 -54
- package/esm/public/orm/models/object.js +0 -90
- package/esm/public/orm/models/ref.d.ts +0 -54
- package/esm/public/orm/models/ref.js +0 -100
- package/esm/public/orm/models/store.d.ts +0 -54
- package/esm/public/orm/models/usageSnapshot.d.ts +0 -54
- package/esm/public/orm/models/usageSnapshot.js +0 -100
- package/public/cli/commands/agent-message.d.ts +0 -8
- package/public/cli/commands/agent-message.js +0 -326
- package/public/cli/commands/agent-task.d.ts +0 -8
- package/public/cli/commands/agent-task.js +0 -370
- package/public/cli/commands/agent-thread.d.ts +0 -8
- package/public/cli/commands/agent-thread.js +0 -374
- package/public/cli/commands/audit-log.d.ts +0 -8
- package/public/cli/commands/commit.d.ts +0 -8
- package/public/cli/commands/commit.js +0 -382
- package/public/cli/commands/encrypted-secrets-module.d.ts +0 -8
- package/public/cli/commands/freeze-objects.d.ts +0 -8
- package/public/cli/commands/freeze-objects.js +0 -36
- package/public/cli/commands/get-all-objects-from-root.d.ts +0 -8
- package/public/cli/commands/get-all-objects-from-root.js +0 -54
- package/public/cli/commands/get-all-record.d.ts +0 -8
- package/public/cli/commands/get-all-record.js +0 -126
- package/public/cli/commands/get-object-at-path.d.ts +0 -8
- package/public/cli/commands/get-object-at-path.js +0 -49
- package/public/cli/commands/get-path-objects-from-root.d.ts +0 -8
- package/public/cli/commands/get-path-objects-from-root.js +0 -59
- package/public/cli/commands/init-empty-repo.d.ts +0 -8
- package/public/cli/commands/init-empty-repo.js +0 -36
- package/public/cli/commands/insert-node-at-path.d.ts +0 -8
- package/public/cli/commands/insert-node-at-path.js +0 -36
- package/public/cli/commands/object.d.ts +0 -8
- package/public/cli/commands/ref.d.ts +0 -8
- package/public/cli/commands/ref.js +0 -292
- package/public/cli/commands/remove-node-at-path.d.ts +0 -8
- package/public/cli/commands/remove-node-at-path.js +0 -36
- package/public/cli/commands/rev-parse.d.ts +0 -8
- package/public/cli/commands/set-and-commit.d.ts +0 -8
- package/public/cli/commands/set-and-commit.js +0 -36
- package/public/cli/commands/set-data-at-path.d.ts +0 -8
- package/public/cli/commands/set-data-at-path.js +0 -36
- package/public/cli/commands/set-props-and-commit.d.ts +0 -8
- package/public/cli/commands/set-props-and-commit.js +0 -36
- package/public/cli/commands/store.d.ts +0 -8
- package/public/cli/commands/store.js +0 -278
- package/public/cli/commands/update-node-at-path.d.ts +0 -8
- package/public/cli/commands/update-node-at-path.js +0 -36
- package/public/cli/commands/usage-snapshot.d.ts +0 -8
- package/public/cli/commands/usage-snapshot.js +0 -316
- package/public/orm/models/agentMessage.d.ts +0 -54
- package/public/orm/models/agentTask.d.ts +0 -54
- package/public/orm/models/agentThread.d.ts +0 -54
- package/public/orm/models/auditLog.d.ts +0 -54
- package/public/orm/models/auditLog.js +0 -104
- package/public/orm/models/commit.d.ts +0 -54
- package/public/orm/models/commit.js +0 -104
- package/public/orm/models/encryptedSecretsModule.d.ts +0 -54
- package/public/orm/models/getAllRecord.d.ts +0 -30
- package/public/orm/models/getAllRecord.js +0 -59
- package/public/orm/models/object.d.ts +0 -54
- package/public/orm/models/object.js +0 -94
- package/public/orm/models/ref.d.ts +0 -54
- package/public/orm/models/store.d.ts +0 -54
- package/public/orm/models/store.js +0 -104
- package/public/orm/models/usageSnapshot.d.ts +0 -54
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AgentThread
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { extractFirst } from 'inquirerer';
|
|
7
|
-
import { getClient } from '../executor';
|
|
8
|
-
import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
|
|
9
|
-
const fieldSchema = {
|
|
10
|
-
title: 'string',
|
|
11
|
-
mode: 'string',
|
|
12
|
-
model: 'string',
|
|
13
|
-
systemPrompt: 'string',
|
|
14
|
-
id: 'uuid',
|
|
15
|
-
createdAt: 'string',
|
|
16
|
-
updatedAt: 'string',
|
|
17
|
-
ownerId: 'uuid',
|
|
18
|
-
entityId: 'uuid',
|
|
19
|
-
status: 'string',
|
|
20
|
-
};
|
|
21
|
-
const usage = '\nagent-thread <command>\n\nCommands:\n list List agentThread records\n find-first Find first matching agentThread record\n get Get a agentThread by ID\n create Create a new agentThread\n update Update an existing agentThread\n delete Delete a agentThread\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
|
-
export default async (argv, prompter, _options) => {
|
|
23
|
-
if (argv.help || argv.h) {
|
|
24
|
-
console.log(usage);
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
28
|
-
if (!subcommand) {
|
|
29
|
-
const answer = await prompter.prompt(argv, [
|
|
30
|
-
{
|
|
31
|
-
type: 'autocomplete',
|
|
32
|
-
name: 'subcommand',
|
|
33
|
-
message: 'What do you want to do?',
|
|
34
|
-
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
35
|
-
},
|
|
36
|
-
]);
|
|
37
|
-
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
38
|
-
}
|
|
39
|
-
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
40
|
-
};
|
|
41
|
-
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
42
|
-
switch (subcommand) {
|
|
43
|
-
case 'list':
|
|
44
|
-
return handleList(argv, prompter);
|
|
45
|
-
case 'find-first':
|
|
46
|
-
return handleFindFirst(argv, prompter);
|
|
47
|
-
case 'get':
|
|
48
|
-
return handleGet(argv, prompter);
|
|
49
|
-
case 'create':
|
|
50
|
-
return handleCreate(argv, prompter);
|
|
51
|
-
case 'update':
|
|
52
|
-
return handleUpdate(argv, prompter);
|
|
53
|
-
case 'delete':
|
|
54
|
-
return handleDelete(argv, prompter);
|
|
55
|
-
default:
|
|
56
|
-
console.log(usage);
|
|
57
|
-
process.exit(1);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async function handleList(argv, _prompter) {
|
|
61
|
-
try {
|
|
62
|
-
const defaultSelect = {
|
|
63
|
-
title: true,
|
|
64
|
-
mode: true,
|
|
65
|
-
model: true,
|
|
66
|
-
systemPrompt: true,
|
|
67
|
-
id: true,
|
|
68
|
-
createdAt: true,
|
|
69
|
-
updatedAt: true,
|
|
70
|
-
ownerId: true,
|
|
71
|
-
entityId: true,
|
|
72
|
-
status: true,
|
|
73
|
-
};
|
|
74
|
-
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
75
|
-
const client = getClient();
|
|
76
|
-
const result = await client.agentThread.findMany(findManyArgs).execute();
|
|
77
|
-
console.log(JSON.stringify(result, null, 2));
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
console.error('Failed to list records.');
|
|
81
|
-
if (error instanceof Error) {
|
|
82
|
-
console.error(error.message);
|
|
83
|
-
}
|
|
84
|
-
process.exit(1);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async function handleFindFirst(argv, _prompter) {
|
|
88
|
-
try {
|
|
89
|
-
const defaultSelect = {
|
|
90
|
-
title: true,
|
|
91
|
-
mode: true,
|
|
92
|
-
model: true,
|
|
93
|
-
systemPrompt: true,
|
|
94
|
-
id: true,
|
|
95
|
-
createdAt: true,
|
|
96
|
-
updatedAt: true,
|
|
97
|
-
ownerId: true,
|
|
98
|
-
entityId: true,
|
|
99
|
-
status: true,
|
|
100
|
-
};
|
|
101
|
-
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
102
|
-
const client = getClient();
|
|
103
|
-
const result = await client.agentThread.findFirst(findFirstArgs).execute();
|
|
104
|
-
console.log(JSON.stringify(result, null, 2));
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
console.error('Failed to find record.');
|
|
108
|
-
if (error instanceof Error) {
|
|
109
|
-
console.error(error.message);
|
|
110
|
-
}
|
|
111
|
-
process.exit(1);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async function handleGet(argv, prompter) {
|
|
115
|
-
try {
|
|
116
|
-
const answers = await prompter.prompt(argv, [
|
|
117
|
-
{
|
|
118
|
-
type: 'text',
|
|
119
|
-
name: 'id',
|
|
120
|
-
message: 'id',
|
|
121
|
-
required: true,
|
|
122
|
-
},
|
|
123
|
-
]);
|
|
124
|
-
const client = getClient();
|
|
125
|
-
const result = await client.agentThread
|
|
126
|
-
.findOne({
|
|
127
|
-
id: answers.id,
|
|
128
|
-
select: {
|
|
129
|
-
title: true,
|
|
130
|
-
mode: true,
|
|
131
|
-
model: true,
|
|
132
|
-
systemPrompt: true,
|
|
133
|
-
id: true,
|
|
134
|
-
createdAt: true,
|
|
135
|
-
updatedAt: true,
|
|
136
|
-
ownerId: true,
|
|
137
|
-
entityId: true,
|
|
138
|
-
status: true,
|
|
139
|
-
},
|
|
140
|
-
})
|
|
141
|
-
.execute();
|
|
142
|
-
console.log(JSON.stringify(result, null, 2));
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
console.error('Record not found.');
|
|
146
|
-
if (error instanceof Error) {
|
|
147
|
-
console.error(error.message);
|
|
148
|
-
}
|
|
149
|
-
process.exit(1);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
async function handleCreate(argv, prompter) {
|
|
153
|
-
try {
|
|
154
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
155
|
-
{
|
|
156
|
-
type: 'text',
|
|
157
|
-
name: 'title',
|
|
158
|
-
message: 'title',
|
|
159
|
-
required: false,
|
|
160
|
-
skipPrompt: true,
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
type: 'text',
|
|
164
|
-
name: 'mode',
|
|
165
|
-
message: 'mode',
|
|
166
|
-
required: false,
|
|
167
|
-
skipPrompt: true,
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
type: 'text',
|
|
171
|
-
name: 'model',
|
|
172
|
-
message: 'model',
|
|
173
|
-
required: false,
|
|
174
|
-
skipPrompt: true,
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
type: 'text',
|
|
178
|
-
name: 'systemPrompt',
|
|
179
|
-
message: 'systemPrompt',
|
|
180
|
-
required: false,
|
|
181
|
-
skipPrompt: true,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
type: 'text',
|
|
185
|
-
name: 'ownerId',
|
|
186
|
-
message: 'ownerId',
|
|
187
|
-
required: false,
|
|
188
|
-
skipPrompt: true,
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
type: 'text',
|
|
192
|
-
name: 'entityId',
|
|
193
|
-
message: 'entityId',
|
|
194
|
-
required: true,
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type: 'text',
|
|
198
|
-
name: 'status',
|
|
199
|
-
message: 'status',
|
|
200
|
-
required: false,
|
|
201
|
-
skipPrompt: true,
|
|
202
|
-
},
|
|
203
|
-
]);
|
|
204
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
205
|
-
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
206
|
-
const client = getClient();
|
|
207
|
-
const result = await client.agentThread
|
|
208
|
-
.create({
|
|
209
|
-
data: {
|
|
210
|
-
title: cleanedData.title,
|
|
211
|
-
mode: cleanedData.mode,
|
|
212
|
-
model: cleanedData.model,
|
|
213
|
-
systemPrompt: cleanedData.systemPrompt,
|
|
214
|
-
ownerId: cleanedData.ownerId,
|
|
215
|
-
entityId: cleanedData.entityId,
|
|
216
|
-
status: cleanedData.status,
|
|
217
|
-
},
|
|
218
|
-
select: {
|
|
219
|
-
title: true,
|
|
220
|
-
mode: true,
|
|
221
|
-
model: true,
|
|
222
|
-
systemPrompt: true,
|
|
223
|
-
id: true,
|
|
224
|
-
createdAt: true,
|
|
225
|
-
updatedAt: true,
|
|
226
|
-
ownerId: true,
|
|
227
|
-
entityId: true,
|
|
228
|
-
status: true,
|
|
229
|
-
},
|
|
230
|
-
})
|
|
231
|
-
.execute();
|
|
232
|
-
console.log(JSON.stringify(result, null, 2));
|
|
233
|
-
}
|
|
234
|
-
catch (error) {
|
|
235
|
-
console.error('Failed to create record.');
|
|
236
|
-
if (error instanceof Error) {
|
|
237
|
-
console.error(error.message);
|
|
238
|
-
}
|
|
239
|
-
process.exit(1);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
async function handleUpdate(argv, prompter) {
|
|
243
|
-
try {
|
|
244
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
245
|
-
{
|
|
246
|
-
type: 'text',
|
|
247
|
-
name: 'id',
|
|
248
|
-
message: 'id',
|
|
249
|
-
required: true,
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
type: 'text',
|
|
253
|
-
name: 'title',
|
|
254
|
-
message: 'title',
|
|
255
|
-
required: false,
|
|
256
|
-
skipPrompt: true,
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
type: 'text',
|
|
260
|
-
name: 'mode',
|
|
261
|
-
message: 'mode',
|
|
262
|
-
required: false,
|
|
263
|
-
skipPrompt: true,
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
type: 'text',
|
|
267
|
-
name: 'model',
|
|
268
|
-
message: 'model',
|
|
269
|
-
required: false,
|
|
270
|
-
skipPrompt: true,
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
type: 'text',
|
|
274
|
-
name: 'systemPrompt',
|
|
275
|
-
message: 'systemPrompt',
|
|
276
|
-
required: false,
|
|
277
|
-
skipPrompt: true,
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
type: 'text',
|
|
281
|
-
name: 'ownerId',
|
|
282
|
-
message: 'ownerId',
|
|
283
|
-
required: false,
|
|
284
|
-
skipPrompt: true,
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
type: 'text',
|
|
288
|
-
name: 'entityId',
|
|
289
|
-
message: 'entityId',
|
|
290
|
-
required: false,
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: 'text',
|
|
294
|
-
name: 'status',
|
|
295
|
-
message: 'status',
|
|
296
|
-
required: false,
|
|
297
|
-
skipPrompt: true,
|
|
298
|
-
},
|
|
299
|
-
]);
|
|
300
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
301
|
-
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
302
|
-
const client = getClient();
|
|
303
|
-
const result = await client.agentThread
|
|
304
|
-
.update({
|
|
305
|
-
where: {
|
|
306
|
-
id: answers.id,
|
|
307
|
-
},
|
|
308
|
-
data: {
|
|
309
|
-
title: cleanedData.title,
|
|
310
|
-
mode: cleanedData.mode,
|
|
311
|
-
model: cleanedData.model,
|
|
312
|
-
systemPrompt: cleanedData.systemPrompt,
|
|
313
|
-
ownerId: cleanedData.ownerId,
|
|
314
|
-
entityId: cleanedData.entityId,
|
|
315
|
-
status: cleanedData.status,
|
|
316
|
-
},
|
|
317
|
-
select: {
|
|
318
|
-
title: true,
|
|
319
|
-
mode: true,
|
|
320
|
-
model: true,
|
|
321
|
-
systemPrompt: true,
|
|
322
|
-
id: true,
|
|
323
|
-
createdAt: true,
|
|
324
|
-
updatedAt: true,
|
|
325
|
-
ownerId: true,
|
|
326
|
-
entityId: true,
|
|
327
|
-
status: true,
|
|
328
|
-
},
|
|
329
|
-
})
|
|
330
|
-
.execute();
|
|
331
|
-
console.log(JSON.stringify(result, null, 2));
|
|
332
|
-
}
|
|
333
|
-
catch (error) {
|
|
334
|
-
console.error('Failed to update record.');
|
|
335
|
-
if (error instanceof Error) {
|
|
336
|
-
console.error(error.message);
|
|
337
|
-
}
|
|
338
|
-
process.exit(1);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
async function handleDelete(argv, prompter) {
|
|
342
|
-
try {
|
|
343
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
344
|
-
{
|
|
345
|
-
type: 'text',
|
|
346
|
-
name: 'id',
|
|
347
|
-
message: 'id',
|
|
348
|
-
required: true,
|
|
349
|
-
},
|
|
350
|
-
]);
|
|
351
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
352
|
-
const client = getClient();
|
|
353
|
-
const result = await client.agentThread
|
|
354
|
-
.delete({
|
|
355
|
-
where: {
|
|
356
|
-
id: answers.id,
|
|
357
|
-
},
|
|
358
|
-
select: {
|
|
359
|
-
id: true,
|
|
360
|
-
},
|
|
361
|
-
})
|
|
362
|
-
.execute();
|
|
363
|
-
console.log(JSON.stringify(result, null, 2));
|
|
364
|
-
}
|
|
365
|
-
catch (error) {
|
|
366
|
-
console.error('Failed to delete record.');
|
|
367
|
-
if (error instanceof Error) {
|
|
368
|
-
console.error(error.message);
|
|
369
|
-
}
|
|
370
|
-
process.exit(1);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AuditLog
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
-
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for Commit
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
-
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
-
export default _default;
|