@ddd-qc/cell-proxy 0.32.7 → 0.32.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CellProxy.d.ts","sourceRoot":"","sources":["../src/CellProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,eAAe,EACf,SAAS,EAET,QAAQ,EACR,MAAM,EACP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAY,KAAK,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAEL,OAAO,EAAE,QAAQ,EAKjB,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAC,YAAY,EAAS,MAAM,SAAS,CAAC;AAS7C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;;;;;AAQvC,qBAAa,SAAU,SAAQ,cAAgB;IAI3C,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,QAAQ,EAC3B,IAAI,EAAE,IAAI,EAEV,cAAc,CAAC,EAAE,MAAM;IAczB,cAAc,EAAE,MAAM,C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gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAmCtI,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkC9H,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAkClE,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAqBnD,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IA2BvD,YAAY,CAAC,QAAQ,CAAC,EAAE,QAAQ;CA0FjC"}
package/dist/CellProxy.js CHANGED
@@ -268,6 +268,7 @@ export class CellProxy extends CellMixin(Empty) {
268
268
  }
269
269
  dumpCallLogs(zomeName) {
270
270
  let result = [];
271
+ let call_map = new Map();
271
272
  for (const response of this._responseLog) {
272
273
  const requestLog = this._requestLog[response.requestIndex];
273
274
  if (!requestLog || (zomeName && requestLog.request.zome_name != zomeName)) {
@@ -275,7 +276,8 @@ export class CellProxy extends CellMixin(Empty) {
275
276
  }
276
277
  const startTime = prettyDate(new Date(requestLog.requestTimestamp));
277
278
  const waitTime = prettyDuration(new Date(requestLog.executionTimestamp - requestLog.requestTimestamp));
278
- const duration = prettyDuration(new Date(response.timestamp - requestLog.requestTimestamp));
279
+ const duration_ts = response.timestamp - requestLog.requestTimestamp;
280
+ const duration = prettyDuration(new Date(duration_ts));
279
281
  let input = requestLog.request.payload;
280
282
  if (requestLog.request.payload instanceof Uint8Array) {
281
283
  input = intoAnyId(requestLog.request.payload).print();
@@ -285,12 +287,26 @@ export class CellProxy extends CellMixin(Empty) {
285
287
  ? { startTime, fnName: requestLog.request.fn_name, input, output, duration, waitTime }
286
288
  : { startTime, zomeName: requestLog.request.zome_name, fnName: requestLog.request.fn_name, input, output, duration, waitTime };
287
289
  result.push(log);
290
+ let maybe_value = call_map.get(requestLog.request.fn_name);
291
+ if (!maybe_value) {
292
+ call_map.set(requestLog.request.fn_name, [1, duration_ts]);
293
+ }
294
+ else {
295
+ call_map.set(requestLog.request.fn_name, [maybe_value[0] + 1, maybe_value[1] + duration_ts]);
296
+ }
288
297
  }
289
- console.warn(`Dumping logs for cell "${this._appProxy.getLocations(this.cell.address)}"`);
298
+ console.warn(`Dumping call logs for cell "${this._appProxy.getLocations(this.cell.address)}"`);
290
299
  if (zomeName) {
291
300
  console.warn(` - For zome "${zomeName}"`);
292
301
  }
293
302
  console.table(result);
303
+ let summary = [];
304
+ for (const [fn_name, values] of call_map) {
305
+ const log = { fnName: fn_name, count: values[0], avgDuration: prettyDuration(new Date(values[1] / values[0])) };
306
+ summary.push(log);
307
+ }
308
+ summary.sort((a, b) => b.count - a.count);
309
+ console.table(summary);
294
310
  const zomeSignals = this._appProxy.signalLogs.filter((log) => log.type == AppSignalType.Zome);
295
311
  const sysSignals = zomeSignals.filter((log) => {
296
312
  const type = Object.keys(log.zomeSignal.pulses[0])[0];
@@ -1 +1 @@
1
- {"version":3,"file":"CellProxy.js","sourceRoot":"","sources":["../src/CellProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAOG,UAAU,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AAE1C,OAAO,EAIL,aAAa,EAId,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAM/C,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACpD,OAAO,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F","sourcesContent":["import {\n AppSignal,\n SignalCb,\n CallZomeRequest,\n CapSecret,\n Timestamp,\n ZomeName,\n Signal, SignalType,\n} from \"@holochain/client\";\nimport {CellMixin, Empty} from \"./mixins\";\nimport {Cell} from \"./cell\";\nimport {\n CellIdStr,\n DnaInfo, EntryDef,\n EntryDefsCallbackResult,\n AppSignalType,\n SystemPulse,\n\n ZomeInfo\n} from \"./types\";\nimport {Mutex, withTimeout} from \"async-mutex\";\nimport MutexInterface from \"async-mutex/lib/MutexInterface\";\nimport {\n AppProxy,\n SignalUnsubscriber,\n} from \"./AppProxy\";\nimport {prettyDate, prettyDuration} from \"./pretty\";\nimport {anyToB64, intoAnyId} from \"./hash\";\nimport {MyDictionary, sha256} from \"./utils\";\nimport {TimeMap} from \"./time-map\";\nimport {\n SystemAttestationVariantPostCommitEntry,\n SystemAttestationVariantSelfCallEnd,\n SystemAttestationVariantSelfCallStart\n} from \"./zomeSignals.types\";\n\n\nexport interface RequestLog {\n request: CallZomeRequest,\n timeout: number,\n requestTimestamp: number,\n executionTimestamp: number,\n}\n\nexport interface ResponseLog {\n success?: unknown,\n failure?: unknown,\n throttled?: boolean,\n timestamp: number,\n requestIndex: number;\n}\n\n\nexport type Cb = () => Promise<unknown>\n\n/**\n * Proxy for a running DNA.\n * It logs and queues ZomeCalls.\n * It holds a reference to its AppProxy and its Cell.\n * This class is expected to be used by ZomeProxies.\n */\nexport class CellProxy extends CellMixin(Empty) {\n\n /** Ctor */\n constructor(\n private _appProxy: AppProxy,\n cell: Cell,\n //public readonly dnaDef: MyDnaDef,\n defaultTimeout?: number,\n ) {\n super();\n this._cell = cell;\n console.log(`CellProxy.ctor`, cell);\n this.defaultTimeout = defaultTimeout ? defaultTimeout : 10 * 1000;\n this._callMutex = withTimeout(new Mutex(), this.defaultTimeout);\n\n ///*const _unsub =*/ this.addSignalHandler((sig) => this.blockSelfCall(sig));\n /*const _unsub =*/ this.addSignalHandler((sig) => this.blockUntilPostCommit(sig));\n }\n\n /** -- Fields -- */\n\n defaultTimeout: number;\n protected _callMutex: MutexInterface;\n\n /** append only logs */\n private _requestLog: RequestLog[] = []\n private _responseLog: ResponseLog[] = []\n\n /** Throttle: Don't allow exact same call within 100ms */\n private _reqThrottle = new TimeMap(100, 10);\n private _canThrottle: boolean = true;\n setCanThrottle(can: boolean) {this._canThrottle = can};\n\n /** Cache */\n private _entryDefCache?: MyDictionary<EntryDef>;\n private _zomeInfoCache?: ZomeInfo;\n private _dnaInfoCache?: DnaInfo;\n\n\n /** -- Methods -- */\n\n /** Have a PostCommitEntry attestation release the Mutex */\n private _postCommitRelease?: MutexInterface.Releaser;\n private _postCommitReleaseEntryType?: string;\n protected async blockUntilPostCommit(signal: Signal) {\n if (SignalType.App != signal.type) {\n return;\n }\n const appSignal: AppSignal = signal.value;\n const zomeSignal = this._appProxy.intoZomeSignal(appSignal);\n if (!zomeSignal || zomeSignal.pulses.length == 0) {\n return;\n }\n console.debug(\"blockUntilPostCommit()\", zomeSignal, this._postCommitReleaseEntryType, !!this._postCommitRelease);\n const signalType = Object.keys(zomeSignal.pulses[0]!)[0];\n if (signalType != \"System\" || !this._postCommitRelease || !this._postCommitReleaseEntryType) {\n return;\n }\n for (const pulse of zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if (sys.type !== \"PostCommitEntry\") {\n continue;\n }\n const pce = sys as SystemAttestationVariantPostCommitEntry;\n if (!pce.succeeded) {\n console.error(\"PostCommit attestations failed\");\n this.dumpCallLogs(appSignal.zome_name);\n this.dumpSignalLogs(appSignal.zome_name);\n }\n if (pce.app_entry_type !== this._postCommitReleaseEntryType) {\n continue;\n }\n /** Release */\n console.debug(\"blockUntilPostCommit() postCommit Lock RELEASE\");\n this._postCommitRelease();\n delete this._postCommitRelease;\n delete this._postCommitReleaseEntryType;\n break;\n }\n }\n\n\n /** Have a self call acquire & the call Mutex */\n private _selfCallRelease?: MutexInterface.Releaser;\n protected async blockSelfCall(signal: AppSignal) {\n const zomeSignal = this._appProxy.intoZomeSignal(signal);\n if (!zomeSignal || zomeSignal.pulses.length == 0 || Object.keys(zomeSignal.pulses[0]!)[0] != 'System') {\n return;\n }\n for (const pulse of zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if (sys.type == \"SelfCallStart\") {\n console.log(\"\")\n /** Acquire lock */\n try {\n this._callMutex.acquire().then((r) => this._selfCallRelease = r)\n } catch (e) {\n console.error(\"A Zome self call is initialted during a writing zome call\", e);\n }\n }\n if (sys.type == \"SelfCallEnd\" && this._selfCallRelease) {\n /** Release */\n this._selfCallRelease();\n delete this._selfCallRelease;\n const end = sys as SystemAttestationVariantSelfCallEnd;\n if (!end.succeeded) {\n console.error(\"Call to self failed.\")\n this.dumpCallLogs(end.zome_name);\n this.dumpSignalLogs(end.zome_name);\n }\n }\n }\n }\n\n\n /** */\n purgeLogs() {\n this._responseLog = [];\n this._requestLog = [];\n this._appProxy.purgeLogs();\n }\n\n /** */\n addSignalHandler(handler: SignalCb): SignalUnsubscriber {\n return this._appProxy.addSignalHandler(handler, this.cell.hcl().toString());\n }\n\n\n /** */\n dumpSignalLogs(zomeName?: ZomeName, canAppSignals?: boolean) {\n this._appProxy.dumpSignalLogs(canAppSignals? canAppSignals : true, this.cell.address, zomeName);\n }\n\n\n /** */\n get signalLogs() {\n return this._appProxy.signalLogs.filter((log) => log.cellAddr.equals(this.cell.address));\n }\n\n\n /** Pass call request to conductor proxy and log it */\n private async executeZomeCall(reqLog: RequestLog): Promise<ResponseLog> {\n //console.log(\"executeZomeCall()\", reqLog.request.zome_name, reqLog.request.fn_name);\n reqLog.executionTimestamp = Date.now();\n const requestIndex = this._requestLog.length;\n /** Throttle */\n if (this._canThrottle) {\n const reqHash = await sha256(JSON.stringify(reqLog.request));\n if (this._reqThrottle.has(reqHash)) {\n console.warn(`THROTTLING ${reqLog.request.zome_name}::${reqLog.request.fn_name}()`, reqLog.executionTimestamp);\n return {\n requestIndex,\n timestamp: reqLog.executionTimestamp,\n failure: \"Throttled: \" + reqLog.request.fn_name + \"()\",\n throttled: true\n };\n }\n this._reqThrottle.add(reqHash);\n }\n /** */\n this._requestLog.push(reqLog);\n try {\n const response = await this._appProxy.callZome(reqLog.request, reqLog.timeout);\n const respLog = { requestIndex, success: response, timestamp: Date.now() };\n this._responseLog.push(respLog);\n return respLog;\n } catch (e) {\n const respLog = { requestIndex, failure: e, timestamp: Date.now() }\n this._responseLog.push(respLog);\n return respLog;\n }\n }\n\n\n /** Pass call request to conductor proxy and log it */\n logCallTimedout(reqLog: RequestLog): ResponseLog {\n reqLog.executionTimestamp = Date.now();\n const requestIndex = this._requestLog.length;\n this._requestLog.push(reqLog);\n const respLog = { requestIndex, failure: \"Waiting for Mutex timed-out\", timestamp: Date.now() }\n this._responseLog.push(respLog);\n return respLog;\n }\n\n\n /**\n * callZome() with Mutex (for calls that writes to source-chain)\n * TODO: Implement call queue instead of mutex?\n */\n async callZomeBlockPostCommit(entryType: string, zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n /** Acquire lock */\n console.debug(\"postCommit Lock in progress...\");\n try {\n this._postCommitRelease = await this._callMutex.acquire();\n this._postCommitReleaseEntryType = entryType;\n } catch(e) {\n console.warn(\"Waiting for callZomeBlockPostCommit mutex timed-out\", e);\n this.logCallTimedout(log)\n return Promise.reject(\"Waiting for callZomeBlockPostCommit mutex timed-out\");\n }\n console.debug(\"postCommit Lock ACQUIRED\");\n /** Execute */\n const respLog = await this.executeZomeCall(log);\n return respLog.success;\n }\n\n\n /**\n * callZome() with Mutex (for calls that writes to source-chain)\n * TODO: Implement call queue instead of mutex?\n */\n async callZomeBlocking(zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n\n /** Acquire lock */\n let release;\n try {\n release = await this._callMutex.acquire();\n } catch(e) {\n console.warn(\"Waiting for callZomeBlocking mutex timed-out\", e);\n this.logCallTimedout(log)\n return Promise.reject(\"Waiting for callZomeBlocking mutex timed-out\");\n }\n /** Execute */\n const respLog = await this.executeZomeCall(log);\n /** Release */\n release();\n if (respLog.failure) {\n if (!respLog.throttled) {\n this.dumpCallLogs(zome_name);\n this.dumpSignalLogs(zome_name);\n }\n return Promise.reject(respLog);\n }\n return respLog.success;\n }\n\n\n /** On success returns the data returned by the zome function */\n async callZome(zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n /** Wait for lock */\n try {\n await this._callMutex.waitForUnlock();\n } catch(e) {\n console.warn(\"Waiting for callZome mutex timed-out\", e);\n this.logCallTimedout(log);\n return Promise.reject(\"Waiting for callZome mutex timed-out\");\n }\n /** Execute & return response */\n const respLog = await this.executeZomeCall(log);\n if (respLog.failure) {\n if (!respLog.throttled) {\n this.dumpCallLogs(zome_name);\n this.dumpSignalLogs(zome_name);\n }\n return Promise.reject(respLog);\n }\n return respLog.success;\n }\n\n\n /**\n * Calls the `entry_defs()` zome function and\n * Returns an array of all the zome's AppEntryNames and Visibility, i.e. (AppEntryName, isPublic)[]\n */\n async callEntryDefs(zomeName: ZomeName): Promise<MyDictionary<EntryDef>> {\n console.log(\"callEntryDefs()\", zomeName)\n /** Return cache if any */\n if (this._entryDefCache) {\n return this._entryDefCache;\n }\n /** Call zome */\n let entryDefs;\n try {\n /* Need big timeout since holochain is slow when receiving simultaneous calls from multiple happs */\n entryDefs = await this.callZome(zomeName, \"entry_defs\", null, null, 60 * 1000) as EntryDefsCallbackResult;\n } catch (e) {\n console.error(`Calling \"entry_defs()\" failed on zome \"${zomeName}\". Possibly because zome does not have any entry types defined.`);\n return Promise.reject(e);\n }\n console.debug(\"getEntryDefs() for \" + zomeName + \" result:\")\n console.debug({entryDefs});\n /** Map result */\n let result: MyDictionary<EntryDef> = {}\n for (const def of entryDefs.Defs) {\n let name = Object.keys(def.id)[0];\n if (\"App\" in def.id) {\n name = def.id.App;\n }\n result[name!] = def;\n }\n //console.log({result})\n this._entryDefCache = result;\n return result;\n }\n\n /**\n * Calls the `zome_info()` zome function\n */\n async callZomeInfo(zomeName: ZomeName): Promise<ZomeInfo> {\n //console.log(\"callZomeInfo()\", zomeName, !!this._zomeInfoCache);\n if (this._zomeInfoCache) {\n return this._zomeInfoCache;\n }\n try {\n const zome_info = await this.callZome(zomeName, \"get_zome_info\", null, null, 10 * 1000) as ZomeInfo;\n //console.debug(\"callZomeInfo() for \" + zomeName + \" result:\")\n //console.log({zome_info})\n this._zomeInfoCache = zome_info;\n return zome_info;\n } catch (e) {\n console.error(\"Calling callZomeInfo() on \" + zomeName + \" failed. Make sure `get_zome_info()` is implemented in your zome code.\")\n return Promise.reject(e);\n }\n }\n\n\n /**\n * Calls the `dna_info()` zome function\n */\n async callDnaInfo(zomeName: ZomeName): Promise<DnaInfo> {\n //console.log(\"callDnaInfo()\", zomeName);\n if (this._dnaInfoCache) {\n return this._dnaInfoCache;\n }\n try {\n const dna_info = await this.callZome(zomeName, \"get_dna_info\", null, null, 10 * 1000) as DnaInfo;\n //console.debug(\"callDnaInfo() for \" + zomeName + \" result:\")\n //console.log({dna_info})\n this._dnaInfoCache = dna_info;\n return dna_info;\n } catch (e) {\n console.error(\"Calling callDnaInfo() on \" + zomeName + \" failed. Make sure `get_dna_info()` is implemented in your zome code.\")\n return Promise.reject(e);\n }\n }\n\n\n // /** TODO once we have getDnaDefinition() api */\n // dumpAllZomes() {\n // // FIXME get DNA DEF\n // for (const zomeName of dnaDef) {\n // this.dumpCallLogs(zomeName)\n // }\n // }\n\n /** */\n dumpCallLogs(zomeName?: ZomeName) {\n let result = [];\n for (const response of this._responseLog) {\n const requestLog = this._requestLog[response.requestIndex];\n if (!requestLog || (zomeName && requestLog.request.zome_name != zomeName)) {\n continue;\n }\n const startTime= prettyDate(new Date(requestLog.requestTimestamp));\n const waitTime = prettyDuration(new Date(requestLog.executionTimestamp - requestLog.requestTimestamp));\n const duration = prettyDuration(new Date(response.timestamp - requestLog.requestTimestamp));\n let input = requestLog.request.payload;\n // if (requestLog.request.payload instanceof HoloHash) {\n // //console.log(\"instanceof HoloHash\", requestLog.request.payload);\n // input = intoAnyId(requestLog.request.payload.toBytes()).print();\n // } else {\n if (requestLog.request.payload instanceof Uint8Array) {\n //console.log(\"instanceof Uint8Array\", requestLog.request.payload);\n input = intoAnyId(requestLog.request.payload).print();\n }\n //}\n //const input = requestLog.request.payload instanceof Uint8Array ? enc64(requestLog.request.payload) : requestLog.request.payload;\n const output = anyToB64(response.failure ? response.failure : response.success);\n const log = zomeName\n ? { startTime, fnName: requestLog.request.fn_name, input, output, duration, waitTime }\n : { startTime, zomeName: requestLog.request.zome_name, fnName: requestLog.request.fn_name, input, output, duration, waitTime }\n result.push(log);\n }\n console.warn(`Dumping logs for cell \"${this._appProxy.getLocations(this.cell.address)}\"`)\n if (zomeName) {\n console.warn(` - For zome \"${zomeName}\"`);\n }\n console.table(result)\n\n /** Parse signal self-call logs */\n //console.log(this._appProxy.signalLogs)\n\n const zomeSignals = this._appProxy.signalLogs.filter((log) => log.type == AppSignalType.Zome);\n const sysSignals = zomeSignals.filter((log) => {\n const type = Object.keys(log.zomeSignal.pulses[0]!)[0];\n type == \"System\"\n });\n\n const startCalls: [Timestamp, CellIdStr, SystemAttestationVariantSelfCallStart][] = [];\n const endCalls: [Timestamp, CellIdStr, SystemAttestationVariantSelfCallEnd][] = [];\n sysSignals.map((log) => {\n for (const pulse of log.zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if(sys.type == \"SelfCallStart\") {\n startCalls.push([log.ts, log.cellAddr.str, (sys as SystemAttestationVariantSelfCallStart)]);\n }\n if(sys.type == \"SelfCallEnd\") {\n endCalls.push([log.ts, log.cellAddr.str, (sys as SystemAttestationVariantSelfCallEnd)]);\n }\n }\n })\n\n let sigResults = [];\n for (const [startTs, startId, startSignal] of startCalls) {\n const index = endCalls.findIndex(([ts, cellId, signal]) => ts >= startTs && startId == cellId && startSignal.fn_name == signal.fn_name)\n if (index == -1) {\n continue;\n }\n const first = endCalls.splice(index, 1)[0]!;\n const [endTs, _cId, endSignal] = first;\n const duration = prettyDuration(new Date(endTs - startTs));\n const log = { startTime: startTs, zomeName: endSignal.zome_name, fnName: endSignal.fn_name, succeeded: endSignal.succeeded, duration }\n sigResults.push(log);\n }\n\n console.table(sigResults)\n }\n\n\n}\n\n"]}
1
+ {"version":3,"file":"CellProxy.js","sourceRoot":"","sources":["../src/CellProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAOG,UAAU,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AAE1C,OAAO,EAIL,aAAa,EAId,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAM/C,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACpD,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAe,MAAM,EAAC,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM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AAG,EAAE,CAAC;QACpB,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,UAAU,EAAE,CAAC;YACzD,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,OAAO,IAAI,OAAO,IAAI,MAAM,IAAI,WAAW,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAA;YACvI,IAAI,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC;gBAChB,SAAS;YACX,CAAC;YACD,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;YAC5C,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;YACvC,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;YAC3D,MAAM,GAAG,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;YACtI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAC3B,CAAC;CAGF","sourcesContent":["import {\n AppSignal,\n SignalCb,\n CallZomeRequest,\n CapSecret,\n Timestamp,\n ZomeName,\n Signal, SignalType,\n} from \"@holochain/client\";\nimport {CellMixin, Empty} from \"./mixins\";\nimport {Cell} from \"./cell\";\nimport {\n CellIdStr,\n DnaInfo, EntryDef,\n EntryDefsCallbackResult,\n AppSignalType,\n SystemPulse,\n\n ZomeInfo\n} from \"./types\";\nimport {Mutex, withTimeout} from \"async-mutex\";\nimport MutexInterface from \"async-mutex/lib/MutexInterface\";\nimport {\n AppProxy,\n SignalUnsubscriber,\n} from \"./AppProxy\";\nimport {prettyDate, prettyDuration} from \"./pretty\";\nimport {anyToB64, intoAnyId} from \"./hash\";\nimport {MyDictionary, sha256} from \"./utils\";\nimport {TimeMap} from \"./time-map\";\nimport {\n SystemAttestationVariantPostCommitEntry,\n SystemAttestationVariantSelfCallEnd,\n SystemAttestationVariantSelfCallStart\n} from \"./zomeSignals.types\";\n\n\nexport interface RequestLog {\n request: CallZomeRequest,\n timeout: number,\n requestTimestamp: number,\n executionTimestamp: number,\n}\n\nexport interface ResponseLog {\n success?: unknown,\n failure?: unknown,\n throttled?: boolean,\n timestamp: number,\n requestIndex: number;\n}\n\n\nexport type Cb = () => Promise<unknown>\n\n/**\n * Proxy for a running DNA.\n * It logs and queues ZomeCalls.\n * It holds a reference to its AppProxy and its Cell.\n * This class is expected to be used by ZomeProxies.\n */\nexport class CellProxy extends CellMixin(Empty) {\n\n /** Ctor */\n constructor(\n private _appProxy: AppProxy,\n cell: Cell,\n //public readonly dnaDef: MyDnaDef,\n defaultTimeout?: number,\n ) {\n super();\n this._cell = cell;\n console.log(`CellProxy.ctor`, cell);\n this.defaultTimeout = defaultTimeout ? defaultTimeout : 10 * 1000;\n this._callMutex = withTimeout(new Mutex(), this.defaultTimeout);\n\n ///*const _unsub =*/ this.addSignalHandler((sig) => this.blockSelfCall(sig));\n /*const _unsub =*/ this.addSignalHandler((sig) => this.blockUntilPostCommit(sig));\n }\n\n /** -- Fields -- */\n\n defaultTimeout: number;\n protected _callMutex: MutexInterface;\n\n /** append only logs */\n private _requestLog: RequestLog[] = []\n private _responseLog: ResponseLog[] = []\n\n /** Throttle: Don't allow exact same call within 100ms */\n private _reqThrottle = new TimeMap(100, 10);\n private _canThrottle: boolean = true;\n setCanThrottle(can: boolean) {this._canThrottle = can};\n\n /** Cache */\n private _entryDefCache?: MyDictionary<EntryDef>;\n private _zomeInfoCache?: ZomeInfo;\n private _dnaInfoCache?: DnaInfo;\n\n\n /** -- Methods -- */\n\n /** Have a PostCommitEntry attestation release the Mutex */\n private _postCommitRelease?: MutexInterface.Releaser;\n private _postCommitReleaseEntryType?: string;\n protected async blockUntilPostCommit(signal: Signal) {\n if (SignalType.App != signal.type) {\n return;\n }\n const appSignal: AppSignal = signal.value;\n const zomeSignal = this._appProxy.intoZomeSignal(appSignal);\n if (!zomeSignal || zomeSignal.pulses.length == 0) {\n return;\n }\n console.debug(\"blockUntilPostCommit()\", zomeSignal, this._postCommitReleaseEntryType, !!this._postCommitRelease);\n const signalType = Object.keys(zomeSignal.pulses[0]!)[0];\n if (signalType != \"System\" || !this._postCommitRelease || !this._postCommitReleaseEntryType) {\n return;\n }\n for (const pulse of zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if (sys.type !== \"PostCommitEntry\") {\n continue;\n }\n const pce = sys as SystemAttestationVariantPostCommitEntry;\n if (!pce.succeeded) {\n console.error(\"PostCommit attestations failed\");\n this.dumpCallLogs(appSignal.zome_name);\n this.dumpSignalLogs(appSignal.zome_name);\n }\n if (pce.app_entry_type !== this._postCommitReleaseEntryType) {\n continue;\n }\n /** Release */\n console.debug(\"blockUntilPostCommit() postCommit Lock RELEASE\");\n this._postCommitRelease();\n delete this._postCommitRelease;\n delete this._postCommitReleaseEntryType;\n break;\n }\n }\n\n\n /** Have a self call acquire & the call Mutex */\n private _selfCallRelease?: MutexInterface.Releaser;\n protected async blockSelfCall(signal: AppSignal) {\n const zomeSignal = this._appProxy.intoZomeSignal(signal);\n if (!zomeSignal || zomeSignal.pulses.length == 0 || Object.keys(zomeSignal.pulses[0]!)[0] != 'System') {\n return;\n }\n for (const pulse of zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if (sys.type == \"SelfCallStart\") {\n console.log(\"\")\n /** Acquire lock */\n try {\n this._callMutex.acquire().then((r) => this._selfCallRelease = r)\n } catch (e) {\n console.error(\"A Zome self call is initialted during a writing zome call\", e);\n }\n }\n if (sys.type == \"SelfCallEnd\" && this._selfCallRelease) {\n /** Release */\n this._selfCallRelease();\n delete this._selfCallRelease;\n const end = sys as SystemAttestationVariantSelfCallEnd;\n if (!end.succeeded) {\n console.error(\"Call to self failed.\")\n this.dumpCallLogs(end.zome_name);\n this.dumpSignalLogs(end.zome_name);\n }\n }\n }\n }\n\n\n /** */\n purgeLogs() {\n this._responseLog = [];\n this._requestLog = [];\n this._appProxy.purgeLogs();\n }\n\n /** */\n addSignalHandler(handler: SignalCb): SignalUnsubscriber {\n return this._appProxy.addSignalHandler(handler, this.cell.hcl().toString());\n }\n\n\n /** */\n dumpSignalLogs(zomeName?: ZomeName, canAppSignals?: boolean) {\n this._appProxy.dumpSignalLogs(canAppSignals? canAppSignals : true, this.cell.address, zomeName);\n }\n\n\n /** */\n get signalLogs() {\n return this._appProxy.signalLogs.filter((log) => log.cellAddr.equals(this.cell.address));\n }\n\n\n /** Pass call request to conductor proxy and log it */\n private async executeZomeCall(reqLog: RequestLog): Promise<ResponseLog> {\n //console.log(\"executeZomeCall()\", reqLog.request.zome_name, reqLog.request.fn_name);\n reqLog.executionTimestamp = Date.now();\n const requestIndex = this._requestLog.length;\n /** Throttle */\n if (this._canThrottle) {\n const reqHash = await sha256(JSON.stringify(reqLog.request));\n if (this._reqThrottle.has(reqHash)) {\n console.warn(`THROTTLING ${reqLog.request.zome_name}::${reqLog.request.fn_name}()`, reqLog.executionTimestamp);\n return {\n requestIndex,\n timestamp: reqLog.executionTimestamp,\n failure: \"Throttled: \" + reqLog.request.fn_name + \"()\",\n throttled: true\n };\n }\n this._reqThrottle.add(reqHash);\n }\n /** */\n this._requestLog.push(reqLog);\n try {\n const response = await this._appProxy.callZome(reqLog.request, reqLog.timeout);\n const respLog = { requestIndex, success: response, timestamp: Date.now() };\n this._responseLog.push(respLog);\n return respLog;\n } catch (e) {\n const respLog = { requestIndex, failure: e, timestamp: Date.now() }\n this._responseLog.push(respLog);\n return respLog;\n }\n }\n\n\n /** Pass call request to conductor proxy and log it */\n logCallTimedout(reqLog: RequestLog): ResponseLog {\n reqLog.executionTimestamp = Date.now();\n const requestIndex = this._requestLog.length;\n this._requestLog.push(reqLog);\n const respLog = { requestIndex, failure: \"Waiting for Mutex timed-out\", timestamp: Date.now() }\n this._responseLog.push(respLog);\n return respLog;\n }\n\n\n /**\n * callZome() with Mutex (for calls that writes to source-chain)\n * TODO: Implement call queue instead of mutex?\n */\n async callZomeBlockPostCommit(entryType: string, zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n /** Acquire lock */\n console.debug(\"postCommit Lock in progress...\");\n try {\n this._postCommitRelease = await this._callMutex.acquire();\n this._postCommitReleaseEntryType = entryType;\n } catch(e) {\n console.warn(\"Waiting for callZomeBlockPostCommit mutex timed-out\", e);\n this.logCallTimedout(log)\n return Promise.reject(\"Waiting for callZomeBlockPostCommit mutex timed-out\");\n }\n console.debug(\"postCommit Lock ACQUIRED\");\n /** Execute */\n const respLog = await this.executeZomeCall(log);\n return respLog.success;\n }\n\n\n /**\n * callZome() with Mutex (for calls that writes to source-chain)\n * TODO: Implement call queue instead of mutex?\n */\n async callZomeBlocking(zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n\n /** Acquire lock */\n let release;\n try {\n release = await this._callMutex.acquire();\n } catch(e) {\n console.warn(\"Waiting for callZomeBlocking mutex timed-out\", e);\n this.logCallTimedout(log)\n return Promise.reject(\"Waiting for callZomeBlocking mutex timed-out\");\n }\n /** Execute */\n const respLog = await this.executeZomeCall(log);\n /** Release */\n release();\n if (respLog.failure) {\n if (!respLog.throttled) {\n this.dumpCallLogs(zome_name);\n this.dumpSignalLogs(zome_name);\n }\n return Promise.reject(respLog);\n }\n return respLog.success;\n }\n\n\n /** On success returns the data returned by the zome function */\n async callZome(zome_name: ZomeName, fn_name: string, payload: any, cap_secret: CapSecret | null, timeout?: number): Promise<unknown> {\n /** Create RequestLog */\n timeout = timeout? timeout : this.defaultTimeout;\n const req = {\n cap_secret, zome_name, fn_name, payload,\n cell_id: this.cell.address.intoId(),\n provenance: this.cell.address.agentId.hash,\n } as CallZomeRequest;\n const log = { request: req, timeout, requestTimestamp: Date.now() } as RequestLog;\n /** Wait for lock */\n try {\n await this._callMutex.waitForUnlock();\n } catch(e) {\n console.warn(\"Waiting for callZome mutex timed-out\", e);\n this.logCallTimedout(log);\n return Promise.reject(\"Waiting for callZome mutex timed-out\");\n }\n /** Execute & return response */\n const respLog = await this.executeZomeCall(log);\n if (respLog.failure) {\n if (!respLog.throttled) {\n this.dumpCallLogs(zome_name);\n this.dumpSignalLogs(zome_name);\n }\n return Promise.reject(respLog);\n }\n return respLog.success;\n }\n\n\n /**\n * Calls the `entry_defs()` zome function and\n * Returns an array of all the zome's AppEntryNames and Visibility, i.e. (AppEntryName, isPublic)[]\n */\n async callEntryDefs(zomeName: ZomeName): Promise<MyDictionary<EntryDef>> {\n console.log(\"callEntryDefs()\", zomeName)\n /** Return cache if any */\n if (this._entryDefCache) {\n return this._entryDefCache;\n }\n /** Call zome */\n let entryDefs;\n try {\n /* Need big timeout since holochain is slow when receiving simultaneous calls from multiple happs */\n entryDefs = await this.callZome(zomeName, \"entry_defs\", null, null, 60 * 1000) as EntryDefsCallbackResult;\n } catch (e) {\n console.error(`Calling \"entry_defs()\" failed on zome \"${zomeName}\". Possibly because zome does not have any entry types defined.`);\n return Promise.reject(e);\n }\n console.debug(\"getEntryDefs() for \" + zomeName + \" result:\")\n console.debug({entryDefs});\n /** Map result */\n let result: MyDictionary<EntryDef> = {}\n for (const def of entryDefs.Defs) {\n let name = Object.keys(def.id)[0];\n if (\"App\" in def.id) {\n name = def.id.App;\n }\n result[name!] = def;\n }\n //console.log({result})\n this._entryDefCache = result;\n return result;\n }\n\n /**\n * Calls the `zome_info()` zome function\n */\n async callZomeInfo(zomeName: ZomeName): Promise<ZomeInfo> {\n //console.log(\"callZomeInfo()\", zomeName, !!this._zomeInfoCache);\n if (this._zomeInfoCache) {\n return this._zomeInfoCache;\n }\n try {\n const zome_info = await this.callZome(zomeName, \"get_zome_info\", null, null, 10 * 1000) as ZomeInfo;\n //console.debug(\"callZomeInfo() for \" + zomeName + \" result:\")\n //console.log({zome_info})\n this._zomeInfoCache = zome_info;\n return zome_info;\n } catch (e) {\n console.error(\"Calling callZomeInfo() on \" + zomeName + \" failed. Make sure `get_zome_info()` is implemented in your zome code.\")\n return Promise.reject(e);\n }\n }\n\n\n /**\n * Calls the `dna_info()` zome function\n */\n async callDnaInfo(zomeName: ZomeName): Promise<DnaInfo> {\n //console.log(\"callDnaInfo()\", zomeName);\n if (this._dnaInfoCache) {\n return this._dnaInfoCache;\n }\n try {\n const dna_info = await this.callZome(zomeName, \"get_dna_info\", null, null, 10 * 1000) as DnaInfo;\n //console.debug(\"callDnaInfo() for \" + zomeName + \" result:\")\n //console.log({dna_info})\n this._dnaInfoCache = dna_info;\n return dna_info;\n } catch (e) {\n console.error(\"Calling callDnaInfo() on \" + zomeName + \" failed. Make sure `get_dna_info()` is implemented in your zome code.\")\n return Promise.reject(e);\n }\n }\n\n\n // /** TODO once we have getDnaDefinition() api */\n // dumpAllZomes() {\n // // FIXME get DNA DEF\n // for (const zomeName of dnaDef) {\n // this.dumpCallLogs(zomeName)\n // }\n // }\n\n /** */\n dumpCallLogs(zomeName?: ZomeName) {\n let result = [];\n let call_map = new Map<string, [number, number]>(); // fn_fname, call_count, call_total_duration;\n for (const response of this._responseLog) {\n const requestLog = this._requestLog[response.requestIndex];\n if (!requestLog || (zomeName && requestLog.request.zome_name != zomeName)) {\n continue;\n }\n const startTime= prettyDate(new Date(requestLog.requestTimestamp));\n const waitTime = prettyDuration(new Date(requestLog.executionTimestamp - requestLog.requestTimestamp));\n const duration_ts = response.timestamp - requestLog.requestTimestamp;\n const duration = prettyDuration(new Date(duration_ts));\n let input = requestLog.request.payload;\n // if (requestLog.request.payload instanceof HoloHash) {\n // //console.log(\"instanceof HoloHash\", requestLog.request.payload);\n // input = intoAnyId(requestLog.request.payload.toBytes()).print();\n // } else {\n if (requestLog.request.payload instanceof Uint8Array) {\n //console.log(\"instanceof Uint8Array\", requestLog.request.payload);\n input = intoAnyId(requestLog.request.payload).print();\n }\n //}\n //const input = requestLog.request.payload instanceof Uint8Array ? enc64(requestLog.request.payload) : requestLog.request.payload;\n const output = anyToB64(response.failure ? response.failure : response.success);\n const log = zomeName\n ? { startTime, fnName: requestLog.request.fn_name, input, output, duration, waitTime }\n : { startTime, zomeName: requestLog.request.zome_name, fnName: requestLog.request.fn_name, input, output, duration, waitTime }\n result.push(log);\n let maybe_value = call_map.get(requestLog.request.fn_name);\n if (!maybe_value) {\n call_map.set(requestLog.request.fn_name, [1, duration_ts]);\n } else {\n call_map.set(requestLog.request.fn_name, [maybe_value[0] + 1, maybe_value[1] + duration_ts]);\n }\n }\n console.warn(`Dumping call logs for cell \"${this._appProxy.getLocations(this.cell.address)}\"`)\n if (zomeName) {\n console.warn(` - For zome \"${zomeName}\"`);\n }\n console.table(result)\n\n /** Print call_map as Table */\n let summary: any[] = [];\n for (const [fn_name, values] of call_map) {\n const log = { fnName: fn_name, count: values[0], avgDuration: prettyDuration(new Date(values[1] / values[0])) };\n summary.push(log);\n }\n summary.sort((a, b) => b.count - a.count);\n console.table(summary);\n\n /** Parse signal self-call logs */\n //console.log(this._appProxy.signalLogs)\n\n const zomeSignals = this._appProxy.signalLogs.filter((log) => log.type == AppSignalType.Zome);\n const sysSignals = zomeSignals.filter((log) => {\n const type = Object.keys(log.zomeSignal.pulses[0]!)[0];\n type == \"System\"\n });\n\n const startCalls: [Timestamp, CellIdStr, SystemAttestationVariantSelfCallStart][] = [];\n const endCalls: [Timestamp, CellIdStr, SystemAttestationVariantSelfCallEnd][] = [];\n sysSignals.map((log) => {\n for (const pulse of log.zomeSignal.pulses) {\n const sys = (pulse as SystemPulse).System;\n if(sys.type == \"SelfCallStart\") {\n startCalls.push([log.ts, log.cellAddr.str, (sys as SystemAttestationVariantSelfCallStart)]);\n }\n if(sys.type == \"SelfCallEnd\") {\n endCalls.push([log.ts, log.cellAddr.str, (sys as SystemAttestationVariantSelfCallEnd)]);\n }\n }\n })\n\n let sigResults = [];\n for (const [startTs, startId, startSignal] of startCalls) {\n const index = endCalls.findIndex(([ts, cellId, signal]) => ts >= startTs && startId == cellId && startSignal.fn_name == signal.fn_name)\n if (index == -1) {\n continue;\n }\n const first = endCalls.splice(index, 1)[0]!;\n const [endTs, _cId, endSignal] = first;\n const duration = prettyDuration(new Date(endTs - startTs));\n const log = { startTime: startTs, zomeName: endSignal.zome_name, fnName: endSignal.fn_name, succeeded: endSignal.succeeded, duration }\n sigResults.push(log);\n }\n\n console.table(sigResults)\n }\n\n\n}\n\n"]}
@@ -2,15 +2,6 @@ import { Timestamp, AppEntryDef, Link } from '@holochain/client';
2
2
  type AgentArray = Uint8Array;
3
3
  type EntryArray = Uint8Array;
4
4
  type ActionArray = Uint8Array;
5
- export interface CallAppTipInput {
6
- appTip: Uint8Array;
7
- recipient: AgentArray;
8
- zomeName: string;
9
- }
10
- export interface CastTipInput {
11
- tip: TipProtocol;
12
- peers: AgentArray[];
13
- }
14
5
  export declare enum ValidatedBy {
15
6
  None = "None",
16
7
  Me = "Me",
@@ -99,7 +90,8 @@ export declare enum TipProtocolType {
99
90
  Pong = "Pong",
100
91
  Entry = "Entry",
101
92
  Link = "Link",
102
- App = "App"
93
+ AppCustom = "AppCustom",
94
+ AppValue = "AppValue"
103
95
  }
104
96
  export type TipProtocolVariantPing = {
105
97
  Ping: AgentArray;
@@ -113,9 +105,21 @@ export type TipProtocolVariantEntry = {
113
105
  export type TipProtocolVariantLink = {
114
106
  Link: LinkPulse;
115
107
  };
116
- export type TipProtocolVariantApp = {
117
- App: Uint8Array;
108
+ export type TipProtocolVariantAppCustom = {
109
+ AppCustom: Uint8Array;
110
+ };
111
+ export type TipProtocolVariantAppValue = {
112
+ AppValue: [string, string];
118
113
  };
119
- export type TipProtocol = TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantApp;
114
+ export type TipProtocol = TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantAppCustom | TipProtocolVariantAppValue;
115
+ export interface CastTipInput {
116
+ tip: TipProtocol;
117
+ peers: AgentArray[];
118
+ }
119
+ export interface SynchronizeTipInput {
120
+ tip: TipProtocol;
121
+ recipient: AgentArray;
122
+ zomeName: string;
123
+ }
120
124
  export {};
121
125
  //# sourceMappingURL=zomeSignals.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zomeSignals.types.d.ts","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"AAGA,OAAO,EAMkM,SAAS,EAqBjM,WAAW,EAOuC,IAAI,EAKtE,MAAM,mBAAmB,CAAC;AAK3B,KAAK,UAAU,GAAG,UAAU,CAAC;AAM7B,KAAK,UAAU,GAAG,UAAU,CAAC;AAE7B,KAAK,WAAW,GAAG,UAAU,CAAC;AAwB9B,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,UAAU,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,WAAW,CAAA;IAChB,KAAK,EAAE,UAAU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A;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB"}
@@ -23,6 +23,7 @@ export var TipProtocolType;
23
23
  TipProtocolType["Pong"] = "Pong";
24
24
  TipProtocolType["Entry"] = "Entry";
25
25
  TipProtocolType["Link"] = "Link";
26
- TipProtocolType["App"] = "App";
26
+ TipProtocolType["AppCustom"] = "AppCustom";
27
+ TipProtocolType["AppValue"] = "AppValue";
27
28
  })(TipProtocolType || (TipProtocolType = {}));
28
29
  //# sourceMappingURL=zomeSignals.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zomeSignals.types.js","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"AA2FA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,4BAAa,CAAA;IACb,wBAAS,CAAA;IACT,kCAAmB,CAAA;AACpB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAGD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAiCD,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IACjC,2CAAiB,CAAA;IACjB,yCAAe,CAAA;IACf,uCAAa,CAAA;IACb,qCAAW,CAAA;AACZ,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC;AAuCD,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,8BAAW,CAAA;AACZ,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, Duration, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, DisabledAppReason, AppInfoStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\nexport interface CallAppTipInput {\n appTip: Uint8Array\n recipient: AgentArray\n zomeName: string\n}\n\nexport interface CastTipInput {\n tip: TipProtocol\n peers: AgentArray[]\n}\n\n/** ValidationStatus */\nexport enum ValidatedBy {\n\tNone = 'None',\n\tMe = 'Me',\n\tNetwork = 'Network',\n}\n\n/** Bool: True if state change just happened (real-time) */\nexport enum StateChangeType {\n\tCreate = 'Create',\n\tUpdate = 'Update',\n\tDelete = 'Delete',\n}\nexport type StateChangeVariantCreate = {Create: boolean}\nexport type StateChangeVariantUpdate = {Update: boolean}\nexport type StateChangeVariantDelete = {Delete: boolean}\nexport type StateChange = \n | StateChangeVariantCreate | StateChangeVariantUpdate | StateChangeVariantDelete;\n\n/** */\nexport interface LinkPulse {\n link: Link\n state: StateChange\n validation: ValidatedBy\n}\n\nexport interface EntryPulse {\n state: StateChange\n validation: ValidatedBy\n orig_ah?: ActionArray\n ah: ActionArray\n eh: EntryArray\n ts: Timestamp\n author: AgentArray\n def: AppEntryDef\n bytes: Uint8Array\n}\n\n/** */\nexport interface ZomeSignal {\n from: AgentArray\n pulses: ZomeSignalProtocol[]\n}\n\n/** */\nexport enum ZomeSignalProtocolType {\n\tSystem = 'System',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tTip = 'Tip',\n}\nexport type ZomeSignalProtocolVariantSystem = {System: SystemAttestation}\nexport type ZomeSignalProtocolVariantEntry = {Entry: EntryPulse}\nexport type ZomeSignalProtocolVariantLink = {Link: LinkPulse}\nexport type ZomeSignalProtocolVariantTip = {Tip: TipProtocol}\nexport type ZomeSignalProtocol = \n | ZomeSignalProtocolVariantSystem | ZomeSignalProtocolVariantEntry | ZomeSignalProtocolVariantLink | ZomeSignalProtocolVariantTip;\n\n/** Zome-agnostic attestation */\nexport type SystemAttestationVariantPostCommitLink = {\n type: \"PostCommitLink\"\n link_type: number\n is_delete: boolean\n succeeded: boolean\n}\nexport type SystemAttestationVariantPostCommitEntry = {\n type: \"PostCommitEntry\"\n app_entry_type: string\n is_delete: boolean\n succeeded: boolean\n}\nexport type SystemAttestationVariantSelfCallStart = {\n type: \"SelfCallStart\"\n zome_name: string\n fn_name: string\n}\nexport type SystemAttestationVariantSelfCallEnd = {\n type: \"SelfCallEnd\"\n zome_name: string\n fn_name: string\n succeeded: boolean\n}\nexport type SystemAttestation =\n | SystemAttestationVariantPostCommitLink\n | SystemAttestationVariantPostCommitEntry\n | SystemAttestationVariantSelfCallStart\n | SystemAttestationVariantSelfCallEnd;\n\n/** Protocol used by UI ONLY to send data to other agents */\nexport enum TipProtocolType {\n\tPing = 'Ping',\n\tPong = 'Pong',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tApp = 'App',\n}\nexport type TipProtocolVariantPing = {Ping: AgentArray}\nexport type TipProtocolVariantPong = {Pong: AgentArray}\nexport type TipProtocolVariantEntry = {Entry: EntryPulse}\nexport type TipProtocolVariantLink = {Link: LinkPulse}\nexport type TipProtocolVariantApp = {App: Uint8Array}\nexport type TipProtocol = \n | TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantApp;\n"]}
1
+ {"version":3,"file":"zomeSignals.types.js","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"AAgFA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,4BAAa,CAAA;IACb,wBAAS,CAAA;IACT,kCAAmB,CAAA;AACpB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAGD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAiCD,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IACjC,2CAAiB,CAAA;IACjB,yCAAe,CAAA;IACf,uCAAa,CAAA;IACb,qCAAW,CAAA;AACZ,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC;AAuCD,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;AACtB,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, Duration, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, DisabledAppReason, AppInfoStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/** ValidationStatus */\nexport enum ValidatedBy {\n\tNone = 'None',\n\tMe = 'Me',\n\tNetwork = 'Network',\n}\n\n/** Bool: True if state change just happened (real-time) */\nexport enum StateChangeType {\n\tCreate = 'Create',\n\tUpdate = 'Update',\n\tDelete = 'Delete',\n}\nexport type StateChangeVariantCreate = {Create: boolean}\nexport type StateChangeVariantUpdate = {Update: boolean}\nexport type StateChangeVariantDelete = {Delete: boolean}\nexport type StateChange = \n | StateChangeVariantCreate | StateChangeVariantUpdate | StateChangeVariantDelete;\n\n/** */\nexport interface LinkPulse {\n link: Link\n state: StateChange\n validation: ValidatedBy\n}\n\nexport interface EntryPulse {\n state: StateChange\n validation: ValidatedBy\n orig_ah?: ActionArray\n ah: ActionArray\n eh: EntryArray\n ts: Timestamp\n author: AgentArray\n def: AppEntryDef\n bytes: Uint8Array\n}\n\n/** */\nexport interface ZomeSignal {\n from: AgentArray\n pulses: ZomeSignalProtocol[]\n}\n\n/** */\nexport enum ZomeSignalProtocolType {\n\tSystem = 'System',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tTip = 'Tip',\n}\nexport type ZomeSignalProtocolVariantSystem = {System: SystemAttestation}\nexport type ZomeSignalProtocolVariantEntry = {Entry: EntryPulse}\nexport type ZomeSignalProtocolVariantLink = {Link: LinkPulse}\nexport type ZomeSignalProtocolVariantTip = {Tip: TipProtocol}\nexport type ZomeSignalProtocol = \n | ZomeSignalProtocolVariantSystem | ZomeSignalProtocolVariantEntry | ZomeSignalProtocolVariantLink | ZomeSignalProtocolVariantTip;\n\n/** App-agnostic attestation */\nexport type SystemAttestationVariantPostCommitLink = {\n type: \"PostCommitLink\"\n link_type: number\n is_delete: boolean\n succeeded: boolean\n}\nexport type SystemAttestationVariantPostCommitEntry = {\n type: \"PostCommitEntry\"\n app_entry_type: string\n is_delete: boolean\n succeeded: boolean\n}\nexport type SystemAttestationVariantSelfCallStart = {\n type: \"SelfCallStart\"\n zome_name: string\n fn_name: string\n}\nexport type SystemAttestationVariantSelfCallEnd = {\n type: \"SelfCallEnd\"\n zome_name: string\n fn_name: string\n succeeded: boolean\n}\nexport type SystemAttestation =\n | SystemAttestationVariantPostCommitLink\n | SystemAttestationVariantPostCommitEntry\n | SystemAttestationVariantSelfCallStart\n | SystemAttestationVariantSelfCallEnd;\n\n/** Protocol used by UI ONLY to send data to other agents */\nexport enum TipProtocolType {\n\tPing = 'Ping',\n\tPong = 'Pong',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tAppCustom = 'AppCustom',\n\tAppValue = 'AppValue',\n}\nexport type TipProtocolVariantPing = {Ping: AgentArray}\nexport type TipProtocolVariantPong = {Pong: AgentArray}\nexport type TipProtocolVariantEntry = {Entry: EntryPulse}\nexport type TipProtocolVariantLink = {Link: LinkPulse}\nexport type TipProtocolVariantAppCustom = {AppCustom: Uint8Array}\nexport type TipProtocolVariantAppValue = {AppValue: [string, string]}\nexport type TipProtocol = \n | TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantAppCustom | TipProtocolVariantAppValue;\n\nexport interface CastTipInput {\n tip: TipProtocol\n peers: AgentArray[]\n}\n\nexport interface SynchronizeTipInput {\n tip: TipProtocol\n recipient: AgentArray\n zomeName: string\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-qc/cell-proxy",
3
- "version": "0.32.7",
3
+ "version": "0.32.9",
4
4
  "description": "Proxy classes and helpers for managing a Holochain AppWebsocket",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",