@foss.global/interfaces

Shared TypeScript DTOs and TypedRequest contracts for the foss.global Git platform ecosystem.

This package intentionally contains contracts only. Runtime forge adapters belong in @foss.global/codefeed, and the Git storage/protocol engine belongs in @foss.global/gitmanager.

Issue Reporting and Security

For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.

Install

pnpm add @foss.global/interfaces

Usage

import type { data, requests } from '@foss.global/interfaces';

const repo: data.IPublicRepo = {
  id: 1,
  org: 'foss.global',
  name: 'interfaces',
  slug: 'foss.global/interfaces',
  orgAvatarUrl: '',
  description: 'Shared contracts',
  language: 'TypeScript',
  htmlUrl: 'https://code.foss.global/foss.global/interfaces',
  cloneUrl: 'https://code.foss.global/foss.global/interfaces.git',
  sshUrl: 'ssh://git@code.foss.global:29419/foss.global/interfaces.git',
  starsCount: 0,
  forksCount: 0,
  watchersCount: 0,
  openIssuesCount: 0,
  openPrCount: 0,
  releaseCount: 0,
  size: 0,
  defaultBranch: 'main',
  updatedAt: new Date().toISOString(),
  createdAt: new Date().toISOString(),
  archived: false,
  topics: [],
};

type PublicOverviewRequest = requests.IReq_PublicOverview;

Runner and CI contracts

Runner protocol v1 is exposed through runnerProtocolVersion. The package root and the data namespace both export the complete runner and CI DTO set:

import {
  runnerProtocolVersion,
  type IClaimJobResponse,
  type ICiEnqueueJobRequest,
  type IRegisterRunnerRequest,
} from '@foss.global/interfaces';

const registration: IRegisterRunnerRequest = {
  registrationRequestId: 'registration-1',
  protocolVersion: runnerProtocolVersion,
  runnerVersion: '0.1.0',
  name: 'linux-amd64-1',
  labels: ['linux', 'amd64'],
  capabilities: {
    executor: 'oci',
    runtime: 'docker',
    networks: ['none', 'bridge'],
    sourceArchives: ['tar.gz'],
    artifacts: false,
    caches: false,
    serviceContainers: false,
  },
};

const enqueue: ICiEnqueueJobRequest = {
  idempotencyKey: 'build-main-1',
  tenantId: 'foss.global',
  repositoryId: 'foss.global/interfaces',
  requiredLabels: ['linux', 'amd64'],
  job: {
    image: 'node:24',
    command: ['pnpm', 'test'],
    network: 'none',
  },
};

type ClaimedJob = IClaimJobResponse;

The runner lifecycle contracts cover registration, sessions, runner and job heartbeats, claim/lease identity, fencing tokens, ordered log chunks, completion, abandonment, and recovery. The CI control-plane contracts cover job enqueue and summaries, log pages, cancellation, and runner drain state.

Protocol v1 describes OCI execution with Docker or Podman and tar.gz source archives. Artifacts, caches, and service containers are explicitly unsupported in the v1 capability shape. Supported job network modes are none and bridge; the execution service remains responsible for enforcing the advertised capability.

Forge inventory contracts

IForgeInventoryReport, IForgeInventoryPage<TItem>, IForgeInventoryNamespace, IForgeInventoryRepository and IForgeInventoryIssue describe operator inventory observations. They are exported from both the package root and data. This package supplies types; it does not scan a forge or validate network responses.

Stable provider identifiers are opaque strings qualified by instance and ID namespace. Mutable paths remain separate segment arrays, preserving GitLab subgroups and literal hyphens. A source without a stable identifier reports an unresolved identity. URLs must be credential-free, and inventory responses need operator authorization rather than anonymous public exposure.

Issue observations separate the provider row ID from its repository-local number (GitLab iid) and retain the repository identity. They preserve empty body text, unknown metadata, open/closed state, provider issue classification, confidentiality, reported author identity and provider content timestamps. The reported author does not prove original attribution for previously imported issues. Comments, labels, milestones, assignees, attachments and history require their own inventory and preservation work; this metadata DTO does not claim that those collections or external writes are implemented.

Every canonical entity class has an explicit capability and collection result, including classes not inspected or unavailable. Additional provider features have their own entries. enumerated means the selected collection was exhausted for its recorded visibility scope; a public or caller-visible live scan does not establish a complete frozen migration inventory. Page continuation, exhaustion, and interrupted enumeration have distinct discriminated shapes.

Counts and byte quantities use nonnegative decimal strings to avoid JSON integer precision loss. Unknown size differs from zero, and estimated repository storage size is not the size of a future Git push. Runtime adapters must validate values, scope consistency, capability/result agreement, cursor binding, diagnostics, and authorization. These DTOs do not establish replication authority, historical import fidelity, checksummed manifests, or durable recovery checkpoints.

Exports

  • data: public DTOs for users, organizations, repositories, contents, commits, diffs, releases, issues, activity, news, stats, codefeed commit results, GitManager repository/read API results, and runner/CI contracts.
  • requests: TypedRequest contracts for codefeed, publicOverview, publicOrg, publicRepo, publicFile, and publicCommits.
  • Barrel exports: all public data and request interfaces are also exported from the package root.

Testing

pnpm test
pnpm run build

This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license file.

Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.

Trademarks

This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.

Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.

Company Information

Task Venture Capital GmbH
Registered at District Court Bremen HRB 35230 HB, Germany

For any legal inquiries or further information, please contact us via email at hello@task.vc.

By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

S
Description
No description provided
Readme
479 KiB
Languages
TypeScript 100%