要求人工批准写入
让被拒绝的写入在审批队列中等待,直到已登录的人批准,然后带令牌重试。
coordination.approve
让被拒绝的写入在审批队列中等待,直到已登录的人批准,然后带令牌重试。
coordination.approve有些写入不应仅凭智能体一句话就通过。准入会拒绝没有令牌的写入并留下一个请求;由管理员或被授权的审批人裁决,批准后会为该执行者、资源和动词签发令牌。
代码从 INTRAMEDIAL_KEY 读取密钥。请把它放在您的 shell 或密钥存储中,切勿放进要提交的文件。需要已登录用户的调用不能使用密钥:这些调用由控制台发起。
声明一个不带令牌的写入。准入会拒绝它,响应中的 approvalId 指明在队列中等待人来裁决的请求。
决定以 approval 返回,附带其状态。
{
"approval": {
"id": "apr_7f3a",
"actorDid": "did:web:acme.example:agent:billing",
"resource": "repo:payments/main",
"action": "write",
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
:
},
:
}coordination.approvecoordination-approvecurl -sS -X POST https://api.intramedial.com/api/v1/acp/coordination/admit \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorDid": "did:web:acme.example:agent:billing",
"resource": "repo:payments/main",
"action": "write"
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/coordination/admit", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
actorDid: "did:web:acme.example:agent:billing",
resource: "repo:payments/main",
action: "write",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/coordination/admit",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"actorDid": "did:web:acme.example:agent:billing",
"resource": "repo:payments/main",
"action": "write",
},
timeout=30,
)
print(res.status_code, res.json())已登录的审批人在控制台中阅读请求并批准。密钥或智能体不能裁决;这是控制台发送的请求体。
{
"id": "apr_7f3a",
"reason": "expected batch"
}智能体把令牌作为 confirmationToken 重试。它仅可使用一次,并绑定到执行者、资源和动词。
curl -sS -X POST https://api.intramedial.com/api/v1/acp/coordination/admit \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorDid": "did:web:acme.example:agent:billing",
"resource": "repo:payments/main",
"action": "write",
"confirmationToken": "…"
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/coordination/admit", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
actorDid: "did:web:acme.example:agent:billing",
resource: "repo:payments/main",
action: "write",
confirmationToken: "…",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/coordination/admit",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"actorDid": "did:web:acme.example:agent:billing",
"resource": "repo:payments/main",
"action": "write",
"confirmationToken": "…",
},
timeout=30,
)
print(res.status_code, res.json())内容复制自: /docs/coordination-approve
账本仅可追加,并封存在 Merkle 根之下。条目上的时间取自 Intramedial 自己的时钟,签名包可用已发布的公钥离线核查。
为固定范围开启双人控制请求,由第二位管理员批准其摘要,然后执行受控的操作。
dual.control-scopes获取免费的测试密钥,使用 content.attest 证明一个哈希值,然后再验证返回给您的那一份签名回执。
coordination.admit经 Intralock 准入智能体对仓库的写入,并把裁决作为检查运行或状态发布到提交上。
github.enforce当我们向实用示例中添加新示例时,会发送一封简短的邮件。不会发送其他任何邮件,而且您可以从任意一封邮件中退订。
完全无需账户:在 7 天之内可以在各个 attest 路由上调用 35 次,所生成的回执都会被标记为测试回执。当您想继续使用时,再注册账户即可。