censiq 0.1.1 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "censiq",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Test AI agents against industry security standards from your terminal or CI pipeline",
5
5
  "main": "src/index.js",
6
6
  "bin": "bin/censiq.js",
@@ -83,7 +83,8 @@ async function run(opts) {
83
83
  const createSpinner = ora({ text: 'Creating arena...', prefixText: ' ' }).start();
84
84
  let arena;
85
85
  try {
86
- arena = await postArena(arenaBody);
86
+ const res = await postArena(arenaBody);
87
+ arena = res.arena || res;
87
88
  createSpinner.succeed('Arena created');
88
89
  } catch (err) {
89
90
  createSpinner.fail(`Failed to create arena: ${err.message}`);
@@ -94,7 +95,8 @@ async function run(opts) {
94
95
  const runSpinner = ora({ text: 'Starting run...', prefixText: ' ' }).start();
95
96
  let runDoc;
96
97
  try {
97
- runDoc = await postRun(arena._id || arena.id, runBody);
98
+ const res = await postRun(arena._id || arena.id, runBody);
99
+ runDoc = res.run || res;
98
100
  runSpinner.succeed('Run started');
99
101
  } catch (err) {
100
102
  runSpinner.fail(`Failed to start run: ${err.message}`);
@@ -118,7 +120,8 @@ async function run(opts) {
118
120
 
119
121
  let current;
120
122
  try {
121
- current = await getRun(runId);
123
+ const res = await getRun(runId);
124
+ current = res.run || res;
122
125
  } catch {
123
126
  // transient error — keep polling
124
127
  continue;