aiframe-agent-cli 1.0.0 → 1.0.2

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.
@@ -11,7 +11,7 @@ async function initCommand() {
11
11
  }
12
12
  try {
13
13
  console.log(picocolors.blue("\u{1F680} Bootstrapping .aiframe project structure..."));
14
- const dirs = ["agents", "tools", "workflows", "instructions", "skills", "state", "output"];
14
+ const dirs = ["agents", "tools", "workflows", "instructions", "skills", "state", "output", "workspaces"];
15
15
  for (const dir of dirs) {
16
16
  await fs.ensureDir(path.join(aiframeDir, dir));
17
17
  }
@@ -112,6 +112,7 @@ D\u01B0\u1EDBi \u0111\xE2y l\xE0 c\u1EA5u tr\xFAc th\u01B0 m\u1EE5c \`.aiframe\`
112
112
  - \`.aiframe/tools/\`: \u0110\u1ECBnh ngh\u0129a mapping c\xF4ng c\u1EE5 CLI \u0111\u1EC3 Agent c\xF3 th\u1EC3 g\u1ECDi an to\xE0n.
113
113
  - \`.aiframe/skills/\`: N\u01A1i ch\u1EE9a t\xE0i li\u1EC7u k\u1EF9 n\u0103ng (.md) \u0111\u1EC3 chia s\u1EBB ki\u1EBFn th\u1EE9c cho Agent.
114
114
  - \`.aiframe/output/\`: Th\u01B0 m\u1EE5c ch\u1EE9a c\xE1c file sinh ra t\u1EEB AI (\u0111\u01B0\u1EE3c ph\xE2n c\xE1ch theo m\xE3 Execution ID c\u1EE7a m\u1ED7i lu\u1ED3ng ch\u1EA1y).
115
+ - \`.aiframe/workspaces/\`: N\u01A1i ch\u1EE9a Git Worktree c\xF4 l\u1EADp c\u1EE7a t\u1EEBng Agent (sinh ra t\u1EF1 \u0111\u1ED9ng khi b\u1EADt \`isolate_workspace: true\`).
115
116
  - \`.aiframe/state/\`: (N\u1ED9i b\u1ED9) Ch\u1EE9a l\u1ECBch s\u1EED ch\u1EA1y v\xE0 checkpoint.
116
117
 
117
118
  ## C\xE1ch s\u1EED d\u1EE5ng c\u01A1 b\u1EA3n
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  initCommand,
4
4
  runCommand,
5
5
  uiCommand
6
- } from "./chunk-7NQAVI47.js";
6
+ } from "./chunk-QJ52BUVU.js";
7
7
 
8
8
  // src/cli.ts
9
9
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  runCommand,
9
9
  startServer,
10
10
  uiCommand
11
- } from "./chunk-7NQAVI47.js";
11
+ } from "./chunk-QJ52BUVU.js";
12
12
  export {
13
13
  WorkflowEngine,
14
14
  executeAgent,
@@ -616,6 +616,17 @@
616
616
  <label class="form-label">Role Description</label>
617
617
  <textarea class="form-input" id="agent-role" style="height: 80px; resize: vertical;" required></textarea>
618
618
  </div>
619
+ <div class="form-group">
620
+ <label class="form-label">Provider</label>
621
+ <select class="form-input" id="agent-provider" onchange="toggleAgentProviderFields()">
622
+ <option value="ai-sdk">AI SDK (Cloud LLM)</option>
623
+ <option value="cli">CLI (Local Script / Antigravity)</option>
624
+ </select>
625
+ </div>
626
+ <div class="form-group" id="agent-cli-command-group" style="display: none;">
627
+ <label class="form-label">CLI Command (JSON Array format)</label>
628
+ <input class="form-input" type="text" id="agent-cli-command" placeholder='["antigravity", "chat", "-m", "agent", "{{prompt}}"]'>
629
+ </div>
619
630
  <div class="form-group">
620
631
  <label class="form-label">Allowed Skills</label>
621
632
  <div class="checkbox-grid" id="agent-skills-checkboxes"></div>
@@ -1184,6 +1195,9 @@
1184
1195
  document.getElementById('agent-filename').disabled = true;
1185
1196
  document.getElementById('agent-name').value = agent.data?.name || '';
1186
1197
  document.getElementById('agent-role').value = agent.data?.role || '';
1198
+ document.getElementById('agent-provider').value = agent.data?.provider || 'ai-sdk';
1199
+ document.getElementById('agent-cli-command').value = agent.data?.cli_command ? JSON.stringify(agent.data.cli_command) : '';
1200
+ toggleAgentProviderFields();
1187
1201
  document.getElementById('delete-agent-btn').style.display = 'block';
1188
1202
 
1189
1203
  // Uncheck all
@@ -1215,6 +1229,9 @@
1215
1229
  document.getElementById('agent-filename').disabled = false;
1216
1230
  document.getElementById('agent-name').value = '';
1217
1231
  document.getElementById('agent-role').value = '';
1232
+ document.getElementById('agent-provider').value = 'ai-sdk';
1233
+ document.getElementById('agent-cli-command').value = '';
1234
+ toggleAgentProviderFields();
1218
1235
  document.querySelectorAll('input[name="agent-skills"]').forEach(cb => cb.checked = false);
1219
1236
  document.querySelectorAll('input[name="agent-subagents"]').forEach(cb => cb.checked = false);
1220
1237
  document.getElementById('delete-agent-btn').style.display = 'none';
@@ -1234,9 +1251,22 @@
1234
1251
  const allowed_sub_agents = [];
1235
1252
  document.querySelectorAll('input[name="agent-subagents"]:checked').forEach(cb => allowed_sub_agents.push(cb.value));
1236
1253
 
1254
+ const provider = document.getElementById('agent-provider').value;
1255
+ let cli_command = undefined;
1256
+ if (provider === 'cli') {
1257
+ try {
1258
+ cli_command = JSON.parse(document.getElementById('agent-cli-command').value || '[]');
1259
+ } catch(e) {
1260
+ alert('CLI command must be a valid JSON array');
1261
+ return;
1262
+ }
1263
+ }
1264
+
1237
1265
  const agent = {
1238
1266
  name: document.getElementById('agent-name').value,
1239
1267
  role: document.getElementById('agent-role').value,
1268
+ provider,
1269
+ cli_command,
1240
1270
  tools,
1241
1271
  allowed_sub_agents
1242
1272
  };
@@ -1250,6 +1280,16 @@
1250
1280
  activeAgentFilename = filename;
1251
1281
  await loadAgentsTab();
1252
1282
  await loadWorkflowsTabAssets();
1283
+ alert('Agent Saved!');
1284
+ }
1285
+
1286
+ function toggleAgentProviderFields() {
1287
+ const provider = document.getElementById('agent-provider').value;
1288
+ if (provider === 'cli') {
1289
+ document.getElementById('agent-cli-command-group').style.display = 'block';
1290
+ } else {
1291
+ document.getElementById('agent-cli-command-group').style.display = 'none';
1292
+ }
1253
1293
  }
1254
1294
 
1255
1295
  async function deleteActiveAgent() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiframe-agent-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Enterprise Resilient AI Agent Framework",
5
5
  "main": "dist/index.js",
6
6
  "bin": {