@plainconceptsplatform/agent-harness 2.3.0 → 2.4.1
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 +23 -12
- package/{src → cli}/commands/join.js +3 -4
- package/{src → cli}/commands/migrate.js +1 -1
- package/{src → cli}/commands/wizard.js +1 -1
- package/{src → cli}/index.js +1 -1
- package/{src → cli}/presets/agents-content.json +4 -4
- package/cli/presets/browser.json +10 -0
- package/{src → cli}/presets/clean.json +21 -21
- package/{src → cli}/presets/optimization.json +37 -37
- package/{src → cli}/presets/platforms.json +76 -76
- package/{src → cli}/presets/quota.json +16 -16
- package/{src → cli}/presets/source.json +23 -23
- package/cli/steps/browser/index.js +48 -0
- package/{src → cli}/steps/clean/index.js +120 -120
- package/{src → cli}/steps/copy/agents.js +119 -119
- package/{src → cli}/steps/copy/commands.js +95 -95
- package/{src → cli}/steps/copy/fullstack-engineer.js +89 -88
- package/{src → cli}/steps/copy/index.js +1 -1
- package/{src → cli}/steps/copy/opencode-json.js +196 -161
- package/{src → cli}/steps/copy/skills.js +2 -2
- package/{src → cli}/steps/models/format.js +88 -88
- package/{src → cli}/steps/models/index.js +64 -64
- package/{src → cli}/steps/openspec/index.js +136 -136
- package/{src → cli}/steps/optimization/codegraph.js +127 -127
- package/{src → cli}/steps/optimization/detect.js +66 -66
- package/{src → cli}/steps/optimization/humanizer.js +17 -17
- package/{src → cli}/steps/optimization/index.js +163 -163
- package/{src → cli}/steps/optimization/memory.js +88 -88
- package/{src → cli}/steps/optimization/patch-guardrails.js +109 -109
- package/{src → cli}/steps/optimization/quota.js +119 -119
- package/{src → cli}/steps/optimization/simple-english.js +17 -17
- package/{src → cli}/steps/optimization/skills-lock.js +30 -30
- package/{src → cli}/steps/platform/index.js +109 -109
- package/{src → cli}/steps/source/index.js +123 -123
- package/{src → cli}/utils/agent-color.js +111 -83
- package/{src → cli}/utils/exec-spinner.js +47 -47
- package/{src → cli}/utils/exec.js +134 -134
- package/{src → cli}/utils/models-pricing.js +42 -42
- package/{src → cli}/utils/paths.js +1 -1
- package/{src → cli}/utils/process.js +3 -3
- package/{src → cli}/utils/terminal.js +6 -6
- package/harness/.agents/skills/browser-automation/SKILL.md +72 -0
- package/{src/content → harness}/.agents/skills/pc-make-engineer/SKILL.md +219 -219
- package/{src/content → harness}/.agents/skills/pc-make-engineer/template.md +80 -80
- package/{src/content → harness}/.agents/skills/pc-plan-apply/simple-mode.md +1 -1
- package/{src/content → harness}/.agents/skills/pc-plan-archive/SKILL.md +3 -0
- package/{src/content → harness}/.agents/skills/pc-plan-explore/SKILL.md +3 -0
- package/{src/content → harness}/.agents/skills/pc-plan-goal/SKILL.md +11 -20
- package/{src/content → harness}/.agents/skills/pc-plan-goal/branching.md +1 -1
- package/{src/content → harness}/.agents/skills/pc-plan-goal/output.md +5 -8
- package/{src/content → harness}/.agents/skills/pc-plan-story/SKILL.md +3 -0
- package/{src/content → harness}/.agents/skills/pc-userstory-browser/SKILL.md +136 -132
- package/{src/content → harness}/.opencode/package.json +9 -10
- package/{src/content → harness}/.opencode/plugins/pc-subagent-tiers.js +368 -337
- package/{src/content → harness}/ARCHITECTURE.md +16 -16
- package/{src/content → harness}/DESIGN.md +16 -16
- package/{src/content → harness}/opencode.jsonc +47 -41
- package/{src/content → harness}/openspec/config.yaml +20 -20
- package/{src/content → harness}/skills-lock.json +17 -17
- package/package.json +7 -7
- package/src/content/.agents/skills/browser-automation/SKILL.md +0 -66
- package/src/presets/browser.json +0 -22
- package/src/steps/browser/index.js +0 -91
- /package/{src → cli}/commands/shared.js +0 -0
- /package/{src → cli}/commands/single.js +0 -0
- /package/{src → cli}/commands/update.js +0 -0
- /package/{src → cli}/fragments/archive/az.md +0 -0
- /package/{src → cli}/fragments/archive/gh.md +0 -0
- /package/{src → cli}/fragments/archive/gl.md +0 -0
- /package/{src → cli}/fragments/archive/none.md +0 -0
- /package/{src → cli}/fragments/guardrails/codegraph.md +0 -0
- /package/{src → cli}/fragments/guardrails/humanizer.md +0 -0
- /package/{src → cli}/fragments/guardrails/memory.md +0 -0
- /package/{src → cli}/fragments/guardrails/rtk.md +0 -0
- /package/{src → cli}/fragments/guardrails/simple-english.md +0 -0
- /package/{src → cli}/fragments/ops-backlog/az.md +0 -0
- /package/{src → cli}/fragments/ops-backlog/gh.md +0 -0
- /package/{src → cli}/fragments/ops-backlog/jira.md +0 -0
- /package/{src → cli}/fragments/ops-evidence/az.md +0 -0
- /package/{src → cli}/fragments/ops-evidence/gh.md +0 -0
- /package/{src → cli}/fragments/ops-evidence/jira.md +0 -0
- /package/{src → cli}/fragments/ops-review/az.md +0 -0
- /package/{src → cli}/fragments/ops-review/gh.md +0 -0
- /package/{src → cli}/fragments/ops-review/gl.md +0 -0
- /package/{src → cli}/fragments/ops-ship/az.md +0 -0
- /package/{src → cli}/fragments/ops-ship/gh.md +0 -0
- /package/{src → cli}/fragments/ops-ship/gl.md +0 -0
- /package/{src → cli}/presets/models.json +0 -0
- /package/{src → cli}/presets/openspec.json +0 -0
- /package/{src → cli}/steps/metadata/index.js +0 -0
- /package/{src → cli}/steps/models/write.js +0 -0
- /package/{src → cli}/utils/copy.js +0 -0
- /package/{src → cli}/utils/legacy-check.js +0 -0
- /package/{src → cli}/utils/models-cache.js +0 -0
- /package/{src → cli}/utils/update-manifest.js +0 -0
- /package/{src/content → harness}/.agents/skills/pc-guardrails-generic/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-guardrails-project/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-architecture/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-architecture/structure-template.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-design/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-engineer/signal-mapping.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-evidence-scaffold/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-guardrails/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-guardrails/category-reference.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-merge-risk-assess/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-merge-risk-assess/category-reference.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-make-user-model/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-ops-evidence/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-ops-ship/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-apply/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-goal/failure-policy.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-goal/output-mode.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-propose/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-propose/task-annotation.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-plan-quick/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-repo-audit/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-repo-help/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-repo-initialize/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-repo-onboard/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-repo-verify/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-userstory-az/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-userstory-gh/SKILL.md +0 -0
- /package/{src/content → harness}/.agents/skills/pc-userstory-jira/SKILL.md +0 -0
- /package/{src/content → harness}/.opencode/_gitignore +0 -0
- /package/{src/content → harness}/.opencode/commands/init.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-architecture.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-design.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-engineer.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-evidence-scaffold.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-guardrails.md +0 -0
- /package/{src/content → harness}/.opencode/commands/make-user-model.md +0 -0
- /package/{src/content → harness}/.opencode/commands/ops-backlog.md +0 -0
- /package/{src/content → harness}/.opencode/commands/ops-evidence.md +0 -0
- /package/{src/content → harness}/.opencode/commands/ops-review.md +0 -0
- /package/{src/content → harness}/.opencode/commands/ops-ship.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-apply.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-archive.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-explore.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-goal.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-propose.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-quick.md +0 -0
- /package/{src/content → harness}/.opencode/commands/plan-story.md +0 -0
- /package/{src/content → harness}/.opencode/commands/repo-audit.md +0 -0
- /package/{src/content → harness}/.opencode/commands/repo-help.md +0 -0
- /package/{src/content → harness}/.opencode/commands/repo-initialize.md +0 -0
- /package/{src/content → harness}/.opencode/commands/repo-onboard.md +0 -0
- /package/{src/content → harness}/.opencode/commands/repo-verify.md +0 -0
- /package/{src/content → harness}/.opencode/plugins/pc-subagent-monitor.js +0 -0
- /package/{src/content → harness}/.opencode/plugins/pc-system-reminders.js +0 -0
- /package/{src/content → harness}/.opencode/tui/pc-subagents.tsx +0 -0
- /package/{src/content → harness}/.opencode/tui.json +0 -0
- /package/{src/content → harness}/AGENTS.md +0 -0
- /package/{src/content → harness}/openspec/changes/archive/.gitkeep +0 -0
- /package/{src/content → harness}/openspec/specs/.gitkeep +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
> NOT GENERATED YET
|
|
2
|
-
>
|
|
3
|
-
> This file has not been populated yet. It is intentionally empty.
|
|
4
|
-
>
|
|
5
|
-
> **If this is a greenfield project** (no codebase exists yet): skip this for now.
|
|
6
|
-
> Come back and run `/make-architecture` once you have meaningful code, structure, or infrastructure in place.
|
|
7
|
-
>
|
|
8
|
-
> **If this is a brownfield project** (existing codebase): run this command now to generate the architecture documentation:
|
|
9
|
-
>
|
|
10
|
-
> ```
|
|
11
|
-
> /make-architecture
|
|
12
|
-
> ```
|
|
13
|
-
>
|
|
14
|
-
> This command analyzes your folder structure, config files, routes, data models, integrations, and build setup,
|
|
15
|
-
> then writes a complete ARCHITECTURE.md covering components, data flow, tech stack, deployment, and more.
|
|
16
|
-
> It is safe to rerun any time the architecture changes significantly.
|
|
1
|
+
> NOT GENERATED YET
|
|
2
|
+
>
|
|
3
|
+
> This file has not been populated yet. It is intentionally empty.
|
|
4
|
+
>
|
|
5
|
+
> **If this is a greenfield project** (no codebase exists yet): skip this for now.
|
|
6
|
+
> Come back and run `/make-architecture` once you have meaningful code, structure, or infrastructure in place.
|
|
7
|
+
>
|
|
8
|
+
> **If this is a brownfield project** (existing codebase): run this command now to generate the architecture documentation:
|
|
9
|
+
>
|
|
10
|
+
> ```
|
|
11
|
+
> /make-architecture
|
|
12
|
+
> ```
|
|
13
|
+
>
|
|
14
|
+
> This command analyzes your folder structure, config files, routes, data models, integrations, and build setup,
|
|
15
|
+
> then writes a complete ARCHITECTURE.md covering components, data flow, tech stack, deployment, and more.
|
|
16
|
+
> It is safe to rerun any time the architecture changes significantly.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
> NOT GENERATED YET
|
|
2
|
-
>
|
|
3
|
-
> This file has not been populated yet. It is intentionally empty.
|
|
4
|
-
>
|
|
5
|
-
> **If this is a greenfield project** (no UI exists yet): skip this for now.
|
|
6
|
-
> Come back and run `/make-design` once you have a design system, UI components, or styles in place.
|
|
7
|
-
>
|
|
8
|
-
> **If this is a brownfield project** (existing UI/styles): run this command now to generate the design documentation:
|
|
9
|
-
>
|
|
10
|
-
> ```
|
|
11
|
-
> /make-design
|
|
12
|
-
> ```
|
|
13
|
-
>
|
|
14
|
-
> This command analyzes your CSS, Tailwind config, component files, and design tokens,
|
|
15
|
-
> then writes a complete DESIGN.md with structured YAML tokens and written design intent.
|
|
16
|
-
> It is safe to rerun any time your design system changes.
|
|
1
|
+
> NOT GENERATED YET
|
|
2
|
+
>
|
|
3
|
+
> This file has not been populated yet. It is intentionally empty.
|
|
4
|
+
>
|
|
5
|
+
> **If this is a greenfield project** (no UI exists yet): skip this for now.
|
|
6
|
+
> Come back and run `/make-design` once you have a design system, UI components, or styles in place.
|
|
7
|
+
>
|
|
8
|
+
> **If this is a brownfield project** (existing UI/styles): run this command now to generate the design documentation:
|
|
9
|
+
>
|
|
10
|
+
> ```
|
|
11
|
+
> /make-design
|
|
12
|
+
> ```
|
|
13
|
+
>
|
|
14
|
+
> This command analyzes your CSS, Tailwind config, component files, and design tokens,
|
|
15
|
+
> then writes a complete DESIGN.md with structured YAML tokens and written design intent.
|
|
16
|
+
> It is safe to rerun any time your design system changes.
|
|
@@ -1,41 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
"instructions": [
|
|
4
|
-
"AGENTS.md"
|
|
5
|
-
],
|
|
6
|
-
"plugin": [
|
|
7
|
-
"@
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"instructions": [
|
|
4
|
+
"AGENTS.md"
|
|
5
|
+
],
|
|
6
|
+
"plugin": [
|
|
7
|
+
"@mohak34/opencode-notifier@0.2.8"
|
|
8
|
+
],
|
|
9
|
+
"mcp": {
|
|
10
|
+
"agent-browser": {
|
|
11
|
+
"type": "local",
|
|
12
|
+
"command": ["agent-browser", "mcp", "--tools", "core"],
|
|
13
|
+
"enabled": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"experimental": {
|
|
17
|
+
"mcp_timeout": 300000
|
|
18
|
+
},
|
|
19
|
+
"compaction": {
|
|
20
|
+
"auto": true,
|
|
21
|
+
"prune": true,
|
|
22
|
+
"reserved": 10000
|
|
23
|
+
},
|
|
24
|
+
"permission": {
|
|
25
|
+
"question": "allow",
|
|
26
|
+
"todowrite": "allow",
|
|
27
|
+
"skill": "allow"
|
|
28
|
+
},
|
|
29
|
+
"skills": {
|
|
30
|
+
"paths": [".agents/skills"]
|
|
31
|
+
},
|
|
32
|
+
// build and plan are the only primaries, and plan is the default: a session
|
|
33
|
+
// starts read-only and you switch to build once you know what to change.
|
|
34
|
+
// The pc-subagent-tiers plugin
|
|
35
|
+
// regenerates .opencode/agents/{build,plan}.md from fullstack-engineer.md on
|
|
36
|
+
// every startup and overrides these two entries with the resolved tier model,
|
|
37
|
+
// so what is here is only the floor if the plugin cannot run. Every engineer
|
|
38
|
+
// is mode: subagent and reached through task(), never picked by a human.
|
|
39
|
+
"default_agent": "plan",
|
|
40
|
+
"agent": {
|
|
41
|
+
"build": { "mode": "primary" },
|
|
42
|
+
"plan": {
|
|
43
|
+
"mode": "primary",
|
|
44
|
+
"permission": { "edit": "deny" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
schema: spec-driven
|
|
2
|
-
|
|
3
|
-
# Project context (optional)
|
|
4
|
-
# This is shown to AI when creating artifacts.
|
|
5
|
-
# Add your tech stack, conventions, style guides, domain knowledge, etc.
|
|
6
|
-
# Example:
|
|
7
|
-
# context: |
|
|
8
|
-
# Tech stack: TypeScript, React, Node.js
|
|
9
|
-
# We use conventional commits
|
|
10
|
-
# Domain: e-commerce platform
|
|
11
|
-
|
|
12
|
-
# Per-artifact rules (optional)
|
|
13
|
-
# Add custom rules for specific artifacts.
|
|
14
|
-
# Example:
|
|
15
|
-
# rules:
|
|
16
|
-
# proposal:
|
|
17
|
-
# - Keep proposals under 500 words
|
|
18
|
-
# - Always include a "Non-goals" section
|
|
19
|
-
# tasks:
|
|
20
|
-
# - Break tasks into chunks of max 2 hours
|
|
1
|
+
schema: spec-driven
|
|
2
|
+
|
|
3
|
+
# Project context (optional)
|
|
4
|
+
# This is shown to AI when creating artifacts.
|
|
5
|
+
# Add your tech stack, conventions, style guides, domain knowledge, etc.
|
|
6
|
+
# Example:
|
|
7
|
+
# context: |
|
|
8
|
+
# Tech stack: TypeScript, React, Node.js
|
|
9
|
+
# We use conventional commits
|
|
10
|
+
# Domain: e-commerce platform
|
|
11
|
+
|
|
12
|
+
# Per-artifact rules (optional)
|
|
13
|
+
# Add custom rules for specific artifacts.
|
|
14
|
+
# Example:
|
|
15
|
+
# rules:
|
|
16
|
+
# proposal:
|
|
17
|
+
# - Keep proposals under 500 words
|
|
18
|
+
# - Always include a "Non-goals" section
|
|
19
|
+
# tasks:
|
|
20
|
+
# - Break tasks into chunks of max 2 hours
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"skills": {
|
|
4
|
-
"find-skills": {
|
|
5
|
-
"source": "vercel-labs/skills",
|
|
6
|
-
"sourceType": "github",
|
|
7
|
-
"skillPath": "skills/find-skills/SKILL.md",
|
|
8
|
-
"computedHash": "781bd6d3f9b19f8c9af6b53d8d0e4876d0183841b565db34ca7092ffa412d111"
|
|
9
|
-
},
|
|
10
|
-
"user-story": {
|
|
11
|
-
"source": "deanpeters/product-manager-skills",
|
|
12
|
-
"sourceType": "github",
|
|
13
|
-
"skillPath": "skills/user-story/SKILL.md",
|
|
14
|
-
"computedHash": "user-story-placeholder"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"skills": {
|
|
4
|
+
"find-skills": {
|
|
5
|
+
"source": "vercel-labs/skills",
|
|
6
|
+
"sourceType": "github",
|
|
7
|
+
"skillPath": "skills/find-skills/SKILL.md",
|
|
8
|
+
"computedHash": "781bd6d3f9b19f8c9af6b53d8d0e4876d0183841b565db34ca7092ffa412d111"
|
|
9
|
+
},
|
|
10
|
+
"user-story": {
|
|
11
|
+
"source": "deanpeters/product-manager-skills",
|
|
12
|
+
"sourceType": "github",
|
|
13
|
+
"skillPath": "skills/user-story/SKILL.md",
|
|
14
|
+
"computedHash": "user-story-placeholder"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plainconceptsplatform/agent-harness",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Installs the Plain Concepts Platform Harness into any codebase, and keeps it up to date. Wires OpenCode, OpenSpec, codegraph, and agentmemory into a multi-agent workflow that runs on native parallel subagents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"author": "Plain Concepts",
|
|
25
25
|
"type": "module",
|
|
26
26
|
"bin": {
|
|
27
|
-
"agent-harness": "./
|
|
27
|
+
"agent-harness": "./cli/index.js"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"!
|
|
33
|
-
"!
|
|
34
|
-
"!
|
|
30
|
+
"cli",
|
|
31
|
+
"harness",
|
|
32
|
+
"!cli/**/*.test.js",
|
|
33
|
+
"!harness/**/*.test.js",
|
|
34
|
+
"!harness/**/node_modules"
|
|
35
35
|
],
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: browser-automation
|
|
3
|
-
description: Reliable, composable browser automation using OpenCode Browser primitives. Use when capturing screenshots of a locally running app, clicking UI elements, reading page content, or automating browser interactions on localhost.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires opencode-browser extension installed and running.
|
|
6
|
-
metadata:
|
|
7
|
-
author: copilots
|
|
8
|
-
version: "1.0"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
This skill operates on `localhost` URLs only. Screenshots, clicks, typing, scrolling, and queries on locally running apps are in scope. External services (github.com, dev.azure.com, npmjs.com, etc.) are out of scope for browser tools.
|
|
12
|
-
|
|
13
|
-
The only exception: when the user selects "Others (Browser)" as their backlog platform during onboarding, the `pc-userstory` skill may navigate to work item URLs the user explicitly provides. That is the sole case where external navigation is permitted, and only to URLs the user explicitly gives you.
|
|
14
|
-
|
|
15
|
-
## Best-practice workflow
|
|
16
|
-
|
|
17
|
-
1. Inspect tabs with `browser_get_tabs`
|
|
18
|
-
2. Open new tabs with `browser_open_tab` when needed
|
|
19
|
-
3. Navigate with `browser_navigate` if needed
|
|
20
|
-
4. Wait for UI using `browser_query` with `timeoutMs`
|
|
21
|
-
5. Discover candidates using `browser_query` with `mode=list`
|
|
22
|
-
6. Click, type, or select using `index`
|
|
23
|
-
7. Confirm using `browser_query` or `browser_snapshot`
|
|
24
|
-
|
|
25
|
-
## CLI-first debugging
|
|
26
|
-
|
|
27
|
-
- List all available tools: `npx @different-ai/opencode-browser@4.6.1 tools`
|
|
28
|
-
- Run one tool directly: `npx @different-ai/opencode-browser@4.6.1 tool browser_status`
|
|
29
|
-
- Pass JSON args: `npx @different-ai/opencode-browser@4.6.1 tool browser_query --args '{"mode":"page_text"}'`
|
|
30
|
-
- Run smoke test: `npx @different-ai/opencode-browser@4.6.1 self-test`
|
|
31
|
-
- After `update`, reload the unpacked extension in `chrome://extensions`
|
|
32
|
-
|
|
33
|
-
## Selecting options
|
|
34
|
-
|
|
35
|
-
- Use `browser_select` for native `<select>` elements
|
|
36
|
-
- Prefer `value` or `label`; use `optionIndex` when needed
|
|
37
|
-
- Example: `browser_select({ selector: "select", value: "plugin" })`
|
|
38
|
-
|
|
39
|
-
## Query modes
|
|
40
|
-
|
|
41
|
-
- `text`: read visible text from a matched element
|
|
42
|
-
- `value`: read input values
|
|
43
|
-
- `list`: list many matches with text/metadata
|
|
44
|
-
- `exists`: check presence and count
|
|
45
|
-
- `page_text`: extract visible page text
|
|
46
|
-
|
|
47
|
-
## Opening tabs
|
|
48
|
-
|
|
49
|
-
- Use `browser_open_tab` to create a new tab, optionally with `url` and `active`
|
|
50
|
-
- Example: `browser_open_tab({ url: "https://example.com", active: false })`
|
|
51
|
-
|
|
52
|
-
## Troubleshooting
|
|
53
|
-
|
|
54
|
-
- If a selector fails, run `browser_query` with `mode=page_text` to confirm the content exists
|
|
55
|
-
- Use `mode=list` on broad selectors (`button`, `a`, `*[role="button"]`, `*[role="listitem"]`) and choose by index
|
|
56
|
-
- For inbox/chat panes, try text selectors first (`text:Subject line`) then verify selection with `browser_query`
|
|
57
|
-
- For scrollable containers, pass both `selector` and `x`/`y` to `browser_scroll` and then verify `scrollTop`
|
|
58
|
-
|
|
59
|
-
## Scope
|
|
60
|
-
|
|
61
|
-
- Screenshots of locally running app on `localhost` URLs: in scope
|
|
62
|
-
- Click, type, scroll, query on `localhost` pages: in scope
|
|
63
|
-
- Navigate to work item URLs the user explicitly provides (when backlog platform is "Others (Browser)"): in scope
|
|
64
|
-
- Navigate to external services for non-work-item purposes: out of scope
|
|
65
|
-
- DevOps or GitHub CLI operations via browser tools: out of scope
|
|
66
|
-
- Reading or modifying production systems via browser tools: out of scope
|
package/src/presets/browser.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"installer": {
|
|
3
|
-
"command": "npx",
|
|
4
|
-
"args": ["@different-ai/opencode-browser@4.6.1", "install"]
|
|
5
|
-
},
|
|
6
|
-
"output": {
|
|
7
|
-
"showAfter": "To load the extension",
|
|
8
|
-
"hideAfter": "Press Enter when"
|
|
9
|
-
},
|
|
10
|
-
"locationChoices": {
|
|
11
|
-
"local": "2",
|
|
12
|
-
"global": "1"
|
|
13
|
-
},
|
|
14
|
-
"autoAnswers": [
|
|
15
|
-
{ "trigger": "Press Enter when", "response": "" },
|
|
16
|
-
{ "trigger": "Choose config location", "response": "__LOCATION__" },
|
|
17
|
-
{ "trigger": "Add plugin automatically?", "response": "y" },
|
|
18
|
-
{ "trigger": "Create one?", "response": "y" },
|
|
19
|
-
{ "trigger": "Add browser-automation skill", "response": "n" },
|
|
20
|
-
{ "trigger": "Check broker", "response": "n" }
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { execa } from 'execa'
|
|
2
|
-
import fse from 'fs-extra'
|
|
3
|
-
import { code, header, info, success, warn, error } from '../../utils/exec.js'
|
|
4
|
-
import os from 'os'
|
|
5
|
-
import path from 'path'
|
|
6
|
-
import { fileURLToPath } from 'url'
|
|
7
|
-
|
|
8
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
9
|
-
const BROWSER_PRESET_PATH = path.resolve(__dirname, '../../presets/browser.json')
|
|
10
|
-
const browserPreset = await fse.readJson(BROWSER_PRESET_PATH)
|
|
11
|
-
|
|
12
|
-
export async function installBrowser(ctx = {}) {
|
|
13
|
-
header('Step 9, Installing opencode-browser')
|
|
14
|
-
|
|
15
|
-
const installScope = ctx.installScope || 'local'
|
|
16
|
-
const locationAnswer = browserPreset.locationChoices?.[installScope] ?? browserPreset.locationChoices?.local ?? '2'
|
|
17
|
-
|
|
18
|
-
const pendingTriggers = browserPreset.autoAnswers.map(a => ({
|
|
19
|
-
...a,
|
|
20
|
-
response: a.response === '__LOCATION__' ? locationAnswer : a.response,
|
|
21
|
-
}))
|
|
22
|
-
|
|
23
|
-
let extensionPathShown = false
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
const child = execa(browserPreset.installer.command, browserPreset.installer.args, {
|
|
27
|
-
cwd: os.homedir(),
|
|
28
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
29
|
-
reject: false,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
let show = false
|
|
33
|
-
const triggers = [...pendingTriggers]
|
|
34
|
-
|
|
35
|
-
child.stdout.on('data', (chunk) => {
|
|
36
|
-
const text = chunk.toString()
|
|
37
|
-
|
|
38
|
-
if (text.includes(browserPreset.output.showAfter)) show = true
|
|
39
|
-
if (text.includes(browserPreset.output.hideAfter)) show = false
|
|
40
|
-
|
|
41
|
-
if (show) process.stdout.write(chunk)
|
|
42
|
-
|
|
43
|
-
// Detect the extension path from the installer output to show it clearly
|
|
44
|
-
if (!extensionPathShown) {
|
|
45
|
-
const pathMatch = text.match(/(C:\\[^\s]+(?:extension|opencode-browser[^\s]*))/i) ||
|
|
46
|
-
text.match(/((?:\/|~)[^\s]*(?:extension|opencode-browser[^\s]*))/i)
|
|
47
|
-
if (pathMatch) {
|
|
48
|
-
extensionPathShown = true
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
for (let i = 0; i < triggers.length; i++) {
|
|
53
|
-
if (text.includes(triggers[i].trigger)) {
|
|
54
|
-
// When the installer asks to press Enter after loading the extension,
|
|
55
|
-
// show the manual steps clearly before auto-answering
|
|
56
|
-
if (triggers[i].trigger === browserPreset.output.hideAfter) {
|
|
57
|
-
info('')
|
|
58
|
-
warn('Manual step required: load the browser extension before pressing Enter')
|
|
59
|
-
code([
|
|
60
|
-
'1. Open chrome://extensions',
|
|
61
|
-
'2. Enable Developer mode (top-right toggle)',
|
|
62
|
-
'3. Click "Load unpacked"',
|
|
63
|
-
'4. Select the extension folder shown above',
|
|
64
|
-
'5. Pin the extension: open the Extensions menu (puzzle icon) and click the pin',
|
|
65
|
-
])
|
|
66
|
-
info('Auto-confirming in 5 seconds...')
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
child.stdin.write(`${triggers[i].response}\n`)
|
|
70
|
-
triggers.splice(i, 1)
|
|
71
|
-
break
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
child.stderr.on('data', (chunk) => process.stderr.write(chunk))
|
|
77
|
-
|
|
78
|
-
const result = await child
|
|
79
|
-
|
|
80
|
-
if (result.exitCode === 0) {
|
|
81
|
-
success('opencode-browser installed')
|
|
82
|
-
if (extensionPathShown) {
|
|
83
|
-
info('If you skipped loading the extension, run: npx @different-ai/opencode-browser@4.6.1 install')
|
|
84
|
-
}
|
|
85
|
-
} else {
|
|
86
|
-
warn('opencode-browser install exited with non-zero code')
|
|
87
|
-
}
|
|
88
|
-
} catch (err) {
|
|
89
|
-
error(`Failed to install opencode-browser: ${err.message}`)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src/content → harness}/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src/content → harness}/.agents/skills/pc-make-merge-risk-assess/category-reference.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|