@copado/agentia-cli 0.43.0-alpha.0 → 0.46.0-alpha.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/README.md +506 -113
- package/dist/commands/ai/agent/ask.d.ts +28 -0
- package/dist/commands/ai/agent/ask.js +131 -0
- package/dist/commands/ai/agent/ask.js.map +1 -0
- package/dist/commands/ai/agent/chat.d.ts +29 -0
- package/dist/commands/ai/agent/chat.js +97 -0
- package/dist/commands/ai/agent/chat.js.map +1 -0
- package/dist/commands/ai/quota/get.d.ts +14 -0
- package/dist/commands/ai/quota/get.js +23 -0
- package/dist/commands/ai/quota/get.js.map +1 -0
- package/dist/commands/ai/workspace/create.d.ts +17 -0
- package/dist/commands/ai/workspace/create.js +41 -0
- package/dist/commands/ai/workspace/create.js.map +1 -0
- package/dist/commands/ai/workspace/get.d.ts +17 -0
- package/dist/commands/ai/workspace/get.js +37 -0
- package/dist/commands/ai/workspace/get.js.map +1 -0
- package/dist/commands/ai/workspace/list.d.ts +16 -0
- package/dist/commands/ai/workspace/list.js +28 -0
- package/dist/commands/ai/workspace/list.js.map +1 -0
- package/dist/commands/ai/workspace/member/invite.d.ts +19 -0
- package/dist/commands/ai/workspace/member/invite.js +45 -0
- package/dist/commands/ai/workspace/member/invite.js.map +1 -0
- package/dist/commands/ai/workspace/member/list.d.ts +20 -0
- package/dist/commands/ai/workspace/member/list.js +36 -0
- package/dist/commands/ai/workspace/member/list.js.map +1 -0
- package/dist/commands/ai/workspace/update.d.ts +22 -0
- package/dist/commands/ai/workspace/update.js +62 -0
- package/dist/commands/ai/workspace/update.js.map +1 -0
- package/dist/commands/auth/get.d.ts +3 -0
- package/dist/commands/auth/get.js +46 -1
- package/dist/commands/auth/get.js.map +1 -1
- package/dist/commands/auth/set.d.ts +5 -0
- package/dist/commands/auth/set.js +39 -0
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/auth/unset.d.ts +1 -0
- package/dist/commands/auth/unset.js +4 -0
- package/dist/commands/auth/unset.js.map +1 -1
- package/dist/lib/ai-chat-session.d.ts +17 -0
- package/dist/lib/ai-chat-session.js +149 -0
- package/dist/lib/ai-chat-session.js.map +1 -0
- package/dist/lib/ai-config.d.ts +26 -0
- package/dist/lib/ai-config.js +113 -0
- package/dist/lib/ai-config.js.map +1 -0
- package/dist/lib/ai-flags.d.ts +16 -0
- package/dist/lib/ai-flags.js +28 -0
- package/dist/lib/ai-flags.js.map +1 -0
- package/dist/lib/ai-gateway.d.ts +52 -0
- package/dist/lib/ai-gateway.js +324 -0
- package/dist/lib/ai-gateway.js.map +1 -0
- package/dist/lib/ai-operations.d.ts +26 -0
- package/dist/lib/ai-operations.js +177 -0
- package/dist/lib/ai-operations.js.map +1 -0
- package/dist/lib/ai-stream-parser.d.ts +12 -0
- package/dist/lib/ai-stream-parser.js +59 -0
- package/dist/lib/ai-stream-parser.js.map +1 -0
- package/dist/lib/ai-terminal-renderer.d.ts +17 -0
- package/dist/lib/ai-terminal-renderer.js +83 -0
- package/dist/lib/ai-terminal-renderer.js.map +1 -0
- package/dist/lib/ai-types.d.ts +127 -0
- package/dist/lib/ai-types.js +133 -0
- package/dist/lib/ai-types.js.map +1 -0
- package/dist/lib/auth-config.d.ts +21 -0
- package/dist/lib/auth-config.js +158 -6
- package/dist/lib/auth-config.js.map +1 -1
- package/dist/lib/credential-store.d.ts +13 -1
- package/dist/lib/credential-store.js +47 -2
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/mcp/ai-tools.d.ts +22 -0
- package/dist/lib/mcp/ai-tools.js +45 -0
- package/dist/lib/mcp/ai-tools.js.map +1 -0
- package/dist/lib/mcp/tools.d.ts +16 -2
- package/dist/lib/mcp/tools.js +3 -0
- package/dist/lib/mcp/tools.js.map +1 -1
- package/oclif.manifest.json +1302 -335
- package/package.json +16 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Interfaces } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
export default class AiAgentAsk extends AgentiaCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
build: Interfaces.BooleanFlag<boolean>;
|
|
8
|
+
component: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
9
|
+
dialogue: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
10
|
+
domain: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
11
|
+
'gateway-url': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
12
|
+
'no-stream': Interfaces.BooleanFlag<boolean>;
|
|
13
|
+
operate: Interfaces.BooleanFlag<boolean>;
|
|
14
|
+
org: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
|
|
15
|
+
pat: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
16
|
+
plan: Interfaces.BooleanFlag<boolean>;
|
|
17
|
+
prompt: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
18
|
+
release: Interfaces.BooleanFlag<boolean>;
|
|
19
|
+
'sf-org': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
20
|
+
test: Interfaces.BooleanFlag<boolean>;
|
|
21
|
+
timeout: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
|
|
22
|
+
'user-story': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
23
|
+
'work-item': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
24
|
+
workspace: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
25
|
+
};
|
|
26
|
+
run(): Promise<import("../../../lib/ai-types.js").AiAskResult>;
|
|
27
|
+
private resolveAgent;
|
|
28
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { runAiAsk } from '../../../lib/ai-operations.js';
|
|
4
|
+
import { formatAiTerminalMessage, renderMarkdown, StreamingMarkdownRenderer, streamSupportsColor, } from '../../../lib/ai-terminal-renderer.js';
|
|
5
|
+
import { AI_ASK_AGENTS } from '../../../lib/ai-types.js';
|
|
6
|
+
export default class AiAgentAsk extends AgentiaCommand {
|
|
7
|
+
static description = 'Send a single-turn prompt to a Copado AI agent';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %> --plan -p "Break this requirement into implementation steps"',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --build -p "Generate an Apex handler outline" --sf-org test14 --user-story US-1042',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --test -p "Create regression checks" --component LeadScoringHandler --json',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --operate -p "Diagnose this deployment error" --timeout 240',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
build: Flags.boolean({
|
|
16
|
+
description: 'Target the Build agent',
|
|
17
|
+
}),
|
|
18
|
+
component: Flags.string({
|
|
19
|
+
description: 'Metadata component name to include in prompt context',
|
|
20
|
+
}),
|
|
21
|
+
dialogue: Flags.string({
|
|
22
|
+
description: 'Copado AI dialogue UUID to reuse',
|
|
23
|
+
}),
|
|
24
|
+
domain: Flags.string({
|
|
25
|
+
description: 'Copado AI domain hostname used to derive the gateway URL, for example robotic.copado.com',
|
|
26
|
+
}),
|
|
27
|
+
'gateway-url': Flags.string({
|
|
28
|
+
description: 'Full Copado AI gateway base URL used instead of deriving from domain and organization; HTTP is allowed for local testing',
|
|
29
|
+
}),
|
|
30
|
+
'no-stream': Flags.boolean({
|
|
31
|
+
default: false,
|
|
32
|
+
description: 'Buffer the full response before printing in human mode',
|
|
33
|
+
}),
|
|
34
|
+
operate: Flags.boolean({
|
|
35
|
+
description: 'Target the Operate agent',
|
|
36
|
+
}),
|
|
37
|
+
org: Flags.integer({
|
|
38
|
+
description: 'Copado AI organization ID used with --domain',
|
|
39
|
+
}),
|
|
40
|
+
pat: Flags.string({
|
|
41
|
+
description: 'Copado AI PAT token override',
|
|
42
|
+
}),
|
|
43
|
+
plan: Flags.boolean({
|
|
44
|
+
description: 'Target the Plan agent',
|
|
45
|
+
}),
|
|
46
|
+
prompt: Flags.string({
|
|
47
|
+
char: 'p',
|
|
48
|
+
description: 'Natural language instruction for the agent',
|
|
49
|
+
required: true,
|
|
50
|
+
}),
|
|
51
|
+
release: Flags.boolean({
|
|
52
|
+
description: 'Target the Release agent',
|
|
53
|
+
}),
|
|
54
|
+
'sf-org': Flags.string({
|
|
55
|
+
description: 'Salesforce org or environment name to include in prompt context',
|
|
56
|
+
}),
|
|
57
|
+
test: Flags.boolean({
|
|
58
|
+
description: 'Target the Test agent',
|
|
59
|
+
}),
|
|
60
|
+
timeout: Flags.integer({
|
|
61
|
+
description: 'AI gateway timeout in seconds for workspace, dialogue, and message calls',
|
|
62
|
+
}),
|
|
63
|
+
'user-story': Flags.string({
|
|
64
|
+
description: 'User story identifier to include in prompt context',
|
|
65
|
+
}),
|
|
66
|
+
'work-item': Flags.string({
|
|
67
|
+
description: 'Work item identifier to include in prompt context',
|
|
68
|
+
}),
|
|
69
|
+
workspace: Flags.string({
|
|
70
|
+
description: 'Copado AI workspace UUID to reuse for a new dialogue',
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
async run() {
|
|
74
|
+
const { flags } = await this.parse(AiAgentAsk);
|
|
75
|
+
const agent = this.resolveAgent(flags);
|
|
76
|
+
const options = {
|
|
77
|
+
agent,
|
|
78
|
+
component: flags.component,
|
|
79
|
+
dialogue: flags.dialogue,
|
|
80
|
+
domain: flags.domain,
|
|
81
|
+
gatewayUrl: flags['gateway-url'],
|
|
82
|
+
org: flags.org,
|
|
83
|
+
pat: flags.pat,
|
|
84
|
+
prompt: flags.prompt,
|
|
85
|
+
sfOrg: flags['sf-org'],
|
|
86
|
+
timeoutMs: flags.timeout === undefined ? undefined : flags.timeout * 1000,
|
|
87
|
+
userStory: flags['user-story'],
|
|
88
|
+
workItem: flags['work-item'],
|
|
89
|
+
workspace: flags.workspace,
|
|
90
|
+
};
|
|
91
|
+
const shouldStream = !this.jsonEnabled() && !flags['no-stream'];
|
|
92
|
+
const stdoutColors = streamSupportsColor(process.stdout);
|
|
93
|
+
const stderrColors = streamSupportsColor(process.stderr);
|
|
94
|
+
const renderer = shouldStream ? new StreamingMarkdownRenderer({ colors: stdoutColors }) : undefined;
|
|
95
|
+
const result = await runAiAsk(options, {
|
|
96
|
+
onStatus: shouldStream ? (status) => process.stderr.write(`${formatAiTerminalMessage(status, 'status', { colors: stderrColors })}\n`) : undefined,
|
|
97
|
+
onToken: shouldStream ? (token) => renderer?.write(process.stdout, token) : undefined,
|
|
98
|
+
onWarning: shouldStream ? (warning) => process.stderr.write(`${formatAiTerminalMessage(warning, 'warning', { colors: stderrColors })}\n`) : undefined,
|
|
99
|
+
});
|
|
100
|
+
this.display(() => {
|
|
101
|
+
if (shouldStream && renderer?.wroteOutput() === true)
|
|
102
|
+
renderer.finish(process.stdout);
|
|
103
|
+
if (!shouldStream)
|
|
104
|
+
this.log(renderMarkdown(result.content, { colors: stdoutColors }));
|
|
105
|
+
for (const warning of result.warnings)
|
|
106
|
+
this.warn(formatAiTerminalMessage(warning, 'warning', { colors: stderrColors }));
|
|
107
|
+
if (result.followups.length > 0) {
|
|
108
|
+
this.log(renderMarkdown('### Follow-ups', { colors: stdoutColors }));
|
|
109
|
+
for (const followup of result.followups)
|
|
110
|
+
this.log(renderMarkdown(`- ${followup.content}`, { colors: stdoutColors }));
|
|
111
|
+
}
|
|
112
|
+
if (result.links.length > 0) {
|
|
113
|
+
this.log(renderMarkdown('### Links', { colors: stdoutColors }));
|
|
114
|
+
for (const link of result.links) {
|
|
115
|
+
const label = link.title ?? link.url ?? 'Related link';
|
|
116
|
+
const target = link.url === undefined ? label : `${label}: ${link.url}`;
|
|
117
|
+
this.log(renderMarkdown(`- ${target}`, { colors: stdoutColors }));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
resolveAgent(flags) {
|
|
124
|
+
const selected = AI_ASK_AGENTS.filter((agent) => flags[agent] === true);
|
|
125
|
+
if (selected.length !== 1) {
|
|
126
|
+
this.error('Exactly one AI agent flag is required: --plan, --build, --test, --release, or --operate.', { exit: 2 });
|
|
127
|
+
}
|
|
128
|
+
return selected[0];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=ask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../../../../src/commands/ai/agent/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAa,MAAM,aAAa,CAAA;AAE7C,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAoB,QAAQ,EAAC,MAAM,+BAA+B,CAAA;AACzE,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAC,aAAa,EAAe,MAAM,0BAA0B,CAAA;AAEpE,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,cAAc;IACpD,MAAM,CAAU,WAAW,GAAG,gDAAgD,CAAA;IAC9E,MAAM,CAAU,QAAQ,GAAG;QACzB,kGAAkG;QAClG,wHAAwH;QACxH,gHAAgH;QAChH,iGAAiG;KAClG,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;YACnB,WAAW,EAAE,wBAAwB;SACtC,CAAC;QACF,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,sDAAsD;SACpE,CAAC;QACF,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,k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AC;QAED,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAA;IACpB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Interfaces } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { type AiChatSessionResult } from '../../../lib/ai-chat-session.js';
|
|
4
|
+
export default class AiAgentChat extends AgentiaCommand {
|
|
5
|
+
static description: string;
|
|
6
|
+
static enableJsonFlag: boolean;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
build: Interfaces.BooleanFlag<boolean>;
|
|
10
|
+
component: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
11
|
+
dialogue: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
12
|
+
domain: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
13
|
+
'gateway-url': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
14
|
+
operate: Interfaces.BooleanFlag<boolean>;
|
|
15
|
+
orchestrate: Interfaces.BooleanFlag<boolean>;
|
|
16
|
+
org: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
|
|
17
|
+
pat: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
18
|
+
plan: Interfaces.BooleanFlag<boolean>;
|
|
19
|
+
release: Interfaces.BooleanFlag<boolean>;
|
|
20
|
+
'sf-org': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
21
|
+
test: Interfaces.BooleanFlag<boolean>;
|
|
22
|
+
timeout: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
|
|
23
|
+
'user-story': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
24
|
+
'work-item': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
25
|
+
workspace: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
26
|
+
};
|
|
27
|
+
run(): Promise<AiChatSessionResult>;
|
|
28
|
+
private resolveAgent;
|
|
29
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { stdin as input } from 'node:process';
|
|
3
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
4
|
+
import { runAiChatSession } from '../../../lib/ai-chat-session.js';
|
|
5
|
+
import { AI_CHAT_AGENTS } from '../../../lib/ai-types.js';
|
|
6
|
+
export default class AiAgentChat extends AgentiaCommand {
|
|
7
|
+
static description = 'Start an interactive Copado AI agent chat session';
|
|
8
|
+
static enableJsonFlag = false;
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --plan --sf-org test14',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --build --user-story US-1042 --timeout 240',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --orchestrate --workspace 42d0b908-37b7-4565-9ec9-86eda40c9782',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
build: Flags.boolean({
|
|
16
|
+
description: 'Target the Build agent',
|
|
17
|
+
}),
|
|
18
|
+
component: Flags.string({
|
|
19
|
+
description: 'Metadata component name to include in prompt context',
|
|
20
|
+
}),
|
|
21
|
+
dialogue: Flags.string({
|
|
22
|
+
description: 'Copado AI dialogue UUID to reuse',
|
|
23
|
+
}),
|
|
24
|
+
domain: Flags.string({
|
|
25
|
+
description: 'Copado AI domain hostname used to derive the gateway URL, for example robotic.copado.com',
|
|
26
|
+
}),
|
|
27
|
+
'gateway-url': Flags.string({
|
|
28
|
+
description: 'Full Copado AI gateway base URL used instead of deriving from domain and organization; HTTP is allowed for local testing',
|
|
29
|
+
}),
|
|
30
|
+
operate: Flags.boolean({
|
|
31
|
+
description: 'Target the Operate agent',
|
|
32
|
+
}),
|
|
33
|
+
orchestrate: Flags.boolean({
|
|
34
|
+
description: 'Target the Orchestrate agent',
|
|
35
|
+
}),
|
|
36
|
+
org: Flags.integer({
|
|
37
|
+
description: 'Copado AI organization ID used with --domain',
|
|
38
|
+
}),
|
|
39
|
+
pat: Flags.string({
|
|
40
|
+
description: 'Copado AI PAT token override',
|
|
41
|
+
}),
|
|
42
|
+
plan: Flags.boolean({
|
|
43
|
+
description: 'Target the Plan agent',
|
|
44
|
+
}),
|
|
45
|
+
release: Flags.boolean({
|
|
46
|
+
description: 'Target the Release agent',
|
|
47
|
+
}),
|
|
48
|
+
'sf-org': Flags.string({
|
|
49
|
+
description: 'Salesforce org or environment name to include in prompt context',
|
|
50
|
+
}),
|
|
51
|
+
test: Flags.boolean({
|
|
52
|
+
description: 'Target the Test agent',
|
|
53
|
+
}),
|
|
54
|
+
timeout: Flags.integer({
|
|
55
|
+
description: 'AI gateway timeout in seconds for workspace, dialogue, and message calls',
|
|
56
|
+
}),
|
|
57
|
+
'user-story': Flags.string({
|
|
58
|
+
description: 'User story identifier to include in prompt context',
|
|
59
|
+
}),
|
|
60
|
+
'work-item': Flags.string({
|
|
61
|
+
description: 'Work item identifier to include in prompt context',
|
|
62
|
+
}),
|
|
63
|
+
workspace: Flags.string({
|
|
64
|
+
description: 'Copado AI workspace UUID to reuse for a new dialogue',
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
async run() {
|
|
68
|
+
const { flags } = await this.parse(AiAgentChat);
|
|
69
|
+
if (!input.isTTY) {
|
|
70
|
+
this.error('AI chat requires an interactive terminal. Use `agentia ai agent ask` for headless prompts.', { exit: 2 });
|
|
71
|
+
}
|
|
72
|
+
const agent = this.resolveAgent(flags);
|
|
73
|
+
const options = {
|
|
74
|
+
agent,
|
|
75
|
+
component: flags.component,
|
|
76
|
+
dialogue: flags.dialogue,
|
|
77
|
+
domain: flags.domain,
|
|
78
|
+
gatewayUrl: flags['gateway-url'],
|
|
79
|
+
org: flags.org,
|
|
80
|
+
pat: flags.pat,
|
|
81
|
+
sfOrg: flags['sf-org'],
|
|
82
|
+
timeoutMs: flags.timeout === undefined ? undefined : flags.timeout * 1000,
|
|
83
|
+
userStory: flags['user-story'],
|
|
84
|
+
workItem: flags['work-item'],
|
|
85
|
+
workspace: flags.workspace,
|
|
86
|
+
};
|
|
87
|
+
return runAiChatSession(options);
|
|
88
|
+
}
|
|
89
|
+
resolveAgent(flags) {
|
|
90
|
+
const selected = AI_CHAT_AGENTS.filter((agent) => flags[agent] === true);
|
|
91
|
+
if (selected.length !== 1) {
|
|
92
|
+
this.error('Exactly one AI agent flag is required: --plan, --build, --test, --release, --operate, or --orchestrate.', { exit: 2 });
|
|
93
|
+
}
|
|
94
|
+
return selected[0];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=chat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../src/commands/ai/agent/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAa,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAC,KAAK,IAAI,KAAK,EAAC,MAAM,cAAc,CAAA;AAE3C,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAsD,gBAAgB,EAAC,MAAM,iCAAiC,CAAA;AACrH,OAAO,EAAC,cAAc,EAAe,MAAM,0BAA0B,CAAA;AAErE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IACrD,MAAM,CAAU,WAAW,GAAG,mDAAmD,CAAA;IACjF,MAAM,CAAU,cAAc,GAAG,KAAK,CAAA;IACtC,MAAM,CAAU,QAAQ,GAAG;QACzB,4DAA4D;QAC5D,gFAAgF;QAChF,oGAAoG;KACrG,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;YACnB,WAAW,EAAE,wBAAwB;SACtC,CAAC;QACF,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,sDAAsD;SACpE,CAAC;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O,QAAQ,CAAC,CAAC,CAAC,CAAA;IACpB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type AiOrganizationQuota } from '../../../lib/ai-types.js';
|
|
3
|
+
export default class AiQuotaGet extends AgentiaCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<AiOrganizationQuota>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { aiConnectionFlags, aiGatewayCallOptions } from '../../../lib/ai-flags.js';
|
|
3
|
+
import { AiGateway } from '../../../lib/ai-gateway.js';
|
|
4
|
+
export default class AiQuotaGet extends AgentiaCommand {
|
|
5
|
+
static description = 'Get Copado AI organization quota';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --domain robotic.copado.com --org 42888 --json',
|
|
9
|
+
];
|
|
10
|
+
static flags = {
|
|
11
|
+
...aiConnectionFlags,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags } = await this.parse(AiQuotaGet);
|
|
15
|
+
const quota = await this.withSpinner('Loading AI quota', () => AiGateway.getOrganizationQuota(aiGatewayCallOptions(flags)));
|
|
16
|
+
this.display(() => {
|
|
17
|
+
this.log(`AI quota usage: ${quota.usage}/${quota.limit}`);
|
|
18
|
+
this.log(`Remaining: ${Math.max(0, quota.limit - quota.usage)}`);
|
|
19
|
+
});
|
|
20
|
+
return quota;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/ai/quota/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAA;AAGpD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,cAAc;IACpD,MAAM,CAAU,WAAW,GAAG,kCAAkC,CAAA;IAChE,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,oFAAoF;KACrF,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,iBAAiB;KACrB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAC5C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAC5D,SAAS,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAC5D,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,mBAAmB,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,CAAA;YACzD,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAClE,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type AiWorkspace } from '../../../lib/ai-types.js';
|
|
3
|
+
export default class AiWorkspaceCreate extends AgentiaCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
capability: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<AiWorkspace>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { aiConnectionFlags, aiGatewayCallOptions } from '../../../lib/ai-flags.js';
|
|
4
|
+
import { AiGateway } from '../../../lib/ai-gateway.js';
|
|
5
|
+
import { AI_WORKSPACE_CAPABILITIES } from '../../../lib/ai-types.js';
|
|
6
|
+
export default class AiWorkspaceCreate extends AgentiaCommand {
|
|
7
|
+
static description = 'Create a Copado AI workspace';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %> --name "Agentia CLI"',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --name "Agentia CLI" --description "CLI workspace" --capability Reasoning --capability CustomKnowledge',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...aiConnectionFlags,
|
|
14
|
+
capability: Flags.string({
|
|
15
|
+
description: 'Workspace capability. Can be provided multiple times.',
|
|
16
|
+
multiple: true,
|
|
17
|
+
options: [...AI_WORKSPACE_CAPABILITIES],
|
|
18
|
+
}),
|
|
19
|
+
description: Flags.string({
|
|
20
|
+
description: 'Workspace description.',
|
|
21
|
+
}),
|
|
22
|
+
name: Flags.string({
|
|
23
|
+
description: 'Workspace name.',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
async run() {
|
|
28
|
+
const { flags } = await this.parse(AiWorkspaceCreate);
|
|
29
|
+
const workspace = await this.withSpinner('Creating AI workspace', () => AiGateway.createWorkspace({
|
|
30
|
+
capabilities: flags.capability,
|
|
31
|
+
description: flags.description,
|
|
32
|
+
name: flags.name,
|
|
33
|
+
}, aiGatewayCallOptions(flags)));
|
|
34
|
+
this.display(() => {
|
|
35
|
+
this.log(`Created AI workspace: ${workspace.name ?? flags.name}`);
|
|
36
|
+
this.log(`ID: ${workspace.id}`);
|
|
37
|
+
});
|
|
38
|
+
return workspace;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/ai/workspace/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK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GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,yBAAyB,SAAS,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;YACjE,IAAI,CAAC,GAAG,CAAC,OAAO,SAAS,CAAC,EAAE,EAAE,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;QAEF,OAAO,SAAS,CAAA;IAClB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type AiWorkspace } from '../../../lib/ai-types.js';
|
|
3
|
+
export default class AiWorkspaceGet extends AgentiaCommand {
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<AiWorkspace>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { aiConnectionFlags, aiGatewayCallOptions } from '../../../lib/ai-flags.js';
|
|
4
|
+
import { AiGateway } from '../../../lib/ai-gateway.js';
|
|
5
|
+
export default class AiWorkspaceGet extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.string({
|
|
8
|
+
description: 'Copado AI workspace UUID.',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Get a Copado AI workspace';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> 42d0b908-37b7-4565-9ec9-86eda40c9782',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> 42d0b908-37b7-4565-9ec9-86eda40c9782 --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...aiConnectionFlags,
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
const { args, flags } = await this.parse(AiWorkspaceGet);
|
|
22
|
+
const workspace = await this.withSpinner('Loading AI workspace', () => AiGateway.getWorkspace(args.id, aiGatewayCallOptions(flags)));
|
|
23
|
+
this.display(() => {
|
|
24
|
+
this.log(`AI workspace: ${workspace.name ?? '(unnamed)'}`);
|
|
25
|
+
this.log(`ID: ${workspace.id}`);
|
|
26
|
+
if (typeof workspace.description === 'string' && workspace.description.length > 0) {
|
|
27
|
+
this.log(`Description: ${workspace.description}`);
|
|
28
|
+
}
|
|
29
|
+
if (Array.isArray(workspace.members))
|
|
30
|
+
this.log(`Members: ${workspace.members.length}`);
|
|
31
|
+
if (Array.isArray(workspace.datasets))
|
|
32
|
+
this.log(`Datasets: ${workspace.datasets.length}`);
|
|
33
|
+
});
|
|
34
|
+
return workspace;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/ai/workspace/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,iBAAiB,EAAE,oB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,GAAG,CAAC,YAAY,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;YACtF,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;gBAAE,IAAI,CAAC,GAAG,CAAC,aAAa,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAC3F,CAAC,CAAC,CAAA;QAEF,OAAO,SAAS,CAAA;IAClB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type AiWorkspaceSummary } from '../../../lib/ai-types.js';
|
|
3
|
+
export default class AiWorkspaceList extends AgentiaCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<{
|
|
14
|
+
workspaces: AiWorkspaceSummary[];
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { aiConnectionFlags, aiGatewayCallOptions } from '../../../lib/ai-flags.js';
|
|
3
|
+
import { AiGateway } from '../../../lib/ai-gateway.js';
|
|
4
|
+
export default class AiWorkspaceList extends AgentiaCommand {
|
|
5
|
+
static description = 'List Copado AI workspaces';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --domain robotic.copado.com --org 42888 --json',
|
|
9
|
+
];
|
|
10
|
+
static flags = {
|
|
11
|
+
...aiConnectionFlags,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags } = await this.parse(AiWorkspaceList);
|
|
15
|
+
const workspaces = await this.withSpinner('Loading AI workspaces', () => AiGateway.listWorkspaces(aiGatewayCallOptions(flags)));
|
|
16
|
+
this.display(() => {
|
|
17
|
+
if (workspaces.length === 0) {
|
|
18
|
+
this.log('No AI workspaces found.');
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
for (const workspace of workspaces) {
|
|
22
|
+
this.log(`${workspace.id} ${workspace.name ?? '(unnamed)'}`);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return { workspaces };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/ai/workspace/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAA;AAGpD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;IACzD,MAAM,CAAU,WAAW,GAAG,2BAA2B,CAAA;IACzD,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,oFAAoF;KACrF,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,iBAAiB;KACrB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QACjD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,EAAE,CACtE,SAAS,CAAC,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CACtD,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;gBACnC,OAAM;YACR,CAAC;YAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;gBACnC,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,KAAK,SAAS,CAAC,IAAI,IAAI,WAAW,EAAE,CAAC,CAAA;YAC/D,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,EAAC,UAAU,EAAC,CAAA;IACrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
2
|
+
import { type AiWorkspaceMember } from '../../../../lib/ai-types.js';
|
|
3
|
+
export default class AiWorkspaceMemberInvite extends AgentiaCommand {
|
|
4
|
+
static args: {
|
|
5
|
+
workspace: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
permission: import("@oclif/core/interfaces").OptionFlag<"Access" | "Manage", import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'user-id': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<AiWorkspaceMember>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { aiConnectionFlags, aiGatewayCallOptions } from '../../../../lib/ai-flags.js';
|
|
4
|
+
import { AiGateway } from '../../../../lib/ai-gateway.js';
|
|
5
|
+
import { AI_WORKSPACE_MEMBER_PERMISSIONS } from '../../../../lib/ai-types.js';
|
|
6
|
+
export default class AiWorkspaceMemberInvite extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
workspace: Args.string({
|
|
9
|
+
description: 'Copado AI workspace UUID.',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Invite a member to a Copado AI workspace';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> 42d0b908-37b7-4565-9ec9-86eda40c9782 --user-id 12345 --permission Access',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> 42d0b908-37b7-4565-9ec9-86eda40c9782 --user-id 12345 --permission Manage --json',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
...aiConnectionFlags,
|
|
20
|
+
permission: Flags.option({
|
|
21
|
+
description: 'Workspace permission for the invited member.',
|
|
22
|
+
options: [...AI_WORKSPACE_MEMBER_PERMISSIONS],
|
|
23
|
+
required: true,
|
|
24
|
+
})(),
|
|
25
|
+
'user-id': Flags.integer({
|
|
26
|
+
description: 'Copado AI user ID to invite.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
async run() {
|
|
31
|
+
const { args, flags } = await this.parse(AiWorkspaceMemberInvite);
|
|
32
|
+
const member = await this.withSpinner('Inviting AI workspace member', () => AiGateway.createWorkspaceMember(args.workspace, {
|
|
33
|
+
permission: flags.permission,
|
|
34
|
+
'user_id': flags['user-id'],
|
|
35
|
+
}, aiGatewayCallOptions(flags)));
|
|
36
|
+
this.display(() => {
|
|
37
|
+
const { 'user_id': userId } = member;
|
|
38
|
+
this.log(`Invited AI workspace member: ${member.id}`);
|
|
39
|
+
this.log(`User ID: ${userId ?? flags['user-id']}`);
|
|
40
|
+
this.log(`Permission: ${member.permission ?? flags.permission}`);
|
|
41
|
+
});
|
|
42
|
+
return member;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=invite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../../../src/commands/ai/workspace/member/invite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,6BAA6B,CAAA;AACnF,OAAO,EAAC,SAAS,EAAC,MAAM,+BAA+B,CAAA;AACvD,OAAO,EAAC,+BAA+B,EAAyB,MAAM,6BAA6B,CAAA;AAEnG,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,cAAc;IACjE,MAAM,CAAU,IAAI,GAAG;QACrB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,0CAA0C,CAAA;IACxE,MAAM,CAAU,QAAQ,GAAG;QACzB,8GAA8G;QA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ia-command.js';
|
|
2
|
+
import { type AiWorkspaceMember } from '../../../../lib/ai-types.js';
|
|
3
|
+
export default class AiWorkspaceMemberList extends AgentiaCommand {
|
|
4
|
+
static args: {
|
|
5
|
+
workspace: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'gateway-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<{
|
|
17
|
+
members: AiWorkspaceMember[];
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|