Merge master into macOS CUA
This commit is contained in:
commit
220cd03bea
1227 files changed
+48993
-7929
No files matched your search
@@ -0,0 +1,71 @@
|
||||
import { spawnSync } from 'node:child_process'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import yaml from 'js-yaml'
|
||||
import { expect, it } from 'vitest'
|
||||
|
||||
const workflow = yaml.load(readFileSync(resolve(import.meta.dirname, '../.github/workflows/desktop-publish.yml'), 'utf8')) as {
|
||||
on: Record<string, unknown>
|
||||
permissions: Record<string, string>
|
||||
jobs: Record<string, {
|
||||
defaults?: unknown
|
||||
needs?: string | string[]
|
||||
env?: Record<string, string>
|
||||
if?: string
|
||||
environment?: string
|
||||
'runs-on': string | string[]
|
||||
steps: Array<{ id?: string; if?: string; uses?: string; run?: string; env?: Record<string, string>; with?: Record<string, unknown> }>
|
||||
}>
|
||||
}
|
||||
|
||||
it('selects packages manually and gates production secrets with the production Environment', () => {
|
||||
expect(Object.keys(workflow.on)).toEqual(['workflow_dispatch'])
|
||||
expect(workflow.on.workflow_dispatch).toMatchObject({ inputs: {
|
||||
package_run_id: { type: 'string', required: true },
|
||||
package_run_attempt: { type: 'string', required: false, default: '' },
|
||||
} })
|
||||
expect(workflow.permissions).toEqual({ contents: 'read', actions: 'read' })
|
||||
expect(workflow.jobs.route?.if).toBeUndefined()
|
||||
const publish = workflow.jobs.publish!
|
||||
expect(publish.defaults).toBeUndefined()
|
||||
expect(publish.steps.find(step => step.id === 'key')?.run).toBe('node apps/desktop/scripts/read-desktop-app-key.mjs')
|
||||
expect(publish.if).toBeUndefined()
|
||||
expect(publish['runs-on']).toEqual(['self-hosted', '${{ needs.route.outputs.runner }}'])
|
||||
expect(publish.environment).toBe("${{ needs.prepare.outputs.preset == 'production' && 'desktop-production' || 'desktop-test' }}")
|
||||
const ids = publish.steps.map(step => step.id)
|
||||
expect(ids.indexOf('check')).toBeLessThan(ids.indexOf('key'))
|
||||
expect(ids.indexOf('key')).toBeLessThan(ids.indexOf('app'))
|
||||
expect(ids.indexOf('app')).toBeLessThan(ids.indexOf('publish'))
|
||||
for (const id of ['key', 'app']) expect(publish.steps.find(step => step.id === id)?.if)
|
||||
.toBe("needs.prepare.outputs.preset == 'production'")
|
||||
expect(publish.steps.find(step => step.id === 'app')?.with).toMatchObject({ 'permission-contents': 'write' })
|
||||
expect(publish.steps.find(step => step.id === 'publish')?.env?.DESKTOP_TAG_TOKEN).toBe('${{ steps.app.outputs.token }}')
|
||||
})
|
||||
|
||||
|
||||
it('prepares an approval digest without an Environment and binds the approved job to it', () => {
|
||||
const prepare = workflow.jobs.prepare!
|
||||
const publish = workflow.jobs.publish!
|
||||
expect(prepare.environment).toBeUndefined()
|
||||
expect(prepare.steps.find(step => step.id === 'local')?.run).toContain('resolve-retained-desktop-publish-ci.ts')
|
||||
expect(prepare.steps.find(step => step.id === 'check')?.env?.DESKTOP_PUBLISH_ROUTE).toBe('${{ steps.local.outputs.route }}')
|
||||
expect(publish.env?.DESKTOP_PUBLISH_ROUTE).toBe('${{ needs.prepare.outputs.route }}')
|
||||
expect(prepare.steps.find(step => step.id === 'check')?.run).toContain('--check')
|
||||
expect(prepare.steps.some(step => step.id === 'key' || step.id === 'app')).toBe(false)
|
||||
expect(publish.needs).toEqual(['route', 'prepare'])
|
||||
expect(publish.env?.DESKTOP_APPROVED_PACKAGE).toBe('${{ needs.prepare.outputs.approval }}')
|
||||
})
|
||||
|
||||
|
||||
it('rejects non-master dispatch before scheduling a self-hosted job', () => {
|
||||
const command = workflow.jobs.route!.steps[0]!.run!
|
||||
expect(command.startsWith('node -e "')).toBe(true)
|
||||
const program = command.slice('node -e "'.length, -1)
|
||||
for (const ref of ['refs/heads/master', 'refs/heads/stale-feature']) {
|
||||
const result = spawnSync(process.execPath, ['-e', program], { env: { ...process.env, GITHUB_REF: ref }, encoding: 'utf8' })
|
||||
expect(result.signal).toBeNull()
|
||||
expect(result.error).toBeUndefined()
|
||||
expect(result.status).toBe(ref === 'refs/heads/master' ? 0 : 1)
|
||||
if (result.status !== 0) expect(result.stderr).toContain('must be dispatched from master')
|
||||
}
|
||||
})
|
||||
@@ -43,12 +43,14 @@ const MAX_DECL_CHARS = 1200
|
||||
/**
|
||||
* Line budget for ONE slot's expanded report. The whole point of narrowing to a
|
||||
* single slot is to spend less context, so a report a model cannot finish
|
||||
* reading is a defect rather than a detail. The widest measured slot renders 60
|
||||
* lines, so this leaves room to document a slot properly while catching the two
|
||||
* ways a report runs away: an owner share that hands down a subsystem instead of
|
||||
* a share, and prose that grew into a manual.
|
||||
* reading is a defect rather than a detail. The budget leaves room to document
|
||||
* a slot properly while catching the two ways a report runs away: an owner
|
||||
* share that hands down a subsystem instead of a share, and prose that grew
|
||||
* into a manual. Every report also lists one line per standard prop seat of its
|
||||
* scope, so the widest Session-scope slot (`tool.call.toolview`, with the
|
||||
* global and Session access seats) sets the current 122.
|
||||
*/
|
||||
const MAX_ENTRY_LINES = 120
|
||||
const MAX_ENTRY_LINES = 122
|
||||
|
||||
/** One register-call option as the catalog teaches it. */
|
||||
interface OptionDoc {
|
||||
@@ -255,7 +257,8 @@ function standardKits(files: readonly ScannedFile[]): ReadonlyMap<string, readon
|
||||
const kits = new Map<string, readonly string[]>()
|
||||
for (const scope of SCOPES) {
|
||||
const extra = SCOPE_KIT[scope]
|
||||
kits.set(scope, [...global, ...extra === undefined ? [] : standardKitMembers(files, extra)])
|
||||
// A scope-kit member replaces the global member of the same name, so each seat is listed once.
|
||||
kits.set(scope, [...new Set([...global, ...extra === undefined ? [] : standardKitMembers(files, extra)])])
|
||||
}
|
||||
return kits
|
||||
}
|
||||
|
||||
@@ -137,6 +137,7 @@ export const SERVICE_PAGE: Record<string, string> = {
|
||||
tools: 'tools.md',
|
||||
typert: 'typert.md',
|
||||
typertGateway: 'typert.md',
|
||||
remoteAccess: 'typert.md',
|
||||
userQuestions: 'user-questions.md',
|
||||
web: 'web.md',
|
||||
workflowEngine: 'workflow.md',
|
||||
@@ -281,6 +282,10 @@ export const EVENT_WALK_EXEMPTIONS: Record<string, string> = {
|
||||
* appear on more than one page.
|
||||
*/
|
||||
export const LINK_MAP: Readonly<Record<string, string>> = {
|
||||
Principal: 'typert.md',
|
||||
PrincipalMap: 'typert.md',
|
||||
RemoteAccessResource: 'typert.md',
|
||||
RemoteAccessResourceKind: 'typert.md',
|
||||
RemoteStream: 'typert.md',
|
||||
RemoteUplinkWindow: 'typert.md',
|
||||
EventLogOptions: 'otel.md',
|
||||
@@ -294,6 +299,7 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
|
||||
WorkspaceChangesSummary: 'deliverables.md',
|
||||
WorkspaceFileDiff: 'deliverables.md',
|
||||
Reload: 'boot.md',
|
||||
ProfileReconciliation: 'boot.md',
|
||||
PluginInfo: 'boot.md',
|
||||
BundleInfo: 'boot.md',
|
||||
ChangeResult: 'boot.md',
|
||||
@@ -352,6 +358,7 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
|
||||
LlmModelInfo: 'llm-streaming.md',
|
||||
LlmProviderInfo: 'llm-streaming.md',
|
||||
LlmConfigurableProvider: 'llm-streaming.md',
|
||||
LlmNativeAuth: 'llm-streaming.md',
|
||||
LlmModelDiscoveryRequest: 'llm-streaming.md',
|
||||
LlmDiscoveredModel: 'llm-streaming.md',
|
||||
ResolvedRetryPolicy: 'llm-streaming.md',
|
||||
@@ -862,6 +869,11 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
|
||||
ConnectionTrustRequest: 'transport authentication input is owned by packages/client/connection/src/rpc.ts',
|
||||
PeerAdmission: 'Peer admission outcome is owned by packages/client/connection/src/rpc.ts',
|
||||
PeerScope: 'Peer scope contract is owned by packages/typert/protocol/src/types.ts',
|
||||
RemoteAccessPolicy: 'access policy contract is owned by packages/api/remote-access/README.md',
|
||||
RemoteAccessRequest: 'Gateway decision requests are owned by packages/api/remote-access/README.md',
|
||||
RemoteAccessDecision: 'Gateway decisions are owned by packages/api/remote-access/README.md',
|
||||
RemoteAccessFrame: 'access snapshot frames are owned by packages/api/remote-access/README.md',
|
||||
RemoteAccessBaseline: 'access snapshot frames are owned by packages/api/remote-access/README.md',
|
||||
ConnectionIndexRequest: 'frontend authentication request is owned by packages/client/connection/src/rpc.ts',
|
||||
ConnectionIndexResponse: 'frontend authentication response is owned by packages/client/connection/src/rpc.ts',
|
||||
Profile: 'resolved profile layers are owned by packages/boot/app-boot/README.md',
|
||||
|
||||
@@ -370,6 +370,14 @@ const SERVICE_ROLES: ServiceRole[] = [
|
||||
mode: 'core',
|
||||
note: 'Associates generated Remote descriptors with live Cordis services, resolves registered identities, and exposes unary calls through the shared Connection RPC carrier.',
|
||||
},
|
||||
{
|
||||
key: 'remoteAccess',
|
||||
pkg: 'api-remote-access',
|
||||
title: 'Remote method access control',
|
||||
mode: 'core',
|
||||
consumers: ['api-gateway', 'api-session-controller', 'api-workspace-controller'],
|
||||
note: 'Decides which Remote methods a non-owner Peer may call through business-registered role-based policies, filters list results, and streams each Peer access snapshot.',
|
||||
},
|
||||
{
|
||||
key: 'sessionPersistence',
|
||||
pkg: 'session-persistence',
|
||||
|
||||
@@ -125,7 +125,7 @@ class CatalogWorkflowEngine extends WorkflowEngine {
|
||||
function registerCatalogSubagentProvider(ctx: Context, name: string): void {
|
||||
const provider: SubagentProvider = {
|
||||
name,
|
||||
capabilities: { agentOptions: true, outputSchema: true, depthLimit: true, toolFilter: true, persona: true },
|
||||
capabilities: { agentOptions: true, agentPreset: true, outputSchema: true, depthLimit: true },
|
||||
inheritsParentContext: false,
|
||||
start: () => Promise.reject(new Error('tool-catalog provider cannot start a child')),
|
||||
// Declared so consumers configured for continuable background mode mount.
|
||||
|
||||
@@ -15,6 +15,9 @@ const workflow = yaml.load(readFileSync(resolve(import.meta.dirname, '../.github
|
||||
|
||||
it('confines signed Mac packaging to manual dispatch and a dedicated Apple Silicon runner', () => {
|
||||
expect(Object.keys(workflow.on)).toEqual(['workflow_dispatch'])
|
||||
expect(workflow.jobs.package).not.toHaveProperty('name')
|
||||
expect(workflow.on.workflow_dispatch).toMatchObject({ inputs: { test_release_id: { type: 'string', default: '', required: false } } })
|
||||
expect(workflow.on.workflow_dispatch).not.toHaveProperty('inputs.publish')
|
||||
expect(workflow.permissions).toEqual({ contents: 'read' })
|
||||
expect(workflow.concurrency).toEqual({ group: 'macos-desktop-package', 'cancel-in-progress': false })
|
||||
expect(workflow.jobs.package!['runs-on']).toEqual(['self-hosted', 'macOS', 'ARM64', 'dsh-mac-package-trial'])
|
||||
@@ -25,5 +28,15 @@ it('confines signed Mac packaging to manual dispatch and a dedicated Apple Silic
|
||||
expect(uploads).toHaveLength(2)
|
||||
expect(uploads[0]?.if).toBe("always() && steps.checkout.outcome == 'success'")
|
||||
expect(uploads[1]?.if).toBe('success()')
|
||||
expect(uploads[1]?.with?.path).toBe('apps/desktop/.desktop-build/targets/mac-arm64/artifacts/*.dmg\napps/desktop/.desktop-build/targets/mac-arm64/artifacts/*.zip\n')
|
||||
expect(uploads[1]?.with?.path).toBe('${{ steps.retained.outputs.directory }}/*')
|
||||
})
|
||||
|
||||
it('defaults to notarization and labels the explicit debugging option', () => {
|
||||
expect(workflow.on.workflow_dispatch).toMatchObject({ inputs: { skip_notarization: {
|
||||
type: 'boolean', default: false,
|
||||
description: 'Skip notarization/stapling: internal debugging only, not for distribution or updates',
|
||||
} } })
|
||||
const steps = workflow.jobs.package!.steps
|
||||
expect(steps.filter(step => step.run?.includes('args+=(--skip-notarization)'))).toHaveLength(2)
|
||||
expect(steps.find(step => step.name === 'Retain installers for the selected mode')?.with?.name).toContain('${{ steps.settings.outputs.mode }}')
|
||||
})
|
||||
@@ -176,7 +176,6 @@
|
||||
},
|
||||
"packages/api/gateway/tests/gateway.host.spec.ts": {
|
||||
"344e2cbbed2a8ef8d5356a24def92ac3453ffaa2efa58f5481d59206f5b79cbc": 1,
|
||||
"36f7992641e8249fd0972dedd8b989d5fcbf97d60047120c5d4cf4182e76da0a": 1,
|
||||
"529f85662621d1be427dd178aee815ab0595dc05bc2324545d4914e17515dace": 1,
|
||||
"52f51bf0e468505650c8d072d3f1d77b1d2e16492a6c7b5082e7e6c15240d7be": 1,
|
||||
"7fedb21312a9c9efcaa4f269ad32fb590191f31e6ca49b000abcda55e9dac795": 1,
|
||||
@@ -1871,7 +1870,7 @@
|
||||
"e770821c1f637aca0a346d5f6e6f0873ca4d7e3b070b557cddf773c160ec599a": 1
|
||||
},
|
||||
"packages/subagent/tool-subagent/src/index.ts": {
|
||||
"7fe58280287ff63d40e979e72329f975e11015a95e9a8eec207a5a78748d3c89": 4
|
||||
"7fe58280287ff63d40e979e72329f975e11015a95e9a8eec207a5a78748d3c89": 1
|
||||
},
|
||||
"packages/subagent/tool-subagent/tests/model-selection.spec.ts": {
|
||||
"9a362ded6cf17e795dc9cb0c88a672eb17c03d90ae87987f53dbb3a3f6bcc467": 1
|
||||
@@ -2054,9 +2053,6 @@
|
||||
"2f2c5a76501f35183d9708040f1f79cc30c8c9da5278823aa19ece7af67f5812": 1,
|
||||
"ec229b2914993fe3b9cabeffe88aaca92dac0aed964d27a4704cd64202044127": 1
|
||||
},
|
||||
"packages/typert/protocol/src/index.ts": {
|
||||
"35e98b658709d2dead42b6fc80150e0cac9075c55ea512cae80951983bd1f69c": 1
|
||||
},
|
||||
"packages/typert/protocol/tests/protocol.spec.ts": {
|
||||
"418fc1acbd1aac8b6b9ba1ac25f30a4fc33d632e372085c73f396e76b9da883a": 1,
|
||||
"539af7158f6057075289d3b1543bd5b692887755287d81f91d9b9c7cc14cf9cb": 1,
|
||||
|
||||
@@ -227,13 +227,9 @@ describe('optional bundles', () => {
|
||||
expect(matches[0]?.disabled).not.toBe(true)
|
||||
}
|
||||
}
|
||||
// A delegated child cannot arm reminders: both delegation rows deny the four
|
||||
// tools, so a child's prompt never lists them.
|
||||
for (const id of ['preset-standard', 'preset-cordis', 'preset-ptc']) {
|
||||
for (const rowId of ['tool-subagent', 'tool-subagent-fork']) {
|
||||
expect(presetPlugins(id).find(plugin => plugin.id === rowId)?.config).toMatchObject({
|
||||
toolFilter: { deny: ['schedule_create', 'schedule_delete', 'schedule_list', 'schedule_update'] },
|
||||
})
|
||||
expect(presetPlugins(id).find(plugin => plugin.id === rowId)?.config).not.toHaveProperty('toolFilter')
|
||||
}
|
||||
}
|
||||
// `minimal` declares neither, so it composes no clock reading and no reminder tool.
|
||||
|
||||
@@ -61,7 +61,6 @@ const SAFE_HOST_DEPENDENCY_EXPORTS = {
|
||||
|
||||
/** Runtime exports that require every consumer to resolve the provider's shared peer instance. */
|
||||
const PEER_REQUIRED_HOST_EXPORTS = {
|
||||
'@deepseek-ai/dsh-client-connection': ['OperatorPeer'],
|
||||
'@deepseek-ai/dsh-scope': ['carrierKeyOf', 'createScope', 'scopeOf', 'scopeTarget'],
|
||||
'@deepseek-ai/dsh-session': ['SESSION_FORMAT_VERSION'],
|
||||
'@deepseek-ai/dsh-session-persistence': ['SessionPersistenceNotFoundError'],
|
||||
|
||||
@@ -137,8 +137,7 @@ it('copies complete Office resources outside the application archive and removes
|
||||
try {
|
||||
const source = join(root, 'package', 'assets')
|
||||
const destination = join(root, 'Contents', 'Resources', 'runtime', 'office-skills')
|
||||
await mkdir(join(source, 'scripts'), { recursive: true })
|
||||
await writeFile(join(source, 'scripts', 'check_office.py'), 'print("checker")\n')
|
||||
await mkdir(source, { recursive: true })
|
||||
for (const name of ['office-docx', 'office-pptx', 'office-xlsx']) {
|
||||
await mkdir(join(source, name))
|
||||
await writeFile(join(source, name, 'SKILL.md'), `# ${name}\n`)
|
||||
@@ -149,7 +148,6 @@ it('copies complete Office resources outside the application archive and removes
|
||||
for (const name of ['office-docx', 'office-pptx', 'office-xlsx']) {
|
||||
expect(await readFile(join(destination, name, 'SKILL.md'), 'utf8')).toBe(`# ${name}\n`)
|
||||
}
|
||||
expect(await readFile(join(destination, 'scripts', 'check_office.py'), 'utf8')).toBe('print("checker")\n')
|
||||
await expect(readFile(join(destination, 'obsolete.py'))).rejects.toMatchObject({ code: 'ENOENT' })
|
||||
} finally { await rm(root, { recursive: true, force: true }) }
|
||||
})
|
||||
|
||||
@@ -262,7 +262,7 @@ export function smokePrimaryRuntime(root: string, environment: NodeJS.ProcessEnv
|
||||
const options = { stdio: 'inherit', timeout: 120_000, env: environment } as const
|
||||
execFileSync(entries.python, ['-I', '-B', '-c', 'import decimal, xml.parsers.expat, lzma, uuid, numpy, pandas; assert numpy.arange(4).sum() == 6; assert pandas.DataFrame({"n": [1, 2]}).n.sum() == 3'], options)
|
||||
execFileSync(entries.python, ['-I', '-B', join(import.meta.dirname, 'smoke.py'), JSON.stringify(manifest.pythonPackages),
|
||||
manifest.python, join(dirname(root), 'office-skills', 'scripts', 'check_office.py')], options)
|
||||
manifest.python], options)
|
||||
execFileSync(entries.python, ['-I', '-B', '-m', 'pip', 'check'], options)
|
||||
if (entries.node !== undefined) execFileSync(entries.node, ['-e', `if (process.versions.node !== ${JSON.stringify(manifest.node)}) process.exit(1)`], options)
|
||||
if (entries.pnpm !== undefined && entries.node !== undefined) execFileSync(entries.node, [entries.pnpm, '--version'], options)
|
||||
|
||||
@@ -120,14 +120,6 @@ def main():
|
||||
finally:
|
||||
reopened_workbook.close()
|
||||
assert pandas.read_excel(root / "workbook.xlsx")["Value"].iloc[0] == 42
|
||||
for file, arguments in [
|
||||
("document.docx", ["--contains", "Office 文档"]),
|
||||
("presentation.pptx", ["--contains", "Office 演示", "--count", "1"]),
|
||||
("workbook.xlsx", ["--contains", "Value", "--count", "1"]),
|
||||
]:
|
||||
checked = subprocess.run([sys.executable, "-I", "-B", sys.argv[3], str(root / file), *arguments],
|
||||
check=False, capture_output=True, text=True, timeout=30)
|
||||
assert checked.returncode == 0 and json.loads(checked.stdout)["verdict"] == "pass", checked.stdout + checked.stderr
|
||||
print("Office runtime versions and document round trips passed.")
|
||||
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ describe('gate graph validation', () => {
|
||||
const ids = withPnpmEntrypoint(() => gatesForMode('hygiene').map(subject => subject.id))
|
||||
|
||||
expect(ids).toEqual([
|
||||
'rescope-vendor', 'publint', 'constraints', 'default-product-isolation', 'product-use', 'official-bundle-catalog', 'package-dependencies', 'application-entrypoints',
|
||||
'rescope-vendor', 'publint', 'constraints', 'default-product-isolation', 'product-use', 'official-bundle-catalog', 'provider-data', 'package-dependencies', 'application-entrypoints',
|
||||
'dsh-package-licenses', 'node-next-types',
|
||||
'optional-dependency-imports', 'client-packages', 'client-ui-i18n', 'client-route-resolution', 'no-bare-dispatcher',
|
||||
'plugin-record-callers', 'no-unknown-casts',
|
||||
|
||||
@@ -369,6 +369,7 @@ function ciSharedStaticGates(): Gate[] {
|
||||
pnpmScript('default-product-isolation', 'verify-default-product-isolation', { label: 'default product isolation' }),
|
||||
pnpmScript('product-use', 'verify-product-use', { label: 'product package classification' }),
|
||||
pnpmScript('official-bundle-catalog', 'verify-official-bundle-catalog', { label: 'Official bundle catalog' }),
|
||||
pnpmScript('provider-data', 'verify-provider-data', { label: 'pi-ai provider metadata' }),
|
||||
pnpmScript('application-entrypoints', 'verify-application-entrypoints', { label: 'application entrypoints' }),
|
||||
pnpmScript('constraints', 'constraints'),
|
||||
pnpmScript('package-dependencies', 'verify-package-dependencies', { label: 'package dependencies' }),
|
||||
@@ -788,6 +789,7 @@ function hygieneLeafGates(options: { artifactNeeds?: string[] } = {}): Gate[] {
|
||||
pnpmScript('default-product-isolation', 'verify-default-product-isolation', { label: 'default product isolation' }),
|
||||
pnpmScript('product-use', 'verify-product-use', { label: 'product package classification' }),
|
||||
pnpmScript('official-bundle-catalog', 'verify-official-bundle-catalog', { label: 'Official bundle catalog' }),
|
||||
pnpmScript('provider-data', 'verify-provider-data', { label: 'pi-ai provider metadata' }),
|
||||
pnpmScript('package-dependencies', 'verify-package-dependencies', { label: 'package dependencies' }),
|
||||
pnpmScript('application-entrypoints', 'verify-application-entrypoints', { label: 'application entrypoints' }),
|
||||
pnpmScript('dsh-package-licenses', 'verify-dsh-package-licenses', { label: 'DSH package licenses' }),
|
||||
|
||||
@@ -27,6 +27,7 @@ const snapshotAdapters = [
|
||||
'apps/web/tests/message-feedback-protocol.snapshot.ts',
|
||||
'apps/web/tests/minimal-preset.snapshot.ts',
|
||||
'apps/web/tests/preset-migration.snapshot.ts',
|
||||
'apps/web/tests/subagent-fork-schedule.snapshot.ts',
|
||||
'snapshots/acp/acp.snapshot.ts',
|
||||
'snapshots/sdk/sdk.snapshot.ts',
|
||||
'snapshots/session/headless.snapshot.ts',
|
||||
@@ -55,7 +56,11 @@ async function scenarios(): Promise<Scenario[]> {
|
||||
expect(existsSync(path), `${profile}/${entry.name}/snapshot.yml`).toBe(true)
|
||||
const manifest = parseSnapshotManifest(await readFile(path, 'utf8'), path)
|
||||
expect(manifest.scenario, `${profile}/${entry.name}: scenario`).toBe(entry.name)
|
||||
expect(manifest.profile, `${profile}/${entry.name}: profile`).toBe(profile === 'session' ? 'headless' : profile)
|
||||
if (profile === 'sdk') {
|
||||
expect(['sdk', 'sdk-minimal'], `${profile}/${entry.name}: profile`).toContain(manifest.profile)
|
||||
} else {
|
||||
expect(manifest.profile, `${profile}/${entry.name}: profile`).toBe(profile === 'session' ? 'headless' : profile)
|
||||
}
|
||||
expect(manifest.composition, `${profile}/${entry.name}: composition`).toBeTypeOf('string')
|
||||
expect(manifest.recording, `${profile}/${entry.name}: recording`).toMatch(/^(live|authored)$/)
|
||||
expect(manifest.header, `${profile}/${entry.name}: header`).toBeDefined()
|
||||
|
||||
@@ -949,7 +949,6 @@ def _smoke_sdk_authoring_cached(base_url: str, executable: Path, update_snapshot
|
||||
subprocess.run([
|
||||
str(python), "-I", "-B", str(Path(__file__).parent / "primary-runtime/smoke.py"),
|
||||
json.dumps(manifest["pythonPackages"]), manifest["python"],
|
||||
str(resources / "office-skills/scripts/check_office.py"),
|
||||
], check=True, timeout=120,
|
||||
env={name: value for name, value in os.environ.items()
|
||||
if not re.search(r"KEY|SECRET|TOKEN|PASSWORD", name, re.I)})
|
||||
|
||||
@@ -2900,7 +2900,7 @@
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
"text": "Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
@@ -2919,6 +2919,10 @@
|
||||
"name": "approval:policy",
|
||||
"text": "Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."
|
||||
},
|
||||
{
|
||||
"name": "tool:subagent:depth",
|
||||
"text": "Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."
|
||||
},
|
||||
{
|
||||
"name": "subagent:delegation",
|
||||
"text": "You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
@@ -3658,7 +3662,7 @@
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
"text": "Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
@@ -3677,6 +3681,10 @@
|
||||
"name": "approval:policy",
|
||||
"text": "Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."
|
||||
},
|
||||
{
|
||||
"name": "tool:subagent:depth",
|
||||
"text": "Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."
|
||||
},
|
||||
{
|
||||
"name": "subagent:delegation",
|
||||
"text": "You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin:serial-created-fixture"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","reasoningEffort":"high","maxTokens":256000},"adapterDefaults":{"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","snapshot_double","subagent","workflow","working_directory"]},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}}
|
||||
{"type":"session/title","data":{"title":"Reply with exactly DIRECT_CHILD_OK and","messageSeqs":[12],"source":{"kind":"fallback"}}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin:serial-created-fixture"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly WORKFLOW_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","reasoningEffort":"high","maxTokens":256000},"adapterDefaults":{"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","snapshot_double","subagent","workflow","working_directory"]},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}}
|
||||
{"type":"session/title","data":{"title":"Reply with exactly WORKFLOW_CHILD_OK and","messageSeqs":[12],"source":{"kind":"fallback"}}}
|
||||
|
||||
@@ -18,6 +18,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
@@ -67,6 +83,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
@@ -135,6 +167,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
|
||||
@@ -18,6 +18,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
@@ -67,6 +83,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
@@ -135,6 +167,22 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_image",
|
||||
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"description": "Path to the image file, resolved by the filesystem backend."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "working_directory",
|
||||
"description": "Read the current working directory, or change it with cd. Relative paths use the current directory. Existing shells and running processes keep their own directories.",
|
||||
|
||||
@@ -1901,6 +1901,11 @@
|
||||
"symbol": "LlmConfigurableProvider",
|
||||
"source": "packages/llm/llm/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/llm-streaming.md",
|
||||
"symbol": "LlmNativeAuth",
|
||||
"source": "packages/llm/llm/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/permission-presets.md",
|
||||
"symbol": "Config",
|
||||
@@ -2081,6 +2086,16 @@
|
||||
"symbol": "RemoteStreamHandle",
|
||||
"source": "packages/typert/protocol/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "PrincipalMap",
|
||||
"source": "packages/typert/protocol/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "Principal",
|
||||
"source": "packages/typert/protocol/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "PeerScope",
|
||||
@@ -2096,6 +2111,31 @@
|
||||
"symbol": "RemoteInvocation",
|
||||
"source": "packages/typert/protocol/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "TypertResourceMap",
|
||||
"source": "packages/typert/protocol/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "RemoteAccessResourceKind",
|
||||
"source": "packages/typert/protocol/src/remote-access.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "RemoteAccessResource",
|
||||
"source": "packages/typert/protocol/src/remote-access.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "RemoteScopeOptions",
|
||||
"source": "packages/typert/protocol/src/index.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "RemoteMethodOptions",
|
||||
"source": "packages/typert/protocol/src/index.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/typert.md",
|
||||
"symbol": "TypertRegistryContract",
|
||||
@@ -2426,6 +2466,16 @@
|
||||
"doc": "docs/subsystems/worktrees.md",
|
||||
"symbol": "CreatedWorktree",
|
||||
"source": "packages/experimental/worktree/src/types.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/boot.md",
|
||||
"symbol": "ProfileReconciliation",
|
||||
"source": "packages/boot/hmr/src/index.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/boot.md",
|
||||
"symbol": "PendingModule",
|
||||
"source": "packages/boot/hmr/src/index.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -115,6 +115,7 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly<Record<string, SentenceContract>> = {
|
||||
'packages/client/connection': { kind: 'none', reason: 'Browser-side UI plugin layer; registers nothing model-facing.' },
|
||||
'packages/client/file-upload': { kind: 'none', reason: 'Browser-side request-body transport; registers nothing model-facing.' },
|
||||
'packages/api/remotes': { kind: 'none', reason: 'The Remote BFF selects business methods and forwarded events; selected services own any model-visible effect.' },
|
||||
'packages/api/remote-access': { kind: 'none', reason: 'Remote access decisions for Client callers; registers nothing model-facing.' },
|
||||
'packages/experimental/client-ui-agent-team': { kind: 'none', reason: 'The browser projection and task controls register no model-facing input.' },
|
||||
'packages/experimental/client-ui-claude-code-mods': { kind: 'none', reason: 'The browser draws Host-held mod trees and relays clicks; the mods\' own hooks own any model-visible effect.' },
|
||||
'packages/client/shortcuts': { kind: 'none', reason: 'Browser keyboard routing; registers nothing model-facing.' },
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { execFileSync } from 'node:child_process'
|
||||
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { relative, resolve } from 'node:path'
|
||||
import { resolve } from 'node:path'
|
||||
import yaml from 'js-yaml'
|
||||
import { expect, it } from 'vitest'
|
||||
import { desktopTargetBuildPaths } from '../apps/desktop/scripts/desktop-build-paths.mjs'
|
||||
|
||||
const root = resolve(import.meta.dirname, '..')
|
||||
const workflow = yaml.load(readFileSync(resolve(root, '.github/workflows/windows-package.yml'), 'utf8')) as {
|
||||
@@ -60,15 +59,24 @@ it.skipIf(process.platform !== 'win32')('resets only the allocated checkout with
|
||||
|
||||
it('routes manual packaging to the dedicated runner with explicit preset and signing selection', () => {
|
||||
expect(Object.keys(workflow.on)).toEqual(['workflow_dispatch'])
|
||||
expect(workflow.jobs.package).not.toHaveProperty('name')
|
||||
expect(job['runs-on']).toBe('dsh-win-package-trial')
|
||||
expect(workflow.concurrency).toEqual({ group: 'windows-desktop-package', 'cancel-in-progress': false })
|
||||
expect(workflow.permissions).toEqual({ contents: 'read' })
|
||||
expect(Object.keys(workflow.on.workflow_dispatch!.inputs).sort()).toEqual(['build_version', 'preset', 'signing'])
|
||||
expect(Object.keys(workflow.on.workflow_dispatch!.inputs).sort()).toEqual([
|
||||
'build_version', 'preset', 'signing', 'source_ref', 'test_release_id', 'update_channel', 'version_mode',
|
||||
])
|
||||
expect(workflow.on.workflow_dispatch!.inputs.signing!.default).toBe('unsigned')
|
||||
expect(workflow.on.workflow_dispatch!.inputs.build_version!.description).toContain('prefix must match checkout')
|
||||
expect(workflow.on.workflow_dispatch!.inputs.build_version!.required).toBe(false)
|
||||
expect(workflow.on.workflow_dispatch!.inputs.version_mode!.default).toBe('default')
|
||||
expect(workflow.on.workflow_dispatch!.inputs.source_ref!.default).toBe('master')
|
||||
expect(workflow.on.workflow_dispatch!.inputs.update_channel!.default).toBe('nightly')
|
||||
expect(job.env.PACKAGE_VERSION_MODE).toBe('${{ inputs.version_mode }}')
|
||||
expect(job.env.PACKAGE_SOURCE_REF).toBe('${{ inputs.source_ref }}')
|
||||
expect(job.env.DSH_DESKTOP_UPDATE_CHANNEL).toBe('${{ inputs.update_channel }}')
|
||||
expect(job.env.DSH_PACKAGING_PRESET).toBe('${{ inputs.preset }}')
|
||||
expect(job.env.PACKAGE_SIGNING).toBe('${{ inputs.signing }}')
|
||||
expect(job.steps.find(step => step.id === 'checkout')!.with).toMatchObject({ clean: true, 'persist-credentials': false })
|
||||
expect(job.steps.find(step => step.id === 'checkout')!.with).toMatchObject({ clean: true, 'persist-credentials': false, ref: '${{ inputs.source_ref }}' })
|
||||
expect(job.steps.find(step => step.uses?.startsWith('pnpm/action-setup@'))?.with?.dest)
|
||||
.toBe('${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}')
|
||||
})
|
||||
@@ -94,8 +102,8 @@ it('retains failure diagnostics and uploads only the selected successful install
|
||||
expect(uploads).toHaveLength(3)
|
||||
expect(uploads[0]!.if).toBe("always() && steps.checkout.outcome == 'success'")
|
||||
expect(uploads[0]!.with).toMatchObject({ path: 'apps/desktop/.desktop-build/packaging-runs/', 'include-hidden-files': true })
|
||||
for (const [mode, directory] of [['unsigned', desktopTargetBuildPaths('win-x64').unsignedArtifacts], ['signed', desktopTargetBuildPaths('win-x64').artifacts]]) {
|
||||
for (const mode of ['unsigned', 'signed']) {
|
||||
const upload = uploads.find(step => step.if === `success() && inputs.signing == '${mode}'`)!
|
||||
expect(upload.with).toMatchObject({ path: `${relative(root, directory!).replaceAll('\\', '/')}/*.exe`, 'if-no-files-found': 'error' })
|
||||
expect(upload.with).toMatchObject({ path: '${{ steps.retained.outputs.directory }}/*', 'if-no-files-found': 'error' })
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user