@integrity-labs/agt-cli 0.10.6 → 0.10.7
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/bin/agt.js +3 -3
- package/dist/{chunk-O5T62RSQ.js → chunk-VDUA5FEW.js} +198 -14
- package/dist/chunk-VDUA5FEW.js.map +1 -0
- package/dist/lib/manager-worker.js +130 -3
- package/dist/lib/manager-worker.js.map +1 -1
- package/mcp/slack-channel.js +41 -0
- package/package.json +1 -1
- package/dist/chunk-O5T62RSQ.js.map +0 -1
package/dist/bin/agt.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveChannels,
|
|
33
33
|
serializeManifestForSlackCli,
|
|
34
34
|
setActiveTeam
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-VDUA5FEW.js";
|
|
36
36
|
|
|
37
37
|
// src/bin/agt.ts
|
|
38
38
|
import { join as join11 } from "path";
|
|
@@ -3411,7 +3411,7 @@ async function acpxCloseCommand(agent2, _opts, cmd) {
|
|
|
3411
3411
|
import { execSync } from "child_process";
|
|
3412
3412
|
import chalk19 from "chalk";
|
|
3413
3413
|
import ora15 from "ora";
|
|
3414
|
-
var cliVersion = true ? "0.10.
|
|
3414
|
+
var cliVersion = true ? "0.10.7" : "dev";
|
|
3415
3415
|
async function fetchLatestVersion() {
|
|
3416
3416
|
const host2 = getHost();
|
|
3417
3417
|
if (!host2) return null;
|
|
@@ -3810,7 +3810,7 @@ function handleError(err) {
|
|
|
3810
3810
|
}
|
|
3811
3811
|
|
|
3812
3812
|
// src/bin/agt.ts
|
|
3813
|
-
var cliVersion2 = true ? "0.10.
|
|
3813
|
+
var cliVersion2 = true ? "0.10.7" : "dev";
|
|
3814
3814
|
var program = new Command();
|
|
3815
3815
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
3816
3816
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -516,7 +516,17 @@ ${desc}
|
|
|
516
516
|
- Owner: ${frontmatter.owner.name}
|
|
517
517
|
- Environment: ${frontmatter.environment}
|
|
518
518
|
- Channels: ${channelList}
|
|
519
|
-
${reportsToSection}${knowledgeSection}
|
|
519
|
+
${reportsToSection}${knowledgeSection}
|
|
520
|
+
## Standards
|
|
521
|
+
|
|
522
|
+
The marginal cost of completeness is near zero. Do the whole thing.
|
|
523
|
+
|
|
524
|
+
- **Ship complete work.** When asked for something, deliver the finished product \u2014 not a plan, not a partial, not a workaround.
|
|
525
|
+
- **No half-measures.** Never table a task when the permanent solve is within reach. Never leave a dangling thread when tying it off takes five more minutes. Never present a workaround when the real fix exists.
|
|
526
|
+
- **Do it right.** With tests. With documentation. Work that makes the team genuinely proud, not just politely satisfied.
|
|
527
|
+
- **Search before building. Test before shipping.**
|
|
528
|
+
- **No excuses.** Time, fatigue, and complexity are not reasons to deliver less than complete.
|
|
529
|
+
`;
|
|
520
530
|
}
|
|
521
531
|
function generateAgentsMd(input) {
|
|
522
532
|
const { frontmatter, role, description, team } = input;
|
|
@@ -535,6 +545,16 @@ ${desc}
|
|
|
535
545
|
3. Read \`memory/YYYY-MM-DD.md\` (today + yesterday) for context
|
|
536
546
|
4. Check \`knowledge/\` \u2014 team-provided context (if available)
|
|
537
547
|
|
|
548
|
+
## Standards
|
|
549
|
+
|
|
550
|
+
The marginal cost of completeness is near zero. Do the whole thing.
|
|
551
|
+
|
|
552
|
+
- **Ship complete work.** When asked for something, deliver the finished product \u2014 not a plan, not a partial, not a workaround.
|
|
553
|
+
- **No half-measures.** Never table a task when the permanent solve is within reach. Never leave a dangling thread when tying it off takes five more minutes.
|
|
554
|
+
- **Do it right.** With tests. With documentation. Work that makes the team genuinely proud, not just politely satisfied.
|
|
555
|
+
- **Search before building. Test before shipping.**
|
|
556
|
+
- **No excuses.** Time, fatigue, and complexity are not reasons to deliver less than complete.
|
|
557
|
+
|
|
538
558
|
## Rules
|
|
539
559
|
|
|
540
560
|
- Write to files to remember things (no persistent memory between sessions)
|
|
@@ -2008,8 +2028,53 @@ When your manager sends you a message, prioritize it.
|
|
|
2008
2028
|
`;
|
|
2009
2029
|
return section;
|
|
2010
2030
|
}
|
|
2031
|
+
function buildTeamSection(teamMembers) {
|
|
2032
|
+
if (!teamMembers?.length)
|
|
2033
|
+
return "";
|
|
2034
|
+
const rows = teamMembers.map((m) => {
|
|
2035
|
+
const parts = [`**${m.display_name}**`];
|
|
2036
|
+
if (m.title)
|
|
2037
|
+
parts.push(m.title);
|
|
2038
|
+
parts.push(`(${m.role})`);
|
|
2039
|
+
if (m.contact_channel)
|
|
2040
|
+
parts.push(`\u2014 ${m.contact_channel}`);
|
|
2041
|
+
else if (m.email)
|
|
2042
|
+
parts.push(`\u2014 ${m.email}`);
|
|
2043
|
+
return `- ${parts.join(" ")}`;
|
|
2044
|
+
});
|
|
2045
|
+
return `## Team
|
|
2046
|
+
|
|
2047
|
+
${rows.join("\n")}
|
|
2048
|
+
|
|
2049
|
+
When escalating, delegating, or referencing team members, use their names.
|
|
2050
|
+
|
|
2051
|
+
`;
|
|
2052
|
+
}
|
|
2053
|
+
function buildPeopleSection(people) {
|
|
2054
|
+
if (!people?.length)
|
|
2055
|
+
return "";
|
|
2056
|
+
const rows = people.map((p) => {
|
|
2057
|
+
const parts = [`**${p.display_name}**`];
|
|
2058
|
+
if (p.title)
|
|
2059
|
+
parts.push(p.title);
|
|
2060
|
+
if (p.department)
|
|
2061
|
+
parts.push(`(${p.department})`);
|
|
2062
|
+
if (p.relationship)
|
|
2063
|
+
parts.push(`\u2014 ${p.relationship}`);
|
|
2064
|
+
if (p.contact_channel)
|
|
2065
|
+
parts.push(`| ${p.contact_channel}`);
|
|
2066
|
+
else if (p.email)
|
|
2067
|
+
parts.push(`| ${p.email}`);
|
|
2068
|
+
return `- ${parts.join(" ")}`;
|
|
2069
|
+
});
|
|
2070
|
+
return `## People
|
|
2071
|
+
|
|
2072
|
+
${rows.join("\n")}
|
|
2073
|
+
|
|
2074
|
+
`;
|
|
2075
|
+
}
|
|
2011
2076
|
function generateClaudeMd(input) {
|
|
2012
|
-
const { frontmatter, role, description, resolvedChannels, team, consoleUrl, hasQmd, integrations, knowledge, timezone, reportsTo, personalitySeed } = input;
|
|
2077
|
+
const { frontmatter, role, description, resolvedChannels, team, consoleUrl, hasQmd, integrations, knowledge, timezone, reportsTo, personalitySeed, teamMembers, people } = input;
|
|
2013
2078
|
const channelList = resolvedChannels?.length ? resolvedChannels.join(", ") : "none";
|
|
2014
2079
|
const roleDisplay = role ?? "Agent";
|
|
2015
2080
|
const desc = description?.trim();
|
|
@@ -2019,6 +2084,8 @@ function generateClaudeMd(input) {
|
|
|
2019
2084
|
const knowledgeSection = buildKnowledgeSection2(knowledge);
|
|
2020
2085
|
const personalitySection = buildPersonalitySection(personalitySeed);
|
|
2021
2086
|
const reportsToSection = buildReportsToSection2(reportsTo);
|
|
2087
|
+
const teamSection = buildTeamSection(teamMembers);
|
|
2088
|
+
const peopleSection = buildPeopleSection(people);
|
|
2022
2089
|
return `# ${frontmatter.display_name}
|
|
2023
2090
|
|
|
2024
2091
|
You are **${frontmatter.display_name}**, **${roleDisplay}**${team ? ` at **${team.name}**` : ""}.
|
|
@@ -2057,24 +2124,29 @@ are defined in \`CHARTER.md\`.
|
|
|
2057
2124
|
|
|
2058
2125
|
## Work Management
|
|
2059
2126
|
|
|
2060
|
-
When
|
|
2061
|
-
|
|
2127
|
+
**When in doubt, create a task.** Err on the side of tracking work rather than
|
|
2128
|
+
doing it silently. Any work that takes more than ~30 seconds should be a kanban task.
|
|
2129
|
+
|
|
2130
|
+
When you receive a request via any channel (Slack, Telegram, direct chat):
|
|
2062
2131
|
|
|
2063
|
-
1.
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2132
|
+
1. **First, check if the request is exempt** \u2014 the following do NOT need a task:
|
|
2133
|
+
- One-line answers, yes/no questions, or simple factual lookups (under ~30 seconds)
|
|
2134
|
+
- No-action acknowledgments: "thanks", "got it", "acknowledged", "will do", or other confirmations that require no further work
|
|
2135
|
+
2. **If not exempt, create a kanban task** with kanban.add \u2014 don't wait to see if it's "big enough"
|
|
2136
|
+
3. Reply in the channel thread: "On it \u2014 tracking here: ${kanbanUrl ?? "my kanban board"}" (include the created task title)
|
|
2137
|
+
4. Move the task to in_progress with kanban.move
|
|
2138
|
+
5. Do the work
|
|
2139
|
+
6. Mark done with kanban.done including a result summary
|
|
2140
|
+
7. Reply in the channel thread with the result
|
|
2069
2141
|
|
|
2070
|
-
|
|
2142
|
+
Everything that isn't exempt gets a task.
|
|
2071
2143
|
|
|
2072
2144
|
When asked about existing work, tasks, or what you've been doing \u2014 call kanban.list
|
|
2073
2145
|
first to load your recent board state. This gives you context about completed and
|
|
2074
2146
|
in-progress items so you can answer accurately.
|
|
2075
2147
|
|
|
2076
2148
|
${memorySection}
|
|
2077
|
-
${reportsToSection}${integrationsSection}${knowledgeSection}## Development Workflow
|
|
2149
|
+
${reportsToSection}${teamSection}${peopleSection}${integrationsSection}${knowledgeSection}## Development Workflow
|
|
2078
2150
|
|
|
2079
2151
|
### Repository Management
|
|
2080
2152
|
|
|
@@ -2100,6 +2172,16 @@ Worktrees allow parallel work without disrupting running services, other agents,
|
|
|
2100
2172
|
|
|
2101
2173
|
**Never switch branches on the main repo checkout.** Use worktrees for all feature work.
|
|
2102
2174
|
|
|
2175
|
+
## Standards
|
|
2176
|
+
|
|
2177
|
+
The marginal cost of completeness is near zero. Do the whole thing.
|
|
2178
|
+
|
|
2179
|
+
- **Ship complete work.** When asked for something, deliver the finished product \u2014 not a plan, not a partial, not a workaround. The answer is the done thing.
|
|
2180
|
+
- **No half-measures.** Never table a task when the permanent solve is within reach. Never leave a dangling thread when tying it off takes five more minutes. Never present a workaround when the real fix exists.
|
|
2181
|
+
- **Do it right.** With tests. With documentation. Work that makes the team genuinely proud, not just politely satisfied.
|
|
2182
|
+
- **Search before building. Test before shipping.**
|
|
2183
|
+
- **No excuses.** Time, fatigue, and complexity are not reasons to deliver less than complete.
|
|
2184
|
+
|
|
2103
2185
|
## Rules
|
|
2104
2186
|
|
|
2105
2187
|
- Never expose secrets or API keys in output.
|
|
@@ -2511,7 +2593,9 @@ var claudeCodeAdapter = {
|
|
|
2511
2593
|
knowledge: knowledgeRefs.length > 0 ? knowledgeRefs : void 0,
|
|
2512
2594
|
timezone: input.timezone,
|
|
2513
2595
|
reportsTo: input.reportsTo,
|
|
2514
|
-
personalitySeed: input.personalitySeed
|
|
2596
|
+
personalitySeed: input.personalitySeed,
|
|
2597
|
+
teamMembers: input.teamMembers,
|
|
2598
|
+
people: input.people
|
|
2515
2599
|
};
|
|
2516
2600
|
const artifacts = [
|
|
2517
2601
|
{ relativePath: "CLAUDE.md", content: generateClaudeMd(claudeMdInput) },
|
|
@@ -2987,6 +3071,99 @@ ${sections}`
|
|
|
2987
3071
|
};
|
|
2988
3072
|
writeFileSync3(pluginsJsonPath, JSON.stringify(pluginsConfig, null, 2));
|
|
2989
3073
|
},
|
|
3074
|
+
/**
|
|
3075
|
+
* Full plugin provisioning: install scripts, register hooks, apply permissions,
|
|
3076
|
+
* generate config, and write skill files. Called by the manager when a plugin
|
|
3077
|
+
* like Ultimate Coder is installed for an agent.
|
|
3078
|
+
*
|
|
3079
|
+
* @param codeName Agent code_name
|
|
3080
|
+
* @param plugin Plugin definition from the plugins table
|
|
3081
|
+
* @param contextValues Resolved context values from plugin_context
|
|
3082
|
+
* @param options.scriptSource How to install scripts: 'git-clone' (path) or 'npm' (package name)
|
|
3083
|
+
*/
|
|
3084
|
+
provisionPluginFull(codeName, plugin, contextValues, options) {
|
|
3085
|
+
assertValidCodeName(codeName);
|
|
3086
|
+
assertValidCodeName(plugin.slug);
|
|
3087
|
+
const projectDir = getProjectDir(codeName);
|
|
3088
|
+
const claudeDir = join3(projectDir, ".claude");
|
|
3089
|
+
mkdirSync3(claudeDir, { recursive: true });
|
|
3090
|
+
const sourceSpec = options?.scriptSource ?? `augmented-plugin:${plugin.slug}`;
|
|
3091
|
+
this.installPlugin(codeName, plugin.slug, sourceSpec, contextValues);
|
|
3092
|
+
const installedDir = join3(projectDir, ".claude", "plugins", plugin.slug);
|
|
3093
|
+
for (const skill of plugin.skills) {
|
|
3094
|
+
const skillId = skill.id;
|
|
3095
|
+
assertValidCodeName(skillId);
|
|
3096
|
+
const files = [{
|
|
3097
|
+
relativePath: "SKILL.md",
|
|
3098
|
+
content: skill.content
|
|
3099
|
+
}];
|
|
3100
|
+
this.installSkillFiles(codeName, `plugin-${skillId}`, files);
|
|
3101
|
+
}
|
|
3102
|
+
const scriptsConfig = plugin.scripts;
|
|
3103
|
+
if (scriptsConfig?.hooks) {
|
|
3104
|
+
const settingsPath = join3(claudeDir, "settings.local.json");
|
|
3105
|
+
let settings = {};
|
|
3106
|
+
try {
|
|
3107
|
+
settings = JSON.parse(readFileSync3(settingsPath, "utf-8"));
|
|
3108
|
+
} catch {
|
|
3109
|
+
}
|
|
3110
|
+
const existingHooks = settings["hooks"] ?? {};
|
|
3111
|
+
for (const [hookType, hookConfig] of Object.entries(scriptsConfig.hooks)) {
|
|
3112
|
+
if (typeof hookConfig === "string") {
|
|
3113
|
+
const existing = existingHooks[hookType] ?? [];
|
|
3114
|
+
const alreadyRegistered = existing.some((entry) => JSON.stringify(entry).includes(plugin.slug));
|
|
3115
|
+
if (!alreadyRegistered) {
|
|
3116
|
+
const scriptPath = hookConfig.startsWith("hooks/") ? hookConfig : `hooks/${hookConfig}`;
|
|
3117
|
+
existing.push({
|
|
3118
|
+
hooks: [{ type: "command", command: `${installedDir}/${scriptPath}` }]
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
existingHooks[hookType] = existing;
|
|
3122
|
+
} else if (typeof hookConfig === "object" && hookConfig !== null) {
|
|
3123
|
+
const config = hookConfig;
|
|
3124
|
+
const existing = existingHooks[hookType] ?? [];
|
|
3125
|
+
const alreadyRegistered = existing.some((entry) => JSON.stringify(entry).includes(plugin.slug));
|
|
3126
|
+
if (!alreadyRegistered) {
|
|
3127
|
+
const rawScript = config.script ?? "";
|
|
3128
|
+
const scriptPath = rawScript.startsWith("hooks/") ? rawScript : `hooks/${rawScript}`;
|
|
3129
|
+
const hookEntry = {
|
|
3130
|
+
hooks: [{ type: "command", command: `${installedDir}/${scriptPath}` }]
|
|
3131
|
+
};
|
|
3132
|
+
if (config.matcher) {
|
|
3133
|
+
hookEntry["matcher"] = config.matcher;
|
|
3134
|
+
}
|
|
3135
|
+
existing.push(hookEntry);
|
|
3136
|
+
}
|
|
3137
|
+
existingHooks[hookType] = existing;
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
settings["hooks"] = existingHooks;
|
|
3141
|
+
writeFileSync3(settingsPath, JSON.stringify(settings, null, 2));
|
|
3142
|
+
}
|
|
3143
|
+
if (plugin.allowed_tools.length > 0) {
|
|
3144
|
+
const settingsPath = join3(claudeDir, "settings.local.json");
|
|
3145
|
+
let settings = {};
|
|
3146
|
+
try {
|
|
3147
|
+
settings = JSON.parse(readFileSync3(settingsPath, "utf-8"));
|
|
3148
|
+
} catch {
|
|
3149
|
+
}
|
|
3150
|
+
const existingPerms = settings["permissions"] ?? {};
|
|
3151
|
+
const allowList = existingPerms["allow"] ?? [];
|
|
3152
|
+
for (const tool of plugin.allowed_tools) {
|
|
3153
|
+
if (!allowList.includes(tool)) {
|
|
3154
|
+
allowList.push(tool);
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
existingPerms["allow"] = allowList;
|
|
3158
|
+
settings["permissions"] = existingPerms;
|
|
3159
|
+
writeFileSync3(settingsPath, JSON.stringify(settings, null, 2));
|
|
3160
|
+
}
|
|
3161
|
+
if (contextValues && Object.keys(contextValues).length > 0) {
|
|
3162
|
+
const configDir = join3(projectDir, `.${plugin.slug}`);
|
|
3163
|
+
mkdirSync3(configDir, { recursive: true });
|
|
3164
|
+
writeFileSync3(join3(configDir, "config.json"), JSON.stringify(contextValues, null, 2));
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
2990
3167
|
executePluginHook(ctx) {
|
|
2991
3168
|
assertValidCodeName(ctx.codeName);
|
|
2992
3169
|
const agentRootDir = join3(getHomeDir3(), ".augmented", ctx.codeName);
|
|
@@ -3104,6 +3281,13 @@ ${credLines.join("\n")}
|
|
|
3104
3281
|
|
|
3105
3282
|
These credentials are pre-loaded. Reference them by their environment variable names when invoking tools.`);
|
|
3106
3283
|
}
|
|
3284
|
+
sections.push(`## Work Management
|
|
3285
|
+
|
|
3286
|
+
**When in doubt, create a task.** Any work that takes more than ~30 seconds should be tracked as a kanban task. Err on the side of creating a task rather than doing work silently.
|
|
3287
|
+
|
|
3288
|
+
The only things that don't need a task: one-line answers, yes/no questions, simple factual lookups you can answer in under 30 seconds, or no-action acknowledgments ("thanks", "got it", "acknowledged", "will do") that require no further work. Everything else gets a task.
|
|
3289
|
+
|
|
3290
|
+
The cost of an unnecessary task is near zero. The cost of invisible work is confusion, duplication, and lost context.`);
|
|
3107
3291
|
return sections.join("\n\n");
|
|
3108
3292
|
}
|
|
3109
3293
|
function stripFrontmatter(content) {
|
|
@@ -5565,4 +5749,4 @@ export {
|
|
|
5565
5749
|
detectDrift,
|
|
5566
5750
|
provision
|
|
5567
5751
|
};
|
|
5568
|
-
//# sourceMappingURL=chunk-
|
|
5752
|
+
//# sourceMappingURL=chunk-VDUA5FEW.js.map
|