The feds are investigating whether former jailbird Martha Stewart (search) violated the rules of her house arrest when she attended a Time magazine gala last week, The Post has learned.

While the guru of good living has more than three months left on her home confinement, she's been seen regularly out on the town, hobnobbing with A-listers and Hollywood (search) honchos.

She says her almost daily sojourns are part of an approved work-release schedule to boost her company's profits, but her federal handlers now aren't so sure that good-time Martha is doing good time.

Following questions from The Post, the U.S. Probation Department (search) launched a probe into whether Stewart broke the rules by attending a star-studded cocktail party and dinner to celebrate Time's 100 Most Influential People issue. That list included the disgraced domestic diva.

"We're going to do some investigating to see if this event was directly related to her employment," said Chris Stanton, chief federal probation officer for the Southern District of New York, whose office had originally approved Stewart's request to go to the event.

Investigators — who seemed surprised to hear that the posh affair was billed as a "celebration" and included a sit-down dinner but that no awards were given out — will look at the event's program. It included a 90-minute cocktail party and a meal featuring poached lobster, rack of lamb, chocolate pudding with caramelized pear and raspberry sauce, and plenty of wine.

Investigators said they want to determine the exact nature of the event and the program schedule and match it against what Stewart described in her written request to attend.

Stanton said Stewart's attendance must have a "specific and concrete" link to her employment. Speaking in general terms, he said that going to a high-profile party simply for publicity or to be seen is "not good enough" justification.

The probe raises sticky questions about what constitutes "work" for Stewart, the CEO of Martha Stewart Living Omnimedia.

Released from a federal prison March 4 after serving five months for obstruction of justice, Stewart is under house arrest and must wear an electronic ankle bracelet for five months to monitor her whereabouts.

She is allowed to leave her 153-acre Bedford estate in Westchester County for 48 hours a week for religious services, food shopping, medical or dental appointments, and work.

Stewart recently appeared at two Manhattan luncheons to accept magazine awards, which Stanton said was acceptable

She also has been spotted at a West 23rd Street dumpling house and a sushi restaurant. While social meals in restaurants are forbidden, sharing a meal with colleagues while on business is OK, Stanton said.

Depending on the seriousness of any violation found, consequences could range from a reprimand to a restriction of her work activities — or even a return to prison to complete her sentence.

Stewart's home confinement ends the second week in August. After that, she must remain under supervised release for another year and seven months, a less stringent punishment.

At Time's gala, Stewart, wearing a shimmery gold jacket and pants that discreetly covered her electronic anklet, attended the cocktail hour, where she "worked the room," said an attendee.

"She was greeting people and they were greeting her," the partygoer said.

Stewart seemed relaxed and "just happy to be there," he added.

Guests included Nicole Kidman, Barbara Walters, and Bill Bradley.

At dinner, Stewart sat with singer Melissa Etheridge and AOL exec Dick Parsons.

Each of Time's 100 list will receive crystal awards in recognition, but they were not given that evening,

However, Stewart was one of six honorees chosen in advance to give toasts to the people who had influenced them. The others included New England Patriots Coach Bill Belichick, actress Aishwarya Rai, and state Attorney General Eliot Spitzer.

Stewart spoke about 45 seconds, a Time spokesman said.

But she immediately became the butt of jokes when she left the event shortly after dinner and comedian Jon Stewart took the podium.

"Did Martha leave?" he asked the crowd. "Oh, gosh, do you have to be home at a certain time? Is that how it works?"

The comedian added: "I mean no disrespect. I have to tell you, sitting with her tonight, it really makes you appreciate how well our prison system is rehabilitating people. She was polite, demure. She did — I will say this — fashion a shiv out of the lamb shank. But didn't use it, stayed very, very calm the whole time."

In a statement to The Post, Martha Stewart spokeswoman Elizabeth Estroff said Martha and her staff "carefully schedule" her 48 hours a week away from home on "projects and events that help build momentum" for her company.

"When Time Magazine recognizes Martha Stewart, MSLO's founder, as one of the 100 most influential people in the world, our company benefits from that honor," Estroff said.

"Having Martha present at industry events where she is honored and recognized for her achievements — whether or not they hand out awards — is valuable to us."