clisbot 0.1.15 → 0.1.16
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/main.js +8 -21
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -60073,10 +60073,7 @@ var telegramSchema = exports_external.object({
|
|
|
60073
60073
|
allowBots: exports_external.boolean().default(false),
|
|
60074
60074
|
groupPolicy: slackConversationPolicySchema.default("allowlist"),
|
|
60075
60075
|
defaultAgentId: exports_external.string().default("default"),
|
|
60076
|
-
privilegeCommands: privilegeCommandsSchema.
|
|
60077
|
-
enabled: false,
|
|
60078
|
-
allowUsers: []
|
|
60079
|
-
}),
|
|
60076
|
+
privilegeCommands: privilegeCommandsSchema.optional(),
|
|
60080
60077
|
commandPrefixes: commandPrefixesSchema.default({
|
|
60081
60078
|
slash: ["::", "\\"],
|
|
60082
60079
|
bash: ["!"]
|
|
@@ -60151,10 +60148,7 @@ var slackSchema = exports_external.object({
|
|
|
60151
60148
|
channelPolicy: slackConversationPolicySchema.default("allowlist"),
|
|
60152
60149
|
groupPolicy: slackConversationPolicySchema.default("allowlist"),
|
|
60153
60150
|
defaultAgentId: exports_external.string().default("default"),
|
|
60154
|
-
privilegeCommands: privilegeCommandsSchema.
|
|
60155
|
-
enabled: false,
|
|
60156
|
-
allowUsers: []
|
|
60157
|
-
}),
|
|
60151
|
+
privilegeCommands: privilegeCommandsSchema.optional(),
|
|
60158
60152
|
commandPrefixes: commandPrefixesSchema.default({
|
|
60159
60153
|
slash: ["::", "\\"],
|
|
60160
60154
|
bash: ["!"]
|
|
@@ -60716,26 +60710,16 @@ async function readEditableConfig(configPath = getDefaultConfigPath()) {
|
|
|
60716
60710
|
async function writeEditableConfig(configPath, config) {
|
|
60717
60711
|
const expandedConfigPath = expandHomePath(configPath);
|
|
60718
60712
|
await ensureDir2(dirname4(expandedConfigPath));
|
|
60719
|
-
const nextConfig =
|
|
60713
|
+
const nextConfig = {
|
|
60720
60714
|
...config,
|
|
60721
60715
|
meta: {
|
|
60722
60716
|
...config.meta,
|
|
60723
60717
|
lastTouchedAt: new Date().toISOString()
|
|
60724
60718
|
}
|
|
60725
|
-
}
|
|
60719
|
+
};
|
|
60726
60720
|
await writeTextFile(expandedConfigPath, `${JSON.stringify(nextConfig, null, 2)}
|
|
60727
60721
|
`);
|
|
60728
60722
|
}
|
|
60729
|
-
function stripLegacyPrivilegeCommands(value) {
|
|
60730
|
-
if (Array.isArray(value)) {
|
|
60731
|
-
return value.map((entry) => stripLegacyPrivilegeCommands(entry));
|
|
60732
|
-
}
|
|
60733
|
-
if (!value || typeof value !== "object") {
|
|
60734
|
-
return value;
|
|
60735
|
-
}
|
|
60736
|
-
const nextEntries = Object.entries(value).filter(([key]) => key !== "privilegeCommands").map(([key, entry]) => [key, stripLegacyPrivilegeCommands(entry)]);
|
|
60737
|
-
return Object.fromEntries(nextEntries);
|
|
60738
|
-
}
|
|
60739
60723
|
|
|
60740
60724
|
// src/agents/bootstrap.ts
|
|
60741
60725
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -68921,7 +68905,10 @@ function resolvePrivilegeCommands(rootConfig, override) {
|
|
|
68921
68905
|
|
|
68922
68906
|
// src/channels/route-policy.ts
|
|
68923
68907
|
function buildSharedChannelRoute(params) {
|
|
68924
|
-
const privilegeCommands = resolvePrivilegeCommands(params.channelConfig.privilegeCommands
|
|
68908
|
+
const privilegeCommands = resolvePrivilegeCommands(params.channelConfig.privilegeCommands ?? {
|
|
68909
|
+
enabled: false,
|
|
68910
|
+
allowUsers: []
|
|
68911
|
+
}, params.route?.privilegeCommands);
|
|
68925
68912
|
const agentId = params.route?.agentId ?? resolveTopLevelBoundAgentId(params.loadedConfig, {
|
|
68926
68913
|
channel: params.channel,
|
|
68927
68914
|
accountId: params.accountId
|