chore: update module path to forge
This commit is contained in:
parent
6e85969cf4
commit
6bf9dd1866
20 changed files with 42 additions and 42 deletions
|
|
@ -9,13 +9,13 @@ manifeste `mcp.toml`, diagnostic et auto-update.
|
|||
Dans un projet Go :
|
||||
|
||||
```bash
|
||||
go get gitea.lclr.dev/AI/mcp-framework
|
||||
go get forge.lclr.dev/AI/mcp-framework
|
||||
```
|
||||
|
||||
Pour utiliser le CLI :
|
||||
|
||||
```bash
|
||||
go install gitea.lclr.dev/AI/mcp-framework/cmd/mcp-framework@latest
|
||||
go install forge.lclr.dev/AI/mcp-framework/cmd/mcp-framework@latest
|
||||
```
|
||||
|
||||
## Créer un projet MCP
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/config"
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/config"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type DoctorStatus string
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/config"
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/config"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type doctorProfile struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"os"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type KeyLookupFunc func(key string) (string, bool, error)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type testSecretStore struct {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type SetupSecretWriteOptions struct {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
func TestWriteSetupSecretVerifiedPersistsAndConfirmsReadability(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
generatepkg "gitea.lclr.dev/AI/mcp-framework/generate"
|
||||
scaffoldpkg "gitea.lclr.dev/AI/mcp-framework/scaffold"
|
||||
generatepkg "forge.lclr.dev/AI/mcp-framework/generate"
|
||||
scaffoldpkg "forge.lclr.dev/AI/mcp-framework/scaffold"
|
||||
)
|
||||
|
||||
const toolName = "mcp-framework"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
## Installation
|
||||
|
||||
```bash
|
||||
go get gitea.lclr.dev/AI/mcp-framework
|
||||
go get forge.lclr.dev/AI/mcp-framework
|
||||
```
|
||||
|
||||
## CLI de scaffold
|
||||
|
|
@ -11,7 +11,7 @@ go get gitea.lclr.dev/AI/mcp-framework
|
|||
Pour initialiser un projet MCP depuis un dossier vide, sans écrire de runner Go :
|
||||
|
||||
```bash
|
||||
go install gitea.lclr.dev/AI/mcp-framework/cmd/mcp-framework@latest
|
||||
go install forge.lclr.dev/AI/mcp-framework/cmd/mcp-framework@latest
|
||||
mcp-framework scaffold init \
|
||||
--target ./my-mcp \
|
||||
--module example.com/my-mcp \
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import (
|
|||
"os"
|
||||
|
||||
"example.com/my-mcp/mcpgen"
|
||||
"gitea.lclr.dev/AI/mcp-framework/config"
|
||||
"gitea.lclr.dev/AI/mcp-framework/update"
|
||||
"forge.lclr.dev/AI/mcp-framework/config"
|
||||
"forge.lclr.dev/AI/mcp-framework/update"
|
||||
)
|
||||
|
||||
var version = "dev"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Exemple :
|
|||
```go
|
||||
result, err := scaffold.Generate(scaffold.Options{
|
||||
TargetDir: "./my-mcp",
|
||||
ModulePath: "gitea.lclr.dev/AI/my-mcp",
|
||||
ModulePath: "forge.lclr.dev/AI/my-mcp",
|
||||
BinaryName: "my-mcp",
|
||||
Description: "Client MCP interne",
|
||||
DefaultProfile: "prod",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
var ErrGeneratedFilesOutdated = errors.New("generated files are not up to date")
|
||||
|
|
@ -211,7 +211,7 @@ func renderManifestLoader(packageName, manifestContent string) (string, error) {
|
|||
|
||||
package %s
|
||||
|
||||
import fwmanifest "gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
import fwmanifest "forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
|
||||
const embeddedManifest = %s
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ func renderMetadata(packageName string, manifestFile manifest.File) (string, err
|
|||
|
||||
package %s
|
||||
|
||||
import fwmanifest "gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
import fwmanifest "forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
|
||||
const BinaryName = %s
|
||||
const DefaultDescription = %s
|
||||
|
|
@ -275,7 +275,7 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
fwupdate "gitea.lclr.dev/AI/mcp-framework/update"
|
||||
fwupdate "forge.lclr.dev/AI/mcp-framework/update"
|
||||
)
|
||||
|
||||
func UpdateOptions(version string, stdout io.Writer) (fwupdate.Options, error) {
|
||||
|
|
@ -338,7 +338,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
fwsecretstore "gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
fwsecretstore "forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
)
|
||||
|
||||
type SecretStoreOptions struct {
|
||||
|
|
@ -483,7 +483,7 @@ import (
|
|||
"flag"
|
||||
"strings"
|
||||
|
||||
fwcli "gitea.lclr.dev/AI/mcp-framework/cli"
|
||||
fwcli "forge.lclr.dev/AI/mcp-framework/cli"
|
||||
)
|
||||
|
||||
type ConfigFlags struct {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ description = "Demo MCP"
|
|||
for _, snippet := range []string{
|
||||
"// Code generated by mcp-framework generate. DO NOT EDIT.",
|
||||
"package mcpgen",
|
||||
"import fwmanifest \"gitea.lclr.dev/AI/mcp-framework/manifest\"",
|
||||
"import fwmanifest \"forge.lclr.dev/AI/mcp-framework/manifest\"",
|
||||
"const embeddedManifest = ",
|
||||
"func LoadManifest(startDir string) (fwmanifest.File, string, error) {",
|
||||
"return fwmanifest.LoadDefaultOrEmbedded(startDir, embeddedManifest)",
|
||||
|
|
@ -386,7 +386,7 @@ func writeModule(t *testing.T, projectDir string) {
|
|||
t.Fatalf("Abs repo root: %v", err)
|
||||
}
|
||||
|
||||
goMod := "module example.com/generated-demo\n\ngo 1.25.0\n\nrequire (\n\tgithub.com/99designs/keyring v1.2.2\n\tgithub.com/BurntSushi/toml v1.6.0\n\tgitea.lclr.dev/AI/mcp-framework v0.0.0\n)\n\nreplace gitea.lclr.dev/AI/mcp-framework => " + filepath.ToSlash(repoRoot) + "\n"
|
||||
goMod := "module example.com/generated-demo\n\ngo 1.25.0\n\nrequire (\n\tgithub.com/99designs/keyring v1.2.2\n\tgithub.com/BurntSushi/toml v1.6.0\n\tforge.lclr.dev/AI/mcp-framework v0.0.0\n)\n\nreplace forge.lclr.dev/AI/mcp-framework => " + filepath.ToSlash(repoRoot) + "\n"
|
||||
if err := os.WriteFile(filepath.Join(projectDir, "go.mod"), []byte(goMod), 0o600); err != nil {
|
||||
t.Fatalf("WriteFile go.mod: %v", err)
|
||||
}
|
||||
|
|
@ -406,10 +406,10 @@ import (
|
|||
"io"
|
||||
"testing"
|
||||
|
||||
fwcli "gitea.lclr.dev/AI/mcp-framework/cli"
|
||||
fwsecretstore "gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
fwcli "forge.lclr.dev/AI/mcp-framework/cli"
|
||||
fwsecretstore "forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"example.com/generated-demo/mcpgen"
|
||||
fwmanifest "gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
fwmanifest "forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
func TestGeneratedHelpersUseEmbeddedManifest(t *testing.T) {
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module gitea.lclr.dev/AI/mcp-framework
|
||||
module forge.lclr.dev/AI/mcp-framework
|
||||
|
||||
go 1.25.0
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/BurntSushi/toml"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/update"
|
||||
"forge.lclr.dev/AI/mcp-framework/update"
|
||||
)
|
||||
|
||||
const DefaultFile = "mcp.toml"
|
||||
|
|
|
|||
|
|
@ -1539,12 +1539,12 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/bootstrap"
|
||||
"gitea.lclr.dev/AI/mcp-framework/cli"
|
||||
"gitea.lclr.dev/AI/mcp-framework/config"
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"gitea.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"gitea.lclr.dev/AI/mcp-framework/update"
|
||||
"forge.lclr.dev/AI/mcp-framework/bootstrap"
|
||||
"forge.lclr.dev/AI/mcp-framework/cli"
|
||||
"forge.lclr.dev/AI/mcp-framework/config"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/secretstore"
|
||||
"forge.lclr.dev/AI/mcp-framework/update"
|
||||
)
|
||||
|
||||
var embeddedManifest = ` + "`" + `binary_name = "{{.BinaryName}}"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import (
|
|||
"testing"
|
||||
"unicode/utf8"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
func TestOpenSupportsBitwardenCLIBackendPolicy(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
type ManifestLoader func(startDir string) (manifest.File, string, error)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/99designs/keyring"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
func TestOpenFromManifestUsesPolicyFromManifest(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.lclr.dev/AI/mcp-framework/manifest"
|
||||
"forge.lclr.dev/AI/mcp-framework/manifest"
|
||||
)
|
||||
|
||||
func TestDescribeRuntimeReturnsDeclaredAndEffectivePolicies(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue