@userreason/cli 0.1.0 → 0.2.0
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/README.md +301 -41
- package/dist/authorize.d.ts +29 -0
- package/dist/authorize.js +23 -0
- package/dist/bin.js +565 -50
- package/dist/capture.d.ts +18 -0
- package/dist/capture.js +256 -0
- package/dist/catalog.d.ts +16 -0
- package/dist/catalog.js +206 -0
- package/dist/client.d.ts +79 -2
- package/dist/client.js +140 -17
- package/dist/config.d.ts +4 -0
- package/dist/config.js +35 -12
- package/dist/contracts.d.ts +13 -3
- package/dist/contracts.js +4 -4
- package/dist/credentials.d.ts +12 -2
- package/dist/credentials.js +110 -26
- package/dist/docs.d.ts +51 -0
- package/dist/docs.js +143 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +38 -0
- package/dist/event-policy.d.ts +2 -0
- package/dist/event-policy.js +9 -0
- package/dist/first-survey-preparation.d.ts +8 -0
- package/dist/first-survey-preparation.js +29 -0
- package/dist/first-survey-source.d.ts +60 -0
- package/dist/first-survey-source.js +289 -0
- package/dist/first-survey-terminal.d.ts +5 -0
- package/dist/first-survey-terminal.js +16 -0
- package/dist/first-survey.d.ts +88 -0
- package/dist/first-survey.js +227 -0
- package/dist/help.d.ts +13 -0
- package/dist/help.js +74 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +23 -0
- package/dist/lock.js +19 -5
- package/dist/profile.d.ts +20 -0
- package/dist/profile.js +57 -0
- package/dist/project.d.ts +9 -0
- package/dist/project.js +87 -0
- package/dist/recommended-surveys.d.ts +30 -0
- package/dist/recommended-surveys.js +201 -0
- package/dist/setup-executor.d.ts +35 -0
- package/dist/setup-executor.js +329 -0
- package/dist/setup-files.d.ts +11 -0
- package/dist/setup-files.js +96 -0
- package/dist/setup-runner.d.ts +14 -0
- package/dist/setup-runner.js +142 -0
- package/dist/setup-source.d.ts +31 -0
- package/dist/setup-source.js +48 -0
- package/dist/setup-store.d.ts +37 -0
- package/dist/setup-store.js +256 -0
- package/dist/setup-terminal.d.ts +3 -0
- package/dist/setup-terminal.js +6 -0
- package/dist/setup-wire.d.ts +1237 -0
- package/dist/setup-wire.js +175 -0
- package/dist/setup.d.ts +1223 -0
- package/dist/setup.js +258 -0
- package/dist/starter-survey.d.ts +22 -0
- package/dist/starter-survey.js +457 -0
- package/dist/telemetry.d.ts +67 -0
- package/dist/telemetry.js +304 -0
- package/dist/ui.d.ts +75 -0
- package/dist/ui.js +107 -0
- package/dist/views.d.ts +51 -0
- package/dist/views.js +93 -0
- package/dist/workos.d.ts +1 -1
- package/dist/workos.js +9 -4
- package/package.json +29 -12
- package/skills/userreason/SKILL.md +88 -8
- package/skills/userreason/references/management.md +67 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Public packages cannot depend on the private contracts package. These bounded
|
|
2
|
+
// readers mirror @userreason/ur-types/setup/v1; conformance tests check both.
|
|
3
|
+
import { SetupError } from './setup-store.js';
|
|
4
|
+
const fail = () => { throw new SetupError('invalid_setup_response', 'Invalid setup protocol data. Update compatible clients or start a new setup; no further local effects will be applied.'); };
|
|
5
|
+
const text = (min, max, pattern) => value => typeof value === 'string' && value.length >= min && value.length <= max && (!pattern || pattern.test(value)) ? value : fail();
|
|
6
|
+
const bool = value => typeof value === 'boolean' ? value : fail();
|
|
7
|
+
const literal = (expected) => value => value === expected ? expected : fail();
|
|
8
|
+
const oneOf = (values) => value => typeof value === 'string' && values.includes(value) ? value : fail();
|
|
9
|
+
const integer = (min, max) => value => typeof value === 'number' && Number.isInteger(value) && value >= min && value <= max ? value : fail();
|
|
10
|
+
const nullable = (read) => value => value === null ? null : read(value);
|
|
11
|
+
const optional = (read) => value => value === undefined ? undefined : read(value);
|
|
12
|
+
const array = (read, min, max, key) => value => {
|
|
13
|
+
if (!Array.isArray(value) || value.length < min || value.length > max)
|
|
14
|
+
return fail();
|
|
15
|
+
const parsed = value.map(read);
|
|
16
|
+
if (key && new Set(parsed.map(key)).size !== parsed.length)
|
|
17
|
+
return fail();
|
|
18
|
+
return parsed;
|
|
19
|
+
};
|
|
20
|
+
const shape = (fields) => value => {
|
|
21
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
22
|
+
return fail();
|
|
23
|
+
const input = value;
|
|
24
|
+
if (Object.keys(input).some(key => !Object.hasOwn(fields, key)))
|
|
25
|
+
return fail();
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const [key, read] of Object.entries(fields)) {
|
|
28
|
+
const parsed = read(input[key]);
|
|
29
|
+
if (parsed !== undefined)
|
|
30
|
+
out[key] = parsed;
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
33
|
+
};
|
|
34
|
+
const refine = (read, check) => value => { const parsed = read(value); return check(parsed) ? parsed : fail(); };
|
|
35
|
+
const bounded = (read) => value => {
|
|
36
|
+
let encoded;
|
|
37
|
+
try {
|
|
38
|
+
encoded = JSON.stringify(value);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return fail();
|
|
42
|
+
}
|
|
43
|
+
if (encoded === undefined || Buffer.byteLength(encoded) > 65_536)
|
|
44
|
+
return fail();
|
|
45
|
+
return read(value);
|
|
46
|
+
};
|
|
47
|
+
const uuid = text(36, 36, /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i);
|
|
48
|
+
const hash = text(64, 64, /^[a-f0-9]{64}$/);
|
|
49
|
+
const timestamp = refine(text(20, 65536, /^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/), value => {
|
|
50
|
+
const day = value.slice(0, 10), date = new Date(`${day}T00:00:00Z`);
|
|
51
|
+
return Number.isFinite(Date.parse(value)) && Number.isFinite(date.getTime()) && date.toISOString().slice(0, 10) === day;
|
|
52
|
+
});
|
|
53
|
+
const revision = refine(text(1, 19, /^[1-9][0-9]*$/), value => BigInt(value) <= 9223372036854775807n);
|
|
54
|
+
const generation = integer(1, 2147483647);
|
|
55
|
+
const shortText = value => text(1, 240, /^[^\u0000-\u001f\u007f]*$/)(typeof value === 'string' ? value.trim() : value);
|
|
56
|
+
const identifier = text(1, 80, /^[A-Za-z0-9_-]+$/);
|
|
57
|
+
const relativePath = refine(text(1, 240), value => !value.startsWith('/') && !/[\\:\u0000-\u001f\u007f]/.test(value) && value.split('/').every(part => !['', '.', '..'].includes(part)));
|
|
58
|
+
const scope = { schema_version: literal(1), setup_id: uuid };
|
|
59
|
+
export const setupPhases = ['configuring', 'awaiting_local_approval', 'applying', 'ready_for_recommendations', 'analyzing', 'selecting_drafts', 'creating_drafts', 'agent_test', 'complete', 'cancelled', 'expired'];
|
|
60
|
+
export const setupEffectKinds = ['install_packages', 'initialize_sdk', 'install_skill', 'insert_footer'];
|
|
61
|
+
const resultCodes = ['verified', 'already_present', 'skipped', 'review_required', 'unsupported', 'dependency_failed', 'operation_failed', 'cancelled', 'outcome_unknown'];
|
|
62
|
+
const statuses = ['prepared', 'approved', 'leased', 'running', 'succeeded', 'failed', 'manual', 'cancelled', 'outcome_unknown'];
|
|
63
|
+
export const parseSetupCapabilities = shape({
|
|
64
|
+
framework: oneOf(['react', 'next', 'vue', 'vanilla']), package_manager: oneOf(['npm', 'pnpm', 'yarn']),
|
|
65
|
+
install_packages: bool, initialize_sdk: bool, install_skill: bool, insert_footer: bool, source_review: bool, sample_read: bool,
|
|
66
|
+
project_name: optional(refine(shortText, value => value.length <= 120 && !/[\/\\]/.test(value))),
|
|
67
|
+
terminal: optional(shape({ platform: oneOf(['macos', 'windows', 'linux', 'other']), app: oneOf(['apple_terminal', 'iterm2', 'windows_terminal', 'vscode', 'cursor', 'warp', 'ghostty', 'wezterm', 'alacritty', 'kitty', 'generic']) })),
|
|
68
|
+
});
|
|
69
|
+
const choices = shape({ install_sdk: bool, install_skill: bool, footer_badge: bool });
|
|
70
|
+
const fileChange = shape({ path: relativePath, before_hash: nullable(hash), after_hash: hash });
|
|
71
|
+
const files = array(fileChange, 1, 16, value => value.path);
|
|
72
|
+
const managedOutput = shape({ path: oneOf(['package-lock.json', 'pnpm-lock.yaml', 'yarn.lock', '.pnp.cjs', '.pnp.loader.mjs']), before_hash: nullable(hash) });
|
|
73
|
+
const effectReaders = {
|
|
74
|
+
install_packages: refine(shape({ effect_id: uuid, kind: literal('install_packages'), package_manager: oneOf(['npm', 'pnpm', 'yarn']), packages: array(shape({ name: oneOf(['@userreason/js', '@userreason/cli']), version: text(1, 80, /^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?(?:\+[A-Za-z0-9.-]+)?$/) }), 1, 2, value => value.name), files, managed_outputs: optional(array(managedOutput, 0, 5, value => value.path)) }), value => !(value.managed_outputs ?? []).some(output => value.files.some(file => file.path === output.path))),
|
|
75
|
+
initialize_sdk: shape({ effect_id: uuid, kind: literal('initialize_sdk'), site_id: uuid, files }),
|
|
76
|
+
install_skill: shape({ effect_id: uuid, kind: literal('install_skill'), files }),
|
|
77
|
+
insert_footer: shape({ effect_id: uuid, kind: literal('insert_footer'), files, placement: shape({ path: relativePath, anchor_hash: hash }) }),
|
|
78
|
+
};
|
|
79
|
+
const effect = value => {
|
|
80
|
+
const kind = value?.kind;
|
|
81
|
+
if (typeof kind !== 'string' || !Object.hasOwn(effectReaders, kind))
|
|
82
|
+
return fail();
|
|
83
|
+
return effectReaders[kind](value);
|
|
84
|
+
};
|
|
85
|
+
const manualStep = shape({ kind: oneOf(setupEffectKinds), code: oneOf(['unsupported', 'review_required', 'dependency_failed']) });
|
|
86
|
+
const localPlan = refine(bounded(shape({ project_fingerprint: hash, choices_digest: hash, effects: array(effect, 0, 32, value => value.effect_id), manual_steps: optional(array(manualStep, 0, 4, value => value.kind)) })), value => Buffer.byteLength(JSON.stringify(value)) <= 16_384 && !(value.manual_steps ?? []).some(step => value.effects.some(effect => effect.kind === step.kind)));
|
|
87
|
+
const effectResult = refine(shape({ code: oneOf(resultCodes), verified: optional(bool) }), value => ['verified', 'already_present'].includes(value.code) === (value.verified === true));
|
|
88
|
+
const command = refine(shape({
|
|
89
|
+
operation_id: uuid, sequence: integer(1, 32), kind: oneOf(setupEffectKinds), expected_revision: revision,
|
|
90
|
+
input: effect, input_digest: hash, approval_digest: hash, status: oneOf(statuses), executor_generation: nullable(generation),
|
|
91
|
+
lease_generation: integer(0, 2147483647), lease_expires_at: nullable(timestamp), result: nullable(effectResult), result_digest: nullable(hash),
|
|
92
|
+
created_at: timestamp, started_at: nullable(timestamp), finished_at: nullable(timestamp), updated_at: timestamp,
|
|
93
|
+
}), value => value.kind === value.input.kind && (value.result === null) === (value.result_digest === null) &&
|
|
94
|
+
(!['leased', 'running'].includes(value.status) || (value.executor_generation !== null && value.lease_generation > 0 && value.lease_expires_at !== null)) &&
|
|
95
|
+
(value.status !== 'succeeded' || value.result?.verified === true));
|
|
96
|
+
export function parseSetupLocalPlan(value) { return localPlan(value); }
|
|
97
|
+
export function parseSetupEffect(value) { return effect(value); }
|
|
98
|
+
const sampleState = refine(shape({ status: oneOf(['not_started', 'waiting', 'received', 'skipped']), first_received_at: nullable(timestamp), latest_received_at: nullable(timestamp), latest_request_id: nullable(uuid) }), value => (value.first_received_at === null) === (value.latest_received_at === null) && (value.latest_received_at === null) === (value.latest_request_id === null) && (value.status !== 'received' || value.first_received_at !== null));
|
|
99
|
+
const draftOutcome = refine(shape({ candidate_id: identifier, status: oneOf(['pending', 'succeeded', 'failed']), prompt_id: uuid, request_id: uuid, revision: nullable(revision), code: nullable(oneOf(resultCodes)) }), value => value.status !== 'succeeded' || value.revision !== null);
|
|
100
|
+
const sourceErrors = ['planning_unavailable', 'planning_paused', 'planning_daily_budget', 'planning_allowance_exhausted', 'planning_provider_unavailable', 'planning_policy_changed', 'planning_consent_expired', 'planning_input_budget', 'planning_invalid_output', 'planning_timeout', 'source_changed', 'source_unavailable', 'recommendations_no_source', 'operation_failed'];
|
|
101
|
+
const sourceState = refine(shape({ preparation_id: uuid, status: oneOf(['pending', 'approved', 'analyzing', 'ready', 'failed', 'skipped']), packet_digest: hash, provider_fingerprint: hash, authorized_at: nullable(timestamp), expires_at: timestamp, error_code: nullable(oneOf(sourceErrors)) }), value => (!['approved', 'analyzing', 'ready'].includes(value.status) || value.authorized_at !== null) && (value.authorized_at === null || Date.parse(value.expires_at) > Date.parse(value.authorized_at) && Date.parse(value.expires_at) - Date.parse(value.authorized_at) <= 600_000));
|
|
102
|
+
const sourceFile = refine(shape({ path: relativePath, file_hash: hash, excerpt_hash: hash, bytes: integer(0, 12000), start_line: integer(1, Number.MAX_SAFE_INTEGER), end_line: integer(1, Number.MAX_SAFE_INTEGER) }), value => value.end_line >= value.start_line);
|
|
103
|
+
export const parseSetupSourceManifest = refine(bounded(shape({ packet_digest: hash, snapshot_id: uuid, files: array(sourceFile, 0, 200, value => value.path), omitted_files: integer(0, 1000000), truncated: bool, git_included: literal(false) })), value => value.files.reduce((sum, file) => sum + file.bytes, 0) <= 12000);
|
|
104
|
+
const sourcePackage = shape({ name: (value) => text(1, 100)(typeof value === 'string' ? value.trim() : value), version: (value) => text(1, 100)(typeof value === 'string' ? value.trim() : value) });
|
|
105
|
+
const sourcePackages = array(sourcePackage, 0, 30, value => value.name);
|
|
106
|
+
const evidencePath = refine(text(1, 500), value => !value.startsWith('/') && !value.includes('\\') && !value.split('/').some(part => ['', '.', '..'].includes(part)));
|
|
107
|
+
const sourceEvidence = refine(shape({ kind: literal('local_source'), id: identifier, path: evidencePath, file_hash: hash, excerpt_hash: hash, snapshot_id: uuid, start_line: integer(1, Number.MAX_SAFE_INTEGER), end_line: integer(1, Number.MAX_SAFE_INTEGER), excerpt: text(0, 12000) }), value => value.end_line >= value.start_line && value.excerpt.split('\n').length === value.end_line - value.start_line + 1);
|
|
108
|
+
const planningLimits = shape({ input_tokens: integer(256, 12000), output_tokens: integer(256, 4000), deadline_ms: integer(1000, 40000) });
|
|
109
|
+
const providerDestination = refine(text(1, 200), value => { try {
|
|
110
|
+
const url = new URL(value);
|
|
111
|
+
return url.protocol === 'https:' && !url.username && !url.password && !url.search && !url.hash;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return false;
|
|
115
|
+
} });
|
|
116
|
+
const price = text(1, 12, /^[1-9]\d{0,11}$/);
|
|
117
|
+
const planningConfiguration = shape({ configuration_fingerprint: hash, providers: array(shape({ role: oneOf(['extraction', 'recommendations']), destination: providerDestination, model: text(1, 200), prices: shape({ input_microUSD_per_million: price, output_microUSD_per_million: price }) }), 1, 2, value => value.role), policy: text(1, 8000), retention: literal('private-plan-7-days;source-not-stored;store-false'), limits: planningLimits });
|
|
118
|
+
export const parseSetupSession = bounded(refine(shape({
|
|
119
|
+
...scope, phase: oneOf(setupPhases), revision, workspace_id: nullable(uuid), site_id: nullable(uuid), project_fingerprint: hash,
|
|
120
|
+
choices, capabilities: parseSetupCapabilities, local_plan: nullable(localPlan), plan_digest: nullable(hash), commands: array(command, 0, 32),
|
|
121
|
+
executor_generation: generation, connection: oneOf(['connected', 'disconnected']), heartbeat_at: nullable(timestamp),
|
|
122
|
+
source: optional(nullable(sourceState)), recommendation_digest: optional(nullable(hash)), selected_candidates: optional(array(identifier, 0, 3, value => value)),
|
|
123
|
+
sample: sampleState, draft_outcomes: array(draftOutcome, 0, 3), bound_at: timestamp, last_activity_at: timestamp,
|
|
124
|
+
idle_expires_at: timestamp, absolute_expires_at: timestamp, terminal_at: nullable(timestamp),
|
|
125
|
+
}), value => (value.workspace_id === null) === (value.site_id === null) && (value.local_plan === null) === (value.plan_digest === null) &&
|
|
126
|
+
new Set(value.commands.map(command => command.operation_id)).size === value.commands.length && new Set(value.commands.map(command => command.sequence)).size === value.commands.length &&
|
|
127
|
+
['complete', 'cancelled', 'expired'].includes(value.phase) === (value.terminal_at !== null) &&
|
|
128
|
+
Date.parse(value.bound_at) <= Date.parse(value.last_activity_at) && Date.parse(value.idle_expires_at) <= Date.parse(value.absolute_expires_at) &&
|
|
129
|
+
Date.parse(value.absolute_expires_at) > Date.parse(value.bound_at) && Date.parse(value.absolute_expires_at) - Date.parse(value.bound_at) <= 7_200_000));
|
|
130
|
+
export const parseSetupDiscovery = shape({ schema_version: literal(1), browser_setup: shape({ versions: array(literal(1), 1, 1), enabled: bool, source_analysis: bool, draft_creation: bool, sample_read: bool }) });
|
|
131
|
+
export const parseSetupStartInput = bounded(shape({ schema_version: literal(1), challenge: hash, project_fingerprint: hash, capabilities: parseSetupCapabilities }));
|
|
132
|
+
export const parseSetupStartResult = shape({ ...scope, ticket: text(1, 16384), browser_url: refine(text(1, 20000), value => { try {
|
|
133
|
+
new URL(value);
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return false;
|
|
138
|
+
} }), code: text(8, 8, /^[A-F0-9]{8}$/), expires_at: timestamp });
|
|
139
|
+
export const parseSetupExchangeInput = shape({ ...scope, ticket: text(1, 16384), verifier: hash });
|
|
140
|
+
export const parseSetupExchangeResult = bounded(value => {
|
|
141
|
+
const status = value?.status;
|
|
142
|
+
if (status === 'pending' || status === 'rejected')
|
|
143
|
+
return shape({ schema_version: literal(1), status: literal(status) })(value);
|
|
144
|
+
if (status === 'approved')
|
|
145
|
+
return shape({ schema_version: literal(1), status: literal('approved'), access_token: text(1, 16384), expires_at: timestamp, session: parseSetupSession })(value);
|
|
146
|
+
return fail();
|
|
147
|
+
});
|
|
148
|
+
export const parseSetupPollInput = shape(scope);
|
|
149
|
+
export const parseSetupLocalPlanInput = bounded(shape({ ...scope, request_id: uuid, expected_revision: revision, plan: localPlan }));
|
|
150
|
+
export const parseSetupSourceInfoInput = shape(scope);
|
|
151
|
+
export const parseSetupSourcePlanInput = refine(bounded(shape({ ...scope, request_id: uuid, expected_revision: revision, manifest: parseSetupSourceManifest, packages: sourcePackages })), value => value.request_id === value.manifest.snapshot_id);
|
|
152
|
+
export const parseSetupSourceUploadInput = refine(bounded(shape({ ...scope, preparation_id: uuid, project_fingerprint: hash, evidence: array(sourceEvidence, 0, 220, value => value.id) })), value => new Set(value.evidence.map(item => item.path)).size === value.evidence.length && Buffer.byteLength(JSON.stringify(value.evidence)) <= 12000 && value.evidence.every(item => item.snapshot_id === value.preparation_id));
|
|
153
|
+
export const parseSetupSourceInfo = refine(bounded(shape({ schema_version: literal(1), session: parseSetupSession, preparation: nullable(shape({ preparation_id: uuid, manifest: parseSetupSourceManifest, packages: sourcePackages, configuration: planningConfiguration })) })), value => value.preparation === null || value.preparation.preparation_id === value.preparation.manifest.snapshot_id);
|
|
154
|
+
export const parseSetupClaimInput = shape({ ...scope, request_id: uuid, executor_generation: generation });
|
|
155
|
+
export const parseSetupClaimResult = bounded(shape({ schema_version: literal(1), command: nullable(command), session: parseSetupSession }));
|
|
156
|
+
const leased = { ...scope, operation_id: uuid, executor_generation: generation, lease_generation: generation };
|
|
157
|
+
export const parseSetupStartCommandInput = shape(leased);
|
|
158
|
+
const agrees = (value) => value.status === 'succeeded'
|
|
159
|
+
? value.result.verified === true && ['verified', 'already_present'].includes(value.result.code)
|
|
160
|
+
: value.result.verified !== true && !['verified', 'already_present'].includes(value.result.code);
|
|
161
|
+
export const parseSetupCommandResultInput = refine(shape({ ...leased, status: oneOf(['succeeded', 'failed', 'manual']), result: effectResult }), agrees);
|
|
162
|
+
export const parseSetupHeartbeatInput = refine(shape({ ...scope, executor_generation: generation, operation_id: nullable(uuid), lease_generation: nullable(generation) }), value => (value.operation_id === null) === (value.lease_generation === null));
|
|
163
|
+
export const parseSetupReconcileInput = refine(shape({ ...scope, request_id: uuid, project_fingerprint: hash, executor_generation: generation, operation_id: uuid, input_digest: hash, result: effectResult, status: oneOf(['succeeded', 'failed', 'manual']) }), agrees);
|
|
164
|
+
export const parseSetupSampleReadInput = shape({ ...scope, request_id: uuid });
|
|
165
|
+
export const parseSetupSampleReadResult = shape({ ...scope, sample: literal(true), dataset_version: literal('setup-sample-v1'), received_at: timestamp, answers: array(shape({ id: text(8, 8, /^sample-[1-3]$/), question: shortText, answer: shortText }), 3, 3, value => value.id) });
|
|
166
|
+
/** Deliberately public for compatibility tests; the wire source of truth stays in ur-types. */
|
|
167
|
+
export const setupWireReaders = {
|
|
168
|
+
SetupSourceInfoInput: parseSetupSourceInfoInput, SetupSourcePlanInput: parseSetupSourcePlanInput, SetupSourceUploadInput: parseSetupSourceUploadInput, SetupSourceInfo: parseSetupSourceInfo, SetupSourceManifest: parseSetupSourceManifest,
|
|
169
|
+
SetupCapabilities: parseSetupCapabilities, SetupSessionView: parseSetupSession, SetupDiscovery: parseSetupDiscovery,
|
|
170
|
+
SetupStartInput: parseSetupStartInput, SetupStartResult: parseSetupStartResult, SetupExchangeInput: parseSetupExchangeInput,
|
|
171
|
+
SetupExchangeResult: parseSetupExchangeResult, SetupPollInput: parseSetupPollInput, SetupLocalPlanInput: parseSetupLocalPlanInput,
|
|
172
|
+
SetupClaimInput: parseSetupClaimInput, SetupClaimResult: parseSetupClaimResult, SetupStartCommandInput: parseSetupStartCommandInput,
|
|
173
|
+
SetupCommandResultInput: parseSetupCommandResultInput, SetupHeartbeatInput: parseSetupHeartbeatInput, SetupReconcileInput: parseSetupReconcileInput,
|
|
174
|
+
SetupSampleReadInput: parseSetupSampleReadInput, SetupSampleReadResult: parseSetupSampleReadResult,
|
|
175
|
+
};
|