gh-inari 0.11.0 → 0.13.2
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/.codex-plugin/plugin.json +1 -1
- package/README.md +98 -247
- package/branch-naming-authority.d.mts +2 -8
- package/branch-naming-authority.mjs +4 -28
- package/dist/agent-authority/branch-advance.d.ts +82 -0
- package/dist/agent-authority/branch-advance.js +490 -0
- package/dist/agent-authority/branch-advance.js.map +1 -0
- package/dist/agent-authority/capability-admission.d.ts +87 -0
- package/dist/agent-authority/capability-admission.js +660 -0
- package/dist/agent-authority/capability-admission.js.map +1 -0
- package/dist/agent-authority/capability-provenance.d.ts +85 -0
- package/dist/agent-authority/capability-provenance.js +528 -0
- package/dist/agent-authority/capability-provenance.js.map +1 -0
- package/dist/agent-authority/capability.d.ts +62 -0
- package/dist/agent-authority/capability.js +184 -0
- package/dist/agent-authority/capability.js.map +1 -0
- package/dist/agent-authority/codec.d.ts +34 -0
- package/dist/agent-authority/codec.js +80 -0
- package/dist/agent-authority/codec.js.map +1 -0
- package/dist/agent-authority/delegator-key.d.ts +88 -0
- package/dist/agent-authority/delegator-key.js +536 -0
- package/dist/agent-authority/delegator-key.js.map +1 -0
- package/dist/agent-authority/delegator-lifecycle.d.ts +86 -0
- package/dist/agent-authority/delegator-lifecycle.js +462 -0
- package/dist/agent-authority/delegator-lifecycle.js.map +1 -0
- package/dist/agent-authority/delegator-operations.d.ts +168 -0
- package/dist/agent-authority/delegator-operations.js +307 -0
- package/dist/agent-authority/delegator-operations.js.map +1 -0
- package/dist/agent-authority/delegator-trust.d.ts +134 -0
- package/dist/agent-authority/delegator-trust.js +268 -0
- package/dist/agent-authority/delegator-trust.js.map +1 -0
- package/dist/agent-authority/delegator.d.ts +99 -0
- package/dist/agent-authority/delegator.js +247 -0
- package/dist/agent-authority/delegator.js.map +1 -0
- package/dist/agent-authority/direct-app-client.d.ts +78 -0
- package/dist/agent-authority/direct-app-client.js +246 -0
- package/dist/agent-authority/direct-app-client.js.map +1 -0
- package/dist/agent-authority/direct-app-http.d.ts +48 -0
- package/dist/agent-authority/direct-app-http.js +195 -0
- package/dist/agent-authority/direct-app-http.js.map +1 -0
- package/dist/agent-authority/ed25519-jwk.d.ts +32 -0
- package/dist/agent-authority/ed25519-jwk.js +86 -0
- package/dist/agent-authority/ed25519-jwk.js.map +1 -0
- package/dist/agent-authority/index.d.ts +20 -0
- package/dist/agent-authority/index.js +21 -0
- package/dist/agent-authority/index.js.map +1 -0
- package/dist/agent-authority/managed-runtime.d.ts +140 -0
- package/dist/agent-authority/managed-runtime.js +200 -0
- package/dist/agent-authority/managed-runtime.js.map +1 -0
- package/dist/agent-authority/protected-paths.d.ts +95 -0
- package/dist/agent-authority/protected-paths.js +297 -0
- package/dist/agent-authority/protected-paths.js.map +1 -0
- package/dist/agent-authority/runtime-authority-lifecycle.d.ts +2 -0
- package/dist/agent-authority/runtime-authority-lifecycle.js +3 -0
- package/dist/agent-authority/runtime-authority-lifecycle.js.map +1 -0
- package/dist/agent-authority/runtime-authority-operations.d.ts +2 -0
- package/dist/agent-authority/runtime-authority-operations.js +3 -0
- package/dist/agent-authority/runtime-authority-operations.js.map +1 -0
- package/dist/agent-authority/runtime-authority-trust.d.ts +2 -0
- package/dist/agent-authority/runtime-authority-trust.js +3 -0
- package/dist/agent-authority/runtime-authority-trust.js.map +1 -0
- package/dist/agent-authority/runtime-authority.d.ts +2 -0
- package/dist/agent-authority/runtime-authority.js +3 -0
- package/dist/agent-authority/runtime-authority.js.map +1 -0
- package/dist/agent-authority/runtime-key.d.ts +2 -0
- package/dist/agent-authority/runtime-key.js +3 -0
- package/dist/agent-authority/runtime-key.js.map +1 -0
- package/dist/agent-authority/session-authentication.d.ts +95 -0
- package/dist/agent-authority/session-authentication.js +229 -0
- package/dist/agent-authority/session-authentication.js.map +1 -0
- package/dist/agent-authority/session-bundle.d.ts +125 -0
- package/dist/agent-authority/session-bundle.js +561 -0
- package/dist/agent-authority/session-bundle.js.map +1 -0
- package/dist/agent-authority/session-certificate.d.ts +161 -0
- package/dist/agent-authority/session-certificate.js +532 -0
- package/dist/agent-authority/session-certificate.js.map +1 -0
- package/dist/agent-authority/session-issuance.d.ts +128 -0
- package/dist/agent-authority/session-issuance.js +400 -0
- package/dist/agent-authority/session-issuance.js.map +1 -0
- package/dist/agent-authority/session-request.d.ts +130 -0
- package/dist/agent-authority/session-request.js +604 -0
- package/dist/agent-authority/session-request.js.map +1 -0
- package/dist/artifact-contract-governance.d.ts +5 -4
- package/dist/artifact-contract-governance.js +26 -4
- package/dist/artifact-contract-governance.js.map +1 -1
- package/dist/artifact.js +45 -29
- package/dist/artifact.js.map +1 -1
- package/dist/branch-creation-ruleset.d.ts +90 -0
- package/dist/branch-creation-ruleset.js +190 -0
- package/dist/branch-creation-ruleset.js.map +1 -0
- package/dist/branch-naming.d.ts +53 -0
- package/dist/branch-naming.js +116 -0
- package/dist/branch-naming.js.map +1 -0
- package/dist/change/machine/abort-execution-machine.d.ts +83 -15
- package/dist/change/machine/abort-execution-machine.js +21 -3
- package/dist/change/machine/abort-execution-machine.js.map +1 -1
- package/dist/change/machine/issuance-execution-machine.d.ts +91 -15
- package/dist/change/machine/issuance-execution-machine.js +20 -8
- package/dist/change/machine/issuance-execution-machine.js.map +1 -1
- package/dist/change/machine/lifecycle-machine.d.ts +42 -0
- package/dist/change/machine/lifecycle-machine.js +9 -3
- package/dist/change/machine/lifecycle-machine.js.map +1 -1
- package/dist/change/machine/ready-execution-machine.d.ts +62 -9
- package/dist/change/machine/ready-execution-machine.js +3 -2
- package/dist/change/machine/ready-execution-machine.js.map +1 -1
- package/dist/change/machine/trusted-execution-adapter.d.ts +76 -0
- package/dist/change/machine/trusted-execution-adapter.js +1040 -0
- package/dist/change/machine/trusted-execution-adapter.js.map +1 -0
- package/dist/change-execution-port.d.ts +177 -0
- package/dist/change-execution-port.js +375 -0
- package/dist/change-execution-port.js.map +1 -0
- package/dist/change-executor.d.ts +4 -88
- package/dist/change-executor.js +4 -247
- package/dist/change-executor.js.map +1 -1
- package/dist/change-failure-diagnostics.d.ts +5 -1
- package/dist/change-failure-diagnostics.js +26 -1
- package/dist/change-failure-diagnostics.js.map +1 -1
- package/dist/change-handoff.d.ts +99 -0
- package/dist/change-handoff.js +445 -0
- package/dist/change-handoff.js.map +1 -0
- package/dist/change-provenance-record.d.ts +92 -0
- package/dist/change-provenance-record.js +364 -0
- package/dist/change-provenance-record.js.map +1 -0
- package/dist/change-publish-projection.d.ts +63 -0
- package/dist/change-publish-projection.js +193 -0
- package/dist/change-publish-projection.js.map +1 -0
- package/dist/change-trusted-executor.d.ts +11 -52
- package/dist/change-trusted-executor.js +12 -749
- package/dist/change-trusted-executor.js.map +1 -1
- package/dist/change.d.ts +93 -85
- package/dist/change.js +514 -65
- package/dist/change.js.map +1 -1
- package/dist/cli-core.d.ts +20 -11
- package/dist/cli-core.js +1705 -244
- package/dist/cli-core.js.map +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +16 -29
- package/dist/cli.js.map +1 -1
- package/dist/command-contract.d.ts +71 -13
- package/dist/command-contract.js +245 -24
- package/dist/command-contract.js.map +1 -1
- package/dist/contract/issue-form.js +5 -2
- package/dist/contract/issue-form.js.map +1 -1
- package/dist/github/actions-change-execution-adapter.d.ts +121 -0
- package/dist/github/actions-change-execution-adapter.js +1175 -0
- package/dist/github/actions-change-execution-adapter.js.map +1 -0
- package/dist/github/actions-change-executor.d.ts +33 -93
- package/dist/github/actions-change-executor.js +241 -955
- package/dist/github/actions-change-executor.js.map +1 -1
- package/dist/github/adapter.d.ts +147 -56
- package/dist/github/adapter.js +1583 -557
- package/dist/github/adapter.js.map +1 -1
- package/dist/github/app-installation-credential-broker.d.ts +135 -0
- package/dist/github/app-installation-credential-broker.js +983 -0
- package/dist/github/app-installation-credential-broker.js.map +1 -0
- package/dist/github/app-principal.d.ts +11 -0
- package/dist/github/app-principal.js +11 -0
- package/dist/github/app-principal.js.map +1 -0
- package/dist/github/app-repository-evidence-reader.d.ts +37 -0
- package/dist/github/app-repository-evidence-reader.js +175 -0
- package/dist/github/app-repository-evidence-reader.js.map +1 -0
- package/dist/github/app-semantic-pr-mutation.d.ts +26 -0
- package/dist/github/app-semantic-pr-mutation.js +321 -0
- package/dist/github/app-semantic-pr-mutation.js.map +1 -0
- package/dist/github/change-actions-remote-executor.d.ts +6 -43
- package/dist/github/change-actions-remote-executor.js +4 -529
- package/dist/github/change-actions-remote-executor.js.map +1 -1
- package/dist/github/change-effect-adapter.d.ts +51 -3
- package/dist/github/change-effect-adapter.js +319 -28
- package/dist/github/change-effect-adapter.js.map +1 -1
- package/dist/github/change-state-projector.d.ts +88 -0
- package/dist/github/change-state-projector.js +604 -0
- package/dist/github/change-state-projector.js.map +1 -0
- package/dist/github/direct-app-execution.d.ts +43 -0
- package/dist/github/direct-app-execution.js +179 -0
- package/dist/github/direct-app-execution.js.map +1 -0
- package/dist/github/effect-authorizer.d.ts +302 -0
- package/dist/github/effect-authorizer.js +921 -0
- package/dist/github/effect-authorizer.js.map +1 -0
- package/dist/github/errors.d.ts +6 -14
- package/dist/github/errors.js +11 -17
- package/dist/github/errors.js.map +1 -1
- package/dist/github/gh-auth-credential.d.ts +24 -0
- package/dist/github/gh-auth-credential.js +50 -0
- package/dist/github/gh-auth-credential.js.map +1 -0
- package/dist/github/git-data-capability.d.ts +133 -0
- package/dist/github/git-data-capability.js +289 -0
- package/dist/github/git-data-capability.js.map +1 -0
- package/dist/github/index.d.ts +15 -3
- package/dist/github/index.js +14 -3
- package/dist/github/index.js.map +1 -1
- package/dist/github/issue-relation-mutation-adapter.d.ts +68 -0
- package/dist/github/issue-relation-mutation-adapter.js +244 -0
- package/dist/github/issue-relation-mutation-adapter.js.map +1 -0
- package/dist/github/issue-relation-observation-adapter.d.ts +9 -0
- package/dist/github/issue-relation-observation-adapter.js +112 -2
- package/dist/github/issue-relation-observation-adapter.js.map +1 -1
- package/dist/github/issuer-authority.d.ts +5 -194
- package/dist/github/issuer-authority.js +5 -775
- package/dist/github/issuer-authority.js.map +1 -1
- package/dist/github/local-repository-context.d.ts +47 -0
- package/dist/github/local-repository-context.js +166 -0
- package/dist/github/local-repository-context.js.map +1 -0
- package/dist/github/native-http-transport.d.ts +105 -0
- package/dist/github/native-http-transport.js +348 -0
- package/dist/github/native-http-transport.js.map +1 -0
- package/dist/github/provider-failure.d.ts +30 -0
- package/dist/github/provider-failure.js +160 -0
- package/dist/github/provider-failure.js.map +1 -0
- package/dist/github/repository-evidence-reader.d.ts +88 -0
- package/dist/github/repository-evidence-reader.js +362 -0
- package/dist/github/repository-evidence-reader.js.map +1 -0
- package/dist/github/types.d.ts +241 -1
- package/dist/github/user-credential.d.ts +43 -0
- package/dist/github/user-credential.js +81 -0
- package/dist/github/user-credential.js.map +1 -0
- package/dist/github/user-identity.d.ts +23 -0
- package/dist/github/user-identity.js +47 -0
- package/dist/github/user-identity.js.map +1 -0
- package/dist/golden-path-entry.d.ts +150 -0
- package/dist/golden-path-entry.js +1005 -0
- package/dist/golden-path-entry.js.map +1 -0
- package/dist/golden-path-governance.d.ts +84 -0
- package/dist/golden-path-governance.js +314 -0
- package/dist/golden-path-governance.js.map +1 -0
- package/dist/golden-path-implementation.d.ts +59 -0
- package/dist/golden-path-implementation.js +480 -0
- package/dist/golden-path-implementation.js.map +1 -0
- package/dist/golden-path-recovery.d.ts +57 -0
- package/dist/golden-path-recovery.js +412 -0
- package/dist/golden-path-recovery.js.map +1 -0
- package/dist/golden-path-review.d.ts +75 -0
- package/dist/golden-path-review.js +183 -0
- package/dist/golden-path-review.js.map +1 -0
- package/dist/golden-path-status.d.ts +302 -0
- package/dist/golden-path-status.js +1147 -0
- package/dist/golden-path-status.js.map +1 -0
- package/dist/governance.d.ts +20 -6
- package/dist/governance.js +104 -7
- package/dist/governance.js.map +1 -1
- package/dist/implementation-authorization.d.ts +145 -0
- package/dist/implementation-authorization.js +615 -0
- package/dist/implementation-authorization.js.map +1 -0
- package/dist/implementation-change-identity.d.ts +140 -0
- package/dist/implementation-change-identity.js +476 -0
- package/dist/implementation-change-identity.js.map +1 -0
- package/dist/implementation-conformance.d.ts +116 -0
- package/dist/implementation-conformance.js +603 -0
- package/dist/implementation-conformance.js.map +1 -0
- package/dist/implementation-contract.d.ts +239 -0
- package/dist/implementation-contract.js +1033 -0
- package/dist/implementation-contract.js.map +1 -0
- package/dist/implementation-execution-evidence.d.ts +55 -0
- package/dist/implementation-execution-evidence.js +253 -0
- package/dist/implementation-execution-evidence.js.map +1 -0
- package/dist/implementation-frontier-composition.d.ts +38 -0
- package/dist/implementation-frontier-composition.js +432 -0
- package/dist/implementation-frontier-composition.js.map +1 -0
- package/dist/implementation-frontier.d.ts +100 -0
- package/dist/implementation-frontier.js +904 -0
- package/dist/implementation-frontier.js.map +1 -0
- package/dist/implementation-lifecycle.d.ts +52 -0
- package/dist/implementation-lifecycle.js +241 -0
- package/dist/implementation-lifecycle.js.map +1 -0
- package/dist/implementation-readiness.d.ts +72 -0
- package/dist/implementation-readiness.js +381 -0
- package/dist/implementation-readiness.js.map +1 -0
- package/dist/implementation-rework.d.ts +149 -0
- package/dist/implementation-rework.js +437 -0
- package/dist/implementation-rework.js.map +1 -0
- package/dist/implementation-scope-projection.d.ts +102 -0
- package/dist/implementation-scope-projection.js +533 -0
- package/dist/implementation-scope-projection.js.map +1 -0
- package/dist/implementation-session-binding.d.ts +71 -0
- package/dist/implementation-session-binding.js +297 -0
- package/dist/implementation-session-binding.js.map +1 -0
- package/dist/index.d.ts +36 -1
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/dist/issue-relationship-executor.d.ts +75 -0
- package/dist/issue-relationship-executor.js +352 -0
- package/dist/issue-relationship-executor.js.map +1 -0
- package/dist/issue-relationship.d.ts +86 -0
- package/dist/issue-relationship.js +387 -0
- package/dist/issue-relationship.js.map +1 -0
- package/dist/issuer-identity.d.ts +10 -4
- package/dist/issuer-identity.js +11 -4
- package/dist/issuer-identity.js.map +1 -1
- package/dist/legacy-artifact-convergence.js +1 -1
- package/dist/legacy-artifact-convergence.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/server.js +10 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-app-bridge.d.ts +19 -0
- package/dist/mcp/session-app-bridge.js +24 -0
- package/dist/mcp/session-app-bridge.js.map +1 -0
- package/dist/mcp/stdio.d.ts +7 -0
- package/dist/mcp/stdio.js +5 -5
- package/dist/mcp/stdio.js.map +1 -1
- package/dist/mcp/tools.d.ts +364 -6
- package/dist/mcp/tools.js +917 -32
- package/dist/mcp/tools.js.map +1 -1
- package/dist/operational-discovery.d.ts +122 -0
- package/dist/operational-discovery.js +497 -0
- package/dist/operational-discovery.js.map +1 -0
- package/dist/operational-observation.d.ts +260 -0
- package/dist/operational-observation.js +985 -0
- package/dist/operational-observation.js.map +1 -0
- package/dist/pr-policy.js +31 -7
- package/dist/pr-policy.js.map +1 -1
- package/dist/pull-request-template.js +2 -2
- package/dist/pull-request-template.js.map +1 -1
- package/dist/reconciliation.d.ts +64 -3
- package/dist/reconciliation.js +305 -6
- package/dist/reconciliation.js.map +1 -1
- package/dist/release-certification.d.ts +76 -0
- package/dist/release-certification.js +135 -0
- package/dist/release-certification.js.map +1 -0
- package/dist/self-dogfood-marker.d.ts +8 -0
- package/dist/self-dogfood-marker.js +15 -0
- package/dist/self-dogfood-marker.js.map +1 -0
- package/dist/semantic-branch-executor.d.ts +5 -3
- package/dist/semantic-branch-executor.js +5 -71
- package/dist/semantic-branch-executor.js.map +1 -1
- package/dist/semantic-issue-closure-executor.d.ts +60 -0
- package/dist/semantic-issue-closure-executor.js +180 -0
- package/dist/semantic-issue-closure-executor.js.map +1 -0
- package/dist/semantic-issue-closure.d.ts +125 -0
- package/dist/semantic-issue-closure.js +488 -0
- package/dist/semantic-issue-closure.js.map +1 -0
- package/dist/semantic-issue-executor.d.ts +10 -4
- package/dist/semantic-issue-executor.js +172 -20
- package/dist/semantic-issue-executor.js.map +1 -1
- package/dist/semantic-issue-lifecycle.d.ts +2 -0
- package/dist/semantic-issue-lifecycle.js +1 -0
- package/dist/semantic-issue-lifecycle.js.map +1 -1
- package/dist/semantic-issue-observation.js +17 -2
- package/dist/semantic-issue-observation.js.map +1 -1
- package/dist/semantic-issue-projection.d.ts +5 -1
- package/dist/semantic-issue-projection.js +149 -18
- package/dist/semantic-issue-projection.js.map +1 -1
- package/dist/semantic-issue-relation-executor.d.ts +81 -0
- package/dist/semantic-issue-relation-executor.js +425 -0
- package/dist/semantic-issue-relation-executor.js.map +1 -0
- package/dist/semantic-issue-relations.d.ts +121 -0
- package/dist/semantic-issue-relations.js +823 -0
- package/dist/semantic-issue-relations.js.map +1 -0
- package/dist/semantic-pr-executor.d.ts +5 -3
- package/dist/semantic-pr-executor.js +3 -3
- package/dist/semantic-pr-executor.js.map +1 -1
- package/dist/semantic-pr-mutation.d.ts +207 -0
- package/dist/semantic-pr-mutation.js +873 -0
- package/dist/semantic-pr-mutation.js.map +1 -0
- package/dist/semantic-pr-observation.js +31 -0
- package/dist/semantic-pr-observation.js.map +1 -1
- package/dist/semantic-template.js +192 -93
- package/dist/semantic-template.js.map +1 -1
- package/dist/session-authorized-change-executor.d.ts +118 -0
- package/dist/session-authorized-change-executor.js +606 -0
- package/dist/session-authorized-change-executor.js.map +1 -0
- package/dist/skill.d.ts +40 -6
- package/dist/skill.js +309 -27
- package/dist/skill.js.map +1 -1
- package/dist/worker.d.ts +41 -0
- package/dist/worker.js +149 -0
- package/dist/worker.js.map +1 -0
- package/package.json +179 -16
- package/scripts/certification-evidence.d.mts +304 -0
- package/scripts/certification-evidence.mjs +1874 -0
- package/skills/inari/SKILL.md +53 -7
- package/dist/github/transport.d.ts +0 -43
- package/dist/github/transport.js +0 -161
- package/dist/github/transport.js.map +0 -1
- package/gh-inari +0 -117
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inari",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Governed GitHub Issue/PR/template workflows via the inari CLI. Prefer inari over raw gh for operations it owns; use inari skill for operational playbooks.",
|
|
5
5
|
"skills": "skills/inari"
|
|
6
6
|
}
|
package/README.md
CHANGED
|
@@ -1,316 +1,165 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./docs/assets/readme/inari-hero.webp" alt="INARI — Deterministic GitHub Governance. Issue → Change → PR → Merge. Canonical · Deterministic · Machine-verifiable." width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/yohn-jp/gh-inari/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/yohn-jp/gh-inari/actions/workflows/ci.yml/badge.svg"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/gh-inari"><img alt="npm" src="https://img.shields.io/npm/v/gh-inari"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/gh-inari"><img alt="Node" src="https://img.shields.io/node/v/gh-inari"></a>
|
|
9
|
+
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/gh-inari"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
1
12
|
# Inari
|
|
2
13
|
|
|
3
|
-
|
|
14
|
+
**Deterministic GitHub Governance**
|
|
15
|
+
|
|
16
|
+
Inari (`inari`, published as `gh-inari`) turns repository-governed GitHub workflows into typed, deterministic contracts. It compiles repository-native Issue Forms and pull request templates, validates semantic input, renders canonical artifacts, and mediates governed work from **Issue → Change → PR → Merge**.
|
|
4
17
|
|
|
5
|
-
|
|
18
|
+
Inari is intentionally not a general `gh` wrapper. Governed operations run through a closed, versioned command surface; unsupported or ambiguous behavior fails closed.
|
|
6
19
|
|
|
7
|
-
##
|
|
20
|
+
## Quick start
|
|
8
21
|
|
|
9
|
-
|
|
10
|
-
the `gh-inari` npm package. It is a strict superset of `gh`: commands Inari
|
|
11
|
-
governs (Issue and PR schema/validate/render/create/explain/get/check/edit/
|
|
12
|
-
normalize/sync) run under governance, and every other command falls through
|
|
13
|
-
to the real `gh` binary with the original argv and exit status preserved.
|
|
22
|
+
Requires Node.js 24 or newer.
|
|
14
23
|
|
|
15
24
|
```bash
|
|
16
25
|
npm install --global gh-inari
|
|
26
|
+
|
|
17
27
|
inari --version --json
|
|
28
|
+
inari template list
|
|
29
|
+
inari issue schema feature --json
|
|
18
30
|
```
|
|
19
31
|
|
|
20
|
-
For an ephemeral or PATH-independent
|
|
21
|
-
deterministic fallback when no global install is present or the npm bin
|
|
22
|
-
directory is not on `PATH`:
|
|
32
|
+
For an ephemeral or PATH-independent invocation:
|
|
23
33
|
|
|
24
34
|
```bash
|
|
25
35
|
npx --yes gh-inari --version --json
|
|
26
36
|
```
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
runner.
|
|
38
|
+
Inari uses the current GitHub authentication and repository context. Use `--repository owner/name` when the target is not the current checkout.
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
outbound `gh` invocations should normalize only the executable name:
|
|
40
|
+
## The governed path
|
|
33
41
|
|
|
34
42
|
```text
|
|
35
|
-
|
|
43
|
+
Issue → Change → PR → Merge
|
|
44
|
+
intent governed review explicit
|
|
45
|
+
execution outcome
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
(e.g. `gh pr create -> inari`, `gh issue edit -> inari`) — Inari is the sole
|
|
40
|
-
authority for that routing decision, and every unowned command already
|
|
41
|
-
delegates to real `gh` unchanged. The hook's only job is the executable
|
|
42
|
-
boundary, not the command tree.
|
|
48
|
+
A repository defines the contracts. Inari resolves those authorities, validates structured intent, produces canonical GitHub artifacts, and keeps lifecycle transitions bounded by explicit semantics rather than free-form CLI mutation.
|
|
43
49
|
|
|
44
|
-
The
|
|
50
|
+
The Change surface exposes bounded lifecycle operations:
|
|
45
51
|
|
|
46
52
|
```bash
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
inari change issue <number> --json
|
|
54
|
+
inari change show <number> --json
|
|
55
|
+
inari change ready <number> --json
|
|
56
|
+
inari change abort <number> --json
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
The
|
|
52
|
-
`inari`, both resolving to the same entrypoint. The GitHub CLI extension
|
|
53
|
-
command is `gh inari`. The extension launcher bootstraps only production
|
|
54
|
-
dependencies inside its own installation directory and never changes the
|
|
55
|
-
consumer repository.
|
|
59
|
+
The normative end-to-end model lives in [Inari Golden Path Architecture](./docs/GOLDEN_PATH_ARCHITECTURE.md).
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
instead of repairing shell startup files when `inari` is not found.
|
|
61
|
+
## Design principles
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
| Principle | Contract |
|
|
64
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
65
|
+
| **Canonical** | One governed semantic input produces one canonical projection. Native GitHub artifacts remain interoperable, while ambiguity fails closed. |
|
|
66
|
+
| **Deterministic** | Resolution, validation, rendering, reconciliation, and lifecycle decisions are explicit and reproducible. |
|
|
67
|
+
| **Machine-verifiable** | Schemas, structured diagnostics, bounded JSON projections, and lifecycle evidence are designed for both humans and agents. |
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
## Core workflows
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
| Surface | Purpose | Start here |
|
|
72
|
+
| ------------- | ------------------------------------------------------------------------------ | -------------------------------------------- |
|
|
73
|
+
| Templates | Discover and synchronize repository governance | `inari template list`, `inari template sync` |
|
|
74
|
+
| Issues | Schema, validate, render, create, read, observe, and reconcile governed Issues | `inari issue --help` |
|
|
75
|
+
| Pull requests | Apply the same semantic pipeline to governed PRs | `inari pr --help` |
|
|
76
|
+
| Change | Enter and inspect the governed execution lifecycle | `inari change --help` |
|
|
77
|
+
| Diagnostics | Verify the installed runtime and required capabilities | `inari --diagnose --json` |
|
|
68
78
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
gh extension upgrade inari
|
|
73
|
-
gh extension remove inari
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The bounded diagnostic path checks the install without touching repository
|
|
77
|
-
files. It reports a short, actionable recovery command for a missing or
|
|
78
|
-
stale install:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
inari --diagnose --json
|
|
82
|
-
npx --yes gh-inari --diagnose --json
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`--version --json` is the machine-readable self-check. Its stable fields are
|
|
86
|
-
`name`, `version`, `protocol`, `capabilities`, and `invocation`; use
|
|
87
|
-
`--require-capability <id>` and `--minimum-version <version>` for a
|
|
88
|
-
mutation-sensitive preflight. A failed check exits `2` and includes one
|
|
89
|
-
recovery command. The current capability identifiers are
|
|
90
|
-
`canonical-invocation`, `machine-readable-version`, `capability-diagnostics`,
|
|
91
|
-
and `extension-bootstrap`.
|
|
92
|
-
|
|
93
|
-
The `inari` executable is canonical. The direct package executable
|
|
94
|
-
`gh-inari` and the `gh inari` extension form are compatibility paths with the
|
|
95
|
-
same governed command semantics; prefer `inari` for agent and human-facing
|
|
96
|
-
commands:
|
|
79
|
+
Typical structured preparation remains explicit:
|
|
97
80
|
|
|
98
81
|
```bash
|
|
99
82
|
inari issue schema feature --json
|
|
100
|
-
|
|
101
|
-
|
|
83
|
+
inari issue validate --template feature --from issue.json
|
|
84
|
+
inari issue render --template feature --from issue.json
|
|
85
|
+
inari issue create --template feature --from issue.json
|
|
102
86
|
```
|
|
103
87
|
|
|
104
|
-
|
|
88
|
+
Use `--from -` to read JSON from stdin. Use `inari <domain> --help` for the exact versioned command contract rather than relying on a duplicated command catalog in this README.
|
|
105
89
|
|
|
106
|
-
|
|
107
|
-
pnpm install --frozen-lockfile
|
|
108
|
-
pnpm run build
|
|
109
|
-
gh extension install . --force
|
|
110
|
-
gh inari --version --json
|
|
111
|
-
```
|
|
90
|
+
## Repository governance
|
|
112
91
|
|
|
113
|
-
|
|
114
|
-
without adding it to a consumer manifest:
|
|
92
|
+
Repository-native governance remains the interoperability boundary. Issue Forms under `.github/ISSUE_TEMPLATE/**` and supported pull request templates are compiled into typed contracts. Repositories using Inari's semantic template authority can define contracts under `.github/inari/` and regenerate their GitHub-native projections with:
|
|
115
93
|
|
|
116
94
|
```bash
|
|
117
|
-
|
|
118
|
-
npm pack
|
|
119
|
-
npx --yes --package=./gh-inari-<version>.tgz gh-inari --version --json
|
|
95
|
+
inari template sync
|
|
120
96
|
```
|
|
121
97
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
## Codex Plugin
|
|
98
|
+
See [Semantic template authority](./docs/SEMANTIC_TEMPLATES.md) for the authority and projection rules.
|
|
125
99
|
|
|
126
|
-
|
|
127
|
-
second install artifact is needed. Installing or unpacking `gh-inari` (any
|
|
128
|
-
of the paths above) ships `.codex-plugin/plugin.json` and
|
|
129
|
-
`skills/inari/SKILL.md` alongside the CLI. Codex requires explicit
|
|
130
|
-
marketplace registration and installation via Codex plugin commands to
|
|
131
|
-
activate the skill; standard `npm install` alone does not automatically
|
|
132
|
-
surface the plugin to Codex-aware agents.
|
|
100
|
+
Existing artifacts use the same compiler-owned semantic pipeline for validation and remediation. `get`, `view`, and `observe` deliberately expose different bounded projections; `check`, `edit`, `normalize`, and `sync` preserve explicit semantic intent and fail closed when preservation cannot be proven.
|
|
133
101
|
|
|
134
|
-
|
|
102
|
+
## Implementation contracts
|
|
135
103
|
|
|
136
|
-
|
|
137
|
-
codex plugin marketplace add .
|
|
138
|
-
```
|
|
104
|
+
One bounded execution session can be represented as a versioned `Implementation` contract. It records the objective, architecture decision, explicit `READONLY` / `WRITE` / `CREATE` / `DELETE` / `DENY` scopes, verification requirements, and base binding.
|
|
139
105
|
|
|
140
|
-
|
|
141
|
-
`inari`. Start a new Codex session after installation so the bundled Skill
|
|
142
|
-
is available.
|
|
106
|
+
`WRITE` is fail-closed and never implies `CREATE` or `DELETE`.
|
|
143
107
|
|
|
144
|
-
The
|
|
145
|
-
template workflows as Inari-owned and routes agents to `inari skill` /
|
|
146
|
-
`inari skill <scenario>` for the actual operational playbooks, and to
|
|
147
|
-
`inari <domain> --help` for exact command syntax. It does not duplicate
|
|
148
|
-
scenario content, so it stays correct as `inari skill` evolves. Raw `gh`
|
|
149
|
-
remains available for anything outside Inari's governed surface.
|
|
108
|
+
The normative contract is documented in [Implementation Contract](./docs/IMPLEMENTATION_CONTRACT.md).
|
|
150
109
|
|
|
151
|
-
##
|
|
110
|
+
## Agents, Codex Plugin, and MCP
|
|
152
111
|
|
|
153
|
-
|
|
154
|
-
inari template list
|
|
155
|
-
inari issue schema <template> --json
|
|
156
|
-
inari issue validate --template <template> --from issue.json
|
|
157
|
-
inari issue render --template <template> --from issue.json
|
|
158
|
-
inari issue create --template <template> --from issue.json
|
|
159
|
-
inari pr schema <template> --json
|
|
160
|
-
inari pr validate --template <template> --from pr.json
|
|
161
|
-
inari pr render --template <template> --from pr.json
|
|
162
|
-
inari pr create --template <template> --from pr.json
|
|
163
|
-
inari issue validate <number> --template <template> --json
|
|
164
|
-
inari pr validate <number> --template <template> --json
|
|
165
|
-
inari issue explain <number> --template <template> --json
|
|
166
|
-
inari pr explain <number> --template <template> --json
|
|
167
|
-
inari issue get <number> [--template <template>] --json
|
|
168
|
-
inari pr get <number> [--template <template>] --json
|
|
169
|
-
inari issue check <number> [--template <template>]
|
|
170
|
-
inari pr check <number> [--template <template>]
|
|
171
|
-
inari issue edit <number> [--from patch.json] [--field name=value] [--title title] [--dry-run]
|
|
172
|
-
inari pr edit <number> [--from patch.json] [--field name=value] [--title title] [--base branch] [--maintainer-can-modify] [--dry-run]
|
|
173
|
-
inari issue normalize <number> [--dry-run]
|
|
174
|
-
inari pr normalize <number> [--dry-run]
|
|
175
|
-
inari issue sync <number> --from desired.json [--dry-run]
|
|
176
|
-
inari pr sync <number> --from desired.json [--dry-run]
|
|
177
|
-
inari change issue <number> [--repository <owner/name>] --json
|
|
178
|
-
inari change show <number> [--repository <owner/name>] --json
|
|
179
|
-
inari change ready <number> [--repository <owner/name>] --json
|
|
180
|
-
inari change abort <number> [--repository <owner/name>] --json
|
|
181
|
-
```
|
|
112
|
+
The published `gh-inari` package also contains the Codex Plugin manifest and bundled Inari Skill. There is no second package artifact. Codex plugin activation remains explicit; a normal npm install does not silently activate the plugin for an agent.
|
|
182
113
|
|
|
183
|
-
|
|
114
|
+
The bundled Skill stays deliberately thin: it routes governed workflows to `inari skill`, scenario-specific guidance, and the CLI's versioned help rather than duplicating operational policy.
|
|
184
115
|
|
|
185
|
-
|
|
186
|
-
{
|
|
187
|
-
"fields": { "summary": "A reproducible defect" },
|
|
188
|
-
"title": "fix: correct the parser",
|
|
189
|
-
"labels": ["bug"]
|
|
190
|
-
}
|
|
191
|
-
```
|
|
116
|
+
Inari also exposes MCP-facing capabilities backed by the same Core contracts and bounded projections used by the CLI. MCP is not a raw GitHub API pass-through.
|
|
192
117
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
`pr sync --from` accepts a complete pull-request desired-state envelope. Use
|
|
196
|
-
`inari pr sync --help` for the top-level contract, or
|
|
197
|
-
`inari pr schema <template> --json` for its machine-readable `syncInput.schema`
|
|
198
|
-
and a valid `syncInput.minimalExample`.
|
|
199
|
-
`issue sync --from` overlays supplied semantic fields and metadata onto the
|
|
200
|
-
current artifact, preserving values omitted from the input.
|
|
201
|
-
|
|
202
|
-
Change commands use the semantic Change contract and return bounded JSON
|
|
203
|
-
projections. Mutation commands request a configured remote executor; workflow
|
|
204
|
-
names, dispatch inputs, Actions jobs, and privileged App credentials are not
|
|
205
|
-
CLI inputs. `change show` is read-only. Existing Issue/PR artifact-level
|
|
206
|
-
commands remain available as explicit migration-compatible direct mutation
|
|
207
|
-
paths while the Change workflow is rolled out.
|
|
208
|
-
|
|
209
|
-
Schema and validation output is JSON. `--json` makes render and create output JSON as well. Validation failures return exit status `2`; usage errors return `1`; GitHub/transport failures return `3`. Error objects contain stable `code`, `path` where applicable, and ordered `violations`.
|
|
210
|
-
|
|
211
|
-
`issue get` and `pr get` are canonical-only v1 reads. They resolve the target
|
|
212
|
-
repository's default-branch governance, select the supported native template,
|
|
213
|
-
parse the existing artifact with the same parser and semantic validator as
|
|
214
|
-
`validate`/`explain`, and emit only canonical `fields` plus minimal artifact
|
|
215
|
-
metadata. Successful reads report `projection: "canonical"`; wrong-template,
|
|
216
|
-
unparseable, ambiguous, and semantically invalid artifacts report structured
|
|
217
|
-
diagnostics with `projection: "unavailable"` and never return guessed fields.
|
|
218
|
-
When `--template` is omitted, Inari first looks for the bounded invisible
|
|
219
|
-
template identity marker every rendered artifact now carries. A valid marker
|
|
220
|
-
resolves the contract directly; an unknown, stale, or wrong-kind marker fails
|
|
221
|
-
closed with a diagnostic instead of guessing another template. Artifacts
|
|
222
|
-
without a marker fall back to evaluating all supported candidates
|
|
223
|
-
deterministically; multiple structural matches fail closed. Native template
|
|
224
|
-
boilerplate and raw Markdown are intentionally absent from successful output.
|
|
225
|
-
|
|
226
|
-
Existing artifact remediation uses one semantic pipeline for both Issues and
|
|
227
|
-
pull requests. `check` is read-only and classifies an artifact as
|
|
228
|
-
`valid-current`, `non-canonical`, `semantically-invalid`, `unsupported`, or
|
|
229
|
-
`ambiguous`. `edit` applies an explicit semantic/metadata patch from JSON or
|
|
230
|
-
direct CLI options; it never accepts raw Markdown as the mutation contract. `normalize` re-renders a
|
|
231
|
-
parseable, semantically valid artifact and fails closed when preservation is
|
|
232
|
-
not proven. `issue sync` overlays its input onto the current canonical state,
|
|
233
|
-
while `pr sync` treats its input as the complete desired semantic state; both
|
|
234
|
-
reconcile the canonical projection deterministically. A successful no-op is
|
|
235
|
-
reported explicitly, and `--dry-run` returns a bounded semantic/rendered diff
|
|
236
|
-
plus the validated resulting fields, metadata, and canonical body without
|
|
237
|
-
calling a GitHub mutation.
|
|
238
|
-
|
|
239
|
-
## Source of truth and supported semantics
|
|
240
|
-
|
|
241
|
-
`.github/ISSUE_TEMPLATE/**` remains the Issue source of truth. For pull requests, Inari discovers GitHub's supported repository locations: `pull_request_template` files under the repository root, `docs/`, or `.github/`, plus `PULL_REQUEST_TEMPLATE/` directories under each location. Native PR template filenames and the `.md`/`.txt` extensions supported by Inari are matched case-insensitively. Other PR-template extension surfaces are intentionally unsupported in v1 and fail closed. Inari discovers and compiles those files; it does not replace them with a proprietary body schema. Supported Issue Form nodes are `input`, `textarea` (including native `render` code fences), single- and multi-select `dropdown`, `checkboxes`, and `markdown`. Browser-only or ambiguous behavior, such as uploads or unsupported textarea rendering modes, fails closed. Markdown nodes are retained for contract/schema explainability but never emitted into an Issue body.
|
|
242
|
-
|
|
243
|
-
Issue dependencies are a separate, template-independent semantic object. Structured Issue envelopes may provide `dependencies.blockedBy` and `dependencies.blocks`; each reference is the canonical `{ "repositoryHost": "github.com", "repositoryId": "<decimal REST repository database id>", "repository": "owner/name", "number": N }` identity. `repositoryHost` plus `repositoryId` is authoritative: the host/install boundary prevents IDs from different GH_HOST/GHES installations colliding. Within one host, rename/transfer preserves the repository identity tuple and changes only the optional locator; cross-host migration is a different identity. The GitHub adapter obtains this decimal ID from the REST repository endpoint through `gh api`, including for repository overrides through a read-only identity lookup; a context that cannot obtain it does not synthesize one from owner/name. Inari sorts and validates these references (including duplicate, self, malformed, and contradictory declarations) before rendering. Non-empty dependencies are preserved in a bounded reserved body marker and projected back as normalized JSON; ordinary Markdown and GitHub-native dependency metadata are never inferred as semantic input. GitHub-native dependency state is not currently mutated by Inari, so there is no competing authority or implicit drift reconciliation.
|
|
244
|
-
|
|
245
|
-
Native PR Markdown expresses structure but not policy. A small versioned overlay may add constraints unavailable in Markdown without changing section order or content. The supported v1 form is:
|
|
246
|
-
|
|
247
|
-
```yaml
|
|
248
|
-
version: 1
|
|
249
|
-
template: default
|
|
250
|
-
sections:
|
|
251
|
-
- section: linked_issue
|
|
252
|
-
linkedIssue: true
|
|
253
|
-
- section: summary
|
|
254
|
-
required: true
|
|
255
|
-
minLength: 20
|
|
256
|
-
- section: acceptance
|
|
257
|
-
checklist:
|
|
258
|
-
minCompleted: 1
|
|
259
|
-
requireComplete: false
|
|
260
|
-
```
|
|
118
|
+
## Architecture
|
|
261
119
|
|
|
262
|
-
|
|
120
|
+
The README is an entry point, not a second architecture authority. Use these documents for normative detail:
|
|
263
121
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
path: .github/PULL_REQUEST_TEMPLATE/release.md
|
|
271
|
-
sections: []
|
|
272
|
-
```
|
|
122
|
+
| Authority | Scope |
|
|
123
|
+
| -------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
124
|
+
| [Golden Path Architecture](./docs/GOLDEN_PATH_ARCHITECTURE.md) | End-to-end governed lifecycle and composition |
|
|
125
|
+
| [Architecture Vocabulary](./docs/ARCHITECTURE.md) | Canonical provider, credential, principal, and observation vocabulary |
|
|
126
|
+
| [Semantic Templates](./docs/SEMANTIC_TEMPLATES.md) | Semantic template authority and GitHub-native projections |
|
|
127
|
+
| [Implementation Contract](./docs/IMPLEMENTATION_CONTRACT.md) | Bounded implementation-session contract and scope model |
|
|
273
128
|
|
|
274
|
-
|
|
129
|
+
## Safety model
|
|
275
130
|
|
|
276
|
-
|
|
277
|
-
the repository's optional `.github/inari/template-resolution.yml` authority:
|
|
131
|
+
Inari keeps mutation behind validated semantic boundaries:
|
|
278
132
|
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
133
|
+
```text
|
|
134
|
+
resolve authority
|
|
135
|
+
→ compile contract
|
|
136
|
+
→ validate semantic input
|
|
137
|
+
→ render canonical artifact
|
|
138
|
+
→ verify round-trip
|
|
139
|
+
→ perform the governed provider operation
|
|
284
140
|
```
|
|
285
141
|
|
|
286
|
-
|
|
287
|
-
interactive TTY selection, then bounded failure. Non-interactive execution never
|
|
288
|
-
guesses among multiple candidates. An invalid or unavailable configured default
|
|
289
|
-
also fails closed. Candidate identifiers and an explicit `--template` recovery
|
|
290
|
-
action are included in structured ambiguity diagnostics.
|
|
291
|
-
|
|
292
|
-
Issue Form top-level `title` is a fixed native prefix for create validation, but it does not satisfy the caller's required title metadata by itself. An explicit caller title is used as supplied without inferred prefix concatenation or automatic generation. Top-level `labels` are repository-governed defaults and are always retained; caller-supplied labels are appended in order with duplicates removed. Top-level `assignees`, `projects`, and `type`, and upload fields remain unsupported and fail closed rather than being approximated.
|
|
142
|
+
Schema, validation, rendering, observation, and dry-run paths do not become implicit mutation paths. Unsupported, ambiguous, unparseable, or semantically invalid state fails closed before provider mutation.
|
|
293
143
|
|
|
294
|
-
|
|
144
|
+
Inari does not maintain a second credential store. Provider credentials and authority remain explicit parts of the architecture; see [Architecture Vocabulary](./docs/ARCHITECTURE.md).
|
|
295
145
|
|
|
296
|
-
|
|
146
|
+
## Installation and diagnostics
|
|
297
147
|
|
|
298
|
-
|
|
148
|
+
Update or remove a global installation with npm:
|
|
299
149
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
```text
|
|
305
|
-
resolve template -> compile contract -> validate semantic JSON
|
|
306
|
-
-> render canonical Markdown -> construct validated-rendered artifact -> call gh
|
|
150
|
+
```bash
|
|
151
|
+
npm install --global gh-inari@latest
|
|
152
|
+
npm uninstall --global gh-inari
|
|
307
153
|
```
|
|
308
154
|
|
|
309
|
-
|
|
155
|
+
Run the bounded standalone diagnostic without changing repository files:
|
|
310
156
|
|
|
311
|
-
|
|
157
|
+
```bash
|
|
158
|
+
inari --diagnose --json
|
|
159
|
+
npx --yes gh-inari --diagnose --json
|
|
160
|
+
```
|
|
312
161
|
|
|
313
|
-
|
|
162
|
+
`inari --version --json` is the machine-readable self-check. The canonical executable is `inari`; `gh-inari` is an npm bin alias resolving to the same entry point.
|
|
314
163
|
|
|
315
164
|
## Development
|
|
316
165
|
|
|
@@ -319,6 +168,8 @@ pnpm install --frozen-lockfile
|
|
|
319
168
|
pnpm run verify
|
|
320
169
|
```
|
|
321
170
|
|
|
171
|
+
`pnpm run verify` is the repository's authoritative local verification entry point.
|
|
172
|
+
|
|
322
173
|
## License
|
|
323
174
|
|
|
324
|
-
MIT — see [LICENSE](LICENSE).
|
|
175
|
+
MIT — see [LICENSE](./LICENSE).
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly issueNumber: number;
|
|
4
|
-
readonly slug: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function validateBranchName(branch: string): readonly string[];
|
|
8
|
-
export function deriveBranchName(parts: BranchNameParts): string;
|
|
1
|
+
/** @deprecated Import the Core branch-naming module instead. */
|
|
2
|
+
export * from "./dist/branch-naming.js";
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
const BRANCH_PATTERN = /^(feat|fix|docs|refactor|test|chore)\/\d+-[a-z0-9-]+$/;
|
|
6
|
-
const EXEMPT_BRANCHES = new Set(["main"]);
|
|
7
|
-
|
|
8
|
-
export function validateBranchName(branch) {
|
|
9
|
-
if (EXEMPT_BRANCHES.has(branch)) return [];
|
|
10
|
-
if (BRANCH_PATTERN.test(branch)) return [];
|
|
11
|
-
return [
|
|
12
|
-
`branch name "${branch}" does not match <type>/<issue-number>-<slug>` +
|
|
13
|
-
' (e.g. "feat/42-add-init-command"); type must be one of feat, fix, docs, refactor, test, chore',
|
|
14
|
-
];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function deriveBranchName({ type, issueNumber, slug }) {
|
|
18
|
-
if (typeof type !== "string" || type.length === 0) throw new TypeError("Branch type must be a non-empty string.");
|
|
19
|
-
if (!Number.isSafeInteger(issueNumber) || issueNumber < 1) {
|
|
20
|
-
throw new TypeError("Branch issue number must be a positive safe integer.");
|
|
21
|
-
}
|
|
22
|
-
if (typeof slug !== "string" || slug.length === 0) throw new TypeError("Branch slug must be a non-empty string.");
|
|
23
|
-
|
|
24
|
-
const branch = `${type}/${issueNumber}-${slug}`;
|
|
25
|
-
const errors = validateBranchName(branch);
|
|
26
|
-
if (errors.length > 0) throw new TypeError(errors[0]);
|
|
27
|
-
return branch;
|
|
28
|
-
}
|
|
1
|
+
// Compatibility entrypoint for the pre-Core branch-naming filename.
|
|
2
|
+
// The implementation lives in the packaged Core module; this file deliberately
|
|
3
|
+
// contains no independent grammar, parser, or derivation logic.
|
|
4
|
+
export * from "./dist/branch-naming.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type CapabilityExecutionProvenance } from "./capability-provenance.js";
|
|
2
|
+
import type { AuthenticatedSessionContext } from "./session-authentication.js";
|
|
3
|
+
import type { SessionAgentMetadata } from "./session-bundle.js";
|
|
4
|
+
import { type ImplementationReworkMarker } from "../implementation-rework.js";
|
|
5
|
+
import { type GitHubBranchAdvanceCapability } from "../github/git-data-capability.js";
|
|
6
|
+
import type { AdmittedSessionCapability } from "./capability-admission.js";
|
|
7
|
+
import type { RepositoryIdentity } from "../github/effect-authorizer.js";
|
|
8
|
+
export declare const BRANCH_ADVANCE_CONTRACT_VERSION: 1;
|
|
9
|
+
export declare const BRANCH_ADVANCE_OPERATION: "branch.advance";
|
|
10
|
+
export declare const BRANCH_ADVANCE_OUTCOMES: readonly ["advanced", "idempotent", "stale", "failed", "recovery-required"];
|
|
11
|
+
export type BranchAdvanceOutcome = (typeof BRANCH_ADVANCE_OUTCOMES)[number];
|
|
12
|
+
export declare const BRANCH_ADVANCE_FAILURE_CODES: readonly ["BRANCH_ADVANCE_FAILED"];
|
|
13
|
+
export type BranchAdvanceFailureCode = "BRANCH_ADVANCE_FAILED";
|
|
14
|
+
export type BranchAdvanceFailureReason = "request" | "authorization" | "branch-state" | "protected-path" | "stale-head" | "provider" | "verification" | "recovery-required";
|
|
15
|
+
export interface BranchAdvanceCommitAuthor {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly email?: string;
|
|
18
|
+
}
|
|
19
|
+
export type BranchAdvanceChange = {
|
|
20
|
+
readonly operation: "upsert";
|
|
21
|
+
readonly path: string;
|
|
22
|
+
readonly mode: "100644" | "100755";
|
|
23
|
+
readonly content: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly operation: "delete";
|
|
26
|
+
readonly path: string;
|
|
27
|
+
};
|
|
28
|
+
export interface BranchAdvanceSemanticRequest {
|
|
29
|
+
readonly version: 1;
|
|
30
|
+
readonly issue: number;
|
|
31
|
+
readonly branch: string;
|
|
32
|
+
readonly expectedHead: string;
|
|
33
|
+
readonly changes: readonly BranchAdvanceChange[];
|
|
34
|
+
readonly commit: Readonly<{
|
|
35
|
+
message: string;
|
|
36
|
+
author?: Readonly<BranchAdvanceCommitAuthor>;
|
|
37
|
+
}>;
|
|
38
|
+
/** Required when re-entering from a canonical Change in REVIEW. */
|
|
39
|
+
readonly rework?: ImplementationReworkMarker;
|
|
40
|
+
readonly agent?: SessionAgentMetadata;
|
|
41
|
+
}
|
|
42
|
+
export interface BranchAdvanceExecutionFailure {
|
|
43
|
+
readonly code: "BRANCH_ADVANCE_FAILED";
|
|
44
|
+
readonly reason: BranchAdvanceFailureReason;
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}
|
|
47
|
+
export interface BranchAdvanceSemanticResult {
|
|
48
|
+
readonly version: 1;
|
|
49
|
+
readonly operation: "branch.advance";
|
|
50
|
+
readonly status: "succeeded" | "failed";
|
|
51
|
+
readonly outcome: BranchAdvanceOutcome;
|
|
52
|
+
readonly branch: string;
|
|
53
|
+
readonly expectedHead: string;
|
|
54
|
+
readonly resultingHead?: string;
|
|
55
|
+
readonly provenance?: CapabilityExecutionProvenance;
|
|
56
|
+
readonly failure?: BranchAdvanceExecutionFailure;
|
|
57
|
+
}
|
|
58
|
+
export interface BranchAdvanceDiagnostic {
|
|
59
|
+
readonly code: "BRANCH_ADVANCE_FAILED";
|
|
60
|
+
readonly reason: BranchAdvanceFailureReason;
|
|
61
|
+
readonly path: string;
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}
|
|
64
|
+
export interface BranchAdvanceValidationResult {
|
|
65
|
+
readonly valid: boolean;
|
|
66
|
+
readonly value?: BranchAdvanceSemanticRequest;
|
|
67
|
+
readonly diagnostics: readonly BranchAdvanceDiagnostic[];
|
|
68
|
+
}
|
|
69
|
+
export interface BranchAdvanceCapabilityBroker {
|
|
70
|
+
withBranchAdvanceCapability: <T>(request: {
|
|
71
|
+
readonly target: RepositoryIdentity;
|
|
72
|
+
}, operation: (capability: GitHubBranchAdvanceCapability) => Promise<T>) => Promise<T>;
|
|
73
|
+
}
|
|
74
|
+
export interface ExecuteBranchAdvanceOptions {
|
|
75
|
+
readonly context: AuthenticatedSessionContext;
|
|
76
|
+
readonly broker: BranchAdvanceCapabilityBroker;
|
|
77
|
+
readonly admission: AdmittedSessionCapability;
|
|
78
|
+
readonly request?: unknown;
|
|
79
|
+
readonly now?: Date | number | (() => Date | number);
|
|
80
|
+
}
|
|
81
|
+
export declare function validateBranchAdvanceSemanticRequest(input: unknown): BranchAdvanceValidationResult;
|
|
82
|
+
export declare function executeBranchAdvance(options: ExecuteBranchAdvanceOptions): Promise<BranchAdvanceSemanticResult>;
|