@sulala/agent-os 0.1.13 → 0.1.15
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/dashboard-dist/assets/index-3nnVHZ7F.js +72 -0
- package/dashboard-dist/index.html +1 -1
- package/dist/cli.js +24 -7
- package/dist/index.js +22 -6
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>vite-app</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-3nnVHZ7F.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-RzMkSaIA.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/cli.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(exports_config, {
|
|
|
39
39
|
readConfig: () => readConfig,
|
|
40
40
|
getWorkspaceDir: () => getWorkspaceDir,
|
|
41
41
|
getTemplatesDir: () => getTemplatesDir,
|
|
42
|
+
getSkillsRegistryUrl: () => getSkillsRegistryUrl,
|
|
42
43
|
getSkillsDir: () => getSkillsDir,
|
|
43
44
|
getSkillConfigPath: () => getSkillConfigPath,
|
|
44
45
|
getSeedSkillsDir: () => getSeedSkillsDir,
|
|
@@ -82,6 +83,7 @@ async function readConfig() {
|
|
|
82
83
|
const viber_auth_token = o.viber_auth_token;
|
|
83
84
|
const viber_default_agent_id = o.viber_default_agent_id;
|
|
84
85
|
const onboarding_completed = o.onboarding_completed;
|
|
86
|
+
const skills_registry_url = o.skills_registry_url;
|
|
85
87
|
return {
|
|
86
88
|
provider: provider === "openrouter" || provider === "openai" ? provider : undefined,
|
|
87
89
|
api_key: typeof api_key === "string" ? api_key : undefined,
|
|
@@ -101,7 +103,8 @@ async function readConfig() {
|
|
|
101
103
|
signal_default_agent_id: typeof signal_default_agent_id === "string" ? signal_default_agent_id : undefined,
|
|
102
104
|
viber_auth_token: typeof viber_auth_token === "string" ? viber_auth_token : undefined,
|
|
103
105
|
viber_default_agent_id: typeof viber_default_agent_id === "string" ? viber_default_agent_id : undefined,
|
|
104
|
-
onboarding_completed: onboarding_completed === true ? true : undefined
|
|
106
|
+
onboarding_completed: onboarding_completed === true ? true : undefined,
|
|
107
|
+
skills_registry_url: typeof skills_registry_url === "string" ? skills_registry_url.trim() || undefined : undefined
|
|
105
108
|
};
|
|
106
109
|
}
|
|
107
110
|
} catch (err) {
|
|
@@ -132,7 +135,8 @@ async function writeConfig(updates) {
|
|
|
132
135
|
signal_default_agent_id: updates.signal_default_agent_id !== undefined ? updates.signal_default_agent_id : current.signal_default_agent_id,
|
|
133
136
|
viber_auth_token: updates.viber_auth_token !== undefined ? updates.viber_auth_token : current.viber_auth_token,
|
|
134
137
|
viber_default_agent_id: updates.viber_default_agent_id !== undefined ? updates.viber_default_agent_id : current.viber_default_agent_id,
|
|
135
|
-
onboarding_completed: updates.onboarding_completed !== undefined ? updates.onboarding_completed : current.onboarding_completed
|
|
138
|
+
onboarding_completed: updates.onboarding_completed !== undefined ? updates.onboarding_completed : current.onboarding_completed,
|
|
139
|
+
skills_registry_url: updates.skills_registry_url !== undefined ? updates.skills_registry_url : current.skills_registry_url
|
|
136
140
|
};
|
|
137
141
|
const home = getAgentOsHome();
|
|
138
142
|
const path = getConfigPath();
|
|
@@ -156,9 +160,20 @@ async function writeConfig(updates) {
|
|
|
156
160
|
signal_default_agent_id: merged.signal_default_agent_id ?? null,
|
|
157
161
|
viber_auth_token: merged.viber_auth_token ?? null,
|
|
158
162
|
viber_default_agent_id: merged.viber_default_agent_id ?? null,
|
|
159
|
-
onboarding_completed: merged.onboarding_completed ?? null
|
|
163
|
+
onboarding_completed: merged.onboarding_completed ?? null,
|
|
164
|
+
skills_registry_url: merged.skills_registry_url ?? null
|
|
160
165
|
}, null, 2), "utf-8");
|
|
161
166
|
}
|
|
167
|
+
async function getSkillsRegistryUrl() {
|
|
168
|
+
const env = process.env.SKILLS_REGISTRY_URL?.trim();
|
|
169
|
+
if (env)
|
|
170
|
+
return env;
|
|
171
|
+
const config = await readConfig();
|
|
172
|
+
const fromConfig = config.skills_registry_url?.trim();
|
|
173
|
+
if (fromConfig)
|
|
174
|
+
return fromConfig;
|
|
175
|
+
return DEFAULT_SKILLS_REGISTRY_URL;
|
|
176
|
+
}
|
|
162
177
|
function getConfigsDir() {
|
|
163
178
|
return join(getAgentOsHome(), "configs");
|
|
164
179
|
}
|
|
@@ -227,7 +242,7 @@ function resolveInWorkspace(workspaceDir, relativePath) {
|
|
|
227
242
|
}
|
|
228
243
|
return resolved;
|
|
229
244
|
}
|
|
230
|
-
var DEFAULT_HOME;
|
|
245
|
+
var DEFAULT_HOME, DEFAULT_SKILLS_REGISTRY_URL = "https://hub.sulala.ai/api/sulalahub/registry";
|
|
231
246
|
var init_config = __esm(() => {
|
|
232
247
|
DEFAULT_HOME = join(process.env.HOME || process.env.USERPROFILE || "~", ".agent-os");
|
|
233
248
|
});
|
|
@@ -8418,7 +8433,7 @@ async function getSkillSetupMarkdown(skillId) {
|
|
|
8418
8433
|
}
|
|
8419
8434
|
}
|
|
8420
8435
|
async function getStoreRegistry() {
|
|
8421
|
-
const registryUrl =
|
|
8436
|
+
const registryUrl = await getSkillsRegistryUrl();
|
|
8422
8437
|
if (!registryUrl)
|
|
8423
8438
|
return { skills: [], storeBase: null, registryUrl: null };
|
|
8424
8439
|
let storeBase = null;
|
|
@@ -8576,7 +8591,8 @@ async function installSystemSkills() {
|
|
|
8576
8591
|
if (alreadyInstalled)
|
|
8577
8592
|
continue;
|
|
8578
8593
|
try {
|
|
8579
|
-
await
|
|
8594
|
+
await mkdir3(skillsDir, { recursive: true });
|
|
8595
|
+
await cp(sourcePath, destPath, { recursive: true });
|
|
8580
8596
|
installed += 1;
|
|
8581
8597
|
} catch (err) {
|
|
8582
8598
|
console.error(`[skills] Install system skill ${id} failed:`, err);
|
|
@@ -16258,7 +16274,8 @@ async function cmdOnboard() {
|
|
|
16258
16274
|
signal_bridge_url: null,
|
|
16259
16275
|
signal_default_agent_id: null,
|
|
16260
16276
|
viber_auth_token: null,
|
|
16261
|
-
viber_default_agent_id: null
|
|
16277
|
+
viber_default_agent_id: null,
|
|
16278
|
+
skills_registry_url: "https://hub.sulala.ai/api/sulalahub/registry"
|
|
16262
16279
|
}, null, 2), "utf-8");
|
|
16263
16280
|
console.log("Created", configPath);
|
|
16264
16281
|
}
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(exports_config, {
|
|
|
39
39
|
readConfig: () => readConfig,
|
|
40
40
|
getWorkspaceDir: () => getWorkspaceDir,
|
|
41
41
|
getTemplatesDir: () => getTemplatesDir,
|
|
42
|
+
getSkillsRegistryUrl: () => getSkillsRegistryUrl,
|
|
42
43
|
getSkillsDir: () => getSkillsDir,
|
|
43
44
|
getSkillConfigPath: () => getSkillConfigPath,
|
|
44
45
|
getSeedSkillsDir: () => getSeedSkillsDir,
|
|
@@ -82,6 +83,7 @@ async function readConfig() {
|
|
|
82
83
|
const viber_auth_token = o.viber_auth_token;
|
|
83
84
|
const viber_default_agent_id = o.viber_default_agent_id;
|
|
84
85
|
const onboarding_completed = o.onboarding_completed;
|
|
86
|
+
const skills_registry_url = o.skills_registry_url;
|
|
85
87
|
return {
|
|
86
88
|
provider: provider === "openrouter" || provider === "openai" ? provider : undefined,
|
|
87
89
|
api_key: typeof api_key === "string" ? api_key : undefined,
|
|
@@ -101,7 +103,8 @@ async function readConfig() {
|
|
|
101
103
|
signal_default_agent_id: typeof signal_default_agent_id === "string" ? signal_default_agent_id : undefined,
|
|
102
104
|
viber_auth_token: typeof viber_auth_token === "string" ? viber_auth_token : undefined,
|
|
103
105
|
viber_default_agent_id: typeof viber_default_agent_id === "string" ? viber_default_agent_id : undefined,
|
|
104
|
-
onboarding_completed: onboarding_completed === true ? true : undefined
|
|
106
|
+
onboarding_completed: onboarding_completed === true ? true : undefined,
|
|
107
|
+
skills_registry_url: typeof skills_registry_url === "string" ? skills_registry_url.trim() || undefined : undefined
|
|
105
108
|
};
|
|
106
109
|
}
|
|
107
110
|
} catch (err) {
|
|
@@ -132,7 +135,8 @@ async function writeConfig(updates) {
|
|
|
132
135
|
signal_default_agent_id: updates.signal_default_agent_id !== undefined ? updates.signal_default_agent_id : current.signal_default_agent_id,
|
|
133
136
|
viber_auth_token: updates.viber_auth_token !== undefined ? updates.viber_auth_token : current.viber_auth_token,
|
|
134
137
|
viber_default_agent_id: updates.viber_default_agent_id !== undefined ? updates.viber_default_agent_id : current.viber_default_agent_id,
|
|
135
|
-
onboarding_completed: updates.onboarding_completed !== undefined ? updates.onboarding_completed : current.onboarding_completed
|
|
138
|
+
onboarding_completed: updates.onboarding_completed !== undefined ? updates.onboarding_completed : current.onboarding_completed,
|
|
139
|
+
skills_registry_url: updates.skills_registry_url !== undefined ? updates.skills_registry_url : current.skills_registry_url
|
|
136
140
|
};
|
|
137
141
|
const home = getAgentOsHome();
|
|
138
142
|
const path = getConfigPath();
|
|
@@ -156,9 +160,20 @@ async function writeConfig(updates) {
|
|
|
156
160
|
signal_default_agent_id: merged.signal_default_agent_id ?? null,
|
|
157
161
|
viber_auth_token: merged.viber_auth_token ?? null,
|
|
158
162
|
viber_default_agent_id: merged.viber_default_agent_id ?? null,
|
|
159
|
-
onboarding_completed: merged.onboarding_completed ?? null
|
|
163
|
+
onboarding_completed: merged.onboarding_completed ?? null,
|
|
164
|
+
skills_registry_url: merged.skills_registry_url ?? null
|
|
160
165
|
}, null, 2), "utf-8");
|
|
161
166
|
}
|
|
167
|
+
async function getSkillsRegistryUrl() {
|
|
168
|
+
const env = process.env.SKILLS_REGISTRY_URL?.trim();
|
|
169
|
+
if (env)
|
|
170
|
+
return env;
|
|
171
|
+
const config = await readConfig();
|
|
172
|
+
const fromConfig = config.skills_registry_url?.trim();
|
|
173
|
+
if (fromConfig)
|
|
174
|
+
return fromConfig;
|
|
175
|
+
return DEFAULT_SKILLS_REGISTRY_URL;
|
|
176
|
+
}
|
|
162
177
|
function getConfigsDir() {
|
|
163
178
|
return join(getAgentOsHome(), "configs");
|
|
164
179
|
}
|
|
@@ -227,7 +242,7 @@ function resolveInWorkspace(workspaceDir, relativePath) {
|
|
|
227
242
|
}
|
|
228
243
|
return resolved;
|
|
229
244
|
}
|
|
230
|
-
var DEFAULT_HOME;
|
|
245
|
+
var DEFAULT_HOME, DEFAULT_SKILLS_REGISTRY_URL = "https://hub.sulala.ai/api/sulalahub/registry";
|
|
231
246
|
var init_config = __esm(() => {
|
|
232
247
|
DEFAULT_HOME = join(process.env.HOME || process.env.USERPROFILE || "~", ".agent-os");
|
|
233
248
|
});
|
|
@@ -12645,7 +12660,7 @@ async function getSkillSetupMarkdown(skillId) {
|
|
|
12645
12660
|
}
|
|
12646
12661
|
}
|
|
12647
12662
|
async function getStoreRegistry() {
|
|
12648
|
-
const registryUrl =
|
|
12663
|
+
const registryUrl = await getSkillsRegistryUrl();
|
|
12649
12664
|
if (!registryUrl)
|
|
12650
12665
|
return { skills: [], storeBase: null, registryUrl: null };
|
|
12651
12666
|
let storeBase = null;
|
|
@@ -12803,7 +12818,8 @@ async function installSystemSkills() {
|
|
|
12803
12818
|
if (alreadyInstalled)
|
|
12804
12819
|
continue;
|
|
12805
12820
|
try {
|
|
12806
|
-
await
|
|
12821
|
+
await mkdir3(skillsDir, { recursive: true });
|
|
12822
|
+
await cp(sourcePath, destPath, { recursive: true });
|
|
12807
12823
|
installed += 1;
|
|
12808
12824
|
} catch (err) {
|
|
12809
12825
|
console.error(`[skills] Install system skill ${id} failed:`, err);
|