@pithy-sh/core 0.1.4 → 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/dist/address/address.d.ts +2 -0
- package/dist/address/address.js +2 -0
- package/dist/audit/auditEvent.d.ts +2 -0
- package/dist/audit/auditEvent.js +2 -0
- package/dist/audit/recorder.d.ts +2 -0
- package/dist/audit/recorder.js +2 -0
- package/dist/capability/bindings.d.ts +2 -0
- package/dist/capability/bindings.js +2 -0
- package/dist/capability/capability.d.ts +20 -0
- package/dist/capability/capability.d.ts.map +1 -1
- package/dist/capability/capability.js +2 -0
- package/dist/capability/client.d.ts +2 -0
- package/dist/capability/client.js +2 -0
- package/dist/capability/compose.d.ts +2 -0
- package/dist/capability/compose.js +2 -0
- package/dist/capability/composition.d.ts +2 -0
- package/dist/capability/composition.js +2 -0
- package/dist/capability/config.d.ts +2 -0
- package/dist/capability/config.js +2 -0
- package/dist/capability/devSecret.d.ts +2 -0
- package/dist/capability/devSecret.js +2 -0
- package/dist/capability/manifest.d.ts +63 -0
- package/dist/capability/manifest.d.ts.map +1 -1
- package/dist/capability/manifest.js +63 -1
- package/dist/capability/secretOrigin.d.ts +2 -0
- package/dist/capability/secretOrigin.js +2 -0
- package/dist/capability/settings.d.ts +2 -0
- package/dist/capability/settings.js +2 -0
- package/dist/capability/validateBindings.d.ts +2 -0
- package/dist/capability/validateBindings.js +2 -0
- package/dist/capability/vanishingKey.d.ts +2 -0
- package/dist/capability/vanishingKey.js +2 -0
- package/dist/controlPlane/audit/actions.d.ts +2 -0
- package/dist/controlPlane/audit/actions.js +2 -0
- package/dist/controlPlane/capability.d.ts +2 -0
- package/dist/controlPlane/capability.js +2 -0
- package/dist/controlPlane/config/config.d.ts +2 -0
- package/dist/controlPlane/config/config.js +2 -0
- package/dist/controlPlane/context.d.ts +2 -0
- package/dist/controlPlane/context.js +2 -0
- package/dist/controlPlane/data/connection.d.ts +2 -0
- package/dist/controlPlane/data/connection.js +2 -0
- package/dist/controlPlane/data/keyLifecycle.d.ts +2 -0
- package/dist/controlPlane/data/keyLifecycle.js +2 -0
- package/dist/controlPlane/data/replay.d.ts +2 -0
- package/dist/controlPlane/data/replay.js +2 -0
- package/dist/controlPlane/data/tables.d.ts +2 -0
- package/dist/controlPlane/data/tables.js +2 -0
- package/dist/controlPlane/discovery/adminRoute.d.ts +2 -0
- package/dist/controlPlane/discovery/adminRoute.js +2 -0
- package/dist/controlPlane/discovery/configuration.d.ts +2 -0
- package/dist/controlPlane/discovery/configuration.js +2 -0
- package/dist/controlPlane/discovery/drift.d.ts +2 -0
- package/dist/controlPlane/discovery/drift.js +2 -0
- package/dist/controlPlane/discovery/health.d.ts +2 -0
- package/dist/controlPlane/discovery/health.js +2 -0
- package/dist/controlPlane/discovery/healthSummary.d.ts +2 -0
- package/dist/controlPlane/discovery/healthSummary.js +2 -0
- package/dist/controlPlane/error/errors.d.ts +2 -0
- package/dist/controlPlane/error/errors.js +2 -0
- package/dist/controlPlane/http/cors.d.ts +2 -0
- package/dist/controlPlane/http/cors.js +2 -0
- package/dist/controlPlane/http/guard.d.ts +2 -0
- package/dist/controlPlane/http/guard.js +2 -0
- package/dist/controlPlane/http/handlers.d.ts +2 -0
- package/dist/controlPlane/http/handlers.js +2 -0
- package/dist/controlPlane/http/responses.d.ts +2 -0
- package/dist/controlPlane/http/responses.js +2 -0
- package/dist/controlPlane/http/routes.d.ts +2 -0
- package/dist/controlPlane/http/routes.js +2 -0
- package/dist/controlPlane/http/schemas.d.ts +2 -0
- package/dist/controlPlane/http/schemas.js +2 -0
- package/dist/controlPlane/http/verify.d.ts +2 -0
- package/dist/controlPlane/http/verify.js +2 -0
- package/dist/controlPlane/migrations/0001_init.d.ts +2 -0
- package/dist/controlPlane/migrations/0001_init.js +2 -0
- package/dist/controlPlane/replay/d1Guard.d.ts +2 -0
- package/dist/controlPlane/replay/d1Guard.js +2 -0
- package/dist/controlPlane/replay/guard.d.ts +2 -0
- package/dist/controlPlane/replay/guard.js +2 -0
- package/dist/controlPlane/replay/kvGuard.d.ts +2 -0
- package/dist/controlPlane/replay/kvGuard.js +2 -0
- package/dist/controlPlane/scope/scope.d.ts +2 -0
- package/dist/controlPlane/scope/scope.js +2 -0
- package/dist/controlPlane/token/base64url.d.ts +2 -0
- package/dist/controlPlane/token/base64url.js +2 -0
- package/dist/controlPlane/token/claims.d.ts +2 -0
- package/dist/controlPlane/token/claims.js +2 -0
- package/dist/controlPlane/token/digest.d.ts +2 -0
- package/dist/controlPlane/token/digest.js +2 -0
- package/dist/controlPlane/token/jws.d.ts +2 -0
- package/dist/controlPlane/token/jws.js +2 -0
- package/dist/controlPlane/token/mint.d.ts +2 -0
- package/dist/controlPlane/token/mint.js +2 -0
- package/dist/controlPlane/wire.d.ts +2 -0
- package/dist/controlPlane/wire.js +2 -0
- package/dist/createBackend.d.ts +2 -0
- package/dist/createBackend.js +2 -0
- package/dist/createEntrypoint.d.ts +2 -0
- package/dist/createEntrypoint.d.ts.map +1 -1
- package/dist/createEntrypoint.js +3 -0
- package/dist/data/boundParameters.d.ts +2 -0
- package/dist/data/boundParameters.js +2 -0
- package/dist/data/codecs.d.ts +2 -0
- package/dist/data/codecs.js +2 -0
- package/dist/data/cursor.d.ts +2 -0
- package/dist/data/cursor.js +2 -0
- package/dist/data/databases.d.ts +2 -0
- package/dist/data/databases.js +2 -0
- package/dist/data/db.d.ts +2 -0
- package/dist/data/db.js +2 -0
- package/dist/data/withD1Retry.d.ts +2 -0
- package/dist/data/withD1Retry.js +2 -0
- package/dist/entitlement/entitlement.d.ts +2 -0
- package/dist/entitlement/entitlement.js +2 -0
- package/dist/entitlement/gateScan.d.ts +2 -0
- package/dist/entitlement/gateScan.js +2 -0
- package/dist/entitlement/require.d.ts +2 -0
- package/dist/entitlement/require.js +2 -0
- package/dist/env/ambient.d.ts +2 -0
- package/dist/env/ambient.js +2 -0
- package/dist/env/ci.d.ts +2 -0
- package/dist/env/ci.js +2 -0
- package/dist/env/stem.d.ts +2 -0
- package/dist/env/stem.js +2 -0
- package/dist/error/cause.d.ts +68 -0
- package/dist/error/cause.d.ts.map +1 -1
- package/dist/error/cause.js +94 -1
- package/dist/error/client.d.ts +2 -0
- package/dist/error/client.js +2 -0
- package/dist/error/extend.d.ts +2 -0
- package/dist/error/extend.js +2 -0
- package/dist/error/http.d.ts +2 -0
- package/dist/error/http.js +2 -0
- package/dist/error/payload.d.ts +2 -0
- package/dist/error/payload.js +2 -0
- package/dist/error/pithyError.d.ts +2 -0
- package/dist/error/pithyError.js +2 -0
- package/dist/error/terminal.d.ts +2 -0
- package/dist/error/terminal.js +2 -0
- package/dist/http/authContext.d.ts +2 -0
- package/dist/http/authContext.js +2 -0
- package/dist/http/routeContract.d.ts +2 -0
- package/dist/http/routeContract.js +2 -0
- package/dist/http/sameOrigin.d.ts +2 -0
- package/dist/http/sameOrigin.js +2 -0
- package/dist/http/signedWebhook.d.ts +2 -0
- package/dist/http/signedWebhook.js +2 -0
- package/dist/http/validation.d.ts +2 -0
- package/dist/http/validation.js +2 -0
- package/dist/http/verification.d.ts +2 -0
- package/dist/http/verification.js +2 -0
- package/dist/i18n/acceptLanguage.d.ts +2 -0
- package/dist/i18n/acceptLanguage.js +2 -0
- package/dist/i18n/catalog.d.ts +2 -0
- package/dist/i18n/catalog.js +2 -0
- package/dist/i18n/locale.d.ts +2 -0
- package/dist/i18n/locale.js +2 -0
- package/dist/i18n/localeMarker.d.ts +2 -0
- package/dist/i18n/localeMarker.js +2 -0
- package/dist/i18n/match.d.ts +2 -0
- package/dist/i18n/match.js +2 -0
- package/dist/i18n/registry.d.ts +2 -0
- package/dist/i18n/registry.js +2 -0
- package/dist/i18n/translator.d.ts +2 -0
- package/dist/i18n/translator.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/kv/kv.d.ts +2 -0
- package/dist/kv/kv.js +2 -0
- package/dist/kv/namespaces.d.ts +2 -0
- package/dist/kv/namespaces.js +2 -0
- package/dist/logger/local.d.ts +2 -0
- package/dist/logger/local.js +2 -0
- package/dist/logger/logger.d.ts +2 -0
- package/dist/logger/logger.js +2 -0
- package/dist/logger/record.d.ts +2 -0
- package/dist/logger/record.js +2 -0
- package/dist/logger/worker.d.ts +2 -0
- package/dist/logger/worker.js +2 -0
- package/dist/migrations/batch.d.ts +2 -0
- package/dist/migrations/batch.js +2 -0
- package/dist/migrations/bookkeeping.d.ts +2 -0
- package/dist/migrations/bookkeeping.js +2 -0
- package/dist/migrations/owner.d.ts +2 -0
- package/dist/migrations/owner.js +2 -0
- package/dist/migrations/registry.d.ts +2 -0
- package/dist/migrations/registry.js +2 -0
- package/dist/migrations/runner.d.ts +2 -0
- package/dist/migrations/runner.js +2 -0
- package/dist/naming/domains.d.ts +2 -0
- package/dist/naming/domains.js +2 -0
- package/dist/naming/environment.d.ts +2 -0
- package/dist/naming/environment.js +2 -0
- package/dist/naming/feature.d.ts +2 -0
- package/dist/naming/feature.js +2 -0
- package/dist/naming/limits.d.ts +2 -0
- package/dist/naming/limits.js +2 -0
- package/dist/naming/provisionScope.d.ts +2 -0
- package/dist/naming/provisionScope.js +2 -0
- package/dist/naming/resource.d.ts +2 -0
- package/dist/naming/resource.js +2 -0
- package/dist/naming/resourceNames.d.ts +2 -0
- package/dist/naming/resourceNames.js +2 -0
- package/dist/naming/segment.d.ts +2 -0
- package/dist/naming/segment.js +2 -0
- package/dist/projection/asRead.d.ts +2 -0
- package/dist/projection/asRead.js +2 -0
- package/dist/projection/published.d.ts +2 -0
- package/dist/projection/published.js +2 -0
- package/dist/schema/describedness.d.ts +2 -0
- package/dist/schema/describedness.js +2 -0
- package/dist/seed/compose.d.ts +2 -0
- package/dist/seed/compose.js +2 -0
- package/dist/seed/devLogin.d.ts +2 -0
- package/dist/seed/devLogin.js +2 -0
- package/dist/seed/exampleIdentities.d.ts +2 -0
- package/dist/seed/exampleIdentities.js +2 -0
- package/dist/seed/metadata.d.ts +2 -0
- package/dist/seed/metadata.js +2 -0
- package/dist/seed/seed.d.ts +2 -0
- package/dist/seed/seed.js +2 -0
- package/dist/seed/seededRows.d.ts +2 -0
- package/dist/seed/seededRows.js +2 -0
- package/dist/seed/writeD1.d.ts +2 -0
- package/dist/seed/writeD1.js +2 -0
- package/dist/seed/writeKv.d.ts +2 -0
- package/dist/seed/writeKv.js +2 -0
- package/dist/semver/semver.d.ts +2 -0
- package/dist/semver/semver.js +2 -0
- package/dist/text/comments.d.ts +2 -0
- package/dist/text/comments.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/dist/worker/health.d.ts +2 -0
- package/dist/worker/health.js +2 -0
- package/dist/worker/identity.d.ts +2 -0
- package/dist/worker/identity.js +2 -0
- package/dist/workflow/bindings.d.ts +2 -0
- package/dist/workflow/bindings.js +2 -0
- package/dist/workflow/dispatch.d.ts +2 -0
- package/dist/workflow/dispatch.js +2 -0
- package/dist/workflow/dispatchRoute.d.ts +2 -0
- package/dist/workflow/dispatchRoute.js +2 -0
- package/dist/workflow/faults.d.ts +2 -0
- package/dist/workflow/faults.js +2 -0
- package/dist/workflow/host.d.ts +2 -0
- package/dist/workflow/host.js +2 -0
- package/dist/workflow/hostEntry.d.ts +2 -0
- package/dist/workflow/hostEntry.js +2 -0
- package/dist/workflow/hostEnv.d.ts +2 -0
- package/dist/workflow/hostEnv.js +2 -0
- package/dist/workflow/loopback.d.ts +2 -0
- package/dist/workflow/loopback.js +2 -0
- package/dist/workflow/naming.d.ts +2 -0
- package/dist/workflow/naming.js +2 -0
- package/dist/workflow/register.d.ts +2 -0
- package/dist/workflow/register.js +2 -0
- package/dist/workflow/schemas.d.ts +2 -0
- package/dist/workflow/schemas.js +2 -0
- package/dist/workflow/spec.d.ts +2 -0
- package/dist/workflow/spec.js +2 -0
- package/dist/workflow/stepMessage.d.ts +2 -0
- package/dist/workflow/stepMessage.js +2 -0
- package/package.json +2 -2
- package/src/capability/capability.ts +18 -0
- package/src/capability/manifest.ts +94 -0
- package/src/createEntrypoint.ts +5 -0
- package/src/error/cause.ts +116 -0
- package/src/version.generated.ts +1 -1
package/dist/naming/limits.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { FEATURE_ENVIRONMENT, assertValidEnvironment } from "./environment.js";
|
|
2
4
|
import { featureResourceName, featureSecretEntryName, featureWorkerName } from "./feature.js";
|
|
3
5
|
import { resourceNames } from "./resourceNames.js";
|
package/dist/naming/resource.js
CHANGED
package/dist/naming/segment.d.ts
CHANGED
package/dist/naming/segment.js
CHANGED
package/dist/seed/compose.d.ts
CHANGED
package/dist/seed/compose.js
CHANGED
package/dist/seed/devLogin.d.ts
CHANGED
package/dist/seed/devLogin.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The canonical example identities — a small, fixed cast of demo users that every capability's
|
|
3
5
|
* example seed set references. It is what makes `pithy seed` (with `seed.includeExamples`) fill a
|
package/dist/seed/metadata.d.ts
CHANGED
package/dist/seed/metadata.js
CHANGED
package/dist/seed/seed.d.ts
CHANGED
package/dist/seed/seed.js
CHANGED
package/dist/seed/seededRows.js
CHANGED
package/dist/seed/writeD1.d.ts
CHANGED
package/dist/seed/writeD1.js
CHANGED
package/dist/seed/writeKv.d.ts
CHANGED
package/dist/seed/writeKv.js
CHANGED
package/dist/semver/semver.d.ts
CHANGED
package/dist/semver/semver.js
CHANGED
package/dist/text/comments.d.ts
CHANGED
package/dist/text/comments.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/core";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.2.0";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/core";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.
|
|
7
|
+
const PACKAGE_VERSION = "0.2.0";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
package/dist/worker/health.d.ts
CHANGED
package/dist/worker/health.js
CHANGED
package/dist/worker/identity.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { ForbiddenError, PithyError } from "../error/pithyError.js";
|
|
2
4
|
import { validationHook } from "../http/validation.js";
|
|
3
5
|
import { WORKFLOW_DISPATCH_ROUTE, WorkflowDispatchParams, WorkflowDispatchRequest } from "./schemas.js";
|
package/dist/workflow/faults.js
CHANGED
package/dist/workflow/host.d.ts
CHANGED
package/dist/workflow/host.js
CHANGED
package/dist/workflow/hostEnv.js
CHANGED
package/dist/workflow/naming.js
CHANGED
package/dist/workflow/schemas.js
CHANGED
package/dist/workflow/spec.d.ts
CHANGED
package/dist/workflow/spec.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
28
|
+
"build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
29
29
|
"typecheck": "tsc -p tsconfig.json",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:node": "vitest run --project=node",
|
|
@@ -410,6 +410,24 @@ export interface Capability<
|
|
|
410
410
|
* every {@link Capability.secretRegistry} slice here into one combined registry.
|
|
411
411
|
*/
|
|
412
412
|
compose?: (context: CapabilityComposeContext) => void;
|
|
413
|
+
/**
|
|
414
|
+
* Optional **entrypoint** hook, called once by {@link createEntrypoint} with every composed
|
|
415
|
+
* capability, after {@link Capability.compose} has run for all of them.
|
|
416
|
+
*
|
|
417
|
+
* **The distinction from `compose` is the audience, and it is load-bearing.** `createBackend` assembles
|
|
418
|
+
* a backend for anything that wants to look at one, and the CLI is a caller: `pithy ui` builds the app
|
|
419
|
+
* to read its route tree, and `composeCapabilities` runs every `compose` hook to read what a capability
|
|
420
|
+
* reports. `createEntrypoint` is the other thing — it is only ever called by a Worker's own
|
|
421
|
+
* `src/index.ts`, so a throw from here is a Worker that does not serve, and nothing else.
|
|
422
|
+
*
|
|
423
|
+
* So this is where a capability refuses a composition that must never take a request but must still
|
|
424
|
+
* *load*, because the adopter's own toolchain has to keep working on the project while they fix it.
|
|
425
|
+
* `@pithy-sh/payments` is the case it exists for: `pithy add` scaffolds an unimplemented
|
|
426
|
+
* `resolveSubject`, every CLI command keeps loading that config, and the Worker refuses to boot until
|
|
427
|
+
* the adopter has written it (#500). A check that can be made at composition still belongs at
|
|
428
|
+
* composition — earlier is better, and a refusal the CLI can raise is a refusal an adopter sees sooner.
|
|
429
|
+
*/
|
|
430
|
+
boot?: (context: CapabilityComposeContext) => void;
|
|
413
431
|
/** Mounts a Hono sub-router. */
|
|
414
432
|
routes?: (app: Hono<PithyHonoEnv>) => void;
|
|
415
433
|
/** Composable middleware (e.g. turnstile(), requireAuth()). */
|