@apicircle/shared 1.0.7 → 1.0.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.
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +100 -2
- package/dist/index.d.ts +100 -2
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -486,6 +486,38 @@ interface GlobalGraphQL {
|
|
|
486
486
|
createdAt: string;
|
|
487
487
|
updatedAt: string;
|
|
488
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Pointer to a verified-good copy of a Global File Asset's bytes on a
|
|
491
|
+
* specific Git ref. Each asset can carry up to two of these — one for
|
|
492
|
+
* the consumer's working branch and one for the base branch the working
|
|
493
|
+
* branch was forked from — and the cleanup invariant drops the working
|
|
494
|
+
* ref once the base ref holds the same blob (single source of truth).
|
|
495
|
+
*
|
|
496
|
+
* Populated lazily — never at upload time. The first push promotes the
|
|
497
|
+
* pending upload to `workingBranchRef`; the next refresh after the PR
|
|
498
|
+
* merges promotes to `baseBranchRef`. See
|
|
499
|
+
* docs/architecture/platform.md for the full state machine.
|
|
500
|
+
*/
|
|
501
|
+
interface AssetGitRef {
|
|
502
|
+
/** Branch the asset is known to live on. */
|
|
503
|
+
branchName: string;
|
|
504
|
+
/**
|
|
505
|
+
* GitHub blob SHA at the most recent successful verification. Drives
|
|
506
|
+
* the cleanup invariant — when both refs return the same `blobSha` the
|
|
507
|
+
* working ref is redundant and gets dropped. Optional because legacy
|
|
508
|
+
* entries persisted before this field existed; consumers treat absent
|
|
509
|
+
* as "not yet verified."
|
|
510
|
+
*/
|
|
511
|
+
blobSha?: string;
|
|
512
|
+
/**
|
|
513
|
+
* Commit SHA the ref was first recorded at. Used for display
|
|
514
|
+
* ("On main · since v2.3.1") and for the "branch retargeted" detection
|
|
515
|
+
* path where the same branchName resolves to a different blob.
|
|
516
|
+
*/
|
|
517
|
+
commitSha?: string;
|
|
518
|
+
/** ISO timestamp of the last successful read of this ref. */
|
|
519
|
+
verifiedAt: string;
|
|
520
|
+
}
|
|
489
521
|
interface GlobalFileAsset {
|
|
490
522
|
id: string;
|
|
491
523
|
name: string;
|
|
@@ -497,6 +529,55 @@ interface GlobalFileAsset {
|
|
|
497
529
|
sha256?: string;
|
|
498
530
|
createdAt: string;
|
|
499
531
|
updatedAt: string;
|
|
532
|
+
/**
|
|
533
|
+
* Provenance pointer to the asset's bytes on the consumer's currently
|
|
534
|
+
* connected working branch. Set by the push flow after `updateRef`
|
|
535
|
+
* resolves with the GitHub blob sha. Dropped by the cleanup invariant
|
|
536
|
+
* when `baseBranchRef` holds the same blob. Optional — pre-1.0.9 docs
|
|
537
|
+
* and freshly-uploaded-but-unpushed assets leave it `undefined`.
|
|
538
|
+
*/
|
|
539
|
+
workingBranchRef?: AssetGitRef | null;
|
|
540
|
+
/**
|
|
541
|
+
* Provenance pointer to the asset's bytes on the base branch the
|
|
542
|
+
* working branch was forked from (usually `main`). Set by the refresh
|
|
543
|
+
* verification probe once the PR merges. Optional — assets that have
|
|
544
|
+
* never been merged leave it `undefined`.
|
|
545
|
+
*/
|
|
546
|
+
baseBranchRef?: AssetGitRef | null;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Local-only buffer recording an asset whose bytes are in IDB but have
|
|
550
|
+
* not yet been pushed to any Git ref. Keyed by `globalFileAssetId` so
|
|
551
|
+
* the desktop / web can render an "Uploaded locally" state pill and the
|
|
552
|
+
* push flow knows which slots still need to be uploaded as blobs. Dropped
|
|
553
|
+
* by the push flow after `globalAsset.markPushed` lands.
|
|
554
|
+
*/
|
|
555
|
+
interface PendingFileUpload {
|
|
556
|
+
slotId: string;
|
|
557
|
+
filename: string;
|
|
558
|
+
mimeType: string;
|
|
559
|
+
sha256: string;
|
|
560
|
+
size: number;
|
|
561
|
+
/** ISO timestamp the file was dropped into the studio. */
|
|
562
|
+
queuedAt: string;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Where a Global File Asset is referenced inside the current synced doc.
|
|
566
|
+
* Recomputed by `assetUsageAggregator` after every `commitSynced`. Used
|
|
567
|
+
* to surface "Used in N places" in the Global Assets panel, the form-data
|
|
568
|
+
* row, the binary body, and the mock-response editors, and to flag
|
|
569
|
+
* zero-use orphans for one-click cleanup.
|
|
570
|
+
*/
|
|
571
|
+
interface AssetUsage {
|
|
572
|
+
/** Request ids whose body binds this asset. */
|
|
573
|
+
requests: string[];
|
|
574
|
+
/** Mock endpoints whose responses bind this asset. */
|
|
575
|
+
mockEndpoints: Array<{
|
|
576
|
+
mockId: string;
|
|
577
|
+
endpointId: string;
|
|
578
|
+
}>;
|
|
579
|
+
/** Total reference count — denormalised for cheap badge rendering. */
|
|
580
|
+
total: number;
|
|
500
581
|
}
|
|
501
582
|
type RequestAuth = {
|
|
502
583
|
type: 'none';
|
|
@@ -900,6 +981,23 @@ interface WorkspaceLocal {
|
|
|
900
981
|
* eviction.
|
|
901
982
|
*/
|
|
902
983
|
snapshots: WorkspaceSnapshotLedger;
|
|
984
|
+
/**
|
|
985
|
+
* Pre-push buffer for Global File Asset bytes. Each entry mirrors the
|
|
986
|
+
* IDB attachment record (which stays the authoritative byte store) but
|
|
987
|
+
* is keyed by `globalFileAssetId` instead of `slotId`, making it easy
|
|
988
|
+
* for the push flow + the status-pill UI to ask "is this asset still
|
|
989
|
+
* pending upload?" without scanning IDB. Dropped per-asset after the
|
|
990
|
+
* push promotes the asset to `workingBranchRef`.
|
|
991
|
+
*/
|
|
992
|
+
pendingFileUploads?: Record<string, PendingFileUpload>;
|
|
993
|
+
/**
|
|
994
|
+
* Cross-cutting reference index for Global File Assets. Recomputed by
|
|
995
|
+
* `assetUsageAggregator` whenever `commitSynced` runs, mirroring the
|
|
996
|
+
* `secretIndex.entries[].usedIn` pattern. Local-only because it's pure
|
|
997
|
+
* cache — the truth lives in `synced.collections.requests` and
|
|
998
|
+
* `synced.mockServers`.
|
|
999
|
+
*/
|
|
1000
|
+
assetUsageIndex?: Record<string, AssetUsage>;
|
|
903
1001
|
}
|
|
904
1002
|
interface WorkspaceLocalSettings {
|
|
905
1003
|
validateOnSend: boolean;
|
|
@@ -1283,7 +1381,7 @@ declare const REQUEST_AUTH_TYPES: ReadonlyArray<RequestAuthType>;
|
|
|
1283
1381
|
* clients can group them in their UI. Keep in sync with the registry in
|
|
1284
1382
|
* `packages/mcp-server/src/tools/registry.ts`.
|
|
1285
1383
|
*/
|
|
1286
|
-
type McpToolName = 'import.curl' | 'import.openapi' | 'import.postman' | 'import.insomnia' | 'import.har' | 'generate.code' | 'workspace.list' | 'workspace.read' | 'workspace.write' | 'request.create' | 'request.read' | 'request.update' | 'request.delete' | 'folder.create' | 'folder.read' | 'folder.update' | 'folder.delete' | 'folder.export_json' | 'folder.import_json' | 'environment.create' | 'environment.read' | 'environment.update' | 'environment.delete' | 'environment.set_active' | 'environment.set_priority' | 'environment.export' | 'environment.import' | 'plan.create' | 'plan.run' | 'plan.read' | 'plan.update' | 'plan.delete' | 'plan.add_step' | 'plan.remove_step' | 'plan.reorder_steps' | 'plan.set_variables' | 'assertion.create' | 'assertion.read' | 'assertion.update' | 'assertion.delete' | 'history.list_runs' | 'history.get_run' | 'history.delete_run' | 'history.purge_by_age' | 'codebase.extract_collection' | 'prompt.create_environment' | 'prompt.create_assertion' | 'prompt.create_plan' | 'prompt.create_request' | 'prompt.update_request' | 'prompt.create_folder_tree' | 'prompt.add_plan_steps' | 'prompt.set_plan_variables' | 'prompt.create_mock_server' | 'prompt.add_mock_endpoint' | 'prompt.set_endpoint_validation_rules' | 'prompt.set_endpoint_response_rules' | 'prompt.set_endpoint_multipliers' | 'mock.create_from_openapi' | 'mock.create_from_postman' | 'mock.create_from_insomnia' | 'mock.create_manual' | 'mock.list' | 'mock.list_endpoints' | 'mock.start' | 'mock.stop' | 'mock.delete' | 'mock.add_endpoint' | 'mock.update_endpoint' | 'mock.delete_endpoint' | 'mock.set_validation_rules' | 'mock.set_response_rules' | 'mock.set_multipliers' | 'mock.import_postman_mock_collection';
|
|
1384
|
+
type McpToolName = 'import.curl' | 'import.openapi' | 'import.postman' | 'import.insomnia' | 'import.har' | 'generate.code' | 'workspace.list' | 'workspace.read' | 'workspace.write' | 'request.create' | 'request.read' | 'request.update' | 'request.delete' | 'folder.create' | 'folder.read' | 'folder.update' | 'folder.delete' | 'folder.export_json' | 'folder.import_json' | 'environment.create' | 'environment.read' | 'environment.update' | 'environment.delete' | 'environment.set_active' | 'environment.set_priority' | 'environment.export' | 'environment.import' | 'plan.create' | 'plan.run' | 'plan.read' | 'plan.update' | 'plan.delete' | 'plan.add_step' | 'plan.remove_step' | 'plan.reorder_steps' | 'plan.set_variables' | 'assertion.create' | 'assertion.read' | 'assertion.update' | 'assertion.delete' | 'history.list_runs' | 'history.get_run' | 'history.delete_run' | 'history.purge_by_age' | 'codebase.extract_collection' | 'prompt.create_environment' | 'prompt.create_assertion' | 'prompt.create_plan' | 'prompt.create_request' | 'prompt.update_request' | 'prompt.create_folder_tree' | 'prompt.add_plan_steps' | 'prompt.set_plan_variables' | 'prompt.create_mock_server' | 'prompt.add_mock_endpoint' | 'prompt.set_endpoint_validation_rules' | 'prompt.set_endpoint_response_rules' | 'prompt.set_endpoint_multipliers' | 'assets.list_files' | 'assets.create_file' | 'assets.update_file' | 'assets.delete_file' | 'mock.create_from_openapi' | 'mock.create_from_postman' | 'mock.create_from_insomnia' | 'mock.create_manual' | 'mock.list' | 'mock.list_endpoints' | 'mock.start' | 'mock.stop' | 'mock.delete' | 'mock.add_endpoint' | 'mock.update_endpoint' | 'mock.delete_endpoint' | 'mock.set_validation_rules' | 'mock.set_response_rules' | 'mock.set_multipliers' | 'mock.import_postman_mock_collection';
|
|
1287
1385
|
interface McpError {
|
|
1288
1386
|
code: 'invalid_input' | 'not_found' | 'conflict' | 'unsupported' | 'internal';
|
|
1289
1387
|
message: string;
|
|
@@ -1292,4 +1390,4 @@ interface McpError {
|
|
|
1292
1390
|
/** Helper: full enumeration of tool names — useful for the docs / config UIs. */
|
|
1293
1391
|
declare const MCP_TOOL_NAMES: ReadonlyArray<McpToolName>;
|
|
1294
1392
|
|
|
1295
|
-
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
|
1393
|
+
export { type Assertion, type AssetGitRef, type AssetUsage, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PendingFileUpload, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -486,6 +486,38 @@ interface GlobalGraphQL {
|
|
|
486
486
|
createdAt: string;
|
|
487
487
|
updatedAt: string;
|
|
488
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Pointer to a verified-good copy of a Global File Asset's bytes on a
|
|
491
|
+
* specific Git ref. Each asset can carry up to two of these — one for
|
|
492
|
+
* the consumer's working branch and one for the base branch the working
|
|
493
|
+
* branch was forked from — and the cleanup invariant drops the working
|
|
494
|
+
* ref once the base ref holds the same blob (single source of truth).
|
|
495
|
+
*
|
|
496
|
+
* Populated lazily — never at upload time. The first push promotes the
|
|
497
|
+
* pending upload to `workingBranchRef`; the next refresh after the PR
|
|
498
|
+
* merges promotes to `baseBranchRef`. See
|
|
499
|
+
* docs/architecture/platform.md for the full state machine.
|
|
500
|
+
*/
|
|
501
|
+
interface AssetGitRef {
|
|
502
|
+
/** Branch the asset is known to live on. */
|
|
503
|
+
branchName: string;
|
|
504
|
+
/**
|
|
505
|
+
* GitHub blob SHA at the most recent successful verification. Drives
|
|
506
|
+
* the cleanup invariant — when both refs return the same `blobSha` the
|
|
507
|
+
* working ref is redundant and gets dropped. Optional because legacy
|
|
508
|
+
* entries persisted before this field existed; consumers treat absent
|
|
509
|
+
* as "not yet verified."
|
|
510
|
+
*/
|
|
511
|
+
blobSha?: string;
|
|
512
|
+
/**
|
|
513
|
+
* Commit SHA the ref was first recorded at. Used for display
|
|
514
|
+
* ("On main · since v2.3.1") and for the "branch retargeted" detection
|
|
515
|
+
* path where the same branchName resolves to a different blob.
|
|
516
|
+
*/
|
|
517
|
+
commitSha?: string;
|
|
518
|
+
/** ISO timestamp of the last successful read of this ref. */
|
|
519
|
+
verifiedAt: string;
|
|
520
|
+
}
|
|
489
521
|
interface GlobalFileAsset {
|
|
490
522
|
id: string;
|
|
491
523
|
name: string;
|
|
@@ -497,6 +529,55 @@ interface GlobalFileAsset {
|
|
|
497
529
|
sha256?: string;
|
|
498
530
|
createdAt: string;
|
|
499
531
|
updatedAt: string;
|
|
532
|
+
/**
|
|
533
|
+
* Provenance pointer to the asset's bytes on the consumer's currently
|
|
534
|
+
* connected working branch. Set by the push flow after `updateRef`
|
|
535
|
+
* resolves with the GitHub blob sha. Dropped by the cleanup invariant
|
|
536
|
+
* when `baseBranchRef` holds the same blob. Optional — pre-1.0.9 docs
|
|
537
|
+
* and freshly-uploaded-but-unpushed assets leave it `undefined`.
|
|
538
|
+
*/
|
|
539
|
+
workingBranchRef?: AssetGitRef | null;
|
|
540
|
+
/**
|
|
541
|
+
* Provenance pointer to the asset's bytes on the base branch the
|
|
542
|
+
* working branch was forked from (usually `main`). Set by the refresh
|
|
543
|
+
* verification probe once the PR merges. Optional — assets that have
|
|
544
|
+
* never been merged leave it `undefined`.
|
|
545
|
+
*/
|
|
546
|
+
baseBranchRef?: AssetGitRef | null;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Local-only buffer recording an asset whose bytes are in IDB but have
|
|
550
|
+
* not yet been pushed to any Git ref. Keyed by `globalFileAssetId` so
|
|
551
|
+
* the desktop / web can render an "Uploaded locally" state pill and the
|
|
552
|
+
* push flow knows which slots still need to be uploaded as blobs. Dropped
|
|
553
|
+
* by the push flow after `globalAsset.markPushed` lands.
|
|
554
|
+
*/
|
|
555
|
+
interface PendingFileUpload {
|
|
556
|
+
slotId: string;
|
|
557
|
+
filename: string;
|
|
558
|
+
mimeType: string;
|
|
559
|
+
sha256: string;
|
|
560
|
+
size: number;
|
|
561
|
+
/** ISO timestamp the file was dropped into the studio. */
|
|
562
|
+
queuedAt: string;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Where a Global File Asset is referenced inside the current synced doc.
|
|
566
|
+
* Recomputed by `assetUsageAggregator` after every `commitSynced`. Used
|
|
567
|
+
* to surface "Used in N places" in the Global Assets panel, the form-data
|
|
568
|
+
* row, the binary body, and the mock-response editors, and to flag
|
|
569
|
+
* zero-use orphans for one-click cleanup.
|
|
570
|
+
*/
|
|
571
|
+
interface AssetUsage {
|
|
572
|
+
/** Request ids whose body binds this asset. */
|
|
573
|
+
requests: string[];
|
|
574
|
+
/** Mock endpoints whose responses bind this asset. */
|
|
575
|
+
mockEndpoints: Array<{
|
|
576
|
+
mockId: string;
|
|
577
|
+
endpointId: string;
|
|
578
|
+
}>;
|
|
579
|
+
/** Total reference count — denormalised for cheap badge rendering. */
|
|
580
|
+
total: number;
|
|
500
581
|
}
|
|
501
582
|
type RequestAuth = {
|
|
502
583
|
type: 'none';
|
|
@@ -900,6 +981,23 @@ interface WorkspaceLocal {
|
|
|
900
981
|
* eviction.
|
|
901
982
|
*/
|
|
902
983
|
snapshots: WorkspaceSnapshotLedger;
|
|
984
|
+
/**
|
|
985
|
+
* Pre-push buffer for Global File Asset bytes. Each entry mirrors the
|
|
986
|
+
* IDB attachment record (which stays the authoritative byte store) but
|
|
987
|
+
* is keyed by `globalFileAssetId` instead of `slotId`, making it easy
|
|
988
|
+
* for the push flow + the status-pill UI to ask "is this asset still
|
|
989
|
+
* pending upload?" without scanning IDB. Dropped per-asset after the
|
|
990
|
+
* push promotes the asset to `workingBranchRef`.
|
|
991
|
+
*/
|
|
992
|
+
pendingFileUploads?: Record<string, PendingFileUpload>;
|
|
993
|
+
/**
|
|
994
|
+
* Cross-cutting reference index for Global File Assets. Recomputed by
|
|
995
|
+
* `assetUsageAggregator` whenever `commitSynced` runs, mirroring the
|
|
996
|
+
* `secretIndex.entries[].usedIn` pattern. Local-only because it's pure
|
|
997
|
+
* cache — the truth lives in `synced.collections.requests` and
|
|
998
|
+
* `synced.mockServers`.
|
|
999
|
+
*/
|
|
1000
|
+
assetUsageIndex?: Record<string, AssetUsage>;
|
|
903
1001
|
}
|
|
904
1002
|
interface WorkspaceLocalSettings {
|
|
905
1003
|
validateOnSend: boolean;
|
|
@@ -1283,7 +1381,7 @@ declare const REQUEST_AUTH_TYPES: ReadonlyArray<RequestAuthType>;
|
|
|
1283
1381
|
* clients can group them in their UI. Keep in sync with the registry in
|
|
1284
1382
|
* `packages/mcp-server/src/tools/registry.ts`.
|
|
1285
1383
|
*/
|
|
1286
|
-
type McpToolName = 'import.curl' | 'import.openapi' | 'import.postman' | 'import.insomnia' | 'import.har' | 'generate.code' | 'workspace.list' | 'workspace.read' | 'workspace.write' | 'request.create' | 'request.read' | 'request.update' | 'request.delete' | 'folder.create' | 'folder.read' | 'folder.update' | 'folder.delete' | 'folder.export_json' | 'folder.import_json' | 'environment.create' | 'environment.read' | 'environment.update' | 'environment.delete' | 'environment.set_active' | 'environment.set_priority' | 'environment.export' | 'environment.import' | 'plan.create' | 'plan.run' | 'plan.read' | 'plan.update' | 'plan.delete' | 'plan.add_step' | 'plan.remove_step' | 'plan.reorder_steps' | 'plan.set_variables' | 'assertion.create' | 'assertion.read' | 'assertion.update' | 'assertion.delete' | 'history.list_runs' | 'history.get_run' | 'history.delete_run' | 'history.purge_by_age' | 'codebase.extract_collection' | 'prompt.create_environment' | 'prompt.create_assertion' | 'prompt.create_plan' | 'prompt.create_request' | 'prompt.update_request' | 'prompt.create_folder_tree' | 'prompt.add_plan_steps' | 'prompt.set_plan_variables' | 'prompt.create_mock_server' | 'prompt.add_mock_endpoint' | 'prompt.set_endpoint_validation_rules' | 'prompt.set_endpoint_response_rules' | 'prompt.set_endpoint_multipliers' | 'mock.create_from_openapi' | 'mock.create_from_postman' | 'mock.create_from_insomnia' | 'mock.create_manual' | 'mock.list' | 'mock.list_endpoints' | 'mock.start' | 'mock.stop' | 'mock.delete' | 'mock.add_endpoint' | 'mock.update_endpoint' | 'mock.delete_endpoint' | 'mock.set_validation_rules' | 'mock.set_response_rules' | 'mock.set_multipliers' | 'mock.import_postman_mock_collection';
|
|
1384
|
+
type McpToolName = 'import.curl' | 'import.openapi' | 'import.postman' | 'import.insomnia' | 'import.har' | 'generate.code' | 'workspace.list' | 'workspace.read' | 'workspace.write' | 'request.create' | 'request.read' | 'request.update' | 'request.delete' | 'folder.create' | 'folder.read' | 'folder.update' | 'folder.delete' | 'folder.export_json' | 'folder.import_json' | 'environment.create' | 'environment.read' | 'environment.update' | 'environment.delete' | 'environment.set_active' | 'environment.set_priority' | 'environment.export' | 'environment.import' | 'plan.create' | 'plan.run' | 'plan.read' | 'plan.update' | 'plan.delete' | 'plan.add_step' | 'plan.remove_step' | 'plan.reorder_steps' | 'plan.set_variables' | 'assertion.create' | 'assertion.read' | 'assertion.update' | 'assertion.delete' | 'history.list_runs' | 'history.get_run' | 'history.delete_run' | 'history.purge_by_age' | 'codebase.extract_collection' | 'prompt.create_environment' | 'prompt.create_assertion' | 'prompt.create_plan' | 'prompt.create_request' | 'prompt.update_request' | 'prompt.create_folder_tree' | 'prompt.add_plan_steps' | 'prompt.set_plan_variables' | 'prompt.create_mock_server' | 'prompt.add_mock_endpoint' | 'prompt.set_endpoint_validation_rules' | 'prompt.set_endpoint_response_rules' | 'prompt.set_endpoint_multipliers' | 'assets.list_files' | 'assets.create_file' | 'assets.update_file' | 'assets.delete_file' | 'mock.create_from_openapi' | 'mock.create_from_postman' | 'mock.create_from_insomnia' | 'mock.create_manual' | 'mock.list' | 'mock.list_endpoints' | 'mock.start' | 'mock.stop' | 'mock.delete' | 'mock.add_endpoint' | 'mock.update_endpoint' | 'mock.delete_endpoint' | 'mock.set_validation_rules' | 'mock.set_response_rules' | 'mock.set_multipliers' | 'mock.import_postman_mock_collection';
|
|
1287
1385
|
interface McpError {
|
|
1288
1386
|
code: 'invalid_input' | 'not_found' | 'conflict' | 'unsupported' | 'internal';
|
|
1289
1387
|
message: string;
|
|
@@ -1292,4 +1390,4 @@ interface McpError {
|
|
|
1292
1390
|
/** Helper: full enumeration of tool names — useful for the docs / config UIs. */
|
|
1293
1391
|
declare const MCP_TOOL_NAMES: ReadonlyArray<McpToolName>;
|
|
1294
1392
|
|
|
1295
|
-
export { type Assertion, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
|
1393
|
+
export { type Assertion, type AssetGitRef, type AssetUsage, type AttachmentRef, type AwsSigV4Auth, type BodyType, type ConnectedRepo, type ContextExtraction, DEFAULT_WORKSPACE_NAME, type DigestAuth, type EnvPriorityRef, type Environment, type EnvironmentVariable, type EnvironmentVariableOverride, type ExecutionPlan, FONT_SIZE_PERCENT_DEFAULT, FONT_SIZE_PERCENT_MAX, FONT_SIZE_PERCENT_MIN, FONT_SIZE_PERCENT_STEP, type Folder, type FolderNode, type FontFamilyId, type FormDataRow, type GitHubSession, type GlobalFileAsset, type GlobalGraphQL, type GlobalSchema, type HawkAuth, type HttpMethod, type JwtBearerAuth, type LinkedSnapshot, type LinkedWorkspace, type LocalAttachmentCacheEntry, MCP_TOOL_NAMES, type McpError, type McpToolName, type MockConditionClause, type MockConditionOp, type MockConditionScope, type MockEndpoint, type MockMultiplierSource, type MockMultiplierSourceKind, type MockParamDef, type MockRequestSchema, type MockResponseBody, type MockResponseBodyType, type MockResponseConfig, type MockResponseMultiplier, type MockResponseRule, type MockRuntime, type MockRuntimeEntry, type MockServer, type MockServerSource, type MockValidationKind, type MockValidationRule, type NtlmAuth, type OAuth2AuthCodeAuth, type OAuth2ClientCredentialsAuth, type OAuth2DeviceAuth, type OAuth2ImplicitAuth, type OAuth2PasswordAuth, type OAuth2PkceAuth, type OAuth2TokenState, type PanelId, type PendingFileUpload, type PlanRun, REQUEST_AUTH_TYPES, RUN_BODY_PREVIEW_LIMIT, type ReleaseHistory, type ReleaseVersion, type Request, type RequestAuth, type RequestAuthType, type RequestBody, type RequestOverride, type RequestOverridePatch, type RequestRun, type RetiredBranch, type SecretCryptoMeta, type SecretEntry, type SecretIndex, type SecretKeyMeta, type SecretUsage, type SyncSnapshot, type ThemeId, type ValidationResult, type WorkingBranch, type WorkspaceLocal, type WorkspaceSnapshot, type WorkspaceSnapshotLedger, type WorkspaceSnapshotTrigger, type WorkspaceSynced, coerceMockResponseBodyTypeForStatus, defaultAuthFor, envPriorityDisplayName, envPriorityKey, envPriorityRefEqual, formatBytes, generateId, getAllowedMockResponseBodyTypes, makeDefaultMockResponse, makeDefaultMockResponseBody, makeDefaultRequestSchema, normalizeAuth, parseEnvPriorityKey, safeExternalHref, utf8ByteLength, validateAwsRegion, validateEnvVarName, validateHttpHeaderName, validateJsonPath, validateJsonString, validateMockPath, validatePRTitle, validatePlanName, validatePositiveDuration, validateRegex, validateUrl };
|
package/dist/index.js
CHANGED
|
@@ -396,6 +396,10 @@ var MCP_TOOL_NAMES = [
|
|
|
396
396
|
"prompt.set_endpoint_validation_rules",
|
|
397
397
|
"prompt.set_endpoint_response_rules",
|
|
398
398
|
"prompt.set_endpoint_multipliers",
|
|
399
|
+
"assets.list_files",
|
|
400
|
+
"assets.create_file",
|
|
401
|
+
"assets.update_file",
|
|
402
|
+
"assets.delete_file",
|
|
399
403
|
"mock.create_from_openapi",
|
|
400
404
|
"mock.create_from_postman",
|
|
401
405
|
"mock.create_from_insomnia",
|