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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Categories: **Added** · **Changed** · **Fixed** · **Removed** · **Internal**

### Fixed

- **Experience collection public API gap**: `ExperienceLog`, its entry/options types, and `createObjectiveVerifierHook` are now exported from the documented `@rdk-moss/agent/memory` and `/core` subpaths, so clean downstream builds no longer depend on private source paths.

- **Workspace hygiene now checks Git tracking semantics**: the root `AGENTS.md` guard queries the Git index instead of only testing whether a file exists, so a local untracked or ignored instruction file can no longer make the fresh-clone requirement pass incorrectly.

- **pre-push gates could never block**: the hook piped each check through `tail` without `pipefail`, so the pipeline exit status was always tail's 0 and every gate silently passed even when the underlying check failed. The hook now runs `set -e -o pipefail`; verified by injecting a type error (hook exits 1) and removing it (hook passes).

- **Trusted self-evolution rollback and experiment hardening**: rollback now removes only coordinator-owned artifacts instead of recursively deleting a learned-skill directory, validates backup filenames while retaining legacy backup compatibility, preserves both publication and restoration errors, reuses Skill registries, parses generated Skill documents without a multiline-regex dependency, validates experiment thresholds, and uses a stable 32-bit A/B allocation sample. ISP tuning captures now use an isolated run directory with explicit convergence and timeout parameters.
Expand Down
4 changes: 4 additions & 0 deletions packages/moss-agent/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export type {
ToolApprovalRequest,
ToolApprovalDecision,
} from './agent/index.js';
export {
createObjectiveVerifierHook,
type ObjectiveVerifierDeps,
} from './tools/objective-verifier-hook.js';
export { CommandQueueRegistry } from './agent/index.js';
export type { EnqueueOpts } from './agent/index.js';
export { MossAgent } from './agent/index.js';
Expand Down
6 changes: 6 additions & 0 deletions packages/moss-agent/src/memory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export {
export { cosineSimilarity, hybridScore } from './memory-embedding.js';
export type { MemoryEmbeddingProvider, EmbeddedMemoryEntry } from './memory-embedding.js';

export {
ExperienceLog,
type ExperienceEntry,
type ExperienceLogOptions,
} from './experience-log.js';

export {
LearningEventLog,
type LearningEvent,
Expand Down
8 changes: 8 additions & 0 deletions packages/moss-agent/test/public-experience-api.spec.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import assert from 'node:assert/strict';
import { createObjectiveVerifierHook } from '../dist/core/index.js';
import { ExperienceLog } from '../dist/memory/index.js';

assert.equal(typeof ExperienceLog, 'function');
assert.equal(typeof createObjectiveVerifierHook, 'function');

console.log('[PASS] public experience collection APIs are exported from package subpaths');
8 changes: 7 additions & 1 deletion scripts/check-workspace-hygiene.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
import fs from 'node:fs';
import path from 'node:path';
import { spawnSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';

const repoRoot = path.resolve(fileURLToPath(new URL('..', import.meta.url)));
Expand Down Expand Up @@ -96,7 +97,12 @@ if (!expectedNode) {
// fresh clone gives coding agents project instructions (architecture
// constraints, dependency direction, validation routes) instead of zero
// context. Local-only instruction files (gitignored) do not count.
if (!fs.existsSync(path.join(repoRoot, 'AGENTS.md'))) {
const trackedAgentsFile = spawnSync(
'git',
['ls-files', '--error-unmatch', '--', 'AGENTS.md'],
{ cwd: repoRoot, encoding: 'utf8', windowsHide: true },
);
if (trackedAgentsFile.status !== 0) {
findings.push('AGENTS.md: missing root agent instructions file (must be tracked, not gitignored)');
}

Expand Down