debrand(temporal): scrub @temporalio / nestjs-temporal-core from Hanzo Tasks integration comments (#7)
Imports were migrated to @hanzoai/tasks in social#2; these were the last documentation-comment references to the retired Temporal brand tokens. Reworded to the equivalent generic phrasing (legacy client shape, durable-execution NestJS module, proxyActivities API) — meaning unchanged, comment-only, compile-neutral. social now has zero go.temporal.io / @temporalio / nestjs-temporal-core references. Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
@@ -23,7 +23,7 @@ import { socialIntegrationList } from '@social/nestjs-libraries/integrations/int
|
||||
type TokenProvider = () => string | Promise<string>;
|
||||
|
||||
// Hanzo Tasks NestJS integration — the drop-in replacement for
|
||||
// nestjs-temporal-core. Durable workflow execution runs on the ONE Hanzo Tasks
|
||||
// the prior durable-execution NestJS module. Durable workflow execution runs on
|
||||
// engine embedded in cloud, reached over its identity-gated ZAP listener
|
||||
// (cloud.hanzo.svc:9999) and authenticated with a Hanzo IAM client_credentials
|
||||
// bearer. There is no upstream Temporal anywhere.
|
||||
@@ -38,7 +38,7 @@ type TokenProvider = () => string | Promise<string>;
|
||||
// ── @Activity / @ActivityMethod decorators ─────────────────────────────
|
||||
const ACTIVITY_METHODS = Symbol('hanzo.tasks.activityMethods');
|
||||
|
||||
/** Marks a class as an activity provider (parity with nestjs-temporal-core). */
|
||||
/** Marks a class as an activity provider (activity-decorator parity). */
|
||||
export function Activity(): ClassDecorator {
|
||||
return () => {
|
||||
/* marker only — methods are discovered via @ActivityMethod */
|
||||
@@ -113,7 +113,7 @@ const STATUS_NAME: Record<number, string> = {
|
||||
[WorkflowStatus.TimedOut]: 'TIMED_OUT',
|
||||
};
|
||||
|
||||
// Adapt a Hanzo WorkflowHandle to the @temporalio shape social's legacy code
|
||||
// Adapt a Hanzo WorkflowHandle to the legacy client shape social's older code
|
||||
// reads — notably `describe().status.name` as a string.
|
||||
function adaptHandle(handle: ReturnType<Client['workflow']['getHandle']>) {
|
||||
return {
|
||||
@@ -129,7 +129,7 @@ function adaptHandle(handle: ReturnType<Client['workflow']['getHandle']>) {
|
||||
};
|
||||
}
|
||||
|
||||
// getRawClient() exposes the @temporalio/client-shaped surface social uses:
|
||||
// getRawClient() exposes the legacy client-shaped surface social uses:
|
||||
// .workflow.{start,signalWithStart,getHandle,list}. start/signalWithStart pass
|
||||
// straight through to the @hanzoai/tasks WorkflowClient (which already accepts
|
||||
// typedSearchAttributes + workflowIdConflictPolicy). list() streams executions
|
||||
@@ -177,7 +177,7 @@ export class TemporalService implements OnModuleInit, OnModuleDestroy {
|
||||
private readonly moduleRef: ModuleRef
|
||||
) {}
|
||||
|
||||
/** The @temporalio-shaped client facade social's services consume. */
|
||||
/** The legacy-shaped client facade social's services consume. */
|
||||
get client() {
|
||||
return {
|
||||
getRawClient: () => (this._client ? rawClientAdapter(this._client) : undefined),
|
||||
@@ -284,7 +284,7 @@ export class HanzoTasksModule {}
|
||||
/**
|
||||
* Builds the Hanzo Tasks module. `isWorkers` starts the workers (orchestrator);
|
||||
* false is a client-only wiring (backend). Signature-compatible with the prior
|
||||
* nestjs-temporal-core getTemporalModule call sites.
|
||||
* getTemporalModule call sites.
|
||||
*/
|
||||
export function getTemporalModule(
|
||||
isWorkers: boolean,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Hanzo Tasks module builder. The prior nestjs-temporal-core wiring is replaced
|
||||
// Hanzo Tasks module builder. The prior durable-execution wiring is replaced
|
||||
// by the @hanzoai/tasks integration in ./tasks — durable execution on the ONE
|
||||
// engine embedded in cloud (gated ZAP :9999), no upstream Temporal.
|
||||
export { getTemporalModule } from './tasks';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Workflow-side barrel for orchestrator workflows. Re-exports the
|
||||
// @hanzoai/tasks workflow primitives, but with a `proxyActivities` whose type
|
||||
// parameter is unconstrained — matching @temporalio's API — so the existing
|
||||
// parameter is unconstrained — matching the legacy proxyActivities API — so the existing
|
||||
// `proxyActivities<PostActivity>()` (typed by an activity CLASS, which lacks a
|
||||
// string index signature) type-checks. Semantics are unchanged; only the
|
||||
// declared generic bound differs from the SDK's stricter one.
|
||||
@@ -8,7 +8,7 @@ export * from '@hanzoai/tasks';
|
||||
|
||||
import { proxyActivities as _proxyActivities, type ProxyActivityOptions } from '@hanzoai/tasks';
|
||||
|
||||
// Accept the @temporalio ProxyActivityOptions superset (e.g. `cancellationType`)
|
||||
// Accept the legacy ProxyActivityOptions superset (e.g. `cancellationType`)
|
||||
// for source compatibility; extra fields are ignored by the SDK.
|
||||
type ProxyActivityOptionsCompat = ProxyActivityOptions & {
|
||||
cancellationType?: string;
|
||||
|
||||
Reference in New Issue
Block a user