Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ logs/
tsconfig.tsbuildinfo
.superpowers/

# Python bytecode (bundled skills under skills/ ship .py sources)
# Python bytecode
__pycache__/
*.pyc
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## uv

PawWork bundles `uv` by Astral to supply a Python runtime for Excel/Word/PowerPoint skills that generate or edit Office files via Python libraries.
PawWork bundles `uv` by Astral to supply a Python runtime for generating or editing Office documents via Python libraries.

- Project: https://github.com/astral-sh/uv
- Version: 0.11.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ describe("electron builder app-update config", () => {
expect(config.extraResources).toEqual([
expect.objectContaining({ to: "dsh/" }),
expect.objectContaining({ to: "icons", filter: ["dock.png", "icon.png", "icon.ico"] }),
expect.objectContaining({ to: "skills" }),
expect.objectContaining({ to: "THIRD_PARTY_NOTICES.md" }),
expect.objectContaining({ to: "tools/" }),
])
Expand Down
5 changes: 0 additions & 5 deletions packages/desktop-electron/electron-builder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ const getBase = (channel: PawWorkChannel): Configuration => ({
to: "icons",
filter: ["dock.png", "icon.png", "icon.ico"],
},
{
from: path.join(rootDir, "skills"),
to: "skills",
filter: ["**/*"],
},
{
from: path.join(rootDir, "THIRD_PARTY_NOTICES.md"),
to: "THIRD_PARTY_NOTICES.md",
Expand Down
2 changes: 0 additions & 2 deletions packages/desktop-electron/scripts/ci-smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ describe("ci smoke helpers", () => {
freeProviderActive: true,
v1SessionImported: true,
v1SessionVisibleInSidebar: true,
skillNames: ["office-docx", "office-pdf", "office-pptx", "office-xlsx"],
sessionId: "session-1",
sessionIdsBeforeRestart: ["session-1"],
}
Expand Down Expand Up @@ -285,7 +284,6 @@ describe("ci smoke helpers", () => {
freeProviderActive: false,
v1SessionImported: false,
v1SessionVisibleInSidebar: false,
skillNames: ["office-docx"],
}

test("accepts a snapshot where every product capability is present", () => {
Expand Down
8 changes: 1 addition & 7 deletions packages/desktop-electron/scripts/ci-smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export type CiSmokeProductSnapshot = {
freeProviderActive: boolean
v1SessionImported: boolean
v1SessionVisibleInSidebar: boolean
skillNames: string[]
sessionId: string
sessionIdsBeforeRestart: string[]
}
Expand Down Expand Up @@ -500,7 +499,6 @@ export async function inspectCiSmokeProduct(target: CdpTarget, workspacePath: st
}
const providers = (await call("llm.providers", {})).providers
const session = await call("session.create", { cwd: ${workspace} })
const skills = (await call("skill.list", { sessionId: session.sessionId })).skills
const sessionIdsBeforeRestart = (await call("session.list", {})).items.map((item) => item.sessionId)
const freeProvider = providers.find((provider) => provider.provider === "opencode")
return JSON.stringify({
Expand Down Expand Up @@ -539,7 +537,6 @@ export async function inspectCiSmokeProduct(target: CdpTarget, workspacePath: st
freeProviderActive: freeProvider?.active === true && freeProvider?.displayName === "OpenCode Free",
v1SessionImported,
v1SessionVisibleInSidebar,
skillNames: skills.map((skill) => skill.name).sort(),
sessionId: session.sessionId,
sessionIdsBeforeRestart,
})
Expand Down Expand Up @@ -710,9 +707,6 @@ export function assertCiSmokeProduct(snapshot: CiSmokeProductSnapshot, platform:
snapshot.freeProviderActive ? null : "OpenCode Free provider is not active",
snapshot.v1SessionImported ? null : "V1 session was not imported into DSH",
snapshot.v1SessionVisibleInSidebar ? null : "Imported V1 session never appeared in the sidebar without a reload",
["office-docx", "office-pdf", "office-pptx", "office-xlsx"].every((name) => snapshot.skillNames.includes(name))
? null
: `bundled Office skills are incomplete: ${snapshot.skillNames.join(", ")}`,
].filter((failure): failure is string => failure !== null)

if (failures.length) throw new Error(`DSH product smoke failed:\n- ${failures.join("\n- ")}`)
Expand Down Expand Up @@ -886,7 +880,7 @@ async function main() {
cdpTarget = await probeCiSmokeCdpTarget(cdpPort)
product = await inspectCiSmokeProduct(cdpTarget, homeDir)
assertCiSmokeProduct(product)
console.log("CI smoke verified DSH product UI, free model, and bundled skills")
console.log("CI smoke verified DSH product UI and free model")
await waitForSessionOnDisk(dshHome, product.sessionId)
console.log(`CI smoke sessions before shutdown: ${product.sessionIdsBeforeRestart.join(", ") || "(none)"}`)
console.log(`CI smoke session files before shutdown:\n${describeDirectory(join(dshHome, "sessions"))}`)
Expand Down
5 changes: 1 addition & 4 deletions packages/desktop-electron/src/main/dsh-product-home.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ describe("DSH product home", () => {
}),
).toEqual({
dsh: join("/Applications/PawWork.app/Contents/Resources", "dsh"),
skills: join("/Applications/PawWork.app/Contents/Resources", "skills"),
})
expect(
resolveProductResources({
Expand All @@ -59,7 +58,6 @@ describe("DSH product home", () => {
}),
).toEqual({
dsh: join("/repo/packages/desktop-electron", "resources", "dsh"),
skills: join("/repo/packages/desktop-electron", "..", "..", "skills"),
})
})

Expand Down Expand Up @@ -177,7 +175,7 @@ describe("DSH product home", () => {
})

test("isolates DSH from ambient model credentials", () => {
const environment = buildDshEnvironment("/app/skills", {
const environment = buildDshEnvironment({
PATH: "/usr/bin",
DSH_HOME: "/ambient/dsh",
OPENCODE_API_KEY: "ambient",
Expand All @@ -188,7 +186,6 @@ describe("DSH product home", () => {

expect(environment).toEqual({
PATH: "/usr/bin",
DSH_BUNDLED_SKILL_DIR: "/app/skills",
})
})
})
9 changes: 1 addition & 8 deletions packages/desktop-electron/src/main/dsh-product-home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ export function resolveProductResources(options: ResolveProductResourcesOptions)
dsh: options.isPackaged
? join(options.resourcesPath, "dsh")
: join(options.appPath, "resources", "dsh"),
skills: options.isPackaged
? join(options.resourcesPath, "skills")
: join(options.appPath, "..", "..", "skills"),
}
}

Expand Down Expand Up @@ -77,13 +74,9 @@ export function prepareDshProductHome(options: PrepareDshProductHomeOptions) {
}
}

export function buildDshEnvironment(
bundledSkillDir: string,
source: NodeJS.ProcessEnv = process.env,
) {
export function buildDshEnvironment(source: NodeJS.ProcessEnv = process.env) {
const environment: NodeJS.ProcessEnv = {
...source,
DSH_BUNDLED_SKILL_DIR: bundledSkillDir,
}
delete environment.DSH_HOME
for (const name of DROPPED_MODEL_ENVIRONMENT) delete environment[name]
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-electron/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function launchDsh() {
productHome: product.home,
productPatch: product.patch,
toolsDir: join(dirname(productResources.dsh), "tools"),
env: buildDshEnvironment(productResources.skills),
env: buildDshEnvironment(),
timeoutMs: 30_000,
spawn: (executable, args, options) => spawn(executable, args, options),
onStdout: (chunk) => logger.log("DSH stdout", { chunk: chunk.trimEnd() }),
Expand Down
64 changes: 0 additions & 64 deletions skills/office-docx/SKILL.md

This file was deleted.

7 changes: 0 additions & 7 deletions skills/office-docx/pyproject.toml

This file was deleted.

74 changes: 0 additions & 74 deletions skills/office-docx/scripts/check_docx.py

This file was deleted.

56 changes: 0 additions & 56 deletions skills/office-pdf/SKILL.md

This file was deleted.

13 changes: 0 additions & 13 deletions skills/office-pdf/pyproject.toml

This file was deleted.

Loading
Loading