@skillrecordings/cli 0.18.0 → 0.18.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/README.md +41 -5
- package/bin/skill.mjs +0 -0
- package/dist/{chunk-J4IC3GC3.js → chunk-F3WI3BN5.js} +11 -11
- package/dist/chunk-F3WI3BN5.js.map +1 -0
- package/dist/{chunk-IR6KG25Y.js → chunk-GNPR4OKX.js} +2 -2
- package/dist/chunk-GNPR4OKX.js.map +1 -0
- package/dist/{chunk-KEV3QKXP.js → chunk-HKRLO2GE.js} +20 -2
- package/dist/chunk-HKRLO2GE.js.map +1 -0
- package/dist/{config-C7CDVTO7.js → config-HHQF5U6R.js} +3 -3
- package/dist/index.js +1285 -1022
- package/dist/index.js.map +1 -1
- package/dist/{pipeline-TMFQSA7X.js → pipeline-L72KB4SP.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-IR6KG25Y.js.map +0 -1
- package/dist/chunk-J4IC3GC3.js.map +0 -1
- package/dist/chunk-KEV3QKXP.js.map +0 -1
- /package/dist/{config-C7CDVTO7.js.map → config-HHQF5U6R.js.map} +0 -0
- /package/dist/{pipeline-TMFQSA7X.js.map → pipeline-L72KB4SP.js.map} +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
CLI for the support platform. Agent-friendly with non-interactive defaults.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
curl -fsSL https://raw.githubusercontent.com/skillrecordings/support/main/packages/cli/install.sh | bash
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Installs to `~/.local/bin/skill`. Add to your PATH if needed:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After install, run `skill auth setup` to configure credentials.
|
|
18
|
+
|
|
5
19
|
## Usage
|
|
6
20
|
|
|
7
21
|
```bash
|
|
@@ -14,6 +28,28 @@ skill <command> [options]
|
|
|
14
28
|
All commands support `--json` for machine-readable output and reliable exit
|
|
15
29
|
codes.
|
|
16
30
|
|
|
31
|
+
## 1Password Quickstart (60 seconds)
|
|
32
|
+
|
|
33
|
+
If you already have access to the Support vault:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1) Install required CLI
|
|
37
|
+
brew install 1password-cli
|
|
38
|
+
|
|
39
|
+
# 2) Optional but recommended: cache OP token in local secrets CLI
|
|
40
|
+
secrets add skill_support_1password_service_account_token
|
|
41
|
+
|
|
42
|
+
# 3) Run one setup command
|
|
43
|
+
skill auth setup
|
|
44
|
+
|
|
45
|
+
# 4) Verify
|
|
46
|
+
skill doctor
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Notes:
|
|
50
|
+
- `secrets` CLI is optional. If missing, `skill auth setup` falls back to `op signin`.
|
|
51
|
+
- Setup writes `SKILL_AGE_KEY` to `~/.config/skill/age.key` so `.env.encrypted` works without keychain.
|
|
52
|
+
|
|
17
53
|
## Adaptive Hints
|
|
18
54
|
|
|
19
55
|
The CLI prints adaptive onboarding/discovery hints to `stderr` for new users.
|
|
@@ -206,7 +242,7 @@ The CLI uses a layered secrets system:
|
|
|
206
242
|
1Password (OP_SERVICE_ACCOUNT_TOKEN set?)
|
|
207
243
|
↓ yes → resolve from 1Password vault
|
|
208
244
|
↓ no
|
|
209
|
-
.env.encrypted exists +
|
|
245
|
+
.env.encrypted exists + SKILL_AGE_KEY available?
|
|
210
246
|
↓ yes → decrypt and load
|
|
211
247
|
↓ no
|
|
212
248
|
.env.local exists?
|
|
@@ -241,7 +277,7 @@ op item edit "skill-cli" --vault "Support" "MY_NEW_KEY=your-secret-value"
|
|
|
241
277
|
|
|
242
278
|
```bash
|
|
243
279
|
# Decrypt current secrets
|
|
244
|
-
AGE_KEY=$(op read "op://Support/skill-cli-age-key/
|
|
280
|
+
AGE_KEY=$(op read "op://Support/skill-cli-age-key/private_key")
|
|
245
281
|
age -d -i <(echo "$AGE_KEY") .env.encrypted > .env.local
|
|
246
282
|
|
|
247
283
|
# Add new secret to .env.local
|
|
@@ -269,7 +305,7 @@ git commit -m "chore(cli): add MY_NEW_KEY secret"
|
|
|
269
305
|
op item edit "skill-cli" --vault "Support" "MY_KEY=new-value"
|
|
270
306
|
|
|
271
307
|
# 2. Update .env.encrypted (same process as adding)
|
|
272
|
-
AGE_KEY=$(op read "op://Support/skill-cli-age-key/
|
|
308
|
+
AGE_KEY=$(op read "op://Support/skill-cli-age-key/private_key")
|
|
273
309
|
age -d -i <(echo "$AGE_KEY") .env.encrypted > .env.local
|
|
274
310
|
|
|
275
311
|
# Edit .env.local with new value
|
|
@@ -301,7 +337,7 @@ skill auth setup
|
|
|
301
337
|
| Item | Location |
|
|
302
338
|
|------|----------|
|
|
303
339
|
| Secrets | `op://Support/skill-cli/*` |
|
|
304
|
-
| Age keypair | `op://Support/skill-cli-age-key/
|
|
340
|
+
| Age keypair | `op://Support/skill-cli-age-key/private_key` |
|
|
305
341
|
| Encrypted env | `packages/cli/.env.encrypted` |
|
|
306
342
|
| Secret refs | `packages/cli/src/core/secret-refs.ts` |
|
|
307
343
|
|
|
@@ -311,7 +347,7 @@ For CI environments without 1Password:
|
|
|
311
347
|
|
|
312
348
|
```bash
|
|
313
349
|
# Set age key as CI secret, then:
|
|
314
|
-
echo "$
|
|
350
|
+
echo "$SKILL_AGE_KEY" > /tmp/age.key
|
|
315
351
|
age -d -i /tmp/age.key .env.encrypted > .env.local
|
|
316
352
|
rm /tmp/age.key
|
|
317
353
|
```
|
package/bin/skill.mjs
CHANGED
|
File without changes
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
Redis2,
|
|
13
13
|
log
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HKRLO2GE.js";
|
|
15
15
|
import {
|
|
16
16
|
queryVectors
|
|
17
17
|
} from "./chunk-H3D6VCME.js";
|
|
@@ -550,7 +550,7 @@ Vendor outreach examples (all \u2192 spam, NOT support_billing):
|
|
|
550
550
|
- "Earn 30% commission per sale" \u2192 spam (affiliate recruitment)
|
|
551
551
|
|
|
552
552
|
Output your classification with confidence (0-1) and brief reasoning.`;
|
|
553
|
-
async function llmClassify(input, signals, model = "anthropic/claude-
|
|
553
|
+
async function llmClassify(input, signals, model = "anthropic/claude-sonnet-4-5", options = {}) {
|
|
554
554
|
const message = `Subject: ${input.subject}
|
|
555
555
|
|
|
556
556
|
Body:
|
|
@@ -609,7 +609,7 @@ ${CLASSIFY_PROMPT}` : CLASSIFY_PROMPT;
|
|
|
609
609
|
}
|
|
610
610
|
async function classify(input, options = {}) {
|
|
611
611
|
const {
|
|
612
|
-
model = "anthropic/claude-
|
|
612
|
+
model = "anthropic/claude-sonnet-4-5",
|
|
613
613
|
forceLLM = false,
|
|
614
614
|
appId,
|
|
615
615
|
runId,
|
|
@@ -1062,7 +1062,7 @@ function fastClassifyThread(input, signals) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
return null;
|
|
1064
1064
|
}
|
|
1065
|
-
async function llmClassifyThread(input, signals, model = "anthropic/claude-
|
|
1065
|
+
async function llmClassifyThread(input, signals, model = "anthropic/claude-sonnet-4-5", options = {}) {
|
|
1066
1066
|
const threadContext = `
|
|
1067
1067
|
Thread with ${signals.threadLength} messages over ${signals.threadDurationHours.toFixed(1)} hours.
|
|
1068
1068
|
Pattern: ${signals.threadPattern}
|
|
@@ -1136,7 +1136,7 @@ ${messageHistory}`;
|
|
|
1136
1136
|
}
|
|
1137
1137
|
async function classifyThread(input, options = {}) {
|
|
1138
1138
|
const {
|
|
1139
|
-
model = "anthropic/claude-
|
|
1139
|
+
model = "anthropic/claude-sonnet-4-5",
|
|
1140
1140
|
forceLLM = false,
|
|
1141
1141
|
runId
|
|
1142
1142
|
} = options;
|
|
@@ -3399,7 +3399,7 @@ ${priorityNotes}`);
|
|
|
3399
3399
|
var PROMPT_OVERRIDES = {};
|
|
3400
3400
|
async function draft(input, options = {}) {
|
|
3401
3401
|
const {
|
|
3402
|
-
model = "anthropic/claude-
|
|
3402
|
+
model = "anthropic/claude-sonnet-4-5",
|
|
3403
3403
|
promptOverride,
|
|
3404
3404
|
appId,
|
|
3405
3405
|
templateThreshold = 0.9,
|
|
@@ -3560,7 +3560,7 @@ ${message.body}
|
|
|
3560
3560
|
---
|
|
3561
3561
|
Write your response:`;
|
|
3562
3562
|
if (useAgentMode && appId) {
|
|
3563
|
-
const { runSupportAgent } = await import("./config-
|
|
3563
|
+
const { runSupportAgent } = await import("./config-HHQF5U6R.js");
|
|
3564
3564
|
await log("debug", "draft using agent mode", {
|
|
3565
3565
|
workflow: "pipeline",
|
|
3566
3566
|
step: "draft",
|
|
@@ -4900,7 +4900,7 @@ Flag as relevant if the draft:
|
|
|
4900
4900
|
- Even if imperfect, is clearly attempting to address the right topic
|
|
4901
4901
|
|
|
4902
4902
|
Be practical \u2014 a response doesn't need to be perfect, just on-topic.`;
|
|
4903
|
-
async function checkRelevance(draft2, customerMessage, model = "anthropic/claude-
|
|
4903
|
+
async function checkRelevance(draft2, customerMessage, model = "anthropic/claude-sonnet-4-5") {
|
|
4904
4904
|
const customerText = [
|
|
4905
4905
|
customerMessage.subject ? `Subject: ${customerMessage.subject}` : "",
|
|
4906
4906
|
customerMessage.body ? `Body: ${customerMessage.body}` : ""
|
|
@@ -4961,7 +4961,7 @@ Flag as appropriate if the draft:
|
|
|
4961
4961
|
- Maintains a warm, professional tone
|
|
4962
4962
|
|
|
4963
4963
|
Be practical \u2014 some technical terms (like "browser" or "login") are fine. Flag only terms that typical customers wouldn't know.`;
|
|
4964
|
-
async function checkAudienceAwareness(draft2, model = "anthropic/claude-
|
|
4964
|
+
async function checkAudienceAwareness(draft2, model = "anthropic/claude-sonnet-4-5") {
|
|
4965
4965
|
const prompt = `Draft response to customer:
|
|
4966
4966
|
${draft2}
|
|
4967
4967
|
|
|
@@ -5079,7 +5079,7 @@ async function validate(input, options = {}) {
|
|
|
5079
5079
|
skipMemoryQuery = false,
|
|
5080
5080
|
correctionThreshold = 0.7,
|
|
5081
5081
|
skipRelevanceCheck = false,
|
|
5082
|
-
relevanceModel = "anthropic/claude-
|
|
5082
|
+
relevanceModel = "anthropic/claude-sonnet-4-5",
|
|
5083
5083
|
checkAudienceAwareness: shouldCheckAudience = false
|
|
5084
5084
|
} = options;
|
|
5085
5085
|
const startTime = Date.now();
|
|
@@ -7096,4 +7096,4 @@ export {
|
|
|
7096
7096
|
runPipeline,
|
|
7097
7097
|
runThreadPipeline
|
|
7098
7098
|
};
|
|
7099
|
-
//# sourceMappingURL=chunk-
|
|
7099
|
+
//# sourceMappingURL=chunk-F3WI3BN5.js.map
|