@doingdev/opencode-claude-manager-plugin 0.1.64 → 0.1.66
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/README.md +106 -120
- package/dist/claude/claude-agent-sdk-adapter.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/manager/team-orchestrator.js +1 -1
- package/dist/plugin/agents/common.d.ts +2 -2
- package/dist/plugin/agents/common.js +5 -0
- package/dist/plugin/claude-manager.plugin.js +104 -0
- package/dist/plugin/inbox-ops.d.ts +50 -0
- package/dist/plugin/inbox-ops.js +166 -0
- package/dist/types/contracts.d.ts +18 -0
- package/package.json +13 -13
- package/dist/claude/session-live-tailer.d.ts +0 -51
- package/dist/claude/session-live-tailer.js +0 -269
- package/dist/manager/session-controller.d.ts +0 -41
- package/dist/manager/session-controller.js +0 -97
- package/dist/metadata/claude-metadata.service.d.ts +0 -12
- package/dist/metadata/claude-metadata.service.js +0 -38
- package/dist/metadata/repo-claude-config-reader.d.ts +0 -7
- package/dist/metadata/repo-claude-config-reader.js +0 -154
- package/dist/plugin/orchestrator.plugin.d.ts +0 -2
- package/dist/plugin/orchestrator.plugin.js +0 -116
- package/dist/providers/claude-code-wrapper.d.ts +0 -13
- package/dist/providers/claude-code-wrapper.js +0 -13
- package/dist/safety/bash-safety.d.ts +0 -21
- package/dist/safety/bash-safety.js +0 -62
- package/dist/src/claude/claude-agent-sdk-adapter.d.ts +0 -28
- package/dist/src/claude/claude-agent-sdk-adapter.js +0 -559
- package/dist/src/claude/claude-session.service.d.ts +0 -9
- package/dist/src/claude/claude-session.service.js +0 -15
- package/dist/src/claude/session-live-tailer.d.ts +0 -51
- package/dist/src/claude/session-live-tailer.js +0 -269
- package/dist/src/claude/tool-approval-manager.d.ts +0 -30
- package/dist/src/claude/tool-approval-manager.js +0 -279
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +0 -3
- package/dist/src/manager/context-tracker.d.ts +0 -32
- package/dist/src/manager/context-tracker.js +0 -103
- package/dist/src/manager/git-operations.d.ts +0 -18
- package/dist/src/manager/git-operations.js +0 -86
- package/dist/src/manager/persistent-manager.d.ts +0 -39
- package/dist/src/manager/persistent-manager.js +0 -44
- package/dist/src/manager/session-controller.d.ts +0 -41
- package/dist/src/manager/session-controller.js +0 -97
- package/dist/src/manager/team-orchestrator.d.ts +0 -81
- package/dist/src/manager/team-orchestrator.js +0 -612
- package/dist/src/plugin/agent-hierarchy.d.ts +0 -1
- package/dist/src/plugin/agent-hierarchy.js +0 -2
- package/dist/src/plugin/agents/browser-qa.d.ts +0 -14
- package/dist/src/plugin/agents/browser-qa.js +0 -31
- package/dist/src/plugin/agents/common.d.ts +0 -36
- package/dist/src/plugin/agents/common.js +0 -59
- package/dist/src/plugin/agents/cto.d.ts +0 -9
- package/dist/src/plugin/agents/cto.js +0 -39
- package/dist/src/plugin/agents/engineers.d.ts +0 -9
- package/dist/src/plugin/agents/engineers.js +0 -11
- package/dist/src/plugin/agents/index.d.ts +0 -5
- package/dist/src/plugin/agents/index.js +0 -5
- package/dist/src/plugin/agents/team-planner.d.ts +0 -10
- package/dist/src/plugin/agents/team-planner.js +0 -23
- package/dist/src/plugin/claude-manager.plugin.d.ts +0 -10
- package/dist/src/plugin/claude-manager.plugin.js +0 -950
- package/dist/src/plugin/service-factory.d.ts +0 -38
- package/dist/src/plugin/service-factory.js +0 -101
- package/dist/src/prompts/registry.d.ts +0 -2
- package/dist/src/prompts/registry.js +0 -210
- package/dist/src/state/file-run-state-store.d.ts +0 -14
- package/dist/src/state/file-run-state-store.js +0 -85
- package/dist/src/state/team-state-store.d.ts +0 -14
- package/dist/src/state/team-state-store.js +0 -88
- package/dist/src/state/transcript-store.d.ts +0 -15
- package/dist/src/state/transcript-store.js +0 -44
- package/dist/src/team/roster.d.ts +0 -5
- package/dist/src/team/roster.js +0 -40
- package/dist/src/types/contracts.d.ts +0 -261
- package/dist/src/types/contracts.js +0 -2
- package/dist/src/util/fs-helpers.d.ts +0 -8
- package/dist/src/util/fs-helpers.js +0 -21
- package/dist/src/util/project-context.d.ts +0 -10
- package/dist/src/util/project-context.js +0 -105
- package/dist/src/util/transcript-append.d.ts +0 -7
- package/dist/src/util/transcript-append.js +0 -29
- package/dist/state/file-run-state-store.d.ts +0 -14
- package/dist/state/file-run-state-store.js +0 -85
- package/dist/test/claude-agent-sdk-adapter.test.d.ts +0 -1
- package/dist/test/claude-agent-sdk-adapter.test.js +0 -707
- package/dist/test/claude-manager.plugin.test.d.ts +0 -1
- package/dist/test/claude-manager.plugin.test.js +0 -316
- package/dist/test/context-tracker.test.d.ts +0 -1
- package/dist/test/context-tracker.test.js +0 -130
- package/dist/test/cto-active-team.test.d.ts +0 -1
- package/dist/test/cto-active-team.test.js +0 -199
- package/dist/test/file-run-state-store.test.d.ts +0 -1
- package/dist/test/file-run-state-store.test.js +0 -82
- package/dist/test/fs-helpers.test.d.ts +0 -1
- package/dist/test/fs-helpers.test.js +0 -56
- package/dist/test/git-operations.test.d.ts +0 -1
- package/dist/test/git-operations.test.js +0 -133
- package/dist/test/persistent-manager.test.d.ts +0 -1
- package/dist/test/persistent-manager.test.js +0 -48
- package/dist/test/project-context.test.d.ts +0 -1
- package/dist/test/project-context.test.js +0 -92
- package/dist/test/prompt-registry.test.d.ts +0 -1
- package/dist/test/prompt-registry.test.js +0 -117
- package/dist/test/report-claude-event.test.d.ts +0 -1
- package/dist/test/report-claude-event.test.js +0 -304
- package/dist/test/session-controller.test.d.ts +0 -1
- package/dist/test/session-controller.test.js +0 -149
- package/dist/test/session-live-tailer.test.d.ts +0 -1
- package/dist/test/session-live-tailer.test.js +0 -313
- package/dist/test/team-orchestrator.test.d.ts +0 -1
- package/dist/test/team-orchestrator.test.js +0 -583
- package/dist/test/team-state-store.test.d.ts +0 -1
- package/dist/test/team-state-store.test.js +0 -54
- package/dist/test/tool-approval-manager.test.d.ts +0 -1
- package/dist/test/tool-approval-manager.test.js +0 -260
- package/dist/test/transcript-append.test.d.ts +0 -1
- package/dist/test/transcript-append.test.js +0 -37
- package/dist/test/transcript-store.test.d.ts +0 -1
- package/dist/test/transcript-store.test.js +0 -50
- package/dist/test/undo-propagation.test.d.ts +0 -1
- package/dist/test/undo-propagation.test.js +0 -837
- package/dist/util/project-context.d.ts +0 -10
- package/dist/util/project-context.js +0 -105
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.config.js +0 -11
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const AGENT_CTO = "cto";
|
|
2
|
-
export declare const AGENT_TEAM_PLANNER = "team-planner";
|
|
3
|
-
export declare const AGENT_BROWSER_QA = "browser-qa";
|
|
4
|
-
export declare const ENGINEER_AGENT_IDS: {
|
|
5
|
-
readonly Tom: "tom";
|
|
6
|
-
readonly John: "john";
|
|
7
|
-
readonly Maya: "maya";
|
|
8
|
-
readonly Sara: "sara";
|
|
9
|
-
readonly Alex: "alex";
|
|
10
|
-
readonly BrowserQA: "browser-qa";
|
|
11
|
-
};
|
|
12
|
-
/** General named engineers only (Tom/John/Maya/Sara/Alex). BrowserQA is a specialist registered separately. */
|
|
13
|
-
export declare const ENGINEER_AGENT_NAMES: readonly ["Tom", "John", "Maya", "Sara", "Alex"];
|
|
14
|
-
export declare const CTO_ONLY_TOOL_IDS: readonly ["team_status", "reset_engineer", "list_transcripts", "list_history", "git_diff", "git_commit", "git_reset", "git_status", "git_log", "approval_policy", "approval_decisions", "approval_update"];
|
|
15
|
-
export declare const ALL_RESTRICTED_TOOL_IDS: readonly ["team_status", "reset_engineer", "list_transcripts", "list_history", "git_diff", "git_commit", "git_reset", "git_status", "git_log", "approval_policy", "approval_decisions", "approval_update", "claude"];
|
|
16
|
-
export type ToolPermission = 'allow' | 'ask' | 'deny';
|
|
17
|
-
export type AgentPermission = {
|
|
18
|
-
'*'?: ToolPermission;
|
|
19
|
-
read?: ToolPermission;
|
|
20
|
-
grep?: ToolPermission;
|
|
21
|
-
glob?: ToolPermission;
|
|
22
|
-
list?: ToolPermission;
|
|
23
|
-
codesearch?: ToolPermission;
|
|
24
|
-
webfetch?: ToolPermission;
|
|
25
|
-
websearch?: ToolPermission;
|
|
26
|
-
lsp?: ToolPermission;
|
|
27
|
-
todowrite?: ToolPermission;
|
|
28
|
-
todoread?: ToolPermission;
|
|
29
|
-
question?: ToolPermission;
|
|
30
|
-
task?: ToolPermission | Record<string, ToolPermission>;
|
|
31
|
-
bash?: ToolPermission | Record<string, ToolPermission>;
|
|
32
|
-
[tool: string]: ToolPermission | Record<string, ToolPermission> | undefined;
|
|
33
|
-
};
|
|
34
|
-
export declare const CTO_READONLY_TOOLS: Record<string, ToolPermission>;
|
|
35
|
-
export declare function buildEngineerPermissions(): AgentPermission;
|
|
36
|
-
export declare function denyRestrictedToolsGlobally(permissions: Record<string, ToolPermission>): void;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { PLANNER_ELIGIBLE_ENGINEERS } from '../../team/roster.js';
|
|
2
|
-
export const AGENT_CTO = 'cto';
|
|
3
|
-
export const AGENT_TEAM_PLANNER = 'team-planner';
|
|
4
|
-
export const AGENT_BROWSER_QA = 'browser-qa';
|
|
5
|
-
export const ENGINEER_AGENT_IDS = {
|
|
6
|
-
Tom: 'tom',
|
|
7
|
-
John: 'john',
|
|
8
|
-
Maya: 'maya',
|
|
9
|
-
Sara: 'sara',
|
|
10
|
-
Alex: 'alex',
|
|
11
|
-
BrowserQA: 'browser-qa',
|
|
12
|
-
};
|
|
13
|
-
/** General named engineers only (Tom/John/Maya/Sara/Alex). BrowserQA is a specialist registered separately. */
|
|
14
|
-
export const ENGINEER_AGENT_NAMES = PLANNER_ELIGIBLE_ENGINEERS;
|
|
15
|
-
export const CTO_ONLY_TOOL_IDS = [
|
|
16
|
-
'team_status',
|
|
17
|
-
'reset_engineer',
|
|
18
|
-
'list_transcripts',
|
|
19
|
-
'list_history',
|
|
20
|
-
'git_diff',
|
|
21
|
-
'git_commit',
|
|
22
|
-
'git_reset',
|
|
23
|
-
'git_status',
|
|
24
|
-
'git_log',
|
|
25
|
-
'approval_policy',
|
|
26
|
-
'approval_decisions',
|
|
27
|
-
'approval_update',
|
|
28
|
-
];
|
|
29
|
-
const ENGINEER_TOOL_IDS = ['claude'];
|
|
30
|
-
export const ALL_RESTRICTED_TOOL_IDS = [...CTO_ONLY_TOOL_IDS, ...ENGINEER_TOOL_IDS];
|
|
31
|
-
export const CTO_READONLY_TOOLS = {
|
|
32
|
-
read: 'allow',
|
|
33
|
-
grep: 'allow',
|
|
34
|
-
glob: 'allow',
|
|
35
|
-
list: 'allow',
|
|
36
|
-
codesearch: 'allow',
|
|
37
|
-
webfetch: 'allow',
|
|
38
|
-
websearch: 'allow',
|
|
39
|
-
lsp: 'allow',
|
|
40
|
-
todowrite: 'allow',
|
|
41
|
-
todoread: 'allow',
|
|
42
|
-
question: 'allow',
|
|
43
|
-
};
|
|
44
|
-
export function buildEngineerPermissions() {
|
|
45
|
-
const denied = {};
|
|
46
|
-
for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
|
|
47
|
-
denied[toolId] = 'deny';
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
'*': 'deny',
|
|
51
|
-
...denied,
|
|
52
|
-
claude: 'allow',
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export function denyRestrictedToolsGlobally(permissions) {
|
|
56
|
-
for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
|
|
57
|
-
permissions[toolId] ??= 'deny';
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ManagerPromptRegistry } from '../../types/contracts.js';
|
|
2
|
-
import type { AgentPermission } from './common.js';
|
|
3
|
-
export declare function buildCtoAgentConfig(prompts: ManagerPromptRegistry): {
|
|
4
|
-
description: string;
|
|
5
|
-
mode: "primary";
|
|
6
|
-
color: string;
|
|
7
|
-
permission: AgentPermission;
|
|
8
|
-
prompt: string;
|
|
9
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AGENT_BROWSER_QA, AGENT_TEAM_PLANNER, ALL_RESTRICTED_TOOL_IDS, CTO_ONLY_TOOL_IDS, CTO_READONLY_TOOLS, ENGINEER_AGENT_IDS, ENGINEER_AGENT_NAMES, } from './common.js';
|
|
2
|
-
function buildCtoPermissions() {
|
|
3
|
-
const denied = {};
|
|
4
|
-
for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
|
|
5
|
-
denied[toolId] = 'deny';
|
|
6
|
-
}
|
|
7
|
-
const allowed = {};
|
|
8
|
-
for (const toolId of CTO_ONLY_TOOL_IDS) {
|
|
9
|
-
allowed[toolId] = 'allow';
|
|
10
|
-
}
|
|
11
|
-
const taskPermissions = { '*': 'deny' };
|
|
12
|
-
for (const engineer of ENGINEER_AGENT_NAMES) {
|
|
13
|
-
const agentId = ENGINEER_AGENT_IDS[engineer];
|
|
14
|
-
// Support both uppercase (user-friendly) and lowercase (canonical) agent IDs.
|
|
15
|
-
// This ensures both task({ subagent_type: 'Tom' }) and task({ subagent_type: 'tom' }) work.
|
|
16
|
-
taskPermissions[engineer] = 'allow'; // 'Tom', 'John', etc.
|
|
17
|
-
taskPermissions[agentId] = 'allow'; // 'tom', 'john', etc.
|
|
18
|
-
}
|
|
19
|
-
// BrowserQA is a specialist registered separately from ENGINEER_AGENT_NAMES; add both forms.
|
|
20
|
-
taskPermissions['BrowserQA'] = 'allow'; // uppercase (user-friendly)
|
|
21
|
-
taskPermissions[AGENT_BROWSER_QA] = 'allow'; // 'browser-qa' canonical
|
|
22
|
-
taskPermissions[AGENT_TEAM_PLANNER] = 'allow';
|
|
23
|
-
return {
|
|
24
|
-
'*': 'deny',
|
|
25
|
-
...CTO_READONLY_TOOLS,
|
|
26
|
-
...denied,
|
|
27
|
-
...allowed,
|
|
28
|
-
task: taskPermissions,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export function buildCtoAgentConfig(prompts) {
|
|
32
|
-
return {
|
|
33
|
-
description: 'Principal engineer who orchestrates AI-powered engineers. Decomposes work, asks clarifying questions, delegates precisely, reviews diffs, and owns the outcome.',
|
|
34
|
-
mode: 'primary',
|
|
35
|
-
color: '#D97757',
|
|
36
|
-
permission: buildCtoPermissions(),
|
|
37
|
-
prompt: prompts.ctoSystemPrompt,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EngineerName, ManagerPromptRegistry } from '../../types/contracts.js';
|
|
2
|
-
export declare function buildEngineerAgentConfig(prompts: ManagerPromptRegistry, engineer: EngineerName): {
|
|
3
|
-
description: string;
|
|
4
|
-
mode: "subagent";
|
|
5
|
-
hidden: boolean;
|
|
6
|
-
color: string;
|
|
7
|
-
permission: import("./common.js").AgentPermission;
|
|
8
|
-
prompt: string;
|
|
9
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { buildEngineerPermissions } from './common.js';
|
|
2
|
-
export function buildEngineerAgentConfig(prompts, engineer) {
|
|
3
|
-
return {
|
|
4
|
-
description: `${engineer} is a persistent engineer who works through one Claude Code session and remembers prior turns. Receives structured assignments (goal, mode, context, acceptance criteria, relevant paths, constraints, verification).`,
|
|
5
|
-
mode: 'subagent',
|
|
6
|
-
hidden: false,
|
|
7
|
-
color: '#D97757',
|
|
8
|
-
permission: buildEngineerPermissions(),
|
|
9
|
-
prompt: `You are ${engineer}.\n\n${prompts.engineerAgentPrompt}`,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { AGENT_BROWSER_QA, AGENT_CTO, AGENT_TEAM_PLANNER, denyRestrictedToolsGlobally, ENGINEER_AGENT_IDS, ENGINEER_AGENT_NAMES, } from './common.js';
|
|
2
|
-
export { buildCtoAgentConfig } from './cto.js';
|
|
3
|
-
export { buildTeamPlannerAgentConfig } from './team-planner.js';
|
|
4
|
-
export { buildEngineerAgentConfig } from './engineers.js';
|
|
5
|
-
export { buildBrowserQaAgentConfig } from './browser-qa.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { AGENT_BROWSER_QA, AGENT_CTO, AGENT_TEAM_PLANNER, denyRestrictedToolsGlobally, ENGINEER_AGENT_IDS, ENGINEER_AGENT_NAMES, } from './common.js';
|
|
2
|
-
export { buildCtoAgentConfig } from './cto.js';
|
|
3
|
-
export { buildTeamPlannerAgentConfig } from './team-planner.js';
|
|
4
|
-
export { buildEngineerAgentConfig } from './engineers.js';
|
|
5
|
-
export { buildBrowserQaAgentConfig } from './browser-qa.js';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ManagerPromptRegistry } from '../../types/contracts.js';
|
|
2
|
-
import type { AgentPermission } from './common.js';
|
|
3
|
-
export declare function buildTeamPlannerAgentConfig(prompts: ManagerPromptRegistry): {
|
|
4
|
-
description: string;
|
|
5
|
-
mode: "subagent";
|
|
6
|
-
hidden: boolean;
|
|
7
|
-
color: string;
|
|
8
|
-
permission: AgentPermission;
|
|
9
|
-
prompt: string;
|
|
10
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ALL_RESTRICTED_TOOL_IDS } from './common.js';
|
|
2
|
-
function buildTeamPlannerPermissions() {
|
|
3
|
-
const denied = {};
|
|
4
|
-
for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
|
|
5
|
-
denied[toolId] = 'deny';
|
|
6
|
-
}
|
|
7
|
-
return {
|
|
8
|
-
'*': 'deny',
|
|
9
|
-
plan_with_team: 'allow',
|
|
10
|
-
question: 'allow',
|
|
11
|
-
...denied,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export function buildTeamPlannerAgentConfig(prompts) {
|
|
15
|
-
return {
|
|
16
|
-
description: 'Thin planning wrapper that calls plan_with_team for dual-engineer synthesis with live UI activity.',
|
|
17
|
-
mode: 'subagent',
|
|
18
|
-
hidden: false,
|
|
19
|
-
color: '#D97757',
|
|
20
|
-
permission: buildTeamPlannerPermissions(),
|
|
21
|
-
prompt: prompts.teamPlannerPrompt,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Plugin } from '@opencode-ai/plugin';
|
|
2
|
-
import type { EngineerName } from '../types/contracts.js';
|
|
3
|
-
export declare const ClaudeManagerPlugin: Plugin;
|
|
4
|
-
/**
|
|
5
|
-
* Normalize an agent ID to its lowercase canonical form.
|
|
6
|
-
* Handles both uppercase (e.g., 'Tom') and lowercase (e.g., 'tom') inputs.
|
|
7
|
-
*/
|
|
8
|
-
export declare function normalizeAgentId(agentId: string): string;
|
|
9
|
-
export declare function engineerFromAgent(agentId: string): EngineerName;
|
|
10
|
-
export declare function isEngineerAgent(agentId: string): boolean;
|