bailinghub 0.10.0 → 0.10.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.en.md +6 -6
- package/README.md +6 -6
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/docker-compose.images.yml +2 -2
- package/docs/CHANGELOG.en.md +12 -1
- package/docs/CHANGELOG.md +12 -1
- package/docs/IMPLEMENTATION_STATUS.en.md +12 -3
- package/docs/IMPLEMENTATION_STATUS.md +12 -3
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/README.en.md +2 -0
- package/docs/README.md +2 -0
- package/docs/RELEASE_NOTES_v0.10.1.en.md +41 -0
- package/docs/RELEASE_NOTES_v0.10.1.md +41 -0
- package/docs/UPGRADE_v0.10.1.en.md +66 -0
- package/docs/UPGRADE_v0.10.1.md +66 -0
- package/package.json +5 -3
- package/scripts/check-doc-links.mjs +2 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-php-sdk-artifacts.mjs +152 -0
- package/scripts/check-php-sdk-artifacts.test.mjs +99 -0
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +5 -1
- package/scripts/sdk-declaration-contract-test.ts +34 -0
- package/scripts/sdk-p1-check.mjs +62 -26
- package/scripts/verify-github-repo.mjs +4 -0
- package/sdk/dotnet/Bailing.Connect/BailingConnect.cs +4 -4
- package/sdk/dotnet/README.md +8 -0
- package/sdk/dotnet/tests/Declaration/Declaration.csproj +11 -0
- package/sdk/dotnet/tests/Declaration/Program.cs +74 -0
- package/sdk/go/README.md +8 -0
- package/sdk/go/bailingconnect/connect.go +5 -5
- package/sdk/go/bailingconnect/declaration_test.go +107 -0
- package/sdk/java/README.md +13 -0
- package/sdk/java/src/main/java/com/bailing/connect/BailingConnect.java +4 -4
- package/sdk/java/tests/DeclarationTest.java +70 -0
- package/sdk/node/README.md +8 -0
- package/sdk/node/src/index.mjs +4 -4
- package/sdk/node/tests/declaration.test.mjs +41 -0
- package/sdk/php/README.md +16 -0
- package/sdk/php/src/Attributes/AiTool.php +4 -4
- package/sdk/php/src/SpecBuilder.php +8 -8
- package/sdk/php/tests/declaration-serialization.php +103 -0
- package/sdk/php7/README.md +14 -0
- package/sdk/php7/src/ToolDef.php +3 -3
- package/sdk/php7/src/ToolSpec.php +8 -13
- package/sdk/php7/tests/declaration-serialization.php +103 -0
- package/sdk/python/README.md +8 -0
- package/sdk/python/bailing_connect/__init__.py +6 -6
- package/sdk/python/tests/test_declaration.py +61 -0
- package/src/core/contracts/explicit-capability-values.test.ts +62 -0
- package/src/core/contracts/openapi-tools.ts +2 -2
- package/src/core/contracts/tool-annotations.ts +4 -4
- package/web/connect/bailing-connect-php.tgz +0 -0
- package/web/connect/bailing-connect-php7.tgz +0 -0
- package/web-admin/package-lock.json +4 -4
- package/web-admin/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bailinghub",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Open-source ACC runtime and agent control plane for existing business systems.",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"release:consistency:test": "node --test scripts/check-release-consistency.test.mjs",
|
|
92
92
|
"release:audit": "npm run release:consistency && npm run release:consistency:test && npm run images:policy:test && npm run public-content:denylist:test && npm run security:scan && npm run oss:guard && node scripts/release-audit.mjs && npm run package:artifact:check",
|
|
93
93
|
"github:verify": "node scripts/verify-github-repo.mjs",
|
|
94
|
-
"release:check": "npm run notices:check && npm run assets:check && npm run audit:deps && npm run audit:deps:test && npm run docx:vendor:verify-upstream && npm run docx:test && npm run client-api:contract && npm run client-api:ecosystem:clone && npm run typecheck && npm run installer:secrets:test && npm run doctor:deployment:typecheck && npm run doctor:deployment:test && npm run doctor:upgrade-plan:typecheck && npm run doctor:upgrade-plan:test && npm test && npm run widget:renderer:test && npm run web-admin:check && npm run docx:browser:test && npm run notification:console:test && npm run docs:check && npm run examples:check && npm run sdk:test && npm run sdk:test7 && npm run sdk:test-node && npm run sdk:test-python && npm run sdk:test-runtime && npm run sdk:test-p1 && npm run release:audit && npm run oss:verify && npm run github:verify",
|
|
94
|
+
"release:check": "npm run notices:check && npm run assets:check && npm run audit:deps && npm run audit:deps:test && npm run docx:vendor:verify-upstream && npm run docx:test && npm run client-api:contract && npm run client-api:ecosystem:clone && npm run typecheck && npm run installer:secrets:test && npm run doctor:deployment:typecheck && npm run doctor:deployment:test && npm run doctor:upgrade-plan:typecheck && npm run doctor:upgrade-plan:test && npm test && npm run widget:renderer:test && npm run web-admin:check && npm run docx:browser:test && npm run notification:console:test && npm run docs:check && npm run examples:check && npm run sdk:test && npm run sdk:test7 && npm run sdk:test-node && npm run sdk:test-python && npm run sdk:test-runtime && npm run sdk:test-p1 && npm run sdk:test-declarations && npm run sdk:artifacts:check && npm run release:audit && npm run oss:verify && npm run github:verify",
|
|
95
95
|
"images:build": "sh scripts/publish-images.sh",
|
|
96
96
|
"images:publish": "BAILING_PUSH_IMAGES=1 sh scripts/publish-images.sh",
|
|
97
97
|
"images:publish-mysql": "BAILING_PUSH_IMAGES=1 sh scripts/publish-mysql-image.sh",
|
|
@@ -117,7 +117,9 @@
|
|
|
117
117
|
"notification:console:test": "node scripts/notification-console-test.mjs",
|
|
118
118
|
"doctor:upgrade-plan": "tsx scripts/doctor.ts --upgrade-plan",
|
|
119
119
|
"doctor:upgrade-plan:test": "node --import tsx --test scripts/doctor-upgrade-plan.test.ts",
|
|
120
|
-
"doctor:upgrade-plan:typecheck": "tsc --noEmit --strict --noUncheckedIndexedAccess --noUnusedLocals --skipLibCheck --target ES2022 --module ESNext --moduleResolution Bundler --lib ES2022 --types node scripts/doctor-upgrade-plan.ts scripts/doctor-upgrade-plan.test.ts"
|
|
120
|
+
"doctor:upgrade-plan:typecheck": "tsc --noEmit --strict --noUncheckedIndexedAccess --noUnusedLocals --skipLibCheck --target ES2022 --module ESNext --moduleResolution Bundler --lib ES2022 --types node scripts/doctor-upgrade-plan.ts scripts/doctor-upgrade-plan.test.ts",
|
|
121
|
+
"sdk:test-declarations": "php sdk/php/tests/declaration-serialization.php | tsx scripts/sdk-declaration-contract-test.ts && php sdk/php7/tests/declaration-serialization.php | tsx scripts/sdk-declaration-contract-test.ts && node --test sdk/node/tests/declaration.test.mjs && PYTHONDONTWRITEBYTECODE=1 python3 sdk/python/tests/test_declaration.py",
|
|
122
|
+
"sdk:artifacts:check": "node --test scripts/check-php-sdk-artifacts.test.mjs && node scripts/check-php-sdk-artifacts.mjs"
|
|
121
123
|
},
|
|
122
124
|
"dependencies": {
|
|
123
125
|
"mammoth": "file:vendor/bailinghub-mammoth-library-1.12.0-bailinghub.1.tgz",
|
|
@@ -115,6 +115,8 @@ const englishCompanions = {
|
|
|
115
115
|
'docs/UPGRADE_v0.9.4.md': 'docs/UPGRADE_v0.9.4.en.md',
|
|
116
116
|
'docs/RELEASE_NOTES_v0.10.0.md': 'docs/RELEASE_NOTES_v0.10.0.en.md',
|
|
117
117
|
'docs/UPGRADE_v0.10.0.md': 'docs/UPGRADE_v0.10.0.en.md',
|
|
118
|
+
'docs/RELEASE_NOTES_v0.10.1.md': 'docs/RELEASE_NOTES_v0.10.1.en.md',
|
|
119
|
+
'docs/UPGRADE_v0.10.1.md': 'docs/UPGRADE_v0.10.1.en.md',
|
|
118
120
|
'docs/MODEL_OUTPUT_BUDGET.md': 'docs/MODEL_OUTPUT_BUDGET.en.md',
|
|
119
121
|
'docs/MODEL_CONTINUATION.md': 'docs/MODEL_CONTINUATION.en.md',
|
|
120
122
|
'docs/UPGRADE_v0.9.1.md': 'docs/UPGRADE_v0.9.1.en.md',
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.10.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.10.1"
|
|
13
13
|
MYSQL_TAG="${BAILING_MYSQL_IMAGE_TAG:-8.4}"
|
|
14
14
|
MYSQL_IMAGE="${BAILING_MYSQL_IMAGE:-$REGISTRY/$NAMESPACE/bailing-mysql:$MYSQL_TAG}"
|
|
15
15
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { lstatSync, mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { dirname, join, posix, resolve } from 'node:path';
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
|
+
|
|
8
|
+
const defaultRoot = fileURLToPath(new URL('../', import.meta.url));
|
|
9
|
+
const supportedSdks = ['php', 'php7'];
|
|
10
|
+
const sha256 = (value) => createHash('sha256').update(value).digest('hex');
|
|
11
|
+
|
|
12
|
+
function run(command, args) {
|
|
13
|
+
const result = spawnSync(command, args, { maxBuffer: 32 * 1024 * 1024 });
|
|
14
|
+
if (result.error) throw result.error;
|
|
15
|
+
if (result.status !== 0) {
|
|
16
|
+
throw new Error(`${command} exited ${result.status}: ${String(result.stderr || result.stdout).slice(0, 8000)}`);
|
|
17
|
+
}
|
|
18
|
+
return result.stdout;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function sourceFiles(root, relative = '') {
|
|
22
|
+
const files = [];
|
|
23
|
+
for (const name of readdirSync(join(root, relative)).sort()) {
|
|
24
|
+
if (/[\r\n\\]/.test(name)) throw new Error(`Unsupported SDK filename: ${JSON.stringify(name)}`);
|
|
25
|
+
const path = relative ? `${relative}/${name}` : name;
|
|
26
|
+
const stat = lstatSync(join(root, path));
|
|
27
|
+
if (stat.isSymbolicLink()) throw new Error(`SDK source symlinks are not allowed: ${path}`);
|
|
28
|
+
if (stat.isDirectory()) files.push(...sourceFiles(root, path));
|
|
29
|
+
else if (stat.isFile()) files.push(path);
|
|
30
|
+
else throw new Error(`SDK source contains a non-regular file: ${path}`);
|
|
31
|
+
}
|
|
32
|
+
return files.sort();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function lines(output) {
|
|
36
|
+
const result = String(output).split('\n');
|
|
37
|
+
if (result.at(-1) === '') result.pop();
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function archiveFiles(archive, prefix) {
|
|
42
|
+
const names = lines(run('tar', ['-tzf', archive]));
|
|
43
|
+
const details = lines(run('tar', ['-tvzf', archive]));
|
|
44
|
+
if (names.length !== details.length) throw new Error('Archive listing and file types do not agree');
|
|
45
|
+
const seen = new Set();
|
|
46
|
+
const files = [];
|
|
47
|
+
for (let index = 0; index < names.length; index++) {
|
|
48
|
+
const name = names[index];
|
|
49
|
+
const normalized = name.endsWith('/') ? name.slice(0, -1) : name;
|
|
50
|
+
if (!normalized || /[\r\n\\]/.test(normalized)
|
|
51
|
+
|| posix.normalize(normalized) !== normalized
|
|
52
|
+
|| (normalized !== prefix && !normalized.startsWith(`${prefix}/`))) {
|
|
53
|
+
throw new Error(`Unsafe archive path: ${JSON.stringify(name)}`);
|
|
54
|
+
}
|
|
55
|
+
if (seen.has(normalized)) throw new Error(`Duplicate archive path: ${name}`);
|
|
56
|
+
seen.add(normalized);
|
|
57
|
+
const type = details[index]?.[0];
|
|
58
|
+
if (type !== '-' && type !== 'd') throw new Error(`Archive links or special files are not allowed: ${name}`);
|
|
59
|
+
if (type === '-') {
|
|
60
|
+
if (normalized === prefix) throw new Error('Archive root must be a directory');
|
|
61
|
+
files.push(normalized.slice(prefix.length + 1));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return files.sort();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function regression(driver, sdkRoot, phpCommand, sdk) {
|
|
68
|
+
const output = run(phpCommand, [driver, sdkRoot]);
|
|
69
|
+
let result;
|
|
70
|
+
try { result = JSON.parse(String(output)); }
|
|
71
|
+
catch { throw new Error(`${sdk}: generator regression did not return JSON`); }
|
|
72
|
+
if (result.sdk !== sdk || result.passed !== true || result.matrixCases !== 24
|
|
73
|
+
|| result.idempotenceCases !== 6 || !Array.isArray(result.errors) || result.errors.length !== 0
|
|
74
|
+
|| !Array.isArray(result.matrix) || result.matrix.length !== 24
|
|
75
|
+
|| !Array.isArray(result.idempotence) || result.idempotence.length !== 6
|
|
76
|
+
|| !Number.isInteger(result.checks) || result.checks < 100) {
|
|
77
|
+
throw new Error(`${sdk}: generator regression is failed or incomplete`);
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function verifyPhpSdkArtifact({ root = defaultRoot, sdk, phpCommand = 'php' }) {
|
|
83
|
+
if (!supportedSdks.includes(sdk)) throw new Error(`Unsupported PHP SDK: ${sdk}`);
|
|
84
|
+
const source = join(root, 'sdk', sdk);
|
|
85
|
+
const archiveRelative = `web/connect/bailing-connect-${sdk}.tgz`;
|
|
86
|
+
const archive = join(root, archiveRelative);
|
|
87
|
+
const prefix = `bailing-connect-${sdk}`;
|
|
88
|
+
const expected = sourceFiles(source);
|
|
89
|
+
const actual = archiveFiles(archive, prefix);
|
|
90
|
+
const missing = expected.filter((file) => !actual.includes(file));
|
|
91
|
+
const unexpected = actual.filter((file) => !expected.includes(file));
|
|
92
|
+
if (missing.length || unexpected.length) {
|
|
93
|
+
throw new Error(`${sdk}: archive file set differs from source; missing=${JSON.stringify(missing)}, unexpected=${JSON.stringify(unexpected)}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const temp = mkdtempSync(join(tmpdir(), 'bailinghub-php-artifact-'));
|
|
97
|
+
const extracted = join(temp, prefix);
|
|
98
|
+
const files = [];
|
|
99
|
+
try {
|
|
100
|
+
for (const file of expected) {
|
|
101
|
+
// Read each validated regular member to stdout, then write only our own
|
|
102
|
+
// source-derived paths. Never let tar create paths, links, or devices.
|
|
103
|
+
const bytes = run('tar', ['-xOzf', archive, '--', `${prefix}/${file}`]);
|
|
104
|
+
const sourceBytes = readFileSync(join(source, file));
|
|
105
|
+
if (!sourceBytes.equals(bytes)) throw new Error(`${sdk}: archive bytes differ from source: ${file}`);
|
|
106
|
+
files.push({ path: file, bytes: bytes.length, sha256: sha256(bytes) });
|
|
107
|
+
const destination = join(extracted, file);
|
|
108
|
+
mkdirSync(dirname(destination), { recursive: true });
|
|
109
|
+
writeFileSync(destination, bytes, { mode: 0o600 });
|
|
110
|
+
}
|
|
111
|
+
const sourceDriver = join(source, 'tests', 'declaration-serialization.php');
|
|
112
|
+
const artifactDriver = join(extracted, 'tests', 'declaration-serialization.php');
|
|
113
|
+
const sourceRegression = regression(sourceDriver, source, phpCommand, sdk);
|
|
114
|
+
const artifactRegression = regression(artifactDriver, extracted, phpCommand, sdk);
|
|
115
|
+
return {
|
|
116
|
+
sdk,
|
|
117
|
+
archive: archiveRelative,
|
|
118
|
+
archiveSha256: sha256(readFileSync(archive)),
|
|
119
|
+
fileCount: files.length,
|
|
120
|
+
files,
|
|
121
|
+
sourceRegression,
|
|
122
|
+
artifactRegression,
|
|
123
|
+
};
|
|
124
|
+
} finally {
|
|
125
|
+
rmSync(temp, { recursive: true, force: true });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function options(argv) {
|
|
130
|
+
const result = { root: defaultRoot, sdks: supportedSdks, phpCommand: 'php' };
|
|
131
|
+
for (let index = 0; index < argv.length; index++) {
|
|
132
|
+
const arg = argv[index];
|
|
133
|
+
const value = argv[++index];
|
|
134
|
+
if (!value) throw new Error(`Missing value for ${arg}`);
|
|
135
|
+
if (arg === '--root') result.root = resolve(value);
|
|
136
|
+
else if (arg === '--sdk' && supportedSdks.includes(value)) result.sdks = [value];
|
|
137
|
+
else if (arg === '--php') result.phpCommand = value;
|
|
138
|
+
else throw new Error(`Unsupported argument: ${arg} ${value}`);
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (process.argv[1] && pathToFileURL(resolve(process.argv[1])).href === import.meta.url) {
|
|
144
|
+
try {
|
|
145
|
+
const { root, sdks, phpCommand } = options(process.argv.slice(2));
|
|
146
|
+
const artifacts = sdks.map((sdk) => verifyPhpSdkArtifact({ root, sdk, phpCommand }));
|
|
147
|
+
process.stdout.write(`${JSON.stringify({ passed: true, artifacts }, null, 2)}\n`);
|
|
148
|
+
} catch (error) {
|
|
149
|
+
console.error(`PHP SDK artifact check failed: ${error.message}`);
|
|
150
|
+
process.exitCode = 1;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { cpSync, mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import test from 'node:test';
|
|
7
|
+
import { verifyPhpSdkArtifact } from './check-php-sdk-artifacts.mjs';
|
|
8
|
+
|
|
9
|
+
function fixture(t, driver) {
|
|
10
|
+
const root = mkdtempSync(join(tmpdir(), 'php-artifact-check-test-'));
|
|
11
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
12
|
+
const source = join(root, 'sdk', 'php7');
|
|
13
|
+
const stage = join(root, 'stage');
|
|
14
|
+
const prefix = 'bailing-connect-php7';
|
|
15
|
+
const staged = join(stage, prefix);
|
|
16
|
+
mkdirSync(join(source, 'src'), { recursive: true });
|
|
17
|
+
mkdirSync(join(source, 'tests'), { recursive: true });
|
|
18
|
+
mkdirSync(join(root, 'web', 'connect'), { recursive: true });
|
|
19
|
+
writeFileSync(join(source, 'src', 'Tool.php'), '<?php return "fixture";\n');
|
|
20
|
+
// These tests exercise archive enforcement. The real SDK matrix drivers are
|
|
21
|
+
// executed separately by the artifact command against the actual packages.
|
|
22
|
+
const report = {
|
|
23
|
+
sdk: 'php7', passed: true, matrixCases: 24, idempotenceCases: 6,
|
|
24
|
+
checks: 171, errors: [], matrix: Array(24).fill({}), idempotence: Array(6).fill({}),
|
|
25
|
+
};
|
|
26
|
+
writeFileSync(join(source, 'tests', 'declaration-serialization.php'), driver ?? `<?php echo '${JSON.stringify(report)}';`);
|
|
27
|
+
cpSync(source, staged, { recursive: true });
|
|
28
|
+
const archive = join(root, 'web', 'connect', `${prefix}.tgz`);
|
|
29
|
+
const pack = (members = [prefix]) => {
|
|
30
|
+
const packed = spawnSync('tar', ['-czf', archive, '-C', stage, ...members], { encoding: 'utf8' });
|
|
31
|
+
assert.equal(packed.status, 0, packed.stderr);
|
|
32
|
+
};
|
|
33
|
+
pack();
|
|
34
|
+
return { root, source, staged, prefix, pack };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
test('valid archive verifies complete file identity and both regression executions', (t) => {
|
|
38
|
+
const { root } = fixture(t);
|
|
39
|
+
const result = verifyPhpSdkArtifact({ root, sdk: 'php7' });
|
|
40
|
+
assert.equal(result.fileCount, 2);
|
|
41
|
+
assert.match(result.archiveSha256, /^[0-9a-f]{64}$/);
|
|
42
|
+
assert.deepEqual(result.files.map((file) => file.path), ['src/Tool.php', 'tests/declaration-serialization.php']);
|
|
43
|
+
assert.equal(result.sourceRegression.passed, true);
|
|
44
|
+
assert.equal(result.artifactRegression.passed, true);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('stale archive bytes fail before any generator is run', (t) => {
|
|
48
|
+
const { root, source } = fixture(t);
|
|
49
|
+
writeFileSync(join(source, 'src', 'Tool.php'), '<?php return "updated";\n');
|
|
50
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /archive bytes differ from source: src\/Tool.php/);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('archive missing a source file is rejected', (t) => {
|
|
54
|
+
const { root, staged, pack } = fixture(t);
|
|
55
|
+
rmSync(join(staged, 'src', 'Tool.php'));
|
|
56
|
+
pack();
|
|
57
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /archive file set differs.*missing=\["src\/Tool.php"\]/);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test('archive with an extra file is rejected', (t) => {
|
|
61
|
+
const { root, staged, pack } = fixture(t);
|
|
62
|
+
writeFileSync(join(staged, 'extra.php'), '<?php echo "unexpected";');
|
|
63
|
+
pack();
|
|
64
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /unexpected=\["extra.php"\]/);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('archive links are rejected without extracting them', (t) => {
|
|
68
|
+
const { root, staged, pack } = fixture(t);
|
|
69
|
+
symlinkSync('/outside/sdk', join(staged, 'link'));
|
|
70
|
+
pack();
|
|
71
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /Archive links or special files are not allowed/);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('duplicate archive members are rejected', (t) => {
|
|
75
|
+
const { root, prefix, pack } = fixture(t);
|
|
76
|
+
pack([prefix, `${prefix}/src/Tool.php`]);
|
|
77
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /Duplicate archive path/);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('source symlinks are rejected', (t) => {
|
|
81
|
+
const { root, source } = fixture(t);
|
|
82
|
+
symlinkSync('/outside/sdk', join(source, 'link'));
|
|
83
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /SDK source symlinks are not allowed/);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test('regression failure cannot be reported as a valid artifact', (t) => {
|
|
87
|
+
const { root } = fixture(t, '<?php fwrite(STDERR, "regression failed"); exit(1);');
|
|
88
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /php exited 1: regression failed/);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('an incomplete successful regression report is rejected', (t) => {
|
|
92
|
+
const { root } = fixture(t, '<?php echo \'{"sdk":"php7","passed":true,"matrixCases":1}\';');
|
|
93
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7' }), /generator regression is failed or incomplete/);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('missing PHP runtime fails instead of silently skipping', (t) => {
|
|
97
|
+
const { root } = fixture(t);
|
|
98
|
+
assert.throws(() => verifyPhpSdkArtifact({ root, sdk: 'php7', phpCommand: join(root, 'missing-php') }), /ENOENT/);
|
|
99
|
+
});
|
|
@@ -38,8 +38,8 @@ function updateJson(root, relativePath, update) {
|
|
|
38
38
|
test('current release surface is internally consistent', () => {
|
|
39
39
|
const result = checkReleaseConsistency({ root: repoRoot });
|
|
40
40
|
assert.deepEqual(result.findings, []);
|
|
41
|
-
assert.equal(result.version, '0.10.
|
|
42
|
-
assert.equal(result.stableVersion, '0.10.
|
|
41
|
+
assert.equal(result.version, '0.10.1');
|
|
42
|
+
assert.equal(result.stableVersion, '0.10.1');
|
|
43
43
|
assert.equal(result.publishTag, 'latest');
|
|
44
44
|
});
|
|
45
45
|
|
package/scripts/install.sh
CHANGED
|
@@ -279,7 +279,7 @@ write_env() {
|
|
|
279
279
|
TOOL_SECRET="${DEMO_TOOL_SECRET:-$(secret)}"
|
|
280
280
|
CLIENT_TOKEN="${DEMO_CLIENT_TOKEN:-$(secret)}"
|
|
281
281
|
IMAGE_TAG="${BAILING_IMAGE_TAG:-$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$APP_DIR/package.json" | head -1)}"
|
|
282
|
-
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.10.
|
|
282
|
+
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.10.1"
|
|
283
283
|
IMAGE_REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_IMAGE_REGISTRY}"
|
|
284
284
|
IMAGE_NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_IMAGE_NAMESPACE}"
|
|
285
285
|
cat > "$ENV_FILE" <<EOF
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.10.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.10.1"
|
|
13
13
|
NODE_IMAGE="${BAILING_NODE_IMAGE:-node:22-bookworm-slim}"
|
|
14
14
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
15
15
|
PUSH="${BAILING_PUSH_IMAGES:-0}"
|
|
@@ -57,6 +57,10 @@ const requiredRepoFiles = [
|
|
|
57
57
|
'docs/RELEASE_NOTES_v0.10.0.en.md',
|
|
58
58
|
'docs/UPGRADE_v0.10.0.md',
|
|
59
59
|
'docs/UPGRADE_v0.10.0.en.md',
|
|
60
|
+
'docs/RELEASE_NOTES_v0.10.1.md',
|
|
61
|
+
'docs/RELEASE_NOTES_v0.10.1.en.md',
|
|
62
|
+
'docs/UPGRADE_v0.10.1.md',
|
|
63
|
+
'docs/UPGRADE_v0.10.1.en.md',
|
|
60
64
|
'docs/RELEASE_NOTES_v0.6.1.md',
|
|
61
65
|
'docs/RELEASE_NOTES_v0.6.0.md',
|
|
62
66
|
'docs/CHANGELOG.md',
|
|
@@ -179,7 +183,7 @@ function assertRepoEntrance() {
|
|
|
179
183
|
for (const required of ['npm run release:consistency', 'npm run release:consistency:test', 'npm run images:policy:test']) {
|
|
180
184
|
if (!releaseAudit.includes(required)) findings.push(`package.json: release:audit must include ${required}`);
|
|
181
185
|
}
|
|
182
|
-
for (const required of ['npm run notices:check', 'npm run assets:check', 'npm run audit:deps', 'npm run client-api:contract', 'npm run client-api:ecosystem:clone', 'npm run typecheck', 'npm test', 'npm run widget:renderer:test', 'npm run web-admin:check', 'npm run docs:check', 'npm run examples:check', 'npm run sdk:test', 'npm run sdk:test7', 'npm run sdk:test-node', 'npm run sdk:test-python', 'npm run sdk:test-runtime', 'npm run sdk:test-p1', 'npm run release:audit', 'npm run oss:verify']) {
|
|
186
|
+
for (const required of ['npm run notices:check', 'npm run assets:check', 'npm run audit:deps', 'npm run client-api:contract', 'npm run client-api:ecosystem:clone', 'npm run typecheck', 'npm test', 'npm run widget:renderer:test', 'npm run web-admin:check', 'npm run docs:check', 'npm run examples:check', 'npm run sdk:test', 'npm run sdk:test7', 'npm run sdk:test-node', 'npm run sdk:test-python', 'npm run sdk:test-runtime', 'npm run sdk:test-p1', 'npm run sdk:test-declarations', 'npm run sdk:artifacts:check', 'npm run release:audit', 'npm run oss:verify']) {
|
|
183
187
|
if (!releaseCheck.includes(required)) findings.push(`package.json: release:check must include ${required}`);
|
|
184
188
|
}
|
|
185
189
|
const imagesWorkflow = readText('.github/workflows/images.yml');
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Consume actual generator JSON, then exercise the production OpenAPI compiler.
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import { compileOpenApiTools } from '../src/core/contracts/openapi-tools';
|
|
5
|
+
|
|
6
|
+
const report = JSON.parse(readFileSync(0, 'utf8'));
|
|
7
|
+
assert.equal(report.passed, true, JSON.stringify(report.errors));
|
|
8
|
+
assert.equal(report.matrix.length, 24);
|
|
9
|
+
assert.equal(report.idempotence.length, 6);
|
|
10
|
+
const seen = new Set<string>();
|
|
11
|
+
for (const row of [...report.matrix, ...report.idempotence]) {
|
|
12
|
+
const capability = row.capability;
|
|
13
|
+
const result = compileOpenApiTools(JSON.stringify({
|
|
14
|
+
openapi: '3.0.0', info: { title: 'SDK contract fixture', version: '1' },
|
|
15
|
+
paths: { '/fixture': { [row.method.toLowerCase()]: {
|
|
16
|
+
operationId: 'sdk_fixture', summary: 'SDK generated declaration',
|
|
17
|
+
parameters: [{ name: 'record_id', in: 'query', schema: { type: 'integer' } }],
|
|
18
|
+
'x-agent-capability': capability,
|
|
19
|
+
} } },
|
|
20
|
+
}));
|
|
21
|
+
assert.equal(result.tools.length, 1, JSON.stringify(result.diagnostics));
|
|
22
|
+
assert.equal(result.diagnostics.filter(d => d.severity === 'error').length, 0);
|
|
23
|
+
const tool = result.tools[0]!;
|
|
24
|
+
if (Object.hasOwn(row, 'readonly')) {
|
|
25
|
+
seen.add(JSON.stringify([row.method, row.readonly, row.risk]));
|
|
26
|
+
const readonly = row.readonly ?? (row.method === 'GET');
|
|
27
|
+
assert.equal(tool.readonly, readonly);
|
|
28
|
+
assert.equal(tool.risk, row.risk ?? (readonly ? 'low' : 'medium'));
|
|
29
|
+
} else {
|
|
30
|
+
assert.equal(tool.idempotent, row.idempotent ?? (row.method === 'GET'));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
assert.equal(seen.size, 24, 'Each input combination must be represented once');
|
|
34
|
+
console.log(`${report.sdk}: 24 generated declarations + 6 idempotency cases consumed by Core`);
|
package/scripts/sdk-p1-check.mjs
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cpSync, mkdtempSync, rmSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
|
-
import { join, resolve } from 'node:path';
|
|
3
|
+
import { basename, join, resolve } from 'node:path';
|
|
4
4
|
import { spawnSync } from 'node:child_process';
|
|
5
5
|
|
|
6
6
|
const root = resolve(import.meta.dirname, '..');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
if (args.some((arg) => arg !== '--require-all')) {
|
|
9
|
+
console.error('Usage: node scripts/sdk-p1-check.mjs [--require-all]');
|
|
10
|
+
process.exit(2);
|
|
11
|
+
}
|
|
12
|
+
const requireAll = args.includes('--require-all');
|
|
13
|
+
const matrixMarker = 'PASS: 24 readonly/risk combinations + 6 idempotent combinations';
|
|
7
14
|
let pass = 0;
|
|
8
15
|
let fail = 0;
|
|
16
|
+
let skipped = 0;
|
|
9
17
|
|
|
10
18
|
function ok(name, cond, extra = '') {
|
|
11
19
|
if (cond) {
|
|
@@ -17,42 +25,70 @@ function ok(name, cond, extra = '') {
|
|
|
17
25
|
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
|
-
function
|
|
21
|
-
return
|
|
28
|
+
function details(result) {
|
|
29
|
+
return [result.error?.message, result.stderr, result.stdout].filter(Boolean).join('\n').trim();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function run(cmd, args, cwd = root, timeout = 300_000) {
|
|
33
|
+
return spawnSync(cmd, args, { cwd, encoding: 'utf8', timeout, maxBuffer: 10 * 1024 * 1024 });
|
|
22
34
|
}
|
|
23
35
|
|
|
24
|
-
function
|
|
25
|
-
|
|
36
|
+
function toolchain(name, probes) {
|
|
37
|
+
// Probe the actual executables with the same inherited PATH as every test.
|
|
38
|
+
// A login shell can replace PATH and accidentally validate a different toolchain.
|
|
39
|
+
const unavailable = probes.map(([cmd, probeArgs]) => ({ cmd, result: run(cmd, probeArgs, root, 15_000) }))
|
|
40
|
+
.filter(({ result }) => result.status !== 0);
|
|
41
|
+
if (!unavailable.length) return true;
|
|
42
|
+
skipped++;
|
|
43
|
+
console.log(` SKIP ${name} example and declaration matrix: ${unavailable.map(({ cmd, result }) => `${cmd}: ${details(result) || `exit ${result.status}`}`).join('; ')}`);
|
|
44
|
+
if (requireAll) ok(`${name} toolchain required (--require-all)`, false);
|
|
45
|
+
return false;
|
|
26
46
|
}
|
|
27
47
|
|
|
28
48
|
console.log('— P1 SDK checks');
|
|
29
49
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
if (toolchain('Java', [['javac', ['-version']], ['java', ['-version']]])) {
|
|
51
|
+
const javaOut = mkdtempSync(join(tmpdir(), 'bailing-java-'));
|
|
52
|
+
try {
|
|
53
|
+
const compile = run('javac', ['-d', javaOut, 'sdk/java/src/main/java/com/bailing/connect/BailingConnect.java', 'sdk/java/examples/BuildSpec.java', 'sdk/java/tests/DeclarationTest.java']);
|
|
54
|
+
ok('Java SDK, example and declaration matrix compile', compile.status === 0, details(compile));
|
|
55
|
+
if (compile.status === 0) {
|
|
56
|
+
const out = run('java', ['-cp', javaOut, 'BuildSpec']);
|
|
57
|
+
ok('Java example emits OpenAPI', out.status === 0 && out.stdout.includes('"openapi":"3.0.0"'), details(out));
|
|
58
|
+
const matrix = run('java', ['-cp', javaOut, 'DeclarationTest']);
|
|
59
|
+
ok('Java declaration matrix: 24 readonly/risk + 6 idempotent', matrix.status === 0 && matrix.stdout.includes(matrixMarker), details(matrix));
|
|
60
|
+
}
|
|
61
|
+
} finally {
|
|
62
|
+
rmSync(javaOut, { recursive: true, force: true });
|
|
37
63
|
}
|
|
38
|
-
rmSync(javaOut, { recursive: true, force: true });
|
|
39
|
-
} else {
|
|
40
|
-
ok('Java SDK source present', existsSync(resolve(root, 'sdk/java/src/main/java/com/bailing/connect/BailingConnect.java')));
|
|
41
64
|
}
|
|
42
65
|
|
|
43
|
-
if (
|
|
66
|
+
if (toolchain('Go', [['go', ['version']]])) {
|
|
44
67
|
const out = run('go', ['run', './examples/build-spec'], resolve(root, 'sdk/go'));
|
|
45
|
-
ok('Go example emits OpenAPI', out.status === 0 && out.stdout.includes('"openapi": "3.0.0"'), out
|
|
46
|
-
|
|
47
|
-
ok('Go
|
|
68
|
+
ok('Go example emits OpenAPI', out.status === 0 && out.stdout.includes('"openapi": "3.0.0"'), details(out));
|
|
69
|
+
const matrix = run('go', ['test', '-count=1', '-v', './bailingconnect'], resolve(root, 'sdk/go'));
|
|
70
|
+
ok('Go declaration matrix: 24 readonly/risk + 6 idempotent', matrix.status === 0
|
|
71
|
+
&& matrix.stdout.includes('--- PASS: TestDeclarationReadonlyRiskMatrix (')
|
|
72
|
+
&& matrix.stdout.includes('--- PASS: TestDeclarationIdempotentPresence ('), details(matrix));
|
|
48
73
|
}
|
|
49
74
|
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
75
|
+
if (toolchain('.NET', [['dotnet', ['--version']]])) {
|
|
76
|
+
const dotnetRoot = mkdtempSync(join(tmpdir(), 'bailing-dotnet-'));
|
|
77
|
+
try {
|
|
78
|
+
// dotnet writes bin/obj next to each project. Keep them out of SDK sources
|
|
79
|
+
// and distribution archives, and do not reuse stale local build outputs.
|
|
80
|
+
cpSync(resolve(root, 'sdk/dotnet'), dotnetRoot, {
|
|
81
|
+
recursive: true,
|
|
82
|
+
filter: (source) => !['bin', 'obj'].includes(basename(source)),
|
|
83
|
+
});
|
|
84
|
+
const out = run('dotnet', ['run', '--project', 'examples/BuildSpec/BuildSpec.csproj'], dotnetRoot);
|
|
85
|
+
ok('.NET example emits OpenAPI', out.status === 0 && out.stdout.includes('"openapi": "3.0.0"'), details(out));
|
|
86
|
+
const matrix = run('dotnet', ['run', '--project', 'tests/Declaration/Declaration.csproj'], dotnetRoot);
|
|
87
|
+
ok('.NET declaration matrix: 24 readonly/risk + 6 idempotent', matrix.status === 0 && matrix.stdout.includes(matrixMarker), details(matrix));
|
|
88
|
+
} finally {
|
|
89
|
+
rmSync(dotnetRoot, { recursive: true, force: true });
|
|
90
|
+
}
|
|
55
91
|
}
|
|
56
92
|
|
|
57
|
-
console.log(`\n结果:通过 ${pass} / 失败 ${fail}`);
|
|
93
|
+
console.log(`\n结果:通过 ${pass} / 失败 ${fail} / 跳过工具链 ${skipped}${requireAll ? '(不允许跳过)' : ''}`);
|
|
58
94
|
process.exit(fail ? 1 : 0);
|
|
@@ -149,6 +149,10 @@ const requiredFiles = [
|
|
|
149
149
|
'docs/RELEASE_NOTES_v0.10.0.en.md',
|
|
150
150
|
'docs/UPGRADE_v0.10.0.md',
|
|
151
151
|
'docs/UPGRADE_v0.10.0.en.md',
|
|
152
|
+
'docs/RELEASE_NOTES_v0.10.1.md',
|
|
153
|
+
'docs/RELEASE_NOTES_v0.10.1.en.md',
|
|
154
|
+
'docs/UPGRADE_v0.10.1.md',
|
|
155
|
+
'docs/UPGRADE_v0.10.1.en.md',
|
|
152
156
|
'docs/RELEASE_NOTES_v0.6.1.md',
|
|
153
157
|
'docs/RELEASE_NOTES_v0.6.0.md',
|
|
154
158
|
'docs/CHANGELOG.md',
|
|
@@ -140,7 +140,7 @@ public static class BailingConnect
|
|
|
140
140
|
private static Dictionary<string, object?> BuildCapability(Tool t, string method)
|
|
141
141
|
{
|
|
142
142
|
var capability = new Dictionary<string, object?> { ["version"] = 1, ["enabled"] = true, ["scope"] = t.Scope };
|
|
143
|
-
if (!string.IsNullOrEmpty(t.Risk)
|
|
143
|
+
if (!string.IsNullOrEmpty(t.Risk)) capability["risk"] = new Dictionary<string, object?> { ["level"] = t.Risk };
|
|
144
144
|
if (t.Confirm || t.ConfirmWhen.Count > 0 || !string.IsNullOrEmpty(t.ConfirmPrompt))
|
|
145
145
|
{
|
|
146
146
|
var approval = new Dictionary<string, object?>();
|
|
@@ -151,8 +151,8 @@ public static class BailingConnect
|
|
|
151
151
|
}
|
|
152
152
|
if (t.RequiresSubject) capability["subject"] = new Dictionary<string, object?> { ["required"] = true };
|
|
153
153
|
var execution = new Dictionary<string, object?>();
|
|
154
|
-
if (t.Readonly
|
|
155
|
-
if (t.Idempotent
|
|
154
|
+
if (t.Readonly.HasValue) execution["readonly"] = t.Readonly.Value;
|
|
155
|
+
if (t.Idempotent.HasValue) execution["idempotent"] = t.Idempotent.Value;
|
|
156
156
|
var rateLimit = NormalizeRateLimit(t.RateLimit);
|
|
157
157
|
if (rateLimit is not null) execution["rate_limit"] = rateLimit;
|
|
158
158
|
if (t.TimeoutMs is not null) execution["timeout_ms"] = t.TimeoutMs;
|
|
@@ -200,7 +200,7 @@ public sealed class Tool
|
|
|
200
200
|
public string Scope { get; init; } = "";
|
|
201
201
|
public string Path { get; init; } = "";
|
|
202
202
|
public string Method { get; init; } = "GET";
|
|
203
|
-
public string Risk { get; init; } = "
|
|
203
|
+
public string Risk { get; init; } = "";
|
|
204
204
|
public bool Confirm { get; init; }
|
|
205
205
|
public List<Dictionary<string, object?>> ConfirmWhen { get; init; } = [];
|
|
206
206
|
public bool? Readonly { get; init; }
|
package/sdk/dotnet/README.md
CHANGED
|
@@ -30,3 +30,11 @@ var ok = BailingConnect.VerifyToolCall(secret, method, pathWithQuery, rawBody, t
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Verification proves the call came from the hub. Your business service must still authorize `onBehalfOf` against its own permission table.
|
|
33
|
+
|
|
34
|
+
## Omitted and explicit declaration values
|
|
35
|
+
|
|
36
|
+
Unspecified `risk`, `readonly`, and `idempotent` fields stay absent from ACC. Explicit low/medium/high risk and both boolean values are preserved, including false on GET. With risk omitted, the ACC OpenAPI binding gives an explicit readonly value precedence over the HTTP method: GET without a readonly declaration defaults to low; other non-readonly operations default to medium. Risk does not replace approval or final business authorization.
|
|
37
|
+
|
|
38
|
+
Regenerate and compare declarations when upgrading; do not turn previously omitted risk into explicit low for all operations. The default `Tool.Risk` is now the empty string rather than `"low"`; it represents omission and retains the existing string property type. `Readonly` and `Idempotent` continue to use null for omission.
|
|
39
|
+
|
|
40
|
+
Run `dotnet run --project sdk/dotnet/tests/Declaration/Declaration.csproj` for 24 readonly/risk combinations and 6 idempotency combinations.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
|
+
<PropertyGroup>
|
|
3
|
+
<OutputType>Exe</OutputType>
|
|
4
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
5
|
+
<ImplicitUsings>enable</ImplicitUsings>
|
|
6
|
+
<Nullable>enable</Nullable>
|
|
7
|
+
</PropertyGroup>
|
|
8
|
+
<ItemGroup>
|
|
9
|
+
<ProjectReference Include="../../Bailing.Connect/Bailing.Connect.csproj" />
|
|
10
|
+
</ItemGroup>
|
|
11
|
+
</Project>
|