agents-city 0.5.4 → 0.5.5
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/bin/test-contracts.py
CHANGED
|
@@ -786,18 +786,33 @@ def publicar_es_verificable():
|
|
|
786
786
|
afirma('· the tag has to agree with package.json before it publishes',
|
|
787
787
|
'GITHUB_REF_NAME#v' in release and 'exit 1' in release,
|
|
788
788
|
'a tag that disagrees would publish one version under another name')
|
|
789
|
+
afirma('· and the notes wait for the publish, so they never announce nothing',
|
|
790
|
+
re.search(r'(?m)^\s*needs:\s*\[\s*test\s*,\s*publish\s*\]', codigo) is not None,
|
|
791
|
+
'announce must depend on publish, not race it')
|
|
789
792
|
afirma('· it publishes with provenance, so the tarball names its commit',
|
|
790
793
|
'--provenance' in release, release)
|
|
791
794
|
afirma('· through a short-lived identity, with no token stored anywhere',
|
|
792
795
|
'id-token: write' in release
|
|
793
796
|
and 'NPM_TOKEN' not in release and 'secrets.' not in release,
|
|
794
797
|
'trusted publishing: a secret that does not exist cannot leak')
|
|
795
|
-
#
|
|
796
|
-
#
|
|
797
|
-
#
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
798
|
+
# Which job holds which permission, not how many the file mentions. The
|
|
799
|
+
# job that publishes holds an identity npm accepts as this package's
|
|
800
|
+
# publisher; if it could also write to the repository, one compromised step
|
|
801
|
+
# could rewrite the source and publish from it. Writing the release notes
|
|
802
|
+
# does need the repository — so it is a different job, and this is the check
|
|
803
|
+
# that keeps the two apart rather than merely rare.
|
|
804
|
+
trabajos = re.findall(
|
|
805
|
+
r'(?m)^ ([a-z-]+):\n(.*?)(?=^ [a-z-]+:\n|\Z)', codigo + '\n fin:\n', re.S)
|
|
806
|
+
permisos = {
|
|
807
|
+
nombre: set(re.findall(r'(?m)^\s*([a-z-]+):\s*write\s*$', cuerpo))
|
|
808
|
+
for nombre, cuerpo in trabajos
|
|
809
|
+
}
|
|
810
|
+
afirma('· the job that publishes may not write to the repository',
|
|
811
|
+
permisos.get('publish') == {'id-token'},
|
|
812
|
+
f"publish holds {sorted(permisos.get('publish') or [])}")
|
|
813
|
+
afirma('· and the job that writes the release notes holds no npm identity',
|
|
814
|
+
permisos.get('announce') == {'contents'},
|
|
815
|
+
f"announce holds {sorted(permisos.get('announce') or [])}")
|
|
801
816
|
# Node 22 bundles npm 10, which cannot exchange an OIDC token and so
|
|
802
817
|
# publishes UNAUTHENTICATED — the registry answers 404, which reads like a
|
|
803
818
|
# missing package and is really a missing credential. It cost one release
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-city",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Run autonomous agent cities: one chair seat, role-aware repo agents, repo-owned skills, and explicit roads.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agents-city": "bin/agents-city.js"
|
|
@@ -61,7 +61,10 @@
|
|
|
61
61
|
"linux"
|
|
62
62
|
],
|
|
63
63
|
"homepage": "https://agentscity.net",
|
|
64
|
-
"repository":
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/jlcases/agents-city.git"
|
|
67
|
+
},
|
|
65
68
|
"bugs": "https://github.com/jlcases/agents-city/issues",
|
|
66
69
|
"author": "jlcases",
|
|
67
70
|
"license": "Apache-2.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "city",
|
|
3
3
|
"displayName": "Agents City",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.5",
|
|
5
5
|
"description": "One autonomous city seat with a work domain, role, goal, repo support agents, recognised skills and explicit roads to other cities.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "jlcases",
|