open-azdo 0.1.5 → 0.1.6
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
CHANGED
|
@@ -37,6 +37,7 @@ Common Azure Pipeline defaults:
|
|
|
37
37
|
|
|
38
38
|
Optional flags:
|
|
39
39
|
|
|
40
|
+
- `--opencode-variant <name>` provider-specific variant or reasoning level, for example `minimal`, `low`, `medium`, `high`, or `xhigh`
|
|
40
41
|
- `--opencode-timeout-ms <milliseconds>` default `300000`
|
|
41
42
|
- `--workspace <path>`
|
|
42
43
|
- `--organization <name>`
|
|
@@ -75,6 +76,10 @@ trigger: none
|
|
|
75
76
|
pool:
|
|
76
77
|
vmImage: ubuntu-latest
|
|
77
78
|
|
|
79
|
+
variables:
|
|
80
|
+
OpenCodeModel: openai/gpt-5.4
|
|
81
|
+
OpenCodeThinking: high
|
|
82
|
+
|
|
78
83
|
steps:
|
|
79
84
|
- checkout: self
|
|
80
85
|
clean: true
|
|
@@ -92,11 +97,13 @@ steps:
|
|
|
92
97
|
tar -xzf opencode.tar.gz -C opencode-bin
|
|
93
98
|
export PATH="$PWD/opencode-bin:$PATH"
|
|
94
99
|
|
|
95
|
-
bun x open-azdo review --model "$(OpenCodeModel)"
|
|
100
|
+
bun x open-azdo review --model "$(OpenCodeModel)" --opencode-variant "$(OpenCodeThinking)"
|
|
96
101
|
displayName: Review Pull Request
|
|
97
102
|
env:
|
|
98
103
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
99
104
|
OPENAI_API_KEY: $(OpenAIApiKey)
|
|
105
|
+
# Alternative to the CLI flag above:
|
|
106
|
+
# OPEN_AZDO_OPENCODE_VARIANT: $(OpenCodeThinking)
|
|
100
107
|
OPEN_AZDO_OPENCODE_TIMEOUT_MS: "300000"
|
|
101
108
|
```
|
|
102
109
|
|
package/dist/open-azdo.js
CHANGED
|
@@ -26790,6 +26790,7 @@ var ReviewConfigValue = Service("open-azdo/ReviewConfigValue");
|
|
|
26790
26790
|
var RawReviewConfigSchema = exports_Schema.Struct({
|
|
26791
26791
|
command: exports_Schema.Literal("review"),
|
|
26792
26792
|
model: NonEmptyString2,
|
|
26793
|
+
opencodeVariant: exports_Schema.optionalKey(NonEmptyString2),
|
|
26793
26794
|
opencodeTimeoutMs: PositiveInt,
|
|
26794
26795
|
workspace: NonEmptyString2,
|
|
26795
26796
|
organization: NonEmptyString2,
|
|
@@ -26822,6 +26823,7 @@ var loadReviewConfig = exports_Effect.fn("config.loadReviewConfig")(function* (a
|
|
|
26822
26823
|
try: () => exports_Schema.decodeUnknownSync(RawReviewConfigSchema)(compactOptionalKeys({
|
|
26823
26824
|
command: "review",
|
|
26824
26825
|
model: readStringFlag(parsedArgs.flags, "model") ?? env.OPEN_AZDO_MODEL,
|
|
26826
|
+
opencodeVariant: readStringFlag(parsedArgs.flags, "opencode-variant") ?? readOptionalEnvString(env.OPEN_AZDO_OPENCODE_VARIANT),
|
|
26825
26827
|
opencodeTimeoutMs: toPositiveInt(readStringFlag(parsedArgs.flags, "opencode-timeout-ms") ?? env.OPEN_AZDO_OPENCODE_TIMEOUT_MS ?? "300000"),
|
|
26826
26828
|
workspace: readStringFlag(parsedArgs.flags, "workspace") ?? env.OPEN_AZDO_WORKSPACE ?? env.BUILD_SOURCESDIRECTORY,
|
|
26827
26829
|
organization,
|
|
@@ -26904,6 +26906,7 @@ var parseArgs = (argv) => {
|
|
|
26904
26906
|
var toReviewConfig = (rawConfig) => ({
|
|
26905
26907
|
command: rawConfig.command,
|
|
26906
26908
|
model: rawConfig.model,
|
|
26909
|
+
opencodeVariant: rawConfig.opencodeVariant,
|
|
26907
26910
|
opencodeTimeoutMs: rawConfig.opencodeTimeoutMs,
|
|
26908
26911
|
workspace: rawConfig.workspace,
|
|
26909
26912
|
organization: rawConfig.organization,
|
|
@@ -26939,6 +26942,13 @@ var readStringFlag = (flags, key) => {
|
|
|
26939
26942
|
return typeof value3 === "string" ? value3 : undefined;
|
|
26940
26943
|
};
|
|
26941
26944
|
var readBooleanFlag = (flags, key) => flags[key] === true;
|
|
26945
|
+
var readOptionalEnvString = (value3) => {
|
|
26946
|
+
if (typeof value3 !== "string") {
|
|
26947
|
+
return;
|
|
26948
|
+
}
|
|
26949
|
+
const trimmed = value3.trim();
|
|
26950
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
26951
|
+
};
|
|
26942
26952
|
var toPositiveInt = (value3) => {
|
|
26943
26953
|
if (!value3) {
|
|
26944
26954
|
return Number.NaN;
|
|
@@ -28474,6 +28484,17 @@ var buildOpenCodeConfig = (agentName) => ({
|
|
|
28474
28484
|
}
|
|
28475
28485
|
}
|
|
28476
28486
|
});
|
|
28487
|
+
var buildOpenCodeArgs = (config, prompt) => [
|
|
28488
|
+
"run",
|
|
28489
|
+
"--format",
|
|
28490
|
+
"json",
|
|
28491
|
+
"--agent",
|
|
28492
|
+
config.agent,
|
|
28493
|
+
"--model",
|
|
28494
|
+
config.model,
|
|
28495
|
+
...config.opencodeVariant ? ["--variant", config.opencodeVariant] : [],
|
|
28496
|
+
prompt
|
|
28497
|
+
];
|
|
28477
28498
|
var extractFinalResponse = (output) => {
|
|
28478
28499
|
const texts = [];
|
|
28479
28500
|
const structuredCandidates = [];
|
|
@@ -28588,7 +28609,7 @@ class OpenCodeService extends Service()("open-azdo/OpenCodeService") {
|
|
|
28588
28609
|
const result3 = yield* runner.execute({
|
|
28589
28610
|
operation: "OpenCodeService.run",
|
|
28590
28611
|
command: "opencode",
|
|
28591
|
-
args:
|
|
28612
|
+
args: buildOpenCodeArgs(config, prompt),
|
|
28592
28613
|
cwd: config.workspace,
|
|
28593
28614
|
timeoutMs: config.opencodeTimeoutMs,
|
|
28594
28615
|
env: {
|
|
@@ -28711,6 +28732,7 @@ var writeStdout = exports_Effect.fn("cli.writeStdout")(function* (text) {
|
|
|
28711
28732
|
var reviewLogFields = (config) => ({
|
|
28712
28733
|
command: config.command,
|
|
28713
28734
|
model: config.model,
|
|
28735
|
+
opencodeVariant: config.opencodeVariant,
|
|
28714
28736
|
opencodeTimeoutMs: config.opencodeTimeoutMs,
|
|
28715
28737
|
workspace: config.workspace,
|
|
28716
28738
|
organization: config.organization,
|
|
@@ -29979,4 +30001,4 @@ var main = async (argv, env) => await exports_Effect.runPromise(runCliWithExitHa
|
|
|
29979
30001
|
// bin/open-azdo.ts
|
|
29980
30002
|
process.exitCode = await main(process.argv.slice(2), process.env);
|
|
29981
30003
|
|
|
29982
|
-
//# debugId=
|
|
30004
|
+
//# debugId=D1E0CFCA8A85885F64756E2164756E21
|