@solidactions/cli 1.13.0 → 1.14.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 +18 -0
- package/dist/commands/run-list.js +32 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,6 +118,24 @@ Use `solidactions <command> --help` for full flag details on any command.
|
|
|
118
118
|
|---------|-----------|-------------|
|
|
119
119
|
| `webhook list <project>` | `-e`, `--show-secrets` | List webhook URLs |
|
|
120
120
|
|
|
121
|
+
### skill
|
|
122
|
+
|
|
123
|
+
Manage agent skills on the crews SOP surface. `push` is an idempotent upsert (create, or update on name collision).
|
|
124
|
+
|
|
125
|
+
| Command | Key Flags | Description |
|
|
126
|
+
|---------|-----------|-------------|
|
|
127
|
+
| `skill push <dir>` | `--role <name>`, `--dry-run`, `--json` | Push a skill folder, or a whole plugin dir — recursive: pushes every `skills/*/SKILL.md`, converts `commands/*.md` → skills, and ingests each skill's `references/`. `--role` scopes to a role instead of the shared library |
|
|
128
|
+
| `skill list` | `--json`, `--limit <n>` | List skills in the library |
|
|
129
|
+
| `skill view <name>` | `--json` | Show one skill |
|
|
130
|
+
| `skill pull <name> [dest]` | `--json` | Fetch a skill to a local folder for editing (inverse of push) |
|
|
131
|
+
| `skill delete <name>` | `--json` | Delete a skill (Admin only) |
|
|
132
|
+
|
|
133
|
+
### role
|
|
134
|
+
|
|
135
|
+
| Command | Key Flags | Description |
|
|
136
|
+
|---------|-----------|-------------|
|
|
137
|
+
| `role push <dir>` | `--dry-run`, `--json` | Push a role definition (create or update) |
|
|
138
|
+
|
|
121
139
|
### workspace
|
|
122
140
|
|
|
123
141
|
| Command | Description |
|
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.runs = runs;
|
|
7
|
+
exports.summaryStatusLabel = summaryStatusLabel;
|
|
8
|
+
exports.detailedOutcomeTag = detailedOutcomeTag;
|
|
7
9
|
const axios_1 = __importDefault(require("axios"));
|
|
8
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
11
|
const api_1 = require("../utils/api");
|
|
@@ -70,6 +72,32 @@ async function runs(projectName, options = {}) {
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
// ─── Display modes ─────────────────────────────────────────────────────────
|
|
75
|
+
/**
|
|
76
|
+
* Summary-table status label for a run. Recovered/degraded runs share SUCCESS's
|
|
77
|
+
* execution_status, so without this they'd be indistinguishable from a clean success in
|
|
78
|
+
* the summary view. Returns the label to display and whether it's an "attention" outcome
|
|
79
|
+
* (rendered yellow). Falls back to the raw status for servers that don't send `outcome`.
|
|
80
|
+
*/
|
|
81
|
+
function summaryStatusLabel(run) {
|
|
82
|
+
if (run.outcome === 'recovered')
|
|
83
|
+
return { label: 'recovered', attention: true };
|
|
84
|
+
if (run.outcome === 'degraded')
|
|
85
|
+
return { label: 'degraded', attention: true };
|
|
86
|
+
return { label: run.execution_status || run.status || '?', attention: false };
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Detailed-view tag appended to a run header ('' when none). Prefers the API `outcome`;
|
|
90
|
+
* falls back to the local hasRunErrors heuristic for servers that don't send `outcome`.
|
|
91
|
+
*/
|
|
92
|
+
function detailedOutcomeTag(run) {
|
|
93
|
+
if (run.outcome === 'recovered')
|
|
94
|
+
return ' [RECOVERED]';
|
|
95
|
+
if (run.outcome === 'degraded')
|
|
96
|
+
return ' [DEGRADED]';
|
|
97
|
+
if (hasRunErrors(run) && isSuccessStatus(run.execution_status || run.status || ''))
|
|
98
|
+
return ' [DEGRADED]';
|
|
99
|
+
return '';
|
|
100
|
+
}
|
|
73
101
|
function displaySummaryTable(runsList, projectName) {
|
|
74
102
|
const header = projectName ? `Recent runs for "${projectName}":` : 'Recent runs:';
|
|
75
103
|
console.log(chalk_1.default.blue(header));
|
|
@@ -79,8 +107,8 @@ function displaySummaryTable(runsList, projectName) {
|
|
|
79
107
|
for (const run of runsList) {
|
|
80
108
|
const id = String(run.id || '?').padEnd(8);
|
|
81
109
|
const workflow = truncate(run.workflow_name || '?', 24).padEnd(25);
|
|
82
|
-
const status
|
|
83
|
-
const statusColor = getStatusColor(status);
|
|
110
|
+
const { label: status, attention } = summaryStatusLabel(run);
|
|
111
|
+
const statusColor = attention ? chalk_1.default.yellow : getStatusColor(status);
|
|
84
112
|
const triggeredAt = run.triggered_at ? new Date(run.triggered_at).toLocaleString() : '-';
|
|
85
113
|
const triggeredBy = run.triggered_by || '-';
|
|
86
114
|
console.log(chalk_1.default.gray(id) +
|
|
@@ -99,9 +127,9 @@ function displayDetailedList(runsList, projectName) {
|
|
|
99
127
|
const status = run.execution_status || run.status || '?';
|
|
100
128
|
const statusColor = getStatusColor(status);
|
|
101
129
|
const exitStr = run.exit_code !== null && run.exit_code !== undefined ? ` (exit ${run.exit_code})` : '';
|
|
102
|
-
const isSilentFailure = hasRunErrors(run) && isSuccessStatus(status);
|
|
103
130
|
console.log('');
|
|
104
|
-
const
|
|
131
|
+
const outcomeTag = detailedOutcomeTag(run);
|
|
132
|
+
const silentTag = outcomeTag ? chalk_1.default.yellow(outcomeTag) : '';
|
|
105
133
|
console.log(chalk_1.default.bold(` Run #${run.id}`) + chalk_1.default.gray(` — ${run.workflow_name || '?'} (${run.project_name || '?'})`) + silentTag);
|
|
106
134
|
console.log(` Status: ${statusColor(status)}${chalk_1.default.gray(exitStr)}`);
|
|
107
135
|
console.log(` Trigger: ${chalk_1.default.gray(run.triggered_by || '-')}`);
|