@hraness/message-like-me 0.8.6 → 0.8.8
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/CHANGELOG.md +21 -0
- package/README.md +41 -33
- package/SECURITY.md +6 -6
- package/dist/agentic-messaging-v1.d.ts +44 -25
- package/dist/agentic-messaging-v1.js +81 -67
- package/dist/cli.js +91 -83
- package/docs/local-message-bundle-v1.md +11 -10
- package/docs/local-message-bundle-v2.md +10 -9
- package/docs/methodology.md +1 -1
- package/docs/publishing.md +57 -25
- package/package.json +2 -1
- package/skills/message-like-me/SKILL.md +6 -6
- package/skills/message-like-me/references/privacy.md +2 -2
package/dist/cli.js
CHANGED
|
@@ -14816,12 +14816,12 @@ var AGENTIC_MESSAGING_V1_SCHEMA_VERSION = 1;
|
|
|
14816
14816
|
var AGENT_MESSAGE_DRAFT_V1_FORMAT = "message-like-me.agent-message-draft";
|
|
14817
14817
|
var AGENT_MESSAGE_HANDOFF_REQUEST_V1_FORMAT = "message-like-me.agent-message-handoff-request";
|
|
14818
14818
|
var AGENT_MESSAGE_HANDOFF_V1_FORMAT = "message-like-me.agent-message-handoff";
|
|
14819
|
-
var
|
|
14820
|
-
var
|
|
14821
|
-
var
|
|
14822
|
-
var
|
|
14823
|
-
var
|
|
14824
|
-
contractId:
|
|
14819
|
+
var GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_FORMAT = "wrench.messaging-context-binding";
|
|
14820
|
+
var GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_FORMAT = "wrench.messaging-receipt-binding";
|
|
14821
|
+
var GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_ID = "wrench.messaging-context-binding.v1";
|
|
14822
|
+
var GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_HASH = "5e64da6a3d826e7f6fa3db7dca0a4ba92c10cfb784981e71a25aed9513a5c687";
|
|
14823
|
+
var GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_DESCRIPTOR = Object.freeze({
|
|
14824
|
+
contractId: GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_ID,
|
|
14825
14825
|
fields: Object.freeze([
|
|
14826
14826
|
"schemaVersion:1",
|
|
14827
14827
|
"format:wrench.messaging-context-binding",
|
|
@@ -14837,10 +14837,10 @@ var WRENCH_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_DESCRIPTOR = Object.freeze({
|
|
|
14837
14837
|
format: "wrench.messaging-contract-descriptor",
|
|
14838
14838
|
schemaVersion: 1
|
|
14839
14839
|
});
|
|
14840
|
-
var
|
|
14841
|
-
var
|
|
14842
|
-
var
|
|
14843
|
-
contractId:
|
|
14840
|
+
var GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_ID = "wrench.messaging-receipt-binding.v1";
|
|
14841
|
+
var GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_HASH = "7f6cf724f0200b2399e4f4641c637b20b48914fc5c9b13755127a8ec69fe66f4";
|
|
14842
|
+
var GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_DESCRIPTOR = Object.freeze({
|
|
14843
|
+
contractId: GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_ID,
|
|
14844
14844
|
fields: Object.freeze([
|
|
14845
14845
|
"schemaVersion:1",
|
|
14846
14846
|
"format:wrench.messaging-receipt-binding",
|
|
@@ -14996,8 +14996,8 @@ function handoffCore(value) {
|
|
|
14996
14996
|
function handoffDigest(value) {
|
|
14997
14997
|
return sha256(canonicalJson(handoffCore(value)));
|
|
14998
14998
|
}
|
|
14999
|
-
function
|
|
15000
|
-
const record = object(value, "
|
|
14999
|
+
function parseGhostgetMessagingContextBindingV1(value) {
|
|
15000
|
+
const record = object(value, "Ghostget messaging context binding");
|
|
15001
15001
|
exactKeys(record, [
|
|
15002
15002
|
"schemaVersion",
|
|
15003
15003
|
"format",
|
|
@@ -15009,26 +15009,26 @@ function parseWrenchMessagingContextBindingV1(value) {
|
|
|
15009
15009
|
"latestMessageRevision",
|
|
15010
15010
|
"validatedAt",
|
|
15011
15011
|
"expiresAt"
|
|
15012
|
-
], "
|
|
15013
|
-
if (record.schemaVersion !== AGENTIC_MESSAGING_V1_SCHEMA_VERSION || record.format !==
|
|
15014
|
-
return fail9("
|
|
15015
|
-
if (record.contractId !==
|
|
15016
|
-
return fail9("
|
|
15017
|
-
const validatedAt = timestamp(record.validatedAt, "
|
|
15018
|
-
const expiresAt = timestamp(record.expiresAt, "
|
|
15012
|
+
], "Ghostget messaging context binding");
|
|
15013
|
+
if (record.schemaVersion !== AGENTIC_MESSAGING_V1_SCHEMA_VERSION || record.format !== GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_FORMAT)
|
|
15014
|
+
return fail9("Ghostget messaging context binding has the wrong schemaVersion or format");
|
|
15015
|
+
if (record.contractId !== GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_ID || record.contractHash !== GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_HASH)
|
|
15016
|
+
return fail9("Ghostget messaging context binding has an unsupported contract identity");
|
|
15017
|
+
const validatedAt = timestamp(record.validatedAt, "Ghostget messaging context binding.validatedAt");
|
|
15018
|
+
const expiresAt = timestamp(record.expiresAt, "Ghostget messaging context binding.expiresAt");
|
|
15019
15019
|
const lifetime = Date.parse(expiresAt) - Date.parse(validatedAt);
|
|
15020
15020
|
if (lifetime <= 0 || lifetime > AGENTIC_MESSAGING_V1_LIMITS.maximumContextLifetimeMilliseconds) {
|
|
15021
|
-
return fail9("
|
|
15021
|
+
return fail9("Ghostget messaging context binding has an invalid lifetime");
|
|
15022
15022
|
}
|
|
15023
15023
|
return Object.freeze({
|
|
15024
15024
|
schemaVersion: AGENTIC_MESSAGING_V1_SCHEMA_VERSION,
|
|
15025
|
-
format:
|
|
15026
|
-
contractId:
|
|
15027
|
-
contractHash:
|
|
15028
|
-
routeRef: identifier2(record.routeRef, "
|
|
15029
|
-
contextRef: identifier2(record.contextRef, "
|
|
15030
|
-
exactDataRevision: digest(record.exactDataRevision, "
|
|
15031
|
-
latestMessageRevision: digest(record.latestMessageRevision, "
|
|
15025
|
+
format: GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_FORMAT,
|
|
15026
|
+
contractId: GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_ID,
|
|
15027
|
+
contractHash: GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_CONTRACT_HASH,
|
|
15028
|
+
routeRef: identifier2(record.routeRef, "Ghostget messaging context binding.routeRef"),
|
|
15029
|
+
contextRef: identifier2(record.contextRef, "Ghostget messaging context binding.contextRef"),
|
|
15030
|
+
exactDataRevision: digest(record.exactDataRevision, "Ghostget messaging context binding.exactDataRevision"),
|
|
15031
|
+
latestMessageRevision: digest(record.latestMessageRevision, "Ghostget messaging context binding.latestMessageRevision"),
|
|
15032
15032
|
validatedAt,
|
|
15033
15033
|
expiresAt
|
|
15034
15034
|
});
|
|
@@ -15056,7 +15056,10 @@ function parseAgentMessageHandoffRequestV1(value) {
|
|
|
15056
15056
|
});
|
|
15057
15057
|
}
|
|
15058
15058
|
function createAgentMessageHandoffV1(input) {
|
|
15059
|
-
|
|
15059
|
+
if (input.ghostgetContext !== undefined && input.wrenchContext !== undefined) {
|
|
15060
|
+
return fail9("Choose ghostgetContext or its legacy wrenchContext alias, not both");
|
|
15061
|
+
}
|
|
15062
|
+
const context5 = parseGhostgetMessagingContextBindingV1(input.ghostgetContext ?? input.wrenchContext);
|
|
15060
15063
|
const draft = parseAgentMessageDraftV1(input.draft);
|
|
15061
15064
|
const core = Object.freeze({
|
|
15062
15065
|
schemaVersion: AGENTIC_MESSAGING_V1_SCHEMA_VERSION,
|
|
@@ -15103,7 +15106,7 @@ function createAgentMessageHandoffV1(input) {
|
|
|
15103
15106
|
return fail9("Agent message handoff timestamps are inconsistent");
|
|
15104
15107
|
}
|
|
15105
15108
|
if (core.expiresAt > core.wrench.contextExpiresAt) {
|
|
15106
|
-
return fail9("Agent message handoff outlives its
|
|
15109
|
+
return fail9("Agent message handoff outlives its Ghostget context binding");
|
|
15107
15110
|
}
|
|
15108
15111
|
const canonicalSha256 = handoffDigest(core);
|
|
15109
15112
|
return Object.freeze({
|
|
@@ -15167,9 +15170,9 @@ function parseAgentMessageHandoffV1(value) {
|
|
|
15167
15170
|
exactKeys(integrityRecord, ["algorithm", "canonicalSha256"], "Agent message handoff.integrity");
|
|
15168
15171
|
if (integrityRecord.algorithm !== "sha256")
|
|
15169
15172
|
return fail9("Agent message handoff integrity algorithm must be sha256");
|
|
15170
|
-
const context5 =
|
|
15173
|
+
const context5 = parseGhostgetMessagingContextBindingV1({
|
|
15171
15174
|
schemaVersion: AGENTIC_MESSAGING_V1_SCHEMA_VERSION,
|
|
15172
|
-
format:
|
|
15175
|
+
format: GHOSTGET_MESSAGING_CONTEXT_BINDING_V1_FORMAT,
|
|
15173
15176
|
contractId: wrenchRecord.contractId,
|
|
15174
15177
|
contractHash: wrenchRecord.contractHash,
|
|
15175
15178
|
routeRef: wrenchRecord.routeRef,
|
|
@@ -15194,7 +15197,7 @@ function parseAgentMessageHandoffV1(value) {
|
|
|
15194
15197
|
profileState: profileState(evidenceRecord.profileState, "Agent message handoff.evidence.profileState"),
|
|
15195
15198
|
profileEvidenceRevision: evidenceRecord.profileEvidenceRevision === null ? null : digest(evidenceRecord.profileEvidenceRevision, "Agent message handoff.evidence.profileEvidenceRevision")
|
|
15196
15199
|
},
|
|
15197
|
-
|
|
15200
|
+
ghostgetContext: context5,
|
|
15198
15201
|
draft: {
|
|
15199
15202
|
schemaVersion: AGENTIC_MESSAGING_V1_SCHEMA_VERSION,
|
|
15200
15203
|
format: AGENT_MESSAGE_DRAFT_V1_FORMAT,
|
|
@@ -15208,7 +15211,7 @@ function parseAgentMessageHandoffV1(value) {
|
|
|
15208
15211
|
return fail9("Agent message handoff integrity does not match its canonical content");
|
|
15209
15212
|
return handoff;
|
|
15210
15213
|
}
|
|
15211
|
-
function
|
|
15214
|
+
function ghostgetMessagingTurnDigestV1(value) {
|
|
15212
15215
|
const handoff = parseAgentMessageHandoffV1(value);
|
|
15213
15216
|
return sha256(canonicalJson({
|
|
15214
15217
|
schemaVersion: 1,
|
|
@@ -15223,8 +15226,8 @@ function wrenchMessagingTurnDigestV1(value) {
|
|
|
15223
15226
|
}))
|
|
15224
15227
|
}));
|
|
15225
15228
|
}
|
|
15226
|
-
function
|
|
15227
|
-
const record = object(value, "
|
|
15229
|
+
function parseGhostgetMessagingReceiptBindingV1(value) {
|
|
15230
|
+
const record = object(value, "Ghostget messaging receipt binding");
|
|
15228
15231
|
exactKeys(record, [
|
|
15229
15232
|
"schemaVersion",
|
|
15230
15233
|
"format",
|
|
@@ -15241,42 +15244,42 @@ function parseWrenchMessagingReceiptBindingV1(value) {
|
|
|
15241
15244
|
"provenPartCount",
|
|
15242
15245
|
"receiptSha256",
|
|
15243
15246
|
"recordedAt"
|
|
15244
|
-
], "
|
|
15245
|
-
if (record.schemaVersion !== AGENTIC_MESSAGING_V1_SCHEMA_VERSION || record.format !==
|
|
15246
|
-
return fail9("
|
|
15247
|
-
if (record.contractId !==
|
|
15248
|
-
return fail9("
|
|
15247
|
+
], "Ghostget messaging receipt binding");
|
|
15248
|
+
if (record.schemaVersion !== AGENTIC_MESSAGING_V1_SCHEMA_VERSION || record.format !== GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_FORMAT)
|
|
15249
|
+
return fail9("Ghostget messaging receipt binding has the wrong schemaVersion or format");
|
|
15250
|
+
if (record.contractId !== GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_ID || record.contractHash !== GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_HASH)
|
|
15251
|
+
return fail9("Ghostget messaging receipt binding has an unsupported contract identity");
|
|
15249
15252
|
if (record.state !== "submitted" && record.state !== "failed" && record.state !== "partial" && record.state !== "indeterminate")
|
|
15250
|
-
return fail9("
|
|
15253
|
+
return fail9("Ghostget messaging receipt binding has an invalid state");
|
|
15251
15254
|
if (!Number.isSafeInteger(record.partCount) || record.partCount < 1 || record.partCount > 8) {
|
|
15252
|
-
return fail9("
|
|
15255
|
+
return fail9("Ghostget messaging receipt binding.partCount must be from 1 through 8");
|
|
15253
15256
|
}
|
|
15254
15257
|
if (!Number.isSafeInteger(record.provenPartCount) || record.provenPartCount < 0 || record.provenPartCount > record.partCount)
|
|
15255
|
-
return fail9("
|
|
15258
|
+
return fail9("Ghostget messaging receipt binding.provenPartCount is out of range");
|
|
15256
15259
|
const partCount = record.partCount;
|
|
15257
15260
|
const provenPartCount = record.provenPartCount;
|
|
15258
15261
|
if (record.state === "submitted" && provenPartCount !== partCount || record.state === "failed" && provenPartCount !== 0 || record.state === "partial" && (provenPartCount < 1 || provenPartCount >= partCount) || record.state === "indeterminate" && provenPartCount >= partCount)
|
|
15259
|
-
return fail9("
|
|
15262
|
+
return fail9("Ghostget messaging receipt binding state does not match its proven prefix");
|
|
15260
15263
|
const parsed = Object.freeze({
|
|
15261
15264
|
schemaVersion: AGENTIC_MESSAGING_V1_SCHEMA_VERSION,
|
|
15262
|
-
format:
|
|
15263
|
-
contractId:
|
|
15264
|
-
contractHash:
|
|
15265
|
-
clientIntentSha256: digest(record.clientIntentSha256, "
|
|
15266
|
-
routeRefSha256: digest(record.routeRefSha256, "
|
|
15267
|
-
contextRefSha256: digest(record.contextRefSha256, "
|
|
15268
|
-
turnDigest: digest(record.turnDigest, "
|
|
15269
|
-
previewDigest: digest(record.previewDigest, "
|
|
15270
|
-
runId: identifier2(record.runId, "
|
|
15265
|
+
format: GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_FORMAT,
|
|
15266
|
+
contractId: GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_ID,
|
|
15267
|
+
contractHash: GHOSTGET_MESSAGING_RECEIPT_BINDING_V1_CONTRACT_HASH,
|
|
15268
|
+
clientIntentSha256: digest(record.clientIntentSha256, "Ghostget messaging receipt binding.clientIntentSha256"),
|
|
15269
|
+
routeRefSha256: digest(record.routeRefSha256, "Ghostget messaging receipt binding.routeRefSha256"),
|
|
15270
|
+
contextRefSha256: digest(record.contextRefSha256, "Ghostget messaging receipt binding.contextRefSha256"),
|
|
15271
|
+
turnDigest: digest(record.turnDigest, "Ghostget messaging receipt binding.turnDigest"),
|
|
15272
|
+
previewDigest: digest(record.previewDigest, "Ghostget messaging receipt binding.previewDigest"),
|
|
15273
|
+
runId: identifier2(record.runId, "Ghostget messaging receipt binding.runId", 256),
|
|
15271
15274
|
state: record.state,
|
|
15272
15275
|
partCount,
|
|
15273
15276
|
provenPartCount,
|
|
15274
|
-
receiptSha256: digest(record.receiptSha256, "
|
|
15275
|
-
recordedAt: timestamp(record.recordedAt, "
|
|
15277
|
+
receiptSha256: digest(record.receiptSha256, "Ghostget messaging receipt binding.receiptSha256"),
|
|
15278
|
+
recordedAt: timestamp(record.recordedAt, "Ghostget messaging receipt binding.recordedAt")
|
|
15276
15279
|
});
|
|
15277
15280
|
const { receiptSha256, ...receiptCore } = parsed;
|
|
15278
15281
|
if (sha256(canonicalJson(receiptCore)) !== receiptSha256) {
|
|
15279
|
-
return fail9("
|
|
15282
|
+
return fail9("Ghostget messaging receipt binding receiptSha256 does not match its canonical content");
|
|
15280
15283
|
}
|
|
15281
15284
|
return parsed;
|
|
15282
15285
|
}
|
|
@@ -22948,7 +22951,7 @@ class LocalStore {
|
|
|
22948
22951
|
turn_digest_sha256,part_count,created_at,expires_at,state
|
|
22949
22952
|
) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, 'prepared')
|
|
22950
22953
|
ON CONFLICT(handoff_id) DO NOTHING
|
|
22951
|
-
`).run(handoff.handoffId, handoff.integrity.canonicalSha256, sha256(handoff.contact.contactId), sha256(handoff.contact.routeCandidateId), sha256(handoff.contact.sourceId), sha256(handoff.contact.conversationId), handoff.evidence.corpusRevision, handoff.evidence.sourceRevision, handoff.evidence.profileState, handoff.evidence.profileEvidenceRevision, handoff.wrench.contractHash, handoff.wrench.routeRefSha256, handoff.wrench.contextRefSha256, handoff.wrench.exactDataRevision, handoff.wrench.latestMessageRevision,
|
|
22954
|
+
`).run(handoff.handoffId, handoff.integrity.canonicalSha256, sha256(handoff.contact.contactId), sha256(handoff.contact.routeCandidateId), sha256(handoff.contact.sourceId), sha256(handoff.contact.conversationId), handoff.evidence.corpusRevision, handoff.evidence.sourceRevision, handoff.evidence.profileState, handoff.evidence.profileEvidenceRevision, handoff.wrench.contractHash, handoff.wrench.routeRefSha256, handoff.wrench.contextRefSha256, handoff.wrench.exactDataRevision, handoff.wrench.latestMessageRevision, ghostgetMessagingTurnDigestV1(handoff), handoff.turn.bubbles.length, handoff.createdAt, handoff.expiresAt);
|
|
22952
22955
|
const stored = get13(this.#database, `
|
|
22953
22956
|
SELECT handoff_sha256 FROM agent_message_handoffs WHERE handoff_id=?
|
|
22954
22957
|
`, handoff.handoffId);
|
|
@@ -22962,7 +22965,7 @@ class LocalStore {
|
|
|
22962
22965
|
if (!/^handoff_[a-f0-9]{64}$/u.test(handoffId)) {
|
|
22963
22966
|
throw new CliError("usage", "Invalid handoff ID");
|
|
22964
22967
|
}
|
|
22965
|
-
const receipt =
|
|
22968
|
+
const receipt = parseGhostgetMessagingReceiptBindingV1(value);
|
|
22966
22969
|
transaction(this.#database, () => {
|
|
22967
22970
|
const stored = get13(this.#database, `
|
|
22968
22971
|
SELECT handoff_sha256,route_ref_sha256,context_ref_sha256,turn_digest_sha256,
|
|
@@ -22972,11 +22975,11 @@ class LocalStore {
|
|
|
22972
22975
|
if (stored === null)
|
|
22973
22976
|
throw new CliError("not-found", `Unknown handoff ${handoffId}`);
|
|
22974
22977
|
if (receipt.clientIntentSha256 !== stored.handoff_sha256 || receipt.routeRefSha256 !== stored.route_ref_sha256 || receipt.contextRefSha256 !== stored.context_ref_sha256 || receipt.turnDigest !== stored.turn_digest_sha256 || receipt.partCount !== stored.part_count || receipt.recordedAt < stored.created_at)
|
|
22975
|
-
throw new CliError("conflict", "
|
|
22978
|
+
throw new CliError("conflict", "Ghostget receipt does not bind the recorded handoff");
|
|
22976
22979
|
if (stored.state === "recorded") {
|
|
22977
22980
|
if (stored.receipt_sha256 === receipt.receiptSha256)
|
|
22978
22981
|
return;
|
|
22979
|
-
throw new CliError("conflict", "Handoff already has a different
|
|
22982
|
+
throw new CliError("conflict", "Handoff already has a different Ghostget receipt");
|
|
22980
22983
|
}
|
|
22981
22984
|
this.#database.query(`
|
|
22982
22985
|
UPDATE agent_message_handoffs SET
|
|
@@ -23091,7 +23094,7 @@ class LocalStore {
|
|
|
23091
23094
|
if (exists5 === null)
|
|
23092
23095
|
return "absent";
|
|
23093
23096
|
const audit = this.handoffAudit(handoff.handoffId);
|
|
23094
|
-
return audit.handoffSha256 === handoff.integrity.canonicalSha256 && audit.contactIdSha256 === sha256(handoff.contact.contactId) && audit.routeCandidateIdSha256 === sha256(handoff.contact.routeCandidateId) && audit.sourceIdSha256 === sha256(handoff.contact.sourceId) && audit.conversationIdSha256 === sha256(handoff.contact.conversationId) && audit.corpusRevision === handoff.evidence.corpusRevision && audit.sourceRevision === handoff.evidence.sourceRevision && audit.profileState === handoff.evidence.profileState && audit.profileEvidenceRevision === handoff.evidence.profileEvidenceRevision && audit.wrenchContractHash === handoff.wrench.contractHash && audit.routeRefSha256 === sha256(handoff.wrench.routeRef) && audit.contextRefSha256 === sha256(handoff.wrench.contextRef) && audit.exactDataRevisionSha256 === handoff.wrench.exactDataRevision && audit.latestMessageRevisionSha256 === handoff.wrench.latestMessageRevision && audit.turnDigest ===
|
|
23097
|
+
return audit.handoffSha256 === handoff.integrity.canonicalSha256 && audit.contactIdSha256 === sha256(handoff.contact.contactId) && audit.routeCandidateIdSha256 === sha256(handoff.contact.routeCandidateId) && audit.sourceIdSha256 === sha256(handoff.contact.sourceId) && audit.conversationIdSha256 === sha256(handoff.contact.conversationId) && audit.corpusRevision === handoff.evidence.corpusRevision && audit.sourceRevision === handoff.evidence.sourceRevision && audit.profileState === handoff.evidence.profileState && audit.profileEvidenceRevision === handoff.evidence.profileEvidenceRevision && audit.wrenchContractHash === handoff.wrench.contractHash && audit.routeRefSha256 === sha256(handoff.wrench.routeRef) && audit.contextRefSha256 === sha256(handoff.wrench.contextRef) && audit.exactDataRevisionSha256 === handoff.wrench.exactDataRevision && audit.latestMessageRevisionSha256 === handoff.wrench.latestMessageRevision && audit.turnDigest === ghostgetMessagingTurnDigestV1(handoff) && audit.partCount === handoff.turn.bubbles.length && audit.createdAt === handoff.createdAt && audit.expiresAt === handoff.expiresAt ? "committed" : "different";
|
|
23095
23098
|
}
|
|
23096
23099
|
applyProfile(profile, appliedAt) {
|
|
23097
23100
|
const parsedProfile = parseStyleProfile(profile);
|
|
@@ -24590,7 +24593,7 @@ function commandPlatformLive(io, cleanupFailure) {
|
|
|
24590
24593
|
applyProfile: (...args2) => attempt(() => store.applyProfile(...args2)),
|
|
24591
24594
|
handoffPreparation: (...args2) => attempt(() => store.handoffPreparation(...args2)),
|
|
24592
24595
|
recordPreparedHandoff: (...args2) => attempt(() => store.recordPreparedHandoff(...args2)).pipe(exports_Effect.mapError((failure) => failure.cause instanceof AgenticMessagingV1ContractError ? translatedFailure((error) => translateAgenticContractError(error, "Private handoff"), failure.cause) : failure)),
|
|
24593
|
-
recordHandoffReceipt: (...args2) => attempt(() => store.recordHandoffReceipt(...args2)).pipe(exports_Effect.mapError((failure) => failure.cause instanceof AgenticMessagingV1ContractError ? translatedFailure((error) => translateAgenticContractError(error, "Private
|
|
24596
|
+
recordHandoffReceipt: (...args2) => attempt(() => store.recordHandoffReceipt(...args2)).pipe(exports_Effect.mapError((failure) => failure.cause instanceof AgenticMessagingV1ContractError ? translatedFailure((error) => translateAgenticContractError(error, "Private Ghostget receipt file"), failure.cause) : failure)),
|
|
24594
24597
|
studyPacketReceiptStatus: (...args2) => attempt(() => store.studyPacketReceiptStatus(...args2)),
|
|
24595
24598
|
preparedHandoffReceiptStatus: (...args2) => attempt(() => store.preparedHandoffReceiptStatus(...args2)),
|
|
24596
24599
|
handoffAudit: (...args2) => attempt(() => store.handoffAudit(...args2)),
|
|
@@ -24664,10 +24667,14 @@ var VALUE_OPTIONS = new Set([
|
|
|
24664
24667
|
"subject",
|
|
24665
24668
|
"target",
|
|
24666
24669
|
"draft",
|
|
24667
|
-
"
|
|
24668
|
-
"
|
|
24670
|
+
"ghostget-context",
|
|
24671
|
+
"ghostget-receipt"
|
|
24669
24672
|
]);
|
|
24670
24673
|
var FLAG_OPTIONS = new Set(["force", "help", "json", "private", "version"]);
|
|
24674
|
+
var LEGACY_OPTION_ALIASES = new Map([
|
|
24675
|
+
["wrench-context", "ghostget-context"],
|
|
24676
|
+
["wrench-receipt", "ghostget-receipt"]
|
|
24677
|
+
]);
|
|
24671
24678
|
function parseArguments(argv) {
|
|
24672
24679
|
const positionals = [];
|
|
24673
24680
|
const options = new Map;
|
|
@@ -24686,7 +24693,8 @@ function parseArguments(argv) {
|
|
|
24686
24693
|
continue;
|
|
24687
24694
|
}
|
|
24688
24695
|
const separator = argument.indexOf("=");
|
|
24689
|
-
const
|
|
24696
|
+
const suppliedKey = argument.slice(2, separator < 0 ? undefined : separator);
|
|
24697
|
+
const key = LEGACY_OPTION_ALIASES.get(suppliedKey) ?? suppliedKey;
|
|
24690
24698
|
if (key.length === 0)
|
|
24691
24699
|
throw new CliError("usage", "Empty option name");
|
|
24692
24700
|
if (VALUE_OPTIONS.has(key)) {
|
|
@@ -24742,7 +24750,7 @@ function rejectUnused(parsed, allowedOptions, allowedFlags) {
|
|
|
24742
24750
|
import { isAbsolute as isAbsolute6, resolve as resolve8 } from "path";
|
|
24743
24751
|
|
|
24744
24752
|
// src/version.ts
|
|
24745
|
-
var MESSAGE_LIKE_ME_VERSION = "0.8.
|
|
24753
|
+
var MESSAGE_LIKE_ME_VERSION = "0.8.8";
|
|
24746
24754
|
|
|
24747
24755
|
// src/command-input.ts
|
|
24748
24756
|
var HELP = `Message Like Me ${MESSAGE_LIKE_ME_VERSION}
|
|
@@ -24778,9 +24786,9 @@ Usage:
|
|
|
24778
24786
|
messagelikeme [--data-dir PATH] profile export CONTACT_ID --output FILE [--json]
|
|
24779
24787
|
messagelikeme [--data-dir PATH] context CONTACT_ID [--json]
|
|
24780
24788
|
messagelikeme [--data-dir PATH] handoff prepare CONTACT_ID --request FILE
|
|
24781
|
-
--
|
|
24789
|
+
--ghostget-context FILE --draft FILE --output FILE [--json]
|
|
24782
24790
|
messagelikeme [--data-dir PATH] handoff verify FILE [--json]
|
|
24783
|
-
messagelikeme [--data-dir PATH] handoff record HANDOFF_ID --
|
|
24791
|
+
messagelikeme [--data-dir PATH] handoff record HANDOFF_ID --ghostget-receipt FILE [--json]
|
|
24784
24792
|
messagelikeme [--data-dir PATH] handoffs show HANDOFF_ID [--json]
|
|
24785
24793
|
messagelikeme skill path [--json]
|
|
24786
24794
|
messagelikeme skill install [--target codex|claude|agents] [--scope user|project]
|
|
@@ -27309,28 +27317,28 @@ function commandProgram(argv) {
|
|
|
27309
27317
|
rejectUnused(parsed, [
|
|
27310
27318
|
"data-dir",
|
|
27311
27319
|
"request",
|
|
27312
|
-
"
|
|
27320
|
+
"ghostget-context",
|
|
27313
27321
|
"draft",
|
|
27314
27322
|
"output"
|
|
27315
27323
|
], ["json"]);
|
|
27316
27324
|
const requestPath = absolutePrivatePath(parsed.options.get("request"), "--request");
|
|
27317
|
-
const
|
|
27325
|
+
const ghostgetContextPath = absolutePrivatePath(parsed.options.get("ghostget-context"), "--ghostget-context");
|
|
27318
27326
|
const draftPath = absolutePrivatePath(parsed.options.get("draft"), "--draft");
|
|
27319
27327
|
const output = absolutePrivatePath(parsed.options.get("output"), "--output");
|
|
27320
|
-
if (new Set([requestPath,
|
|
27321
|
-
return yield* exports_Effect.fail(commandFailure(new CliError("usage", "Handoff request,
|
|
27328
|
+
if (new Set([requestPath, ghostgetContextPath, draftPath, output]).size !== 4) {
|
|
27329
|
+
return yield* exports_Effect.fail(commandFailure(new CliError("usage", "Handoff request, Ghostget context, draft, and output paths must be different")));
|
|
27322
27330
|
}
|
|
27323
27331
|
const request2 = yield* platform2.readPrivateJson(requestPath, "Private handoff request file", AGENTIC_MESSAGING_V1_LIMITS.privateJsonBytes).pipe(exports_Effect.flatMap((value) => exports_Effect.try({ try: () => parseAgentMessageHandoffRequestV1(value), catch: commandFailure })), exports_Effect.mapError((failure) => agenticContractFailure(failure.cause, "Private handoff input")));
|
|
27324
|
-
const
|
|
27332
|
+
const ghostgetContext = yield* platform2.readPrivateJson(ghostgetContextPath, "Private Ghostget context file", AGENTIC_MESSAGING_V1_LIMITS.privateJsonBytes).pipe(exports_Effect.flatMap((value) => exports_Effect.try({ try: () => parseGhostgetMessagingContextBindingV1(value), catch: commandFailure })), exports_Effect.mapError((failure) => agenticContractFailure(failure.cause, "Private handoff input")));
|
|
27325
27333
|
const draft = yield* platform2.readPrivateJson(draftPath, "Private draft file", AGENTIC_MESSAGING_V1_LIMITS.privateJsonBytes).pipe(exports_Effect.flatMap((value) => exports_Effect.try({ try: () => parseAgentMessageDraftV1(value), catch: commandFailure })), exports_Effect.mapError((failure) => agenticContractFailure(failure.cause, "Private handoff input")));
|
|
27326
27334
|
const createdAt = yield* platform2.now;
|
|
27327
|
-
if (
|
|
27328
|
-
return yield* exports_Effect.fail(commandFailure(new CliError("conflict", "The private
|
|
27335
|
+
if (ghostgetContext.validatedAt > createdAt || ghostgetContext.expiresAt <= createdAt) {
|
|
27336
|
+
return yield* exports_Effect.fail(commandFailure(new CliError("conflict", "The private Ghostget context is not current; collect a fresh exact context")));
|
|
27329
27337
|
}
|
|
27330
27338
|
const context5 = yield* platform2.existingSession(parsed.options.get("data-dir"));
|
|
27331
27339
|
yield* exports_Effect.gen(function* () {
|
|
27332
27340
|
const preparation = yield* context5.store.handoffPreparation(identifier5, request2.routeCandidateId);
|
|
27333
|
-
const expiresAt = handoffExpiry(createdAt,
|
|
27341
|
+
const expiresAt = handoffExpiry(createdAt, ghostgetContext.expiresAt, AGENTIC_MESSAGING_V1_LIMITS.handoffLifetimeMilliseconds);
|
|
27334
27342
|
const handoff = yield* exports_Effect.try({ try: () => createAgentMessageHandoffV1({
|
|
27335
27343
|
createdAt,
|
|
27336
27344
|
expiresAt,
|
|
@@ -27346,7 +27354,7 @@ function commandProgram(argv) {
|
|
|
27346
27354
|
profileState: preparation.profileState,
|
|
27347
27355
|
profileEvidenceRevision: preparation.profileEvidenceRevision
|
|
27348
27356
|
},
|
|
27349
|
-
|
|
27357
|
+
ghostgetContext,
|
|
27350
27358
|
draft
|
|
27351
27359
|
}), catch: commandFailure });
|
|
27352
27360
|
const audit = yield* artifacts.publishWithReceipt(output, prettyJson(handoff), context5.store.recordPreparedHandoff(handoff), context5.store.preparedHandoffReceiptStatus(handoff));
|
|
@@ -27375,7 +27383,7 @@ function commandProgram(argv) {
|
|
|
27375
27383
|
contextRefSha256: handoff.wrench.contextRefSha256,
|
|
27376
27384
|
exactDataRevisionSha256: handoff.wrench.exactDataRevision,
|
|
27377
27385
|
latestMessageRevisionSha256: handoff.wrench.latestMessageRevision,
|
|
27378
|
-
turnDigest:
|
|
27386
|
+
turnDigest: ghostgetMessagingTurnDigestV1(handoff),
|
|
27379
27387
|
partCount: handoff.turn.bubbles.length,
|
|
27380
27388
|
createdAt: handoff.createdAt,
|
|
27381
27389
|
expiresAt: handoff.expiresAt,
|
|
@@ -27385,12 +27393,12 @@ function commandProgram(argv) {
|
|
|
27385
27393
|
return;
|
|
27386
27394
|
}
|
|
27387
27395
|
if (command === "handoff" && subcommand === "record" && identifier5 !== undefined) {
|
|
27388
|
-
rejectUnused(parsed, ["data-dir", "
|
|
27389
|
-
const receiptPath = absolutePrivatePath(parsed.options.get("
|
|
27390
|
-
const receipt = yield* platform2.readPrivateJson(receiptPath, "Private
|
|
27396
|
+
rejectUnused(parsed, ["data-dir", "ghostget-receipt"], ["json"]);
|
|
27397
|
+
const receiptPath = absolutePrivatePath(parsed.options.get("ghostget-receipt"), "--ghostget-receipt");
|
|
27398
|
+
const receipt = yield* platform2.readPrivateJson(receiptPath, "Private Ghostget receipt file", AGENTIC_MESSAGING_V1_LIMITS.privateJsonBytes).pipe(exports_Effect.mapError((failure) => agenticContractFailure(failure.cause, "Private Ghostget receipt file")));
|
|
27391
27399
|
const context5 = yield* platform2.existingSession(parsed.options.get("data-dir"));
|
|
27392
|
-
const audit = yield* context5.store.recordHandoffReceipt(identifier5, receipt).pipe(exports_Effect.mapError((failure) => failure.cause instanceof AgenticMessagingV1ContractError ? agenticContractFailure(failure.cause, "Private
|
|
27393
|
-
yield* platform2.emit(json, audit, `Recorded body-free
|
|
27400
|
+
const audit = yield* context5.store.recordHandoffReceipt(identifier5, receipt).pipe(exports_Effect.mapError((failure) => failure.cause instanceof AgenticMessagingV1ContractError ? agenticContractFailure(failure.cause, "Private Ghostget receipt file") : failure));
|
|
27401
|
+
yield* platform2.emit(json, audit, `Recorded body-free Ghostget audit for ${audit.handoffId}`);
|
|
27394
27402
|
return;
|
|
27395
27403
|
}
|
|
27396
27404
|
if (command === "handoffs" && subcommand === "show" && identifier5 !== undefined) {
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Beeper users can bring a bounded provider observation into Message Like Me's
|
|
4
4
|
private local evidence layer without giving Message Like Me a provider
|
|
5
|
-
credential or send access.
|
|
5
|
+
credential or send access. Ghostget writes a finished
|
|
6
6
|
`message-like-me.local-message-bundle`; `messagelikeme ingest bundle` verifies
|
|
7
|
-
and normalizes that directory. The importer never starts or calls
|
|
7
|
+
and normalizes that directory. The importer never starts or calls Ghostget, never
|
|
8
8
|
invokes a Beeper operation, and never sends. Like every Message Like Me ingest
|
|
9
9
|
path, it is read-only with respect to its source.
|
|
10
10
|
|
|
11
11
|
The currently verified producer is the local Beeper export in the
|
|
12
|
-
[`@hraness/
|
|
13
|
-
|
|
12
|
+
[`@hraness/ghostget@0.17.1`](https://github.com/hraness/ghostget/releases/download/v0.17.1/hraness-ghostget-0.17.1.tgz)
|
|
13
|
+
canonical GitHub Release archive:
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
bun add --global
|
|
17
|
-
|
|
16
|
+
bun add --global https://github.com/hraness/ghostget/releases/download/v0.17.1/hraness-ghostget-0.17.1.tgz
|
|
17
|
+
ghostget adapter sync-bundled --json
|
|
18
|
+
ghostget beeper export-message-like-me \
|
|
18
19
|
--auth <beeper-auth-id> \
|
|
19
20
|
--output <normalized-absolute-new-directory> \
|
|
20
21
|
[--limit-chats <n>] \
|
|
@@ -32,11 +33,11 @@ express.
|
|
|
32
33
|
## Compatibility coordinates
|
|
33
34
|
|
|
34
35
|
Message Like Me accepts schema version `1` with source ID `beeper-local` and
|
|
35
|
-
source-transform version `1.1.0`.
|
|
36
|
+
source-transform version `1.1.0`. Ghostget v0.17.1 emits those coordinates through
|
|
36
37
|
adapter `beeper-local@2.4.0`. That adapter has 32 reviewed Beeper operations:
|
|
37
38
|
26 through one pinned Beeper CLI 0.6.2 executable, including supported actions
|
|
38
39
|
and writes, plus six fixed Desktop loopback reads. The Message Like Me bundle is
|
|
39
|
-
made by
|
|
40
|
+
made by Ghostget's separate internal bounded export, not by a Message Like Me
|
|
40
41
|
provider operation. It fixes the raw export arguments, excludes attachments,
|
|
41
42
|
and preserves incomplete-coverage evidence. It does not claim a complete
|
|
42
43
|
Beeper history.
|
|
@@ -44,7 +45,7 @@ Beeper history.
|
|
|
44
45
|
The pinned Beeper CLI executable reports version `0.6.2`; that executable is
|
|
45
46
|
the runtime authority. At the upstream source tag,
|
|
46
47
|
`packages/cli/package.json` declares `0.6.1`; that source-package value is
|
|
47
|
-
provenance only and never overrides executable runtime identity. A later
|
|
48
|
+
provenance only and never overrides executable runtime identity. A later Ghostget
|
|
48
49
|
package release remains compatible only while its manifest still declares the
|
|
49
50
|
same bundle schema, source ID, and `source.version: "1.1.0"`. Package age,
|
|
50
51
|
adapter version, or a permissive package range never overrides those manifest
|
|
@@ -52,7 +53,7 @@ coordinates. The provider version records the pinned Beeper CLI used for
|
|
|
52
53
|
capture and may change without changing the bundle contract.
|
|
53
54
|
|
|
54
55
|
Message Like Me owns zero Beeper operations, credentials, or live sessions. It
|
|
55
|
-
does not start or call
|
|
56
|
+
does not start or call Ghostget, call the provider, or support sending. Its
|
|
56
57
|
authority begins at strict verification of the already finished private
|
|
57
58
|
directory.
|
|
58
59
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
# Local message bundle v2
|
|
2
2
|
|
|
3
3
|
Local message bundle v2 is the native WhatsApp evidence boundary between a
|
|
4
|
-
|
|
4
|
+
Ghostget-owned Wacli adapter and Message Like Me. Ghostget owns Wacli discovery,
|
|
5
5
|
authentication, local synchronization, provider interpretation, and export.
|
|
6
6
|
Message Like Me reads only the finished caller-owned directory. It never starts
|
|
7
|
-
|
|
7
|
+
Ghostget or Wacli, receives a WhatsApp credential or session database, accesses a
|
|
8
8
|
network, or sends a message.
|
|
9
9
|
|
|
10
10
|
The intended producer flow is:
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
bun add --global
|
|
14
|
-
|
|
13
|
+
bun add --global https://github.com/hraness/ghostget/releases/download/v0.17.1/hraness-ghostget-0.17.1.tgz
|
|
14
|
+
ghostget adapter sync-bundled --json
|
|
15
|
+
ghostget whatsapp export-message-like-me \
|
|
15
16
|
--auth <whatsapp-auth-id> \
|
|
16
17
|
--output /absolute/private/path/whatsapp-bundle
|
|
17
18
|
|
|
@@ -20,8 +21,8 @@ messagelikeme ingest bundle \
|
|
|
20
21
|
--json
|
|
21
22
|
```
|
|
22
23
|
|
|
23
|
-
The checked compatibility coordinates are
|
|
24
|
-
v0.15.0.
|
|
24
|
+
The checked compatibility coordinates are Ghostget v0.17.1 and official Wacli
|
|
25
|
+
v0.15.0. Ghostget owns that executable dependency and its authentication state;
|
|
25
26
|
neither enters Message Like Me.
|
|
26
27
|
|
|
27
28
|
That exact producer excludes every reaction-shaped Wacli row. Wacli v0.15.0
|
|
@@ -89,7 +90,7 @@ byte disagreement, and SHA-256 disagreement. The same public bounds as v1
|
|
|
89
90
|
apply, except v2 admits exactly one account.
|
|
90
91
|
|
|
91
92
|
The v2 wire contract retains the fixed `reactions.ndjson` artifact and strict
|
|
92
|
-
reaction parser for proven records. The checked
|
|
93
|
+
reaction parser for proven records. The checked Ghostget v0.17.1/Wacli v0.15.0
|
|
93
94
|
producer leaves that artifact empty because it cannot prove current reaction
|
|
94
95
|
state.
|
|
95
96
|
|
|
@@ -162,7 +163,7 @@ duplicates cannot prove equivalence.
|
|
|
162
163
|
|
|
163
164
|
Both source provenances and all source-unique history remain stored. Proven
|
|
164
165
|
message duplicates contribute once. A reaction can deduplicate only when a
|
|
165
|
-
conforming producer supplies a proven reaction record;
|
|
166
|
+
conforming producer supplies a proven reaction record; Ghostget v0.17.1 supplies
|
|
166
167
|
none, so this overlap path does not reconcile reaction state. The native Wacli
|
|
167
168
|
conversation is the preferred action route and carries the exact private
|
|
168
169
|
`whatsappJid` coordinate. Its proven Beeper duplicate remains evidence with
|
|
@@ -177,6 +178,6 @@ handles, account coordinates, message bodies, and source metadata stay in the
|
|
|
177
178
|
private store or explicit owner-only artifacts.
|
|
178
179
|
|
|
179
180
|
Message Like Me may write an exact `whatsappJid` route into an explicit
|
|
180
|
-
mode-`0600` route inventory. That coordinate is evidence for a separate
|
|
181
|
+
mode-`0600` route inventory. That coordinate is evidence for a separate Ghostget
|
|
181
182
|
binding and preview. Message Like Me does not authenticate, synchronize,
|
|
182
183
|
preview, submit, or send through WhatsApp.
|
package/docs/methodology.md
CHANGED
|
@@ -17,7 +17,7 @@ A caller-owned local message bundle is a separate versioned source
|
|
|
17
17
|
observation. The CLI verifies its complete fixed inventory and digests before
|
|
18
18
|
ingest, never obtains its provider credential, and does not call its producer.
|
|
19
19
|
Frozen v1 carries bounded Beeper observations. V2 carries one native WhatsApp
|
|
20
|
-
account exported through
|
|
20
|
+
account exported through Ghostget's official Wacli adapter. It requires exact
|
|
21
21
|
WhatsApp JIDs and projects a phone handle only from an E.164-backed user JID.
|
|
22
22
|
|
|
23
23
|
A caller-owned X data archive is another offline source observation. The CLI
|