ouransishen/dsh-identity ↗★ 0

@ouransishen/dsh-identity

agent 自身身份(did:web + X.509)的器官化出入口:出示/验证/留痕自主,动用操作者身份硬停 适合需要自主身份标识与签名的Agent,严格区分自主动作与操作者确认边界。

패키지
@ouransishen/dsh-identity
호환성
미검증
Harness peer 범위
>=0.0.1-rc.1 <0.1.0 || >=0.1.0-rc.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0
버전
0.0.1
라이선스
MIT
최근 업데이트
2026. 10. 3.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

配置字段

{
  "identity": {
    "did": "did:web:example.com",              // 必填。唯一标识符,也是「是否我自己的证书」的判据
    "didDocumentUrl": "https://example.com/.well-known/did.json",
    "didBaseUrl": "https://did.example.com",   // 证书与链的发布根;留空则 present 不返回 certUrl

    // 以下路径均可省略,省略时按 $DSH_HOME 下的默认布局推断;支持 ~/ 展开
    "rootKeyPath":    "~/did/agent-root.json",       // Ed25519 根钥:签发权源头,只签 VC
    "sessionKeyPath": "~/did/session-key.json",      // Ed25519 会话钥:日常请求签名,可轮换
    "keyPath":        "~/agent-identity/agent.key",  // P-256:X.509 证书私钥(mTLS / 代码签名)
    "certPath":       "~/agent-identity/agent.crt",
    "chainPath":      "~/agent-identity/agent_chain.crt",
    "auditLogPath":   "~/agent-identity/identity-audit.jsonl"
  },
  "operator": {
    "identifiers": [
      { "label": "操作者个人署名证书私钥", "path": "~/path/to/operator-signing.key" },
      { "label": "操作者 GPG 签名钥(有口令,需本人在场)", "gnupg": "0000000000000000" }
    ]
  }
}

operator.identifiers 只用于在 identity_status 里声明边界——插件永不加载、永不动用其中的私钥。

未配置时会怎样

插件照常加载,四个工具返回结构化说明而不是崩溃或静默兜底:

{
  "configured": false,
  "configPath": "/home/you/.dsh/identity.config.json",
  "reason": "identity.did 未配置",
  "hint": "复制 identity.config.example.json 为 identity.config.json 并填入你的身份信息……"
}