Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Validate complete builtin resource inventory

YToolboxa3e0415873f5
diff --git a/bin/builtin-resource-gate.cjs b/bin/builtin-resource-gate.cjs
index fc0af33a..76b95c9f 100644
--- a/bin/builtin-resource-gate.cjs
+++ b/bin/builtin-resource-gate.cjs
@@ -283,8 +283,11 @@ function marketplaceAgentInventory(root, standaloneSkills) {
const agent = readJson(`builtin marketplace agent ${id}`, path.join(dir, 'agent.json'));
const name = typeof agent.name === 'string' ? agent.name.trim() : '';
const version = typeof agent.version === 'string' ? agent.version.trim() : '';
- if (agent.agent_id !== id || !name || !version) {
- throw new Error(`[builtin-resource-gate] invalid id/name/version for builtin marketplace agent ${id}`);
+ const icon = typeof agent.icon === 'string' ? agent.icon.trim() : '';
+ const color = typeof agent.color === 'string' ? agent.color.trim() : '';
+ const updatedAt = typeof agent.updated_at === 'string' ? agent.updated_at.trim() : '';
+ if (agent.agent_id !== id || !name || !version || !icon || !color || !updatedAt || !Number.isFinite(Date.parse(updatedAt))) {
+ throw new Error(`[builtin-resource-gate] invalid id/name/version/icon/color/update metadata for builtin marketplace agent ${id}`);
}
if (!Array.isArray(agent.skill_list) || agent.skill_list.some((item) => typeof item !== 'string' || !item.trim())) {
throw new Error(`[builtin-resource-gate] builtin marketplace agent ${id} skill_list must be a string array`);
@@ -303,7 +306,16 @@ function marketplaceAgentInventory(root, standaloneSkills) {
throw new Error(`[builtin-resource-gate] builtin marketplace agent ${id} references missing skill ${skill}`);
}
}
- rows.push({ id, name, version, skill_list: [...skillList].sort(), embedded_skills: embeddedSkills });
+ rows.push({
+ id,
+ name,
+ version,
+ icon,
+ color,
+ updated_at: updatedAt,
+ skill_list: [...skillList].sort(),
+ embedded_skills: embeddedSkills,
+ });
}
exactNames(
'required builtin marketplace agent inventory',
diff --git a/resources/builtin/_manifest.json b/resources/builtin/_manifest.json
index 0b1b61ab..0e208158 100644
--- a/resources/builtin/_manifest.json
+++ b/resources/builtin/_manifest.json
@@ -676,6 +676,9 @@
"id": "78900d8758bc",
"name": "DeepResearcher",
"version": "1.0.6",
+ "icon": "search",
+ "color": "sky",
+ "updated_at": "2026-07-14T15:17:44",
"skill_list": [
"6743aa0797a2",
"9be6fda271a5",
@@ -688,6 +691,9 @@
"id": "79df9cc89f5f",
"name": "VideoStudio",
"version": "1.1.15",
+ "icon": "film",
+ "color": "violet",
+ "updated_at": "2026-07-20T15:23:23.000Z",
"skill_list": [
"composition-design-review",
"design-system-importer",
@@ -723,6 +729,9 @@
"id": "bcfcb4921dce",
"name": "UIDesigner",
"version": "1.3.1",
+ "icon": "palette",
+ "color": "violet",
+ "updated_at": "2026-07-17T06:59:13.000Z",
"skill_list": [
"ui-artifact-workspace",
"ui-color",
@@ -758,6 +767,9 @@
"id": "e064dca9e1bd",
"name": "SeoGeoAgent",
"version": "1.0.2",
+ "icon": "target",
+ "color": "gold",
+ "updated_at": "2026-07-04T00:00:00",
"skill_list": [
"geo-probe",
"geo-score",
diff --git a/test/main/util/builtin-resource-gate.test.ts b/test/main/util/builtin-resource-gate.test.ts
index 298ee8d8..09ff3a4a 100644
--- a/test/main/util/builtin-resource-gate.test.ts
+++ b/test/main/util/builtin-resource-gate.test.ts
@@ -10,7 +10,14 @@ const gate = require('../../../bin/builtin-resource-gate.cjs') as {
files: unknown[];
inventory: {
system_skills: unknown[];
- marketplace_agents: Array<{ id: string; skill_list: string[]; embedded_skills: string[] }>;
+ marketplace_agents: Array<{
+ id: string;
+ icon: string;
+ color: string;
+ updated_at: string;
+ skill_list: string[];
+ embedded_skills: string[];
+ }>;
marketplace_skills: Array<{ id: string }>;
};
};
@@ -50,6 +57,9 @@ describe('builtin-resource-gate', () => {
expect(manifest.inventory.marketplace_agents)
.toContainEqual(expect.objectContaining({
id: '78900d8758bc',
+ icon: 'search',
+ color: 'sky',
+ updated_at: '2026-07-14T15:17:44',
skill_list: expect.arrayContaining(['e7f5c0e6f1be']),
}));
expect(manifest.inventory.marketplace_agents)
@@ -123,6 +133,18 @@ describe('builtin-resource-gate', () => {
expect(() => gate.createBuiltinManifest(root)).toThrow(/references missing skill missing-skill/);
});
+ it('rejects an agent whose avatar or freshness metadata cannot drive an upgrade', () => {
+ const root = copyBuiltin();
+ const file = path.join(root, 'marketplace', 'agents', '78900d8758bc', 'agent.json');
+ const agent = JSON.parse(fs.readFileSync(file, 'utf8'));
+ delete agent.icon;
+ agent.updated_at = 'not-a-date';
+ fs.writeFileSync(file, `${JSON.stringify(agent, null, 2)}\n`);
+
+ expect(() => gate.createBuiltinManifest(root))
+ .toThrow(/invalid id\/name\/version\/icon\/color\/update metadata/);
+ });
+
it('allows ignored source caches but rejects them from a copied application', () => {
const root = copyBuiltin();
const cache = path.join(root, 'marketplace', 'skills', '6743aa0797a2', '__pycache__', 'junk.pyc');