Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/guster/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions external_plugins/guster/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "guster",
"version": "0.9.1",
"description": "Discover, audit, plan and evolve agent context across projects, skills, tools, knowledge and credentials; optionally scaffold a lightweight Guster Hub for durable knowledge and project state.",
"author": {
"name": "Lumos-789",
"url": "https://github.com/Lumos-789"
},
"homepage": "https://github.com/Lumos-789/guster",
"repository": "https://github.com/Lumos-789/guster",
"license": "MIT",
"keywords": [
"agent",
"context",
"governance",
"skills",
"mcp",
"codex",
"zcode",
"dsh"
],
"skills": "./skills/",
"interface": {
"displayName": "Guster",
"shortDescription": "Audit and evolve agent context",
"longDescription": "Guster discovers agent projects, instruction files, skills, tools, knowledge, state, evidence and credential references. It diagnoses drift, computes a context health score, produces reviewable migration plans, and can scaffold a lightweight hub for durable knowledge and project state.",
"developerName": "Lumos-789",
"category": "Developer Tools",
"capabilities": [
"Read",
"Write with confirmation"
]
}
}
27 changes: 27 additions & 0 deletions external_plugins/guster/.zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "guster",
"version": "0.9.1",
"description": "Discover, audit, plan and evolve agent context across projects, skills, tools, knowledge and credentials; optionally scaffold a lightweight Guster Hub for durable knowledge and project state.",
"description_i18n": {
"en": "Discover, audit, plan and evolve agent context across projects, skills, tools, knowledge and credentials; optionally scaffold a lightweight Guster Hub for durable knowledge and project state.",
"zh-CN": "发现、诊断、规划和演进全机 agent 上下文:项目、指令、Skill、工具、知识、状态与凭据引用;可初始化一个轻量 Guster Hub,承载长期知识与项目状态。"
},
"author": {
"name": "Lumos-789",
"url": "https://github.com/Lumos-789"
},
"homepage": "https://github.com/Lumos-789/guster",
"repository": "https://github.com/Lumos-789/guster",
"license": "MIT",
"keywords": [
"agent",
"context",
"governance",
"skills",
"mcp",
"codex",
"zcode",
"dsh"
],
"skills": "skills"
}
343 changes: 343 additions & 0 deletions external_plugins/guster/CHANGELOG.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions external_plugins/guster/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Lumos-789

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
347 changes: 347 additions & 0 deletions external_plugins/guster/README.md

Large diffs are not rendered by default.

287 changes: 287 additions & 0 deletions external_plugins/guster/README_CN.md

Large diffs are not rendered by default.

Binary file added external_plugins/guster/assets/guster/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions external_plugins/guster/bin/guster
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
SOURCE="${BASH_SOURCE[0]}"
while [ -L "$SOURCE" ]; do
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
SOURCE="$(readlink "$SOURCE")"
case "$SOURCE" in
/*) ;;
*) SOURCE="$DIR/$SOURCE" ;;
esac
done
HERE="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
PYTHONPATH="$HERE/src${PYTHONPATH:+:$PYTHONPATH}" exec python3 -m guster "$@"
3 changes: 3 additions & 0 deletions external_plugins/guster/cordis.patch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- insert:
- id: guster
name: 'guster'
84 changes: 84 additions & 0 deletions external_plugins/guster/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { fileURLToPath } from "node:url";

const skillRoots = {
guster: fileURLToPath(new URL("./skills/guster/", import.meta.url)),
"guster-hub": fileURLToPath(new URL("./skills/guster-hub/", import.meta.url)),
};

function parseFrontmatter(source, skillPath) {
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(source);
if (!match) throw new Error(`guster: missing YAML frontmatter in ${skillPath}`);
const header = {};
for (const rawLine of match[1].split(/\r?\n/)) {
const line = rawLine.trimEnd();
if (!line || line.startsWith("#") || /^\s/.test(line)) continue;
const colon = line.indexOf(":");
if (colon < 1) continue;
const key = line.slice(0, colon).trim();
let value = line.slice(colon + 1).trim();
if (
(value.startsWith('"') && value.endsWith('"')) ||
(value.startsWith("'") && value.endsWith("'"))
) {
value = value.slice(1, -1);
}
header[key] = value;
}
return { header, body: source.slice(match[0].length).trimStart() };
}

function loadSkill(skillName) {
const skillRoot = skillRoots[skillName];
const skillPath = join(skillRoot, "SKILL.md");
const source = readFileSync(skillPath, "utf8");
const { header, body } = parseFrontmatter(source, skillPath);
if (typeof header.name !== "string" || typeof header.description !== "string") {
throw new Error(`guster: invalid skill metadata in ${skillPath}`);
}
return {
name: header.name,
description: header.description,
content: body,
source: "bundled",
path: skillPath,
resourceBase: { kind: "directory", path: skillRoot },
invocation: { modelInvocable: true, userInvocable: true },
};
}

const skills = Object.keys(skillRoots).map((skillName) => loadSkill(skillName));

export const name = "guster";
export const inject = ["skills", "agents"];

export function apply(ctx) {
for (const skill of skills) ctx.skills.register(skill);

const agentRegistrations = new Map();
const registerForAgent = (agent) => {
if (agentRegistrations.has(agent)) return;
const injection = agent.ctx.inject(["skills"], (agentCtx) => {
for (const skill of skills) agentCtx.skills.register(skill);
});
agentRegistrations.set(agent, () => injection.dispose());
};

for (const agent of ctx.agents.list()) registerForAgent(agent);

ctx.on("agent/created", ({ agent }) => registerForAgent(agent));
ctx.on("agent/disposed", ({ agent }) => {
agentRegistrations.get(agent)?.();
agentRegistrations.delete(agent);
});

ctx.effect(
() => () => {
const disposals = [...agentRegistrations.values()].map((dispose) => dispose());
agentRegistrations.clear();
return Promise.all(disposals);
},
"guster agent registrations",
);
}
111 changes: 111 additions & 0 deletions external_plugins/guster/schemas/hub.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/Lumos-789/guster/main/schemas/hub.schema.json",
"title": "Guster hub manifest",
"description": "Format contract for hub.yaml, the Guster hub manifest. Field semantics follow src/guster/layout.py and src/guster/hub.py. Guster reads values in their string form, so quoted and unquoted spellings of schema_version are equivalent.",
"type": "object",
"required": [
"schema_version"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"description": "Manifest format major version; absent means 1.",
"enum": ["1", "2", 1, 2]
},
"profile": {
"description": "Hub profile; any other value draws a `hub validate` warning.",
"type": "string",
"enum": ["lite", "full"]
},
"hub_version": {
"description": "Version of the hub's own contract; informational, shown by `hub status`.",
"type": "string"
},
"min_guster": {
"description": "Minimum guster CLI version this hub needs; compared numerically by dotted segments.",
"type": "string"
},
"name": {
"description": "Human-readable hub name.",
"type": "string"
},
"created_at": {
"description": "ISO date the hub was created.",
"type": "string"
},
"paths": {
"description": "Declared hub sections. Relative values are hub-relative and must not contain '..'; a hub may also declare external sections with absolute or ~/ paths. Schema 2 must declare knowledge and projects.",
"type": "object",
"additionalProperties": {
"type": "string",
"minLength": 1
},
"properties": {
"knowledge": {
"type": "string",
"minLength": 1
},
"projects": {
"type": "string",
"minLength": 1
},
"tools": {
"type": "string",
"minLength": 1
}
}
},
"doctor": {
"description": "Settings for `guster doctor`.",
"type": "object",
"additionalProperties": false,
"properties": {
"waivers": {
"description": "Silence a finding; every waiver must carry a written reason.",
"type": "array",
"items": {
"type": "object",
"required": [
"rule",
"reason"
],
"additionalProperties": false,
"properties": {
"rule": {
"description": "Rule name of the waived finding, e.g. broken-pointer; the name a doctor finding reports, not the CTX spec id.",
"type": "string",
"minLength": 1
},
"path": {
"description": "Optional scope; only findings for this path are waived.",
"type": "string"
},
"reason": {
"description": "Written justification; a waiver without one fails loud.",
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
"if": {
"required": ["schema_version"],
"properties": {
"schema_version": {
"enum": ["2", 2]
}
}
},
"then": {
"required": ["paths"],
"properties": {
"paths": {
"required": ["knowledge", "projects"]
}
}
}
}
Loading