Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.swift]
indent_style = space
indent_size = 2

[*.{md,yml,yaml,json}]
indent_style = space
indent_size = 2

[.swift-format]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
68 changes: 0 additions & 68 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

19 changes: 4 additions & 15 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@

-

## Scope

-

## Validation

- [ ] `make check`
- [ ] Tests added or updated for behavior changes, or not needed
- [ ] Documentation or `CHANGELOG.md` updated if needed
- [ ] Documentation or `CHANGELOG.md` updated if public behavior changed

## Checklist

- [ ] Public API changes are intentional and documented.
- [ ] AppRuntimeKit scope and host-app responsibility boundaries are respected.
- [ ] No generated build output, dependency caches, local state, secrets, tokens, private keys,
personal data, local paths, private app metadata, or app-specific internal references are
included.

## Notes

-
- [ ] Public API changes are intentional.
- [ ] Host-app responsibilities stay outside this package.
- [ ] No generated output, dependency caches, local state, secrets, private logs, local paths, or app-internal references are included.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
.build/
.swiftpm/
.DS_Store
.envrc
.env
.env.*
!.env.example
Package.resolved
*.doccarchive
DerivedData/
xcuserdata/
*.xcodeproj
*.xcworkspace
*.xcresult
*.log
55 changes: 49 additions & 6 deletions .swift-format
Original file line number Diff line number Diff line change
@@ -1,11 +1,54 @@
{
"indentation": {
"spaces": 2
},
"lineLength": 100,
"maximumBlankLines": 1,
"respectsExistingLineBreaks": true,
"rules": {
"AllPublicDeclarationsHaveDocumentation": true,
"BeginDocumentationCommentWithOneLineSummary": true,
"NeverForceUnwrap": true,
"NeverUseForceTry": true,
"NeverUseImplicitlyUnwrappedOptionals": true,
"ValidateDocumentationComments": true
"AllPublicDeclarationsHaveDocumentation": false,
"AlwaysUseLiteralForEmptyCollectionInit": false,
"AlwaysUseLowerCamelCase": false,
"AmbiguousTrailingClosureOverload": false,
"AvoidRetroactiveConformances": false,
"BeginDocumentationCommentWithOneLineSummary": false,
"DoNotUseSemicolons": false,
"DontRepeatTypeInStaticProperties": false,
"FileScopedDeclarationPrivacy": false,
"FullyIndirectEnum": false,
"GroupNumericLiterals": false,
"IdentifiersMustBeASCII": false,
"NeverForceUnwrap": false,
"NeverUseForceTry": false,
"NeverUseImplicitlyUnwrappedOptionals": false,
"NoAccessLevelOnExtensionDeclaration": false,
"NoAssignmentInExpressions": false,
"NoBlockComments": false,
"NoCasesWithOnlyFallthrough": false,
"NoEmptyLinesOpeningClosingBraces": false,
"NoEmptyTrailingClosureParentheses": false,
"NoLabelsInCasePatterns": false,
"NoLeadingUnderscores": false,
"NoParensAroundConditions": false,
"NoPlaygroundLiterals": false,
"NoVoidReturnOnFunctionSignature": false,
"OmitExplicitReturns": false,
"OneCasePerLine": false,
"OneVariableDeclarationPerLine": false,
"OnlyOneTrailingClosureArgument": false,
"OrderedImports": false,
"ReplaceForEachWithForLoop": false,
"ReturnVoidInsteadOfEmptyTuple": false,
"TypeNamesShouldBeCapitalized": false,
"UseEarlyExits": false,
"UseExplicitNilCheckInConditions": false,
"UseLetInEveryBoundCaseVariable": false,
"UseShorthandTypeNames": false,
"UseSingleLinePropertyGetter": false,
"UseSynthesizedInitializer": false,
"UseTripleSlashForDocumentationComments": false,
"UseWhereClausesInForLoops": false,
"ValidateDocumentationComments": false
},
"version": 1
}
52 changes: 49 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,60 @@
# Changelog

All notable user-facing changes to AppRuntimeKit are documented in this file.
All notable user-facing changes to AppRuntimeKit will be documented in this file.

Released versions follow semantic versioning.

## [0.1.0]
## [Unreleased]

No changes yet.

## [0.2.0] - 2026-07-12

### Changed

- Updated installation guidance to use the 0.2.0 release line.
- Standardized runtime events on `ApplicationRuntimeEvent.Lifecycle` so event filtering and
documentation use the same lifecycle vocabulary.
- Introduced `ApplicationDuplicateActivationCoordinator` because the package only coordinates duplicate-process
activation requests; ownership locks and duplicate-process exit policy remain host-app
responsibilities.
- Added `ApplicationTerminationMode` as the explicit public termination mode contract, and
standardized rejected activation, opening, and termination requests on `requestRejected`.
- Merged duplicate `ApplicationActivationError` and `ApplicationTerminationError` public contracts
into `ApplicationRuntimeRequestError` because activation and termination use the same runtime
request failure taxonomy.
- Split termination lookup validation into `applicationTerminated`,
`applicationBundleIdentifierUnavailable`, and `applicationBundleIdentifierMismatch` instead of
collapsing those request failures into `applicationNotFound`.
- Added `invalidProcessIdentifier` so invalid caller input is no longer reported as a missing
application.
- Added process-identifier termination with expected bundle-identifier validation, matching the
activation API and protecting callers from acting on a reused process identifier.
- Standardized activation, opening, and termination public result contracts on generic
`ApplicationRequestResult<Failure: Error>` with `requestAccepted` and `failed` cases so all
request outcomes share one public result vocabulary.
- Renamed `ApplicationOpenError` to `ApplicationOpeningError` so opening request errors use noun
terminology matching activation and termination contracts.
- Consolidated runtime event waiting APIs and clarified their public documentation examples.
- Moved application lifecycle event observation behind an internal event-source seam so tests no
longer depend on live `NSWorkspace` notifications or running applications.
- Split runtime facade, query, and live-lookup implementation into focused source files, and
consolidated identical synchronous `NSWorkspace.open` dependency seams.
- Moved duplicate-process activation request distributed notifications behind an internal
notification-center adapter and covered the adapter contract with fake-center tests.
- Clarified that AppRuntimeKitAppKit owns URL, file, and application opening request validation.
- Removed unintended serialization and raw-value contracts, limited `CaseIterable` to lifecycle
and mode enumerations, and retained `Equatable` and `Hashable` only where they support result
handling.
- Expanded public API tests for AppRuntimeKit and AppRuntimeKitAppKit.
- Added README links to release notes.
- Clarified that security updates target the latest released version.

## [0.1.0] - 2026-06-01

### Added

- Initial public release of the `AppRuntimeKit` product.
- Added application process snapshots, runtime query/open/activate/terminate/event APIs, and
duplicate-instance activation request coordination.
duplicate-process activation request coordination.
- Added README and DocC documentation for the public API.
46 changes: 4 additions & 42 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,13 @@
# Contributing

Thank you for your interest in improving AppRuntimeKit.

## Scope

AppRuntimeKit focuses on small macOS application process snapshots, AppKit-backed
current/running/frontmost application queries, application bundle URL resolution,
application activation and termination, application opening, application lifecycle
events, and duplicate-instance activation request coordination. Host-app
concerns such as UI, persistence, permission onboarding, analytics, telemetry,
release packaging, and product policy should stay outside this package.

Keep changes focused. Avoid bundling unrelated refactors, formatting-only
rewrites, and behavior changes in the same pull request.

## Development

Local development commands use `make`.

Run the full local check before opening a pull request:
Run the package check before submitting changes:

```sh
make check
```

For focused local work, run checks separately:

```sh
make format
make lint
make test
make build
make docc
```

## Pull Requests

Before submitting a pull request:

- Keep the public API surface minimal and documented.
- Add or update tests for behavior changes.
- Update README, DocC, or `CHANGELOG.md` when user-facing behavior changes.
- Do not commit generated build output, dependency caches, editor state, local
tool state, secrets, tokens, private keys, personal data, local paths, private
app metadata, or app-specific internal references.
Keep changes focused. Update README.md or CHANGELOG.md when public behavior changes.

## Security
Do not commit generated output, dependency caches, local tool state, secrets, tokens, private keys, personal data, local paths, private app metadata, or app-specific internal references.

Do not report vulnerabilities in public issues, pull requests, or discussions.
Follow [SECURITY.md](SECURITY.md) instead.
Report vulnerabilities privately. See SECURITY.md.
Loading