@skillrecordings/cli 0.16.1 → 0.17.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/dist/chunk-7SQU7KCI.js +223 -0
- package/dist/chunk-7SQU7KCI.js.map +1 -0
- package/dist/{chunk-L6YTBYNV.js → chunk-IR6KG25Y.js} +6 -6
- package/dist/{chunk-A5RBWKVF.js → chunk-J4IC3GC3.js} +5 -5
- package/dist/{config-44V5DJBS.js → config-C7CDVTO7.js} +4 -4
- package/dist/index.js +391 -148
- package/dist/index.js.map +1 -1
- package/dist/keychain-IEZHT5WN.js +30 -0
- package/dist/{pipeline-FGI6ICWM.js → pipeline-TMFQSA7X.js} +4 -4
- package/dist/pipeline-TMFQSA7X.js.map +1 -0
- package/package.json +1 -1
- /package/dist/{chunk-L6YTBYNV.js.map → chunk-IR6KG25Y.js.map} +0 -0
- /package/dist/{chunk-A5RBWKVF.js.map → chunk-J4IC3GC3.js.map} +0 -0
- /package/dist/{config-44V5DJBS.js.map → config-C7CDVTO7.js.map} +0 -0
- /package/dist/{pipeline-FGI6ICWM.js.map → keychain-IEZHT5WN.js.map} +0 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_esm_shims
|
|
3
|
+
} from "./chunk-WFANXVQG.js";
|
|
4
|
+
|
|
5
|
+
// src/core/keychain.ts
|
|
6
|
+
init_esm_shims();
|
|
7
|
+
import { execSync, spawnSync } from "child_process";
|
|
8
|
+
import { appendFileSync, existsSync, readFileSync } from "fs";
|
|
9
|
+
import { homedir } from "os";
|
|
10
|
+
import { join } from "path";
|
|
11
|
+
var SERVICE_NAME = "skill-cli";
|
|
12
|
+
function isMacOS() {
|
|
13
|
+
return process.platform === "darwin";
|
|
14
|
+
}
|
|
15
|
+
function isLinux() {
|
|
16
|
+
return process.platform === "linux";
|
|
17
|
+
}
|
|
18
|
+
function isKeychainSupported() {
|
|
19
|
+
if (isMacOS()) return true;
|
|
20
|
+
if (isLinux()) {
|
|
21
|
+
try {
|
|
22
|
+
execSync("which secret-tool", { stdio: "ignore" });
|
|
23
|
+
return true;
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
function isOpCliAvailable() {
|
|
31
|
+
try {
|
|
32
|
+
execSync("op account list", { stdio: "ignore", timeout: 5e3 });
|
|
33
|
+
return true;
|
|
34
|
+
} catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function fetchFromOp(itemId, vaultId, field = "credential") {
|
|
39
|
+
try {
|
|
40
|
+
const result = execSync(
|
|
41
|
+
`op item get "${itemId}" --vault "${vaultId}" --fields "label=${field}" --reveal`,
|
|
42
|
+
{ encoding: "utf8", stdio: ["pipe", "pipe", "ignore"], timeout: 1e4 }
|
|
43
|
+
);
|
|
44
|
+
return result.trim() || null;
|
|
45
|
+
} catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function storeInKeychain(key, value) {
|
|
50
|
+
if (isMacOS()) {
|
|
51
|
+
try {
|
|
52
|
+
spawnSync(
|
|
53
|
+
"security",
|
|
54
|
+
["delete-generic-password", "-a", key, "-s", SERVICE_NAME],
|
|
55
|
+
{ stdio: "ignore" }
|
|
56
|
+
);
|
|
57
|
+
const result = spawnSync(
|
|
58
|
+
"security",
|
|
59
|
+
["add-generic-password", "-a", key, "-s", SERVICE_NAME, "-w", value],
|
|
60
|
+
{ stdio: "pipe" }
|
|
61
|
+
);
|
|
62
|
+
return result.status === 0;
|
|
63
|
+
} catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (isLinux()) {
|
|
68
|
+
try {
|
|
69
|
+
const result = spawnSync(
|
|
70
|
+
"secret-tool",
|
|
71
|
+
[
|
|
72
|
+
"store",
|
|
73
|
+
"--label",
|
|
74
|
+
`${SERVICE_NAME}: ${key}`,
|
|
75
|
+
"service",
|
|
76
|
+
SERVICE_NAME,
|
|
77
|
+
"key",
|
|
78
|
+
key
|
|
79
|
+
],
|
|
80
|
+
{ input: value, stdio: ["pipe", "pipe", "pipe"] }
|
|
81
|
+
);
|
|
82
|
+
return result.status === 0;
|
|
83
|
+
} catch {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
function getFromKeychain(key) {
|
|
90
|
+
if (isMacOS()) {
|
|
91
|
+
try {
|
|
92
|
+
const result = execSync(
|
|
93
|
+
`security find-generic-password -a "${key}" -s "${SERVICE_NAME}" -w 2>/dev/null`,
|
|
94
|
+
{ encoding: "utf8" }
|
|
95
|
+
);
|
|
96
|
+
return result.trim() || null;
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (isLinux()) {
|
|
102
|
+
try {
|
|
103
|
+
const result = execSync(
|
|
104
|
+
`secret-tool lookup service "${SERVICE_NAME}" key "${key}" 2>/dev/null`,
|
|
105
|
+
{ encoding: "utf8" }
|
|
106
|
+
);
|
|
107
|
+
return result.trim() || null;
|
|
108
|
+
} catch {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
function isInKeychain(key) {
|
|
115
|
+
return getFromKeychain(key) !== null;
|
|
116
|
+
}
|
|
117
|
+
function getShellRcPath() {
|
|
118
|
+
const shell = process.env.SHELL || "/bin/zsh";
|
|
119
|
+
if (shell.includes("zsh")) {
|
|
120
|
+
return join(homedir(), ".zshrc");
|
|
121
|
+
}
|
|
122
|
+
if (shell.includes("bash")) {
|
|
123
|
+
const bashProfile = join(homedir(), ".bash_profile");
|
|
124
|
+
if (existsSync(bashProfile)) {
|
|
125
|
+
return bashProfile;
|
|
126
|
+
}
|
|
127
|
+
return join(homedir(), ".bashrc");
|
|
128
|
+
}
|
|
129
|
+
return join(homedir(), ".profile");
|
|
130
|
+
}
|
|
131
|
+
var SHELL_EXPORTS = `
|
|
132
|
+
# skill-cli keychain integration
|
|
133
|
+
export OP_SERVICE_ACCOUNT_TOKEN=$(security find-generic-password -a "op-service-account-token" -s "skill-cli" -w 2>/dev/null)
|
|
134
|
+
export SKILL_AGE_KEY=$(security find-generic-password -a "age-private-key" -s "skill-cli" -w 2>/dev/null)
|
|
135
|
+
`.trim();
|
|
136
|
+
var EXPORT_MARKER = "# skill-cli keychain integration";
|
|
137
|
+
function hasShellIntegration() {
|
|
138
|
+
const rcPath = getShellRcPath();
|
|
139
|
+
if (!existsSync(rcPath)) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
const content = readFileSync(rcPath, "utf8");
|
|
143
|
+
return content.includes(EXPORT_MARKER);
|
|
144
|
+
}
|
|
145
|
+
function addShellIntegration() {
|
|
146
|
+
const rcPath = getShellRcPath();
|
|
147
|
+
try {
|
|
148
|
+
if (existsSync(rcPath)) {
|
|
149
|
+
const content = readFileSync(rcPath, "utf8");
|
|
150
|
+
if (content.includes(EXPORT_MARKER)) {
|
|
151
|
+
return { success: true, path: rcPath };
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const addition = `
|
|
155
|
+
${SHELL_EXPORTS}
|
|
156
|
+
`;
|
|
157
|
+
appendFileSync(rcPath, addition);
|
|
158
|
+
return { success: true, path: rcPath };
|
|
159
|
+
} catch (err) {
|
|
160
|
+
return {
|
|
161
|
+
success: false,
|
|
162
|
+
path: rcPath,
|
|
163
|
+
error: err instanceof Error ? err.message : "Unknown error"
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function getKeychainStatus() {
|
|
168
|
+
return {
|
|
169
|
+
platform: isMacOS() ? "macos" : isLinux() ? "linux" : "other",
|
|
170
|
+
keychainSupported: isKeychainSupported(),
|
|
171
|
+
opCliAvailable: isOpCliAvailable(),
|
|
172
|
+
opTokenInKeychain: isInKeychain("op-service-account-token"),
|
|
173
|
+
ageKeyInKeychain: isInKeychain("age-private-key"),
|
|
174
|
+
shellIntegration: hasShellIntegration(),
|
|
175
|
+
opTokenInEnv: !!process.env.OP_SERVICE_ACCOUNT_TOKEN
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
var OP_VAULT_ID = "u3ujzar6l3nahlahsuzfvg7vcq";
|
|
179
|
+
var OP_SERVICE_ACCOUNT_ITEM_ID = "3e4ip354ps3mhq2wwt6vmtm2zu";
|
|
180
|
+
function autoBootstrapKeychain() {
|
|
181
|
+
if (process.env.OP_SERVICE_ACCOUNT_TOKEN) {
|
|
182
|
+
return process.env.OP_SERVICE_ACCOUNT_TOKEN;
|
|
183
|
+
}
|
|
184
|
+
const fromKeychain = getFromKeychain("op-service-account-token");
|
|
185
|
+
if (fromKeychain) {
|
|
186
|
+
return fromKeychain;
|
|
187
|
+
}
|
|
188
|
+
if (!isKeychainSupported()) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
if (!isOpCliAvailable()) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
const token = fetchFromOp(
|
|
195
|
+
OP_SERVICE_ACCOUNT_ITEM_ID,
|
|
196
|
+
OP_VAULT_ID,
|
|
197
|
+
"credential"
|
|
198
|
+
);
|
|
199
|
+
if (!token) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
storeInKeychain("op-service-account-token", token);
|
|
203
|
+
if (!hasShellIntegration()) {
|
|
204
|
+
addShellIntegration();
|
|
205
|
+
}
|
|
206
|
+
return token;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export {
|
|
210
|
+
isMacOS,
|
|
211
|
+
isLinux,
|
|
212
|
+
isKeychainSupported,
|
|
213
|
+
isOpCliAvailable,
|
|
214
|
+
fetchFromOp,
|
|
215
|
+
storeInKeychain,
|
|
216
|
+
getFromKeychain,
|
|
217
|
+
isInKeychain,
|
|
218
|
+
hasShellIntegration,
|
|
219
|
+
addShellIntegration,
|
|
220
|
+
getKeychainStatus,
|
|
221
|
+
autoBootstrapKeychain
|
|
222
|
+
};
|
|
223
|
+
//# sourceMappingURL=chunk-7SQU7KCI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/keychain.ts"],"sourcesContent":["import { execSync, spawnSync } from 'node:child_process'\nimport { appendFileSync, existsSync, readFileSync } from 'node:fs'\nimport { homedir } from 'node:os'\nimport { join } from 'node:path'\n\nconst SERVICE_NAME = 'skill-cli'\n\ntype KeychainKey = 'op-service-account-token' | 'age-private-key'\n\n/**\n * Check if running on macOS\n */\nexport function isMacOS(): boolean {\n return process.platform === 'darwin'\n}\n\n/**\n * Check if running on Linux\n */\nexport function isLinux(): boolean {\n return process.platform === 'linux'\n}\n\n/**\n * Check if keychain is supported (macOS or Linux with secret-tool)\n */\nexport function isKeychainSupported(): boolean {\n if (isMacOS()) return true\n if (isLinux()) {\n try {\n execSync('which secret-tool', { stdio: 'ignore' })\n return true\n } catch {\n return false\n }\n }\n return false\n}\n\n/**\n * Check if op CLI is installed and authenticated\n */\nexport function isOpCliAvailable(): boolean {\n try {\n execSync('op account list', { stdio: 'ignore', timeout: 5000 })\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Fetch a secret from 1Password using op CLI\n */\nexport function fetchFromOp(\n itemId: string,\n vaultId: string,\n field = 'credential'\n): string | null {\n try {\n const result = execSync(\n `op item get \"${itemId}\" --vault \"${vaultId}\" --fields \"label=${field}\" --reveal`,\n { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'], timeout: 10000 }\n )\n return result.trim() || null\n } catch {\n return null\n }\n}\n\n/**\n * Store a secret in system keychain (macOS or Linux)\n */\nexport function storeInKeychain(key: KeychainKey, value: string): boolean {\n if (isMacOS()) {\n try {\n // Delete existing entry first (ignore errors)\n spawnSync(\n 'security',\n ['delete-generic-password', '-a', key, '-s', SERVICE_NAME],\n { stdio: 'ignore' }\n )\n // Add new entry\n const result = spawnSync(\n 'security',\n ['add-generic-password', '-a', key, '-s', SERVICE_NAME, '-w', value],\n { stdio: 'pipe' }\n )\n return result.status === 0\n } catch {\n return false\n }\n }\n\n if (isLinux()) {\n try {\n // secret-tool store --label=\"skill-cli: op-service-account-token\" service skill-cli key op-service-account-token\n const result = spawnSync(\n 'secret-tool',\n [\n 'store',\n '--label',\n `${SERVICE_NAME}: ${key}`,\n 'service',\n SERVICE_NAME,\n 'key',\n key,\n ],\n { input: value, stdio: ['pipe', 'pipe', 'pipe'] }\n )\n return result.status === 0\n } catch {\n return false\n }\n }\n\n return false\n}\n\n/**\n * Retrieve secret from system keychain (macOS or Linux)\n */\nexport function getFromKeychain(key: KeychainKey): string | null {\n if (isMacOS()) {\n try {\n const result = execSync(\n `security find-generic-password -a \"${key}\" -s \"${SERVICE_NAME}\" -w 2>/dev/null`,\n { encoding: 'utf8' }\n )\n return result.trim() || null\n } catch {\n return null\n }\n }\n\n if (isLinux()) {\n try {\n const result = execSync(\n `secret-tool lookup service \"${SERVICE_NAME}\" key \"${key}\" 2>/dev/null`,\n { encoding: 'utf8' }\n )\n return result.trim() || null\n } catch {\n return null\n }\n }\n\n return null\n}\n\n/**\n * Check if a key is in keychain\n */\nexport function isInKeychain(key: KeychainKey): boolean {\n return getFromKeychain(key) !== null\n}\n\n/**\n * Get the shell rc file path\n */\nfunction getShellRcPath(): string {\n const shell = process.env.SHELL || '/bin/zsh'\n if (shell.includes('zsh')) {\n return join(homedir(), '.zshrc')\n }\n if (shell.includes('bash')) {\n // macOS prefers .bash_profile for login shells\n const bashProfile = join(homedir(), '.bash_profile')\n if (existsSync(bashProfile)) {\n return bashProfile\n }\n return join(homedir(), '.bashrc')\n }\n return join(homedir(), '.profile')\n}\n\n/**\n * The export lines we add to shell rc\n */\nconst SHELL_EXPORTS = `\n# skill-cli keychain integration\nexport OP_SERVICE_ACCOUNT_TOKEN=$(security find-generic-password -a \"op-service-account-token\" -s \"skill-cli\" -w 2>/dev/null)\nexport SKILL_AGE_KEY=$(security find-generic-password -a \"age-private-key\" -s \"skill-cli\" -w 2>/dev/null)\n`.trim()\n\nconst EXPORT_MARKER = '# skill-cli keychain integration'\n\n/**\n * Check if shell integration is already set up\n */\nexport function hasShellIntegration(): boolean {\n const rcPath = getShellRcPath()\n if (!existsSync(rcPath)) {\n return false\n }\n const content = readFileSync(rcPath, 'utf8')\n return content.includes(EXPORT_MARKER)\n}\n\n/**\n * Add export lines to shell rc file\n */\nexport function addShellIntegration(): {\n success: boolean\n path: string\n error?: string\n} {\n const rcPath = getShellRcPath()\n\n try {\n // Check if already present\n if (existsSync(rcPath)) {\n const content = readFileSync(rcPath, 'utf8')\n if (content.includes(EXPORT_MARKER)) {\n return { success: true, path: rcPath }\n }\n }\n\n // Append to rc file\n const addition = `\\n${SHELL_EXPORTS}\\n`\n appendFileSync(rcPath, addition)\n\n return { success: true, path: rcPath }\n } catch (err) {\n return {\n success: false,\n path: rcPath,\n error: err instanceof Error ? err.message : 'Unknown error',\n }\n }\n}\n\n/**\n * Get status of keychain setup\n */\nexport function getKeychainStatus(): {\n platform: 'macos' | 'linux' | 'other'\n keychainSupported: boolean\n opCliAvailable: boolean\n opTokenInKeychain: boolean\n ageKeyInKeychain: boolean\n shellIntegration: boolean\n opTokenInEnv: boolean\n} {\n return {\n platform: isMacOS() ? 'macos' : isLinux() ? 'linux' : 'other',\n keychainSupported: isKeychainSupported(),\n opCliAvailable: isOpCliAvailable(),\n opTokenInKeychain: isInKeychain('op-service-account-token'),\n ageKeyInKeychain: isInKeychain('age-private-key'),\n shellIntegration: hasShellIntegration(),\n opTokenInEnv: !!process.env.OP_SERVICE_ACCOUNT_TOKEN,\n }\n}\n\n// 1Password vault/item IDs for service account token\nconst OP_VAULT_ID = 'u3ujzar6l3nahlahsuzfvg7vcq'\nconst OP_SERVICE_ACCOUNT_ITEM_ID = '3e4ip354ps3mhq2wwt6vmtm2zu'\n\n/**\n * Automatically bootstrap keychain from op CLI if available.\n * Called by config-loader when secrets are needed.\n * Returns the OP_SERVICE_ACCOUNT_TOKEN if successful.\n */\nexport function autoBootstrapKeychain(): string | null {\n // Already have token in env?\n if (process.env.OP_SERVICE_ACCOUNT_TOKEN) {\n return process.env.OP_SERVICE_ACCOUNT_TOKEN\n }\n\n // Already in keychain?\n const fromKeychain = getFromKeychain('op-service-account-token')\n if (fromKeychain) {\n return fromKeychain\n }\n\n // No keychain support? Can't bootstrap.\n if (!isKeychainSupported()) {\n return null\n }\n\n // Try op CLI\n if (!isOpCliAvailable()) {\n return null\n }\n\n // Fetch service account token from 1Password\n const token = fetchFromOp(\n OP_SERVICE_ACCOUNT_ITEM_ID,\n OP_VAULT_ID,\n 'credential'\n )\n if (!token) {\n return null\n }\n\n // Store in keychain for future use\n storeInKeychain('op-service-account-token', token)\n\n // Also add shell integration if not present\n if (!hasShellIntegration()) {\n addShellIntegration()\n }\n\n return token\n}\n"],"mappings":";;;;;AAAA;AAAA,SAAS,UAAU,iBAAiB;AACpC,SAAS,gBAAgB,YAAY,oBAAoB;AACzD,SAAS,eAAe;AACxB,SAAS,YAAY;AAErB,IAAM,eAAe;AAOd,SAAS,UAAmB;AACjC,SAAO,QAAQ,aAAa;AAC9B;AAKO,SAAS,UAAmB;AACjC,SAAO,QAAQ,aAAa;AAC9B;AAKO,SAAS,sBAA+B;AAC7C,MAAI,QAAQ,EAAG,QAAO;AACtB,MAAI,QAAQ,GAAG;AACb,QAAI;AACF,eAAS,qBAAqB,EAAE,OAAO,SAAS,CAAC;AACjD,aAAO;AAAA,IACT,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAKO,SAAS,mBAA4B;AAC1C,MAAI;AACF,aAAS,mBAAmB,EAAE,OAAO,UAAU,SAAS,IAAK,CAAC;AAC9D,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAKO,SAAS,YACd,QACA,SACA,QAAQ,cACO;AACf,MAAI;AACF,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AAS,MAAM,MAAM,OAAO;AAAA,EACvC,SAAS,KAAK;AACZ,WAAO;AAAA,MACL,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO,eAAe,QAAQ,IAAI,UAAU;AAAA,IAC9C;AAAA,EACF;AACF;AAKO,SAAS,oBAQd;AACA,SAAO;AAAA,IACL,UAAU,QAAQ,IAAI,UAAU,QAAQ,IAAI,UAAU;AAAA,IACtD,mBAAmB,oBAAoB;AAAA,IACvC,gBAAgB,iBAAiB;AAAA,IACjC,mBAAmB,aAAa,0BAA0B;AAAA,IAC1D,kBAAkB,aAAa,iBAAiB;AAAA,IAChD,kBAAkB,oBAAoB;AAAA,IACtC,cAAc,CAAC,CAAC,QAAQ,IAAI;AAAA,EAC9B;AACF;AAGA,IAAM,cAAc;AACpB,IAAM,6BAA6B;AAO5B,SAAS,wBAAuC;AAErD,MAAI,QAAQ,IAAI,0BAA0B;AACxC,WAAO,QAAQ,IAAI;AAAA,EACrB;AAGA,QAAM,eAAe,gBAAgB,0BAA0B;AAC/D,MAAI,cAAc;AAChB,WAAO;AAAA,EACT;AAGA,MAAI,CAAC,oBAAoB,GAAG;AAC1B,WAAO;AAAA,EACT;AAGA,MAAI,CAAC,iBAAiB,GAAG;AACvB,WAAO;AAAA,EACT;AAGA,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAGA,kBAAgB,4BAA4B,KAAK;AAGjD,MAAI,CAAC,oBAAoB,GAAG;AAC1B,wBAAoB;AAAA,EACtB;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -6,6 +6,11 @@ import {
|
|
|
6
6
|
traceMemoryVote,
|
|
7
7
|
traceWorkflowStep
|
|
8
8
|
} from "./chunk-KEV3QKXP.js";
|
|
9
|
+
import {
|
|
10
|
+
MemoryService,
|
|
11
|
+
VotingService,
|
|
12
|
+
calculateConfidence
|
|
13
|
+
} from "./chunk-MLNDSBZ4.js";
|
|
9
14
|
import {
|
|
10
15
|
classifyMessage,
|
|
11
16
|
telemetryConfig
|
|
@@ -16,11 +21,6 @@ import {
|
|
|
16
21
|
import {
|
|
17
22
|
createTool
|
|
18
23
|
} from "./chunk-F4EM72IH.js";
|
|
19
|
-
import {
|
|
20
|
-
MemoryService,
|
|
21
|
-
VotingService,
|
|
22
|
-
calculateConfidence
|
|
23
|
-
} from "./chunk-MLNDSBZ4.js";
|
|
24
24
|
import {
|
|
25
25
|
AppsTable,
|
|
26
26
|
database,
|
|
@@ -15606,4 +15606,4 @@ export {
|
|
|
15606
15606
|
DEFAULT_AGENT_MODEL,
|
|
15607
15607
|
runSupportAgent
|
|
15608
15608
|
};
|
|
15609
|
-
//# sourceMappingURL=chunk-
|
|
15609
|
+
//# sourceMappingURL=chunk-IR6KG25Y.js.map
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
queryCorrectedMemories,
|
|
6
6
|
queryMemoriesForStage
|
|
7
7
|
} from "./chunk-HK3PEWFD.js";
|
|
8
|
+
import {
|
|
9
|
+
SupportMemoryService
|
|
10
|
+
} from "./chunk-WYKL32C3.js";
|
|
8
11
|
import {
|
|
9
12
|
Redis2,
|
|
10
13
|
log
|
|
@@ -12,9 +15,6 @@ import {
|
|
|
12
15
|
import {
|
|
13
16
|
queryVectors
|
|
14
17
|
} from "./chunk-H3D6VCME.js";
|
|
15
|
-
import {
|
|
16
|
-
SupportMemoryService
|
|
17
|
-
} from "./chunk-WYKL32C3.js";
|
|
18
18
|
import {
|
|
19
19
|
Index2
|
|
20
20
|
} from "./chunk-MG37YDAK.js";
|
|
@@ -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-C7CDVTO7.js");
|
|
3564
3564
|
await log("debug", "draft using agent mode", {
|
|
3565
3565
|
workflow: "pipeline",
|
|
3566
3566
|
step: "draft",
|
|
@@ -7096,4 +7096,4 @@ export {
|
|
|
7096
7096
|
runPipeline,
|
|
7097
7097
|
runThreadPipeline
|
|
7098
7098
|
};
|
|
7099
|
-
//# sourceMappingURL=chunk-
|
|
7099
|
+
//# sourceMappingURL=chunk-J4IC3GC3.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
SUPPORT_AGENT_PROMPT,
|
|
4
4
|
agentTools,
|
|
5
5
|
runSupportAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IR6KG25Y.js";
|
|
7
7
|
import "./chunk-KEV3QKXP.js";
|
|
8
|
+
import "./chunk-MLNDSBZ4.js";
|
|
8
9
|
import "./chunk-ZNF7XD2S.js";
|
|
9
10
|
import "./chunk-H3D6VCME.js";
|
|
10
|
-
import "./chunk-F4EM72IH.js";
|
|
11
|
-
import "./chunk-MLNDSBZ4.js";
|
|
12
11
|
import "./chunk-MG37YDAK.js";
|
|
12
|
+
import "./chunk-F4EM72IH.js";
|
|
13
13
|
import "./chunk-V34YUISF.js";
|
|
14
14
|
import "./chunk-WFANXVQG.js";
|
|
15
15
|
export {
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
agentTools,
|
|
19
19
|
runSupportAgent
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=config-
|
|
21
|
+
//# sourceMappingURL=config-C7CDVTO7.js.map
|