Skip to content

Commit 0f4fa52

Browse files
chore(protocol): scrub internal references from public schemas
Strips internal-architecture references from src/protocol/** so they no longer leak into the published bundles and source-maps: - Remove file headers referencing the internal monorepo and verbatim port provenance from ~30 protocol files; replace with neutral one-line descriptions where useful. - Scrub billing/architecture JSDoc on WorkerFailureReason and MissionPauseReason (the enum members are unchanged; only the descriptive comments around them are tightened). - Drop the editorial 'Deprecated' / 'Extra Usage (overage) billing tier' comments from LLMModelTier members. - Drop incidental references to internal infra (Vercel, Firestore sync, EAP cleanup, backend-v0-sessions, replay bug #974, MissionRunner / MissionFileService class names) from JSDoc and inline comments. - Add *.tgz to .gitignore so packed builds aren't accidentally committed. No schema, enum value, or exported symbol shape changes; bundle parity against mono is unaffected (still 265/265 MATCH). Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 79d67c6 commit 0f4fa52

28 files changed

Lines changed: 54 additions & 216 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules/
33

44
# Build output
55
dist/
6+
*.tgz
67

78
# Coverage
89
coverage/

src/protocol/cli.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha CLI protocol schemas.
2-
// Verbatim copy of packages/common/src/droid/schemas/cli.ts.
3-
41
import { z } from 'zod';
52

63
import { SandboxModeSchema } from './custom-models.js';

src/protocol/client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha client protocol schemas.
2-
// Verbatim copy of packages/common/src/droid/schemas/client.ts.
3-
41
import { z } from 'zod';
52

63
import {

src/protocol/constants.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha protocol constants.
2-
// Faithful copy of:
3-
// packages/common/src/droid/schemas/constants.ts
4-
// packages/common/src/droid/constants.ts (LOOP_INTERVAL_POLICY + system markers)
5-
// Keep shapes/values identical to the private monorepo to avoid protocol drift.
6-
71
import { DroidWorkingState } from './enums.js';
82

93
export const FACTORY_CLIENT_HEADER = 'X-Factory-Client';
@@ -22,21 +16,16 @@ export const FACTORY_PROTOCOL_VERSION = '1.66.0' as const;
2216
export const JSONRPC_VERSION = '2.0' as const;
2317

2418
/**
25-
* Sentinel ModelID value for the Factory routing model. Faithful copy of
26-
* packages/common/src/llm/constants.ts.
19+
* Sentinel ModelID value for the Factory routing model.
2720
*/
2821
export const FACTORY_ROUTER_MODEL_ID = 'factory-router' as const;
2922

3023
/**
3124
* Sentinel value used by CompactionModelSchema to mean "use the session's
32-
* current model for compaction". Faithful copy of
33-
* packages/common/src/settings/constants.ts.
25+
* current model for compaction".
3426
*/
3527
export const CURRENT_COMPACTION_MODEL = 'current-model';
3628

37-
// Faithful copy of packages/common/src/settings/constants.ts router-rule
38-
// guardrails. Used by ManagedSettingsBaseSchema and FactoryRouterRuleSchema.
39-
4029
/** Sized comparably to a trimmed user message in the classifier context budget. */
4130
export const FACTORY_ROUTER_GUIDANCE_MAX_LENGTH = 2000;
4231
export const FACTORY_ROUTER_RULES_MAX_COUNT = 20;

src/protocol/crons.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha droid crons tool-input schemas.
2-
// Verbatim copy of packages/common/src/droid/schemas/crons.ts.
3-
41
import { z } from 'zod';
52

63
const CronExpressionSchema = z

src/protocol/custom-models.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
// Source-of-truth mirror of factory-mono-alpha custom-model schemas (symbol-only).
2-
// Verbatim copy of CustomModelBedrockSchema, ManagedCustomModelSchema, and
3-
// CustomModelsSchema from packages/common/src/settings/schema.ts. Ported as-is
4-
// per the no-modification rule (includes apiKey / aws credential fields).
5-
// SandboxModeSchema is colocated here (one-liner from the same settings module).
1+
// Custom-model schemas (includes apiKey / aws credential fields).
2+
// SandboxModeSchema is colocated here.
63

74
import { z } from 'zod';
85

src/protocol/daemon/automations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const DaemonListAutomationsRequestSchema =
1616
});
1717

1818
export const AutomationEntrySchema = z.object({
19-
/** Directory name slug (e.g. "health-check"). Kept as `id` because protocol rules forbid renaming required fields. */
19+
/** Directory name slug (e.g. "health-check"). */
2020
id: z.string(),
21-
/** Stable UUID from HEARTBEAT.md frontmatter, used for backend/Firestore sync. */
21+
/** Stable UUID for backend sync. */
2222
uuid: z.string().optional(),
2323
name: z.string(),
2424
description: z.string().optional(),

src/protocol/daemon/commands.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha daemon commands schema.
2-
// Verbatim copy of packages/common/src/daemon/schemas/commands.ts.
3-
41
import { z } from 'zod';
52

63
import { CustomCommandInfoSchema } from '../client.js';

src/protocol/daemon/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const DaemonAuthenticateRequestParamsSchema = z
3939
apiKey: z.string().optional(),
4040
/** Frontend-generated connection ID for trace correlation */
4141
connectionId: z.string().optional(),
42-
/** Caller identifier for debugging (e.g., 'frontend', 'backend-v0-sessions', 'cli') */
42+
/** Caller identifier for debugging (e.g., 'frontend', 'cli'). */
4343
caller: z.string(),
4444
/** Client-supplied metadata for tracing and diagnostics. */
4545
metadata: DaemonConnectionMetadataSchema.optional(),

src/protocol/daemon/crons.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source-of-truth mirror of factory-mono-alpha daemon crons schemas.
2-
// Verbatim copy of packages/common/src/daemon/schemas/crons.ts.
3-
41
import { z } from 'zod';
52

63
import {

0 commit comments

Comments
 (0)