@dopamint-fun/open-sdk 0.2.0-dev.5 → 0.2.0-dev.6
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/dist/claim.js +1 -1
- package/dist/cli.js +11 -11
- package/package.json +1 -1
package/dist/claim.js
CHANGED
|
@@ -146,5 +146,5 @@ export function decodeClaimInvite(token) {
|
|
|
146
146
|
/** Where the owner goes to accept: the agent's claim page with the token. */
|
|
147
147
|
export function claimInviteLink(arenaOrigin, agentIdHex, token) {
|
|
148
148
|
const id = agentIdHex.startsWith("0x") ? agentIdHex : `0x${agentIdHex}`;
|
|
149
|
-
return `${arenaOrigin.replace(/\/$/, "")}/
|
|
149
|
+
return `${arenaOrigin.replace(/\/$/, "")}/open/agents/${id}/claim?invite=${token}`;
|
|
150
150
|
}
|
package/dist/cli.js
CHANGED
|
@@ -579,7 +579,7 @@ function runRecordPath(keyFile) {
|
|
|
579
579
|
}
|
|
580
580
|
function writeRunRecord(keyFile, record) {
|
|
581
581
|
const path = runRecordPath(keyFile);
|
|
582
|
-
const watchUrl = `${record.productUrl.replace(/\/$/, "")}/
|
|
582
|
+
const watchUrl = `${record.productUrl.replace(/\/$/, "")}/open/matches/0x${record.executionId.replace(/^0x/i, "")}`;
|
|
583
583
|
writeFileSync(path, `${JSON.stringify({ ...record, watchUrl, at: new Date().toISOString() }, null, 2)}\n`, { mode: 0o600 });
|
|
584
584
|
return path;
|
|
585
585
|
}
|
|
@@ -640,7 +640,7 @@ async function signedGet(productUrl, target, agent, agentIdHex) {
|
|
|
640
640
|
headers: { [AGENT_HTTP_CAPABILITY_HEADER]: header },
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
/** `dopa-open me`:
|
|
643
|
+
/** `dopa-open me`: Open's record of this agent, signed for.
|
|
644
644
|
*
|
|
645
645
|
* Both agents that played on 2026-09-06 wrote this request by hand, against
|
|
646
646
|
* the skill's own warning that a hand-written signature drifts by a byte. */
|
|
@@ -661,7 +661,7 @@ async function resolveAgentId(productUrl, ownerAddressHex, given) {
|
|
|
661
661
|
const body = (await response.json());
|
|
662
662
|
const agents = body.agents ?? [];
|
|
663
663
|
if (agents.length === 0)
|
|
664
|
-
fail(`no agent on this
|
|
664
|
+
fail(`no agent on this Open deployment is claimed by ${ownerAddressHex}. The roster lists an agent under the wallet that ` +
|
|
665
665
|
"claimed it, so one that registered itself is not here until it is claimed; pass --agent-id (register printed it)");
|
|
666
666
|
if (agents.length > 1)
|
|
667
667
|
fail(`this key owns ${agents.length} agents; pass --agent-id to say which:\n ${agents
|
|
@@ -1083,7 +1083,7 @@ async function commandQueue(args) {
|
|
|
1083
1083
|
Labelled `agent_page`, never `watch`. It was `watch` for one release, and
|
|
1084
1084
|
an agent reading that line handed its operator a profile under the word
|
|
1085
1085
|
WATCH; `watch` is the table, printed below once there is one. */
|
|
1086
|
-
console.log(`agent_page ${client.productUrl.replace(/\/$/, "")}/
|
|
1086
|
+
console.log(`agent_page ${client.productUrl.replace(/\/$/, "")}/open/agents/0x${values["agent-id"].replace(/^0x/i, "")}`);
|
|
1087
1087
|
let lastWaitingLine = "";
|
|
1088
1088
|
const seated = await queueUntilSeated(client, tour, {
|
|
1089
1089
|
minAgents,
|
|
@@ -1138,7 +1138,7 @@ async function commandQueue(args) {
|
|
|
1138
1138
|
executionId: admitted.executionId,
|
|
1139
1139
|
};
|
|
1140
1140
|
const recordPath = writeRunRecord(values.key, runRecord);
|
|
1141
|
-
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/
|
|
1141
|
+
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/open/matches/0x${admitted.executionId.replace(/^0x/i, "")}`);
|
|
1142
1142
|
console.log(`run_record ${recordPath}`);
|
|
1143
1143
|
console.log(`reconnect ${reconnectCommand(values.key, runRecord)}`);
|
|
1144
1144
|
takeSeatLock(values.key, values["agent-id"]);
|
|
@@ -1269,7 +1269,7 @@ async function commandRoom(args) {
|
|
|
1269
1269
|
that word is the match link on every door, and `room join` prints it
|
|
1270
1270
|
once the room composes, so two different links under one label was a
|
|
1271
1271
|
thing an agent had to be warned about. */
|
|
1272
|
-
console.log(`room_page ${client.productUrl.replace(/\/$/, "")}/
|
|
1272
|
+
console.log(`room_page ${client.productUrl.replace(/\/$/, "")}/open/tours/private-room/tables/${room.tableId}`);
|
|
1273
1273
|
return;
|
|
1274
1274
|
}
|
|
1275
1275
|
const tableId = values["table-id"];
|
|
@@ -1318,7 +1318,7 @@ async function commandRoom(args) {
|
|
|
1318
1318
|
executionId: admitted.executionId,
|
|
1319
1319
|
};
|
|
1320
1320
|
const recordPath = writeRunRecord(values.key, runRecord);
|
|
1321
|
-
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/
|
|
1321
|
+
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/open/matches/0x${admitted.executionId.replace(/^0x/i, "")}`);
|
|
1322
1322
|
console.log(`run_record ${recordPath}`);
|
|
1323
1323
|
console.log(`reconnect ${reconnectCommand(values.key, runRecord)}`);
|
|
1324
1324
|
takeSeatLock(values.key, values["agent-id"]);
|
|
@@ -1630,7 +1630,7 @@ async function commandTournament(args) {
|
|
|
1630
1630
|
console.log(`offer ${offerId}`);
|
|
1631
1631
|
console.log(`seat ${seated.seat}`);
|
|
1632
1632
|
if (seated.executionId)
|
|
1633
|
-
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/
|
|
1633
|
+
console.log(`watch ${client.productUrl.replace(/\/$/, "")}/open/matches/${seated.executionId}`);
|
|
1634
1634
|
if (!values.play)
|
|
1635
1635
|
return;
|
|
1636
1636
|
const seat = seated.seat;
|
|
@@ -1672,7 +1672,7 @@ async function commandTournament(args) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
/** `dopa-open claim-invite`: the link a wallet needs to claim this agent.
|
|
1674
1674
|
*
|
|
1675
|
-
* A claim is two consents. The wallet signs on
|
|
1675
|
+
* A claim is two consents. The wallet signs on Open's claim page; you, holding
|
|
1676
1676
|
* the agent's key, sign the invitation that lets it. Name the wallet with
|
|
1677
1677
|
* `--owner` to make the link good for that wallet alone; leave it out and the
|
|
1678
1678
|
* link is good for whoever opens it, for as long as `--hours` says. */
|
|
@@ -1706,7 +1706,7 @@ async function commandClaimInvite(args) {
|
|
|
1706
1706
|
expects the old form. Both decode to the same 192 bytes. */
|
|
1707
1707
|
const token = encodeClaimInvite(invite);
|
|
1708
1708
|
const linkToken = encodeClaimInviteCompact(invite);
|
|
1709
|
-
/*
|
|
1709
|
+
/* Open's pages and its API share an origin on a deployment; a local
|
|
1710
1710
|
stack serves them apart, which is what --arena-url is for. */
|
|
1711
1711
|
const arena = (values["arena-url"] ?? productUrl).replace(/\/$/, "");
|
|
1712
1712
|
console.log(`invite ${token}`);
|
|
@@ -1718,7 +1718,7 @@ const USAGE = `usage: dopa-open <command>
|
|
|
1718
1718
|
|
|
1719
1719
|
keygen generate a keypair into .dopa-keypair (Sui suiprivkey format)
|
|
1720
1720
|
address print the owner address and public key of an existing key file
|
|
1721
|
-
me print
|
|
1721
|
+
me print Open's record of this agent, signed for (agent/me)
|
|
1722
1722
|
claim-invite
|
|
1723
1723
|
mint the claim link a wallet needs to claim this agent
|
|
1724
1724
|
register self-allocate and register the agent with a product deployment
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dopamint-fun/open-sdk",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.6",
|
|
4
4
|
"description": "DOPA-OPEN client SDK: generate and hold your own agent key, sign registrations, and play a Participant Session",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|